diff --git a/Gruntfile.js b/Gruntfile.js index 0520c715fc..d69c17f84c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,42 +1,10 @@ +const path = require('path'); const sass = require('sass'); +const webpackConfig = require('./webpack.config.js'); module.exports = function(grunt) { - const concatFile = 'temp/js/materialize_concat.js.map'; - const jsFiles = [ - 'js/cash.js', - 'js/waves.js', - 'js/component.js', - 'js/global.js', - 'js/anime.min.js', - 'js/collapsible.js', - 'js/dropdown.js', - 'js/modal.js', - 'js/materialbox.js', - 'js/parallax.js', - 'js/tabs.js', - 'js/tooltip.js', - 'js/toasts.js', - 'js/sidenav.js', - 'js/scrollspy.js', - 'js/autocomplete.js', - 'js/forms.js', - 'js/slider.js', - 'js/cards.js', - 'js/chips.js', - 'js/pushpin.js', - 'js/buttons.js', - 'js/datepicker.js', - 'js/timepicker.js', - 'js/characterCounter.js', - 'js/carousel.js', - 'js/tapTarget.js', - 'js/select.js', - 'js/range.js' - ]; - // configure the tasks const config = { - // Jasmine jasmine: { components: { src: ['bin/materialize.js'], @@ -60,13 +28,11 @@ module.exports = function(grunt) { } }, - // Sass sass: { // Global options options: { implementation: sass }, - // Task expanded: { // Target options @@ -112,7 +78,6 @@ module.exports = function(grunt) { } }, - // PostCss Autoprefixer postcss: { options: { processors: [ @@ -141,34 +106,46 @@ module.exports = function(grunt) { } }, - babel: { + webpack: { options: { - sourceMap: false, - plugins: [ - 'transform-es2015-arrow-functions', - 'transform-es2015-block-scoping', - 'transform-es2015-classes', - 'transform-es2015-template-literals', - 'transform-es2015-object-super', - 'babel-plugin-transform-object-rest-spread' - ] + /*stats: !process.env.NODE_ENV || process.env.NODE_ENV === "development",*/ }, - bin: { - options: { - sourceMap: true + + dev: Object.assign({}, webpackConfig, { + mode: 'development' + }), + + dev_watch: Object.assign({}, webpackConfig, { + mode: 'development', + watch: true, + }), + + dev_dist: Object.assign({}, webpackConfig, { + mode: 'development', + devtool: false, + optimization: { + minimize: false }, - files: { - 'bin/materialize.js': 'temp/js/materialize_concat.js' + output: { + filename: 'materialize.js', + path: path.resolve(__dirname, 'dist/js'), + libraryTarget: 'var', + library: 'M' } - }, - dist: { - files: { - 'dist/js/materialize.js': 'temp/js/materialize.js' + }), + + prod_min: Object.assign({}, webpackConfig, { + mode: 'production', + devtool: 'source-map', + output: { + filename: 'materialize.min.js', + path: path.resolve(__dirname, 'dist/js'), + libraryTarget: 'var', + library: 'M' } - } - }, + }), + }, - // Browser Sync integration browserSync: { bsFiles: ['bin/*', 'css/ghpages-materialize.css', '!**/node_modules/**/*'], options: { @@ -186,55 +163,6 @@ module.exports = function(grunt) { } }, - // Concat - concat: { - options: { - separator: ';' - }, - dist: { - // the files to concatenate - src: jsFiles, - // the location of the resulting JS file - dest: 'temp/js/materialize.js' - }, - temp: { - // the files to concatenate - options: { - sourceMap: true, - sourceMapStyle: 'link' - }, - src: jsFiles, - // the location of the resulting JS file - dest: 'temp/js/materialize_concat.js' - } - }, - - // Uglify - uglify: { - options: { - // Use these options when debugging - // mangle: false, - // compress: false, - // beautify: true - }, - dist: { - files: { - 'dist/js/materialize.min.js': ['dist/js/materialize.js'] - } - }, - bin: { - files: { - 'bin/materialize.min.js': ['bin/materialize.js'] - } - }, - extras: { - files: { - 'extras/noUiSlider/nouislider.min.js': ['extras/noUiSlider/nouislider.js'] - } - } - }, - - // Compress compress: { main: { options: { @@ -255,42 +183,7 @@ module.exports = function(grunt) { files: [ { expand: true, cwd: 'sass/', src: ['materialize.scss'], dest: 'materialize-src/sass/' }, { expand: true, cwd: 'sass/', src: ['components/**/*'], dest: 'materialize-src/sass/' }, - { - expand: true, - cwd: 'js/', - src: [ - 'anime.min.js', - 'cash.js', - 'component.js', - 'global.js', - 'collapsible.js', - 'dropdown.js', - 'modal.js', - 'materialbox.js', - 'parallax.js', - 'tabs.js', - 'tooltip.js', - 'waves.js', - 'toasts.js', - 'sidenav.js', - 'scrollspy.js', - 'autocomplete.js', - 'forms.js', - 'slider.js', - 'cards.js', - 'chips.js', - 'pushpin.js', - 'buttons.js', - 'datepicker.js', - 'timepicker.js', - 'characterCounter.js', - 'carousel.js', - 'tapTarget.js', - 'select.js', - 'range.js' - ], - dest: 'materialize-src/js/' - }, + { expand: true, cwd: 'src/', src: ['**/*'], dest: 'materialize-src/ts/' }, { expand: true, cwd: 'dist/js/', src: ['**/*'], dest: 'materialize-src/js/bin/' }, { expand: true, cwd: './', src: ['LICENSE', 'README.md'], dest: 'materialize-src/' } ] @@ -353,14 +246,6 @@ module.exports = function(grunt) { } }, - // Clean - clean: { - temp: { - src: ['temp/'] - } - }, - - // Pug pug: { compile: { options: { @@ -372,7 +257,7 @@ module.exports = function(grunt) { files: [{ expand: true, cwd: 'pug/', - src: ['*.pug'], + src: ['*.pug', '!**/pug/includes/*.*'], dest: 'docs/', rename: function (dest, src) { return dest + src.split('.', 2)[0] + '.html'; @@ -381,7 +266,6 @@ module.exports = function(grunt) { } }, - // Watch Files watch: { pug: { files: ['pug/**/*'], @@ -391,16 +275,14 @@ module.exports = function(grunt) { spawn: false } }, - - js: { - files: ['js/**/*', '!js/init.js'], - tasks: ['js_compile'], + copydocs: { + files: ['bin/*.js'], + tasks: ['copy:docs_js'], options: { interrupt: false, spawn: false } }, - sass: { files: ['sass/**/*'], tasks: ['sass_compile'], @@ -411,7 +293,6 @@ module.exports = function(grunt) { } }, - // Concurrent concurrent: { options: { logConcurrentOutput: true, @@ -419,71 +300,17 @@ module.exports = function(grunt) { }, monitor: { tasks: [ + 'webpack:dev_watch', 'pug_compile', 'sass_compile', - 'js_compile', 'watch:pug', - 'watch:js', 'watch:sass', - 'notify:watching', + 'watch:copydocs', 'server' ] } }, - // Notifications - notify: { - watching: { - options: { - enabled: true, - message: 'Watching Files!', - title: 'Materialize', // defaults to the name in package.json, or will use project directory's name - success: true, // whether successful grunt executions should be notified automatically - duration: 1 // the duration of notification in seconds, for `notify-send only - } - }, - - sass_compile: { - options: { - enabled: true, - message: 'Sass Compiled!', - title: 'Materialize', - success: true, - duration: 1 - } - }, - - js_compile: { - options: { - enabled: true, - message: 'JS Compiled!', - title: 'Materialize', - success: true, - duration: 1 - } - }, - - pug_compile: { - options: { - enabled: true, - message: 'Pug Compiled!', - title: 'Materialize', - success: true, - duration: 1 - } - }, - - server: { - options: { - enabled: true, - message: 'Server Running!', - title: 'Materialize', - success: true, - duration: 1 - } - } - }, - // Replace text to update the version string replace: { version: { @@ -537,17 +364,16 @@ module.exports = function(grunt) { } }, - // Rename files rename: { rename_src: { - src: 'bin/materialize-src' + '.zip', + src: 'bin/materialize-src.zip', dest: 'bin/materialize-src-v' + grunt.option('newver') + '.zip', options: { ignore: true } }, rename_compiled: { - src: 'bin/materialize' + '.zip', + src: 'bin/materialize.zip', dest: 'bin/materialize-v' + grunt.option('newver') + '.zip', options: { ignore: true @@ -593,20 +419,16 @@ module.exports = function(grunt) { // grunt.loadNpmTasks('grunt-gitinfo'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-sass'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-compress'); - grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-pug'); grunt.loadNpmTasks('grunt-concurrent'); - grunt.loadNpmTasks('grunt-notify'); grunt.loadNpmTasks('grunt-text-replace'); grunt.loadNpmTasks('grunt-banner'); grunt.loadNpmTasks('grunt-rename-util'); grunt.loadNpmTasks('grunt-browser-sync'); grunt.loadNpmTasks('grunt-contrib-jasmine'); grunt.loadNpmTasks('grunt-postcss'); - grunt.loadNpmTasks('grunt-babel'); + grunt.loadNpmTasks('grunt-webpack'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-copy'); @@ -616,10 +438,8 @@ module.exports = function(grunt) { 'sass:min', 'postcss:expanded', 'postcss:min', - 'concat:dist', - 'babel:dist', - 'uglify:dist', - 'uglify:extras', + 'webpack:dev_dist', + 'webpack:prod_min', 'usebanner:release', 'compress:main', 'compress:src', @@ -629,30 +449,12 @@ module.exports = function(grunt) { 'replace:package_json', 'rename:rename_src', 'rename:rename_compiled', - 'clean:temp' ]); - - grunt.task.registerTask('configureBabel', 'configures babel options', function() { - config.babel.bin.options.inputSourceMap = grunt.file.readJSON(concatFile); - }); - - grunt.registerTask('pug_compile', ['pug', 'notify:pug_compile']); - grunt.registerTask('js_compile', [ - 'concat:temp', - 'configureBabel', - 'babel:bin', - 'clean:temp', - 'copy:docs_js' - ]); - grunt.registerTask('sass_compile', [ - 'sass:gh', - 'sass:bin', - 'postcss:gh', - 'postcss:bin', - 'notify:sass_compile' - ]); - grunt.registerTask('server', ['browserSync', 'notify:server']); - grunt.registerTask('monitor', ['concurrent:monitor']); + grunt.registerTask('pug_compile', ['pug']); + grunt.registerTask('js_compile', ['webpack:dev', 'copy:docs_js']); + grunt.registerTask('sass_compile', ['sass:gh', 'sass:bin', 'postcss:gh', 'postcss:bin']); + grunt.registerTask('server', ['browserSync']); + grunt.registerTask('monitor', ['concurrent:monitor']); // DEV grunt.registerTask('test', ['js_compile', 'sass_compile', 'connect', 'jasmine']); grunt.registerTask('jas_test', ['connect', 'jasmine']); grunt.registerTask('test_repeat', function() { @@ -661,7 +463,6 @@ module.exports = function(grunt) { for (let i = 0; i < n; i++) { tasks.push('jasmine'); } - grunt.task.run(tasks); }); grunt.registerTask('docs', [ diff --git a/README.md b/README.md index 595c6e2c78..fbf41755a2 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@

-

MaterializeCSS

+

Materialize

- Materialize, a CSS Framework based on material design. + Materialize, a CSS Framework based on Material Design.
-- Browse the docs --
diff --git a/docs/css/ghpages-materialize.css b/docs/css/ghpages-materialize.css index 3f7b381d31..88eeccc52f 100644 --- a/docs/css/ghpages-materialize.css +++ b/docs/css/ghpages-materialize.css @@ -1,7 +1 @@ -.materialize-red{background-color:#e51c23 !important}.materialize-red-text{color:#e51c23 !important}.materialize-red.lighten-5{background-color:#fdeaeb !important}.materialize-red-text.text-lighten-5{color:#fdeaeb !important}.materialize-red.lighten-4{background-color:#f8c1c3 !important}.materialize-red-text.text-lighten-4{color:#f8c1c3 !important}.materialize-red.lighten-3{background-color:#f3989b !important}.materialize-red-text.text-lighten-3{color:#f3989b !important}.materialize-red.lighten-2{background-color:#ee6e73 !important}.materialize-red-text.text-lighten-2{color:#ee6e73 !important}.materialize-red.lighten-1{background-color:#ea454b !important}.materialize-red-text.text-lighten-1{color:#ea454b !important}.materialize-red.darken-1{background-color:#d0181e !important}.materialize-red-text.text-darken-1{color:#d0181e !important}.materialize-red.darken-2{background-color:#b9151b !important}.materialize-red-text.text-darken-2{color:#b9151b !important}.materialize-red.darken-3{background-color:#a21318 !important}.materialize-red-text.text-darken-3{color:#a21318 !important}.materialize-red.darken-4{background-color:#8b1014 !important}.materialize-red-text.text-darken-4{color:#8b1014 !important}.red{background-color:#f44336 !important}.red-text{color:#f44336 !important}.red.lighten-5{background-color:#ffebee !important}.red-text.text-lighten-5{color:#ffebee !important}.red.lighten-4{background-color:#ffcdd2 !important}.red-text.text-lighten-4{color:#ffcdd2 !important}.red.lighten-3{background-color:#ef9a9a !important}.red-text.text-lighten-3{color:#ef9a9a !important}.red.lighten-2{background-color:#e57373 !important}.red-text.text-lighten-2{color:#e57373 !important}.red.lighten-1{background-color:#ef5350 !important}.red-text.text-lighten-1{color:#ef5350 !important}.red.darken-1{background-color:#e53935 !important}.red-text.text-darken-1{color:#e53935 !important}.red.darken-2{background-color:#d32f2f !important}.red-text.text-darken-2{color:#d32f2f !important}.red.darken-3{background-color:#c62828 !important}.red-text.text-darken-3{color:#c62828 !important}.red.darken-4{background-color:#b71c1c !important}.red-text.text-darken-4{color:#b71c1c !important}.red.accent-1{background-color:#ff8a80 !important}.red-text.text-accent-1{color:#ff8a80 !important}.red.accent-2{background-color:#ff5252 !important}.red-text.text-accent-2{color:#ff5252 !important}.red.accent-3{background-color:#ff1744 !important}.red-text.text-accent-3{color:#ff1744 !important}.red.accent-4{background-color:#d50000 !important}.red-text.text-accent-4{color:#d50000 !important}.pink{background-color:#e91e63 !important}.pink-text{color:#e91e63 !important}.pink.lighten-5{background-color:#fce4ec !important}.pink-text.text-lighten-5{color:#fce4ec !important}.pink.lighten-4{background-color:#f8bbd0 !important}.pink-text.text-lighten-4{color:#f8bbd0 !important}.pink.lighten-3{background-color:#f48fb1 !important}.pink-text.text-lighten-3{color:#f48fb1 !important}.pink.lighten-2{background-color:#f06292 !important}.pink-text.text-lighten-2{color:#f06292 !important}.pink.lighten-1{background-color:#ec407a !important}.pink-text.text-lighten-1{color:#ec407a !important}.pink.darken-1{background-color:#d81b60 !important}.pink-text.text-darken-1{color:#d81b60 !important}.pink.darken-2{background-color:#c2185b !important}.pink-text.text-darken-2{color:#c2185b !important}.pink.darken-3{background-color:#ad1457 !important}.pink-text.text-darken-3{color:#ad1457 !important}.pink.darken-4{background-color:#880e4f !important}.pink-text.text-darken-4{color:#880e4f !important}.pink.accent-1{background-color:#ff80ab !important}.pink-text.text-accent-1{color:#ff80ab !important}.pink.accent-2{background-color:#ff4081 !important}.pink-text.text-accent-2{color:#ff4081 !important}.pink.accent-3{background-color:#f50057 !important}.pink-text.text-accent-3{color:#f50057 !important}.pink.accent-4{background-color:#c51162 !important}.pink-text.text-accent-4{color:#c51162 !important}.purple{background-color:#9c27b0 !important}.purple-text{color:#9c27b0 !important}.purple.lighten-5{background-color:#f3e5f5 !important}.purple-text.text-lighten-5{color:#f3e5f5 !important}.purple.lighten-4{background-color:#e1bee7 !important}.purple-text.text-lighten-4{color:#e1bee7 !important}.purple.lighten-3{background-color:#ce93d8 !important}.purple-text.text-lighten-3{color:#ce93d8 !important}.purple.lighten-2{background-color:#ba68c8 !important}.purple-text.text-lighten-2{color:#ba68c8 !important}.purple.lighten-1{background-color:#ab47bc !important}.purple-text.text-lighten-1{color:#ab47bc !important}.purple.darken-1{background-color:#8e24aa !important}.purple-text.text-darken-1{color:#8e24aa !important}.purple.darken-2{background-color:#7b1fa2 !important}.purple-text.text-darken-2{color:#7b1fa2 !important}.purple.darken-3{background-color:#6a1b9a !important}.purple-text.text-darken-3{color:#6a1b9a !important}.purple.darken-4{background-color:#4a148c !important}.purple-text.text-darken-4{color:#4a148c !important}.purple.accent-1{background-color:#ea80fc !important}.purple-text.text-accent-1{color:#ea80fc !important}.purple.accent-2{background-color:#e040fb !important}.purple-text.text-accent-2{color:#e040fb !important}.purple.accent-3{background-color:#d500f9 !important}.purple-text.text-accent-3{color:#d500f9 !important}.purple.accent-4{background-color:#a0f !important}.purple-text.text-accent-4{color:#a0f !important}.deep-purple{background-color:#673ab7 !important}.deep-purple-text{color:#673ab7 !important}.deep-purple.lighten-5{background-color:#ede7f6 !important}.deep-purple-text.text-lighten-5{color:#ede7f6 !important}.deep-purple.lighten-4{background-color:#d1c4e9 !important}.deep-purple-text.text-lighten-4{color:#d1c4e9 !important}.deep-purple.lighten-3{background-color:#b39ddb !important}.deep-purple-text.text-lighten-3{color:#b39ddb !important}.deep-purple.lighten-2{background-color:#9575cd !important}.deep-purple-text.text-lighten-2{color:#9575cd !important}.deep-purple.lighten-1{background-color:#7e57c2 !important}.deep-purple-text.text-lighten-1{color:#7e57c2 !important}.deep-purple.darken-1{background-color:#5e35b1 !important}.deep-purple-text.text-darken-1{color:#5e35b1 !important}.deep-purple.darken-2{background-color:#512da8 !important}.deep-purple-text.text-darken-2{color:#512da8 !important}.deep-purple.darken-3{background-color:#4527a0 !important}.deep-purple-text.text-darken-3{color:#4527a0 !important}.deep-purple.darken-4{background-color:#311b92 !important}.deep-purple-text.text-darken-4{color:#311b92 !important}.deep-purple.accent-1{background-color:#b388ff !important}.deep-purple-text.text-accent-1{color:#b388ff !important}.deep-purple.accent-2{background-color:#7c4dff !important}.deep-purple-text.text-accent-2{color:#7c4dff !important}.deep-purple.accent-3{background-color:#651fff !important}.deep-purple-text.text-accent-3{color:#651fff !important}.deep-purple.accent-4{background-color:#6200ea !important}.deep-purple-text.text-accent-4{color:#6200ea !important}.indigo{background-color:#3f51b5 !important}.indigo-text{color:#3f51b5 !important}.indigo.lighten-5{background-color:#e8eaf6 !important}.indigo-text.text-lighten-5{color:#e8eaf6 !important}.indigo.lighten-4{background-color:#c5cae9 !important}.indigo-text.text-lighten-4{color:#c5cae9 !important}.indigo.lighten-3{background-color:#9fa8da !important}.indigo-text.text-lighten-3{color:#9fa8da !important}.indigo.lighten-2{background-color:#7986cb !important}.indigo-text.text-lighten-2{color:#7986cb !important}.indigo.lighten-1{background-color:#5c6bc0 !important}.indigo-text.text-lighten-1{color:#5c6bc0 !important}.indigo.darken-1{background-color:#3949ab !important}.indigo-text.text-darken-1{color:#3949ab !important}.indigo.darken-2{background-color:#303f9f !important}.indigo-text.text-darken-2{color:#303f9f !important}.indigo.darken-3{background-color:#283593 !important}.indigo-text.text-darken-3{color:#283593 !important}.indigo.darken-4{background-color:#1a237e !important}.indigo-text.text-darken-4{color:#1a237e !important}.indigo.accent-1{background-color:#8c9eff !important}.indigo-text.text-accent-1{color:#8c9eff !important}.indigo.accent-2{background-color:#536dfe !important}.indigo-text.text-accent-2{color:#536dfe !important}.indigo.accent-3{background-color:#3d5afe !important}.indigo-text.text-accent-3{color:#3d5afe !important}.indigo.accent-4{background-color:#304ffe !important}.indigo-text.text-accent-4{color:#304ffe !important}.blue{background-color:#2196f3 !important}.blue-text{color:#2196f3 !important}.blue.lighten-5{background-color:#e3f2fd !important}.blue-text.text-lighten-5{color:#e3f2fd !important}.blue.lighten-4{background-color:#bbdefb !important}.blue-text.text-lighten-4{color:#bbdefb !important}.blue.lighten-3{background-color:#90caf9 !important}.blue-text.text-lighten-3{color:#90caf9 !important}.blue.lighten-2{background-color:#64b5f6 !important}.blue-text.text-lighten-2{color:#64b5f6 !important}.blue.lighten-1{background-color:#42a5f5 !important}.blue-text.text-lighten-1{color:#42a5f5 !important}.blue.darken-1{background-color:#1e88e5 !important}.blue-text.text-darken-1{color:#1e88e5 !important}.blue.darken-2{background-color:#1976d2 !important}.blue-text.text-darken-2{color:#1976d2 !important}.blue.darken-3{background-color:#1565c0 !important}.blue-text.text-darken-3{color:#1565c0 !important}.blue.darken-4{background-color:#0d47a1 !important}.blue-text.text-darken-4{color:#0d47a1 !important}.blue.accent-1{background-color:#82b1ff !important}.blue-text.text-accent-1{color:#82b1ff !important}.blue.accent-2{background-color:#448aff !important}.blue-text.text-accent-2{color:#448aff !important}.blue.accent-3{background-color:#2979ff !important}.blue-text.text-accent-3{color:#2979ff !important}.blue.accent-4{background-color:#2962ff !important}.blue-text.text-accent-4{color:#2962ff !important}.light-blue{background-color:#03a9f4 !important}.light-blue-text{color:#03a9f4 !important}.light-blue.lighten-5{background-color:#e1f5fe !important}.light-blue-text.text-lighten-5{color:#e1f5fe !important}.light-blue.lighten-4{background-color:#b3e5fc !important}.light-blue-text.text-lighten-4{color:#b3e5fc !important}.light-blue.lighten-3{background-color:#81d4fa !important}.light-blue-text.text-lighten-3{color:#81d4fa !important}.light-blue.lighten-2{background-color:#4fc3f7 !important}.light-blue-text.text-lighten-2{color:#4fc3f7 !important}.light-blue.lighten-1{background-color:#29b6f6 !important}.light-blue-text.text-lighten-1{color:#29b6f6 !important}.light-blue.darken-1{background-color:#039be5 !important}.light-blue-text.text-darken-1{color:#039be5 !important}.light-blue.darken-2{background-color:#0288d1 !important}.light-blue-text.text-darken-2{color:#0288d1 !important}.light-blue.darken-3{background-color:#0277bd !important}.light-blue-text.text-darken-3{color:#0277bd !important}.light-blue.darken-4{background-color:#01579b !important}.light-blue-text.text-darken-4{color:#01579b !important}.light-blue.accent-1{background-color:#80d8ff !important}.light-blue-text.text-accent-1{color:#80d8ff !important}.light-blue.accent-2{background-color:#40c4ff !important}.light-blue-text.text-accent-2{color:#40c4ff !important}.light-blue.accent-3{background-color:#00b0ff !important}.light-blue-text.text-accent-3{color:#00b0ff !important}.light-blue.accent-4{background-color:#0091ea !important}.light-blue-text.text-accent-4{color:#0091ea !important}.cyan{background-color:#00bcd4 !important}.cyan-text{color:#00bcd4 !important}.cyan.lighten-5{background-color:#e0f7fa !important}.cyan-text.text-lighten-5{color:#e0f7fa !important}.cyan.lighten-4{background-color:#b2ebf2 !important}.cyan-text.text-lighten-4{color:#b2ebf2 !important}.cyan.lighten-3{background-color:#80deea !important}.cyan-text.text-lighten-3{color:#80deea !important}.cyan.lighten-2{background-color:#4dd0e1 !important}.cyan-text.text-lighten-2{color:#4dd0e1 !important}.cyan.lighten-1{background-color:#26c6da !important}.cyan-text.text-lighten-1{color:#26c6da !important}.cyan.darken-1{background-color:#00acc1 !important}.cyan-text.text-darken-1{color:#00acc1 !important}.cyan.darken-2{background-color:#0097a7 !important}.cyan-text.text-darken-2{color:#0097a7 !important}.cyan.darken-3{background-color:#00838f !important}.cyan-text.text-darken-3{color:#00838f !important}.cyan.darken-4{background-color:#006064 !important}.cyan-text.text-darken-4{color:#006064 !important}.cyan.accent-1{background-color:#84ffff !important}.cyan-text.text-accent-1{color:#84ffff !important}.cyan.accent-2{background-color:#18ffff !important}.cyan-text.text-accent-2{color:#18ffff !important}.cyan.accent-3{background-color:#00e5ff !important}.cyan-text.text-accent-3{color:#00e5ff !important}.cyan.accent-4{background-color:#00b8d4 !important}.cyan-text.text-accent-4{color:#00b8d4 !important}.teal{background-color:#009688 !important}.teal-text{color:#009688 !important}.teal.lighten-5{background-color:#e0f2f1 !important}.teal-text.text-lighten-5{color:#e0f2f1 !important}.teal.lighten-4{background-color:#b2dfdb !important}.teal-text.text-lighten-4{color:#b2dfdb !important}.teal.lighten-3{background-color:#80cbc4 !important}.teal-text.text-lighten-3{color:#80cbc4 !important}.teal.lighten-2{background-color:#4db6ac !important}.teal-text.text-lighten-2{color:#4db6ac !important}.teal.lighten-1{background-color:#26a69a !important}.teal-text.text-lighten-1{color:#26a69a !important}.teal.darken-1{background-color:#00897b !important}.teal-text.text-darken-1{color:#00897b !important}.teal.darken-2{background-color:#00796b !important}.teal-text.text-darken-2{color:#00796b !important}.teal.darken-3{background-color:#00695c !important}.teal-text.text-darken-3{color:#00695c !important}.teal.darken-4{background-color:#004d40 !important}.teal-text.text-darken-4{color:#004d40 !important}.teal.accent-1{background-color:#a7ffeb !important}.teal-text.text-accent-1{color:#a7ffeb !important}.teal.accent-2{background-color:#64ffda !important}.teal-text.text-accent-2{color:#64ffda !important}.teal.accent-3{background-color:#1de9b6 !important}.teal-text.text-accent-3{color:#1de9b6 !important}.teal.accent-4{background-color:#00bfa5 !important}.teal-text.text-accent-4{color:#00bfa5 !important}.green{background-color:#4caf50 !important}.green-text{color:#4caf50 !important}.green.lighten-5{background-color:#e8f5e9 !important}.green-text.text-lighten-5{color:#e8f5e9 !important}.green.lighten-4{background-color:#c8e6c9 !important}.green-text.text-lighten-4{color:#c8e6c9 !important}.green.lighten-3{background-color:#a5d6a7 !important}.green-text.text-lighten-3{color:#a5d6a7 !important}.green.lighten-2{background-color:#81c784 !important}.green-text.text-lighten-2{color:#81c784 !important}.green.lighten-1{background-color:#66bb6a !important}.green-text.text-lighten-1{color:#66bb6a !important}.green.darken-1{background-color:#43a047 !important}.green-text.text-darken-1{color:#43a047 !important}.green.darken-2{background-color:#388e3c !important}.green-text.text-darken-2{color:#388e3c !important}.green.darken-3{background-color:#2e7d32 !important}.green-text.text-darken-3{color:#2e7d32 !important}.green.darken-4{background-color:#1b5e20 !important}.green-text.text-darken-4{color:#1b5e20 !important}.green.accent-1{background-color:#b9f6ca !important}.green-text.text-accent-1{color:#b9f6ca !important}.green.accent-2{background-color:#69f0ae !important}.green-text.text-accent-2{color:#69f0ae !important}.green.accent-3{background-color:#00e676 !important}.green-text.text-accent-3{color:#00e676 !important}.green.accent-4{background-color:#00c853 !important}.green-text.text-accent-4{color:#00c853 !important}.light-green{background-color:#8bc34a !important}.light-green-text{color:#8bc34a !important}.light-green.lighten-5{background-color:#f1f8e9 !important}.light-green-text.text-lighten-5{color:#f1f8e9 !important}.light-green.lighten-4{background-color:#dcedc8 !important}.light-green-text.text-lighten-4{color:#dcedc8 !important}.light-green.lighten-3{background-color:#c5e1a5 !important}.light-green-text.text-lighten-3{color:#c5e1a5 !important}.light-green.lighten-2{background-color:#aed581 !important}.light-green-text.text-lighten-2{color:#aed581 !important}.light-green.lighten-1{background-color:#9ccc65 !important}.light-green-text.text-lighten-1{color:#9ccc65 !important}.light-green.darken-1{background-color:#7cb342 !important}.light-green-text.text-darken-1{color:#7cb342 !important}.light-green.darken-2{background-color:#689f38 !important}.light-green-text.text-darken-2{color:#689f38 !important}.light-green.darken-3{background-color:#558b2f !important}.light-green-text.text-darken-3{color:#558b2f !important}.light-green.darken-4{background-color:#33691e !important}.light-green-text.text-darken-4{color:#33691e !important}.light-green.accent-1{background-color:#ccff90 !important}.light-green-text.text-accent-1{color:#ccff90 !important}.light-green.accent-2{background-color:#b2ff59 !important}.light-green-text.text-accent-2{color:#b2ff59 !important}.light-green.accent-3{background-color:#76ff03 !important}.light-green-text.text-accent-3{color:#76ff03 !important}.light-green.accent-4{background-color:#64dd17 !important}.light-green-text.text-accent-4{color:#64dd17 !important}.lime{background-color:#cddc39 !important}.lime-text{color:#cddc39 !important}.lime.lighten-5{background-color:#f9fbe7 !important}.lime-text.text-lighten-5{color:#f9fbe7 !important}.lime.lighten-4{background-color:#f0f4c3 !important}.lime-text.text-lighten-4{color:#f0f4c3 !important}.lime.lighten-3{background-color:#e6ee9c !important}.lime-text.text-lighten-3{color:#e6ee9c !important}.lime.lighten-2{background-color:#dce775 !important}.lime-text.text-lighten-2{color:#dce775 !important}.lime.lighten-1{background-color:#d4e157 !important}.lime-text.text-lighten-1{color:#d4e157 !important}.lime.darken-1{background-color:#c0ca33 !important}.lime-text.text-darken-1{color:#c0ca33 !important}.lime.darken-2{background-color:#afb42b !important}.lime-text.text-darken-2{color:#afb42b !important}.lime.darken-3{background-color:#9e9d24 !important}.lime-text.text-darken-3{color:#9e9d24 !important}.lime.darken-4{background-color:#827717 !important}.lime-text.text-darken-4{color:#827717 !important}.lime.accent-1{background-color:#f4ff81 !important}.lime-text.text-accent-1{color:#f4ff81 !important}.lime.accent-2{background-color:#eeff41 !important}.lime-text.text-accent-2{color:#eeff41 !important}.lime.accent-3{background-color:#c6ff00 !important}.lime-text.text-accent-3{color:#c6ff00 !important}.lime.accent-4{background-color:#aeea00 !important}.lime-text.text-accent-4{color:#aeea00 !important}.yellow{background-color:#ffeb3b !important}.yellow-text{color:#ffeb3b !important}.yellow.lighten-5{background-color:#fffde7 !important}.yellow-text.text-lighten-5{color:#fffde7 !important}.yellow.lighten-4{background-color:#fff9c4 !important}.yellow-text.text-lighten-4{color:#fff9c4 !important}.yellow.lighten-3{background-color:#fff59d !important}.yellow-text.text-lighten-3{color:#fff59d !important}.yellow.lighten-2{background-color:#fff176 !important}.yellow-text.text-lighten-2{color:#fff176 !important}.yellow.lighten-1{background-color:#ffee58 !important}.yellow-text.text-lighten-1{color:#ffee58 !important}.yellow.darken-1{background-color:#fdd835 !important}.yellow-text.text-darken-1{color:#fdd835 !important}.yellow.darken-2{background-color:#fbc02d !important}.yellow-text.text-darken-2{color:#fbc02d !important}.yellow.darken-3{background-color:#f9a825 !important}.yellow-text.text-darken-3{color:#f9a825 !important}.yellow.darken-4{background-color:#f57f17 !important}.yellow-text.text-darken-4{color:#f57f17 !important}.yellow.accent-1{background-color:#ffff8d !important}.yellow-text.text-accent-1{color:#ffff8d !important}.yellow.accent-2{background-color:#ff0 !important}.yellow-text.text-accent-2{color:#ff0 !important}.yellow.accent-3{background-color:#ffea00 !important}.yellow-text.text-accent-3{color:#ffea00 !important}.yellow.accent-4{background-color:#ffd600 !important}.yellow-text.text-accent-4{color:#ffd600 !important}.amber{background-color:#ffc107 !important}.amber-text{color:#ffc107 !important}.amber.lighten-5{background-color:#fff8e1 !important}.amber-text.text-lighten-5{color:#fff8e1 !important}.amber.lighten-4{background-color:#ffecb3 !important}.amber-text.text-lighten-4{color:#ffecb3 !important}.amber.lighten-3{background-color:#ffe082 !important}.amber-text.text-lighten-3{color:#ffe082 !important}.amber.lighten-2{background-color:#ffd54f !important}.amber-text.text-lighten-2{color:#ffd54f !important}.amber.lighten-1{background-color:#ffca28 !important}.amber-text.text-lighten-1{color:#ffca28 !important}.amber.darken-1{background-color:#ffb300 !important}.amber-text.text-darken-1{color:#ffb300 !important}.amber.darken-2{background-color:#ffa000 !important}.amber-text.text-darken-2{color:#ffa000 !important}.amber.darken-3{background-color:#ff8f00 !important}.amber-text.text-darken-3{color:#ff8f00 !important}.amber.darken-4{background-color:#ff6f00 !important}.amber-text.text-darken-4{color:#ff6f00 !important}.amber.accent-1{background-color:#ffe57f !important}.amber-text.text-accent-1{color:#ffe57f !important}.amber.accent-2{background-color:#ffd740 !important}.amber-text.text-accent-2{color:#ffd740 !important}.amber.accent-3{background-color:#ffc400 !important}.amber-text.text-accent-3{color:#ffc400 !important}.amber.accent-4{background-color:#ffab00 !important}.amber-text.text-accent-4{color:#ffab00 !important}.orange{background-color:#ff9800 !important}.orange-text{color:#ff9800 !important}.orange.lighten-5{background-color:#fff3e0 !important}.orange-text.text-lighten-5{color:#fff3e0 !important}.orange.lighten-4{background-color:#ffe0b2 !important}.orange-text.text-lighten-4{color:#ffe0b2 !important}.orange.lighten-3{background-color:#ffcc80 !important}.orange-text.text-lighten-3{color:#ffcc80 !important}.orange.lighten-2{background-color:#ffb74d !important}.orange-text.text-lighten-2{color:#ffb74d !important}.orange.lighten-1{background-color:#ffa726 !important}.orange-text.text-lighten-1{color:#ffa726 !important}.orange.darken-1{background-color:#fb8c00 !important}.orange-text.text-darken-1{color:#fb8c00 !important}.orange.darken-2{background-color:#f57c00 !important}.orange-text.text-darken-2{color:#f57c00 !important}.orange.darken-3{background-color:#ef6c00 !important}.orange-text.text-darken-3{color:#ef6c00 !important}.orange.darken-4{background-color:#e65100 !important}.orange-text.text-darken-4{color:#e65100 !important}.orange.accent-1{background-color:#ffd180 !important}.orange-text.text-accent-1{color:#ffd180 !important}.orange.accent-2{background-color:#ffab40 !important}.orange-text.text-accent-2{color:#ffab40 !important}.orange.accent-3{background-color:#ff9100 !important}.orange-text.text-accent-3{color:#ff9100 !important}.orange.accent-4{background-color:#ff6d00 !important}.orange-text.text-accent-4{color:#ff6d00 !important}.deep-orange{background-color:#ff5722 !important}.deep-orange-text{color:#ff5722 !important}.deep-orange.lighten-5{background-color:#fbe9e7 !important}.deep-orange-text.text-lighten-5{color:#fbe9e7 !important}.deep-orange.lighten-4{background-color:#ffccbc !important}.deep-orange-text.text-lighten-4{color:#ffccbc !important}.deep-orange.lighten-3{background-color:#ffab91 !important}.deep-orange-text.text-lighten-3{color:#ffab91 !important}.deep-orange.lighten-2{background-color:#ff8a65 !important}.deep-orange-text.text-lighten-2{color:#ff8a65 !important}.deep-orange.lighten-1{background-color:#ff7043 !important}.deep-orange-text.text-lighten-1{color:#ff7043 !important}.deep-orange.darken-1{background-color:#f4511e !important}.deep-orange-text.text-darken-1{color:#f4511e !important}.deep-orange.darken-2{background-color:#e64a19 !important}.deep-orange-text.text-darken-2{color:#e64a19 !important}.deep-orange.darken-3{background-color:#d84315 !important}.deep-orange-text.text-darken-3{color:#d84315 !important}.deep-orange.darken-4{background-color:#bf360c !important}.deep-orange-text.text-darken-4{color:#bf360c !important}.deep-orange.accent-1{background-color:#ff9e80 !important}.deep-orange-text.text-accent-1{color:#ff9e80 !important}.deep-orange.accent-2{background-color:#ff6e40 !important}.deep-orange-text.text-accent-2{color:#ff6e40 !important}.deep-orange.accent-3{background-color:#ff3d00 !important}.deep-orange-text.text-accent-3{color:#ff3d00 !important}.deep-orange.accent-4{background-color:#dd2c00 !important}.deep-orange-text.text-accent-4{color:#dd2c00 !important}.brown{background-color:#795548 !important}.brown-text{color:#795548 !important}.brown.lighten-5{background-color:#efebe9 !important}.brown-text.text-lighten-5{color:#efebe9 !important}.brown.lighten-4{background-color:#d7ccc8 !important}.brown-text.text-lighten-4{color:#d7ccc8 !important}.brown.lighten-3{background-color:#bcaaa4 !important}.brown-text.text-lighten-3{color:#bcaaa4 !important}.brown.lighten-2{background-color:#a1887f !important}.brown-text.text-lighten-2{color:#a1887f !important}.brown.lighten-1{background-color:#8d6e63 !important}.brown-text.text-lighten-1{color:#8d6e63 !important}.brown.darken-1{background-color:#6d4c41 !important}.brown-text.text-darken-1{color:#6d4c41 !important}.brown.darken-2{background-color:#5d4037 !important}.brown-text.text-darken-2{color:#5d4037 !important}.brown.darken-3{background-color:#4e342e !important}.brown-text.text-darken-3{color:#4e342e !important}.brown.darken-4{background-color:#3e2723 !important}.brown-text.text-darken-4{color:#3e2723 !important}.blue-grey{background-color:#607d8b !important}.blue-grey-text{color:#607d8b !important}.blue-grey.lighten-5{background-color:#eceff1 !important}.blue-grey-text.text-lighten-5{color:#eceff1 !important}.blue-grey.lighten-4{background-color:#cfd8dc !important}.blue-grey-text.text-lighten-4{color:#cfd8dc !important}.blue-grey.lighten-3{background-color:#b0bec5 !important}.blue-grey-text.text-lighten-3{color:#b0bec5 !important}.blue-grey.lighten-2{background-color:#90a4ae !important}.blue-grey-text.text-lighten-2{color:#90a4ae !important}.blue-grey.lighten-1{background-color:#78909c !important}.blue-grey-text.text-lighten-1{color:#78909c !important}.blue-grey.darken-1{background-color:#546e7a !important}.blue-grey-text.text-darken-1{color:#546e7a !important}.blue-grey.darken-2{background-color:#455a64 !important}.blue-grey-text.text-darken-2{color:#455a64 !important}.blue-grey.darken-3{background-color:#37474f !important}.blue-grey-text.text-darken-3{color:#37474f !important}.blue-grey.darken-4{background-color:#263238 !important}.blue-grey-text.text-darken-4{color:#263238 !important}.grey{background-color:#9e9e9e !important}.grey-text{color:#9e9e9e !important}.grey.lighten-5{background-color:#fafafa !important}.grey-text.text-lighten-5{color:#fafafa !important}.grey.lighten-4{background-color:#f5f5f5 !important}.grey-text.text-lighten-4{color:#f5f5f5 !important}.grey.lighten-3{background-color:#eee !important}.grey-text.text-lighten-3{color:#eee !important}.grey.lighten-2{background-color:#e0e0e0 !important}.grey-text.text-lighten-2{color:#e0e0e0 !important}.grey.lighten-1{background-color:#bdbdbd !important}.grey-text.text-lighten-1{color:#bdbdbd !important}.grey.darken-1{background-color:#757575 !important}.grey-text.text-darken-1{color:#757575 !important}.grey.darken-2{background-color:#616161 !important}.grey-text.text-darken-2{color:#616161 !important}.grey.darken-3{background-color:#424242 !important}.grey-text.text-darken-3{color:#424242 !important}.grey.darken-4{background-color:#212121 !important}.grey-text.text-darken-4{color:#212121 !important}.black{background-color:#000 !important}.black-text{color:#000 !important}.white{background-color:#fff !important}.white-text{color:#fff !important}.transparent{background-color:rgba(0,0,0,0) !important}.transparent-text{color:rgba(0,0,0,0) !important}/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:rgba(0,0,0,0);-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;-moz-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,*:before,*:after{-webkit-box-sizing:inherit;box-sizing:inherit}button,input,optgroup,select,textarea{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}ul:not(.browser-default){padding-left:0;list-style-type:none}ul:not(.browser-default)>li{list-style-type:none}a{color:#039be5;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.valign-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.clearfix{clear:both}.z-depth-0{-webkit-box-shadow:none !important;box-shadow:none !important}.z-depth-1,.sidenav,.collapsible,.dropdown-content,.btn-floating,.btn,.btn-small,.btn-large,.toast,.card,.card-panel,nav{-webkit-box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.z-depth-1-half,.btn-floating:focus,.btn-floating:hover,.btn:focus,.btn-small:focus,.btn-large:focus,.btn:hover,.btn-small:hover,.btn-large:hover{-webkit-box-shadow:0 3px 3px 0 rgba(0,0,0,.14),0 1px 7px 0 rgba(0,0,0,.12),0 3px 1px -1px rgba(0,0,0,.2);box-shadow:0 3px 3px 0 rgba(0,0,0,.14),0 1px 7px 0 rgba(0,0,0,.12),0 3px 1px -1px rgba(0,0,0,.2)}.z-depth-2{-webkit-box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.3);box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.3)}.z-depth-3{-webkit-box-shadow:0 8px 17px 2px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2);box-shadow:0 8px 17px 2px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)}.z-depth-4{-webkit-box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -7px rgba(0,0,0,.2);box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -7px rgba(0,0,0,.2)}.z-depth-5,.modal{-webkit-box-shadow:0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12),0 11px 15px -7px rgba(0,0,0,.2);box-shadow:0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12),0 11px 15px -7px rgba(0,0,0,.2)}.hoverable{-webkit-transition:-webkit-box-shadow .25s;transition:-webkit-box-shadow .25s;transition:box-shadow .25s;transition:box-shadow .25s, -webkit-box-shadow .25s}.hoverable:hover{-webkit-box-shadow:0 8px 17px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);box-shadow:0 8px 17px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19)}.divider{height:1px;overflow:hidden;background-color:var(--separator-color)}blockquote{margin:20px 0;padding-left:1.5rem;border-left:5px solid var(--primary-color)}i{line-height:inherit}i.left{float:left;margin-right:15px}i.right{float:right;margin-left:15px}i.tiny{font-size:1rem}i.small{font-size:2rem}i.medium{font-size:4rem}i.large{font-size:6rem}img.responsive-img,video.responsive-video{max-width:100%;height:auto}.pagination li{display:inline-block;border-radius:2px;text-align:center;vertical-align:top;height:30px}.pagination li a{color:var(--font-color-medium);display:inline-block;font-size:1.2rem;padding:0 10px;line-height:30px}.pagination li:hover:not(.disabled){background-color:var(--primary-color-hover-opaque)}.pagination li.active a{color:var(--font-on-primary-color-main)}.pagination li.active,.pagination li.active:hover{background-color:var(--primary-color)}.pagination li.disabled a{cursor:default;color:var(--font-color-disabled)}.pagination li i{font-size:2rem}.pagination li.pages ul li{display:inline-block;float:none}@media only screen and (max-width : 992.99px){.pagination{width:100%}.pagination li.prev,.pagination li.next{width:10%}.pagination li.pages{width:80%;overflow:hidden;white-space:nowrap}}.breadcrumb{display:inline-block;font-size:18px;color:var(--font-on-primary-color-medium)}.breadcrumb i,.breadcrumb [class^=mdi-],.breadcrumb [class*=mdi-],.breadcrumb i.material-icons{display:inline-block;float:left;font-size:24px}.breadcrumb:before{content:"";color:var(--font-on-primary-color-medium);vertical-align:top;display:inline-block;font-family:"Material Icons";font-weight:normal;font-style:normal;font-size:25px;margin:0 10px 0 8px;-webkit-font-smoothing:antialiased;float:left}.breadcrumb:first-child:before{display:none}.breadcrumb:last-child{color:var(--font-on-primary-color-main)}.parallax-container{position:relative;overflow:hidden;height:500px}.parallax-container .parallax{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1}.parallax-container .parallax img{opacity:0;position:absolute;left:50%;bottom:0;min-width:100%;min-height:100%;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pin-top,.pin-bottom{position:relative}.pinned{position:fixed !important}ul.staggered-list li{opacity:0}.fade-in{opacity:0;-webkit-transform-origin:0 50%;transform-origin:0 50%}@media only screen and (max-width : 600.99px){.hide-on-small-only,.tabs-wrapper,.hide-on-small-and-down{display:none !important}}@media only screen and (max-width : 992.99px){.hide-on-med-and-down{display:none !important}}@media only screen and (min-width : 601px){.hide-on-med-and-up{display:none !important}}@media only screen and (min-width: 601px)and (max-width: 992.99px){.hide-on-med-only{display:none !important}}@media only screen and (min-width : 993px){.hide-on-large-only{display:none !important}}@media only screen and (min-width : 1201px){.hide-on-extra-large-only{display:none !important}}@media only screen and (min-width : 1201px){.show-on-extra-large{display:block !important}}@media only screen and (min-width : 993px){.show-on-large{display:block !important}}@media only screen and (min-width: 601px)and (max-width: 992.99px){.show-on-medium{display:block !important}}@media only screen and (max-width : 600.99px){.show-on-small{display:block !important}}@media only screen and (min-width : 601px){.show-on-medium-and-up{display:block !important}}@media only screen and (max-width : 992.99px){.show-on-medium-and-down{display:block !important}}@media only screen and (max-width : 600.99px){.center-on-small-only{text-align:center}}.page-footer{padding-top:20px;color:var(--font-on-primary-color-main);background-color:var(--primary-color)}.page-footer a{color:var(--font-on-primary-color-main)}.page-footer .footer-copyright,.page-footer .footer-copyright a{overflow:hidden;min-height:50px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:10px 0px;color:var(--font-on-primary-color-dark-medium);background-color:var(--primary-color-dark)}table,th,td{border:none}table{width:100%;display:table;border-collapse:collapse;border-spacing:0}table.striped tr{border-bottom:none}table.striped tbody>tr:nth-child(odd){background-color:var(--background-color-slight-emphasis)}table.highlight>tbody>tr{-webkit-transition:background-color .25s ease;transition:background-color .25s ease}table.highlight>tbody>tr:hover{background-color:var(--hover-color)}table thead{color:var(--font-color-medium)}table.centered thead tr th,table.centered tbody tr td{text-align:center}tr{border-bottom:1px solid var(--separator-color)}td,th{padding:15px 5px;display:table-cell;text-align:left;vertical-align:middle;border-radius:0}@media only screen and (max-width : 992.99px){table.responsive-table{width:100%;border-collapse:collapse;border-spacing:0;display:block;position:relative}table.responsive-table td:empty:before{content:" "}table.responsive-table th,table.responsive-table td{margin:0;vertical-align:top}table.responsive-table th{text-align:left}table.responsive-table thead{display:block;float:left}table.responsive-table thead tr{display:block;padding:0 10px 0 0}table.responsive-table thead tr th::before{content:" "}table.responsive-table tbody{display:block;width:auto;position:relative;overflow-x:auto;white-space:nowrap}table.responsive-table tbody tr{display:inline-block;vertical-align:top}table.responsive-table th{display:block;text-align:right}table.responsive-table td{display:block;min-height:1.25em;text-align:left}table.responsive-table tr{border-bottom:none;padding:0 10px}table.responsive-table thead{border:0;border-right:1px solid var(--separator-color)}}.video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden}.video-container iframe,.video-container object,.video-container embed{position:absolute;top:0;left:0;width:100%;height:100%}.progress{position:relative;height:4px;display:block;width:100%;background-color:rgba(var(--primary-color-numeric), 40%);border-radius:2px;margin:.5rem 0 1rem 0;overflow:hidden}.progress .determinate{position:absolute;top:0;left:0;bottom:0;background-color:var(--primary-color);-webkit-transition:width .3s linear;transition:width .3s linear}.progress .indeterminate{background-color:var(--primary-color)}.progress .indeterminate:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite}.progress .indeterminate:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;-webkit-animation-delay:1.15s;animation-delay:1.15s}@-webkit-keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@-webkit-keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}.hide{display:none !important}.left-align{text-align:left}.right-align{text-align:right}.center,.center-align{text-align:center}.left{float:left !important}.right{float:right !important}.no-select,input[type=range],input[type=range]+.thumb{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.circle{border-radius:50%}.center-block{display:block;margin-left:auto;margin-right:auto}.truncate{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.no-padding{padding:0 !important}.collection{margin:.5rem 0 1rem 0;border:1px solid var(--separator-color);border-radius:2px;overflow:hidden;position:relative}.collection .collection-item{background-color:rgba(0,0,0,0);line-height:1.5rem;padding:10px 20px;margin:0;border-bottom:1px solid var(--separator-color)}.collection .collection-item.avatar{min-height:84px;padding-left:72px;position:relative}.collection .collection-item.avatar:not(.circle-clipper)>.circle,.collection .collection-item.avatar :not(.circle-clipper)>.circle{position:absolute;width:42px;height:42px;overflow:hidden;left:15px;display:inline-block;vertical-align:middle}.collection .collection-item.avatar i.circle{font-size:18px;line-height:42px;color:#fff;background-color:var(--slider-track-color);text-align:center}.collection .collection-item.avatar .title{font-size:16px}.collection .collection-item.avatar p{margin:0}.collection .collection-item.avatar .secondary-content{position:absolute;top:16px;right:16px}.collection .collection-item:last-child{border-bottom:none}.collection .collection-item.active{background-color:var(--primary-color);color:var(--font-on-primary-color-main)}.collection .collection-item.active .secondary-content{color:var(--font-on-primary-color-main)}.collection a.collection-item{display:block;-webkit-transition:.25s;transition:.25s;color:var(--primary-color)}.collection a.collection-item:not(.active):hover{background-color:var(--hover-color)}.collection.with-header .collection-header{background-color:rgba(0,0,0,0);border-bottom:1px solid var(--separator-color);padding:10px 20px}.collection.with-header .collection-item{padding-left:30px}.collection.with-header .collection-item.avatar{padding-left:72px}.secondary-content{float:right;color:var(--primary-color)}.collapsible .collection{margin:0;border:none}span.badge{min-width:3rem;padding:0 6px;margin-left:14px;text-align:center;font-size:1rem;line-height:22px;height:22px;color:var(--font-color-medium);float:right;-webkit-box-sizing:border-box;box-sizing:border-box}span.badge.new{font-weight:300;font-size:.8rem;color:var(--font-on-primary-color-main);background-color:var(--primary-color);border-radius:2px}span.badge.new:after{content:" new"}span.badge[data-badge-caption]::after{content:" " attr(data-badge-caption)}.active span.badge{color:var(--font-on-primary-color-main)}nav ul a span.badge{display:inline-block;float:none;margin-left:4px;line-height:22px;height:22px;-webkit-font-smoothing:auto}.collection-item span.badge{margin-top:calc(0.75rem - 11px)}.collapsible span.badge{margin-left:auto}.collapsible .active span.badge:not(.new){color:var(--font-color-medium)}.sidenav span.badge{margin-top:calc(24px - 11px)}table span.badge{display:inline-block;float:none;margin-left:auto}.material-icons{text-rendering:optimizeLegibility;-webkit-font-feature-settings:"liga";-moz-font-feature-settings:"liga";font-feature-settings:"liga"}.container{margin:0 auto;max-width:1280px;width:90%}@media only screen and (min-width : 601px){.container{width:85%}}@media only screen and (min-width : 993px){.container{width:70%}}.col .row{margin-left:-0.75rem;margin-right:-0.75rem}.section{padding-top:1rem;padding-bottom:1rem}.section.no-pad{padding:0}.section.no-pad-bot{padding-bottom:0}.section.no-pad-top{padding-top:0}.row{margin-left:auto;margin-right:auto;margin-bottom:20px}.row:after{content:"";display:table;clear:both}.row .col{float:left;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 .75rem;min-height:1px}.row .col[class*=push-],.row .col[class*=pull-]{position:relative}.row .col.s1{width:8.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.s2{width:16.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.s3{width:25%;margin-left:auto;left:auto;right:auto}.row .col.s4{width:33.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.s5{width:41.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.s6{width:50%;margin-left:auto;left:auto;right:auto}.row .col.s7{width:58.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.s8{width:66.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.s9{width:75%;margin-left:auto;left:auto;right:auto}.row .col.s10{width:83.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.s11{width:91.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.s12{width:100%;margin-left:auto;left:auto;right:auto}.row .col.offset-s1{margin-left:8.3333333333%}.row .col.pull-s1{right:8.3333333333%}.row .col.push-s1{left:8.3333333333%}.row .col.offset-s2{margin-left:16.6666666667%}.row .col.pull-s2{right:16.6666666667%}.row .col.push-s2{left:16.6666666667%}.row .col.offset-s3{margin-left:25%}.row .col.pull-s3{right:25%}.row .col.push-s3{left:25%}.row .col.offset-s4{margin-left:33.3333333333%}.row .col.pull-s4{right:33.3333333333%}.row .col.push-s4{left:33.3333333333%}.row .col.offset-s5{margin-left:41.6666666667%}.row .col.pull-s5{right:41.6666666667%}.row .col.push-s5{left:41.6666666667%}.row .col.offset-s6{margin-left:50%}.row .col.pull-s6{right:50%}.row .col.push-s6{left:50%}.row .col.offset-s7{margin-left:58.3333333333%}.row .col.pull-s7{right:58.3333333333%}.row .col.push-s7{left:58.3333333333%}.row .col.offset-s8{margin-left:66.6666666667%}.row .col.pull-s8{right:66.6666666667%}.row .col.push-s8{left:66.6666666667%}.row .col.offset-s9{margin-left:75%}.row .col.pull-s9{right:75%}.row .col.push-s9{left:75%}.row .col.offset-s10{margin-left:83.3333333333%}.row .col.pull-s10{right:83.3333333333%}.row .col.push-s10{left:83.3333333333%}.row .col.offset-s11{margin-left:91.6666666667%}.row .col.pull-s11{right:91.6666666667%}.row .col.push-s11{left:91.6666666667%}.row .col.offset-s12{margin-left:100%}.row .col.pull-s12{right:100%}.row .col.push-s12{left:100%}@media only screen and (min-width : 601px){.row .col.m1{width:8.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.m2{width:16.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.m3{width:25%;margin-left:auto;left:auto;right:auto}.row .col.m4{width:33.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.m5{width:41.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.m6{width:50%;margin-left:auto;left:auto;right:auto}.row .col.m7{width:58.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.m8{width:66.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.m9{width:75%;margin-left:auto;left:auto;right:auto}.row .col.m10{width:83.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.m11{width:91.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.m12{width:100%;margin-left:auto;left:auto;right:auto}.row .col.offset-m1{margin-left:8.3333333333%}.row .col.pull-m1{right:8.3333333333%}.row .col.push-m1{left:8.3333333333%}.row .col.offset-m2{margin-left:16.6666666667%}.row .col.pull-m2{right:16.6666666667%}.row .col.push-m2{left:16.6666666667%}.row .col.offset-m3{margin-left:25%}.row .col.pull-m3{right:25%}.row .col.push-m3{left:25%}.row .col.offset-m4{margin-left:33.3333333333%}.row .col.pull-m4{right:33.3333333333%}.row .col.push-m4{left:33.3333333333%}.row .col.offset-m5{margin-left:41.6666666667%}.row .col.pull-m5{right:41.6666666667%}.row .col.push-m5{left:41.6666666667%}.row .col.offset-m6{margin-left:50%}.row .col.pull-m6{right:50%}.row .col.push-m6{left:50%}.row .col.offset-m7{margin-left:58.3333333333%}.row .col.pull-m7{right:58.3333333333%}.row .col.push-m7{left:58.3333333333%}.row .col.offset-m8{margin-left:66.6666666667%}.row .col.pull-m8{right:66.6666666667%}.row .col.push-m8{left:66.6666666667%}.row .col.offset-m9{margin-left:75%}.row .col.pull-m9{right:75%}.row .col.push-m9{left:75%}.row .col.offset-m10{margin-left:83.3333333333%}.row .col.pull-m10{right:83.3333333333%}.row .col.push-m10{left:83.3333333333%}.row .col.offset-m11{margin-left:91.6666666667%}.row .col.pull-m11{right:91.6666666667%}.row .col.push-m11{left:91.6666666667%}.row .col.offset-m12{margin-left:100%}.row .col.pull-m12{right:100%}.row .col.push-m12{left:100%}}@media only screen and (min-width : 993px){.row .col.l1{width:8.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.l2{width:16.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.l3{width:25%;margin-left:auto;left:auto;right:auto}.row .col.l4{width:33.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.l5{width:41.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.l6{width:50%;margin-left:auto;left:auto;right:auto}.row .col.l7{width:58.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.l8{width:66.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.l9{width:75%;margin-left:auto;left:auto;right:auto}.row .col.l10{width:83.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.l11{width:91.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.l12{width:100%;margin-left:auto;left:auto;right:auto}.row .col.offset-l1{margin-left:8.3333333333%}.row .col.pull-l1{right:8.3333333333%}.row .col.push-l1{left:8.3333333333%}.row .col.offset-l2{margin-left:16.6666666667%}.row .col.pull-l2{right:16.6666666667%}.row .col.push-l2{left:16.6666666667%}.row .col.offset-l3{margin-left:25%}.row .col.pull-l3{right:25%}.row .col.push-l3{left:25%}.row .col.offset-l4{margin-left:33.3333333333%}.row .col.pull-l4{right:33.3333333333%}.row .col.push-l4{left:33.3333333333%}.row .col.offset-l5{margin-left:41.6666666667%}.row .col.pull-l5{right:41.6666666667%}.row .col.push-l5{left:41.6666666667%}.row .col.offset-l6{margin-left:50%}.row .col.pull-l6{right:50%}.row .col.push-l6{left:50%}.row .col.offset-l7{margin-left:58.3333333333%}.row .col.pull-l7{right:58.3333333333%}.row .col.push-l7{left:58.3333333333%}.row .col.offset-l8{margin-left:66.6666666667%}.row .col.pull-l8{right:66.6666666667%}.row .col.push-l8{left:66.6666666667%}.row .col.offset-l9{margin-left:75%}.row .col.pull-l9{right:75%}.row .col.push-l9{left:75%}.row .col.offset-l10{margin-left:83.3333333333%}.row .col.pull-l10{right:83.3333333333%}.row .col.push-l10{left:83.3333333333%}.row .col.offset-l11{margin-left:91.6666666667%}.row .col.pull-l11{right:91.6666666667%}.row .col.push-l11{left:91.6666666667%}.row .col.offset-l12{margin-left:100%}.row .col.pull-l12{right:100%}.row .col.push-l12{left:100%}}@media only screen and (min-width : 1201px){.row .col.xl1{width:8.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.xl2{width:16.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.xl3{width:25%;margin-left:auto;left:auto;right:auto}.row .col.xl4{width:33.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.xl5{width:41.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.xl6{width:50%;margin-left:auto;left:auto;right:auto}.row .col.xl7{width:58.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.xl8{width:66.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.xl9{width:75%;margin-left:auto;left:auto;right:auto}.row .col.xl10{width:83.3333333333%;margin-left:auto;left:auto;right:auto}.row .col.xl11{width:91.6666666667%;margin-left:auto;left:auto;right:auto}.row .col.xl12{width:100%;margin-left:auto;left:auto;right:auto}.row .col.offset-xl1{margin-left:8.3333333333%}.row .col.pull-xl1{right:8.3333333333%}.row .col.push-xl1{left:8.3333333333%}.row .col.offset-xl2{margin-left:16.6666666667%}.row .col.pull-xl2{right:16.6666666667%}.row .col.push-xl2{left:16.6666666667%}.row .col.offset-xl3{margin-left:25%}.row .col.pull-xl3{right:25%}.row .col.push-xl3{left:25%}.row .col.offset-xl4{margin-left:33.3333333333%}.row .col.pull-xl4{right:33.3333333333%}.row .col.push-xl4{left:33.3333333333%}.row .col.offset-xl5{margin-left:41.6666666667%}.row .col.pull-xl5{right:41.6666666667%}.row .col.push-xl5{left:41.6666666667%}.row .col.offset-xl6{margin-left:50%}.row .col.pull-xl6{right:50%}.row .col.push-xl6{left:50%}.row .col.offset-xl7{margin-left:58.3333333333%}.row .col.pull-xl7{right:58.3333333333%}.row .col.push-xl7{left:58.3333333333%}.row .col.offset-xl8{margin-left:66.6666666667%}.row .col.pull-xl8{right:66.6666666667%}.row .col.push-xl8{left:66.6666666667%}.row .col.offset-xl9{margin-left:75%}.row .col.pull-xl9{right:75%}.row .col.push-xl9{left:75%}.row .col.offset-xl10{margin-left:83.3333333333%}.row .col.pull-xl10{right:83.3333333333%}.row .col.push-xl10{left:83.3333333333%}.row .col.offset-xl11{margin-left:91.6666666667%}.row .col.pull-xl11{right:91.6666666667%}.row .col.push-xl11{left:91.6666666667%}.row .col.offset-xl12{margin-left:100%}.row .col.pull-xl12{right:100%}.row .col.push-xl12{left:100%}}nav{color:var(--font-on-primary-color-main);background-color:var(--primary-color);width:100%;height:56px;line-height:56px}nav.nav-extended{height:auto}nav.nav-extended .nav-wrapper{min-height:56px;height:auto}nav.nav-extended .nav-content{position:relative;line-height:normal}nav a{color:var(--font-on-primary-color-main)}nav i,nav [class^=mdi-],nav [class*=mdi-],nav i.material-icons{display:block;font-size:24px;height:56px;line-height:56px}nav .nav-wrapper{position:relative;height:100%}@media only screen and (min-width : 993px){nav a.sidenav-trigger{display:none}}nav .sidenav-trigger{float:left;position:relative;z-index:1;height:56px;margin:0 18px}nav .sidenav-trigger i{height:56px;line-height:56px}nav .brand-logo{position:absolute;color:var(--font-on-primary-color-main);display:inline-block;font-size:2.1rem;padding:0}nav .brand-logo.center{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media only screen and (max-width : 992.99px){nav .brand-logo{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}nav .brand-logo.left,nav .brand-logo.right{padding:0;-webkit-transform:none;transform:none}nav .brand-logo.left{left:.5rem}nav .brand-logo.right{right:.5rem;left:auto}}nav .brand-logo.right{right:.5rem;padding:0}nav .brand-logo i,nav .brand-logo [class^=mdi-],nav .brand-logo [class*=mdi-],nav .brand-logo i.material-icons{float:left;margin-right:15px}nav .nav-title{display:inline-block;font-size:32px;padding:28px 0}nav ul:not(.dropdown-content){margin:0}nav ul:not(.dropdown-content) li{-webkit-transition:background-color .3s;transition:background-color .3s;float:left;padding:0}nav ul:not(.dropdown-content) a{-webkit-transition:background-color .3s;transition:background-color .3s;font-size:1rem;color:var(--font-on-primary-color-main);display:block;padding:0 15px;cursor:pointer}nav ul:not(.dropdown-content) a.active{background-color:var(--primary-color-raised-focus-solid)}nav ul:not(.dropdown-content) a:hover:not(.active){background-color:var(--primary-color-raised-hover-solid)}nav ul:not(.dropdown-content) a.btn,nav ul:not(.dropdown-content) a.btn-small,nav ul:not(.dropdown-content) a.btn-large,nav ul:not(.dropdown-content) a.btn-flat,nav ul:not(.dropdown-content) a.btn-floating{margin-top:-2px;margin-left:15px;margin-right:15px;display:inline-block}nav ul:not(.dropdown-content) a.btn>.material-icons,nav ul:not(.dropdown-content) a.btn-small>.material-icons,nav ul:not(.dropdown-content) a.btn-large>.material-icons,nav ul:not(.dropdown-content) a.btn-flat>.material-icons,nav ul:not(.dropdown-content) a.btn-floating>.material-icons{height:inherit;line-height:inherit}nav ul:not(.dropdown-content).left{float:left}nav form{height:100%}nav .input-field{margin:0;height:100%}nav .input-field input[type=search]{height:100%;font-size:1.2rem;border:none;padding-left:2rem;color:#888}nav .input-field input[type=search]:focus,nav .input-field input[type=search][type=text]:valid,nav .input-field input[type=search][type=password]:valid,nav .input-field input[type=search][type=email]:valid,nav .input-field input[type=search][type=url]:valid,nav .input-field input[type=search][type=date]:valid{border:none;-webkit-box-shadow:none;box-shadow:none}nav .input-field label{top:0;left:0}nav .input-field label i{color:var(--font-on-primary-color-medium);-webkit-transition:color .3s;transition:color .3s}nav .input-field label.active i{color:var(--font-on-primary-color-main)}.navbar-fixed{position:relative;height:56px;z-index:997}.navbar-fixed nav{position:fixed;right:0}@media only screen and (min-width : 601px){nav.nav-extended .nav-wrapper{min-height:64px}nav,nav .nav-wrapper i,nav a.sidenav-trigger,nav a.sidenav-trigger i{height:64px;line-height:64px}.navbar-fixed{height:64px}}a{text-decoration:none}html{line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:normal;color:var(--font-color-main)}@media only screen and (min-width: 0){html{font-size:14px}}@media only screen and (min-width: 993px){html{font-size:14.5px}}@media only screen and (min-width: 1201px){html{font-size:15px}}h1,h2,h3,h4,h5,h6{font-weight:400;line-height:1.3}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{font-weight:inherit}h1{font-size:4.2rem;line-height:110%;margin:2.8rem 0 1.68rem 0}h2{font-size:3.56rem;line-height:110%;margin:2.3733333333rem 0 1.424rem 0}h3{font-size:2.92rem;line-height:110%;margin:1.9466666667rem 0 1.168rem 0}h4{font-size:2.28rem;line-height:110%;margin:1.52rem 0 .912rem 0}h5{font-size:1.64rem;line-height:110%;margin:1.0933333333rem 0 .656rem 0}h6{font-size:1.15rem;line-height:110%;margin:.7666666667rem 0 .46rem 0}em{font-style:italic}strong{font-weight:500}small{font-size:75%}.light{font-weight:300}.thin{font-weight:200}@media only screen and (min-width: 360px){.flow-text{font-size:1.2rem}}@media only screen and (min-width: 390px){.flow-text{font-size:1.224rem}}@media only screen and (min-width: 420px){.flow-text{font-size:1.248rem}}@media only screen and (min-width: 450px){.flow-text{font-size:1.272rem}}@media only screen and (min-width: 480px){.flow-text{font-size:1.296rem}}@media only screen and (min-width: 510px){.flow-text{font-size:1.32rem}}@media only screen and (min-width: 540px){.flow-text{font-size:1.344rem}}@media only screen and (min-width: 570px){.flow-text{font-size:1.368rem}}@media only screen and (min-width: 600px){.flow-text{font-size:1.392rem}}@media only screen and (min-width: 630px){.flow-text{font-size:1.416rem}}@media only screen and (min-width: 660px){.flow-text{font-size:1.44rem}}@media only screen and (min-width: 690px){.flow-text{font-size:1.464rem}}@media only screen and (min-width: 720px){.flow-text{font-size:1.488rem}}@media only screen and (min-width: 750px){.flow-text{font-size:1.512rem}}@media only screen and (min-width: 780px){.flow-text{font-size:1.536rem}}@media only screen and (min-width: 810px){.flow-text{font-size:1.56rem}}@media only screen and (min-width: 840px){.flow-text{font-size:1.584rem}}@media only screen and (min-width: 870px){.flow-text{font-size:1.608rem}}@media only screen and (min-width: 900px){.flow-text{font-size:1.632rem}}@media only screen and (min-width: 930px){.flow-text{font-size:1.656rem}}@media only screen and (min-width: 960px){.flow-text{font-size:1.68rem}}@media only screen and (max-width: 360px){.flow-text{font-size:1.2rem}}.scale-transition{-webkit-transition:-webkit-transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important;transition:-webkit-transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important;transition:transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important;transition:transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63), -webkit-transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important}.scale-transition.scale-out{-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform .2s !important;transition:-webkit-transform .2s !important;transition:transform .2s !important;transition:transform .2s, -webkit-transform .2s !important}.scale-transition.scale-in{-webkit-transform:scale(1);transform:scale(1)}.card-panel{-webkit-transition:-webkit-box-shadow .25s;transition:-webkit-box-shadow .25s;transition:box-shadow .25s;transition:box-shadow .25s, -webkit-box-shadow .25s;padding:24px;margin:.5rem 0 1rem 0;border-radius:2px;background-color:var(--background-color-card)}.card{position:relative;margin:.5rem 0 1rem 0;background-color:var(--background-color-card);-webkit-transition:-webkit-box-shadow .25s;transition:-webkit-box-shadow .25s;transition:box-shadow .25s;transition:box-shadow .25s, -webkit-box-shadow .25s;border-radius:2px}.card .card-title{font-size:24px;font-weight:300}.card .card-title.activator{cursor:pointer}.card.small,.card.medium,.card.large{position:relative}.card.small .card-image,.card.medium .card-image,.card.large .card-image{max-height:60%;overflow:hidden}.card.small .card-image+.card-content,.card.medium .card-image+.card-content,.card.large .card-image+.card-content{max-height:40%}.card.small .card-content,.card.medium .card-content,.card.large .card-content{max-height:100%;overflow:hidden}.card.small .card-action,.card.medium .card-action,.card.large .card-action{position:absolute;bottom:0;left:0;right:0}.card.small{height:300px}.card.medium{height:400px}.card.large{height:500px}.card.horizontal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.card.horizontal.small .card-image,.card.horizontal.medium .card-image,.card.horizontal.large .card-image{height:100%;max-height:none;overflow:visible}.card.horizontal.small .card-image img,.card.horizontal.medium .card-image img,.card.horizontal.large .card-image img{height:100%}.card.horizontal .card-image{max-width:50%}.card.horizontal .card-image img{border-radius:2px 0 0 2px;max-width:100%;width:auto}.card.horizontal .card-stacked{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;position:relative}.card.horizontal .card-stacked .card-content{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.card.sticky-action .card-action{z-index:2}.card.sticky-action .card-reveal{z-index:1;padding-bottom:64px}.card .card-image{position:relative}.card .card-image img{display:block;border-radius:2px 2px 0 0;position:relative;left:0;right:0;top:0;bottom:0;width:100%}.card .card-image .card-title{color:var(--background-color-card);position:absolute;bottom:0;left:0;max-width:100%;padding:24px}.card .card-content{padding:24px;border-radius:0 0 2px 2px}.card .card-content p{margin:0}.card .card-content .card-title{display:block;line-height:32px;margin-bottom:8px}.card .card-content .card-title i{line-height:32px}.card .card-action{border-top:1px solid var(--separator-color);position:relative;background-color:inherit}.card .card-action:last-child{border-radius:0 0 2px 2px}.card .card-action a{padding:16px 24px;display:inline-block}.card .card-action a:not(.btn):not(.btn-small):not(.btn-large):not(.btn-large):not(.btn-floating){color:var(--primary-color);-webkit-transition:color .3s ease;transition:color .3s ease;text-transform:uppercase}.card .card-action a:not(.btn):not(.btn-small):not(.btn-large):not(.btn-large):not(.btn-floating):hover{background-color:var(--primary-color-hover-opaque)}.card .card-reveal{padding:24px;position:absolute;background-color:var(--background-color-card);width:100%;overflow-y:auto;left:0;top:100%;height:100%;z-index:3;display:none}.card .card-reveal .card-title{cursor:pointer;display:block}#toast-container{display:block;position:fixed;z-index:10000}@media only screen and (max-width : 600.99px){#toast-container{min-width:100%;bottom:0%}}@media only screen and (min-width : 601px)and (max-width : 992.99px){#toast-container{left:5%;bottom:7%;max-width:90%}}@media only screen and (min-width : 993px){#toast-container{top:10%;right:7%;max-width:86%}}.toast{border-radius:2px;top:35px;width:auto;margin-top:10px;position:relative;max-width:100%;height:auto;min-height:48px;line-height:1.5em;background-color:var(--tooltip-background-color);padding:10px 25px;font-size:1rem;font-weight:400;color:var(--tooltip-font-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;cursor:default}.toast .toast-action{color:#eeff41;font-weight:500;margin-right:-25px;margin-left:3rem}.toast.rounded{border-radius:24px}@media only screen and (max-width : 600.99px){.toast{width:100%;border-radius:0}}.tabs{position:relative;overflow-x:auto;overflow-y:hidden;height:48px;width:100%;background-color:var(--surface-color);margin:0 auto;white-space:nowrap}.tabs.tabs-transparent{background-color:rgba(0,0,0,0)}.tabs.tabs-transparent .tab a{color:var(--font-on-primary-color-medium)}.tabs.tabs-transparent .tab.disabled a,.tabs.tabs-transparent .tab.disabled a:hover,.tabs.tabs-transparent .tab.disabled a:focus{color:var(--font-on-primary-color-disabled)}.tabs.tabs-transparent .tab a:hover{background-color:var(--hover-color)}.tabs.tabs-transparent .tab a.active,.tabs.tabs-transparent .tab a:focus{background-color:rgba(0,0,0,0)}.tabs.tabs-transparent .tab a:hover,.tabs.tabs-transparent .tab a.active,.tabs.tabs-transparent .tab a:focus{color:var(--font-on-primary-color-main)}.tabs.tabs-transparent .indicator{background-color:var(--font-on-primary-color-main)}.tabs.tabs-fixed-width{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tabs.tabs-fixed-width .tab{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.tabs .tab{display:inline-block;text-align:center;line-height:48px;height:48px;padding:0;margin:0;text-transform:uppercase}.tabs .tab a{color:var(--font-color-medium);display:block;width:100%;height:100%;padding:0 24px;font-size:14px;text-overflow:ellipsis;overflow:hidden;-webkit-transition:color .28s ease,background-color .28s ease;transition:color .28s ease,background-color .28s ease}.tabs .tab a.active{background-color:rgba(0,0,0,0)}.tabs .tab a.active,.tabs .tab a:focus,.tabs .tab a:hover{color:var(--primary-color)}.tabs .tab a:hover{background-color:var(--primary-color-hover-opaque)}.tabs .tab a:focus,.tabs .tab a.active{background-color:var(--primary-color-focus-opaque);outline:none}.tabs .tab.disabled a,.tabs .tab.disabled a:hover{color:var(--font-color-disabled);cursor:default;background-color:rgba(0,0,0,0)}.tabs .tab.disabled a:not(:focus),.tabs .tab.disabled a:hover:not(:focus){background-color:rgba(0,0,0,0)}.tabs .indicator{position:absolute;bottom:0;height:2px;background-color:var(--primary-color);will-change:left,right}@media only screen and (max-width : 992.99px){.tabs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tabs .tab{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.tabs .tab a{padding:0 12px}}.material-tooltip{padding:10px 8px;font-size:1rem;z-index:2000;border-radius:2px;color:var(--tooltip-font-color);min-height:36px;line-height:120%;opacity:0;position:absolute;text-align:center;max-width:calc(100% - 4px);overflow:hidden;left:0;top:0;pointer-events:none;visibility:hidden;background-color:var(--tooltip-background-color)}.backdrop{position:absolute;opacity:0;height:7px;width:14px;border-radius:0 0 50% 50%;background-color:var(--tooltip-background-color);z-index:-1;-webkit-transform-origin:50% 0;transform-origin:50% 0;visibility:hidden}.btn,.btn-small,.btn-large,.btn-flat{border:none;border-radius:2px;display:inline-block;height:36px;line-height:36px;padding:0 16px;text-transform:uppercase;vertical-align:middle;-webkit-tap-highlight-color:rgba(0,0,0,0)}.btn.disabled,.btn-floating.disabled,.btn-large.disabled,.btn-small.disabled,.btn-flat.disabled,.btn:disabled,.btn-floating:disabled,.btn-large:disabled,.btn-small:disabled,.btn-flat:disabled,.btn[disabled],.btn-floating[disabled],.btn-large[disabled],.btn-small[disabled],.btn-flat[disabled]{pointer-events:none;background-color:var(--background-color-disabled) !important;-webkit-box-shadow:none;box-shadow:none;color:var(--font-color-disabled) !important;cursor:default}.btn.disabled:hover,.btn-floating.disabled:hover,.btn-large.disabled:hover,.btn-small.disabled:hover,.btn-flat.disabled:hover,.btn:disabled:hover,.btn-floating:disabled:hover,.btn-large:disabled:hover,.btn-small:disabled:hover,.btn-flat:disabled:hover,.btn[disabled]:hover,.btn-floating[disabled]:hover,.btn-large[disabled]:hover,.btn-small[disabled]:hover,.btn-flat[disabled]:hover{background-color:var(--background-color-disabled) !important;color:var(--font-color-disabled) !important}.btn,.btn-small,.btn-large,.btn-floating,.btn-flat{font-size:14px;outline:0}.btn i,.btn-floating i,.btn-large i,.btn-small i,.btn-flat i{font-size:1.3rem;line-height:inherit}.btn,.btn-small,.btn-large{text-decoration:none;color:var(--font-on-primary-color-main);background-color:var(--primary-color);text-align:center;letter-spacing:.5px;-webkit-transition:background-color .2s ease-out;transition:background-color .2s ease-out;cursor:pointer}.btn:hover,.btn-small:hover,.btn-large:hover{background-color:var(--primary-color-raised-hover-solid)}.btn:focus,.btn-small:focus,.btn-large:focus{background-color:var(--primary-color-raised-focus-solid)}.btn-floating{display:inline-block;color:var(--font-on-secondary-color-main);position:relative;overflow:hidden;z-index:1;width:40px;height:40px;line-height:40px;padding:0;background-color:var(--secondary-color);border-radius:50%;-webkit-transition:background-color .3s;transition:background-color .3s;cursor:pointer;vertical-align:middle}.btn-floating:hover{background-color:var(--secondary-color-hover-solid)}.btn-floating:focus{background-color:var(--secondary-color-focus-solid)}.btn-floating:before{border-radius:0}.btn-floating.btn-large{width:56px;height:56px;padding:0}.btn-floating.btn-large.halfway-fab{bottom:-28px}.btn-floating.btn-large i{line-height:56px}.btn-floating.btn-small{width:32.4px;height:32.4px}.btn-floating.btn-small.halfway-fab{bottom:-16.2px}.btn-floating.btn-small i{line-height:32.4px}.btn-floating.halfway-fab{position:absolute;right:24px;bottom:-20px}.btn-floating.halfway-fab.left{right:auto;left:24px}.btn-floating i{width:inherit;display:inline-block;text-align:center;color:var(--font-on-secondary-color-main);font-size:1.6rem;line-height:40px}button.btn-floating{border:none}.fixed-action-btn{position:fixed;right:23px;bottom:23px;padding-top:15px;margin-bottom:0;z-index:997}.fixed-action-btn.active ul{visibility:visible}.fixed-action-btn.direction-left,.fixed-action-btn.direction-right{padding:0 0 0 15px}.fixed-action-btn.direction-left ul,.fixed-action-btn.direction-right ul{text-align:right;right:64px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:100%;left:auto;width:500px}.fixed-action-btn.direction-left ul li,.fixed-action-btn.direction-right ul li{display:inline-block;margin:7.5px 15px 0 0}.fixed-action-btn.direction-right{padding:0 15px 0 0}.fixed-action-btn.direction-right ul{text-align:left;direction:rtl;left:64px;right:auto}.fixed-action-btn.direction-right ul li{margin:7.5px 0 0 15px}.fixed-action-btn.direction-bottom{padding:0 0 15px 0}.fixed-action-btn.direction-bottom ul{top:64px;bottom:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.fixed-action-btn.direction-bottom ul li{margin:15px 0 0 0}.fixed-action-btn.toolbar{padding:0;height:56px}.fixed-action-btn.toolbar.active>a i{opacity:0}.fixed-action-btn.toolbar ul{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;top:0;bottom:0;z-index:1}.fixed-action-btn.toolbar ul li{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:inline-block;margin:0;height:100%;-webkit-transition:none;transition:none}.fixed-action-btn.toolbar ul li a{display:block;overflow:hidden;position:relative;width:100%;height:100%;background-color:rgba(0,0,0,0);-webkit-box-shadow:none;box-shadow:none;color:var(--font-on-secondary-color-main);line-height:56px;z-index:1}.fixed-action-btn.toolbar ul li a i{line-height:inherit}.fixed-action-btn ul{left:0;right:0;text-align:center;position:absolute;bottom:64px;margin:0;visibility:hidden}.fixed-action-btn ul li{margin-bottom:15px}.fixed-action-btn ul a.btn-floating{opacity:0}.fixed-action-btn .fab-backdrop{position:absolute;top:0;left:0;z-index:-1;width:40px;height:40px;background-color:var(--secondary-color);border-radius:50%;-webkit-transform:scale(0);transform:scale(0)}.btn-flat{-webkit-box-shadow:none;box-shadow:none;background-color:rgba(0,0,0,0);color:var(--font-color-medium);cursor:pointer;-webkit-transition:background-color .2s;transition:background-color .2s}.btn-flat:focus,.btn-flat:hover{-webkit-box-shadow:none;box-shadow:none;background-color:var(--hover-color)}.btn-flat:focus{background-color:var(--focus-color)}.btn-flat.disabled,.btn-flat.btn-flat[disabled]{background-color:rgba(0,0,0,0) !important;color:var(--font-color-disabled) !important;cursor:default}.btn-large{height:54px;line-height:54px;font-size:15px;padding:0 28px}.btn-large i{font-size:1.6rem}.btn-small{height:32.4px;line-height:32.4px;font-size:13px}.btn-small i{font-size:1.2rem}.btn-block{display:block}.dropdown-content{background-color:var(--surface-color);margin:0;display:none;min-width:100px;overflow-y:auto;opacity:0;position:absolute;left:0;top:0;z-index:9999;-webkit-transform-origin:0 0;transform-origin:0 0}.dropdown-content:focus{outline:0}.dropdown-content li{clear:both;color:var(--font-color-main);cursor:pointer;min-height:50px;line-height:1.5rem;width:100%;text-align:left}.dropdown-content li:hover,.dropdown-content li.active{background-color:var(--hover-color)}.dropdown-content li:focus{outline:none}.dropdown-content li.divider{min-height:0;height:1px}.dropdown-content li>a,.dropdown-content li>span{font-size:16px;color:var(--primary-color);display:block;line-height:22px;padding:14px 16px}.dropdown-content li>span>label{top:1px;left:0;height:18px}.dropdown-content li>a>i{height:inherit;line-height:inherit;float:left;margin:0 24px 0 0;width:24px}body.keyboard-focused .dropdown-content li:focus{background-color:var(--focus-color)}.input-field.col .dropdown-content [type=checkbox]+label{top:1px;left:0;height:18px;-webkit-transform:none;transform:none}.dropdown-trigger{cursor:pointer}/*! - * Waves v0.7.6 - * http://fian.my.id/Waves - * - * Copyright 2014-2018 Alfiana E. Sibuea and other contributors - * Released under the MIT license - * https://github.com/fians/Waves/blob/master/LICENSE */.waves-effect{position:relative;cursor:pointer;display:inline-block;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.waves-effect .waves-ripple{position:absolute;border-radius:50%;width:100px;height:100px;margin-top:-50px;margin-left:-50px;opacity:0;background:rgba(0,0,0,.2);background:radial-gradient(rgba(0, 0, 0, 0.2) 0, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.5) 60%, rgba(255, 255, 255, 0) 70%);-webkit-transition:all .5s ease-out;transition:all .5s ease-out;-webkit-transition-property:-webkit-transform,opacity;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform;-webkit-transform:scale(0) translate(0, 0);transform:scale(0) translate(0, 0);pointer-events:none}.waves-effect.waves-light .waves-ripple{background:rgba(255,255,255,.4);background:radial-gradient(rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0) 70%)}.waves-effect.waves-classic .waves-ripple{background:rgba(0,0,0,.2)}.waves-effect.waves-classic.waves-light .waves-ripple{background:rgba(255,255,255,.4)}.waves-effect.waves-light .waves-ripple{background-color:rgba(255,255,255,.45)}.waves-effect.waves-red .waves-ripple{background-color:rgba(244,67,54,.7)}.waves-effect.waves-yellow .waves-ripple{background-color:rgba(255,235,59,.7)}.waves-effect.waves-orange .waves-ripple{background-color:rgba(255,152,0,.7)}.waves-effect.waves-purple .waves-ripple{background-color:rgba(156,39,176,.7)}.waves-effect.waves-green .waves-ripple{background-color:rgba(76,175,80,.7)}.waves-effect.waves-teal .waves-ripple{background-color:rgba(0,150,136,.7)}.waves-effect.waves-primary .waves-ripple{background-color:rgba(var(--primary-color-numeric), 0.7)}.waves-effect input[type=button],.waves-effect input[type=reset],.waves-effect input[type=submit]{border:0;font-style:normal;font-size:inherit;text-transform:inherit;background:none}.waves-notransition{-webkit-transition:none !important;transition:none !important}.waves-button,.waves-circle{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-mask-image:-webkit-radial-gradient(circle, white 100%, black 100%)}.waves-button,.waves-button:hover,.waves-button:visited,.waves-button-input{white-space:nowrap;vertical-align:middle;cursor:pointer;border:none;outline:none;color:inherit;background-color:rgba(0,0,0,0);font-size:1em;line-height:1em;text-align:center;text-decoration:none;z-index:1}.waves-button{padding:.85em 1.1em;border-radius:.2em}.waves-button-input{margin:0;padding:.85em 1.1em}.waves-input-wrapper{border-radius:.2em;vertical-align:bottom}.waves-input-wrapper.waves-button{padding:0}.waves-input-wrapper .waves-button-input{position:relative;top:0;left:0;z-index:1}.waves-circle{text-align:center;width:2.5em;height:2.5em;line-height:2.5em;border-radius:50%}.waves-float{-webkit-mask-image:none;-webkit-box-shadow:0px 1px 1.5px 1px rgba(0,0,0,.12);box-shadow:0px 1px 1.5px 1px rgba(0,0,0,.12);-webkit-transition:all 300ms;transition:all 300ms}.waves-float:active{-webkit-box-shadow:0px 8px 20px 1px rgba(0,0,0,.3);box-shadow:0px 8px 20px 1px rgba(0,0,0,.3)}.waves-block{display:block}.modal{display:none;position:fixed;left:0;right:0;background-color:var(--background-color-level-16dp-solid);padding:0;max-height:70%;width:55%;margin:auto;overflow-y:auto;border-radius:2px;will-change:top,opacity}.modal:focus{outline:none}@media only screen and (max-width : 992.99px){.modal{width:80%}}.modal h1,.modal h2,.modal h3,.modal h4{margin-top:0}.modal .modal-content{padding:24px;overflow-y:hidden}.modal .modal-close{cursor:pointer}.modal .modal-footer{border-radius:0 0 2px 2px;background-color:var(--background-color-level-16dp-solid);padding:4px 6px;height:56px;width:100%;text-align:right}.modal .modal-footer .btn,.modal .modal-footer .btn-large,.modal .modal-footer .btn-small,.modal .modal-footer .btn-flat{margin:6px 0}.modal-overlay{position:fixed;z-index:999;top:-25%;left:0;bottom:0;right:0;height:125%;width:100%;background:#000;display:none;will-change:opacity}.modal.modal-fixed-footer{padding:0;height:70%}.modal.modal-fixed-footer .modal-content{position:absolute;height:calc(100% - 56px);max-height:100%;width:100%;overflow-y:auto}.modal.modal-fixed-footer .modal-footer{border-top:1px solid var(--separator-color);position:absolute;bottom:0}.modal.bottom-sheet{top:auto;bottom:-100%;margin:0;width:100%;max-height:45%;border-radius:0;will-change:bottom,opacity}.collapsible{border-top:1px solid var(--separator-color);border-right:1px solid var(--separator-color);border-left:1px solid var(--separator-color);margin:.5rem 0 1rem 0}.collapsible-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);line-height:1.5;padding:1rem;border-bottom:1px solid var(--separator-color);background-color:var(--surface-color)}.collapsible-header:focus{outline:0}.collapsible-header i{width:2rem;font-size:1.6rem;display:inline-block;text-align:center;margin-right:1rem}.keyboard-focused .collapsible-header:focus{background-color:var(--focus-color)}.collapsible-body{display:none;border-bottom:1px solid var(--separator-color);-webkit-box-sizing:border-box;box-sizing:border-box;padding:2rem;background-color:var(--surface-color)}.sidenav .collapsible,.sidenav.sidenav-fixed .collapsible{border:none;-webkit-box-shadow:none;box-shadow:none}.sidenav .collapsible li,.sidenav.sidenav-fixed .collapsible li{padding:0}.sidenav>li:hover,.sidenav>li.active,.sidenav.sidenav-fixed>li:hover,.sidenav.sidenav-fixed>li.active{background-color:rgba(0,0,0,0)}.sidenav .collapsible-header,.sidenav.sidenav-fixed .collapsible-header{background-color:rgba(0,0,0,0);border:none;line-height:inherit;height:inherit;padding:0 16px}.sidenav .collapsible-header i,.sidenav.sidenav-fixed .collapsible-header i{line-height:inherit}.sidenav .collapsible-body,.sidenav.sidenav-fixed .collapsible-body{border:0;background-color:var(--surface-color)}.sidenav .collapsible-body li a,.sidenav.sidenav-fixed .collapsible-body li a{padding:0 23.5px 0 31px}.collapsible.popout{border:none;-webkit-box-shadow:none;box-shadow:none}.collapsible.popout>li{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);margin:0 24px;-webkit-transition:margin .35s cubic-bezier(0.25, 0.46, 0.45, 0.94);transition:margin .35s cubic-bezier(0.25, 0.46, 0.45, 0.94)}.collapsible.popout>li.active{-webkit-box-shadow:0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15);box-shadow:0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15);margin:16px 0}.chip{display:inline-block;height:32px;font-size:13px;font-weight:500;color:var(--font-color-medium);line-height:32px;padding:0 12px;border-radius:16px;background-color:var(--background-color-level-4dp);margin-bottom:5px;margin-right:5px}.chip:focus{outline:none;background-color:var(--primary-color);color:var(--font-on-primary-color-main)}.chip>img{float:left;margin:0 8px 0 -12px;height:32px;width:32px;border-radius:50%}.chip .close{cursor:pointer;float:right;font-size:16px;line-height:32px;padding-left:8px}.chips{border:none;border-bottom:1px solid var(--font-color-medium);-webkit-box-shadow:none;box-shadow:none;margin:0 0 8px 0;min-height:45px;outline:none;-webkit-transition:all .3s;transition:all .3s}.chips.focus{border-bottom:1px solid var(--primary-color);-webkit-box-shadow:0 1px 0 0 var(--primary-color);box-shadow:0 1px 0 0 var(--primary-color)}.chips:hover{cursor:text}.chips input:not([type]):not(.browser-default).input{background:none;border:0;color:var(--font-color-main);display:inline-block;font-size:16px;height:3rem;line-height:32px;outline:0;margin:0;padding:0;width:120px}.chips input:not([type]):not(.browser-default).input:focus{border:0;-webkit-box-shadow:none;box-shadow:none}.chips .autocomplete-content{margin-top:0;margin-bottom:0}.prefix~.chips{margin-left:3rem;width:92%;width:calc(100% - 3rem)}.suffix~.chips{margin-right:3rem;width:92%;width:calc(100% - 3rem)}.chips:empty~label{font-size:.8rem;-webkit-transform:translateY(-140%);transform:translateY(-140%)}.materialboxed{display:block;cursor:-webkit-zoom-in;cursor:zoom-in;position:relative;-webkit-transition:opacity .4s;transition:opacity .4s;-webkit-backface-visibility:hidden}.materialboxed:hover:not(.active){opacity:.8}.materialboxed.active{cursor:-webkit-zoom-out;cursor:zoom-out}#materialbox-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#292929;z-index:1000;will-change:opacity}.materialbox-caption{position:fixed;display:none;color:#fff;line-height:50px;bottom:0;left:0;width:100%;text-align:center;padding:0% 15%;height:50px;z-index:1000;-webkit-font-smoothing:antialiased}select:focus{outline:1px solid var(--primary-color-raised-focus-solid)}button:focus{outline:none;background-color:var(--primary-color-raised-focus-solid)}label{font-size:.8rem;color:var(--font-color-medium)}::-webkit-input-placeholder{color:var(--font-color-medium)}::-moz-placeholder{color:var(--font-color-medium)}::-ms-input-placeholder{color:var(--font-color-medium)}::placeholder{color:var(--font-color-medium)}input:not([type]):not(.browser-default),input[type=text]:not(.browser-default),input[type=password]:not(.browser-default),input[type=email]:not(.browser-default),input[type=url]:not(.browser-default),input[type=time]:not(.browser-default),input[type=date]:not(.browser-default),input[type=datetime]:not(.browser-default),input[type=datetime-local]:not(.browser-default),input[type=month]:not(.browser-default),input[type=tel]:not(.browser-default),input[type=number]:not(.browser-default),input[type=search]:not(.browser-default),textarea.materialize-textarea{outline:none;color:var(--font-color-main);width:100%;font-size:16px;height:56px}.input-field{position:relative;clear:both}.input-field input,.input-field textarea{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 16px;padding-top:20px;background-color:var(--surface-color);border:none;border-radius:4px;border-bottom:1px solid var(--font-color-medium);border-bottom-left-radius:0;border-bottom-right-radius:0}.input-field input:focus:not([readonly]),.input-field textarea:focus:not([readonly]){border-bottom:2px solid var(--primary-color);padding-top:21px}.input-field input:disabled,.input-field input[readonly=readonly],.input-field textarea:disabled,.input-field textarea[readonly=readonly]{color:rgba(var(--md_sys_color_on-surface), 0.38);border-color:rgba(var(--md_sys_color_on-surface), 0.12);background-color:rgba(var(--md_sys_color_on-surface), 0.04)}.input-field input:focus:not([readonly])+label,.input-field textarea:focus:not([readonly])+label{color:var(--primary-color)}.input-field input:focus:not([readonly])+label,.input-field input:not(:placeholder-shown)+label,.input-field textarea:focus:not([readonly])+label,.input-field textarea:not(:placeholder-shown)+label{-webkit-transform:scale(0.75);transform:scale(0.75);top:8px}.input-field input:disabled+label,.input-field input[readonly=readonly]+label,.input-field textarea:disabled+label,.input-field textarea[readonly=readonly]+label{color:rgba(var(--md_sys_color_on-surface), 0.38)}.input-field input::-webkit-input-placeholder{-webkit-user-select:none;user-select:none}.input-field input::-moz-placeholder{-moz-user-select:none;user-select:none}.input-field input::-ms-input-placeholder{-ms-user-select:none;user-select:none}.input-field input::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.input-field>label{color:var(--font-color-medium);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:16px;position:absolute;left:16px;top:16px;cursor:text;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transition:left .2s ease-out,top .2s ease-out,-webkit-transform .2s ease-out;transition:left .2s ease-out,top .2s ease-out,-webkit-transform .2s ease-out;transition:left .2s ease-out,top .2s ease-out,transform .2s ease-out;transition:left .2s ease-out,top .2s ease-out,transform .2s ease-out,-webkit-transform .2s ease-out}.input-field .supporting-text{color:var(--font-color-medium);font-size:12px;padding:0 16px;margin-top:4px}.input-field .character-counter{color:var(--font-color-medium);font-size:12px;float:right;padding:0 16px;margin-top:4px}.input-field .prefix{position:absolute;left:12px;top:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.input-field .suffix{position:absolute;right:12px;top:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.input-field .prefix~input,.input-field .prefix~textarea{padding-left:52px}.input-field .suffix~input,.input-field .suffix~textarea{padding-right:52px}.input-field .prefix~label{left:52px}.input-field.outlined input,.input-field.outlined textarea{padding-top:0;background-color:var(--background-color);border:1px solid var(--font-color-medium);border-radius:4px}.input-field.outlined input:focus:not([readonly]),.input-field.outlined textarea:focus:not([readonly]){border:2px solid var(--primary-color);padding-top:0;margin-left:-1px}.input-field.outlined input:focus:not([readonly])+label,.input-field.outlined textarea:focus:not([readonly])+label{color:var(--primary-color)}.input-field.outlined input:focus:not([readonly])+label,.input-field.outlined input:not(:placeholder-shown)+label,.input-field.outlined textarea:focus:not([readonly])+label,.input-field.outlined textarea:not(:placeholder-shown)+label{top:-8px;left:16px;margin-left:-4px;padding:0 4px;background-color:var(--background-color)}.input-field.outlined input:disabled,.input-field.outlined input[readonly=readonly],.input-field.outlined textarea:disabled,.input-field.outlined textarea[readonly=readonly]{color:rgba(var(--md_sys_color_on-surface), 0.38);border-color:rgba(var(--md_sys_color_on-surface), 0.12)}.input-field.error input,.input-field.error textarea{border-color:var(--error-color)}.input-field.error input:focus:not([readonly]),.input-field.error textarea:focus:not([readonly]){border-color:var(--error-color)}.input-field.error input:focus:not([readonly])+label,.input-field.error textarea:focus:not([readonly])+label{color:var(--error-color)}.input-field.error label{color:var(--error-color)}.input-field.error .supporting-text{color:var(--error-color)}.input-field.error .suffix{color:var(--error-color)}.searchbar .prefix{position:absolute;padding-left:1rem;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.searchbar>input{border-width:0;background-color:rgba(0,0,0,0);padding-left:3rem}.searchbar.has-sidebar{margin-left:0}@media only screen and (min-width : 993px){.searchbar.has-sidebar{margin-left:300px}}textarea{width:100%;height:3rem;background-color:rgba(0,0,0,0)}textarea.materialize-textarea{line-height:normal;overflow-y:hidden;padding:.8rem 0 .8rem 0;resize:none;min-height:3rem;-webkit-box-sizing:border-box;box-sizing:border-box}.hiddendiv{visibility:hidden;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;padding-top:1.2rem;position:absolute;top:0;z-index:-1}.autocomplete-content li .highlight{color:var(--font-color-main)}.autocomplete-content li img{height:40px;width:40px;margin:5px 15px}[type=radio]:not(:checked),[type=radio]:checked{position:absolute;opacity:0;pointer-events:none}[type=radio]:not(:checked)+span,[type=radio]:checked+span{position:relative;padding-left:35px;cursor:pointer;display:inline-block;height:25px;line-height:25px;font-size:1rem;-webkit-transition:.28s ease;transition:.28s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[type=radio]+span:before,[type=radio]+span:after{content:"";position:absolute;left:0;top:0;margin:4px;width:16px;height:16px;z-index:0;-webkit-transition:.28s ease;transition:.28s ease}[type=radio]:not(:checked)+span:before,[type=radio]:not(:checked)+span:after,[type=radio]:checked+span:before,[type=radio]:checked+span:after,[type=radio].with-gap:checked+span:before,[type=radio].with-gap:checked+span:after{border-radius:50%}[type=radio]:not(:checked)+span:before,[type=radio]:not(:checked)+span:after{border:2px solid var(--font-color-medium)}[type=radio]:not(:checked)+span:after{-webkit-transform:scale(0);transform:scale(0)}[type=radio]:checked+span:before{border:2px solid rgba(0,0,0,0)}[type=radio]:checked+span:after,[type=radio].with-gap:checked+span:before,[type=radio].with-gap:checked+span:after{border:2px solid var(--primary-color)}[type=radio]:checked+span:after,[type=radio].with-gap:checked+span:after{background-color:var(--primary-color)}[type=radio]:checked+span:after{-webkit-transform:scale(1.02);transform:scale(1.02)}[type=radio].with-gap:checked+span:after{-webkit-transform:scale(0.5);transform:scale(0.5)}[type=radio].tabbed:focus+span:before{-webkit-box-shadow:0 0 0 10px var(--primary-color-focus-opaque);box-shadow:0 0 0 10px var(--primary-color-focus-opaque)}[type=radio].with-gap:disabled:checked+span:before{border:2px solid var(--font-color-disabled)}[type=radio].with-gap:disabled:checked+span:after{border:none;background-color:var(--font-color-disabled)}[type=radio]:disabled:not(:checked)+span:before,[type=radio]:disabled:checked+span:before{background-color:rgba(0,0,0,0);border-color:var(--font-color-disabled)}[type=radio]:disabled+span{color:var(--font-color-disabled)}[type=radio]:disabled:not(:checked)+span:before{border-color:var(--font-color-disabled)}[type=radio]:disabled:checked+span:after{background-color:var(--font-color-disabled);border-color:var(--font-color-disabled)}[type=checkbox]:not(:checked),[type=checkbox]:checked{position:absolute;opacity:0;pointer-events:none}[type=checkbox]+span:not(.lever){position:relative;padding-left:35px;cursor:pointer;display:inline-block;height:25px;line-height:25px;font-size:1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[type=checkbox]+span:not(.lever):before,[type=checkbox]:not(.filled-in)+span:not(.lever):after{content:"";position:absolute;top:0;left:0;width:18px;height:18px;z-index:0;border:2px solid var(--font-color-medium);border-radius:1px;margin-top:3px;-webkit-transition:.2s;transition:.2s}[type=checkbox]:not(.filled-in)+span:not(.lever):after{border:0;-webkit-transform:scale(0);transform:scale(0)}[type=checkbox]:not(:checked):disabled+span:not(.lever):before{border:none;background-color:var(--font-color-disabled)}[type=checkbox].tabbed:focus+span:not(.lever):after{-webkit-transform:scale(1);transform:scale(1);border:0;border-radius:50%;-webkit-box-shadow:0 0 0 10px var(--focus-color);box-shadow:0 0 0 10px var(--focus-color);background-color:var(--focus-color)}[type=checkbox]:checked+span:not(.lever):before{top:-4px;left:-5px;width:12px;height:22px;border-top:2px solid rgba(0,0,0,0);border-left:2px solid rgba(0,0,0,0);border-right:2px solid var(--primary-color);border-bottom:2px solid var(--primary-color);-webkit-transform:rotate(40deg);transform:rotate(40deg);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=checkbox]:checked:disabled+span:before{border-right:2px solid var(--font-color-disabled);border-bottom:2px solid var(--font-color-disabled)}[type=checkbox]:indeterminate+span:not(.lever):before{top:-11px;left:-12px;width:10px;height:22px;border-top:none;border-left:none;border-right:2px solid var(--primary-color);border-bottom:none;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=checkbox]:indeterminate:disabled+span:not(.lever):before{border-right:2px solid var(--font-color-disabled);background-color:rgba(0,0,0,0)}[type=checkbox].filled-in+span:not(.lever):after{border-radius:2px}[type=checkbox].filled-in+span:not(.lever):before,[type=checkbox].filled-in+span:not(.lever):after{content:"";left:0;position:absolute;-webkit-transition:border .25s,background-color .25s,width .2s .1s,height .2s .1s,top .2s .1s,left .2s .1s;transition:border .25s,background-color .25s,width .2s .1s,height .2s .1s,top .2s .1s,left .2s .1s;z-index:1}[type=checkbox].filled-in:not(:checked)+span:not(.lever):before{width:0;height:0;border:3px solid rgba(0,0,0,0);left:6px;top:10px;-webkit-transform:rotateZ(37deg);transform:rotateZ(37deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=checkbox].filled-in:not(:checked)+span:not(.lever):after{height:20px;width:20px;background-color:rgba(0,0,0,0);border:2px solid var(--font-color-medium);top:0px;z-index:0}[type=checkbox].filled-in:checked+span:not(.lever):before{top:0;left:1px;width:8px;height:13px;border-top:2px solid rgba(0,0,0,0);border-left:2px solid rgba(0,0,0,0);border-right:2px solid var(--font-on-primary-color-main);border-bottom:2px solid var(--font-on-primary-color-main);-webkit-transform:rotateZ(37deg);transform:rotateZ(37deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=checkbox].filled-in:checked+span:not(.lever):after{top:0;width:20px;height:20px;border:2px solid var(--primary-color);background-color:var(--primary-color);z-index:0}[type=checkbox].filled-in.tabbed:focus+span:not(.lever):after{border-radius:2px;border-color:var(--font-color-medium);background-color:var(--focus-color)}[type=checkbox].filled-in.tabbed:checked:focus+span:not(.lever):after{border-radius:2px;background-color:var(--primary-color);border-color:var(--primary-color)}[type=checkbox].filled-in:disabled:not(:checked)+span:not(.lever):before{background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}[type=checkbox].filled-in:disabled:not(:checked)+span:not(.lever):after{border-color:rgba(0,0,0,0);background-color:var(--font-color-disabled)}[type=checkbox].filled-in:disabled:checked+span:not(.lever):before{background-color:rgba(0,0,0,0)}[type=checkbox].filled-in:disabled:checked+span:not(.lever):after{background-color:var(--font-color-disabled);border-color:var(--font-color-disabled)}.switch,.switch *{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switch label{cursor:pointer}.switch label input[type=checkbox]{opacity:0;width:0;height:0}.switch label input[type=checkbox]:checked+.lever{background-color:rgba(var(--primary-color-numeric), 0.32)}.switch label input[type=checkbox]:checked+.lever:before,.switch label input[type=checkbox]:checked+.lever:after{left:18px}.switch label input[type=checkbox]:checked+.lever:after{background-color:var(--primary-color)}.switch label .lever{content:"";display:inline-block;position:relative;width:36px;height:14px;background-color:var(--slider-track-color);border-radius:15px;margin-right:10px;-webkit-transition:background .3s ease;transition:background .3s ease;vertical-align:middle;margin:0 16px}.switch label .lever:before,.switch label .lever:after{content:"";position:absolute;display:inline-block;width:20px;height:20px;border-radius:50%;left:0;top:-3px;-webkit-transition:left .3s ease,background .3s ease,-webkit-box-shadow .1s ease,-webkit-transform .1s ease;transition:left .3s ease,background .3s ease,-webkit-box-shadow .1s ease,-webkit-transform .1s ease;transition:left .3s ease,background .3s ease,box-shadow .1s ease,transform .1s ease;transition:left .3s ease,background .3s ease,box-shadow .1s ease,transform .1s ease,-webkit-box-shadow .1s ease,-webkit-transform .1s ease}.switch label .lever:after{background-color:var(--switch-thumb-off-color);-webkit-box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12)}input[type=checkbox]:not(:disabled)~.lever:active:before,input[type=checkbox]:not(:disabled).tabbed:focus~.lever::before,input[type=checkbox]:not(:disabled)~.lever:hover::before{-webkit-transform:scale(2.4);transform:scale(2.4)}input[type=checkbox]:checked:not(:disabled)~.lever:hover::before{background-color:var(--primary-color-hover-opaque)}input[type=checkbox]:checked:not(:disabled)~.lever:active::before,input[type=checkbox]:checked:not(:disabled).tabbed:focus~.lever::before{background-color:var(--primary-color-focus-opaque)}input[type=checkbox]:not(:disabled)~.lever:hover::before{background-color:var(--hover-color)}input[type=checkbox]:not(:disabled)~.lever:active:before,input[type=checkbox]:not(:disabled).tabbed:focus~.lever::before{background-color:var(--focus-color)}.switch input[type=checkbox][disabled]+.lever{cursor:default;opacity:.5}select.browser-default{opacity:1;color:var(--font-color-main)}select{opacity:0;background-color:var(--surface-color);width:100%;padding:5px;border:1px solid var(--separator-color);border-radius:2px;height:3rem}.select-wrapper{position:relative}.select-wrapper .caret{position:absolute;right:0;top:0;bottom:0;margin:auto 0;z-index:0;fill:var(--font-color-main)}.select-wrapper .hide-select{width:0;height:0;overflow:hidden;position:absolute;top:0;z-index:-1}select:disabled{color:var(--font-color-disabled)}.select-wrapper.disabled+label{color:var(--font-color-disabled)}.select-wrapper.disabled .caret{fill:var(--font-color-disabled)}.select-wrapper input.select-dropdown:disabled{color:var(--font-color-disabled);cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select-wrapper i{color:var(--font-color-disabled)}.select-dropdown li.disabled,.select-dropdown li.disabled>span,.select-dropdown li.optgroup{color:var(--font-color-disabled);background-color:rgba(0,0,0,0)}body.keyboard-focused .select-dropdown.dropdown-content li:focus{background-color:var(--focus-color)}.select-dropdown.dropdown-content li:hover:not(.disabled){background-color:var(--hover-color)}.select-dropdown.dropdown-content li.selected:not(.disabled){background-color:var(--focus-color)}.select-dropdown li img{height:40px;width:40px;margin:5px 15px;float:right}.select-dropdown li.optgroup{border-top:1px solid var(--hover-color)}.select-dropdown li.optgroup.selected>span{color:var(--font-color-main)}.select-dropdown li.optgroup>span{color:var(--font-color-medium)}.select-dropdown li.optgroup~li.optgroup-option{padding-left:1rem}.file-field{position:relative}.file-field .file-path-wrapper{overflow:hidden;padding-left:10px}.file-field input.file-path{width:100%}.file-field .btn,.file-field .btn-large,.file-field .btn-small{float:left;height:3rem;line-height:3rem}.file-field span{cursor:pointer}.file-field input[type=file]{position:absolute;top:0;right:0;left:0;bottom:0;width:100%;margin:0;padding:0;font-size:20px;cursor:pointer;opacity:0;filter:alpha(opacity=0)}.file-field input[type=file]::-webkit-file-upload-button{display:none}.range-field{position:relative}input[type=range],input[type=range]+.thumb{cursor:pointer}input[type=range]{position:relative;background-color:rgba(0,0,0,0);border:none;outline:none;width:100%;margin:15px 0;padding:0}input[type=range]:focus{outline:none}input[type=range]+.thumb{position:absolute;top:10px;left:0;border:none;height:0;width:0;border-radius:50%;background-color:var(--primary-color);margin-left:7px;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}input[type=range]+.thumb .value{display:block;width:30px;text-align:center;color:var(--primary-color);font-size:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}input[type=range]+.thumb.active{border-radius:50% 50% 50% 0}input[type=range]+.thumb.active .value{color:var(--font-on-primary-color-main);margin-left:-1px;margin-top:8px;font-size:10px}input[type=range]{-webkit-appearance:none}input[type=range]::-webkit-slider-runnable-track{height:3px;background:var(--slider-track-color);border:none}input[type=range]::-webkit-slider-thumb{border:none;height:14px;width:14px;border-radius:50%;background:var(--primary-color);-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s, -webkit-box-shadow .3s;-webkit-appearance:none;background-color:var(--primary-color);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;margin:-5px 0 0 0}.keyboard-focused input[type=range]:focus:not(.active)::-webkit-slider-thumb{-webkit-box-shadow:0 0 0 10px var(--primary-color-focus-opaque);box-shadow:0 0 0 10px var(--primary-color-focus-opaque)}input[type=range]::-moz-range-track{height:3px;background:var(--slider-track-color);border:none}input[type=range]::-moz-focus-inner{border:0}input[type=range]::-moz-range-thumb{border:none;height:14px;width:14px;border-radius:50%;background:var(--primary-color);-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s, -webkit-box-shadow .3s;margin-top:-5px}input[type=range]:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}.keyboard-focused input[type=range]:focus:not(.active)::-moz-range-thumb{box-shadow:0 0 0 10px var(--primary-color-focus-opaque)}input[type=range]::-ms-track{height:3px;background:rgba(0,0,0,0);border-color:rgba(0,0,0,0);border-width:6px 0;color:rgba(0,0,0,0)}input[type=range]::-ms-fill-lower,input[type=range]::-moz-range-progress{background:var(--primary-color)}input[type=range]::-ms-fill-upper,input[type=range]::-moz-range-track{background:var(--slider-track-color)}input[type=range]::-ms-thumb{border:none;height:14px;width:14px;border-radius:50%;background:var(--primary-color);-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s, -webkit-box-shadow .3s}.keyboard-focused input[type=range]:focus:not(.active)::-ms-thumb{box-shadow:0 0 0 10px var(--primary-color-focus-opaque)}.table-of-contents.fixed{position:fixed}.table-of-contents li{padding:0}.table-of-contents a{display:inline-block;font-weight:400;color:var(--font-color-medium);padding-left:16px;height:2rem;line-height:2rem;border-left:1px solid var(--separator-color)}.table-of-contents a:hover{color:var(--font-color-main);padding-left:15px}.table-of-contents a.active{color:var(--primary-color);font-weight:500;padding-left:14px;border-left:2px solid var(--primary-color)}.sidenav{position:fixed;width:300px;left:0;top:0;margin:0;-webkit-transform:translateX(-100%);transform:translateX(-100%);height:100vh;padding-bottom:60px;background-color:var(--background-color-level-16dp-solid);z-index:999;overflow-y:auto;will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform:translateX(-105%);transform:translateX(-105%)}.sidenav.right-aligned{right:0;-webkit-transform:translateX(105%);transform:translateX(105%);left:auto;-webkit-transform:translateX(100%);transform:translateX(100%)}.sidenav .collapsible{margin:0}.sidenav li{float:none;line-height:48px}.sidenav li:hover{background-color:var(--hover-color)}.sidenav li.active{background-color:var(--focus-color)}.sidenav li>a{display:block;font-size:14px;font-weight:500;height:48px;line-height:48px;padding:0 32px}.sidenav li>a:not(.btn):not(.btn-large):not(.btn-small):not(.btn-flat):not(.btn-large):not(.btn-floating){color:var(--font-color-main)}.sidenav li>a.btn,.sidenav li>a.btn-small,.sidenav li>a.btn-large,.sidenav li>a.btn-flat,.sidenav li>a.btn-floating{margin:10px 15px}.sidenav li>a>i,.sidenav li>a>[class^=mdi-],.sidenav li>a li>a>[class*=mdi-],.sidenav li>a>i.material-icons{float:left;height:48px;line-height:48px;margin:0 32px 0 0;width:24px;color:var(--font-color-medium)}.sidenav .divider{margin:8px 0 0 0}.sidenav .subheader{cursor:initial;pointer-events:none;color:var(--font-color-medium);font-size:14px;font-weight:500;line-height:48px}.sidenav .subheader:hover{background-color:rgba(0,0,0,0)}.sidenav .user-view{position:relative;padding:32px 32px 0;margin-bottom:8px}.sidenav .user-view>a{height:auto;padding:0}.sidenav .user-view>a:hover{background-color:rgba(0,0,0,0)}.sidenav .user-view .background{overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.sidenav .user-view .circle,.sidenav .user-view .name,.sidenav .user-view .email{display:block}.sidenav .user-view .circle{height:64px;width:64px}.sidenav .user-view .name,.sidenav .user-view .email{font-size:14px;line-height:24px}.sidenav .user-view .name{margin-top:16px;font-weight:500}.sidenav .user-view .email{padding-bottom:16px;font-weight:400}.drag-target{height:100%;position:fixed;top:0;left:0;z-index:998}.drag-target.right-aligned{right:0}.sidenav.sidenav-fixed{left:0;-webkit-transform:translateX(0);transform:translateX(0);position:fixed}.sidenav.sidenav-fixed.right-aligned{right:0;left:auto}@media only screen and (max-width : 992.99px){.sidenav.sidenav-fixed{-webkit-transform:translateX(-105%);transform:translateX(-105%)}.sidenav.sidenav-fixed.right-aligned{-webkit-transform:translateX(105%);transform:translateX(105%)}.sidenav>a{padding:0 16px}.sidenav .user-view{padding:16px 16px 0}}.sidenav .collapsible-body>ul:not(.collapsible)>li.active,.sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active{background-color:var(--primary-color)}.sidenav .collapsible-body>ul:not(.collapsible)>li.active a:not(.btn):not(.btn-large):not(.btn-small),.sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active a:not(.btn):not(.btn-large):not(.btn-small){color:var(--font-on-primary-color-main)}.sidenav .collapsible-body{padding:0}.sidenav-overlay{position:fixed;top:0;left:0;right:0;opacity:0;height:120vh;background-color:rgba(0,0,0,.5);z-index:997;display:none}.preloader-wrapper{display:inline-block;position:relative;width:50px;height:50px}.preloader-wrapper.small{width:36px;height:36px}.preloader-wrapper.big{width:64px;height:64px}.preloader-wrapper.active{-webkit-animation:container-rotate 1568ms linear infinite;animation:container-rotate 1568ms linear infinite}@-webkit-keyframes container-rotate{to{-webkit-transform:rotate(360deg)}}@keyframes container-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-layer{position:absolute;width:100%;height:100%;opacity:0;border-color:var(--primary-color)}.spinner-blue,.spinner-blue-only{border-color:#4285f4}.spinner-red,.spinner-red-only{border-color:#db4437}.spinner-yellow,.spinner-yellow-only{border-color:#f4b400}.spinner-green,.spinner-green-only{border-color:#0f9d58}.active .spinner-layer.spinner-blue{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,blue-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,blue-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .spinner-layer.spinner-red{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,red-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,red-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .spinner-layer.spinner-yellow{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,yellow-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,yellow-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .spinner-layer.spinner-green{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,green-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,green-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .spinner-layer,.active .spinner-layer.spinner-blue-only,.active .spinner-layer.spinner-red-only,.active .spinner-layer.spinner-yellow-only,.active .spinner-layer.spinner-green-only{opacity:1;-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@-webkit-keyframes fill-unfill-rotate{12.5%{-webkit-transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg)}to{-webkit-transform:rotate(1080deg)}}@keyframes fill-unfill-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@-webkit-keyframes blue-fade-in-out{from{opacity:1}25%{opacity:1}26%{opacity:0}89%{opacity:0}90%{opacity:1}100%{opacity:1}}@keyframes blue-fade-in-out{from{opacity:1}25%{opacity:1}26%{opacity:0}89%{opacity:0}90%{opacity:1}100%{opacity:1}}@-webkit-keyframes red-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:1}50%{opacity:1}51%{opacity:0}}@keyframes red-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:1}50%{opacity:1}51%{opacity:0}}@-webkit-keyframes yellow-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:1}75%{opacity:1}76%{opacity:0}}@keyframes yellow-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:1}75%{opacity:1}76%{opacity:0}}@-webkit-keyframes green-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:1}90%{opacity:1}100%{opacity:0}}@keyframes green-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:1}90%{opacity:1}100%{opacity:0}}.gap-patch{position:absolute;top:0;left:45%;width:10%;height:100%;overflow:hidden;border-color:inherit}.gap-patch .circle{width:1000%;left:-450%}.circle-clipper{display:inline-block;position:relative;width:50%;height:100%;overflow:hidden;border-color:inherit}.circle-clipper .circle{width:200%;height:100%;border-width:3px;border-style:solid;border-color:inherit;border-bottom-color:rgba(0,0,0,0) !important;border-radius:50%;-webkit-animation:none;animation:none;position:absolute;top:0;right:0;bottom:0}.circle-clipper.left .circle{left:0;border-right-color:rgba(0,0,0,0) !important;-webkit-transform:rotate(129deg);transform:rotate(129deg)}.circle-clipper.right .circle{left:-100%;border-left-color:rgba(0,0,0,0) !important;-webkit-transform:rotate(-129deg);transform:rotate(-129deg)}.active .circle-clipper.left .circle{-webkit-animation:left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .circle-clipper.right .circle{-webkit-animation:right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@-webkit-keyframes left-spin{from{-webkit-transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg)}to{-webkit-transform:rotate(130deg)}}@keyframes left-spin{from{-webkit-transform:rotate(130deg);transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(130deg);transform:rotate(130deg)}}@-webkit-keyframes right-spin{from{-webkit-transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg)}to{-webkit-transform:rotate(-130deg)}}@keyframes right-spin{from{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}to{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}}#spinnerContainer.cooldown{-webkit-animation:container-rotate 1568ms linear infinite,fade-out 400ms cubic-bezier(0.4, 0, 0.2, 1);animation:container-rotate 1568ms linear infinite,fade-out 400ms cubic-bezier(0.4, 0, 0.2, 1)}@-webkit-keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes fade-out{from{opacity:1}to{opacity:0}}.slider{position:relative;height:400px;width:100%}.slider.fullscreen{height:100%;width:100%;position:absolute;top:0;left:0;right:0;bottom:0}.slider.fullscreen ul.slides{height:100%}.slider.fullscreen ul.indicators{z-index:2;bottom:30px}.slider.fullscreen ul.indicators .indicator-item{background-color:var(--carousel-indicator-color)}.slider.fullscreen ul.indicators .indicator-item.active{background-color:var(--carousel-indicator-active-color)}.slider .slides{background-color:var(--surface-color);margin:0;height:400px}.slider .slides li{opacity:0;position:absolute;top:0;left:0;z-index:1;width:100%;height:inherit;overflow:hidden}.slider .slides li img{height:100%;width:100%;background-size:cover;background-position:center}.slider .slides li .caption{color:#fff;position:absolute;top:15%;left:15%;width:70%;opacity:0}.slider .slides li .caption p{color:rgba(255,255,255,.75)}.slider .slides li.active{z-index:2}.slider .indicators{position:absolute;text-align:center;left:0;right:0;bottom:0;margin:0}.slider .indicators .indicator-item{display:inline-block;position:relative;height:16px;width:16px;margin:0 12px}.slider .indicators .indicator-item-btn{position:absolute;top:0;left:0;cursor:pointer;background-color:var(--slider-track-color);-webkit-transition:background-color .3s;transition:background-color .3s;border-radius:50%;border-width:0;width:100%;height:100%}.slider .indicators .indicator-item-btn.active{background-color:var(--primary-color)}.carousel{overflow:hidden;position:relative;width:100%;height:400px;-webkit-perspective:500px;perspective:500px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transform-origin:0% 50%;transform-origin:0% 50%}.carousel.carousel-slider{top:0;left:0}.carousel.carousel-slider .carousel-fixed-item{position:absolute;left:0;right:0;bottom:20px;z-index:1}.carousel.carousel-slider .carousel-fixed-item.with-indicators{bottom:68px}.carousel.carousel-slider .carousel-item{width:100%;height:100%;min-height:400px;position:absolute;top:0;left:0}.carousel.carousel-slider .carousel-item h2{font-size:24px;font-weight:500;line-height:32px}.carousel.carousel-slider .carousel-item p{font-size:15px}.carousel .carousel-item{visibility:hidden;width:200px;height:200px;position:absolute;top:0;left:0}.carousel .carousel-item>img{width:100%}.carousel .indicators{position:absolute;text-align:center;left:0;right:0;bottom:0;margin:0}.carousel .indicators .indicator-item{display:inline-block;position:relative;cursor:pointer;height:8px;width:8px;margin:24px 4px;background-color:var(--carousel-indicator-color);-webkit-transition:background-color .3s;transition:background-color .3s;border-radius:50%}.carousel .indicators .indicator-item.active{background-color:var(--carousel-indicator-active-color)}.carousel.scrolling .carousel-item .materialboxed,.carousel .carousel-item:not(.active) .materialboxed{pointer-events:none}.tap-target-wrapper{width:800px;height:800px;position:fixed;z-index:1000;visibility:hidden;-webkit-transition:visibility 0s .3s;transition:visibility 0s .3s}.tap-target-wrapper.open{visibility:visible;-webkit-transition:visibility 0s;transition:visibility 0s}.tap-target-wrapper.open .tap-target{-webkit-transform:scale(1);transform:scale(1);opacity:.95;-webkit-transition:opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1);transition:opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1);transition:transform .3s cubic-bezier(0.42, 0, 0.58, 1),opacity .3s cubic-bezier(0.42, 0, 0.58, 1);transition:transform .3s cubic-bezier(0.42, 0, 0.58, 1),opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1)}.tap-target-wrapper.open .tap-target-wave::before{-webkit-transform:scale(1);transform:scale(1)}.tap-target-wrapper.open .tap-target-wave::after{visibility:visible;-webkit-animation:pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;animation:pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;-webkit-transition:opacity .3s,visibility 0s 1s,-webkit-transform .3s;transition:opacity .3s,visibility 0s 1s,-webkit-transform .3s;transition:opacity .3s,transform .3s,visibility 0s 1s;transition:opacity .3s,transform .3s,visibility 0s 1s,-webkit-transform .3s}.tap-target{position:absolute;font-size:1rem;border-radius:50%;background-color:var(--secondary-color);color:var(--font-on-secondary-color-main);-webkit-box-shadow:0 20px 20px 0 rgba(0,0,0,.14),0 10px 50px 0 rgba(0,0,0,.12),0 30px 10px -20px rgba(0,0,0,.2);box-shadow:0 20px 20px 0 rgba(0,0,0,.14),0 10px 50px 0 rgba(0,0,0,.12),0 30px 10px -20px rgba(0,0,0,.2);width:100%;height:100%;opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1);transition:opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1);transition:transform .3s cubic-bezier(0.42, 0, 0.58, 1),opacity .3s cubic-bezier(0.42, 0, 0.58, 1);transition:transform .3s cubic-bezier(0.42, 0, 0.58, 1),opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1)}.tap-target-content{position:relative;display:table-cell}.tap-target-wave{position:absolute;border-radius:50%;z-index:10001}.tap-target-wave::before,.tap-target-wave::after{content:"";display:block;position:absolute;width:100%;height:100%;border-radius:50%;background-color:var(--surface-color)}.tap-target-wave::before{-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s, -webkit-transform .3s}.tap-target-wave::after{visibility:hidden;-webkit-transition:opacity .3s,visibility 0s,-webkit-transform .3s;transition:opacity .3s,visibility 0s,-webkit-transform .3s;transition:opacity .3s,transform .3s,visibility 0s;transition:opacity .3s,transform .3s,visibility 0s,-webkit-transform .3s;z-index:-1}.tap-target-origin{top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:10002;position:absolute !important}.tap-target-origin:not(.btn):not(.btn-large):not(.btn-small),.tap-target-origin:not(.btn):not(.btn-large):not(.btn-small):hover{background:none}@media only screen and (max-width: 600px){.tap-target,.tap-target-wrapper{width:600px;height:600px}}.pulse{overflow:visible;position:relative}.pulse::before{content:"";display:block;position:absolute;width:100%;height:100%;top:0;left:0;background-color:inherit;border-radius:inherit;-webkit-transition:opacity .3s,-webkit-transform .3s;transition:opacity .3s,-webkit-transform .3s;transition:opacity .3s,transform .3s;transition:opacity .3s,transform .3s,-webkit-transform .3s;-webkit-animation:pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;animation:pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;z-index:-1}@-webkit-keyframes pulse-animation{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}}@keyframes pulse-animation{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}}.datepicker-modal{max-width:325px;min-width:300px;max-height:none}.datepicker-container.modal-content{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:0;background-color:var(--surface-color)}.datepicker-controls{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:280px;margin:0 auto}.datepicker-controls .selects-container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.datepicker-controls .select-wrapper input{border-bottom:none;text-align:center;margin:0}.datepicker-controls .select-wrapper input:focus{border-bottom:none}.datepicker-controls .select-wrapper .caret{display:none}.datepicker-controls .select-year input{width:50px}.datepicker-controls .select-month input{width:80px}.datepicker-controls .month-prev,.datepicker-controls .month-next{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.datepicker-controls .month-prev>svg,.datepicker-controls .month-next>svg{fill:var(--font-color-medium)}.month-prev,.month-next{margin-top:4px;cursor:pointer;background-color:rgba(0,0,0,0);border:none}.datepicker-date-display{-webkit-box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto;background-color:var(--primary-color);color:var(--font-on-primary-color-main);padding:20px 22px;font-weight:500}.datepicker-date-display .year-text{display:block;font-size:1.5rem;line-height:25px;color:var(--font-on-primary-color-main)}.datepicker-date-display .date-text{display:block;font-size:2.8rem;line-height:47px;font-weight:500}.datepicker-calendar-container{-webkit-box-flex:2.5;-webkit-flex:2.5 auto;-ms-flex:2.5 auto;flex:2.5 auto}.datepicker-table{width:280px;font-size:1rem;margin:0 auto}.datepicker-table thead{border-bottom:none}.datepicker-table th{padding:10px 5px;text-align:center}.datepicker-table tr{border:none}.datepicker-table abbr{text-decoration:none;color:var(--font-color-medium)}.datepicker-table td{color:var(--font-color-main);border-radius:50%;padding:0}.datepicker-table td.is-today{color:var(--primary-color)}.datepicker-table td.is-selected{background-color:var(--primary-color);color:var(--font-on-primary-color-main)}.datepicker-table td.is-outside-current-month,.datepicker-table td.is-disabled{color:var(--font-color-disabled);pointer-events:none}.datepicker-day-button{background-color:rgba(0,0,0,0);border:none;line-height:38px;display:block;width:100%;border-radius:50%;padding:0 5px;cursor:pointer;color:inherit}.datepicker-day-button:hover{background-color:var(--primary-color-hover-opaque)}.datepicker-day-button:focus{background-color:var(--primary-color-focus-opaque)}.datepicker-footer{width:280px;margin:0 auto;padding-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.datepicker-cancel,.datepicker-clear,.datepicker-today,.datepicker-done{color:var(--primary-color);padding:0 1rem}.datepicker-clear{color:var(--error-color)}@media only screen and (min-width : 601px){.datepicker-modal{max-width:625px}.datepicker-container.modal-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.datepicker-date-display{-webkit-box-flex:0;-webkit-flex:0 1 270px;-ms-flex:0 1 270px;flex:0 1 270px}.datepicker-controls,.datepicker-table,.datepicker-footer{width:320px}.datepicker-day-button{line-height:44px}}.timepicker-modal{max-width:325px;max-height:none}.timepicker-container.modal-content{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:0}.text-primary{color:var(--font-on-primary-color-main)}.timepicker-digital-display{width:200px;-webkit-box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto;background-color:var(--primary-color);padding:10px;font-weight:300}.timepicker-text-container{font-size:4rem;font-weight:bold;text-align:center;color:var(--font-on-primary-color-medium);font-weight:400;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.timepicker-text-container input[type=text]{height:4rem;color:rgba(255,255,255,.6);border-bottom:0px;font-size:4rem;direction:ltr}.timepicker-input-hours,.timepicker-input-minutes,.timepicker-span-am-pm div{cursor:pointer}input[type=text].timepicker-input-hours{text-align:right;width:28%;margin-right:3px}input[type=text].timepicker-input-minutes{width:33%;margin-left:3px}input[type=text].text-primary{color:#fff}.timepicker-display-am-pm{font-size:1.3rem;position:absolute;right:1rem;bottom:1rem;font-weight:400}.timepicker-analog-display{-webkit-box-flex:2.5;-webkit-flex:2.5 auto;-ms-flex:2.5 auto;flex:2.5 auto;background-color:var(--surface-color)}.timepicker-plate{background-color:var(--background-color-level-4dp);border-radius:50%;width:270px;height:270px;overflow:visible;position:relative;margin:auto;margin-top:25px;margin-bottom:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.timepicker-canvas,.timepicker-dial{position:absolute;left:0;right:0;top:0;bottom:0}.timepicker-minutes{visibility:hidden}.timepicker-tick{border-radius:50%;color:var(--font-color-main);line-height:40px;text-align:center;width:40px;height:40px;position:absolute;cursor:pointer;font-size:15px}.timepicker-tick.active,.timepicker-tick:hover{background-color:var(--primary-color-hover-opaque)}.timepicker-dial{-webkit-transition:opacity 350ms,-webkit-transform 350ms;transition:opacity 350ms,-webkit-transform 350ms;transition:transform 350ms,opacity 350ms;transition:transform 350ms,opacity 350ms,-webkit-transform 350ms}.timepicker-dial-out{opacity:0}.timepicker-dial-out.timepicker-hours{-webkit-transform:scale(1.1, 1.1);transform:scale(1.1, 1.1)}.timepicker-dial-out.timepicker-minutes{-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}.timepicker-canvas{-webkit-transition:opacity 175ms;transition:opacity 175ms}.timepicker-canvas line{stroke:var(--primary-color);stroke-width:4;stroke-linecap:round}.timepicker-canvas-out{opacity:.25}.timepicker-canvas-bearing{stroke:none;fill:var(--primary-color)}.timepicker-canvas-bg{stroke:none;fill:var(--primary-color)}.timepicker-footer{margin:0 auto;padding:5px 1rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.timepicker-clear{color:var(--error-color)}.timepicker-close{color:var(--primary-color)}.timepicker-clear,.timepicker-close{padding:0 20px}@media only screen and (min-width : 601px){.timepicker-modal{max-width:600px}.timepicker-container.modal-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.timepicker-text-container{top:32%}.timepicker-display-am-pm{position:relative;right:auto;bottom:auto;text-align:center;margin-top:1.2rem}}:root{--surface-color: #eeeeee;--background-color: #ffffff;--font-color-main: rgba(0, 0, 0, 0.87);--font-color-medium: rgba(0, 0, 0, 0.56);--font-color-disabled: rgba(0, 0, 0, 0.38);--font-on-primary-color-main: rgba(255, 255, 255, 0.87);--font-on-primary-color-dark-main: rgba(255, 255, 255, 0.87);--font-on-primary-color-dark-medium: rgba(255, 255, 255, 0.60);--font-on-primary-color-medium: rgba(255, 255, 255, 0.60);--font-on-primary-color-disabled: rgba(255, 255, 255, 0.38);--font-on-secondary-color-main: rgba(0, 0, 0, 0.87);--hover-color: rgba(0, 0, 0, 0.04);--focus-color: rgba(0, 0, 0, 0.12);--focus-color-solid: #E0E0E0;--background-color-disabled: rgba(0, 0, 0, 0.12);--background-color-level-4dp: rgba(0, 0, 0, 0.09);--background-color-level-16dp-solid: var(--surface-color);--background-color-slight-emphasis: rgba(0, 0, 0, 0.025);--background-color-card: var(--surface-color);--tooltip-background-color: #313033;--tooltip-font-color: rgba(255, 255, 255, 0.77);--separator-color: #DDDDDD;--error-color: #F44336;--slider-track-color: rgba(0, 0, 0, 0.26);--switch-thumb-off-color: #ffffff;--carousel-indicator-color: rgba(255, 255, 255, 0.45);--carousel-indicator-active-color: #FFF;--primary-color: #26a69a;--primary-color-dark: #009688;--primary-color-numeric: 38, 166, 154;--primary-color-raised-hover-solid: #30B0A4;--primary-color-raised-focus-solid: #44C4B8;--primary-color-font-medium-color: rgba(var(--primary-color-numeric), 0.7);--primary-color-font-disabled-color: rgba(var(--primary-color-numeric), 0.4);--primary-color-hover-opaque: rgba(var(--primary-color-numeric), 0.06);--primary-color-focus-opaque: rgba(var(--primary-color-numeric), 0.18);--secondary-color: #EF5350;--secondary-color-hover-solid: #FE625F;--secondary-color-focus-solid: #FF7B78;--md_sys_color_on-surface: 28, 27, 31}:root[theme=dark]{--background-color: #121212;--surface-color: #242424;--font-color-main: rgba(255, 255, 255, 0.87);--font-color-medium: rgba(255, 255, 255, 0.60);--font-color-disabled: rgba(255, 255, 255, 0.38);--font-on-primary-color-main: rgba(0, 0, 0, 0.87);--font-on-primary-color-dark-main: rgba(255, 255, 255, 0.87);--font-on-primary-color-dark-medium: rgba(255, 255, 255, 0.60);--font-on-primary-color-medium: rgba(0, 0, 0, 0.56);--font-on-primary-color-disabled: rgba(0, 0, 0, 0.38);--hover-color: rgba(255, 255, 255, 0.04);--focus-color: rgba(255, 255, 255, 0.12);--focus-color-solid: #424242;--background-color-disabled: rgba(255, 255, 255, 0.12);--background-color-level-4dp: rgba(255, 255, 255, 0.09);--background-color-level-16dp-solid: #262626;--background-color-card: var(--surface-color);--background-color-slight-emphasis: rgba(255, 255, 255, 0.05);--separator-color: #424242;--error-color: #CF6679;--slider-track-color: rgba(255, 255, 255, 0.26);--switch-thumb-off-color: #bababa;--primary-color: #B39DDB;--primary-color-dark: #9575CD;--primary-color-numeric: 179, 157, 219;--primary-color-raised-hover-solid: #C2ACEA;--primary-color-raised-focus-solid: #DBC5FF;--secondary-color: #CDDC39;--secondary-color-hover-solid: #DCEB48;--secondary-color-focus-solid: #F5FF61;--md_sys_color_on-surface: 230, 225, 229}body{color:var(--font-color-main);line-height:1.6;font-size:16px;-webkit-font-smoothing:antialiased;background-color:var(--background-color)}p.box{padding:20px}p{padding:0}h5>span{font-size:14px;margin-left:15px;color:var(--font-color-medium)}td,th{padding:15px 10px}.header{color:var(--font-color-main);font-weight:400;font-size:3.25rem}.preview{background-color:var(--surface-color);border:1px solid var(--separator-color);padding:20px 20px}.method-header{font-family:"Inconsolata",Monaco,Consolas,"Andale Mono",monospace;margin-top:15px;padding-top:30px}header,main,footer{padding-left:300px}.parallax-demo header,.parallax-demo main,.parallax-demo footer{padding-left:0}footer.example{padding-left:0}@media only screen and (max-width : 992.99px){header,main,footer{padding-left:0}h5>span{display:block;margin:0 0 15px 0}}ul.sidenav.sidenav-fixed li.logo{text-align:center;margin-top:16px;margin-bottom:60px}ul.sidenav.sidenav-fixed li.logo:hover,ul.sidenav.sidenav-fixed li.logo #logo-container:hover{background-color:rgba(0,0,0,0)}ul.sidenav.sidenav-fixed{overflow:hidden;-webkit-box-shadow:none;box-shadow:none;border-right:1px solid var(--separator-color)}ul.sidenav.sidenav-fixed>li:last-child{margin-bottom:160px}ul.sidenav.sidenav-fixed li{line-height:44px}ul.sidenav.sidenav-fixed li.active{background-color:var(--focus-color)}ul.sidenav.sidenav-fixed li a{font-size:13px;line-height:44px;height:44px;padding:0 30px}ul.sidenav.sidenav-fixed li a .new.badge{margin-top:11px}ul.sidenav.sidenav-fixed ul.collapsible-accordion{background-color:var(--surface-color)}ul.sidenav.sidenav-fixed ul.collapsible-accordion a.collapsible-header{padding:0 30px}ul.sidenav.sidenav-fixed ul.collapsible-accordion .collapsible-body li a{font-weight:400;padding:0 37.5px 0 45px}ul.sidenav.sidenav-fixed:hover{overflow-y:auto}.bold>a{font-weight:bold}#logo-container{height:50px;margin-bottom:16px}.current-version-number{color:var(--font-color-medium)}.intro #logo{height:150px}.call-to-action>.btn,.call-to-action>.btn-large,.call-to-action>.btn-small{border:1px solid var(--primary-color)}.call-to-action>.btn:first-of-type,.call-to-action>.btn-large:first-of-type,.call-to-action>.btn-small:first-of-type{border:none}.call-to-action>.btn-flat{color:var(--primary-color)}.materialize-benefits .collection-item>h4{font-size:1.75rem;font-weight:500}@media only screen and (max-width : 992.99px){footer.page-footer .container{text-align:center}}nav.top-nav{height:110px;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid var(--separator-color);background-color:rgba(0,0,0,0)}nav.top-nav h1.header{margin:0;padding-top:22px}a.sidenav-trigger.top-nav{position:absolute;text-align:center;height:48px;width:48px;top:28px;float:none;margin-left:1.5rem;color:var(--primary-color);font-size:36px;z-index:2}a.sidenav-trigger.top-nav i{font-size:32px}@media only screen and (max-width : 600.99px){a.sidenav-trigger.top-nav{left:0}ul.sidenav.sidenav-fixed{border:0}}@media only screen and (max-width : 992.99px){nav .nav-wrapper{text-align:center}nav .nav-wrapper a.page-title{font-size:36px}}@media only screen and (min-width : 601px){main>.container,body>.page-footer>.container,.top-nav>.container,#index-banner>.container,.github-commit>.container{width:100%}}#front-page-logo{display:inline-block;height:100%;pointer-events:none}#responsive-img{width:80%;display:block;margin:0 auto}#index-banner{border-bottom:1px solid var(--separator-color)}#index-banner .container{position:relative}#index-banner h4{margin-bottom:40px;line-height:44px;color:var(--font-color-main)}#index-banner h1{margin-top:16px}@media only screen and (max-width : 992.99px){#index-banner h1{margin-top:60px}#index-banner h4{margin-bottom:15px}}@media only screen and (max-width : 600.99px){#index-banner h4{margin-bottom:0}}.github-commit{color:var(--font-color-medium);border-top:1px solid var(--separator-color);padding:14px 0;height:64px;line-height:36px;font-size:.9rem}.github-commit .sha{margin:0 6px 0 6px}@media only screen and (max-width : 992.99px){.github-commit{text-align:center}}#download-button,#upgrade-button{background-color:var(--primary-color);width:260px;height:70px;margin:4px;padding:0;line-height:70px;font-size:18px;font-weight:400}#download-button:hover,#upgrade-button:hover{background-color:var(--primary-color-raised-hover-solid)}.promo{width:100%}.promo i{margin:30px 0;color:var(--secondary-color);font-size:5rem;display:block}.promo-caption{font-size:1.25rem;font-weight:500;margin-top:5px;margin-bottom:0}.col.grid-example{border:1px solid var(--separator-color);margin:7px 0;text-align:center;line-height:50px;font-size:28px;background-color:tomato;color:#fff;padding:0}.col.grid-example span{font-weight:100;line-height:50px}.promo-example{overflow:hidden}#site-layout-example-left{background-color:#90a4ae;height:300px}#site-layout-example-right{background-color:var(--secondary-color);height:300px}#site-layout-example-top{background-color:var(--primary-color);height:42px}.flat-text-header{height:35px;width:80%;background-color:rgba(255,255,255,.15);display:block;margin:27px auto}.flat-text{height:25px;width:80%;background-color:rgba(0,0,0,.15);display:block;margin:27px auto}.flat-text.small{width:25%;height:25px;background-color:rgba(0,0,0,.15)}.flat-text.full-width{width:100%}.browser-window{text-align:left;width:100%;height:auto;display:inline-block;border-radius:5px 5px 2px 2px;background-color:var(--background-color-level-4dp);margin:20px 0px;overflow:hidden}.browser-window .top-bar{height:30px;border-radius:5px 5px 0 0;border-top:thin solid #eaeae9;border-bottom:thin solid #dfdfde;background:-webkit-gradient(linear, left top, left bottom, from(#e7e7e6), to(#E2E2E1));background:linear-gradient(#e7e7e6, #E2E2E1)}.browser-window .circle{height:10px;width:10px;display:inline-block;border-radius:50%;background-color:#fff;margin-right:1px}#close-circle{background-color:#ff5c5a}#minimize-circle{background-color:#ffbb50}#maximize-circle{background-color:#1bc656}.browser-window .circles{margin:5px 12px}.browser-window .content{margin:0;width:100%;display:inline-block;border-radius:0 0 5px 5px;background-color:#fafafa}.browser-window .row{margin:0}.clear{clear:both}.dynamic-color .red,.dynamic-color .pink,.dynamic-color .purple,.dynamic-color .deep-purple,.dynamic-color .indigo,.dynamic-color .blue,.dynamic-color .light-blue,.dynamic-color .cyan,.dynamic-color .teal,.dynamic-color .green,.dynamic-color .light-green,.dynamic-color .lime,.dynamic-color .yellow,.dynamic-color .amber,.dynamic-color .orange,.dynamic-color .deep-orange,.dynamic-color .brown,.dynamic-color .grey,.dynamic-color .blue-grey,.dynamic-color .black,.dynamic-color .white,.dynamic-color .transparent{height:55px;width:100%;padding:0 15px;font-weight:500;font-size:12px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box}.dynamic-color .col{margin-bottom:55px}.center{text-align:center;vertical-align:middle}.material-icons.icon-demo{line-height:50px}.icon-container i{font-size:3em;margin-bottom:10px}.icon-container .icon-preview{height:120px;text-align:center}.icon-container span{display:block}.icon-holder{display:block;text-align:center;width:150px;height:115px;float:left;margin:0 0px 15px 0px}.icon-holder p{margin:0 0}.tabs-wrapper{position:relative;height:48px}.tabs-wrapper .row.pinned{position:fixed;width:100%;top:0;z-index:10}.shadow-demo{background-color:var(--secondary-color);width:100px;height:100px;margin:20px auto}@media only screen and (max-width: 600.99px){.shadow-demo{width:150px;height:150px}}.parallax-container .text-center{position:absolute;top:50%;left:0;right:0;margin-top:-27px}ul.table-of-contents{margin-top:0;padding-top:48px;font-size:1rem}code,pre{position:relative;font-size:1.1rem}.directory-markup{font-size:1rem;line-height:1.1rem !important}:not(pre)>code[class*=language-]{padding:.1em .25em;border:solid 1px var(--separator-color)}pre[class*=language-]{padding:25px 12px 7px 12px;border:solid 1px var(--separator-color);background:var(--background-color-slight-emphasis)}pre[class*=language-]:before{position:absolute;padding:1px 5px;background:var(--background-color-level-16dp-solid);top:0;left:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;color:var(--font-color-medium);content:attr(class);font-size:.9rem;border:solid 1px var(--separator-color);border-top:none;border-left:none}.token.operator{background:rgba(0,0,0,0)}pre[class*=language-],code[class*=language-]{line-height:1.3}code[class*=language-]{color:var(--font-color-main)}:not(pre)>code[class*=language-]{background:var(--background-color-slight-emphasis);color:var(--font-color-main)}.copyMessage,.copyButton{color:var(--font-color-medium);position:absolute}.copyMessage{font-size:14px;-webkit-transition:all .2s ease-in;transition:all .2s ease-in;opacity:0;right:45px;top:15px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.copyButton{top:10px;right:10px;cursor:pointer}.toc-wrapper{position:relative;margin-top:42px}.toc-wrapper.pin-bottom{margin-top:84px}footer{font-size:.9rem}body.parallax-demo footer{margin-top:0}.docs-footer{margin-top:40px;background-color:rgba(0,0,0,0);border-top:1px solid var(--separator-color);color:inherit}.docs-footer .footer-copyright,.docs-footer .footer-copyright a{color:var(--font-color-medium);background-color:rgba(0,0,0,0)}.image-container{width:100%}.image-container img{max-width:100%}@media only screen and (max-width : 600.99px){.mobile-image{max-width:100%}}.waves-color-demo .collection-item{height:37px;line-height:37px;-webkit-box-sizing:content-box;box-sizing:content-box}.waves-color-demo .collection-item code{line-height:37px}.waves-color-demo .btn:not(.waves-light),.waves-color-demo .btn-large:not(.waves-light),.waves-color-demo .btn-small:not(.waves-light){background-color:#fff;color:#212121}.card-panel span,.card-content p{-webkit-font-smoothing:antialiased}#images .card-panel .row{margin-bottom:0}.pushpin-demo{position:relative;height:100px}#pushpin-demo-1{display:block;height:inherit;background-color:var(--slider-track-color)}.valign-demo{height:400px;background-color:var(--slider-track-color)}.talign-demo{height:100px;background-color:var(--slider-track-color)}#staggered-test li,#image-test{opacity:0}#download-thanks{border-radius:5px;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;max-height:300px;opacity:1}#download-thanks .header{font-size:1.75em;color:var(--primary-color)}#download-thanks.is-closed{opacity:0;max-height:0}#nav-mobile li.version{position:absolute;top:65px;left:0;right:0;font-family:"Inconsolata";text-align:center}#nav-mobile li.version .dropdown-trigger{font-family:"Inconsolata";margin:0 auto;display:inline-block;padding:0 10px;border-bottom:1px solid var(--separator-color)}#nav-mobile li.version .dropdown-trigger .caret{position:relative;top:10px;fill:var(--font-color-medium)}#version-dropdown{text-align:left}#version-dropdown li>a{padding:0 10px}#version-dropdown a{height:50px;line-height:50px}.ext-link>img{vertical-align:middle;height:24px}#nav-mobile li.search{margin:5px 0;z-index:2}#nav-mobile li.search .search-wrapper{color:var(--font-color-medium);margin-top:-1px;-webkit-transition:margin .25s ease;transition:margin .25s ease;position:relative}#nav-mobile li.search .search-wrapper input#search{background-color:rgba(0,0,0,0);border:1px solid var(--separator-color);border-radius:3px;margin:0 auto;color:var(--font-color-medium);display:block;font-size:16px;width:80%;padding:5px;-webkit-box-sizing:border-box;box-sizing:border-box;height:32px}#nav-mobile li.search .search-wrapper input#search:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}#nav-mobile li.search .search-wrapper i.material-icons{position:absolute;top:4px;right:34px;color:var(--separator-color);cursor:pointer}.search-results{position:fixed;margin:0;top:65px;left:340px;z-index:9999;background-color:var(--surface-color)}@media only screen and (max-width : 992.99px){.search-results{top:65px;left:100px}}@media only screen and (max-width : 600.99px){.search-results{top:160px;left:35px}}.search-results a{font-size:12px;padding:5px;white-space:nowrap;display:block}.search-results a.focused{background-color:var(--focus-color);outline:none}.search-results a:hover{background-color:var(--hover-color);outline:none}#nav-mobile li .new.badge{background-color:var(--secondary-color);color:var(--font-on-secondary-color-main)} \ No newline at end of file +.materialize-red{background-color:#e51c23 !important}.materialize-red-text{color:#e51c23 !important}.materialize-red.lighten-5{background-color:#fdeaeb !important}.materialize-red-text.text-lighten-5{color:#fdeaeb !important}.materialize-red.lighten-4{background-color:#f8c1c3 !important}.materialize-red-text.text-lighten-4{color:#f8c1c3 !important}.materialize-red.lighten-3{background-color:#f3989b !important}.materialize-red-text.text-lighten-3{color:#f3989b !important}.materialize-red.lighten-2{background-color:#ee6e73 !important}.materialize-red-text.text-lighten-2{color:#ee6e73 !important}.materialize-red.lighten-1{background-color:#ea454b !important}.materialize-red-text.text-lighten-1{color:#ea454b !important}.materialize-red.darken-1{background-color:#d0181e !important}.materialize-red-text.text-darken-1{color:#d0181e !important}.materialize-red.darken-2{background-color:#b9151b !important}.materialize-red-text.text-darken-2{color:#b9151b !important}.materialize-red.darken-3{background-color:#a21318 !important}.materialize-red-text.text-darken-3{color:#a21318 !important}.materialize-red.darken-4{background-color:#8b1014 !important}.materialize-red-text.text-darken-4{color:#8b1014 !important}.red{background-color:#f44336 !important}.red-text{color:#f44336 !important}.red.lighten-5{background-color:#ffebee !important}.red-text.text-lighten-5{color:#ffebee !important}.red.lighten-4{background-color:#ffcdd2 !important}.red-text.text-lighten-4{color:#ffcdd2 !important}.red.lighten-3{background-color:#ef9a9a !important}.red-text.text-lighten-3{color:#ef9a9a !important}.red.lighten-2{background-color:#e57373 !important}.red-text.text-lighten-2{color:#e57373 !important}.red.lighten-1{background-color:#ef5350 !important}.red-text.text-lighten-1{color:#ef5350 !important}.red.darken-1{background-color:#e53935 !important}.red-text.text-darken-1{color:#e53935 !important}.red.darken-2{background-color:#d32f2f !important}.red-text.text-darken-2{color:#d32f2f !important}.red.darken-3{background-color:#c62828 !important}.red-text.text-darken-3{color:#c62828 !important}.red.darken-4{background-color:#b71c1c !important}.red-text.text-darken-4{color:#b71c1c !important}.red.accent-1{background-color:#ff8a80 !important}.red-text.text-accent-1{color:#ff8a80 !important}.red.accent-2{background-color:#ff5252 !important}.red-text.text-accent-2{color:#ff5252 !important}.red.accent-3{background-color:#ff1744 !important}.red-text.text-accent-3{color:#ff1744 !important}.red.accent-4{background-color:#d50000 !important}.red-text.text-accent-4{color:#d50000 !important}.pink{background-color:#e91e63 !important}.pink-text{color:#e91e63 !important}.pink.lighten-5{background-color:#fce4ec !important}.pink-text.text-lighten-5{color:#fce4ec !important}.pink.lighten-4{background-color:#f8bbd0 !important}.pink-text.text-lighten-4{color:#f8bbd0 !important}.pink.lighten-3{background-color:#f48fb1 !important}.pink-text.text-lighten-3{color:#f48fb1 !important}.pink.lighten-2{background-color:#f06292 !important}.pink-text.text-lighten-2{color:#f06292 !important}.pink.lighten-1{background-color:#ec407a !important}.pink-text.text-lighten-1{color:#ec407a !important}.pink.darken-1{background-color:#d81b60 !important}.pink-text.text-darken-1{color:#d81b60 !important}.pink.darken-2{background-color:#c2185b !important}.pink-text.text-darken-2{color:#c2185b !important}.pink.darken-3{background-color:#ad1457 !important}.pink-text.text-darken-3{color:#ad1457 !important}.pink.darken-4{background-color:#880e4f !important}.pink-text.text-darken-4{color:#880e4f !important}.pink.accent-1{background-color:#ff80ab !important}.pink-text.text-accent-1{color:#ff80ab !important}.pink.accent-2{background-color:#ff4081 !important}.pink-text.text-accent-2{color:#ff4081 !important}.pink.accent-3{background-color:#f50057 !important}.pink-text.text-accent-3{color:#f50057 !important}.pink.accent-4{background-color:#c51162 !important}.pink-text.text-accent-4{color:#c51162 !important}.purple{background-color:#9c27b0 !important}.purple-text{color:#9c27b0 !important}.purple.lighten-5{background-color:#f3e5f5 !important}.purple-text.text-lighten-5{color:#f3e5f5 !important}.purple.lighten-4{background-color:#e1bee7 !important}.purple-text.text-lighten-4{color:#e1bee7 !important}.purple.lighten-3{background-color:#ce93d8 !important}.purple-text.text-lighten-3{color:#ce93d8 !important}.purple.lighten-2{background-color:#ba68c8 !important}.purple-text.text-lighten-2{color:#ba68c8 !important}.purple.lighten-1{background-color:#ab47bc !important}.purple-text.text-lighten-1{color:#ab47bc !important}.purple.darken-1{background-color:#8e24aa !important}.purple-text.text-darken-1{color:#8e24aa !important}.purple.darken-2{background-color:#7b1fa2 !important}.purple-text.text-darken-2{color:#7b1fa2 !important}.purple.darken-3{background-color:#6a1b9a !important}.purple-text.text-darken-3{color:#6a1b9a !important}.purple.darken-4{background-color:#4a148c !important}.purple-text.text-darken-4{color:#4a148c !important}.purple.accent-1{background-color:#ea80fc !important}.purple-text.text-accent-1{color:#ea80fc !important}.purple.accent-2{background-color:#e040fb !important}.purple-text.text-accent-2{color:#e040fb !important}.purple.accent-3{background-color:#d500f9 !important}.purple-text.text-accent-3{color:#d500f9 !important}.purple.accent-4{background-color:#a0f !important}.purple-text.text-accent-4{color:#a0f !important}.deep-purple{background-color:#673ab7 !important}.deep-purple-text{color:#673ab7 !important}.deep-purple.lighten-5{background-color:#ede7f6 !important}.deep-purple-text.text-lighten-5{color:#ede7f6 !important}.deep-purple.lighten-4{background-color:#d1c4e9 !important}.deep-purple-text.text-lighten-4{color:#d1c4e9 !important}.deep-purple.lighten-3{background-color:#b39ddb !important}.deep-purple-text.text-lighten-3{color:#b39ddb !important}.deep-purple.lighten-2{background-color:#9575cd !important}.deep-purple-text.text-lighten-2{color:#9575cd !important}.deep-purple.lighten-1{background-color:#7e57c2 !important}.deep-purple-text.text-lighten-1{color:#7e57c2 !important}.deep-purple.darken-1{background-color:#5e35b1 !important}.deep-purple-text.text-darken-1{color:#5e35b1 !important}.deep-purple.darken-2{background-color:#512da8 !important}.deep-purple-text.text-darken-2{color:#512da8 !important}.deep-purple.darken-3{background-color:#4527a0 !important}.deep-purple-text.text-darken-3{color:#4527a0 !important}.deep-purple.darken-4{background-color:#311b92 !important}.deep-purple-text.text-darken-4{color:#311b92 !important}.deep-purple.accent-1{background-color:#b388ff !important}.deep-purple-text.text-accent-1{color:#b388ff !important}.deep-purple.accent-2{background-color:#7c4dff !important}.deep-purple-text.text-accent-2{color:#7c4dff !important}.deep-purple.accent-3{background-color:#651fff !important}.deep-purple-text.text-accent-3{color:#651fff !important}.deep-purple.accent-4{background-color:#6200ea !important}.deep-purple-text.text-accent-4{color:#6200ea !important}.indigo{background-color:#3f51b5 !important}.indigo-text{color:#3f51b5 !important}.indigo.lighten-5{background-color:#e8eaf6 !important}.indigo-text.text-lighten-5{color:#e8eaf6 !important}.indigo.lighten-4{background-color:#c5cae9 !important}.indigo-text.text-lighten-4{color:#c5cae9 !important}.indigo.lighten-3{background-color:#9fa8da !important}.indigo-text.text-lighten-3{color:#9fa8da !important}.indigo.lighten-2{background-color:#7986cb !important}.indigo-text.text-lighten-2{color:#7986cb !important}.indigo.lighten-1{background-color:#5c6bc0 !important}.indigo-text.text-lighten-1{color:#5c6bc0 !important}.indigo.darken-1{background-color:#3949ab !important}.indigo-text.text-darken-1{color:#3949ab !important}.indigo.darken-2{background-color:#303f9f !important}.indigo-text.text-darken-2{color:#303f9f !important}.indigo.darken-3{background-color:#283593 !important}.indigo-text.text-darken-3{color:#283593 !important}.indigo.darken-4{background-color:#1a237e !important}.indigo-text.text-darken-4{color:#1a237e !important}.indigo.accent-1{background-color:#8c9eff !important}.indigo-text.text-accent-1{color:#8c9eff !important}.indigo.accent-2{background-color:#536dfe !important}.indigo-text.text-accent-2{color:#536dfe !important}.indigo.accent-3{background-color:#3d5afe !important}.indigo-text.text-accent-3{color:#3d5afe !important}.indigo.accent-4{background-color:#304ffe !important}.indigo-text.text-accent-4{color:#304ffe !important}.blue{background-color:#2196f3 !important}.blue-text{color:#2196f3 !important}.blue.lighten-5{background-color:#e3f2fd !important}.blue-text.text-lighten-5{color:#e3f2fd !important}.blue.lighten-4{background-color:#bbdefb !important}.blue-text.text-lighten-4{color:#bbdefb !important}.blue.lighten-3{background-color:#90caf9 !important}.blue-text.text-lighten-3{color:#90caf9 !important}.blue.lighten-2{background-color:#64b5f6 !important}.blue-text.text-lighten-2{color:#64b5f6 !important}.blue.lighten-1{background-color:#42a5f5 !important}.blue-text.text-lighten-1{color:#42a5f5 !important}.blue.darken-1{background-color:#1e88e5 !important}.blue-text.text-darken-1{color:#1e88e5 !important}.blue.darken-2{background-color:#1976d2 !important}.blue-text.text-darken-2{color:#1976d2 !important}.blue.darken-3{background-color:#1565c0 !important}.blue-text.text-darken-3{color:#1565c0 !important}.blue.darken-4{background-color:#0d47a1 !important}.blue-text.text-darken-4{color:#0d47a1 !important}.blue.accent-1{background-color:#82b1ff !important}.blue-text.text-accent-1{color:#82b1ff !important}.blue.accent-2{background-color:#448aff !important}.blue-text.text-accent-2{color:#448aff !important}.blue.accent-3{background-color:#2979ff !important}.blue-text.text-accent-3{color:#2979ff !important}.blue.accent-4{background-color:#2962ff !important}.blue-text.text-accent-4{color:#2962ff !important}.light-blue{background-color:#03a9f4 !important}.light-blue-text{color:#03a9f4 !important}.light-blue.lighten-5{background-color:#e1f5fe !important}.light-blue-text.text-lighten-5{color:#e1f5fe !important}.light-blue.lighten-4{background-color:#b3e5fc !important}.light-blue-text.text-lighten-4{color:#b3e5fc !important}.light-blue.lighten-3{background-color:#81d4fa !important}.light-blue-text.text-lighten-3{color:#81d4fa !important}.light-blue.lighten-2{background-color:#4fc3f7 !important}.light-blue-text.text-lighten-2{color:#4fc3f7 !important}.light-blue.lighten-1{background-color:#29b6f6 !important}.light-blue-text.text-lighten-1{color:#29b6f6 !important}.light-blue.darken-1{background-color:#039be5 !important}.light-blue-text.text-darken-1{color:#039be5 !important}.light-blue.darken-2{background-color:#0288d1 !important}.light-blue-text.text-darken-2{color:#0288d1 !important}.light-blue.darken-3{background-color:#0277bd !important}.light-blue-text.text-darken-3{color:#0277bd !important}.light-blue.darken-4{background-color:#01579b !important}.light-blue-text.text-darken-4{color:#01579b !important}.light-blue.accent-1{background-color:#80d8ff !important}.light-blue-text.text-accent-1{color:#80d8ff !important}.light-blue.accent-2{background-color:#40c4ff !important}.light-blue-text.text-accent-2{color:#40c4ff !important}.light-blue.accent-3{background-color:#00b0ff !important}.light-blue-text.text-accent-3{color:#00b0ff !important}.light-blue.accent-4{background-color:#0091ea !important}.light-blue-text.text-accent-4{color:#0091ea !important}.cyan{background-color:#00bcd4 !important}.cyan-text{color:#00bcd4 !important}.cyan.lighten-5{background-color:#e0f7fa !important}.cyan-text.text-lighten-5{color:#e0f7fa !important}.cyan.lighten-4{background-color:#b2ebf2 !important}.cyan-text.text-lighten-4{color:#b2ebf2 !important}.cyan.lighten-3{background-color:#80deea !important}.cyan-text.text-lighten-3{color:#80deea !important}.cyan.lighten-2{background-color:#4dd0e1 !important}.cyan-text.text-lighten-2{color:#4dd0e1 !important}.cyan.lighten-1{background-color:#26c6da !important}.cyan-text.text-lighten-1{color:#26c6da !important}.cyan.darken-1{background-color:#00acc1 !important}.cyan-text.text-darken-1{color:#00acc1 !important}.cyan.darken-2{background-color:#0097a7 !important}.cyan-text.text-darken-2{color:#0097a7 !important}.cyan.darken-3{background-color:#00838f !important}.cyan-text.text-darken-3{color:#00838f !important}.cyan.darken-4{background-color:#006064 !important}.cyan-text.text-darken-4{color:#006064 !important}.cyan.accent-1{background-color:#84ffff !important}.cyan-text.text-accent-1{color:#84ffff !important}.cyan.accent-2{background-color:#18ffff !important}.cyan-text.text-accent-2{color:#18ffff !important}.cyan.accent-3{background-color:#00e5ff !important}.cyan-text.text-accent-3{color:#00e5ff !important}.cyan.accent-4{background-color:#00b8d4 !important}.cyan-text.text-accent-4{color:#00b8d4 !important}.teal{background-color:#009688 !important}.teal-text{color:#009688 !important}.teal.lighten-5{background-color:#e0f2f1 !important}.teal-text.text-lighten-5{color:#e0f2f1 !important}.teal.lighten-4{background-color:#b2dfdb !important}.teal-text.text-lighten-4{color:#b2dfdb !important}.teal.lighten-3{background-color:#80cbc4 !important}.teal-text.text-lighten-3{color:#80cbc4 !important}.teal.lighten-2{background-color:#4db6ac !important}.teal-text.text-lighten-2{color:#4db6ac !important}.teal.lighten-1{background-color:#26a69a !important}.teal-text.text-lighten-1{color:#26a69a !important}.teal.darken-1{background-color:#00897b !important}.teal-text.text-darken-1{color:#00897b !important}.teal.darken-2{background-color:#00796b !important}.teal-text.text-darken-2{color:#00796b !important}.teal.darken-3{background-color:#00695c !important}.teal-text.text-darken-3{color:#00695c !important}.teal.darken-4{background-color:#004d40 !important}.teal-text.text-darken-4{color:#004d40 !important}.teal.accent-1{background-color:#a7ffeb !important}.teal-text.text-accent-1{color:#a7ffeb !important}.teal.accent-2{background-color:#64ffda !important}.teal-text.text-accent-2{color:#64ffda !important}.teal.accent-3{background-color:#1de9b6 !important}.teal-text.text-accent-3{color:#1de9b6 !important}.teal.accent-4{background-color:#00bfa5 !important}.teal-text.text-accent-4{color:#00bfa5 !important}.green{background-color:#4caf50 !important}.green-text{color:#4caf50 !important}.green.lighten-5{background-color:#e8f5e9 !important}.green-text.text-lighten-5{color:#e8f5e9 !important}.green.lighten-4{background-color:#c8e6c9 !important}.green-text.text-lighten-4{color:#c8e6c9 !important}.green.lighten-3{background-color:#a5d6a7 !important}.green-text.text-lighten-3{color:#a5d6a7 !important}.green.lighten-2{background-color:#81c784 !important}.green-text.text-lighten-2{color:#81c784 !important}.green.lighten-1{background-color:#66bb6a !important}.green-text.text-lighten-1{color:#66bb6a !important}.green.darken-1{background-color:#43a047 !important}.green-text.text-darken-1{color:#43a047 !important}.green.darken-2{background-color:#388e3c !important}.green-text.text-darken-2{color:#388e3c !important}.green.darken-3{background-color:#2e7d32 !important}.green-text.text-darken-3{color:#2e7d32 !important}.green.darken-4{background-color:#1b5e20 !important}.green-text.text-darken-4{color:#1b5e20 !important}.green.accent-1{background-color:#b9f6ca !important}.green-text.text-accent-1{color:#b9f6ca !important}.green.accent-2{background-color:#69f0ae !important}.green-text.text-accent-2{color:#69f0ae !important}.green.accent-3{background-color:#00e676 !important}.green-text.text-accent-3{color:#00e676 !important}.green.accent-4{background-color:#00c853 !important}.green-text.text-accent-4{color:#00c853 !important}.light-green{background-color:#8bc34a !important}.light-green-text{color:#8bc34a !important}.light-green.lighten-5{background-color:#f1f8e9 !important}.light-green-text.text-lighten-5{color:#f1f8e9 !important}.light-green.lighten-4{background-color:#dcedc8 !important}.light-green-text.text-lighten-4{color:#dcedc8 !important}.light-green.lighten-3{background-color:#c5e1a5 !important}.light-green-text.text-lighten-3{color:#c5e1a5 !important}.light-green.lighten-2{background-color:#aed581 !important}.light-green-text.text-lighten-2{color:#aed581 !important}.light-green.lighten-1{background-color:#9ccc65 !important}.light-green-text.text-lighten-1{color:#9ccc65 !important}.light-green.darken-1{background-color:#7cb342 !important}.light-green-text.text-darken-1{color:#7cb342 !important}.light-green.darken-2{background-color:#689f38 !important}.light-green-text.text-darken-2{color:#689f38 !important}.light-green.darken-3{background-color:#558b2f !important}.light-green-text.text-darken-3{color:#558b2f !important}.light-green.darken-4{background-color:#33691e !important}.light-green-text.text-darken-4{color:#33691e !important}.light-green.accent-1{background-color:#ccff90 !important}.light-green-text.text-accent-1{color:#ccff90 !important}.light-green.accent-2{background-color:#b2ff59 !important}.light-green-text.text-accent-2{color:#b2ff59 !important}.light-green.accent-3{background-color:#76ff03 !important}.light-green-text.text-accent-3{color:#76ff03 !important}.light-green.accent-4{background-color:#64dd17 !important}.light-green-text.text-accent-4{color:#64dd17 !important}.lime{background-color:#cddc39 !important}.lime-text{color:#cddc39 !important}.lime.lighten-5{background-color:#f9fbe7 !important}.lime-text.text-lighten-5{color:#f9fbe7 !important}.lime.lighten-4{background-color:#f0f4c3 !important}.lime-text.text-lighten-4{color:#f0f4c3 !important}.lime.lighten-3{background-color:#e6ee9c !important}.lime-text.text-lighten-3{color:#e6ee9c !important}.lime.lighten-2{background-color:#dce775 !important}.lime-text.text-lighten-2{color:#dce775 !important}.lime.lighten-1{background-color:#d4e157 !important}.lime-text.text-lighten-1{color:#d4e157 !important}.lime.darken-1{background-color:#c0ca33 !important}.lime-text.text-darken-1{color:#c0ca33 !important}.lime.darken-2{background-color:#afb42b !important}.lime-text.text-darken-2{color:#afb42b !important}.lime.darken-3{background-color:#9e9d24 !important}.lime-text.text-darken-3{color:#9e9d24 !important}.lime.darken-4{background-color:#827717 !important}.lime-text.text-darken-4{color:#827717 !important}.lime.accent-1{background-color:#f4ff81 !important}.lime-text.text-accent-1{color:#f4ff81 !important}.lime.accent-2{background-color:#eeff41 !important}.lime-text.text-accent-2{color:#eeff41 !important}.lime.accent-3{background-color:#c6ff00 !important}.lime-text.text-accent-3{color:#c6ff00 !important}.lime.accent-4{background-color:#aeea00 !important}.lime-text.text-accent-4{color:#aeea00 !important}.yellow{background-color:#ffeb3b !important}.yellow-text{color:#ffeb3b !important}.yellow.lighten-5{background-color:#fffde7 !important}.yellow-text.text-lighten-5{color:#fffde7 !important}.yellow.lighten-4{background-color:#fff9c4 !important}.yellow-text.text-lighten-4{color:#fff9c4 !important}.yellow.lighten-3{background-color:#fff59d !important}.yellow-text.text-lighten-3{color:#fff59d !important}.yellow.lighten-2{background-color:#fff176 !important}.yellow-text.text-lighten-2{color:#fff176 !important}.yellow.lighten-1{background-color:#ffee58 !important}.yellow-text.text-lighten-1{color:#ffee58 !important}.yellow.darken-1{background-color:#fdd835 !important}.yellow-text.text-darken-1{color:#fdd835 !important}.yellow.darken-2{background-color:#fbc02d !important}.yellow-text.text-darken-2{color:#fbc02d !important}.yellow.darken-3{background-color:#f9a825 !important}.yellow-text.text-darken-3{color:#f9a825 !important}.yellow.darken-4{background-color:#f57f17 !important}.yellow-text.text-darken-4{color:#f57f17 !important}.yellow.accent-1{background-color:#ffff8d !important}.yellow-text.text-accent-1{color:#ffff8d !important}.yellow.accent-2{background-color:#ff0 !important}.yellow-text.text-accent-2{color:#ff0 !important}.yellow.accent-3{background-color:#ffea00 !important}.yellow-text.text-accent-3{color:#ffea00 !important}.yellow.accent-4{background-color:#ffd600 !important}.yellow-text.text-accent-4{color:#ffd600 !important}.amber{background-color:#ffc107 !important}.amber-text{color:#ffc107 !important}.amber.lighten-5{background-color:#fff8e1 !important}.amber-text.text-lighten-5{color:#fff8e1 !important}.amber.lighten-4{background-color:#ffecb3 !important}.amber-text.text-lighten-4{color:#ffecb3 !important}.amber.lighten-3{background-color:#ffe082 !important}.amber-text.text-lighten-3{color:#ffe082 !important}.amber.lighten-2{background-color:#ffd54f !important}.amber-text.text-lighten-2{color:#ffd54f !important}.amber.lighten-1{background-color:#ffca28 !important}.amber-text.text-lighten-1{color:#ffca28 !important}.amber.darken-1{background-color:#ffb300 !important}.amber-text.text-darken-1{color:#ffb300 !important}.amber.darken-2{background-color:#ffa000 !important}.amber-text.text-darken-2{color:#ffa000 !important}.amber.darken-3{background-color:#ff8f00 !important}.amber-text.text-darken-3{color:#ff8f00 !important}.amber.darken-4{background-color:#ff6f00 !important}.amber-text.text-darken-4{color:#ff6f00 !important}.amber.accent-1{background-color:#ffe57f !important}.amber-text.text-accent-1{color:#ffe57f !important}.amber.accent-2{background-color:#ffd740 !important}.amber-text.text-accent-2{color:#ffd740 !important}.amber.accent-3{background-color:#ffc400 !important}.amber-text.text-accent-3{color:#ffc400 !important}.amber.accent-4{background-color:#ffab00 !important}.amber-text.text-accent-4{color:#ffab00 !important}.orange{background-color:#ff9800 !important}.orange-text{color:#ff9800 !important}.orange.lighten-5{background-color:#fff3e0 !important}.orange-text.text-lighten-5{color:#fff3e0 !important}.orange.lighten-4{background-color:#ffe0b2 !important}.orange-text.text-lighten-4{color:#ffe0b2 !important}.orange.lighten-3{background-color:#ffcc80 !important}.orange-text.text-lighten-3{color:#ffcc80 !important}.orange.lighten-2{background-color:#ffb74d !important}.orange-text.text-lighten-2{color:#ffb74d !important}.orange.lighten-1{background-color:#ffa726 !important}.orange-text.text-lighten-1{color:#ffa726 !important}.orange.darken-1{background-color:#fb8c00 !important}.orange-text.text-darken-1{color:#fb8c00 !important}.orange.darken-2{background-color:#f57c00 !important}.orange-text.text-darken-2{color:#f57c00 !important}.orange.darken-3{background-color:#ef6c00 !important}.orange-text.text-darken-3{color:#ef6c00 !important}.orange.darken-4{background-color:#e65100 !important}.orange-text.text-darken-4{color:#e65100 !important}.orange.accent-1{background-color:#ffd180 !important}.orange-text.text-accent-1{color:#ffd180 !important}.orange.accent-2{background-color:#ffab40 !important}.orange-text.text-accent-2{color:#ffab40 !important}.orange.accent-3{background-color:#ff9100 !important}.orange-text.text-accent-3{color:#ff9100 !important}.orange.accent-4{background-color:#ff6d00 !important}.orange-text.text-accent-4{color:#ff6d00 !important}.deep-orange{background-color:#ff5722 !important}.deep-orange-text{color:#ff5722 !important}.deep-orange.lighten-5{background-color:#fbe9e7 !important}.deep-orange-text.text-lighten-5{color:#fbe9e7 !important}.deep-orange.lighten-4{background-color:#ffccbc !important}.deep-orange-text.text-lighten-4{color:#ffccbc !important}.deep-orange.lighten-3{background-color:#ffab91 !important}.deep-orange-text.text-lighten-3{color:#ffab91 !important}.deep-orange.lighten-2{background-color:#ff8a65 !important}.deep-orange-text.text-lighten-2{color:#ff8a65 !important}.deep-orange.lighten-1{background-color:#ff7043 !important}.deep-orange-text.text-lighten-1{color:#ff7043 !important}.deep-orange.darken-1{background-color:#f4511e !important}.deep-orange-text.text-darken-1{color:#f4511e !important}.deep-orange.darken-2{background-color:#e64a19 !important}.deep-orange-text.text-darken-2{color:#e64a19 !important}.deep-orange.darken-3{background-color:#d84315 !important}.deep-orange-text.text-darken-3{color:#d84315 !important}.deep-orange.darken-4{background-color:#bf360c !important}.deep-orange-text.text-darken-4{color:#bf360c !important}.deep-orange.accent-1{background-color:#ff9e80 !important}.deep-orange-text.text-accent-1{color:#ff9e80 !important}.deep-orange.accent-2{background-color:#ff6e40 !important}.deep-orange-text.text-accent-2{color:#ff6e40 !important}.deep-orange.accent-3{background-color:#ff3d00 !important}.deep-orange-text.text-accent-3{color:#ff3d00 !important}.deep-orange.accent-4{background-color:#dd2c00 !important}.deep-orange-text.text-accent-4{color:#dd2c00 !important}.brown{background-color:#795548 !important}.brown-text{color:#795548 !important}.brown.lighten-5{background-color:#efebe9 !important}.brown-text.text-lighten-5{color:#efebe9 !important}.brown.lighten-4{background-color:#d7ccc8 !important}.brown-text.text-lighten-4{color:#d7ccc8 !important}.brown.lighten-3{background-color:#bcaaa4 !important}.brown-text.text-lighten-3{color:#bcaaa4 !important}.brown.lighten-2{background-color:#a1887f !important}.brown-text.text-lighten-2{color:#a1887f !important}.brown.lighten-1{background-color:#8d6e63 !important}.brown-text.text-lighten-1{color:#8d6e63 !important}.brown.darken-1{background-color:#6d4c41 !important}.brown-text.text-darken-1{color:#6d4c41 !important}.brown.darken-2{background-color:#5d4037 !important}.brown-text.text-darken-2{color:#5d4037 !important}.brown.darken-3{background-color:#4e342e !important}.brown-text.text-darken-3{color:#4e342e !important}.brown.darken-4{background-color:#3e2723 !important}.brown-text.text-darken-4{color:#3e2723 !important}.blue-grey{background-color:#607d8b !important}.blue-grey-text{color:#607d8b !important}.blue-grey.lighten-5{background-color:#eceff1 !important}.blue-grey-text.text-lighten-5{color:#eceff1 !important}.blue-grey.lighten-4{background-color:#cfd8dc !important}.blue-grey-text.text-lighten-4{color:#cfd8dc !important}.blue-grey.lighten-3{background-color:#b0bec5 !important}.blue-grey-text.text-lighten-3{color:#b0bec5 !important}.blue-grey.lighten-2{background-color:#90a4ae !important}.blue-grey-text.text-lighten-2{color:#90a4ae !important}.blue-grey.lighten-1{background-color:#78909c !important}.blue-grey-text.text-lighten-1{color:#78909c !important}.blue-grey.darken-1{background-color:#546e7a !important}.blue-grey-text.text-darken-1{color:#546e7a !important}.blue-grey.darken-2{background-color:#455a64 !important}.blue-grey-text.text-darken-2{color:#455a64 !important}.blue-grey.darken-3{background-color:#37474f !important}.blue-grey-text.text-darken-3{color:#37474f !important}.blue-grey.darken-4{background-color:#263238 !important}.blue-grey-text.text-darken-4{color:#263238 !important}.grey{background-color:#9e9e9e !important}.grey-text{color:#9e9e9e !important}.grey.lighten-5{background-color:#fafafa !important}.grey-text.text-lighten-5{color:#fafafa !important}.grey.lighten-4{background-color:#f5f5f5 !important}.grey-text.text-lighten-4{color:#f5f5f5 !important}.grey.lighten-3{background-color:#eee !important}.grey-text.text-lighten-3{color:#eee !important}.grey.lighten-2{background-color:#e0e0e0 !important}.grey-text.text-lighten-2{color:#e0e0e0 !important}.grey.lighten-1{background-color:#bdbdbd !important}.grey-text.text-lighten-1{color:#bdbdbd !important}.grey.darken-1{background-color:#757575 !important}.grey-text.text-darken-1{color:#757575 !important}.grey.darken-2{background-color:#616161 !important}.grey-text.text-darken-2{color:#616161 !important}.grey.darken-3{background-color:#424242 !important}.grey-text.text-darken-3{color:#424242 !important}.grey.darken-4{background-color:#212121 !important}.grey-text.text-darken-4{color:#212121 !important}.black{background-color:#000 !important}.black-text{color:#000 !important}.white{background-color:#fff !important}.white-text{color:#fff !important}.transparent{background-color:rgba(0,0,0,0) !important}.transparent-text{color:rgba(0,0,0,0) !important}/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:rgba(0,0,0,0)}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;-moz-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,*:before,*:after{-webkit-box-sizing:inherit;box-sizing:inherit}button,input,optgroup,select,textarea{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}a{color:#039be5;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.valign-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.clearfix{clear:both}.z-depth-0{-webkit-box-shadow:none !important;box-shadow:none !important}.z-depth-1,.sidenav,.collapsible,.dropdown-content,.btn-floating,.btn,.btn-small,.btn-large,.toast,.card,.card-panel,nav{-webkit-box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.z-depth-1-half,.btn-floating:focus,.btn-floating:hover,.btn:focus,.btn-small:focus,.btn-large:focus,.btn:hover,.btn-small:hover,.btn-large:hover{-webkit-box-shadow:0 3px 3px 0 rgba(0,0,0,.14),0 1px 7px 0 rgba(0,0,0,.12),0 3px 1px -1px rgba(0,0,0,.2);box-shadow:0 3px 3px 0 rgba(0,0,0,.14),0 1px 7px 0 rgba(0,0,0,.12),0 3px 1px -1px rgba(0,0,0,.2)}.z-depth-2{-webkit-box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.3);box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.3)}.z-depth-3{-webkit-box-shadow:0 8px 17px 2px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2);box-shadow:0 8px 17px 2px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)}.z-depth-4{-webkit-box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -7px rgba(0,0,0,.2);box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -7px rgba(0,0,0,.2)}.z-depth-5,.modal{-webkit-box-shadow:0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12),0 11px 15px -7px rgba(0,0,0,.2);box-shadow:0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12),0 11px 15px -7px rgba(0,0,0,.2)}.hoverable{-webkit-transition:-webkit-box-shadow .25s;transition:-webkit-box-shadow .25s;transition:box-shadow .25s;transition:box-shadow .25s, -webkit-box-shadow .25s}.hoverable:hover{-webkit-box-shadow:0 8px 17px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);box-shadow:0 8px 17px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19)}.divider{height:1px;overflow:hidden;background-color:var(--separator-color)}blockquote{margin:20px 0;padding-left:1.5rem;border-left:5px solid var(--primary-color)}i{line-height:inherit}i.left{float:left;margin-right:15px}i.right{float:right;margin-left:15px}i.tiny{font-size:1rem}i.small{font-size:2rem}i.medium{font-size:4rem}i.large{font-size:6rem}img.responsive-img,video.responsive-video{max-width:100%;height:auto}.pagination li{display:inline-block;border-radius:2px;text-align:center;vertical-align:top;height:30px}.pagination li a{color:var(--font-color-medium);display:inline-block;font-size:1.2rem;padding:0 10px;line-height:30px}.pagination li:hover:not(.disabled){background-color:var(--primary-color-hover-opaque)}.pagination li.active a{color:var(--font-on-primary-color-main)}.pagination li.active,.pagination li.active:hover{background-color:var(--primary-color)}.pagination li.disabled a{cursor:default;color:var(--font-color-disabled)}.pagination li i{font-size:2rem}.pagination li.pages ul li{display:inline-block;float:none}@media only screen and (max-width : 992.99px){.pagination{width:100%}.pagination li.prev,.pagination li.next{width:10%}.pagination li.pages{width:80%;overflow:hidden;white-space:nowrap}}.breadcrumb{display:inline-block;font-size:18px;color:var(--font-on-primary-color-medium)}.breadcrumb i,.breadcrumb [class^=mdi-],.breadcrumb [class*=mdi-],.breadcrumb i.material-icons{display:block;float:left;font-size:24px}.breadcrumb:before{content:"";color:var(--font-on-primary-color-medium);vertical-align:top;display:inline-block;font-family:"Material Icons";font-weight:normal;font-style:normal;font-size:25px;margin:0 10px 0 8px;-webkit-font-smoothing:antialiased;float:left}.breadcrumb:first-child:before{display:none}.breadcrumb:last-child{color:var(--font-on-primary-color-main)}.parallax-container{position:relative;overflow:hidden;height:500px}.parallax-container .parallax{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1}.parallax-container .parallax img{opacity:0;position:absolute;left:50%;bottom:0;min-width:100%;min-height:100%;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transform:translateX(-50%);transform:translateX(-50%)}.pin-top,.pin-bottom{position:relative}.pinned{position:fixed !important}ul.staggered-list li{opacity:0}.fade-in{opacity:0;-webkit-transform-origin:0 50%;transform-origin:0 50%}@media only screen and (max-width : 600.99px){.hide-on-small-only,.tabs-wrapper,.hide-on-small-and-down{display:none !important}}@media only screen and (max-width : 992.99px){.hide-on-med-and-down{display:none !important}}@media only screen and (min-width : 601px){.hide-on-med-and-up{display:none !important}}@media only screen and (min-width: 601px)and (max-width: 992.99px){.hide-on-med-only{display:none !important}}@media only screen and (min-width : 993px){.hide-on-large-only{display:none !important}}@media only screen and (min-width : 1201px){.hide-on-extra-large-only{display:none !important}}@media only screen and (min-width : 1201px){.show-on-extra-large{display:block !important}}@media only screen and (min-width : 993px){.show-on-large{display:block !important}}@media only screen and (min-width: 601px)and (max-width: 992.99px){.show-on-medium{display:block !important}}@media only screen and (max-width : 600.99px){.show-on-small{display:block !important}}@media only screen and (min-width : 601px){.show-on-medium-and-up{display:block !important}}@media only screen and (max-width : 992.99px){.show-on-medium-and-down{display:block !important}}@media only screen and (max-width : 600.99px){.center-on-small-only{text-align:center}}.page-footer{padding-top:20px;color:var(--font-on-primary-color-main);background-color:var(--primary-color)}.page-footer a{color:var(--font-on-primary-color-main)}.page-footer .footer-copyright,.page-footer .footer-copyright a{overflow:hidden;min-height:50px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:10px 0px;color:var(--font-on-primary-color-dark-medium);background-color:var(--primary-color-dark)}table,th,td{border:none}table{width:100%;display:table;border-collapse:collapse;border-spacing:0}table.striped tr{border-bottom:none}table.striped tbody>tr:nth-child(odd){background-color:var(--background-color-slight-emphasis)}table.highlight>tbody>tr{-webkit-transition:background-color .25s ease;transition:background-color .25s ease}table.highlight>tbody>tr:hover{background-color:var(--hover-color)}table thead{color:var(--font-color-medium)}table.centered thead tr th,table.centered tbody tr td{text-align:center}tr{border-bottom:1px solid var(--separator-color)}td,th{padding:15px 5px;display:table-cell;text-align:left;vertical-align:middle;border-radius:0}@media only screen and (max-width : 992.99px){table.responsive-table{width:100%;border-collapse:collapse;border-spacing:0;display:block;position:relative}table.responsive-table td:empty:before{content:" "}table.responsive-table th,table.responsive-table td{margin:0;vertical-align:top}table.responsive-table th{text-align:left}table.responsive-table thead{display:block;float:left}table.responsive-table thead tr{display:block;padding:0 10px 0 0}table.responsive-table thead tr th::before{content:" "}table.responsive-table tbody{display:block;width:auto;position:relative;overflow-x:auto;white-space:nowrap}table.responsive-table tbody tr{display:inline-block;vertical-align:top}table.responsive-table th{display:block;text-align:right}table.responsive-table td{display:block;min-height:1.25em;text-align:left}table.responsive-table tr{border-bottom:none;padding:0 10px}table.responsive-table thead{border:0;border-right:1px solid var(--separator-color)}}.video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden}.video-container iframe,.video-container object,.video-container embed{position:absolute;top:0;left:0;width:100%;height:100%}.progress{position:relative;height:4px;display:block;width:100%;background-color:rgba(var(--primary-color-numeric), 40%);border-radius:2px;margin:.5rem 0 1rem 0;overflow:hidden}.progress .determinate{position:absolute;top:0;left:0;bottom:0;background-color:var(--primary-color);-webkit-transition:width .3s linear;transition:width .3s linear}.progress .indeterminate{background-color:var(--primary-color)}.progress .indeterminate:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite}.progress .indeterminate:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;-webkit-animation-delay:1.15s;animation-delay:1.15s}@-webkit-keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}100%{left:100%;right:-90%}}@-webkit-keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}100%{left:107%;right:-8%}}.hide{display:none !important}.left-align{text-align:left}.right-align{text-align:right}.center,.center-align{text-align:center}.left{float:left !important}.right{float:right !important}.no-select,input[type=range],input[type=range]+.thumb{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.circle{border-radius:50%}.center-block{display:block;margin-left:auto;margin-right:auto}.truncate{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.no-padding{padding:0 !important}.collection{padding-left:0;list-style-type:none;margin:.5rem 0 1rem 0;border:1px solid var(--separator-color);border-radius:2px;overflow:hidden;position:relative}.collection .collection-item{background-color:rgba(0,0,0,0);line-height:1.5rem;padding:10px 20px;margin:0;border-bottom:1px solid var(--separator-color)}.collection .collection-item.avatar{min-height:84px;padding-left:72px;position:relative}.collection .collection-item.avatar:not(.circle-clipper)>.circle,.collection .collection-item.avatar :not(.circle-clipper)>.circle{position:absolute;width:42px;height:42px;overflow:hidden;left:15px;display:inline-block;vertical-align:middle}.collection .collection-item.avatar i.circle{font-size:18px;line-height:42px;color:#fff;background-color:var(--slider-track-color);text-align:center}.collection .collection-item.avatar .title{font-size:16px}.collection .collection-item.avatar p{margin:0}.collection .collection-item.avatar .secondary-content{position:absolute;top:16px;right:16px}.collection .collection-item:last-child{border-bottom:none}.collection .collection-item.active{background-color:var(--primary-color);color:var(--font-on-primary-color-main)}.collection .collection-item.active .secondary-content{color:var(--font-on-primary-color-main)}.collection a.collection-item{display:block;-webkit-transition:.25s;transition:.25s;color:var(--primary-color)}.collection a.collection-item:not(.active):hover{background-color:var(--hover-color)}.collection.with-header .collection-header{background-color:rgba(0,0,0,0);border-bottom:1px solid var(--separator-color);padding:10px 20px}.collection.with-header .collection-item{padding-left:30px}.collection.with-header .collection-item.avatar{padding-left:72px}.secondary-content{float:right;color:var(--primary-color)}.collapsible .collection{margin:0;border:none}span.badge{min-width:3rem;padding:0 6px;margin-left:14px;text-align:center;font-size:1rem;line-height:22px;height:22px;color:var(--font-color-medium);float:right;-webkit-box-sizing:border-box;box-sizing:border-box}span.badge.new{font-weight:300;font-size:.8rem;color:var(--font-on-primary-color-main);background-color:var(--primary-color);border-radius:2px}span.badge.new:after{content:" new"}span.badge[data-badge-caption]::after{content:" " attr(data-badge-caption)}.active span.badge{color:var(--font-on-primary-color-main)}nav ul a span.badge{display:inline-block;float:none;margin-left:4px;line-height:22px;height:22px;-webkit-font-smoothing:auto}.collection-item span.badge{margin-top:calc(0.75rem - 11px)}.collapsible span.badge{margin-left:auto}.collapsible .active span.badge:not(.new){color:var(--font-color-medium)}.sidenav span.badge{margin-top:calc(24px - 11px)}table span.badge{display:inline-block;float:none;margin-left:auto}.material-icons{text-rendering:optimizeLegibility;-webkit-font-feature-settings:"liga";-moz-font-feature-settings:"liga";font-feature-settings:"liga"}.container{margin:0 auto;max-width:1280px;width:90%}@media only screen and (min-width : 601px){.container{width:85%}}@media only screen and (min-width : 993px){.container{width:70%}}.section{padding-top:1rem;padding-bottom:1rem}.row{display:grid;grid-template-columns:repeat(12, 1fr)}.row .s1{grid-column:auto/span 1}.row .s2{grid-column:auto/span 2}.row .s3{grid-column:auto/span 3}.row .s4{grid-column:auto/span 4}.row .s5{grid-column:auto/span 5}.row .s6{grid-column:auto/span 6}.row .s7{grid-column:auto/span 7}.row .s8{grid-column:auto/span 8}.row .s9{grid-column:auto/span 9}.row .s10{grid-column:auto/span 10}.row .s11{grid-column:auto/span 11}.row .s12{grid-column:auto/span 12}.row .offset-s1{grid-column-start:2}.row .offset-s2{grid-column-start:3}.row .offset-s3{grid-column-start:4}.row .offset-s4{grid-column-start:5}.row .offset-s5{grid-column-start:6}.row .offset-s6{grid-column-start:7}.row .offset-s7{grid-column-start:8}.row .offset-s8{grid-column-start:9}.row .offset-s9{grid-column-start:10}.row .offset-s10{grid-column-start:11}.row .offset-s11{grid-column-start:12}@media only screen and (min-width : 601px){.row .m1{grid-column:auto/span 1}.row .m2{grid-column:auto/span 2}.row .m3{grid-column:auto/span 3}.row .m4{grid-column:auto/span 4}.row .m5{grid-column:auto/span 5}.row .m6{grid-column:auto/span 6}.row .m7{grid-column:auto/span 7}.row .m8{grid-column:auto/span 8}.row .m9{grid-column:auto/span 9}.row .m10{grid-column:auto/span 10}.row .m11{grid-column:auto/span 11}.row .m12{grid-column:auto/span 12}.row .offset-m1{grid-column-start:2}.row .offset-m2{grid-column-start:3}.row .offset-m3{grid-column-start:4}.row .offset-m4{grid-column-start:5}.row .offset-m5{grid-column-start:6}.row .offset-m6{grid-column-start:7}.row .offset-m7{grid-column-start:8}.row .offset-m8{grid-column-start:9}.row .offset-m9{grid-column-start:10}.row .offset-m10{grid-column-start:11}.row .offset-m11{grid-column-start:12}}@media only screen and (min-width : 993px){.row .l1{grid-column:auto/span 1}.row .l2{grid-column:auto/span 2}.row .l3{grid-column:auto/span 3}.row .l4{grid-column:auto/span 4}.row .l5{grid-column:auto/span 5}.row .l6{grid-column:auto/span 6}.row .l7{grid-column:auto/span 7}.row .l8{grid-column:auto/span 8}.row .l9{grid-column:auto/span 9}.row .l10{grid-column:auto/span 10}.row .l11{grid-column:auto/span 11}.row .l12{grid-column:auto/span 12}.row .offset-l1{grid-column-start:2}.row .offset-l2{grid-column-start:3}.row .offset-l3{grid-column-start:4}.row .offset-l4{grid-column-start:5}.row .offset-l5{grid-column-start:6}.row .offset-l6{grid-column-start:7}.row .offset-l7{grid-column-start:8}.row .offset-l8{grid-column-start:9}.row .offset-l9{grid-column-start:10}.row .offset-l10{grid-column-start:11}.row .offset-l11{grid-column-start:12}}@media only screen and (min-width : 1201px){.row .xl1{grid-column:auto/span 1}.row .xl2{grid-column:auto/span 2}.row .xl3{grid-column:auto/span 3}.row .xl4{grid-column:auto/span 4}.row .xl5{grid-column:auto/span 5}.row .xl6{grid-column:auto/span 6}.row .xl7{grid-column:auto/span 7}.row .xl8{grid-column:auto/span 8}.row .xl9{grid-column:auto/span 9}.row .xl10{grid-column:auto/span 10}.row .xl11{grid-column:auto/span 11}.row .xl12{grid-column:auto/span 12}.row .offset-xl1{grid-column-start:2}.row .offset-xl2{grid-column-start:3}.row .offset-xl3{grid-column-start:4}.row .offset-xl4{grid-column-start:5}.row .offset-xl5{grid-column-start:6}.row .offset-xl6{grid-column-start:7}.row .offset-xl7{grid-column-start:8}.row .offset-xl8{grid-column-start:9}.row .offset-xl9{grid-column-start:10}.row .offset-xl10{grid-column-start:11}.row .offset-xl11{grid-column-start:12}}nav{color:var(--font-on-primary-color-main);background-color:var(--primary-color);width:100%;height:56px;line-height:56px}nav.nav-extended{height:auto}nav.nav-extended .nav-wrapper{min-height:56px;height:auto}nav.nav-extended .nav-content{position:relative;line-height:normal}nav a{color:var(--font-on-primary-color-main)}nav i,nav [class^=mdi-],nav [class*=mdi-],nav i.material-icons{display:block;font-size:24px;height:56px;line-height:56px}nav .nav-wrapper{position:relative;height:100%}@media only screen and (min-width : 993px){nav a.sidenav-trigger{display:none}}nav .sidenav-trigger{float:left;position:relative;z-index:1;height:56px;margin:0 18px}nav .sidenav-trigger i{height:56px;line-height:56px}nav .brand-logo{position:absolute;color:var(--font-on-primary-color-main);display:inline-block;font-size:2.1rem;padding:0}nav .brand-logo.center{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media only screen and (max-width : 992.99px){nav .brand-logo{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}nav .brand-logo.left,nav .brand-logo.right{padding:0;-webkit-transform:none;transform:none}nav .brand-logo.left{left:.5rem}nav .brand-logo.right{right:.5rem;left:auto}}nav .brand-logo.right{right:.5rem;padding:0}nav .brand-logo i,nav .brand-logo [class^=mdi-],nav .brand-logo [class*=mdi-],nav .brand-logo i.material-icons{float:left;margin-right:15px}nav .nav-title{display:inline-block;font-size:32px;padding:28px 0}nav ul:not(.dropdown-content){list-style-type:none;margin:0}nav ul:not(.dropdown-content) li{-webkit-transition:background-color .3s;transition:background-color .3s;float:left;padding:0}nav ul:not(.dropdown-content) a{-webkit-transition:background-color .3s;transition:background-color .3s;font-size:1rem;color:var(--font-on-primary-color-main);display:block;padding:0 15px;cursor:pointer}nav ul:not(.dropdown-content) a.active{background-color:var(--primary-color-raised-focus-solid)}nav ul:not(.dropdown-content) a:hover:not(.active){background-color:var(--primary-color-raised-hover-solid)}nav ul:not(.dropdown-content) a.btn,nav ul:not(.dropdown-content) a.btn-small,nav ul:not(.dropdown-content) a.btn-large,nav ul:not(.dropdown-content) a.btn-flat,nav ul:not(.dropdown-content) a.btn-floating{margin-top:-2px;margin-left:15px;margin-right:15px;display:inline-block}nav ul:not(.dropdown-content) a.btn>.material-icons,nav ul:not(.dropdown-content) a.btn-small>.material-icons,nav ul:not(.dropdown-content) a.btn-large>.material-icons,nav ul:not(.dropdown-content) a.btn-flat>.material-icons,nav ul:not(.dropdown-content) a.btn-floating>.material-icons{height:inherit;line-height:inherit}nav ul:not(.dropdown-content).left{float:left}nav form{height:100%}nav .input-field{margin:0;height:100%}nav .input-field input[type=search]{height:100%;font-size:1.2rem;border:none;padding-left:2rem;color:#888}nav .input-field input[type=search]:focus,nav .input-field input[type=search][type=text]:valid,nav .input-field input[type=search][type=password]:valid,nav .input-field input[type=search][type=email]:valid,nav .input-field input[type=search][type=url]:valid,nav .input-field input[type=search][type=date]:valid{border:none;-webkit-box-shadow:none;box-shadow:none}nav .input-field label{top:0;left:0}nav .input-field label i{color:var(--font-on-primary-color-medium);-webkit-transition:color .3s;transition:color .3s}nav .input-field label.active i{color:var(--font-on-primary-color-main)}.navbar-fixed{position:relative;height:56px;z-index:997}.navbar-fixed nav{position:fixed;right:0}@media only screen and (min-width : 601px){nav.nav-extended .nav-wrapper{min-height:64px}nav,nav .nav-wrapper i,nav a.sidenav-trigger,nav a.sidenav-trigger i{height:64px;line-height:64px}.navbar-fixed{height:64px}}a{text-decoration:none}html{line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:normal;color:var(--font-color-main)}@media only screen and (min-width: 0){html{font-size:14px}}@media only screen and (min-width: 993px){html{font-size:14.5px}}@media only screen and (min-width: 1201px){html{font-size:15px}}h1,h2,h3,h4,h5,h6{font-weight:400;line-height:1.3}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{font-weight:inherit}h1{font-size:4.2rem;line-height:110%;margin:2.8rem 0 1.68rem 0}h2{font-size:3.56rem;line-height:110%;margin:2.3733333333rem 0 1.424rem 0}h3{font-size:2.92rem;line-height:110%;margin:1.9466666667rem 0 1.168rem 0}h4{font-size:2.28rem;line-height:110%;margin:1.52rem 0 .912rem 0}h5{font-size:1.64rem;line-height:110%;margin:1.0933333333rem 0 .656rem 0}h6{font-size:1.15rem;line-height:110%;margin:.7666666667rem 0 .46rem 0}em{font-style:italic}strong{font-weight:500}small{font-size:75%}.light{font-weight:300}.thin{font-weight:200}@media only screen and (min-width: 360px){.flow-text{font-size:1.2rem}}@media only screen and (min-width: 390px){.flow-text{font-size:1.224rem}}@media only screen and (min-width: 420px){.flow-text{font-size:1.248rem}}@media only screen and (min-width: 450px){.flow-text{font-size:1.272rem}}@media only screen and (min-width: 480px){.flow-text{font-size:1.296rem}}@media only screen and (min-width: 510px){.flow-text{font-size:1.32rem}}@media only screen and (min-width: 540px){.flow-text{font-size:1.344rem}}@media only screen and (min-width: 570px){.flow-text{font-size:1.368rem}}@media only screen and (min-width: 600px){.flow-text{font-size:1.392rem}}@media only screen and (min-width: 630px){.flow-text{font-size:1.416rem}}@media only screen and (min-width: 660px){.flow-text{font-size:1.44rem}}@media only screen and (min-width: 690px){.flow-text{font-size:1.464rem}}@media only screen and (min-width: 720px){.flow-text{font-size:1.488rem}}@media only screen and (min-width: 750px){.flow-text{font-size:1.512rem}}@media only screen and (min-width: 780px){.flow-text{font-size:1.536rem}}@media only screen and (min-width: 810px){.flow-text{font-size:1.56rem}}@media only screen and (min-width: 840px){.flow-text{font-size:1.584rem}}@media only screen and (min-width: 870px){.flow-text{font-size:1.608rem}}@media only screen and (min-width: 900px){.flow-text{font-size:1.632rem}}@media only screen and (min-width: 930px){.flow-text{font-size:1.656rem}}@media only screen and (min-width: 960px){.flow-text{font-size:1.68rem}}@media only screen and (max-width: 360px){.flow-text{font-size:1.2rem}}.scale-transition{-webkit-transition:-webkit-transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important;transition:-webkit-transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important;transition:transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important;transition:transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63), -webkit-transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important}.scale-transition.scale-out{-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform .2s !important;transition:-webkit-transform .2s !important;transition:transform .2s !important;transition:transform .2s, -webkit-transform .2s !important}.scale-transition.scale-in{-webkit-transform:scale(1);transform:scale(1)}.card-panel{-webkit-transition:-webkit-box-shadow .25s;transition:-webkit-box-shadow .25s;transition:box-shadow .25s;transition:box-shadow .25s, -webkit-box-shadow .25s;padding:24px;margin:.5rem 0 1rem 0;border-radius:12px;background-color:var(--background-color-card)}.card{position:relative;background-color:var(--background-color-card);-webkit-transition:-webkit-box-shadow .25s;transition:-webkit-box-shadow .25s;transition:box-shadow .25s;transition:box-shadow .25s, -webkit-box-shadow .25s;border-radius:12px}.card .card-title{font-size:24px;font-weight:300}.card .card-title.activator{cursor:pointer}.card.small,.card.medium,.card.large{position:relative}.card.small .card-image,.card.medium .card-image,.card.large .card-image{max-height:60%;overflow:hidden}.card.small .card-image+.card-content,.card.medium .card-image+.card-content,.card.large .card-image+.card-content{max-height:40%}.card.small .card-content,.card.medium .card-content,.card.large .card-content{max-height:100%;overflow:hidden}.card.small .card-action,.card.medium .card-action,.card.large .card-action{position:absolute;bottom:0;left:0;right:0}.card.small{height:300px}.card.medium{height:400px}.card.large{height:500px}.card.horizontal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.card.horizontal.small .card-image,.card.horizontal.medium .card-image,.card.horizontal.large .card-image{height:100%;max-height:none;overflow:visible}.card.horizontal.small .card-image img,.card.horizontal.medium .card-image img,.card.horizontal.large .card-image img{height:100%}.card.horizontal .card-image{max-width:50%}.card.horizontal .card-image img{border-radius:2px 0 0 2px;max-width:100%;width:auto}.card.horizontal .card-stacked{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;position:relative}.card.horizontal .card-stacked .card-content{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.card.sticky-action .card-action{z-index:2}.card.sticky-action .card-reveal{z-index:1;padding-bottom:64px}.card .card-image{position:relative}.card .card-image img{display:block;border-radius:2px 2px 0 0;position:relative;left:0;right:0;top:0;bottom:0;width:100%}.card .card-image .card-title{color:var(--background-color-card);position:absolute;bottom:0;left:0;max-width:100%;padding:24px}.card .card-content{padding:24px;border-radius:0 0 2px 2px}.card .card-content p{margin:0}.card .card-content .card-title{display:block;line-height:32px;margin-bottom:8px}.card .card-content .card-title i{line-height:32px}.card .card-action{border-top:1px solid var(--separator-color);position:relative;background-color:inherit}.card .card-action:last-child{border-radius:0 0 2px 2px}.card .card-action a{padding:16px 24px;display:inline-block}.card .card-action a:not(.btn):not(.btn-small):not(.btn-large):not(.btn-large):not(.btn-floating){color:var(--primary-color);-webkit-transition:color .3s ease;transition:color .3s ease}.card .card-action a:not(.btn):not(.btn-small):not(.btn-large):not(.btn-large):not(.btn-floating):hover{background-color:var(--primary-color-hover-opaque)}.card .card-reveal{padding:24px;position:absolute;background-color:var(--background-color-card);width:100%;overflow-y:auto;left:0;top:100%;height:100%;z-index:3;display:none}.card .card-reveal .card-title{cursor:pointer;display:block}#toast-container{display:block;position:fixed;z-index:10000}@media only screen and (max-width : 600.99px){#toast-container{min-width:100%;bottom:0%}}@media only screen and (min-width : 601px)and (max-width : 992.99px){#toast-container{left:5%;bottom:7%;max-width:90%}}@media only screen and (min-width : 993px){#toast-container{top:10%;right:7%;max-width:86%}}.toast{border-radius:2px;top:35px;width:auto;margin-top:10px;position:relative;max-width:100%;height:auto;min-height:48px;line-height:1.5em;background-color:var(--tooltip-background-color);padding:10px 25px;font-size:1rem;font-weight:400;color:var(--tooltip-font-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;cursor:default}.toast .toast-action{color:#eeff41;font-weight:500;margin-right:-25px;margin-left:3rem}.toast.rounded{border-radius:24px}@media only screen and (max-width : 600.99px){.toast{width:100%;border-radius:0}}.tabs{padding-left:0;list-style-type:none;position:relative;overflow-x:auto;overflow-y:hidden;height:48px;width:100%;background-color:var(--surface-color);margin:0 auto;white-space:nowrap}.tabs.tabs-transparent{background-color:rgba(0,0,0,0)}.tabs.tabs-transparent .tab a{color:var(--font-on-primary-color-medium)}.tabs.tabs-transparent .tab.disabled a,.tabs.tabs-transparent .tab.disabled a:hover,.tabs.tabs-transparent .tab.disabled a:focus{color:var(--font-on-primary-color-disabled)}.tabs.tabs-transparent .tab a:hover{background-color:var(--hover-color)}.tabs.tabs-transparent .tab a.active,.tabs.tabs-transparent .tab a:focus{background-color:rgba(0,0,0,0)}.tabs.tabs-transparent .tab a:hover,.tabs.tabs-transparent .tab a.active,.tabs.tabs-transparent .tab a:focus{color:var(--font-on-primary-color-main)}.tabs.tabs-transparent .indicator{background-color:var(--font-on-primary-color-main)}.tabs.tabs-fixed-width{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tabs.tabs-fixed-width .tab{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.tabs .tab{padding-left:0;list-style-type:none;display:inline-block;text-align:center;line-height:48px;height:48px;padding:0;margin:0}.tabs .tab a{color:var(--font-color-medium);display:block;width:100%;height:100%;padding:0 24px;font-size:14px;text-overflow:ellipsis;overflow:hidden;-webkit-transition:color .28s ease,background-color .28s ease;transition:color .28s ease,background-color .28s ease}.tabs .tab a.active{background-color:rgba(0,0,0,0)}.tabs .tab a.active,.tabs .tab a:focus,.tabs .tab a:hover{color:var(--primary-color)}.tabs .tab a:hover{background-color:var(--primary-color-hover-opaque)}.tabs .tab a:focus,.tabs .tab a.active{background-color:var(--primary-color-focus-opaque);outline:none}.tabs .tab.disabled a,.tabs .tab.disabled a:hover{color:var(--font-color-disabled);cursor:default;background-color:rgba(0,0,0,0)}.tabs .tab.disabled a:not(:focus),.tabs .tab.disabled a:hover:not(:focus){background-color:rgba(0,0,0,0)}.tabs .indicator{position:absolute;bottom:0;height:2px;background-color:var(--primary-color);will-change:left,right}@media only screen and (max-width : 992.99px){.tabs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tabs .tab{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}.tabs .tab a{padding:0 12px}}.material-tooltip{padding:10px 8px;font-size:1rem;z-index:2000;border-radius:2px;color:var(--tooltip-font-color);min-height:36px;line-height:120%;opacity:0;position:absolute;text-align:center;max-width:calc(100% - 4px);overflow:hidden;left:0;top:0;pointer-events:none;visibility:hidden;background-color:var(--tooltip-background-color)}.backdrop{position:absolute;opacity:0;height:7px;width:14px;border-radius:0 0 50% 50%;background-color:var(--tooltip-background-color);z-index:-1;-webkit-transform-origin:50% 0;transform-origin:50% 0;visibility:hidden}.btn,.btn-small,.btn-large,.btn-flat{font-weight:500;border:none;border-radius:4px;display:inline-block;height:40px;line-height:40px;padding:0 16px;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.btn.disabled,.btn-floating.disabled,.btn-large.disabled,.btn-small.disabled,.btn-flat.disabled,.btn:disabled,.btn-floating:disabled,.btn-large:disabled,.btn-small:disabled,.btn-flat:disabled,.btn[disabled],.btn-floating[disabled],.btn-large[disabled],.btn-small[disabled],.btn-flat[disabled]{pointer-events:none;background-color:var(--background-color-disabled) !important;-webkit-box-shadow:none;box-shadow:none;color:var(--font-color-disabled) !important;cursor:default}.btn.disabled:hover,.btn-floating.disabled:hover,.btn-large.disabled:hover,.btn-small.disabled:hover,.btn-flat.disabled:hover,.btn:disabled:hover,.btn-floating:disabled:hover,.btn-large:disabled:hover,.btn-small:disabled:hover,.btn-flat:disabled:hover,.btn[disabled]:hover,.btn-floating[disabled]:hover,.btn-large[disabled]:hover,.btn-small[disabled]:hover,.btn-flat[disabled]:hover{background-color:var(--background-color-disabled) !important;color:var(--font-color-disabled) !important}.btn,.btn-small,.btn-large,.btn-floating,.btn-flat{font-size:14px;outline:0}.btn i,.btn-floating i,.btn-large i,.btn-small i,.btn-flat i{font-size:1.3rem;line-height:inherit}.btn,.btn-small,.btn-large{text-decoration:none;color:var(--font-on-primary-color-main);background-color:var(--primary-color);text-align:center;letter-spacing:.5px;-webkit-transition:background-color .2s ease-out;transition:background-color .2s ease-out;cursor:pointer}.btn:hover,.btn-small:hover,.btn-large:hover{background-color:var(--primary-color-raised-hover-solid)}.btn:focus,.btn-small:focus,.btn-large:focus{background-color:var(--primary-color-raised-focus-solid)}.btn-floating{display:inline-block;color:var(--font-on-secondary-color-main);position:relative;overflow:hidden;z-index:1;width:40px;height:40px;line-height:40px;padding:0;background-color:var(--secondary-color);border-radius:50%;-webkit-transition:background-color .3s;transition:background-color .3s;cursor:pointer;vertical-align:middle}.btn-floating:hover{background-color:var(--secondary-color-hover-solid)}.btn-floating:focus{background-color:var(--secondary-color-focus-solid)}.btn-floating:before{border-radius:0}.btn-floating.btn-large{width:56px;height:56px;padding:0}.btn-floating.btn-large.halfway-fab{bottom:-28px}.btn-floating.btn-large i{line-height:56px}.btn-floating.btn-small{width:30px;height:30px}.btn-floating.btn-small.halfway-fab{bottom:-15px}.btn-floating.btn-small i{line-height:30px}.btn-floating.halfway-fab{position:absolute;right:24px;bottom:-20px}.btn-floating.halfway-fab.left{right:auto;left:24px}.btn-floating i{width:inherit;display:inline-block;text-align:center;color:var(--font-on-secondary-color-main);font-size:1.6rem;line-height:40px}button.btn-floating{border:none}.fixed-action-btn{position:fixed;right:23px;bottom:23px;padding-top:15px;margin-bottom:0;z-index:997}.fixed-action-btn.active ul{visibility:visible;padding-left:0;list-style-type:none}.fixed-action-btn.direction-left,.fixed-action-btn.direction-right{padding:0 0 0 15px}.fixed-action-btn.direction-left ul,.fixed-action-btn.direction-right ul{text-align:right;right:64px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:100%;left:auto;width:500px}.fixed-action-btn.direction-left ul li,.fixed-action-btn.direction-right ul li{display:inline-block;margin:7.5px 15px 0 0}.fixed-action-btn.direction-right{padding:0 15px 0 0}.fixed-action-btn.direction-right ul{text-align:left;direction:rtl;left:64px;right:auto}.fixed-action-btn.direction-right ul li{margin:7.5px 0 0 15px}.fixed-action-btn.direction-bottom{padding:0 0 15px 0}.fixed-action-btn.direction-bottom ul{top:64px;bottom:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.fixed-action-btn.direction-bottom ul li{margin:15px 0 0 0}.fixed-action-btn.toolbar{padding:0;height:56px}.fixed-action-btn.toolbar.active>a i{opacity:0}.fixed-action-btn.toolbar ul{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;top:0;bottom:0;z-index:1}.fixed-action-btn.toolbar ul li{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:inline-block;margin:0;height:100%;-webkit-transition:none;transition:none}.fixed-action-btn.toolbar ul li a{display:block;overflow:hidden;position:relative;width:100%;height:100%;background-color:rgba(0,0,0,0);-webkit-box-shadow:none;box-shadow:none;color:var(--font-on-secondary-color-main);line-height:56px;z-index:1}.fixed-action-btn.toolbar ul li a i{line-height:inherit}.fixed-action-btn ul{left:0;right:0;text-align:center;position:absolute;bottom:64px;margin:0;visibility:hidden}.fixed-action-btn ul li{margin-bottom:15px}.fixed-action-btn ul a.btn-floating{opacity:0}.fixed-action-btn .fab-backdrop{position:absolute;top:0;left:0;z-index:-1;width:40px;height:40px;background-color:var(--secondary-color);border-radius:50%;-webkit-transform:scale(0);transform:scale(0)}.btn-flat{-webkit-box-shadow:none;box-shadow:none;background-color:rgba(0,0,0,0);color:var(--font-color-medium);cursor:pointer;-webkit-transition:background-color .2s;transition:background-color .2s}.btn-flat:focus,.btn-flat:hover{-webkit-box-shadow:none;box-shadow:none;background-color:var(--hover-color)}.btn-flat:focus{background-color:var(--focus-color)}.btn-flat.disabled,.btn-flat.btn-flat[disabled]{background-color:rgba(0,0,0,0) !important;color:var(--font-color-disabled) !important;cursor:default}.btn-large{height:60px;line-height:60px;font-size:18px;padding:0 28px}.btn-large i{font-size:1.6rem}.btn-small{height:30px;line-height:30px;font-size:13px}.btn-small i{font-size:1.2rem}.btn-block{display:block}.dropdown-content{padding-left:0;list-style-type:none;background-color:var(--surface-color);margin:0;display:none;min-width:100px;overflow-y:auto;opacity:0;position:absolute;left:0;top:0;z-index:9999;-webkit-transform-origin:0 0;transform-origin:0 0}.dropdown-content:focus{outline:0}.dropdown-content li{clear:both;color:var(--font-color-main);cursor:pointer;min-height:50px;line-height:1.5rem;width:100%;text-align:left}.dropdown-content li:hover,.dropdown-content li.active{background-color:var(--hover-color)}.dropdown-content li:focus{outline:none}.dropdown-content li.divider{min-height:0;height:1px}.dropdown-content li>a,.dropdown-content li>span{font-size:16px;color:var(--primary-color);display:block;line-height:22px;padding:14px 16px}.dropdown-content li>span>label{top:1px;left:0;height:18px}.dropdown-content li>a>i{height:inherit;line-height:inherit;float:left;margin:0 24px 0 0;width:24px}body.keyboard-focused .dropdown-content li:focus{background-color:var(--focus-color)}.input-field.col .dropdown-content [type=checkbox]+label{top:1px;left:0;height:18px;-webkit-transform:none;transform:none}.dropdown-trigger{cursor:pointer}.modal{display:none;position:fixed;left:0;right:0;background-color:var(--background-color-level-16dp-solid);padding:0;max-height:70%;width:55%;margin:auto;overflow-y:auto;border-radius:2px;will-change:top,opacity}.modal:focus{outline:none}@media only screen and (max-width : 992.99px){.modal{width:80%}}.modal h1,.modal h2,.modal h3,.modal h4{margin-top:0}.modal .modal-content{padding:24px;overflow-y:hidden}.modal .modal-close{cursor:pointer}.modal .modal-footer{border-radius:0 0 2px 2px;background-color:var(--background-color-level-16dp-solid);padding:4px 6px;height:56px;width:100%;text-align:right}.modal .modal-footer .btn,.modal .modal-footer .btn-large,.modal .modal-footer .btn-small,.modal .modal-footer .btn-flat{margin:6px 0}.modal-overlay{position:fixed;z-index:999;top:-25%;left:0;bottom:0;right:0;height:125%;width:100%;background:#000;display:none;will-change:opacity}.modal.modal-fixed-footer{padding:0;height:70%}.modal.modal-fixed-footer .modal-content{position:absolute;height:calc(100% - 56px);max-height:100%;width:100%;overflow-y:auto}.modal.modal-fixed-footer .modal-footer{border-top:1px solid var(--separator-color);position:absolute;bottom:0}.modal.bottom-sheet{top:auto;bottom:-100%;margin:0;width:100%;max-height:45%;border-radius:0;will-change:bottom,opacity}.collapsible{padding-left:0;list-style-type:none;border-top:1px solid var(--separator-color);border-right:1px solid var(--separator-color);border-left:1px solid var(--separator-color);margin:.5rem 0 1rem 0}.collapsible-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);line-height:1.5;padding:1rem;border-bottom:1px solid var(--separator-color);background-color:var(--surface-color)}.collapsible-header:focus{outline:0}.collapsible-header i{width:2rem;font-size:1.6rem;display:inline-block;text-align:center;margin-right:1rem}.keyboard-focused .collapsible-header:focus{background-color:var(--focus-color)}.collapsible-body{display:none;border-bottom:1px solid var(--separator-color);-webkit-box-sizing:border-box;box-sizing:border-box;padding:2rem;background-color:var(--surface-color)}.sidenav .collapsible,.sidenav.sidenav-fixed .collapsible{border:none;-webkit-box-shadow:none;box-shadow:none}.sidenav .collapsible li,.sidenav.sidenav-fixed .collapsible li{padding:0}.sidenav>li:hover,.sidenav>li.active,.sidenav.sidenav-fixed>li:hover,.sidenav.sidenav-fixed>li.active{background-color:rgba(0,0,0,0)}.sidenav .collapsible-header,.sidenav.sidenav-fixed .collapsible-header{background-color:rgba(0,0,0,0);border:none;line-height:inherit;height:inherit;padding:0 16px}.sidenav .collapsible-header i,.sidenav.sidenav-fixed .collapsible-header i{line-height:inherit}.sidenav .collapsible-body,.sidenav.sidenav-fixed .collapsible-body{border:0;background-color:var(--surface-color)}.sidenav .collapsible-body li a,.sidenav.sidenav-fixed .collapsible-body li a{padding:0 23.5px 0 31px}.collapsible.popout{border:none;-webkit-box-shadow:none;box-shadow:none}.collapsible.popout>li{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);margin:0 24px;-webkit-transition:margin .35s cubic-bezier(0.25, 0.46, 0.45, 0.94);transition:margin .35s cubic-bezier(0.25, 0.46, 0.45, 0.94)}.collapsible.popout>li.active{-webkit-box-shadow:0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15);box-shadow:0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15);margin:16px 0}.chip{display:inline-block;height:32px;font-size:13px;font-weight:500;color:var(--font-color-medium);line-height:32px;padding:0 12px;border-radius:16px;background-color:var(--background-color-level-4dp);margin-bottom:5px;margin-right:5px}.chip:focus{outline:none;background-color:var(--primary-color);color:var(--font-on-primary-color-main)}.chip>img{float:left;margin:0 8px 0 -12px;height:32px;width:32px;border-radius:50%}.chip .close{cursor:pointer;float:right;font-size:16px;line-height:32px;padding-left:8px}.chips{border:none;border-bottom:1px solid var(--font-color-medium);-webkit-box-shadow:none;box-shadow:none;margin:0 0 8px 0;min-height:45px;outline:none;-webkit-transition:all .3s;transition:all .3s}.chips.focus{border-bottom:1px solid var(--primary-color);-webkit-box-shadow:0 1px 0 0 var(--primary-color);box-shadow:0 1px 0 0 var(--primary-color)}.chips:hover{cursor:text}.chips input:not([type]):not(.browser-default).input{background:none;border:0;color:var(--font-color-main);display:inline-block;font-size:16px;height:3rem;line-height:32px;outline:0;margin:0;padding:0;width:120px}.chips input:not([type]):not(.browser-default).input:focus{border:0;-webkit-box-shadow:none;box-shadow:none}.chips .autocomplete-content{margin-top:0;margin-bottom:0}.prefix~.chips{margin-left:3rem;width:92%;width:calc(100% - 3rem)}.suffix~.chips{margin-right:3rem;width:92%;width:calc(100% - 3rem)}.chips:empty~label{font-size:.8rem;-webkit-transform:translateY(-140%);transform:translateY(-140%)}.materialboxed{display:block;cursor:-webkit-zoom-in;cursor:zoom-in;position:relative;-webkit-transition:opacity .4s;transition:opacity .4s;-webkit-backface-visibility:hidden}.materialboxed:hover:not(.active){opacity:.8}.materialboxed.active{cursor:-webkit-zoom-out;cursor:zoom-out}#materialbox-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#292929;z-index:1000;will-change:opacity}.materialbox-caption{position:fixed;display:none;color:#fff;line-height:50px;bottom:0;left:0;width:100%;text-align:center;padding:0% 15%;height:50px;z-index:1000;-webkit-font-smoothing:antialiased}select:focus{outline:1px solid var(--primary-color-raised-focus-solid)}button:focus{outline:none;background-color:var(--primary-color-raised-focus-solid)}label{font-size:.8rem;color:var(--font-color-medium)}::-webkit-input-placeholder{color:var(--font-color-medium)}::-moz-placeholder{color:var(--font-color-medium)}::-ms-input-placeholder{color:var(--font-color-medium)}::placeholder{color:var(--font-color-medium)}input:not([type]):not(.browser-default),input[type=text]:not(.browser-default),input[type=password]:not(.browser-default),input[type=email]:not(.browser-default),input[type=url]:not(.browser-default),input[type=time]:not(.browser-default),input[type=date]:not(.browser-default),input[type=datetime]:not(.browser-default),input[type=datetime-local]:not(.browser-default),input[type=month]:not(.browser-default),input[type=tel]:not(.browser-default),input[type=number]:not(.browser-default),input[type=search]:not(.browser-default),textarea.materialize-textarea{outline:none;color:var(--font-color-main);width:100%;font-size:16px;height:56px}.input-field{position:relative;clear:both}.input-field input,.input-field textarea{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 16px;padding-top:20px;background-color:var(--surface-color);border:none;border-radius:4px;border-bottom:1px solid var(--font-color-medium);border-bottom-left-radius:0;border-bottom-right-radius:0}.input-field input:focus:not([readonly]),.input-field textarea:focus:not([readonly]){border-bottom:2px solid var(--primary-color);padding-top:21px}.input-field input:disabled,.input-field input[readonly=readonly],.input-field textarea:disabled,.input-field textarea[readonly=readonly]{color:rgba(var(--md_sys_color_on-surface), 0.38);border-color:rgba(var(--md_sys_color_on-surface), 0.12);background-color:rgba(var(--md_sys_color_on-surface), 0.04)}.input-field input:focus:not([readonly])+label,.input-field textarea:focus:not([readonly])+label{color:var(--primary-color)}.input-field input:focus:not([readonly])+label,.input-field input:not(:placeholder-shown)+label,.input-field textarea:focus:not([readonly])+label,.input-field textarea:not(:placeholder-shown)+label{-webkit-transform:scale(0.75);transform:scale(0.75);top:8px}.input-field input:disabled+label,.input-field input[readonly=readonly]+label,.input-field textarea:disabled+label,.input-field textarea[readonly=readonly]+label{color:rgba(var(--md_sys_color_on-surface), 0.38)}.input-field input::-webkit-input-placeholder{-webkit-user-select:none;user-select:none}.input-field input::-moz-placeholder{-moz-user-select:none;user-select:none}.input-field input::-ms-input-placeholder{-ms-user-select:none;user-select:none}.input-field input::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.input-field>label{color:var(--font-color-medium);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:16px;position:absolute;left:16px;top:16px;cursor:text;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transition:left .2s ease-out,top .2s ease-out,-webkit-transform .2s ease-out;transition:left .2s ease-out,top .2s ease-out,-webkit-transform .2s ease-out;transition:left .2s ease-out,top .2s ease-out,transform .2s ease-out;transition:left .2s ease-out,top .2s ease-out,transform .2s ease-out,-webkit-transform .2s ease-out}.input-field .supporting-text{color:var(--font-color-medium);font-size:12px;padding:0 16px;margin-top:4px}.input-field .character-counter{color:var(--font-color-medium);font-size:12px;float:right;padding:0 16px;margin-top:4px}.input-field .prefix{position:absolute;left:12px;top:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.input-field .suffix{position:absolute;right:12px;top:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.input-field .prefix~input,.input-field .prefix~textarea{padding-left:52px}.input-field .suffix~input,.input-field .suffix~textarea{padding-right:52px}.input-field .prefix~label{left:52px}.input-field.outlined input,.input-field.outlined textarea{padding-top:0;background-color:var(--background-color);border:1px solid var(--font-color-medium);border-radius:4px}.input-field.outlined input:focus:not([readonly]),.input-field.outlined textarea:focus:not([readonly]){border:2px solid var(--primary-color);padding-top:0;margin-left:-1px}.input-field.outlined input:focus:not([readonly])+label,.input-field.outlined textarea:focus:not([readonly])+label{color:var(--primary-color)}.input-field.outlined input:focus:not([readonly])+label,.input-field.outlined input:not(:placeholder-shown)+label,.input-field.outlined textarea:focus:not([readonly])+label,.input-field.outlined textarea:not(:placeholder-shown)+label{top:-8px;left:16px;margin-left:-4px;padding:0 4px;background-color:var(--background-color)}.input-field.outlined input:disabled,.input-field.outlined input[readonly=readonly],.input-field.outlined textarea:disabled,.input-field.outlined textarea[readonly=readonly]{color:rgba(var(--md_sys_color_on-surface), 0.38);border-color:rgba(var(--md_sys_color_on-surface), 0.12)}.input-field.error input,.input-field.error textarea{border-color:var(--error-color)}.input-field.error input:focus:not([readonly]),.input-field.error textarea:focus:not([readonly]){border-color:var(--error-color)}.input-field.error input:focus:not([readonly])+label,.input-field.error textarea:focus:not([readonly])+label{color:var(--error-color)}.input-field.error label{color:var(--error-color)}.input-field.error .supporting-text{color:var(--error-color)}.input-field.error .suffix{color:var(--error-color)}.searchbar .prefix{position:absolute;padding-left:1rem;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.searchbar>input{border-width:0;background-color:rgba(0,0,0,0);padding-left:3rem}.searchbar.has-sidebar{margin-left:0}@media only screen and (min-width : 993px){.searchbar.has-sidebar{margin-left:300px}}textarea{width:100%;height:3rem;background-color:rgba(0,0,0,0)}textarea.materialize-textarea{line-height:normal;overflow-y:hidden;padding:.8rem 0 .8rem 0;resize:none;min-height:3rem;-webkit-box-sizing:border-box;box-sizing:border-box}.hiddendiv{visibility:hidden;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:break-word;padding-top:1.2rem;position:absolute;top:0;z-index:-1}.autocomplete-content li .highlight{color:var(--font-color-main)}.autocomplete-content li img{height:40px;width:40px;margin:5px 15px}[type=radio]:not(:checked),[type=radio]:checked{position:absolute;opacity:0;pointer-events:none}[type=radio]:not(:checked)+span,[type=radio]:checked+span{position:relative;padding-left:35px;cursor:pointer;display:inline-block;height:25px;line-height:25px;font-size:1rem;-webkit-transition:.28s ease;transition:.28s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[type=radio]+span:before,[type=radio]+span:after{content:"";position:absolute;left:0;top:0;margin:4px;width:16px;height:16px;z-index:0;-webkit-transition:.28s ease;transition:.28s ease}[type=radio]:not(:checked)+span:before,[type=radio]:not(:checked)+span:after,[type=radio]:checked+span:before,[type=radio]:checked+span:after,[type=radio].with-gap:checked+span:before,[type=radio].with-gap:checked+span:after{border-radius:50%}[type=radio]:not(:checked)+span:before,[type=radio]:not(:checked)+span:after{border:2px solid var(--font-color-medium)}[type=radio]:not(:checked)+span:after{-webkit-transform:scale(0);transform:scale(0)}[type=radio]:checked+span:before{border:2px solid rgba(0,0,0,0)}[type=radio]:checked+span:after,[type=radio].with-gap:checked+span:before,[type=radio].with-gap:checked+span:after{border:2px solid var(--primary-color)}[type=radio]:checked+span:after,[type=radio].with-gap:checked+span:after{background-color:var(--primary-color)}[type=radio]:checked+span:after{-webkit-transform:scale(1.02);transform:scale(1.02)}[type=radio].with-gap:checked+span:after{-webkit-transform:scale(0.5);transform:scale(0.5)}[type=radio].tabbed:focus+span:before{-webkit-box-shadow:0 0 0 10px var(--primary-color-focus-opaque);box-shadow:0 0 0 10px var(--primary-color-focus-opaque)}[type=radio].with-gap:disabled:checked+span:before{border:2px solid var(--font-color-disabled)}[type=radio].with-gap:disabled:checked+span:after{border:none;background-color:var(--font-color-disabled)}[type=radio]:disabled:not(:checked)+span:before,[type=radio]:disabled:checked+span:before{background-color:rgba(0,0,0,0);border-color:var(--font-color-disabled)}[type=radio]:disabled+span{color:var(--font-color-disabled)}[type=radio]:disabled:not(:checked)+span:before{border-color:var(--font-color-disabled)}[type=radio]:disabled:checked+span:after{background-color:var(--font-color-disabled);border-color:var(--font-color-disabled)}[type=checkbox]:not(:checked),[type=checkbox]:checked{position:absolute;opacity:0;pointer-events:none}[type=checkbox]+span:not(.lever){position:relative;padding-left:35px;cursor:pointer;display:inline-block;height:25px;line-height:25px;font-size:1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[type=checkbox]+span:not(.lever):before,[type=checkbox]:not(.filled-in)+span:not(.lever):after{content:"";position:absolute;top:0;left:0;width:18px;height:18px;z-index:0;border:2px solid var(--font-color-medium);border-radius:1px;margin-top:3px;-webkit-transition:.2s;transition:.2s}[type=checkbox]:not(.filled-in)+span:not(.lever):after{border:0;-webkit-transform:scale(0);transform:scale(0)}[type=checkbox]:not(:checked):disabled+span:not(.lever):before{border:none;background-color:var(--font-color-disabled)}[type=checkbox].tabbed:focus+span:not(.lever):after{-webkit-transform:scale(1);transform:scale(1);border:0;border-radius:50%;-webkit-box-shadow:0 0 0 10px var(--focus-color);box-shadow:0 0 0 10px var(--focus-color);background-color:var(--focus-color)}[type=checkbox]:checked+span:not(.lever):before{top:-4px;left:-5px;width:12px;height:22px;border-top:2px solid rgba(0,0,0,0);border-left:2px solid rgba(0,0,0,0);border-right:2px solid var(--primary-color);border-bottom:2px solid var(--primary-color);-webkit-transform:rotate(40deg);transform:rotate(40deg);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=checkbox]:checked:disabled+span:before{border-right:2px solid var(--font-color-disabled);border-bottom:2px solid var(--font-color-disabled)}[type=checkbox]:indeterminate+span:not(.lever):before{top:-11px;left:-12px;width:10px;height:22px;border-top:none;border-left:none;border-right:2px solid var(--primary-color);border-bottom:none;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=checkbox]:indeterminate:disabled+span:not(.lever):before{border-right:2px solid var(--font-color-disabled);background-color:rgba(0,0,0,0)}[type=checkbox].filled-in+span:not(.lever):after{border-radius:2px}[type=checkbox].filled-in+span:not(.lever):before,[type=checkbox].filled-in+span:not(.lever):after{content:"";left:0;position:absolute;-webkit-transition:border .25s,background-color .25s,width .2s .1s,height .2s .1s,top .2s .1s,left .2s .1s;transition:border .25s,background-color .25s,width .2s .1s,height .2s .1s,top .2s .1s,left .2s .1s;z-index:1}[type=checkbox].filled-in:not(:checked)+span:not(.lever):before{width:0;height:0;border:3px solid rgba(0,0,0,0);left:6px;top:10px;-webkit-transform:rotateZ(37deg);transform:rotateZ(37deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=checkbox].filled-in:not(:checked)+span:not(.lever):after{height:20px;width:20px;background-color:rgba(0,0,0,0);border:2px solid var(--font-color-medium);top:0px;z-index:0}[type=checkbox].filled-in:checked+span:not(.lever):before{top:0;left:1px;width:8px;height:13px;border-top:2px solid rgba(0,0,0,0);border-left:2px solid rgba(0,0,0,0);border-right:2px solid var(--font-on-primary-color-main);border-bottom:2px solid var(--font-on-primary-color-main);-webkit-transform:rotateZ(37deg);transform:rotateZ(37deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%}[type=checkbox].filled-in:checked+span:not(.lever):after{top:0;width:20px;height:20px;border:2px solid var(--primary-color);background-color:var(--primary-color);z-index:0}[type=checkbox].filled-in.tabbed:focus+span:not(.lever):after{border-radius:2px;border-color:var(--font-color-medium);background-color:var(--focus-color)}[type=checkbox].filled-in.tabbed:checked:focus+span:not(.lever):after{border-radius:2px;background-color:var(--primary-color);border-color:var(--primary-color)}[type=checkbox].filled-in:disabled:not(:checked)+span:not(.lever):before{background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}[type=checkbox].filled-in:disabled:not(:checked)+span:not(.lever):after{border-color:rgba(0,0,0,0);background-color:var(--font-color-disabled)}[type=checkbox].filled-in:disabled:checked+span:not(.lever):before{background-color:rgba(0,0,0,0)}[type=checkbox].filled-in:disabled:checked+span:not(.lever):after{background-color:var(--font-color-disabled);border-color:var(--font-color-disabled)}.switch,.switch *{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switch label{cursor:pointer}.switch label input[type=checkbox]{opacity:0;width:0;height:0}.switch label input[type=checkbox]:checked+.lever{background-color:rgba(var(--primary-color-numeric), 0.32)}.switch label input[type=checkbox]:checked+.lever:before,.switch label input[type=checkbox]:checked+.lever:after{left:18px}.switch label input[type=checkbox]:checked+.lever:after{background-color:var(--primary-color)}.switch label .lever{content:"";display:inline-block;position:relative;width:36px;height:14px;background-color:var(--slider-track-color);border-radius:15px;margin-right:10px;-webkit-transition:background .3s ease;transition:background .3s ease;vertical-align:middle;margin:0 16px}.switch label .lever:before,.switch label .lever:after{content:"";position:absolute;display:inline-block;width:20px;height:20px;border-radius:50%;left:0;top:-3px;-webkit-transition:left .3s ease,background .3s ease,-webkit-box-shadow .1s ease,-webkit-transform .1s ease;transition:left .3s ease,background .3s ease,-webkit-box-shadow .1s ease,-webkit-transform .1s ease;transition:left .3s ease,background .3s ease,box-shadow .1s ease,transform .1s ease;transition:left .3s ease,background .3s ease,box-shadow .1s ease,transform .1s ease,-webkit-box-shadow .1s ease,-webkit-transform .1s ease}.switch label .lever:after{background-color:var(--switch-thumb-off-color);-webkit-box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);box-shadow:0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12)}input[type=checkbox]:not(:disabled)~.lever:active:before,input[type=checkbox]:not(:disabled).tabbed:focus~.lever::before,input[type=checkbox]:not(:disabled)~.lever:hover::before{-webkit-transform:scale(2.4);transform:scale(2.4)}input[type=checkbox]:checked:not(:disabled)~.lever:hover::before{background-color:var(--primary-color-hover-opaque)}input[type=checkbox]:checked:not(:disabled)~.lever:active::before,input[type=checkbox]:checked:not(:disabled).tabbed:focus~.lever::before{background-color:var(--primary-color-focus-opaque)}input[type=checkbox]:not(:disabled)~.lever:hover::before{background-color:var(--hover-color)}input[type=checkbox]:not(:disabled)~.lever:active:before,input[type=checkbox]:not(:disabled).tabbed:focus~.lever::before{background-color:var(--focus-color)}.switch input[type=checkbox][disabled]+.lever{cursor:default;opacity:.5}select.browser-default{opacity:1;color:var(--font-color-main)}select{opacity:0;background-color:var(--surface-color);width:100%;padding:5px;border:1px solid var(--separator-color);border-radius:2px;height:3rem}.select-wrapper{position:relative}.select-wrapper .caret{position:absolute;right:0;top:0;bottom:0;margin:auto 0;z-index:0;fill:var(--font-color-main)}.select-wrapper .hide-select{width:0;height:0;overflow:hidden;position:absolute;top:0;z-index:-1}select:disabled{color:var(--font-color-disabled)}.select-wrapper.disabled+label{color:var(--font-color-disabled)}.select-wrapper.disabled .caret{fill:var(--font-color-disabled)}.select-wrapper input.select-dropdown:disabled{color:var(--font-color-disabled);cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select-wrapper i{color:var(--font-color-disabled)}.select-dropdown li.disabled,.select-dropdown li.disabled>span,.select-dropdown li.optgroup{color:var(--font-color-disabled);background-color:rgba(0,0,0,0)}body.keyboard-focused .select-dropdown.dropdown-content li:focus{background-color:var(--focus-color)}.select-dropdown.dropdown-content li:hover:not(.disabled){background-color:var(--hover-color)}.select-dropdown.dropdown-content li.selected:not(.disabled){background-color:var(--focus-color)}.select-dropdown li img{height:40px;width:40px;margin:5px 15px;float:right}.select-dropdown li.optgroup{border-top:1px solid var(--hover-color)}.select-dropdown li.optgroup.selected>span{color:var(--font-color-main)}.select-dropdown li.optgroup>span{color:var(--font-color-medium)}.select-dropdown li.optgroup~li.optgroup-option{padding-left:1rem}.file-field{display:grid;grid-template-columns:-webkit-min-content auto;grid-template-columns:min-content auto;gap:10px}.file-field .file-path-wrapper{overflow:hidden}.file-field input.file-path{width:100%}.file-field .btn,.file-field .btn-large,.file-field .btn-small{height:3rem;line-height:3rem}.file-field span{cursor:pointer}.file-field input[type=file]{position:absolute;top:0;right:0;left:0;bottom:0;cursor:pointer;width:100%;margin:0;padding:0;opacity:0;font-size:20px;filter:alpha(opacity=0)}.file-field input[type=file]::-webkit-file-upload-button{display:none}.range-field{position:relative}input[type=range],input[type=range]+.thumb{cursor:pointer}input[type=range]{position:relative;background-color:rgba(0,0,0,0);border:none;outline:none;width:100%;margin:15px 0;padding:0}input[type=range]:focus{outline:none}input[type=range]+.thumb{position:absolute;top:10px;left:0;border:none;height:0;width:0;border-radius:50%;background-color:var(--primary-color);margin-left:7px;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}input[type=range]+.thumb .value{display:block;width:30px;text-align:center;color:var(--primary-color);font-size:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}input[type=range]+.thumb.active{border-radius:50% 50% 50% 0}input[type=range]+.thumb.active .value{color:var(--font-on-primary-color-main);margin-left:-1px;margin-top:8px;font-size:10px}input[type=range]{-webkit-appearance:none}input[type=range]::-webkit-slider-runnable-track{height:3px;background:var(--slider-track-color);border:none}input[type=range]::-webkit-slider-thumb{border:none;height:14px;width:14px;border-radius:50%;background:var(--primary-color);-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s, -webkit-box-shadow .3s;-webkit-appearance:none;background-color:var(--primary-color);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;margin:-5px 0 0 0}.keyboard-focused input[type=range]:focus:not(.active)::-webkit-slider-thumb{-webkit-box-shadow:0 0 0 10px var(--primary-color-focus-opaque);box-shadow:0 0 0 10px var(--primary-color-focus-opaque)}input[type=range]::-moz-range-track{height:3px;background:var(--slider-track-color);border:none}input[type=range]::-moz-focus-inner{border:0}input[type=range]::-moz-range-thumb{border:none;height:14px;width:14px;border-radius:50%;background:var(--primary-color);-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s, -webkit-box-shadow .3s;margin-top:-5px}input[type=range]:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}.keyboard-focused input[type=range]:focus:not(.active)::-moz-range-thumb{box-shadow:0 0 0 10px var(--primary-color-focus-opaque)}input[type=range]::-ms-track{height:3px;background:rgba(0,0,0,0);border-color:rgba(0,0,0,0);border-width:6px 0;color:rgba(0,0,0,0)}input[type=range]::-ms-fill-lower,input[type=range]::-moz-range-progress{background:var(--primary-color)}input[type=range]::-ms-fill-upper,input[type=range]::-moz-range-track{background:var(--slider-track-color)}input[type=range]::-ms-thumb{border:none;height:14px;width:14px;border-radius:50%;background:var(--primary-color);-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s, -webkit-box-shadow .3s}.keyboard-focused input[type=range]:focus:not(.active)::-ms-thumb{box-shadow:0 0 0 10px var(--primary-color-focus-opaque)}.table-of-contents.fixed{position:fixed}.table-of-contents li{padding:0}.table-of-contents a{display:inline-block;font-weight:400;color:var(--font-color-medium);padding-left:16px;height:2rem;line-height:2rem;border-left:1px solid var(--separator-color)}.table-of-contents a:hover{color:var(--font-color-main);padding-left:15px}.table-of-contents a.active{color:var(--primary-color);font-weight:500;padding-left:14px;border-left:2px solid var(--primary-color)}.sidenav{position:fixed;width:300px;left:0;top:0;margin:0;-webkit-transform:translateX(-100%);transform:translateX(-100%);height:100vh;padding-bottom:60px;background-color:var(--background-color-level-16dp-solid);z-index:999;overflow-y:auto;will-change:transform;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform:translateX(-105%);transform:translateX(-105%)}.sidenav.right-aligned{right:0;-webkit-transform:translateX(105%);transform:translateX(105%);left:auto;-webkit-transform:translateX(100%);transform:translateX(100%)}.sidenav .collapsible{margin:0}.sidenav li{float:none;line-height:48px}.sidenav li:hover{background-color:var(--hover-color)}.sidenav li.active{background-color:var(--focus-color)}.sidenav li>a{display:block;font-size:14px;font-weight:500;height:48px;line-height:48px;padding:0 32px}.sidenav li>a:not(.btn):not(.btn-large):not(.btn-small):not(.btn-flat):not(.btn-large):not(.btn-floating){color:var(--font-color-main)}.sidenav li>a.btn,.sidenav li>a.btn-small,.sidenav li>a.btn-large,.sidenav li>a.btn-flat,.sidenav li>a.btn-floating{margin:10px 15px}.sidenav li>a>i,.sidenav li>a>[class^=mdi-],.sidenav li>a li>a>[class*=mdi-],.sidenav li>a>i.material-icons{float:left;height:48px;line-height:48px;margin:0 32px 0 0;width:24px;color:var(--font-color-medium)}.sidenav .divider{margin:8px 0 0 0}.sidenav .subheader{cursor:initial;pointer-events:none;color:var(--font-color-medium);font-size:14px;font-weight:500;line-height:48px}.sidenav .subheader:hover{background-color:rgba(0,0,0,0)}.sidenav .user-view{position:relative;padding:32px 32px 0;margin-bottom:8px}.sidenav .user-view>a{height:auto;padding:0}.sidenav .user-view>a:hover{background-color:rgba(0,0,0,0)}.sidenav .user-view .background{overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.sidenav .user-view .circle,.sidenav .user-view .name,.sidenav .user-view .email{display:block}.sidenav .user-view .circle{height:64px;width:64px}.sidenav .user-view .name,.sidenav .user-view .email{font-size:14px;line-height:24px}.sidenav .user-view .name{margin-top:16px;font-weight:500}.sidenav .user-view .email{padding-bottom:16px;font-weight:400}.drag-target{height:100%;position:fixed;top:0;left:0;z-index:998}.drag-target.right-aligned{right:0}.sidenav.sidenav-fixed{left:0;-webkit-transform:translateX(0);transform:translateX(0);position:fixed}.sidenav.sidenav-fixed.right-aligned{right:0;left:auto}@media only screen and (max-width : 992.99px){.sidenav.sidenav-fixed{-webkit-transform:translateX(-105%);transform:translateX(-105%)}.sidenav.sidenav-fixed.right-aligned{-webkit-transform:translateX(105%);transform:translateX(105%)}.sidenav>a{padding:0 16px}.sidenav .user-view{padding:16px 16px 0}}.sidenav .collapsible-body>ul:not(.collapsible)>li.active,.sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active{background-color:var(--primary-color)}.sidenav .collapsible-body>ul:not(.collapsible)>li.active a:not(.btn):not(.btn-large):not(.btn-small),.sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active a:not(.btn):not(.btn-large):not(.btn-small){color:var(--font-on-primary-color-main)}.sidenav .collapsible-body{padding:0}.sidenav-overlay{position:fixed;top:0;left:0;right:0;opacity:0;height:120vh;background-color:rgba(0,0,0,.5);z-index:997;display:none}.preloader-wrapper{display:inline-block;position:relative;width:50px;height:50px}.preloader-wrapper.small{width:36px;height:36px}.preloader-wrapper.big{width:64px;height:64px}.preloader-wrapper.active{-webkit-animation:container-rotate 1568ms linear infinite;animation:container-rotate 1568ms linear infinite}@-webkit-keyframes container-rotate{to{-webkit-transform:rotate(360deg)}}@keyframes container-rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-layer{position:absolute;width:100%;height:100%;opacity:0;border-color:var(--primary-color)}.spinner-blue,.spinner-blue-only{border-color:#4285f4}.spinner-red,.spinner-red-only{border-color:#db4437}.spinner-yellow,.spinner-yellow-only{border-color:#f4b400}.spinner-green,.spinner-green-only{border-color:#0f9d58}.active .spinner-layer.spinner-blue{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,blue-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,blue-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .spinner-layer.spinner-red{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,red-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,red-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .spinner-layer.spinner-yellow{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,yellow-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,yellow-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .spinner-layer.spinner-green{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,green-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,green-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .spinner-layer,.active .spinner-layer.spinner-blue-only,.active .spinner-layer.spinner-red-only,.active .spinner-layer.spinner-yellow-only,.active .spinner-layer.spinner-green-only{opacity:1;-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@-webkit-keyframes fill-unfill-rotate{12.5%{-webkit-transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg)}to{-webkit-transform:rotate(1080deg)}}@keyframes fill-unfill-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@-webkit-keyframes blue-fade-in-out{from{opacity:1}25%{opacity:1}26%{opacity:0}89%{opacity:0}90%{opacity:1}100%{opacity:1}}@keyframes blue-fade-in-out{from{opacity:1}25%{opacity:1}26%{opacity:0}89%{opacity:0}90%{opacity:1}100%{opacity:1}}@-webkit-keyframes red-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:1}50%{opacity:1}51%{opacity:0}}@keyframes red-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:1}50%{opacity:1}51%{opacity:0}}@-webkit-keyframes yellow-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:1}75%{opacity:1}76%{opacity:0}}@keyframes yellow-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:1}75%{opacity:1}76%{opacity:0}}@-webkit-keyframes green-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:1}90%{opacity:1}100%{opacity:0}}@keyframes green-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:1}90%{opacity:1}100%{opacity:0}}.gap-patch{position:absolute;top:0;left:45%;width:10%;height:100%;overflow:hidden;border-color:inherit}.gap-patch .circle{width:1000%;left:-450%}.circle-clipper{display:inline-block;position:relative;width:50%;height:100%;overflow:hidden;border-color:inherit}.circle-clipper .circle{width:200%;height:100%;border-width:3px;border-style:solid;border-color:inherit;border-bottom-color:rgba(0,0,0,0) !important;border-radius:50%;-webkit-animation:none;animation:none;position:absolute;top:0;right:0;bottom:0}.circle-clipper.left .circle{left:0;border-right-color:rgba(0,0,0,0) !important;-webkit-transform:rotate(129deg);transform:rotate(129deg)}.circle-clipper.right .circle{left:-100%;border-left-color:rgba(0,0,0,0) !important;-webkit-transform:rotate(-129deg);transform:rotate(-129deg)}.active .circle-clipper.left .circle{-webkit-animation:left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.active .circle-clipper.right .circle{-webkit-animation:right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;animation:right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@-webkit-keyframes left-spin{from{-webkit-transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg)}to{-webkit-transform:rotate(130deg)}}@keyframes left-spin{from{-webkit-transform:rotate(130deg);transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(130deg);transform:rotate(130deg)}}@-webkit-keyframes right-spin{from{-webkit-transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg)}to{-webkit-transform:rotate(-130deg)}}@keyframes right-spin{from{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}to{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}}#spinnerContainer.cooldown{-webkit-animation:container-rotate 1568ms linear infinite,fade-out 400ms cubic-bezier(0.4, 0, 0.2, 1);animation:container-rotate 1568ms linear infinite,fade-out 400ms cubic-bezier(0.4, 0, 0.2, 1)}@-webkit-keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes fade-out{from{opacity:1}to{opacity:0}}.slider{position:relative;height:400px;width:100%}.slider.fullscreen{height:100%;width:100%;position:absolute;top:0;left:0;right:0;bottom:0}.slider.fullscreen ul.slides{padding-left:0;list-style-type:none;height:100%}.slider.fullscreen ul.indicators{padding-left:0;list-style-type:none;z-index:2;bottom:30px}.slider.fullscreen ul.indicators .indicator-item{background-color:var(--carousel-indicator-color)}.slider.fullscreen ul.indicators .indicator-item.active{background-color:var(--carousel-indicator-active-color)}.slider .slides{background-color:var(--surface-color);margin:0;height:400px;padding-left:0;list-style-type:none}.slider .slides li{padding-left:0;list-style-type:none;opacity:0;position:absolute;top:0;left:0;z-index:1;width:100%;height:inherit;overflow:hidden}.slider .slides li img{height:100%;width:100%;background-size:cover;background-position:center}.slider .slides li .caption{color:#fff;position:absolute;top:15%;left:15%;width:70%;opacity:0}.slider .slides li .caption p{color:rgba(255,255,255,.75)}.slider .slides li.active{z-index:2}.slider .indicators{padding-left:0;list-style-type:none;position:absolute;text-align:center;left:0;right:0;bottom:0;margin:0}.slider .indicators .indicator-item{display:inline-block;position:relative;height:16px;width:16px;margin:0 12px}.slider .indicators .indicator-item-btn{position:absolute;top:0;left:0;cursor:pointer;background-color:var(--slider-track-color);-webkit-transition:background-color .3s;transition:background-color .3s;border-radius:50%;border-width:0;width:100%;height:100%}.slider .indicators .indicator-item-btn.active{background-color:var(--primary-color)}.carousel{overflow:hidden;position:relative;width:100%;height:400px;-webkit-perspective:500px;perspective:500px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transform-origin:0% 50%;transform-origin:0% 50%}.carousel.carousel-slider{top:0;left:0}.carousel.carousel-slider .carousel-fixed-item{position:absolute;left:0;right:0;bottom:20px;z-index:1}.carousel.carousel-slider .carousel-fixed-item.with-indicators{bottom:68px}.carousel.carousel-slider .carousel-item{width:100%;height:100%;min-height:400px;position:absolute;top:0;left:0}.carousel.carousel-slider .carousel-item h2{font-size:24px;font-weight:500;line-height:32px}.carousel.carousel-slider .carousel-item p{font-size:15px}.carousel .carousel-item{visibility:hidden;width:200px;height:200px;position:absolute;top:0;left:0}.carousel .carousel-item>img{width:100%}.carousel .indicators{padding-left:0;list-style-type:none;position:absolute;text-align:center;left:0;right:0;bottom:0;margin:0}.carousel .indicators .indicator-item{display:inline-block;position:relative;cursor:pointer;height:8px;width:8px;margin:24px 4px;background-color:var(--carousel-indicator-color);-webkit-transition:background-color .3s;transition:background-color .3s;border-radius:50%}.carousel .indicators .indicator-item.active{background-color:var(--carousel-indicator-active-color)}.carousel.scrolling .carousel-item .materialboxed,.carousel .carousel-item:not(.active) .materialboxed{pointer-events:none}.tap-target-wrapper{width:800px;height:800px;position:fixed;z-index:1000;visibility:hidden;-webkit-transition:visibility 0s .3s;transition:visibility 0s .3s}.tap-target-wrapper.open{visibility:visible;-webkit-transition:visibility 0s;transition:visibility 0s}.tap-target-wrapper.open .tap-target{-webkit-transform:scale(1);transform:scale(1);opacity:.95;-webkit-transition:opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1);transition:opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1);transition:transform .3s cubic-bezier(0.42, 0, 0.58, 1),opacity .3s cubic-bezier(0.42, 0, 0.58, 1);transition:transform .3s cubic-bezier(0.42, 0, 0.58, 1),opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1)}.tap-target-wrapper.open .tap-target-wave::before{-webkit-transform:scale(1);transform:scale(1)}.tap-target-wrapper.open .tap-target-wave::after{visibility:visible;-webkit-animation:pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;animation:pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;-webkit-transition:opacity .3s,visibility 0s 1s,-webkit-transform .3s;transition:opacity .3s,visibility 0s 1s,-webkit-transform .3s;transition:opacity .3s,transform .3s,visibility 0s 1s;transition:opacity .3s,transform .3s,visibility 0s 1s,-webkit-transform .3s}.tap-target{position:absolute;font-size:1rem;border-radius:50%;background-color:var(--secondary-color);color:var(--font-on-secondary-color-main);-webkit-box-shadow:0 20px 20px 0 rgba(0,0,0,.14),0 10px 50px 0 rgba(0,0,0,.12),0 30px 10px -20px rgba(0,0,0,.2);box-shadow:0 20px 20px 0 rgba(0,0,0,.14),0 10px 50px 0 rgba(0,0,0,.12),0 30px 10px -20px rgba(0,0,0,.2);width:100%;height:100%;opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1);transition:opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1);transition:transform .3s cubic-bezier(0.42, 0, 0.58, 1),opacity .3s cubic-bezier(0.42, 0, 0.58, 1);transition:transform .3s cubic-bezier(0.42, 0, 0.58, 1),opacity .3s cubic-bezier(0.42, 0, 0.58, 1),-webkit-transform .3s cubic-bezier(0.42, 0, 0.58, 1)}.tap-target-content{position:relative;display:table-cell}.tap-target-wave{position:absolute;border-radius:50%;z-index:10001}.tap-target-wave::before,.tap-target-wave::after{content:"";display:block;position:absolute;width:100%;height:100%;border-radius:50%;background-color:var(--surface-color)}.tap-target-wave::before{-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s, -webkit-transform .3s}.tap-target-wave::after{visibility:hidden;-webkit-transition:opacity .3s,visibility 0s,-webkit-transform .3s;transition:opacity .3s,visibility 0s,-webkit-transform .3s;transition:opacity .3s,transform .3s,visibility 0s;transition:opacity .3s,transform .3s,visibility 0s,-webkit-transform .3s;z-index:-1}.tap-target-origin{top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:10002;position:absolute !important}.tap-target-origin:not(.btn):not(.btn-large):not(.btn-small),.tap-target-origin:not(.btn):not(.btn-large):not(.btn-small):hover{background:none}@media only screen and (max-width: 600px){.tap-target,.tap-target-wrapper{width:600px;height:600px}}.pulse{overflow:visible;position:relative}.pulse::before{content:"";display:block;position:absolute;width:100%;height:100%;top:0;left:0;background-color:inherit;border-radius:inherit;-webkit-transition:opacity .3s,-webkit-transform .3s;transition:opacity .3s,-webkit-transform .3s;transition:opacity .3s,transform .3s;transition:opacity .3s,transform .3s,-webkit-transform .3s;-webkit-animation:pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;animation:pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;z-index:-1}@-webkit-keyframes pulse-animation{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}}@keyframes pulse-animation{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}}.datepicker-modal{max-width:325px;min-width:300px;max-height:none}.datepicker-container.modal-content{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:0;background-color:var(--surface-color)}.datepicker-controls{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:280px;margin:0 auto}.datepicker-controls .selects-container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.datepicker-controls .select-wrapper input{border-bottom:none;text-align:center;margin:0}.datepicker-controls .select-wrapper input:focus{border-bottom:none}.datepicker-controls .select-wrapper .caret{display:none}.datepicker-controls .select-year input{width:50px}.datepicker-controls .select-month input{width:80px}.datepicker-controls .month-prev,.datepicker-controls .month-next{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.datepicker-controls .month-prev>svg,.datepicker-controls .month-next>svg{fill:var(--font-color-medium)}.month-prev,.month-next{margin-top:4px;cursor:pointer;background-color:rgba(0,0,0,0);border:none}.datepicker-date-display{-webkit-box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto;background-color:var(--primary-color);color:var(--font-on-primary-color-main);padding:20px 22px;font-weight:500}.datepicker-date-display .year-text{display:block;font-size:1.5rem;line-height:25px;color:var(--font-on-primary-color-main)}.datepicker-date-display .date-text{display:block;font-size:2.8rem;line-height:47px;font-weight:500}.datepicker-calendar-container{-webkit-box-flex:2.5;-webkit-flex:2.5 auto;-ms-flex:2.5 auto;flex:2.5 auto}.datepicker-table{width:280px;font-size:1rem;margin:0 auto}.datepicker-table thead{border-bottom:none}.datepicker-table th{padding:10px 5px;text-align:center}.datepicker-table tr{border:none}.datepicker-table abbr{text-decoration:none;color:var(--font-color-medium)}.datepicker-table td{color:var(--font-color-main);border-radius:50%;padding:0}.datepicker-table td.is-today{color:var(--primary-color)}.datepicker-table td.is-selected{background-color:var(--primary-color);color:var(--font-on-primary-color-main)}.datepicker-table td.is-outside-current-month,.datepicker-table td.is-disabled{color:var(--font-color-disabled);pointer-events:none}.datepicker-day-button{background-color:rgba(0,0,0,0);border:none;line-height:38px;display:block;width:100%;border-radius:50%;padding:0 5px;cursor:pointer;color:inherit}.datepicker-day-button:hover{background-color:var(--primary-color-hover-opaque)}.datepicker-day-button:focus{background-color:var(--primary-color-focus-opaque)}.datepicker-footer{width:280px;margin:0 auto;padding-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.datepicker-cancel,.datepicker-clear,.datepicker-today,.datepicker-done{color:var(--primary-color);padding:0 1rem}.datepicker-clear{color:var(--error-color)}@media only screen and (min-width : 601px){.datepicker-modal{max-width:625px}.datepicker-container.modal-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.datepicker-date-display{-webkit-box-flex:0;-webkit-flex:0 1 270px;-ms-flex:0 1 270px;flex:0 1 270px}.datepicker-controls,.datepicker-table,.datepicker-footer{width:320px}.datepicker-day-button{line-height:44px}}.timepicker-modal{max-width:325px;max-height:none}.timepicker-container.modal-content{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:0}.text-primary{color:var(--font-on-primary-color-main)}.timepicker-digital-display{width:200px;-webkit-box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto;background-color:var(--primary-color);padding:10px;font-weight:300}.timepicker-text-container{font-size:4rem;font-weight:bold;text-align:center;color:var(--font-on-primary-color-medium);font-weight:400;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.timepicker-text-container input[type=text]{height:4rem;color:rgba(255,255,255,.6);border-bottom:0px;font-size:4rem;direction:ltr}.timepicker-input-hours,.timepicker-input-minutes,.timepicker-span-am-pm div{cursor:pointer}input[type=text].timepicker-input-hours{text-align:right;width:28%;margin-right:3px}input[type=text].timepicker-input-minutes{width:33%;margin-left:3px}input[type=text].text-primary{color:#fff}.timepicker-display-am-pm{font-size:1.3rem;position:absolute;right:1rem;bottom:1rem;font-weight:400}.timepicker-analog-display{-webkit-box-flex:2.5;-webkit-flex:2.5 auto;-ms-flex:2.5 auto;flex:2.5 auto;background-color:var(--surface-color)}.timepicker-plate{background-color:var(--background-color-level-4dp);border-radius:50%;width:270px;height:270px;overflow:visible;position:relative;margin:auto;margin-top:25px;margin-bottom:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.timepicker-canvas,.timepicker-dial{position:absolute;left:0;right:0;top:0;bottom:0}.timepicker-minutes{visibility:hidden}.timepicker-tick{border-radius:50%;color:var(--font-color-main);line-height:40px;text-align:center;width:40px;height:40px;position:absolute;cursor:pointer;font-size:15px}.timepicker-tick.active,.timepicker-tick:hover{background-color:var(--primary-color-hover-opaque)}.timepicker-dial{-webkit-transition:opacity 350ms,-webkit-transform 350ms;transition:opacity 350ms,-webkit-transform 350ms;transition:transform 350ms,opacity 350ms;transition:transform 350ms,opacity 350ms,-webkit-transform 350ms}.timepicker-dial-out{opacity:0}.timepicker-dial-out.timepicker-hours{-webkit-transform:scale(1.1, 1.1);transform:scale(1.1, 1.1)}.timepicker-dial-out.timepicker-minutes{-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}.timepicker-canvas{-webkit-transition:opacity 175ms;transition:opacity 175ms}.timepicker-canvas line{stroke:var(--primary-color);stroke-width:4;stroke-linecap:round}.timepicker-canvas-out{opacity:.25}.timepicker-canvas-bearing{stroke:none;fill:var(--primary-color)}.timepicker-canvas-bg{stroke:none;fill:var(--primary-color)}.timepicker-footer{margin:0 auto;padding:5px 1rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.timepicker-clear{color:var(--error-color)}.timepicker-close{color:var(--primary-color)}.timepicker-clear,.timepicker-close{padding:0 20px}@media only screen and (min-width : 601px){.timepicker-modal{max-width:600px}.timepicker-container.modal-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.timepicker-text-container{top:32%}.timepicker-display-am-pm{position:relative;right:auto;bottom:auto;text-align:center;margin-top:1.2rem}}:root{--surface-color: #f3f6fc;--background-color: #ffffff;--font-color-main: rgba(0, 0, 0, 0.87);--font-color-medium: rgba(0, 0, 0, 0.56);--font-color-disabled: rgba(0, 0, 0, 0.38);--font-on-primary-color-main: rgba(255, 255, 255, 0.87);--font-on-primary-color-dark-main: rgba(255, 255, 255, 0.87);--font-on-primary-color-dark-medium: rgba(255, 255, 255, 0.60);--font-on-primary-color-medium: rgba(255, 255, 255, 0.60);--font-on-primary-color-disabled: rgba(255, 255, 255, 0.38);--font-on-secondary-color-main: rgba(0, 0, 0, 0.87);--hover-color: rgba(0, 0, 0, 0.04);--focus-color: rgba(0, 0, 0, 0.12);--focus-color-solid: #E0E0E0;--background-color-disabled: rgba(0, 0, 0, 0.12);--background-color-level-4dp: rgba(0, 0, 0, 0.09);--background-color-level-16dp-solid: var(--surface-color);--background-color-slight-emphasis: rgba(0, 0, 0, 0.025);--background-color-card: var(--surface-color);--tooltip-background-color: #313033;--tooltip-font-color: rgba(255, 255, 255, 0.77);--separator-color: #DDDDDD;--error-color: #F44336;--slider-track-color: rgba(0, 0, 0, 0.26);--switch-thumb-off-color: #ffffff;--carousel-indicator-color: rgba(255, 255, 255, 0.45);--carousel-indicator-active-color: #FFF;--primary-color: #26a69a;--primary-color-dark: #009688;--primary-color-numeric: 38, 166, 154;--primary-color-raised-hover-solid: #30B0A4;--primary-color-raised-focus-solid: #44C4B8;--primary-color-font-medium-color: rgba(var(--primary-color-numeric), 0.7);--primary-color-font-disabled-color: rgba(var(--primary-color-numeric), 0.4);--primary-color-hover-opaque: rgba(var(--primary-color-numeric), 0.06);--primary-color-focus-opaque: rgba(var(--primary-color-numeric), 0.18);--secondary-color: #EF5350;--secondary-color-hover-solid: #FE625F;--secondary-color-focus-solid: #FF7B78;--md_sys_color_on-surface: 28, 27, 31}:root[theme=dark]{--background-color: #121212;--surface-color: #242424;--font-color-main: rgba(255, 255, 255, 0.87);--font-color-medium: rgba(255, 255, 255, 0.60);--font-color-disabled: rgba(255, 255, 255, 0.38);--font-on-primary-color-main: rgba(0, 0, 0, 0.87);--font-on-primary-color-dark-main: rgba(255, 255, 255, 0.87);--font-on-primary-color-dark-medium: rgba(255, 255, 255, 0.60);--font-on-primary-color-medium: rgba(0, 0, 0, 0.56);--font-on-primary-color-disabled: rgba(0, 0, 0, 0.38);--hover-color: rgba(255, 255, 255, 0.04);--focus-color: rgba(255, 255, 255, 0.12);--focus-color-solid: #424242;--background-color-disabled: rgba(255, 255, 255, 0.12);--background-color-level-4dp: rgba(255, 255, 255, 0.09);--background-color-level-16dp-solid: #262626;--background-color-card: var(--surface-color);--background-color-slight-emphasis: rgba(255, 255, 255, 0.05);--separator-color: #424242;--error-color: #CF6679;--slider-track-color: rgba(255, 255, 255, 0.26);--switch-thumb-off-color: #bababa;--primary-color: #B39DDB;--primary-color-dark: #9575CD;--primary-color-numeric: 179, 157, 219;--primary-color-raised-hover-solid: #C2ACEA;--primary-color-raised-focus-solid: #DBC5FF;--secondary-color: #CDDC39;--secondary-color-hover-solid: #DCEB48;--secondary-color-focus-solid: #F5FF61;--md_sys_color_on-surface: 230, 225, 229}body{color:var(--font-color-main);line-height:1.6;font-size:16px;-webkit-font-smoothing:antialiased;background-color:var(--background-color)}p.box{padding:20px}p{padding:0}h5>span{font-size:14px;margin-left:15px;color:var(--font-color-medium)}td,th{padding:15px 10px}.header{color:var(--font-color-main);font-weight:400;font-size:3.25rem}.preview{background-color:var(--surface-color);border:1px solid var(--separator-color);padding:20px 20px}.method-header{font-family:"Inconsolata",Monaco,Consolas,"Andale Mono",monospace;margin-top:15px;padding-top:30px}header,main,footer{padding-left:300px}.parallax-demo header,.parallax-demo main,.parallax-demo footer{padding-left:0}footer.example{padding-left:0}@media only screen and (max-width : 992.99px){header,main,footer{padding-left:0}h5>span{display:block;margin:0 0 15px 0}}ul.sidenav{padding-left:0;list-style-type:none}ul.sidenav ul{padding-left:0}ul.sidenav li{list-style-type:none;padding-left:0}ul.sidenav li a{padding-left:1rem}ul.sidenav.sidenav-fixed li.logo{text-align:center;margin-top:16px;margin-bottom:60px}ul.sidenav.sidenav-fixed li.logo:hover,ul.sidenav.sidenav-fixed li.logo #logo-container:hover{background-color:rgba(0,0,0,0)}ul.sidenav.sidenav-fixed{overflow:hidden;-webkit-box-shadow:none;box-shadow:none;border-right:1px solid var(--separator-color)}ul.sidenav.sidenav-fixed li{line-height:44px}ul.sidenav.sidenav-fixed li.active{background-color:var(--focus-color)}ul.sidenav.sidenav-fixed li a{font-size:13px;line-height:44px;height:44px;padding:0 30px}ul.sidenav.sidenav-fixed li a .new.badge{margin-top:11px}ul.sidenav.sidenav-fixed ul.collapsible-accordion{background-color:var(--surface-color)}ul.sidenav.sidenav-fixed ul.collapsible-accordion a.collapsible-header{padding:0 30px}ul.sidenav.sidenav-fixed ul.collapsible-accordion .collapsible-body li a{font-weight:400;padding:0 37.5px 0 45px}ul.sidenav.sidenav-fixed:hover{overflow-y:auto}.bold>a{font-weight:bold}#logo-container{height:50px;margin-bottom:16px}.current-version-number{font-size:1.5rem;font-weight:500;color:var(--font-color-medium)}.intro #logo{height:150px}.intro h2{font-size:2rem;line-height:1.25;margin-bottom:2rem}.call-to-action>.btn,.call-to-action>.btn-large,.call-to-action>.btn-small{border:1px solid var(--primary-color)}.call-to-action>.btn:first-of-type,.call-to-action>.btn-large:first-of-type,.call-to-action>.btn-small:first-of-type{border:none}.call-to-action>.btn-flat{color:var(--primary-color)}.materialize-benefits .collection-item>h4{font-size:1.75rem;font-weight:500}@media only screen and (max-width : 992.99px){footer.page-footer .container{text-align:center}}nav.top-nav{height:110px;-webkit-box-shadow:none;box-shadow:none;border-bottom:1px solid var(--separator-color);background-color:rgba(0,0,0,0)}nav.top-nav h1.header{margin:0;padding-top:22px}a.sidenav-trigger.top-nav{position:absolute;text-align:center;height:48px;width:48px;top:28px;margin-left:1.5rem;color:var(--primary-color);font-size:36px;z-index:2}a.sidenav-trigger.top-nav i{font-size:32px}@media only screen and (max-width : 600.99px){a.sidenav-trigger.top-nav{left:0}ul.sidenav.sidenav-fixed{border:0}}@media only screen and (max-width : 992.99px){nav .nav-wrapper{text-align:center}nav .nav-wrapper a.page-title{font-size:36px}}@media only screen and (min-width : 601px){main>.container,body>.page-footer>.container,.top-nav>.container,#index-banner>.container,.github-commit>.container{width:100%}}#front-page-logo{display:inline-block;height:100%;pointer-events:none}#responsive-img{width:80%;display:block;margin:0 auto}#index-banner{border-bottom:1px solid var(--separator-color)}#index-banner .container{position:relative}#index-banner h4{margin-bottom:40px;line-height:44px;color:var(--font-color-main)}#index-banner h1{margin-top:16px}@media only screen and (max-width : 992.99px){#index-banner h1{margin-top:60px}#index-banner h4{margin-bottom:15px}}@media only screen and (max-width : 600.99px){#index-banner h4{margin-bottom:0}}.github-commit{color:var(--font-color-medium);border-top:1px solid var(--separator-color);padding:14px 0;height:64px;line-height:36px;font-size:.9rem}.github-commit .sha{margin:0 6px 0 6px}@media only screen and (max-width : 992.99px){.github-commit{text-align:center}}.promo{width:100%}.promo i{margin:30px 0;color:var(--secondary-color);font-size:5rem;display:block}.promo-caption{font-size:1.25rem;font-weight:500;margin-top:5px;margin-bottom:0}.grid-example{border:1px solid var(--separator-color);text-align:center;font-size:26px;background-color:#f08080;color:#fff}.grid-example span{line-height:50px}.promo-example{overflow:hidden}#site-layout-example-left{background-color:#90a4ae;height:300px}#site-layout-example-right{background-color:var(--secondary-color);height:300px}#site-layout-example-top{background-color:var(--primary-color);height:42px}.flat-text-header{height:35px;width:80%;background-color:rgba(255,255,255,.15);display:block;margin:27px auto}.flat-text{height:25px;width:80%;background-color:rgba(0,0,0,.15);display:block;margin:27px auto}.flat-text.small{width:25%;height:25px;background-color:rgba(0,0,0,.15)}.flat-text.full-width{width:100%}.browser-window{text-align:left;width:100%;height:auto;display:inline-block;border-radius:5px 5px 2px 2px;background-color:var(--background-color-level-4dp);margin:20px 0px;overflow:hidden}.browser-window .top-bar{height:30px;border-radius:5px 5px 0 0;border-top:thin solid #eaeae9;border-bottom:thin solid #dfdfde;background:-webkit-gradient(linear, left top, left bottom, from(#e7e7e6), to(#E2E2E1));background:linear-gradient(#e7e7e6, #E2E2E1)}.browser-window .circle{height:10px;width:10px;display:inline-block;border-radius:50%;background-color:#fff;margin-right:1px}#close-circle{background-color:#ff5c5a}#minimize-circle{background-color:#ffbb50}#maximize-circle{background-color:#1bc656}.browser-window .circles{margin:5px 12px}.browser-window .content{margin:0;width:100%;display:inline-block;border-radius:0 0 5px 5px;background-color:#fafafa}.browser-window .row{margin:0}.clear{clear:both}.dynamic-color .red,.dynamic-color .pink,.dynamic-color .purple,.dynamic-color .deep-purple,.dynamic-color .indigo,.dynamic-color .blue,.dynamic-color .light-blue,.dynamic-color .cyan,.dynamic-color .teal,.dynamic-color .green,.dynamic-color .light-green,.dynamic-color .lime,.dynamic-color .yellow,.dynamic-color .amber,.dynamic-color .orange,.dynamic-color .deep-orange,.dynamic-color .brown,.dynamic-color .grey,.dynamic-color .blue-grey,.dynamic-color .black,.dynamic-color .white,.dynamic-color .transparent{height:55px;width:100%;padding:0 15px;font-weight:500;font-size:12px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box}.dynamic-color .col{margin-bottom:55px}.center{text-align:center;vertical-align:middle}.material-icons.icon-demo{line-height:50px}.icon-container i{font-size:3em;margin-bottom:10px}.icon-container .icon-preview{height:120px;text-align:center}.icon-container span{display:block}.icon-holder{display:block;text-align:center;width:150px;height:115px;float:left;margin:0 0px 15px 0px}.icon-holder p{margin:0 0}.tabs-wrapper{position:relative;height:48px}.tabs-wrapper .row.pinned{position:fixed;width:100%;top:0;z-index:10}.shadow-demo{background-color:var(--secondary-color);width:100px;height:100px;margin:20px auto}@media only screen and (max-width: 600.99px){.shadow-demo{width:150px;height:150px}}.parallax-container .text-center{position:absolute;top:50%;left:0;right:0;margin-top:-27px}ul.table-of-contents{padding-left:0;list-style-type:none;margin-top:0;padding-top:48px;font-size:1rem;margin-left:4rem}code,pre{position:relative;font-size:1.1rem}.directory-markup{font-size:1rem;line-height:1.1rem !important}:not(pre)>code[class*=language-]{padding:.1em .25em;border:solid 1px var(--separator-color)}pre[class*=language-]{padding:25px 12px 7px 12px;border:solid 1px var(--separator-color);background:var(--background-color-slight-emphasis)}pre[class*=language-]:before{position:absolute;padding:1px 5px;background:var(--background-color-level-16dp-solid);top:0;left:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;color:var(--font-color-medium);content:attr(class);font-size:.9rem;border:solid 1px var(--separator-color);border-top:none;border-left:none}.token.operator{background:rgba(0,0,0,0)}pre[class*=language-],code[class*=language-]{line-height:1.3}code[class*=language-]{color:var(--font-color-main)}:not(pre)>code[class*=language-]{background:var(--background-color-slight-emphasis);color:var(--font-color-main)}.copyMessage,.copyButton{color:var(--font-color-medium);position:absolute}.copyMessage{font-size:14px;-webkit-transition:all .2s ease-in;transition:all .2s ease-in;opacity:0;right:45px;top:15px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.copyButton{top:10px;right:10px;cursor:pointer}.toc-wrapper{position:relative;margin-top:42px}.toc-wrapper.pin-bottom{margin-top:84px}footer{font-size:.9rem}body.parallax-demo footer{margin-top:0}.docs-footer{margin-top:40px;background-color:rgba(0,0,0,0);border-top:1px solid var(--separator-color);color:inherit}.docs-footer .footer-copyright,.docs-footer .footer-copyright a{color:var(--font-color-medium);background-color:rgba(0,0,0,0)}.image-container{width:100%}.image-container img{max-width:100%}@media only screen and (max-width : 600.99px){.mobile-image{max-width:100%}}.waves-color-demo .collection-item{height:37px;line-height:37px;-webkit-box-sizing:content-box;box-sizing:content-box}.waves-color-demo .collection-item code{line-height:37px}.waves-color-demo .btn:not(.waves-light),.waves-color-demo .btn-large:not(.waves-light),.waves-color-demo .btn-small:not(.waves-light){background-color:#fff;color:#212121}.card-panel span,.card-content p{-webkit-font-smoothing:antialiased}#images .card-panel .row{margin-bottom:0}.pushpin-demo{position:relative;height:100px}#pushpin-demo-1{display:block;height:inherit;background-color:var(--slider-track-color)}.valign-demo{height:400px;background-color:var(--slider-track-color)}.talign-demo{height:100px;background-color:var(--slider-track-color)}#staggered-test li,#image-test{opacity:0}#download-thanks{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;overflow:hidden;max-height:300px;opacity:1;margin:1rem 0;padding:1rem}#download-thanks .header{font-size:1.75em;color:var(--primary-color);margin:0}#download-thanks.is-closed{opacity:0;max-height:0}#nav-mobile li.version{position:absolute;top:65px;left:0;right:0;font-family:"Inconsolata";text-align:center}#nav-mobile li.version .dropdown-trigger{font-family:"Inconsolata";margin:0 auto;display:inline-block;padding:0 10px;border-bottom:1px solid var(--separator-color)}#nav-mobile li.version .dropdown-trigger .caret{position:relative;top:10px;fill:var(--font-color-medium)}#version-dropdown{text-align:left}#version-dropdown li>a{padding:0 10px}#version-dropdown a{height:50px;line-height:50px}.ext-link>img{vertical-align:middle;height:24px}#nav-mobile li.search{margin:5px 0;z-index:2}#nav-mobile li.search .search-wrapper{color:var(--font-color-medium);margin-top:-1px;-webkit-transition:margin .25s ease;transition:margin .25s ease;position:relative}#nav-mobile li.search .search-wrapper input#search{background-color:rgba(0,0,0,0);border:1px solid var(--separator-color);border-radius:3px;margin:0 auto;color:var(--font-color-medium);display:block;font-size:16px;width:80%;padding:5px;-webkit-box-sizing:border-box;box-sizing:border-box;height:32px}#nav-mobile li.search .search-wrapper input#search:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}#nav-mobile li.search .search-wrapper i.material-icons{position:absolute;top:4px;right:34px;color:var(--separator-color);cursor:pointer}.search-results{position:fixed;margin:0;top:65px;left:340px;z-index:9999;background-color:var(--surface-color)}@media only screen and (max-width : 992.99px){.search-results{top:65px;left:100px}}@media only screen and (max-width : 600.99px){.search-results{top:160px;left:35px}}.search-results a{font-size:12px;padding:5px;white-space:nowrap;display:block}.search-results a.focused{background-color:var(--focus-color);outline:none}.search-results a:hover{background-color:var(--hover-color);outline:none}#nav-mobile li .new.badge{background-color:var(--secondary-color);color:var(--font-on-secondary-color-main)} \ No newline at end of file diff --git a/docs/js/init.js b/docs/js/init.js index 770a5fc091..57bebebcc8 100644 --- a/docs/js/init.js +++ b/docs/js/init.js @@ -196,6 +196,8 @@ document.addEventListener("DOMContentLoaded", function() { }); M.Dropdown.init(document.querySelectorAll('.dropdown-trigger'), {}); + M.Dropdown.init(document.querySelector('#dropdown-demo-left'), {alignment: 'left', constrainWidth: false}); + M.Dropdown.init(document.querySelector('#dropdown-demo-right'), {alignment: 'right', constrainWidth: false}); M.Parallax.init(document.querySelectorAll('.parallax'), {}); @@ -218,7 +220,9 @@ document.addEventListener("DOMContentLoaded", function() { M.Sidenav.init(document.querySelectorAll('.sidenav'), {}); - M.TapTarget.init(document.querySelectorAll('.tap-target'), {}); + const tts = M.TapTarget.init(document.querySelectorAll('.tap-target'), {}); + document.querySelector('#open-taptarget')?.addEventListener('click', e => tts[0].open()); + document.querySelector('#close-taptarget')?.addEventListener('click', e => tts[0].close()); M.FormSelect.init(document.querySelectorAll('select:not(.disabled)'), {}); diff --git a/docs/js/materialize.js b/docs/js/materialize.js index 459c8d4b61..d4d5dd9ba2 100644 --- a/docs/js/materialize.js +++ b/docs/js/materialize.js @@ -1,12420 +1,358 @@ -var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -/*! cash-dom 1.3.5, https://github.com/kenwheeler/cash @license MIT */ -(function (factory) { - window.cash = factory(); -})(function () { - var doc = document, - win = window, - ArrayProto = Array.prototype, - slice = ArrayProto.slice, - filter = ArrayProto.filter, - push = ArrayProto.push; - - var noop = function () {}, - isFunction = function (item) { - // @see https://crbug.com/568448 - return typeof item === typeof noop && item.call; - }, - isString = function (item) { - return typeof item === typeof ""; - }; - - var idMatch = /^#[\w-]*$/, - classMatch = /^\.[\w-]*$/, - htmlMatch = /<.+>/, - singlet = /^\w+$/; - - function find(selector, context) { - context = context || doc; - var elems = classMatch.test(selector) ? context.getElementsByClassName(selector.slice(1)) : singlet.test(selector) ? context.getElementsByTagName(selector) : context.querySelectorAll(selector); - return elems; - } - - var frag; - function parseHTML(str) { - if (!frag) { - frag = doc.implementation.createHTMLDocument(null); - var base = frag.createElement("base"); - base.href = doc.location.href; - frag.head.appendChild(base); - } - - frag.body.innerHTML = str; - - return frag.body.childNodes; - } - - function onReady(fn) { - if (doc.readyState !== "loading") { - fn(); - } else { - doc.addEventListener("DOMContentLoaded", fn); - } - } - - function Init(selector, context) { - if (!selector) { - return this; - } - - // If already a cash collection, don't do any further processing - if (selector.cash && selector !== win) { - return selector; - } - - var elems = selector, - i = 0, - length; - - if (isString(selector)) { - elems = idMatch.test(selector) ? - // If an ID use the faster getElementById check - doc.getElementById(selector.slice(1)) : htmlMatch.test(selector) ? - // If HTML, parse it into real elements - parseHTML(selector) : - // else use `find` - find(selector, context); - - // If function, use as shortcut for DOM ready - } else if (isFunction(selector)) { - onReady(selector);return this; - } - - if (!elems) { - return this; - } - - // If a single DOM element is passed in or received via ID, return the single element - if (elems.nodeType || elems === win) { - this[0] = elems; - this.length = 1; - } else { - // Treat like an array and loop through each item. - length = this.length = elems.length; - for (; i < length; i++) { - this[i] = elems[i]; - } - } - - return this; - } - - function cash(selector, context) { - return new Init(selector, context); - } - - var fn = cash.fn = cash.prototype = Init.prototype = { // jshint ignore:line - cash: true, - length: 0, - push: push, - splice: ArrayProto.splice, - map: ArrayProto.map, - init: Init - }; - - Object.defineProperty(fn, "constructor", { value: cash }); - - cash.parseHTML = parseHTML; - cash.noop = noop; - cash.isFunction = isFunction; - cash.isString = isString; - - cash.extend = fn.extend = function (target) { - target = target || {}; - - var args = slice.call(arguments), - length = args.length, - i = 1; - - if (args.length === 1) { - target = this; - i = 0; - } - - for (; i < length; i++) { - if (!args[i]) { - continue; - } - for (var key in args[i]) { - if (args[i].hasOwnProperty(key)) { - target[key] = args[i][key]; - } - } - } - - return target; - }; - - function each(collection, callback) { - var l = collection.length, - i = 0; - - for (; i < l; i++) { - if (callback.call(collection[i], collection[i], i, collection) === false) { - break; - } - } - } - - function matches(el, selector) { - var m = el && (el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector); - return !!m && m.call(el, selector); - } - - function getCompareFunction(selector) { - return ( - /* Use browser's `matches` function if string */ - isString(selector) ? matches : - /* Match a cash element */ - selector.cash ? function (el) { - return selector.is(el); - } : - /* Direct comparison */ - function (el, selector) { - return el === selector; - } - ); - } - - function unique(collection) { - return cash(slice.call(collection).filter(function (item, index, self) { - return self.indexOf(item) === index; - })); - } - - cash.extend({ - merge: function (first, second) { - var len = +second.length, - i = first.length, - j = 0; - - for (; j < len; i++, j++) { - first[i] = second[j]; - } - - first.length = i; - return first; - }, - - each: each, - matches: matches, - unique: unique, - isArray: Array.isArray, - isNumeric: function (n) { - return !isNaN(parseFloat(n)) && isFinite(n); - } - - }); - - var uid = cash.uid = "_cash" + Date.now(); - - function getDataCache(node) { - return node[uid] = node[uid] || {}; - } - - function setData(node, key, value) { - return getDataCache(node)[key] = value; - } - - function getData(node, key) { - var c = getDataCache(node); - if (c[key] === undefined) { - c[key] = node.dataset ? node.dataset[key] : cash(node).attr("data-" + key); - } - return c[key]; - } - - function removeData(node, key) { - var c = getDataCache(node); - if (c) { - delete c[key]; - } else if (node.dataset) { - delete node.dataset[key]; - } else { - cash(node).removeAttr("data-" + name); - } - } - - fn.extend({ - data: function (name, value) { - if (isString(name)) { - return value === undefined ? getData(this[0], name) : this.each(function (v) { - return setData(v, name, value); - }); - } - - for (var key in name) { - this.data(key, name[key]); - } - - return this; - }, - - removeData: function (key) { - return this.each(function (v) { - return removeData(v, key); - }); - } - - }); - - var notWhiteMatch = /\S+/g; - - function getClasses(c) { - return isString(c) && c.match(notWhiteMatch); - } - - function hasClass(v, c) { - return v.classList ? v.classList.contains(c) : new RegExp("(^| )" + c + "( |$)", "gi").test(v.className); - } - - function addClass(v, c, spacedName) { - if (v.classList) { - v.classList.add(c); - } else if (spacedName.indexOf(" " + c + " ")) { - v.className += " " + c; - } - } - - function removeClass(v, c) { - if (v.classList) { - v.classList.remove(c); - } else { - v.className = v.className.replace(c, ""); - } - } - - fn.extend({ - addClass: function (c) { - var classes = getClasses(c); - - return classes ? this.each(function (v) { - var spacedName = " " + v.className + " "; - each(classes, function (c) { - addClass(v, c, spacedName); - }); - }) : this; - }, - - attr: function (name, value) { - if (!name) { - return undefined; - } - - if (isString(name)) { - if (value === undefined) { - return this[0] ? this[0].getAttribute ? this[0].getAttribute(name) : this[0][name] : undefined; - } - - return this.each(function (v) { - if (v.setAttribute) { - v.setAttribute(name, value); - } else { - v[name] = value; - } - }); - } - - for (var key in name) { - this.attr(key, name[key]); - } - - return this; - }, - - hasClass: function (c) { - var check = false, - classes = getClasses(c); - if (classes && classes.length) { - this.each(function (v) { - check = hasClass(v, classes[0]); - return !check; - }); - } - return check; - }, - - prop: function (name, value) { - if (isString(name)) { - return value === undefined ? this[0][name] : this.each(function (v) { - v[name] = value; - }); - } - - for (var key in name) { - this.prop(key, name[key]); - } - - return this; - }, - - removeAttr: function (name) { - return this.each(function (v) { - if (v.removeAttribute) { - v.removeAttribute(name); - } else { - delete v[name]; - } - }); - }, - - removeClass: function (c) { - if (!arguments.length) { - return this.attr("class", ""); - } - var classes = getClasses(c); - return classes ? this.each(function (v) { - each(classes, function (c) { - removeClass(v, c); - }); - }) : this; - }, - - removeProp: function (name) { - return this.each(function (v) { - delete v[name]; - }); - }, - - toggleClass: function (c, state) { - if (state !== undefined) { - return this[state ? "addClass" : "removeClass"](c); - } - var classes = getClasses(c); - return classes ? this.each(function (v) { - var spacedName = " " + v.className + " "; - each(classes, function (c) { - if (hasClass(v, c)) { - removeClass(v, c); - } else { - addClass(v, c, spacedName); - } - }); - }) : this; - } }); - - fn.extend({ - add: function (selector, context) { - return unique(cash.merge(this, cash(selector, context))); - }, - - each: function (callback) { - each(this, callback); - return this; - }, - - eq: function (index) { - return cash(this.get(index)); - }, - - filter: function (selector) { - if (!selector) { - return this; - } - - var comparator = isFunction(selector) ? selector : getCompareFunction(selector); - - return cash(filter.call(this, function (e) { - return comparator(e, selector); - })); - }, - - first: function () { - return this.eq(0); - }, - - get: function (index) { - if (index === undefined) { - return slice.call(this); - } - return index < 0 ? this[index + this.length] : this[index]; - }, - - index: function (elem) { - var child = elem ? cash(elem)[0] : this[0], - collection = elem ? this : cash(child).parent().children(); - return slice.call(collection).indexOf(child); - }, - - last: function () { - return this.eq(-1); - } - - }); - - var camelCase = function () { - var camelRegex = /(?:^\w|[A-Z]|\b\w)/g, - whiteSpace = /[\s-_]+/g; - return function (str) { - return str.replace(camelRegex, function (letter, index) { - return letter[index === 0 ? "toLowerCase" : "toUpperCase"](); - }).replace(whiteSpace, ""); - }; - }(); - - var getPrefixedProp = function () { - var cache = {}, - doc = document, - div = doc.createElement("div"), - style = div.style; - - return function (prop) { - prop = camelCase(prop); - if (cache[prop]) { - return cache[prop]; - } - - var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), - prefixes = ["webkit", "moz", "ms", "o"], - props = (prop + " " + prefixes.join(ucProp + " ") + ucProp).split(" "); - - each(props, function (p) { - if (p in style) { - cache[p] = prop = cache[prop] = p; - return false; - } - }); - - return cache[prop]; - }; - }(); - - cash.prefixedProp = getPrefixedProp; - cash.camelCase = camelCase; - - fn.extend({ - css: function (prop, value) { - if (isString(prop)) { - prop = getPrefixedProp(prop); - return arguments.length > 1 ? this.each(function (v) { - return v.style[prop] = value; - }) : win.getComputedStyle(this[0])[prop]; - } - - for (var key in prop) { - this.css(key, prop[key]); - } - - return this; - } - - }); - - function compute(el, prop) { - return parseInt(win.getComputedStyle(el[0], null)[prop], 10) || 0; - } - - each(["Width", "Height"], function (v) { - var lower = v.toLowerCase(); - - fn[lower] = function () { - return this[0].getBoundingClientRect()[lower]; - }; - - fn["inner" + v] = function () { - return this[0]["client" + v]; - }; - - fn["outer" + v] = function (margins) { - return this[0]["offset" + v] + (margins ? compute(this, "margin" + (v === "Width" ? "Left" : "Top")) + compute(this, "margin" + (v === "Width" ? "Right" : "Bottom")) : 0); - }; - }); - - function registerEvent(node, eventName, callback) { - var eventCache = getData(node, "_cashEvents") || setData(node, "_cashEvents", {}); - eventCache[eventName] = eventCache[eventName] || []; - eventCache[eventName].push(callback); - node.addEventListener(eventName, callback); - } - - function removeEvent(node, eventName, callback) { - var events = getData(node, "_cashEvents"), - eventCache = events && events[eventName], - index; - - if (!eventCache) { - return; - } - - if (callback) { - node.removeEventListener(eventName, callback); - index = eventCache.indexOf(callback); - if (index >= 0) { - eventCache.splice(index, 1); - } - } else { - each(eventCache, function (event) { - node.removeEventListener(eventName, event); - }); - eventCache = []; - } - } - - fn.extend({ - off: function (eventName, callback) { - return this.each(function (v) { - return removeEvent(v, eventName, callback); - }); - }, - - on: function (eventName, delegate, callback, runOnce) { - // jshint ignore:line - var originalCallback; - if (!isString(eventName)) { - for (var key in eventName) { - this.on(key, delegate, eventName[key]); - } - return this; - } - - if (isFunction(delegate)) { - callback = delegate; - delegate = null; - } - - if (eventName === "ready") { - onReady(callback); - return this; - } - - if (delegate) { - originalCallback = callback; - callback = function (e) { - var t = e.target; - while (!matches(t, delegate)) { - if (t === this || t === null) { - return t = false; - } - - t = t.parentNode; - } - - if (t) { - originalCallback.call(t, e); - } - }; - } - - return this.each(function (v) { - var finalCallback = callback; - if (runOnce) { - finalCallback = function () { - callback.apply(this, arguments); - removeEvent(v, eventName, finalCallback); - }; - } - registerEvent(v, eventName, finalCallback); - }); - }, - - one: function (eventName, delegate, callback) { - return this.on(eventName, delegate, callback, true); - }, - - ready: onReady, - - /** - * Modified - * Triggers browser event - * @param String eventName - * @param Object data - Add properties to event object - */ - trigger: function (eventName, data) { - if (document.createEvent) { - var evt = document.createEvent('HTMLEvents'); - evt.initEvent(eventName, true, false); - evt = this.extend(evt, data); - return this.each(function (v) { - return v.dispatchEvent(evt); - }); - } - } - - }); - - function encode(name, value) { - return "&" + encodeURIComponent(name) + "=" + encodeURIComponent(value).replace(/%20/g, "+"); - } - - function getSelectMultiple_(el) { - var values = []; - each(el.options, function (o) { - if (o.selected) { - values.push(o.value); - } - }); - return values.length ? values : null; - } - - function getSelectSingle_(el) { - var selectedIndex = el.selectedIndex; - return selectedIndex >= 0 ? el.options[selectedIndex].value : null; - } - - function getValue(el) { - var type = el.type; - if (!type) { - return null; - } - switch (type.toLowerCase()) { - case "select-one": - return getSelectSingle_(el); - case "select-multiple": - return getSelectMultiple_(el); - case "radio": - return el.checked ? el.value : null; - case "checkbox": - return el.checked ? el.value : null; - default: - return el.value ? el.value : null; - } - } - - fn.extend({ - serialize: function () { - var query = ""; - - each(this[0].elements || this, function (el) { - if (el.disabled || el.tagName === "FIELDSET") { - return; - } - var name = el.name; - switch (el.type.toLowerCase()) { - case "file": - case "reset": - case "submit": - case "button": - break; - case "select-multiple": - var values = getValue(el); - if (values !== null) { - each(values, function (value) { - query += encode(name, value); - }); - } - break; - default: - var value = getValue(el); - if (value !== null) { - query += encode(name, value); - } - } - }); - - return query.substr(1); - }, - - val: function (value) { - if (value === undefined) { - return getValue(this[0]); - } - - return this.each(function (v) { - return v.value = value; - }); - } - - }); - - function insertElement(el, child, prepend) { - if (prepend) { - var first = el.childNodes[0]; - el.insertBefore(child, first); - } else { - el.appendChild(child); - } - } - - function insertContent(parent, child, prepend) { - var str = isString(child); - - if (!str && child.length) { - each(child, function (v) { - return insertContent(parent, v, prepend); - }); - return; - } - - each(parent, str ? function (v) { - return v.insertAdjacentHTML(prepend ? "afterbegin" : "beforeend", child); - } : function (v, i) { - return insertElement(v, i === 0 ? child : child.cloneNode(true), prepend); - }); - } - - fn.extend({ - after: function (selector) { - cash(selector).insertAfter(this); - return this; - }, - - append: function (content) { - insertContent(this, content); - return this; - }, - - appendTo: function (parent) { - insertContent(cash(parent), this); - return this; - }, - - before: function (selector) { - cash(selector).insertBefore(this); - return this; - }, - - clone: function () { - return cash(this.map(function (v) { - return v.cloneNode(true); - })); - }, - - empty: function () { - this.html(""); - return this; - }, - - html: function (content) { - if (content === undefined) { - return this[0].innerHTML; - } - var source = content.nodeType ? content[0].outerHTML : content; - return this.each(function (v) { - return v.innerHTML = source; - }); - }, - - insertAfter: function (selector) { - var _this = this; - - cash(selector).each(function (el, i) { - var parent = el.parentNode, - sibling = el.nextSibling; - _this.each(function (v) { - parent.insertBefore(i === 0 ? v : v.cloneNode(true), sibling); - }); - }); - - return this; - }, - - insertBefore: function (selector) { - var _this2 = this; - cash(selector).each(function (el, i) { - var parent = el.parentNode; - _this2.each(function (v) { - parent.insertBefore(i === 0 ? v : v.cloneNode(true), el); - }); - }); - return this; - }, - - prepend: function (content) { - insertContent(this, content, true); - return this; - }, - - prependTo: function (parent) { - insertContent(cash(parent), this, true); - return this; - }, - - remove: function () { - return this.each(function (v) { - if (!!v.parentNode) { - return v.parentNode.removeChild(v); - } - }); - }, - - text: function (content) { - if (content === undefined) { - return this[0].textContent; - } - return this.each(function (v) { - return v.textContent = content; - }); - } - - }); - - var docEl = doc.documentElement; - - fn.extend({ - position: function () { - var el = this[0]; - return { - left: el.offsetLeft, - top: el.offsetTop - }; - }, - - offset: function () { - var rect = this[0].getBoundingClientRect(); - return { - top: rect.top + win.pageYOffset - docEl.clientTop, - left: rect.left + win.pageXOffset - docEl.clientLeft - }; - }, - - offsetParent: function () { - return cash(this[0].offsetParent); - } - - }); - - fn.extend({ - children: function (selector) { - var elems = []; - this.each(function (el) { - push.apply(elems, el.children); - }); - elems = unique(elems); - - return !selector ? elems : elems.filter(function (v) { - return matches(v, selector); - }); - }, - - closest: function (selector) { - if (!selector || this.length < 1) { - return cash(); - } - if (this.is(selector)) { - return this.filter(selector); - } - return this.parent().closest(selector); - }, - - is: function (selector) { - if (!selector) { - return false; - } - - var match = false, - comparator = getCompareFunction(selector); - - this.each(function (el) { - match = comparator(el, selector); - return !match; - }); - - return match; - }, - - find: function (selector) { - if (!selector || selector.nodeType) { - return cash(selector && this.has(selector).length ? selector : null); - } - - var elems = []; - this.each(function (el) { - push.apply(elems, find(selector, el)); - }); - - return unique(elems); - }, - - has: function (selector) { - var comparator = isString(selector) ? function (el) { - return find(selector, el).length !== 0; - } : function (el) { - return el.contains(selector); - }; - - return this.filter(comparator); - }, - - next: function () { - return cash(this[0].nextElementSibling); - }, - - not: function (selector) { - if (!selector) { - return this; - } - - var comparator = getCompareFunction(selector); - - return this.filter(function (el) { - return !comparator(el, selector); - }); - }, - - parent: function () { - var result = []; - - this.each(function (item) { - if (item && item.parentNode) { - result.push(item.parentNode); - } - }); - - return unique(result); - }, - - parents: function (selector) { - var last, - result = []; - - this.each(function (item) { - last = item; - - while (last && last.parentNode && last !== doc.body.parentNode) { - last = last.parentNode; - - if (!selector || selector && matches(last, selector)) { - result.push(last); - } - } - }); - - return unique(result); - }, - - prev: function () { - return cash(this[0].previousElementSibling); - }, - - siblings: function (selector) { - var collection = this.parent().children(selector), - el = this[0]; - - return collection.filter(function (i) { - return i !== el; - }); - } - - }); - - return cash; -}); -; /*! - * Waves v0.7.6 - * http://fian.my.id/Waves - * - * Copyright 2014-2018 Alfiana E. Sibuea and other contributors - * Released under the MIT license - * https://github.com/fians/Waves/blob/master/LICENSE - */ - -;(function (window, factory) { - 'use strict'; - - // AMD. Register as an anonymous module. Wrap in function so we have access - // to root via `this`. - - if (typeof define === 'function' && define.amd) { - define([], function () { - window.Waves = factory.call(window); - document.addEventListener('DOMContentLoaded', function () { - window.Waves.init(); - }, false); - return window.Waves; - }); - } - - // Node. Does not work with strict CommonJS, but only CommonJS-like - // environments that support module.exports, like Node. - else if (typeof exports === 'object') { - module.exports = factory.call(window); - } - - // Browser globals. - else { - window.Waves = factory.call(window); - document.addEventListener('DOMContentLoaded', function () { - window.Waves.init(); - }, false); - } -})(typeof global === 'object' ? global : this, function () { - 'use strict'; - - var Waves = Waves || {}; - var $$ = document.querySelectorAll.bind(document); - var toString = Object.prototype.toString; - var isTouchAvailable = 'ontouchstart' in window; - - /* Feature detection */ - var passiveIfSupported = false; - try { - window.addEventListener("test", null, Object.defineProperty({}, "passive", { - get: function () { - passiveIfSupported = { passive: false }; - } - })); - } catch (err) {} - - // Find exact position of element - function isWindow(obj) { - return obj !== null && obj === obj.window; - } - - function getWindow(elem) { - return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView; - } - - function isObject(value) { - var type = typeof value; - return type === 'function' || type === 'object' && !!value; - } - - function isDOMNode(obj) { - return isObject(obj) && obj.nodeType > 0; - } - - function getWavesElements(nodes) { - var stringRepr = toString.call(nodes); - - if (stringRepr === '[object String]') { - return $$(nodes); - } else if (isObject(nodes) && /^\[object (Array|HTMLCollection|NodeList|Object)\]$/.test(stringRepr) && nodes.hasOwnProperty('length')) { - return nodes; - } else if (isDOMNode(nodes)) { - return [nodes]; - } - - return []; - } - - function offset(elem) { - var docElem, - win, - box = { top: 0, left: 0 }, - doc = elem && elem.ownerDocument; - - docElem = doc.documentElement; - - if (typeof elem.getBoundingClientRect !== typeof undefined) { - box = elem.getBoundingClientRect(); - } - win = getWindow(doc); - return { - top: box.top + win.pageYOffset - docElem.clientTop, - left: box.left + win.pageXOffset - docElem.clientLeft - }; - } - - function convertStyle(styleObj) { - var style = ''; - - for (var prop in styleObj) { - if (styleObj.hasOwnProperty(prop)) { - style += prop + ':' + styleObj[prop] + ';'; - } - } - - return style; - } - - var Effect = { - - // Effect duration - duration: 750, - - // Effect delay (check for scroll before showing effect) - delay: 200, - - show: function (e, element, velocity) { - - // Disable right click - if (e.button === 2) { - return false; - } - - element = element || this; - - // Create ripple - var ripple = document.createElement('div'); - ripple.className = 'waves-ripple waves-rippling'; - element.appendChild(ripple); - - // Get click coordinate and element width - var pos = offset(element); - var relativeY = 0; - var relativeX = 0; - // Support for touch devices - if ('touches' in e && e.touches.length) { - relativeY = e.touches[0].pageY - pos.top; - relativeX = e.touches[0].pageX - pos.left; - } - //Normal case - else { - relativeY = e.pageY - pos.top; - relativeX = e.pageX - pos.left; - } - // Support for synthetic events - relativeX = relativeX >= 0 ? relativeX : 0; - relativeY = relativeY >= 0 ? relativeY : 0; - - var scale = 'scale(' + element.clientWidth / 100 * 3 + ')'; - var translate = 'translate(0,0)'; - - if (velocity) { - translate = 'translate(' + velocity.x + 'px, ' + velocity.y + 'px)'; - } - - // Attach data to element - ripple.setAttribute('data-hold', Date.now()); - ripple.setAttribute('data-x', relativeX); - ripple.setAttribute('data-y', relativeY); - ripple.setAttribute('data-scale', scale); - ripple.setAttribute('data-translate', translate); - - // Set ripple position - var rippleStyle = { - top: relativeY + 'px', - left: relativeX + 'px' - }; - - ripple.classList.add('waves-notransition'); - ripple.setAttribute('style', convertStyle(rippleStyle)); - ripple.classList.remove('waves-notransition'); - - // Scale the ripple - rippleStyle['-webkit-transform'] = scale + ' ' + translate; - rippleStyle['-moz-transform'] = scale + ' ' + translate; - rippleStyle['-ms-transform'] = scale + ' ' + translate; - rippleStyle['-o-transform'] = scale + ' ' + translate; - rippleStyle.transform = scale + ' ' + translate; - rippleStyle.opacity = '1'; - - var duration = e.type === 'mousemove' ? 2500 : Effect.duration; - rippleStyle['-webkit-transition-duration'] = duration + 'ms'; - rippleStyle['-moz-transition-duration'] = duration + 'ms'; - rippleStyle['-o-transition-duration'] = duration + 'ms'; - rippleStyle['transition-duration'] = duration + 'ms'; - - ripple.setAttribute('style', convertStyle(rippleStyle)); - }, - - hide: function (e, element) { - element = element || this; - - var ripples = element.getElementsByClassName('waves-rippling'); - - for (var i = 0, len = ripples.length; i < len; i++) { - removeRipple(e, element, ripples[i]); - } - - if (isTouchAvailable) { - element.removeEventListener('touchend', Effect.hide); - element.removeEventListener('touchcancel', Effect.hide); - } - - element.removeEventListener('mouseup', Effect.hide); - element.removeEventListener('mouseleave', Effect.hide); - } - }; - - /** - * Collection of wrapper for HTML element that only have single tag - * like and - */ - var TagWrapper = { - - // Wrap tag so it can perform the effect - input: function (element) { - - var parent = element.parentNode; - - // If input already have parent just pass through - if (parent.tagName.toLowerCase() === 'i' && parent.classList.contains('waves-effect')) { - return; - } - - // Put element class and style to the specified parent - var wrapper = document.createElement('i'); - wrapper.className = element.className + ' waves-input-wrapper'; - element.className = 'waves-button-input'; - - // Put element as child - parent.replaceChild(wrapper, element); - wrapper.appendChild(element); - - // Apply element color and background color to wrapper - var elementStyle = window.getComputedStyle(element, null); - var color = elementStyle.color; - var backgroundColor = elementStyle.backgroundColor; - - wrapper.setAttribute('style', 'color:' + color + ';background:' + backgroundColor); - element.setAttribute('style', 'background-color:rgba(0,0,0,0);'); - }, - - // Wrap tag so it can perform the effect - img: function (element) { - - var parent = element.parentNode; - - // If input already have parent just pass through - if (parent.tagName.toLowerCase() === 'i' && parent.classList.contains('waves-effect')) { - return; - } - - // Put element as child - var wrapper = document.createElement('i'); - parent.replaceChild(wrapper, element); - wrapper.appendChild(element); - } - }; - - /** - * Hide the effect and remove the ripple. Must be - * a separate function to pass the JSLint... - */ - function removeRipple(e, el, ripple) { - - // Check if the ripple still exist - if (!ripple) { - return; - } - - ripple.classList.remove('waves-rippling'); - - var relativeX = ripple.getAttribute('data-x'); - var relativeY = ripple.getAttribute('data-y'); - var scale = ripple.getAttribute('data-scale'); - var translate = ripple.getAttribute('data-translate'); - - // Get delay beetween mousedown and mouse leave - var diff = Date.now() - Number(ripple.getAttribute('data-hold')); - var delay = 350 - diff; - - if (delay < 0) { - delay = 0; - } - - if (e.type === 'mousemove') { - delay = 150; - } - - // Fade out ripple after delay - var duration = e.type === 'mousemove' ? 2500 : Effect.duration; - - setTimeout(function () { - - var style = { - top: relativeY + 'px', - left: relativeX + 'px', - opacity: '0', - - // Duration - '-webkit-transition-duration': duration + 'ms', - '-moz-transition-duration': duration + 'ms', - '-o-transition-duration': duration + 'ms', - 'transition-duration': duration + 'ms', - '-webkit-transform': scale + ' ' + translate, - '-moz-transform': scale + ' ' + translate, - '-ms-transform': scale + ' ' + translate, - '-o-transform': scale + ' ' + translate, - 'transform': scale + ' ' + translate - }; - - ripple.setAttribute('style', convertStyle(style)); - - setTimeout(function () { - try { - el.removeChild(ripple); - } catch (e) { - return false; - } - }, duration); - }, delay); - } - - /** - * Disable mousedown event for 500ms during and after touch - */ - var TouchHandler = { - - /* uses an integer rather than bool so there's no issues with - * needing to clear timeouts if another touch event occurred - * within the 500ms. Cannot mouseup between touchstart and - * touchend, nor in the 500ms after touchend. */ - touches: 0, - - allowEvent: function (e) { - - var allow = true; - - if (/^(mousedown|mousemove)$/.test(e.type) && TouchHandler.touches) { - allow = false; - } - - return allow; - }, - registerEvent: function (e) { - var eType = e.type; - - if (eType === 'touchstart') { - - TouchHandler.touches += 1; // push - } else if (/^(touchend|touchcancel)$/.test(eType)) { - - setTimeout(function () { - if (TouchHandler.touches) { - TouchHandler.touches -= 1; // pop after 500ms - } - }, 500); - } - } - }; - - /** - * Delegated click handler for .waves-effect element. - * returns null when .waves-effect element not in "click tree" - */ - function getWavesEffectElement(e) { - - if (TouchHandler.allowEvent(e) === false) { - return null; - } - - var element = null; - var target = e.target || e.srcElement; - - while (target.parentElement) { - if (!(target instanceof SVGElement) && target.classList.contains('waves-effect')) { - element = target; - break; - } - target = target.parentElement; - } - - return element; - } - - /** - * Bubble the click and show effect if .waves-effect elem was found - */ - function showEffect(e) { - - // Disable effect if element has "disabled" property on it - // In some cases, the event is not triggered by the current element - // if (e.target.getAttribute('disabled') !== null) { - // return; - // } - - var element = getWavesEffectElement(e); - - if (element !== null) { - - // Make it sure the element has either disabled property, disabled attribute or 'disabled' class - if (element.disabled || element.getAttribute('disabled') || element.classList.contains('disabled')) { - return; - } - - TouchHandler.registerEvent(e); - - if (e.type === 'touchstart' && Effect.delay) { - - var hidden = false; - - var timer = setTimeout(function () { - timer = null; - Effect.show(e, element); - }, Effect.delay); - - var hideEffect = function (hideEvent) { - - // if touch hasn't moved, and effect not yet started: start effect now - if (timer) { - clearTimeout(timer); - timer = null; - Effect.show(e, element); - } - if (!hidden) { - hidden = true; - Effect.hide(hideEvent, element); - } - - removeListeners(); - }; - - var touchMove = function (moveEvent) { - if (timer) { - clearTimeout(timer); - timer = null; - } - hideEffect(moveEvent); - - removeListeners(); - }; - - element.addEventListener('touchmove', touchMove, passiveIfSupported); - element.addEventListener('touchend', hideEffect, passiveIfSupported); - element.addEventListener('touchcancel', hideEffect, passiveIfSupported); - - var removeListeners = function () { - element.removeEventListener('touchmove', touchMove); - element.removeEventListener('touchend', hideEffect); - element.removeEventListener('touchcancel', hideEffect); - }; - } else { - - Effect.show(e, element); - - if (isTouchAvailable) { - element.addEventListener('touchend', Effect.hide, passiveIfSupported); - element.addEventListener('touchcancel', Effect.hide, passiveIfSupported); - } - - element.addEventListener('mouseup', Effect.hide, passiveIfSupported); - element.addEventListener('mouseleave', Effect.hide, passiveIfSupported); - } - } - } - - Waves.init = function (options) { - var body = document.body; - - options = options || {}; - - if ('duration' in options) { - Effect.duration = options.duration; - } - - if ('delay' in options) { - Effect.delay = options.delay; - } - - if (isTouchAvailable) { - body.addEventListener('touchstart', showEffect, passiveIfSupported); - body.addEventListener('touchcancel', TouchHandler.registerEvent, passiveIfSupported); - body.addEventListener('touchend', TouchHandler.registerEvent, passiveIfSupported); - } - - body.addEventListener('mousedown', showEffect, passiveIfSupported); - }; - - /** - * Attach Waves to dynamically loaded inputs, or add .waves-effect and other - * waves classes to a set of elements. Set drag to true if the ripple mouseover - * or skimming effect should be applied to the elements. - */ - Waves.attach = function (elements, classes) { - - elements = getWavesElements(elements); - - if (toString.call(classes) === '[object Array]') { - classes = classes.join(' '); - } - - classes = classes ? ' ' + classes : ''; - - var element, tagName; - - for (var i = 0, len = elements.length; i < len; i++) { - - element = elements[i]; - tagName = element.tagName.toLowerCase(); - - if (['input', 'img'].indexOf(tagName) !== -1) { - TagWrapper[tagName](element); - element = element.parentElement; - } - - if (element.className.indexOf('waves-effect') === -1) { - element.className += ' waves-effect' + classes; - } - } - }; - - /** - * Cause a ripple to appear in an element via code. - */ - Waves.ripple = function (elements, options) { - elements = getWavesElements(elements); - var elementsLen = elements.length; - - options = options || {}; - options.wait = options.wait || 0; - options.position = options.position || null; // default = centre of element - - - if (elementsLen) { - var element, - pos, - off, - centre = {}, - i = 0; - var mousedown = { - type: 'mousedown', - button: 1 - }; - var hideRipple = function (mouseup, element) { - return function () { - Effect.hide(mouseup, element); - }; - }; - - for (; i < elementsLen; i++) { - element = elements[i]; - pos = options.position || { - x: element.clientWidth / 2, - y: element.clientHeight / 2 - }; - - off = offset(element); - centre.x = off.left + pos.x; - centre.y = off.top + pos.y; - - mousedown.pageX = centre.x; - mousedown.pageY = centre.y; - - Effect.show(mousedown, element); - - if (options.wait >= 0 && options.wait !== null) { - var mouseup = { - type: 'mouseup', - button: 1 - }; - - setTimeout(hideRipple(mouseup, element), options.wait); - } - } - } - }; - - /** - * Remove all ripples from an element. - */ - Waves.calm = function (elements) { - elements = getWavesElements(elements); - var mouseup = { - type: 'mouseup', - button: 1 - }; - - for (var i = 0, len = elements.length; i < len; i++) { - Effect.hide(mouseup, elements[i]); - } - }; - - /** - * Deprecated API fallback - */ - Waves.displayEffect = function (options) { - console.error('Waves.displayEffect() has been deprecated and will be removed in future version. Please use Waves.init() to initialize Waves effect'); - Waves.init(options); - }; - - return Waves; -});; -var Component = function () { - /** - * Generic constructor for all components - * @constructor - * @param {Element} el - * @param {Object} options - */ - function Component(classDef, el, options) { - _classCallCheck(this, Component); - - // Display error if el is valid HTML Element - if (!(el instanceof Element)) { - console.error(Error(el + ' is not an HTML Element')); - } - - // If exists, destroy and reinitialize in child - var ins = classDef.getInstance(el); - if (!!ins) { - ins.destroy(); - } - - this.el = el; - this.$el = cash(el); - } - - /** - * Initializes components - * @param {class} classDef - * @param {Element | NodeList | jQuery} els - * @param {Object} options - */ - - - _createClass(Component, null, [{ - key: "init", - value: function init(classDef, els, options) { - var instances = null; - if (els instanceof Element) { - instances = new classDef(els, options); - } else if (!!els && (els.jquery || els.cash || els instanceof NodeList)) { - var instancesArr = []; - for (var i = 0; i < els.length; i++) { - instancesArr.push(new classDef(els[i], options)); - } - instances = instancesArr; - } - - return instances; - } - }]); - - return Component; -}(); - -; // Required for Meteor package, the use of window prevents export by Meteor -(function (window) { - if (window.Package) { - M = {}; - } else { - window.M = {}; - } - - // Check for jQuery - M.jQueryLoaded = !!window.jQuery; -})(window); - -// AMD -if (typeof define === 'function' && define.amd) { - define('M', [], function () { - return M; - }); - - // Common JS -} else if (typeof exports !== 'undefined' && !exports.nodeType) { - if (typeof module !== 'undefined' && !module.nodeType && module.exports) { - exports = module.exports = M; - } - exports.default = M; -} - -M.version = '1.2.2'; - -M.keys = { - TAB: 9, - ENTER: 13, - ESC: 27, - ARROW_UP: 38, - ARROW_DOWN: 40 -}; - -/** - * TabPress Keydown handler - */ -M.tabPressed = false; -M.keyDown = false; -var docHandleKeydown = function (e) { - M.keyDown = true; - if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) { - M.tabPressed = true; - } -}; -var docHandleKeyup = function (e) { - M.keyDown = false; - if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) { - M.tabPressed = false; - } -}; -var docHandleFocus = function (e) { - if (M.keyDown) { - document.body.classList.add('keyboard-focused'); - } -}; -var docHandleBlur = function (e) { - document.body.classList.remove('keyboard-focused'); -}; -document.addEventListener('keydown', docHandleKeydown, true); -document.addEventListener('keyup', docHandleKeyup, true); -document.addEventListener('focus', docHandleFocus, true); -document.addEventListener('blur', docHandleBlur, true); - -/** - * Initialize jQuery wrapper for plugin - * @param {Class} plugin javascript class - * @param {string} pluginName jQuery plugin name - * @param {string} classRef Class reference name - */ -M.initializeJqueryWrapper = function (plugin, pluginName, classRef) { - jQuery.fn[pluginName] = function (methodOrOptions) { - // Call plugin method if valid method name is passed in - if (plugin.prototype[methodOrOptions]) { - var params = Array.prototype.slice.call(arguments, 1); - - // Getter methods - if (methodOrOptions.slice(0, 3) === 'get') { - var instance = this.first()[0][classRef]; - return instance[methodOrOptions].apply(instance, params); - } - - // Void methods - return this.each(function () { - var instance = this[classRef]; - instance[methodOrOptions].apply(instance, params); - }); - - // Initialize plugin if options or no argument is passed in - } else if (typeof methodOrOptions === 'object' || !methodOrOptions) { - plugin.init(this, arguments[0]); - return this; - } - - // Return error if an unrecognized method name is passed in - jQuery.error("Method " + methodOrOptions + " does not exist on jQuery." + pluginName); - }; -}; - -/** - * Automatically initialize components - * @param {Element} context DOM Element to search within for components - */ -M.AutoInit = function (context) { - // Use document.body if no context is given - var root = !!context ? context : document.body; - - var registry = { - Autocomplete: root.querySelectorAll('.autocomplete:not(.no-autoinit)'), - Carousel: root.querySelectorAll('.carousel:not(.no-autoinit)'), - Chips: root.querySelectorAll('.chips:not(.no-autoinit)'), - Collapsible: root.querySelectorAll('.collapsible:not(.no-autoinit)'), - Datepicker: root.querySelectorAll('.datepicker:not(.no-autoinit)'), - Dropdown: root.querySelectorAll('.dropdown-trigger:not(.no-autoinit)'), - Materialbox: root.querySelectorAll('.materialboxed:not(.no-autoinit)'), - Modal: root.querySelectorAll('.modal:not(.no-autoinit)'), - Parallax: root.querySelectorAll('.parallax:not(.no-autoinit)'), - Pushpin: root.querySelectorAll('.pushpin:not(.no-autoinit)'), - ScrollSpy: root.querySelectorAll('.scrollspy:not(.no-autoinit)'), - FormSelect: root.querySelectorAll('select:not(.no-autoinit)'), - Sidenav: root.querySelectorAll('.sidenav:not(.no-autoinit)'), - Tabs: root.querySelectorAll('.tabs:not(.no-autoinit)'), - TapTarget: root.querySelectorAll('.tap-target:not(.no-autoinit)'), - Timepicker: root.querySelectorAll('.timepicker:not(.no-autoinit)'), - Tooltip: root.querySelectorAll('.tooltipped:not(.no-autoinit)'), - FloatingActionButton: root.querySelectorAll('.fixed-action-btn:not(.no-autoinit)') - }; - - for (var pluginName in registry) { - var plugin = M[pluginName]; - plugin.init(registry[pluginName]); - } -}; - -/** - * Generate approximated selector string for a jQuery object - * @param {jQuery} obj jQuery object to be parsed - * @returns {string} - */ -M.objectSelectorString = function (obj) { - var tagStr = obj.prop('tagName') || ''; - var idStr = obj.attr('id') || ''; - var classStr = obj.attr('class') || ''; - return (tagStr + idStr + classStr).replace(/\s/g, ''); -}; - -// Unique Random ID -M.guid = function () { - function s4() { - return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); - } - return function () { - return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); - }; -}(); - -/** - * @typedef {Object} Edges - * @property {Boolean} top If the top edge was exceeded - * @property {Boolean} right If the right edge was exceeded - * @property {Boolean} bottom If the bottom edge was exceeded - * @property {Boolean} left If the left edge was exceeded - */ - -/** - * @typedef {Object} Bounding - * @property {Number} left left offset coordinate - * @property {Number} top top offset coordinate - * @property {Number} width - * @property {Number} height - */ - -/** - * Escapes hash from special characters - * @param {Element} container Container element that acts as the boundary - * @param {Bounding} bounding element bounding that is being checked - * @param {Number} offset offset from edge that counts as exceeding - * @returns {Edges} - */ -M.checkWithinContainer = function (container, bounding, offset) { - var edges = { - top: false, - right: false, - bottom: false, - left: false - }; - - var containerRect = container.getBoundingClientRect(); - // If body element is smaller than viewport, use viewport height instead. - var containerBottom = container === document.body ? Math.max(containerRect.bottom, window.innerHeight) : containerRect.bottom; - - var scrollLeft = container.scrollLeft; - var scrollTop = container.scrollTop; - - var scrolledX = bounding.left - scrollLeft; - var scrolledY = bounding.top - scrollTop; - - // Check for container and viewport for each edge - if (scrolledX < containerRect.left + offset || scrolledX < offset) { - edges.left = true; - } - - if (scrolledX + bounding.width > containerRect.right - offset || scrolledX + bounding.width > window.innerWidth - offset) { - edges.right = true; - } - - if (scrolledY < containerRect.top + offset || scrolledY < offset) { - edges.top = true; - } - - if (scrolledY + bounding.height > containerBottom - offset || scrolledY + bounding.height > window.innerHeight - offset) { - edges.bottom = true; - } - - return edges; -}; - -M.checkPossibleAlignments = function (el, container, bounding, offset) { - var canAlign = { - top: true, - right: true, - bottom: true, - left: true, - spaceOnTop: null, - spaceOnRight: null, - spaceOnBottom: null, - spaceOnLeft: null - }; - - var containerAllowsOverflow = getComputedStyle(container).overflow === 'visible'; - var containerRect = container.getBoundingClientRect(); - var containerHeight = Math.min(containerRect.height, window.innerHeight); - var containerWidth = Math.min(containerRect.width, window.innerWidth); - var elOffsetRect = el.getBoundingClientRect(); - - var scrollLeft = container.scrollLeft; - var scrollTop = container.scrollTop; - - var scrolledX = bounding.left - scrollLeft; - var scrolledYTopEdge = bounding.top - scrollTop; - var scrolledYBottomEdge = bounding.top + elOffsetRect.height - scrollTop; - - // Check for container and viewport for left - canAlign.spaceOnRight = !containerAllowsOverflow ? containerWidth - (scrolledX + bounding.width) : window.innerWidth - (elOffsetRect.left + bounding.width); - if (canAlign.spaceOnRight < 0) { - canAlign.left = false; - } - - // Check for container and viewport for Right - canAlign.spaceOnLeft = !containerAllowsOverflow ? scrolledX - bounding.width + elOffsetRect.width : elOffsetRect.right - bounding.width; - if (canAlign.spaceOnLeft < 0) { - canAlign.right = false; - } - - // Check for container and viewport for Top - canAlign.spaceOnBottom = !containerAllowsOverflow ? containerHeight - (scrolledYTopEdge + bounding.height + offset) : window.innerHeight - (elOffsetRect.top + bounding.height + offset); - if (canAlign.spaceOnBottom < 0) { - canAlign.top = false; - } - - // Check for container and viewport for Bottom - canAlign.spaceOnTop = !containerAllowsOverflow ? scrolledYBottomEdge - (bounding.height - offset) : elOffsetRect.bottom - (bounding.height + offset); - if (canAlign.spaceOnTop < 0) { - canAlign.bottom = false; - } - - return canAlign; -}; - -M.getOverflowParent = function (element) { - if (element == null) { - return null; - } - - if (element === document.body || getComputedStyle(element).overflow !== 'visible') { - return element; - } - - return M.getOverflowParent(element.parentElement); -}; - -/** - * Gets id of component from a trigger - * @param {Element} trigger trigger - * @returns {string} - */ -M.getIdFromTrigger = function (trigger) { - var id = trigger.getAttribute('data-target'); - if (!id) { - id = trigger.getAttribute('href'); - if (id) { - id = id.slice(1); - } else { - id = ''; - } - } - return id; -}; - -/** - * Multi browser support for document scroll top - * @returns {Number} - */ -M.getDocumentScrollTop = function () { - return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; -}; - -/** - * Multi browser support for document scroll left - * @returns {Number} - */ -M.getDocumentScrollLeft = function () { - return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; -}; - -/** - * @typedef {Object} Edges - * @property {Boolean} top If the top edge was exceeded - * @property {Boolean} right If the right edge was exceeded - * @property {Boolean} bottom If the bottom edge was exceeded - * @property {Boolean} left If the left edge was exceeded - */ - -/** - * @typedef {Object} Bounding - * @property {Number} left left offset coordinate - * @property {Number} top top offset coordinate - * @property {Number} width - * @property {Number} height - */ - -/** - * Get time in ms - * @license https://raw.github.com/jashkenas/underscore/master/LICENSE - * @type {function} - * @return {number} - */ -var getTime = Date.now || function () { - return new Date().getTime(); -}; - -/** - * Returns a function, that, when invoked, will only be triggered at most once - * during a given window of time. Normally, the throttled function will run - * as much as it can, without ever going more than once per `wait` duration; - * but if you'd like to disable the execution on the leading edge, pass - * `{leading: false}`. To disable execution on the trailing edge, ditto. - * @license https://raw.github.com/jashkenas/underscore/master/LICENSE - * @param {function} func - * @param {number} wait - * @param {Object=} options - * @returns {Function} - */ -M.throttle = function (func, wait, options) { - var context = void 0, - args = void 0, - result = void 0; - var timeout = null; - var previous = 0; - options || (options = {}); - var later = function () { - previous = options.leading === false ? 0 : getTime(); - timeout = null; - result = func.apply(context, args); - context = args = null; - }; - return function () { - var now = getTime(); - if (!previous && options.leading === false) previous = now; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; -}; - -/* Feature detection */ -var passiveIfSupported = false; -try { - window.addEventListener('test', null, Object.defineProperty({}, 'passive', { - get: function () { - passiveIfSupported = { passive: false }; - } - })); -} catch (err) {} -; /* - v2.2.0 - 2017 Julian Garnier - Released under the MIT license - */ -var $jscomp = { scope: {} };$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function (e, r, p) { - if (p.get || p.set) throw new TypeError("ES3 does not support getters and setters.");e != Array.prototype && e != Object.prototype && (e[r] = p.value); -};$jscomp.getGlobal = function (e) { - return "undefined" != typeof window && window === e ? e : "undefined" != typeof global && null != global ? global : e; -};$jscomp.global = $jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX = "jscomp_symbol_"; -$jscomp.initSymbol = function () { - $jscomp.initSymbol = function () {};$jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol); -};$jscomp.symbolCounter_ = 0;$jscomp.Symbol = function (e) { - return $jscomp.SYMBOL_PREFIX + (e || "") + $jscomp.symbolCounter_++; -}; -$jscomp.initSymbolIterator = function () { - $jscomp.initSymbol();var e = $jscomp.global.Symbol.iterator;e || (e = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator"));"function" != typeof Array.prototype[e] && $jscomp.defineProperty(Array.prototype, e, { configurable: !0, writable: !0, value: function () { - return $jscomp.arrayIterator(this); - } });$jscomp.initSymbolIterator = function () {}; -};$jscomp.arrayIterator = function (e) { - var r = 0;return $jscomp.iteratorPrototype(function () { - return r < e.length ? { done: !1, value: e[r++] } : { done: !0 }; - }); -}; -$jscomp.iteratorPrototype = function (e) { - $jscomp.initSymbolIterator();e = { next: e };e[$jscomp.global.Symbol.iterator] = function () { - return this; - };return e; -};$jscomp.array = $jscomp.array || {};$jscomp.iteratorFromArray = function (e, r) { - $jscomp.initSymbolIterator();e instanceof String && (e += "");var p = 0, - m = { next: function () { - if (p < e.length) { - var u = p++;return { value: r(u, e[u]), done: !1 }; - }m.next = function () { - return { done: !0, value: void 0 }; - };return m.next(); - } };m[Symbol.iterator] = function () { - return m; - };return m; -}; -$jscomp.polyfill = function (e, r, p, m) { - if (r) { - p = $jscomp.global;e = e.split(".");for (m = 0; m < e.length - 1; m++) { - var u = e[m];u in p || (p[u] = {});p = p[u]; - }e = e[e.length - 1];m = p[e];r = r(m);r != m && null != r && $jscomp.defineProperty(p, e, { configurable: !0, writable: !0, value: r }); - } -};$jscomp.polyfill("Array.prototype.keys", function (e) { - return e ? e : function () { - return $jscomp.iteratorFromArray(this, function (e) { - return e; - }); - }; -}, "es6-impl", "es3");var $jscomp$this = this; -(function (r) { - M.anime = r(); -})(function () { - function e(a) { - if (!h.col(a)) try { - return document.querySelectorAll(a); - } catch (c) {} - }function r(a, c) { - for (var d = a.length, b = 2 <= arguments.length ? arguments[1] : void 0, f = [], n = 0; n < d; n++) { - if (n in a) { - var k = a[n];c.call(b, k, n, a) && f.push(k); - } - }return f; - }function p(a) { - return a.reduce(function (a, d) { - return a.concat(h.arr(d) ? p(d) : d); - }, []); - }function m(a) { - if (h.arr(a)) return a; - h.str(a) && (a = e(a) || a);return a instanceof NodeList || a instanceof HTMLCollection ? [].slice.call(a) : [a]; - }function u(a, c) { - return a.some(function (a) { - return a === c; - }); - }function C(a) { - var c = {}, - d;for (d in a) { - c[d] = a[d]; - }return c; - }function D(a, c) { - var d = C(a), - b;for (b in a) { - d[b] = c.hasOwnProperty(b) ? c[b] : a[b]; - }return d; - }function z(a, c) { - var d = C(a), - b;for (b in c) { - d[b] = h.und(a[b]) ? c[b] : a[b]; - }return d; - }function T(a) { - a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, c, d, k) { - return c + c + d + d + k + k; - });var c = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a); - a = parseInt(c[1], 16);var d = parseInt(c[2], 16), - c = parseInt(c[3], 16);return "rgba(" + a + "," + d + "," + c + ",1)"; - }function U(a) { - function c(a, c, b) { - 0 > b && (b += 1);1 < b && --b;return b < 1 / 6 ? a + 6 * (c - a) * b : .5 > b ? c : b < 2 / 3 ? a + (c - a) * (2 / 3 - b) * 6 : a; - }var d = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a = parseInt(d[1]) / 360;var b = parseInt(d[2]) / 100, - f = parseInt(d[3]) / 100, - d = d[4] || 1;if (0 == b) f = b = a = f;else { - var n = .5 > f ? f * (1 + b) : f + b - f * b, - k = 2 * f - n, - f = c(k, n, a + 1 / 3), - b = c(k, n, a);a = c(k, n, a - 1 / 3); - }return "rgba(" + 255 * f + "," + 255 * b + "," + 255 * a + "," + d + ")"; - }function y(a) { - if (a = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a)) return a[2]; - }function V(a) { - if (-1 < a.indexOf("translate") || "perspective" === a) return "px";if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg"; - }function I(a, c) { - return h.fnc(a) ? a(c.target, c.id, c.total) : a; - }function E(a, c) { - if (c in a.style) return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0"; - }function J(a, c) { - if (h.dom(a) && u(W, c)) return "transform";if (h.dom(a) && (a.getAttribute(c) || h.svg(a) && a[c])) return "attribute";if (h.dom(a) && "transform" !== c && E(a, c)) return "css";if (null != a[c]) return "object"; - }function X(a, c) { - var d = V(c), - d = -1 < c.indexOf("scale") ? 1 : 0 + d;a = a.style.transform;if (!a) return d;for (var b = [], f = [], n = [], k = /(\w+)\((.+?)\)/g; b = k.exec(a);) { - f.push(b[1]), n.push(b[2]); - }a = r(n, function (a, b) { - return f[b] === c; - });return a.length ? a[0] : d; - }function K(a, c) { - switch (J(a, c)) {case "transform": - return X(a, c);case "css": - return E(a, c);case "attribute": - return a.getAttribute(c);}return a[c] || 0; - }function L(a, c) { - var d = /^(\*=|\+=|-=)/.exec(a);if (!d) return a;var b = y(a) || 0;c = parseFloat(c);a = parseFloat(a.replace(d[0], ""));switch (d[0][0]) {case "+": - return c + a + b;case "-": - return c - a + b;case "*": - return c * a + b;} - }function F(a, c) { - return Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2)); - }function M(a) { - a = a.points;for (var c = 0, d, b = 0; b < a.numberOfItems; b++) { - var f = a.getItem(b);0 < b && (c += F(d, f));d = f; - }return c; - }function N(a) { - if (a.getTotalLength) return a.getTotalLength();switch (a.tagName.toLowerCase()) {case "circle": - return 2 * Math.PI * a.getAttribute("r");case "rect": - return 2 * a.getAttribute("width") + 2 * a.getAttribute("height");case "line": - return F({ x: a.getAttribute("x1"), y: a.getAttribute("y1") }, { x: a.getAttribute("x2"), y: a.getAttribute("y2") });case "polyline": - return M(a);case "polygon": - var c = a.points;return M(a) + F(c.getItem(c.numberOfItems - 1), c.getItem(0));} - }function Y(a, c) { - function d(b) { - b = void 0 === b ? 0 : b;return a.el.getPointAtLength(1 <= c + b ? c + b : 0); - }var b = d(), - f = d(-1), - n = d(1);switch (a.property) {case "x": - return b.x;case "y": - return b.y; - case "angle": - return 180 * Math.atan2(n.y - f.y, n.x - f.x) / Math.PI;} - }function O(a, c) { - var d = /-?\d*\.?\d+/g, - b;b = h.pth(a) ? a.totalLength : a;if (h.col(b)) { - if (h.rgb(b)) { - var f = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b = f ? "rgba(" + f[1] + ",1)" : b; - } else b = h.hex(b) ? T(b) : h.hsl(b) ? U(b) : void 0; - } else f = (f = y(b)) ? b.substr(0, b.length - f.length) : b, b = c && !/\s/g.test(b) ? f + c : f;b += "";return { original: b, numbers: b.match(d) ? b.match(d).map(Number) : [0], strings: h.str(a) || c ? b.split(d) : [] }; - }function P(a) { - a = a ? p(h.arr(a) ? a.map(m) : m(a)) : [];return r(a, function (a, d, b) { - return b.indexOf(a) === d; - }); - }function Z(a) { - var c = P(a);return c.map(function (a, b) { - return { target: a, id: b, total: c.length }; - }); - }function aa(a, c) { - var d = C(c);if (h.arr(a)) { - var b = a.length;2 !== b || h.obj(a[0]) ? h.fnc(c.duration) || (d.duration = c.duration / b) : a = { value: a }; - }return m(a).map(function (a, b) { - b = b ? 0 : c.delay;a = h.obj(a) && !h.pth(a) ? a : { value: a };h.und(a.delay) && (a.delay = b);return a; - }).map(function (a) { - return z(a, d); - }); - }function ba(a, c) { - var d = {}, - b;for (b in a) { - var f = I(a[b], c);h.arr(f) && (f = f.map(function (a) { - return I(a, c); - }), 1 === f.length && (f = f[0]));d[b] = f; - }d.duration = parseFloat(d.duration);d.delay = parseFloat(d.delay);return d; - }function ca(a) { - return h.arr(a) ? A.apply(this, a) : Q[a]; - }function da(a, c) { - var d;return a.tweens.map(function (b) { - b = ba(b, c);var f = b.value, - e = K(c.target, a.name), - k = d ? d.to.original : e, - k = h.arr(f) ? f[0] : k, - w = L(h.arr(f) ? f[1] : f, k), - e = y(w) || y(k) || y(e);b.from = O(k, e);b.to = O(w, e);b.start = d ? d.end : a.offset;b.end = b.start + b.delay + b.duration;b.easing = ca(b.easing);b.elasticity = (1E3 - Math.min(Math.max(b.elasticity, 1), 999)) / 1E3;b.isPath = h.pth(f);b.isColor = h.col(b.from.original);b.isColor && (b.round = 1);return d = b; - }); - }function ea(a, c) { - return r(p(a.map(function (a) { - return c.map(function (b) { - var c = J(a.target, b.name);if (c) { - var d = da(b, a);b = { type: c, property: b.name, animatable: a, tweens: d, duration: d[d.length - 1].end, delay: d[0].delay }; - } else b = void 0;return b; - }); - })), function (a) { - return !h.und(a); - }); - }function R(a, c, d, b) { - var f = "delay" === a;return c.length ? (f ? Math.min : Math.max).apply(Math, c.map(function (b) { - return b[a]; - })) : f ? b.delay : d.offset + b.delay + b.duration; - }function fa(a) { - var c = D(ga, a), - d = D(S, a), - b = Z(a.targets), - f = [], - e = z(c, d), - k;for (k in a) { - e.hasOwnProperty(k) || "targets" === k || f.push({ name: k, offset: e.offset, tweens: aa(a[k], d) }); - }a = ea(b, f);return z(c, { children: [], animatables: b, animations: a, duration: R("duration", a, c, d), delay: R("delay", a, c, d) }); - }function q(a) { - function c() { - return window.Promise && new Promise(function (a) { - return p = a; - }); - }function d(a) { - return g.reversed ? g.duration - a : a; - }function b(a) { - for (var b = 0, c = {}, d = g.animations, f = d.length; b < f;) { - var e = d[b], - k = e.animatable, - h = e.tweens, - n = h.length - 1, - l = h[n];n && (l = r(h, function (b) { - return a < b.end; - })[0] || l);for (var h = Math.min(Math.max(a - l.start - l.delay, 0), l.duration) / l.duration, w = isNaN(h) ? 1 : l.easing(h, l.elasticity), h = l.to.strings, p = l.round, n = [], m = void 0, m = l.to.numbers.length, t = 0; t < m; t++) { - var x = void 0, - x = l.to.numbers[t], - q = l.from.numbers[t], - x = l.isPath ? Y(l.value, w * x) : q + w * (x - q);p && (l.isColor && 2 < t || (x = Math.round(x * p) / p));n.push(x); - }if (l = h.length) for (m = h[0], w = 0; w < l; w++) { - p = h[w + 1], t = n[w], isNaN(t) || (m = p ? m + (t + p) : m + (t + " ")); - } else m = n[0];ha[e.type](k.target, e.property, m, c, k.id);e.currentValue = m;b++; - }if (b = Object.keys(c).length) for (d = 0; d < b; d++) { - H || (H = E(document.body, "transform") ? "transform" : "-webkit-transform"), g.animatables[d].target.style[H] = c[d].join(" "); - }g.currentTime = a;g.progress = a / g.duration * 100; - }function f(a) { - if (g[a]) g[a](g); - }function e() { - g.remaining && !0 !== g.remaining && g.remaining--; - }function k(a) { - var k = g.duration, - n = g.offset, - w = n + g.delay, - r = g.currentTime, - x = g.reversed, - q = d(a);if (g.children.length) { - var u = g.children, - v = u.length; - if (q >= g.currentTime) for (var G = 0; G < v; G++) { - u[G].seek(q); - } else for (; v--;) { - u[v].seek(q); - } - }if (q >= w || !k) g.began || (g.began = !0, f("begin")), f("run");if (q > n && q < k) b(q);else if (q <= n && 0 !== r && (b(0), x && e()), q >= k && r !== k || !k) b(k), x || e();f("update");a >= k && (g.remaining ? (t = h, "alternate" === g.direction && (g.reversed = !g.reversed)) : (g.pause(), g.completed || (g.completed = !0, f("complete"), "Promise" in window && (p(), m = c()))), l = 0); - }a = void 0 === a ? {} : a;var h, - t, - l = 0, - p = null, - m = c(), - g = fa(a);g.reset = function () { - var a = g.direction, - c = g.loop;g.currentTime = 0;g.progress = 0;g.paused = !0;g.began = !1;g.completed = !1;g.reversed = "reverse" === a;g.remaining = "alternate" === a && 1 === c ? 2 : c;b(0);for (a = g.children.length; a--;) { - g.children[a].reset(); - } - };g.tick = function (a) { - h = a;t || (t = h);k((l + h - t) * q.speed); - };g.seek = function (a) { - k(d(a)); - };g.pause = function () { - var a = v.indexOf(g);-1 < a && v.splice(a, 1);g.paused = !0; - };g.play = function () { - g.paused && (g.paused = !1, t = 0, l = d(g.currentTime), v.push(g), B || ia()); - };g.reverse = function () { - g.reversed = !g.reversed;t = 0;l = d(g.currentTime); - };g.restart = function () { - g.pause(); - g.reset();g.play(); - };g.finished = m;g.reset();g.autoplay && g.play();return g; - }var ga = { update: void 0, begin: void 0, run: void 0, complete: void 0, loop: 1, direction: "normal", autoplay: !0, offset: 0 }, - S = { duration: 1E3, delay: 0, easing: "easeOutElastic", elasticity: 500, round: 0 }, - W = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "), - H, - h = { arr: function (a) { - return Array.isArray(a); - }, obj: function (a) { - return -1 < Object.prototype.toString.call(a).indexOf("Object"); - }, - pth: function (a) { - return h.obj(a) && a.hasOwnProperty("totalLength"); - }, svg: function (a) { - return a instanceof SVGElement; - }, dom: function (a) { - return a.nodeType || h.svg(a); - }, str: function (a) { - return "string" === typeof a; - }, fnc: function (a) { - return "function" === typeof a; - }, und: function (a) { - return "undefined" === typeof a; - }, hex: function (a) { - return (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a) - ); - }, rgb: function (a) { - return (/^rgb/.test(a) - ); - }, hsl: function (a) { - return (/^hsl/.test(a) - ); - }, col: function (a) { - return h.hex(a) || h.rgb(a) || h.hsl(a); - } }, - A = function () { - function a(a, d, b) { - return (((1 - 3 * b + 3 * d) * a + (3 * b - 6 * d)) * a + 3 * d) * a; - }return function (c, d, b, f) { - if (0 <= c && 1 >= c && 0 <= b && 1 >= b) { - var e = new Float32Array(11);if (c !== d || b !== f) for (var k = 0; 11 > k; ++k) { - e[k] = a(.1 * k, c, b); - }return function (k) { - if (c === d && b === f) return k;if (0 === k) return 0;if (1 === k) return 1;for (var h = 0, l = 1; 10 !== l && e[l] <= k; ++l) { - h += .1; - }--l;var l = h + (k - e[l]) / (e[l + 1] - e[l]) * .1, - n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (.001 <= n) { - for (h = 0; 4 > h; ++h) { - n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (0 === n) break;var m = a(l, c, b) - k, - l = l - m / n; - }k = l; - } else if (0 === n) k = l;else { - var l = h, - h = h + .1, - g = 0;do { - m = l + (h - l) / 2, n = a(m, c, b) - k, 0 < n ? h = m : l = m; - } while (1e-7 < Math.abs(n) && 10 > ++g);k = m; - }return a(k, d, f); - }; - } - }; - }(), - Q = function () { - function a(a, b) { - return 0 === a || 1 === a ? a : -Math.pow(2, 10 * (a - 1)) * Math.sin(2 * (a - 1 - b / (2 * Math.PI) * Math.asin(1)) * Math.PI / b); - }var c = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "), - d = { In: [[.55, .085, .68, .53], [.55, .055, .675, .19], [.895, .03, .685, .22], [.755, .05, .855, .06], [.47, 0, .745, .715], [.95, .05, .795, .035], [.6, .04, .98, .335], [.6, -.28, .735, .045], a], Out: [[.25, .46, .45, .94], [.215, .61, .355, 1], [.165, .84, .44, 1], [.23, 1, .32, 1], [.39, .575, .565, 1], [.19, 1, .22, 1], [.075, .82, .165, 1], [.175, .885, .32, 1.275], function (b, c) { - return 1 - a(1 - b, c); - }], InOut: [[.455, .03, .515, .955], [.645, .045, .355, 1], [.77, 0, .175, 1], [.86, 0, .07, 1], [.445, .05, .55, .95], [1, 0, 0, 1], [.785, .135, .15, .86], [.68, -.55, .265, 1.55], function (b, c) { - return .5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2; - }] }, - b = { linear: A(.25, .25, .75, .75) }, - f = {}, - e;for (e in d) { - f.type = e, d[f.type].forEach(function (a) { - return function (d, f) { - b["ease" + a.type + c[f]] = h.fnc(d) ? d : A.apply($jscomp$this, d); - }; - }(f)), f = { type: f.type }; - }return b; - }(), - ha = { css: function (a, c, d) { - return a.style[c] = d; - }, attribute: function (a, c, d) { - return a.setAttribute(c, d); - }, object: function (a, c, d) { - return a[c] = d; - }, transform: function (a, c, d, b, f) { - b[f] || (b[f] = []);b[f].push(c + "(" + d + ")"); - } }, - v = [], - B = 0, - ia = function () { - function a() { - B = requestAnimationFrame(c); - }function c(c) { - var b = v.length;if (b) { - for (var d = 0; d < b;) { - v[d] && v[d].tick(c), d++; - }a(); - } else cancelAnimationFrame(B), B = 0; - }return a; - }();q.version = "2.2.0";q.speed = 1;q.running = v;q.remove = function (a) { - a = P(a);for (var c = v.length; c--;) { - for (var d = v[c], b = d.animations, f = b.length; f--;) { - u(a, b[f].animatable.target) && (b.splice(f, 1), b.length || d.pause()); - } - } - };q.getValue = K;q.path = function (a, c) { - var d = h.str(a) ? e(a)[0] : a, - b = c || 100;return function (a) { - return { el: d, property: a, totalLength: N(d) * (b / 100) }; - }; - };q.setDashoffset = function (a) { - var c = N(a);a.setAttribute("stroke-dasharray", c);return c; - };q.bezier = A;q.easings = Q;q.timeline = function (a) { - var c = q(a);c.pause();c.duration = 0;c.add = function (d) { - c.children.forEach(function (a) { - a.began = !0;a.completed = !0; - });m(d).forEach(function (b) { - var d = z(b, D(S, a || {}));d.targets = d.targets || a.targets;b = c.duration;var e = d.offset;d.autoplay = !1;d.direction = c.direction;d.offset = h.und(e) ? b : L(e, b);c.began = !0;c.completed = !0;c.seek(d.offset);d = q(d);d.began = !0;d.completed = !0;d.duration > b && (c.duration = d.duration);c.children.push(d); - });c.seek(0);c.reset();c.autoplay && c.restart();return c; - };return c; - };q.random = function (a, c) { - return Math.floor(Math.random() * (c - a + 1)) + a; - };return q; -}); -;(function ($, anim) { - 'use strict'; - - var _defaults = { - accordion: true, - onOpenStart: undefined, - onOpenEnd: undefined, - onCloseStart: undefined, - onCloseEnd: undefined, - inDuration: 300, - outDuration: 300 - }; - - /** - * @class - * - */ - - var Collapsible = function (_Component) { - _inherits(Collapsible, _Component); - - /** - * Construct Collapsible instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - function Collapsible(el, options) { - _classCallCheck(this, Collapsible); - - var _this3 = _possibleConstructorReturn(this, (Collapsible.__proto__ || Object.getPrototypeOf(Collapsible)).call(this, Collapsible, el, options)); - - _this3.el.M_Collapsible = _this3; - - /** - * Options for the collapsible - * @member Collapsible#options - * @prop {Boolean} [accordion=false] - Type of the collapsible - * @prop {Function} onOpenStart - Callback function called before collapsible is opened - * @prop {Function} onOpenEnd - Callback function called after collapsible is opened - * @prop {Function} onCloseStart - Callback function called before collapsible is closed - * @prop {Function} onCloseEnd - Callback function called after collapsible is closed - * @prop {Number} inDuration - Transition in duration in milliseconds. - * @prop {Number} outDuration - Transition duration in milliseconds. - */ - _this3.options = $.extend({}, Collapsible.defaults, options); - - // Setup tab indices - _this3.$headers = _this3.$el.children('li').children('.collapsible-header'); - _this3.$headers.attr('tabindex', 0); - - _this3._setupEventHandlers(); - - // Open first active - var $activeBodies = _this3.$el.children('li.active').children('.collapsible-body'); - if (_this3.options.accordion) { - // Handle Accordion - $activeBodies.first().css('display', 'block'); - } else { - // Handle Expandables - $activeBodies.css('display', 'block'); - } - return _this3; - } - - _createClass(Collapsible, [{ - key: "destroy", - - - /** - * Teardown component - */ - value: function destroy() { - this._removeEventHandlers(); - this.el.M_Collapsible = undefined; - } - - /** - * Setup Event Handlers - */ - - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - var _this4 = this; - - this._handleCollapsibleClickBound = this._handleCollapsibleClick.bind(this); - this._handleCollapsibleKeydownBound = this._handleCollapsibleKeydown.bind(this); - this.el.addEventListener('click', this._handleCollapsibleClickBound); - this.$headers.each(function (header) { - header.addEventListener('keydown', _this4._handleCollapsibleKeydownBound); - }); - } - - /** - * Remove Event Handlers - */ - - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - var _this5 = this; - - this.el.removeEventListener('click', this._handleCollapsibleClickBound); - this.$headers.each(function (header) { - header.removeEventListener('keydown', _this5._handleCollapsibleKeydownBound); - }); - } - - /** - * Handle Collapsible Click - * @param {Event} e - */ - - }, { - key: "_handleCollapsibleClick", - value: function _handleCollapsibleClick(e) { - var $header = $(e.target).closest('.collapsible-header'); - if (e.target && $header.length) { - var $collapsible = $header.closest('.collapsible'); - if ($collapsible[0] === this.el) { - var $collapsibleLi = $header.closest('li'); - var $collapsibleLis = $collapsible.children('li'); - var isActive = $collapsibleLi[0].classList.contains('active'); - var index = $collapsibleLis.index($collapsibleLi); - - if (isActive) { - this.close(index); - } else { - this.open(index); - } - } - } - } - - /** - * Handle Collapsible Keydown - * @param {Event} e - */ - - }, { - key: "_handleCollapsibleKeydown", - value: function _handleCollapsibleKeydown(e) { - if (e.keyCode === 13) { - this._handleCollapsibleClickBound(e); - } - } - - /** - * Animate in collapsible slide - * @param {Number} index - 0th index of slide - */ - - }, { - key: "_animateIn", - value: function _animateIn(index) { - var _this6 = this; - - var $collapsibleLi = this.$el.children('li').eq(index); - if ($collapsibleLi.length) { - var $body = $collapsibleLi.children('.collapsible-body'); - - anim.remove($body[0]); - $body.css({ - display: 'block', - overflow: 'hidden', - height: 0, - paddingTop: '', - paddingBottom: '' - }); - - var pTop = $body.css('padding-top'); - var pBottom = $body.css('padding-bottom'); - var finalHeight = $body[0].scrollHeight; - $body.css({ - paddingTop: 0, - paddingBottom: 0 - }); - - anim({ - targets: $body[0], - height: finalHeight, - paddingTop: pTop, - paddingBottom: pBottom, - duration: this.options.inDuration, - easing: 'easeInOutCubic', - complete: function (anim) { - $body.css({ - overflow: '', - paddingTop: '', - paddingBottom: '', - height: '' - }); - - // onOpenEnd callback - if (typeof _this6.options.onOpenEnd === 'function') { - _this6.options.onOpenEnd.call(_this6, $collapsibleLi[0]); - } - } - }); - } - } - - /** - * Animate out collapsible slide - * @param {Number} index - 0th index of slide to open - */ - - }, { - key: "_animateOut", - value: function _animateOut(index) { - var _this7 = this; - - var $collapsibleLi = this.$el.children('li').eq(index); - if ($collapsibleLi.length) { - var $body = $collapsibleLi.children('.collapsible-body'); - anim.remove($body[0]); - $body.css('overflow', 'hidden'); - anim({ - targets: $body[0], - height: 0, - paddingTop: 0, - paddingBottom: 0, - duration: this.options.outDuration, - easing: 'easeInOutCubic', - complete: function () { - $body.css({ - height: '', - overflow: '', - padding: '', - display: '' - }); - - // onCloseEnd callback - if (typeof _this7.options.onCloseEnd === 'function') { - _this7.options.onCloseEnd.call(_this7, $collapsibleLi[0]); - } - } - }); - } - } - - /** - * Open Collapsible - * @param {Number} index - 0th index of slide - */ - - }, { - key: "open", - value: function open(index) { - var _this8 = this; - - var $collapsibleLi = this.$el.children('li').eq(index); - if ($collapsibleLi.length && !$collapsibleLi[0].classList.contains('active')) { - // onOpenStart callback - if (typeof this.options.onOpenStart === 'function') { - this.options.onOpenStart.call(this, $collapsibleLi[0]); - } - - // Handle accordion behavior - if (this.options.accordion) { - var $collapsibleLis = this.$el.children('li'); - var $activeLis = this.$el.children('li.active'); - $activeLis.each(function (el) { - var index = $collapsibleLis.index($(el)); - _this8.close(index); - }); - } - - // Animate in - $collapsibleLi[0].classList.add('active'); - this._animateIn(index); - } - } - - /** - * Close Collapsible - * @param {Number} index - 0th index of slide - */ - - }, { - key: "close", - value: function close(index) { - var $collapsibleLi = this.$el.children('li').eq(index); - if ($collapsibleLi.length && $collapsibleLi[0].classList.contains('active')) { - // onCloseStart callback - if (typeof this.options.onCloseStart === 'function') { - this.options.onCloseStart.call(this, $collapsibleLi[0]); - } - - // Animate out - $collapsibleLi[0].classList.remove('active'); - this._animateOut(index); - } - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(Collapsible.__proto__ || Object.getPrototypeOf(Collapsible), "init", this).call(this, this, els, options); - } - - /** - * Get Instance - */ - - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_Collapsible; - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return Collapsible; - }(Component); - - M.Collapsible = Collapsible; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Collapsible, 'collapsible', 'M_Collapsible'); - } -})(cash, M.anime); -;(function ($, anim) { - 'use strict'; - - var _defaults = { - alignment: 'left', - autoFocus: true, - constrainWidth: true, - container: null, - coverTrigger: true, - closeOnClick: true, - hover: false, - inDuration: 150, - outDuration: 250, - onOpenStart: null, - onOpenEnd: null, - onCloseStart: null, - onCloseEnd: null, - onItemClick: null - }; - - /** - * @class - */ - - var Dropdown = function (_Component2) { - _inherits(Dropdown, _Component2); - - function Dropdown(el, options) { - _classCallCheck(this, Dropdown); - - var _this9 = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, Dropdown, el, options)); - - _this9.el.M_Dropdown = _this9; - Dropdown._dropdowns.push(_this9); - - _this9.id = M.getIdFromTrigger(el); - _this9.dropdownEl = document.getElementById(_this9.id); - _this9.$dropdownEl = $(_this9.dropdownEl); - - /** - * Options for the dropdown - * @member Dropdown#options - * @prop {String} [alignment='left'] - Edge which the dropdown is aligned to - * @prop {Boolean} [autoFocus=true] - Automatically focus dropdown el for keyboard - * @prop {Boolean} [constrainWidth=true] - Constrain width to width of the button - * @prop {Element} container - Container element to attach dropdown to (optional) - * @prop {Boolean} [coverTrigger=true] - Place dropdown over trigger - * @prop {Boolean} [closeOnClick=true] - Close on click of dropdown item - * @prop {Boolean} [hover=false] - Open dropdown on hover - * @prop {Number} [inDuration=150] - Duration of open animation in ms - * @prop {Number} [outDuration=250] - Duration of close animation in ms - * @prop {Function} onOpenStart - Function called when dropdown starts opening - * @prop {Function} onOpenEnd - Function called when dropdown finishes opening - * @prop {Function} onCloseStart - Function called when dropdown starts closing - * @prop {Function} onCloseEnd - Function called when dropdown finishes closing - */ - _this9.options = $.extend({}, Dropdown.defaults, options); - - /** - * Describes open/close state of dropdown - * @type {Boolean} - */ - _this9.isOpen = false; - - /** - * Describes if dropdown content is scrollable - * @type {Boolean} - */ - _this9.isScrollable = false; - - /** - * Describes if touch moving on dropdown content - * @type {Boolean} - */ - _this9.isTouchMoving = false; - - _this9.focusedIndex = -1; - _this9.filterQuery = []; - - // Move dropdown-content after dropdown-trigger - _this9._moveDropdown(); - - _this9._makeDropdownFocusable(); - _this9._resetFilterQueryBound = _this9._resetFilterQuery.bind(_this9); - _this9._handleDocumentClickBound = _this9._handleDocumentClick.bind(_this9); - _this9._handleDocumentTouchmoveBound = _this9._handleDocumentTouchmove.bind(_this9); - _this9._handleDropdownClickBound = _this9._handleDropdownClick.bind(_this9); - _this9._handleDropdownKeydownBound = _this9._handleDropdownKeydown.bind(_this9); - _this9._handleTriggerKeydownBound = _this9._handleTriggerKeydown.bind(_this9); - _this9._setupEventHandlers(); - return _this9; - } - - _createClass(Dropdown, [{ - key: "destroy", - - - /** - * Teardown component - */ - value: function destroy() { - this._resetDropdownStyles(); - this._removeEventHandlers(); - Dropdown._dropdowns.splice(Dropdown._dropdowns.indexOf(this), 1); - this.el.M_Dropdown = undefined; - } - - /** - * Setup Event Handlers - */ - - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - // Trigger keydown handler - this.el.addEventListener('keydown', this._handleTriggerKeydownBound); - - // Item click handler - this.dropdownEl.addEventListener('click', this._handleDropdownClickBound); - - // Hover event handlers - if (this.options.hover) { - this._handleMouseEnterBound = this._handleMouseEnter.bind(this); - this.el.addEventListener('mouseenter', this._handleMouseEnterBound); - this._handleMouseLeaveBound = this._handleMouseLeave.bind(this); - this.el.addEventListener('mouseleave', this._handleMouseLeaveBound); - this.dropdownEl.addEventListener('mouseleave', this._handleMouseLeaveBound); - - // Click event handlers - } else { - this._handleClickBound = this._handleClick.bind(this); - this.el.addEventListener('click', this._handleClickBound); - } - } - - /** - * Remove Event Handlers - */ - - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - this.el.removeEventListener('keydown', this._handleTriggerKeydownBound); - this.dropdownEl.removeEventListener('click', this._handleDropdownClickBound); - - if (this.options.hover) { - this.el.removeEventListener('mouseenter', this._handleMouseEnterBound); - this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound); - this.dropdownEl.removeEventListener('mouseleave', this._handleMouseLeaveBound); - } else { - this.el.removeEventListener('click', this._handleClickBound); - } - } - }, { - key: "_setupTemporaryEventHandlers", - value: function _setupTemporaryEventHandlers() { - // Use capture phase event handler to prevent click - document.body.addEventListener('click', this._handleDocumentClickBound, true); - document.body.addEventListener('touchmove', this._handleDocumentTouchmoveBound); - this.dropdownEl.addEventListener('keydown', this._handleDropdownKeydownBound); - } - }, { - key: "_removeTemporaryEventHandlers", - value: function _removeTemporaryEventHandlers() { - // Use capture phase event handler to prevent click - document.body.removeEventListener('click', this._handleDocumentClickBound, true); - document.body.removeEventListener('touchmove', this._handleDocumentTouchmoveBound); - this.dropdownEl.removeEventListener('keydown', this._handleDropdownKeydownBound); - } - }, { - key: "_handleClick", - value: function _handleClick(e) { - e.preventDefault(); - this.open(); - } - }, { - key: "_handleMouseEnter", - value: function _handleMouseEnter() { - this.open(); - } - }, { - key: "_handleMouseLeave", - value: function _handleMouseLeave(e) { - var toEl = e.toElement || e.relatedTarget; - var leaveToDropdownContent = !!$(toEl).closest('.dropdown-content').length; - var leaveToActiveDropdownTrigger = false; - - var $closestTrigger = $(toEl).closest('.dropdown-trigger'); - if ($closestTrigger.length && !!$closestTrigger[0].M_Dropdown && $closestTrigger[0].M_Dropdown.isOpen) { - leaveToActiveDropdownTrigger = true; - } - - // Close hover dropdown if mouse did not leave to either active dropdown-trigger or dropdown-content - if (!leaveToActiveDropdownTrigger && !leaveToDropdownContent) { - this.close(); - } - } - }, { - key: "_handleDocumentClick", - value: function _handleDocumentClick(e) { - var _this10 = this; - - var $target = $(e.target); - if (this.options.closeOnClick && $target.closest('.dropdown-content').length && !this.isTouchMoving) { - // isTouchMoving to check if scrolling on mobile. - setTimeout(function () { - _this10.close(); - }, 0); - } else if ($target.closest('.dropdown-trigger').length || !$target.closest('.dropdown-content').length) { - setTimeout(function () { - _this10.close(); - }, 0); - } - this.isTouchMoving = false; - } - }, { - key: "_handleTriggerKeydown", - value: function _handleTriggerKeydown(e) { - // ARROW DOWN OR ENTER WHEN SELECT IS CLOSED - open Dropdown - if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ENTER) && !this.isOpen) { - e.preventDefault(); - this.open(); - } - } - - /** - * Handle Document Touchmove - * @param {Event} e - */ - - }, { - key: "_handleDocumentTouchmove", - value: function _handleDocumentTouchmove(e) { - var $target = $(e.target); - if ($target.closest('.dropdown-content').length) { - this.isTouchMoving = true; - } - } - - /** - * Handle Dropdown Click - * @param {Event} e - */ - - }, { - key: "_handleDropdownClick", - value: function _handleDropdownClick(e) { - // onItemClick callback - if (typeof this.options.onItemClick === 'function') { - var itemEl = $(e.target).closest('li')[0]; - this.options.onItemClick.call(this, itemEl); - } - } - - /** - * Handle Dropdown Keydown - * @param {Event} e - */ - - }, { - key: "_handleDropdownKeydown", - value: function _handleDropdownKeydown(e) { - if (e.which === M.keys.TAB) { - e.preventDefault(); - this.close(); - - // Navigate down dropdown list - } else if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) && this.isOpen) { - e.preventDefault(); - var direction = e.which === M.keys.ARROW_DOWN ? 1 : -1; - var newFocusedIndex = this.focusedIndex; - var foundNewIndex = false; - do { - newFocusedIndex = newFocusedIndex + direction; - - if (!!this.dropdownEl.children[newFocusedIndex] && this.dropdownEl.children[newFocusedIndex].tabIndex !== -1) { - foundNewIndex = true; - break; - } - } while (newFocusedIndex < this.dropdownEl.children.length && newFocusedIndex >= 0); - - if (foundNewIndex) { - // Remove active class from old element - if (this.focusedIndex >= 0) this.dropdownEl.children[this.focusedIndex].classList.remove('active'); - this.focusedIndex = newFocusedIndex; - this._focusFocusedItem(); - } - - // ENTER selects choice on focused item - } else if (e.which === M.keys.ENTER && this.isOpen) { - // Search for and \n "); - _this42.$indicators.append($indicator[0]); - }); - this.$el.append(this.$indicators[0]); - this.$indicators = this.$indicators.children('li.indicator-item'); - } - } - - /** - * Remove indicators - */ - - }, { - key: "_removeIndicators", - value: function _removeIndicators() { - this.$el.find('ul.indicators').remove(); - } - - /** - * Cycle to nth item - * @param {Number} index - */ - - }, { - key: "set", - value: function set(index) { - var _this43 = this; - - // Wrap around indices. - if (index >= this.$slides.length) index = 0;else if (index < 0) index = this.$slides.length - 1; - - // Only do if index changes - if (this.activeIndex != index) { - this.$active = this.$slides.eq(this.activeIndex); - var $caption = this.$active.find('.caption'); - this.$active.removeClass('active'); - // Enables every slide - this.$slides.css('visibility', 'visible'); - - anim({ - targets: this.$active[0], - opacity: 0, - duration: this.options.duration, - easing: 'easeOutQuad', - complete: function () { - _this43.$slides.not('.active').each(function (el) { - anim({ - targets: el, - opacity: 0, - translateX: 0, - translateY: 0, - duration: 0, - easing: 'easeOutQuad' - }); - // Disables invisible slides (for assistive technologies) - el.style.visibility = 'hidden'; - }); - } - }); - - this._animateCaptionIn($caption[0], this.options.duration); - - // Update indicators - if (this.options.indicators) { - var activeIndicator = this.$indicators.eq(this.activeIndex).children().first(); - var nextIndicator = this.$indicators.eq(index).children().first(); - activeIndicator.removeClass('active'); - nextIndicator.addClass('active'); - if (typeof this.options.indicatorLabelFunc === "function") { - activeIndicator.attr('aria-label', this.options.indicatorLabelFunc.call(this, this.$indicators.eq(this.activeIndex).index(), false)); - nextIndicator.attr('aria-label', this.options.indicatorLabelFunc.call(this, this.$indicators.eq(index).index(), true)); - } - } - - anim({ - targets: this.$slides.eq(index)[0], - opacity: 1, - duration: this.options.duration, - easing: 'easeOutQuad' - }); - - anim({ - targets: this.$slides.eq(index).find('.caption')[0], - opacity: 1, - translateX: 0, - translateY: 0, - duration: this.options.duration, - delay: this.options.duration, - easing: 'easeOutQuad' - }); - - this.$slides.eq(index).addClass('active'); - if (this._focusCurrent) { - this.$slides.eq(index)[0].focus(); - this._focusCurrent = false; - } - this.activeIndex = index; - - // Reset interval, if allowed. This check prevents autostart - // when slider is paused, since it can be changed though indicators. - if (this.interval != null) { - this.start(); - } - } - } - - /** - * "Protected" function which pauses current interval - * @param {boolean} fromEvent Specifies if request came from event - */ - - }, { - key: "_pause", - value: function _pause(fromEvent) { - clearInterval(this.interval); - this.eventPause = fromEvent; - this.interval = null; - } - - /** - * Pause slider interval - */ - - }, { - key: "pause", - value: function pause() { - this._pause(false); - } - - /** - * Start slider interval - */ - - }, { - key: "start", - value: function start() { - clearInterval(this.interval); - this.interval = setInterval(this._handleIntervalBound, this.options.duration + this.options.interval); - this.eventPause = false; - } - - /** - * Move to next slide - */ - - }, { - key: "next", - value: function next() { - var newIndex = this.activeIndex + 1; - - // Wrap around indices. - if (newIndex >= this.$slides.length) newIndex = 0;else if (newIndex < 0) newIndex = this.$slides.length - 1; - - this.set(newIndex); - } - - /** - * Move to previous slide - */ - - }, { - key: "prev", - value: function prev() { - var newIndex = this.activeIndex - 1; - - // Wrap around indices. - if (newIndex >= this.$slides.length) newIndex = 0;else if (newIndex < 0) newIndex = this.$slides.length - 1; - - this.set(newIndex); - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(Slider.__proto__ || Object.getPrototypeOf(Slider), "init", this).call(this, this, els, options); - } - - /** - * Get Instance - */ - - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_Slider; - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return Slider; - }(Component); - - M.Slider = Slider; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Slider, 'slider', 'M_Slider'); - } -})(cash, M.anime); -;(function ($, anim) { - $(document).on('click', '.card', function (e) { - if ($(this).children('.card-reveal').length) { - var $card = $(e.target).closest('.card'); - if ($card.data('initialOverflow') === undefined) { - $card.data('initialOverflow', $card.css('overflow') === undefined ? '' : $card.css('overflow')); - } - var $cardReveal = $(this).find('.card-reveal'); - if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) { - // Make Reveal animate down and display none - anim({ - targets: $cardReveal[0], - translateY: 0, - duration: 225, - easing: 'easeInOutQuad', - complete: function (anim) { - var el = anim.animatables[0].target; - $(el).css({ display: 'none' }); - $card.css('overflow', $card.data('initialOverflow')); - } - }); - } else if ($(e.target).is($('.card .activator')) || $(e.target).is($('.card .activator i'))) { - $card.css('overflow', 'hidden'); - $cardReveal.css({ display: 'block' }); - anim({ - targets: $cardReveal[0], - translateY: '-100%', - duration: 300, - easing: 'easeInOutQuad' - }); - } - } - }); -})(cash, M.anime); -;(function ($) { - 'use strict'; - - var _defaults = { - data: [], - placeholder: '', - secondaryPlaceholder: '', - autocompleteOptions: {}, - autocompleteOnly: false, - limit: Infinity, - onChipAdd: null, - onChipSelect: null, - onChipDelete: null - }; - - var Chips = function (_Component12) { - _inherits(Chips, _Component12); - - function Chips(el, options) { - _classCallCheck(this, Chips); - - var _this44 = _possibleConstructorReturn(this, (Chips.__proto__ || Object.getPrototypeOf(Chips)).call(this, Chips, el, options)); - - _this44.el.M_Chips = _this44; - _this44.options = $.extend({}, Chips.defaults, options); - - _this44.$el.addClass('chips input-field'); - _this44.chipsData = []; - _this44.$chips = $(); - _this44._setupInput(); - _this44.hasAutocomplete = Object.keys(_this44.options.autocompleteOptions).length > 0; - // Set input id - if (!_this44.$input.attr('id')) { - _this44.$input.attr('id', M.guid()); - } - // Render initial chips - if (_this44.options.data.length) { - _this44.chipsData = _this44.options.data; - _this44._renderChips(_this44.chipsData); - } - // Setup autocomplete if needed - if (_this44.hasAutocomplete) { - _this44._setupAutocomplete(); - } - _this44._setPlaceholder(); - _this44._setupLabel(); - _this44._setupEventHandlers(); - return _this44; - } - - _createClass(Chips, [{ - key: "getData", - value: function getData() { - return this.chipsData; - } - }, { - key: "destroy", - value: function destroy() { - this._removeEventHandlers(); - this.$chips.remove(); - this.el.M_Chips = undefined; - } - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - this._handleChipClickBound = this._handleChipClick.bind(this); - this._handleInputKeydownBound = this._handleInputKeydown.bind(this); - this._handleInputFocusBound = this._handleInputFocus.bind(this); - this._handleInputBlurBound = this._handleInputBlur.bind(this); - - this.el.addEventListener('click', this._handleChipClickBound); - document.addEventListener('keydown', Chips._handleChipsKeydown); - document.addEventListener('keyup', Chips._handleChipsKeyup); - this.el.addEventListener('blur', Chips._handleChipsBlur, true); - this.$input[0].addEventListener('focus', this._handleInputFocusBound); - this.$input[0].addEventListener('blur', this._handleInputBlurBound); - this.$input[0].addEventListener('keydown', this._handleInputKeydownBound); - } - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - this.el.removeEventListener('click', this._handleChipClickBound); - document.removeEventListener('keydown', Chips._handleChipsKeydown); - document.removeEventListener('keyup', Chips._handleChipsKeyup); - this.el.removeEventListener('blur', Chips._handleChipsBlur, true); - this.$input[0].removeEventListener('focus', this._handleInputFocusBound); - this.$input[0].removeEventListener('blur', this._handleInputBlurBound); - this.$input[0].removeEventListener('keydown', this._handleInputKeydownBound); - } - }, { - key: "_handleChipClick", - value: function _handleChipClick(e) { - var $chip = $(e.target).closest('.chip'); - var clickedClose = $(e.target).is('.close'); - if ($chip.length) { - var index = $chip.index(); - if (clickedClose) { - // delete chip - this.deleteChip(index); - this.$input[0].focus(); - } else { - // select chip - this.selectChip(index); - } - - // Default handle click to focus on input - } else { - this.$input[0].focus(); - } - } - }, { - key: "_handleInputFocus", - value: function _handleInputFocus() { - this.$el.addClass('focus'); - } - }, { - key: "_handleInputBlur", - value: function _handleInputBlur() { - this.$el.removeClass('focus'); - } - }, { - key: "_handleInputKeydown", - value: function _handleInputKeydown(e) { - Chips._keydown = true; - // enter - if (e.keyCode === 13) { - // Override enter if autocompleting. - if (this.hasAutocomplete && this.autocomplete && this.autocomplete.isOpen) { - return; - } - e.preventDefault(); - if (!this.hasAutocomplete || this.hasAutocomplete && !this.options.autocompleteOnly) { - this.addChip({ id: this.$input[0].value }); - } - this.$input[0].value = ''; - // delete or left - } else if ((e.keyCode === 8 || e.keyCode === 37) && this.$input[0].value === '' && this.chipsData.length) { - e.preventDefault(); - this.selectChip(this.chipsData.length - 1); - } - } - }, { - key: "_renderChip", - value: function _renderChip(chip) { - if (!chip.id) return; - var renderedChip = document.createElement('div'); - var closeIcon = document.createElement('i'); - renderedChip.classList.add('chip'); - renderedChip.textContent = chip.text || chip.id; - renderedChip.setAttribute('tabindex', 0); - $(closeIcon).addClass('material-icons close'); - closeIcon.textContent = 'close'; - // attach image if needed - if (chip.image) { - var img = document.createElement('img'); - img.setAttribute('src', chip.image); - renderedChip.insertBefore(img, renderedChip.firstChild); - } - renderedChip.appendChild(closeIcon); - return renderedChip; - } - }, { - key: "_renderChips", - value: function _renderChips() { - this.$chips.remove(); - for (var i = 0; i < this.chipsData.length; i++) { - var chipEl = this._renderChip(this.chipsData[i]); - this.$el.append(chipEl); - this.$chips.add(chipEl); - } - // move input to end - this.$el.append(this.$input[0]); - } - }, { - key: "_setupAutocomplete", - value: function _setupAutocomplete() { - var _this45 = this; - - this.options.autocompleteOptions.onAutocomplete = function (items) { - if (items.length > 0) { - _this45.addChip(items[0]); - } - _this45.$input[0].value = ''; - _this45.$input[0].focus(); - }; - - this.autocomplete = M.Autocomplete.init(this.$input[0], this.options.autocompleteOptions); - } - }, { - key: "_setupInput", - value: function _setupInput() { - this.$input = this.$el.find('input'); - if (!this.$input.length) { - this.$input = $(''); - this.$el.append(this.$input); - } - this.$input.addClass('input'); - } - }, { - key: "_setupLabel", - value: function _setupLabel() { - this.$label = this.$el.find('label'); - if (this.$label.length) { - this.$label[0].setAttribute('for', this.$input.attr('id')); - } - } - }, { - key: "_setPlaceholder", - value: function _setPlaceholder() { - if (this.chipsData !== undefined && !this.chipsData.length && this.options.placeholder) { - $(this.$input).prop('placeholder', this.options.placeholder); - } else if ((this.chipsData === undefined || !!this.chipsData.length) && this.options.secondaryPlaceholder) { - $(this.$input).prop('placeholder', this.options.secondaryPlaceholder); - } - } - }, { - key: "_isValidAndNotExist", - value: function _isValidAndNotExist(chip) { - var isValid = !!chip.id; - var doesNotExist = !this.chipsData.some(function (item) { - return item.id == chip.id; - }); - return isValid && doesNotExist; - } - }, { - key: "addChip", - value: function addChip(chip) { - if (!this._isValidAndNotExist(chip) || this.chipsData.length >= this.options.limit) { - return; - } - var renderedChip = this._renderChip(chip); - this.$chips.add(renderedChip); - this.chipsData.push(chip); - $(this.$input).before(renderedChip); - this._setPlaceholder(); - // fire chipAdd callback - if (typeof this.options.onChipAdd === 'function') { - this.options.onChipAdd.call(this, this.$el, renderedChip); - } - } - }, { - key: "deleteChip", - value: function deleteChip(chipIndex) { - var $chip = this.$chips.eq(chipIndex); - this.$chips.eq(chipIndex).remove(); - this.$chips = this.$chips.filter(function (el) { - return $(el).index() >= 0; - }); - this.chipsData.splice(chipIndex, 1); - this._setPlaceholder(); - - // fire chipDelete callback - if (typeof this.options.onChipDelete === 'function') { - this.options.onChipDelete.call(this, this.$el, $chip[0]); - } - } - }, { - key: "selectChip", - value: function selectChip(chipIndex) { - var $chip = this.$chips.eq(chipIndex); - this._selectedChip = $chip; - $chip[0].focus(); - - // fire chipSelect callback - if (typeof this.options.onChipSelect === 'function') { - this.options.onChipSelect.call(this, this.$el, $chip[0]); - } - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(Chips.__proto__ || Object.getPrototypeOf(Chips), "init", this).call(this, this, els, options); - } - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_Chips; - } - }, { - key: "_handleChipsKeydown", - value: function _handleChipsKeydown(e) { - Chips._keydown = true; - - var $chips = $(e.target).closest('.chips'); - var chipsKeydown = e.target && $chips.length; - - // Don't handle keydown inputs on input and textarea - if ($(e.target).is('input, textarea') || !chipsKeydown) { - return; - } - - var currChips = $chips[0].M_Chips; - - // backspace and delete - if (e.keyCode === 8 || e.keyCode === 46) { - e.preventDefault(); - - var selectIndex = currChips.chipsData.length; - if (currChips._selectedChip) { - var index = currChips._selectedChip.index(); - currChips.deleteChip(index); - currChips._selectedChip = null; - - // Make sure selectIndex doesn't go negative - selectIndex = Math.max(index - 1, 0); - } - - if (currChips.chipsData.length) { - currChips.selectChip(selectIndex); - } else { - currChips.$input[0].focus(); - } - - // left arrow key - } else if (e.keyCode === 37) { - if (currChips._selectedChip) { - var _selectIndex = currChips._selectedChip.index() - 1; - if (_selectIndex < 0) { - return; - } - currChips.selectChip(_selectIndex); - } - - // right arrow key - } else if (e.keyCode === 39) { - if (currChips._selectedChip) { - var _selectIndex2 = currChips._selectedChip.index() + 1; - - if (_selectIndex2 >= currChips.chipsData.length) { - currChips.$input[0].focus(); - } else { - currChips.selectChip(_selectIndex2); - } - } - } - } - }, { - key: "_handleChipsKeyup", - value: function _handleChipsKeyup(e) { - Chips._keydown = false; - } - }, { - key: "_handleChipsBlur", - value: function _handleChipsBlur(e) { - if (!Chips._keydown && document.hidden) { - var $chips = $(e.target).closest('.chips'); - var currChips = $chips[0].M_Chips; - currChips._selectedChip = null; - } - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return Chips; - }(Component); - - Chips._keydown = false; - - M.Chips = Chips; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Chips, 'chips', 'M_Chips'); - } - - $(document).ready(function () { - // Handle removal of static chips. - $(document.body).on('click', '.chip .close', function () { - var $chips = $(this).closest('.chips'); - if ($chips.length && $chips[0].M_Chips) { - return; - } - $(this).closest('.chip').remove(); - }); - }); -})(cash); -;(function ($) { - 'use strict'; - - var _defaults = { - top: 0, - bottom: Infinity, - offset: 0, - onPositionChange: null - }; - - /** - * @class - * - */ - - var Pushpin = function (_Component13) { - _inherits(Pushpin, _Component13); - - /** - * Construct Pushpin instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - function Pushpin(el, options) { - _classCallCheck(this, Pushpin); - - var _this46 = _possibleConstructorReturn(this, (Pushpin.__proto__ || Object.getPrototypeOf(Pushpin)).call(this, Pushpin, el, options)); - - _this46.el.M_Pushpin = _this46; - - /** - * Options for the modal - * @member Pushpin#options - */ - _this46.options = $.extend({}, Pushpin.defaults, options); - - _this46.originalOffset = _this46.el.offsetTop; - Pushpin._pushpins.push(_this46); - _this46._setupEventHandlers(); - _this46._updatePosition(); - return _this46; - } - - _createClass(Pushpin, [{ - key: "destroy", - - - /** - * Teardown component - */ - value: function destroy() { - this.el.style.top = null; - this._removePinClasses(); - - // Remove pushpin Inst - var index = Pushpin._pushpins.indexOf(this); - Pushpin._pushpins.splice(index, 1); - if (Pushpin._pushpins.length === 0) { - this._removeEventHandlers(); - } - this.el.M_Pushpin = undefined; - } - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - document.addEventListener('scroll', Pushpin._updateElements); - } - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - document.removeEventListener('scroll', Pushpin._updateElements); - } - }, { - key: "_updatePosition", - value: function _updatePosition() { - var scrolled = M.getDocumentScrollTop() + this.options.offset; - - if (this.options.top <= scrolled && this.options.bottom >= scrolled && !this.el.classList.contains('pinned')) { - this._removePinClasses(); - this.el.style.top = this.options.offset + "px"; - this.el.classList.add('pinned'); - - // onPositionChange callback - if (typeof this.options.onPositionChange === 'function') { - this.options.onPositionChange.call(this, 'pinned'); - } - } - - // Add pin-top (when scrolled position is above top) - if (scrolled < this.options.top && !this.el.classList.contains('pin-top')) { - this._removePinClasses(); - this.el.style.top = 0; - this.el.classList.add('pin-top'); - - // onPositionChange callback - if (typeof this.options.onPositionChange === 'function') { - this.options.onPositionChange.call(this, 'pin-top'); - } - } - - // Add pin-bottom (when scrolled position is below bottom) - if (scrolled > this.options.bottom && !this.el.classList.contains('pin-bottom')) { - this._removePinClasses(); - this.el.classList.add('pin-bottom'); - this.el.style.top = this.options.bottom - this.originalOffset + "px"; - - // onPositionChange callback - if (typeof this.options.onPositionChange === 'function') { - this.options.onPositionChange.call(this, 'pin-bottom'); - } - } - } - }, { - key: "_removePinClasses", - value: function _removePinClasses() { - // IE 11 bug (can't remove multiple classes in one line) - this.el.classList.remove('pin-top'); - this.el.classList.remove('pinned'); - this.el.classList.remove('pin-bottom'); - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(Pushpin.__proto__ || Object.getPrototypeOf(Pushpin), "init", this).call(this, this, els, options); - } - - /** - * Get Instance - */ - - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_Pushpin; - } - }, { - key: "_updateElements", - value: function _updateElements() { - for (var elIndex in Pushpin._pushpins) { - var pInstance = Pushpin._pushpins[elIndex]; - pInstance._updatePosition(); - } - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return Pushpin; - }(Component); - - /** - * @static - * @memberof Pushpin - */ - - - Pushpin._pushpins = []; - - M.Pushpin = Pushpin; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Pushpin, 'pushpin', 'M_Pushpin'); - } -})(cash); -;(function ($, anim) { - 'use strict'; - - var _defaults = { - direction: 'top', - hoverEnabled: true, - toolbarEnabled: false - }; - - $.fn.reverse = [].reverse; - - /** - * @class - * - */ - - var FloatingActionButton = function (_Component14) { - _inherits(FloatingActionButton, _Component14); - - /** - * Construct FloatingActionButton instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - function FloatingActionButton(el, options) { - _classCallCheck(this, FloatingActionButton); - - var _this47 = _possibleConstructorReturn(this, (FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton)).call(this, FloatingActionButton, el, options)); - - _this47.el.M_FloatingActionButton = _this47; - - /** - * Options for the fab - * @member FloatingActionButton#options - * @prop {Boolean} [direction] - Direction fab menu opens - * @prop {Boolean} [hoverEnabled=true] - Enable hover vs click - * @prop {Boolean} [toolbarEnabled=false] - Enable toolbar transition - */ - _this47.options = $.extend({}, FloatingActionButton.defaults, options); - - _this47.isOpen = false; - _this47.$anchor = _this47.$el.children('a').first(); - _this47.$menu = _this47.$el.children('ul').first(); - _this47.$floatingBtns = _this47.$el.find('ul .btn-floating'); - _this47.$floatingBtnsReverse = _this47.$el.find('ul .btn-floating').reverse(); - _this47.offsetY = 0; - _this47.offsetX = 0; - - _this47.$el.addClass("direction-" + _this47.options.direction); - if (_this47.options.direction === 'top') { - _this47.offsetY = 40; - } else if (_this47.options.direction === 'right') { - _this47.offsetX = -40; - } else if (_this47.options.direction === 'bottom') { - _this47.offsetY = -40; - } else { - _this47.offsetX = 40; - } - _this47._setupEventHandlers(); - return _this47; - } - - _createClass(FloatingActionButton, [{ - key: "destroy", - - - /** - * Teardown component - */ - value: function destroy() { - this._removeEventHandlers(); - this.el.M_FloatingActionButton = undefined; - } - - /** - * Setup Event Handlers - */ - - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - this._handleFABClickBound = this._handleFABClick.bind(this); - this._handleOpenBound = this.open.bind(this); - this._handleCloseBound = this.close.bind(this); - - if (this.options.hoverEnabled && !this.options.toolbarEnabled) { - this.el.addEventListener('mouseenter', this._handleOpenBound); - this.el.addEventListener('mouseleave', this._handleCloseBound); - } else { - this.el.addEventListener('click', this._handleFABClickBound); - } - } - - /** - * Remove Event Handlers - */ - - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - if (this.options.hoverEnabled && !this.options.toolbarEnabled) { - this.el.removeEventListener('mouseenter', this._handleOpenBound); - this.el.removeEventListener('mouseleave', this._handleCloseBound); - } else { - this.el.removeEventListener('click', this._handleFABClickBound); - } - } - - /** - * Handle FAB Click - */ - - }, { - key: "_handleFABClick", - value: function _handleFABClick() { - if (this.isOpen) { - this.close(); - } else { - this.open(); - } - } - - /** - * Handle Document Click - * @param {Event} e - */ - - }, { - key: "_handleDocumentClick", - value: function _handleDocumentClick(e) { - if (!$(e.target).closest(this.$menu).length) { - this.close(); - } - } - - /** - * Open FAB - */ - - }, { - key: "open", - value: function open() { - if (this.isOpen) { - return; - } - - if (this.options.toolbarEnabled) { - this._animateInToolbar(); - } else { - this._animateInFAB(); - } - this.isOpen = true; - } - - /** - * Close FAB - */ - - }, { - key: "close", - value: function close() { - if (!this.isOpen) { - return; - } - - if (this.options.toolbarEnabled) { - window.removeEventListener('scroll', this._handleCloseBound, true); - document.body.removeEventListener('click', this._handleDocumentClickBound, true); - this._animateOutToolbar(); - } else { - this._animateOutFAB(); - } - this.isOpen = false; - } - - /** - * Classic FAB Menu open - */ - - }, { - key: "_animateInFAB", - value: function _animateInFAB() { - var _this48 = this; - - this.$el.addClass('active'); - - var time = 0; - this.$floatingBtnsReverse.each(function (el) { - anim({ - targets: el, - opacity: 1, - scale: [0.4, 1], - translateY: [_this48.offsetY, 0], - translateX: [_this48.offsetX, 0], - duration: 275, - delay: time, - easing: 'easeInOutQuad' - }); - time += 40; - }); - } - - /** - * Classic FAB Menu close - */ - - }, { - key: "_animateOutFAB", - value: function _animateOutFAB() { - var _this49 = this; - - this.$floatingBtnsReverse.each(function (el) { - anim.remove(el); - anim({ - targets: el, - opacity: 0, - scale: 0.4, - translateY: _this49.offsetY, - translateX: _this49.offsetX, - duration: 175, - easing: 'easeOutQuad', - complete: function () { - _this49.$el.removeClass('active'); - } - }); - }); - } - - /** - * Toolbar transition Menu open - */ - - }, { - key: "_animateInToolbar", - value: function _animateInToolbar() { - var _this50 = this; - - var scaleFactor = void 0; - var windowWidth = window.innerWidth; - var windowHeight = window.innerHeight; - var btnRect = this.el.getBoundingClientRect(); - var backdrop = $('

'); - var fabColor = this.$anchor.css('background-color'); - this.$anchor.append(backdrop); - - this.offsetX = btnRect.left - windowWidth / 2 + btnRect.width / 2; - this.offsetY = windowHeight - btnRect.bottom; - scaleFactor = windowWidth / backdrop[0].clientWidth; - this.btnBottom = btnRect.bottom; - this.btnLeft = btnRect.left; - this.btnWidth = btnRect.width; - - // Set initial state - this.$el.addClass('active'); - this.$el.css({ - 'text-align': 'center', - width: '100%', - bottom: 0, - left: 0, - transform: 'translateX(' + this.offsetX + 'px)', - transition: 'none' - }); - this.$anchor.css({ - transform: 'translateY(' + -this.offsetY + 'px)', - transition: 'none' - }); - backdrop.css({ - 'background-color': fabColor - }); - - setTimeout(function () { - _this50.$el.css({ - transform: '', - transition: 'transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s' - }); - _this50.$anchor.css({ - overflow: 'visible', - transform: '', - transition: 'transform .2s' - }); - - setTimeout(function () { - _this50.$el.css({ - overflow: 'hidden', - 'background-color': fabColor - }); - backdrop.css({ - transform: 'scale(' + scaleFactor + ')', - transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)' - }); - _this50.$menu.children('li').children('a').css({ - opacity: 1 - }); - - // Scroll to close. - _this50._handleDocumentClickBound = _this50._handleDocumentClick.bind(_this50); - window.addEventListener('scroll', _this50._handleCloseBound, true); - document.body.addEventListener('click', _this50._handleDocumentClickBound, true); - }, 100); - }, 0); - } - - /** - * Toolbar transition Menu close - */ - - }, { - key: "_animateOutToolbar", - value: function _animateOutToolbar() { - var _this51 = this; - - var windowWidth = window.innerWidth; - var windowHeight = window.innerHeight; - var backdrop = this.$el.find('.fab-backdrop'); - var fabColor = this.$anchor.css('background-color'); - - this.offsetX = this.btnLeft - windowWidth / 2 + this.btnWidth / 2; - this.offsetY = windowHeight - this.btnBottom; - - // Hide backdrop - this.$el.removeClass('active'); - this.$el.css({ - 'background-color': 'transparent', - transition: 'none' - }); - this.$anchor.css({ - transition: 'none' - }); - backdrop.css({ - transform: 'scale(0)', - 'background-color': fabColor - }); - this.$menu.children('li').children('a').css({ - opacity: '' - }); - - setTimeout(function () { - backdrop.remove(); - - // Set initial state. - _this51.$el.css({ - 'text-align': '', - width: '', - bottom: '', - left: '', - overflow: '', - 'background-color': '', - transform: 'translate3d(' + -_this51.offsetX + 'px,0,0)' - }); - _this51.$anchor.css({ - overflow: '', - transform: 'translate3d(0,' + _this51.offsetY + 'px,0)' - }); - - setTimeout(function () { - _this51.$el.css({ - transform: 'translate3d(0,0,0)', - transition: 'transform .2s' - }); - _this51.$anchor.css({ - transform: 'translate3d(0,0,0)', - transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)' - }); - }, 20); - }, 200); - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton), "init", this).call(this, this, els, options); - } - - /** - * Get Instance - */ - - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_FloatingActionButton; - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return FloatingActionButton; - }(Component); - - M.FloatingActionButton = FloatingActionButton; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(FloatingActionButton, 'floatingActionButton', 'M_FloatingActionButton'); - } -})(cash, M.anime); -;(function ($) { - 'use strict'; - - var _defaults = { - // Close when date is selected - autoClose: false, - - // the default output format for the input field value - format: 'mmm dd, yyyy', - - // Used to create date object from current input string - parse: null, - - // The initial date to view when first opened - defaultDate: null, - - // Make the `defaultDate` the initial selected value - setDefaultDate: false, - - disableWeekends: false, - - disableDayFn: null, - - // First day of week (0: Sunday, 1: Monday etc) - firstDay: 0, - - // The earliest date that can be selected - minDate: null, - // Thelatest date that can be selected - maxDate: null, - - // Number of years either side, or array of upper/lower range - yearRange: 10, - - // used internally (don't config outside) - minYear: 0, - maxYear: 9999, - minMonth: undefined, - maxMonth: undefined, - - startRange: null, - endRange: null, - - isRTL: false, - - // Render the month after year in the calendar title - showMonthAfterYear: false, - - // Render days of the calendar grid that fall in the next or previous month - showDaysInNextAndPreviousMonths: false, - - // Specify a DOM element to render the calendar in - container: null, - - // Show clear button - showClearBtn: false, - - // internationalization - i18n: { - cancel: 'Cancel', - clear: 'Clear', - done: 'Ok', - previousMonth: '‹', - nextMonth: '›', - months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - weekdaysAbbrev: ['S', 'M', 'T', 'W', 'T', 'F', 'S'] - }, - - // events array - events: [], - - // callback function - onSelect: null, - onOpen: null, - onClose: null, - onDraw: null - }; - - /** - * @class - * - */ - - var Datepicker = function (_Component15) { - _inherits(Datepicker, _Component15); - - /** - * Construct Datepicker instance and set up overlay - * @constructor - * @param {Element} el - * @param {Object} options - */ - function Datepicker(el, options) { - _classCallCheck(this, Datepicker); - - var _this52 = _possibleConstructorReturn(this, (Datepicker.__proto__ || Object.getPrototypeOf(Datepicker)).call(this, Datepicker, el, options)); - - _this52.el.M_Datepicker = _this52; - - _this52.options = $.extend({}, Datepicker.defaults, options); - - // make sure i18n defaults are not lost when only few i18n option properties are passed - if (!!options && options.hasOwnProperty('i18n') && typeof options.i18n === 'object') { - _this52.options.i18n = $.extend({}, Datepicker.defaults.i18n, options.i18n); - } - - // Remove time component from minDate and maxDate options - if (_this52.options.minDate) _this52.options.minDate.setHours(0, 0, 0, 0); - if (_this52.options.maxDate) _this52.options.maxDate.setHours(0, 0, 0, 0); - - _this52.id = M.guid(); - - _this52._setupVariables(); - _this52._insertHTMLIntoDOM(); - _this52._setupModal(); - - _this52._setupEventHandlers(); - - if (!_this52.options.defaultDate) { - _this52.options.defaultDate = new Date(Date.parse(_this52.el.value)); - } - - var defDate = _this52.options.defaultDate; - if (Datepicker._isDate(defDate)) { - if (_this52.options.setDefaultDate) { - _this52.setDate(defDate, true); - _this52.setInputValue(); - } else { - _this52.gotoDate(defDate); - } - } else { - _this52.gotoDate(new Date()); - } - - /** - * Describes open/close state of datepicker - * @type {Boolean} - */ - _this52.isOpen = false; - return _this52; - } - - _createClass(Datepicker, [{ - key: "destroy", - - - /** - * Teardown component - */ - value: function destroy() { - this._removeEventHandlers(); - this.modal.destroy(); - $(this.modalEl).remove(); - this.destroySelects(); - this.el.M_Datepicker = undefined; - } - }, { - key: "destroySelects", - value: function destroySelects() { - var oldYearSelect = this.calendarEl.querySelector('.orig-select-year'); - if (oldYearSelect) { - M.FormSelect.getInstance(oldYearSelect).destroy(); - } - var oldMonthSelect = this.calendarEl.querySelector('.orig-select-month'); - if (oldMonthSelect) { - M.FormSelect.getInstance(oldMonthSelect).destroy(); - } - } - }, { - key: "_insertHTMLIntoDOM", - value: function _insertHTMLIntoDOM() { - if (this.options.showClearBtn) { - $(this.clearBtn).css({ visibility: '' }); - this.clearBtn.innerHTML = this.options.i18n.clear; - } - - this.doneBtn.innerHTML = this.options.i18n.done; - this.cancelBtn.innerHTML = this.options.i18n.cancel; - - if (this.options.container) { - var optEl = this.options.container; - this.options.container = optEl instanceof HTMLElement ? optEl : document.querySelector(optEl); - this.$modalEl.appendTo(this.options.container); - } else { - this.$modalEl.insertBefore(this.el); - } - } - }, { - key: "_setupModal", - value: function _setupModal() { - var _this53 = this; - - this.modalEl.id = 'modal-' + this.id; - this.modal = M.Modal.init(this.modalEl, { - onCloseEnd: function () { - _this53.isOpen = false; - } - }); - } - }, { - key: "toString", - value: function toString(format) { - var _this54 = this; - - format = format || this.options.format; - if (typeof format === 'function') { - return format(this.date); - } - - if (!Datepicker._isDate(this.date)) { - return ''; - } - - var formatArray = format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g); - var formattedDate = formatArray.map(function (label) { - if (_this54.formats[label]) { - return _this54.formats[label](); - } - - return label; - }).join(''); - return formattedDate; - } - }, { - key: "setDate", - value: function setDate(date, preventOnSelect) { - if (!date) { - this.date = null; - this._renderDateDisplay(); - return this.draw(); - } - if (typeof date === 'string') { - date = new Date(Date.parse(date)); - } - if (!Datepicker._isDate(date)) { - return; - } - - var min = this.options.minDate, - max = this.options.maxDate; - - if (Datepicker._isDate(min) && date < min) { - date = min; - } else if (Datepicker._isDate(max) && date > max) { - date = max; - } - - this.date = new Date(date.getTime()); - - this._renderDateDisplay(); - - Datepicker._setToStartOfDay(this.date); - this.gotoDate(this.date); - - if (!preventOnSelect && typeof this.options.onSelect === 'function') { - this.options.onSelect.call(this, this.date); - } - } - }, { - key: "setInputValue", - value: function setInputValue() { - this.el.value = this.toString(); - this.$el.trigger('change', { firedBy: this }); - } - }, { - key: "_renderDateDisplay", - value: function _renderDateDisplay() { - var displayDate = Datepicker._isDate(this.date) ? this.date : new Date(); - var i18n = this.options.i18n; - var day = i18n.weekdaysShort[displayDate.getDay()]; - var month = i18n.monthsShort[displayDate.getMonth()]; - var date = displayDate.getDate(); - this.yearTextEl.innerHTML = displayDate.getFullYear(); - this.dateTextEl.innerHTML = day + ", " + month + " " + date; - } - - /** - * change view to a specific date - */ - - }, { - key: "gotoDate", - value: function gotoDate(date) { - var newCalendar = true; - - if (!Datepicker._isDate(date)) { - return; - } - - if (this.calendars) { - var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1), - lastVisibleDate = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1), - visibleDate = date.getTime(); - // get the end of the month - lastVisibleDate.setMonth(lastVisibleDate.getMonth() + 1); - lastVisibleDate.setDate(lastVisibleDate.getDate() - 1); - newCalendar = visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate; - } - - if (newCalendar) { - this.calendars = [{ - month: date.getMonth(), - year: date.getFullYear() - }]; - } - - this.adjustCalendars(); - } - }, { - key: "adjustCalendars", - value: function adjustCalendars() { - this.calendars[0] = this.adjustCalendar(this.calendars[0]); - this.draw(); - } - }, { - key: "adjustCalendar", - value: function adjustCalendar(calendar) { - if (calendar.month < 0) { - calendar.year -= Math.ceil(Math.abs(calendar.month) / 12); - calendar.month += 12; - } - if (calendar.month > 11) { - calendar.year += Math.floor(Math.abs(calendar.month) / 12); - calendar.month -= 12; - } - return calendar; - } - }, { - key: "nextMonth", - value: function nextMonth() { - this.calendars[0].month++; - this.adjustCalendars(); - } - }, { - key: "prevMonth", - value: function prevMonth() { - this.calendars[0].month--; - this.adjustCalendars(); - } - }, { - key: "render", - value: function render(year, month, randId) { - var opts = this.options, - now = new Date(), - days = Datepicker._getDaysInMonth(year, month), - before = new Date(year, month, 1).getDay(), - data = [], - row = []; - Datepicker._setToStartOfDay(now); - if (opts.firstDay > 0) { - before -= opts.firstDay; - if (before < 0) { - before += 7; - } - } - var previousMonth = month === 0 ? 11 : month - 1, - nextMonth = month === 11 ? 0 : month + 1, - yearOfPreviousMonth = month === 0 ? year - 1 : year, - yearOfNextMonth = month === 11 ? year + 1 : year, - daysInPreviousMonth = Datepicker._getDaysInMonth(yearOfPreviousMonth, previousMonth); - var cells = days + before, - after = cells; - while (after > 7) { - after -= 7; - } - cells += 7 - after; - var isWeekSelected = false; - for (var i = 0, r = 0; i < cells; i++) { - var day = new Date(year, month, 1 + (i - before)), - isSelected = Datepicker._isDate(this.date) ? Datepicker._compareDates(day, this.date) : false, - isToday = Datepicker._compareDates(day, now), - hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false, - isEmpty = i < before || i >= days + before, - dayNumber = 1 + (i - before), - monthNumber = month, - yearNumber = year, - isStartRange = opts.startRange && Datepicker._compareDates(opts.startRange, day), - isEndRange = opts.endRange && Datepicker._compareDates(opts.endRange, day), - isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange, - isDisabled = opts.minDate && day < opts.minDate || opts.maxDate && day > opts.maxDate || opts.disableWeekends && Datepicker._isWeekend(day) || opts.disableDayFn && opts.disableDayFn(day); - - if (isEmpty) { - if (i < before) { - dayNumber = daysInPreviousMonth + dayNumber; - monthNumber = previousMonth; - yearNumber = yearOfPreviousMonth; - } else { - dayNumber = dayNumber - days; - monthNumber = nextMonth; - yearNumber = yearOfNextMonth; - } - } - - var dayConfig = { - day: dayNumber, - month: monthNumber, - year: yearNumber, - hasEvent: hasEvent, - isSelected: isSelected, - isToday: isToday, - isDisabled: isDisabled, - isEmpty: isEmpty, - isStartRange: isStartRange, - isEndRange: isEndRange, - isInRange: isInRange, - showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths - }; - - row.push(this.renderDay(dayConfig)); - - if (++r === 7) { - data.push(this.renderRow(row, opts.isRTL, isWeekSelected)); - row = []; - r = 0; - isWeekSelected = false; - } - } - return this.renderTable(opts, data, randId); - } - }, { - key: "renderDay", - value: function renderDay(opts) { - var arr = []; - var ariaSelected = 'false'; - if (opts.isEmpty) { - if (opts.showDaysInNextAndPreviousMonths) { - arr.push('is-outside-current-month'); - arr.push('is-selection-disabled'); - } else { - return ''; - } - } - if (opts.isDisabled) { - arr.push('is-disabled'); - } - - if (opts.isToday) { - arr.push('is-today'); - } - if (opts.isSelected) { - arr.push('is-selected'); - ariaSelected = 'true'; - } - if (opts.hasEvent) { - arr.push('has-event'); - } - if (opts.isInRange) { - arr.push('is-inrange'); - } - if (opts.isStartRange) { - arr.push('is-startrange'); - } - if (opts.isEndRange) { - arr.push('is-endrange'); - } - return "" + ("") + ''; - } - }, { - key: "renderRow", - value: function renderRow(days, isRTL, isRowSelected) { - return '' + (isRTL ? days.reverse() : days).join('') + ''; - } - }, { - key: "renderTable", - value: function renderTable(opts, data, randId) { - return '
' + this.renderHead(opts) + this.renderBody(data) + '
'; - } - }, { - key: "renderHead", - value: function renderHead(opts) { - var i = void 0, - arr = []; - for (i = 0; i < 7; i++) { - arr.push("" + this.renderDayName(opts, i, true) + ""); - } - return '' + (opts.isRTL ? arr.reverse() : arr).join('') + ''; - } - }, { - key: "renderBody", - value: function renderBody(rows) { - return '' + rows.join('') + ''; - } - }, { - key: "renderTitle", - value: function renderTitle(instance, c, year, month, refYear, randId) { - var i = void 0, - j = void 0, - arr = void 0, - opts = this.options, - isMinYear = year === opts.minYear, - isMaxYear = year === opts.maxYear, - html = '
', - monthHtml = void 0, - yearHtml = void 0, - prev = true, - next = true; - - for (arr = [], i = 0; i < 12; i++) { - arr.push(''); - } - - monthHtml = ''; - - if ($.isArray(opts.yearRange)) { - i = opts.yearRange[0]; - j = opts.yearRange[1] + 1; - } else { - i = year - opts.yearRange; - j = 1 + year + opts.yearRange; - } - - for (arr = []; i < j && i <= opts.maxYear; i++) { - if (i >= opts.minYear) { - arr.push(""); - } - } - if (opts.yearRangeReverse) { - arr.reverse(); - } - - yearHtml = ""; - - var leftArrow = ''; - html += ""; - - html += '
'; - if (opts.showMonthAfterYear) { - html += yearHtml + monthHtml; - } else { - html += monthHtml + yearHtml; - } - html += '
'; - - if (isMinYear && (month === 0 || opts.minMonth >= month)) { - prev = false; - } - - if (isMaxYear && (month === 11 || opts.maxMonth <= month)) { - next = false; - } - - var rightArrow = ''; - html += ""; - - return html += '
'; - } - - /** - * refresh the HTML - */ - - }, { - key: "draw", - value: function draw(force) { - if (!this.isOpen && !force) { - return; - } - var opts = this.options, - minYear = opts.minYear, - maxYear = opts.maxYear, - minMonth = opts.minMonth, - maxMonth = opts.maxMonth, - html = '', - randId = void 0; - - if (this._y <= minYear) { - this._y = minYear; - if (!isNaN(minMonth) && this._m < minMonth) { - this._m = minMonth; - } - } - if (this._y >= maxYear) { - this._y = maxYear; - if (!isNaN(maxMonth) && this._m > maxMonth) { - this._m = maxMonth; - } - } - - randId = 'datepicker-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2); - - for (var c = 0; c < 1; c++) { - this._renderDateDisplay(); - html += this.renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId); - } - - this.destroySelects(); - - this.calendarEl.innerHTML = html; - - // Init Materialize Select - var yearSelect = this.calendarEl.querySelector('.orig-select-year'); - var monthSelect = this.calendarEl.querySelector('.orig-select-month'); - M.FormSelect.init(yearSelect, { - classes: 'select-year', - dropdownOptions: { container: document.body, constrainWidth: false } - }); - M.FormSelect.init(monthSelect, { - classes: 'select-month', - dropdownOptions: { container: document.body, constrainWidth: false } - }); - - // Add change handlers for select - yearSelect.addEventListener('change', this._handleYearChange.bind(this)); - monthSelect.addEventListener('change', this._handleMonthChange.bind(this)); - - if (typeof this.options.onDraw === 'function') { - this.options.onDraw(this); - } - } - - /** - * Setup Event Handlers - */ - - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - this._handleInputKeydownBound = this._handleInputKeydown.bind(this); - this._handleInputClickBound = this._handleInputClick.bind(this); - this._handleInputChangeBound = this._handleInputChange.bind(this); - this._handleCalendarClickBound = this._handleCalendarClick.bind(this); - this._finishSelectionBound = this._finishSelection.bind(this); - this._handleMonthChange = this._handleMonthChange.bind(this); - this._closeBound = this.close.bind(this); - - this.el.addEventListener('click', this._handleInputClickBound); - this.el.addEventListener('keydown', this._handleInputKeydownBound); - this.el.addEventListener('change', this._handleInputChangeBound); - this.calendarEl.addEventListener('click', this._handleCalendarClickBound); - this.doneBtn.addEventListener('click', this._finishSelectionBound); - this.cancelBtn.addEventListener('click', this._closeBound); - - if (this.options.showClearBtn) { - this._handleClearClickBound = this._handleClearClick.bind(this); - this.clearBtn.addEventListener('click', this._handleClearClickBound); - } - } - }, { - key: "_setupVariables", - value: function _setupVariables() { - var _this55 = this; - - this.$modalEl = $(Datepicker._template); - this.modalEl = this.$modalEl[0]; - - this.calendarEl = this.modalEl.querySelector('.datepicker-calendar'); - - this.yearTextEl = this.modalEl.querySelector('.year-text'); - this.dateTextEl = this.modalEl.querySelector('.date-text'); - if (this.options.showClearBtn) { - this.clearBtn = this.modalEl.querySelector('.datepicker-clear'); - } - this.doneBtn = this.modalEl.querySelector('.datepicker-done'); - this.cancelBtn = this.modalEl.querySelector('.datepicker-cancel'); - - this.formats = { - d: function () { - return _this55.date.getDate(); - }, - dd: function () { - var d = _this55.date.getDate(); - return (d < 10 ? '0' : '') + d; - }, - ddd: function () { - return _this55.options.i18n.weekdaysShort[_this55.date.getDay()]; - }, - dddd: function () { - return _this55.options.i18n.weekdays[_this55.date.getDay()]; - }, - m: function () { - return _this55.date.getMonth() + 1; - }, - mm: function () { - var m = _this55.date.getMonth() + 1; - return (m < 10 ? '0' : '') + m; - }, - mmm: function () { - return _this55.options.i18n.monthsShort[_this55.date.getMonth()]; - }, - mmmm: function () { - return _this55.options.i18n.months[_this55.date.getMonth()]; - }, - yy: function () { - return ('' + _this55.date.getFullYear()).slice(2); - }, - yyyy: function () { - return _this55.date.getFullYear(); - } - }; - } - - /** - * Remove Event Handlers - */ - - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - this.el.removeEventListener('click', this._handleInputClickBound); - this.el.removeEventListener('keydown', this._handleInputKeydownBound); - this.el.removeEventListener('change', this._handleInputChangeBound); - this.calendarEl.removeEventListener('click', this._handleCalendarClickBound); - } - }, { - key: "_handleInputClick", - value: function _handleInputClick() { - this.open(); - } - }, { - key: "_handleInputKeydown", - value: function _handleInputKeydown(e) { - if (e.which === M.keys.ENTER) { - e.preventDefault(); - this.open(); - } - } - }, { - key: "_handleCalendarClick", - value: function _handleCalendarClick(e) { - if (!this.isOpen) { - return; - } - - var $target = $(e.target); - if (!$target.hasClass('is-disabled')) { - if ($target.hasClass('datepicker-day-button') && !$target.hasClass('is-empty') && !$target.parent().hasClass('is-disabled')) { - this.setDate(new Date(e.target.getAttribute('data-year'), e.target.getAttribute('data-month'), e.target.getAttribute('data-day'))); - if (this.options.autoClose) { - this._finishSelection(); - } - } else if ($target.closest('.month-prev').length) { - this.prevMonth(); - } else if ($target.closest('.month-next').length) { - this.nextMonth(); - } - } - } - }, { - key: "_handleClearClick", - value: function _handleClearClick() { - this.date = null; - this.setInputValue(); - this.close(); - } - }, { - key: "_handleMonthChange", - value: function _handleMonthChange(e) { - this.gotoMonth(e.target.value); - } - }, { - key: "_handleYearChange", - value: function _handleYearChange(e) { - this.gotoYear(e.target.value); - } - - /** - * change view to a specific month (zero-index, e.g. 0: January) - */ - - }, { - key: "gotoMonth", - value: function gotoMonth(month) { - if (!isNaN(month)) { - this.calendars[0].month = parseInt(month, 10); - this.adjustCalendars(); - } - } - - /** - * change view to a specific full year (e.g. "2012") - */ - - }, { - key: "gotoYear", - value: function gotoYear(year) { - if (!isNaN(year)) { - this.calendars[0].year = parseInt(year, 10); - this.adjustCalendars(); - } - } - }, { - key: "_handleInputChange", - value: function _handleInputChange(e) { - var date = void 0; - - // Prevent change event from being fired when triggered by the plugin - if (e.firedBy === this) { - return; - } - if (this.options.parse) { - date = this.options.parse(this.el.value, this.options.format); - } else { - date = new Date(Date.parse(this.el.value)); - } - - if (Datepicker._isDate(date)) { - this.setDate(date); - } - } - }, { - key: "renderDayName", - value: function renderDayName(opts, day, abbr) { - day += opts.firstDay; - while (day >= 7) { - day -= 7; - } - return abbr ? opts.i18n.weekdaysAbbrev[day] : opts.i18n.weekdays[day]; - } - - /** - * Set input value to the selected date and close Datepicker - */ - - }, { - key: "_finishSelection", - value: function _finishSelection() { - this.setInputValue(); - this.close(); - } - - /** - * Open Datepicker - */ - - }, { - key: "open", - value: function open() { - if (this.isOpen) { - return; - } - - this.isOpen = true; - if (typeof this.options.onOpen === 'function') { - this.options.onOpen.call(this); - } - this.draw(); - this.modal.open(); - return this; - } - - /** - * Close Datepicker - */ - - }, { - key: "close", - value: function close() { - if (!this.isOpen) { - return; - } - - this.isOpen = false; - if (typeof this.options.onClose === 'function') { - this.options.onClose.call(this); - } - this.modal.close(); - return this; - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(Datepicker.__proto__ || Object.getPrototypeOf(Datepicker), "init", this).call(this, this, els, options); - } - }, { - key: "_isDate", - value: function _isDate(obj) { - return (/Date/.test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime()) - ); - } - }, { - key: "_isWeekend", - value: function _isWeekend(date) { - var day = date.getDay(); - return day === 0 || day === 6; - } - }, { - key: "_setToStartOfDay", - value: function _setToStartOfDay(date) { - if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0); - } - }, { - key: "_getDaysInMonth", - value: function _getDaysInMonth(year, month) { - return [31, Datepicker._isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; - } - }, { - key: "_isLeapYear", - value: function _isLeapYear(year) { - // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951 - return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; - } - }, { - key: "_compareDates", - value: function _compareDates(a, b) { - // weak date comparison (use setToStartOfDay(date) to ensure correct result) - return a.getTime() === b.getTime(); - } - }, { - key: "_setToStartOfDay", - value: function _setToStartOfDay(date) { - if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0); - } - - /** - * Get Instance - */ - - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_Datepicker; - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return Datepicker; - }(Component); - - Datepicker._template = [''].join(''); - - M.Datepicker = Datepicker; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Datepicker, 'datepicker', 'M_Datepicker'); - } -})(cash); -;(function ($) { - 'use strict'; - - var _defaults = { - dialRadius: 135, - outerRadius: 105, - innerRadius: 70, - tickRadius: 20, - duration: 350, - container: null, - defaultTime: 'now', // default time, 'now' or '13:14' e.g. - fromNow: 0, // Millisecond offset from the defaultTime - showClearBtn: false, - - // internationalization - i18n: { - cancel: 'Cancel', - clear: 'Clear', - done: 'Ok' - }, - - autoClose: false, // auto close when minute is selected - twelveHour: true, // change to 12 hour AM/PM clock from 24 hour - vibrate: true, // vibrate the device when dragging clock hand - - // Callbacks - onOpenStart: null, - onOpenEnd: null, - onCloseStart: null, - onCloseEnd: null, - onSelect: null - }; - - /** - * @class - * - */ - - var Timepicker = function (_Component16) { - _inherits(Timepicker, _Component16); - - function Timepicker(el, options) { - _classCallCheck(this, Timepicker); - - var _this56 = _possibleConstructorReturn(this, (Timepicker.__proto__ || Object.getPrototypeOf(Timepicker)).call(this, Timepicker, el, options)); - - _this56.el.M_Timepicker = _this56; - - _this56.options = $.extend({}, Timepicker.defaults, options); - - _this56.id = M.guid(); - _this56._insertHTMLIntoDOM(); - _this56._setupModal(); - _this56._setupVariables(); - _this56._setupEventHandlers(); - - _this56._clockSetup(); - _this56._pickerSetup(); - return _this56; - } - - _createClass(Timepicker, [{ - key: "destroy", - - - /** - * Teardown component - */ - value: function destroy() { - this._removeEventHandlers(); - this.modal.destroy(); - $(this.modalEl).remove(); - this.el.M_Timepicker = undefined; - } - - /** - * Setup Event Handlers - */ - - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - this._handleInputKeydownBound = this._handleInputKeydown.bind(this); - this._handleInputClickBound = this._handleInputClick.bind(this); - this._handleClockClickStartBound = this._handleClockClickStart.bind(this); - this._handleDocumentClickMoveBound = this._handleDocumentClickMove.bind(this); - this._handleDocumentClickEndBound = this._handleDocumentClickEnd.bind(this); - this._inputFromTextFieldBound = this._handleTimeInputEnterKey.bind(this); - - this.el.addEventListener('click', this._handleInputClickBound); - this.el.addEventListener('keydown', this._handleInputKeydownBound); - this.plate.addEventListener('mousedown', this._handleClockClickStartBound); - this.plate.addEventListener('touchstart', this._handleClockClickStartBound); - this.digitalClock.addEventListener('keyup', this._inputFromTextFieldBound); - - $(this.inputHours).on('click', this.showView.bind(this, 'hours')); - $(this.inputMinutes).on('click', this.showView.bind(this, 'minutes')); - } - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - this.el.removeEventListener('click', this._handleInputClickBound); - this.el.removeEventListener('keydown', this._handleInputKeydownBound); - } - }, { - key: "_handleInputClick", - value: function _handleInputClick() { - this.open(); - } - }, { - key: "_handleInputKeydown", - value: function _handleInputKeydown(e) { - if (e.which === M.keys.ENTER) { - e.preventDefault(); - this.open(); - } - } - }, { - key: "_handleTimeInputEnterKey", - value: function _handleTimeInputEnterKey(e) { - if (e.which === M.keys.ENTER) { - e.preventDefault(); - this._inputFromTextField(); - } - } - }, { - key: "_handleClockClickStart", - value: function _handleClockClickStart(e) { - e.preventDefault(); - var clockPlateBR = this.plate.getBoundingClientRect(); - var offset = { x: clockPlateBR.left, y: clockPlateBR.top }; - - this.x0 = offset.x + this.options.dialRadius; - this.y0 = offset.y + this.options.dialRadius; - this.moved = false; - var clickPos = Timepicker._Pos(e); - this.dx = clickPos.x - this.x0; - this.dy = clickPos.y - this.y0; - - // Set clock hands - this.setHand(this.dx, this.dy, false); - - // Mousemove on document - document.addEventListener('mousemove', this._handleDocumentClickMoveBound); - document.addEventListener('touchmove', this._handleDocumentClickMoveBound); - - // Mouseup on document - document.addEventListener('mouseup', this._handleDocumentClickEndBound); - document.addEventListener('touchend', this._handleDocumentClickEndBound); - } - }, { - key: "_handleDocumentClickMove", - value: function _handleDocumentClickMove(e) { - e.preventDefault(); - var clickPos = Timepicker._Pos(e); - var x = clickPos.x - this.x0; - var y = clickPos.y - this.y0; - this.moved = true; - this.setHand(x, y, false, true); - } - }, { - key: "_handleDocumentClickEnd", - value: function _handleDocumentClickEnd(e) { - var _this57 = this; - - e.preventDefault(); - document.removeEventListener('mouseup', this._handleDocumentClickEndBound); - document.removeEventListener('touchend', this._handleDocumentClickEndBound); - var clickPos = Timepicker._Pos(e); - var x = clickPos.x - this.x0; - var y = clickPos.y - this.y0; - if (this.moved && x === this.dx && y === this.dy) { - this.setHand(x, y); - } - - if (this.currentView === 'hours') { - this.showView('minutes', this.options.duration / 2); - } else if (this.options.autoClose) { - $(this.minutesView).addClass('timepicker-dial-out'); - setTimeout(function () { - _this57.done(); - }, this.options.duration / 2); - } - - if (typeof this.options.onSelect === 'function') { - this.options.onSelect.call(this, this.hours, this.minutes); - } - - // Unbind mousemove event - document.removeEventListener('mousemove', this._handleDocumentClickMoveBound); - document.removeEventListener('touchmove', this._handleDocumentClickMoveBound); - } - }, { - key: "_insertHTMLIntoDOM", - value: function _insertHTMLIntoDOM() { - this.$modalEl = $(Timepicker._template); - this.modalEl = this.$modalEl[0]; - this.modalEl.id = 'modal-' + this.id; - - // Append popover to input by default - var optEl = this.options.container; - var containerEl = optEl instanceof HTMLElement ? optEl : document.querySelector(optEl); - if (this.options.container && !!containerEl) { - this.$modalEl.appendTo(containerEl); - } else { - this.$modalEl.insertBefore(this.el); - } - } - }, { - key: "_setupModal", - value: function _setupModal() { - var _this58 = this; - - this.modal = M.Modal.init(this.modalEl, { - onOpenStart: this.options.onOpenStart, - onOpenEnd: this.options.onOpenEnd, - onCloseStart: this.options.onCloseStart, - onCloseEnd: function () { - if (typeof _this58.options.onCloseEnd === 'function') { - _this58.options.onCloseEnd.call(_this58); - } - _this58.isOpen = false; - } - }); - } - }, { - key: "_setupVariables", - value: function _setupVariables() { - this.currentView = 'hours'; - this.vibrate = navigator.vibrate ? 'vibrate' : navigator.webkitVibrate ? 'webkitVibrate' : null; - - this._canvas = this.modalEl.querySelector('.timepicker-canvas'); - this.plate = this.modalEl.querySelector('.timepicker-plate'); - this.digitalClock = this.modalEl.querySelector('.timepicker-display-column'); - - this.hoursView = this.modalEl.querySelector('.timepicker-hours'); - this.minutesView = this.modalEl.querySelector('.timepicker-minutes'); - this.inputHours = this.modalEl.querySelector('.timepicker-input-hours'); - this.inputMinutes = this.modalEl.querySelector('.timepicker-input-minutes'); - this.spanAmPm = this.modalEl.querySelector('.timepicker-span-am-pm'); - this.footer = this.modalEl.querySelector('.timepicker-footer'); - this.amOrPm = 'PM'; - } - }, { - key: "_pickerSetup", - value: function _pickerSetup() { - var $clearBtn = $("").appendTo(this.footer).on('click', this.clear.bind(this)); - if (this.options.showClearBtn) { - $clearBtn.css({ visibility: '' }); - } - - var confirmationBtnsContainer = $('
'); - $('').appendTo(confirmationBtnsContainer).on('click', this.close.bind(this)); - $('').appendTo(confirmationBtnsContainer).on('click', this.done.bind(this)); - confirmationBtnsContainer.appendTo(this.footer); - } - }, { - key: "_clockSetup", - value: function _clockSetup() { - if (this.options.twelveHour) { - this.$amBtn = $('
AM
'); - this.$pmBtn = $('
PM
'); - this.$amBtn.on('click', this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm); - this.$pmBtn.on('click', this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm); - } - - this._buildHoursView(); - this._buildMinutesView(); - this._buildSVGClock(); - } - }, { - key: "_buildSVGClock", - value: function _buildSVGClock() { - // Draw clock hands and others - var dialRadius = this.options.dialRadius; - var tickRadius = this.options.tickRadius; - var diameter = dialRadius * 2; - - var svg = Timepicker._createSVGEl('svg'); - svg.setAttribute('class', 'timepicker-svg'); - svg.setAttribute('width', diameter); - svg.setAttribute('height', diameter); - var g = Timepicker._createSVGEl('g'); - g.setAttribute('transform', 'translate(' + dialRadius + ',' + dialRadius + ')'); - var bearing = Timepicker._createSVGEl('circle'); - bearing.setAttribute('class', 'timepicker-canvas-bearing'); - bearing.setAttribute('cx', 0); - bearing.setAttribute('cy', 0); - bearing.setAttribute('r', 4); - var hand = Timepicker._createSVGEl('line'); - hand.setAttribute('x1', 0); - hand.setAttribute('y1', 0); - var bg = Timepicker._createSVGEl('circle'); - bg.setAttribute('class', 'timepicker-canvas-bg'); - bg.setAttribute('r', tickRadius); - g.appendChild(hand); - g.appendChild(bg); - g.appendChild(bearing); - svg.appendChild(g); - this._canvas.appendChild(svg); - - this.hand = hand; - this.bg = bg; - this.bearing = bearing; - this.g = g; - } - }, { - key: "_buildHoursView", - value: function _buildHoursView() { - var $tick = $('
'); - // Hours view - if (this.options.twelveHour) { - for (var i = 1; i < 13; i += 1) { - var tick = $tick.clone(); - var radian = i / 6 * Math.PI; - var radius = this.options.outerRadius; - tick.css({ - left: this.options.dialRadius + Math.sin(radian) * radius - this.options.tickRadius + 'px', - top: this.options.dialRadius - Math.cos(radian) * radius - this.options.tickRadius + 'px' - }); - tick.html(i === 0 ? '00' : i); - this.hoursView.appendChild(tick[0]); - // tick.on(mousedownEvent, mousedown); - } - } else { - for (var _i2 = 0; _i2 < 24; _i2 += 1) { - var _tick = $tick.clone(); - var _radian = _i2 / 6 * Math.PI; - var inner = _i2 > 0 && _i2 < 13; - var _radius = inner ? this.options.innerRadius : this.options.outerRadius; - _tick.css({ - left: this.options.dialRadius + Math.sin(_radian) * _radius - this.options.tickRadius + 'px', - top: this.options.dialRadius - Math.cos(_radian) * _radius - this.options.tickRadius + 'px' - }); - _tick.html(_i2 === 0 ? '00' : _i2); - this.hoursView.appendChild(_tick[0]); - // tick.on(mousedownEvent, mousedown); - } - } - } - }, { - key: "_buildMinutesView", - value: function _buildMinutesView() { - var $tick = $('
'); - // Minutes view - for (var i = 0; i < 60; i += 5) { - var tick = $tick.clone(); - var radian = i / 30 * Math.PI; - tick.css({ - left: this.options.dialRadius + Math.sin(radian) * this.options.outerRadius - this.options.tickRadius + 'px', - top: this.options.dialRadius - Math.cos(radian) * this.options.outerRadius - this.options.tickRadius + 'px' - }); - tick.html(Timepicker._addLeadingZero(i)); - this.minutesView.appendChild(tick[0]); - } - } - }, { - key: "_handleAmPmClick", - value: function _handleAmPmClick(e) { - var $btnClicked = $(e.target); - this.amOrPm = $btnClicked.hasClass('am-btn') ? 'AM' : 'PM'; - this._updateAmPmView(); - } - }, { - key: "_updateAmPmView", - value: function _updateAmPmView() { - if (this.options.twelveHour) { - this.$amBtn.toggleClass('text-primary', this.amOrPm === 'AM'); - this.$pmBtn.toggleClass('text-primary', this.amOrPm === 'PM'); - } - } - }, { - key: "_updateTimeFromInput", - value: function _updateTimeFromInput() { - // Get the time - var value = ((this.el.value || this.options.defaultTime || '') + '').split(':'); - if (this.options.twelveHour && !(typeof value[1] === 'undefined')) { - if (value[1].toUpperCase().indexOf('AM') > 0) { - this.amOrPm = 'AM'; - } else { - this.amOrPm = 'PM'; - } - value[1] = value[1].replace('AM', '').replace('PM', ''); - } - if (value[0] === 'now') { - var now = new Date(+new Date() + this.options.fromNow); - value = [now.getHours(), now.getMinutes()]; - if (this.options.twelveHour) { - this.amOrPm = value[0] >= 12 && value[0] < 24 ? 'PM' : 'AM'; - } - } - this.hours = +value[0] || 0; - this.minutes = +value[1] || 0; - this.inputHours.value = this.hours; - this.inputMinutes.value = Timepicker._addLeadingZero(this.minutes); - - this._updateAmPmView(); - } - }, { - key: "showView", - value: function showView(view, delay) { - if (view === 'minutes' && $(this.hoursView).css('visibility') === 'visible') { - // raiseCallback(this.options.beforeHourSelect); - } - var isHours = view === 'hours', - nextView = isHours ? this.hoursView : this.minutesView, - hideView = isHours ? this.minutesView : this.hoursView; - this.currentView = view; - - $(this.inputHours).toggleClass('text-primary', isHours); - $(this.inputMinutes).toggleClass('text-primary', !isHours); - - // Transition view - hideView.classList.add('timepicker-dial-out'); - $(nextView).css('visibility', 'visible').removeClass('timepicker-dial-out'); - - // Reset clock hand - this.resetClock(delay); - - // After transitions ended - clearTimeout(this.toggleViewTimer); - this.toggleViewTimer = setTimeout(function () { - $(hideView).css('visibility', 'hidden'); - }, this.options.duration); - } - }, { - key: "resetClock", - value: function resetClock(delay) { - var view = this.currentView, - value = this[view], - isHours = view === 'hours', - unit = Math.PI / (isHours ? 6 : 30), - radian = value * unit, - radius = isHours && value > 0 && value < 13 ? this.options.innerRadius : this.options.outerRadius, - x = Math.sin(radian) * radius, - y = -Math.cos(radian) * radius, - self = this; - - if (delay) { - $(this.canvas).addClass('timepicker-canvas-out'); - setTimeout(function () { - $(self.canvas).removeClass('timepicker-canvas-out'); - self.setHand(x, y); - }, delay); - } else { - this.setHand(x, y); - } - } - }, { - key: "_inputFromTextField", - value: function _inputFromTextField() { - var isHours = this.currentView === 'hours'; - - if (isHours) { - var value = this['inputHours'].value; - - if (value > 0 && value < 13) { - this.drawClockFromTimeInput(value, isHours); - - this.showView('minutes', this.options.duration / 2); - - this.hours = value; - this.inputMinutes.focus(); - } else { - var hour = new Date().getHours(); - this['inputHours'].value = hour % 12; - } - } else { - var _value = this['inputMinutes'].value; - - if (_value >= 0 && _value < 60) { - this['inputMinutes'].value = Timepicker._addLeadingZero(_value); - - this.drawClockFromTimeInput(_value, isHours); - - this.minutes = _value; - this.modalEl.querySelector('.confirmation-btns :nth-child(2)').focus(); - } else { - var minutes = new Date().getMinutes(); - this['inputMinutes'].value = Timepicker._addLeadingZero(minutes); - } - } - } - }, { - key: "drawClockFromTimeInput", - value: function drawClockFromTimeInput(value, isHours) { - var unit = Math.PI / (isHours ? 6 : 30); - var radian = value * unit; - var radius = void 0; - - if (this.options.twelveHour) { - radius = this.options.outerRadius; - } - - var cx1 = Math.sin(radian) * (radius - this.options.tickRadius), - cy1 = -Math.cos(radian) * (radius - this.options.tickRadius), - cx2 = Math.sin(radian) * radius, - cy2 = -Math.cos(radian) * radius; - - this.hand.setAttribute('x2', cx1); - this.hand.setAttribute('y2', cy1); - this.bg.setAttribute('cx', cx2); - this.bg.setAttribute('cy', cy2); - } - }, { - key: "setHand", - value: function setHand(x, y, roundBy5) { - var _this59 = this; - - var radian = Math.atan2(x, -y), - isHours = this.currentView === 'hours', - unit = Math.PI / (isHours || roundBy5 ? 6 : 30), - z = Math.sqrt(x * x + y * y), - inner = isHours && z < (this.options.outerRadius + this.options.innerRadius) / 2, - radius = inner ? this.options.innerRadius : this.options.outerRadius; - - if (this.options.twelveHour) { - radius = this.options.outerRadius; - } - - // Radian should in range [0, 2PI] - if (radian < 0) { - radian = Math.PI * 2 + radian; - } - - // Get the round value - var value = Math.round(radian / unit); - - // Get the round radian - radian = value * unit; - - // Correct the hours or minutes - if (this.options.twelveHour) { - if (isHours) { - if (value === 0) value = 12; - } else { - if (roundBy5) value *= 5; - if (value === 60) value = 0; - } - } else { - if (isHours) { - if (value === 12) { - value = 0; - } - value = inner ? value === 0 ? 12 : value : value === 0 ? 0 : value + 12; - } else { - if (roundBy5) { - value *= 5; - } - if (value === 60) { - value = 0; - } - } - } - - // Once hours or minutes changed, vibrate the device - if (this[this.currentView] !== value) { - if (this.vibrate && this.options.vibrate) { - // Do not vibrate too frequently - if (!this.vibrateTimer) { - navigator[this.vibrate](10); - this.vibrateTimer = setTimeout(function () { - _this59.vibrateTimer = null; - }, 100); - } - } - } - - this[this.currentView] = value; - if (isHours) { - this['inputHours'].value = value; - } else { - this['inputMinutes'].value = Timepicker._addLeadingZero(value); - } - - // Set clock hand and others' position - var cx1 = Math.sin(radian) * (radius - this.options.tickRadius), - cy1 = -Math.cos(radian) * (radius - this.options.tickRadius), - cx2 = Math.sin(radian) * radius, - cy2 = -Math.cos(radian) * radius; - this.hand.setAttribute('x2', cx1); - this.hand.setAttribute('y2', cy1); - this.bg.setAttribute('cx', cx2); - this.bg.setAttribute('cy', cy2); - } - }, { - key: "open", - value: function open() { - if (this.isOpen) { - return; - } - - this.isOpen = true; - this._updateTimeFromInput(); - this.showView('hours'); - - this.modal.open(); - } - }, { - key: "close", - value: function close() { - if (!this.isOpen) { - return; - } - - this.isOpen = false; - this.modal.close(); - } - - /** - * Finish timepicker selection. - */ - - }, { - key: "done", - value: function done(e, clearValue) { - // Set input value - var last = this.el.value; - var value = clearValue ? '' : Timepicker._addLeadingZero(this.hours) + ':' + Timepicker._addLeadingZero(this.minutes); - this.time = value; - if (!clearValue && this.options.twelveHour) { - value = value + " " + this.amOrPm; - } - this.el.value = value; - - // Trigger change event - if (value !== last) { - this.$el.trigger('change'); - } - - this.close(); - this.el.focus(); - } - }, { - key: "clear", - value: function clear() { - this.done(null, true); - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(Timepicker.__proto__ || Object.getPrototypeOf(Timepicker), "init", this).call(this, this, els, options); - } - }, { - key: "_addLeadingZero", - value: function _addLeadingZero(num) { - return (num < 10 ? '0' : '') + num; - } - }, { - key: "_createSVGEl", - value: function _createSVGEl(name) { - var svgNS = 'http://www.w3.org/2000/svg'; - return document.createElementNS(svgNS, name); - } - - /** - * @typedef {Object} Point - * @property {number} x The X Coordinate - * @property {number} y The Y Coordinate - */ - - /** - * Get x position of mouse or touch event - * @param {Event} e - * @return {Point} x and y location - */ - - }, { - key: "_Pos", - value: function _Pos(e) { - if (e.targetTouches && e.targetTouches.length >= 1) { - return { x: e.targetTouches[0].clientX, y: e.targetTouches[0].clientY }; - } - // mouse event - return { x: e.clientX, y: e.clientY }; - } - - /** - * Get Instance - */ - - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_Timepicker; - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return Timepicker; - }(Component); - - Timepicker._template = [''].join(''); - - M.Timepicker = Timepicker; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Timepicker, 'timepicker', 'M_Timepicker'); - } -})(cash); -;(function ($) { - 'use strict'; - - var _defaults = {}; - - /** - * @class - * - */ - - var CharacterCounter = function (_Component17) { - _inherits(CharacterCounter, _Component17); - - /** - * Construct CharacterCounter instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - function CharacterCounter(el, options) { - _classCallCheck(this, CharacterCounter); - - var _this60 = _possibleConstructorReturn(this, (CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter)).call(this, CharacterCounter, el, options)); - - _this60.el.M_CharacterCounter = _this60; - - /** - * Options for the character counter - */ - _this60.options = $.extend({}, CharacterCounter.defaults, options); - - _this60.isInvalid = false; - _this60.isValidLength = false; - _this60._setupCounter(); - _this60._setupEventHandlers(); - return _this60; - } - - _createClass(CharacterCounter, [{ - key: "destroy", - - - /** - * Teardown component - */ - value: function destroy() { - this._removeEventHandlers(); - this.el.CharacterCounter = undefined; - this._removeCounter(); - } - - /** - * Setup Event Handlers - */ - - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - this._handleUpdateCounterBound = this.updateCounter.bind(this); - - this.el.addEventListener('focus', this._handleUpdateCounterBound, true); - this.el.addEventListener('input', this._handleUpdateCounterBound, true); - } - - /** - * Remove Event Handlers - */ - - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - this.el.removeEventListener('focus', this._handleUpdateCounterBound, true); - this.el.removeEventListener('input', this._handleUpdateCounterBound, true); - } - - /** - * Setup counter element - */ - - }, { - key: "_setupCounter", - value: function _setupCounter() { - this.counterEl = document.createElement('span'); - $(this.counterEl).addClass('character-counter').css({ - float: 'right', - 'font-size': '12px', - height: 1 - }); - - this.$el.parent().append(this.counterEl); - } - - /** - * Remove counter element - */ - - }, { - key: "_removeCounter", - value: function _removeCounter() { - $(this.counterEl).remove(); - } - - /** - * Update counter - */ - - }, { - key: "updateCounter", - value: function updateCounter() { - var maxLength = +this.$el.attr('data-length'), - actualLength = this.el.value.length; - this.isValidLength = actualLength <= maxLength; - var counterString = actualLength; - - if (maxLength) { - counterString += '/' + maxLength; - this._validateInput(); - } - - $(this.counterEl).html(counterString); - } - - /** - * Add validation classes - */ - - }, { - key: "_validateInput", - value: function _validateInput() { - if (this.isValidLength && this.isInvalid) { - this.isInvalid = false; - this.$el.removeClass('invalid'); - } else if (!this.isValidLength && !this.isInvalid) { - this.isInvalid = true; - this.$el.removeClass('valid'); - this.$el.addClass('invalid'); - } - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter), "init", this).call(this, this, els, options); - } - - /** - * Get Instance - */ - - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_CharacterCounter; - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return CharacterCounter; - }(Component); - - M.CharacterCounter = CharacterCounter; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(CharacterCounter, 'characterCounter', 'M_CharacterCounter'); - } -})(cash); -;(function ($) { - 'use strict'; - - var _defaults = { - duration: 200, // ms - dist: -100, // zoom scale TODO: make this more intuitive as an option - shift: 0, // spacing for center image - padding: 0, // Padding between non center items - numVisible: 5, // Number of visible items in carousel - fullWidth: false, // Change to full width styles - indicators: false, // Toggle indicators - noWrap: false, // Don't wrap around and cycle through items. - onCycleTo: null // Callback for when a new slide is cycled to. - }; - - /** - * @class - * - */ - - var Carousel = function (_Component18) { - _inherits(Carousel, _Component18); - - /** - * Construct Carousel instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - function Carousel(el, options) { - _classCallCheck(this, Carousel); - - var _this61 = _possibleConstructorReturn(this, (Carousel.__proto__ || Object.getPrototypeOf(Carousel)).call(this, Carousel, el, options)); - - _this61.el.M_Carousel = _this61; - - /** - * Options for the carousel - * @member Carousel#options - * @prop {Number} duration - * @prop {Number} dist - * @prop {Number} shift - * @prop {Number} padding - * @prop {Number} numVisible - * @prop {Boolean} fullWidth - * @prop {Boolean} indicators - * @prop {Boolean} noWrap - * @prop {Function} onCycleTo - */ - _this61.options = $.extend({}, Carousel.defaults, options); - - // Setup - _this61.hasMultipleSlides = _this61.$el.find('.carousel-item').length > 1; - _this61.showIndicators = _this61.options.indicators && _this61.hasMultipleSlides; - _this61.noWrap = _this61.options.noWrap || !_this61.hasMultipleSlides; - _this61.pressed = false; - _this61.dragged = false; - _this61.offset = _this61.target = 0; - _this61.images = []; - _this61.itemWidth = _this61.$el.find('.carousel-item').first().innerWidth(); - _this61.itemHeight = _this61.$el.find('.carousel-item').first().innerHeight(); - _this61.dim = _this61.itemWidth * 2 + _this61.options.padding || 1; // Make sure dim is non zero for divisions. - _this61._autoScrollBound = _this61._autoScroll.bind(_this61); - _this61._trackBound = _this61._track.bind(_this61); - - // Full Width carousel setup - if (_this61.options.fullWidth) { - _this61.options.dist = 0; - _this61._setCarouselHeight(); - - // Offset fixed items when indicators. - if (_this61.showIndicators) { - _this61.$el.find('.carousel-fixed-item').addClass('with-indicators'); - } - } - - // Iterate through slides - _this61.$indicators = $(''); - _this61.$el.find('.carousel-item').each(function (el, i) { - _this61.images.push(el); - if (_this61.showIndicators) { - var $indicator = $('
  • '); - - // Add active to first by default. - if (i === 0) { - $indicator[0].classList.add('active'); - } - - _this61.$indicators.append($indicator); - } - }); - if (_this61.showIndicators) { - _this61.$el.append(_this61.$indicators); - } - _this61.count = _this61.images.length; - - // Cap numVisible at count - _this61.options.numVisible = Math.min(_this61.count, _this61.options.numVisible); - - // Setup cross browser string - _this61.xform = 'transform'; - ['webkit', 'Moz', 'O', 'ms'].every(function (prefix) { - var e = prefix + 'Transform'; - if (typeof document.body.style[e] !== 'undefined') { - _this61.xform = e; - return false; - } - return true; - }); - - _this61._setupEventHandlers(); - _this61._scroll(_this61.offset); - return _this61; - } - - _createClass(Carousel, [{ - key: "destroy", - - - /** - * Teardown component - */ - value: function destroy() { - this._removeEventHandlers(); - this.el.M_Carousel = undefined; - } - - /** - * Setup Event Handlers - */ - - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - var _this62 = this; - - this._handleCarouselTapBound = this._handleCarouselTap.bind(this); - this._handleCarouselDragBound = this._handleCarouselDrag.bind(this); - this._handleCarouselReleaseBound = this._handleCarouselRelease.bind(this); - this._handleCarouselClickBound = this._handleCarouselClick.bind(this); - - if (typeof window.ontouchstart !== 'undefined') { - this.el.addEventListener('touchstart', this._handleCarouselTapBound); - this.el.addEventListener('touchmove', this._handleCarouselDragBound); - this.el.addEventListener('touchend', this._handleCarouselReleaseBound); - } - - this.el.addEventListener('mousedown', this._handleCarouselTapBound); - this.el.addEventListener('mousemove', this._handleCarouselDragBound); - this.el.addEventListener('mouseup', this._handleCarouselReleaseBound); - this.el.addEventListener('mouseleave', this._handleCarouselReleaseBound); - this.el.addEventListener('click', this._handleCarouselClickBound); - - if (this.showIndicators && this.$indicators) { - this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this); - this.$indicators.find('.indicator-item').each(function (el, i) { - el.addEventListener('click', _this62._handleIndicatorClickBound); - }); - } - - // Resize - var throttledResize = M.throttle(this._handleResize, 200); - this._handleThrottledResizeBound = throttledResize.bind(this); - - window.addEventListener('resize', this._handleThrottledResizeBound); - } - - /** - * Remove Event Handlers - */ - - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - var _this63 = this; - - if (typeof window.ontouchstart !== 'undefined') { - this.el.removeEventListener('touchstart', this._handleCarouselTapBound); - this.el.removeEventListener('touchmove', this._handleCarouselDragBound); - this.el.removeEventListener('touchend', this._handleCarouselReleaseBound); - } - this.el.removeEventListener('mousedown', this._handleCarouselTapBound); - this.el.removeEventListener('mousemove', this._handleCarouselDragBound); - this.el.removeEventListener('mouseup', this._handleCarouselReleaseBound); - this.el.removeEventListener('mouseleave', this._handleCarouselReleaseBound); - this.el.removeEventListener('click', this._handleCarouselClickBound); - - if (this.showIndicators && this.$indicators) { - this.$indicators.find('.indicator-item').each(function (el, i) { - el.removeEventListener('click', _this63._handleIndicatorClickBound); - }); - } - - window.removeEventListener('resize', this._handleThrottledResizeBound); - } - - /** - * Handle Carousel Tap - * @param {Event} e - */ - - }, { - key: "_handleCarouselTap", - value: function _handleCarouselTap(e) { - // Fixes firefox draggable image bug - if (e.type === 'mousedown' && $(e.target).is('img')) { - e.preventDefault(); - } - this.pressed = true; - this.dragged = false; - this.verticalDragged = false; - this.reference = this._xpos(e); - this.referenceY = this._ypos(e); - - this.velocity = this.amplitude = 0; - this.frame = this.offset; - this.timestamp = Date.now(); - clearInterval(this.ticker); - this.ticker = setInterval(this._trackBound, 100); - } - - /** - * Handle Carousel Drag - * @param {Event} e - */ - - }, { - key: "_handleCarouselDrag", - value: function _handleCarouselDrag(e) { - var x = void 0, - y = void 0, - delta = void 0, - deltaY = void 0; - if (this.pressed) { - x = this._xpos(e); - y = this._ypos(e); - delta = this.reference - x; - deltaY = Math.abs(this.referenceY - y); - if (deltaY < 30 && !this.verticalDragged) { - // If vertical scrolling don't allow dragging. - if (delta > 2 || delta < -2) { - this.dragged = true; - this.reference = x; - this._scroll(this.offset + delta); - } - } else if (this.dragged) { - // If dragging don't allow vertical scroll. - e.preventDefault(); - e.stopPropagation(); - return false; - } else { - // Vertical scrolling. - this.verticalDragged = true; - } - } - - if (this.dragged) { - // If dragging don't allow vertical scroll. - e.preventDefault(); - e.stopPropagation(); - return false; - } - } - - /** - * Handle Carousel Release - * @param {Event} e - */ - - }, { - key: "_handleCarouselRelease", - value: function _handleCarouselRelease(e) { - if (this.pressed) { - this.pressed = false; - } else { - return; - } - - clearInterval(this.ticker); - this.target = this.offset; - if (this.velocity > 10 || this.velocity < -10) { - this.amplitude = 0.9 * this.velocity; - this.target = this.offset + this.amplitude; - } - this.target = Math.round(this.target / this.dim) * this.dim; - - // No wrap of items. - if (this.noWrap) { - if (this.target >= this.dim * (this.count - 1)) { - this.target = this.dim * (this.count - 1); - } else if (this.target < 0) { - this.target = 0; - } - } - this.amplitude = this.target - this.offset; - this.timestamp = Date.now(); - requestAnimationFrame(this._autoScrollBound); - - if (this.dragged) { - e.preventDefault(); - e.stopPropagation(); - } - return false; - } - - /** - * Handle Carousel Click - * @param {Event} e - */ - - }, { - key: "_handleCarouselClick", - value: function _handleCarouselClick(e) { - // Disable clicks if carousel was dragged. - if (this.dragged) { - e.preventDefault(); - e.stopPropagation(); - return false; - } else if (!this.options.fullWidth) { - var clickedIndex = $(e.target).closest('.carousel-item').index(); - var diff = this._wrap(this.center) - clickedIndex; - - // Disable clicks if carousel was shifted by click - if (diff !== 0) { - e.preventDefault(); - e.stopPropagation(); - } - - // fixes https://github.com/materializecss/materialize/issues/180 - if (clickedIndex < 0) { - // relative X position > center of carousel = clicked at the right part of the carousel - if (e.clientX - e.target.getBoundingClientRect().left > this.el.clientWidth / 2) { - this.next(); - } else { - this.prev(); - } - } else { - this._cycleTo(clickedIndex); - } - } - } - - /** - * Handle Indicator CLick - * @param {Event} e - */ - - }, { - key: "_handleIndicatorClick", - value: function _handleIndicatorClick(e) { - e.stopPropagation(); - - var indicator = $(e.target).closest('.indicator-item'); - if (indicator.length) { - this._cycleTo(indicator.index()); - } - } - - /** - * Handle Throttle Resize - * @param {Event} e - */ - - }, { - key: "_handleResize", - value: function _handleResize(e) { - if (this.options.fullWidth) { - this.itemWidth = this.$el.find('.carousel-item').first().innerWidth(); - this.imageHeight = this.$el.find('.carousel-item.active').height(); - this.dim = this.itemWidth * 2 + this.options.padding; - this.offset = this.center * 2 * this.itemWidth; - this.target = this.offset; - this._setCarouselHeight(true); - } else { - this._scroll(); - } - } - - /** - * Set carousel height based on first slide - * @param {Booleam} imageOnly - true for image slides - */ - - }, { - key: "_setCarouselHeight", - value: function _setCarouselHeight(imageOnly) { - var _this64 = this; - - var firstSlide = this.$el.find('.carousel-item.active').length ? this.$el.find('.carousel-item.active').first() : this.$el.find('.carousel-item').first(); - var firstImage = firstSlide.find('img').first(); - if (firstImage.length) { - if (firstImage[0].complete) { - // If image won't trigger the load event - var imageHeight = firstImage.height(); - if (imageHeight > 0) { - this.$el.css('height', imageHeight + 'px'); - } else { - // If image still has no height, use the natural dimensions to calculate - var naturalWidth = firstImage[0].naturalWidth; - var naturalHeight = firstImage[0].naturalHeight; - var adjustedHeight = this.$el.width() / naturalWidth * naturalHeight; - this.$el.css('height', adjustedHeight + 'px'); - } - } else { - // Get height when image is loaded normally - firstImage.one('load', function (el, i) { - _this64.$el.css('height', el.offsetHeight + 'px'); - }); - } - } else if (!imageOnly) { - var slideHeight = firstSlide.height(); - this.$el.css('height', slideHeight + 'px'); - } - } - - /** - * Get x position from event - * @param {Event} e - */ - - }, { - key: "_xpos", - value: function _xpos(e) { - // touch event - if (e.targetTouches && e.targetTouches.length >= 1) { - return e.targetTouches[0].clientX; - } - - // mouse event - return e.clientX; - } - - /** - * Get y position from event - * @param {Event} e - */ - - }, { - key: "_ypos", - value: function _ypos(e) { - // touch event - if (e.targetTouches && e.targetTouches.length >= 1) { - return e.targetTouches[0].clientY; - } - - // mouse event - return e.clientY; - } - - /** - * Wrap index - * @param {Number} x - */ - - }, { - key: "_wrap", - value: function _wrap(x) { - return x >= this.count ? x % this.count : x < 0 ? this._wrap(this.count + x % this.count) : x; - } - - /** - * Tracks scrolling information - */ - - }, { - key: "_track", - value: function _track() { - var now = void 0, - elapsed = void 0, - delta = void 0, - v = void 0; - - now = Date.now(); - elapsed = now - this.timestamp; - this.timestamp = now; - delta = this.offset - this.frame; - this.frame = this.offset; - - v = 1000 * delta / (1 + elapsed); - this.velocity = 0.8 * v + 0.2 * this.velocity; - } - - /** - * Auto scrolls to nearest carousel item. - */ - - }, { - key: "_autoScroll", - value: function _autoScroll() { - var elapsed = void 0, - delta = void 0; - - if (this.amplitude) { - elapsed = Date.now() - this.timestamp; - delta = this.amplitude * Math.exp(-elapsed / this.options.duration); - if (delta > 2 || delta < -2) { - this._scroll(this.target - delta); - requestAnimationFrame(this._autoScrollBound); - } else { - this._scroll(this.target); - } - } - } - - /** - * Scroll to target - * @param {Number} x - */ - - }, { - key: "_scroll", - value: function _scroll(x) { - var _this65 = this; - - // Track scrolling state - if (!this.$el.hasClass('scrolling')) { - this.el.classList.add('scrolling'); - } - if (this.scrollingTimeout != null) { - window.clearTimeout(this.scrollingTimeout); - } - this.scrollingTimeout = window.setTimeout(function () { - _this65.$el.removeClass('scrolling'); - }, this.options.duration); - - // Start actual scroll - var i = void 0, - half = void 0, - delta = void 0, - dir = void 0, - tween = void 0, - el = void 0, - alignment = void 0, - zTranslation = void 0, - tweenedOpacity = void 0, - centerTweenedOpacity = void 0; - var lastCenter = this.center; - var numVisibleOffset = 1 / this.options.numVisible; - - this.offset = typeof x === 'number' ? x : this.offset; - this.center = Math.floor((this.offset + this.dim / 2) / this.dim); - delta = this.offset - this.center * this.dim; - dir = delta < 0 ? 1 : -1; - tween = -dir * delta * 2 / this.dim; - half = this.count >> 1; - - if (this.options.fullWidth) { - alignment = 'translateX(0)'; - centerTweenedOpacity = 1; - } else { - alignment = 'translateX(' + (this.el.clientWidth - this.itemWidth) / 2 + 'px) '; - alignment += 'translateY(' + (this.el.clientHeight - this.itemHeight) / 2 + 'px)'; - centerTweenedOpacity = 1 - numVisibleOffset * tween; - } - - // Set indicator active - if (this.showIndicators) { - var diff = this.center % this.count; - var activeIndicator = this.$indicators.find('.indicator-item.active'); - if (activeIndicator.index() !== diff) { - activeIndicator.removeClass('active'); - this.$indicators.find('.indicator-item').eq(diff)[0].classList.add('active'); - } - } - - // center - // Don't show wrapped items. - if (!this.noWrap || this.center >= 0 && this.center < this.count) { - el = this.images[this._wrap(this.center)]; - - // Add active class to center item. - if (!$(el).hasClass('active')) { - this.$el.find('.carousel-item').removeClass('active'); - el.classList.add('active'); - } - var transformString = alignment + " translateX(" + -delta / 2 + "px) translateX(" + dir * this.options.shift * tween * i + "px) translateZ(" + this.options.dist * tween + "px)"; - this._updateItemStyle(el, centerTweenedOpacity, 0, transformString); - } - - for (i = 1; i <= half; ++i) { - // right side - if (this.options.fullWidth) { - zTranslation = this.options.dist; - tweenedOpacity = i === half && delta < 0 ? 1 - tween : 1; - } else { - zTranslation = this.options.dist * (i * 2 + tween * dir); - tweenedOpacity = 1 - numVisibleOffset * (i * 2 + tween * dir); - } - // Don't show wrapped items. - if (!this.noWrap || this.center + i < this.count) { - el = this.images[this._wrap(this.center + i)]; - var _transformString = alignment + " translateX(" + (this.options.shift + (this.dim * i - delta) / 2) + "px) translateZ(" + zTranslation + "px)"; - this._updateItemStyle(el, tweenedOpacity, -i, _transformString); - } - - // left side - if (this.options.fullWidth) { - zTranslation = this.options.dist; - tweenedOpacity = i === half && delta > 0 ? 1 - tween : 1; - } else { - zTranslation = this.options.dist * (i * 2 - tween * dir); - tweenedOpacity = 1 - numVisibleOffset * (i * 2 - tween * dir); - } - // Don't show wrapped items. - if (!this.noWrap || this.center - i >= 0) { - el = this.images[this._wrap(this.center - i)]; - var _transformString2 = alignment + " translateX(" + (-this.options.shift + (-this.dim * i - delta) / 2) + "px) translateZ(" + zTranslation + "px)"; - this._updateItemStyle(el, tweenedOpacity, -i, _transformString2); - } - } - - // center - // Don't show wrapped items. - if (!this.noWrap || this.center >= 0 && this.center < this.count) { - el = this.images[this._wrap(this.center)]; - var _transformString3 = alignment + " translateX(" + -delta / 2 + "px) translateX(" + dir * this.options.shift * tween + "px) translateZ(" + this.options.dist * tween + "px)"; - this._updateItemStyle(el, centerTweenedOpacity, 0, _transformString3); - } - - // onCycleTo callback - var $currItem = this.$el.find('.carousel-item').eq(this._wrap(this.center)); - if (lastCenter !== this.center && typeof this.options.onCycleTo === 'function') { - this.options.onCycleTo.call(this, $currItem[0], this.dragged); - } - - // One time callback - if (typeof this.oneTimeCallback === 'function') { - this.oneTimeCallback.call(this, $currItem[0], this.dragged); - this.oneTimeCallback = null; - } - } - - /** - * Cycle to target - * @param {Element} el - * @param {Number} opacity - * @param {Number} zIndex - * @param {String} transform - */ - - }, { - key: "_updateItemStyle", - value: function _updateItemStyle(el, opacity, zIndex, transform) { - el.style[this.xform] = transform; - el.style.zIndex = zIndex; - el.style.opacity = opacity; - el.style.visibility = 'visible'; - } - - /** - * Cycle to target - * @param {Number} n - * @param {Function} callback - */ - - }, { - key: "_cycleTo", - value: function _cycleTo(n, callback) { - var diff = this.center % this.count - n; - - // Account for wraparound. - if (!this.noWrap) { - if (diff < 0) { - if (Math.abs(diff + this.count) < Math.abs(diff)) { - diff += this.count; - } - } else if (diff > 0) { - if (Math.abs(diff - this.count) < diff) { - diff -= this.count; - } - } - } - - this.target = this.dim * Math.round(this.offset / this.dim); - // Next - if (diff < 0) { - this.target += this.dim * Math.abs(diff); - - // Prev - } else if (diff > 0) { - this.target -= this.dim * diff; - } - - // Set one time callback - if (typeof callback === 'function') { - this.oneTimeCallback = callback; - } - - // Scroll - if (this.offset !== this.target) { - this.amplitude = this.target - this.offset; - this.timestamp = Date.now(); - requestAnimationFrame(this._autoScrollBound); - } - } - - /** - * Cycle to next item - * @param {Number} [n] - */ - - }, { - key: "next", - value: function next(n) { - if (n === undefined || isNaN(n)) { - n = 1; - } - - var index = this.center + n; - if (index >= this.count || index < 0) { - if (this.noWrap) { - return; - } - - index = this._wrap(index); - } - this._cycleTo(index); - } - - /** - * Cycle to previous item - * @param {Number} [n] - */ - - }, { - key: "prev", - value: function prev(n) { - if (n === undefined || isNaN(n)) { - n = 1; - } - - var index = this.center - n; - if (index >= this.count || index < 0) { - if (this.noWrap) { - return; - } - - index = this._wrap(index); - } - - this._cycleTo(index); - } - - /** - * Cycle to nth item - * @param {Number} [n] - * @param {Function} callback - */ - - }, { - key: "set", - value: function set(n, callback) { - if (n === undefined || isNaN(n)) { - n = 0; - } - - if (n > this.count || n < 0) { - if (this.noWrap) { - return; - } - - n = this._wrap(n); - } - - this._cycleTo(n, callback); - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(Carousel.__proto__ || Object.getPrototypeOf(Carousel), "init", this).call(this, this, els, options); - } - - /** - * Get Instance - */ - - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_Carousel; - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return Carousel; - }(Component); - - M.Carousel = Carousel; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Carousel, 'carousel', 'M_Carousel'); - } -})(cash); -;(function ($) { - 'use strict'; - - var _defaults = { - onOpen: undefined, - onClose: undefined - }; - - /** - * @class - * - */ - - var TapTarget = function (_Component19) { - _inherits(TapTarget, _Component19); - - /** - * Construct TapTarget instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - function TapTarget(el, options) { - _classCallCheck(this, TapTarget); - - var _this66 = _possibleConstructorReturn(this, (TapTarget.__proto__ || Object.getPrototypeOf(TapTarget)).call(this, TapTarget, el, options)); - - _this66.el.M_TapTarget = _this66; - - /** - * Options for the select - * @member TapTarget#options - * @prop {Function} onOpen - Callback function called when feature discovery is opened - * @prop {Function} onClose - Callback function called when feature discovery is closed - */ - _this66.options = $.extend({}, TapTarget.defaults, options); - - _this66.isOpen = false; - - // setup - _this66.$origin = $('#' + _this66.$el.attr('data-target')); - _this66._setup(); - - _this66._calculatePositioning(); - _this66._setupEventHandlers(); - return _this66; - } - - _createClass(TapTarget, [{ - key: "destroy", - - - /** - * Teardown component - */ - value: function destroy() { - this._removeEventHandlers(); - this.el.TapTarget = undefined; - } - - /** - * Setup Event Handlers - */ - - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - this._handleDocumentClickBound = this._handleDocumentClick.bind(this); - this._handleTargetClickBound = this._handleTargetClick.bind(this); - this._handleOriginClickBound = this._handleOriginClick.bind(this); - - this.el.addEventListener('click', this._handleTargetClickBound); - this.originEl.addEventListener('click', this._handleOriginClickBound); - - // Resize - var throttledResize = M.throttle(this._handleResize, 200); - this._handleThrottledResizeBound = throttledResize.bind(this); - - window.addEventListener('resize', this._handleThrottledResizeBound); - } - - /** - * Remove Event Handlers - */ - - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - this.el.removeEventListener('click', this._handleTargetClickBound); - this.originEl.removeEventListener('click', this._handleOriginClickBound); - window.removeEventListener('resize', this._handleThrottledResizeBound); - } - - /** - * Handle Target Click - * @param {Event} e - */ - - }, { - key: "_handleTargetClick", - value: function _handleTargetClick(e) { - this.open(); - } - - /** - * Handle Origin Click - * @param {Event} e - */ - - }, { - key: "_handleOriginClick", - value: function _handleOriginClick(e) { - this.close(); - } - - /** - * Handle Resize - * @param {Event} e - */ - - }, { - key: "_handleResize", - value: function _handleResize(e) { - this._calculatePositioning(); - } - - /** - * Handle Resize - * @param {Event} e - */ - - }, { - key: "_handleDocumentClick", - value: function _handleDocumentClick(e) { - if (!$(e.target).closest('.tap-target-wrapper').length) { - this.close(); - e.preventDefault(); - e.stopPropagation(); - } - } - - /** - * Setup Tap Target - */ - - }, { - key: "_setup", - value: function _setup() { - // Creating tap target - this.wrapper = this.$el.parent()[0]; - this.waveEl = $(this.wrapper).find('.tap-target-wave')[0]; - this.originEl = $(this.wrapper).find('.tap-target-origin')[0]; - this.contentEl = this.$el.find('.tap-target-content')[0]; - - // Creating wrapper - if (!$(this.wrapper).hasClass('.tap-target-wrapper')) { - this.wrapper = document.createElement('div'); - this.wrapper.classList.add('tap-target-wrapper'); - this.$el.before($(this.wrapper)); - this.wrapper.append(this.el); - } - - // Creating content - if (!this.contentEl) { - this.contentEl = document.createElement('div'); - this.contentEl.classList.add('tap-target-content'); - this.$el.append(this.contentEl); - } - - // Creating foreground wave - if (!this.waveEl) { - this.waveEl = document.createElement('div'); - this.waveEl.classList.add('tap-target-wave'); - - // Creating origin - if (!this.originEl) { - this.originEl = this.$origin.clone(true, true); - this.originEl.addClass('tap-target-origin'); - this.originEl.removeAttr('id'); - this.originEl.removeAttr('style'); - this.originEl = this.originEl[0]; - this.waveEl.append(this.originEl); - } - - this.wrapper.append(this.waveEl); - } - } - - /** - * Calculate positioning - */ - - }, { - key: "_calculatePositioning", - value: function _calculatePositioning() { - // Element or parent is fixed position? - var isFixed = this.$origin.css('position') === 'fixed'; - if (!isFixed) { - var parents = this.$origin.parents(); - for (var i = 0; i < parents.length; i++) { - isFixed = $(parents[i]).css('position') == 'fixed'; - if (isFixed) { - break; - } - } - } - - // Calculating origin - var originWidth = this.$origin.outerWidth(); - var originHeight = this.$origin.outerHeight(); - var originTop = isFixed ? this.$origin.offset().top - M.getDocumentScrollTop() : this.$origin.offset().top; - var originLeft = isFixed ? this.$origin.offset().left - M.getDocumentScrollLeft() : this.$origin.offset().left; - - // Calculating screen - var windowWidth = window.innerWidth; - var windowHeight = window.innerHeight; - var scrollBarWidth = windowWidth - document.documentElement.clientWidth; - var centerX = windowWidth / 2; - var centerY = windowHeight / 2; - var isLeft = originLeft <= centerX; - var isRight = originLeft > centerX; - var isTop = originTop <= centerY; - var isBottom = originTop > centerY; - var isCenterX = originLeft >= windowWidth * 0.25 && originLeft <= windowWidth * 0.75; - - // Calculating tap target - var tapTargetWidth = this.$el.outerWidth(); - var tapTargetHeight = this.$el.outerHeight(); - var tapTargetTop = originTop + originHeight / 2 - tapTargetHeight / 2; - var tapTargetLeft = originLeft + originWidth / 2 - tapTargetWidth / 2; - var tapTargetPosition = isFixed ? 'fixed' : 'absolute'; - - // Calculating content - var tapTargetTextWidth = isCenterX ? tapTargetWidth : tapTargetWidth / 2 + originWidth; - var tapTargetTextHeight = tapTargetHeight / 2; - var tapTargetTextTop = isTop ? tapTargetHeight / 2 : 0; - var tapTargetTextBottom = 0; - var tapTargetTextLeft = isLeft && !isCenterX ? tapTargetWidth / 2 - originWidth : 0; - var tapTargetTextRight = 0; - var tapTargetTextPadding = originWidth; - var tapTargetTextAlign = isBottom ? 'bottom' : 'top'; - - // Calculating wave - var tapTargetWaveWidth = originWidth > originHeight ? originWidth * 2 : originWidth * 2; - var tapTargetWaveHeight = tapTargetWaveWidth; - var tapTargetWaveTop = tapTargetHeight / 2 - tapTargetWaveHeight / 2; - var tapTargetWaveLeft = tapTargetWidth / 2 - tapTargetWaveWidth / 2; - - // Setting tap target - var tapTargetWrapperCssObj = {}; - tapTargetWrapperCssObj.top = isTop ? tapTargetTop + 'px' : ''; - tapTargetWrapperCssObj.right = isRight ? windowWidth - tapTargetLeft - tapTargetWidth - scrollBarWidth + 'px' : ''; - tapTargetWrapperCssObj.bottom = isBottom ? windowHeight - tapTargetTop - tapTargetHeight + 'px' : ''; - tapTargetWrapperCssObj.left = isLeft ? tapTargetLeft + 'px' : ''; - tapTargetWrapperCssObj.position = tapTargetPosition; - $(this.wrapper).css(tapTargetWrapperCssObj); - - // Setting content - $(this.contentEl).css({ - width: tapTargetTextWidth + 'px', - height: tapTargetTextHeight + 'px', - top: tapTargetTextTop + 'px', - right: tapTargetTextRight + 'px', - bottom: tapTargetTextBottom + 'px', - left: tapTargetTextLeft + 'px', - padding: tapTargetTextPadding + 'px', - verticalAlign: tapTargetTextAlign - }); - - // Setting wave - $(this.waveEl).css({ - top: tapTargetWaveTop + 'px', - left: tapTargetWaveLeft + 'px', - width: tapTargetWaveWidth + 'px', - height: tapTargetWaveHeight + 'px' - }); - } - - /** - * Open TapTarget - */ - - }, { - key: "open", - value: function open() { - if (this.isOpen) { - return; - } - - // onOpen callback - if (typeof this.options.onOpen === 'function') { - this.options.onOpen.call(this, this.$origin[0]); - } - - this.isOpen = true; - this.wrapper.classList.add('open'); - - document.body.addEventListener('click', this._handleDocumentClickBound, true); - document.body.addEventListener('touchend', this._handleDocumentClickBound); - } - - /** - * Close Tap Target - */ - - }, { - key: "close", - value: function close() { - if (!this.isOpen) { - return; - } - - // onClose callback - if (typeof this.options.onClose === 'function') { - this.options.onClose.call(this, this.$origin[0]); - } - - this.isOpen = false; - this.wrapper.classList.remove('open'); - - document.body.removeEventListener('click', this._handleDocumentClickBound, true); - document.body.removeEventListener('touchend', this._handleDocumentClickBound); - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(TapTarget.__proto__ || Object.getPrototypeOf(TapTarget), "init", this).call(this, this, els, options); - } - - /** - * Get Instance - */ - - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_TapTarget; - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); - - return TapTarget; - }(Component); - - M.TapTarget = TapTarget; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(TapTarget, 'tapTarget', 'M_TapTarget'); - } -})(cash); -;(function ($) { - 'use strict'; - - var _defaults = { - classes: '', - dropdownOptions: {} - }; - - var FormSelect = function (_Component20) { - _inherits(FormSelect, _Component20); - - function FormSelect(el, options) { - _classCallCheck(this, FormSelect); - - var _this67 = _possibleConstructorReturn(this, (FormSelect.__proto__ || Object.getPrototypeOf(FormSelect)).call(this, FormSelect, el, options)); - - if (_this67.$el.hasClass('browser-default')) return _possibleConstructorReturn(_this67); - _this67.el.M_FormSelect = _this67; - _this67.options = $.extend({}, FormSelect.defaults, options); - _this67.isMultiple = _this67.$el.prop('multiple'); - _this67.el.tabIndex = -1; - _this67._values = []; - _this67.labelEl = null; - _this67._labelFor = false; - _this67._setupDropdown(); - _this67._setupEventHandlers(); - return _this67; - } - - _createClass(FormSelect, [{ - key: "destroy", - value: function destroy() { - // Returns label to its original owner - if (this._labelFor) this.labelEl.setAttribute("for", this.el.id); - this._removeEventHandlers(); - this._removeDropdown(); - this.el.M_FormSelect = undefined; - } - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - var _this68 = this; - - this._handleSelectChangeBound = this._handleSelectChange.bind(this); - this._handleOptionClickBound = this._handleOptionClick.bind(this); - this._handleInputClickBound = this._handleInputClick.bind(this); - $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) { - el.addEventListener('click', _this68._handleOptionClickBound); - el.addEventListener('keydown', function (e) { - if (e.key === " " || e.key === "Enter") _this68._handleOptionClickBound(e); - }); - }); - this.el.addEventListener('change', this._handleSelectChangeBound); - this.input.addEventListener('click', this._handleInputClickBound); - } - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - var _this69 = this; - - $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) { - el.removeEventListener('click', _this69._handleOptionClickBound); - }); - this.el.removeEventListener('change', this._handleSelectChangeBound); - this.input.removeEventListener('click', this._handleInputClickBound); - } - }, { - key: "_handleSelectChange", - value: function _handleSelectChange(e) { - this._setValueToInput(); - } - }, { - key: "_handleOptionClick", - value: function _handleOptionClick(e) { - e.preventDefault(); - var virtualOption = $(e.target).closest('li')[0]; - this._selectOptionElement(virtualOption); - e.stopPropagation(); - } - }, { - key: "_arraysEqual", - value: function _arraysEqual(a, b) { - if (a === b) return true; - if (a == null || b == null) return false; - if (a.length !== b.length) return false; - for (var i = 0; i < a.length; ++i) { - if (a[i] !== b[i]) return false; - }return true; - } - }, { - key: "_selectOptionElement", - value: function _selectOptionElement(virtualOption) { - if (!$(virtualOption).hasClass('disabled') && !$(virtualOption).hasClass('optgroup')) { - var value = this._values.filter(function (value) { - return value.optionEl === virtualOption; - })[0]; - var previousSelectedValues = this.getSelectedValues(); - if (this.isMultiple) { - // Multi-Select - this._toggleEntryFromArray(value); - } else { - // Single-Select - this._deselectAll(); - this._selectValue(value); - } - // Refresh Input-Text - this._setValueToInput(); - // Trigger Change-Event only when data is different - var actualSelectedValues = this.getSelectedValues(); - var selectionHasChanged = !this._arraysEqual(previousSelectedValues, actualSelectedValues); - if (selectionHasChanged) this.$el.trigger('change'); - } - if (!this.isMultiple) this.dropdown.close(); - } - }, { - key: "_handleInputClick", - value: function _handleInputClick() { - if (this.dropdown && this.dropdown.isOpen) { - this._setValueToInput(); - this._setSelectedStates(); - } - } - }, { - key: "_setupDropdown", - value: function _setupDropdown() { - var _this70 = this; - - this.wrapper = document.createElement('div'); - this.wrapper.classList.add('select-wrapper'); - this.wrapper.classList.add('input-field'); - - if (this.options.classes.length > 0) { - var customClasses = this.options.classes.split(' ') || []; - customClasses.forEach(function (customClass) { - return _this70.wrapper.classList.add(customClass); - }); - } - - this.$el.before($(this.wrapper)); - - // Move actual select element into overflow hidden wrapper - var $hideSelect = $('
    '); - $(this.wrapper).append($hideSelect); - $hideSelect[0].appendChild(this.el); - - if (this.el.disabled) this.wrapper.classList.add('disabled'); - - // Create dropdown - this.$selectOptions = this.$el.children('option, optgroup'); - this.dropdownOptions = document.createElement('ul'); - this.dropdownOptions.id = "select-options-" + M.guid(); - $(this.dropdownOptions).addClass('dropdown-content select-dropdown ' + (this.isMultiple ? 'multiple-select-dropdown' : '')); - this.dropdownOptions.setAttribute("role", "listbox"); - this.dropdownOptions.setAttribute("aria-multiselectable", this.isMultiple); - - // Create dropdown structure - if (this.$selectOptions.length) { - this.$selectOptions.each(function (realOption) { - if ($(realOption).is('option')) { - // Option - var virtualOption = _this70._createAndAppendOptionWithIcon(realOption, _this70.isMultiple ? 'multiple' : undefined); - _this70._addOptionToValues(realOption, virtualOption); - } else if ($(realOption).is('optgroup')) { - // Optgroup - var selectOptions = $(realOption).children('option'); - var lId = "opt-group-" + M.guid(); - var groupParent = $("
  • " + realOption.getAttribute('label') + "
  • ")[0]; - var groupChildren = []; - $(_this70.dropdownOptions).append(groupParent); - selectOptions.each(function (realOption) { - var virtualOption = _this70._createAndAppendOptionWithIcon(realOption, 'optgroup-option'); - var cId = "opt-child-" + M.guid(); - virtualOption.id = cId; - groupChildren.push(cId); - _this70._addOptionToValues(realOption, virtualOption); - }); - groupParent.setAttribute("aria-owns", groupChildren.join(" ")); - } - }); - } - $(this.wrapper).append(this.dropdownOptions); - - // Add input dropdown - this.input = document.createElement('input'); - this.input.id = "m_select-input-" + M.guid(); - $(this.input).addClass('select-dropdown dropdown-trigger'); - this.input.setAttribute('type', 'text'); - this.input.setAttribute('readonly', 'true'); - this.input.setAttribute('data-target', this.dropdownOptions.id); - this.input.setAttribute('aria-readonly', 'true'); - this.input.setAttribute("aria-required", this.el.hasAttribute("required")); - if (this.el.disabled) $(this.input).prop('disabled', 'true'); - - // Makes new element to assume HTML's select label and - // aria-attributes, if exists - if (this.el.hasAttribute("aria-labelledby")) { - this.labelEl = document.getElementById(this.el.getAttribute("aria-labelledby")); - } else if (this.el.id != "") { - var lbl = $("label[for='" + this.el.id + "']"); - if (lbl.length) { - this.labelEl = lbl[0]; - this.labelEl.removeAttribute("for"); - this._labelFor = true; - } - } - - // Tries to find a valid label in parent element - if (!this.labelEl) { - this.labelEl = this.el.parentElement.querySelector('label'); - } - if (this.labelEl && this.labelEl.id == "") { - this.labelEl.id = "m_select-label-" + M.guid(); - } - - if (this.labelEl) { - this.labelEl.setAttribute("for", this.input.id); - this.dropdownOptions.setAttribute("aria-labelledby", this.labelEl.id); - } else this.dropdownOptions.setAttribute("aria-label", ""); - - var attrs = this.el.attributes; - for (var i = 0; i < attrs.length; ++i) { - var attr = attrs[i]; - if (attr.name.startsWith("aria-")) this.input.setAttribute(attr.name, attr.value); - } - - // Adds aria-attributes to input element - this.input.setAttribute("role", "combobox"); - this.input.setAttribute("aria-owns", this.dropdownOptions.id); - this.input.setAttribute("aria-controls", this.dropdownOptions.id); - this.input.setAttribute("aria-expanded", false); - this.input.placeholder = " "; +/* + * ATTENTION: An "eval-source-map" devtool has been used. + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +var M; +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ - $(this.wrapper).prepend(this.input); - this._setValueToInput(); +/***/ "./node_modules/animejs/lib/anime.es.js": +/*!**********************************************!*\ + !*** ./node_modules/animejs/lib/anime.es.js ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - // Add caret - var dropdownIcon = $(''); - $(this.wrapper).prepend(dropdownIcon[0]); - // Initialize dropdown - if (!this.el.disabled) { - var dropdownOptions = $.extend({}, this.options.dropdownOptions); - dropdownOptions.coverTrigger = false; - var userOnOpenEnd = dropdownOptions.onOpenEnd; - var userOnCloseEnd = dropdownOptions.onCloseEnd; - // Add callback for centering selected option when dropdown content is scrollable - dropdownOptions.onOpenEnd = function (el) { - var selectedOption = $(_this70.dropdownOptions).find('.selected').first(); - if (selectedOption.length) { - // Focus selected option in dropdown - M.keyDown = true; - _this70.dropdown.focusedIndex = selectedOption.index(); - _this70.dropdown._focusFocusedItem(); - M.keyDown = false; - // Handle scrolling to selected option - if (_this70.dropdown.isScrollable) { - var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this70.dropdownOptions.getBoundingClientRect().top; // scroll to selected option - scrollOffset -= _this70.dropdownOptions.clientHeight / 2; // center in dropdown - _this70.dropdownOptions.scrollTop = scrollOffset; - } - } - // Sets "aria-expanded" to "true" - _this70.input.setAttribute("aria-expanded", true); - // Handle user declared onOpenEnd if needed - if (userOnOpenEnd && typeof userOnOpenEnd === 'function') userOnOpenEnd.call(_this70.dropdown, _this70.el); - }; - // Add callback for reseting "expanded" state - dropdownOptions.onCloseEnd = function (el) { - // Sets "aria-expanded" to "false" - _this70.input.setAttribute("aria-expanded", false); - // Handle user declared onOpenEnd if needed - if (userOnCloseEnd && typeof userOnCloseEnd === 'function') userOnCloseEnd.call(_this70.dropdown, _this70.el); - }; - // Prevent dropdown from closing too early - dropdownOptions.closeOnClick = false; - this.dropdown = M.Dropdown.init(this.input, dropdownOptions); - } - // Add initial selections - this._setSelectedStates(); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/*\n * anime.js v3.2.1\n * (c) 2020 Julian Garnier\n * Released under the MIT license\n * animejs.com\n */\n\n// Defaults\n\nvar defaultInstanceSettings = {\n update: null,\n begin: null,\n loopBegin: null,\n changeBegin: null,\n change: null,\n changeComplete: null,\n loopComplete: null,\n complete: null,\n loop: 1,\n direction: 'normal',\n autoplay: true,\n timelineOffset: 0\n};\n\nvar defaultTweenSettings = {\n duration: 1000,\n delay: 0,\n endDelay: 0,\n easing: 'easeOutElastic(1, .5)',\n round: 0\n};\n\nvar validTransforms = ['translateX', 'translateY', 'translateZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'perspective', 'matrix', 'matrix3d'];\n\n// Caching\n\nvar cache = {\n CSS: {},\n springs: {}\n};\n\n// Utils\n\nfunction minMax(val, min, max) {\n return Math.min(Math.max(val, min), max);\n}\n\nfunction stringContains(str, text) {\n return str.indexOf(text) > -1;\n}\n\nfunction applyArguments(func, args) {\n return func.apply(null, args);\n}\n\nvar is = {\n arr: function (a) { return Array.isArray(a); },\n obj: function (a) { return stringContains(Object.prototype.toString.call(a), 'Object'); },\n pth: function (a) { return is.obj(a) && a.hasOwnProperty('totalLength'); },\n svg: function (a) { return a instanceof SVGElement; },\n inp: function (a) { return a instanceof HTMLInputElement; },\n dom: function (a) { return a.nodeType || is.svg(a); },\n str: function (a) { return typeof a === 'string'; },\n fnc: function (a) { return typeof a === 'function'; },\n und: function (a) { return typeof a === 'undefined'; },\n nil: function (a) { return is.und(a) || a === null; },\n hex: function (a) { return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a); },\n rgb: function (a) { return /^rgb/.test(a); },\n hsl: function (a) { return /^hsl/.test(a); },\n col: function (a) { return (is.hex(a) || is.rgb(a) || is.hsl(a)); },\n key: function (a) { return !defaultInstanceSettings.hasOwnProperty(a) && !defaultTweenSettings.hasOwnProperty(a) && a !== 'targets' && a !== 'keyframes'; },\n};\n\n// Easings\n\nfunction parseEasingParameters(string) {\n var match = /\\(([^)]+)\\)/.exec(string);\n return match ? match[1].split(',').map(function (p) { return parseFloat(p); }) : [];\n}\n\n// Spring solver inspired by Webkit Copyright © 2016 Apple Inc. All rights reserved. https://webkit.org/demos/spring/spring.js\n\nfunction spring(string, duration) {\n\n var params = parseEasingParameters(string);\n var mass = minMax(is.und(params[0]) ? 1 : params[0], .1, 100);\n var stiffness = minMax(is.und(params[1]) ? 100 : params[1], .1, 100);\n var damping = minMax(is.und(params[2]) ? 10 : params[2], .1, 100);\n var velocity = minMax(is.und(params[3]) ? 0 : params[3], .1, 100);\n var w0 = Math.sqrt(stiffness / mass);\n var zeta = damping / (2 * Math.sqrt(stiffness * mass));\n var wd = zeta < 1 ? w0 * Math.sqrt(1 - zeta * zeta) : 0;\n var a = 1;\n var b = zeta < 1 ? (zeta * w0 + -velocity) / wd : -velocity + w0;\n\n function solver(t) {\n var progress = duration ? (duration * t) / 1000 : t;\n if (zeta < 1) {\n progress = Math.exp(-progress * zeta * w0) * (a * Math.cos(wd * progress) + b * Math.sin(wd * progress));\n } else {\n progress = (a + b * progress) * Math.exp(-progress * w0);\n }\n if (t === 0 || t === 1) { return t; }\n return 1 - progress;\n }\n\n function getDuration() {\n var cached = cache.springs[string];\n if (cached) { return cached; }\n var frame = 1/6;\n var elapsed = 0;\n var rest = 0;\n while(true) {\n elapsed += frame;\n if (solver(elapsed) === 1) {\n rest++;\n if (rest >= 16) { break; }\n } else {\n rest = 0;\n }\n }\n var duration = elapsed * frame * 1000;\n cache.springs[string] = duration;\n return duration;\n }\n\n return duration ? solver : getDuration;\n\n}\n\n// Basic steps easing implementation https://developer.mozilla.org/fr/docs/Web/CSS/transition-timing-function\n\nfunction steps(steps) {\n if ( steps === void 0 ) steps = 10;\n\n return function (t) { return Math.ceil((minMax(t, 0.000001, 1)) * steps) * (1 / steps); };\n}\n\n// BezierEasing https://github.com/gre/bezier-easing\n\nvar bezier = (function () {\n\n var kSplineTableSize = 11;\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\n function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1 }\n function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1 }\n function C(aA1) { return 3.0 * aA1 }\n\n function calcBezier(aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT }\n function getSlope(aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1) }\n\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\n var currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) { aB = currentT; } else { aA = currentT; }\n } while (Math.abs(currentX) > 0.0000001 && ++i < 10);\n return currentT;\n }\n\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < 4; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) { return aGuessT; }\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n }\n\n function bezier(mX1, mY1, mX2, mY2) {\n\n if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) { return; }\n var sampleValues = new Float32Array(kSplineTableSize);\n\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n\n function getTForX(aX) {\n\n var intervalStart = 0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample;\n\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= 0.001) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n\n }\n\n return function (x) {\n if (mX1 === mY1 && mX2 === mY2) { return x; }\n if (x === 0 || x === 1) { return x; }\n return calcBezier(getTForX(x), mY1, mY2);\n }\n\n }\n\n return bezier;\n\n})();\n\nvar penner = (function () {\n\n // Based on jQuery UI's implemenation of easing equations from Robert Penner (http://www.robertpenner.com/easing)\n\n var eases = { linear: function () { return function (t) { return t; }; } };\n\n var functionEasings = {\n Sine: function () { return function (t) { return 1 - Math.cos(t * Math.PI / 2); }; },\n Circ: function () { return function (t) { return 1 - Math.sqrt(1 - t * t); }; },\n Back: function () { return function (t) { return t * t * (3 * t - 2); }; },\n Bounce: function () { return function (t) {\n var pow2, b = 4;\n while (t < (( pow2 = Math.pow(2, --b)) - 1) / 11) {}\n return 1 / Math.pow(4, 3 - b) - 7.5625 * Math.pow(( pow2 * 3 - 2 ) / 22 - t, 2)\n }; },\n Elastic: function (amplitude, period) {\n if ( amplitude === void 0 ) amplitude = 1;\n if ( period === void 0 ) period = .5;\n\n var a = minMax(amplitude, 1, 10);\n var p = minMax(period, .1, 2);\n return function (t) {\n return (t === 0 || t === 1) ? t : \n -a * Math.pow(2, 10 * (t - 1)) * Math.sin((((t - 1) - (p / (Math.PI * 2) * Math.asin(1 / a))) * (Math.PI * 2)) / p);\n }\n }\n };\n\n var baseEasings = ['Quad', 'Cubic', 'Quart', 'Quint', 'Expo'];\n\n baseEasings.forEach(function (name, i) {\n functionEasings[name] = function () { return function (t) { return Math.pow(t, i + 2); }; };\n });\n\n Object.keys(functionEasings).forEach(function (name) {\n var easeIn = functionEasings[name];\n eases['easeIn' + name] = easeIn;\n eases['easeOut' + name] = function (a, b) { return function (t) { return 1 - easeIn(a, b)(1 - t); }; };\n eases['easeInOut' + name] = function (a, b) { return function (t) { return t < 0.5 ? easeIn(a, b)(t * 2) / 2 : \n 1 - easeIn(a, b)(t * -2 + 2) / 2; }; };\n eases['easeOutIn' + name] = function (a, b) { return function (t) { return t < 0.5 ? (1 - easeIn(a, b)(1 - t * 2)) / 2 : \n (easeIn(a, b)(t * 2 - 1) + 1) / 2; }; };\n });\n\n return eases;\n\n})();\n\nfunction parseEasings(easing, duration) {\n if (is.fnc(easing)) { return easing; }\n var name = easing.split('(')[0];\n var ease = penner[name];\n var args = parseEasingParameters(easing);\n switch (name) {\n case 'spring' : return spring(easing, duration);\n case 'cubicBezier' : return applyArguments(bezier, args);\n case 'steps' : return applyArguments(steps, args);\n default : return applyArguments(ease, args);\n }\n}\n\n// Strings\n\nfunction selectString(str) {\n try {\n var nodes = document.querySelectorAll(str);\n return nodes;\n } catch(e) {\n return;\n }\n}\n\n// Arrays\n\nfunction filterArray(arr, callback) {\n var len = arr.length;\n var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n var result = [];\n for (var i = 0; i < len; i++) {\n if (i in arr) {\n var val = arr[i];\n if (callback.call(thisArg, val, i, arr)) {\n result.push(val);\n }\n }\n }\n return result;\n}\n\nfunction flattenArray(arr) {\n return arr.reduce(function (a, b) { return a.concat(is.arr(b) ? flattenArray(b) : b); }, []);\n}\n\nfunction toArray(o) {\n if (is.arr(o)) { return o; }\n if (is.str(o)) { o = selectString(o) || o; }\n if (o instanceof NodeList || o instanceof HTMLCollection) { return [].slice.call(o); }\n return [o];\n}\n\nfunction arrayContains(arr, val) {\n return arr.some(function (a) { return a === val; });\n}\n\n// Objects\n\nfunction cloneObject(o) {\n var clone = {};\n for (var p in o) { clone[p] = o[p]; }\n return clone;\n}\n\nfunction replaceObjectProps(o1, o2) {\n var o = cloneObject(o1);\n for (var p in o1) { o[p] = o2.hasOwnProperty(p) ? o2[p] : o1[p]; }\n return o;\n}\n\nfunction mergeObjects(o1, o2) {\n var o = cloneObject(o1);\n for (var p in o2) { o[p] = is.und(o1[p]) ? o2[p] : o1[p]; }\n return o;\n}\n\n// Colors\n\nfunction rgbToRgba(rgbValue) {\n var rgb = /rgb\\((\\d+,\\s*[\\d]+,\\s*[\\d]+)\\)/g.exec(rgbValue);\n return rgb ? (\"rgba(\" + (rgb[1]) + \",1)\") : rgbValue;\n}\n\nfunction hexToRgba(hexValue) {\n var rgx = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n var hex = hexValue.replace(rgx, function (m, r, g, b) { return r + r + g + g + b + b; } );\n var rgb = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n var r = parseInt(rgb[1], 16);\n var g = parseInt(rgb[2], 16);\n var b = parseInt(rgb[3], 16);\n return (\"rgba(\" + r + \",\" + g + \",\" + b + \",1)\");\n}\n\nfunction hslToRgba(hslValue) {\n var hsl = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.exec(hslValue) || /hsla\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%,\\s*([\\d.]+)\\)/g.exec(hslValue);\n var h = parseInt(hsl[1], 10) / 360;\n var s = parseInt(hsl[2], 10) / 100;\n var l = parseInt(hsl[3], 10) / 100;\n var a = hsl[4] || 1;\n function hue2rgb(p, q, t) {\n if (t < 0) { t += 1; }\n if (t > 1) { t -= 1; }\n if (t < 1/6) { return p + (q - p) * 6 * t; }\n if (t < 1/2) { return q; }\n if (t < 2/3) { return p + (q - p) * (2/3 - t) * 6; }\n return p;\n }\n var r, g, b;\n if (s == 0) {\n r = g = b = l;\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n return (\"rgba(\" + (r * 255) + \",\" + (g * 255) + \",\" + (b * 255) + \",\" + a + \")\");\n}\n\nfunction colorToRgb(val) {\n if (is.rgb(val)) { return rgbToRgba(val); }\n if (is.hex(val)) { return hexToRgba(val); }\n if (is.hsl(val)) { return hslToRgba(val); }\n}\n\n// Units\n\nfunction getUnit(val) {\n var split = /[+-]?\\d*\\.?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(val);\n if (split) { return split[1]; }\n}\n\nfunction getTransformUnit(propName) {\n if (stringContains(propName, 'translate') || propName === 'perspective') { return 'px'; }\n if (stringContains(propName, 'rotate') || stringContains(propName, 'skew')) { return 'deg'; }\n}\n\n// Values\n\nfunction getFunctionValue(val, animatable) {\n if (!is.fnc(val)) { return val; }\n return val(animatable.target, animatable.id, animatable.total);\n}\n\nfunction getAttribute(el, prop) {\n return el.getAttribute(prop);\n}\n\nfunction convertPxToUnit(el, value, unit) {\n var valueUnit = getUnit(value);\n if (arrayContains([unit, 'deg', 'rad', 'turn'], valueUnit)) { return value; }\n var cached = cache.CSS[value + unit];\n if (!is.und(cached)) { return cached; }\n var baseline = 100;\n var tempEl = document.createElement(el.tagName);\n var parentEl = (el.parentNode && (el.parentNode !== document)) ? el.parentNode : document.body;\n parentEl.appendChild(tempEl);\n tempEl.style.position = 'absolute';\n tempEl.style.width = baseline + unit;\n var factor = baseline / tempEl.offsetWidth;\n parentEl.removeChild(tempEl);\n var convertedUnit = factor * parseFloat(value);\n cache.CSS[value + unit] = convertedUnit;\n return convertedUnit;\n}\n\nfunction getCSSValue(el, prop, unit) {\n if (prop in el.style) {\n var uppercasePropName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n var value = el.style[prop] || getComputedStyle(el).getPropertyValue(uppercasePropName) || '0';\n return unit ? convertPxToUnit(el, value, unit) : value;\n }\n}\n\nfunction getAnimationType(el, prop) {\n if (is.dom(el) && !is.inp(el) && (!is.nil(getAttribute(el, prop)) || (is.svg(el) && el[prop]))) { return 'attribute'; }\n if (is.dom(el) && arrayContains(validTransforms, prop)) { return 'transform'; }\n if (is.dom(el) && (prop !== 'transform' && getCSSValue(el, prop))) { return 'css'; }\n if (el[prop] != null) { return 'object'; }\n}\n\nfunction getElementTransforms(el) {\n if (!is.dom(el)) { return; }\n var str = el.style.transform || '';\n var reg = /(\\w+)\\(([^)]*)\\)/g;\n var transforms = new Map();\n var m; while (m = reg.exec(str)) { transforms.set(m[1], m[2]); }\n return transforms;\n}\n\nfunction getTransformValue(el, propName, animatable, unit) {\n var defaultVal = stringContains(propName, 'scale') ? 1 : 0 + getTransformUnit(propName);\n var value = getElementTransforms(el).get(propName) || defaultVal;\n if (animatable) {\n animatable.transforms.list.set(propName, value);\n animatable.transforms['last'] = propName;\n }\n return unit ? convertPxToUnit(el, value, unit) : value;\n}\n\nfunction getOriginalTargetValue(target, propName, unit, animatable) {\n switch (getAnimationType(target, propName)) {\n case 'transform': return getTransformValue(target, propName, animatable, unit);\n case 'css': return getCSSValue(target, propName, unit);\n case 'attribute': return getAttribute(target, propName);\n default: return target[propName] || 0;\n }\n}\n\nfunction getRelativeValue(to, from) {\n var operator = /^(\\*=|\\+=|-=)/.exec(to);\n if (!operator) { return to; }\n var u = getUnit(to) || 0;\n var x = parseFloat(from);\n var y = parseFloat(to.replace(operator[0], ''));\n switch (operator[0][0]) {\n case '+': return x + y + u;\n case '-': return x - y + u;\n case '*': return x * y + u;\n }\n}\n\nfunction validateValue(val, unit) {\n if (is.col(val)) { return colorToRgb(val); }\n if (/\\s/g.test(val)) { return val; }\n var originalUnit = getUnit(val);\n var unitLess = originalUnit ? val.substr(0, val.length - originalUnit.length) : val;\n if (unit) { return unitLess + unit; }\n return unitLess;\n}\n\n// getTotalLength() equivalent for circle, rect, polyline, polygon and line shapes\n// adapted from https://gist.github.com/SebLambla/3e0550c496c236709744\n\nfunction getDistance(p1, p2) {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}\n\nfunction getCircleLength(el) {\n return Math.PI * 2 * getAttribute(el, 'r');\n}\n\nfunction getRectLength(el) {\n return (getAttribute(el, 'width') * 2) + (getAttribute(el, 'height') * 2);\n}\n\nfunction getLineLength(el) {\n return getDistance(\n {x: getAttribute(el, 'x1'), y: getAttribute(el, 'y1')}, \n {x: getAttribute(el, 'x2'), y: getAttribute(el, 'y2')}\n );\n}\n\nfunction getPolylineLength(el) {\n var points = el.points;\n var totalLength = 0;\n var previousPos;\n for (var i = 0 ; i < points.numberOfItems; i++) {\n var currentPos = points.getItem(i);\n if (i > 0) { totalLength += getDistance(previousPos, currentPos); }\n previousPos = currentPos;\n }\n return totalLength;\n}\n\nfunction getPolygonLength(el) {\n var points = el.points;\n return getPolylineLength(el) + getDistance(points.getItem(points.numberOfItems - 1), points.getItem(0));\n}\n\n// Path animation\n\nfunction getTotalLength(el) {\n if (el.getTotalLength) { return el.getTotalLength(); }\n switch(el.tagName.toLowerCase()) {\n case 'circle': return getCircleLength(el);\n case 'rect': return getRectLength(el);\n case 'line': return getLineLength(el);\n case 'polyline': return getPolylineLength(el);\n case 'polygon': return getPolygonLength(el);\n }\n}\n\nfunction setDashoffset(el) {\n var pathLength = getTotalLength(el);\n el.setAttribute('stroke-dasharray', pathLength);\n return pathLength;\n}\n\n// Motion path\n\nfunction getParentSvgEl(el) {\n var parentEl = el.parentNode;\n while (is.svg(parentEl)) {\n if (!is.svg(parentEl.parentNode)) { break; }\n parentEl = parentEl.parentNode;\n }\n return parentEl;\n}\n\nfunction getParentSvg(pathEl, svgData) {\n var svg = svgData || {};\n var parentSvgEl = svg.el || getParentSvgEl(pathEl);\n var rect = parentSvgEl.getBoundingClientRect();\n var viewBoxAttr = getAttribute(parentSvgEl, 'viewBox');\n var width = rect.width;\n var height = rect.height;\n var viewBox = svg.viewBox || (viewBoxAttr ? viewBoxAttr.split(' ') : [0, 0, width, height]);\n return {\n el: parentSvgEl,\n viewBox: viewBox,\n x: viewBox[0] / 1,\n y: viewBox[1] / 1,\n w: width,\n h: height,\n vW: viewBox[2],\n vH: viewBox[3]\n }\n}\n\nfunction getPath(path, percent) {\n var pathEl = is.str(path) ? selectString(path)[0] : path;\n var p = percent || 100;\n return function(property) {\n return {\n property: property,\n el: pathEl,\n svg: getParentSvg(pathEl),\n totalLength: getTotalLength(pathEl) * (p / 100)\n }\n }\n}\n\nfunction getPathProgress(path, progress, isPathTargetInsideSVG) {\n function point(offset) {\n if ( offset === void 0 ) offset = 0;\n\n var l = progress + offset >= 1 ? progress + offset : 0;\n return path.el.getPointAtLength(l);\n }\n var svg = getParentSvg(path.el, path.svg);\n var p = point();\n var p0 = point(-1);\n var p1 = point(+1);\n var scaleX = isPathTargetInsideSVG ? 1 : svg.w / svg.vW;\n var scaleY = isPathTargetInsideSVG ? 1 : svg.h / svg.vH;\n switch (path.property) {\n case 'x': return (p.x - svg.x) * scaleX;\n case 'y': return (p.y - svg.y) * scaleY;\n case 'angle': return Math.atan2(p1.y - p0.y, p1.x - p0.x) * 180 / Math.PI;\n }\n}\n\n// Decompose value\n\nfunction decomposeValue(val, unit) {\n // const rgx = /-?\\d*\\.?\\d+/g; // handles basic numbers\n // const rgx = /[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/g; // handles exponents notation\n var rgx = /[+-]?\\d*\\.?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/g; // handles exponents notation\n var value = validateValue((is.pth(val) ? val.totalLength : val), unit) + '';\n return {\n original: value,\n numbers: value.match(rgx) ? value.match(rgx).map(Number) : [0],\n strings: (is.str(val) || unit) ? value.split(rgx) : []\n }\n}\n\n// Animatables\n\nfunction parseTargets(targets) {\n var targetsArray = targets ? (flattenArray(is.arr(targets) ? targets.map(toArray) : toArray(targets))) : [];\n return filterArray(targetsArray, function (item, pos, self) { return self.indexOf(item) === pos; });\n}\n\nfunction getAnimatables(targets) {\n var parsed = parseTargets(targets);\n return parsed.map(function (t, i) {\n return {target: t, id: i, total: parsed.length, transforms: { list: getElementTransforms(t) } };\n });\n}\n\n// Properties\n\nfunction normalizePropertyTweens(prop, tweenSettings) {\n var settings = cloneObject(tweenSettings);\n // Override duration if easing is a spring\n if (/^spring/.test(settings.easing)) { settings.duration = spring(settings.easing); }\n if (is.arr(prop)) {\n var l = prop.length;\n var isFromTo = (l === 2 && !is.obj(prop[0]));\n if (!isFromTo) {\n // Duration divided by the number of tweens\n if (!is.fnc(tweenSettings.duration)) { settings.duration = tweenSettings.duration / l; }\n } else {\n // Transform [from, to] values shorthand to a valid tween value\n prop = {value: prop};\n }\n }\n var propArray = is.arr(prop) ? prop : [prop];\n return propArray.map(function (v, i) {\n var obj = (is.obj(v) && !is.pth(v)) ? v : {value: v};\n // Default delay value should only be applied to the first tween\n if (is.und(obj.delay)) { obj.delay = !i ? tweenSettings.delay : 0; }\n // Default endDelay value should only be applied to the last tween\n if (is.und(obj.endDelay)) { obj.endDelay = i === propArray.length - 1 ? tweenSettings.endDelay : 0; }\n return obj;\n }).map(function (k) { return mergeObjects(k, settings); });\n}\n\n\nfunction flattenKeyframes(keyframes) {\n var propertyNames = filterArray(flattenArray(keyframes.map(function (key) { return Object.keys(key); })), function (p) { return is.key(p); })\n .reduce(function (a,b) { if (a.indexOf(b) < 0) { a.push(b); } return a; }, []);\n var properties = {};\n var loop = function ( i ) {\n var propName = propertyNames[i];\n properties[propName] = keyframes.map(function (key) {\n var newKey = {};\n for (var p in key) {\n if (is.key(p)) {\n if (p == propName) { newKey.value = key[p]; }\n } else {\n newKey[p] = key[p];\n }\n }\n return newKey;\n });\n };\n\n for (var i = 0; i < propertyNames.length; i++) loop( i );\n return properties;\n}\n\nfunction getProperties(tweenSettings, params) {\n var properties = [];\n var keyframes = params.keyframes;\n if (keyframes) { params = mergeObjects(flattenKeyframes(keyframes), params); }\n for (var p in params) {\n if (is.key(p)) {\n properties.push({\n name: p,\n tweens: normalizePropertyTweens(params[p], tweenSettings)\n });\n }\n }\n return properties;\n}\n\n// Tweens\n\nfunction normalizeTweenValues(tween, animatable) {\n var t = {};\n for (var p in tween) {\n var value = getFunctionValue(tween[p], animatable);\n if (is.arr(value)) {\n value = value.map(function (v) { return getFunctionValue(v, animatable); });\n if (value.length === 1) { value = value[0]; }\n }\n t[p] = value;\n }\n t.duration = parseFloat(t.duration);\n t.delay = parseFloat(t.delay);\n return t;\n}\n\nfunction normalizeTweens(prop, animatable) {\n var previousTween;\n return prop.tweens.map(function (t) {\n var tween = normalizeTweenValues(t, animatable);\n var tweenValue = tween.value;\n var to = is.arr(tweenValue) ? tweenValue[1] : tweenValue;\n var toUnit = getUnit(to);\n var originalValue = getOriginalTargetValue(animatable.target, prop.name, toUnit, animatable);\n var previousValue = previousTween ? previousTween.to.original : originalValue;\n var from = is.arr(tweenValue) ? tweenValue[0] : previousValue;\n var fromUnit = getUnit(from) || getUnit(originalValue);\n var unit = toUnit || fromUnit;\n if (is.und(to)) { to = previousValue; }\n tween.from = decomposeValue(from, unit);\n tween.to = decomposeValue(getRelativeValue(to, from), unit);\n tween.start = previousTween ? previousTween.end : 0;\n tween.end = tween.start + tween.delay + tween.duration + tween.endDelay;\n tween.easing = parseEasings(tween.easing, tween.duration);\n tween.isPath = is.pth(tweenValue);\n tween.isPathTargetInsideSVG = tween.isPath && is.svg(animatable.target);\n tween.isColor = is.col(tween.from.original);\n if (tween.isColor) { tween.round = 1; }\n previousTween = tween;\n return tween;\n });\n}\n\n// Tween progress\n\nvar setProgressValue = {\n css: function (t, p, v) { return t.style[p] = v; },\n attribute: function (t, p, v) { return t.setAttribute(p, v); },\n object: function (t, p, v) { return t[p] = v; },\n transform: function (t, p, v, transforms, manual) {\n transforms.list.set(p, v);\n if (p === transforms.last || manual) {\n var str = '';\n transforms.list.forEach(function (value, prop) { str += prop + \"(\" + value + \") \"; });\n t.style.transform = str;\n }\n }\n};\n\n// Set Value helper\n\nfunction setTargetsValue(targets, properties) {\n var animatables = getAnimatables(targets);\n animatables.forEach(function (animatable) {\n for (var property in properties) {\n var value = getFunctionValue(properties[property], animatable);\n var target = animatable.target;\n var valueUnit = getUnit(value);\n var originalValue = getOriginalTargetValue(target, property, valueUnit, animatable);\n var unit = valueUnit || getUnit(originalValue);\n var to = getRelativeValue(validateValue(value, unit), originalValue);\n var animType = getAnimationType(target, property);\n setProgressValue[animType](target, property, to, animatable.transforms, true);\n }\n });\n}\n\n// Animations\n\nfunction createAnimation(animatable, prop) {\n var animType = getAnimationType(animatable.target, prop.name);\n if (animType) {\n var tweens = normalizeTweens(prop, animatable);\n var lastTween = tweens[tweens.length - 1];\n return {\n type: animType,\n property: prop.name,\n animatable: animatable,\n tweens: tweens,\n duration: lastTween.end,\n delay: tweens[0].delay,\n endDelay: lastTween.endDelay\n }\n }\n}\n\nfunction getAnimations(animatables, properties) {\n return filterArray(flattenArray(animatables.map(function (animatable) {\n return properties.map(function (prop) {\n return createAnimation(animatable, prop);\n });\n })), function (a) { return !is.und(a); });\n}\n\n// Create Instance\n\nfunction getInstanceTimings(animations, tweenSettings) {\n var animLength = animations.length;\n var getTlOffset = function (anim) { return anim.timelineOffset ? anim.timelineOffset : 0; };\n var timings = {};\n timings.duration = animLength ? Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration; })) : tweenSettings.duration;\n timings.delay = animLength ? Math.min.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.delay; })) : tweenSettings.delay;\n timings.endDelay = animLength ? timings.duration - Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration - anim.endDelay; })) : tweenSettings.endDelay;\n return timings;\n}\n\nvar instanceID = 0;\n\nfunction createNewInstance(params) {\n var instanceSettings = replaceObjectProps(defaultInstanceSettings, params);\n var tweenSettings = replaceObjectProps(defaultTweenSettings, params);\n var properties = getProperties(tweenSettings, params);\n var animatables = getAnimatables(params.targets);\n var animations = getAnimations(animatables, properties);\n var timings = getInstanceTimings(animations, tweenSettings);\n var id = instanceID;\n instanceID++;\n return mergeObjects(instanceSettings, {\n id: id,\n children: [],\n animatables: animatables,\n animations: animations,\n duration: timings.duration,\n delay: timings.delay,\n endDelay: timings.endDelay\n });\n}\n\n// Core\n\nvar activeInstances = [];\n\nvar engine = (function () {\n var raf;\n\n function play() {\n if (!raf && (!isDocumentHidden() || !anime.suspendWhenDocumentHidden) && activeInstances.length > 0) {\n raf = requestAnimationFrame(step);\n }\n }\n function step(t) {\n // memo on algorithm issue:\n // dangerous iteration over mutable `activeInstances`\n // (that collection may be updated from within callbacks of `tick`-ed animation instances)\n var activeInstancesLength = activeInstances.length;\n var i = 0;\n while (i < activeInstancesLength) {\n var activeInstance = activeInstances[i];\n if (!activeInstance.paused) {\n activeInstance.tick(t);\n i++;\n } else {\n activeInstances.splice(i, 1);\n activeInstancesLength--;\n }\n }\n raf = i > 0 ? requestAnimationFrame(step) : undefined;\n }\n\n function handleVisibilityChange() {\n if (!anime.suspendWhenDocumentHidden) { return; }\n\n if (isDocumentHidden()) {\n // suspend ticks\n raf = cancelAnimationFrame(raf);\n } else { // is back to active tab\n // first adjust animations to consider the time that ticks were suspended\n activeInstances.forEach(\n function (instance) { return instance ._onDocumentVisibility(); }\n );\n engine();\n }\n }\n if (typeof document !== 'undefined') {\n document.addEventListener('visibilitychange', handleVisibilityChange);\n }\n\n return play;\n})();\n\nfunction isDocumentHidden() {\n return !!document && document.hidden;\n}\n\n// Public Instance\n\nfunction anime(params) {\n if ( params === void 0 ) params = {};\n\n\n var startTime = 0, lastTime = 0, now = 0;\n var children, childrenLength = 0;\n var resolve = null;\n\n function makePromise(instance) {\n var promise = window.Promise && new Promise(function (_resolve) { return resolve = _resolve; });\n instance.finished = promise;\n return promise;\n }\n\n var instance = createNewInstance(params);\n var promise = makePromise(instance);\n\n function toggleInstanceDirection() {\n var direction = instance.direction;\n if (direction !== 'alternate') {\n instance.direction = direction !== 'normal' ? 'normal' : 'reverse';\n }\n instance.reversed = !instance.reversed;\n children.forEach(function (child) { return child.reversed = instance.reversed; });\n }\n\n function adjustTime(time) {\n return instance.reversed ? instance.duration - time : time;\n }\n\n function resetTime() {\n startTime = 0;\n lastTime = adjustTime(instance.currentTime) * (1 / anime.speed);\n }\n\n function seekChild(time, child) {\n if (child) { child.seek(time - child.timelineOffset); }\n }\n\n function syncInstanceChildren(time) {\n if (!instance.reversePlayback) {\n for (var i = 0; i < childrenLength; i++) { seekChild(time, children[i]); }\n } else {\n for (var i$1 = childrenLength; i$1--;) { seekChild(time, children[i$1]); }\n }\n }\n\n function setAnimationsProgress(insTime) {\n var i = 0;\n var animations = instance.animations;\n var animationsLength = animations.length;\n while (i < animationsLength) {\n var anim = animations[i];\n var animatable = anim.animatable;\n var tweens = anim.tweens;\n var tweenLength = tweens.length - 1;\n var tween = tweens[tweenLength];\n // Only check for keyframes if there is more than one tween\n if (tweenLength) { tween = filterArray(tweens, function (t) { return (insTime < t.end); })[0] || tween; }\n var elapsed = minMax(insTime - tween.start - tween.delay, 0, tween.duration) / tween.duration;\n var eased = isNaN(elapsed) ? 1 : tween.easing(elapsed);\n var strings = tween.to.strings;\n var round = tween.round;\n var numbers = [];\n var toNumbersLength = tween.to.numbers.length;\n var progress = (void 0);\n for (var n = 0; n < toNumbersLength; n++) {\n var value = (void 0);\n var toNumber = tween.to.numbers[n];\n var fromNumber = tween.from.numbers[n] || 0;\n if (!tween.isPath) {\n value = fromNumber + (eased * (toNumber - fromNumber));\n } else {\n value = getPathProgress(tween.value, eased * toNumber, tween.isPathTargetInsideSVG);\n }\n if (round) {\n if (!(tween.isColor && n > 2)) {\n value = Math.round(value * round) / round;\n }\n }\n numbers.push(value);\n }\n // Manual Array.reduce for better performances\n var stringsLength = strings.length;\n if (!stringsLength) {\n progress = numbers[0];\n } else {\n progress = strings[0];\n for (var s = 0; s < stringsLength; s++) {\n var a = strings[s];\n var b = strings[s + 1];\n var n$1 = numbers[s];\n if (!isNaN(n$1)) {\n if (!b) {\n progress += n$1 + ' ';\n } else {\n progress += n$1 + b;\n }\n }\n }\n }\n setProgressValue[anim.type](animatable.target, anim.property, progress, animatable.transforms);\n anim.currentValue = progress;\n i++;\n }\n }\n\n function setCallback(cb) {\n if (instance[cb] && !instance.passThrough) { instance[cb](instance); }\n }\n\n function countIteration() {\n if (instance.remaining && instance.remaining !== true) {\n instance.remaining--;\n }\n }\n\n function setInstanceProgress(engineTime) {\n var insDuration = instance.duration;\n var insDelay = instance.delay;\n var insEndDelay = insDuration - instance.endDelay;\n var insTime = adjustTime(engineTime);\n instance.progress = minMax((insTime / insDuration) * 100, 0, 100);\n instance.reversePlayback = insTime < instance.currentTime;\n if (children) { syncInstanceChildren(insTime); }\n if (!instance.began && instance.currentTime > 0) {\n instance.began = true;\n setCallback('begin');\n }\n if (!instance.loopBegan && instance.currentTime > 0) {\n instance.loopBegan = true;\n setCallback('loopBegin');\n }\n if (insTime <= insDelay && instance.currentTime !== 0) {\n setAnimationsProgress(0);\n }\n if ((insTime >= insEndDelay && instance.currentTime !== insDuration) || !insDuration) {\n setAnimationsProgress(insDuration);\n }\n if (insTime > insDelay && insTime < insEndDelay) {\n if (!instance.changeBegan) {\n instance.changeBegan = true;\n instance.changeCompleted = false;\n setCallback('changeBegin');\n }\n setCallback('change');\n setAnimationsProgress(insTime);\n } else {\n if (instance.changeBegan) {\n instance.changeCompleted = true;\n instance.changeBegan = false;\n setCallback('changeComplete');\n }\n }\n instance.currentTime = minMax(insTime, 0, insDuration);\n if (instance.began) { setCallback('update'); }\n if (engineTime >= insDuration) {\n lastTime = 0;\n countIteration();\n if (!instance.remaining) {\n instance.paused = true;\n if (!instance.completed) {\n instance.completed = true;\n setCallback('loopComplete');\n setCallback('complete');\n if (!instance.passThrough && 'Promise' in window) {\n resolve();\n promise = makePromise(instance);\n }\n }\n } else {\n startTime = now;\n setCallback('loopComplete');\n instance.loopBegan = false;\n if (instance.direction === 'alternate') {\n toggleInstanceDirection();\n }\n }\n }\n }\n\n instance.reset = function() {\n var direction = instance.direction;\n instance.passThrough = false;\n instance.currentTime = 0;\n instance.progress = 0;\n instance.paused = true;\n instance.began = false;\n instance.loopBegan = false;\n instance.changeBegan = false;\n instance.completed = false;\n instance.changeCompleted = false;\n instance.reversePlayback = false;\n instance.reversed = direction === 'reverse';\n instance.remaining = instance.loop;\n children = instance.children;\n childrenLength = children.length;\n for (var i = childrenLength; i--;) { instance.children[i].reset(); }\n if (instance.reversed && instance.loop !== true || (direction === 'alternate' && instance.loop === 1)) { instance.remaining++; }\n setAnimationsProgress(instance.reversed ? instance.duration : 0);\n };\n\n // internal method (for engine) to adjust animation timings before restoring engine ticks (rAF)\n instance._onDocumentVisibility = resetTime;\n\n // Set Value helper\n\n instance.set = function(targets, properties) {\n setTargetsValue(targets, properties);\n return instance;\n };\n\n instance.tick = function(t) {\n now = t;\n if (!startTime) { startTime = now; }\n setInstanceProgress((now + (lastTime - startTime)) * anime.speed);\n };\n\n instance.seek = function(time) {\n setInstanceProgress(adjustTime(time));\n };\n\n instance.pause = function() {\n instance.paused = true;\n resetTime();\n };\n\n instance.play = function() {\n if (!instance.paused) { return; }\n if (instance.completed) { instance.reset(); }\n instance.paused = false;\n activeInstances.push(instance);\n resetTime();\n engine();\n };\n\n instance.reverse = function() {\n toggleInstanceDirection();\n instance.completed = instance.reversed ? false : true;\n resetTime();\n };\n\n instance.restart = function() {\n instance.reset();\n instance.play();\n };\n\n instance.remove = function(targets) {\n var targetsArray = parseTargets(targets);\n removeTargetsFromInstance(targetsArray, instance);\n };\n\n instance.reset();\n\n if (instance.autoplay) { instance.play(); }\n\n return instance;\n\n}\n\n// Remove targets from animation\n\nfunction removeTargetsFromAnimations(targetsArray, animations) {\n for (var a = animations.length; a--;) {\n if (arrayContains(targetsArray, animations[a].animatable.target)) {\n animations.splice(a, 1);\n }\n }\n}\n\nfunction removeTargetsFromInstance(targetsArray, instance) {\n var animations = instance.animations;\n var children = instance.children;\n removeTargetsFromAnimations(targetsArray, animations);\n for (var c = children.length; c--;) {\n var child = children[c];\n var childAnimations = child.animations;\n removeTargetsFromAnimations(targetsArray, childAnimations);\n if (!childAnimations.length && !child.children.length) { children.splice(c, 1); }\n }\n if (!animations.length && !children.length) { instance.pause(); }\n}\n\nfunction removeTargetsFromActiveInstances(targets) {\n var targetsArray = parseTargets(targets);\n for (var i = activeInstances.length; i--;) {\n var instance = activeInstances[i];\n removeTargetsFromInstance(targetsArray, instance);\n }\n}\n\n// Stagger helpers\n\nfunction stagger(val, params) {\n if ( params === void 0 ) params = {};\n\n var direction = params.direction || 'normal';\n var easing = params.easing ? parseEasings(params.easing) : null;\n var grid = params.grid;\n var axis = params.axis;\n var fromIndex = params.from || 0;\n var fromFirst = fromIndex === 'first';\n var fromCenter = fromIndex === 'center';\n var fromLast = fromIndex === 'last';\n var isRange = is.arr(val);\n var val1 = isRange ? parseFloat(val[0]) : parseFloat(val);\n var val2 = isRange ? parseFloat(val[1]) : 0;\n var unit = getUnit(isRange ? val[1] : val) || 0;\n var start = params.start || 0 + (isRange ? val1 : 0);\n var values = [];\n var maxValue = 0;\n return function (el, i, t) {\n if (fromFirst) { fromIndex = 0; }\n if (fromCenter) { fromIndex = (t - 1) / 2; }\n if (fromLast) { fromIndex = t - 1; }\n if (!values.length) {\n for (var index = 0; index < t; index++) {\n if (!grid) {\n values.push(Math.abs(fromIndex - index));\n } else {\n var fromX = !fromCenter ? fromIndex%grid[0] : (grid[0]-1)/2;\n var fromY = !fromCenter ? Math.floor(fromIndex/grid[0]) : (grid[1]-1)/2;\n var toX = index%grid[0];\n var toY = Math.floor(index/grid[0]);\n var distanceX = fromX - toX;\n var distanceY = fromY - toY;\n var value = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n if (axis === 'x') { value = -distanceX; }\n if (axis === 'y') { value = -distanceY; }\n values.push(value);\n }\n maxValue = Math.max.apply(Math, values);\n }\n if (easing) { values = values.map(function (val) { return easing(val / maxValue) * maxValue; }); }\n if (direction === 'reverse') { values = values.map(function (val) { return axis ? (val < 0) ? val * -1 : -val : Math.abs(maxValue - val); }); }\n }\n var spacing = isRange ? (val2 - val1) / maxValue : val1;\n return start + (spacing * (Math.round(values[i] * 100) / 100)) + unit;\n }\n}\n\n// Timeline\n\nfunction timeline(params) {\n if ( params === void 0 ) params = {};\n\n var tl = anime(params);\n tl.duration = 0;\n tl.add = function(instanceParams, timelineOffset) {\n var tlIndex = activeInstances.indexOf(tl);\n var children = tl.children;\n if (tlIndex > -1) { activeInstances.splice(tlIndex, 1); }\n function passThrough(ins) { ins.passThrough = true; }\n for (var i = 0; i < children.length; i++) { passThrough(children[i]); }\n var insParams = mergeObjects(instanceParams, replaceObjectProps(defaultTweenSettings, params));\n insParams.targets = insParams.targets || params.targets;\n var tlDuration = tl.duration;\n insParams.autoplay = false;\n insParams.direction = tl.direction;\n insParams.timelineOffset = is.und(timelineOffset) ? tlDuration : getRelativeValue(timelineOffset, tlDuration);\n passThrough(tl);\n tl.seek(insParams.timelineOffset);\n var ins = anime(insParams);\n passThrough(ins);\n children.push(ins);\n var timings = getInstanceTimings(children, params);\n tl.delay = timings.delay;\n tl.endDelay = timings.endDelay;\n tl.duration = timings.duration;\n tl.seek(0);\n tl.reset();\n if (tl.autoplay) { tl.play(); }\n return tl;\n };\n return tl;\n}\n\nanime.version = '3.2.1';\nanime.speed = 1;\n// TODO:#review: naming, documentation\nanime.suspendWhenDocumentHidden = true;\nanime.running = activeInstances;\nanime.remove = removeTargetsFromActiveInstances;\nanime.get = getOriginalTargetValue;\nanime.set = setTargetsValue;\nanime.convertPx = convertPxToUnit;\nanime.path = getPath;\nanime.setDashoffset = setDashoffset;\nanime.stagger = stagger;\nanime.timeline = timeline;\nanime.easing = parseEasings;\nanime.penner = penner;\nanime.random = function (min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; };\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (anime);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvYW5pbWVqcy9saWIvYW5pbWUuZXMuanMuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBOztBQUVBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxzQkFBc0IsMEJBQTBCO0FBQ2hELHNCQUFzQixxRUFBcUU7QUFDM0Ysc0JBQXNCLHNEQUFzRDtBQUM1RSxzQkFBc0IsaUNBQWlDO0FBQ3ZELHNCQUFzQix1Q0FBdUM7QUFDN0Qsc0JBQXNCLGlDQUFpQztBQUN2RCxzQkFBc0IsK0JBQStCO0FBQ3JELHNCQUFzQixpQ0FBaUM7Q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pZ2luYWxUYXJnZXRWYWx1ZTtcbmFuaW1lLnNldCA9IHNldFRhcmdldHNWYWx1ZTtcbmFuaW1lLmNvbnZlcnRQeCA9IGNvbnZlcnRQeFRvVW5pdDtcbmFuaW1lLnBhdGggPSBnZXRQYXRoO1xuYW5pbWUuc2V0RGFzaG9mZnNldCA9IHNldERhc2hvZmZzZXQ7XG5hbmltZS5zdGFnZ2VyID0gc3RhZ2dlcjtcbmFuaW1lLnRpbWVsaW5lID0gdGltZWxpbmU7XG5hbmltZS5lYXNpbmcgPSBwYXJzZUVhc2luZ3M7XG5hbmltZS5wZW5uZXIgPSBwZW5uZXI7XG5hbmltZS5yYW5kb20gPSBmdW5jdGlvbiAobWluLCBtYXgpIHsgcmV0dXJuIE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSAqIChtYXggLSBtaW4gKyAxKSkgKyBtaW47IH07XG5cbmV4cG9ydCBkZWZhdWx0IGFuaW1lO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/animejs/lib/anime.es.js\n"); - // ! Workaround for Label: move label up again - if (this.labelEl) this.input.after(this.labelEl); - } - }, { - key: "_addOptionToValues", - value: function _addOptionToValues(realOption, virtualOption) { - this._values.push({ el: realOption, optionEl: virtualOption }); - } - }, { - key: "_removeDropdown", - value: function _removeDropdown() { - $(this.wrapper).find('.caret').remove(); - $(this.input).remove(); - $(this.dropdownOptions).remove(); - $(this.wrapper).before(this.$el); - $(this.wrapper).remove(); - } - }, { - key: "_createAndAppendOptionWithIcon", - value: function _createAndAppendOptionWithIcon(realOption, type) { - var li = document.createElement('li'); - li.setAttribute("role", "option"); - if (realOption.disabled) { - li.classList.add('disabled'); - li.setAttribute("aria-disabled", true); - } - if (type === 'optgroup-option') li.classList.add(type); - // Text / Checkbox - var span = document.createElement('span'); - if (this.isMultiple) span.innerHTML = "";else span.innerHTML = realOption.innerHTML; - li.appendChild(span); - // add Icon - var iconUrl = realOption.getAttribute('data-icon'); - var classes = realOption.getAttribute('class'); - if (iconUrl) { - var img = $("\"\""); - img[0].setAttribute("aria-hidden", true); - li.prepend(img[0]); - } - // Check for multiple type - $(this.dropdownOptions).append(li); - return li; - } - }, { - key: "_selectValue", - value: function _selectValue(value) { - value.el.selected = true; - value.optionEl.classList.add('selected'); - value.optionEl.setAttribute("aria-selected", true); - var checkbox = value.optionEl.querySelector('input[type="checkbox"]'); - if (checkbox) checkbox.checked = true; - } - }, { - key: "_deselectValue", - value: function _deselectValue(value) { - value.el.selected = false; - value.optionEl.classList.remove('selected'); - value.optionEl.setAttribute("aria-selected", false); - var checkbox = value.optionEl.querySelector('input[type="checkbox"]'); - if (checkbox) checkbox.checked = false; - } - }, { - key: "_deselectAll", - value: function _deselectAll() { - var _this71 = this; +/***/ }), - this._values.forEach(function (value) { - _this71._deselectValue(value); - }); - } - }, { - key: "_isValueSelected", - value: function _isValueSelected(value) { - var realValues = this.getSelectedValues(); - return realValues.some(function (realValue) { - return realValue === value.el.value; - }); - } - }, { - key: "_toggleEntryFromArray", - value: function _toggleEntryFromArray(value) { - var isSelected = this._isValueSelected(value); - if (isSelected) this._deselectValue(value);else this._selectValue(value); - } - }, { - key: "_getSelectedOptions", - value: function _getSelectedOptions() { - return Array.prototype.filter.call(this.el.selectedOptions, function (realOption) { - return realOption; - }); - } - }, { - key: "_setValueToInput", - value: function _setValueToInput() { - var realOptions = this._getSelectedOptions(); - var values = this._values.filter(function (value) { - return realOptions.indexOf(value.el) >= 0; - }); - var texts = values.map(function (value) { - return value.optionEl.querySelector('span').innerText.trim(); - }); - // Set input-text to first Option with empty value which indicates a description like "choose your option" - if (texts.length === 0) { - var firstDisabledOption = this.$el.find('option:disabled').eq(0); - if (firstDisabledOption.length > 0 && firstDisabledOption[0].value === '') { - this.input.value = firstDisabledOption.text(); - return; - } - } - this.input.value = texts.join(', '); - } - }, { - key: "_setSelectedStates", - value: function _setSelectedStates() { - var _this72 = this; +/***/ "./src/autocomplete.ts": +/*!*****************************!*\ + !*** ./src/autocomplete.ts ***! + \*****************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - this._values.forEach(function (value) { - var optionIsSelected = $(value.el).prop('selected'); - $(value.optionEl).find('input[type="checkbox"]').prop('checked', optionIsSelected); - if (optionIsSelected) { - _this72._activateOption($(_this72.dropdownOptions), $(value.optionEl)); - } else { - $(value.optionEl).removeClass('selected'); - $(value.optionEl).attr("aria-selected", false); - } - }); - } - }, { - key: "_activateOption", - value: function _activateOption(ul, li) { - if (!li) return; - if (!this.isMultiple) ul.find('li.selected').removeClass('selected'); - $(li).addClass('selected'); - $(li).attr("aria-selected", true); - } - }, { - key: "getSelectedValues", - value: function getSelectedValues() { - return this._getSelectedOptions().map(function (realOption) { - return realOption.value; - }); - } - }], [{ - key: "init", - value: function init(els, options) { - return _get(FormSelect.__proto__ || Object.getPrototypeOf(FormSelect), "init", this).call(this, this, els, options); - } - }, { - key: "getInstance", - value: function getInstance(el) { - var domElem = !!el.jquery ? el[0] : el; - return domElem.M_FormSelect; - } - }, { - key: "defaults", - get: function () { - return _defaults; - } - }]); +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Autocomplete = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst global_1 = __webpack_require__(/*! ./global */ \"./src/global.ts\");\nlet _defaults = {\n data: [],\n onAutocomplete: null,\n dropdownOptions: {\n // Default dropdown options\n autoFocus: false,\n closeOnClick: false,\n coverTrigger: false\n },\n minLength: 1,\n isMultiSelect: false,\n onSearch: function (text, autocomplete) {\n const filteredData = autocomplete.options.data.filter(item => {\n return Object.keys(item)\n .map(key => item[key].toString().toLowerCase().indexOf(text.toLowerCase()) >= 0)\n .some(isMatch => isMatch);\n });\n autocomplete.setMenuItems(filteredData);\n },\n maxDropDownHeight: '300px',\n allowUnsafeHTML: false\n};\nclass Autocomplete extends component_1.Component {\n constructor(el, options) {\n super(Autocomplete, el, options);\n this.el.M_Autocomplete = this;\n this.options = Object.assign(Object.assign({}, Autocomplete.defaults), options);\n this.isOpen = false;\n this.count = 0;\n this.activeIndex = -1;\n this.oldVal;\n this.selectedValues = [];\n this.menuItems = [];\n this.$active = null;\n this._mousedown = false;\n this._setupDropdown();\n this._setupEventHandlers();\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n let domElem = el.jquery ? el[0] : el;\n return domElem.M_Autocomplete;\n }\n destroy() {\n this._removeEventHandlers();\n this._removeDropdown();\n this.el.M_Autocomplete = undefined;\n }\n _setupEventHandlers() {\n this._handleInputBlurBound = this._handleInputBlur.bind(this);\n this._handleInputKeyupAndFocusBound = this._handleInputKeyupAndFocus.bind(this);\n this._handleInputKeydownBound = this._handleInputKeydown.bind(this);\n this._handleInputClickBound = this._handleInputClick.bind(this);\n this._handleContainerMousedownAndTouchstartBound = this._handleContainerMousedownAndTouchstart.bind(this);\n this._handleContainerMouseupAndTouchendBound = this._handleContainerMouseupAndTouchend.bind(this);\n this.el.addEventListener('blur', this._handleInputBlurBound);\n this.el.addEventListener('keyup', this._handleInputKeyupAndFocusBound);\n this.el.addEventListener('focus', this._handleInputKeyupAndFocusBound);\n this.el.addEventListener('keydown', this._handleInputKeydownBound);\n this.el.addEventListener('click', this._handleInputClickBound);\n this.container.addEventListener('mousedown', this._handleContainerMousedownAndTouchstartBound);\n this.container.addEventListener('mouseup', this._handleContainerMouseupAndTouchendBound);\n if (typeof window.ontouchstart !== 'undefined') {\n this.container.addEventListener('touchstart', this._handleContainerMousedownAndTouchstartBound);\n this.container.addEventListener('touchend', this._handleContainerMouseupAndTouchendBound);\n }\n }\n _removeEventHandlers() {\n this.el.removeEventListener('blur', this._handleInputBlurBound);\n this.el.removeEventListener('keyup', this._handleInputKeyupAndFocusBound);\n this.el.removeEventListener('focus', this._handleInputKeyupAndFocusBound);\n this.el.removeEventListener('keydown', this._handleInputKeydownBound);\n this.el.removeEventListener('click', this._handleInputClickBound);\n this.container.removeEventListener('mousedown', this._handleContainerMousedownAndTouchstartBound);\n this.container.removeEventListener('mouseup', this._handleContainerMouseupAndTouchendBound);\n if (typeof window.ontouchstart !== 'undefined') {\n this.container.removeEventListener('touchstart', this._handleContainerMousedownAndTouchstartBound);\n this.container.removeEventListener('touchend', this._handleContainerMouseupAndTouchendBound);\n }\n }\n _setupDropdown() {\n this.container = document.createElement('ul');\n this.container.style.maxHeight = this.options.maxDropDownHeight;\n this.container.id = `autocomplete-options-${global_1.M.guid()}`;\n this.container.classList.add('autocomplete-content', 'dropdown-content');\n this.el.setAttribute('data-target', this.container.id);\n // ! Issue in Component Dropdown: _placeDropdown moves dom-position\n this.el.parentElement.appendChild(this.container);\n // Initialize dropdown\n let dropdownOptions = Object.assign(Object.assign({}, Autocomplete.defaults.dropdownOptions), this.options.dropdownOptions);\n let userOnItemClick = dropdownOptions.onItemClick;\n // Ensuring the select Option call when user passes custom onItemClick function to dropdown\n dropdownOptions.onItemClick = (li) => {\n if (!li)\n return;\n const entryID = li.getAttribute('data-id');\n this.selectOption(entryID);\n // Handle user declared onItemClick if needed\n if (userOnItemClick && typeof userOnItemClick === 'function')\n userOnItemClick.call(this.dropdown, this.el);\n };\n this.dropdown = global_1.M.Dropdown.init(this.el, dropdownOptions);\n // ! Workaround for Label: move label up again\n // TODO: Just use PopperJS in future!\n const label = this.el.parentElement.querySelector('label');\n if (label)\n this.el.after(label);\n // Sketchy removal of dropdown click handler\n this.el.removeEventListener('click', this.dropdown._handleClickBound);\n // Set Value if already set in HTML\n if (this.el.value)\n this.selectOption(this.el.value);\n // Add StatusInfo\n const div = document.createElement('div');\n div.classList.add('status-info');\n div.setAttribute('style', 'position: absolute;right:0;top:0;');\n this.el.parentElement.appendChild(div);\n this._updateSelectedInfo();\n }\n _removeDropdown() {\n this.container.parentNode.removeChild(this.container);\n }\n _handleInputBlur() {\n if (!this._mousedown) {\n this.close();\n this._resetAutocomplete();\n }\n }\n _handleInputKeyupAndFocus(e) {\n if (e.type === 'keyup')\n Autocomplete._keydown = false;\n this.count = 0;\n const actualValue = this.el.value.toLowerCase();\n // Don't capture enter or arrow key usage.\n if (e.keyCode === 13 || e.keyCode === 38 || e.keyCode === 40)\n return;\n // Check if the input isn't empty\n // Check if focus triggered by tab\n if (this.oldVal !== actualValue && (global_1.M.tabPressed || e.type !== 'focus')) {\n this.open();\n }\n // Value has changed!\n if (this.oldVal !== actualValue) {\n this._setStatusLoading();\n this.options.onSearch(this.el.value, this);\n }\n // Reset Single-Select when Input cleared\n if (!this.options.isMultiSelect && this.el.value.length === 0) {\n this.selectedValues = [];\n this._triggerChanged();\n }\n this.oldVal = actualValue;\n }\n _handleInputKeydown(e) {\n var _a, _b;\n Autocomplete._keydown = true;\n // Arrow keys and enter key usage\n const keyCode = e.keyCode;\n const numItems = this.container.querySelectorAll('li').length;\n // select element on Enter\n if (keyCode === global_1.M.keys.ENTER && this.activeIndex >= 0) {\n const liElement = this.container.querySelectorAll('li')[this.activeIndex];\n if (liElement) {\n this.selectOption(liElement.getAttribute('data-id'));\n e.preventDefault();\n }\n return;\n }\n // Capture up and down key\n if (keyCode === global_1.M.keys.ARROW_UP || keyCode === global_1.M.keys.ARROW_DOWN) {\n e.preventDefault();\n if (keyCode === global_1.M.keys.ARROW_UP && this.activeIndex > 0)\n this.activeIndex--;\n if (keyCode === global_1.M.keys.ARROW_DOWN && this.activeIndex < numItems - 1)\n this.activeIndex++;\n (_a = this.$active) === null || _a === void 0 ? void 0 : _a.classList.remove('active');\n if (this.activeIndex >= 0) {\n this.$active = this.container.querySelectorAll('li')[this.activeIndex];\n (_b = this.$active) === null || _b === void 0 ? void 0 : _b.classList.add('active');\n // Focus selected\n this.container.children[this.activeIndex].scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'nearest'\n });\n }\n }\n }\n _handleInputClick(e) {\n this.open();\n }\n _handleContainerMousedownAndTouchstart(e) {\n this._mousedown = true;\n }\n _handleContainerMouseupAndTouchend(e) {\n this._mousedown = false;\n }\n _resetCurrentElementPosition() {\n var _a;\n this.activeIndex = -1;\n (_a = this.$active) === null || _a === void 0 ? void 0 : _a.classList.remove('active');\n }\n _resetAutocomplete() {\n this.container.replaceChildren();\n this._resetCurrentElementPosition();\n this.oldVal = null;\n this.isOpen = false;\n this._mousedown = false;\n }\n _highlightPartialText(input, label) {\n const start = label.toLowerCase().indexOf('' + input.toLowerCase() + '');\n const end = start + input.length - 1;\n //custom filters may return results where the string does not match any part\n if (start == -1 || end == -1) {\n return [label, '', ''];\n }\n return [label.slice(0, start), label.slice(start, end + 1), label.slice(end + 1)];\n }\n _createDropdownItem(entry) {\n const item = document.createElement('li');\n item.setAttribute('data-id', entry.id);\n item.setAttribute('style', 'display:grid; grid-auto-flow: column; user-select: none; align-items: center;');\n // Checkbox\n if (this.options.isMultiSelect) {\n item.innerHTML = `\n
    \n sel.id === entry.id) ? ' checked=\"checked\"' : ''}>\n
    `;\n }\n // Image\n if (entry.image) {\n const img = document.createElement('img');\n img.classList.add('circle');\n img.src = entry.image;\n item.appendChild(img);\n }\n // Text\n const inputText = this.el.value.toLowerCase();\n const parts = this._highlightPartialText(inputText, (entry.text || entry.id).toString());\n const div = document.createElement('div');\n div.setAttribute('style', 'line-height:1.2;font-weight:500;');\n if (this.options.allowUnsafeHTML) {\n div.innerHTML = parts[0] + '' + parts[1] + '' + parts[2];\n }\n else {\n div.appendChild(document.createTextNode(parts[0]));\n if (parts[1]) {\n const highlight = document.createElement('span');\n highlight.textContent = parts[1];\n highlight.classList.add('highlight');\n div.appendChild(highlight);\n div.appendChild(document.createTextNode(parts[2]));\n }\n }\n const itemText = document.createElement('div');\n itemText.classList.add('item-text');\n itemText.setAttribute('style', 'padding:5px;overflow:hidden;');\n item.appendChild(itemText);\n item.querySelector('.item-text').appendChild(div);\n // Description\n if (typeof entry.description === 'string' || (typeof entry.description === 'number' && !isNaN(entry.description))) {\n const description = document.createElement('small');\n description.setAttribute('style', 'line-height:1.3;color:grey;white-space:nowrap;text-overflow:ellipsis;display:block;width:90%;overflow:hidden;');\n description.innerText = entry.description;\n item.querySelector('.item-text').appendChild(description);\n }\n // Set Grid\n const getGridConfig = () => {\n if (this.options.isMultiSelect) {\n if (entry.image)\n return '40px min-content auto'; // cb-img-txt\n return '40px auto'; // cb-txt\n }\n if (entry.image)\n return 'min-content auto'; // img-txt\n return 'auto'; // txt\n };\n item.style.gridTemplateColumns = getGridConfig();\n return item;\n }\n _renderDropdown() {\n this._resetAutocomplete();\n // Check if Data is empty\n if (this.menuItems.length === 0) {\n this.menuItems = this.selectedValues; // Show selected Items\n }\n for (let i = 0; i < this.menuItems.length; i++) {\n const item = this._createDropdownItem(this.menuItems[i]);\n this.container.append(item);\n }\n }\n _setStatusLoading() {\n this.el.parentElement.querySelector('.status-info').innerHTML = `
    \n \n \n \n
    `;\n }\n _updateSelectedInfo() {\n const statusElement = this.el.parentElement.querySelector('.status-info');\n if (statusElement) {\n if (this.options.isMultiSelect)\n statusElement.innerHTML = this.selectedValues.length.toString();\n else\n statusElement.innerHTML = '';\n }\n }\n _refreshInputText() {\n if (this.selectedValues.length === 1) {\n const entry = this.selectedValues[0];\n this.el.value = entry.text || entry.id; // Write Text to Input\n }\n }\n _triggerChanged() {\n this.el.dispatchEvent(new Event('change'));\n // Trigger Autocomplete Event\n if (typeof this.options.onAutocomplete === 'function')\n this.options.onAutocomplete.call(this, this.selectedValues);\n }\n open() {\n const inputText = this.el.value.toLowerCase();\n this._resetAutocomplete();\n if (inputText.length >= this.options.minLength) {\n this.isOpen = true;\n this._renderDropdown();\n }\n // Open dropdown\n if (!this.dropdown.isOpen) {\n setTimeout(() => {\n this.dropdown.open();\n }, 100);\n }\n else\n this.dropdown.recalculateDimensions(); // Recalculate dropdown when its already open\n }\n close() {\n this.dropdown.close();\n }\n setMenuItems(menuItems) {\n this.menuItems = menuItems;\n this.open();\n this._updateSelectedInfo();\n }\n setValues(entries) {\n this.selectedValues = entries;\n this._updateSelectedInfo();\n if (!this.options.isMultiSelect) {\n this._refreshInputText();\n }\n this._triggerChanged();\n }\n selectOption(id) {\n const entry = this.menuItems.find((item) => item.id == id);\n if (!entry)\n return;\n // Toggle Checkbox\n const li = this.container.querySelector('li[data-id=\"' + id + '\"]');\n if (!li)\n return;\n if (this.options.isMultiSelect) {\n const checkbox = li.querySelector('input[type=\"checkbox\"]');\n checkbox.checked = !checkbox.checked;\n if (checkbox.checked)\n this.selectedValues.push(entry);\n else\n this.selectedValues = this.selectedValues.filter((selectedEntry) => selectedEntry.id !== entry.id);\n this.el.focus();\n }\n else {\n // Single-Select\n this.selectedValues = [entry];\n this._refreshInputText();\n this._resetAutocomplete();\n this.close();\n }\n this._updateSelectedInfo();\n this._triggerChanged();\n }\n}\nexports.Autocomplete = Autocomplete;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXV0b2NvbXBsZXRlLnRzLmpzIiwibWFwcGluZ3MiOiI7OztBQUFBLGlGQUF3QztBQUN4Qyx3RUFBNkI7QUFHN0IsSUFBSSxTQUFTLEdBQUc7SUFDZCxJQUFJLEVBQUUsRUFBRTtJQUNSLGNBQWMsRUFBRSxJQUFJO0lBQ3BCLGVBQWUsRUFBRTtRQUNmLDJCQUEyQjtRQUMzQixTQUFTLEVBQUUsS0FBSztRQUNoQixZQUFZLEVBQUUsS0FBSztRQUNuQixZQUFZLEVBQUUsS0FBSztLQUNwQjtJQUNELFNBQVMsRUFBRSxDQUFDO0lBQ1osYUFBYSxFQUFFLEtBQUs7SUFDcEIsUUFBUSxFQUFFLFVBQVMsSUFBSSxFQUFFLFlBQVk7UUFDbkMsTUFBTSxZQUFZLEdBQUcsWUFBWSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxFQUFFO1lBQzNELE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUM7aUJBQ3JCLEdBQU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tcbiAgICAgIC8vIFNpbmdsZS1TZWxlY3RcbiAgICAgIHRoaXMuc2VsZWN0ZWRWYWx1ZXMgPSBbZW50cnldO1xuICAgICAgdGhpcy5fcmVmcmVzaElucHV0VGV4dCgpO1xuICAgICAgdGhpcy5fcmVzZXRBdXRvY29tcGxldGUoKTtcbiAgICAgIHRoaXMuY2xvc2UoKTtcbiAgICB9XG4gICAgdGhpcy5fdXBkYXRlU2VsZWN0ZWRJbmZvKCk7XG4gICAgdGhpcy5fdHJpZ2dlckNoYW5nZWQoKTtcbiAgfVxufVxuICAgXG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/autocomplete.ts\n"); - return FormSelect; - }(Component); +/***/ }), - M.FormSelect = FormSelect; +/***/ "./src/buttons.ts": +/*!************************!*\ + !*** ./src/buttons.ts ***! + \************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - if (M.jQueryLoaded) M.initializeJqueryWrapper(FormSelect, 'formSelect', 'M_FormSelect'); -})(cash); -;(function ($, anim) { - 'use strict'; +eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.FloatingActionButton = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst animejs_1 = __importDefault(__webpack_require__(/*! animejs */ \"./node_modules/animejs/lib/anime.es.js\"));\nlet _defaults = {\n direction: 'top',\n hoverEnabled: true,\n toolbarEnabled: false\n};\nclass FloatingActionButton extends component_1.Component {\n constructor(el, options) {\n super(FloatingActionButton, el, options);\n this.el.M_FloatingActionButton = this;\n this.options = Object.assign(Object.assign({}, FloatingActionButton.defaults), options);\n this.isOpen = false;\n this._anchor = this.el.querySelector('a');\n this._menu = this.el.querySelector('ul');\n this._floatingBtns = Array.from(this.el.querySelectorAll('ul .btn-floating'));\n this._floatingBtnsReverse = this._floatingBtns.reverse();\n this.offsetY = 0;\n this.offsetX = 0;\n this.el.classList.add(`direction-${this.options.direction}`);\n if (this.options.direction === 'top')\n this.offsetY = 40;\n else if (this.options.direction === 'right')\n this.offsetX = -40;\n else if (this.options.direction === 'bottom')\n this.offsetY = -40;\n else\n this.offsetX = 40;\n this._setupEventHandlers();\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n let domElem = !!el.jquery ? el[0] : el;\n return domElem.M_FloatingActionButton;\n }\n destroy() {\n this._removeEventHandlers();\n this.el.M_FloatingActionButton = undefined;\n }\n _setupEventHandlers() {\n this._handleFABClickBound = this._handleFABClick.bind(this);\n this._handleOpenBound = this.open.bind(this);\n this._handleCloseBound = this.close.bind(this);\n if (this.options.hoverEnabled && !this.options.toolbarEnabled) {\n this.el.addEventListener('mouseenter', this._handleOpenBound);\n this.el.addEventListener('mouseleave', this._handleCloseBound);\n }\n else {\n this.el.addEventListener('click', this._handleFABClickBound);\n }\n }\n _removeEventHandlers() {\n if (this.options.hoverEnabled && !this.options.toolbarEnabled) {\n this.el.removeEventListener('mouseenter', this._handleOpenBound);\n this.el.removeEventListener('mouseleave', this._handleCloseBound);\n }\n else {\n this.el.removeEventListener('click', this._handleFABClickBound);\n }\n }\n _handleFABClick() {\n if (this.isOpen) {\n this.close();\n }\n else {\n this.open();\n }\n }\n _handleDocumentClick(e) {\n const elem = e.target;\n if (elem !== this._menu)\n this.close;\n /*\n if (!elem.closest(this.$menu)) {\n this.close();\n }*/\n }\n open() {\n if (this.isOpen)\n return;\n if (this.options.toolbarEnabled)\n this._animateInToolbar();\n else\n this._animateInFAB();\n this.isOpen = true;\n }\n close() {\n if (!this.isOpen)\n return;\n if (this.options.toolbarEnabled) {\n window.removeEventListener('scroll', this._handleCloseBound, true);\n document.body.removeEventListener('click', this._handleDocumentClickBound, true);\n this._animateOutToolbar();\n }\n else {\n this._animateOutFAB();\n }\n this.isOpen = false;\n }\n _animateInFAB() {\n this.el.classList.add('active');\n let time = 0;\n this._floatingBtnsReverse.forEach((el) => {\n (0, animejs_1.default)({\n targets: el,\n opacity: 1,\n scale: [0.4, 1],\n translateY: [this.offsetY, 0],\n translateX: [this.offsetX, 0],\n duration: 275,\n delay: time,\n easing: 'easeInOutQuad'\n });\n time += 40;\n });\n }\n _animateOutFAB() {\n this._floatingBtnsReverse.forEach((el) => {\n animejs_1.default.remove(el);\n (0, animejs_1.default)({\n targets: el,\n opacity: 0,\n scale: 0.4,\n translateY: this.offsetY,\n translateX: this.offsetX,\n duration: 175,\n easing: 'easeOutQuad',\n complete: () => {\n this.el.classList.remove('active');\n }\n });\n });\n }\n _animateInToolbar() {\n let scaleFactor;\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n let btnRect = this.el.getBoundingClientRect();\n const backdrop = document.createElement('div');\n backdrop.classList.add('fab-backdrop'); // $('
    ');\n const fabColor = getComputedStyle(this._anchor).backgroundColor; // css('background-color');\n this._anchor.append(backdrop);\n this.offsetX = btnRect.left - windowWidth / 2 + btnRect.width / 2;\n this.offsetY = windowHeight - btnRect.bottom;\n scaleFactor = windowWidth / backdrop[0].clientWidth;\n this.btnBottom = btnRect.bottom;\n this.btnLeft = btnRect.left;\n this.btnWidth = btnRect.width;\n // Set initial state\n this.el.classList.add('active');\n this.el.style.textAlign = 'center';\n this.el.style.width = '100%';\n this.el.style.bottom = '0';\n this.el.style.left = '0';\n this.el.style.transform = 'translateX(' + this.offsetX + 'px)';\n this.el.style.transition = 'none';\n this._anchor.style.transform = `translateY(${this.offsetY}px`;\n this._anchor.style.transition = 'none';\n backdrop.style.backgroundColor = fabColor;\n setTimeout(() => {\n this.el.style.transform = '';\n this.el.style.transition = 'transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s';\n this._anchor.style.overflow = 'visible';\n this._anchor.style.transform = '';\n this._anchor.style.transition = 'transform .2s';\n setTimeout(() => {\n this.el.style.overflow = 'hidden';\n this.el.style.backgroundColor = fabColor;\n backdrop.style.transform = 'scale(' + scaleFactor + ')';\n backdrop.style.transition = 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)';\n this._menu.querySelectorAll('li > a').forEach((a) => a.style.opacity = '1');\n // Scroll to close.\n this._handleDocumentClickBound = this._handleDocumentClick.bind(this);\n window.addEventListener('scroll', this._handleCloseBound, true);\n document.body.addEventListener('click', this._handleDocumentClickBound, true);\n }, 100);\n }, 0);\n }\n _animateOutToolbar() {\n return;\n /*\n let windowWidth = window.innerWidth;\n let windowHeight = window.innerHeight;\n let backdrop = this.$el.find('.fab-backdrop');\n let fabColor = this.$anchor.css('background-color');\n \n this.offsetX = this.btnLeft - windowWidth / 2 + this.btnWidth / 2;\n this.offsetY = windowHeight - this.btnBottom;\n \n // Hide backdrop\n this.$el.removeClass('active');\n this.$el.css({\n 'background-color': 'transparent',\n transition: 'none'\n });\n // this.$anchor.css({\n // transition: 'none'\n // });\n backdrop.css({\n transform: 'scale(0)',\n 'background-color': fabColor\n });\n \n // this.$menu\n // .children('li')\n // .children('a')\n // .css({\n // opacity: ''\n // });\n \n setTimeout(() => {\n backdrop.remove();\n \n // Set initial state.\n this.$el.css({\n 'text-align': '',\n width: '',\n bottom: '',\n left: '',\n overflow: '',\n 'background-color': '',\n transform: 'translate3d(' + -this.offsetX + 'px,0,0)'\n });\n // this.$anchor.css({\n // overflow: '',\n // transform: 'translate3d(0,' + this.offsetY + 'px,0)'\n // });\n \n setTimeout(() => {\n this.$el.css({\n transform: 'translate3d(0,0,0)',\n transition: 'transform .2s'\n });\n // this.$anchor.css({\n // transform: 'translate3d(0,0,0)',\n // transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'\n // });\n }, 20);\n }, 200);\n */\n }\n}\nexports.FloatingActionButton = FloatingActionButton;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYnV0dG9ucy50cy5q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JhbnNmb3JtOiAndHJhbnNsYXRlM2QoJyArIC10aGlzLm9mZnNldFggKyAncHgsMCwwKSdcbiAgICAgICAgfSk7XG4gICAgICAgIC8vIHRoaXMuJGFuY2hvci5jc3Moe1xuICAgICAgICAvLyAgIG92ZXJmbG93OiAnJyxcbiAgICAgICAgLy8gICB0cmFuc2Zvcm06ICd0cmFuc2xhdGUzZCgwLCcgKyB0aGlzLm9mZnNldFkgKyAncHgsMCknXG4gICAgICAgIC8vIH0pO1xuXG4gICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgIHRoaXMuJGVsLmNzcyh7XG4gICAgICAgICAgICB0cmFuc2Zvcm06ICd0cmFuc2xhdGUzZCgwLDAsMCknLFxuICAgICAgICAgICAgdHJhbnNpdGlvbjogJ3RyYW5zZm9ybSAuMnMnXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgLy8gdGhpcy4kYW5jaG9yLmNzcyh7XG4gICAgICAgICAgLy8gICB0cmFuc2Zvcm06ICd0cmFuc2xhdGUzZCgwLDAsMCknLFxuICAgICAgICAgIC8vICAgdHJhbnNpdGlvbjogJ3RyYW5zZm9ybSAuMnMgY3ViaWMtYmV6aWVyKDAuNTUwLCAwLjA1NSwgMC42NzUsIDAuMTkwKSdcbiAgICAgICAgICAvLyB9KTtcbiAgICAgICAgfSwgMjApO1xuICAgICAgfSwgMjAwKTtcbiAgICAgICovXG4gICAgfVxuICB9XG5cbiAgIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/buttons.ts\n"); - var _defaults = {}; +/***/ }), - /** - * @class - * - */ +/***/ "./src/cards.ts": +/*!**********************!*\ + !*** ./src/cards.ts ***! + \**********************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - var Range = function (_Component21) { - _inherits(Range, _Component21); +eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Cards = void 0;\nconst animejs_1 = __importDefault(__webpack_require__(/*! animejs */ \"./node_modules/animejs/lib/anime.es.js\"));\nclass Cards {\n static Init() {\n document.addEventListener(\"DOMContentLoaded\", () => {\n document.body.addEventListener('click', e => {\n const trigger = e.target;\n const card = trigger.closest('.card');\n if (!card)\n return;\n const cardReveal = Array.from(card.children).find(elem => elem.classList.contains('card-reveal'));\n if (!cardReveal)\n return;\n const initialOverflow = getComputedStyle(card).overflow;\n // Close Card \n const closeArea = cardReveal.querySelector('.card-reveal .card-title');\n if (trigger === closeArea || closeArea.contains(trigger)) {\n (0, animejs_1.default)({\n targets: cardReveal,\n translateY: 0,\n duration: 225,\n easing: 'easeInOutQuad',\n complete: (anim) => {\n cardReveal.style.display = 'none';\n card.style.overflow = initialOverflow;\n }\n });\n }\n ;\n // Reveal Card\n const activators = card.querySelectorAll('.activator');\n activators.forEach(activator => {\n if (trigger === activator || activator.contains(trigger)) {\n card.style.overflow = 'hidden';\n cardReveal.style.display = 'block';\n (0, animejs_1.default)({\n targets: cardReveal,\n translateY: '-100%',\n duration: 300,\n easing: 'easeInOutQuad'\n });\n }\n });\n });\n });\n }\n}\nexports.Cards = Cards;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvY2FyZHMudHMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsZ0hBQTJCO0FBRTNCLE1BQWEsS0FBSztJQUVoQixNQUFNLENBQUMsSUFBSTtRQUVULFFBQVEsQ0FBQyxnQkFBZ0IsQ0FBQyxrQkFBa0IsRUFBRSxHQUFHLEVBQUU7WUFDakQsUUFBUSxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDLEVBQUU7Z0JBQzFDLE1BQU0sT0FBTyxHQUFnQixDQUFDLENBQUMsTUFBTSxDQU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FxuICAgICAgICBjb25zdCBhY3RpdmF0b3JzID0gY2FyZC5xdWVyeVNlbGVjdG9yQWxsKCcuYWN0aXZhdG9yJyk7XG4gICAgICAgIGFjdGl2YXRvcnMuZm9yRWFjaChhY3RpdmF0b3IgPT4ge1xuICAgICAgICAgIGlmICh0cmlnZ2VyID09PSBhY3RpdmF0b3IgfHwgYWN0aXZhdG9yLmNvbnRhaW5zKHRyaWdnZXIpKSB7XG4gICAgICAgICAgICBjYXJkLnN0eWxlLm92ZXJmbG93ID0gJ2hpZGRlbic7XG4gICAgICAgICAgICBjYXJkUmV2ZWFsLnN0eWxlLmRpc3BsYXkgPSAnYmxvY2snO1xuICAgICAgICAgICAgYW5pbSh7XG4gICAgICAgICAgICAgIHRhcmdldHM6IGNhcmRSZXZlYWwsXG4gICAgICAgICAgICAgIHRyYW5zbGF0ZVk6ICctMTAwJScsXG4gICAgICAgICAgICAgIGR1cmF0aW9uOiAzMDAsXG4gICAgICAgICAgICAgIGVhc2luZzogJ2Vhc2VJbk91dFF1YWQnXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBcblxuICAgICAgfSk7ICAgICBcbiAgICB9KTtcblxuICB9ICBcbn1cbiAgIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/cards.ts\n"); - /** - * Construct Range instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - function Range(el, options) { - _classCallCheck(this, Range); +/***/ }), - var _this73 = _possibleConstructorReturn(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, Range, el, options)); +/***/ "./src/carousel.ts": +/*!*************************!*\ + !*** ./src/carousel.ts ***! + \*************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - _this73.el.M_Range = _this73; +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Carousel = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst global_1 = __webpack_require__(/*! ./global */ \"./src/global.ts\");\nlet _defaults = {\n duration: 200,\n dist: -100,\n shift: 0,\n padding: 0,\n numVisible: 5,\n fullWidth: false,\n indicators: false,\n noWrap: false,\n onCycleTo: null // Callback for when a new slide is cycled to.\n};\nclass Carousel extends component_1.Component {\n constructor(el, options) {\n var _a;\n super(Carousel, el, options);\n this.center = 0;\n this.el.M_Carousel = this;\n this.options = Object.assign(Object.assign({}, Carousel.defaults), options);\n // Setup\n this.hasMultipleSlides = this.el.querySelectorAll('.carousel-item').length > 1;\n this.showIndicators = this.options.indicators && this.hasMultipleSlides;\n this.noWrap = this.options.noWrap || !this.hasMultipleSlides;\n this.pressed = false;\n this.dragged = false;\n this.offset = this.target = 0;\n this.images = [];\n this.itemWidth = this.el.querySelector('.carousel-item').clientWidth;\n this.itemHeight = this.el.querySelector('.carousel-item').clientHeight;\n this.dim = this.itemWidth * 2 + this.options.padding || 1; // Make sure dim is non zero for divisions.\n this._autoScrollBound = this._autoScroll.bind(this);\n this._trackBound = this._track.bind(this);\n // Full Width carousel setup\n if (this.options.fullWidth) {\n this.options.dist = 0;\n this._setCarouselHeight();\n // Offset fixed items when indicators.\n if (this.showIndicators) {\n (_a = this.el.querySelector('.carousel-fixed-item')) === null || _a === void 0 ? void 0 : _a.classList.add('with-indicators');\n }\n }\n // Iterate through slides\n this._indicators = document.createElement('ul');\n this._indicators.classList.add('indicators');\n this.el.querySelectorAll('.carousel-item').forEach((item, i) => {\n this.images.push(item);\n if (this.showIndicators) {\n const indicator = document.createElement('li');\n indicator.classList.add('indicator-item');\n if (i === 0) {\n indicator.classList.add('active');\n }\n this._indicators.appendChild(indicator);\n }\n });\n if (this.showIndicators)\n this.el.appendChild(this._indicators);\n this.count = this.images.length;\n // Cap numVisible at count\n this.options.numVisible = Math.min(this.count, this.options.numVisible);\n // Setup cross browser string\n this.xform = 'transform';\n ['webkit', 'Moz', 'O', 'ms'].every((prefix) => {\n var e = prefix + 'Transform';\n if (typeof document.body.style[e] !== 'undefined') {\n this.xform = e;\n return false;\n }\n return true;\n });\n this._setupEventHandlers();\n this._scroll(this.offset);\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n let domElem = !!el.jquery ? el[0] : el;\n return domElem.M_Carousel;\n }\n destroy() {\n this._removeEventHandlers();\n this.el.M_Carousel = undefined;\n }\n _setupEventHandlers() {\n this._handleCarouselTapBound = this._handleCarouselTap.bind(this);\n this._handleCarouselDragBound = this._handleCarouselDrag.bind(this);\n this._handleCarouselReleaseBound = this._handleCarouselRelease.bind(this);\n this._handleCarouselClickBound = this._handleCarouselClick.bind(this);\n if (typeof window.ontouchstart !== 'undefined') {\n this.el.addEventListener('touchstart', this._handleCarouselTapBound);\n this.el.addEventListener('touchmove', this._handleCarouselDragBound);\n this.el.addEventListener('touchend', this._handleCarouselReleaseBound);\n }\n this.el.addEventListener('mousedown', this._handleCarouselTapBound);\n this.el.addEventListener('mousemove', this._handleCarouselDragBound);\n this.el.addEventListener('mouseup', this._handleCarouselReleaseBound);\n this.el.addEventListener('mouseleave', this._handleCarouselReleaseBound);\n this.el.addEventListener('click', this._handleCarouselClickBound);\n if (this.showIndicators && this._indicators) {\n this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);\n this._indicators.querySelectorAll('.indicator-item').forEach((el) => {\n el.addEventListener('click', this._handleIndicatorClickBound);\n });\n }\n // Resize\n let throttledResize = global_1.M.throttle(this._handleResize, 200, null);\n this._handleThrottledResizeBound = throttledResize.bind(this);\n window.addEventListener('resize', this._handleThrottledResizeBound);\n }\n _removeEventHandlers() {\n if (typeof window.ontouchstart !== 'undefined') {\n this.el.removeEventListener('touchstart', this._handleCarouselTapBound);\n this.el.removeEventListener('touchmove', this._handleCarouselDragBound);\n this.el.removeEventListener('touchend', this._handleCarouselReleaseBound);\n }\n this.el.removeEventListener('mousedown', this._handleCarouselTapBound);\n this.el.removeEventListener('mousemove', this._handleCarouselDragBound);\n this.el.removeEventListener('mouseup', this._handleCarouselReleaseBound);\n this.el.removeEventListener('mouseleave', this._handleCarouselReleaseBound);\n this.el.removeEventListener('click', this._handleCarouselClickBound);\n if (this.showIndicators && this._indicators) {\n this._indicators.querySelectorAll('.indicator-item').forEach((el) => {\n el.removeEventListener('click', this._handleIndicatorClickBound);\n });\n }\n window.removeEventListener('resize', this._handleThrottledResizeBound);\n }\n _handleCarouselTap(e) {\n // Fixes firefox draggable image bug\n if (e.type === 'mousedown' && e.target.tagName === 'IMG') {\n e.preventDefault();\n }\n this.pressed = true;\n this.dragged = false;\n this.verticalDragged = false;\n this.reference = this._xpos(e);\n this.referenceY = this._ypos(e);\n this.velocity = this.amplitude = 0;\n this.frame = this.offset;\n this.timestamp = Date.now();\n clearInterval(this.ticker);\n this.ticker = setInterval(this._trackBound, 100);\n }\n _handleCarouselDrag(e) {\n let x, y, delta, deltaY;\n if (this.pressed) {\n x = this._xpos(e);\n y = this._ypos(e);\n delta = this.reference - x;\n deltaY = Math.abs(this.referenceY - y);\n if (deltaY < 30 && !this.verticalDragged) {\n // If vertical scrolling don't allow dragging.\n if (delta > 2 || delta < -2) {\n this.dragged = true;\n this.reference = x;\n this._scroll(this.offset + delta);\n }\n }\n else if (this.dragged) {\n // If dragging don't allow vertical scroll.\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n else {\n // Vertical scrolling.\n this.verticalDragged = true;\n }\n }\n if (this.dragged) {\n // If dragging don't allow vertical scroll.\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n _handleCarouselRelease(e) {\n if (this.pressed) {\n this.pressed = false;\n }\n else {\n return;\n }\n clearInterval(this.ticker);\n this.target = this.offset;\n if (this.velocity > 10 || this.velocity < -10) {\n this.amplitude = 0.9 * this.velocity;\n this.target = this.offset + this.amplitude;\n }\n this.target = Math.round(this.target / this.dim) * this.dim;\n // No wrap of items.\n if (this.noWrap) {\n if (this.target >= this.dim * (this.count - 1)) {\n this.target = this.dim * (this.count - 1);\n }\n else if (this.target < 0) {\n this.target = 0;\n }\n }\n this.amplitude = this.target - this.offset;\n this.timestamp = Date.now();\n requestAnimationFrame(this._autoScrollBound);\n if (this.dragged) {\n e.preventDefault();\n e.stopPropagation();\n }\n return false;\n }\n _handleCarouselClick(e) {\n // Disable clicks if carousel was dragged.\n if (this.dragged) {\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n else if (!this.options.fullWidth) {\n const clickedElem = e.target.closest('.carousel-item');\n const clickedIndex = [...clickedElem.parentNode.children].indexOf(clickedElem);\n const diff = this._wrap(this.center) - clickedIndex;\n // Disable clicks if carousel was shifted by click\n if (diff !== 0) {\n e.preventDefault();\n e.stopPropagation();\n }\n // fixes https://github.com/materializecss/materialize/issues/180\n if (clickedIndex < 0) {\n // relative X position > center of carousel = clicked at the right part of the carousel\n if (e.clientX - e.target.getBoundingClientRect().left > this.el.clientWidth / 2) {\n this.next();\n }\n else {\n this.prev();\n }\n }\n else {\n this._cycleTo(clickedIndex);\n }\n }\n }\n _handleIndicatorClick(e) {\n e.stopPropagation();\n const indicator = e.target.closest('.indicator-item');\n if (indicator) {\n const index = [...indicator.parentNode.children].indexOf(indicator);\n this._cycleTo(index);\n }\n }\n _handleResize(e) {\n if (this.options.fullWidth) {\n this.itemWidth = this.el.querySelector('.carousel-item').clientWidth;\n this.imageHeight = this.el.querySelector('.carousel-item.active').clientHeight;\n this.dim = this.itemWidth * 2 + this.options.padding;\n this.offset = this.center * 2 * this.itemWidth;\n this.target = this.offset;\n this._setCarouselHeight(true);\n }\n else {\n this._scroll();\n }\n }\n _setCarouselHeight(imageOnly = false) {\n const firstSlide = this.el.querySelector('.carousel-item.active')\n ? this.el.querySelector('.carousel-item.active')\n : this.el.querySelector('.carousel-item');\n const firstImage = firstSlide.querySelector('img');\n if (firstImage) {\n if (firstImage.complete) {\n // If image won't trigger the load event\n const imageHeight = firstImage.clientHeight;\n if (imageHeight > 0) {\n this.el.style.height = imageHeight + 'px';\n }\n else {\n // If image still has no height, use the natural dimensions to calculate\n const naturalWidth = firstImage.naturalWidth;\n const naturalHeight = firstImage.naturalHeight;\n const adjustedHeight = (this.el.clientWidth / naturalWidth) * naturalHeight;\n this.el.style.height = adjustedHeight + 'px';\n }\n }\n else {\n // Get height when image is loaded normally\n firstImage.addEventListener('load', () => {\n this.el.style.height = firstImage.offsetHeight + 'px';\n });\n }\n }\n else if (!imageOnly) {\n const slideHeight = firstSlide.clientHeight;\n this.el.style.height = slideHeight + 'px';\n }\n }\n _xpos(e) {\n // touch event\n if (e.targetTouches && e.targetTouches.length >= 1) {\n return e.targetTouches[0].clientX;\n }\n // mouse event\n return e.clientX;\n }\n _ypos(e) {\n // touch event\n if (e.targetTouches && e.targetTouches.length >= 1) {\n return e.targetTouches[0].clientY;\n }\n // mouse event\n return e.clientY;\n }\n _wrap(x) {\n return x >= this.count\n ? x % this.count\n : x < 0\n ? this._wrap(this.count + (x % this.count))\n : x;\n }\n _track() {\n let now, elapsed, delta, v;\n now = Date.now();\n elapsed = now - this.timestamp;\n this.timestamp = now;\n delta = this.offset - this.frame;\n this.frame = this.offset;\n v = (1000 * delta) / (1 + elapsed);\n this.velocity = 0.8 * v + 0.2 * this.velocity;\n }\n _autoScroll() {\n let elapsed, delta;\n if (this.amplitude) {\n elapsed = Date.now() - this.timestamp;\n delta = this.amplitude * Math.exp(-elapsed / this.options.duration);\n if (delta > 2 || delta < -2) {\n this._scroll(this.target - delta);\n requestAnimationFrame(this._autoScrollBound);\n }\n else {\n this._scroll(this.target);\n }\n }\n }\n _scroll(x = 0) {\n // Track scrolling state\n if (!this.el.classList.contains('scrolling')) {\n this.el.classList.add('scrolling');\n }\n if (this.scrollingTimeout != null) {\n window.clearTimeout(this.scrollingTimeout);\n }\n this.scrollingTimeout = window.setTimeout(() => {\n this.el.classList.remove('scrolling');\n }, this.options.duration);\n // Start actual scroll\n let i, half, delta, dir, tween, el, alignment, zTranslation, tweenedOpacity, centerTweenedOpacity;\n let lastCenter = this.center;\n let numVisibleOffset = 1 / this.options.numVisible;\n this.offset = typeof x === 'number' ? x : this.offset;\n this.center = Math.floor((this.offset + this.dim / 2) / this.dim);\n delta = this.offset - this.center * this.dim;\n dir = delta < 0 ? 1 : -1;\n tween = (-dir * delta * 2) / this.dim;\n half = this.count >> 1;\n if (this.options.fullWidth) {\n alignment = 'translateX(0)';\n centerTweenedOpacity = 1;\n }\n else {\n alignment = 'translateX(' + (this.el.clientWidth - this.itemWidth) / 2 + 'px) ';\n alignment += 'translateY(' + (this.el.clientHeight - this.itemHeight) / 2 + 'px)';\n centerTweenedOpacity = 1 - numVisibleOffset * tween;\n }\n // Set indicator active\n if (this.showIndicators) {\n const diff = this.center % this.count;\n const activeIndicator = this._indicators.querySelector('.indicator-item.active');\n const activeIndicatorIndex = [...activeIndicator.parentNode.children].indexOf(activeIndicator);\n if (activeIndicatorIndex !== diff) {\n activeIndicator.classList.remove('active');\n const pos = diff < 0 ? this.count + diff : diff;\n this._indicators.querySelectorAll('.indicator-item')[pos].classList.add('active');\n }\n }\n // center\n // Don't show wrapped items.\n if (!this.noWrap || (this.center >= 0 && this.center < this.count)) {\n el = this.images[this._wrap(this.center)];\n // Add active class to center item.\n if (!el.classList.contains('active')) {\n this.el.querySelector('.carousel-item').classList.remove('active');\n el.classList.add('active');\n }\n let transformString = `${alignment} translateX(${-delta / 2}px) translateX(${dir *\n this.options.shift *\n tween *\n i}px) translateZ(${this.options.dist * tween}px)`;\n this._updateItemStyle(el, centerTweenedOpacity, 0, transformString);\n }\n for (i = 1; i <= half; ++i) {\n // right side\n if (this.options.fullWidth) {\n zTranslation = this.options.dist;\n tweenedOpacity = i === half && delta < 0 ? 1 - tween : 1;\n }\n else {\n zTranslation = this.options.dist * (i * 2 + tween * dir);\n tweenedOpacity = 1 - numVisibleOffset * (i * 2 + tween * dir);\n }\n // Don't show wrapped items.\n if (!this.noWrap || this.center + i < this.count) {\n el = this.images[this._wrap(this.center + i)];\n let transformString = `${alignment} translateX(${this.options.shift +\n (this.dim * i - delta) / 2}px) translateZ(${zTranslation}px)`;\n this._updateItemStyle(el, tweenedOpacity, -i, transformString);\n }\n // left side\n if (this.options.fullWidth) {\n zTranslation = this.options.dist;\n tweenedOpacity = i === half && delta > 0 ? 1 - tween : 1;\n }\n else {\n zTranslation = this.options.dist * (i * 2 - tween * dir);\n tweenedOpacity = 1 - numVisibleOffset * (i * 2 - tween * dir);\n }\n // Don't show wrapped items.\n if (!this.noWrap || this.center - i >= 0) {\n el = this.images[this._wrap(this.center - i)];\n let transformString = `${alignment} translateX(${-this.options.shift +\n (-this.dim * i - delta) / 2}px) translateZ(${zTranslation}px)`;\n this._updateItemStyle(el, tweenedOpacity, -i, transformString);\n }\n }\n // center\n // Don't show wrapped items.\n if (!this.noWrap || (this.center >= 0 && this.center < this.count)) {\n el = this.images[this._wrap(this.center)];\n let transformString = `${alignment} translateX(${-delta / 2}px) translateX(${dir *\n this.options.shift *\n tween}px) translateZ(${this.options.dist * tween}px)`;\n this._updateItemStyle(el, centerTweenedOpacity, 0, transformString);\n }\n // onCycleTo callback\n const _currItem = this.el.querySelectorAll('.carousel-item')[this._wrap(this.center)];\n if (lastCenter !== this.center && typeof this.options.onCycleTo === 'function') {\n this.options.onCycleTo.call(this, _currItem, this.dragged);\n }\n // One time callback\n if (typeof this.oneTimeCallback === 'function') {\n this.oneTimeCallback.call(this, _currItem, this.dragged);\n this.oneTimeCallback = null;\n }\n }\n _updateItemStyle(el, opacity, zIndex, transform) {\n el.style[this.xform] = transform;\n el.style.zIndex = zIndex.toString();\n el.style.opacity = opacity.toString();\n el.style.visibility = 'visible';\n }\n _cycleTo(n, callback = null) {\n let diff = (this.center % this.count) - n;\n // Account for wraparound.\n if (!this.noWrap) {\n if (diff < 0) {\n if (Math.abs(diff + this.count) < Math.abs(diff)) {\n diff += this.count;\n }\n }\n else if (diff > 0) {\n if (Math.abs(diff - this.count) < diff) {\n diff -= this.count;\n }\n }\n }\n this.target = this.dim * Math.round(this.offset / this.dim);\n // Next\n if (diff < 0) {\n this.target += this.dim * Math.abs(diff);\n } // Prev\n else if (diff > 0) {\n this.target -= this.dim * diff;\n }\n // Set one time callback\n if (typeof callback === 'function') {\n this.oneTimeCallback = callback;\n }\n // Scroll\n if (this.offset !== this.target) {\n this.amplitude = this.target - this.offset;\n this.timestamp = Date.now();\n requestAnimationFrame(this._autoScrollBound);\n }\n }\n next(n = 1) {\n if (n === undefined || isNaN(n)) {\n n = 1;\n }\n let index = this.center + n;\n if (index >= this.count || index < 0) {\n if (this.noWrap)\n return;\n index = this._wrap(index);\n }\n this._cycleTo(index);\n }\n prev(n = 1) {\n if (n === undefined || isNaN(n)) {\n n = 1;\n }\n let index = this.center - n;\n if (index >= this.count || index < 0) {\n if (this.noWrap)\n return;\n index = this._wrap(index);\n }\n this._cycleTo(index);\n }\n set(n, callback) {\n if (n === undefined || isNaN(n)) {\n n = 0;\n }\n if (n > this.count || n < 0) {\n if (this.noWrap)\n return;\n n = this._wrap(n);\n }\n this._cycleTo(n, callback);\n }\n}\nexports.Carousel = Carousel;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvY2Fyb3VzZWwudHMuanMiLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUZBQXdDO0FBQ3hDLHdFQUE2QjtBQUUzQixJQUFJLFNBQVMsR0FBRztJQUNkLFFBQVEsRUFBRSxHQUFHO0lBQ2IsSUFBSSxFQUFFLENBQUMsR0FBRztJQUNWLEtBQUssRUFBRSxDQUFDO0lBQ1IsT0FBTyxFQUFFLENBQUM7SUFDVixVQUFVLEVBQUUsQ0FBQztJQUNiLFNBQVMsRUFBRSxLQUFLO0lBQ2hCLFVBQVUsRUFBRSxLQUFLO0lBQ2pCLE1BQU0sRUFBRSxLQUFLO0lBQ2IsU0FBUyxFQUFFLElBQUksQ0FBQyw4Q0FBOEM7Q0FDL0QsQ0FBQztBQUVGLE1BQWEsUUFBUyxTQUFRLHF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HNlIGlmIChkaWZmID4gMCkge1xuICAgICAgICAgIGlmIChNYXRoLmFicyhkaWZmIC0gdGhpcy5jb3VudCkgPCBkaWZmKSB7XG4gICAgICAgICAgICBkaWZmIC09IHRoaXMuY291bnQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICB0aGlzLnRhcmdldCA9IHRoaXMuZGltICogTWF0aC5yb3VuZCh0aGlzLm9mZnNldCAvIHRoaXMuZGltKTtcbiAgICAgIC8vIE5leHRcbiAgICAgIGlmIChkaWZmIDwgMCkge1xuICAgICAgICB0aGlzLnRhcmdldCArPSB0aGlzLmRpbSAqIE1hdGguYWJzKGRpZmYpOyAgICAgICAgXG4gICAgICB9IC8vIFByZXZcbiAgICAgIGVsc2UgaWYgKGRpZmYgPiAwKSB7XG4gICAgICAgIHRoaXMudGFyZ2V0IC09IHRoaXMuZGltICogZGlmZjtcbiAgICAgIH1cbiAgICAgIC8vIFNldCBvbmUgdGltZSBjYWxsYmFja1xuICAgICAgaWYgKHR5cGVvZiBjYWxsYmFjayA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0aGlzLm9uZVRpbWVDYWxsYmFjayA9IGNhbGxiYWNrO1xuICAgICAgfVxuICAgICAgLy8gU2Nyb2xsXG4gICAgICBpZiAodGhpcy5vZmZzZXQgIT09IHRoaXMudGFyZ2V0KSB7XG4gICAgICAgIHRoaXMuYW1wbGl0dWRlID0gdGhpcy50YXJnZXQgLSB0aGlzLm9mZnNldDtcbiAgICAgICAgdGhpcy50aW1lc3RhbXAgPSBEYXRlLm5vdygpO1xuICAgICAgICByZXF1ZXN0QW5pbWF0aW9uRnJhbWUodGhpcy5fYXV0b1Njcm9sbEJvdW5kKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBuZXh0KG46IG51bWJlciA9IDEpIHtcbiAgICAgIGlmIChuID09PSB1bmRlZmluZWQgfHwgaXNOYU4obikpIHtcbiAgICAgICAgbiA9IDE7XG4gICAgICB9XG4gICAgICBsZXQgaW5kZXggPSB0aGlzLmNlbnRlciArIG47XG4gICAgICBpZiAoaW5kZXggPj0gdGhpcy5jb3VudCB8fCBpbmRleCA8IDApIHtcbiAgICAgICAgaWYgKHRoaXMubm9XcmFwKSByZXR1cm47XG4gICAgICAgIGluZGV4ID0gdGhpcy5fd3JhcChpbmRleCk7XG4gICAgICB9XG4gICAgICB0aGlzLl9jeWNsZVRvKGluZGV4KTtcbiAgICB9XG5cbiAgICBwcmV2KG46IG51bWJlciA9IDEpIHtcbiAgICAgIGlmIChuID09PSB1bmRlZmluZWQgfHwgaXNOYU4obikpIHtcbiAgICAgICAgbiA9IDE7XG4gICAgICB9XG4gICAgICBsZXQgaW5kZXggPSB0aGlzLmNlbnRlciAtIG47XG4gICAgICBpZiAoaW5kZXggPj0gdGhpcy5jb3VudCB8fCBpbmRleCA8IDApIHtcbiAgICAgICAgaWYgKHRoaXMubm9XcmFwKSByZXR1cm47XG4gICAgICAgIGluZGV4ID0gdGhpcy5fd3JhcChpbmRleCk7XG4gICAgICB9XG4gICAgICB0aGlzLl9jeWNsZVRvKGluZGV4KTtcbiAgICB9XG5cbiAgICBzZXQobjogbnVtYmVyLCBjYWxsYmFjazogRnVuY3Rpb24pIHtcbiAgICAgIGlmIChuID09PSB1bmRlZmluZWQgfHwgaXNOYU4obikpIHtcbiAgICAgICAgbiA9IDA7XG4gICAgICB9XG4gICAgICBpZiAobiA+IHRoaXMuY291bnQgfHwgbiA8IDApIHtcbiAgICAgICAgaWYgKHRoaXMubm9XcmFwKSByZXR1cm47XG4gICAgICAgIG4gPSB0aGlzLl93cmFwKG4pO1xuICAgICAgfVxuICAgICAgdGhpcy5fY3ljbGVUbyhuLCBjYWxsYmFjayk7XG4gICAgfVxuICB9Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/carousel.ts\n"); - /** - * Options for the range - * @member Range#options - */ - _this73.options = $.extend({}, Range.defaults, options); +/***/ }), - _this73._mousedown = false; +/***/ "./src/characterCounter.ts": +/*!*********************************!*\ + !*** ./src/characterCounter.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - // Setup - _this73._setupThumb(); +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.CharacterCounter = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nlet _defaults = {};\nclass CharacterCounter extends component_1.Component {\n constructor(el, options) {\n super(CharacterCounter, el, options);\n this.el.M_CharacterCounter = this;\n this.options = Object.assign(Object.assign({}, CharacterCounter.defaults), options);\n this.isInvalid = false;\n this.isValidLength = false;\n this._setupCounter();\n this._setupEventHandlers();\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n let domElem = !!el.jquery ? el[0] : el;\n return domElem.M_CharacterCounter;\n }\n destroy() {\n this._removeEventHandlers();\n this.el.CharacterCounter = undefined;\n this._removeCounter();\n }\n _setupEventHandlers() {\n this._handleUpdateCounterBound = this.updateCounter.bind(this);\n this.el.addEventListener('focus', this._handleUpdateCounterBound, true);\n this.el.addEventListener('input', this._handleUpdateCounterBound, true);\n }\n _removeEventHandlers() {\n this.el.removeEventListener('focus', this._handleUpdateCounterBound, true);\n this.el.removeEventListener('input', this._handleUpdateCounterBound, true);\n }\n _setupCounter() {\n this.counterEl = document.createElement('span');\n this.counterEl.classList.add('character-counter');\n this.counterEl.style.float = 'right';\n this.counterEl.style.fontSize = '12px';\n this.counterEl.style.height = '1';\n this.el.parentElement.appendChild(this.counterEl);\n }\n _removeCounter() {\n this.counterEl.remove();\n }\n updateCounter() {\n let maxLength = parseInt(this.el.getAttribute('data-length')), actualLength = this.el.value.length;\n this.isValidLength = actualLength <= maxLength;\n let counterString = actualLength.toString();\n if (maxLength) {\n counterString += '/' + maxLength;\n this._validateInput();\n }\n this.counterEl.innerHTML = counterString;\n }\n _validateInput() {\n if (this.isValidLength && this.isInvalid) {\n this.isInvalid = false;\n this.el.classList.remove('invalid');\n }\n else if (!this.isValidLength && !this.isInvalid) {\n this.isInvalid = true;\n this.el.classList.remove('valid');\n this.el.classList.add('invalid');\n }\n }\n}\nexports.CharacterCounter = CharacterCounter;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvY2hhcmFjdGVyQ291bnRlci50cy5qcyIsIm1hcHBpbmdzIjoiOzs7QUFBQSxpRkFBd0M7QUFFeEMsSUFBSSxTQUFTLEdBQUcsRUFBRSxDQUFDO0FBRW5CLE1BQWEsZ0JBQWlCLFNBQVEscUJBQVM7SUFNN0MsWUFBWSxFQUFXLEVBQUUsT0FBZTtRQUN0QyxLQUFLLENBQUMsZ0JBQWdCLEVBQUUsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ3BDLElBQUksQ0FBQyxFQUFVLENBQUMsa0JBQWtCLEdBQUcsSUFBSSxDQUFDO1FBQzNDLElBQUksQ0FBQyxPQUFPLG1DQUFPLGdCQUFnQixDQUFDLFFBQVEsR0FBSyxPQUFPLENBQUMsQ0FBQztRQUMxRCxJQUFJLENBQUMsU0FBUyxHQUFHLEtBQUssQ0FBQztRQUN2QixJQUFJLENBQUMsYUFBYSxHQUFHLEtBQUssQ0FBQztRQUMzQixJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7UUFDckIsSUFBSSxDQUFDLG1CQUFtQixFQUFFLENBQUM7SUFDN0IsQ0FBQztJQUVELE1BQU0sS0FBSyxRQUFRO1FBQ2pCLE9BQU8sU0FBUyxDQUFDO0lBQ25CLENBQUM7SUFFRCxNQUFNLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxPQUFPO1FBQ3RCLE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsR0FBRyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQ3hDLENBQUM7SUFFRCxNQUFNLEN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ggPSAodGhpcy5lbCBhcyBIVE1MSW5wdXRFbGVtZW50KS52YWx1ZS5sZW5ndGg7XG5cbiAgICB0aGlzLmlzVmFsaWRMZW5ndGggPSBhY3R1YWxMZW5ndGggPD0gbWF4TGVuZ3RoO1xuICAgIGxldCBjb3VudGVyU3RyaW5nID0gYWN0dWFsTGVuZ3RoLnRvU3RyaW5nKCk7XG4gICAgaWYgKG1heExlbmd0aCkge1xuICAgICAgY291bnRlclN0cmluZyArPSAnLycgKyBtYXhMZW5ndGg7XG4gICAgICB0aGlzLl92YWxpZGF0ZUlucHV0KCk7XG4gICAgfVxuICAgIHRoaXMuY291bnRlckVsLmlubmVySFRNTCA9IGNvdW50ZXJTdHJpbmc7XG4gIH1cblxuICBfdmFsaWRhdGVJbnB1dCgpIHtcbiAgICBpZiAodGhpcy5pc1ZhbGlkTGVuZ3RoICYmIHRoaXMuaXNJbnZhbGlkKSB7XG4gICAgICB0aGlzLmlzSW52YWxpZCA9IGZhbHNlO1xuICAgICAgdGhpcy5lbC5jbGFzc0xpc3QucmVtb3ZlKCdpbnZhbGlkJyk7XG4gICAgfVxuICAgIGVsc2UgaWYgKCF0aGlzLmlzVmFsaWRMZW5ndGggJiYgIXRoaXMuaXNJbnZhbGlkKSB7XG4gICAgICB0aGlzLmlzSW52YWxpZCA9IHRydWU7XG4gICAgICB0aGlzLmVsLmNsYXNzTGlzdC5yZW1vdmUoJ3ZhbGlkJyk7XG4gICAgICB0aGlzLmVsLmNsYXNzTGlzdC5hZGQoJ2ludmFsaWQnKTtcbiAgICB9XG4gIH1cbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/characterCounter.ts\n"); - _this73._setupEventHandlers(); - return _this73; - } +/***/ }), - _createClass(Range, [{ - key: "destroy", +/***/ "./src/chips.ts": +/*!**********************!*\ + !*** ./src/chips.ts ***! + \**********************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Chips = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst global_1 = __webpack_require__(/*! ./global */ \"./src/global.ts\");\nconst autocomplete_1 = __webpack_require__(/*! ./autocomplete */ \"./src/autocomplete.ts\");\nlet _defaults = {\n data: [],\n placeholder: '',\n secondaryPlaceholder: '',\n autocompleteOptions: {},\n autocompleteOnly: false,\n limit: Infinity,\n onChipAdd: null,\n onChipSelect: null,\n onChipDelete: null\n};\nfunction gGetIndex(el) {\n return [...el.parentNode.children].indexOf(el);\n}\nclass Chips extends component_1.Component {\n constructor(el, options) {\n super(Chips, el, options);\n this.el.M_Chips = this;\n this.options = Object.assign(Object.assign({}, Chips.defaults), options);\n this.el.classList.add('chips', 'input-field');\n this.chipsData = [];\n this._chips = [];\n this._setupInput();\n this.hasAutocomplete = Object.keys(this.options.autocompleteOptions).length > 0;\n // Set input id\n if (!this._input.getAttribute('id'))\n this._input.setAttribute('id', global_1.M.guid());\n // Render initial chips\n if (this.options.data.length) {\n this.chipsData = this.options.data;\n this._renderChips();\n }\n // Setup autocomplete if needed\n if (this.hasAutocomplete)\n this._setupAutocomplete();\n this._setPlaceholder();\n this._setupLabel();\n this._setupEventHandlers();\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n const domElem = !!el.jquery ? el[0] : el;\n return domElem.M_Chips;\n }\n getData() {\n return this.chipsData;\n }\n destroy() {\n this._removeEventHandlers();\n this._chips.forEach(c => c.remove());\n this._chips = [];\n this.el.M_Chips = undefined;\n }\n _setupEventHandlers() {\n this._handleChipClickBound = this._handleChipClick.bind(this);\n this._handleInputKeydownBound = this._handleInputKeydown.bind(this);\n this._handleInputFocusBound = this._handleInputFocus.bind(this);\n this._handleInputBlurBound = this._handleInputBlur.bind(this);\n this.el.addEventListener('click', this._handleChipClickBound);\n document.addEventListener('keydown', Chips._handleChipsKeydown);\n document.addEventListener('keyup', Chips._handleChipsKeyup);\n this.el.addEventListener('blur', Chips._handleChipsBlur, true);\n this._input.addEventListener('focus', this._handleInputFocusBound);\n this._input.addEventListener('blur', this._handleInputBlurBound);\n this._input.addEventListener('keydown', this._handleInputKeydownBound);\n }\n _removeEventHandlers() {\n this.el.removeEventListener('click', this._handleChipClickBound);\n document.removeEventListener('keydown', Chips._handleChipsKeydown);\n document.removeEventListener('keyup', Chips._handleChipsKeyup);\n this.el.removeEventListener('blur', Chips._handleChipsBlur, true);\n this._input.removeEventListener('focus', this._handleInputFocusBound);\n this._input.removeEventListener('blur', this._handleInputBlurBound);\n this._input.removeEventListener('keydown', this._handleInputKeydownBound);\n }\n _handleChipClick(e) {\n const _chip = e.target.closest('.chip');\n const clickedClose = e.target.classList.contains('close');\n if (_chip) {\n const index = [..._chip.parentNode.children].indexOf(_chip);\n if (clickedClose) {\n this.deleteChip(index);\n this._input.focus();\n }\n else {\n this.selectChip(index);\n }\n // Default handle click to focus on input\n }\n else {\n this._input.focus();\n }\n }\n static _handleChipsKeydown(e) {\n Chips._keydown = true;\n const chips = e.target.closest('.chips');\n const chipsKeydown = e.target && chips;\n // Don't handle keydown inputs on input and textarea\n const tag = e.target.tagName;\n if (tag === 'INPUT' || tag === 'TEXTAREA' || !chipsKeydown)\n return;\n const currChips = chips.M_Chips;\n // backspace and delete\n if (e.keyCode === 8 || e.keyCode === 46) {\n e.preventDefault();\n let selectIndex = currChips.chipsData.length;\n if (currChips._selectedChip) {\n const index = gGetIndex(currChips._selectedChip);\n currChips.deleteChip(index);\n currChips._selectedChip = null;\n // Make sure selectIndex doesn't go negative\n selectIndex = Math.max(index - 1, 0);\n }\n if (currChips.chipsData.length)\n currChips.selectChip(selectIndex);\n else\n currChips._input.focus();\n }\n // left arrow key\n else if (e.keyCode === 37) {\n if (currChips._selectedChip) {\n const selectIndex = gGetIndex(currChips._selectedChip) - 1;\n if (selectIndex < 0)\n return;\n currChips.selectChip(selectIndex);\n }\n }\n // right arrow key\n else if (e.keyCode === 39) {\n if (currChips._selectedChip) {\n const selectIndex = gGetIndex(currChips._selectedChip) + 1;\n if (selectIndex >= currChips.chipsData.length)\n currChips._input.focus();\n else\n currChips.selectChip(selectIndex);\n }\n }\n }\n static _handleChipsKeyup(e) {\n Chips._keydown = false;\n }\n static _handleChipsBlur(e) {\n if (!Chips._keydown && document.hidden) {\n const chips = e.target.closest('.chips');\n const currChips = chips.M_Chips;\n currChips._selectedChip = null;\n }\n }\n _handleInputFocus() {\n this.el.classList.add('focus');\n }\n _handleInputBlur() {\n this.el.classList.remove('focus');\n }\n _handleInputKeydown(e) {\n Chips._keydown = true;\n // enter\n if (e.keyCode === 13) {\n // Override enter if autocompleting.\n if (this.hasAutocomplete && this.autocomplete && this.autocomplete.isOpen) {\n return;\n }\n e.preventDefault();\n if (!this.hasAutocomplete || (this.hasAutocomplete && !this.options.autocompleteOnly)) {\n this.addChip({ id: this._input.value });\n }\n this._input.value = '';\n // delete or left\n }\n else if ((e.keyCode === 8 || e.keyCode === 37) &&\n this._input.value === '' &&\n this.chipsData.length) {\n e.preventDefault();\n this.selectChip(this.chipsData.length - 1);\n }\n }\n _renderChip(chip) {\n if (!chip.id)\n return;\n const renderedChip = document.createElement('div');\n renderedChip.classList.add('chip');\n renderedChip.innerText = chip.text || chip.id;\n renderedChip.setAttribute('tabindex', \"0\");\n const closeIcon = document.createElement('i');\n closeIcon.classList.add('material-icons', 'close');\n closeIcon.innerText = 'close';\n // attach image if needed\n if (chip.image) {\n const img = document.createElement('img');\n img.setAttribute('src', chip.image);\n renderedChip.insertBefore(img, renderedChip.firstChild);\n }\n renderedChip.appendChild(closeIcon);\n return renderedChip;\n }\n _renderChips() {\n this._chips = []; //.remove();\n for (let i = 0; i < this.chipsData.length; i++) {\n const chipElem = this._renderChip(this.chipsData[i]);\n this.el.appendChild(chipElem);\n this._chips.push(chipElem);\n }\n // move input to end\n this.el.append(this._input);\n }\n _setupAutocomplete() {\n this.options.autocompleteOptions.onAutocomplete = (items) => {\n if (items.length > 0)\n this.addChip(items[0]);\n this._input.value = '';\n this._input.focus();\n };\n this.autocomplete = autocomplete_1.Autocomplete.init(this._input, this.options.autocompleteOptions);\n }\n _setupInput() {\n this._input = this.el.querySelector('input');\n if (!this._input) {\n this._input = document.createElement('input');\n this.el.append(this._input);\n }\n this._input.classList.add('input');\n }\n _setupLabel() {\n this._label = this.el.querySelector('label');\n if (this._label)\n this._label.setAttribute('for', this._input.getAttribute('id'));\n }\n _setPlaceholder() {\n if (this.chipsData !== undefined && !this.chipsData.length && this.options.placeholder) {\n this._input.placeholder = this.options.placeholder;\n }\n else if ((this.chipsData === undefined || !!this.chipsData.length) &&\n this.options.secondaryPlaceholder) {\n this._input.placeholder = this.options.secondaryPlaceholder;\n }\n }\n _isValidAndNotExist(chip) {\n const isValid = !!chip.id;\n const doesNotExist = !this.chipsData.some(item => item.id == chip.id);\n return isValid && doesNotExist;\n }\n addChip(chip) {\n if (!this._isValidAndNotExist(chip) || this.chipsData.length >= this.options.limit)\n return;\n const renderedChip = this._renderChip(chip);\n this._chips.push(renderedChip);\n this.chipsData.push(chip);\n //$(this._input).before(renderedChip);\n this._input.before(renderedChip);\n this._setPlaceholder();\n // fire chipAdd callback\n if (typeof this.options.onChipAdd === 'function') {\n this.options.onChipAdd(this.el, renderedChip);\n }\n }\n deleteChip(chipIndex) {\n const chip = this._chips[chipIndex];\n this._chips[chipIndex].remove();\n this._chips.splice(chipIndex, 1);\n this.chipsData.splice(chipIndex, 1);\n this._setPlaceholder();\n // fire chipDelete callback\n if (typeof this.options.onChipDelete === 'function') {\n this.options.onChipDelete(this.el, chip);\n }\n }\n selectChip(chipIndex) {\n const chip = this._chips[chipIndex];\n this._selectedChip = chip;\n chip.focus();\n // fire chipSelect callback\n if (typeof this.options.onChipSelect === 'function') {\n this.options.onChipSelect(this.el, chip);\n }\n }\n static Init() {\n document.addEventListener(\"DOMContentLoaded\", () => {\n // Handle removal of static chips.\n document.body.addEventListener('click', e => {\n if (e.target.closest('.chip .close')) {\n const chips = e.target.closest('.chips');\n if (chips && chips.M_Chips == undefined)\n return;\n e.target.closest('.chip').remove();\n }\n });\n });\n }\n}\nexports.Chips = Chips;\n(() => {\n Chips._keydown = false;\n})();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvY2hpcHMudHMuanMiLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUZBQXdDO0FBQ3hDLHdFQUE2QjtBQUM3QiwwRkFBOEM7QUFFOUMsSUFBSSxTQUFTLEdBQUc7SUFDZCxJQUFJLEVBQUUsRUFBRTtJQUNSLFdBQVcsRUFBRSxFQUFFO0lBQ2Ysb0JBQW9CLEVBQUUsRUFBRTtJQUN4QixtQkFBbUIsRUFBRSxFQUFFO0lBQ3ZCLGdCQUFnQixFQUFFLEtBQUs7SUFDdkIsS0FBSyxFQUFFLFFBQVE7SUFDZixTQUFTLEVBQUUsSUFBSTtJQUNmLFlBQVksRUFBRSxJQUFJO0lBQ2xCLFlBQVksRUFBRSxJQUFJO0NBQ25CLENBQUM7QUFTRixTQUFTLFNBQVMsQ0FBQyxFQUFlO0lBQ2hDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQyxVQUFVLENBQUMsUUFBUSxDQUFDLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ2pELENBQUM7QUFFRCxNQUFhLEtBQU0sU0FBUSxxQkFBUztJQWNsQyxZQUFZLEVBQUUsRUFBRSxPQUFPO1FBQ3JCLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ3pCLElBQUksQ0FBQyxFQUFVLENBQUMsT0FBTyxHQUFHLElBQUksQ0FBQztRQUNoQyxJQUFJLENBQUMsT0FBTyxtQ0FBTyxLQUFLLENBQUMsUUFBUSxHQUFLLE9BQU8sQ0FBQyxDQUFDO1FBR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lwcy5fa2V5ZG93biA9IGZhbHNlO1xuICB9XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/chips.ts\n"); - /** - * Teardown component - */ - value: function destroy() { - this._removeEventHandlers(); - this._removeThumb(); - this.el.M_Range = undefined; - } +/***/ }), - /** - * Setup Event Handlers - */ +/***/ "./src/collapsible.ts": +/*!****************************!*\ + !*** ./src/collapsible.ts ***! + \****************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - }, { - key: "_setupEventHandlers", - value: function _setupEventHandlers() { - this._handleRangeChangeBound = this._handleRangeChange.bind(this); - this._handleRangeMousedownTouchstartBound = this._handleRangeMousedownTouchstart.bind(this); - this._handleRangeInputMousemoveTouchmoveBound = this._handleRangeInputMousemoveTouchmove.bind(this); - this._handleRangeMouseupTouchendBound = this._handleRangeMouseupTouchend.bind(this); - this._handleRangeBlurMouseoutTouchleaveBound = this._handleRangeBlurMouseoutTouchleave.bind(this); +eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Collapsible = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst animejs_1 = __importDefault(__webpack_require__(/*! animejs */ \"./node_modules/animejs/lib/anime.es.js\"));\nconst _defaults = {\n accordion: true,\n onOpenStart: undefined,\n onOpenEnd: undefined,\n onCloseStart: undefined,\n onCloseEnd: undefined,\n inDuration: 300,\n outDuration: 300\n};\nclass Collapsible extends component_1.Component {\n constructor(el, options) {\n super(Collapsible, el, options);\n this.el.M_Collapsible = this;\n this.options = Object.assign(Object.assign({}, Collapsible.defaults), options);\n // Setup tab indices\n this._headers = Array.from(this.el.querySelectorAll('li > .collapsible-header'));\n this._headers.forEach(el => el.tabIndex = 0);\n this._setupEventHandlers();\n // Open first active\n const activeBodies = Array.from(this.el.querySelectorAll('li.active > .collapsible-body'));\n if (this.options.accordion)\n if (activeBodies.length > 0)\n activeBodies[0].style.display = 'block'; // Accordion\n else\n activeBodies.forEach(el => el.style.display = 'block'); // Expandables\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n const domElem = !!el.jquery ? el[0] : el;\n return domElem.M_Collapsible;\n }\n destroy() {\n this._removeEventHandlers();\n this.el.M_Collapsible = undefined;\n }\n _setupEventHandlers() {\n this._handleCollapsibleClickBound = this._handleCollapsibleClick.bind(this);\n this._handleCollapsibleKeydownBound = this._handleCollapsibleKeydown.bind(this);\n this.el.addEventListener('click', this._handleCollapsibleClickBound);\n this._headers.forEach(header => header.addEventListener('keydown', this._handleCollapsibleKeydownBound));\n }\n _removeEventHandlers() {\n this.el.removeEventListener('click', this._handleCollapsibleClickBound);\n this._headers.forEach(header => header.removeEventListener('keydown', this._handleCollapsibleKeydownBound));\n }\n _handleCollapsibleClick(e) {\n const header = e.target.closest('.collapsible-header');\n if (e.target && header) {\n const collapsible = header.closest('.collapsible');\n if (collapsible !== this.el)\n return;\n const li = header.closest('li');\n const isActive = li.classList.contains('active');\n const index = [...li.parentNode.children].indexOf(li);\n if (isActive)\n this.close(index);\n else\n this.open(index);\n }\n }\n _handleCollapsibleKeydown(e) {\n if (e.keyCode === 13) {\n this._handleCollapsibleClickBound(e);\n }\n }\n _animateIn(index) {\n const li = this.el.children[index];\n if (!li)\n return;\n const body = li.querySelector('.collapsible-body');\n animejs_1.default.remove(body);\n body.style.display = 'block';\n body.style.overflow = 'hidden';\n body.style.height = '0';\n body.style.paddingTop = '';\n body.style.paddingBottom = '';\n const pTop = getComputedStyle(body).paddingTop; // . css('padding-top');\n const pBottom = getComputedStyle(body).paddingBottom; //body.css('padding-bottom');\n const finalHeight = body.scrollHeight;\n body.style.paddingTop = '0';\n body.style.paddingBottom = '0';\n (0, animejs_1.default)({\n targets: body,\n height: finalHeight,\n paddingTop: pTop,\n paddingBottom: pBottom,\n duration: this.options.inDuration,\n easing: 'easeInOutCubic',\n complete: (anim) => {\n body.style.overflow = '';\n body.style.height = '';\n body.style.paddingTop = '';\n body.style.paddingBottom = '';\n // onOpenEnd callback\n if (typeof this.options.onOpenEnd === 'function') {\n this.options.onOpenEnd.call(this, li);\n }\n }\n });\n }\n _animateOut(index) {\n const li = this.el.children[index];\n if (!li)\n return;\n const body = li.querySelector('.collapsible-body');\n animejs_1.default.remove(body);\n body.style.overflow = 'hidden';\n (0, animejs_1.default)({\n targets: body,\n height: 0,\n paddingTop: 0,\n paddingBottom: 0,\n duration: this.options.outDuration,\n easing: 'easeInOutCubic',\n complete: () => {\n body.style.overflow = '';\n body.style.height = '';\n body.style.padding = '';\n body.style.display = '';\n // onCloseEnd callback\n if (typeof this.options.onCloseEnd === 'function') {\n this.options.onCloseEnd.call(this, li);\n }\n }\n });\n }\n open(index) {\n const listItems = Array.from(this.el.children).filter(c => c.tagName === 'LI');\n const li = listItems[index];\n if (li && !li.classList.contains('active')) {\n // onOpenStart callback\n if (typeof this.options.onOpenStart === 'function') {\n this.options.onOpenStart.call(this, li);\n }\n // Handle accordion behavior\n if (this.options.accordion) {\n const activeLis = listItems.filter(li => li.classList.contains('active'));\n activeLis.forEach(activeLi => {\n const index = listItems.indexOf(activeLi);\n this.close(index);\n });\n }\n // Animate in\n li.classList.add('active');\n this._animateIn(index);\n }\n }\n close(index) {\n const li = Array.from(this.el.children).filter(c => c.tagName === 'LI')[index];\n if (li && li.classList.contains('active')) {\n // onCloseStart callback\n if (typeof this.options.onCloseStart === 'function') {\n this.options.onCloseStart.call(this, li);\n }\n // Animate out\n li.classList.remove('active');\n this._animateOut(index);\n }\n }\n}\nexports.Collapsible = Collapsible;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvY29sbGFwc2libGUudHMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsaUZBQX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mN0aW9uJykge1xuICAgICAgICB0aGlzLm9wdGlvbnMub25DbG9zZVN0YXJ0LmNhbGwodGhpcywgbGkpO1xuICAgICAgfVxuICAgICAgLy8gQW5pbWF0ZSBvdXRcbiAgICAgIGxpLmNsYXNzTGlzdC5yZW1vdmUoJ2FjdGl2ZScpO1xuICAgICAgdGhpcy5fYW5pbWF0ZU91dChpbmRleCk7XG4gICAgfVxuICB9XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/collapsible.ts\n"); - this.el.addEventListener('change', this._handleRangeChangeBound); +/***/ }), - this.el.addEventListener('mousedown', this._handleRangeMousedownTouchstartBound); - this.el.addEventListener('touchstart', this._handleRangeMousedownTouchstartBound); +/***/ "./src/component.ts": +/*!**************************!*\ + !*** ./src/component.ts ***! + \**************************/ +/***/ ((__unused_webpack_module, exports) => { - this.el.addEventListener('input', this._handleRangeInputMousemoveTouchmoveBound); - this.el.addEventListener('mousemove', this._handleRangeInputMousemoveTouchmoveBound); - this.el.addEventListener('touchmove', this._handleRangeInputMousemoveTouchmoveBound); +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Component = void 0;\nclass Component {\n constructor(classDef, el, options) {\n this.el = el;\n this.options = options;\n // Display error if el is valid HTML Element\n if (!(el instanceof Element)) {\n console.error(Error(el + ' is not an HTML Element'));\n }\n // If exists, destroy and reinitialize in child\n let ins = classDef.getInstance(el);\n if (!!ins) {\n ins.destroy();\n }\n this.el = el;\n }\n static init(classDef, els, options) {\n let instances = null;\n if (els instanceof Element) {\n instances = new classDef(els, options);\n }\n else if (!!els && (els.jquery || els.cash || els instanceof NodeList || els instanceof HTMLCollection)) {\n let instancesArr = [];\n for (let i = 0; i < els.length; i++) {\n instancesArr.push(new classDef(els[i], options));\n }\n instances = instancesArr;\n }\n return instances;\n }\n}\nexports.Component = Component;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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bnVsbDtcbiAgICBpZiAoZWxzIGluc3RhbmNlb2YgRWxlbWVudCkge1xuICAgICAgaW5zdGFuY2VzID0gbmV3IGNsYXNzRGVmKGVscywgb3B0aW9ucyk7XG4gICAgfVxuICAgIGVsc2UgaWYgKCEhZWxzICYmIChlbHMuanF1ZXJ5IHx8IGVscy5jYXNoIHx8IGVscyBpbnN0YW5jZW9mIE5vZGVMaXN0IHx8IGVscyBpbnN0YW5jZW9mIEhUTUxDb2xsZWN0aW9uKSkge1xuICAgICAgbGV0IGluc3RhbmNlc0FyciA9IFtdO1xuICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgaW5zdGFuY2VzQXJyLnB1c2gobmV3IGNsYXNzRGVmKGVsc1tpXSwgb3B0aW9ucykpO1xuICAgICAgfVxuICAgICAgaW5zdGFuY2VzID0gaW5zdGFuY2VzQXJyO1xuICAgIH1cbiAgICByZXR1cm4gaW5zdGFuY2VzO1xuICB9XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/component.ts\n"); - this.el.addEventListener('mouseup', this._handleRangeMouseupTouchendBound); - this.el.addEventListener('touchend', this._handleRangeMouseupTouchendBound); +/***/ }), - this.el.addEventListener('blur', this._handleRangeBlurMouseoutTouchleaveBound); - this.el.addEventListener('mouseout', this._handleRangeBlurMouseoutTouchleaveBound); - this.el.addEventListener('touchleave', this._handleRangeBlurMouseoutTouchleaveBound); - } +/***/ "./src/datepicker.ts": +/*!***************************!*\ + !*** ./src/datepicker.ts ***! + \***************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - /** - * Remove Event Handlers - */ +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Datepicker = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst global_1 = __webpack_require__(/*! ./global */ \"./src/global.ts\");\nconst modal_1 = __webpack_require__(/*! ./modal */ \"./src/modal.ts\");\nconst select_1 = __webpack_require__(/*! ./select */ \"./src/select.ts\");\nlet _defaults = {\n // Close when date is selected\n autoClose: false,\n // the default output format for the input field value\n format: 'mmm dd, yyyy',\n // Used to create date object from current input string\n parse: null,\n // The initial date to view when first opened\n defaultDate: null,\n // Make the `defaultDate` the initial selected value\n setDefaultDate: false,\n disableWeekends: false,\n disableDayFn: null,\n // First day of week (0: Sunday, 1: Monday etc)\n firstDay: 0,\n // The earliest date that can be selected\n minDate: null,\n // Thelatest date that can be selected\n maxDate: null,\n // Number of years either side, or array of upper/lower range\n yearRange: 10,\n // used internally (don't config outside)\n minYear: 0,\n maxYear: 9999,\n minMonth: undefined,\n maxMonth: undefined,\n startRange: null,\n endRange: null,\n isRTL: false,\n // Render the month after year in the calendar title\n showMonthAfterYear: false,\n // Render days of the calendar grid that fall in the next or previous month\n showDaysInNextAndPreviousMonths: false,\n // Specify a DOM element to render the calendar in\n container: null,\n // Show clear button\n showClearBtn: false,\n // internationalization\n i18n: {\n cancel: 'Cancel',\n clear: 'Clear',\n done: 'Ok',\n previousMonth: '‹',\n nextMonth: '›',\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n ],\n monthsShort: [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n ],\n weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n weekdaysAbbrev: ['S', 'M', 'T', 'W', 'T', 'F', 'S']\n },\n // events array\n events: [],\n // callback function\n onSelect: null,\n onOpen: null,\n onClose: null,\n onDraw: null\n};\nclass Datepicker extends component_1.Component {\n constructor(el, options) {\n super(Datepicker, el, options);\n this.el.M_Datepicker = this;\n this.options = Object.assign(Object.assign({}, Datepicker.defaults), options);\n // make sure i18n defaults are not lost when only few i18n option properties are passed\n if (!!options && options.hasOwnProperty('i18n') && typeof options.i18n === 'object') {\n this.options.i18n = Object.assign(Object.assign({}, Datepicker.defaults.i18n), options.i18n);\n }\n // Remove time component from minDate and maxDate options\n if (this.options.minDate)\n this.options.minDate.setHours(0, 0, 0, 0);\n if (this.options.maxDate)\n this.options.maxDate.setHours(0, 0, 0, 0);\n this.id = global_1.M.guid();\n this._setupVariables();\n this._insertHTMLIntoDOM();\n this._setupModal();\n this._setupEventHandlers();\n if (!this.options.defaultDate) {\n this.options.defaultDate = new Date(Date.parse(this.el.value));\n }\n let defDate = this.options.defaultDate;\n if (Datepicker._isDate(defDate)) {\n if (this.options.setDefaultDate) {\n this.setDate(defDate, true);\n this.setInputValue();\n }\n else {\n this.gotoDate(defDate);\n }\n }\n else {\n this.gotoDate(new Date());\n }\n this.isOpen = false;\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static _isDate(obj) {\n return /Date/.test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());\n }\n static _isWeekend(date) {\n let day = date.getDay();\n return day === 0 || day === 6;\n }\n static _setToStartOfDay(date) {\n if (Datepicker._isDate(date))\n date.setHours(0, 0, 0, 0);\n }\n static _getDaysInMonth(year, month) {\n return [31, Datepicker._isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n }\n static _isLeapYear(year) {\n // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n static _compareDates(a, b) {\n // weak date comparison (use setToStartOfDay(date) to ensure correct result)\n return a.getTime() === b.getTime();\n }\n static getInstance(el) {\n let domElem = !!el.jquery ? el[0] : el;\n return domElem.M_Datepicker;\n }\n destroy() {\n this._removeEventHandlers();\n this.modal.destroy();\n this.modalEl.remove();\n this.destroySelects();\n this.el.M_Datepicker = undefined;\n }\n destroySelects() {\n let oldYearSelect = this.calendarEl.querySelector('.orig-select-year');\n if (oldYearSelect) {\n select_1.FormSelect.getInstance(oldYearSelect).destroy();\n }\n let oldMonthSelect = this.calendarEl.querySelector('.orig-select-month');\n if (oldMonthSelect) {\n select_1.FormSelect.getInstance(oldMonthSelect).destroy();\n }\n }\n _insertHTMLIntoDOM() {\n if (this.options.showClearBtn) {\n this.clearBtn.style.visibility = '';\n this.clearBtn.innerText = this.options.i18n.clear;\n }\n this.doneBtn.innerText = this.options.i18n.done;\n this.cancelBtn.innerText = this.options.i18n.cancel;\n if (this.options.container) {\n const optEl = this.options.container;\n this.options.container =\n optEl instanceof HTMLElement ? optEl : document.querySelector(optEl);\n this.options.container.append(this.modalEl);\n }\n else {\n //this.modalEl.before(this.el);\n this.el.parentElement.appendChild(this.modalEl);\n }\n }\n _setupModal() {\n this.modalEl.id = 'modal-' + this.id;\n this.modal = modal_1.Modal.init(this.modalEl, {\n onCloseEnd: () => {\n this.isOpen = false;\n }\n });\n }\n toString(format = null) {\n format = format || this.options.format;\n if (typeof format === 'function')\n return format(this.date);\n if (!Datepicker._isDate(this.date))\n return '';\n // String Format\n const formatArray = format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);\n const formattedDate = formatArray\n .map(label => this.formats[label] ? this.formats[label]() : label)\n .join('');\n return formattedDate;\n }\n setDate(date, preventOnSelect = false) {\n if (!date) {\n this.date = null;\n this._renderDateDisplay();\n return this.draw();\n }\n if (typeof date === 'string') {\n date = new Date(Date.parse(date));\n }\n if (!Datepicker._isDate(date)) {\n return;\n }\n let min = this.options.minDate, max = this.options.maxDate;\n if (Datepicker._isDate(min) && date < min) {\n date = min;\n }\n else if (Datepicker._isDate(max) && date > max) {\n date = max;\n }\n this.date = new Date(date.getTime());\n this._renderDateDisplay();\n Datepicker._setToStartOfDay(this.date);\n this.gotoDate(this.date);\n if (!preventOnSelect && typeof this.options.onSelect === 'function') {\n this.options.onSelect.call(this, this.date);\n }\n }\n setInputValue() {\n this.el.value = this.toString();\n this.el.dispatchEvent(new CustomEvent('change', { detail: { firedBy: this } }));\n }\n _renderDateDisplay() {\n let displayDate = Datepicker._isDate(this.date) ? this.date : new Date();\n let i18n = this.options.i18n;\n let day = i18n.weekdaysShort[displayDate.getDay()];\n let month = i18n.monthsShort[displayDate.getMonth()];\n let date = displayDate.getDate();\n this.yearTextEl.innerHTML = displayDate.getFullYear();\n this.dateTextEl.innerHTML = `${day}, ${month} ${date}`;\n }\n gotoDate(date) {\n let newCalendar = true;\n if (!Datepicker._isDate(date)) {\n return;\n }\n if (this.calendars) {\n let firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1), lastVisibleDate = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1), visibleDate = date.getTime();\n // get the end of the month\n lastVisibleDate.setMonth(lastVisibleDate.getMonth() + 1);\n lastVisibleDate.setDate(lastVisibleDate.getDate() - 1);\n newCalendar =\n visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate;\n }\n if (newCalendar) {\n this.calendars = [\n {\n month: date.getMonth(),\n year: date.getFullYear()\n }\n ];\n }\n this.adjustCalendars();\n }\n adjustCalendars() {\n this.calendars[0] = this.adjustCalendar(this.calendars[0]);\n this.draw();\n }\n adjustCalendar(calendar) {\n if (calendar.month < 0) {\n calendar.year -= Math.ceil(Math.abs(calendar.month) / 12);\n calendar.month += 12;\n }\n if (calendar.month > 11) {\n calendar.year += Math.floor(Math.abs(calendar.month) / 12);\n calendar.month -= 12;\n }\n return calendar;\n }\n nextMonth() {\n this.calendars[0].month++;\n this.adjustCalendars();\n }\n prevMonth() {\n this.calendars[0].month--;\n this.adjustCalendars();\n }\n render(year, month, randId) {\n let opts = this.options, now = new Date(), days = Datepicker._getDaysInMonth(year, month), before = new Date(year, month, 1).getDay(), data = [], row = [];\n Datepicker._setToStartOfDay(now);\n if (opts.firstDay > 0) {\n before -= opts.firstDay;\n if (before < 0) {\n before += 7;\n }\n }\n let previousMonth = month === 0 ? 11 : month - 1, nextMonth = month === 11 ? 0 : month + 1, yearOfPreviousMonth = month === 0 ? year - 1 : year, yearOfNextMonth = month === 11 ? year + 1 : year, daysInPreviousMonth = Datepicker._getDaysInMonth(yearOfPreviousMonth, previousMonth);\n let cells = days + before, after = cells;\n while (after > 7) {\n after -= 7;\n }\n cells += 7 - after;\n let isWeekSelected = false;\n for (let i = 0, r = 0; i < cells; i++) {\n let day = new Date(year, month, 1 + (i - before)), isSelected = Datepicker._isDate(this.date)\n ? Datepicker._compareDates(day, this.date)\n : false, isToday = Datepicker._compareDates(day, now), hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false, isEmpty = i < before || i >= days + before, dayNumber = 1 + (i - before), monthNumber = month, yearNumber = year, isStartRange = opts.startRange && Datepicker._compareDates(opts.startRange, day), isEndRange = opts.endRange && Datepicker._compareDates(opts.endRange, day), isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange, isDisabled = (opts.minDate && day < opts.minDate) ||\n (opts.maxDate && day > opts.maxDate) ||\n (opts.disableWeekends && Datepicker._isWeekend(day)) ||\n (opts.disableDayFn && opts.disableDayFn(day));\n if (isEmpty) {\n if (i < before) {\n dayNumber = daysInPreviousMonth + dayNumber;\n monthNumber = previousMonth;\n yearNumber = yearOfPreviousMonth;\n }\n else {\n dayNumber = dayNumber - days;\n monthNumber = nextMonth;\n yearNumber = yearOfNextMonth;\n }\n }\n let dayConfig = {\n day: dayNumber,\n month: monthNumber,\n year: yearNumber,\n hasEvent: hasEvent,\n isSelected: isSelected,\n isToday: isToday,\n isDisabled: isDisabled,\n isEmpty: isEmpty,\n isStartRange: isStartRange,\n isEndRange: isEndRange,\n isInRange: isInRange,\n showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths\n };\n row.push(this.renderDay(dayConfig));\n if (++r === 7) {\n data.push(this.renderRow(row, opts.isRTL, isWeekSelected));\n row = [];\n r = 0;\n isWeekSelected = false;\n }\n }\n return this.renderTable(opts, data, randId);\n }\n renderDay(opts) {\n let arr = [];\n let ariaSelected = 'false';\n if (opts.isEmpty) {\n if (opts.showDaysInNextAndPreviousMonths) {\n arr.push('is-outside-current-month');\n arr.push('is-selection-disabled');\n }\n else {\n return '';\n }\n }\n if (opts.isDisabled) {\n arr.push('is-disabled');\n }\n if (opts.isToday) {\n arr.push('is-today');\n }\n if (opts.isSelected) {\n arr.push('is-selected');\n ariaSelected = 'true';\n }\n if (opts.hasEvent) {\n arr.push('has-event');\n }\n if (opts.isInRange) {\n arr.push('is-inrange');\n }\n if (opts.isStartRange) {\n arr.push('is-startrange');\n }\n if (opts.isEndRange) {\n arr.push('is-endrange');\n }\n return (`` +\n `` +\n '');\n }\n renderRow(days, isRTL, isRowSelected) {\n return ('' +\n (isRTL ? days.reverse() : days).join('') +\n '');\n }\n renderTable(opts, data, randId) {\n return ('
    ' +\n this.renderHead(opts) +\n this.renderBody(data) +\n '
    ');\n }\n renderHead(opts) {\n let i, arr = [];\n for (i = 0; i < 7; i++) {\n arr.push(`${this.renderDayName(opts, i, true)}`);\n }\n return '' + (opts.isRTL ? arr.reverse() : arr).join('') + '';\n }\n renderBody(rows) {\n return '' + rows.join('') + '';\n }\n renderTitle(instance, c, year, month, refYear, randId) {\n let i, j, arr, opts = this.options, isMinYear = year === opts.minYear, isMaxYear = year === opts.maxYear, html = '
    ', monthHtml, yearHtml, prev = true, next = true;\n for (arr = [], i = 0; i < 12; i++) {\n arr.push('');\n }\n monthHtml = '';\n if (Array.isArray(opts.yearRange)) {\n i = opts.yearRange[0];\n j = opts.yearRange[1] + 1;\n }\n else {\n i = year - opts.yearRange;\n j = 1 + year + opts.yearRange;\n }\n for (arr = []; i < j && i <= opts.maxYear; i++) {\n if (i >= opts.minYear) {\n arr.push(``);\n }\n }\n if (opts.yearRangeReverse)\n arr.reverse();\n yearHtml = ``;\n let leftArrow = '';\n html += ``;\n html += '
    ';\n if (opts.showMonthAfterYear) {\n html += yearHtml + monthHtml;\n }\n else {\n html += monthHtml + yearHtml;\n }\n html += '
    ';\n if (isMinYear && (month === 0 || opts.minMonth >= month)) {\n prev = false;\n }\n if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {\n next = false;\n }\n let rightArrow = '';\n html += ``;\n return (html += '
    ');\n }\n // refresh HTML\n draw(force = false) {\n if (!this.isOpen && !force)\n return;\n let opts = this.options, minYear = opts.minYear, maxYear = opts.maxYear, minMonth = opts.minMonth, maxMonth = opts.maxMonth, html = '', randId;\n if (this._y <= minYear) {\n this._y = minYear;\n if (!isNaN(minMonth) && this._m < minMonth) {\n this._m = minMonth;\n }\n }\n if (this._y >= maxYear) {\n this._y = maxYear;\n if (!isNaN(maxMonth) && this._m > maxMonth) {\n this._m = maxMonth;\n }\n }\n randId =\n 'datepicker-title-' +\n Math.random()\n .toString(36)\n .replace(/[^a-z]+/g, '')\n .substr(0, 2);\n for (let c = 0; c < 1; c++) {\n this._renderDateDisplay();\n html +=\n this.renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId);\n }\n this.destroySelects();\n this.calendarEl.innerHTML = html;\n // Init Materialize Select\n let yearSelect = this.calendarEl.querySelector('.orig-select-year');\n let monthSelect = this.calendarEl.querySelector('.orig-select-month');\n select_1.FormSelect.init(yearSelect, {\n classes: 'select-year',\n dropdownOptions: { container: document.body, constrainWidth: false }\n });\n select_1.FormSelect.init(monthSelect, {\n classes: 'select-month',\n dropdownOptions: { container: document.body, constrainWidth: false }\n });\n // Add change handlers for select\n yearSelect.addEventListener('change', this._handleYearChange.bind(this));\n monthSelect.addEventListener('change', this._handleMonthChange.bind(this));\n if (typeof this.options.onDraw === 'function') {\n this.options.onDraw(this);\n }\n }\n _setupEventHandlers() {\n this._handleInputKeydownBound = this._handleInputKeydown.bind(this);\n this._handleInputClickBound = this._handleInputClick.bind(this);\n this._handleInputChangeBound = this._handleInputChange.bind(this);\n this._handleCalendarClickBound = this._handleCalendarClick.bind(this);\n this._finishSelectionBound = this._finishSelection.bind(this);\n this._handleMonthChange = this._handleMonthChange.bind(this);\n this._closeBound = this.close.bind(this);\n this.el.addEventListener('click', this._handleInputClickBound);\n this.el.addEventListener('keydown', this._handleInputKeydownBound);\n this.el.addEventListener('change', this._handleInputChangeBound);\n this.calendarEl.addEventListener('click', this._handleCalendarClickBound);\n this.doneBtn.addEventListener('click', this._finishSelectionBound);\n this.cancelBtn.addEventListener('click', this._closeBound);\n if (this.options.showClearBtn) {\n this._handleClearClickBound = this._handleClearClick.bind(this);\n this.clearBtn.addEventListener('click', this._handleClearClickBound);\n }\n }\n _setupVariables() {\n const template = document.createElement('template');\n template.innerHTML = Datepicker._template.trim();\n this.modalEl = template.content.firstChild;\n this.calendarEl = this.modalEl.querySelector('.datepicker-calendar');\n this.yearTextEl = this.modalEl.querySelector('.year-text');\n this.dateTextEl = this.modalEl.querySelector('.date-text');\n if (this.options.showClearBtn) {\n this.clearBtn = this.modalEl.querySelector('.datepicker-clear');\n }\n this.doneBtn = this.modalEl.querySelector('.datepicker-done');\n this.cancelBtn = this.modalEl.querySelector('.datepicker-cancel');\n this.formats = {\n d: () => {\n return this.date.getDate();\n },\n dd: () => {\n let d = this.date.getDate();\n return (d < 10 ? '0' : '') + d;\n },\n ddd: () => {\n return this.options.i18n.weekdaysShort[this.date.getDay()];\n },\n dddd: () => {\n return this.options.i18n.weekdays[this.date.getDay()];\n },\n m: () => {\n return this.date.getMonth() + 1;\n },\n mm: () => {\n let m = this.date.getMonth() + 1;\n return (m < 10 ? '0' : '') + m;\n },\n mmm: () => {\n return this.options.i18n.monthsShort[this.date.getMonth()];\n },\n mmmm: () => {\n return this.options.i18n.months[this.date.getMonth()];\n },\n yy: () => {\n return ('' + this.date.getFullYear()).slice(2);\n },\n yyyy: () => {\n return this.date.getFullYear();\n }\n };\n }\n _removeEventHandlers() {\n this.el.removeEventListener('click', this._handleInputClickBound);\n this.el.removeEventListener('keydown', this._handleInputKeydownBound);\n this.el.removeEventListener('change', this._handleInputChangeBound);\n this.calendarEl.removeEventListener('click', this._handleCalendarClickBound);\n }\n _handleInputClick() {\n this.open();\n }\n _handleInputKeydown(e) {\n if (e.which === global_1.M.keys.ENTER) {\n e.preventDefault();\n this.open();\n }\n }\n _handleCalendarClick(e) {\n if (!this.isOpen)\n return;\n const target = (e.target);\n if (!target.classList.contains('is-disabled')) {\n if (target.classList.contains('datepicker-day-button') &&\n !target.classList.contains('is-empty') &&\n !target.parentElement.classList.contains('is-disabled')) {\n this.setDate(new Date(e.target.getAttribute('data-year'), e.target.getAttribute('data-month'), e.target.getAttribute('data-day')));\n if (this.options.autoClose) {\n this._finishSelection();\n }\n }\n else if (target.closest('.month-prev')) {\n this.prevMonth();\n }\n else if (target.closest('.month-next')) {\n this.nextMonth();\n }\n }\n }\n _handleClearClick() {\n this.date = null;\n this.setInputValue();\n this.close();\n }\n _handleMonthChange(e) {\n this.gotoMonth(e.target.value);\n }\n _handleYearChange(e) {\n this.gotoYear(e.target.value);\n }\n // change view to a specific month (zero-index, e.g. 0: January)\n gotoMonth(month) {\n if (!isNaN(month)) {\n this.calendars[0].month = parseInt(month, 10);\n this.adjustCalendars();\n }\n }\n // change view to a specific full year (e.g. \"2012\")\n gotoYear(year) {\n if (!isNaN(year)) {\n this.calendars[0].year = parseInt(year, 10);\n this.adjustCalendars();\n }\n }\n _handleInputChange(e) {\n var _a;\n let date;\n // Prevent change event from being fired when triggered by the plugin\n if (((_a = e['detail']) === null || _a === void 0 ? void 0 : _a.firedBy) === this)\n return;\n if (this.options.parse) {\n date = this.options.parse(this.el.value, this.options.format);\n }\n else {\n date = new Date(Date.parse(this.el.value));\n }\n if (Datepicker._isDate(date))\n this.setDate(date);\n }\n renderDayName(opts, day, abbr = false) {\n day += opts.firstDay;\n while (day >= 7) {\n day -= 7;\n }\n return abbr ? opts.i18n.weekdaysAbbrev[day] : opts.i18n.weekdays[day];\n }\n // Set input value to the selected date and close Datepicker\n _finishSelection() {\n this.setInputValue();\n this.close();\n }\n open() {\n if (this.isOpen)\n return;\n this.isOpen = true;\n if (typeof this.options.onOpen === 'function') {\n this.options.onOpen.call(this);\n }\n this.draw();\n this.modal.open(undefined);\n return this;\n }\n close() {\n if (!this.isOpen)\n return;\n this.isOpen = false;\n if (typeof this.options.onClose === 'function') {\n this.options.onClose.call(this);\n }\n this.modal.close();\n return this;\n }\n}\nexports.Datepicker = Datepicker;\n(() => {\n Datepicker._template = `\n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n
    \n
    \n
    `;\n})();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvZGF0ZXBpY2tlci50cy5qcyIsIm1hcHBpbmdzIjoiOzs7QUFBQSxpRkFBd0M7QUFDeEMsd0VBQTZCO0FBQzdCLHFFQUFnQztBQUNoQyx3RUFBc0M7QUFFdEMsSUFBSSxTQUFTLEdBQUc7SUFDZCw4QkFBOEI7SUFDOUIsU0FBUyxFQUFFLEtBQUs7SUFDaEIsc0RBQXNEO0lBQ3RELE1BQU0sRUFBRSxjQUFjO0lBQ3RCLHVEQUF1RDtJQUN2RCxLQUFLLEVBQUUsSUFBSTtJQUNYLDZDQUE2QztJQUM3QyxXQUFXLEVBQUUsSUFBSTtJQUNqQixvREFBb0Q7SUFDcEQsY0FBYyxFQUFFLEtBQUs7SUFDckIsZUFBZSxFQUFFLEtBQUs7SUFDdEIsWUFBWSxFQUFFLElBQUk7SUFDbEIsK0NBQStDO0lBQy9DLFFBQVEsRUFBRSxDQUFDO0lBQ1gseUNBQXlDO0lBQ3pDLE9BQU8sRUFBRSxJQUFJO0lBQ2Isc0NBQXNDO0lBQ3RDLE9BQU8sRUFBRSxJQUFJO0lBQ2IsNkRBQTZEO0lBQzdELFNBQVMsRUFBRSxFQUFFO0lBQ2IseUN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AgcmVuZGVyKHllYXIsIG1vbnRoLCByYW5kSWQpIHtcbiAgICAgIGxldCBvcHRzID0gdGhpcy5vcHRpb25zLFxuICAgICAgICBub3cgPSBuZXcgRGF0ZSgpLFxuICAgICAgICBkYXlzID0gRGF0ZXBpY2tlci5fZ2V0RGF5c0luTW9udGgoeWVhciwgbW9udGgpLFxuICAgICAgICBiZWZvcmUgPSBuZXcgRGF0ZSh5ZWFyLCBtb250aCwgMSkuZ2V0RGF5KCksXG4gICAgICAgIGRhdGEgPSBbXSxcbiAgICAgICAgcm93ID0gW107XG4gICAgICBEYXRlcGlja2VyLl9zZXRUb1N0YXJ0T2ZEYXkobm93KTtcbiAgICAgIGlmIChvcHRzLmZpcnN0RGF5ID4gMCkge1xuICAgICAgICBiZWZvcmUgLT0gb3B0cy5maXJzdERheTtcbiAgICAgICAgaWYgKGJlZm9yZSA8IDApIHtcbiAgICAgICAgICBiZWZvcmUgKz0gNztcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgbGV0IHByZXZpb3VzTW9udGggPSBtb250aCA9PT0gMCA/IDExIDogbW9udGggLSAxLFxuICAgICAgICBuZXh0TW9udGggPSBtb250aCA9PT0gMTEgPyAwIDogbW9udGggKyAxLFxuICAgICAgICB5ZWFyT2ZQcmV2aW91c01vbnRoID0gbW9udGggPT09IDAgPyB5ZWFyIC0gMSA6IHllYXIsXG4gICAgICAgIHllYXJPZk5leHRNb250aCA9IG1vbnRoID09PSAxMSA/IHllYXIgKyAxIDogeWVhcixcbiAgICAgICAgZGF5c0luUHJldmlvdXNNb250aCA9IERhdGVwaWNrZXIuX2dldERheXNJbk1vbnRoKHllYXJPZlByZXZpb3VzTW9udGgsIHByZXZpb3VzTW9udGgpO1xuICAgICAgbGV0IGNlbGxzID0gZGF5cyArIGJlZm9yZSxcbiAgICAgICAgYWZ0ZXIgPSBjZWxscztcbiAgICAgIHdoaWxlIChhZnRlciA+IDcpIHtcbiAgICAgICAgYWZ0ZXIgLT0gNztcbiAgICAg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Q6IGhhc0V2ZW50LFxuICAgICAgICAgIGlzU2VsZWN0ZWQ6IGlzU2VsZWN0ZWQsXG4gICAgICAgICAgaXNUb2RheTogaXNUb2RheSxcbiAgICAgICAgICBpc0Rpc2FibGVkOiBpc0Rpc2FibGVkLFxuICAgICAgICAgIGlzRW1wdHk6IGlzRW1wdHksXG4gICAgICAgICAgaXNTdGFydFJhbmdlOiBpc1N0YXJ0UmFuZ2UsXG4gICAgICAgICAgaXNFbmRSYW5nZTogaXNFbmRSYW5nZSxcbiAgICAgICAgICBpc0luUmFuZ2U6IGlzSW5SYW5nZSxcbiAgICAgICAgICBzaG93RGF5c0luTmV4dEFuZFByZXZpb3VzTW9udGhzOiBvcHRzLnNob3dEYXlzSW5OZXh0QW5kUHJldmlvdXNNb250aHNcbiAgICAgICAgfTtcblxuICAgICAgICByb3cucHVzaCh0aGlzLnJlbmRlckRheShkYXlDb25maWcpKTtcblxuICAgICAgICBpZiAoKytyID09PSA3KSB7XG4gICAgICAgICAgZGF0YS5wdXNoKHRoaXMucmVuZGVyUm93KHJvdywgb3B0cy5pc1JUTCwgaXNXZWVrU2VsZWN0ZWQpKTtcbiAgICAgICAgICByb3cgPSBbXTtcbiAgICAgICAgICByID0gMDtcbiAgICAgICAgICBpc1dlZWtTZWxlY3RlZCA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gdGhpcy5yZW5kZXJUYWJsZShvcHRzLCBkYXRhLCByYW5kSWQpO1xuICAgIH1cblxuICAgIHJlbmRlckRheShvcHRzKSB7XG4gICAgICBsZXQgYXJyID0gW107XG4gICAgICBsZXQgYXJpYVNlbGVjdGVkID0gJ2ZhbHNlJztcbiAgICAgIGlmIChvcHRzLmlzRW1wdHkpIHtcbiAgICAgICAgaWYgKG9wdHMuc2hvd0RheXNJbk5leHRBbmRQcmV2aW91c01vbnRocykge1xuICAgICAgICAgIGFyci5wdXNoKCdpcy1vdXRzaWRlLWN1cnJlbnQtbW9udGgnKT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LWJ1dHRvblwiIHR5cGU9XCJidXR0b25cIiBkYXRhLXllYXI9XCIke29wdHMueWVhcn1cIiBkYXRhLW1vbnRoPVwiJHtvcHRzLm1vbnRofVwiIGRhdGEtZGF5PVwiJHtvcHRzLmRheX1cIj4ke29wdHMuZGF5fTwvYnV0dG9uPmAgK1xuICAgICAgICAnPC90ZD4nXG4gICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlclJvdyhkYXlzLCBpc1JUTCwgaXNSb3dTZWxlY3RlZCkge1xuICAgICAgcmV0dXJuIChcbiAgICAgICAgJzx0ciBjbGFzcz1cImRhdGVwaWNrZXItcm93JyArXG4gICAgICAgIChpc1Jvd1NlbGVjdGVkID8gJyBpcy1zZWxlY3RlZCcgOiAnJykgK1xuICAgICAgICAnXCI+JyArXG4gICAgICAgIChpc1JUTCA/IGRheXMucmV2ZXJzZSgpIDogZGF5cykuam9pbignJykgK1xuICAgICAgICAnPC90cj4nXG4gICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlclRhYmxlKG9wdHMsIGRhdGEsIHJhbmRJZCkge1xuICAgICAgcmV0dXJuIChcbiAgICAgICAgJzxkaXYgY2xhc3M9XCJkYXRlcGlja2VyLXRhYmxlLXdyYXBwZXJcIj48dGFibGUgY2VsbHBhZGRpbmc9XCIwXCIgY2VsbHNwYWNpbmc9XCIwXCIgY2xhc3M9XCJkYXRlcGlja2VyLXRhYmxlXCIgcm9sZT1cImdyaWRcIiBhcmlhLWxhYmVsbGVkYnk9XCInICtcbiAgICAgICAgcmFuZElkICtcbiAgICAgICAgJ1wiPicgK1xuICAgICAgICB0aGlzLnJlbmRlckhlYWQob3B0cykgK1xuICAgICAgICB0aGlzLnJlbmRlckJvZHkoZGF0YSkgK1xuICAgICAgICAnPC90YWJsZT48L2Rpdj4nXG4gICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlckhlYWQob3B0cykge1xuICAgICAgbGV0IGksXG4gICAgICAgIGFyciA9IFtdO1xuICAgICAgZm9yIChpID0gMDsgaSA8IDc7IGkrKykge1xuICAgICAgICBhcnIucHVzaChcbiAgICAgICAgICBgPHRoIHNjb3BlPVwiY29sXCI+PGFiYnIgdGl0bGU9XCIke3RoaXMucmVuZGVyRGF5TmFtZShvcHRzLCBpKX1cIj4ke3RoaXMucmVuZGVyRGF5TmFtZShcbiAgICAgICAgICAgIG9wdHMsXG4gICAgICAgICAgICBpLFxuICAgICAgICAgICAgdHJ1ZVxuICAgICAgICAgICl9PC9hYmJyPjwvdGg+YFxuICAgICAgICApO1xuICAgICAgfVxuICAgICAgcmV0dXJuICc8dGhlYWQ+PHRyPicgKyAob3B0cy5pc1JUTCA/IGFyci5yZXZlcnNlKCkgOiBhcnIpLmpvaW4oJycpICsgJzwvdHI+PC90aGVhZD4nO1xuICAgIH1cblxuICAgIHJlbmRlckJvZHkocm93cykge1xuICAgICAgcmV0dXJuICc8dGJvZHk+JyArIHJvd3Muam9pbignJykgKyAnPC90Ym9keT4nO1xuICAgIH1cblxuICAgIHJlbmRlclRpdGxlKGluc3RhbmNlLCBjLCB5ZWFyLCBtb250aCwgcmVmWWVhciwgcmFuZElkKSB7XG4gICAgICBsZXQgaSxcbiAgICAgICAgaixcbiAgICAgICAgYXJyLFxuICAgICAgICBvcHRzID0gdGhpcy5vcHRpb25zLFxuICAgICAgICBpc01pblllYXIgPSB5ZWFyID09PSBvcHRzLm1pblllYXIsXG4gICAgICAgIGlzTWF4WWVhciA9IHllYXIgPT09IG9wdHMubWF4WWVhcixcbiAgICAgICAgaHRtbCA9XG4gICAgICAgICAgJzxkaXYgaWQ9XCInICtcbiAgICAgICAgICByYW5kSWQgK1xuICAgICAgICAgICdcIiBjbGFzcz1cImRhdGVwaWNrZXItY29udHJvbHNcIiByb2xlPVwiaGVhZGluZ1wiIGFyaWEtbGl2ZT1cImFzc2VydGl2ZVwiPicsXG4gICAgICAgIG1vbnRoSHRtbCxcbiAgICAgICAgeWVhckh0bWwsXG4gICAgICAgIHByZXYgPSB0cnVlLFxuICAgICAgICBuZXh0ID0gdHJ1ZTtcblxuICAgICAgZm9yIChhcnIgPSBbXSwgaSA9IDA7IGkgPCAxMjsgaSsrKSB7XG4gICAgICAgIGFyci5wdXNoKFxuICAgICAgICAgICc8b3B0aW9uIHZhbHVlPVwiJyArXG4gICAgICAgICAgICAoeWVhciA9PT0gcmVmWWVhciA/IGkgLSBjIDogMTIgKyBpIC0gYykgK1xuICAgICAgICAgICAgJ1wiJyArXG4gICAgICAgICAgICAoaSA9PT0gbW9udGggPyAnIHNlbGVjdGVkPVwic2VsZWN0ZWRcIicgOiAnJykgK1xuICAgICAgICAgICAgKChpc01pblllYXIgJiYgaSA8IG9wdHMubWluTW9udGgpIHx8IChpc01heFllYXIgJiYgaSA+IG9wdHMubWF4TW9udGgpXG4gICAgICAgICAgICAgID8gJ2Rpc2FibGVkPVwiZGlzYWJsZWRcIidcbiAgICAgICAgICAgICAgOiAnJykgK1xuICAgICAgICAgICAgJz4nICtcbiAgICAgICAgICAgIG9wdHMuaTE4bi5tb250aHNbaV0gK1xuICAgICAgICAgICAgJzwvb3B0aW9uPidcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgbW9udGhIdG1sID0gJzxzZWxlY3QgY2xhc3M9XCJkYXRlcGlja2VyLXNlbGVjdCBvcmlnLXNlbGVjdC1tb250aFwiIHRhYmluZGV4PVwiLTFcIj4nK2Fyci5qb2luKCcnKSsnPC9zZWxlY3Q+JztcblxuICAgICAgaWYgKEFycmF5LmlzQXJyYXkob3B0cy55ZWFyUmFuZ2UpKSB7XG4gICAgICAgIGkgPSBvcHRzLnllYXJSYW5nZVswXTtcbiAgICAgICAgaiA9IG9wdHMueWVhclJhbmdlWzFdICsgMTtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpID0geWVhciAtIG9wdHMueWVhclJhbmdlO1xuICAgICAgICBqID0gMSArIHllYXIgKyBvcHRzLnllYXJSYW5nZTtcbiAgICAgIH1cblxuICAgICAgZm9yIChhcnIgPS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NlKSB7XG4gICAgICBpZiAoIXRoaXMuaXNPcGVuICYmICFmb3JjZSkgcmV0dXJuO1xuICAgICAgbGV0IG9wdHMgPSB0aGlzLm9wdGlvbnMsXG4gICAgICAgIG1pblllYXIgPSBvcHRzLm1pblllYXIsXG4gICAgICAgIG1heFllYXIgPSBvcHRzLm1heFllYXIsXG4gICAgICAgIG1pbk1vbnRoID0gb3B0cy5taW5Nb250aCxcbiAgICAgICAgbWF4TW9udGggPSBvcHRzLm1heE1vbnRoLFxuICAgICAgICBodG1sID0gJycsXG4gICAgICAgIHJhbmRJZDtcblxuICAgICAgaWYgKHRoaXMuX3kgPD0gbWluWWVhcikge1xuICAgICAgICB0aGlzLl95ID0gbWluWWVhcjtcbiAgICAgICAgaWYgKCFpc05hTihtaW5Nb250aCkgJiYgdGhpcy5fbSA8IG1pbk1vbnRoKSB7XG4gICAgICAgICAgdGhpcy5fbSA9IG1pbk1vbnRoO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5feSA+PSBtYXhZZWFyKSB7XG4gICAgICAgIHRoaXMuX3kgPSBtYXhZZWFyO1xuICAgICAgICBpZiAoIWlzTmFOKG1heE1vbnRoKSAmJiB0aGlzLl9tID4gbWF4TW9udGgpIHtcbiAgICAgICAgICB0aGlzLl9tID0gbWF4TW9udGg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmFuZElkID1cbiAgICAgICAgJ2RhdGVwaWNrZXItdGl0bGUtJyArXG4gICAgICAgIE1hdGgucmFuZG9tKClcbiAgICAgICAgICAudG9TdHJpbmcoMzYpXG4gICAgICAgICAgLnJlcGxhY2UoL1teYS16XSsvZywgJycpXG4gICAgICAgICAgLnN1YnN0cigwLCAyKTtcblxuICAgICAgZm9yIChsZXQgYyA9IDA7IGMgPCAxOyBjKyspIHtcbiAgICAgICAgdGhpcy5fcmVuZGVyRGF0ZURpc3BsYXkoKTtcbiAgICAgICAgaHRtbCArPVxuICAgICAgICAgIHRoaXMucmV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AoKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMub3B0aW9ucy5pMThuLndlZWtkYXlzU2hvcnRbdGhpcy5kYXRlLmdldERheSgpXTtcbiAgICAgICAgfSxcbiAgICAgICAgZGRkZDogKCkgPT4ge1xuICAgICAgICAgIHJldHVybiB0aGlzLm9wdGlvbnMuaTE4bi53ZWVrZGF5c1t0aGlzLmRhdGUuZ2V0RGF5KCldO1xuICAgICAgICB9LFxuICAgICAgICBtOiAoKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMuZGF0ZS5nZXRNb250aCgpICsgMTtcbiAgICAgICAgfSxcbiAgICAgICAgbW06ICgpID0+IHtcbiAgICAgICAgICBsZXQgbSA9IHRoaXMuZGF0ZS5nZXRNb250aCgpICsgMTtcbiAgICAgICAgICByZXR1cm4gKG0gPCAxMCA/ICcwJyA6ICcnKSArIG07XG4gICAgICAgIH0sXG4gICAgICAgIG1tbTogKCkgPT4ge1xuICAgICAgICAgIHJldHVybiB0aGlzLm9wdGlvbnMuaTE4bi5tb250aHNTaG9ydFt0aGlzLmRhdGUuZ2V0TW9udGgoKV07XG4gICAgICAgIH0sXG4gICAgICAgIG1tbW06ICgpID0+IHtcbiAgICAgICAgICByZXR1cm4gdGhpcy5vcHRpb25zLmkxOG4ubW9udGhzW3RoaXMuZGF0ZS5nZXRNb250aCgpXTtcbiAgICAgICAgfSxcbiAgICAgICAgeXk6ICgpID0+IHtcbiAgICAgICAgICByZXR1cm4gKCcnICsgdGhpcy5kYXRlLmdldEZ1bGxZZWFyKCkpLnNsaWNlKDIpO1xuICAgICAgICB9LFxuICAgICAgICB5eXl5OiAoKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMuZGF0ZS5nZXRGdWxsWWVhcigpO1xuICAgICAgICB9XG4gICAgICB9O1xuICAgIH1cblxuICAgIF9yZW1vdmVFdmVudEhhbmRsZXJzKCkge1xuICAgICAgdGhpcy5lbC5yZW1vdmVFdmVudExpc3RlbmVy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lucygnaXMtZGlzYWJsZWQnKVxuICAgICAgICApIHsgICAgICAgICAgXG4gICAgICAgICAgdGhpcy5zZXREYXRlKFxuICAgICAgICAgICAgbmV3IERhdGUoXG4gICAgICAgICAgICAgIGUudGFyZ2V0LmdldEF0dHJpYnV0ZSgnZGF0YS15ZWFyJyksXG4gICAgICAgICAgICAgIGUudGFyZ2V0LmdldEF0dHJpYnV0ZSgnZGF0YS1tb250aCcpLFxuICAgICAgICAgICAgICBlLnRhcmdldC5nZXRBdHRyaWJ1dGUoJ2RhdGEtZGF5JylcbiAgICAgICAgICAgIClcbiAgICAgICAgICApO1xuICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMuYXV0b0Nsb3NlKSB7XG4gICAgICAgICAgICB0aGlzLl9maW5pc2hTZWxlY3Rpb24oKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAodGFyZ2V0LmNsb3Nlc3QoJy5tb250aC1wcmV2JykpIHtcbiAgICAgICAgICB0aGlzLnByZXZNb250aCgpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHRhcmdldC5jbG9zZXN0KCcubW9udGgtbmV4dCcpKSB7XG4gICAgICAgICAgdGhpcy5uZXh0TW9udGgoKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIF9oYW5kbGVDbGVhckNsaWNrKCkge1xuICAgICAgdGhpcy5kYXRlID0gbnVsbDtcbiAgICAgIHRoaXMuc2V0SW5wdXRWYWx1ZSgpO1xuICAgICAgdGhpcy5jbG9zZSgpO1xuICAgIH1cblxuICAgIF9oYW5kbGVNb250aENoYW5nZShlKSB7XG4gICAgICB0aGlzLmdvdG9Nb250aChlLnRhcmdldC52YWx1ZSk7XG4gICAgfVxuXG4gICAgX2hhbmRsZVllYXJDaGFuZ2UoZSkge1xuICAgICAgdGhpcy5nb3RvWWVhcihlLnRhcmdldC52YWx1ZSk7XG4gICAgfVxuXG4gICAgLy8gY2hhbmdlIH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WVmZmVjdFwiIHR5cGU9XCJidXR0b25cIj48L2J1dHRvbj5cbiAgICAgICAgICAgICAgICAgIDxidXR0b24gY2xhc3M9XCJidG4tZmxhdCBkYXRlcGlja2VyLWRvbmUgd2F2ZXMtZWZmZWN0XCIgdHlwZT1cImJ1dHRvblwiPjwvYnV0dG9uPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5gO1xuICAgIH1cbiAgfSAgXG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/datepicker.ts\n"); - }, { - key: "_removeEventHandlers", - value: function _removeEventHandlers() { - this.el.removeEventListener('change', this._handleRangeChangeBound); +/***/ }), - this.el.removeEventListener('mousedown', this._handleRangeMousedownTouchstartBound); - this.el.removeEventListener('touchstart', this._handleRangeMousedownTouchstartBound); +/***/ "./src/dropdown.ts": +/*!*************************!*\ + !*** ./src/dropdown.ts ***! + \*************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - this.el.removeEventListener('input', this._handleRangeInputMousemoveTouchmoveBound); - this.el.removeEventListener('mousemove', this._handleRangeInputMousemoveTouchmoveBound); - this.el.removeEventListener('touchmove', this._handleRangeInputMousemoveTouchmoveBound); +eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Dropdown = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst global_1 = __webpack_require__(/*! ./global */ \"./src/global.ts\");\nconst animejs_1 = __importDefault(__webpack_require__(/*! animejs */ \"./node_modules/animejs/lib/anime.es.js\"));\nconst _defaults = {\n alignment: 'left',\n autoFocus: true,\n constrainWidth: true,\n container: null,\n coverTrigger: true,\n closeOnClick: true,\n hover: false,\n inDuration: 150,\n outDuration: 250,\n onOpenStart: null,\n onOpenEnd: null,\n onCloseStart: null,\n onCloseEnd: null,\n onItemClick: null\n};\nclass Dropdown extends component_1.Component {\n constructor(el, options) {\n super(Dropdown, el, options);\n this.el.M_Dropdown = this;\n Dropdown._dropdowns.push(this);\n this.id = global_1.M.getIdFromTrigger(el);\n this.dropdownEl = document.getElementById(this.id);\n //this.$dropdownEl = $(this.dropdownEl);\n this.options = Object.assign(Object.assign({}, Dropdown.defaults), options);\n this.isOpen = false;\n this.isScrollable = false;\n this.isTouchMoving = false;\n this.focusedIndex = -1;\n this.filterQuery = [];\n // Move dropdown-content after dropdown-trigger\n this._moveDropdown();\n this._makeDropdownFocusable();\n this._resetFilterQueryBound = this._resetFilterQuery.bind(this);\n this._handleDocumentClickBound = this._handleDocumentClick.bind(this);\n this._handleDocumentTouchmoveBound = this._handleDocumentTouchmove.bind(this);\n this._handleDropdownClickBound = this._handleDropdownClick.bind(this);\n this._handleDropdownKeydownBound = this._handleDropdownKeydown.bind(this);\n this._handleTriggerKeydownBound = this._handleTriggerKeydown.bind(this);\n this._setupEventHandlers();\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n const domElem = !!el.jquery ? el[0] : el;\n return domElem.M_Dropdown;\n }\n destroy() {\n this._resetDropdownStyles();\n this._removeEventHandlers();\n Dropdown._dropdowns.splice(Dropdown._dropdowns.indexOf(this), 1);\n this.el.M_Dropdown = undefined;\n }\n _setupEventHandlers() {\n var _a;\n // Trigger keydown handler\n this.el.addEventListener('keydown', this._handleTriggerKeydownBound);\n // Item click handler\n (_a = this.dropdownEl) === null || _a === void 0 ? void 0 : _a.addEventListener('click', this._handleDropdownClickBound);\n // Hover event handlers\n if (this.options.hover) {\n this._handleMouseEnterBound = this._handleMouseEnter.bind(this);\n this.el.addEventListener('mouseenter', this._handleMouseEnterBound);\n this._handleMouseLeaveBound = this._handleMouseLeave.bind(this);\n this.el.addEventListener('mouseleave', this._handleMouseLeaveBound);\n this.dropdownEl.addEventListener('mouseleave', this._handleMouseLeaveBound);\n // Click event handlers\n }\n else {\n this._handleClickBound = this._handleClick.bind(this);\n this.el.addEventListener('click', this._handleClickBound);\n }\n }\n _removeEventHandlers() {\n this.el.removeEventListener('keydown', this._handleTriggerKeydownBound);\n this.dropdownEl.removeEventListener('click', this._handleDropdownClickBound);\n if (this.options.hover) {\n this.el.removeEventListener('mouseenter', this._handleMouseEnterBound);\n this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound);\n this.dropdownEl.removeEventListener('mouseleave', this._handleMouseLeaveBound);\n }\n else {\n this.el.removeEventListener('click', this._handleClickBound);\n }\n }\n _setupTemporaryEventHandlers() {\n // Use capture phase event handler to prevent click\n document.body.addEventListener('click', this._handleDocumentClickBound, true);\n document.body.addEventListener('touchmove', this._handleDocumentTouchmoveBound);\n this.dropdownEl.addEventListener('keydown', this._handleDropdownKeydownBound);\n }\n _removeTemporaryEventHandlers() {\n // Use capture phase event handler to prevent click\n document.body.removeEventListener('click', this._handleDocumentClickBound, true);\n document.body.removeEventListener('touchmove', this._handleDocumentTouchmoveBound);\n this.dropdownEl.removeEventListener('keydown', this._handleDropdownKeydownBound);\n }\n _handleClick(e) {\n e.preventDefault();\n this.open();\n }\n _handleMouseEnter() {\n this.open();\n }\n _handleMouseLeave(e) {\n const toEl = e.toElement || e.relatedTarget;\n const leaveToDropdownContent = !!toEl.closest('.dropdown-content');\n let leaveToActiveDropdownTrigger = false;\n const closestTrigger = toEl.closest('.dropdown-trigger');\n if (closestTrigger &&\n !!closestTrigger.M_Dropdown &&\n closestTrigger.M_Dropdown.isOpen) {\n leaveToActiveDropdownTrigger = true;\n }\n // Close hover dropdown if mouse did not leave to either active dropdown-trigger or dropdown-content\n if (!leaveToActiveDropdownTrigger && !leaveToDropdownContent) {\n this.close();\n }\n }\n _handleDocumentClick(e) {\n const target = e.target;\n if (this.options.closeOnClick &&\n target.closest('.dropdown-content') &&\n !this.isTouchMoving) {\n // isTouchMoving to check if scrolling on mobile.\n //setTimeout(() => {\n this.close();\n //}, 0);\n }\n else if (target.closest('.dropdown-trigger') ||\n !target.closest('.dropdown-content')) {\n //setTimeout(() => {\n this.close();\n //}, 0);\n }\n this.isTouchMoving = false;\n }\n _handleTriggerKeydown(e) {\n // ARROW DOWN OR ENTER WHEN SELECT IS CLOSED - open Dropdown\n if ((e.which === global_1.M.keys.ARROW_DOWN || e.which === global_1.M.keys.ENTER) && !this.isOpen) {\n e.preventDefault();\n this.open();\n }\n }\n _handleDocumentTouchmove(e) {\n const target = e.target;\n if (target.closest('.dropdown-content')) {\n this.isTouchMoving = true;\n }\n }\n _handleDropdownClick(e) {\n // onItemClick callback\n if (typeof this.options.onItemClick === 'function') {\n const itemEl = e.target.closest('li');\n this.options.onItemClick.call(this, itemEl);\n }\n }\n _handleDropdownKeydown(e) {\n if (e.which === global_1.M.keys.TAB) {\n e.preventDefault();\n this.close();\n }\n // Navigate down dropdown list\n else if ((e.which === global_1.M.keys.ARROW_DOWN || e.which === global_1.M.keys.ARROW_UP) && this.isOpen) {\n e.preventDefault();\n const direction = e.which === global_1.M.keys.ARROW_DOWN ? 1 : -1;\n let newFocusedIndex = this.focusedIndex;\n let hasFoundNewIndex = false;\n do {\n newFocusedIndex = newFocusedIndex + direction;\n if (!!this.dropdownEl.children[newFocusedIndex] &&\n this.dropdownEl.children[newFocusedIndex].tabIndex !== -1) {\n hasFoundNewIndex = true;\n break;\n }\n } while (newFocusedIndex < this.dropdownEl.children.length && newFocusedIndex >= 0);\n if (hasFoundNewIndex) {\n // Remove active class from old element\n if (this.focusedIndex >= 0)\n this.dropdownEl.children[this.focusedIndex].classList.remove('active');\n this.focusedIndex = newFocusedIndex;\n this._focusFocusedItem();\n }\n }\n // ENTER selects choice on focused item\n else if (e.which === global_1.M.keys.ENTER && this.isOpen) {\n // Search for
    and `;\n arrLi.push(li);\n ul.append(li);\n });\n this.el.append(ul);\n this._indicators = arrLi;\n }\n }\n _removeIndicators() {\n this.el.querySelector('ul.indicators').remove(); //find('ul.indicators').remove();\n }\n set(index) {\n // Wrap around indices.\n if (index >= this._slides.length)\n index = 0;\n else if (index < 0)\n index = this._slides.length - 1;\n // Only do if index changes\n if (this.activeIndex === index)\n return;\n this._activeSlide = this._slides[this.activeIndex];\n const _caption = this._activeSlide.querySelector('.caption');\n this._activeSlide.classList.remove('active');\n // Enables every slide\n this._slides.forEach(slide => slide.style.visibility = 'visible');\n //--- Hide active Slide + Caption\n // TODO: What does this do?\n (0, animejs_1.default)({\n targets: this._activeSlide,\n opacity: 0,\n duration: this.options.duration,\n easing: 'easeOutQuad',\n complete: () => {\n this._slides.forEach(el => {\n if (el.classList.contains('active'))\n return;\n (0, animejs_1.default)({\n targets: el,\n opacity: 0,\n translateX: 0,\n translateY: 0,\n duration: 0,\n easing: 'easeOutQuad'\n });\n // Disables invisible slides (for assistive technologies)\n el.style.visibility = 'hidden';\n });\n }\n });\n // Hide active Caption\n //this._animateCaptionIn(_caption, this.options.duration);\n _caption.style.opacity = '0';\n // Update indicators\n if (this.options.indicators) {\n const activeIndicator = this._indicators[this.activeIndex].children[0];\n const nextIndicator = this._indicators[index].children[0];\n activeIndicator.classList.remove('active');\n nextIndicator.classList.add('active');\n if (typeof this.options.indicatorLabelFunc === \"function\") {\n activeIndicator.ariaLabel = this.options.indicatorLabelFunc.call(this, this.activeIndex, false);\n nextIndicator.ariaLabel = this.options.indicatorLabelFunc.call(this, index, true);\n }\n }\n //--- Show new Slide + Caption\n this._animateSlide(this._slides[index], true);\n this._slides[index].classList.add('active');\n // TODO: Why focus? => causes uncontrollable page scroll\n /*\n if (this._focusCurrent) {\n this._slides[index].focus();\n this._focusCurrent = false;\n }\n */\n this.activeIndex = index;\n // Reset interval, if allowed. This check prevents autostart\n // when slider is paused, since it can be changed though indicators.\n if (this.interval != null) {\n this.start();\n }\n }\n _pause(fromEvent) {\n clearInterval(this.interval);\n this.eventPause = fromEvent;\n this.interval = null;\n }\n pause() {\n this._pause(false);\n }\n start() {\n clearInterval(this.interval);\n this.interval = setInterval(this._handleIntervalBound, this.options.duration + this.options.interval);\n this.eventPause = false;\n }\n next() {\n let newIndex = this.activeIndex + 1;\n // Wrap around indices.\n if (newIndex >= this._slides.length)\n newIndex = 0;\n else if (newIndex < 0)\n newIndex = this._slides.length - 1;\n this.set(newIndex);\n }\n prev() {\n let newIndex = this.activeIndex - 1;\n // Wrap around indices.\n if (newIndex >= this._slides.length)\n newIndex = 0;\n else if (newIndex < 0)\n newIndex = this._slides.length - 1;\n this.set(newIndex);\n }\n}\nexports.Slider = Slider;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvc2xpZGVyLnRzLmpzIiwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLGlGQUF3QztBQUN4Qyx3RUFBNkI7QUFDN0IsZ0hBQTJCO0FBRXpCLElBQUksU0FBUyxHQUFHO0lBQ2QsVUFBVSxFQUFFLElBQUk7SUFDaEIsTUFBTSxFQUFFLEdBQUc7SUFDWCxRQUFRLEVBQUUsR0FBRztJQUNiLFFBQVEsRUFBRSxJQUFJO0lBQ2QsWUFBWSxFQUFFLElBQUk7SUFDbEIsWUFBWSxFQUFFLElBQUk7SUFDbEIsa0JBQWtCLEVBQUUsSUFBSSxDQUFDLGlFQUFpRTtDQUMzRixDQUFDO0FBRUYsTUFBYSxNQUFPLFNBQVEscUJBQVM7SUFvQm5DLFlBQVksRUFBRSxFQUFFLE9BQU87UUFDckIsS0FBSyxDQUFDLE1BQU0sRUFBRSxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDMUIsSUFBSSxDQUFDLEVBQVUsQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFDO1FBQ2pDLElBQUksQ0FBQyxPQUFPLG1DQUFPLE1BQU0sQ0FBQyxRQUFRLEdBQUssT0FBTyxDQUFDLENBQUM7UUF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ZXQobmV3SW5kZXgpO1xuICAgIH1cblxuICAgIHByZXYoKSB7XG4gICAgICBsZXQgbmV3SW5kZXggPSB0aGlzLmFjdGl2ZUluZGV4IC0gMTtcbiAgICAgIC8vIFdyYXAgYXJvdW5kIGluZGljZXMuXG4gICAgICBpZiAobmV3SW5kZXggPj0gdGhpcy5fc2xpZGVzLmxlbmd0aCkgbmV3SW5kZXggPSAwO1xuICAgICAgZWxzZSBpZiAobmV3SW5kZXggPCAwKSBuZXdJbmRleCA9IHRoaXMuX3NsaWRlcy5sZW5ndGggLSAxO1xuICAgICAgdGhpcy5zZXQobmV3SW5kZXgpO1xuICAgIH1cbiAgfVxuICBcblxuICBcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/slider.ts\n"); -//# sourceMappingURL=materialize_concat.js.map -//# sourceMappingURL=materialize.js.map +/***/ }), + +/***/ "./src/tabs.ts": +/*!*********************!*\ + !*** ./src/tabs.ts ***! + \*********************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Tabs = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst carousel_1 = __webpack_require__(/*! ./carousel */ \"./src/carousel.ts\");\nconst animejs_1 = __importDefault(__webpack_require__(/*! animejs */ \"./node_modules/animejs/lib/anime.es.js\"));\nlet _defaults = {\n duration: 300,\n onShow: null,\n swipeable: false,\n responsiveThreshold: Infinity, // breakpoint for swipeable\n};\nclass Tabs extends component_1.Component {\n constructor(el, options) {\n super(Tabs, el, options);\n this.el.M_Tabs = this;\n this.options = Object.assign(Object.assign({}, Tabs.defaults), options);\n this._tabLinks = this.el.querySelectorAll('li.tab > a');\n this._index = 0;\n this._setupActiveTabLink();\n if (this.options.swipeable) {\n this._setupSwipeableTabs();\n }\n else {\n this._setupNormalTabs();\n }\n // Setup tabs indicator after content to ensure accurate widths\n this._setTabsAndTabWidth();\n this._createIndicator();\n this._setupEventHandlers();\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n const domElem = !!el.jquery ? el[0] : el;\n return domElem.M_Tabs;\n }\n destroy() {\n this._removeEventHandlers();\n this._indicator.parentNode.removeChild(this._indicator);\n if (this.options.swipeable) {\n this._teardownSwipeableTabs();\n }\n else {\n this._teardownNormalTabs();\n }\n this.el.M_Tabs = undefined;\n }\n _setupEventHandlers() {\n this._handleWindowResizeBound = this._handleWindowResize.bind(this);\n window.addEventListener('resize', this._handleWindowResizeBound);\n this._handleTabClickBound = this._handleTabClick.bind(this);\n this.el.addEventListener('click', this._handleTabClickBound);\n }\n _removeEventHandlers() {\n window.removeEventListener('resize', this._handleWindowResizeBound);\n this.el.removeEventListener('click', this._handleTabClickBound);\n }\n _handleWindowResize() {\n this._setTabsAndTabWidth();\n if (this._tabWidth !== 0 && this._tabsWidth !== 0) {\n this._indicator.style.left = this._calcLeftPos(this._activeTabLink) + 'px';\n this._indicator.style.right = this._calcRightPos(this._activeTabLink) + 'px';\n }\n }\n _handleTabClick(e) {\n const tabLink = e.target;\n const tab = tabLink.parentElement;\n // Handle click on tab link only\n if (!tabLink || !tab.classList.contains('tab'))\n return;\n // is disabled?\n if (tab.classList.contains('disabled')) {\n e.preventDefault();\n return;\n }\n // Act as regular link if target attribute is specified.\n if (tabLink.hasAttribute('target'))\n return;\n // Make the old tab inactive.\n this._activeTabLink.classList.remove('active');\n const _oldContent = this._content;\n // Update the variables with the new link and content\n this._activeTabLink = tabLink;\n this._content = document.querySelector(tabLink.hash);\n this._tabLinks = this.el.querySelectorAll('li.tab > a');\n // Make the tab active\n this._activeTabLink.classList.add('active');\n const prevIndex = this._index;\n this._index = Math.max(Array.from(this._tabLinks).indexOf(tabLink), 0);\n // Swap content\n if (this.options.swipeable) {\n if (this._tabsCarousel) {\n this._tabsCarousel.set(this._index, () => {\n if (typeof this.options.onShow === 'function')\n this.options.onShow.call(this, this._content);\n });\n }\n }\n else {\n if (this._content) {\n this._content.style.display = 'block';\n this._content.classList.add('active');\n if (typeof this.options.onShow === 'function')\n this.options.onShow.call(this, this._content);\n if (_oldContent && _oldContent !== this._content) {\n _oldContent.style.display = 'none';\n _oldContent.classList.remove('active');\n }\n }\n }\n // Update widths after content is swapped (scrollbar bugfix)\n this._setTabsAndTabWidth();\n this._animateIndicator(prevIndex);\n e.preventDefault();\n }\n _createIndicator() {\n const indicator = document.createElement('li');\n indicator.classList.add('indicator');\n this.el.appendChild(indicator);\n this._indicator = indicator;\n this._indicator.style.left = this._calcLeftPos(this._activeTabLink) + 'px';\n this._indicator.style.right = this._calcRightPos(this._activeTabLink) + 'px';\n }\n _setupActiveTabLink() {\n // If the location.hash matches one of the links, use that as the active tab.\n this._activeTabLink = Array.from(this._tabLinks).find((a) => a.getAttribute('href') === location.hash);\n // If no match is found, use the first link or any with class 'active' as the initial active tab.\n if (!this._activeTabLink) {\n this._activeTabLink = this.el.querySelector('li.tab a.active');\n }\n if (this._activeTabLink.length === 0) {\n this._activeTabLink = this.el.querySelector('li.tab a');\n }\n Array.from(this._tabLinks).forEach((a) => a.classList.remove('active'));\n this._activeTabLink.classList.add('active');\n this._index = Math.max(Array.from(this._tabLinks).indexOf(this._activeTabLink), 0);\n if (this._activeTabLink) {\n this._content = document.querySelector(this._activeTabLink.hash);\n this._content.classList.add('active');\n }\n }\n _setupSwipeableTabs() {\n // Change swipeable according to responsive threshold\n if (window.innerWidth > this.options.responsiveThreshold)\n this.options.swipeable = false;\n const tabsContent = [];\n this._tabLinks.forEach(a => {\n const currContent = document.querySelector(a.hash);\n currContent.classList.add('carousel-item');\n tabsContent.push(currContent);\n });\n // Create Carousel-Wrapper around Tab-Contents\n const tabsWrapper = document.createElement('div');\n tabsWrapper.classList.add('tabs-content', 'carousel', 'carousel-slider');\n // Wrap around\n tabsContent[0].parentElement.insertBefore(tabsWrapper, tabsContent[0]);\n tabsContent.forEach(tabContent => {\n tabsWrapper.appendChild(tabContent);\n tabContent.style.display = '';\n });\n // Keep active tab index to set initial carousel slide\n const tab = this._activeTabLink.parentElement;\n const activeTabIndex = Array.from(tab.parentNode.children).indexOf(tab);\n this._tabsCarousel = carousel_1.Carousel.init(tabsWrapper, {\n fullWidth: true,\n noWrap: true,\n onCycleTo: (item) => {\n const prevIndex = this._index;\n this._index = Array.from(item.parentNode.children).indexOf(item);\n this._activeTabLink.classList.remove('active');\n this._activeTabLink = Array.from(this._tabLinks)[this._index];\n this._activeTabLink.classList.add('active');\n this._animateIndicator(prevIndex);\n if (typeof this.options.onShow === 'function')\n this.options.onShow.call(this, this._content);\n }\n });\n // Set initial carousel slide to active tab\n this._tabsCarousel.set(activeTabIndex);\n }\n _teardownSwipeableTabs() {\n const tabsWrapper = this._tabsCarousel.el;\n this._tabsCarousel.destroy();\n // Unwrap\n tabsWrapper.after(tabsWrapper.children);\n tabsWrapper.remove();\n }\n _setupNormalTabs() {\n // Hide Tabs Content\n Array.from(this._tabLinks).forEach(a => {\n if (a === this._activeTabLink)\n return;\n if (a.hash) {\n const currContent = document.querySelector(a.hash);\n if (currContent)\n currContent.style.display = 'none';\n }\n });\n }\n _teardownNormalTabs() {\n // show Tabs Content\n this._tabLinks.forEach(a => {\n if (a.hash) {\n const currContent = document.querySelector(a.hash);\n if (currContent)\n currContent.style.display = '';\n }\n });\n }\n _setTabsAndTabWidth() {\n this._tabsWidth = this.el.getBoundingClientRect().width;\n this._tabWidth = Math.max(this._tabsWidth, this.el.scrollWidth) / this._tabLinks.length;\n }\n _calcRightPos(el) {\n return Math.ceil(this._tabsWidth - el.offsetLeft - el.getBoundingClientRect().width);\n }\n _calcLeftPos(el) {\n return Math.floor(el.offsetLeft);\n }\n updateTabIndicator() {\n this._setTabsAndTabWidth();\n this._animateIndicator(this._index);\n }\n _animateIndicator(prevIndex) {\n let leftDelay = 0, rightDelay = 0;\n if (this._index - prevIndex >= 0)\n leftDelay = 90;\n else\n rightDelay = 90;\n const animOptions = {\n targets: this._indicator,\n left: {\n value: this._calcLeftPos(this._activeTabLink),\n delay: leftDelay\n },\n right: {\n value: this._calcRightPos(this._activeTabLink),\n delay: rightDelay\n },\n duration: this.options.duration,\n easing: 'easeOutQuad'\n };\n animejs_1.default.remove(this._indicator);\n (0, animejs_1.default)(animOptions);\n }\n select(tabId) {\n const tab = Array.from(this._tabLinks).find((a) => a.getAttribute('href') === '#' + tabId);\n if (tab)\n tab.click();\n }\n}\nexports.Tabs = Tabs;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdGFicy50cy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxpRkFBd0M7QUFDeEMsOEVBQXNDO0FBQ3RDLGdIQUEyQjtBQUUzQixJQUFJLFNBQVMsR0FBRztJQUNkLFFBQVEsRUFBRSxHQUFHO0lBQ2IsTUFBTSxFQUFFLElBQUk7SUFDWixTQUFTLEVBQUUsS0FBSztJQUNoQixtQkFBbUIsRUFBRSxRQUFRLEVBQUUsMkJBQTJCO0NBQzNELENBQUM7QUFFRixNQUFhLElBQUssU0FBUSxxQkFBUztJQWFqQyxZQUFZLEVBQUUsRUFBRSxPQUFZO1FBQzFCLEtBQUssQ0FBQyxJQUFJLEVBQUUsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ3RCLElBQUksQ0FBQyxFQUFVLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQztRQUUvQixJQUFJLENBQUMsT0FBTyxtQ0FBTyxJQUFJLENBQUMsUUFBUSxHQUFLLE9BQU8sQ0FBQyxDQUFDO1FBQzlDLElBQUksQ0FBQyxTQUFTLEdBQUcsSUFBSSxDQUFDLEVBQUUsQ0FBQyxnQkFBZ0IsQ0FBQyxZQUFZLENBQUMsQ0FBQztRQ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Z0UG9zKHRoaXMuX2FjdGl2ZVRhYkxpbmspLFxuICAgICAgICAgIGRlbGF5OiBsZWZ0RGVsYXlcbiAgICAgICAgfSxcbiAgICAgICAgcmlnaHQ6IHtcbiAgICAgICAgICB2YWx1ZTogdGhpcy5fY2FsY1JpZ2h0UG9zKHRoaXMuX2FjdGl2ZVRhYkxpbmspLFxuICAgICAgICAgIGRlbGF5OiByaWdodERlbGF5XG4gICAgICAgIH0sXG4gICAgICAgIGR1cmF0aW9uOiB0aGlzLm9wdGlvbnMuZHVyYXRpb24sXG4gICAgICAgIGVhc2luZzogJ2Vhc2VPdXRRdWFkJ1xuICAgICAgfTtcbiAgICAgIGFuaW0ucmVtb3ZlKHRoaXMuX2luZGljYXRvcik7XG4gICAgICBhbmltKGFuaW1PcHRpb25zKTtcbiAgICB9XG5cbiAgICBzZWxlY3QodGFiSWQpIHtcbiAgICAgIGNvbnN0IHRhYiA9IEFycmF5LmZyb20odGhpcy5fdGFiTGlua3MpLmZpbmQoKGE6IEhUTUxBbmNob3JFbGVtZW50KSA9PiBhLmdldEF0dHJpYnV0ZSgnaHJlZicpID09PSAnIycrdGFiSWQpO1xuICAgICAgaWYgKHRhYikgKDxIVE1MQW5jaG9yRWxlbWVudD50YWIpLmNsaWNrKCk7XG4gICAgfVxuICB9XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/tabs.ts\n"); + +/***/ }), + +/***/ "./src/tapTarget.ts": +/*!**************************!*\ + !*** ./src/tapTarget.ts ***! + \**************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TapTarget = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst global_1 = __webpack_require__(/*! ./global */ \"./src/global.ts\");\nlet _defaults = {\n onOpen: undefined,\n onClose: undefined\n};\nclass TapTarget extends component_1.Component {\n constructor(el, options) {\n super(TapTarget, el, options);\n this.el.M_TapTarget = this;\n this.options = Object.assign(Object.assign({}, TapTarget.defaults), options);\n this.isOpen = false;\n // setup\n this._origin = document.querySelector('#' + this.el.getAttribute('data-target'));\n this._setup();\n this._calculatePositioning();\n this._setupEventHandlers();\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n let domElem = !!el.jquery ? el[0] : el;\n return domElem.M_TapTarget;\n }\n destroy() {\n this._removeEventHandlers();\n this.el.TapTarget = undefined;\n }\n _setupEventHandlers() {\n this._handleDocumentClickBound = this._handleDocumentClick.bind(this);\n this._handleTargetClickBound = this._handleTargetClick.bind(this);\n this._handleOriginClickBound = this._handleOriginClick.bind(this);\n this.el.addEventListener('click', this._handleTargetClickBound);\n this.originEl.addEventListener('click', this._handleOriginClickBound);\n // Resize\n let throttledResize = global_1.M.throttle(this._handleResize, 200);\n this._handleThrottledResizeBound = throttledResize.bind(this);\n window.addEventListener('resize', this._handleThrottledResizeBound);\n }\n _removeEventHandlers() {\n this.el.removeEventListener('click', this._handleTargetClickBound);\n this.originEl.removeEventListener('click', this._handleOriginClickBound);\n window.removeEventListener('resize', this._handleThrottledResizeBound);\n }\n _handleTargetClick(e) {\n this.open();\n }\n _handleOriginClick(e) {\n this.close();\n }\n _handleResize(e) {\n this._calculatePositioning();\n }\n _handleDocumentClick(e) {\n if (!e.target.closest('.tap-target-wrapper')) {\n this.close();\n e.preventDefault();\n e.stopPropagation();\n }\n }\n _setup() {\n // Creating tap target\n this.wrapper = this.el.parentElement;\n this.waveEl = this.wrapper.querySelector('.tap-target-wave');\n this.originEl = this.wrapper.querySelector('.tap-target-origin');\n this.contentEl = this.el.querySelector('.tap-target-content');\n // Creating wrapper\n if (!this.wrapper.classList.contains('.tap-target-wrapper')) {\n this.wrapper = document.createElement('div');\n this.wrapper.classList.add('tap-target-wrapper');\n this.el.before(this.wrapper);\n this.wrapper.append(this.el);\n }\n // Creating content\n if (!this.contentEl) {\n this.contentEl = document.createElement('div');\n this.contentEl.classList.add('tap-target-content');\n this.el.append(this.contentEl);\n }\n // Creating foreground wave\n if (!this.waveEl) {\n this.waveEl = document.createElement('div');\n this.waveEl.classList.add('tap-target-wave');\n // Creating origin\n if (!this.originEl) {\n this.originEl = this._origin.cloneNode(true); // .clone(true, true);\n this.originEl.classList.add('tap-target-origin');\n this.originEl.removeAttribute('id');\n this.originEl.removeAttribute('style');\n this.waveEl.append(this.originEl);\n }\n this.wrapper.append(this.waveEl);\n }\n }\n _offset(el) {\n const box = el.getBoundingClientRect();\n const docElem = document.documentElement;\n return {\n top: box.top + window.pageYOffset - docElem.clientTop,\n left: box.left + window.pageXOffset - docElem.clientLeft\n };\n }\n _calculatePositioning() {\n // Element or parent is fixed position?\n let isFixed = getComputedStyle(this._origin).position === 'fixed';\n if (!isFixed) {\n let currentElem = this._origin;\n const parents = [];\n while ((currentElem = currentElem.parentNode) && currentElem !== document)\n parents.push(currentElem);\n for (let i = 0; i < parents.length; i++) {\n isFixed = getComputedStyle(parents[i]).position === 'fixed';\n if (isFixed)\n break;\n }\n }\n // Calculating origin\n const originWidth = this._origin.offsetWidth;\n const originHeight = this._origin.offsetHeight;\n const originTop = isFixed ? this._offset(this._origin).top - global_1.M.getDocumentScrollTop() : this._offset(this._origin).top;\n const originLeft = isFixed ? this._offset(this._origin).left - global_1.M.getDocumentScrollLeft() : this._offset(this._origin).left;\n // Calculating screen\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const scrollBarWidth = windowWidth - document.documentElement.clientWidth;\n const centerX = windowWidth / 2;\n const centerY = windowHeight / 2;\n const isLeft = originLeft <= centerX;\n const isRight = originLeft > centerX;\n const isTop = originTop <= centerY;\n const isBottom = originTop > centerY;\n const isCenterX = originLeft >= windowWidth * 0.25 && originLeft <= windowWidth * 0.75;\n // Calculating tap target\n const tapTargetWidth = this.el.offsetWidth;\n const tapTargetHeight = this.el.offsetHeight;\n const tapTargetTop = originTop + originHeight / 2 - tapTargetHeight / 2;\n const tapTargetLeft = originLeft + originWidth / 2 - tapTargetWidth / 2;\n const tapTargetPosition = isFixed ? 'fixed' : 'absolute';\n // Calculating content\n const tapTargetTextWidth = isCenterX ? tapTargetWidth : tapTargetWidth / 2 + originWidth;\n const tapTargetTextHeight = tapTargetHeight / 2;\n const tapTargetTextTop = isTop ? tapTargetHeight / 2 : 0;\n const tapTargetTextBottom = 0;\n const tapTargetTextLeft = isLeft && !isCenterX ? tapTargetWidth / 2 - originWidth : 0;\n const tapTargetTextRight = 0;\n const tapTargetTextPadding = originWidth;\n const tapTargetTextAlign = isBottom ? 'bottom' : 'top';\n // Calculating wave\n const tapTargetWaveWidth = originWidth > originHeight ? originWidth * 2 : originWidth * 2;\n const tapTargetWaveHeight = tapTargetWaveWidth;\n const tapTargetWaveTop = tapTargetHeight / 2 - tapTargetWaveHeight / 2;\n const tapTargetWaveLeft = tapTargetWidth / 2 - tapTargetWaveWidth / 2;\n // Setting tap target\n this.wrapper.style.top = isTop ? tapTargetTop + 'px' : '';\n this.wrapper.style.right = isRight ? windowWidth - tapTargetLeft - tapTargetWidth - scrollBarWidth + 'px' : '';\n this.wrapper.style.bottom = isBottom ? windowHeight - tapTargetTop - tapTargetHeight + 'px' : '';\n this.wrapper.style.left = isLeft ? tapTargetLeft + 'px' : '';\n this.wrapper.style.position = tapTargetPosition;\n // Setting content\n this.contentEl.style.width = tapTargetTextWidth + 'px';\n this.contentEl.style.height = tapTargetTextHeight + 'px';\n this.contentEl.style.top = tapTargetTextTop + 'px';\n this.contentEl.style.right = tapTargetTextRight + 'px';\n this.contentEl.style.bottom = tapTargetTextBottom + 'px';\n this.contentEl.style.left = tapTargetTextLeft + 'px';\n this.contentEl.style.padding = tapTargetTextPadding + 'px';\n this.contentEl.style.verticalAlign = tapTargetTextAlign;\n // Setting wave\n this.waveEl.style.top = tapTargetWaveTop + 'px';\n this.waveEl.style.left = tapTargetWaveLeft + 'px';\n this.waveEl.style.width = tapTargetWaveWidth + 'px';\n this.waveEl.style.height = tapTargetWaveHeight + 'px';\n }\n open() {\n if (this.isOpen)\n return;\n // onOpen callback\n if (typeof this.options.onOpen === 'function') {\n this.options.onOpen.call(this, this._origin);\n }\n this.isOpen = true;\n this.wrapper.classList.add('open');\n document.body.addEventListener('click', this._handleDocumentClickBound, true);\n document.body.addEventListener('touchend', this._handleDocumentClickBound);\n }\n close() {\n if (!this.isOpen)\n return;\n // onClose callback\n if (typeof this.options.onClose === 'function') {\n this.options.onClose.call(this, this._origin);\n }\n this.isOpen = false;\n this.wrapper.classList.remove('open');\n document.body.removeEventListener('click', this._handleDocumentClickBound, true);\n document.body.removeEventListener('touchend', this._handleDocumentClickBound);\n }\n}\nexports.TapTarget = TapTarget;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdGFwVGFyZ2V0LnRzLmpzIiwibWFwcGluZ3MiOiI7OztBQUFBLGlGQUF3QztBQUN4Qyx3RUFBNkI7QUFFN0IsSUFBSSxTQUFTLEdBQUc7SUFDZCxNQUFNLEVBQUUsU0FBUztJQUNqQixPQUFPLEVBQUUsU0FBUztDQUNuQixDQUFDO0FBRUEsTUFBYSxTQUFVLFNBQVEscUJBQVM7SUFhdEMsWUFBWSxFQUFFLEVBQUUsT0FBTztRQUNyQixLQUFLLENBQUMsU0FBUyxFQUFFLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQztRQUM3QixJQUFJLENBQUMsRUFBVSxDQUFDLFdBQVcsR0FBRyxJQUFJLENBQUM7UUFDcEMsSUFBSSxDQUFDLE9BQU8sbUNBQU8sU0FBUyxDQUFDLFFBQVEsR0FBSyxPQUFPLENBQUMsQ0FBQztRQUNuRCxJQUFJLENBQUMsTUFBTSxHQUFHLEtBQUssQ0FBQztRQUNwQixRQUFRO1FBQ1IsSUFBSSxDQUFDLE9BQU8sR0FBRyxRQUFRLENBQUMsYUFBYSxDQUFDLEdBQUc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lIGNhbGxiYWNrXG4gICAgICBpZiAodHlwZW9mIHRoaXMub3B0aW9ucy5vbkNsb3NlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgIHRoaXMub3B0aW9ucy5vbkNsb3NlLmNhbGwodGhpcywgdGhpcy5fb3JpZ2luKTtcbiAgICAgIH1cbiAgICAgIHRoaXMuaXNPcGVuID0gZmFsc2U7XG4gICAgICB0aGlzLndyYXBwZXIuY2xhc3NMaXN0LnJlbW92ZSgnb3BlbicpO1xuICAgICAgZG9jdW1lbnQuYm9keS5yZW1vdmVFdmVudExpc3RlbmVyKCdjbGljaycsIHRoaXMuX2hhbmRsZURvY3VtZW50Q2xpY2tCb3VuZCwgdHJ1ZSk7XG4gICAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ3RvdWNoZW5kJywgdGhpcy5faGFuZGxlRG9jdW1lbnRDbGlja0JvdW5kKTtcbiAgICB9XG4gIH1cblxuICBcblxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/tapTarget.ts\n"); + +/***/ }), + +/***/ "./src/timepicker.ts": +/*!***************************!*\ + !*** ./src/timepicker.ts ***! + \***************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Timepicker = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst global_1 = __webpack_require__(/*! ./global */ \"./src/global.ts\");\nlet _defaults = {\n dialRadius: 135,\n outerRadius: 105,\n innerRadius: 70,\n tickRadius: 20,\n duration: 350,\n container: null,\n defaultTime: 'now',\n fromNow: 0,\n showClearBtn: false,\n // internationalization\n i18n: {\n cancel: 'Cancel',\n clear: 'Clear',\n done: 'Ok'\n },\n autoClose: false,\n twelveHour: true,\n vibrate: true,\n // Callbacks\n onOpenStart: null,\n onOpenEnd: null,\n onCloseStart: null,\n onCloseEnd: null,\n onSelect: null\n};\nclass Timepicker extends component_1.Component {\n constructor(el, options) {\n super(Timepicker, el, options);\n this.el.M_Timepicker = this;\n this.options = Object.assign(Object.assign({}, Timepicker.defaults), options);\n this.id = global_1.M.guid();\n this._insertHTMLIntoDOM();\n this._setupModal();\n this._setupVariables();\n this._setupEventHandlers();\n this._clockSetup();\n this._pickerSetup();\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static _addLeadingZero(num) {\n return (num < 10 ? '0' : '') + num;\n }\n static _createSVGEl(name) {\n let svgNS = 'http://www.w3.org/2000/svg';\n return document.createElementNS(svgNS, name);\n }\n static _Pos(e) {\n if (e.targetTouches && e.targetTouches.length >= 1) {\n return { x: e.targetTouches[0].clientX, y: e.targetTouches[0].clientY };\n }\n // mouse event\n return { x: e.clientX, y: e.clientY };\n }\n static getInstance(el) {\n const domElem = !!el.jquery ? el[0] : el;\n return domElem.M_Timepicker;\n }\n destroy() {\n this._removeEventHandlers();\n this.modal.destroy();\n this.modalEl.remove();\n this.el.M_Timepicker = undefined;\n }\n _setupEventHandlers() {\n this._handleInputKeydownBound = this._handleInputKeydown.bind(this);\n this._handleInputClickBound = this._handleInputClick.bind(this);\n this._handleClockClickStartBound = this._handleClockClickStart.bind(this);\n this._handleDocumentClickMoveBound = this._handleDocumentClickMove.bind(this);\n this._handleDocumentClickEndBound = this._handleDocumentClickEnd.bind(this);\n this._inputFromTextFieldBound = this._handleTimeInputEnterKey.bind(this);\n this.el.addEventListener('click', this._handleInputClickBound);\n this.el.addEventListener('keydown', this._handleInputKeydownBound);\n this.plate.addEventListener('mousedown', this._handleClockClickStartBound);\n this.plate.addEventListener('touchstart', this._handleClockClickStartBound);\n this.digitalClock.addEventListener('keyup', this._inputFromTextFieldBound);\n this.inputHours.addEventListener('click', this.showView.bind(this, 'hours'));\n this.inputMinutes.addEventListener('click', this.showView.bind(this, 'minutes'));\n }\n _removeEventHandlers() {\n this.el.removeEventListener('click', this._handleInputClickBound);\n this.el.removeEventListener('keydown', this._handleInputKeydownBound);\n }\n _handleInputClick() {\n this.open();\n }\n _handleInputKeydown(e) {\n if (e.which === global_1.M.keys.ENTER) {\n e.preventDefault();\n this.open();\n }\n }\n _handleTimeInputEnterKey(e) {\n if (e.which === global_1.M.keys.ENTER) {\n e.preventDefault();\n this._inputFromTextField();\n }\n }\n _handleClockClickStart(e) {\n e.preventDefault();\n let clockPlateBR = this.plate.getBoundingClientRect();\n let offset = { x: clockPlateBR.left, y: clockPlateBR.top };\n this.x0 = offset.x + this.options.dialRadius;\n this.y0 = offset.y + this.options.dialRadius;\n this.moved = false;\n let clickPos = Timepicker._Pos(e);\n this.dx = clickPos.x - this.x0;\n this.dy = clickPos.y - this.y0;\n // Set clock hands\n this.setHand(this.dx, this.dy, false);\n // Mousemove on document\n document.addEventListener('mousemove', this._handleDocumentClickMoveBound);\n document.addEventListener('touchmove', this._handleDocumentClickMoveBound);\n // Mouseup on document\n document.addEventListener('mouseup', this._handleDocumentClickEndBound);\n document.addEventListener('touchend', this._handleDocumentClickEndBound);\n }\n _handleDocumentClickMove(e) {\n e.preventDefault();\n let clickPos = Timepicker._Pos(e);\n let x = clickPos.x - this.x0;\n let y = clickPos.y - this.y0;\n this.moved = true;\n this.setHand(x, y, false);\n }\n _handleDocumentClickEnd(e) {\n e.preventDefault();\n document.removeEventListener('mouseup', this._handleDocumentClickEndBound);\n document.removeEventListener('touchend', this._handleDocumentClickEndBound);\n let clickPos = Timepicker._Pos(e);\n let x = clickPos.x - this.x0;\n let y = clickPos.y - this.y0;\n if (this.moved && x === this.dx && y === this.dy) {\n this.setHand(x, y);\n }\n if (this.currentView === 'hours') {\n this.showView('minutes', this.options.duration / 2);\n }\n else if (this.options.autoClose) {\n this.minutesView.classList.add('timepicker-dial-out');\n setTimeout(() => {\n this.done();\n }, this.options.duration / 2);\n }\n if (typeof this.options.onSelect === 'function') {\n this.options.onSelect.call(this, this.hours, this.minutes);\n }\n // Unbind mousemove event\n document.removeEventListener('mousemove', this._handleDocumentClickMoveBound);\n document.removeEventListener('touchmove', this._handleDocumentClickMoveBound);\n }\n _insertHTMLIntoDOM() {\n const template = document.createElement('template');\n template.innerHTML = Timepicker._template.trim();\n this.modalEl = template.content.firstChild;\n this.modalEl.id = 'modal-' + this.id;\n // Append popover to input by default\n const optEl = this.options.container;\n const containerEl = optEl instanceof HTMLElement ? optEl : document.querySelector(optEl);\n if (this.options.container && !!containerEl) {\n containerEl.append(this.modalEl);\n }\n else {\n this.el.parentElement.appendChild(this.modalEl);\n }\n }\n _setupModal() {\n this.modal = global_1.M.Modal.init(this.modalEl, {\n onOpenStart: this.options.onOpenStart,\n onOpenEnd: this.options.onOpenEnd,\n onCloseStart: this.options.onCloseStart,\n onCloseEnd: () => {\n if (typeof this.options.onCloseEnd === 'function') {\n this.options.onCloseEnd.call(this);\n }\n this.isOpen = false;\n }\n });\n }\n _setupVariables() {\n this.currentView = 'hours';\n this.vibrate = navigator.vibrate\n ? 'vibrate'\n : navigator.webkitVibrate\n ? 'webkitVibrate'\n : null;\n this._canvas = this.modalEl.querySelector('.timepicker-canvas');\n this.plate = this.modalEl.querySelector('.timepicker-plate');\n this.digitalClock = this.modalEl.querySelector('.timepicker-display-column');\n this.hoursView = this.modalEl.querySelector('.timepicker-hours');\n this.minutesView = this.modalEl.querySelector('.timepicker-minutes');\n this.inputHours = this.modalEl.querySelector('.timepicker-input-hours');\n this.inputMinutes = this.modalEl.querySelector('.timepicker-input-minutes');\n this.spanAmPm = this.modalEl.querySelector('.timepicker-span-am-pm');\n this.footer = this.modalEl.querySelector('.timepicker-footer');\n this.amOrPm = 'PM';\n }\n _createButton(text, visibility) {\n const button = document.createElement('button');\n button.classList.add('btn-flat', 'waves-effect');\n button.style.visibility = visibility;\n button.type = 'button';\n button.tabIndex = this.options.twelveHour ? 3 : 1;\n button.innerText = text;\n return button;\n }\n _pickerSetup() {\n const clearButton = this._createButton(this.options.i18n.clear, this.options.showClearBtn ? '' : 'hidden');\n clearButton.classList.add('timepicker-clear');\n clearButton.addEventListener('click', this.clear.bind(this));\n this.footer.appendChild(clearButton);\n const confirmationBtnsContainer = document.createElement('div');\n confirmationBtnsContainer.classList.add('confirmation-btns');\n this.footer.append(confirmationBtnsContainer);\n const cancelButton = this._createButton(this.options.i18n.cancel, '');\n cancelButton.classList.add('timepicker-close');\n cancelButton.addEventListener('click', this.close.bind(this));\n confirmationBtnsContainer.appendChild(cancelButton);\n const doneButton = this._createButton(this.options.i18n.done, '');\n doneButton.classList.add('timepicker-close');\n doneButton.addEventListener('click', this.done.bind(this));\n confirmationBtnsContainer.appendChild(doneButton);\n }\n _clockSetup() {\n if (this.options.twelveHour) {\n // AM Button\n this._amBtn = document.createElement('div');\n this._amBtn.classList.add('am-btn');\n this._amBtn.innerText = 'AM';\n this._amBtn.addEventListener('click', this._handleAmPmClick.bind(this));\n this.spanAmPm.appendChild(this._amBtn);\n // PM Button\n this._pmBtn = document.createElement('div');\n this._pmBtn.classList.add('pm-btn');\n this._pmBtn.innerText = 'PM';\n this._pmBtn.addEventListener('click', this._handleAmPmClick.bind(this));\n this.spanAmPm.appendChild(this._pmBtn);\n }\n this._buildHoursView();\n this._buildMinutesView();\n this._buildSVGClock();\n }\n _buildSVGClock() {\n // Draw clock hands and others\n let dialRadius = this.options.dialRadius;\n let tickRadius = this.options.tickRadius;\n let diameter = dialRadius * 2;\n let svg = Timepicker._createSVGEl('svg');\n svg.setAttribute('class', 'timepicker-svg');\n svg.setAttribute('width', diameter.toString());\n svg.setAttribute('height', diameter.toString());\n let g = Timepicker._createSVGEl('g');\n g.setAttribute('transform', 'translate(' + dialRadius + ',' + dialRadius + ')');\n let bearing = Timepicker._createSVGEl('circle');\n bearing.setAttribute('class', 'timepicker-canvas-bearing');\n bearing.setAttribute('cx', '0');\n bearing.setAttribute('cy', '0');\n bearing.setAttribute('r', '4');\n let hand = Timepicker._createSVGEl('line');\n hand.setAttribute('x1', '0');\n hand.setAttribute('y1', '0');\n let bg = Timepicker._createSVGEl('circle');\n bg.setAttribute('class', 'timepicker-canvas-bg');\n bg.setAttribute('r', tickRadius);\n g.appendChild(hand);\n g.appendChild(bg);\n g.appendChild(bearing);\n svg.appendChild(g);\n this._canvas.appendChild(svg);\n this.hand = hand;\n this.bg = bg;\n this.bearing = bearing;\n this.g = g;\n }\n _buildHoursView() {\n const $tick = document.createElement('div');\n $tick.classList.add('timepicker-tick');\n // Hours view\n if (this.options.twelveHour) {\n for (let i = 1; i < 13; i += 1) {\n const tick = $tick.cloneNode(true);\n const radian = (i / 6) * Math.PI;\n const radius = this.options.outerRadius;\n tick.style.left = this.options.dialRadius + Math.sin(radian) * radius - this.options.tickRadius + 'px';\n tick.style.top = this.options.dialRadius - Math.cos(radian) * radius - this.options.tickRadius + 'px';\n tick.innerHTML = i === 0 ? '00' : i.toString();\n this.hoursView.appendChild(tick);\n // tick.on(mousedownEvent, mousedown);\n }\n }\n else {\n for (let i = 0; i < 24; i += 1) {\n const tick = $tick.cloneNode(true);\n const radian = (i / 6) * Math.PI;\n const inner = i > 0 && i < 13;\n const radius = inner ? this.options.innerRadius : this.options.outerRadius;\n tick.style.left = this.options.dialRadius + Math.sin(radian) * radius - this.options.tickRadius + 'px';\n tick.style.top = this.options.dialRadius - Math.cos(radian) * radius - this.options.tickRadius + 'px';\n tick.innerHTML = i === 0 ? '00' : i.toString();\n this.hoursView.appendChild(tick);\n // tick.on(mousedownEvent, mousedown);\n }\n }\n }\n _buildMinutesView() {\n const _tick = document.createElement('div');\n _tick.classList.add('timepicker-tick');\n // Minutes view\n for (let i = 0; i < 60; i += 5) {\n const tick = _tick.cloneNode(true);\n const radian = (i / 30) * Math.PI;\n tick.style.left =\n this.options.dialRadius +\n Math.sin(radian) * this.options.outerRadius -\n this.options.tickRadius +\n 'px';\n tick.style.top =\n this.options.dialRadius -\n Math.cos(radian) * this.options.outerRadius -\n this.options.tickRadius +\n 'px';\n tick.innerHTML = Timepicker._addLeadingZero(i);\n this.minutesView.appendChild(tick);\n }\n }\n _handleAmPmClick(e) {\n const btnClicked = e.target;\n this.amOrPm = btnClicked.classList.contains('am-btn') ? 'AM' : 'PM';\n this._updateAmPmView();\n }\n _updateAmPmView() {\n if (this.options.twelveHour) {\n if (this.amOrPm === 'PM') {\n this._amBtn.classList.remove('text-primary');\n this._pmBtn.classList.add('text-primary');\n }\n else if (this.amOrPm === 'AM') {\n this._amBtn.classList.add('text-primary');\n this._pmBtn.classList.remove('text-primary');\n }\n }\n }\n _updateTimeFromInput() {\n // Get the time\n let value = ((this.el.value || this.options.defaultTime || '') + '').split(':');\n if (this.options.twelveHour && !(typeof value[1] === 'undefined')) {\n if (value[1].toUpperCase().indexOf('AM') > 0) {\n this.amOrPm = 'AM';\n }\n else {\n this.amOrPm = 'PM';\n }\n value[1] = value[1].replace('AM', '').replace('PM', '');\n }\n if (value[0] === 'now') {\n let now = new Date(+new Date() + this.options.fromNow);\n value = [now.getHours().toString(), now.getMinutes().toString()];\n if (this.options.twelveHour) {\n this.amOrPm = parseInt(value[0]) >= 12 && parseInt(value[0]) < 24 ? 'PM' : 'AM';\n }\n }\n this.hours = +value[0] || 0;\n this.minutes = +value[1] || 0;\n this.inputHours.value = this.hours;\n this.inputMinutes.value = Timepicker._addLeadingZero(this.minutes);\n this._updateAmPmView();\n }\n showView(view, delay = null) {\n if (view === 'minutes' && getComputedStyle(this.hoursView).visibility === 'visible') {\n // raiseCallback(this.options.beforeHourSelect);\n }\n let isHours = view === 'hours', nextView = isHours ? this.hoursView : this.minutesView, hideView = isHours ? this.minutesView : this.hoursView;\n this.currentView = view;\n if (isHours) {\n this.inputHours.classList.add('text-primary');\n this.inputMinutes.classList.remove('text-primary');\n }\n else {\n this.inputHours.classList.remove('text-primary');\n this.inputMinutes.classList.add('text-primary');\n }\n // Transition view\n hideView.classList.add('timepicker-dial-out');\n nextView.style.visibility = 'visible';\n nextView.classList.remove('timepicker-dial-out');\n // Reset clock hand\n this.resetClock(delay);\n // After transitions ended\n clearTimeout(this.toggleViewTimer);\n this.toggleViewTimer = setTimeout(() => {\n hideView.style.visibility = 'hidden';\n }, this.options.duration);\n }\n resetClock(delay) {\n var _a;\n let view = this.currentView, value = this[view], isHours = view === 'hours', unit = Math.PI / (isHours ? 6 : 30), radian = value * unit, radius = isHours && value > 0 && value < 13 ? this.options.innerRadius : this.options.outerRadius, x = Math.sin(radian) * radius, y = -Math.cos(radian) * radius, self = this;\n if (delay) {\n (_a = this.canvas) === null || _a === void 0 ? void 0 : _a.classList.add('timepicker-canvas-out');\n setTimeout(() => {\n var _a;\n (_a = self.canvas) === null || _a === void 0 ? void 0 : _a.classList.remove('timepicker-canvas-out');\n self.setHand(x, y);\n }, delay);\n }\n else {\n this.setHand(x, y);\n }\n }\n _inputFromTextField() {\n const isHours = this.currentView === 'hours';\n if (isHours) {\n const value = parseInt(this.inputHours.value);\n if (value > 0 && value < 13) {\n this.drawClockFromTimeInput(value, isHours);\n this.showView('minutes', this.options.duration / 2);\n this.hours = value;\n this.inputMinutes.focus();\n }\n else {\n const hour = new Date().getHours();\n this.inputHours.value = (hour % 12).toString();\n }\n }\n else {\n const value = parseInt(this.inputMinutes.value);\n if (value >= 0 && value < 60) {\n this.inputMinutes.value = Timepicker._addLeadingZero(value);\n this.drawClockFromTimeInput(value, isHours);\n this.minutes = value;\n this.modalEl.querySelector('.confirmation-btns :nth-child(2)').focus();\n }\n else {\n const minutes = new Date().getMinutes();\n this.inputMinutes.value = Timepicker._addLeadingZero(minutes);\n }\n }\n }\n drawClockFromTimeInput(value, isHours) {\n const unit = Math.PI / (isHours ? 6 : 30);\n const radian = value * unit;\n let radius;\n if (this.options.twelveHour) {\n radius = this.options.outerRadius;\n }\n let cx1 = Math.sin(radian) * (radius - this.options.tickRadius), cy1 = -Math.cos(radian) * (radius - this.options.tickRadius), cx2 = Math.sin(radian) * radius, cy2 = -Math.cos(radian) * radius;\n this.hand.setAttribute('x2', cx1.toString());\n this.hand.setAttribute('y2', cy1.toString());\n this.bg.setAttribute('cx', cx2.toString());\n this.bg.setAttribute('cy', cy2.toString());\n }\n setHand(x, y, roundBy5 = false) {\n let radian = Math.atan2(x, -y), isHours = this.currentView === 'hours', unit = Math.PI / (isHours || roundBy5 ? 6 : 30), z = Math.sqrt(x * x + y * y), inner = isHours && z < (this.options.outerRadius + this.options.innerRadius) / 2, radius = inner ? this.options.innerRadius : this.options.outerRadius;\n if (this.options.twelveHour) {\n radius = this.options.outerRadius;\n }\n // Radian should in range [0, 2PI]\n if (radian < 0) {\n radian = Math.PI * 2 + radian;\n }\n // Get the round value\n let value = Math.round(radian / unit);\n // Get the round radian\n radian = value * unit;\n // Correct the hours or minutes\n if (this.options.twelveHour) {\n if (isHours) {\n if (value === 0)\n value = 12;\n }\n else {\n if (roundBy5)\n value *= 5;\n if (value === 60)\n value = 0;\n }\n }\n else {\n if (isHours) {\n if (value === 12) {\n value = 0;\n }\n value = inner ? (value === 0 ? 12 : value) : value === 0 ? 0 : value + 12;\n }\n else {\n if (roundBy5) {\n value *= 5;\n }\n if (value === 60) {\n value = 0;\n }\n }\n }\n // Once hours or minutes changed, vibrate the device\n if (this[this.currentView] !== value) {\n if (this.vibrate && this.options.vibrate) {\n // Do not vibrate too frequently\n if (!this.vibrateTimer) {\n navigator[this.vibrate](10);\n this.vibrateTimer = setTimeout(() => {\n this.vibrateTimer = null;\n }, 100);\n }\n }\n }\n this[this.currentView] = value;\n if (isHours) {\n this.inputHours.value = value.toString();\n }\n else {\n this.inputMinutes.value = Timepicker._addLeadingZero(value);\n }\n // Set clock hand and others' position\n let cx1 = Math.sin(radian) * (radius - this.options.tickRadius), cy1 = -Math.cos(radian) * (radius - this.options.tickRadius), cx2 = Math.sin(radian) * radius, cy2 = -Math.cos(radian) * radius;\n this.hand.setAttribute('x2', cx1.toString());\n this.hand.setAttribute('y2', cy1.toString());\n this.bg.setAttribute('cx', cx2.toString());\n this.bg.setAttribute('cy', cy2.toString());\n }\n open() {\n if (this.isOpen)\n return;\n this.isOpen = true;\n this._updateTimeFromInput();\n this.showView('hours');\n this.modal.open(undefined);\n }\n close() {\n if (!this.isOpen)\n return;\n this.isOpen = false;\n this.modal.close();\n }\n done(e = null, clearValue = null) {\n // Set input value\n let last = this.el.value;\n let value = clearValue\n ? ''\n : Timepicker._addLeadingZero(this.hours) + ':' + Timepicker._addLeadingZero(this.minutes);\n this.time = value;\n if (!clearValue && this.options.twelveHour) {\n value = `${value} ${this.amOrPm}`;\n }\n this.el.value = value;\n // Trigger change event\n if (value !== last) {\n this.el.dispatchEvent(new Event('change'));\n }\n this.close();\n this.el.focus();\n }\n clear() {\n this.done(null, true);\n }\n}\nexports.Timepicker = Timepicker;\n(() => {\n Timepicker._template = `\n
    \n
    \n
    \n
    \n
    \n \n :\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n activationDistance || toast.velocityX > 1;\n // Remove toast\n if (shouldBeDismissed) {\n toast.wasSwiped = true;\n toast.dismiss();\n // Animate toast back to original position\n }\n else {\n toast.el.style.transition = 'transform .2s, opacity .2s';\n toast.el.style.transform = '';\n toast.el.style.opacity = '';\n }\n Toast._draggedToast = null;\n }\n }\n static _xPos(e) {\n if (e.targetTouches && e.targetTouches.length >= 1) {\n return e.targetTouches[0].clientX;\n }\n // mouse event\n return e.clientX;\n }\n static dismissAll() {\n for (let toastIndex in Toast._toasts) {\n Toast._toasts[toastIndex].dismiss();\n }\n }\n _createToast() {\n const toast = document.createElement('div');\n toast.classList.add('toast');\n toast.setAttribute('role', 'alert');\n toast.setAttribute('aria-live', 'assertive');\n toast.setAttribute('aria-atomic', 'true');\n // Add custom classes onto toast\n if (this.options.classes.length > 0) {\n toast.classList.add(...this.options.classes.split(' '));\n }\n // Set safe text content\n toast.innerText = this.message;\n // if (\n // typeof HTMLElement === 'object'\n // ? this.htmlMessage instanceof HTMLElement\n // : this.htmlMessage &&\n // typeof this.htmlMessage === 'object' &&\n // this.htmlMessage !== null &&\n // this.htmlMessage.nodeType === 1 &&\n // typeof this.htmlMessage.nodeName === 'string'\n // ) {\n // //if the htmlMessage is an HTML node, append it directly\n // toast.appendChild(this.htmlMessage);\n // }\n // else if (!!this.htmlMessage.jquery) {\n // // Check if it is jQuery object, append the node\n // $(toast).append(this.htmlMessage[0]);\n // }\n // else {\n // // Append as unsanitized html;\n // $(toast).append(this.htmlMessage);\n // }\n // Append toast\n Toast._container.appendChild(toast);\n return toast;\n }\n _animateIn() {\n // Animate toast in\n (0, animejs_1.default)({\n targets: this.el,\n top: 0,\n opacity: 1,\n duration: this.options.inDuration,\n easing: 'easeOutCubic'\n });\n }\n /**\n * Create setInterval which automatically removes toast when timeRemaining >= 0\n * has been reached\n */\n _setTimer() {\n if (this.timeRemaining !== Infinity) {\n this.counterInterval = setInterval(() => {\n // If toast is not being dragged, decrease its time remaining\n if (!this.panning) {\n this.timeRemaining -= 20;\n }\n // Animate toast out\n if (this.timeRemaining <= 0) {\n this.dismiss();\n }\n }, 20);\n }\n }\n /**\n * Dismiss toast with animation\n */\n dismiss() {\n window.clearInterval(this.counterInterval);\n let activationDistance = this.el.offsetWidth * this.options.activationPercent;\n if (this.wasSwiped) {\n this.el.style.transition = 'transform .05s, opacity .05s';\n this.el.style.transform = `translateX(${activationDistance}px)`;\n this.el.style.opacity = '0';\n }\n (0, animejs_1.default)({\n targets: this.el,\n opacity: 0,\n marginTop: -40,\n duration: this.options.outDuration,\n easing: 'easeOutExpo',\n complete: () => {\n // Call the optional callback\n if (typeof this.options.completeCallback === 'function') {\n this.options.completeCallback();\n }\n // Remove toast from DOM\n this.el.remove();\n Toast._toasts.splice(Toast._toasts.indexOf(this), 1);\n if (Toast._toasts.length === 0) {\n Toast._removeContainer();\n }\n }\n });\n }\n}\nexports.Toast = Toast;\n(() => {\n Toast._toasts = [];\n Toast._container = null;\n Toast._draggedToast = null;\n})();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd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0aGlzKSwgMSk7XG4gICAgICAgICAgaWYgKFRvYXN0Ll90b2FzdHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICBUb2FzdC5fcmVtb3ZlQ29udGFpbmVyKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9XG5cbiAgICBzdGF0aWMgeyAgICAgICAgICBcbiAgICAgIFRvYXN0Ll90b2FzdHMgPSBbXTtcbiAgICAgIFRvYXN0Ll9jb250YWluZXIgPSBudWxsO1xuICAgICAgVG9hc3QuX2RyYWdnZWRUb2FzdCA9IG51bGw7XG4gICAgfVxuICB9XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/toasts.ts\n"); + +/***/ }), + +/***/ "./src/tooltip.ts": +/*!************************!*\ + !*** ./src/tooltip.ts ***! + \************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Tooltip = void 0;\nconst component_1 = __webpack_require__(/*! ./component */ \"./src/component.ts\");\nconst global_1 = __webpack_require__(/*! ./global */ \"./src/global.ts\");\nconst animejs_1 = __importDefault(__webpack_require__(/*! animejs */ \"./node_modules/animejs/lib/anime.es.js\"));\nconst _defaults = {\n exitDelay: 200,\n enterDelay: 0,\n //html: null,\n text: '',\n //unsafeHTML: null,\n margin: 5,\n inDuration: 250,\n outDuration: 200,\n position: 'bottom',\n transitionMovement: 10\n};\nclass Tooltip extends component_1.Component {\n constructor(el, options) {\n super(Tooltip, el, options);\n this.el.M_Tooltip = this;\n this.options = Object.assign(Object.assign({}, Tooltip.defaults), options);\n this.isOpen = false;\n this.isHovered = false;\n this.isFocused = false;\n this._appendTooltipEl();\n this._setupEventHandlers();\n }\n static get defaults() {\n return _defaults;\n }\n static init(els, options) {\n return super.init(this, els, options);\n }\n static getInstance(el) {\n const domElem = !!el.jquery ? el[0] : el;\n return domElem.M_Tooltip;\n }\n destroy() {\n this.tooltipEl.remove();\n this._removeEventHandlers();\n this.el.M_Tooltip = undefined;\n }\n _appendTooltipEl() {\n this.tooltipEl = document.createElement('div');\n this.tooltipEl.classList.add('material-tooltip');\n const tooltipContentEl = document.createElement('div');\n tooltipContentEl.classList.add('tooltip-content');\n this._setTooltipContent(tooltipContentEl);\n this.tooltipEl.appendChild(tooltipContentEl);\n document.body.appendChild(this.tooltipEl);\n }\n _setTooltipContent(tooltipContentEl) {\n tooltipContentEl.innerText = this.options.text;\n /*\n if (!!this.options.html) {\n // Warn when using html\n console.warn(\n 'The html option is deprecated and will be removed in the future. See https://github.com/materializecss/materialize/pull/49'\n );\n $(tooltipContentEl).append(this.options.html);\n }\n if (!!this.options.unsafeHTML) {\n $(tooltipContentEl).append(this.options.unsafeHTML);\n }\n */\n }\n _updateTooltipContent() {\n this._setTooltipContent(this.tooltipEl.querySelector('.tooltip-content'));\n }\n _setupEventHandlers() {\n this._handleMouseEnterBound = this._handleMouseEnter.bind(this);\n this._handleMouseLeaveBound = this._handleMouseLeave.bind(this);\n this._handleFocusBound = this._handleFocus.bind(this);\n this._handleBlurBound = this._handleBlur.bind(this);\n this.el.addEventListener('mouseenter', this._handleMouseEnterBound);\n this.el.addEventListener('mouseleave', this._handleMouseLeaveBound);\n this.el.addEventListener('focus', this._handleFocusBound, true);\n this.el.addEventListener('blur', this._handleBlurBound, true);\n }\n _removeEventHandlers() {\n this.el.removeEventListener('mouseenter', this._handleMouseEnterBound);\n this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound);\n this.el.removeEventListener('focus', this._handleFocusBound, true);\n this.el.removeEventListener('blur', this._handleBlurBound, true);\n }\n open(isManual) {\n if (this.isOpen)\n return;\n isManual = isManual === undefined ? true : undefined; // Default value true\n this.isOpen = true;\n // Update tooltip content with HTML attribute options\n this.options = Object.assign(Object.assign({}, this.options), this._getAttributeOptions());\n this._updateTooltipContent();\n this._setEnterDelayTimeout(isManual);\n }\n close() {\n if (!this.isOpen)\n return;\n this.isHovered = false;\n this.isFocused = false;\n this.isOpen = false;\n this._setExitDelayTimeout();\n }\n _setExitDelayTimeout() {\n clearTimeout(this._exitDelayTimeout);\n this._exitDelayTimeout = setTimeout(() => {\n if (this.isHovered || this.isFocused)\n return;\n this._animateOut();\n }, this.options.exitDelay);\n }\n _setEnterDelayTimeout(isManual) {\n clearTimeout(this._enterDelayTimeout);\n this._enterDelayTimeout = setTimeout(() => {\n if (!this.isHovered && !this.isFocused && !isManual)\n return;\n this._animateIn();\n }, this.options.enterDelay);\n }\n _positionTooltip() {\n const tooltip = this.tooltipEl;\n const origin = this.el, originHeight = origin.offsetHeight, originWidth = origin.offsetWidth, tooltipHeight = tooltip.offsetHeight, tooltipWidth = tooltip.offsetWidth, margin = this.options.margin;\n (this.xMovement = 0), (this.yMovement = 0);\n let targetTop = origin.getBoundingClientRect().top + global_1.M.getDocumentScrollTop();\n let targetLeft = origin.getBoundingClientRect().left + global_1.M.getDocumentScrollLeft();\n if (this.options.position === 'top') {\n targetTop += -tooltipHeight - margin;\n targetLeft += originWidth / 2 - tooltipWidth / 2;\n this.yMovement = -this.options.transitionMovement;\n }\n else if (this.options.position === 'right') {\n targetTop += originHeight / 2 - tooltipHeight / 2;\n targetLeft += originWidth + margin;\n this.xMovement = this.options.transitionMovement;\n }\n else if (this.options.position === 'left') {\n targetTop += originHeight / 2 - tooltipHeight / 2;\n targetLeft += -tooltipWidth - margin;\n this.xMovement = -this.options.transitionMovement;\n }\n else {\n targetTop += originHeight + margin;\n targetLeft += originWidth / 2 - tooltipWidth / 2;\n this.yMovement = this.options.transitionMovement;\n }\n const newCoordinates = this._repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);\n tooltip.style.top = newCoordinates.y + 'px';\n tooltip.style.left = newCoordinates.x + 'px';\n }\n _repositionWithinScreen(x, y, width, height) {\n const scrollLeft = global_1.M.getDocumentScrollLeft();\n const scrollTop = global_1.M.getDocumentScrollTop();\n let newX = x - scrollLeft;\n let newY = y - scrollTop;\n const bounding = {\n left: newX,\n top: newY,\n width: width,\n height: height\n };\n const offset = this.options.margin + this.options.transitionMovement;\n const edges = global_1.M.checkWithinContainer(document.body, bounding, offset);\n if (edges.left) {\n newX = offset;\n }\n else if (edges.right) {\n newX -= newX + width - window.innerWidth;\n }\n if (edges.top) {\n newY = offset;\n }\n else if (edges.bottom) {\n newY -= newY + height - window.innerHeight;\n }\n return {\n x: newX + scrollLeft,\n y: newY + scrollTop\n };\n }\n _animateIn() {\n this._positionTooltip();\n this.tooltipEl.style.visibility = 'visible';\n animejs_1.default.remove(this.tooltipEl);\n (0, animejs_1.default)({\n targets: this.tooltipEl,\n opacity: this.options.opacity || 1,\n translateX: this.xMovement,\n translateY: this.yMovement,\n duration: this.options.inDuration,\n easing: 'easeOutCubic'\n });\n }\n _animateOut() {\n animejs_1.default.remove(this.tooltipEl);\n (0, animejs_1.default)({\n targets: this.tooltipEl,\n opacity: 0,\n translateX: 0,\n translateY: 0,\n duration: this.options.outDuration,\n easing: 'easeOutCubic'\n });\n }\n _handleMouseEnter() {\n this.isHovered = true;\n this.isFocused = false; // Allows close of tooltip when opened by focus.\n this.open(false);\n }\n _handleMouseLeave() {\n this.isHovered = false;\n this.isFocused = false; // Allows close of tooltip when opened by focus.\n this.close();\n }\n _handleFocus() {\n if (global_1.M.tabPressed) {\n this.isFocused = true;\n this.open(false);\n }\n }\n _handleBlur() {\n this.isFocused = false;\n this.close();\n }\n _getAttributeOptions() {\n const attributeOptions = {};\n const tooltipTextOption = this.el.getAttribute('data-tooltip');\n const positionOption = this.el.getAttribute('data-position');\n if (tooltipTextOption) {\n attributeOptions.text = tooltipTextOption;\n }\n if (positionOption) {\n attributeOptions.position = positionOption;\n }\n return attributeOptions;\n }\n}\nexports.Tooltip = Tooltip;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,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PcHRpb247XG4gICAgICB9XG4gICAgICBpZiAocG9zaXRpb25PcHRpb24pIHtcbiAgICAgICAgKGF0dHJpYnV0ZU9wdGlvbnMgYXMgYW55KS5wb3NpdGlvbiA9IHBvc2l0aW9uT3B0aW9uO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGF0dHJpYnV0ZU9wdGlvbnM7XG4gICAgfVxuICB9XG5cblxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/tooltip.ts\n"); + +/***/ }), + +/***/ "./src/waves.ts": +/*!**********************!*\ + !*** ./src/waves.ts ***! + \**********************/ +/***/ ((__unused_webpack_module, exports) => { + +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Waves = void 0;\nclass Waves {\n static _offset(el) {\n const box = el.getBoundingClientRect();\n const docElem = document.documentElement;\n return {\n top: box.top + window.pageYOffset - docElem.clientTop,\n left: box.left + window.pageXOffset - docElem.clientLeft\n };\n }\n // https://phoenix-dx.com/css-techniques-for-material-ripple-effect/\n static renderWaveEffect(targetElement, position = null, color = null) {\n const isCentered = position === null;\n const duration = 500;\n let animationFrame, animationStart;\n const animationStep = function (timestamp) {\n if (!animationStart) {\n animationStart = timestamp;\n }\n const frame = timestamp - animationStart;\n if (frame < duration) {\n const easing = (frame / duration) * (2 - (frame / duration));\n const circle = isCentered ? 'circle at 50% 50%' : `circle at ${position.x}px ${position.y}px`;\n const waveColor = `rgba(${(color === null || color === void 0 ? void 0 : color.r) || 0}, ${(color === null || color === void 0 ? void 0 : color.g) || 0}, ${(color === null || color === void 0 ? void 0 : color.b) || 0}, ${0.3 * (1 - easing)})`;\n const stop = 90 * easing + \"%\";\n targetElement.style.backgroundImage = \"radial-gradient(\" + circle + \", \" + waveColor + \" \" + stop + \", transparent \" + stop + \")\";\n animationFrame = window.requestAnimationFrame(animationStep);\n }\n else {\n targetElement.style.backgroundImage = 'none';\n window.cancelAnimationFrame(animationFrame);\n }\n };\n animationFrame = window.requestAnimationFrame(animationStep);\n }\n static Init() {\n document.addEventListener(\"DOMContentLoaded\", () => {\n document.body.addEventListener('click', e => {\n const trigger = e.target;\n const el = trigger.closest('.waves-effect');\n if (el && el.contains(trigger)) {\n const isCircular = el.classList.contains('waves-circle');\n const x = e.pageX - Waves._offset(el).left;\n const y = e.pageY - Waves._offset(el).top;\n let color = null;\n if (el.classList.contains('waves-light'))\n color = { r: 255, g: 255, b: 255 };\n Waves.renderWaveEffect(el, isCircular ? null : { x, y }, color);\n }\n });\n });\n }\n}\nexports.Waves = Waves;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2F2ZXMudHMuanMiLCJtYXBwaW5ncyI6Ijs7O0FBV0EsTUFBYSxLQUFLO0lBRVIsTUFBTSxDQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ3ZCLE1BQU0sR0FBRyxHQUFHLEVBQUUsQ0FBQyxxQkFBcUIsRUFBRSxDQUFDO1FBQ3ZDLE1BQU0sT0FBTyxHQUFHLFFBQVEsQ0FBQyxlQUFlLENBQUM7UUFDekMsT0FBTztZQUNMLEdBQUcsRUFBRSxHQUFHLENBQUMsR0FBRyxHQUFHLE1BQU0sQ0FBQyxXQUFXLEdBQUcsT0FBTyxDQUFDLFNBQVM7WUFDckQsSUFBSSxFQUFFLEdBQUcsQ0FBQyxJQUFJLEdBQUcsTUFBTSxDQUFDLFdBQVcsR0FBRyxPQUFPLENBQUMsVUFBVTtTQUN6RCxDQUFDO0lBQ0osQ0FBQztJQUVELG9FQUFvRTtJQUU3RCxNQUFNLENBQUMsZ0JBQWdCLENBQUMsYUFBMEIsRUFBRSxXQUEwQixJQUFJLEVBQUUsUUFBdUIsSUFBSTtRQUNwSCxNQUFNLFVBQVUsR0FBRyxRQUFRLEtBQUssSUFBSSxDQUFDO1FBQ3JDLE1BQU0sUUFBUSxHQUFHLEdBQUcsQ0FBQztR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3Nlc3QoJy53YXZlcy1lZmZlY3QnKTtcbiAgICAgICAgaWYgKGVsICYmIGVsLmNvbnRhaW5zKHRyaWdnZXIpKSB7XG4gICAgICAgICAgY29uc3QgaXNDaXJjdWxhciA9IGVsLmNsYXNzTGlzdC5jb250YWlucygnd2F2ZXMtY2lyY2xlJyk7XG4gICAgICAgICAgY29uc3QgeCA9IGUucGFnZVggLSBXYXZlcy5fb2Zmc2V0KGVsKS5sZWZ0O1xuICAgICAgICAgIGNvbnN0IHkgPSBlLnBhZ2VZIC0gV2F2ZXMuX29mZnNldChlbCkudG9wO1xuXG4gICAgICAgICAgbGV0IGNvbG9yID0gbnVsbDtcbiAgICAgICAgICBpZiAoZWwuY2xhc3NMaXN0LmNvbnRhaW5zKCd3YXZlcy1saWdodCcpKVxuICAgICAgICAgICAgY29sb3IgPSB7cjoyNTUsIGc6MjU1LCBiOjI1NX07XG4gICAgICAgIFxuICAgICAgICAgIFdhdmVzLnJlbmRlcldhdmVFZmZlY3QoZWwsIGlzQ2lyY3VsYXIgPyBudWxsIDoge3gsIHl9LCBjb2xvcik7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH0pO1xuXG4gIH1cbn0iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/waves.ts\n"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __webpack_require__("./src/global.ts"); +/******/ M = __webpack_exports__; +/******/ +/******/ })() +; \ No newline at end of file diff --git a/extras/noUiSlider/nouislider.css b/extras/noUiSlider/nouislider.css deleted file mode 100644 index 52b7d283c4..0000000000 --- a/extras/noUiSlider/nouislider.css +++ /dev/null @@ -1,404 +0,0 @@ -/*! - * Materialize 1.0.0 (https://materializecss.github.io/materialize) - * Copyright 2014-2015 Materialize - * MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE) - */ - -/*! nouislider - 9.1.0 - 2016-12-10 16:00:32 */ - -/* Functional styling; - * These styles are required for noUiSlider to function. - * You don't need to change these rules to apply your design. - */ -.noUi-target, -.noUi-target * { - -webkit-touch-callout: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-user-select: none; - -ms-touch-action: none; - touch-action: none; - -ms-user-select: none; - -moz-user-select: none; - user-select: none; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.noUi-target { - position: relative; - direction: ltr; -} -.noUi-base { - width: 100%; - height: 100%; - position: relative; - z-index: 1; /* Fix 401 */ -} -.noUi-connect { - position: absolute; - right: 0; - top: 0; - left: 0; - bottom: 0; -} -.noUi-origin { - position: absolute; - height: 0; - width: 0; -} -.noUi-handle { - position: relative; - z-index: 1; -} -.noUi-state-tap .noUi-connect, -.noUi-state-tap .noUi-origin { - -webkit-transition: top 0.25s, right 0.25s, bottom 0.25s, left 0.25s; - transition: top 0.25s, right 0.25s, bottom 0.25s, left 0.25s; -} -.noUi-state-drag * { - cursor: inherit !important; -} - -.noUi-handle-touch-area{ - position: relative; - width: 44px; - height: 44px; - left: -15px; - top: -15px; -} - -/* Painting and performance; - * Browsers can paint handles in their own layer. - */ -.noUi-base, -.noUi-handle { - -webkit-transform: translate3d(0,0,0); - transform: translate3d(0,0,0); -} - -/* Slider size and handle placement; - */ -.noUi-horizontal { - height: 18px; -} -.noUi-horizontal .noUi-handle { - width: 34px; - height: 28px; - left: -17px; - top: -6px; -} -.noUi-vertical { - width: 18px; -} -.noUi-vertical .noUi-handle { - width: 28px; - height: 34px; - left: -6px; - top: -17px; -} - -/* Styling; - */ -.noUi-target { - background: var(--slider-track-color); - border-radius: 4px; - border: 1px solid transparent; -} -.noUi-connect { - background: var(--primary-color); - -webkit-transition: background 450ms; - transition: background 450ms; -} - -/* Handles and cursors; - */ -.noUi-draggable { - cursor: ew-resize; -} -.noUi-vertical .noUi-draggable { - cursor: ns-resize; -} -.noUi-handle { - border: 1px solid var(--separator-color); - border-radius: 3px; - background: var(--surface-color); - cursor: default; - box-shadow: inset 0 0 1px #FFF, - inset 0 1px 7px #EBEBEB, - 0 3px 6px -3px #BBB; -} -.noUi-active { - box-shadow: inset 0 0 1px #FFF, - inset 0 1px 7px #DDD, - 0 3px 6px -3px #BBB; -} - -/* Handle stripes - */ -.noUi-handle:before, -.noUi-handle:after { - content: ""; - display: block; - position: absolute; - height: 14px; - width: 1px; - background: #E8E7E6; - left: 14px; - top: 6px; -} -.noUi-handle:after { - left: 17px; -} -.noUi-vertical .noUi-handle:before, -.noUi-vertical .noUi-handle:after { - width: 14px; - height: 1px; - left: 6px; - top: 14px; -} -.noUi-vertical .noUi-handle:after { - top: 17px; -} - -/* Disabled state; - */ -[disabled] .noUi-connect { - background: var(--font-color-disabled); -} -[disabled].noUi-target, -[disabled].noUi-handle, -[disabled] .noUi-handle { - cursor: not-allowed; -} - - -/* Base; - * - */ -.noUi-pips, -.noUi-pips * { - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.noUi-pips { - position: absolute; - color: var(--font-color-medium); -} - -/* Values; - * - */ -.noUi-value { - position: absolute; - text-align: center; -} -.noUi-value-sub { - color: var(--font-color-medium); - font-size: 10px; -} - -/* Markings; - * - */ -.noUi-marker { - position: absolute; - background: var(--slider-track-color); -} -.noUi-marker-sub { - background: var(--font-color-medium); -} -.noUi-marker-large { - background: var(--slider-track-color); -} - -/* Horizontal layout; - * - */ -.noUi-pips-horizontal { - padding: 10px 0; - height: 80px; - top: 100%; - left: 0; - width: 100%; -} -.noUi-value-horizontal { - -webkit-transform: translate3d(-50%,50%,0); - transform: translate3d(-50%,50%,0); -} - -.noUi-marker-horizontal.noUi-marker { - margin-left: -1px; - width: 2px; - height: 5px; -} -.noUi-marker-horizontal.noUi-marker-sub { - height: 10px; -} -.noUi-marker-horizontal.noUi-marker-large { - height: 15px; -} - -/* Vertical layout; - * - */ -.noUi-pips-vertical { - padding: 0 10px; - height: 100%; - top: 0; - left: 100%; -} -.noUi-value-vertical { - -webkit-transform: translate3d(0,50%,0); - transform: translate3d(0,50%,0); - padding-left: 25px; -} - -.noUi-marker-vertical.noUi-marker { - width: 5px; - height: 2px; - margin-top: -1px; -} -.noUi-marker-vertical.noUi-marker-sub { - width: 10px; -} -.noUi-marker-vertical.noUi-marker-large { - width: 15px; -} - -.noUi-tooltip { - display: block; - position: absolute; - border: 1px solid transparent; - border-radius: 3px; - background: #fff; - color: #000; - padding: 5px; - text-align: center; -} -.noUi-horizontal .noUi-tooltip { - -webkit-transform: translate(-50%, 0); - transform: translate(-50%, 0); - left: 50%; - bottom: 120%; -} -.noUi-vertical .noUi-tooltip { - -webkit-transform: translate(0, -50%); - transform: translate(0, -50%); - top: 50%; - right: 120%; -} - -/* Materialize Styles */ -.noUi-target { - border: 0; - border-radius: 0; -} -.noUi-horizontal { - height: 3px; -} - -.noUi-vertical { - height: 100%; - width: 3px; -} - -.noUi-horizontal .noUi-handle, -.noUi-vertical .noUi-handle { - width: 15px; - height: 15px; - border-radius: 50%; - box-shadow: none; - background-color: var(--primary-color); - border: none; - left: -5px; - top: -6px; - transition: width .2s cubic-bezier(0.215, 0.610, 0.355, 1.000), - height .2s cubic-bezier(0.215, 0.610, 0.355, 1.000), - left .2s cubic-bezier(0.215, 0.610, 0.355, 1.000), - top .2s cubic-bezier(0.215, 0.610, 0.355, 1.000); -} -.noUi-handle:before { - content: none; -} -.noUi-handle:after { - content: none; -} - -.noUi-target .noUi-active.noUi-handle { - width: 3px; - height: 3px; - left: 0; - top: 0; -} - -.noUi-target.noUi-horizontal .noUi-tooltip { - position: absolute; - height: 30px; - width: 30px; - top: -17px; - left: -2px; - background-color: var(--primary-color); - border-radius: 50%; - transition: border-radius .25s cubic-bezier(0.215, 0.610, 0.355, 1.000), - transform .25s cubic-bezier(0.215, 0.610, 0.355, 1.000); - transform: scale(.5) rotate(-45deg); - transform-origin: 50% 100%; -} -.noUi-target.noUi-horizontal .noUi-active .noUi-tooltip { - border-radius: 15px 15px 15px 0; - transform: rotate(-45deg) translate(23px, -25px); -} - -.noUi-tooltip span { - width: 100%; - text-align: center; - color: var(--font-on-primary-color-main); - font-size: 12px; - opacity: 0; - position: absolute; - top: 6px; - left: -1px; - transition: opacity .25s cubic-bezier(0.215, 0.610, 0.355, 1.000); -} - -.noUi-horizontal .noUi-tooltip span { - transform: rotate(45deg); -} - -.noUi-vertical .noUi-tooltip span { - transform: rotate(135deg); -} - -.noUi-target.noUi-vertical .noUi-tooltip { - position: absolute; - height: 30px; - width: 30px; - top: -17px; - left: -2px; - background-color: var(--primary-color); - border-radius: 50%; - transition: border-radius .25s cubic-bezier(0.215, 0.610, 0.355, 1.000), - transform .25s cubic-bezier(0.215, 0.610, 0.355, 1.000); - transform: scale(.5) rotate(-45deg); - transform-origin: 50% 100%; -} -.noUi-target.noUi-vertical .noUi-active .noUi-tooltip { - border-radius: 15px 15px 15px 0; - transform: rotate(-135deg) translate(35px, -10px); -} -.noUi-vertical .noUi-tooltip span { - width: 100%; - text-align: center; - color: var(--font-on-primary-color-main); - font-size: 12px; - transform: rotate(135deg); - opacity: 0; - position: absolute; - top: 7px; - left: -1px; - transition: opacity .25s cubic-bezier(0.215, 0.610, 0.355, 1.000); -} - -.noUi-horizontal .noUi-active .noUi-tooltip span, -.noUi-vertical .noUi-active .noUi-tooltip span { - opacity: 1; -} \ No newline at end of file diff --git a/extras/noUiSlider/nouislider.js b/extras/noUiSlider/nouislider.js deleted file mode 100644 index 438ff3824c..0000000000 --- a/extras/noUiSlider/nouislider.js +++ /dev/null @@ -1,2147 +0,0 @@ -/*! - * Materialize 1.0.0 (https://materializecss.github.io/materialize) - * Copyright 2014-2015 Materialize - * MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE) - */ - -// wNumb -(function(){function r(b){return b.split("").reverse().join("")}function s(b,f,c){if((b[f]||b[c])&&b[f]===b[c])throw Error(f);}function v(b,f,c,d,e,p,q,k,l,h,n,a){q=a;var m,g=n="";p&&(a=p(a));if("number"!==typeof a||!isFinite(a))return!1;b&&0===parseFloat(a.toFixed(b))&&(a=0);0>a&&(m=!0,a=Math.abs(a));b&&(p=Math.pow(10,b),a=(Math.round(a*p)/p).toFixed(b));a=a.toString();-1!==a.indexOf(".")&&(b=a.split("."),a=b[0],c&&(n=c+b[1]));f&&(a=r(a).match(/.{1,3}/g),a=r(a.join(r(f))));m&&k&&(g+=k);d&&(g+=d); - m&&l&&(g+=l);g=g+a+n;e&&(g+=e);h&&(g=h(g,q));return g}function w(b,f,c,d,e,h,q,k,l,r,n,a){var m;b="";n&&(a=n(a));if(!a||"string"!==typeof a)return!1;k&&a.substring(0,k.length)===k&&(a=a.replace(k,""),m=!0);d&&a.substring(0,d.length)===d&&(a=a.replace(d,""));l&&a.substring(0,l.length)===l&&(a=a.replace(l,""),m=!0);e&&a.slice(-1*e.length)===e&&(a=a.slice(0,-1*e.length));f&&(a=a.split(f).join(""));c&&(a=a.replace(c,"."));m&&(b+="-");b=Number((b+a).replace(/[^0-9\.\-.]/g,""));q&&(b=q(b));return"number"=== -typeof b&&isFinite(b)?b:!1}function x(b){var f,c,d,e={};for(f=0;fd&&(e[c]=d):"encoder"===c||"decoder"===c||"edit"===c||"undo"===c?"function"===typeof d&&(e[c]=d):"string"===typeof d&&(e[c]=d);s(e,"mark","thousand");s(e,"prefix","negative");s(e,"prefix","negativeBefore");return e}function u(b,f,c){var d,e=[];for(d=0;d 0) { - addClass(element, className); - setTimeout(function(){ - removeClass(element, className); - }, duration); - } - } - - // Limits a value to 0 - 100 - function limit ( a ) { - return Math.max(Math.min(a, 100), 0); - } - - // Wraps a variable as an array, if it isn't one yet. - // Note that an input array is returned by reference! - function asArray ( a ) { - return Array.isArray(a) ? a : [a]; - } - - // Counts decimals - function countDecimals ( numStr ) { - numStr = String(numStr); - var pieces = numStr.split("."); - return pieces.length > 1 ? pieces[1].length : 0; - } - - // http://youmightnotneedjquery.com/#add_class - function addClass ( el, className ) { - if ( el.classList ) { - el.classList.add(className); - } else { - el.className += ' ' + className; - } - } - - // http://youmightnotneedjquery.com/#remove_class - function removeClass ( el, className ) { - if ( el.classList ) { - el.classList.remove(className); - } else { - el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); - } - } - - // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/ - function hasClass ( el, className ) { - return el.classList ? el.classList.contains(className) : new RegExp('\\b' + className + '\\b').test(el.className); - } - - // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes - function getPageOffset ( ) { - - var supportPageOffset = window.pageXOffset !== undefined, - isCSS1Compat = ((document.compatMode || "") === "CSS1Compat"), - x = supportPageOffset ? window.pageXOffset : isCSS1Compat ? document.documentElement.scrollLeft : document.body.scrollLeft, - y = supportPageOffset ? window.pageYOffset : isCSS1Compat ? document.documentElement.scrollTop : document.body.scrollTop; - - return { - x: x, - y: y - }; - } - - // we provide a function to compute constants instead - // of accessing window.* as soon as the module needs it - // so that we do not compute anything if not needed - function getActions ( ) { - - // Determine the events to bind. IE11 implements pointerEvents without - // a prefix, which breaks compatibility with the IE10 implementation. - return window.navigator.pointerEnabled ? { - start: 'pointerdown', - move: 'pointermove', - end: 'pointerup' - } : window.navigator.msPointerEnabled ? { - start: 'MSPointerDown', - move: 'MSPointerMove', - end: 'MSPointerUp' - } : { - start: 'mousedown touchstart', - move: 'mousemove touchmove', - end: 'mouseup touchend' - }; - } - - -// Value calculation - - // Determine the size of a sub-range in relation to a full range. - function subRangeRatio ( pa, pb ) { - return (100 / (pb - pa)); - } - - // (percentage) How many percent is this value of this range? - function fromPercentage ( range, value ) { - return (value * 100) / ( range[1] - range[0] ); - } - - // (percentage) Where is this value on this range? - function toPercentage ( range, value ) { - return fromPercentage( range, range[0] < 0 ? - value + Math.abs(range[0]) : - value - range[0] ); - } - - // (value) How much is this percentage on this range? - function isPercentage ( range, value ) { - return ((value * ( range[1] - range[0] )) / 100) + range[0]; - } - - -// Range conversion - - function getJ ( value, arr ) { - - var j = 1; - - while ( value >= arr[j] ){ - j += 1; - } - - return j; - } - - // (percentage) Input a value, find where, on a scale of 0-100, it applies. - function toStepping ( xVal, xPct, value ) { - - if ( value >= xVal.slice(-1)[0] ){ - return 100; - } - - var j = getJ( value, xVal ), va, vb, pa, pb; - - va = xVal[j-1]; - vb = xVal[j]; - pa = xPct[j-1]; - pb = xPct[j]; - - return pa + (toPercentage([va, vb], value) / subRangeRatio (pa, pb)); - } - - // (value) Input a percentage, find where it is on the specified range. - function fromStepping ( xVal, xPct, value ) { - - // There is no range group that fits 100 - if ( value >= 100 ){ - return xVal.slice(-1)[0]; - } - - var j = getJ( value, xPct ), va, vb, pa, pb; - - va = xVal[j-1]; - vb = xVal[j]; - pa = xPct[j-1]; - pb = xPct[j]; - - return isPercentage([va, vb], (value - pa) * subRangeRatio (pa, pb)); - } - - // (percentage) Get the step that applies at a certain value. - function getStep ( xPct, xSteps, snap, value ) { - - if ( value === 100 ) { - return value; - } - - var j = getJ( value, xPct ), a, b; - - // If 'snap' is set, steps are used as fixed points on the slider. - if ( snap ) { - - a = xPct[j-1]; - b = xPct[j]; - - // Find the closest position, a or b. - if ((value - a) > ((b-a)/2)){ - return b; - } - - return a; - } - - if ( !xSteps[j-1] ){ - return value; - } - - return xPct[j-1] + closest( - value - xPct[j-1], - xSteps[j-1] - ); - } - - -// Entry parsing - - function handleEntryPoint ( index, value, that ) { - - var percentage; - - // Wrap numerical input in an array. - if ( typeof value === "number" ) { - value = [value]; - } - - // Reject any invalid input, by testing whether value is an array. - if ( Object.prototype.toString.call( value ) !== '[object Array]' ){ - throw new Error("noUiSlider: 'range' contains invalid value."); - } - - // Covert min/max syntax to 0 and 100. - if ( index === 'min' ) { - percentage = 0; - } else if ( index === 'max' ) { - percentage = 100; - } else { - percentage = parseFloat( index ); - } - - // Check for correct input. - if ( !isNumeric( percentage ) || !isNumeric( value[0] ) ) { - throw new Error("noUiSlider: 'range' value isn't numeric."); - } - - // Store values. - that.xPct.push( percentage ); - that.xVal.push( value[0] ); - - // NaN will evaluate to false too, but to keep - // logging clear, set step explicitly. Make sure - // not to override the 'step' setting with false. - if ( !percentage ) { - if ( !isNaN( value[1] ) ) { - that.xSteps[0] = value[1]; - } - } else { - that.xSteps.push( isNaN(value[1]) ? false : value[1] ); - } - - that.xHighestCompleteStep.push(0); - } - - function handleStepPoint ( i, n, that ) { - - // Ignore 'false' stepping. - if ( !n ) { - return true; - } - - // Factor to range ratio - that.xSteps[i] = fromPercentage([ - that.xVal[i] - ,that.xVal[i+1] - ], n) / subRangeRatio ( - that.xPct[i], - that.xPct[i+1] ); - - var totalSteps = (that.xVal[i+1] - that.xVal[i]) / that.xNumSteps[i]; - var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1); - var step = that.xVal[i] + (that.xNumSteps[i] * highestStep); - - that.xHighestCompleteStep[i] = step; - } - - -// Interface - - // The interface to Spectrum handles all direction-based - // conversions, so the above values are unaware. - - function Spectrum ( entry, snap, direction, singleStep ) { - - this.xPct = []; - this.xVal = []; - this.xSteps = [ singleStep || false ]; - this.xNumSteps = [ false ]; - this.xHighestCompleteStep = []; - - this.snap = snap; - this.direction = direction; - - var index, ordered = [ /* [0, 'min'], [1, '50%'], [2, 'max'] */ ]; - - // Map the object keys to an array. - for ( index in entry ) { - if ( entry.hasOwnProperty(index) ) { - ordered.push([entry[index], index]); - } - } - - // Sort all entries by value (numeric sort). - if ( ordered.length && typeof ordered[0][0] === "object" ) { - ordered.sort(function(a, b) { return a[0][0] - b[0][0]; }); - } else { - ordered.sort(function(a, b) { return a[0] - b[0]; }); - } - - - // Convert all entries to subranges. - for ( index = 0; index < ordered.length; index++ ) { - handleEntryPoint(ordered[index][1], ordered[index][0], this); - } - - // Store the actual step values. - // xSteps is sorted in the same order as xPct and xVal. - this.xNumSteps = this.xSteps.slice(0); - - // Convert all numeric steps to the percentage of the subrange they represent. - for ( index = 0; index < this.xNumSteps.length; index++ ) { - handleStepPoint(index, this.xNumSteps[index], this); - } - } - - Spectrum.prototype.getMargin = function ( value ) { - - var step = this.xNumSteps[0]; - - if ( step && ((value / step) % 1) !== 0 ) { - throw new Error("noUiSlider: 'limit', 'margin' and 'padding' must be divisible by step."); - } - - return this.xPct.length === 2 ? fromPercentage(this.xVal, value) : false; - }; - - Spectrum.prototype.toStepping = function ( value ) { - - value = toStepping( this.xVal, this.xPct, value ); - - return value; - }; - - Spectrum.prototype.fromStepping = function ( value ) { - - return fromStepping( this.xVal, this.xPct, value ); - }; - - Spectrum.prototype.getStep = function ( value ) { - - value = getStep(this.xPct, this.xSteps, this.snap, value ); - - return value; - }; - - Spectrum.prototype.getNearbySteps = function ( value ) { - - var j = getJ(value, this.xPct); - - return { - stepBefore: { startValue: this.xVal[j-2], step: this.xNumSteps[j-2], highestStep: this.xHighestCompleteStep[j-2] }, - thisStep: { startValue: this.xVal[j-1], step: this.xNumSteps[j-1], highestStep: this.xHighestCompleteStep[j-1] }, - stepAfter: { startValue: this.xVal[j-0], step: this.xNumSteps[j-0], highestStep: this.xHighestCompleteStep[j-0] } - }; - }; - - Spectrum.prototype.countStepDecimals = function () { - var stepDecimals = this.xNumSteps.map(countDecimals); - return Math.max.apply(null, stepDecimals); - }; - - // Outside testing - Spectrum.prototype.convert = function ( value ) { - return this.getStep(this.toStepping(value)); - }; - - /* Every input option is tested and parsed. This'll prevent - endless validation in internal methods. These tests are - structured with an item for every option available. An - option can be marked as required by setting the 'r' flag. - The testing function is provided with three arguments: - - The provided value for the option; - - A reference to the options object; - - The name for the option; - - The testing function returns false when an error is detected, - or true when everything is OK. It can also modify the option - object, to make sure all values can be correctly looped elsewhere. */ - - var defaultFormatter = { 'to': function( value ){ - return value !== undefined && value.toFixed(2); - }, 'from': Number }; - - function testStep ( parsed, entry ) { - - if ( !isNumeric( entry ) ) { - throw new Error("noUiSlider: 'step' is not numeric."); - } - - // The step option can still be used to set stepping - // for linear sliders. Overwritten if set in 'range'. - parsed.singleStep = entry; - } - - function testRange ( parsed, entry ) { - - // Filter incorrect input. - if ( typeof entry !== 'object' || Array.isArray(entry) ) { - throw new Error("noUiSlider: 'range' is not an object."); - } - - // Catch missing start or end. - if ( entry.min === undefined || entry.max === undefined ) { - throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'."); - } - - // Catch equal start or end. - if ( entry.min === entry.max ) { - throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal."); - } - - parsed.spectrum = new Spectrum(entry, parsed.snap, parsed.dir, parsed.singleStep); - } - - function testStart ( parsed, entry ) { - - entry = asArray(entry); - - // Validate input. Values aren't tested, as the public .val method - // will always provide a valid location. - if ( !Array.isArray( entry ) || !entry.length ) { - throw new Error("noUiSlider: 'start' option is incorrect."); - } - - // Store the number of handles. - parsed.handles = entry.length; - - // When the slider is initialized, the .val method will - // be called with the start options. - parsed.start = entry; - } - - function testSnap ( parsed, entry ) { - - // Enforce 100% stepping within subranges. - parsed.snap = entry; - - if ( typeof entry !== 'boolean' ){ - throw new Error("noUiSlider: 'snap' option must be a boolean."); - } - } - - function testAnimate ( parsed, entry ) { - - // Enforce 100% stepping within subranges. - parsed.animate = entry; - - if ( typeof entry !== 'boolean' ){ - throw new Error("noUiSlider: 'animate' option must be a boolean."); - } - } - - function testAnimationDuration ( parsed, entry ) { - - parsed.animationDuration = entry; - - if ( typeof entry !== 'number' ){ - throw new Error("noUiSlider: 'animationDuration' option must be a number."); - } - } - - function testConnect ( parsed, entry ) { - - var connect = [false]; - var i; - - // Map legacy options - if ( entry === 'lower' ) { - entry = [true, false]; - } - - else if ( entry === 'upper' ) { - entry = [false, true]; - } - - // Handle boolean options - if ( entry === true || entry === false ) { - - for ( i = 1; i < parsed.handles; i++ ) { - connect.push(entry); - } - - connect.push(false); - } - - // Reject invalid input - else if ( !Array.isArray( entry ) || !entry.length || entry.length !== parsed.handles + 1 ) { - throw new Error("noUiSlider: 'connect' option doesn't match handle count."); - } - - else { - connect = entry; - } - - parsed.connect = connect; - } - - function testOrientation ( parsed, entry ) { - - // Set orientation to an a numerical value for easy - // array selection. - switch ( entry ){ - case 'horizontal': - parsed.ort = 0; - break; - case 'vertical': - parsed.ort = 1; - break; - default: - throw new Error("noUiSlider: 'orientation' option is invalid."); - } - } - - function testMargin ( parsed, entry ) { - - if ( !isNumeric(entry) ){ - throw new Error("noUiSlider: 'margin' option must be numeric."); - } - - // Issue #582 - if ( entry === 0 ) { - return; - } - - parsed.margin = parsed.spectrum.getMargin(entry); - - if ( !parsed.margin ) { - throw new Error("noUiSlider: 'margin' option is only supported on linear sliders."); - } - } - - function testLimit ( parsed, entry ) { - - if ( !isNumeric(entry) ){ - throw new Error("noUiSlider: 'limit' option must be numeric."); - } - - parsed.limit = parsed.spectrum.getMargin(entry); - - if ( !parsed.limit || parsed.handles < 2 ) { - throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles."); - } - } - - function testPadding ( parsed, entry ) { - - if ( !isNumeric(entry) ){ - throw new Error("noUiSlider: 'padding' option must be numeric."); - } - - if ( entry === 0 ) { - return; - } - - parsed.padding = parsed.spectrum.getMargin(entry); - - if ( !parsed.padding ) { - throw new Error("noUiSlider: 'padding' option is only supported on linear sliders."); - } - - if ( parsed.padding < 0 ) { - throw new Error("noUiSlider: 'padding' option must be a positive number."); - } - - if ( parsed.padding >= 50 ) { - throw new Error("noUiSlider: 'padding' option must be less than half the range."); - } - } - - function testDirection ( parsed, entry ) { - - // Set direction as a numerical value for easy parsing. - // Invert connection for RTL sliders, so that the proper - // handles get the connect/background classes. - switch ( entry ) { - case 'ltr': - parsed.dir = 0; - break; - case 'rtl': - parsed.dir = 1; - break; - default: - throw new Error("noUiSlider: 'direction' option was not recognized."); - } - } - - function testBehaviour ( parsed, entry ) { - - // Make sure the input is a string. - if ( typeof entry !== 'string' ) { - throw new Error("noUiSlider: 'behaviour' must be a string containing options."); - } - - // Check if the string contains any keywords. - // None are required. - var tap = entry.indexOf('tap') >= 0; - var drag = entry.indexOf('drag') >= 0; - var fixed = entry.indexOf('fixed') >= 0; - var snap = entry.indexOf('snap') >= 0; - var hover = entry.indexOf('hover') >= 0; - - if ( fixed ) { - - if ( parsed.handles !== 2 ) { - throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles"); - } - - // Use margin to enforce fixed state - testMargin(parsed, parsed.start[1] - parsed.start[0]); - } - - parsed.events = { - tap: tap || snap, - drag: drag, - fixed: fixed, - snap: snap, - hover: hover - }; - } - - function testTooltips ( parsed, entry ) { - - if ( entry === false ) { - return; - } - - else if ( entry === true ) { - - parsed.tooltips = []; - - for ( var i = 0; i < parsed.handles; i++ ) { - parsed.tooltips.push(true); - } - } - - else { - - parsed.tooltips = asArray(entry); - - if ( parsed.tooltips.length !== parsed.handles ) { - throw new Error("noUiSlider: must pass a formatter for all handles."); - } - - parsed.tooltips.forEach(function(formatter){ - if ( typeof formatter !== 'boolean' && (typeof formatter !== 'object' || typeof formatter.to !== 'function') ) { - throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'."); - } - }); - } - } - - function testFormat ( parsed, entry ) { - - parsed.format = entry; - - // Any object with a to and from method is supported. - if ( typeof entry.to === 'function' && typeof entry.from === 'function' ) { - return true; - } - - throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods."); - } - - function testCssPrefix ( parsed, entry ) { - - if ( entry !== undefined && typeof entry !== 'string' && entry !== false ) { - throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`."); - } - - parsed.cssPrefix = entry; - } - - function testCssClasses ( parsed, entry ) { - - if ( entry !== undefined && typeof entry !== 'object' ) { - throw new Error("noUiSlider: 'cssClasses' must be an object."); - } - - if ( typeof parsed.cssPrefix === 'string' ) { - parsed.cssClasses = {}; - - for ( var key in entry ) { - if ( !entry.hasOwnProperty(key) ) { continue; } - - parsed.cssClasses[key] = parsed.cssPrefix + entry[key]; - } - } else { - parsed.cssClasses = entry; - } - } - - function testUseRaf ( parsed, entry ) { - if ( entry === true || entry === false ) { - parsed.useRequestAnimationFrame = entry; - } else { - throw new Error("noUiSlider: 'useRequestAnimationFrame' option should be true (default) or false."); - } - } - - // Test all developer settings and parse to assumption-safe values. - function testOptions ( options ) { - - // To prove a fix for #537, freeze options here. - // If the object is modified, an error will be thrown. - // Object.freeze(options); - - var parsed = { - margin: 0, - limit: 0, - padding: 0, - animate: true, - animationDuration: 300, - format: defaultFormatter - }; - - // Tests are executed in the order they are presented here. - var tests = { - 'step': { r: false, t: testStep }, - 'start': { r: true, t: testStart }, - 'connect': { r: true, t: testConnect }, - 'direction': { r: true, t: testDirection }, - 'snap': { r: false, t: testSnap }, - 'animate': { r: false, t: testAnimate }, - 'animationDuration': { r: false, t: testAnimationDuration }, - 'range': { r: true, t: testRange }, - 'orientation': { r: false, t: testOrientation }, - 'margin': { r: false, t: testMargin }, - 'limit': { r: false, t: testLimit }, - 'padding': { r: false, t: testPadding }, - 'behaviour': { r: true, t: testBehaviour }, - 'format': { r: false, t: testFormat }, - 'tooltips': { r: false, t: testTooltips }, - 'cssPrefix': { r: false, t: testCssPrefix }, - 'cssClasses': { r: false, t: testCssClasses }, - 'useRequestAnimationFrame': { r: false, t: testUseRaf } - }; - - var defaults = { - 'connect': false, - 'direction': 'ltr', - 'behaviour': 'tap', - 'orientation': 'horizontal', - 'cssPrefix' : 'noUi-', - 'cssClasses': { - target: 'target', - base: 'base', - origin: 'origin', - handle: 'handle', - handleTouchArea: 'handle-touch-area', - handleLower: 'handle-lower', - handleUpper: 'handle-upper', - horizontal: 'horizontal', - vertical: 'vertical', - background: 'background', - connect: 'connect', - ltr: 'ltr', - rtl: 'rtl', - draggable: 'draggable', - drag: 'state-drag', - tap: 'state-tap', - active: 'active', - tooltip: 'tooltip', - pips: 'pips', - pipsHorizontal: 'pips-horizontal', - pipsVertical: 'pips-vertical', - marker: 'marker', - markerHorizontal: 'marker-horizontal', - markerVertical: 'marker-vertical', - markerNormal: 'marker-normal', - markerLarge: 'marker-large', - markerSub: 'marker-sub', - value: 'value', - valueHorizontal: 'value-horizontal', - valueVertical: 'value-vertical', - valueNormal: 'value-normal', - valueLarge: 'value-large', - valueSub: 'value-sub' - }, - 'useRequestAnimationFrame': true - }; - - // Run all options through a testing mechanism to ensure correct - // input. It should be noted that options might get modified to - // be handled properly. E.g. wrapping integers in arrays. - Object.keys(tests).forEach(function( name ){ - - // If the option isn't set, but it is required, throw an error. - if ( options[name] === undefined && defaults[name] === undefined ) { - - if ( tests[name].r ) { - throw new Error("noUiSlider: '" + name + "' is required."); - } - - return true; - } - - tests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] ); - }); - - // Forward pips options - parsed.pips = options.pips; - - var styles = [['left', 'top'], ['right', 'bottom']]; - - // Pre-define the styles. - parsed.style = styles[parsed.dir][parsed.ort]; - parsed.styleOposite = styles[parsed.dir?0:1][parsed.ort]; - - return parsed; - } - - - function closure ( target, options, originalOptions ){ - - var actions = getActions( ); - - // All variables local to 'closure' are prefixed with 'scope_' - var scope_Target = target; - var scope_Locations = []; - var scope_Base; - var scope_Handles; - var scope_HandleNumbers = []; - var scope_ActiveHandle = false; - var scope_Connects; - var scope_Spectrum = options.spectrum; - var scope_Values = []; - var scope_Events = {}; - var scope_Self; - - - // Append a origin to the base - function addOrigin ( base, handleNumber ) { - - var origin = addNodeTo(base, options.cssClasses.origin); - var handle = addNodeTo(origin, options.cssClasses.handle); - addNodeTo(handle, options.cssClasses.handleTouchArea); - - handle.setAttribute('data-handle', handleNumber); - - if ( handleNumber === 0 ) { - addClass(handle, options.cssClasses.handleLower); - } - - else if ( handleNumber === options.handles - 1 ) { - addClass(handle, options.cssClasses.handleUpper); - } - - return origin; - } - - // Insert nodes for connect elements - function addConnect ( base, add ) { - - if ( !add ) { - return false; - } - - return addNodeTo(base, options.cssClasses.connect); - } - - // Add handles to the slider base. - function addElements ( connectOptions, base ) { - - scope_Handles = []; - scope_Connects = []; - - scope_Connects.push(addConnect(base, connectOptions[0])); - - // [::::O====O====O====] - // connectOptions = [0, 1, 1, 1] - - for ( var i = 0; i < options.handles; i++ ) { - // Keep a list of all added handles. - scope_Handles.push(addOrigin(base, i)); - scope_HandleNumbers[i] = i; - scope_Connects.push(addConnect(base, connectOptions[i + 1])); - } - } - - // Initialize a single slider. - function addSlider ( target ) { - - // Apply classes and data to the target. - addClass(target, options.cssClasses.target); - - if ( options.dir === 0 ) { - addClass(target, options.cssClasses.ltr); - } else { - addClass(target, options.cssClasses.rtl); - } - - if ( options.ort === 0 ) { - addClass(target, options.cssClasses.horizontal); - } else { - addClass(target, options.cssClasses.vertical); - } - - scope_Base = addNodeTo(target, options.cssClasses.base); - } - - - function addTooltip ( handle, handleNumber ) { - - if ( !options.tooltips[handleNumber] ) { - return false; - } - - return addNodeTo(handle.firstChild, options.cssClasses.tooltip); - } - - // The tooltips option is a shorthand for using the 'update' event. - function tooltips ( ) { - - // Tooltips are added with options.tooltips in original order. - var tips = scope_Handles.map(addTooltip); - - bindEvent('update', function(values, handleNumber, unencoded) { - - if ( !tips[handleNumber] ) { - return; - } - - var formattedValue = values[handleNumber]; - - if ( options.tooltips[handleNumber] !== true ) { - formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]); - } - - tips[handleNumber].innerHTML = '' + formattedValue + ''; - }); - } - - - function getGroup ( mode, values, stepped ) { - - // Use the range. - if ( mode === 'range' || mode === 'steps' ) { - return scope_Spectrum.xVal; - } - - if ( mode === 'count' ) { - - // Divide 0 - 100 in 'count' parts. - var spread = ( 100 / (values-1) ), v, i = 0; - values = []; - - // List these parts and have them handled as 'positions'. - while ((v=i++*spread) <= 100 ) { - values.push(v); - } - - mode = 'positions'; - } - - if ( mode === 'positions' ) { - - // Map all percentages to on-range values. - return values.map(function( value ){ - return scope_Spectrum.fromStepping( stepped ? scope_Spectrum.getStep( value ) : value ); - }); - } - - if ( mode === 'values' ) { - - // If the value must be stepped, it needs to be converted to a percentage first. - if ( stepped ) { - - return values.map(function( value ){ - - // Convert to percentage, apply step, return to value. - return scope_Spectrum.fromStepping( scope_Spectrum.getStep( scope_Spectrum.toStepping( value ) ) ); - }); - - } - - // Otherwise, we can simply use the values. - return values; - } - } - - function generateSpread ( density, mode, group ) { - - function safeIncrement(value, increment) { - // Avoid floating point variance by dropping the smallest decimal places. - return (value + increment).toFixed(7) / 1; - } - - var indexes = {}, - firstInRange = scope_Spectrum.xVal[0], - lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length-1], - ignoreFirst = false, - ignoreLast = false, - prevPct = 0; - - // Create a copy of the group, sort it and filter away all duplicates. - group = unique(group.slice().sort(function(a, b){ return a - b; })); - - // Make sure the range starts with the first element. - if ( group[0] !== firstInRange ) { - group.unshift(firstInRange); - ignoreFirst = true; - } - - // Likewise for the last one. - if ( group[group.length - 1] !== lastInRange ) { - group.push(lastInRange); - ignoreLast = true; - } - - group.forEach(function ( current, index ) { - - // Get the current step and the lower + upper positions. - var step, i, q, - low = current, - high = group[index+1], - newPct, pctDifference, pctPos, type, - steps, realSteps, stepsize; - - // When using 'steps' mode, use the provided steps. - // Otherwise, we'll step on to the next subrange. - if ( mode === 'steps' ) { - step = scope_Spectrum.xNumSteps[ index ]; - } - - // Default to a 'full' step. - if ( !step ) { - step = high-low; - } - - // Low can be 0, so test for false. If high is undefined, - // we are at the last subrange. Index 0 is already handled. - if ( low === false || high === undefined ) { - return; - } - - // Make sure step isn't 0, which would cause an infinite loop (#654) - step = Math.max(step, 0.0000001); - - // Find all steps in the subrange. - for ( i = low; i <= high; i = safeIncrement(i, step) ) { - - // Get the percentage value for the current step, - // calculate the size for the subrange. - newPct = scope_Spectrum.toStepping( i ); - pctDifference = newPct - prevPct; - - steps = pctDifference / density; - realSteps = Math.round(steps); - - // This ratio represents the amount of percentage-space a point indicates. - // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-devided. - // Round the percentage offset to an even number, then divide by two - // to spread the offset on both sides of the range. - stepsize = pctDifference/realSteps; - - // Divide all points evenly, adding the correct number to this subrange. - // Run up to <= so that 100% gets a point, event if ignoreLast is set. - for ( q = 1; q <= realSteps; q += 1 ) { - - // The ratio between the rounded value and the actual size might be ~1% off. - // Correct the percentage offset by the number of points - // per subrange. density = 1 will result in 100 points on the - // full range, 2 for 50, 4 for 25, etc. - pctPos = prevPct + ( q * stepsize ); - indexes[pctPos.toFixed(5)] = ['x', 0]; - } - - // Determine the point type. - type = (group.indexOf(i) > -1) ? 1 : ( mode === 'steps' ? 2 : 0 ); - - // Enforce the 'ignoreFirst' option by overwriting the type for 0. - if ( !index && ignoreFirst ) { - type = 0; - } - - if ( !(i === high && ignoreLast)) { - // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value. - indexes[newPct.toFixed(5)] = [i, type]; - } - - // Update the percentage count. - prevPct = newPct; - } - }); - - return indexes; - } - - function addMarking ( spread, filterFunc, formatter ) { - - var element = document.createElement('div'), - out = '', - valueSizeClasses = [ - options.cssClasses.valueNormal, - options.cssClasses.valueLarge, - options.cssClasses.valueSub - ], - markerSizeClasses = [ - options.cssClasses.markerNormal, - options.cssClasses.markerLarge, - options.cssClasses.markerSub - ], - valueOrientationClasses = [ - options.cssClasses.valueHorizontal, - options.cssClasses.valueVertical - ], - markerOrientationClasses = [ - options.cssClasses.markerHorizontal, - options.cssClasses.markerVertical - ]; - - addClass(element, options.cssClasses.pips); - addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical); - - function getClasses( type, source ){ - var a = source === options.cssClasses.value, - orientationClasses = a ? valueOrientationClasses : markerOrientationClasses, - sizeClasses = a ? valueSizeClasses : markerSizeClasses; - - return source + ' ' + orientationClasses[options.ort] + ' ' + sizeClasses[type]; - } - - function getTags( offset, source, values ) { - return 'class="' + getClasses(values[1], source) + '" style="' + options.style + ': ' + offset + '%"'; - } - - function addSpread ( offset, values ){ - - // Apply the filter function, if it is set. - values[1] = (values[1] && filterFunc) ? filterFunc(values[0], values[1]) : values[1]; - - // Add a marker for every point - out += '
    '; - - // Values are only appended for points marked '1' or '2'. - if ( values[1] ) { - out += '
    ' + formatter.to(values[0]) + '
    '; - } - } - - // Append all points. - Object.keys(spread).forEach(function(a){ - addSpread(a, spread[a]); - }); - - element.innerHTML = out; - - return element; - } - - function pips ( grid ) { - - var mode = grid.mode, - density = grid.density || 1, - filter = grid.filter || false, - values = grid.values || false, - stepped = grid.stepped || false, - group = getGroup( mode, values, stepped ), - spread = generateSpread( density, mode, group ), - format = grid.format || { - to: Math.round - }; - - return scope_Target.appendChild(addMarking( - spread, - filter, - format - )); - } - - - // Shorthand for base dimensions. - function baseSize ( ) { - var rect = scope_Base.getBoundingClientRect(), alt = 'offset' + ['Width', 'Height'][options.ort]; - return options.ort === 0 ? (rect.width||scope_Base[alt]) : (rect.height||scope_Base[alt]); - } - - // Handler for attaching events trough a proxy. - function attachEvent ( events, element, callback, data ) { - - // This function can be used to 'filter' events to the slider. - // element is a node, not a nodeList - - var method = function ( e ){ - - if ( scope_Target.hasAttribute('disabled') ) { - return false; - } - - // Stop if an active 'tap' transition is taking place. - if ( hasClass(scope_Target, options.cssClasses.tap) ) { - return false; - } - - e = fixEvent(e, data.pageOffset); - - // Handle reject of multitouch - if ( !e ) { - return false; - } - - // Ignore right or middle clicks on start #454 - if ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) { - return false; - } - - // Ignore right or middle clicks on start #454 - if ( data.hover && e.buttons ) { - return false; - } - - e.calcPoint = e.points[ options.ort ]; - - // Call the event handler with the event [ and additional data ]. - callback ( e, data ); - }; - - var methods = []; - - // Bind a closure on the target for every event type. - events.split(' ').forEach(function( eventName ){ - element.addEventListener(eventName, method, false); - methods.push([eventName, method]); - }); - - return methods; - } - - // Provide a clean event with standardized offset values. - function fixEvent ( e, pageOffset ) { - - // Prevent scrolling and panning on touch events, while - // attempting to slide. The tap event also depends on this. - e.preventDefault(); - - // Filter the event to register the type, which can be - // touch, mouse or pointer. Offset changes need to be - // made on an event specific basis. - var touch = e.type.indexOf('touch') === 0; - var mouse = e.type.indexOf('mouse') === 0; - var pointer = e.type.indexOf('pointer') === 0; - var x; - var y; - - // IE10 implemented pointer events with a prefix; - if ( e.type.indexOf('MSPointer') === 0 ) { - pointer = true; - } - - if ( touch ) { - - // Fix bug when user touches with two or more fingers on mobile devices. - // It's useful when you have two or more sliders on one page, - // that can be touched simultaneously. - // #649, #663, #668 - if ( e.touches.length > 1 ) { - return false; - } - - // noUiSlider supports one movement at a time, - // so we can select the first 'changedTouch'. - x = e.changedTouches[0].pageX; - y = e.changedTouches[0].pageY; - } - - pageOffset = pageOffset || getPageOffset(); - - if ( mouse || pointer ) { - x = e.clientX + pageOffset.x; - y = e.clientY + pageOffset.y; - } - - e.pageOffset = pageOffset; - e.points = [x, y]; - e.cursor = mouse || pointer; // Fix #435 - - return e; - } - - // Translate a coordinate in the document to a percentage on the slider - function calcPointToPercentage ( calcPoint ) { - var location = calcPoint - offset(scope_Base, options.ort); - var proposal = ( location * 100 ) / baseSize(); - return options.dir ? 100 - proposal : proposal; - } - - // Find handle closest to a certain percentage on the slider - function getClosestHandle ( proposal ) { - - var closest = 100; - var handleNumber = false; - - scope_Handles.forEach(function(handle, index){ - - // Disabled handles are ignored - if ( handle.hasAttribute('disabled') ) { - return; - } - - var pos = Math.abs(scope_Locations[index] - proposal); - - if ( pos < closest ) { - handleNumber = index; - closest = pos; - } - }); - - return handleNumber; - } - - // Moves handle(s) by a percentage - // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...]) - function moveHandles ( upward, proposal, locations, handleNumbers ) { - - var proposals = locations.slice(); - - var b = [!upward, upward]; - var f = [upward, !upward]; - - // Copy handleNumbers so we don't change the dataset - handleNumbers = handleNumbers.slice(); - - // Check to see which handle is 'leading'. - // If that one can't move the second can't either. - if ( upward ) { - handleNumbers.reverse(); - } - - // Step 1: get the maximum percentage that any of the handles can move - if ( handleNumbers.length > 1 ) { - - handleNumbers.forEach(function(handleNumber, o) { - - var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o]); - - // Stop if one of the handles can't move. - if ( to === false ) { - proposal = 0; - } else { - proposal = to - proposals[handleNumber]; - proposals[handleNumber] = to; - } - }); - } - - // If using one handle, check backward AND forward - else { - b = f = [true]; - } - - var state = false; - - // Step 2: Try to set the handles with the found percentage - handleNumbers.forEach(function(handleNumber, o) { - state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state; - }); - - // Step 3: If a handle moved, fire events - if ( state ) { - handleNumbers.forEach(function(handleNumber){ - fireEvent('update', handleNumber); - fireEvent('slide', handleNumber); - }); - } - } - - // External event handling - function fireEvent ( eventName, handleNumber, tap ) { - - Object.keys(scope_Events).forEach(function( targetEvent ) { - - var eventType = targetEvent.split('.')[0]; - - if ( eventName === eventType ) { - scope_Events[targetEvent].forEach(function( callback ) { - - callback.call( - // Use the slider public API as the scope ('this') - scope_Self, - // Return values as array, so arg_1[arg_2] is always valid. - scope_Values.map(options.format.to), - // Handle index, 0 or 1 - handleNumber, - // Unformatted slider values - scope_Values.slice(), - // Event is fired by tap, true or false - tap || false, - // Left offset of the handle, in relation to the slider - scope_Locations.slice() - ); - }); - } - }); - } - - - // Fire 'end' when a mouse or pen leaves the document. - function documentLeave ( event, data ) { - if ( event.type === "mouseout" && event.target.nodeName === "HTML" && event.relatedTarget === null ){ - eventEnd (event, data); - } - } - - // Handle movement on document for handle and range drag. - function eventMove ( event, data ) { - - // Fix #498 - // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty). - // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero - // IE9 has .buttons and .which zero on mousemove. - // Firefox breaks the spec MDN defines. - if ( navigator.appVersion.indexOf("MSIE 9") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) { - return eventEnd(event, data); - } - - // Check if we are moving up or down - var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint); - - // Convert the movement into a percentage of the slider width/height - var proposal = (movement * 100) / data.baseSize; - - moveHandles(movement > 0, proposal, data.locations, data.handleNumbers); - } - - // Unbind move events on document, call callbacks. - function eventEnd ( event, data ) { - - // The handle is no longer active, so remove the class. - if ( scope_ActiveHandle ) { - removeClass(scope_ActiveHandle, options.cssClasses.active); - scope_ActiveHandle = false; - } - - // Remove cursor styles and text-selection events bound to the body. - if ( event.cursor ) { - document.body.style.cursor = ''; - document.body.removeEventListener('selectstart', document.body.noUiListener); - } - - // Unbind the move and end events, which are added on 'start'. - document.documentElement.noUiListeners.forEach(function( c ) { - document.documentElement.removeEventListener(c[0], c[1]); - }); - - // Remove dragging class. - removeClass(scope_Target, options.cssClasses.drag); - - setZindex(); - - data.handleNumbers.forEach(function(handleNumber){ - fireEvent('set', handleNumber); - fireEvent('change', handleNumber); - fireEvent('end', handleNumber); - }); - } - - // Bind move events on document. - function eventStart ( event, data ) { - - if ( data.handleNumbers.length === 1 ) { - - var handle = scope_Handles[data.handleNumbers[0]]; - - // Ignore 'disabled' handles - if ( handle.hasAttribute('disabled') ) { - return false; - } - - // Mark the handle as 'active' so it can be styled. - scope_ActiveHandle = handle.children[0]; - addClass(scope_ActiveHandle, options.cssClasses.active); - } - - // Fix #551, where a handle gets selected instead of dragged. - event.preventDefault(); - - // A drag should never propagate up to the 'tap' event. - event.stopPropagation(); - - // Attach the move and end events. - var moveEvent = attachEvent(actions.move, document.documentElement, eventMove, { - startCalcPoint: event.calcPoint, - baseSize: baseSize(), - pageOffset: event.pageOffset, - handleNumbers: data.handleNumbers, - buttonsProperty: event.buttons, - locations: scope_Locations.slice() - }); - - var endEvent = attachEvent(actions.end, document.documentElement, eventEnd, { - handleNumbers: data.handleNumbers - }); - - var outEvent = attachEvent("mouseout", document.documentElement, documentLeave, { - handleNumbers: data.handleNumbers - }); - - document.documentElement.noUiListeners = moveEvent.concat(endEvent, outEvent); - - // Text selection isn't an issue on touch devices, - // so adding cursor styles can be skipped. - if ( event.cursor ) { - - // Prevent the 'I' cursor and extend the range-drag cursor. - document.body.style.cursor = getComputedStyle(event.target).cursor; - - // Mark the target with a dragging state. - if ( scope_Handles.length > 1 ) { - addClass(scope_Target, options.cssClasses.drag); - } - - var f = function(){ - return false; - }; - - document.body.noUiListener = f; - - // Prevent text selection when dragging the handles. - document.body.addEventListener('selectstart', f, false); - } - - data.handleNumbers.forEach(function(handleNumber){ - fireEvent('start', handleNumber); - }); - } - - // Move closest handle to tapped location. - function eventTap ( event ) { - - // The tap event shouldn't propagate up - event.stopPropagation(); - - var proposal = calcPointToPercentage(event.calcPoint); - var handleNumber = getClosestHandle(proposal); - - // Tackle the case that all handles are 'disabled'. - if ( handleNumber === false ) { - return false; - } - - // Flag the slider as it is now in a transitional state. - // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that. - if ( !options.events.snap ) { - addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration); - } - - setHandle(handleNumber, proposal, true, true); - - setZindex(); - - fireEvent('slide', handleNumber, true); - fireEvent('set', handleNumber, true); - fireEvent('change', handleNumber, true); - fireEvent('update', handleNumber, true); - - if ( options.events.snap ) { - eventStart(event, { handleNumbers: [handleNumber] }); - } - } - - // Fires a 'hover' event for a hovered mouse/pen position. - function eventHover ( event ) { - - var proposal = calcPointToPercentage(event.calcPoint); - - var to = scope_Spectrum.getStep(proposal); - var value = scope_Spectrum.fromStepping(to); - - Object.keys(scope_Events).forEach(function( targetEvent ) { - if ( 'hover' === targetEvent.split('.')[0] ) { - scope_Events[targetEvent].forEach(function( callback ) { - callback.call( scope_Self, value ); - }); - } - }); - } - - // Attach events to several slider parts. - function bindSliderEvents ( behaviour ) { - - // Attach the standard drag event to the handles. - if ( !behaviour.fixed ) { - - scope_Handles.forEach(function( handle, index ){ - - // These events are only bound to the visual handle - // element, not the 'real' origin element. - attachEvent ( actions.start, handle.children[0], eventStart, { - handleNumbers: [index] - }); - }); - } - - // Attach the tap event to the slider base. - if ( behaviour.tap ) { - attachEvent (actions.start, scope_Base, eventTap, {}); - } - - // Fire hover events - if ( behaviour.hover ) { - attachEvent (actions.move, scope_Base, eventHover, { hover: true }); - } - - // Make the range draggable. - if ( behaviour.drag ){ - - scope_Connects.forEach(function( connect, index ){ - - if ( connect === false || index === 0 || index === scope_Connects.length - 1 ) { - return; - } - - var handleBefore = scope_Handles[index - 1]; - var handleAfter = scope_Handles[index]; - var eventHolders = [connect]; - - addClass(connect, options.cssClasses.draggable); - - // When the range is fixed, the entire range can - // be dragged by the handles. The handle in the first - // origin will propagate the start event upward, - // but it needs to be bound manually on the other. - if ( behaviour.fixed ) { - eventHolders.push(handleBefore.children[0]); - eventHolders.push(handleAfter.children[0]); - } - - eventHolders.forEach(function( eventHolder ) { - attachEvent ( actions.start, eventHolder, eventStart, { - handles: [handleBefore, handleAfter], - handleNumbers: [index - 1, index] - }); - }); - }); - } - } - - - // Split out the handle positioning logic so the Move event can use it, too - function checkHandlePosition ( reference, handleNumber, to, lookBackward, lookForward ) { - - // For sliders with multiple handles, limit movement to the other handle. - // Apply the margin option by adding it to the handle positions. - if ( scope_Handles.length > 1 ) { - - if ( lookBackward && handleNumber > 0 ) { - to = Math.max(to, reference[handleNumber - 1] + options.margin); - } - - if ( lookForward && handleNumber < scope_Handles.length - 1 ) { - to = Math.min(to, reference[handleNumber + 1] - options.margin); - } - } - - // The limit option has the opposite effect, limiting handles to a - // maximum distance from another. Limit must be > 0, as otherwise - // handles would be unmoveable. - if ( scope_Handles.length > 1 && options.limit ) { - - if ( lookBackward && handleNumber > 0 ) { - to = Math.min(to, reference[handleNumber - 1] + options.limit); - } - - if ( lookForward && handleNumber < scope_Handles.length - 1 ) { - to = Math.max(to, reference[handleNumber + 1] - options.limit); - } - } - - // The padding option keeps the handles a certain distance from the - // edges of the slider. Padding must be > 0. - if ( options.padding ) { - - if ( handleNumber === 0 ) { - to = Math.max(to, options.padding); - } - - if ( handleNumber === scope_Handles.length - 1 ) { - to = Math.min(to, 100 - options.padding); - } - } - - to = scope_Spectrum.getStep(to); - - // Limit percentage to the 0 - 100 range - to = limit(to); - - // Return false if handle can't move - if ( to === reference[handleNumber] ) { - return false; - } - - return to; - } - - function toPct ( pct ) { - return pct + '%'; - } - - // Updates scope_Locations and scope_Values, updates visual state - function updateHandlePosition ( handleNumber, to ) { - - // Update locations. - scope_Locations[handleNumber] = to; - - // Convert the value to the slider stepping/range. - scope_Values[handleNumber] = scope_Spectrum.fromStepping(to); - - // Called synchronously or on the next animationFrame - var stateUpdate = function() { - scope_Handles[handleNumber].style[options.style] = toPct(to); - updateConnect(handleNumber); - updateConnect(handleNumber + 1); - }; - - // Set the handle to the new position. - // Use requestAnimationFrame for efficient painting. - // No significant effect in Chrome, Edge sees dramatic performance improvements. - // Option to disable is useful for unit tests, and single-step debugging. - if ( window.requestAnimationFrame && options.useRequestAnimationFrame ) { - window.requestAnimationFrame(stateUpdate); - } else { - stateUpdate(); - } - } - - function setZindex ( ) { - - scope_HandleNumbers.forEach(function(handleNumber){ - // Handles before the slider middle are stacked later = higher, - // Handles after the middle later is lower - // [[7] [8] .......... | .......... [5] [4] - var dir = (scope_Locations[handleNumber] > 50 ? -1 : 1); - var zIndex = 3 + (scope_Handles.length + (dir * handleNumber)); - scope_Handles[handleNumber].childNodes[0].style.zIndex = zIndex; - }); - } - - // Test suggested values and apply margin, step. - function setHandle ( handleNumber, to, lookBackward, lookForward ) { - - to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward); - - if ( to === false ) { - return false; - } - - updateHandlePosition(handleNumber, to); - - return true; - } - - // Updates style attribute for connect nodes - function updateConnect ( index ) { - - // Skip connects set to false - if ( !scope_Connects[index] ) { - return; - } - - var l = 0; - var h = 100; - - if ( index !== 0 ) { - l = scope_Locations[index - 1]; - } - - if ( index !== scope_Connects.length - 1 ) { - h = scope_Locations[index]; - } - - scope_Connects[index].style[options.style] = toPct(l); - scope_Connects[index].style[options.styleOposite] = toPct(100 - h); - } - - // ... - function setValue ( to, handleNumber ) { - - // Setting with null indicates an 'ignore'. - // Inputting 'false' is invalid. - if ( to === null || to === false ) { - return; - } - - // If a formatted number was passed, attempt to decode it. - if ( typeof to === 'number' ) { - to = String(to); - } - - to = options.format.from(to); - - // Request an update for all links if the value was invalid. - // Do so too if setting the handle fails. - if ( to !== false && !isNaN(to) ) { - setHandle(handleNumber, scope_Spectrum.toStepping(to), false, false); - } - } - - // Set the slider value. - function valueSet ( input, fireSetEvent ) { - - var values = asArray(input); - var isInit = scope_Locations[0] === undefined; - - // Event fires by default - fireSetEvent = (fireSetEvent === undefined ? true : !!fireSetEvent); - - values.forEach(setValue); - - // Animation is optional. - // Make sure the initial values were set before using animated placement. - if ( options.animate && !isInit ) { - addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration); - } - - // Now that all base values are set, apply constraints - scope_HandleNumbers.forEach(function(handleNumber){ - setHandle(handleNumber, scope_Locations[handleNumber], true, false); - }); - - setZindex(); - - scope_HandleNumbers.forEach(function(handleNumber){ - - fireEvent('update', handleNumber); - - // Fire the event only for handles that received a new value, as per #579 - if ( values[handleNumber] !== null && fireSetEvent ) { - fireEvent('set', handleNumber); - } - }); - } - - // Reset slider to initial values - function valueReset ( fireSetEvent ) { - valueSet(options.start, fireSetEvent); - } - - // Get the slider value. - function valueGet ( ) { - - var values = scope_Values.map(options.format.to); - - // If only one handle is used, return a single value. - if ( values.length === 1 ){ - return values[0]; - } - - return values; - } - - // Removes classes from the root and empties it. - function destroy ( ) { - - for ( var key in options.cssClasses ) { - if ( !options.cssClasses.hasOwnProperty(key) ) { continue; } - removeClass(scope_Target, options.cssClasses[key]); - } - - while (scope_Target.firstChild) { - scope_Target.removeChild(scope_Target.firstChild); - } - - delete scope_Target.noUiSlider; - } - - // Get the current step size for the slider. - function getCurrentStep ( ) { - - // Check all locations, map them to their stepping point. - // Get the step point, then find it in the input list. - return scope_Locations.map(function( location, index ){ - - var nearbySteps = scope_Spectrum.getNearbySteps( location ); - var value = scope_Values[index]; - var increment = nearbySteps.thisStep.step; - var decrement = null; - - // If the next value in this step moves into the next step, - // the increment is the start of the next step - the current value - if ( increment !== false ) { - if ( value + increment > nearbySteps.stepAfter.startValue ) { - increment = nearbySteps.stepAfter.startValue - value; - } - } - - - // If the value is beyond the starting point - if ( value > nearbySteps.thisStep.startValue ) { - decrement = nearbySteps.thisStep.step; - } - - else if ( nearbySteps.stepBefore.step === false ) { - decrement = false; - } - - // If a handle is at the start of a step, it always steps back into the previous step first - else { - decrement = value - nearbySteps.stepBefore.highestStep; - } - - - // Now, if at the slider edges, there is not in/decrement - if ( location === 100 ) { - increment = null; - } - - else if ( location === 0 ) { - decrement = null; - } - - // As per #391, the comparison for the decrement step can have some rounding issues. - var stepDecimals = scope_Spectrum.countStepDecimals(); - - // Round per #391 - if ( increment !== null && increment !== false ) { - increment = Number(increment.toFixed(stepDecimals)); - } - - if ( decrement !== null && decrement !== false ) { - decrement = Number(decrement.toFixed(stepDecimals)); - } - - return [decrement, increment]; - }); - } - - // Attach an event to this slider, possibly including a namespace - function bindEvent ( namespacedEvent, callback ) { - scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || []; - scope_Events[namespacedEvent].push(callback); - - // If the event bound is 'update,' fire it immediately for all handles. - if ( namespacedEvent.split('.')[0] === 'update' ) { - scope_Handles.forEach(function(a, index){ - fireEvent('update', index); - }); - } - } - - // Undo attachment of event - function removeEvent ( namespacedEvent ) { - - var event = namespacedEvent && namespacedEvent.split('.')[0]; - var namespace = event && namespacedEvent.substring(event.length); - - Object.keys(scope_Events).forEach(function( bind ){ - - var tEvent = bind.split('.')[0], - tNamespace = bind.substring(tEvent.length); - - if ( (!event || event === tEvent) && (!namespace || namespace === tNamespace) ) { - delete scope_Events[bind]; - } - }); - } - - // Updateable: margin, limit, padding, step, range, animate, snap - function updateOptions ( optionsToUpdate, fireSetEvent ) { - - // Spectrum is created using the range, snap, direction and step options. - // 'snap' and 'step' can be updated, 'direction' cannot, due to event binding. - // If 'snap' and 'step' are not passed, they should remain unchanged. - var v = valueGet(); - - var updateAble = ['margin', 'limit', 'padding', 'range', 'animate', 'snap', 'step', 'format']; - - // Only change options that we're actually passed to update. - updateAble.forEach(function(name){ - if ( optionsToUpdate[name] !== undefined ) { - originalOptions[name] = optionsToUpdate[name]; - } - }); - - var newOptions = testOptions(originalOptions); - - // Load new options into the slider state - updateAble.forEach(function(name){ - if ( optionsToUpdate[name] !== undefined ) { - options[name] = newOptions[name]; - } - }); - - // Save current spectrum direction as testOptions in testRange call - // doesn't rely on current direction - newOptions.spectrum.direction = scope_Spectrum.direction; - scope_Spectrum = newOptions.spectrum; - - // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677) - options.margin = newOptions.margin; - options.limit = newOptions.limit; - options.padding = newOptions.padding; - - // Invalidate the current positioning so valueSet forces an update. - scope_Locations = []; - valueSet(optionsToUpdate.start || v, fireSetEvent); - } - - // Throw an error if the slider was already initialized. - if ( scope_Target.noUiSlider ) { - throw new Error('Slider was already initialized.'); - } - - // Create the base element, initialise HTML and set classes. - // Add handles and connect elements. - addSlider(scope_Target); - addElements(options.connect, scope_Base); - - scope_Self = { - destroy: destroy, - steps: getCurrentStep, - on: bindEvent, - off: removeEvent, - get: valueGet, - set: valueSet, - reset: valueReset, - // Exposed for unit testing, don't use this in your application. - __moveHandles: function(a, b, c) { moveHandles(a, b, scope_Locations, c); }, - options: originalOptions, // Issue #600, #678 - updateOptions: updateOptions, - target: scope_Target, // Issue #597 - pips: pips // Issue #594 - }; - - // Attach user events. - bindSliderEvents(options.events); - - // Use the public value method to set the start values. - valueSet(options.start); - - if ( options.pips ) { - pips(options.pips); - } - - if ( options.tooltips ) { - tooltips(); - } - - return scope_Self; - - } - - - // Run the standard initializer - function initialize ( target, originalOptions ) { - - if ( !target.nodeName ) { - throw new Error('noUiSlider.create requires a single element.'); - } - - if (originalOptions.tooltips === undefined) { - originalOptions.tooltips = true; - } - - // Test the options and create the slider environment; - var options = testOptions( originalOptions, target ); - var api = closure( target, options, originalOptions ); - - target.noUiSlider = api; - - return api; - } - - // Use an object instead of a function for future expansibility; - return { - create: initialize - }; - -})); diff --git a/extras/noUiSlider/nouislider.min.js b/extras/noUiSlider/nouislider.min.js deleted file mode 100644 index a8b5ee708e..0000000000 --- a/extras/noUiSlider/nouislider.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){function h(t){return t.split("").reverse().join("")}function o(t,e,n){if((t[e]||t[n])&&t[e]===t[n])throw Error(e)}function n(t,e,n,r,i,o,s,a,l,u,c,p){s=p;var f,d=c="";return o&&(p=o(p)),!("number"!=typeof p||!isFinite(p))&&(t&&0===parseFloat(p.toFixed(t))&&(p=0),p<0&&(f=!0,p=Math.abs(p)),t&&(o=Math.pow(10,t),p=(Math.round(p*o)/o).toFixed(t)),-1!==(p=p.toString()).indexOf(".")&&(p=(t=p.split("."))[0],n&&(c=n+t[1])),e&&(p=h((p=h(p).match(/.{1,3}/g)).join(h(e)))),f&&a&&(d+=a),r&&(d+=r),f&&l&&(d+=l),d=d+p+c,i&&(d+=i),u&&(d=u(d,s)),d)}function r(t,e,n,r,i,o,s,a,l,u,c,p){var f;return t="",c&&(p=c(p)),!(!p||"string"!=typeof p)&&(a&&p.substring(0,a.length)===a&&(p=p.replace(a,""),f=!0),r&&p.substring(0,r.length)===r&&(p=p.replace(r,"")),l&&p.substring(0,l.length)===l&&(p=p.replace(l,""),f=!0),i&&p.slice(-1*i.length)===i&&(p=p.slice(0,-1*i.length)),e&&(p=p.split(e).join("")),n&&(p=p.replace(n,".")),f&&(t+="-"),t=Number((t+p).replace(/[^0-9\.\-.]/g,"")),s&&(t=s(t)),!("number"!=typeof t||!isFinite(t))&&t)}function i(t,e,n){var r,i=[];for(r=0;r=e[n];)n+=1;return n}function n(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,s,a,l,u=f(n,t);return r=t[u-1],i=t[u],o=e[u-1],s=e[u],o+(l=n,p(a=[r,i],a[0]<0?l+Math.abs(a[0]):l-a[0])/c(o,s))}function r(t,e,n,r){if(100===r)return r;var i,o,s,a,l=f(r,t);return n?(i=t[l-1],((o=t[l])-i)/2
    ",n[1]&&(s+="
    "+o.to(n[0])+"
    ")}),t.innerHTML=s,t}function r(t){var d,h,m,g,e,n,v,b,w,r=t.mode,i=t.density||1,o=t.filter||!1,s=function(t,e,n){if("range"===t||"steps"===t)return x.xVal;if("count"===t){var r,i=100/(e-1),o=0;for(e=[];(r=o++*i)<=100;)e.push(r);t="positions"}return"positions"===t?e.map(function(t){return x.fromStepping(n?x.getStep(t):t)}):"values"===t?n?e.map(function(t){return x.fromStepping(x.getStep(x.toStepping(t)))}):e:void 0}(r,t.values||!1,t.stepped||!1),a=(d=i,h=r,m=s,g={},e=x.xVal[0],n=x.xVal[x.xVal.length-1],b=v=!1,w=0,(m=m.slice().sort(function(t,e){return t-e}).filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==e&&(m.unshift(e),v=!0),m[m.length-1]!==n&&(m.push(n),b=!0),m.forEach(function(t,e){var n,r,i,o,s,a,l,u,c,p=t,f=m[e+1];if("steps"===h&&(n=x.xNumSteps[e]),n||(n=f-p),!1!==p&&void 0!==f)for(n=Math.max(n,1e-7),r=p;r<=f;r=(r+n).toFixed(7)/1){for(l=(s=(o=x.toStepping(r))-w)/d,c=s/(u=Math.round(l)),i=1;i<=u;i+=1)g[(w+i*c).toFixed(5)]=["x",0];a=-1n.stepAfter.startValue&&(i=n.stepAfter.startValue-r),o=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===t?i=null:0===t&&(o=null);var s=x.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]})},on:R,off:function(t){var r=t&&t.split(".")[0],i=r&&t.substring(r.length);Object.keys(v).forEach(function(t){var e=t.split(".")[0],n=t.substring(e.length);r&&r!==e||i&&i!==n||delete v[t]})},get:q,set:T,reset:function(t){T(f.start,t)},__moveHandles:function(t,e,n){N(t,e,d,n)},options:o,updateOptions:function(e,t){var n=q(),r=["margin","limit","padding","range","animate","snap","step","format"];r.forEach(function(t){void 0!==e[t]&&(o[t]=e[t])});var i=$(o);r.forEach(function(t){void 0!==e[t]&&(f[t]=i[t])}),i.spectrum.direction=x.direction,x=i.spectrum,f.margin=i.margin,f.limit=i.limit,f.padding=i.padding,d=[],T(e.start||n,t)},target:S,pips:r},(c=f.events).fixed||l.forEach(function(t,e){E(p.start,t.children[0],O,{handleNumbers:[e]})}),c.tap&&E(p.start,a,V,{}),c.hover&&E(p.move,a,A,{hover:!0}),c.drag&&s.forEach(function(t,e){if(!1!==t&&0!==e&&e!==s.length-1){var n=l[e-1],r=l[e],i=[t];I(t,f.cssClasses.draggable),c.fixed&&(i.push(n.children[0]),i.push(r.children[0])),i.forEach(function(t){E(p.start,t,O,{handles:[n,r],handleNumbers:[e-1,e]})})}}),T(f.start),f.pips&&r(f.pips),f.tooltips&&(i=l.map(n),R("update",function(t,e,n){if(i[e]){var r=t[e];!0!==f.tooltips[e]&&(r=f.tooltips[e].to(n[e])),i[e].innerHTML=""+r+""}})),u}return{create:function(t,e){if(!t.nodeName)throw new Error("noUiSlider.create requires a single element.");void 0===e.tooltips&&(e.tooltips=!0);var n=O(t,$(e),e);return t.noUiSlider=n}}}); \ No newline at end of file diff --git a/js/anime.min.js b/js/anime.min.js deleted file mode 100644 index fb57858465..0000000000 --- a/js/anime.min.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - v2.2.0 - 2017 Julian Garnier - Released under the MIT license -*/ -var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,r,p){if(p.get||p.set)throw new TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[r]=p.value)};$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_"; -$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(e){return $jscomp.SYMBOL_PREFIX+(e||"")+$jscomp.symbolCounter_++}; -$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var e=$jscomp.global.Symbol.iterator;e||(e=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[e]&&$jscomp.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(e){var r=0;return $jscomp.iteratorPrototype(function(){return rb&&(b+=1);1b?c:b<2/3?a+(c-a)*(2/3-b)*6:a}var d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a=parseInt(d[1])/360;var b=parseInt(d[2])/100,f=parseInt(d[3])/100,d=d[4]||1;if(0==b)f=b=a=f;else{var n=.5>f?f*(1+b):f+b-f*b,k=2*f-n,f=c(k,n,a+1/3),b=c(k,n,a);a=c(k,n,a-1/3)}return"rgba("+ -255*f+","+255*b+","+255*a+","+d+")"}function y(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a))return a[2]}function V(a){if(-1=g.currentTime)for(var G=0;G=w||!k)g.began||(g.began=!0,f("begin")),f("run");if(q>n&&q=k&&r!==k||!k)b(k),x||e();f("update");a>=k&&(g.remaining?(t=h,"alternate"===g.direction&&(g.reversed=!g.reversed)):(g.pause(),g.completed||(g.completed=!0,f("complete"),"Promise"in window&&(p(),m=c()))),l=0)}a=void 0===a?{}:a;var h,t,l=0,p=null,m=c(),g=fa(a);g.reset=function(){var a=g.direction,c=g.loop;g.currentTime= -0;g.progress=0;g.paused=!0;g.began=!1;g.completed=!1;g.reversed="reverse"===a;g.remaining="alternate"===a&&1===c?2:c;b(0);for(a=g.children.length;a--;)g.children[a].reset()};g.tick=function(a){h=a;t||(t=h);k((l+h-t)*q.speed)};g.seek=function(a){k(d(a))};g.pause=function(){var a=v.indexOf(g);-1=c&&0<=b&&1>=b){var e=new Float32Array(11);if(c!==d||b!==f)for(var k=0;11>k;++k)e[k]=a(.1*k,c,b);return function(k){if(c===d&&b===f)return k;if(0===k)return 0;if(1===k)return 1;for(var h=0,l=1;10!==l&&e[l]<=k;++l)h+=.1;--l;var l=h+(k-e[l])/(e[l+1]-e[l])*.1,n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(.001<=n){for(h=0;4>h;++h){n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(0===n)break;var m=a(l,c,b)-k,l=l-m/n}k=l}else if(0=== -n)k=l;else{var l=h,h=h+.1,g=0;do m=l+(h-l)/2,n=a(m,c,b)-k,0++g);k=m}return a(k,d,f)}}}}(),Q=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var c="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],a],Out:[[.25, -.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},b={linear:A(.25,.25,.75,.75)},f={},e;for(e in d)f.type=e,d[f.type].forEach(function(a){return function(d,f){b["ease"+a.type+c[f]]=h.fnc(d)? -d:A.apply($jscomp$this,d)}}(f)),f={type:f.type};return b}(),ha={css:function(a,c,d){return a.style[c]=d},attribute:function(a,c,d){return a.setAttribute(c,d)},object:function(a,c,d){return a[c]=d},transform:function(a,c,d,b,f){b[f]||(b[f]=[]);b[f].push(c+"("+d+")")}},v=[],B=0,ia=function(){function a(){B=requestAnimationFrame(c)}function c(c){var b=v.length;if(b){for(var d=0;db&&(c.duration=d.duration);c.children.push(d)});c.seek(0);c.reset();c.autoplay&&c.restart();return c};return c};q.random=function(a,c){return Math.floor(Math.random()*(c-a+1))+a};return q}); diff --git a/js/autocomplete.js b/js/autocomplete.js deleted file mode 100644 index a3bf2f2dd9..0000000000 --- a/js/autocomplete.js +++ /dev/null @@ -1,426 +0,0 @@ -(function($) { - 'use strict'; - - let _defaults = { - data: [], // Autocomplete data set - onAutocomplete: null, // Callback for when autocompleted - dropdownOptions: { - // Default dropdown options - autoFocus: false, - closeOnClick: false, - coverTrigger: false - }, - minLength: 1, // Min characters before autocomplete starts - isMultiSelect: false, - onSearch: function(text, autocomplete) { - const filteredData = autocomplete.options.data.filter(item => { - return Object.keys(item) - .map(key => item[key].toString().toLowerCase().indexOf(text.toLowerCase()) >= 0) - .some(isMatch => isMatch); - }); - autocomplete.setMenuItems(filteredData); - }, - maxDropDownHeight: '300px', - allowUnsafeHTML: false - }; - - class Autocomplete extends Component { - constructor(el, options) { - super(Autocomplete, el, options); - this.el.M_Autocomplete = this; - this.options = $.extend({}, Autocomplete.defaults, options); - this.isOpen = false; - this.count = 0; - this.activeIndex = -1; - this.oldVal; - this.selectedValues = []; - this.menuItems = []; - this.$active = $(); - this._mousedown = false; - this._setupDropdown(); - this._setupEventHandlers(); - } - static get defaults() { - return _defaults; - } - static init(els, options) { - return super.init(this, els, options); - } - static getInstance(el) { - let domElem = el.jquery ? el[0] : el; - return domElem.M_Autocomplete; - } - destroy() { - this._removeEventHandlers(); - this._removeDropdown(); - this.el.M_Autocomplete = undefined; - } - - _setupEventHandlers() { - this._handleInputBlurBound = this._handleInputBlur.bind(this); - this._handleInputKeyupAndFocusBound = this._handleInputKeyupAndFocus.bind(this); - this._handleInputKeydownBound = this._handleInputKeydown.bind(this); - this._handleInputClickBound = this._handleInputClick.bind(this); - this._handleContainerMousedownAndTouchstartBound = this._handleContainerMousedownAndTouchstart.bind( - this - ); - this._handleContainerMouseupAndTouchendBound = this._handleContainerMouseupAndTouchend.bind( - this - ); - this.el.addEventListener('blur', this._handleInputBlurBound); - this.el.addEventListener('keyup', this._handleInputKeyupAndFocusBound); - this.el.addEventListener('focus', this._handleInputKeyupAndFocusBound); - this.el.addEventListener('keydown', this._handleInputKeydownBound); - this.el.addEventListener('click', this._handleInputClickBound); - this.container.addEventListener( - 'mousedown', - this._handleContainerMousedownAndTouchstartBound - ); - this.container.addEventListener('mouseup', this._handleContainerMouseupAndTouchendBound); - if (typeof window.ontouchstart !== 'undefined') { - this.container.addEventListener( - 'touchstart', - this._handleContainerMousedownAndTouchstartBound - ); - this.container.addEventListener('touchend', this._handleContainerMouseupAndTouchendBound); - } - } - _removeEventHandlers() { - this.el.removeEventListener('blur', this._handleInputBlurBound); - this.el.removeEventListener('keyup', this._handleInputKeyupAndFocusBound); - this.el.removeEventListener('focus', this._handleInputKeyupAndFocusBound); - this.el.removeEventListener('keydown', this._handleInputKeydownBound); - this.el.removeEventListener('click', this._handleInputClickBound); - this.container.removeEventListener( - 'mousedown', - this._handleContainerMousedownAndTouchstartBound - ); - this.container.removeEventListener('mouseup', this._handleContainerMouseupAndTouchendBound); - - if (typeof window.ontouchstart !== 'undefined') { - this.container.removeEventListener( - 'touchstart', - this._handleContainerMousedownAndTouchstartBound - ); - this.container.removeEventListener( - 'touchend', - this._handleContainerMouseupAndTouchendBound - ); - } - } - _setupDropdown() { - this.container = document.createElement('ul'); - this.container.style.maxHeight = this.options.maxDropDownHeight; - this.container.id = `autocomplete-options-${M.guid()}`; - this.container.classList.add('autocomplete-content', 'dropdown-content'); - this.el.setAttribute('data-target', this.container.id); - - // ! Issue in Component Dropdown: _placeDropdown moves dom-position - this.el.parentElement.appendChild(this.container); - - // Initialize dropdown - let dropdownOptions = $.extend( - {}, - Autocomplete.defaults.dropdownOptions, - this.options.dropdownOptions - ); - let userOnItemClick = dropdownOptions.onItemClick; - // Ensuring the select Option call when user passes custom onItemClick function to dropdown - dropdownOptions.onItemClick = (li) => { - if (!li) return; - const entryID = li.getAttribute('data-id'); - this.selectOption(entryID); - // Handle user declared onItemClick if needed - if (userOnItemClick && typeof userOnItemClick === 'function') - userOnItemClick.call(this.dropdown, this.el); - }; - this.dropdown = M.Dropdown.init(this.el, dropdownOptions); - - // ! Workaround for Label: move label up again - // TODO: Just use PopperJS in future! - const label = this.el.parentElement.querySelector('label'); - if (label) this.el.after(label); - - // Sketchy removal of dropdown click handler - this.el.removeEventListener('click', this.dropdown._handleClickBound); - // Set Value if already set in HTML - if (this.el.value) this.selectOption(this.el.value); - // Add StatusInfo - const div = document.createElement('div'); - div.classList.add('status-info'); - div.setAttribute('style', 'position: absolute;right:0;top:0;'); - this.el.parentElement.appendChild(div); - this._updateSelectedInfo(); - } - _removeDropdown() { - this.container.parentNode.removeChild(this.container); - } - _handleInputBlur() { - if (!this._mousedown) { - this.close(); - this._resetAutocomplete(); - } - } - _handleInputKeyupAndFocus(e) { - if (e.type === 'keyup') Autocomplete._keydown = false; - this.count = 0; - const actualValue = this.el.value.toLowerCase(); - // Don't capture enter or arrow key usage. - if (e.keyCode === 13 || e.keyCode === 38 || e.keyCode === 40) return; - // Check if the input isn't empty - // Check if focus triggered by tab - if (this.oldVal !== actualValue && (M.tabPressed || e.type !== 'focus')) { - this.open(); - } - // Value has changed! - if (this.oldVal !== actualValue) { - this._setStatusLoading(); - this.options.onSearch(this.el.value, this); - } - // Reset Single-Select when Input cleared - if (!this.options.isMultiSelect && this.el.value.length === 0) { - this.selectedValues = []; - this._triggerChanged(); - } - this.oldVal = actualValue; - } - _handleInputKeydown(e) { - Autocomplete._keydown = true; - // Arrow keys and enter key usage - const keyCode = e.keyCode; - const numItems = $(this.container).children('li').length; - // select element on Enter - if (keyCode === M.keys.ENTER && this.activeIndex >= 0) { - const liElement = $(this.container) - .children('li') - .eq(this.activeIndex); - if (liElement.length) { - this.selectOption(liElement[0].getAttribute('data-id')); - e.preventDefault(); - } - return; - } - // Capture up and down key - if (keyCode === M.keys.ARROW_UP || keyCode === M.keys.ARROW_DOWN) { - e.preventDefault(); - if (keyCode === M.keys.ARROW_UP && this.activeIndex > 0) this.activeIndex--; - if (keyCode === M.keys.ARROW_DOWN && this.activeIndex < numItems - 1) this.activeIndex++; - this.$active.removeClass('active'); - if (this.activeIndex >= 0) { - this.$active = $(this.container) - .children('li') - .eq(this.activeIndex); - this.$active.addClass('active'); - // Focus selected - this.container.children[this.activeIndex].scrollIntoView({ - behavior: 'smooth', - block: 'nearest', - inline: 'nearest' - }); - } - } - } - _handleInputClick(e) { - this.open(); - } - _handleContainerMousedownAndTouchstart(e) { - this._mousedown = true; - } - _handleContainerMouseupAndTouchend(e) { - this._mousedown = false; - } - _resetCurrentElementPosition() { - this.activeIndex = -1; - this.$active.removeClass('active'); - } - _resetAutocomplete() { - $(this.container).empty(); - this._resetCurrentElementPosition(); - this.oldVal = null; - this.isOpen = false; - this._mousedown = false; - } - - _highlightPartialText(input, label) { - const start = label.toLowerCase().indexOf('' + input.toLowerCase() + ''); - const end = start + input.length - 1; - //custom filters may return results where the string does not match any part - if (start == -1 || end == -1) { - return [label, '', '']; - } - return [label.slice(0, start), label.slice(start, end + 1), label.slice(end + 1)]; - } - - _createDropdownItem(entry) { - const item = document.createElement('li'); - item.setAttribute('data-id', entry.id); - item.setAttribute( - 'style', - 'display:grid; grid-auto-flow: column; user-select: none; align-items: center;' - ); - // Checkbox - if (this.options.isMultiSelect) { - item.innerHTML = ` -
    - sel.id === entry.id) ? ' checked="checked"' : '' - }> -
    `; - } - // Image - if (entry.image) { - const img = document.createElement('img'); - img.classList.add('circle'); - img.src = entry.image; - item.appendChild(img); - } - - // Text - const inputText = this.el.value.toLowerCase(); - const parts = this._highlightPartialText(inputText, (entry.text || entry.id).toString()); - const div = document.createElement('div'); - div.setAttribute('style', 'line-height:1.2;font-weight:500;'); - if (this.options.allowUnsafeHTML) { - div.innerHTML = parts[0] + '' + parts[1] + '' + parts[2]; - } else { - div.appendChild(document.createTextNode(parts[0])); - if (parts[1]) { - const highlight = document.createElement('span'); - highlight.textContent = parts[1]; - highlight.classList.add('highlight'); - div.appendChild(highlight); - div.appendChild(document.createTextNode(parts[2])); - } - } - - const itemText = document.createElement('div'); - itemText.classList.add('item-text'); - itemText.setAttribute('style', 'padding:5px;overflow:hidden;'); - item.appendChild(itemText); - item.querySelector('.item-text').appendChild(div); - // Description - if (typeof entry.description === 'string' || (typeof entry.description === 'number' && !isNaN(entry.description))) { - const description = document.createElement('small'); - description.setAttribute( - 'style', - 'line-height:1.3;color:grey;white-space:nowrap;text-overflow:ellipsis;display:block;width:90%;overflow:hidden;' - ); - description.innerText = entry.description; - item.querySelector('.item-text').appendChild(description); - } - // Set Grid - const getGridConfig = () => { - if (this.options.isMultiSelect) { - if (entry.image) return '40px min-content auto'; // cb-img-txt - return '40px auto'; // cb-txt - } - if (entry.image) return 'min-content auto'; // img-txt - return 'auto'; // txt - }; - item.style.gridTemplateColumns = getGridConfig(); - return item; - } - _renderDropdown() { - this._resetAutocomplete(); - // Check if Data is empty - if (this.menuItems.length === 0) { - this.menuItems = this.selectedValues; // Show selected Items - } - for (let i = 0; i < this.menuItems.length; i++) { - const item = this._createDropdownItem(this.menuItems[i]); - this.container.append(item); - } - } - _setStatusLoading() { - this.el.parentElement.querySelector( - '.status-info' - ).innerHTML = `
    - - - -
    `; - } - _updateSelectedInfo() { - const statusElement = this.el.parentElement.querySelector('.status-info'); - if (statusElement) { - if (this.options.isMultiSelect) statusElement.innerHTML = this.selectedValues.length; - else statusElement.innerHTML = ''; - } - } - _refreshInputText() { - if (this.selectedValues.length === 1) { - const entry = this.selectedValues[0]; - this.el.value = entry.text || entry.id; // Write Text to Input - } - } - _triggerChanged() { - this.$el.trigger('change'); - // Trigger Autocomplete Event - if (typeof this.options.onAutocomplete === 'function') - this.options.onAutocomplete.call(this, this.selectedValues); - } - - open() { - const inputText = this.el.value.toLowerCase(); - this._resetAutocomplete(); - if (inputText.length >= this.options.minLength) { - this.isOpen = true; - this._renderDropdown(); - } - // Open dropdown - if (!this.dropdown.isOpen) { - setTimeout(() => { - this.dropdown.open(); - }, 100); - } - else this.dropdown.recalculateDimensions(); // Recalculate dropdown when its already open - } - close() { - this.dropdown.close(); - } - setMenuItems(menuItems) { - this.menuItems = menuItems; - this.open(); - this._updateSelectedInfo(); - } - setValues(entries) { - this.selectedValues = entries; - this._updateSelectedInfo(); - if (!this.options.isMultiSelect) { - this._refreshInputText(); - } - this._triggerChanged(); - } - selectOption(id) { - const entry = this.menuItems.find((item) => item.id == id); - if (!entry) return; - // Toggle Checkbox - const li = this.container.querySelector('li[data-id="'+id+'"]'); - if (!li) return; - if (this.options.isMultiSelect) { - const checkbox = li.querySelector('input[type="checkbox"]'); - checkbox.checked = !checkbox.checked; - if (checkbox.checked) this.selectedValues.push(entry); - else - this.selectedValues = this.selectedValues.filter( - (selectedEntry) => selectedEntry.id !== entry.id - ); - this.el.focus(); - } else { - // Single-Select - this.selectedValues = [entry]; - this._refreshInputText(); - this._resetAutocomplete(); - this.close(); - } - this._updateSelectedInfo(); - this._triggerChanged(); - } - } - - Autocomplete._keydown = false; - M.Autocomplete = Autocomplete; - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Autocomplete, 'autocomplete', 'M_Autocomplete'); - } -})(cash); diff --git a/js/cards.js b/js/cards.js deleted file mode 100644 index 0c1ad737a1..0000000000 --- a/js/cards.js +++ /dev/null @@ -1,40 +0,0 @@ -(function($, anim) { - $(document).on('click', '.card', function(e) { - if ($(this).children('.card-reveal').length) { - var $card = $(e.target).closest('.card'); - if ($card.data('initialOverflow') === undefined) { - $card.data( - 'initialOverflow', - $card.css('overflow') === undefined ? '' : $card.css('overflow') - ); - } - let $cardReveal = $(this).find('.card-reveal'); - if ( - $(e.target).is($('.card-reveal .card-title')) || - $(e.target).is($('.card-reveal .card-title i')) - ) { - // Make Reveal animate down and display none - anim({ - targets: $cardReveal[0], - translateY: 0, - duration: 225, - easing: 'easeInOutQuad', - complete: function(anim) { - let el = anim.animatables[0].target; - $(el).css({ display: 'none' }); - $card.css('overflow', $card.data('initialOverflow')); - } - }); - } else if ($(e.target).is($('.card .activator')) || $(e.target).is($('.card .activator i'))) { - $card.css('overflow', 'hidden'); - $cardReveal.css({ display: 'block' }); - anim({ - targets: $cardReveal[0], - translateY: '-100%', - duration: 300, - easing: 'easeInOutQuad' - }); - } - } - }); -})(cash, M.anime); diff --git a/js/cash.js b/js/cash.js deleted file mode 100644 index 17d95acddf..0000000000 --- a/js/cash.js +++ /dev/null @@ -1,960 +0,0 @@ -/*! cash-dom 1.3.5, https://github.com/kenwheeler/cash @license MIT */ -(function (factory) { - window.cash = factory(); -})(function () { - var doc = document, win = window, ArrayProto = Array.prototype, slice = ArrayProto.slice, filter = ArrayProto.filter, push = ArrayProto.push; - - var noop = function () {}, isFunction = function (item) { - // @see https://crbug.com/568448 - return typeof item === typeof noop && item.call; - }, isString = function (item) { - return typeof item === typeof ""; - }; - - var idMatch = /^#[\w-]*$/, classMatch = /^\.[\w-]*$/, htmlMatch = /<.+>/, singlet = /^\w+$/; - - function find(selector, context) { - context = context || doc; - var elems = (classMatch.test(selector) ? context.getElementsByClassName(selector.slice(1)) : singlet.test(selector) ? context.getElementsByTagName(selector) : context.querySelectorAll(selector)); - return elems; - } - - var frag; - function parseHTML(str) { - if (!frag) { - frag = doc.implementation.createHTMLDocument(null); - var base = frag.createElement("base"); - base.href = doc.location.href; - frag.head.appendChild(base); - } - - frag.body.innerHTML = str; - - return frag.body.childNodes; - } - - function onReady(fn) { - if (doc.readyState !== "loading") { - fn(); - } else { - doc.addEventListener("DOMContentLoaded", fn); - } - } - - function Init(selector, context) { - if (!selector) { - return this; - } - - // If already a cash collection, don't do any further processing - if (selector.cash && selector !== win) { - return selector; - } - - var elems = selector, i = 0, length; - - if (isString(selector)) { - elems = (idMatch.test(selector) ? - // If an ID use the faster getElementById check - doc.getElementById(selector.slice(1)) : htmlMatch.test(selector) ? - // If HTML, parse it into real elements - parseHTML(selector) : - // else use `find` - find(selector, context)); - - // If function, use as shortcut for DOM ready - } else if (isFunction(selector)) { - onReady(selector);return this; - } - - if (!elems) { - return this; - } - - // If a single DOM element is passed in or received via ID, return the single element - if (elems.nodeType || elems === win) { - this[0] = elems; - this.length = 1; - } else { - // Treat like an array and loop through each item. - length = this.length = elems.length; - for (; i < length; i++) { - this[i] = elems[i]; - } - } - - return this; - } - - function cash(selector, context) { - return new Init(selector, context); - } - - var fn = cash.fn = cash.prototype = Init.prototype = { // jshint ignore:line - cash: true, - length: 0, - push: push, - splice: ArrayProto.splice, - map: ArrayProto.map, - init: Init - }; - - Object.defineProperty(fn, "constructor", { value: cash }); - - cash.parseHTML = parseHTML; - cash.noop = noop; - cash.isFunction = isFunction; - cash.isString = isString; - - cash.extend = fn.extend = function (target) { - target = target || {}; - - var args = slice.call(arguments), length = args.length, i = 1; - - if (args.length === 1) { - target = this; - i = 0; - } - - for (; i < length; i++) { - if (!args[i]) { - continue; - } - for (var key in args[i]) { - if (args[i].hasOwnProperty(key)) { - target[key] = args[i][key]; - } - } - } - - return target; - }; - - function each(collection, callback) { - var l = collection.length, i = 0; - - for (; i < l; i++) { - if (callback.call(collection[i], collection[i], i, collection) === false) { - break; - } - } - } - - function matches(el, selector) { - var m = el && (el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector); - return !!m && m.call(el, selector); - } - - function getCompareFunction(selector) { - return ( - /* Use browser's `matches` function if string */ - isString(selector) ? matches : - /* Match a cash element */ - selector.cash ? function (el) { - return selector.is(el); - } : - /* Direct comparison */ - function (el, selector) { - return el === selector; - }); - } - - function unique(collection) { - return cash(slice.call(collection).filter(function (item, index, self) { - return self.indexOf(item) === index; - })); - } - - cash.extend({ - merge: function (first, second) { - var len = +second.length, i = first.length, j = 0; - - for (; j < len; i++, j++) { - first[i] = second[j]; - } - - first.length = i; - return first; - }, - - each: each, - matches: matches, - unique: unique, - isArray: Array.isArray, - isNumeric: function (n) { - return !isNaN(parseFloat(n)) && isFinite(n); - } - - }); - - var uid = cash.uid = "_cash" + Date.now(); - - function getDataCache(node) { - return (node[uid] = node[uid] || {}); - } - - function setData(node, key, value) { - return (getDataCache(node)[key] = value); - } - - function getData(node, key) { - var c = getDataCache(node); - if (c[key] === undefined) { - c[key] = node.dataset ? node.dataset[key] : cash(node).attr("data-" + key); - } - return c[key]; - } - - function removeData(node, key) { - var c = getDataCache(node); - if (c) { - delete c[key]; - } else if (node.dataset) { - delete node.dataset[key]; - } else { - cash(node).removeAttr("data-" + name); - } - } - - fn.extend({ - data: function (name, value) { - if (isString(name)) { - return (value === undefined ? getData(this[0], name) : this.each(function (v) { - return setData(v, name, value); - })); - } - - for (var key in name) { - this.data(key, name[key]); - } - - return this; - }, - - removeData: function (key) { - return this.each(function (v) { - return removeData(v, key); - }); - } - - }); - - var notWhiteMatch = /\S+/g; - - function getClasses(c) { - return isString(c) && c.match(notWhiteMatch); - } - - function hasClass(v, c) { - return (v.classList ? v.classList.contains(c) : new RegExp("(^| )" + c + "( |$)", "gi").test(v.className)); - } - - function addClass(v, c, spacedName) { - if (v.classList) { - v.classList.add(c); - } else if (spacedName.indexOf(" " + c + " ")) { - v.className += " " + c; - } - } - - function removeClass(v, c) { - if (v.classList) { - v.classList.remove(c); - } else { - v.className = v.className.replace(c, ""); - } - } - - fn.extend({ - addClass: function (c) { - var classes = getClasses(c); - - return (classes ? this.each(function (v) { - var spacedName = " " + v.className + " "; - each(classes, function (c) { - addClass(v, c, spacedName); - }); - }) : this); - }, - - attr: function (name, value) { - if (!name) { - return undefined; - } - - if (isString(name)) { - if (value === undefined) { - return this[0] ? this[0].getAttribute ? this[0].getAttribute(name) : this[0][name] : undefined; - } - - return this.each(function (v) { - if (v.setAttribute) { - v.setAttribute(name, value); - } else { - v[name] = value; - } - }); - } - - for (var key in name) { - this.attr(key, name[key]); - } - - return this; - }, - - hasClass: function (c) { - var check = false, classes = getClasses(c); - if (classes && classes.length) { - this.each(function (v) { - check = hasClass(v, classes[0]); - return !check; - }); - } - return check; - }, - - prop: function (name, value) { - if (isString(name)) { - return (value === undefined ? this[0][name] : this.each(function (v) { - v[name] = value; - })); - } - - for (var key in name) { - this.prop(key, name[key]); - } - - return this; - }, - - removeAttr: function (name) { - return this.each(function (v) { - if (v.removeAttribute) { - v.removeAttribute(name); - } else { - delete v[name]; - } - }); - }, - - removeClass: function (c) { - if (!arguments.length) { - return this.attr("class", ""); - } - var classes = getClasses(c); - return (classes ? this.each(function (v) { - each(classes, function (c) { - removeClass(v, c); - }); - }) : this); - }, - - removeProp: function (name) { - return this.each(function (v) { - delete v[name]; - }); - }, - - toggleClass: function (c, state) { - if (state !== undefined) { - return this[state ? "addClass" : "removeClass"](c); - } - var classes = getClasses(c); - return (classes ? this.each(function (v) { - var spacedName = " " + v.className + " "; - each(classes, function (c) { - if (hasClass(v, c)) { - removeClass(v, c); - } else { - addClass(v, c, spacedName); - } - }); - }) : this); - } }); - - fn.extend({ - add: function (selector, context) { - return unique(cash.merge(this, cash(selector, context))); - }, - - each: function (callback) { - each(this, callback); - return this; - }, - - eq: function (index) { - return cash(this.get(index)); - }, - - filter: function (selector) { - if (!selector) { - return this; - } - - var comparator = (isFunction(selector) ? selector : getCompareFunction(selector)); - - return cash(filter.call(this, function (e) { - return comparator(e, selector); - })); - }, - - first: function () { - return this.eq(0); - }, - - get: function (index) { - if (index === undefined) { - return slice.call(this); - } - return (index < 0 ? this[index + this.length] : this[index]); - }, - - index: function (elem) { - var child = elem ? cash(elem)[0] : this[0], collection = elem ? this : cash(child).parent().children(); - return slice.call(collection).indexOf(child); - }, - - last: function () { - return this.eq(-1); - } - - }); - - var camelCase = (function () { - var camelRegex = /(?:^\w|[A-Z]|\b\w)/g, whiteSpace = /[\s-_]+/g; - return function (str) { - return str.replace(camelRegex, function (letter, index) { - return letter[index === 0 ? "toLowerCase" : "toUpperCase"](); - }).replace(whiteSpace, ""); - }; - }()); - - var getPrefixedProp = (function () { - var cache = {}, doc = document, div = doc.createElement("div"), style = div.style; - - return function (prop) { - prop = camelCase(prop); - if (cache[prop]) { - return cache[prop]; - } - - var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), prefixes = ["webkit", "moz", "ms", "o"], props = (prop + " " + (prefixes).join(ucProp + " ") + ucProp).split(" "); - - each(props, function (p) { - if (p in style) { - cache[p] = prop = cache[prop] = p; - return false; - } - }); - - return cache[prop]; - }; - }()); - - cash.prefixedProp = getPrefixedProp; - cash.camelCase = camelCase; - - fn.extend({ - css: function (prop, value) { - if (isString(prop)) { - prop = getPrefixedProp(prop); - return (arguments.length > 1 ? this.each(function (v) { - return v.style[prop] = value; - }) : win.getComputedStyle(this[0])[prop]); - } - - for (var key in prop) { - this.css(key, prop[key]); - } - - return this; - } - - }); - - function compute(el, prop) { - return parseInt(win.getComputedStyle(el[0], null)[prop], 10) || 0; - } - - each(["Width", "Height"], function (v) { - var lower = v.toLowerCase(); - - fn[lower] = function () { - return this[0].getBoundingClientRect()[lower]; - }; - - fn["inner" + v] = function () { - return this[0]["client" + v]; - }; - - fn["outer" + v] = function (margins) { - return this[0]["offset" + v] + (margins ? compute(this, "margin" + (v === "Width" ? "Left" : "Top")) + compute(this, "margin" + (v === "Width" ? "Right" : "Bottom")) : 0); - }; - }); - - function registerEvent(node, eventName, callback) { - var eventCache = getData(node, "_cashEvents") || setData(node, "_cashEvents", {}); - eventCache[eventName] = eventCache[eventName] || []; - eventCache[eventName].push(callback); - node.addEventListener(eventName, callback); - } - - function removeEvent(node, eventName, callback) { - var events = getData(node, "_cashEvents"), eventCache = (events && events[eventName]), index; - - if (!eventCache) { - return; - } - - if (callback) { - node.removeEventListener(eventName, callback); - index = eventCache.indexOf(callback); - if (index >= 0) { - eventCache.splice(index, 1); - } - } else { - each(eventCache, function (event) { - node.removeEventListener(eventName, event); - }); - eventCache = []; - } - } - - fn.extend({ - off: function (eventName, callback) { - return this.each(function (v) { - return removeEvent(v, eventName, callback); - }); - }, - - on: function (eventName, delegate, callback, runOnce) { - // jshint ignore:line - var originalCallback; - if (!isString(eventName)) { - for (var key in eventName) { - this.on(key, delegate, eventName[key]); - } - return this; - } - - if (isFunction(delegate)) { - callback = delegate; - delegate = null; - } - - if (eventName === "ready") { - onReady(callback); - return this; - } - - if (delegate) { - originalCallback = callback; - callback = function (e) { - var t = e.target; - while (!matches(t, delegate)) { - if (t === this || t === null) { - return (t = false); - } - - t = t.parentNode; - } - - if (t) { - originalCallback.call(t, e); - } - }; - } - - return this.each(function (v) { - var finalCallback = callback; - if (runOnce) { - finalCallback = function () { - callback.apply(this, arguments); - removeEvent(v, eventName, finalCallback); - }; - } - registerEvent(v, eventName, finalCallback); - }); - }, - - one: function (eventName, delegate, callback) { - return this.on(eventName, delegate, callback, true); - }, - - ready: onReady, - - /** - * Modified - * Triggers browser event - * @param String eventName - * @param Object data - Add properties to event object - */ - trigger: function (eventName, data) { - if (document.createEvent) { - let evt = document.createEvent('HTMLEvents'); - evt.initEvent(eventName, true, false); - evt = this.extend(evt, data); - return this.each(function (v) { - return v.dispatchEvent(evt); - }); - } - } - - }); - - function encode(name, value) { - return "&" + encodeURIComponent(name) + "=" + encodeURIComponent(value).replace(/%20/g, "+"); - } - - function getSelectMultiple_(el) { - var values = []; - each(el.options, function (o) { - if (o.selected) { - values.push(o.value); - } - }); - return values.length ? values : null; - } - - function getSelectSingle_(el) { - var selectedIndex = el.selectedIndex; - return selectedIndex >= 0 ? el.options[selectedIndex].value : null; - } - - function getValue(el) { - var type = el.type; - if (!type) { - return null; - } - switch (type.toLowerCase()) { - case "select-one": - return getSelectSingle_(el); - case "select-multiple": - return getSelectMultiple_(el); - case "radio": - return (el.checked) ? el.value : null; - case "checkbox": - return (el.checked) ? el.value : null; - default: - return el.value ? el.value : null; - } - } - - fn.extend({ - serialize: function () { - var query = ""; - - each(this[0].elements || this, function (el) { - if (el.disabled || el.tagName === "FIELDSET") { - return; - } - var name = el.name; - switch (el.type.toLowerCase()) { - case "file": - case "reset": - case "submit": - case "button": - break; - case "select-multiple": - var values = getValue(el); - if (values !== null) { - each(values, function (value) { - query += encode(name, value); - }); - } - break; - default: - var value = getValue(el); - if (value !== null) { - query += encode(name, value); - } - } - }); - - return query.substr(1); - }, - - val: function (value) { - if (value === undefined) { - return getValue(this[0]); - } - - return this.each(function (v) { - return v.value = value; - }); - } - - }); - - function insertElement(el, child, prepend) { - if (prepend) { - var first = el.childNodes[0]; - el.insertBefore(child, first); - } else { - el.appendChild(child); - } - } - - function insertContent(parent, child, prepend) { - var str = isString(child); - - if (!str && child.length) { - each(child, function (v) { - return insertContent(parent, v, prepend); - }); - return; - } - - each(parent, str ? function (v) { - return v.insertAdjacentHTML(prepend ? "afterbegin" : "beforeend", child); - } : function (v, i) { - return insertElement(v, (i === 0 ? child : child.cloneNode(true)), prepend); - }); - } - - fn.extend({ - after: function (selector) { - cash(selector).insertAfter(this); - return this; - }, - - append: function (content) { - insertContent(this, content); - return this; - }, - - appendTo: function (parent) { - insertContent(cash(parent), this); - return this; - }, - - before: function (selector) { - cash(selector).insertBefore(this); - return this; - }, - - clone: function () { - return cash(this.map(function (v) { - return v.cloneNode(true); - })); - }, - - empty: function () { - this.html(""); - return this; - }, - - html: function (content) { - if (content === undefined) { - return this[0].innerHTML; - } - var source = (content.nodeType ? content[0].outerHTML : content); - return this.each(function (v) { - return v.innerHTML = source; - }); - }, - - insertAfter: function (selector) { - var _this = this; - - - cash(selector).each(function (el, i) { - var parent = el.parentNode, sibling = el.nextSibling; - _this.each(function (v) { - parent.insertBefore((i === 0 ? v : v.cloneNode(true)), sibling); - }); - }); - - return this; - }, - - insertBefore: function (selector) { - var _this2 = this; - cash(selector).each(function (el, i) { - var parent = el.parentNode; - _this2.each(function (v) { - parent.insertBefore((i === 0 ? v : v.cloneNode(true)), el); - }); - }); - return this; - }, - - prepend: function (content) { - insertContent(this, content, true); - return this; - }, - - prependTo: function (parent) { - insertContent(cash(parent), this, true); - return this; - }, - - remove: function () { - return this.each(function (v) { - if (!!v.parentNode) { - return v.parentNode.removeChild(v); - } - }); - }, - - text: function (content) { - if (content === undefined) { - return this[0].textContent; - } - return this.each(function (v) { - return v.textContent = content; - }); - } - - }); - - var docEl = doc.documentElement; - - fn.extend({ - position: function () { - var el = this[0]; - return { - left: el.offsetLeft, - top: el.offsetTop - }; - }, - - offset: function () { - var rect = this[0].getBoundingClientRect(); - return { - top: rect.top + win.pageYOffset - docEl.clientTop, - left: rect.left + win.pageXOffset - docEl.clientLeft - }; - }, - - offsetParent: function () { - return cash(this[0].offsetParent); - } - - }); - - fn.extend({ - children: function (selector) { - var elems = []; - this.each(function (el) { - push.apply(elems, el.children); - }); - elems = unique(elems); - - return (!selector ? elems : elems.filter(function (v) { - return matches(v, selector); - })); - }, - - closest: function (selector) { - if (!selector || this.length < 1) { - return cash(); - } - if (this.is(selector)) { - return this.filter(selector); - } - return this.parent().closest(selector); - }, - - is: function (selector) { - if (!selector) { - return false; - } - - var match = false, comparator = getCompareFunction(selector); - - this.each(function (el) { - match = comparator(el, selector); - return !match; - }); - - return match; - }, - - find: function (selector) { - if (!selector || selector.nodeType) { - return cash(selector && this.has(selector).length ? selector : null); - } - - var elems = []; - this.each(function (el) { - push.apply(elems, find(selector, el)); - }); - - return unique(elems); - }, - - has: function (selector) { - var comparator = (isString(selector) ? function (el) { - return find(selector, el).length !== 0; - } : function (el) { - return el.contains(selector); - }); - - return this.filter(comparator); - }, - - next: function () { - return cash(this[0].nextElementSibling); - }, - - not: function (selector) { - if (!selector) { - return this; - } - - var comparator = getCompareFunction(selector); - - return this.filter(function (el) { - return !comparator(el, selector); - }); - }, - - parent: function () { - var result = []; - - this.each(function (item) { - if (item && item.parentNode) { - result.push(item.parentNode); - } - }); - - return unique(result); - }, - - parents: function (selector) { - var last, result = []; - - this.each(function (item) { - last = item; - - while (last && last.parentNode && last !== doc.body.parentNode) { - last = last.parentNode; - - if (!selector || (selector && matches(last, selector))) { - result.push(last); - } - } - }); - - return unique(result); - }, - - prev: function () { - return cash(this[0].previousElementSibling); - }, - - siblings: function (selector) { - var collection = this.parent().children(selector), el = this[0]; - - return collection.filter(function (i) { - return i !== el; - }); - } - - }); - - - return cash; -}); diff --git a/js/characterCounter.js b/js/characterCounter.js deleted file mode 100644 index 761d1bfcd1..0000000000 --- a/js/characterCounter.js +++ /dev/null @@ -1,136 +0,0 @@ -(function($) { - 'use strict'; - - let _defaults = {}; - - /** - * @class - * - */ - class CharacterCounter extends Component { - /** - * Construct CharacterCounter instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - constructor(el, options) { - super(CharacterCounter, el, options); - - this.el.M_CharacterCounter = this; - - /** - * Options for the character counter - */ - this.options = $.extend({}, CharacterCounter.defaults, options); - - this.isInvalid = false; - this.isValidLength = false; - this._setupCounter(); - this._setupEventHandlers(); - } - - static get defaults() { - return _defaults; - } - - static init(els, options) { - return super.init(this, els, options); - } - - /** - * Get Instance - */ - static getInstance(el) { - let domElem = !!el.jquery ? el[0] : el; - return domElem.M_CharacterCounter; - } - - /** - * Teardown component - */ - destroy() { - this._removeEventHandlers(); - this.el.CharacterCounter = undefined; - this._removeCounter(); - } - - /** - * Setup Event Handlers - */ - _setupEventHandlers() { - this._handleUpdateCounterBound = this.updateCounter.bind(this); - - this.el.addEventListener('focus', this._handleUpdateCounterBound, true); - this.el.addEventListener('input', this._handleUpdateCounterBound, true); - } - - /** - * Remove Event Handlers - */ - _removeEventHandlers() { - this.el.removeEventListener('focus', this._handleUpdateCounterBound, true); - this.el.removeEventListener('input', this._handleUpdateCounterBound, true); - } - - /** - * Setup counter element - */ - _setupCounter() { - this.counterEl = document.createElement('span'); - $(this.counterEl) - .addClass('character-counter') - .css({ - float: 'right', - 'font-size': '12px', - height: 1 - }); - - this.$el.parent().append(this.counterEl); - } - - /** - * Remove counter element - */ - _removeCounter() { - $(this.counterEl).remove(); - } - - /** - * Update counter - */ - updateCounter() { - let maxLength = +this.$el.attr('data-length'), - actualLength = this.el.value.length; - this.isValidLength = actualLength <= maxLength; - let counterString = actualLength; - - if (maxLength) { - counterString += '/' + maxLength; - this._validateInput(); - } - - $(this.counterEl).html(counterString); - } - - /** - * Add validation classes - */ - _validateInput() { - if (this.isValidLength && this.isInvalid) { - this.isInvalid = false; - this.$el.removeClass('invalid'); - } else if (!this.isValidLength && !this.isInvalid) { - this.isInvalid = true; - this.$el.removeClass('valid'); - this.$el.addClass('invalid'); - } - } - } - - M.CharacterCounter = CharacterCounter; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(CharacterCounter, 'characterCounter', 'M_CharacterCounter'); - } -})(cash); diff --git a/js/chips.js b/js/chips.js deleted file mode 100644 index ea59866370..0000000000 --- a/js/chips.js +++ /dev/null @@ -1,352 +0,0 @@ -(function($) { - 'use strict'; - - let _defaults = { - data: [], - placeholder: '', - secondaryPlaceholder: '', - autocompleteOptions: {}, - autocompleteOnly: false, - limit: Infinity, - onChipAdd: null, - onChipSelect: null, - onChipDelete: null - }; - - class Chips extends Component { - - constructor(el, options) { - super(Chips, el, options); - this.el.M_Chips = this; - this.options = $.extend({}, Chips.defaults, options); - - this.$el.addClass('chips input-field'); - this.chipsData = []; - this.$chips = $(); - this._setupInput(); - this.hasAutocomplete = Object.keys(this.options.autocompleteOptions).length > 0; - // Set input id - if (!this.$input.attr('id')) { - this.$input.attr('id', M.guid()); - } - // Render initial chips - if (this.options.data.length) { - this.chipsData = this.options.data; - this._renderChips(this.chipsData); - } - // Setup autocomplete if needed - if (this.hasAutocomplete) { - this._setupAutocomplete(); - } - this._setPlaceholder(); - this._setupLabel(); - this._setupEventHandlers(); - } - - static get defaults() { - return _defaults; - } - - static init(els, options) { - return super.init(this, els, options); - } - - static getInstance(el) { - let domElem = !!el.jquery ? el[0] : el; - return domElem.M_Chips; - } - - getData() { - return this.chipsData; - } - - destroy() { - this._removeEventHandlers(); - this.$chips.remove(); - this.el.M_Chips = undefined; - } - - _setupEventHandlers() { - this._handleChipClickBound = this._handleChipClick.bind(this); - this._handleInputKeydownBound = this._handleInputKeydown.bind(this); - this._handleInputFocusBound = this._handleInputFocus.bind(this); - this._handleInputBlurBound = this._handleInputBlur.bind(this); - - this.el.addEventListener('click', this._handleChipClickBound); - document.addEventListener('keydown', Chips._handleChipsKeydown); - document.addEventListener('keyup', Chips._handleChipsKeyup); - this.el.addEventListener('blur', Chips._handleChipsBlur, true); - this.$input[0].addEventListener('focus', this._handleInputFocusBound); - this.$input[0].addEventListener('blur', this._handleInputBlurBound); - this.$input[0].addEventListener('keydown', this._handleInputKeydownBound); - } - - _removeEventHandlers() { - this.el.removeEventListener('click', this._handleChipClickBound); - document.removeEventListener('keydown', Chips._handleChipsKeydown); - document.removeEventListener('keyup', Chips._handleChipsKeyup); - this.el.removeEventListener('blur', Chips._handleChipsBlur, true); - this.$input[0].removeEventListener('focus', this._handleInputFocusBound); - this.$input[0].removeEventListener('blur', this._handleInputBlurBound); - this.$input[0].removeEventListener('keydown', this._handleInputKeydownBound); - } - - _handleChipClick(e) { - let $chip = $(e.target).closest('.chip'); - let clickedClose = $(e.target).is('.close'); - if ($chip.length) { - let index = $chip.index(); - if (clickedClose) { - // delete chip - this.deleteChip(index); - this.$input[0].focus(); - } else { - // select chip - this.selectChip(index); - } - - // Default handle click to focus on input - } else { - this.$input[0].focus(); - } - } - - static _handleChipsKeydown(e) { - Chips._keydown = true; - - let $chips = $(e.target).closest('.chips'); - let chipsKeydown = e.target && $chips.length; - - // Don't handle keydown inputs on input and textarea - if ($(e.target).is('input, textarea') || !chipsKeydown) { - return; - } - - let currChips = $chips[0].M_Chips; - - // backspace and delete - if (e.keyCode === 8 || e.keyCode === 46) { - e.preventDefault(); - - let selectIndex = currChips.chipsData.length; - if (currChips._selectedChip) { - let index = currChips._selectedChip.index(); - currChips.deleteChip(index); - currChips._selectedChip = null; - - // Make sure selectIndex doesn't go negative - selectIndex = Math.max(index - 1, 0); - } - - if (currChips.chipsData.length) { - currChips.selectChip(selectIndex); - } else { - currChips.$input[0].focus(); - } - - // left arrow key - } else if (e.keyCode === 37) { - if (currChips._selectedChip) { - let selectIndex = currChips._selectedChip.index() - 1; - if (selectIndex < 0) { - return; - } - currChips.selectChip(selectIndex); - } - - // right arrow key - } else if (e.keyCode === 39) { - if (currChips._selectedChip) { - let selectIndex = currChips._selectedChip.index() + 1; - - if (selectIndex >= currChips.chipsData.length) { - currChips.$input[0].focus(); - } else { - currChips.selectChip(selectIndex); - } - } - } - } - - static _handleChipsKeyup(e) { - Chips._keydown = false; - } - - static _handleChipsBlur(e) { - if (!Chips._keydown && document.hidden) { - let $chips = $(e.target).closest('.chips'); - let currChips = $chips[0].M_Chips; - currChips._selectedChip = null; - } - } - - _handleInputFocus() { - this.$el.addClass('focus'); - } - - _handleInputBlur() { - this.$el.removeClass('focus'); - } - - _handleInputKeydown(e) { - Chips._keydown = true; - // enter - if (e.keyCode === 13) { - // Override enter if autocompleting. - if (this.hasAutocomplete && this.autocomplete && this.autocomplete.isOpen) { - return; - } - e.preventDefault(); - if (!this.hasAutocomplete || (this.hasAutocomplete && !this.options.autocompleteOnly)) { - this.addChip({id: this.$input[0].value}); - } - this.$input[0].value = ''; - // delete or left - } else if ( - (e.keyCode === 8 || e.keyCode === 37) && - this.$input[0].value === '' && - this.chipsData.length - ) { - e.preventDefault(); - this.selectChip(this.chipsData.length - 1); - } - } - - _renderChip(chip) { - if (!chip.id) return; - let renderedChip = document.createElement('div'); - let closeIcon = document.createElement('i'); - renderedChip.classList.add('chip'); - renderedChip.textContent = chip.text || chip.id; - renderedChip.setAttribute('tabindex', 0); - $(closeIcon).addClass('material-icons close'); - closeIcon.textContent = 'close'; - // attach image if needed - if (chip.image) { - let img = document.createElement('img'); - img.setAttribute('src', chip.image); - renderedChip.insertBefore(img, renderedChip.firstChild); - } - renderedChip.appendChild(closeIcon); - return renderedChip; - } - - _renderChips() { - this.$chips.remove(); - for (let i = 0; i < this.chipsData.length; i++) { - let chipEl = this._renderChip(this.chipsData[i]); - this.$el.append(chipEl); - this.$chips.add(chipEl); - } - // move input to end - this.$el.append(this.$input[0]); - } - - _setupAutocomplete() { - this.options.autocompleteOptions.onAutocomplete = (items) => { - if (items.length > 0) { - this.addChip(items[0]); - } - this.$input[0].value = ''; - this.$input[0].focus(); - }; - - this.autocomplete = M.Autocomplete.init(this.$input[0], this.options.autocompleteOptions); - } - - _setupInput() { - this.$input = this.$el.find('input'); - if (!this.$input.length) { - this.$input = $(''); - this.$el.append(this.$input); - } - this.$input.addClass('input'); - } - - _setupLabel() { - this.$label = this.$el.find('label'); - if (this.$label.length) { - this.$label[0].setAttribute('for', this.$input.attr('id')); - } - } - - _setPlaceholder() { - if (this.chipsData !== undefined && !this.chipsData.length && this.options.placeholder) { - $(this.$input).prop('placeholder', this.options.placeholder); - } else if ( - (this.chipsData === undefined || !!this.chipsData.length) && - this.options.secondaryPlaceholder - ) { - $(this.$input).prop('placeholder', this.options.secondaryPlaceholder); - } - } - - _isValidAndNotExist(chip) { - const isValid = !!chip.id; - const doesNotExist = !this.chipsData.some(item => item.id == chip.id); - return isValid && doesNotExist; - } - - addChip(chip) { - if (!this._isValidAndNotExist(chip) || this.chipsData.length >= this.options.limit) { - return; - } - let renderedChip = this._renderChip(chip); - this.$chips.add(renderedChip); - this.chipsData.push(chip); - $(this.$input).before(renderedChip); - this._setPlaceholder(); - // fire chipAdd callback - if (typeof this.options.onChipAdd === 'function') { - this.options.onChipAdd.call(this, this.$el, renderedChip); - } - } - - deleteChip(chipIndex) { - let $chip = this.$chips.eq(chipIndex); - this.$chips.eq(chipIndex).remove(); - this.$chips = this.$chips.filter(function(el) { - return $(el).index() >= 0; - }); - this.chipsData.splice(chipIndex, 1); - this._setPlaceholder(); - - // fire chipDelete callback - if (typeof this.options.onChipDelete === 'function') { - this.options.onChipDelete.call(this, this.$el, $chip[0]); - } - } - - selectChip(chipIndex) { - let $chip = this.$chips.eq(chipIndex); - this._selectedChip = $chip; - $chip[0].focus(); - - // fire chipSelect callback - if (typeof this.options.onChipSelect === 'function') { - this.options.onChipSelect.call(this, this.$el, $chip[0]); - } - } - } - - Chips._keydown = false; - - M.Chips = Chips; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Chips, 'chips', 'M_Chips'); - } - - $(document).ready(function() { - // Handle removal of static chips. - $(document.body).on('click', '.chip .close', function() { - let $chips = $(this).closest('.chips'); - if ($chips.length && $chips[0].M_Chips) { - return; - } - $(this) - .closest('.chip') - .remove(); - }); - }); -})(cash); diff --git a/js/collapsible.js b/js/collapsible.js deleted file mode 100644 index 6c4912612d..0000000000 --- a/js/collapsible.js +++ /dev/null @@ -1,275 +0,0 @@ -(function($, anim) { - 'use strict'; - - let _defaults = { - accordion: true, - onOpenStart: undefined, - onOpenEnd: undefined, - onCloseStart: undefined, - onCloseEnd: undefined, - inDuration: 300, - outDuration: 300 - }; - - /** - * @class - * - */ - class Collapsible extends Component { - /** - * Construct Collapsible instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - constructor(el, options) { - super(Collapsible, el, options); - - this.el.M_Collapsible = this; - - /** - * Options for the collapsible - * @member Collapsible#options - * @prop {Boolean} [accordion=false] - Type of the collapsible - * @prop {Function} onOpenStart - Callback function called before collapsible is opened - * @prop {Function} onOpenEnd - Callback function called after collapsible is opened - * @prop {Function} onCloseStart - Callback function called before collapsible is closed - * @prop {Function} onCloseEnd - Callback function called after collapsible is closed - * @prop {Number} inDuration - Transition in duration in milliseconds. - * @prop {Number} outDuration - Transition duration in milliseconds. - */ - this.options = $.extend({}, Collapsible.defaults, options); - - // Setup tab indices - this.$headers = this.$el.children('li').children('.collapsible-header'); - this.$headers.attr('tabindex', 0); - - this._setupEventHandlers(); - - // Open first active - let $activeBodies = this.$el.children('li.active').children('.collapsible-body'); - if (this.options.accordion) { - // Handle Accordion - $activeBodies.first().css('display', 'block'); - } else { - // Handle Expandables - $activeBodies.css('display', 'block'); - } - } - - static get defaults() { - return _defaults; - } - - static init(els, options) { - return super.init(this, els, options); - } - - /** - * Get Instance - */ - static getInstance(el) { - let domElem = !!el.jquery ? el[0] : el; - return domElem.M_Collapsible; - } - - /** - * Teardown component - */ - destroy() { - this._removeEventHandlers(); - this.el.M_Collapsible = undefined; - } - - /** - * Setup Event Handlers - */ - _setupEventHandlers() { - this._handleCollapsibleClickBound = this._handleCollapsibleClick.bind(this); - this._handleCollapsibleKeydownBound = this._handleCollapsibleKeydown.bind(this); - this.el.addEventListener('click', this._handleCollapsibleClickBound); - this.$headers.each((header) => { - header.addEventListener('keydown', this._handleCollapsibleKeydownBound); - }); - } - - /** - * Remove Event Handlers - */ - _removeEventHandlers() { - this.el.removeEventListener('click', this._handleCollapsibleClickBound); - this.$headers.each((header) => { - header.removeEventListener('keydown', this._handleCollapsibleKeydownBound); - }); - } - - /** - * Handle Collapsible Click - * @param {Event} e - */ - _handleCollapsibleClick(e) { - let $header = $(e.target).closest('.collapsible-header'); - if (e.target && $header.length) { - let $collapsible = $header.closest('.collapsible'); - if ($collapsible[0] === this.el) { - let $collapsibleLi = $header.closest('li'); - let $collapsibleLis = $collapsible.children('li'); - let isActive = $collapsibleLi[0].classList.contains('active'); - let index = $collapsibleLis.index($collapsibleLi); - - if (isActive) { - this.close(index); - } else { - this.open(index); - } - } - } - } - - /** - * Handle Collapsible Keydown - * @param {Event} e - */ - _handleCollapsibleKeydown(e) { - if (e.keyCode === 13) { - this._handleCollapsibleClickBound(e); - } - } - - /** - * Animate in collapsible slide - * @param {Number} index - 0th index of slide - */ - _animateIn(index) { - let $collapsibleLi = this.$el.children('li').eq(index); - if ($collapsibleLi.length) { - let $body = $collapsibleLi.children('.collapsible-body'); - - anim.remove($body[0]); - $body.css({ - display: 'block', - overflow: 'hidden', - height: 0, - paddingTop: '', - paddingBottom: '' - }); - - let pTop = $body.css('padding-top'); - let pBottom = $body.css('padding-bottom'); - let finalHeight = $body[0].scrollHeight; - $body.css({ - paddingTop: 0, - paddingBottom: 0 - }); - - anim({ - targets: $body[0], - height: finalHeight, - paddingTop: pTop, - paddingBottom: pBottom, - duration: this.options.inDuration, - easing: 'easeInOutCubic', - complete: (anim) => { - $body.css({ - overflow: '', - paddingTop: '', - paddingBottom: '', - height: '' - }); - - // onOpenEnd callback - if (typeof this.options.onOpenEnd === 'function') { - this.options.onOpenEnd.call(this, $collapsibleLi[0]); - } - } - }); - } - } - - /** - * Animate out collapsible slide - * @param {Number} index - 0th index of slide to open - */ - _animateOut(index) { - let $collapsibleLi = this.$el.children('li').eq(index); - if ($collapsibleLi.length) { - let $body = $collapsibleLi.children('.collapsible-body'); - anim.remove($body[0]); - $body.css('overflow', 'hidden'); - anim({ - targets: $body[0], - height: 0, - paddingTop: 0, - paddingBottom: 0, - duration: this.options.outDuration, - easing: 'easeInOutCubic', - complete: () => { - $body.css({ - height: '', - overflow: '', - padding: '', - display: '' - }); - - // onCloseEnd callback - if (typeof this.options.onCloseEnd === 'function') { - this.options.onCloseEnd.call(this, $collapsibleLi[0]); - } - } - }); - } - } - - /** - * Open Collapsible - * @param {Number} index - 0th index of slide - */ - open(index) { - let $collapsibleLi = this.$el.children('li').eq(index); - if ($collapsibleLi.length && !$collapsibleLi[0].classList.contains('active')) { - // onOpenStart callback - if (typeof this.options.onOpenStart === 'function') { - this.options.onOpenStart.call(this, $collapsibleLi[0]); - } - - // Handle accordion behavior - if (this.options.accordion) { - let $collapsibleLis = this.$el.children('li'); - let $activeLis = this.$el.children('li.active'); - $activeLis.each((el) => { - let index = $collapsibleLis.index($(el)); - this.close(index); - }); - } - - // Animate in - $collapsibleLi[0].classList.add('active'); - this._animateIn(index); - } - } - - /** - * Close Collapsible - * @param {Number} index - 0th index of slide - */ - close(index) { - let $collapsibleLi = this.$el.children('li').eq(index); - if ($collapsibleLi.length && $collapsibleLi[0].classList.contains('active')) { - // onCloseStart callback - if (typeof this.options.onCloseStart === 'function') { - this.options.onCloseStart.call(this, $collapsibleLi[0]); - } - - // Animate out - $collapsibleLi[0].classList.remove('active'); - this._animateOut(index); - } - } - } - - M.Collapsible = Collapsible; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Collapsible, 'collapsible', 'M_Collapsible'); - } -})(cash, M.anime); diff --git a/js/forms.js b/js/forms.js deleted file mode 100644 index 2b1ee64f63..0000000000 --- a/js/forms.js +++ /dev/null @@ -1,128 +0,0 @@ -(function($) { - - M.textareaAutoResize = function($textarea) { - // Wrap if native element - if ($textarea instanceof Element) { - $textarea = $($textarea); - } - - if (!$textarea.length) { - console.error('No textarea element found'); - return; - } - - // Textarea Auto Resize - let hiddenDiv = $('.hiddendiv').first(); - if (!hiddenDiv.length) { - hiddenDiv = $('
    '); - $('body').append(hiddenDiv); - } - - // Set font properties of hiddenDiv - const fontFamily = $textarea.css('font-family'); - const fontSize = $textarea.css('font-size'); - const lineHeight = $textarea.css('line-height'); - // Firefox can't handle padding shorthand. - const paddingTop = $textarea.css('padding-top'); - const paddingRight = $textarea.css('padding-right'); - const paddingBottom = $textarea.css('padding-bottom'); - const paddingLeft = $textarea.css('padding-left'); - - if (fontSize) hiddenDiv.css('font-size', fontSize); - if (fontFamily) hiddenDiv.css('font-family', fontFamily); - if (lineHeight) hiddenDiv.css('line-height', lineHeight); - if (paddingTop) hiddenDiv.css('padding-top', paddingTop); - if (paddingRight) hiddenDiv.css('padding-right', paddingRight); - if (paddingBottom) hiddenDiv.css('padding-bottom', paddingBottom); - if (paddingLeft) hiddenDiv.css('padding-left', paddingLeft); - - // Set original-height, if none - if (!$textarea.data('original-height')) { - $textarea.data('original-height', $textarea.height()); - } - - if ($textarea.attr('wrap') === 'off') { - hiddenDiv.css('overflow-wrap', 'normal').css('white-space', 'pre'); - } - - hiddenDiv.text($textarea[0].value + '\n'); - let content = hiddenDiv.html().replace(/\n/g, '
    '); - hiddenDiv.html(content); - - // When textarea is hidden, width goes crazy. - // Approximate with half of window size - - if ($textarea[0].offsetWidth > 0 && $textarea[0].offsetHeight > 0) { - hiddenDiv.css('width', $textarea.width() + 'px'); - } else { - hiddenDiv.css('width', window.innerWidth / 2 + 'px'); - } - - /** - * Resize if the new height is greater than the - * original height of the textarea - */ - if ($textarea.data('original-height') <= hiddenDiv.innerHeight()) { - $textarea.css('height', hiddenDiv.innerHeight() + 'px'); - } else if ($textarea[0].value.length < $textarea.data('previous-length')) { - /** - * In case the new height is less than original height, it - * means the textarea has less text than before - * So we set the height to the original one - */ - $textarea.css('height', $textarea.data('original-height') + 'px'); - } - $textarea.data('previous-length', $textarea[0].value.length); - }; - - $(document).ready(function() { - - // Radio and Checkbox focus class - let radio_checkbox = 'input[type=radio], input[type=checkbox]'; - $(document).on('keyup', radio_checkbox, function(e) { - // TAB, check if tabbing to radio or checkbox. - if (e.which === M.keys.TAB) { - $(this).addClass('tabbed'); - let $this = $(this); - $this.one('blur', function(e) { - $(this).removeClass('tabbed'); - }); - return; - } - }); - - const text_area_selector = '.materialize-textarea'; - $(text_area_selector).each(function() { - let $textarea = $(this); - /** - * Resize textarea on document load after storing - * the original height and the original length - */ - $textarea.data('original-height', $textarea.height()); - $textarea.data('previous-length', this.value.length); - M.textareaAutoResize($textarea); - }); - - $(document).on('keyup', text_area_selector, function() { - M.textareaAutoResize($(this)); - }); - $(document).on('keydown', text_area_selector, function() { - M.textareaAutoResize($(this)); - }); - - - // File Input Path - $(document).on('change', '.file-field input[type="file"]', function() { - let file_field = $(this).closest('.file-field'); - let path_input = file_field.find('input.file-path'); - let files = $(this)[0].files; - let file_names = []; - for (let i = 0; i < files.length; i++) { - file_names.push(files[i].name); - } - path_input[0].value = file_names.join(', '); - path_input.trigger('change'); - }); - - }); // End of $(document).ready -})(cash); diff --git a/js/global.js b/js/global.js deleted file mode 100644 index 9a1f0fd74f..0000000000 --- a/js/global.js +++ /dev/null @@ -1,419 +0,0 @@ -// Required for Meteor package, the use of window prevents export by Meteor -(function(window) { - if (window.Package) { - M = {}; - } else { - window.M = {}; - } - - // Check for jQuery - M.jQueryLoaded = !!window.jQuery; -})(window); - -// AMD -if (typeof define === 'function' && define.amd) { - define('M', [], function() { - return M; - }); - - // Common JS -} else if (typeof exports !== 'undefined' && !exports.nodeType) { - if (typeof module !== 'undefined' && !module.nodeType && module.exports) { - exports = module.exports = M; - } - exports.default = M; -} - -M.version = '1.2.2'; - -M.keys = { - TAB: 9, - ENTER: 13, - ESC: 27, - ARROW_UP: 38, - ARROW_DOWN: 40 -}; - -/** - * TabPress Keydown handler - */ -M.tabPressed = false; -M.keyDown = false; -let docHandleKeydown = function(e) { - M.keyDown = true; - if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) { - M.tabPressed = true; - } -}; -let docHandleKeyup = function(e) { - M.keyDown = false; - if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) { - M.tabPressed = false; - } -}; -let docHandleFocus = function(e) { - if (M.keyDown) { - document.body.classList.add('keyboard-focused'); - } -}; -let docHandleBlur = function(e) { - document.body.classList.remove('keyboard-focused'); -}; -document.addEventListener('keydown', docHandleKeydown, true); -document.addEventListener('keyup', docHandleKeyup, true); -document.addEventListener('focus', docHandleFocus, true); -document.addEventListener('blur', docHandleBlur, true); - -/** - * Initialize jQuery wrapper for plugin - * @param {Class} plugin javascript class - * @param {string} pluginName jQuery plugin name - * @param {string} classRef Class reference name - */ -M.initializeJqueryWrapper = function(plugin, pluginName, classRef) { - jQuery.fn[pluginName] = function(methodOrOptions) { - // Call plugin method if valid method name is passed in - if (plugin.prototype[methodOrOptions]) { - let params = Array.prototype.slice.call(arguments, 1); - - // Getter methods - if (methodOrOptions.slice(0, 3) === 'get') { - let instance = this.first()[0][classRef]; - return instance[methodOrOptions].apply(instance, params); - } - - // Void methods - return this.each(function() { - let instance = this[classRef]; - instance[methodOrOptions].apply(instance, params); - }); - - // Initialize plugin if options or no argument is passed in - } else if (typeof methodOrOptions === 'object' || !methodOrOptions) { - plugin.init(this, arguments[0]); - return this; - } - - // Return error if an unrecognized method name is passed in - jQuery.error(`Method ${methodOrOptions} does not exist on jQuery.${pluginName}`); - }; -}; - -/** - * Automatically initialize components - * @param {Element} context DOM Element to search within for components - */ -M.AutoInit = function(context) { - // Use document.body if no context is given - let root = !!context ? context : document.body; - - let registry = { - Autocomplete: root.querySelectorAll('.autocomplete:not(.no-autoinit)'), - Carousel: root.querySelectorAll('.carousel:not(.no-autoinit)'), - Chips: root.querySelectorAll('.chips:not(.no-autoinit)'), - Collapsible: root.querySelectorAll('.collapsible:not(.no-autoinit)'), - Datepicker: root.querySelectorAll('.datepicker:not(.no-autoinit)'), - Dropdown: root.querySelectorAll('.dropdown-trigger:not(.no-autoinit)'), - Materialbox: root.querySelectorAll('.materialboxed:not(.no-autoinit)'), - Modal: root.querySelectorAll('.modal:not(.no-autoinit)'), - Parallax: root.querySelectorAll('.parallax:not(.no-autoinit)'), - Pushpin: root.querySelectorAll('.pushpin:not(.no-autoinit)'), - ScrollSpy: root.querySelectorAll('.scrollspy:not(.no-autoinit)'), - FormSelect: root.querySelectorAll('select:not(.no-autoinit)'), - Sidenav: root.querySelectorAll('.sidenav:not(.no-autoinit)'), - Tabs: root.querySelectorAll('.tabs:not(.no-autoinit)'), - TapTarget: root.querySelectorAll('.tap-target:not(.no-autoinit)'), - Timepicker: root.querySelectorAll('.timepicker:not(.no-autoinit)'), - Tooltip: root.querySelectorAll('.tooltipped:not(.no-autoinit)'), - FloatingActionButton: root.querySelectorAll('.fixed-action-btn:not(.no-autoinit)') - }; - - for (let pluginName in registry) { - let plugin = M[pluginName]; - plugin.init(registry[pluginName]); - } -}; - -/** - * Generate approximated selector string for a jQuery object - * @param {jQuery} obj jQuery object to be parsed - * @returns {string} - */ -M.objectSelectorString = function(obj) { - let tagStr = obj.prop('tagName') || ''; - let idStr = obj.attr('id') || ''; - let classStr = obj.attr('class') || ''; - return (tagStr + idStr + classStr).replace(/\s/g, ''); -}; - -// Unique Random ID -M.guid = (function() { - function s4() { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - } - return function() { - return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); - }; -})(); - -/** - * @typedef {Object} Edges - * @property {Boolean} top If the top edge was exceeded - * @property {Boolean} right If the right edge was exceeded - * @property {Boolean} bottom If the bottom edge was exceeded - * @property {Boolean} left If the left edge was exceeded - */ - -/** - * @typedef {Object} Bounding - * @property {Number} left left offset coordinate - * @property {Number} top top offset coordinate - * @property {Number} width - * @property {Number} height - */ - -/** - * Escapes hash from special characters - * @param {Element} container Container element that acts as the boundary - * @param {Bounding} bounding element bounding that is being checked - * @param {Number} offset offset from edge that counts as exceeding - * @returns {Edges} - */ -M.checkWithinContainer = function(container, bounding, offset) { - let edges = { - top: false, - right: false, - bottom: false, - left: false - }; - - let containerRect = container.getBoundingClientRect(); - // If body element is smaller than viewport, use viewport height instead. - let containerBottom = - container === document.body - ? Math.max(containerRect.bottom, window.innerHeight) - : containerRect.bottom; - - let scrollLeft = container.scrollLeft; - let scrollTop = container.scrollTop; - - let scrolledX = bounding.left - scrollLeft; - let scrolledY = bounding.top - scrollTop; - - // Check for container and viewport for each edge - if (scrolledX < containerRect.left + offset || scrolledX < offset) { - edges.left = true; - } - - if ( - scrolledX + bounding.width > containerRect.right - offset || - scrolledX + bounding.width > window.innerWidth - offset - ) { - edges.right = true; - } - - if (scrolledY < containerRect.top + offset || scrolledY < offset) { - edges.top = true; - } - - if ( - scrolledY + bounding.height > containerBottom - offset || - scrolledY + bounding.height > window.innerHeight - offset - ) { - edges.bottom = true; - } - - return edges; -}; - -M.checkPossibleAlignments = function(el, container, bounding, offset) { - let canAlign = { - top: true, - right: true, - bottom: true, - left: true, - spaceOnTop: null, - spaceOnRight: null, - spaceOnBottom: null, - spaceOnLeft: null - }; - - let containerAllowsOverflow = getComputedStyle(container).overflow === 'visible'; - let containerRect = container.getBoundingClientRect(); - let containerHeight = Math.min(containerRect.height, window.innerHeight); - let containerWidth = Math.min(containerRect.width, window.innerWidth); - let elOffsetRect = el.getBoundingClientRect(); - - let scrollLeft = container.scrollLeft; - let scrollTop = container.scrollTop; - - let scrolledX = bounding.left - scrollLeft; - let scrolledYTopEdge = bounding.top - scrollTop; - let scrolledYBottomEdge = bounding.top + elOffsetRect.height - scrollTop; - - // Check for container and viewport for left - canAlign.spaceOnRight = !containerAllowsOverflow - ? containerWidth - (scrolledX + bounding.width) - : window.innerWidth - (elOffsetRect.left + bounding.width); - if (canAlign.spaceOnRight < 0) { - canAlign.left = false; - } - - // Check for container and viewport for Right - canAlign.spaceOnLeft = !containerAllowsOverflow - ? scrolledX - bounding.width + elOffsetRect.width - : elOffsetRect.right - bounding.width; - if (canAlign.spaceOnLeft < 0) { - canAlign.right = false; - } - - // Check for container and viewport for Top - canAlign.spaceOnBottom = !containerAllowsOverflow - ? containerHeight - (scrolledYTopEdge + bounding.height + offset) - : window.innerHeight - (elOffsetRect.top + bounding.height + offset); - if (canAlign.spaceOnBottom < 0) { - canAlign.top = false; - } - - // Check for container and viewport for Bottom - canAlign.spaceOnTop = !containerAllowsOverflow - ? scrolledYBottomEdge - (bounding.height - offset) - : elOffsetRect.bottom - (bounding.height + offset); - if (canAlign.spaceOnTop < 0) { - canAlign.bottom = false; - } - - return canAlign; -}; - -M.getOverflowParent = function(element) { - if (element == null) { - return null; - } - - if (element === document.body || getComputedStyle(element).overflow !== 'visible') { - return element; - } - - return M.getOverflowParent(element.parentElement); -}; - -/** - * Gets id of component from a trigger - * @param {Element} trigger trigger - * @returns {string} - */ -M.getIdFromTrigger = function(trigger) { - let id = trigger.getAttribute('data-target'); - if (!id) { - id = trigger.getAttribute('href'); - if (id) { - id = id.slice(1); - } else { - id = ''; - } - } - return id; -}; - -/** - * Multi browser support for document scroll top - * @returns {Number} - */ -M.getDocumentScrollTop = function() { - return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; -}; - -/** - * Multi browser support for document scroll left - * @returns {Number} - */ -M.getDocumentScrollLeft = function() { - return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; -}; - -/** - * @typedef {Object} Edges - * @property {Boolean} top If the top edge was exceeded - * @property {Boolean} right If the right edge was exceeded - * @property {Boolean} bottom If the bottom edge was exceeded - * @property {Boolean} left If the left edge was exceeded - */ - -/** - * @typedef {Object} Bounding - * @property {Number} left left offset coordinate - * @property {Number} top top offset coordinate - * @property {Number} width - * @property {Number} height - */ - -/** - * Get time in ms - * @license https://raw.github.com/jashkenas/underscore/master/LICENSE - * @type {function} - * @return {number} - */ -let getTime = - Date.now || - function() { - return new Date().getTime(); - }; - -/** - * Returns a function, that, when invoked, will only be triggered at most once - * during a given window of time. Normally, the throttled function will run - * as much as it can, without ever going more than once per `wait` duration; - * but if you'd like to disable the execution on the leading edge, pass - * `{leading: false}`. To disable execution on the trailing edge, ditto. - * @license https://raw.github.com/jashkenas/underscore/master/LICENSE - * @param {function} func - * @param {number} wait - * @param {Object=} options - * @returns {Function} - */ -M.throttle = function(func, wait, options) { - let context, args, result; - let timeout = null; - let previous = 0; - options || (options = {}); - let later = function() { - previous = options.leading === false ? 0 : getTime(); - timeout = null; - result = func.apply(context, args); - context = args = null; - }; - return function() { - let now = getTime(); - if (!previous && options.leading === false) previous = now; - let remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; -}; - -/* Feature detection */ -var passiveIfSupported = false; -try { - window.addEventListener( - 'test', - null, - Object.defineProperty({}, 'passive', { - get: function() { - passiveIfSupported = { passive: false }; - } - }) - ); -} catch (err) {} diff --git a/js/materialbox.js b/js/materialbox.js deleted file mode 100644 index f682db54ff..0000000000 --- a/js/materialbox.js +++ /dev/null @@ -1,453 +0,0 @@ -(function($, anim) { - 'use strict'; - - let _defaults = { - inDuration: 275, - outDuration: 200, - onOpenStart: null, - onOpenEnd: null, - onCloseStart: null, - onCloseEnd: null - }; - - /** - * @class - * - */ - class Materialbox extends Component { - /** - * Construct Materialbox instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - constructor(el, options) { - super(Materialbox, el, options); - - this.el.M_Materialbox = this; - - /** - * Options for the modal - * @member Materialbox#options - * @prop {Number} [inDuration=275] - Length in ms of enter transition - * @prop {Number} [outDuration=200] - Length in ms of exit transition - * @prop {Function} onOpenStart - Callback function called before materialbox is opened - * @prop {Function} onOpenEnd - Callback function called after materialbox is opened - * @prop {Function} onCloseStart - Callback function called before materialbox is closed - * @prop {Function} onCloseEnd - Callback function called after materialbox is closed - */ - this.options = $.extend({}, Materialbox.defaults, options); - - this.overlayActive = false; - this.doneAnimating = true; - this.placeholder = $('
    ').addClass('material-placeholder'); - this.originalWidth = 0; - this.originalHeight = 0; - this.originInlineStyles = this.$el.attr('style'); - this.caption = this.el.getAttribute('data-caption') || ''; - - // Wrap - this.$el.before(this.placeholder); - this.placeholder.append(this.$el); - - this._setupEventHandlers(); - } - - static get defaults() { - return _defaults; - } - - static init(els, options) { - return super.init(this, els, options); - } - - /** - * Get Instance - */ - static getInstance(el) { - let domElem = !!el.jquery ? el[0] : el; - return domElem.M_Materialbox; - } - - /** - * Teardown component - */ - destroy() { - this._removeEventHandlers(); - this.el.M_Materialbox = undefined; - - // Unwrap image - $(this.placeholder) - .after(this.el) - .remove(); - - this.$el.removeAttr('style'); - } - - /** - * Setup Event Handlers - */ - _setupEventHandlers() { - this._handleMaterialboxClickBound = this._handleMaterialboxClick.bind(this); - this.el.addEventListener('click', this._handleMaterialboxClickBound); - } - - /** - * Remove Event Handlers - */ - _removeEventHandlers() { - this.el.removeEventListener('click', this._handleMaterialboxClickBound); - } - - /** - * Handle Materialbox Click - * @param {Event} e - */ - _handleMaterialboxClick(e) { - // If already modal, return to original - if (this.doneAnimating === false || (this.overlayActive && this.doneAnimating)) { - this.close(); - } else { - this.open(); - } - } - - /** - * Handle Window Scroll - */ - _handleWindowScroll() { - if (this.overlayActive) { - this.close(); - } - } - - /** - * Handle Window Resize - */ - _handleWindowResize() { - if (this.overlayActive) { - this.close(); - } - } - - /** - * Handle Window Resize - * @param {Event} e - */ - _handleWindowEscape(e) { - // ESC key - if (e.keyCode === 27 && this.doneAnimating && this.overlayActive) { - this.close(); - } - } - - /** - * Find ancestors with overflow: hidden; and make visible - */ - _makeAncestorsOverflowVisible() { - this.ancestorsChanged = $(); - let ancestor = this.placeholder[0].parentNode; - while (ancestor !== null && !$(ancestor).is(document)) { - let curr = $(ancestor); - if (curr.css('overflow') !== 'visible') { - curr.css('overflow', 'visible'); - if (this.ancestorsChanged === undefined) { - this.ancestorsChanged = curr; - } else { - this.ancestorsChanged = this.ancestorsChanged.add(curr); - } - } - ancestor = ancestor.parentNode; - } - } - - /** - * Animate image in - */ - _animateImageIn() { - let animOptions = { - targets: this.el, - height: [this.originalHeight, this.newHeight], - width: [this.originalWidth, this.newWidth], - left: - M.getDocumentScrollLeft() + - this.windowWidth / 2 - - this.placeholder.offset().left - - this.newWidth / 2, - top: - M.getDocumentScrollTop() + - this.windowHeight / 2 - - this.placeholder.offset().top - - this.newHeight / 2, - duration: this.options.inDuration, - easing: 'easeOutQuad', - complete: () => { - this.doneAnimating = true; - - // onOpenEnd callback - if (typeof this.options.onOpenEnd === 'function') { - this.options.onOpenEnd.call(this, this.el); - } - } - }; - - // Override max-width or max-height if needed - this.maxWidth = this.$el.css('max-width'); - this.maxHeight = this.$el.css('max-height'); - if (this.maxWidth !== 'none') { - animOptions.maxWidth = this.newWidth; - } - if (this.maxHeight !== 'none') { - animOptions.maxHeight = this.newHeight; - } - - anim(animOptions); - } - - /** - * Animate image out - */ - _animateImageOut() { - let animOptions = { - targets: this.el, - width: this.originalWidth, - height: this.originalHeight, - left: 0, - top: 0, - duration: this.options.outDuration, - easing: 'easeOutQuad', - complete: () => { - this.placeholder.css({ - height: '', - width: '', - position: '', - top: '', - left: '' - }); - - // Revert to width or height attribute - if (this.attrWidth) { - this.$el.attr('width', this.attrWidth); - } - if (this.attrHeight) { - this.$el.attr('height', this.attrHeight); - } - - this.$el.removeAttr('style'); - this.originInlineStyles && this.$el.attr('style', this.originInlineStyles); - - // Remove class - this.$el.removeClass('active'); - this.doneAnimating = true; - - // Remove overflow overrides on ancestors - if (this.ancestorsChanged.length) { - this.ancestorsChanged.css('overflow', ''); - } - - // onCloseEnd callback - if (typeof this.options.onCloseEnd === 'function') { - this.options.onCloseEnd.call(this, this.el); - } - } - }; - - anim(animOptions); - } - - /** - * Update open and close vars - */ - _updateVars() { - this.windowWidth = window.innerWidth; - this.windowHeight = window.innerHeight; - this.caption = this.el.getAttribute('data-caption') || ''; - } - - /** - * Open Materialbox - */ - open() { - this._updateVars(); - this.originalWidth = this.el.getBoundingClientRect().width; - this.originalHeight = this.el.getBoundingClientRect().height; - - // Set states - this.doneAnimating = false; - this.$el.addClass('active'); - this.overlayActive = true; - - // onOpenStart callback - if (typeof this.options.onOpenStart === 'function') { - this.options.onOpenStart.call(this, this.el); - } - - // Set positioning for placeholder - this.placeholder.css({ - width: this.placeholder[0].getBoundingClientRect().width + 'px', - height: this.placeholder[0].getBoundingClientRect().height + 'px', - position: 'relative', - top: 0, - left: 0 - }); - - this._makeAncestorsOverflowVisible(); - - // Set css on origin - this.$el.css({ - position: 'absolute', - 'z-index': 1000, - 'will-change': 'left, top, width, height' - }); - - // Change from width or height attribute to css - this.attrWidth = this.$el.attr('width'); - this.attrHeight = this.$el.attr('height'); - if (this.attrWidth) { - this.$el.css('width', this.attrWidth + 'px'); - this.$el.removeAttr('width'); - } - if (this.attrHeight) { - this.$el.css('width', this.attrHeight + 'px'); - this.$el.removeAttr('height'); - } - - // Add overlay - this.$overlay = $('
    ') - .css({ - opacity: 0 - }) - .one('click', () => { - if (this.doneAnimating) { - this.close(); - } - }); - - // Put before in origin image to preserve z-index layering. - this.$el.before(this.$overlay); - - // Set dimensions if needed - let overlayOffset = this.$overlay[0].getBoundingClientRect(); - this.$overlay.css({ - width: this.windowWidth + 'px', - height: this.windowHeight + 'px', - left: -1 * overlayOffset.left + 'px', - top: -1 * overlayOffset.top + 'px' - }); - - anim.remove(this.el); - anim.remove(this.$overlay[0]); - - // Animate Overlay - anim({ - targets: this.$overlay[0], - opacity: 1, - duration: this.options.inDuration, - easing: 'easeOutQuad' - }); - - // Add and animate caption if it exists - if (this.caption !== '') { - if (this.$photocaption) { - anim.remove(this.$photoCaption[0]); - } - this.$photoCaption = $('
    '); - this.$photoCaption.text(this.caption); - $('body').append(this.$photoCaption); - this.$photoCaption.css({ display: 'inline' }); - - anim({ - targets: this.$photoCaption[0], - opacity: 1, - duration: this.options.inDuration, - easing: 'easeOutQuad' - }); - } - - // Resize Image - let ratio = 0; - let widthPercent = this.originalWidth / this.windowWidth; - let heightPercent = this.originalHeight / this.windowHeight; - this.newWidth = 0; - this.newHeight = 0; - - if (widthPercent > heightPercent) { - ratio = this.originalHeight / this.originalWidth; - this.newWidth = this.windowWidth * 0.9; - this.newHeight = this.windowWidth * 0.9 * ratio; - } else { - ratio = this.originalWidth / this.originalHeight; - this.newWidth = this.windowHeight * 0.9 * ratio; - this.newHeight = this.windowHeight * 0.9; - } - - this._animateImageIn(); - - // Handle Exit triggers - this._handleWindowScrollBound = this._handleWindowScroll.bind(this); - this._handleWindowResizeBound = this._handleWindowResize.bind(this); - this._handleWindowEscapeBound = this._handleWindowEscape.bind(this); - - window.addEventListener('scroll', this._handleWindowScrollBound); - window.addEventListener('resize', this._handleWindowResizeBound); - window.addEventListener('keyup', this._handleWindowEscapeBound); - } - - /** - * Close Materialbox - */ - close() { - this._updateVars(); - this.doneAnimating = false; - - // onCloseStart callback - if (typeof this.options.onCloseStart === 'function') { - this.options.onCloseStart.call(this, this.el); - } - - anim.remove(this.el); - anim.remove(this.$overlay[0]); - - if (this.caption !== '') { - anim.remove(this.$photoCaption[0]); - } - - // disable exit handlers - window.removeEventListener('scroll', this._handleWindowScrollBound); - window.removeEventListener('resize', this._handleWindowResizeBound); - window.removeEventListener('keyup', this._handleWindowEscapeBound); - - anim({ - targets: this.$overlay[0], - opacity: 0, - duration: this.options.outDuration, - easing: 'easeOutQuad', - complete: () => { - this.overlayActive = false; - this.$overlay.remove(); - } - }); - - this._animateImageOut(); - - // Remove Caption + reset css settings on image - if (this.caption !== '') { - anim({ - targets: this.$photoCaption[0], - opacity: 0, - duration: this.options.outDuration, - easing: 'easeOutQuad', - complete: () => { - this.$photoCaption.remove(); - } - }); - } - } - } - - M.Materialbox = Materialbox; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Materialbox, 'materialbox', 'M_Materialbox'); - } -})(cash, M.anime); diff --git a/js/modal.js b/js/modal.js deleted file mode 100644 index 9f8b2facf8..0000000000 --- a/js/modal.js +++ /dev/null @@ -1,382 +0,0 @@ -(function($, anim) { - 'use strict'; - - let _defaults = { - opacity: 0.5, - inDuration: 250, - outDuration: 250, - onOpenStart: null, - onOpenEnd: null, - onCloseStart: null, - onCloseEnd: null, - preventScrolling: true, - dismissible: true, - startingTop: '4%', - endingTop: '10%' - }; - - /** - * @class - * - */ - class Modal extends Component { - /** - * Construct Modal instance and set up overlay - * @constructor - * @param {Element} el - * @param {Object} options - */ - constructor(el, options) { - super(Modal, el, options); - - this.el.M_Modal = this; - - /** - * Options for the modal - * @member Modal#options - * @prop {Number} [opacity=0.5] - Opacity of the modal overlay - * @prop {Number} [inDuration=250] - Length in ms of enter transition - * @prop {Number} [outDuration=250] - Length in ms of exit transition - * @prop {Function} onOpenStart - Callback function called before modal is opened - * @prop {Function} onOpenEnd - Callback function called after modal is opened - * @prop {Function} onCloseStart - Callback function called before modal is closed - * @prop {Function} onCloseEnd - Callback function called after modal is closed - * @prop {Boolean} [dismissible=true] - Allow modal to be dismissed by keyboard or overlay click - * @prop {String} [startingTop='4%'] - startingTop - * @prop {String} [endingTop='10%'] - endingTop - */ - this.options = $.extend({}, Modal.defaults, options); - - /** - * Describes open/close state of modal - * @type {Boolean} - */ - this.isOpen = false; - - this.id = this.$el.attr('id'); - this._openingTrigger = undefined; - this.$overlay = $(''); - this.el.tabIndex = 0; - this._nthModalOpened = 0; - - Modal._count++; - this._setupEventHandlers(); - } - - static get defaults() { - return _defaults; - } - - static init(els, options) { - return super.init(this, els, options); - } - - /** - * Get Instance - */ - static getInstance(el) { - let domElem = !!el.jquery ? el[0] : el; - return domElem.M_Modal; - } - - /** - * Teardown component - */ - destroy() { - Modal._count--; - this._removeEventHandlers(); - this.el.removeAttribute('style'); - this.$overlay.remove(); - this.el.M_Modal = undefined; - } - - /** - * Setup Event Handlers - */ - _setupEventHandlers() { - this._handleOverlayClickBound = this._handleOverlayClick.bind(this); - this._handleModalCloseClickBound = this._handleModalCloseClick.bind(this); - - if (Modal._count === 1) { - document.body.addEventListener('click', this._handleTriggerClick); - } - this.$overlay[0].addEventListener('click', this._handleOverlayClickBound); - this.el.addEventListener('click', this._handleModalCloseClickBound); - } - - /** - * Remove Event Handlers - */ - _removeEventHandlers() { - if (Modal._count === 0) { - document.body.removeEventListener('click', this._handleTriggerClick); - } - this.$overlay[0].removeEventListener('click', this._handleOverlayClickBound); - this.el.removeEventListener('click', this._handleModalCloseClickBound); - } - - /** - * Handle Trigger Click - * @param {Event} e - */ - _handleTriggerClick(e) { - let $trigger = $(e.target).closest('.modal-trigger'); - if ($trigger.length) { - let modalId = M.getIdFromTrigger($trigger[0]); - let modalInstance = document.getElementById(modalId).M_Modal; - if (modalInstance) { - modalInstance.open($trigger); - } - e.preventDefault(); - } - } - - /** - * Handle Overlay Click - */ - _handleOverlayClick() { - if (this.options.dismissible) { - this.close(); - } - } - - /** - * Handle Modal Close Click - * @param {Event} e - */ - _handleModalCloseClick(e) { - let $closeTrigger = $(e.target).closest('.modal-close'); - if ($closeTrigger.length) { - this.close(); - } - } - - /** - * Handle Keydown - * @param {Event} e - */ - _handleKeydown(e) { - // ESC key - if (e.keyCode === 27 && this.options.dismissible) { - this.close(); - } - } - - /** - * Handle Focus - * @param {Event} e - */ - _handleFocus(e) { - // Only trap focus if this modal is the last model opened (prevents loops in nested modals). - if (!this.el.contains(e.target) && this._nthModalOpened === Modal._modalsOpen) { - this.el.focus(); - } - } - - /** - * Animate in modal - */ - _animateIn() { - // Set initial styles - $.extend(this.el.style, { - display: 'block', - opacity: 0 - }); - $.extend(this.$overlay[0].style, { - display: 'block', - opacity: 0 - }); - - // Animate overlay - anim({ - targets: this.$overlay[0], - opacity: this.options.opacity, - duration: this.options.inDuration, - easing: 'easeOutQuad' - }); - - // Define modal animation options - let enterAnimOptions = { - targets: this.el, - duration: this.options.inDuration, - easing: 'easeOutCubic', - // Handle modal onOpenEnd callback - complete: () => { - if (typeof this.options.onOpenEnd === 'function') { - this.options.onOpenEnd.call(this, this.el, this._openingTrigger); - } - } - }; - - // Bottom sheet animation - if (this.el.classList.contains('bottom-sheet')) { - $.extend(enterAnimOptions, { - bottom: 0, - opacity: 1 - }); - anim(enterAnimOptions); - - // Normal modal animation - } else { - $.extend(enterAnimOptions, { - top: [this.options.startingTop, this.options.endingTop], - opacity: 1, - scaleX: [0.8, 1], - scaleY: [0.8, 1] - }); - anim(enterAnimOptions); - } - } - - /** - * Animate out modal - */ - _animateOut() { - // Animate overlay - anim({ - targets: this.$overlay[0], - opacity: 0, - duration: this.options.outDuration, - easing: 'easeOutQuart' - }); - - // Define modal animation options - let exitAnimOptions = { - targets: this.el, - duration: this.options.outDuration, - easing: 'easeOutCubic', - // Handle modal ready callback - complete: () => { - this.el.style.display = 'none'; - this.$overlay.remove(); - - // Call onCloseEnd callback - if (typeof this.options.onCloseEnd === 'function') { - this.options.onCloseEnd.call(this, this.el); - } - } - }; - - // Bottom sheet animation - if (this.el.classList.contains('bottom-sheet')) { - $.extend(exitAnimOptions, { - bottom: '-100%', - opacity: 0 - }); - anim(exitAnimOptions); - - // Normal modal animation - } else { - $.extend(exitAnimOptions, { - top: [this.options.endingTop, this.options.startingTop], - opacity: 0, - scaleX: 0.8, - scaleY: 0.8 - }); - anim(exitAnimOptions); - } - } - - /** - * Open Modal - * @param {cash} [$trigger] - */ - open($trigger) { - if (this.isOpen) { - return; - } - - this.isOpen = true; - Modal._modalsOpen++; - this._nthModalOpened = Modal._modalsOpen; - - // Set Z-Index based on number of currently open modals - this.$overlay[0].style.zIndex = 1000 + Modal._modalsOpen * 2; - this.el.style.zIndex = 1000 + Modal._modalsOpen * 2 + 1; - - // Set opening trigger, undefined indicates modal was opened by javascript - this._openingTrigger = !!$trigger ? $trigger[0] : undefined; - - // onOpenStart callback - if (typeof this.options.onOpenStart === 'function') { - this.options.onOpenStart.call(this, this.el, this._openingTrigger); - } - - if (this.options.preventScrolling) { - document.body.style.overflow = 'hidden'; - } - - this.el.classList.add('open'); - this.el.insertAdjacentElement('afterend', this.$overlay[0]); - - if (this.options.dismissible) { - this._handleKeydownBound = this._handleKeydown.bind(this); - this._handleFocusBound = this._handleFocus.bind(this); - document.addEventListener('keydown', this._handleKeydownBound); - document.addEventListener('focus', this._handleFocusBound, true); - } - - anim.remove(this.el); - anim.remove(this.$overlay[0]); - this._animateIn(); - - // Focus modal - this.el.focus(); - - return this; - } - - /** - * Close Modal - */ - close() { - if (!this.isOpen) { - return; - } - - this.isOpen = false; - Modal._modalsOpen--; - this._nthModalOpened = 0; - - // Call onCloseStart callback - if (typeof this.options.onCloseStart === 'function') { - this.options.onCloseStart.call(this, this.el); - } - - this.el.classList.remove('open'); - - // Enable body scrolling only if there are no more modals open. - if (Modal._modalsOpen === 0) { - document.body.style.overflow = ''; - } - - if (this.options.dismissible) { - document.removeEventListener('keydown', this._handleKeydownBound); - document.removeEventListener('focus', this._handleFocusBound, true); - } - - anim.remove(this.el); - anim.remove(this.$overlay[0]); - this._animateOut(); - return this; - } - } - - /** - * @static - * @memberof Modal - */ - Modal._modalsOpen = 0; - - /** - * @static - * @memberof Modal - */ - Modal._count = 0; - - M.Modal = Modal; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Modal, 'modal', 'M_Modal'); - } -})(cash, M.anime); diff --git a/js/select.js b/js/select.js deleted file mode 100644 index 1ae00d76cd..0000000000 --- a/js/select.js +++ /dev/null @@ -1,401 +0,0 @@ -(function($) { - 'use strict'; - - let _defaults = { - classes: '', - dropdownOptions: {} - }; - - class FormSelect extends Component { - constructor(el, options) { - super(FormSelect, el, options); - if (this.$el.hasClass('browser-default')) return; - this.el.M_FormSelect = this; - this.options = $.extend({}, FormSelect.defaults, options); - this.isMultiple = this.$el.prop('multiple'); - this.el.tabIndex = -1; - this._values = []; - this.labelEl = null; - this._labelFor = false; - this._setupDropdown(); - this._setupEventHandlers(); - } - static get defaults() { - return _defaults; - } - static init(els, options) { - return super.init(this, els, options); - } - static getInstance(el) { - let domElem = !!el.jquery ? el[0] : el; - return domElem.M_FormSelect; - } - destroy() { - // Returns label to its original owner - if (this._labelFor) this.labelEl.setAttribute("for", this.el.id); - this._removeEventHandlers(); - this._removeDropdown(); - this.el.M_FormSelect = undefined; - } - _setupEventHandlers() { - this._handleSelectChangeBound = this._handleSelectChange.bind(this); - this._handleOptionClickBound = this._handleOptionClick.bind(this); - this._handleInputClickBound = this._handleInputClick.bind(this); - $(this.dropdownOptions) - .find('li:not(.optgroup)') - .each((el) => { - el.addEventListener('click', this._handleOptionClickBound); - el.addEventListener('keydown', (e) => { - if (e.key === " " || e.key === "Enter") this._handleOptionClickBound(e); - }); - }); - this.el.addEventListener('change', this._handleSelectChangeBound); - this.input.addEventListener('click', this._handleInputClickBound); - } - _removeEventHandlers() { - $(this.dropdownOptions) - .find('li:not(.optgroup)') - .each((el) => { - el.removeEventListener('click', this._handleOptionClickBound); - }); - this.el.removeEventListener('change', this._handleSelectChangeBound); - this.input.removeEventListener('click', this._handleInputClickBound); - } - _handleSelectChange(e) { - this._setValueToInput(); - } - _handleOptionClick(e) { - e.preventDefault(); - let virtualOption = $(e.target).closest('li')[0]; - this._selectOptionElement(virtualOption); - e.stopPropagation(); - } - _arraysEqual(a, b) { - if (a === b) return true; - if (a == null || b == null) return false; - if (a.length !== b.length) return false; - for (let i = 0; i < a.length; ++i) if (a[i] !== b[i]) return false; - return true; - } - _selectOptionElement(virtualOption) { - if (!$(virtualOption).hasClass('disabled') && !$(virtualOption).hasClass('optgroup')) { - const value = this._values.filter((value) => value.optionEl === virtualOption)[0]; - const previousSelectedValues = this.getSelectedValues(); - if (this.isMultiple) { - // Multi-Select - this._toggleEntryFromArray(value); - } else { - // Single-Select - this._deselectAll(); - this._selectValue(value); - } - // Refresh Input-Text - this._setValueToInput(); - // Trigger Change-Event only when data is different - const actualSelectedValues = this.getSelectedValues(); - const selectionHasChanged = !this._arraysEqual( - previousSelectedValues, - actualSelectedValues - ); - if (selectionHasChanged) this.$el.trigger('change'); - } - if (!this.isMultiple) this.dropdown.close(); - } - _handleInputClick() { - if (this.dropdown && this.dropdown.isOpen) { - this._setValueToInput(); - this._setSelectedStates(); - } - } - _setupDropdown() { - this.wrapper = document.createElement('div'); - this.wrapper.classList.add('select-wrapper'); - this.wrapper.classList.add('input-field'); - - if (this.options.classes.length > 0) { - const customClasses = this.options.classes.split(' ') || []; - customClasses.forEach(customClass => this.wrapper.classList.add(customClass)); - } - - this.$el.before($(this.wrapper)); - - // Move actual select element into overflow hidden wrapper - let $hideSelect = $('
    '); - $(this.wrapper).append($hideSelect); - $hideSelect[0].appendChild(this.el); - - if (this.el.disabled) this.wrapper.classList.add('disabled'); - - // Create dropdown - this.$selectOptions = this.$el.children('option, optgroup'); - this.dropdownOptions = document.createElement('ul'); - this.dropdownOptions.id = `select-options-${M.guid()}`; - $(this.dropdownOptions).addClass( - 'dropdown-content select-dropdown ' + (this.isMultiple ? 'multiple-select-dropdown' : '') - ); - this.dropdownOptions.setAttribute("role", "listbox"); - this.dropdownOptions.setAttribute("aria-multiselectable", this.isMultiple); - - // Create dropdown structure - if (this.$selectOptions.length) { - this.$selectOptions.each((realOption) => { - if ($(realOption).is('option')) { - // Option - const virtualOption = this._createAndAppendOptionWithIcon( - realOption, - this.isMultiple ? 'multiple' : undefined - ); - this._addOptionToValues(realOption, virtualOption); - } else if ($(realOption).is('optgroup')) { - // Optgroup - const selectOptions = $(realOption).children('option'); - let lId = "opt-group-" + M.guid(); - let groupParent = $( - `
  • ${realOption.getAttribute('label')}
  • ` - )[0]; - let groupChildren = []; - $(this.dropdownOptions).append(groupParent); - selectOptions.each((realOption) => { - const virtualOption = this._createAndAppendOptionWithIcon( - realOption, - 'optgroup-option' - ); - let cId = "opt-child-" + M.guid(); - virtualOption.id = cId; - groupChildren.push(cId); - this._addOptionToValues(realOption, virtualOption); - }); - groupParent.setAttribute("aria-owns", groupChildren.join(" ")); - } - }); - } - $(this.wrapper).append(this.dropdownOptions); - - // Add input dropdown - this.input = document.createElement('input'); - this.input.id = "m_select-input-" + M.guid(); - $(this.input).addClass('select-dropdown dropdown-trigger'); - this.input.setAttribute('type', 'text'); - this.input.setAttribute('readonly', 'true'); - this.input.setAttribute('data-target', this.dropdownOptions.id); - this.input.setAttribute('aria-readonly', 'true'); - this.input.setAttribute("aria-required", this.el.hasAttribute("required")); - if (this.el.disabled) $(this.input).prop('disabled', 'true'); - - // Makes new element to assume HTML's select label and - // aria-attributes, if exists - if (this.el.hasAttribute("aria-labelledby")){ - this.labelEl = document.getElementById(this.el.getAttribute("aria-labelledby")); - } - else if (this.el.id != ""){ - let lbl = $(`label[for='${this.el.id}']`); - if (lbl.length){ - this.labelEl = lbl[0]; - this.labelEl.removeAttribute("for"); - this._labelFor = true; - } - } - - // Tries to find a valid label in parent element - if (!this.labelEl){ - this.labelEl = this.el.parentElement.querySelector('label'); - } - if (this.labelEl && this.labelEl.id == ""){ - this.labelEl.id = "m_select-label-" + M.guid(); - } - - if (this.labelEl){ - this.labelEl.setAttribute("for", this.input.id); - this.dropdownOptions.setAttribute("aria-labelledby", this.labelEl.id); - } - else this.dropdownOptions.setAttribute("aria-label", ""); - - let attrs = this.el.attributes; - for (let i = 0; i < attrs.length; ++i){ - const attr = attrs[i]; - if (attr.name.startsWith("aria-")) - this.input.setAttribute(attr.name, attr.value); - } - - // Adds aria-attributes to input element - this.input.setAttribute("role", "combobox"); - this.input.setAttribute("aria-owns", this.dropdownOptions.id); - this.input.setAttribute("aria-controls", this.dropdownOptions.id); - this.input.setAttribute("aria-expanded", false); - this.input.placeholder = " "; - - $(this.wrapper).prepend(this.input); - this._setValueToInput(); - - // Add caret - let dropdownIcon = $( - '' - ); - $(this.wrapper).prepend(dropdownIcon[0]); - // Initialize dropdown - if (!this.el.disabled) { - let dropdownOptions = $.extend({}, this.options.dropdownOptions); - dropdownOptions.coverTrigger = false; - let userOnOpenEnd = dropdownOptions.onOpenEnd; - let userOnCloseEnd = dropdownOptions.onCloseEnd; - // Add callback for centering selected option when dropdown content is scrollable - dropdownOptions.onOpenEnd = (el) => { - let selectedOption = $(this.dropdownOptions) - .find('.selected') - .first(); - if (selectedOption.length) { - // Focus selected option in dropdown - M.keyDown = true; - this.dropdown.focusedIndex = selectedOption.index(); - this.dropdown._focusFocusedItem(); - M.keyDown = false; - // Handle scrolling to selected option - if (this.dropdown.isScrollable) { - let scrollOffset = - selectedOption[0].getBoundingClientRect().top - - this.dropdownOptions.getBoundingClientRect().top; // scroll to selected option - scrollOffset -= this.dropdownOptions.clientHeight / 2; // center in dropdown - this.dropdownOptions.scrollTop = scrollOffset; - } - } - // Sets "aria-expanded" to "true" - this.input.setAttribute("aria-expanded", true); - // Handle user declared onOpenEnd if needed - if (userOnOpenEnd && typeof userOnOpenEnd === 'function') - userOnOpenEnd.call(this.dropdown, this.el); - }; - // Add callback for reseting "expanded" state - dropdownOptions.onCloseEnd = (el) => { - // Sets "aria-expanded" to "false" - this.input.setAttribute("aria-expanded", false); - // Handle user declared onOpenEnd if needed - if (userOnCloseEnd && typeof userOnCloseEnd === 'function') - userOnCloseEnd.call(this.dropdown, this.el); - }; - // Prevent dropdown from closing too early - dropdownOptions.closeOnClick = false; - this.dropdown = M.Dropdown.init(this.input, dropdownOptions); - } - // Add initial selections - this._setSelectedStates(); - - // ! Workaround for Label: move label up again - if (this.labelEl) this.input.after(this.labelEl); - } - _addOptionToValues(realOption, virtualOption) { - this._values.push({ el: realOption, optionEl: virtualOption }); - } - _removeDropdown() { - $(this.wrapper) - .find('.caret') - .remove(); - $(this.input).remove(); - $(this.dropdownOptions).remove(); - $(this.wrapper).before(this.$el); - $(this.wrapper).remove(); - } - _createAndAppendOptionWithIcon(realOption, type) { - const li = document.createElement('li'); - li.setAttribute("role", "option"); - if (realOption.disabled){ - li.classList.add('disabled'); - li.setAttribute("aria-disabled", true); - } - if (type === 'optgroup-option') li.classList.add(type); - // Text / Checkbox - const span = document.createElement('span'); - if (this.isMultiple) - span.innerHTML = ``; - else span.innerHTML = realOption.innerHTML; - li.appendChild(span); - // add Icon - const iconUrl = realOption.getAttribute('data-icon'); - const classes = realOption.getAttribute('class'); - if (iconUrl) { - const img = $(``); - img[0].setAttribute("aria-hidden", true); - li.prepend(img[0]); - } - // Check for multiple type - $(this.dropdownOptions).append(li); - return li; - } - - _selectValue(value) { - value.el.selected = true; - value.optionEl.classList.add('selected'); - value.optionEl.setAttribute("aria-selected", true); - const checkbox = value.optionEl.querySelector('input[type="checkbox"]'); - if (checkbox) checkbox.checked = true; - } - _deselectValue(value) { - value.el.selected = false; - value.optionEl.classList.remove('selected'); - value.optionEl.setAttribute("aria-selected", false); - const checkbox = value.optionEl.querySelector('input[type="checkbox"]'); - if (checkbox) checkbox.checked = false; - } - _deselectAll() { - this._values.forEach((value) => { - this._deselectValue(value); - }); - } - _isValueSelected(value) { - const realValues = this.getSelectedValues(); - return realValues.some((realValue) => realValue === value.el.value); - } - _toggleEntryFromArray(value) { - const isSelected = this._isValueSelected(value); - if (isSelected) this._deselectValue(value); - else this._selectValue(value); - } - _getSelectedOptions() { - return Array.prototype.filter.call(this.el.selectedOptions, (realOption) => realOption); - } - - _setValueToInput() { - const realOptions = this._getSelectedOptions(); - const values = this._values.filter((value) => realOptions.indexOf(value.el) >= 0); - const texts = values.map((value) => value.optionEl.querySelector('span').innerText.trim()); - // Set input-text to first Option with empty value which indicates a description like "choose your option" - if (texts.length === 0) { - const firstDisabledOption = this.$el.find('option:disabled').eq(0); - if (firstDisabledOption.length > 0 && firstDisabledOption[0].value === '') { - this.input.value = firstDisabledOption.text(); - return; - } - } - this.input.value = texts.join(', '); - } - _setSelectedStates() { - this._values.forEach((value) => { - const optionIsSelected = $(value.el).prop('selected'); - $(value.optionEl) - .find('input[type="checkbox"]') - .prop('checked', optionIsSelected); - if (optionIsSelected) { - this._activateOption($(this.dropdownOptions), $(value.optionEl)); - } else { - $(value.optionEl).removeClass('selected'); - $(value.optionEl).attr("aria-selected", false); - } - }); - } - _activateOption(ul, li) { - if (!li) return; - if (!this.isMultiple) ul.find('li.selected').removeClass('selected'); - $(li).addClass('selected'); - $(li).attr("aria-selected", true); - } - - getSelectedValues() { - return this._getSelectedOptions().map((realOption) => realOption.value); - } - } - - M.FormSelect = FormSelect; - - if (M.jQueryLoaded) M.initializeJqueryWrapper(FormSelect, 'formSelect', 'M_FormSelect'); -})(cash); diff --git a/js/slider.js b/js/slider.js deleted file mode 100644 index fa9e27f059..0000000000 --- a/js/slider.js +++ /dev/null @@ -1,497 +0,0 @@ -(function($, anim) { - 'use strict'; - - let _defaults = { - indicators: true, - height: 400, - duration: 500, - interval: 6000, - pauseOnFocus: true, - pauseOnHover: true, - indicatorLabelFunc: null // Function which will generate a label for the indicators (ARIA) - }; - - /** - * @class - * - */ - class Slider extends Component { - /** - * Construct Slider instance and set up overlay - * @constructor - * @param {Element} el - * @param {Object} options - */ - constructor(el, options) { - super(Slider, el, options); - - this.el.M_Slider = this; - - /** - * Options for the modal - * @member Slider#options - * @prop {Boolean} [indicators=true] - Show indicators - * @prop {Number} [height=400] - height of slider - * @prop {Number} [duration=500] - Length in ms of slide transition - * @prop {Number} [interval=6000] - Length in ms of slide interval - * @prop {Boolean} [pauseOnFocus=true] - Pauses transition when slider receives keyboard focus - * @prop {Boolean} [pauseOnHover=true] - Pauses transition while mouse hovers the slider - * @prop {Function} [indicatorLabelFunc=null] - Function used to generate ARIA label to indicators (for accessibility purposes). - */ - this.options = $.extend({}, Slider.defaults, options); - - // init props - this.interval = null; - this.eventPause = false; - this._hovered = false; - this._focused = false; - this._focusCurrent = false; - - // setup - this.$slider = this.$el.find('.slides'); - this.$slides = this.$slider.children('li'); - this.activeIndex = this.$slides - .filter(function(item) { - return $(item).hasClass('active'); - }) - .first() - .index(); - if (this.activeIndex != -1) { - this.$active = this.$slides.eq(this.activeIndex); - } - - this._setSliderHeight(); - - // Sets element id if it does not have one - if (this.$slider.attr('id')) this._sliderId = this.$slider.attr('id'); - else { - this._sliderId = 'slider-' + M.guid(); - this.$slider.attr('id', this._sliderId); - } - - // Set initial positions of captions - this.$slides.find('.caption').each((el) => { - this._animateCaptionIn(el, 0); - }); - - // Move img src into background-image - this.$slides.find('img').each((el) => { - let placeholderBase64 = - 'data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='; - if ($(el).attr('src') !== placeholderBase64) { - $(el).css('background-image', 'url("' + $(el).attr('src') + '")'); - $(el).attr('src', placeholderBase64); - } - }); - this.$slides.each((el) => { - // Sets slide as focusable by code - if (!el.hasAttribute('tabindex')) el.setAttribute('tabindex', -1); - // Removes initial visibility from "inactive" slides - el.style.visibility = 'hidden'; - }); - - this._setupIndicators(); - - // Show active slide - if (this.$active) { - this.$active.css('display', 'block').css('visibility', 'visible'); - } else { - this.$slides.first().addClass('active'); - anim({ - targets: this.$slides.first()[0], - opacity: 1, - duration: this.options.duration, - easing: 'easeOutQuad' - }); - this.$slides.first().css('visibility', 'visible'); - - this.activeIndex = 0; - this.$active = this.$slides.eq(this.activeIndex); - - // Update indicators - if (this.options.indicators) { - this.$indicators.eq(this.activeIndex).children().first().addClass('active'); - } - } - - // Adjust height to current slide - this.$active.find('img').each((el) => { - anim({ - targets: this.$active.find('.caption')[0], - opacity: 1, - translateX: 0, - translateY: 0, - duration: this.options.duration, - easing: 'easeOutQuad' - }); - }); - - this._setupEventHandlers(); - - // auto scroll - this.start(); - } - - static get defaults() { - return _defaults; - } - - static init(els, options) { - return super.init(this, els, options); - } - - /** - * Get Instance - */ - static getInstance(el) { - let domElem = !!el.jquery ? el[0] : el; - return domElem.M_Slider; - } - - /** - * Teardown component - */ - destroy() { - this.pause(); - this._removeIndicators(); - this._removeEventHandlers(); - this.el.M_Slider = undefined; - } - - /** - * Setup Event Handlers - */ - _setupEventHandlers() { - this._handleIntervalBound = this._handleInterval.bind(this); - this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this); - this._handleAutoPauseFocusBound = this._handleAutoPauseFocus.bind(this); - this._handleAutoStartFocusBound = this._handleAutoStartFocus.bind(this); - this._handleAutoPauseHoverBound = this._handleAutoPauseHover.bind(this); - this._handleAutoStartHoverBound = this._handleAutoStartHover.bind(this); - - if (this.options.pauseOnFocus) { - this.el.addEventListener('focusin', this._handleAutoPauseFocusBound); - this.el.addEventListener('focusout', this._handleAutoStartFocusBound); - } - if (this.options.pauseOnHover) { - this.el.addEventListener('mouseenter', this._handleAutoPauseHoverBound); - this.el.addEventListener('mouseleave', this._handleAutoStartHoverBound); - } - - if (this.options.indicators) { - this.$indicators.children().on('click', this._handleIndicatorClickBound); - } - } - - /** - * Remove Event Handlers - */ - _removeEventHandlers() { - if (this.options.pauseOnFocus) { - this.el.removeEventListener('focusin', this._handleAutoPauseFocusBound); - this.el.removeEventListener('focusout', this._handleAutoStartFocusBound); - } - if (this.options.pauseOnHover) { - this.el.removeEventListener('mouseenter', this._handleAutoPauseHoverBound); - this.el.removeEventListener('mouseleave', this._handleAutoStartHoverBound); - } - if (this.options.indicators) { - this.$indicators.children().off('click', this._handleIndicatorClickBound); - } - } - - /** - * Handle indicator click - * @param {Event} e - */ - _handleIndicatorClick(e) { - let currIndex = $(e.target).parent().index(); - this._focusCurrent = true; - this.set(currIndex); - } - - /** - * Mouse enter event handler - */ - _handleAutoPauseHover() { - this._hovered = true; - if (this.interval != null) { - this._pause(true); - } - } - - /** - * Focus in event handler - */ - _handleAutoPauseFocus() { - this._focused = true; - if (this.interval != null) { - this._pause(true); - } - } - - /** - * Mouse enter event handler - */ - _handleAutoStartHover() { - this._hovered = false; - if (!(this.options.pauseOnFocus && this._focused) && this.eventPause) { - this.start(); - } - } - - /** - * Focus out leave event handler - */ - _handleAutoStartFocus() { - this._focused = false; - if (!(this.options.pauseOnHover && this._hovered) && this.eventPause) { - this.start(); - } - } - - /** - * Handle Interval - */ - _handleInterval() { - let newActiveIndex = this.$slider.find('.active').index(); - if (this.$slides.length === newActiveIndex + 1) newActiveIndex = 0; - // loop to start - else newActiveIndex += 1; - - this.set(newActiveIndex); - } - - /** - * Animate in caption - * @param {Element} caption - * @param {Number} duration - */ - _animateCaptionIn(caption, duration) { - let animOptions = { - targets: caption, - opacity: 0, - duration: duration, - easing: 'easeOutQuad' - }; - - if ($(caption).hasClass('center-align')) { - animOptions.translateY = -100; - } else if ($(caption).hasClass('right-align')) { - animOptions.translateX = 100; - } else if ($(caption).hasClass('left-align')) { - animOptions.translateX = -100; - } - - anim(animOptions); - } - - /** - * Set height of slider - */ - _setSliderHeight() { - // If fullscreen, do nothing - if (!this.$el.hasClass('fullscreen')) { - if (this.options.indicators) { - // Add height if indicators are present - this.$el.css('height', this.options.height + 40 + 'px'); - } else { - this.$el.css('height', this.options.height + 'px'); - } - this.$slider.css('height', this.options.height + 'px'); - } - } - - /** - * Setup indicators - */ - _setupIndicators() { - if (this.options.indicators) { - this.$indicators = $('
      '); - this.$slides.each((el, i) => { - let label = this.options.indicatorLabelFunc - ? this.options.indicatorLabelFunc.call(this, i + 1, i === 0) - : `${i + 1}`; - let $indicator = $(`
    • - -
    • `); - this.$indicators.append($indicator[0]); - }); - this.$el.append(this.$indicators[0]); - this.$indicators = this.$indicators.children('li.indicator-item'); - } - } - - /** - * Remove indicators - */ - _removeIndicators() { - this.$el.find('ul.indicators').remove(); - } - - /** - * Cycle to nth item - * @param {Number} index - */ - set(index) { - // Wrap around indices. - if (index >= this.$slides.length) index = 0; - else if (index < 0) index = this.$slides.length - 1; - - // Only do if index changes - if (this.activeIndex != index) { - this.$active = this.$slides.eq(this.activeIndex); - let $caption = this.$active.find('.caption'); - this.$active.removeClass('active'); - // Enables every slide - this.$slides.css('visibility', 'visible'); - - anim({ - targets: this.$active[0], - opacity: 0, - duration: this.options.duration, - easing: 'easeOutQuad', - complete: () => { - this.$slides.not('.active').each((el) => { - anim({ - targets: el, - opacity: 0, - translateX: 0, - translateY: 0, - duration: 0, - easing: 'easeOutQuad' - }); - // Disables invisible slides (for assistive technologies) - el.style.visibility = 'hidden'; - }); - } - }); - - this._animateCaptionIn($caption[0], this.options.duration); - - // Update indicators - if (this.options.indicators) { - let activeIndicator = this.$indicators - .eq(this.activeIndex) - .children() - .first(); - let nextIndicator = this.$indicators - .eq(index) - .children() - .first(); - activeIndicator.removeClass('active'); - nextIndicator.addClass('active'); - if (typeof this.options.indicatorLabelFunc === "function"){ - activeIndicator.attr( - 'aria-label', - this.options.indicatorLabelFunc.call( - this, - this.$indicators.eq(this.activeIndex).index(), - false - ) - ); - nextIndicator.attr( - 'aria-label', - this.options.indicatorLabelFunc.call( - this, - this.$indicators.eq(index).index(), - true - ) - ); - } - } - - anim({ - targets: this.$slides.eq(index)[0], - opacity: 1, - duration: this.options.duration, - easing: 'easeOutQuad' - }); - - anim({ - targets: this.$slides.eq(index).find('.caption')[0], - opacity: 1, - translateX: 0, - translateY: 0, - duration: this.options.duration, - delay: this.options.duration, - easing: 'easeOutQuad' - }); - - this.$slides.eq(index).addClass('active'); - if (this._focusCurrent) { - this.$slides.eq(index)[0].focus(); - this._focusCurrent = false; - } - this.activeIndex = index; - - // Reset interval, if allowed. This check prevents autostart - // when slider is paused, since it can be changed though indicators. - if (this.interval != null) { - this.start(); - } - } - } - - /** - * "Protected" function which pauses current interval - * @param {boolean} fromEvent Specifies if request came from event - */ - _pause(fromEvent) { - clearInterval(this.interval); - this.eventPause = fromEvent; - this.interval = null; - } - - /** - * Pause slider interval - */ - pause() { - this._pause(false); - } - - /** - * Start slider interval - */ - start() { - clearInterval(this.interval); - this.interval = setInterval( - this._handleIntervalBound, - this.options.duration + this.options.interval - ); - this.eventPause = false; - } - - /** - * Move to next slide - */ - next() { - let newIndex = this.activeIndex + 1; - - // Wrap around indices. - if (newIndex >= this.$slides.length) newIndex = 0; - else if (newIndex < 0) newIndex = this.$slides.length - 1; - - this.set(newIndex); - } - - /** - * Move to previous slide - */ - prev() { - let newIndex = this.activeIndex - 1; - - // Wrap around indices. - if (newIndex >= this.$slides.length) newIndex = 0; - else if (newIndex < 0) newIndex = this.$slides.length - 1; - - this.set(newIndex); - } - } - - M.Slider = Slider; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(Slider, 'slider', 'M_Slider'); - } -})(cash, M.anime); diff --git a/js/tapTarget.js b/js/tapTarget.js deleted file mode 100644 index 51f5537492..0000000000 --- a/js/tapTarget.js +++ /dev/null @@ -1,315 +0,0 @@ -(function($) { - 'use strict'; - - let _defaults = { - onOpen: undefined, - onClose: undefined - }; - - /** - * @class - * - */ - class TapTarget extends Component { - /** - * Construct TapTarget instance - * @constructor - * @param {Element} el - * @param {Object} options - */ - constructor(el, options) { - super(TapTarget, el, options); - - this.el.M_TapTarget = this; - - /** - * Options for the select - * @member TapTarget#options - * @prop {Function} onOpen - Callback function called when feature discovery is opened - * @prop {Function} onClose - Callback function called when feature discovery is closed - */ - this.options = $.extend({}, TapTarget.defaults, options); - - this.isOpen = false; - - // setup - this.$origin = $('#' + this.$el.attr('data-target')); - this._setup(); - - this._calculatePositioning(); - this._setupEventHandlers(); - } - - static get defaults() { - return _defaults; - } - - static init(els, options) { - return super.init(this, els, options); - } - - /** - * Get Instance - */ - static getInstance(el) { - let domElem = !!el.jquery ? el[0] : el; - return domElem.M_TapTarget; - } - - /** - * Teardown component - */ - destroy() { - this._removeEventHandlers(); - this.el.TapTarget = undefined; - } - - /** - * Setup Event Handlers - */ - _setupEventHandlers() { - this._handleDocumentClickBound = this._handleDocumentClick.bind(this); - this._handleTargetClickBound = this._handleTargetClick.bind(this); - this._handleOriginClickBound = this._handleOriginClick.bind(this); - - this.el.addEventListener('click', this._handleTargetClickBound); - this.originEl.addEventListener('click', this._handleOriginClickBound); - - // Resize - let throttledResize = M.throttle(this._handleResize, 200); - this._handleThrottledResizeBound = throttledResize.bind(this); - - window.addEventListener('resize', this._handleThrottledResizeBound); - } - - /** - * Remove Event Handlers - */ - _removeEventHandlers() { - this.el.removeEventListener('click', this._handleTargetClickBound); - this.originEl.removeEventListener('click', this._handleOriginClickBound); - window.removeEventListener('resize', this._handleThrottledResizeBound); - } - - /** - * Handle Target Click - * @param {Event} e - */ - _handleTargetClick(e) { - this.open(); - } - - /** - * Handle Origin Click - * @param {Event} e - */ - _handleOriginClick(e) { - this.close(); - } - - /** - * Handle Resize - * @param {Event} e - */ - _handleResize(e) { - this._calculatePositioning(); - } - - /** - * Handle Resize - * @param {Event} e - */ - _handleDocumentClick(e) { - if (!$(e.target).closest('.tap-target-wrapper').length) { - this.close(); - e.preventDefault(); - e.stopPropagation(); - } - } - - /** - * Setup Tap Target - */ - _setup() { - // Creating tap target - this.wrapper = this.$el.parent()[0]; - this.waveEl = $(this.wrapper).find('.tap-target-wave')[0]; - this.originEl = $(this.wrapper).find('.tap-target-origin')[0]; - this.contentEl = this.$el.find('.tap-target-content')[0]; - - // Creating wrapper - if (!$(this.wrapper).hasClass('.tap-target-wrapper')) { - this.wrapper = document.createElement('div'); - this.wrapper.classList.add('tap-target-wrapper'); - this.$el.before($(this.wrapper)); - this.wrapper.append(this.el); - } - - // Creating content - if (!this.contentEl) { - this.contentEl = document.createElement('div'); - this.contentEl.classList.add('tap-target-content'); - this.$el.append(this.contentEl); - } - - // Creating foreground wave - if (!this.waveEl) { - this.waveEl = document.createElement('div'); - this.waveEl.classList.add('tap-target-wave'); - - // Creating origin - if (!this.originEl) { - this.originEl = this.$origin.clone(true, true); - this.originEl.addClass('tap-target-origin'); - this.originEl.removeAttr('id'); - this.originEl.removeAttr('style'); - this.originEl = this.originEl[0]; - this.waveEl.append(this.originEl); - } - - this.wrapper.append(this.waveEl); - } - } - - /** - * Calculate positioning - */ - _calculatePositioning() { - // Element or parent is fixed position? - let isFixed = this.$origin.css('position') === 'fixed'; - if (!isFixed) { - let parents = this.$origin.parents(); - for (let i = 0; i < parents.length; i++) { - isFixed = $(parents[i]).css('position') == 'fixed'; - if (isFixed) { - break; - } - } - } - - // Calculating origin - let originWidth = this.$origin.outerWidth(); - let originHeight = this.$origin.outerHeight(); - let originTop = isFixed - ? this.$origin.offset().top - M.getDocumentScrollTop() - : this.$origin.offset().top; - let originLeft = isFixed - ? this.$origin.offset().left - M.getDocumentScrollLeft() - : this.$origin.offset().left; - - // Calculating screen - let windowWidth = window.innerWidth; - let windowHeight = window.innerHeight; - let scrollBarWidth = windowWidth - document.documentElement.clientWidth; - let centerX = windowWidth / 2; - let centerY = windowHeight / 2; - let isLeft = originLeft <= centerX; - let isRight = originLeft > centerX; - let isTop = originTop <= centerY; - let isBottom = originTop > centerY; - let isCenterX = originLeft >= windowWidth * 0.25 && originLeft <= windowWidth * 0.75; - - // Calculating tap target - let tapTargetWidth = this.$el.outerWidth(); - let tapTargetHeight = this.$el.outerHeight(); - let tapTargetTop = originTop + originHeight / 2 - tapTargetHeight / 2; - let tapTargetLeft = originLeft + originWidth / 2 - tapTargetWidth / 2; - let tapTargetPosition = isFixed ? 'fixed' : 'absolute'; - - // Calculating content - let tapTargetTextWidth = isCenterX ? tapTargetWidth : tapTargetWidth / 2 + originWidth; - let tapTargetTextHeight = tapTargetHeight / 2; - let tapTargetTextTop = isTop ? tapTargetHeight / 2 : 0; - let tapTargetTextBottom = 0; - let tapTargetTextLeft = isLeft && !isCenterX ? tapTargetWidth / 2 - originWidth : 0; - let tapTargetTextRight = 0; - let tapTargetTextPadding = originWidth; - let tapTargetTextAlign = isBottom ? 'bottom' : 'top'; - - // Calculating wave - let tapTargetWaveWidth = originWidth > originHeight ? originWidth * 2 : originWidth * 2; - let tapTargetWaveHeight = tapTargetWaveWidth; - let tapTargetWaveTop = tapTargetHeight / 2 - tapTargetWaveHeight / 2; - let tapTargetWaveLeft = tapTargetWidth / 2 - tapTargetWaveWidth / 2; - - // Setting tap target - let tapTargetWrapperCssObj = {}; - tapTargetWrapperCssObj.top = isTop ? tapTargetTop + 'px' : ''; - tapTargetWrapperCssObj.right = isRight - ? windowWidth - tapTargetLeft - tapTargetWidth - scrollBarWidth + 'px' - : ''; - tapTargetWrapperCssObj.bottom = isBottom - ? windowHeight - tapTargetTop - tapTargetHeight + 'px' - : ''; - tapTargetWrapperCssObj.left = isLeft ? tapTargetLeft + 'px' : ''; - tapTargetWrapperCssObj.position = tapTargetPosition; - $(this.wrapper).css(tapTargetWrapperCssObj); - - // Setting content - $(this.contentEl).css({ - width: tapTargetTextWidth + 'px', - height: tapTargetTextHeight + 'px', - top: tapTargetTextTop + 'px', - right: tapTargetTextRight + 'px', - bottom: tapTargetTextBottom + 'px', - left: tapTargetTextLeft + 'px', - padding: tapTargetTextPadding + 'px', - verticalAlign: tapTargetTextAlign - }); - - // Setting wave - $(this.waveEl).css({ - top: tapTargetWaveTop + 'px', - left: tapTargetWaveLeft + 'px', - width: tapTargetWaveWidth + 'px', - height: tapTargetWaveHeight + 'px' - }); - } - - /** - * Open TapTarget - */ - open() { - if (this.isOpen) { - return; - } - - // onOpen callback - if (typeof this.options.onOpen === 'function') { - this.options.onOpen.call(this, this.$origin[0]); - } - - this.isOpen = true; - this.wrapper.classList.add('open'); - - document.body.addEventListener('click', this._handleDocumentClickBound, true); - document.body.addEventListener('touchend', this._handleDocumentClickBound); - } - - /** - * Close Tap Target - */ - close() { - if (!this.isOpen) { - return; - } - - // onClose callback - if (typeof this.options.onClose === 'function') { - this.options.onClose.call(this, this.$origin[0]); - } - - this.isOpen = false; - this.wrapper.classList.remove('open'); - - document.body.removeEventListener('click', this._handleDocumentClickBound, true); - document.body.removeEventListener('touchend', this._handleDocumentClickBound); - } - } - - M.TapTarget = TapTarget; - - if (M.jQueryLoaded) { - M.initializeJqueryWrapper(TapTarget, 'tapTarget', 'M_TapTarget'); - } -})(cash); diff --git a/js/waves.js b/js/waves.js deleted file mode 100644 index d2cd0c692f..0000000000 --- a/js/waves.js +++ /dev/null @@ -1,615 +0,0 @@ -/*! - * Waves v0.7.6 - * http://fian.my.id/Waves - * - * Copyright 2014-2018 Alfiana E. Sibuea and other contributors - * Released under the MIT license - * https://github.com/fians/Waves/blob/master/LICENSE - */ - -;(function(window, factory) { - 'use strict'; - - // AMD. Register as an anonymous module. Wrap in function so we have access - // to root via `this`. - if (typeof define === 'function' && define.amd) { - define([], function() { - window.Waves = factory.call(window); - document.addEventListener('DOMContentLoaded', function() { - window.Waves.init(); - }, false); - return window.Waves; - }); - } - - // Node. Does not work with strict CommonJS, but only CommonJS-like - // environments that support module.exports, like Node. - else if (typeof exports === 'object') { - module.exports = factory.call(window); - } - - // Browser globals. - else { - window.Waves = factory.call(window); - document.addEventListener('DOMContentLoaded', function() { - window.Waves.init(); - }, false); - } -})(typeof global === 'object' ? global : this, function() { - 'use strict'; - - var Waves = Waves || {}; - var $$ = document.querySelectorAll.bind(document); - var toString = Object.prototype.toString; - var isTouchAvailable = 'ontouchstart' in window; - - /* Feature detection */ - var passiveIfSupported = false; - try { - window.addEventListener("test", null, - Object.defineProperty({}, "passive", { - get: function() { passiveIfSupported = { passive: false }; } - } - )); - } catch(err) {} - - // Find exact position of element - function isWindow(obj) { - return obj !== null && obj === obj.window; - } - - function getWindow(elem) { - return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView; - } - - function isObject(value) { - var type = typeof value; - return type === 'function' || type === 'object' && !!value; - } - - function isDOMNode(obj) { - return isObject(obj) && obj.nodeType > 0; - } - - function getWavesElements(nodes) { - var stringRepr = toString.call(nodes); - - if (stringRepr === '[object String]') { - return $$(nodes); - } else if (isObject(nodes) && /^\[object (Array|HTMLCollection|NodeList|Object)\]$/.test(stringRepr) && nodes.hasOwnProperty('length')) { - return nodes; - } else if (isDOMNode(nodes)) { - return [nodes]; - } - - return []; - } - - function offset(elem) { - var docElem, win, - box = { top: 0, left: 0 }, - doc = elem && elem.ownerDocument; - - docElem = doc.documentElement; - - if (typeof elem.getBoundingClientRect !== typeof undefined) { - box = elem.getBoundingClientRect(); - } - win = getWindow(doc); - return { - top: box.top + win.pageYOffset - docElem.clientTop, - left: box.left + win.pageXOffset - docElem.clientLeft - }; - } - - function convertStyle(styleObj) { - var style = ''; - - for (var prop in styleObj) { - if (styleObj.hasOwnProperty(prop)) { - style += (prop + ':' + styleObj[prop] + ';'); - } - } - - return style; - } - - var Effect = { - - // Effect duration - duration: 750, - - // Effect delay (check for scroll before showing effect) - delay: 200, - - show: function(e, element, velocity) { - - // Disable right click - if (e.button === 2) { - return false; - } - - element = element || this; - - // Create ripple - var ripple = document.createElement('div'); - ripple.className = 'waves-ripple waves-rippling'; - element.appendChild(ripple); - - // Get click coordinate and element width - var pos = offset(element); - var relativeY = 0; - var relativeX = 0; - // Support for touch devices - if('touches' in e && e.touches.length) { - relativeY = (e.touches[0].pageY - pos.top); - relativeX = (e.touches[0].pageX - pos.left); - } - //Normal case - else { - relativeY = (e.pageY - pos.top); - relativeX = (e.pageX - pos.left); - } - // Support for synthetic events - relativeX = relativeX >= 0 ? relativeX : 0; - relativeY = relativeY >= 0 ? relativeY : 0; - - var scale = 'scale(' + ((element.clientWidth / 100) * 3) + ')'; - var translate = 'translate(0,0)'; - - if (velocity) { - translate = 'translate(' + (velocity.x) + 'px, ' + (velocity.y) + 'px)'; - } - - // Attach data to element - ripple.setAttribute('data-hold', Date.now()); - ripple.setAttribute('data-x', relativeX); - ripple.setAttribute('data-y', relativeY); - ripple.setAttribute('data-scale', scale); - ripple.setAttribute('data-translate', translate); - - // Set ripple position - var rippleStyle = { - top: relativeY + 'px', - left: relativeX + 'px' - }; - - ripple.classList.add('waves-notransition'); - ripple.setAttribute('style', convertStyle(rippleStyle)); - ripple.classList.remove('waves-notransition'); - - // Scale the ripple - rippleStyle['-webkit-transform'] = scale + ' ' + translate; - rippleStyle['-moz-transform'] = scale + ' ' + translate; - rippleStyle['-ms-transform'] = scale + ' ' + translate; - rippleStyle['-o-transform'] = scale + ' ' + translate; - rippleStyle.transform = scale + ' ' + translate; - rippleStyle.opacity = '1'; - - var duration = e.type === 'mousemove' ? 2500 : Effect.duration; - rippleStyle['-webkit-transition-duration'] = duration + 'ms'; - rippleStyle['-moz-transition-duration'] = duration + 'ms'; - rippleStyle['-o-transition-duration'] = duration + 'ms'; - rippleStyle['transition-duration'] = duration + 'ms'; - - ripple.setAttribute('style', convertStyle(rippleStyle)); - }, - - hide: function(e, element) { - element = element || this; - - var ripples = element.getElementsByClassName('waves-rippling'); - - for (var i = 0, len = ripples.length; i < len; i++) { - removeRipple(e, element, ripples[i]); - } - - if (isTouchAvailable) { - element.removeEventListener('touchend', Effect.hide); - element.removeEventListener('touchcancel', Effect.hide); - } - - element.removeEventListener('mouseup', Effect.hide); - element.removeEventListener('mouseleave', Effect.hide); - } - }; - - /** - * Collection of wrapper for HTML element that only have single tag - * like and - */ - var TagWrapper = { - - // Wrap tag so it can perform the effect - input: function(element) { - - var parent = element.parentNode; - - // If input already have parent just pass through - if (parent.tagName.toLowerCase() === 'i' && parent.classList.contains('waves-effect')) { - return; - } - - // Put element class and style to the specified parent - var wrapper = document.createElement('i'); - wrapper.className = element.className + ' waves-input-wrapper'; - element.className = 'waves-button-input'; - - // Put element as child - parent.replaceChild(wrapper, element); - wrapper.appendChild(element); - - // Apply element color and background color to wrapper - var elementStyle = window.getComputedStyle(element, null); - var color = elementStyle.color; - var backgroundColor = elementStyle.backgroundColor; - - wrapper.setAttribute('style', 'color:' + color + ';background:' + backgroundColor); - element.setAttribute('style', 'background-color:rgba(0,0,0,0);'); - - }, - - // Wrap tag so it can perform the effect - img: function(element) { - - var parent = element.parentNode; - - // If input already have parent just pass through - if (parent.tagName.toLowerCase() === 'i' && parent.classList.contains('waves-effect')) { - return; - } - - // Put element as child - var wrapper = document.createElement('i'); - parent.replaceChild(wrapper, element); - wrapper.appendChild(element); - - } - }; - - /** - * Hide the effect and remove the ripple. Must be - * a separate function to pass the JSLint... - */ - function removeRipple(e, el, ripple) { - - // Check if the ripple still exist - if (!ripple) { - return; - } - - ripple.classList.remove('waves-rippling'); - - var relativeX = ripple.getAttribute('data-x'); - var relativeY = ripple.getAttribute('data-y'); - var scale = ripple.getAttribute('data-scale'); - var translate = ripple.getAttribute('data-translate'); - - // Get delay beetween mousedown and mouse leave - var diff = Date.now() - Number(ripple.getAttribute('data-hold')); - var delay = 350 - diff; - - if (delay < 0) { - delay = 0; - } - - if (e.type === 'mousemove') { - delay = 150; - } - - // Fade out ripple after delay - var duration = e.type === 'mousemove' ? 2500 : Effect.duration; - - setTimeout(function() { - - var style = { - top: relativeY + 'px', - left: relativeX + 'px', - opacity: '0', - - // Duration - '-webkit-transition-duration': duration + 'ms', - '-moz-transition-duration': duration + 'ms', - '-o-transition-duration': duration + 'ms', - 'transition-duration': duration + 'ms', - '-webkit-transform': scale + ' ' + translate, - '-moz-transform': scale + ' ' + translate, - '-ms-transform': scale + ' ' + translate, - '-o-transform': scale + ' ' + translate, - 'transform': scale + ' ' + translate - }; - - ripple.setAttribute('style', convertStyle(style)); - - setTimeout(function() { - try { - el.removeChild(ripple); - } catch (e) { - return false; - } - }, duration); - - }, delay); - } - - - /** - * Disable mousedown event for 500ms during and after touch - */ - var TouchHandler = { - - /* uses an integer rather than bool so there's no issues with - * needing to clear timeouts if another touch event occurred - * within the 500ms. Cannot mouseup between touchstart and - * touchend, nor in the 500ms after touchend. */ - touches: 0, - - allowEvent: function(e) { - - var allow = true; - - if (/^(mousedown|mousemove)$/.test(e.type) && TouchHandler.touches) { - allow = false; - } - - return allow; - }, - registerEvent: function(e) { - var eType = e.type; - - if (eType === 'touchstart') { - - TouchHandler.touches += 1; // push - - } else if (/^(touchend|touchcancel)$/.test(eType)) { - - setTimeout(function() { - if (TouchHandler.touches) { - TouchHandler.touches -= 1; // pop after 500ms - } - }, 500); - - } - } - }; - - - /** - * Delegated click handler for .waves-effect element. - * returns null when .waves-effect element not in "click tree" - */ - function getWavesEffectElement(e) { - - if (TouchHandler.allowEvent(e) === false) { - return null; - } - - var element = null; - var target = e.target || e.srcElement; - - while (target.parentElement) { - if ( (!(target instanceof SVGElement)) && target.classList.contains('waves-effect')) { - element = target; - break; - } - target = target.parentElement; - } - - return element; - } - - /** - * Bubble the click and show effect if .waves-effect elem was found - */ - function showEffect(e) { - - // Disable effect if element has "disabled" property on it - // In some cases, the event is not triggered by the current element - // if (e.target.getAttribute('disabled') !== null) { - // return; - // } - - var element = getWavesEffectElement(e); - - if (element !== null) { - - // Make it sure the element has either disabled property, disabled attribute or 'disabled' class - if (element.disabled || element.getAttribute('disabled') || element.classList.contains('disabled')) { - return; - } - - TouchHandler.registerEvent(e); - - if (e.type === 'touchstart' && Effect.delay) { - - var hidden = false; - - var timer = setTimeout(function () { - timer = null; - Effect.show(e, element); - }, Effect.delay); - - var hideEffect = function(hideEvent) { - - // if touch hasn't moved, and effect not yet started: start effect now - if (timer) { - clearTimeout(timer); - timer = null; - Effect.show(e, element); - } - if (!hidden) { - hidden = true; - Effect.hide(hideEvent, element); - } - - removeListeners(); - }; - - var touchMove = function(moveEvent) { - if (timer) { - clearTimeout(timer); - timer = null; - } - hideEffect(moveEvent); - - removeListeners(); - }; - - element.addEventListener('touchmove', touchMove, passiveIfSupported); - element.addEventListener('touchend', hideEffect, passiveIfSupported); - element.addEventListener('touchcancel', hideEffect, passiveIfSupported); - - var removeListeners = function() { - element.removeEventListener('touchmove', touchMove); - element.removeEventListener('touchend', hideEffect); - element.removeEventListener('touchcancel', hideEffect); - }; - } else { - - Effect.show(e, element); - - if (isTouchAvailable) { - element.addEventListener('touchend', Effect.hide, passiveIfSupported); - element.addEventListener('touchcancel', Effect.hide, passiveIfSupported); - } - - element.addEventListener('mouseup', Effect.hide, passiveIfSupported); - element.addEventListener('mouseleave', Effect.hide, passiveIfSupported); - } - } - } - - Waves.init = function(options) { - var body = document.body; - - options = options || {}; - - if ('duration' in options) { - Effect.duration = options.duration; - } - - if ('delay' in options) { - Effect.delay = options.delay; - } - - if (isTouchAvailable) { - body.addEventListener('touchstart', showEffect, passiveIfSupported); - body.addEventListener('touchcancel', TouchHandler.registerEvent, passiveIfSupported); - body.addEventListener('touchend', TouchHandler.registerEvent, passiveIfSupported); - } - - body.addEventListener('mousedown', showEffect, passiveIfSupported); - }; - - - /** - * Attach Waves to dynamically loaded inputs, or add .waves-effect and other - * waves classes to a set of elements. Set drag to true if the ripple mouseover - * or skimming effect should be applied to the elements. - */ - Waves.attach = function(elements, classes) { - - elements = getWavesElements(elements); - - if (toString.call(classes) === '[object Array]') { - classes = classes.join(' '); - } - - classes = classes ? ' ' + classes : ''; - - var element, tagName; - - for (var i = 0, len = elements.length; i < len; i++) { - - element = elements[i]; - tagName = element.tagName.toLowerCase(); - - if (['input', 'img'].indexOf(tagName) !== -1) { - TagWrapper[tagName](element); - element = element.parentElement; - } - - if (element.className.indexOf('waves-effect') === -1) { - element.className += ' waves-effect' + classes; - } - } - }; - - - /** - * Cause a ripple to appear in an element via code. - */ - Waves.ripple = function(elements, options) { - elements = getWavesElements(elements); - var elementsLen = elements.length; - - options = options || {}; - options.wait = options.wait || 0; - options.position = options.position || null; // default = centre of element - - - if (elementsLen) { - var element, pos, off, centre = {}, i = 0; - var mousedown = { - type: 'mousedown', - button: 1 - }; - var hideRipple = function(mouseup, element) { - return function() { - Effect.hide(mouseup, element); - }; - }; - - for (; i < elementsLen; i++) { - element = elements[i]; - pos = options.position || { - x: element.clientWidth / 2, - y: element.clientHeight / 2 - }; - - off = offset(element); - centre.x = off.left + pos.x; - centre.y = off.top + pos.y; - - mousedown.pageX = centre.x; - mousedown.pageY = centre.y; - - Effect.show(mousedown, element); - - if (options.wait >= 0 && options.wait !== null) { - var mouseup = { - type: 'mouseup', - button: 1 - }; - - setTimeout(hideRipple(mouseup, element), options.wait); - } - } - } - }; - - /** - * Remove all ripples from an element. - */ - Waves.calm = function(elements) { - elements = getWavesElements(elements); - var mouseup = { - type: 'mouseup', - button: 1 - }; - - for (var i = 0, len = elements.length; i < len; i++) { - Effect.hide(mouseup, elements[i]); - } - }; - - /** - * Deprecated API fallback - */ - Waves.displayEffect = function(options) { - console.error('Waves.displayEffect() has been deprecated and will be removed in future version. Please use Waves.init() to initialize Waves effect'); - Waves.init(options); - }; - - return Waves; -}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7ca9ce7e84..ffdd087913 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,17 @@ { "name": "@materializecss/materialize", - "version": "1.2.1", + "version": "1.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@materializecss/materialize", - "version": "1.2.1", + "version": "1.2.2", "hasInstallScript": true, "license": "MIT", + "dependencies": { + "animejs": "^3.2.1" + }, "devDependencies": { "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", @@ -18,34 +21,34 @@ "commitlint": "^17.0.3", "cz-conventional-changelog": "^3.3.0", "grunt": "^1.0.1", - "grunt-babel": "^6.0.0", "grunt-banner": "^0.6.0", "grunt-browser-sync": "^2.2.0", "grunt-concurrent": "^3.0.0", - "grunt-contrib-clean": "^1.1.0", "grunt-contrib-compress": "^1.4.1", - "grunt-contrib-concat": "^1.0.1", "grunt-contrib-connect": "^3.0.0", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-jasmine": "^3.0.0", "grunt-contrib-pug": "^3.0.0", - "grunt-contrib-uglify": "^3.0.1", "grunt-contrib-watch": "^1.0.0", - "grunt-notify": "^0.4.5", "grunt-postcss": "^0.9.0", "grunt-remove-logging": "^0.2.0", "grunt-rename-util": "^1.0.0", "grunt-sass": "^3.1.0", "grunt-text-replace": "^0.4.0", + "grunt-webpack": "^5.0.0", "husky": "^8.0.1", "jasmine": "^3.8.0", - "jquery": "^3.2.1", + "jstransformer-markdown-it": "^3.0.0", "lint-staged": "^7.0.5", "node-archiver": "^0.3.0", "phantomjs-prebuilt": "^2.1.14", "pinst": "^3.0.0", "prettier": "^1.12.1", - "sass": "^1.35.2" + "sass": "^1.35.2", + "ts-loader": "^9.4.2", + "typescript": "^4.9.5", + "webpack": "^5.75.0", + "webpack-cli": "^5.0.1" } }, "node_modules/@babel/code-frame": { @@ -447,6 +450,29 @@ "node": ">=12" } }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", @@ -456,6 +482,25 @@ "node": ">=6.0.0" } }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", @@ -534,6 +579,38 @@ "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", "dev": true }, + "node_modules/@types/eslint": { + "version": "8.4.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz", + "integrity": "sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "dev": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "node_modules/@types/minimist": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", @@ -568,6 +645,208 @@ "@types/node": "*" } }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz", + "integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz", + "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz", + "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -657,6 +936,11 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/animejs": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/animejs/-/animejs-3.2.1.tgz", + "integrity": "sha512-sWno3ugFryK5nhiDm/2BKeFCpZv7vzerWUcUPyAZLDhMek3+S/p418ldZJbJXo5ZUOpfm2kP2XRO4NJcULMy9A==" + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1095,61 +1379,6 @@ "node": ">=0.8.0" } }, - "node_modules/babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "dependencies": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, - "node_modules/babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "dependencies": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "node_modules/babel-generator/node_modules/detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha512-BDKtmHlOzwI7iRuEkhzsnPoi5ypEhWAJB5RvHWe1kMr06js3uK5B3734i3ui5Yd+wOJV1cpE4JnivPD283GU/A==", - "dev": true, - "dependencies": { - "repeating": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/babel-helper-call-delegate": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", @@ -1242,16 +1471,6 @@ "babel-types": "^6.24.1" } }, - "node_modules/babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ==", - "dev": true, - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, "node_modules/babel-messages": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", @@ -1572,33 +1791,6 @@ "babel-plugin-transform-regenerator": "^6.24.1" } }, - "node_modules/babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A==", - "dev": true, - "dependencies": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - } - }, - "node_modules/babel-register/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -2253,9 +2445,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001423", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001423.tgz", - "integrity": "sha512-09iwWGOlifvE1XuHokFMP7eR38a0JnajoyL3/i87c8ZjRWRrdKo1fqjNfugfBD0UDBIOz0U+jtNhJ0EPm1VleQ==", + "version": "1.0.30001450", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001450.tgz", + "integrity": "sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew==", "dev": true, "funding": [ { @@ -2338,6 +2530,15 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, "node_modules/class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -2573,6 +2774,20 @@ "node": ">=0.8" } }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -2613,6 +2828,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true + }, "node_modules/colors": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", @@ -2880,12 +3101,6 @@ "node": ">=10" } }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, "node_modules/cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -3245,6 +3460,15 @@ "node": ">=4.0.0" } }, + "node_modules/deep-for-each": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/deep-for-each/-/deep-for-each-3.0.0.tgz", + "integrity": "sha512-pPN+0f8jlnNP+z90qqOdxGghJU5XM6oBDhvAR+qdQzjCg5pk/7VPPvKK1GqoXEFkHza6ZS+Otzzvmr0g3VUaKw==", + "dev": true, + "dependencies": { + "lodash.isplainobject": "^4.0.6" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -3401,12 +3625,6 @@ "node": ">=8" } }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, "node_modules/duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -3650,6 +3868,43 @@ } } }, + "node_modules/enhanced-resolve": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true, + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/err-code": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", @@ -3674,6 +3929,12 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "dev": true + }, "node_modules/es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", @@ -4579,6 +4840,15 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "engines": { + "node": ">= 4.9.1" + } + }, "node_modules/faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -5208,6 +5478,12 @@ "node": ">= 6" } }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, "node_modules/global-dirs": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", @@ -5352,18 +5628,6 @@ "node": ">=8" } }, - "node_modules/grunt-babel": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/grunt-babel/-/grunt-babel-6.0.0.tgz", - "integrity": "sha512-v5uRRqAMqZc0cOe7b4/i5lW6fQTNXNQ5/GnVmaGFXW7hO+PiGvkHFUQ18hisf+KBl+wrb2gLjYk/xH+2OaRvmQ==", - "dev": true, - "dependencies": { - "babel-core": "^6.0.12" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/grunt-banner": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/grunt-banner/-/grunt-banner-0.6.0.tgz", @@ -5496,51 +5760,17 @@ "grunt": ">=1" } }, - "node_modules/grunt-contrib-clean": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-1.1.0.tgz", - "integrity": "sha512-tET+TYTd8vCtKeGwbLjoH8+SdI8ngVzGbPr7vlWkewG7mYYHIccd2Ldxq+PK3DyBp5Www3ugdkfsjoNKUl5MTg==", + "node_modules/grunt-contrib-compress": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-1.6.0.tgz", + "integrity": "sha512-wIFuvk+/Ny4E+OgEfJYFZgoH7KcU/nnNFbYasB7gRvrcRyW6vmTp3Pj8a4rFSR3tbFMjrGvTUszdO6fgLajgZQ==", "dev": true, "dependencies": { - "async": "^1.5.2", - "rimraf": "^2.5.1" - }, - "engines": { - "node": ">= 0.10.0" - }, - "peerDependencies": { - "grunt": ">=0.4.5" - } - }, - "node_modules/grunt-contrib-clean/node_modules/async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "dev": true - }, - "node_modules/grunt-contrib-clean/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/grunt-contrib-compress": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-1.6.0.tgz", - "integrity": "sha512-wIFuvk+/Ny4E+OgEfJYFZgoH7KcU/nnNFbYasB7gRvrcRyW6vmTp3Pj8a4rFSR3tbFMjrGvTUszdO6fgLajgZQ==", - "dev": true, - "dependencies": { - "archiver": "^1.3.0", - "chalk": "^1.1.1", - "lodash": "^4.7.0", - "pretty-bytes": "^4.0.2", - "stream-buffers": "^2.1.0" + "archiver": "^1.3.0", + "chalk": "^1.1.1", + "lodash": "^4.7.0", + "pretty-bytes": "^4.0.2", + "stream-buffers": "^2.1.0" }, "engines": { "node": ">=4.0" @@ -5604,77 +5834,6 @@ "node": ">=0.8.0" } }, - "node_modules/grunt-contrib-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-1.0.1.tgz", - "integrity": "sha512-QdTmcxe8aim2Z0dFeuSJ+f7fHIeY7PZaTMZxgvosjXwyMhpy2GUR5WHkr12lksHfZVE80v2wUwqF56wyfPUwoQ==", - "dev": true, - "dependencies": { - "chalk": "^1.0.0", - "source-map": "^0.5.3" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "grunt": ">=0.4.0" - } - }, - "node_modules/grunt-contrib-concat/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-concat/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-concat/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-concat/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-concat/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/grunt-contrib-connect": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/grunt-contrib-connect/-/grunt-contrib-connect-3.0.0.tgz", @@ -6073,76 +6232,6 @@ "node": ">=4" } }, - "node_modules/grunt-contrib-uglify": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-3.4.0.tgz", - "integrity": "sha512-UXsTpeP0pytpTYlmll3RDndsRXfdwmrf1tI/AtD/PrArQAzGmKMvj83aVt3D8egWlE6KqPjsJBLCCvfC52LI/A==", - "dev": true, - "dependencies": { - "chalk": "^1.0.0", - "maxmin": "^2.1.0", - "uglify-js": "~3.4.0", - "uri-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-uglify/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-uglify/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-uglify/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-uglify/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-uglify/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/grunt-contrib-watch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz", @@ -6300,38 +6389,6 @@ "node": ">=10" } }, - "node_modules/grunt-notify": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/grunt-notify/-/grunt-notify-0.4.5.tgz", - "integrity": "sha512-tOuxVw4HHcCGXuCzUGIDN5ZVAN5t0BFt+yVhV4cvipXbqRQCGKyGUuYj50jKSycK663cHaQP9RbDXeIOQzgntw==", - "dev": true, - "dependencies": { - "semver": "^5.1.0", - "stack-parser": "^0.0.1", - "which": "^1.2.4" - } - }, - "node_modules/grunt-notify/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/grunt-notify/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/grunt-postcss": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/grunt-postcss/-/grunt-postcss-0.9.0.tgz", @@ -6456,6 +6513,22 @@ "node": ">= 0.8.0" } }, + "node_modules/grunt-webpack": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/grunt-webpack/-/grunt-webpack-5.0.0.tgz", + "integrity": "sha512-C7emzVIGJhZ5V5ZYjylr9sDD9PE9Dh/55NaSzP2P2dhif+m/1gHbjDZQ7PDzguyuzwBz4Qc8voQHR06FSp4CKg==", + "dev": true, + "dependencies": { + "deep-for-each": "^3.0.0", + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=12.13.0" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, "node_modules/grunt/node_modules/findup-sync": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", @@ -6516,18 +6589,6 @@ "node": "*" } }, - "node_modules/gzip-size": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz", - "integrity": "sha512-6s8trQiK+OMzSaCSVXX+iqIcLV9tC+E73jrJrJTyS4h/AJhlxHvzFKqM1YLDJWRGgHX8uLkBeXkA0njNj39L4w==", - "dev": true, - "dependencies": { - "duplexer": "^0.1.1" - }, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -6743,19 +6804,6 @@ "node": ">=0.10.0" } }, - "node_modules/home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha512-ycURW7oUxE2sNiPVw1HVEFsW+ecOpJ5zaj7eC0RlwhibhRBod20muUN8qu/gzx956YrLolVvs1MTXwKgC2rVEg==", - "dev": true, - "dependencies": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -7050,6 +7098,25 @@ "node": ">=4" } }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -7306,18 +7373,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -7655,11 +7710,34 @@ "node": ">=4" } }, - "node_modules/jquery": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz", - "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==", - "dev": true + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } }, "node_modules/js-stringify": { "version": "1.0.2", @@ -7692,15 +7770,6 @@ "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, - "node_modules/jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha512-Mke0DA0QjUWuJlhsE0ZPPhYiJkRap642SmI/4ztCFaUs6V2AiH1sfecc+57NgaryfAA2VR3v6O+CSjC1jZJKOA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -7737,15 +7806,6 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, - "node_modules/json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -7808,10 +7868,22 @@ "promise": "^7.0.1" } }, - "node_modules/kew": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", - "integrity": "sha512-IG6nm0+QtAMdXt9KvbgbGdvY50RSrw+U4sGZg+KlrSKPJEwVE5JVoI3d7RWfSMdBQneRheeAOj3lIjX5VL/9RQ==", + "node_modules/jstransformer-markdown-it": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jstransformer-markdown-it/-/jstransformer-markdown-it-3.0.0.tgz", + "integrity": "sha512-/2fNT0ir/D0NYI5roBTVRwDV2YBjMfU3f/wSeraKLfOMNxcrIJatjJQy4zPmwQBxqKxUojXBN8hmfQBMTLZ3KA==", + "dev": true, + "dependencies": { + "markdown-it": "^13.0.1" + }, + "engines": { + "node": ">=7" + } + }, + "node_modules/kew": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", + "integrity": "sha512-IG6nm0+QtAMdXt9KvbgbGdvY50RSrw+U4sGZg+KlrSKPJEwVE5JVoI3d7RWfSMdBQneRheeAOj3lIjX5VL/9RQ==", "dev": true }, "node_modules/kind-of": { @@ -7897,6 +7969,15 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/linkify-it": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz", + "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", + "dev": true, + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/lint-staged": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-7.3.0.tgz", @@ -8618,6 +8699,15 @@ "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", "dev": true }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "engines": { + "node": ">=6.11.5" + } + }, "node_modules/localtunnel": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz", @@ -8745,6 +8835,12 @@ "integrity": "sha512-7FGG40uhC8Mm633uKW1r58aElFlBlxCrg9JfSi3P6aYiWmfiWF0PgMd86ZUsxE5GwWPdHoS2+48bwTh2VPkIQA==", "dev": true }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, "node_modules/lodash.map": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", @@ -9059,100 +9155,33 @@ "node": ">=0.10.0" } }, - "node_modules/maxmin": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz", - "integrity": "sha512-NWlApBjW9az9qRPaeg7CX4sQBWwytqz32bIEo1PW9pRW+kBP9KLRfJO3UC+TV31EcQZEUq7eMzikC7zt3zPJcw==", - "dev": true, - "dependencies": { - "chalk": "^1.0.0", - "figures": "^1.0.1", - "gzip-size": "^3.0.0", - "pretty-bytes": "^3.0.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/maxmin/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/maxmin/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/maxmin/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/maxmin/node_modules/figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/maxmin/node_modules/pretty-bytes": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz", - "integrity": "sha512-eb7ZAeUTgfh294cElcu51w+OTRp/6ItW758LjwJSK72LDevcuJn0P4eD71PLMDGPwwatXmAmYHTkzvpKlJE3ow==", + "node_modules/markdown-it": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz", + "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==", "dev": true, "dependencies": { - "number-is-nan": "^1.0.0" + "argparse": "^2.0.1", + "entities": "~3.0.1", + "linkify-it": "^4.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "markdown-it": "bin/markdown-it.js" } }, - "node_modules/maxmin/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, - "node_modules/maxmin/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "dev": true }, "node_modules/meow": { "version": "8.1.2", @@ -9531,6 +9560,12 @@ "node": ">= 0.6" } }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -9621,6 +9656,12 @@ "node": ">=0.12.0" } }, + "node_modules/node-releases": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.9.tgz", + "integrity": "sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA==", + "dev": true + }, "node_modules/noop-logger": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", @@ -10706,6 +10747,12 @@ "which": "bin/which" } }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -11443,6 +11490,15 @@ "node": ">=8" } }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -11781,18 +11837,6 @@ "node": ">=0.10" } }, - "node_modules/repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", - "dev": true, - "dependencies": { - "is-finite": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -11884,6 +11928,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/resolve-dir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", @@ -12079,6 +12135,55 @@ "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", "dev": true }, + "node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", @@ -12169,6 +12274,15 @@ "node": ">= 0.6" } }, + "node_modules/serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", @@ -12308,6 +12422,18 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -12382,15 +12508,6 @@ "simple-concat": "^1.0.0" } }, - "node_modules/slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/slice-ansi": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", @@ -12775,12 +12892,22 @@ } }, "node_modules/source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "dependencies": { - "source-map": "^0.5.6" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, "node_modules/source-map-url": { @@ -12897,15 +13024,6 @@ "figgy-pudding": "^3.5.1" } }, - "node_modules/stack-parser": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/stack-parser/-/stack-parser-0.0.1.tgz", - "integrity": "sha512-7wM3FaSOHg0EMrQ4GqRLLwAN4oY8eUHiqOnxTQgRnJ3hAiGKhAItH+cAJHqyyxgBJSr06MosLpkg9hksbrJakQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/staged-git-files": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-1.1.1.tgz", @@ -13365,6 +13483,15 @@ "node": ">=6" } }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/tar": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", @@ -13447,6 +13574,80 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/terser": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.2.tgz", + "integrity": "sha512-JKuM+KvvWVqT7muHVyrwv7FVRPnmHDwF6XwoIxdbF5Witi0vu99RYpxDexpJndXt3jbZZmmWr2/mQa6HvSNdSg==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", + "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/terser/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -13739,13 +13940,23 @@ "node": ">=8" } }, - "node_modules/trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw==", + "node_modules/ts-loader": { + "version": "9.4.2", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.2.tgz", + "integrity": "sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA==", "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + }, "engines": { - "node": ">=0.10.0" + "node": ">=12.0.0" + }, + "peerDependencies": { + "typescript": "*", + "webpack": "^5.0.0" } }, "node_modules/ts-node": { @@ -13867,9 +14078,9 @@ "dev": true }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -13898,37 +14109,12 @@ "node": "*" } }, - "node_modules/uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", - "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", - "dev": true, - "dependencies": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/uglify-js/node_modules/commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", "dev": true }, - "node_modules/uglify-js/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", @@ -14084,15 +14270,6 @@ "punycode": "^2.1.0" } }, - "node_modules/uri-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", - "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -14255,6 +14432,19 @@ "node": ">=0.6.0" } }, + "node_modules/watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -14270,6 +14460,234 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, + "node_modules/webpack": { + "version": "5.75.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", + "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", + "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", + "dev": true, + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.0.1", + "@webpack-cli/info": "^2.0.1", + "@webpack-cli/serve": "^2.0.1", + "colorette": "^2.0.14", + "commander": "^9.4.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/webpack-cli/node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-cli/node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/webpack/node_modules/acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "dev": true, + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/webpack/node_modules/browserslist": { + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/webpack/node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/webpack/node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -14363,6 +14781,12 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "node_modules/wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, "node_modules/with": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", @@ -14918,12 +15342,45 @@ "@jridgewell/trace-mapping": "0.3.9" } }, + "@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, "@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, "@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", @@ -14991,6 +15448,38 @@ "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", "dev": true }, + "@types/eslint": { + "version": "8.4.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz", + "integrity": "sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "dev": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "@types/minimist": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", @@ -15025,6 +15514,185 @@ "@types/node": "*" } }, + "@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dev": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "dev": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dev": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz", + "integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==", + "dev": true, + "requires": {} + }, + "@webpack-cli/info": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz", + "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==", + "dev": true, + "requires": {} + }, + "@webpack-cli/serve": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz", + "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==", + "dev": true, + "requires": {} + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -15090,6 +15758,11 @@ "uri-js": "^4.2.2" } }, + "animejs": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/animejs/-/animejs-3.2.1.tgz", + "integrity": "sha512-sWno3ugFryK5nhiDm/2BKeFCpZv7vzerWUcUPyAZLDhMek3+S/p418ldZJbJXo5ZUOpfm2kP2XRO4NJcULMy9A==" + }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -15421,79 +16094,25 @@ "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } - } - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha512-BDKtmHlOzwI7iRuEkhzsnPoi5ypEhWAJB5RvHWe1kMr06js3uK5B3734i3ui5Yd+wOJV1cpE4JnivPD283GU/A==", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "dev": true, "requires": { - "repeating": "^2.0.0" + "ansi-regex": "^2.0.0" } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true } } }, @@ -15589,16 +16208,6 @@ "babel-types": "^6.24.1" } }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ==", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, "babel-messages": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", @@ -15918,32 +16527,6 @@ "babel-plugin-transform-regenerator": "^6.24.1" } }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A==", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } - } - } - }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -16491,9 +17074,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001423", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001423.tgz", - "integrity": "sha512-09iwWGOlifvE1XuHokFMP7eR38a0JnajoyL3/i87c8ZjRWRrdKo1fqjNfugfBD0UDBIOz0U+jtNhJ0EPm1VleQ==", + "version": "1.0.30001450", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001450.tgz", + "integrity": "sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew==", "dev": true }, "caseless": { @@ -16549,6 +17132,12 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -16731,6 +17320,17 @@ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -16762,6 +17362,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true + }, "colors": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", @@ -16980,12 +17586,6 @@ "through2": "^4.0.0" } }, - "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, "cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -17272,6 +17872,15 @@ "dev": true, "optional": true }, + "deep-for-each": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/deep-for-each/-/deep-for-each-3.0.0.tgz", + "integrity": "sha512-pPN+0f8jlnNP+z90qqOdxGghJU5XM6oBDhvAR+qdQzjCg5pk/7VPPvKK1GqoXEFkHza6ZS+Otzzvmr0g3VUaKw==", + "dev": true, + "requires": { + "lodash.isplainobject": "^4.0.6" + } + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -17389,12 +17998,6 @@ "is-obj": "^2.0.0" } }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -17579,6 +18182,28 @@ "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", "dev": true }, + "enhanced-resolve": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "dev": true + }, + "envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true + }, "err-code": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", @@ -17603,6 +18228,12 @@ "is-arrayish": "^0.2.1" } }, + "es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "dev": true + }, "es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", @@ -18308,6 +18939,12 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true + }, "faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -18805,6 +19442,12 @@ "is-glob": "^4.0.1" } }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, "global-dirs": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", @@ -18969,15 +19612,6 @@ } } }, - "grunt-babel": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/grunt-babel/-/grunt-babel-6.0.0.tgz", - "integrity": "sha512-v5uRRqAMqZc0cOe7b4/i5lW6fQTNXNQ5/GnVmaGFXW7hO+PiGvkHFUQ18hisf+KBl+wrb2gLjYk/xH+2OaRvmQ==", - "dev": true, - "requires": { - "babel-core": "^6.0.12" - } - }, "grunt-banner": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/grunt-banner/-/grunt-banner-0.6.0.tgz", @@ -19075,33 +19709,6 @@ "pad-stream": "^2.0.0" } }, - "grunt-contrib-clean": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-1.1.0.tgz", - "integrity": "sha512-tET+TYTd8vCtKeGwbLjoH8+SdI8ngVzGbPr7vlWkewG7mYYHIccd2Ldxq+PK3DyBp5Www3ugdkfsjoNKUl5MTg==", - "dev": true, - "requires": { - "async": "^1.5.2", - "rimraf": "^2.5.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } - } - }, "grunt-contrib-compress": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-1.6.0.tgz", @@ -19158,58 +19765,6 @@ } } }, - "grunt-contrib-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-1.0.1.tgz", - "integrity": "sha512-QdTmcxe8aim2Z0dFeuSJ+f7fHIeY7PZaTMZxgvosjXwyMhpy2GUR5WHkr12lksHfZVE80v2wUwqF56wyfPUwoQ==", - "dev": true, - "requires": { - "chalk": "^1.0.0", - "source-map": "^0.5.3" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } - } - }, "grunt-contrib-connect": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/grunt-contrib-connect/-/grunt-contrib-connect-3.0.0.tgz", @@ -19529,60 +20084,6 @@ } } }, - "grunt-contrib-uglify": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-3.4.0.tgz", - "integrity": "sha512-UXsTpeP0pytpTYlmll3RDndsRXfdwmrf1tI/AtD/PrArQAzGmKMvj83aVt3D8egWlE6KqPjsJBLCCvfC52LI/A==", - "dev": true, - "requires": { - "chalk": "^1.0.0", - "maxmin": "^2.1.0", - "uglify-js": "~3.4.0", - "uri-path": "^1.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } - } - }, "grunt-contrib-watch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz", @@ -19711,34 +20212,6 @@ "which": "~2.0.2" } }, - "grunt-notify": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/grunt-notify/-/grunt-notify-0.4.5.tgz", - "integrity": "sha512-tOuxVw4HHcCGXuCzUGIDN5ZVAN5t0BFt+yVhV4cvipXbqRQCGKyGUuYj50jKSycK663cHaQP9RbDXeIOQzgntw==", - "dev": true, - "requires": { - "semver": "^5.1.0", - "stack-parser": "^0.0.1", - "which": "^1.2.4" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, "grunt-postcss": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/grunt-postcss/-/grunt-postcss-0.9.0.tgz", @@ -19828,13 +20301,14 @@ "integrity": "sha512-A4dFGpOaD/TQpeOlDK/zP962X1qG7KcOqPiSXOWOIeAKMzzpoDJYZ8Sz56iazI5+kTqeTa+IaEEl5c4sk+QN+Q==", "dev": true }, - "gzip-size": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz", - "integrity": "sha512-6s8trQiK+OMzSaCSVXX+iqIcLV9tC+E73jrJrJTyS4h/AJhlxHvzFKqM1YLDJWRGgHX8uLkBeXkA0njNj39L4w==", + "grunt-webpack": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/grunt-webpack/-/grunt-webpack-5.0.0.tgz", + "integrity": "sha512-C7emzVIGJhZ5V5ZYjylr9sDD9PE9Dh/55NaSzP2P2dhif+m/1gHbjDZQ7PDzguyuzwBz4Qc8voQHR06FSp4CKg==", "dev": true, "requires": { - "duplexer": "^0.1.1" + "deep-for-each": "^3.0.0", + "lodash": "^4.17.19" } }, "har-schema": { @@ -20003,16 +20477,6 @@ } } }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha512-ycURW7oUxE2sNiPVw1HVEFsW+ecOpJ5zaj7eC0RlwhibhRBod20muUN8qu/gzx956YrLolVvs1MTXwKgC2rVEg==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, "homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -20241,6 +20705,16 @@ } } }, + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -20457,12 +20931,6 @@ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -20724,11 +21192,27 @@ } } }, - "jquery": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.1.tgz", - "integrity": "sha512-opJeO4nCucVnsjiXOE+/PcCgYw9Gwpvs/a6B1LL/lQhwWwpbVEVYDZ1FokFr8PRc7ghYlrFPuyHuiiDNTQxmcw==", - "dev": true + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } }, "js-stringify": { "version": "1.0.2", @@ -20754,14 +21238,8 @@ }, "jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha512-Mke0DA0QjUWuJlhsE0ZPPhYiJkRap642SmI/4ztCFaUs6V2AiH1sfecc+57NgaryfAA2VR3v6O+CSjC1jZJKOA==", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, "json-parse-better-errors": { @@ -20800,12 +21278,6 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", - "dev": true - }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -20854,6 +21326,15 @@ "promise": "^7.0.1" } }, + "jstransformer-markdown-it": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jstransformer-markdown-it/-/jstransformer-markdown-it-3.0.0.tgz", + "integrity": "sha512-/2fNT0ir/D0NYI5roBTVRwDV2YBjMfU3f/wSeraKLfOMNxcrIJatjJQy4zPmwQBxqKxUojXBN8hmfQBMTLZ3KA==", + "dev": true, + "requires": { + "markdown-it": "^13.0.1" + } + }, "kew": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", @@ -20928,6 +21409,15 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "linkify-it": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz", + "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", + "dev": true, + "requires": { + "uc.micro": "^1.0.1" + } + }, "lint-staged": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-7.3.0.tgz", @@ -21507,6 +21997,12 @@ "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", "dev": true }, + "loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true + }, "localtunnel": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz", @@ -21604,6 +22100,12 @@ "integrity": "sha512-7FGG40uhC8Mm633uKW1r58aElFlBlxCrg9JfSi3P6aYiWmfiWF0PgMd86ZUsxE5GwWPdHoS2+48bwTh2VPkIQA==", "dev": true }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, "lodash.map": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", @@ -21855,79 +22357,33 @@ "object-visit": "^1.0.0" } }, - "maxmin": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz", - "integrity": "sha512-NWlApBjW9az9qRPaeg7CX4sQBWwytqz32bIEo1PW9pRW+kBP9KLRfJO3UC+TV31EcQZEUq7eMzikC7zt3zPJcw==", + "markdown-it": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz", + "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==", "dev": true, "requires": { - "chalk": "^1.0.0", - "figures": "^1.0.1", - "gzip-size": "^3.0.0", - "pretty-bytes": "^3.0.0" + "argparse": "^2.0.1", + "entities": "~3.0.1", + "linkify-it": "^4.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "pretty-bytes": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz", - "integrity": "sha512-eb7ZAeUTgfh294cElcu51w+OTRp/6ItW758LjwJSK72LDevcuJn0P4eD71PLMDGPwwatXmAmYHTkzvpKlJE3ow==", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true } } }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "dev": true + }, "meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -22240,6 +22696,12 @@ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -22311,6 +22773,12 @@ "websocket-stream": "^5.0.1" } }, + "node-releases": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.9.tgz", + "integrity": "sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA==", + "dev": true + }, "noop-logger": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", @@ -23172,6 +23640,12 @@ } } }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -23776,6 +24250,15 @@ "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", "dev": true }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -24050,15 +24533,6 @@ "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", "dev": true }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -24133,6 +24607,15 @@ "supports-preserve-symlinks-flag": "^1.0.0" } }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, "resolve-dir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", @@ -24289,6 +24772,44 @@ } } }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + } + } + }, "semver": { "version": "7.3.7", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", @@ -24363,6 +24884,15 @@ } } }, + "serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", @@ -24482,6 +25012,15 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -24533,12 +25072,6 @@ "simple-concat": "^1.0.0" } }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", - "dev": true - }, "slice-ansi": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", @@ -24842,12 +25375,21 @@ } }, "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "requires": { - "source-map": "^0.5.6" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "source-map-url": { @@ -24951,12 +25493,6 @@ "figgy-pudding": "^3.5.1" } }, - "stack-parser": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/stack-parser/-/stack-parser-0.0.1.tgz", - "integrity": "sha512-7wM3FaSOHg0EMrQ4GqRLLwAN4oY8eUHiqOnxTQgRnJ3hAiGKhAItH+cAJHqyyxgBJSr06MosLpkg9hksbrJakQ==", - "dev": true - }, "staged-git-files": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-1.1.1.tgz", @@ -25318,6 +25854,12 @@ } } }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, "tar": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", @@ -25394,6 +25936,51 @@ } } }, + "terser": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.2.tgz", + "integrity": "sha512-JKuM+KvvWVqT7muHVyrwv7FVRPnmHDwF6XwoIxdbF5Witi0vu99RYpxDexpJndXt3jbZZmmWr2/mQa6HvSNdSg==", + "dev": true, + "requires": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", + "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + } + } + }, "text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -25637,11 +26224,17 @@ "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw==", - "dev": true + "ts-loader": { + "version": "9.4.2", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.2.tgz", + "integrity": "sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + } }, "ts-node": { "version": "10.9.1", @@ -25721,9 +26314,9 @@ "dev": true }, "typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "ua-parser-js": { @@ -25732,29 +26325,11 @@ "integrity": "sha512-00y/AXhx0/SsnI51fTc0rLRmafiGOM4/O+ny10Ps7f+j/b8p/ZY11ytMgznXkOVo4GQ+KwQG5UQLkLGirsACRg==", "dev": true }, - "uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", - "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", - "dev": true, - "requires": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true }, "ultron": { "version": "1.1.1", @@ -25887,12 +26462,6 @@ "punycode": "^2.1.0" } }, - "uri-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", - "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==", - "dev": true - }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -26035,6 +26604,16 @@ "integrity": "sha512-lMFYXGpf7eg+RInVL021ZbJJT4hqsvsBvq5sZBp874jfhs3IWlA7OPoG0ojQrYcXHuUSi+Nqp6qGN+pPGaMgPQ==", "dev": true }, + "watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -26050,6 +26629,141 @@ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, + "webpack": { + "version": "5.75.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", + "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "dev": true, + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true + }, + "acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "dev": true, + "requires": {} + }, + "browserslist": { + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + } + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + } + } + }, + "webpack-cli": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", + "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", + "dev": true, + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.0.1", + "@webpack-cli/info": "^2.0.1", + "@webpack-cli/serve": "^2.0.1", + "colorette": "^2.0.14", + "commander": "^9.4.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "dependencies": { + "commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true + }, + "interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true + }, + "rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "requires": { + "resolve": "^1.20.0" + } + } + } + }, + "webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true + }, "websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -26130,6 +26844,12 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, "with": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz", diff --git a/package.json b/package.json index dd8629f245..8ae012fa1a 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "dev": "grunt monitor", "test": "grunt test", "release": "grunt release", + "watch": "webpack --watch", "precommit": "lint-staged", "docs": "grunt docs", "commit": "npx cz", @@ -42,39 +43,39 @@ "commitlint": "^17.0.3", "cz-conventional-changelog": "^3.3.0", "grunt": "^1.0.1", - "grunt-babel": "^6.0.0", "grunt-banner": "^0.6.0", "grunt-browser-sync": "^2.2.0", "grunt-concurrent": "^3.0.0", - "grunt-contrib-clean": "^1.1.0", "grunt-contrib-compress": "^1.4.1", - "grunt-contrib-concat": "^1.0.1", "grunt-contrib-connect": "^3.0.0", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-jasmine": "^3.0.0", "grunt-contrib-pug": "^3.0.0", - "grunt-contrib-uglify": "^3.0.1", "grunt-contrib-watch": "^1.0.0", - "grunt-notify": "^0.4.5", "grunt-postcss": "^0.9.0", "grunt-remove-logging": "^0.2.0", "grunt-rename-util": "^1.0.0", "grunt-sass": "^3.1.0", "grunt-text-replace": "^0.4.0", + "grunt-webpack": "^5.0.0", "husky": "^8.0.1", "jasmine": "^3.8.0", - "jquery": "^3.2.1", + "jstransformer-markdown-it": "^3.0.0", "lint-staged": "^7.0.5", "node-archiver": "^0.3.0", "phantomjs-prebuilt": "^2.1.14", "pinst": "^3.0.0", "prettier": "^1.12.1", - "sass": "^1.35.2" + "sass": "^1.35.2", + "ts-loader": "^9.4.2", + "typescript": "^4.9.5", + "webpack": "^5.75.0", + "webpack-cli": "^5.0.1" }, "files": [ "dist", "extras", - "js/**/*.js", + "src/**/*.ts", "sass/**/*.scss", "Gruntfile.js", "LICENSE" @@ -83,5 +84,8 @@ "commitizen": { "path": "./node_modules/cz-conventional-changelog" } + }, + "dependencies": { + "animejs": "^3.2.1" } } diff --git a/pug/404.pug b/pug/404.pug index 3f9c9bc48f..89a1037ced 100644 --- a/pug/404.pug +++ b/pug/404.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/404_content.html - include _footer.html - include _scripts.html + include contents/404_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/_footer.html b/pug/_footer.html deleted file mode 100644 index cd8f83b5f5..0000000000 --- a/pug/_footer.html +++ /dev/null @@ -1,33 +0,0 @@ -
      diff --git a/pug/_scripts.html b/pug/_scripts.html deleted file mode 100644 index 93d1633fe0..0000000000 --- a/pug/_scripts.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/pug/about.pug b/pug/about.pug index d8ec1c0bfb..b98f6c565d 100644 --- a/pug/about.pug +++ b/pug/about.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include about/about_content.html - include _footer.html - include _scripts.html + include contents/about_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/auto-init.pug b/pug/auto-init.pug index c173c80f43..4a51b8ebaa 100644 --- a/pug/auto-init.pug +++ b/pug/auto-init.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/auto_init_content.html - include _footer.html - include _scripts.html + include contents/auto_init_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/autocomplete.pug b/pug/autocomplete.pug index 57f490472e..a65928439a 100644 --- a/pug/autocomplete.pug +++ b/pug/autocomplete.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/autocomplete_content.html - include _footer.html - include _scripts.html + include contents/autocomplete_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/badges.pug b/pug/badges.pug index 9c63d8b4c5..2947615c8b 100644 --- a/pug/badges.pug +++ b/pug/badges.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/badges_content.html - include _footer.html - include _scripts.html + include contents/badges_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/breadcrumbs.pug b/pug/breadcrumbs.pug index 462f33ccc5..99b2f2db47 100644 --- a/pug/breadcrumbs.pug +++ b/pug/breadcrumbs.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/breadcrumbs_content.html - include _footer.html - include _scripts.html + include contents/breadcrumbs_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/buttons.pug b/pug/buttons.pug index d45eeb9e77..0f21907569 100644 --- a/pug/buttons.pug +++ b/pug/buttons.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/buttons_content.html - include _footer.html - include _scripts.html + include contents/buttons_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/cards.pug b/pug/cards.pug index b4228e21f7..2a56e7c22f 100644 --- a/pug/cards.pug +++ b/pug/cards.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/cards_content.html - include _footer.html - include _scripts.html + include contents/cards_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/carousel.pug b/pug/carousel.pug index e71e1ef709..ea78b1c1ca 100644 --- a/pug/carousel.pug +++ b/pug/carousel.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/carousel_content.html - include _footer.html - include _scripts.html + include contents/carousel_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/checkboxes.pug b/pug/checkboxes.pug index 3b8b62aee8..ead5de69f3 100644 --- a/pug/checkboxes.pug +++ b/pug/checkboxes.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/checkboxes_content.html - include _footer.html - include _scripts.html + include contents/checkboxes_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/chips.pug b/pug/chips.pug index 03544f134a..f75447315d 100644 --- a/pug/chips.pug +++ b/pug/chips.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/chips_content.html - include _footer.html - include _scripts.html + include contents/chips_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/collapsible.pug b/pug/collapsible.pug index 22f6f26adb..5332087222 100644 --- a/pug/collapsible.pug +++ b/pug/collapsible.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/collapsible_content.html - include _footer.html - include _scripts.html + include contents/collapsible_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/collections.pug b/pug/collections.pug index 4338078b74..4ad5eaea8a 100644 --- a/pug/collections.pug +++ b/pug/collections.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/collections_content.html - include _footer.html - include _scripts.html + include contents/collections_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/color.pug b/pug/color.pug index c961368b2d..620a557024 100644 --- a/pug/color.pug +++ b/pug/color.pug @@ -4,10 +4,10 @@ doctype html html(lang="en") head - include _head.pug + include includes/_head.pug body - include _navbar.pug + include includes/_navbar.pug main - include page-contents/color_content.html - include _footer.html - include _scripts.html + include contents/color_content.html + include includes/_footer.pug + include includes/_scripts.pug diff --git a/pug/page-contents/404_content.html b/pug/contents/404_content.html similarity index 100% rename from pug/page-contents/404_content.html rename to pug/contents/404_content.html diff --git a/pug/about/about_content.html b/pug/contents/about_content.html similarity index 98% rename from pug/about/about_content.html rename to pug/contents/about_content.html index 802b781624..0f28bc6d75 100644 --- a/pug/about/about_content.html +++ b/pug/contents/about_content.html @@ -30,14 +30,14 @@

      Principles

      Material is the metaphor

      The metaphor of material defines the relationship between space and motion. The idea is that the technology is inspired by paper and ink and is utilized to facilitate creativity and innovation. Surfaces and edges provide familiar visual cues that allow users to quickly understand the technology beyond the physical world.

      -
      +

      Bold, graphic, intentional

      Elements and components such as grids, typography, color, and imagery are not only visually pleasing, but also create a sense of hierarchy, meaning, and focus. Emphasis on different actions and components create a visual guide for users.

      -
      +
      @@ -55,7 +55,7 @@

      Meet the Team

      The community
      -

      Due to inactivity of the original developers, MaterializeCSS has been forked by a community of enthusiasts, which continues to be fully maintained by open source principes since 2021.
      +

      Due to inactivity of the original developers, MaterializeCSS has been forked by a community of enthusiasts, which continues to be fully maintained by open source principes since 2021. Without the many contributors who participated in this fork, this project would probably not have received any updates anymore :

      @@ -132,7 +132,7 @@

      Kevin Louie

      -
      +
        diff --git a/pug/page-contents/auto_init_content.html b/pug/contents/auto_init_content.html similarity index 97% rename from pug/page-contents/auto_init_content.html rename to pug/contents/auto_init_content.html index 811229e046..df2b80ae77 100644 --- a/pug/page-contents/auto_init_content.html +++ b/pug/contents/auto_init_content.html @@ -51,7 +51,7 @@

        Ignoring Elements

      -
      +
        diff --git a/pug/page-contents/autocomplete_content.html b/pug/contents/autocomplete_content.html similarity index 92% rename from pug/page-contents/autocomplete_content.html rename to pug/contents/autocomplete_content.html index 627fdd561b..b54385255c 100644 --- a/pug/page-contents/autocomplete_content.html +++ b/pug/contents/autocomplete_content.html @@ -109,20 +109,6 @@

        Initialization

        } }); }); - - - // Or with jQuery - - $(document).ready(function(){ - $('input.autocomplete').autocomplete({ - // specify options here - data: [ - {id: 12, text: "Apple"}, - {id: 13, text: "Microsoft"}, - {id: 42, text: "Google", image: 'http://placehold.it/250x250'} - ] - }); - });
      @@ -201,7 +187,7 @@
                   Copied!
                   content_copy
      -            
      +            
       onSearch: function(text, autocomplete) {
         const filteredData = autocomplete.options.data.filter(item => {
           return Object.keys(item)
      @@ -219,21 +205,13 @@ 

      Methods

      -

      Because jQuery is no longer a dependency, all the methods are called on the plugin instance. You can get the plugin - instance like this:

      +

      All the methods are called on the plugin instance. You can get the plugin instance like this:

                     Copied!
                     content_copy
      -              
      +              
         var instance = M.Autocomplete.getInstance(elem);
      -
      -  /* jQuery Method Calls
      -    You can still use the old jQuery plugin method calls.
      -    But you won't be able to access instance properties.
      -
      -    $('.autocomplete').autocomplete('methodName');
      -    $('.autocomplete').autocomplete('methodName', paramName);
      -  */
      +  instance.open();
                     
                   
      @@ -244,7 +222,7 @@
      
       instance.open();
             
      -
      +
      .close(); @@ -253,7 +231,7 @@
      
       instance.close();
             
      -
      +
      .selectOption(id); @@ -265,7 +243,7 @@
      Arguments
      
       instance.selectOption(42);
             
      -
      +
      .setMenuItems(items); @@ -282,7 +260,7 @@
      Arguments
      {id: 42, text: "Google", image: 'http://placehold.it/250x250'} ]);
      -
      +
      .destroy(); @@ -344,7 +322,7 @@

      Properties

      -
      +
        diff --git a/pug/page-contents/badges_content.html b/pug/contents/badges_content.html similarity index 98% rename from pug/page-contents/badges_content.html rename to pug/contents/badges_content.html index 630220d603..9b42c22542 100644 --- a/pug/page-contents/badges_content.html +++ b/pug/contents/badges_content.html @@ -76,7 +76,7 @@

        Badges in Navbar

      -
      +
      
       <nav>
      @@ -110,7 +110,7 @@ 

      Badges in Collapsibles

      Lorem ipsum dolor sit amet.

      -
      +
      
       <ul class="collapsible">
      @@ -183,7 +183,7 @@ 

      Options

      -
      +
        diff --git a/pug/page-contents/breadcrumbs_content.html b/pug/contents/breadcrumbs_content.html similarity index 94% rename from pug/page-contents/breadcrumbs_content.html rename to pug/contents/breadcrumbs_content.html index 065a27c6d4..b7b12b5d3f 100644 --- a/pug/page-contents/breadcrumbs_content.html +++ b/pug/contents/breadcrumbs_content.html @@ -21,7 +21,7 @@

        Basic

      -

      +
                     Copied!
                     content_copy
      @@ -37,7 +37,7 @@ 

      Basic

      </nav>
      -
      +
      @@ -46,7 +46,7 @@

      Basic

      -
      +
        diff --git a/pug/page-contents/buttons_content.html b/pug/contents/buttons_content.html similarity index 91% rename from pug/page-contents/buttons_content.html rename to pug/contents/buttons_content.html index ea5cf066a0..c2a3debbea 100644 --- a/pug/page-contents/buttons_content.html +++ b/pug/contents/buttons_content.html @@ -14,7 +14,7 @@

        Raised

                   Copied!
                   content_copy
        -          
        +          
         <a class="waves-effect waves-light btn">button</a>
         <a class="waves-effect waves-light btn"><i class="material-icons left">cloud</i>button</a>
         <a class="waves-effect waves-light btn"><i class="material-icons right">cloud</i>button</a>
        @@ -24,16 +24,16 @@ 

        Raised

        Floating

        - add

        + add
                   Copied!
                   content_copy
        -          
        +          
           <a class="btn-floating btn-large waves-effect waves-light"><i class="material-icons">add</i></a>
         
                   
                 
        -
        +
        Floating Action Button

        A circular material button that lifts and displays an ink reaction on press. See the documentation on this page

        @@ -42,12 +42,12 @@
        Floating Action Button

        Flat

        Flat buttons are used to reduce excessive layering. For example, flat buttons are usually used for actions within a card or modal so there aren't too many overlapping shadows.

        - Button + Button
                   Copied!
                   content_copy
        -          
        -  <a class="waves-effect waves-primary btn-flat">Button</a>
        +          
        +  <a class="waves-effect btn-flat">Button</a>
                   
                 
        @@ -75,7 +75,7 @@

        Large

                   Copied!
                   content_copy
        -          
        +          
         <a class="waves-effect waves-light btn-large">Button</a>
         <a class="waves-effect waves-light btn-large"><i class="material-icons left">cloud</i>button</a>
         <a class="waves-effect waves-light btn-large"><i class="material-icons right">cloud</i>button</a>
        @@ -93,7 +93,7 @@ 

        Small

                   Copied!
                   content_copy
        -          
        +          
         <a class="waves-effect waves-light btn-small">Button</a>
         <a class="waves-effect waves-light btn-small"><i class="material-icons left">cloud</i>button</a>
         <a class="waves-effect waves-light btn-small"><i class="material-icons right">cloud</i>button</a>
        @@ -112,7 +112,7 @@ 

        Disabled

                   Copied!
                   content_copy
        -          
        +          
         <a class="btn-large disabled">Button</a>
         <a class="btn disabled">Button</a>
         <a class="btn-flat disabled">Button</a>
        @@ -123,7 +123,7 @@ 

        Disabled

      -
      +
      diff --git a/pug/page-contents/cards_content.html b/pug/contents/cards_content.html similarity index 95% rename from pug/page-contents/cards_content.html rename to pug/contents/cards_content.html index 4e8668a790..3f9fb5ffa2 100644 --- a/pug/page-contents/cards_content.html +++ b/pug/contents/cards_content.html @@ -23,7 +23,7 @@

      Basic Card

      -
      +
                       Copied!
                       content_copy
      @@ -45,7 +45,7 @@ 

      Basic Card

      </div>
      -
      +
      @@ -69,13 +69,13 @@

      Image Card

      -



      +

      Here is the standard card with an image thumbnail.

      -
      +
                     Copied!
                     content_copy
      @@ -99,7 +99,7 @@ 

      Image Card

      </div>
      -
      +
      @@ -121,7 +121,7 @@

      FABs in Cards

      -



      +

      Here is an image card with a Floating Action Button.

      @@ -146,7 +146,7 @@

      FABs in Cards

      -
      +
                     Copied!
                     content_copy
      @@ -167,7 +167,7 @@ 

      FABs in Cards

      </div>
      -
      +
      @@ -192,13 +192,13 @@

      Horizontal Card

      -



      +

      Here is the standard card with a horizontal image.

      -
      +
                     Copied!
                     content_copy
      @@ -221,7 +221,7 @@ 

      Horizontal Card

      </div>
      -
      +
      @@ -232,8 +232,9 @@

      Horizontal Card

      Card Reveal

      -
      - +
      + +
      Card Titlemore_vert @@ -246,20 +247,21 @@

      Card Reveal

      -



      +

      Here you can add a card that reveals more information once clicked. Just add the card-reveal div with a span.card-title inside to make this work. Add the class activator to an element inside the card to allow it to open the card reveal.

      -
      +
                     Copied!
                     content_copy
                     
         <div class="card">
      -    <div class="card-image waves-effect waves-block waves-light">
      -      <img class="activator" src="images/office.jpg">
      +    <div class="card-image">
      +      <img src="images/office.jpg">
      +      <div class="activator waves-effect waves-light" style="position:absolute;top:0;bottom:0;right:0;left:0;"></div>
           </div>
           <div class="card-content">
             <span class="card-title activator">Card Title<i class="material-icons right">more_vert</i></span>
      @@ -274,12 +276,14 @@ 

      Card Reveal

      +
      Card Action Options
      -
      - +
      + +
      Card Titlemore_vert @@ -297,17 +301,19 @@
      Card Action Options
      -

      +

      The default state is having the card-reveal go over the card-action.

      +
      -
      - +
      + +
      Card Titlemore_vert @@ -331,7 +337,7 @@
      Card Action Options

      -
      +
                     Copied!
                     content_copy
      @@ -404,7 +410,7 @@ 
      White
      -

      +

      Basic white background card with tabs.

      @@ -433,7 +439,7 @@
      Colored
      -

      +

      Colored or dark background card with tabs.

      @@ -476,7 +482,7 @@
      Small
      -

      +

      The Small Card limits the height of the card to 300px.

      @@ -501,7 +507,7 @@
      Medium
      -

      +

      The Medium Card limits the height of the card to 400px.

      @@ -526,7 +532,7 @@
      Large
      -

      +

      The Large Card limits the height of the card to 500px.

      @@ -543,13 +549,13 @@

      Card Panel

      -



      +

      For a simpler card with less markup, try using a card panel which just has padding and a shadow effect

      -
      +
                     Copied!
                     content_copy
      @@ -570,7 +576,7 @@ 

      Card Panel

      -
      +
      diff --git a/pug/page-contents/carousel_content.html b/pug/contents/carousel_content.html similarity index 93% rename from pug/page-contents/carousel_content.html rename to pug/contents/carousel_content.html index 868534eab7..1c44e1c8aa 100644 --- a/pug/page-contents/carousel_content.html +++ b/pug/contents/carousel_content.html @@ -7,7 +7,7 @@

      Our Carousel is a robust and versatile component that can be an image slider, to an item carousel, to an onboarding experience. It is touch enabled making it especially smooth to use on mobile.

      Note: This is also touch compatible! Try swiping with your finger to scroll through the carousel.

      -
      + -
      +
                 Copied!
      @@ -56,17 +56,9 @@ 

      Initialization

      // specify options here }); }); - - // Or with jQuery - - $(document).ready(function(){ - $('.carousel').carousel({ - // specify options here - }); - });
      -
      +
      @@ -138,27 +130,18 @@

      Options

      -
      +

      Methods

      -

      Because jQuery is no longer a dependency, all the methods are called on the plugin instance. You can get the plugin - instance like this:

      +

      All the methods are called on the plugin instance. You can get the plugin instance like this:

                     Copied!
                     content_copy
      -              
      +              
         var instance = M.Carousel.getInstance(elem);
      -
      -  /* jQuery Method Calls
      -    You can still use the old jQuery plugin method calls.
      -    But you won't be able to access instance properties.
      -
      -    $('.carousel').carousel('methodName');
      -    $('.carousel').carousel('methodName', paramName);
      -  */
                     
                   
      @@ -173,7 +156,7 @@
      Arguments
      instance.next(); instance.next(3); // Move next n times.
      -
      +
      .prev(); @@ -186,7 +169,7 @@
      Arguments
      instance.prev(); instance.prev(3); // Move previous n times.
      -
      +
      .set(); @@ -199,7 +182,7 @@
      Arguments
      instance.set(); instance.set(3); // Set to nth slide.
      -
      +
      .destroy(); @@ -257,7 +240,7 @@

      Full Width Slider

      Our carousel has a full width option that makes it into a simple and elegant image carousel. You can also have indicators that show up on the bottom of the slider.

      Note: This is also touch compatible! Try swiping with your finger to scroll through the carousel.

      -
      + -
      +
                 Copied!
      @@ -295,12 +278,6 @@ 

      Full Width Slider

      var instance = M.Carousel.init({ fullWidth: true }); - - // Or with jQuery - - $('.carousel.carousel-slider').carousel({ - fullWidth: true - });
      @@ -312,7 +289,7 @@

      Special Options

      your carousel by adding a div with the class carousel-fixed-item and adding your fixed content in there.

      Note: This is also touch compatible! Try swiping with your finger to scroll through the carousel.

      -
      + -
      +
                 Copied!
                 content_copy
      @@ -371,20 +348,13 @@ 

      Fourth Panel

      fullWidth: true, indicators: true }); - - // Or with jQuery - - $('.carousel.carousel-slider').carousel({ - fullWidth: true, - indicators: true - });
      -
      +
      diff --git a/pug/page-contents/checkboxes_content.html b/pug/contents/checkboxes_content.html similarity index 97% rename from pug/page-contents/checkboxes_content.html rename to pug/contents/checkboxes_content.html index 87bc213c1c..ea4de006c5 100644 --- a/pug/page-contents/checkboxes_content.html +++ b/pug/contents/checkboxes_content.html @@ -45,7 +45,7 @@

      -
      +
                 Copied!
                 content_copy
      @@ -93,7 +93,7 @@
       
       
           
      -
      +
      diff --git a/pug/page-contents/chips_content.html b/pug/contents/chips_content.html similarity index 90% rename from pug/page-contents/chips_content.html rename to pug/contents/chips_content.html index 46f3c3889c..08cf6c2377 100644 --- a/pug/page-contents/chips_content.html +++ b/pug/contents/chips_content.html @@ -68,13 +68,13 @@

      Javascript Plugin

      To add tags, just enter your tag text and press enter. You can delete them by clicking on the close icon or by using your delete button.

      -
      +

      Set initial tags.

      -
      +

      Use placeholders and override hint texts.

      -
      +

      Use autocomplete with chips.

      @@ -105,33 +105,15 @@

      Initialization

      var elems = document.querySelectorAll('.chips'); var instances = M.Chips.init(elems, { // specify options here - }); - }); - - // Or with jQuery - $(document).ready(function(){ - $('.chips').chips({ - // specify options here - }); - $('.chips-initial').chips({ - data: [ - {id: 12, text: "Apple"}, - {id: 13, text: "Microsoft"}, - {id: 42, text: "Google", image: 'http://placehold.it/250x250'} - ] - }); - $('.chips-placeholder').chips({ - placeholder: 'Enter a tag', - secondaryPlaceholder: '+Tag', - }); - $('.chips-autocomplete').chips({ autocompleteOptions: { data: [ {id: 12, text: "Apple"}, {id: 13, text: "Microsoft"}, {id: 42, text: "Google", image: 'http://placehold.it/250x250'} ] - } + }, + placeholder: 'Enter a tag', + secondaryPlaceholder: '+Tag', }); });
      @@ -149,7 +131,7 @@

      Initialization

      -
      +

      Options

      @@ -227,21 +209,12 @@

      Methods

      -

      Because jQuery is no longer a dependency, all the methods are called on the plugin instance. You can get the plugin - instance like this:

      +

      All the methods are called on the plugin instance. You can get the plugin instance like this:

                     Copied!
                     content_copy
      -              
      +              
           var instance = M.Chips.getInstance(elem);
      -
      -    /* jQuery Method Calls
      -      You can still use the old jQuery plugin method calls.
      -      But you won't be able to access instance properties.
      -
      -      $('.chips').chips('methodName');
      -      $('.chips').chips('methodName', paramName);
      -    */
                     
                   
      @@ -260,7 +233,7 @@
      Arguments
      image: '', // optional });
      -
      +
      .deleteChip(); @@ -272,7 +245,7 @@
      Arguments
      
         instance.deleteChip(3); // Delete 3rd chip.
               
      -
      +
      .selectChip(); @@ -332,7 +305,7 @@

      Properties

      -
      +
      diff --git a/pug/page-contents/collapsible_content.html b/pug/contents/collapsible_content.html similarity index 95% rename from pug/page-contents/collapsible_content.html rename to pug/contents/collapsible_content.html index cbf1431bf5..360586a812 100644 --- a/pug/page-contents/collapsible_content.html +++ b/pug/contents/collapsible_content.html @@ -41,7 +41,7 @@
      -
      +
                   Copied!
      @@ -77,19 +77,11 @@ 

      Initialization

      // specify options here }); }); - - // Or with jQuery - - $(document).ready(function(){ - $('.collapsible').collapsible({ - // specify options here - }); - });
      -
      -
      + +
      Preselected Section
      If you want a collapsible with a preopened section just add the active class to the li wrapping the collapsible-header.
        @@ -207,21 +199,12 @@

        Methods

        of the collapsible you want to open.
        -

        Because jQuery is no longer a dependency, all the methods are called on the plugin instance. You can get the plugin - instance like this:

        +

        All the methods are called on the plugin instance. You can get the plugin instance like this:

                       Copied!
                       content_copy
        -              
        +              
           var instance = M.Collapsible.getInstance(elem);
        -
        -  /* jQuery Method Calls
        -    You can still use the old jQuery plugin method calls.
        -    But you won't be able to access instance properties.
        -
        -    $('.collapsible').collapsible('methodName');
        -    $('.collapsible').collapsible('methodName', paramName);
        -  */
                       
                     
        @@ -235,7 +218,7 @@
        Arguments
        
         instance.open(3);
               
        -
        +
        .close(); @@ -247,7 +230,7 @@
        Arguments
        
         instance.close(3);
               
        -
        +
        .destroy(); @@ -256,8 +239,8 @@
        
         instance.destroy();
               
        -
        -
        + +

        Properties

        @@ -284,8 +267,8 @@

        Properties

      -
      -
      + +

      Collapsible Types

      There are two ways a collapsible can behave. It can either allow multiple sections to stay open, or it can only allow @@ -431,7 +414,7 @@
      Popout
      -
      +
      diff --git a/pug/page-contents/collections_content.html b/pug/contents/collections_content.html similarity index 97% rename from pug/page-contents/collections_content.html rename to pug/contents/collections_content.html index 01756feb9c..e6e98c0afb 100644 --- a/pug/page-contents/collections_content.html +++ b/pug/contents/collections_content.html @@ -28,7 +28,7 @@

      Basic

      </ul>
      -
      +
      @@ -125,7 +125,7 @@

      Avatar Content

    • Title -

      First Line
      +

      First Line Second Line

      grade @@ -133,7 +133,7 @@

      Avatar Content

    • folder Title -

      First Line
      +

      First Line Second Line

      grade @@ -141,7 +141,7 @@

      Avatar Content

    • insert_chart Title -

      First Line
      +

      First Line Second Line

      grade @@ -149,7 +149,7 @@

      Avatar Content

    • play_arrow Title -

      First Line
      +

      First Line Second Line

      grade @@ -204,7 +204,7 @@

      Avatar Content

    • -
      +
      diff --git a/pug/page-contents/color_content.html b/pug/contents/color_content.html similarity index 99% rename from pug/page-contents/color_content.html rename to pug/contents/color_content.html index 41b21ceabf..2eb98ef415 100644 --- a/pug/page-contents/color_content.html +++ b/pug/contents/color_content.html @@ -8,7 +8,8 @@

      Usage

      Here is a color palette based on the material design base colors. Each of these colors is defined with a base color class and an optional lighten or darken class.

      -
      + +
      Background Color

      To apply a background color, just add the color name and light/darkness as a class to the element.

      @@ -21,9 +22,9 @@
      Background Color
      +
      -
      - +
      Text Color

      To apply a text color, just append -text to the color class like this:

      @@ -39,6 +40,7 @@
      Text Color
      +
      @@ -369,7 +371,7 @@

      Color Palette

      -
      +
      diff --git a/pug/page-contents/css-transitions_content.html b/pug/contents/css-transitions_content.html similarity index 95% rename from pug/page-contents/css-transitions_content.html rename to pug/contents/css-transitions_content.html index 9c24336d92..c9e7dd05c9 100644 --- a/pug/page-contents/css-transitions_content.html +++ b/pug/contents/css-transitions_content.html @@ -6,16 +6,16 @@

      We've made some custom animation classes that will transition your content with only CSS. Each CSS transition consists of a base class that applies the necessary styles and additional classes that control the state of the transition.

      -
      +
      Scale

      Use this scale in and out elements. Make sure to add the base transition class scale-transition. Then add the class scale-out to scale the element down until it is hidden. To start something as hidden, add the class scale-out first, and then add the class scale-in to scale the element up until it is shown.

      -
      + add Toggle Scale -

      +
                 Copied!
                 content_copy
      @@ -35,7 +35,7 @@ 
      Scale
      -
      +
      diff --git a/pug/page-contents/dropdown_content.html b/pug/contents/dropdown_content.html similarity index 75% rename from pug/page-contents/dropdown_content.html rename to pug/contents/dropdown_content.html index 853a7660c9..26ce390ca1 100644 --- a/pug/page-contents/dropdown_content.html +++ b/pug/contents/dropdown_content.html @@ -29,8 +29,8 @@ cloudfive -
      -
      + +
                 Copied!
                 content_copy
      @@ -53,6 +53,7 @@
       
             

      Initialization

      +
                 Copied!
                 content_copy
      @@ -63,14 +64,6 @@ 

      Initialization

      // specify options here }); }); - - // Or with jQuery - - $(document).ready(function(){ - $('.dropdown-trigger').dropdown({ - // specify options here - }); - });
      @@ -172,66 +165,68 @@

      Options

      Examples

      - - Left DropDown! - - - - - - Right DropDown! - - - +
      + + +
      - - document.addEventListener('DOMContentLoaded', function() { - var elems = document.querySelectorAll('.dropdown-trigger')[0]; - var instances = M.Dropdown.init(elems, { - // the dropdown is aligned to left - alignment: 'left', - // enabled for example to be visible - constrainWidth: false, - }); - }); - +
      +            
      +  document.addEventListener('DOMContentLoaded', function() {
      +    var elems = document.querySelectorAll('.dropdown-trigger')[0];
      +    var instances = M.Dropdown.init(elems, {
      +      // the dropdown is aligned to left
      +      alignment: 'left',
      +      // enabled for example to be visible
      +      constrainWidth: false,
      +    });
      +  });
      +          
      @@ -239,21 +234,12 @@

      Examples

      Methods

      -

      Because jQuery is no longer a dependency, all the methods are called on the plugin instance. You can get the plugin - instance like this:

      +

      All the methods are called on the plugin instance. You can get the plugin instance like this:

                     Copied!
                     content_copy
      -              
      +              
           var instance = M.Dropdown.getInstance(elem);
      -
      -    /* jQuery Method Calls
      -      You can still use the old jQuery plugin method calls.
      -      But you won't be able to access instance properties.
      -
      -      $('.dropdown-trigger').dropdown('methodName');
      -      $('.dropdown-trigger').dropdown('methodName', paramName);
      -    */
                     
                   
      @@ -264,7 +250,7 @@
      
         instance.open();
               
      -
      +
      .close(); @@ -273,7 +259,7 @@
      
         instance.close();
               
      -
      +
      .recalculateDimensions(); @@ -282,7 +268,7 @@
      
         instance.recalculateDimensions();
               
      -
      +
      .destroy(); @@ -348,7 +334,7 @@

      Properties

      -
      +
      diff --git a/pug/page-contents/featureDiscovery_content.html b/pug/contents/featureDiscovery_content.html similarity index 85% rename from pug/page-contents/featureDiscovery_content.html rename to pug/contents/featureDiscovery_content.html index 572df086bf..5308ae70df 100644 --- a/pug/page-contents/featureDiscovery_content.html +++ b/pug/contents/featureDiscovery_content.html @@ -9,10 +9,10 @@

      Feature discovery prompts have more impact when they are presented to the right users at contextually relevant moments. When presented to the wrong user at the wrong time, they can be intrusive and annoying.

      - Open tap target     - Close tap target -
      -
      + Open tap target     + Close tap target + +
      @@ -106,21 +98,12 @@

      Options

      Methods

      -

      Because jQuery is no longer a dependency, all the methods are called on the plugin instance. You can get the plugin - instance like this:

      +

      All the methods are called on the plugin instance. You can get the plugin instance like this:

                     Copied!
                     content_copy
      -              
      +              
         var instance = M.TapTarget.getInstance(elem);
      -
      -  /* jQuery Method Calls
      -    You can still use the old jQuery plugin method calls.
      -    But you won't be able to access instance properties.
      -
      -    $('.tap-target').tapTarget('methodName');
      -    $('.tap-target').tapTarget('methodName', paramName);
      -  */
                     
                   
      @@ -132,7 +115,7 @@
      instance.next(); instance.next(3); // Move next n times. -
      +
      .close(); @@ -141,7 +124,7 @@
      
         instance.close();
                 
      -
      +
      .destroy(); @@ -187,9 +170,8 @@

      Properties

      -
      +
      -
      • diff --git a/pug/page-contents/floating-action-button-content.html b/pug/contents/floating-action-button-content.html similarity index 92% rename from pug/page-contents/floating-action-button-content.html rename to pug/contents/floating-action-button-content.html index a1535eea06..d75958e548 100644 --- a/pug/page-contents/floating-action-button-content.html +++ b/pug/contents/floating-action-button-content.html @@ -41,17 +41,9 @@

        Initialization

        // specify options here }); }); - - // Or with jQuery - - $(document).ready(function(){ - $('.fixed-action-btn').floatingActionButton({ - // specify options here - }); - }); -
        +
      @@ -89,7 +81,7 @@

      Options

      -
      +
      @@ -97,21 +89,12 @@

      Options

      Methods
      -

      Because jQuery is no longer a dependency, all the methods are called on the plugin instance. You can get the plugin - instance like this:

      +

      All the methods are called on the plugin instance. You can get the plugin instance like this:

                     Copied!
                     content_copy
      -              
      +              
         var instance = M.FloatingActionButton.getInstance(elem);
      -
      -  /* jQuery Method Calls
      -    You can still use the old jQuery plugin method calls.
      -    But you won't be able to access instance properties.
      -
      -    $('.fixed-action-btn').floatingActionButton('methodName');
      -    $('.fixed-action-btn').floatingActionButton('methodName', paramName);
      -  */
                   
                 
      @@ -122,7 +105,7 @@
      
       instance.open();
               
      -
      +
      .close(); @@ -131,7 +114,7 @@
      
       instance.close();
               
      -
      +
      .destroy(); @@ -317,19 +300,13 @@

      FAB to Toolbar

      toolbarEnabled: true }); }); - - // Or with jQuery - - $('.fixed-action-btn').floatingActionButton({ - toolbarEnabled: true - });
      -
      +
      diff --git a/pug/page-contents/footer_content.html b/pug/contents/footer_content.html similarity index 92% rename from pug/page-contents/footer_content.html rename to pug/contents/footer_content.html index da2d1826e0..dc3c621895 100644 --- a/pug/page-contents/footer_content.html +++ b/pug/contents/footer_content.html @@ -1,7 +1,7 @@
      -
      +