├── .babelrc ├── .editorconfig ├── .gitignore ├── LICENSE ├── README.md ├── build ├── options.js ├── webpack.base.js ├── webpack.dev.js ├── webpack.dist.js └── webpack.examples.js ├── dist ├── vue-simple-progress.js └── vue-simple-progress.min.js ├── examples-src ├── App.vue └── index.js ├── examples ├── examples.bundle.js └── index.html ├── index.html ├── package.json ├── release-minor.bat ├── release-patch.bat ├── src ├── components │ └── Progress.vue └── index.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", "stage-2"] 4 | ], 5 | "plugins": [ 6 | "transform-es2015-destructuring", 7 | "transform-es2015-parameters", 8 | "transform-object-rest-spread", 9 | "transform-runtime" 10 | ], 11 | "comments": false 12 | } 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 2 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Dave Williams 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-simple-progress 2 | > A simple, flexible progress bar for Vue.js 3 | 4 | vue-simple-progress is designed to be a lightweight [Vue.js](http://vuejs.org) progress bar requiring minimal configuration. 5 | 6 | ## Documentation 7 | 8 | [https://github.com/dzwillia/vue-simple-progress](https://github.com/dzwillia/vue-simple-progress) 9 | 10 | ## Demo 11 | 12 | [https://dzwillia.github.io/vue-simple-progress/examples](https://dzwillia.github.io/vue-simple-progress/examples) 13 | 14 | ## Requirements 15 | * [Vue.js](http://vuejs.org/) (^v2.1.4) 16 | 17 | ## Browser support 18 | IE 10+ (due to [CSS animation support](https://caniuse.com/#feat=css-animation)). 19 | 20 | ## Installation 21 | 22 | ### NPM 23 | 24 | ```bash 25 | npm install vue-simple-progress --save 26 | ``` 27 | 28 | ## Usage 29 | > All styling for this component is done via computed styles in the `Progress.vue` component and requires no external CSS files. 30 | 31 | ### ES6 32 | 33 | *The following examples can also be used with CommonJS by replacing ES6-specific syntax with CommonJS equivalents.* 34 | 35 | ```js 36 | import Vue from 'vue' 37 | import ProgressBar from 'vue-simple-progress' 38 | 39 | new Vue({ 40 | components: { 41 | ProgressBar 42 | } 43 | }) 44 | ``` 45 | 46 | in markup: 47 | 48 | ```html 49 |
50 | 51 |
52 | ``` 53 | 54 | ### Globals (script tag) 55 | 56 | Add a script tag pointing to `dist/vue-simple-progress.min.js` *after* adding Vue. 57 | 58 | Example: 59 | 60 | ```html 61 | 62 | 63 | ... 64 | 65 | 66 |
67 | 68 |
69 | 70 | 71 | 72 | 77 | 78 | 79 | ``` 80 | 81 | ## Examples 82 | 83 | ### Medium size 84 | ``` 85 | 86 | ``` 87 | 88 | ### Custom bar color 89 | ``` 90 | 91 | ``` 92 | 93 | ### Optional title for accessibility 94 | ``` 95 | 96 | ``` 97 | 98 | [More live code examples on JSFiddle](http://jsfiddle.net/dzwillia/47pvcjs9) 99 | 100 | ## Options 101 | 102 | | Props | Type | Values | Default | 103 | | ----------------- |:-----------------|:-----------------------------------------------|:-----------------| 104 | | val | Number | 0 - max | 0 | 105 | | max | Number | Any number | 100 | 106 | | size | Number \| String | tiny, small, medium, large, huge, massive, {n} | 3 | 107 | | bg-color | String | Color | #eee | 108 | | bar-color | String | Color | #2196f3 | 109 | | bar-transition | String | CSS transition | all 0.5s ease | 110 | | bar-border-radius | Number | 0 - max | 0 | 111 | | spacing | Number | Any Number | 4 | 112 | | text | String | Text to display | _(empty string)_ | 113 | | text-align | String | left, right, center | center | 114 | | text-position | String | bottom, top, middle, inside | bottom | 115 | | font-size | Number | Any Number | 13 | 116 | | text-fg-color | String | Color | #222 | 117 | 118 | ## License 119 | vue-simple-progress is open source and released under the [MIT License](LICENSE). 120 | 121 | Copyright (c) 2017 [David Z Williams](https://twitter.com/padredaveo). 122 | 123 | > *PS: I would love to know if you're using vue-simple-progress. Tweet to me at [@padredaveo](https://twitter.com/padredaveo)*. 124 | 125 | 126 | -------------------------------------------------------------------------------- /build/options.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const path = require('path') 4 | const version = require('../package.json').version 5 | 6 | const banner = 7 | '/*!\n' + 8 | ' * vue-simple-progress v' + version + ' (https://github.com/dzwillia/vue-simple-progress)\n' + 9 | ' * (c) ' + new Date().getFullYear() + ' David Z. Williams\n' + 10 | ' * Released under the MIT License.\n' + 11 | ' */' 12 | 13 | module.exports = { 14 | banner, 15 | version, 16 | isProduction: process.env.NODE_ENV === 'production', 17 | 18 | paths: { 19 | root: path.join(__dirname, '..'), 20 | 21 | src: { 22 | main: path.join(__dirname, '..', 'src'), 23 | examples: path.join(__dirname, '..', 'examples-src') 24 | }, 25 | 26 | output: { 27 | main: path.join(__dirname, '..', 'dist'), 28 | examples: path.join(__dirname, '..', 'examples') 29 | }, 30 | 31 | resolve(location) { 32 | return path.join(__dirname, '..', location) 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /build/webpack.base.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const options = require('./options') 4 | const autoprefixer = require('autoprefixer') 5 | 6 | module.exports = { 7 | resolve: { 8 | modules: [ 9 | options.paths.root, 10 | options.paths.resolve('node_modules') 11 | ], 12 | 13 | alias: { 14 | src: 'src', 15 | vue$: 'vue/dist/vue.common.js' 16 | }, 17 | 18 | extensions: ['.js', '.json', '.vue', '.scss'] 19 | }, 20 | 21 | module: { 22 | rules: [ 23 | { 24 | test: /\.vue$/, 25 | loader: 'vue-loader', 26 | options: { 27 | loaders: { 28 | // configured in the script specific webpack configs 29 | }, 30 | postcss: [ 31 | autoprefixer({ 32 | browsers: ['last 2 versions', 'ie > 9', 'Firefox ESR'] 33 | }) 34 | ] 35 | } 36 | }, 37 | { 38 | test: /\.js$/, 39 | loader: 'babel-loader', 40 | exclude: /node_modules/ 41 | } 42 | ] 43 | }, 44 | 45 | // Stats is used to customize Webpack's console output 46 | // https://webpack.js.org/configuration/stats/ 47 | stats: { 48 | hash: false, 49 | colors: true, 50 | chunks: false, 51 | version: false, 52 | children: false, 53 | timings: true 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /build/webpack.dev.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const merge = require('deep-assign') 4 | const webpack = require('webpack') 5 | 6 | const options = require('./options') 7 | const base = require('./webpack.base.js') 8 | 9 | const config = merge(base, { 10 | watch: true, 11 | devtool: '#eval-source-map', 12 | 13 | entry: options.paths.resolve('examples-src/index.js'), 14 | 15 | output: { 16 | filename: 'examples.bundle.js', 17 | path: options.paths.output.examples 18 | }, 19 | 20 | plugins: [ 21 | new webpack.DefinePlugin({ 22 | VERSION: JSON.stringify(options.version) 23 | }) 24 | ], 25 | 26 | devServer: { 27 | contentBase: options.paths.output.examples, 28 | host: 'localhost', 29 | historyApiFallback: true, 30 | noInfo: true 31 | } 32 | }) 33 | 34 | // First item in module.rules array is Vue 35 | config.module.rules[0].options.loaders = { 36 | scss: 'vue-style-loader!css-loader!sass-loader' 37 | } 38 | 39 | module.exports = config 40 | -------------------------------------------------------------------------------- /build/webpack.dist.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const merge = require('deep-assign') 4 | const webpack = require('webpack') 5 | 6 | const options = require('./options') 7 | const base = require('./webpack.base.js') 8 | 9 | const config = merge(base, { 10 | entry: options.paths.resolve('src/index.js'), 11 | 12 | output: { 13 | filename: options.isProduction ? 'vue-simple-progress.min.js' : 'vue-simple-progress.js', 14 | path: options.paths.output.main, 15 | library: 'VueSimpleProgress', 16 | libraryExport: 'default', 17 | libraryTarget: 'umd' 18 | }, 19 | 20 | plugins: [ 21 | new webpack.BannerPlugin({ 22 | banner: options.banner, 23 | raw: true, 24 | entryOnly: true 25 | }) 26 | ] 27 | }) 28 | 29 | // debug and production 30 | config.plugins = config.plugins.concat([ 31 | new webpack.LoaderOptionsPlugin({ 32 | minimize: true 33 | }), 34 | new webpack.DefinePlugin({ 35 | VERSION: JSON.stringify(options.version) 36 | }) 37 | ]) 38 | 39 | if (options.isProduction) { 40 | // production only 41 | config.plugins = config.plugins.concat([ 42 | // Set the production environment 43 | new webpack.DefinePlugin({ 44 | 'process.env.NODE_ENV': JSON.stringify('production') 45 | }), 46 | 47 | // Minify with dead-code elimination 48 | new webpack.optimize.UglifyJsPlugin({ 49 | compress: { 50 | warnings: false 51 | } 52 | }) 53 | ]) 54 | } 55 | 56 | module.exports = config 57 | -------------------------------------------------------------------------------- /build/webpack.examples.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const merge = require('deep-assign') 4 | const webpack = require('webpack') 5 | 6 | const options = require('./options') 7 | const base = require('./webpack.base.js') 8 | 9 | const config = merge(base, { 10 | entry: options.paths.resolve('examples-src/index.js'), 11 | 12 | output: { 13 | filename: 'examples.bundle.js', 14 | path: options.paths.output.examples 15 | }, 16 | 17 | plugins: [ 18 | new webpack.LoaderOptionsPlugin({ 19 | minimize: true 20 | }), 21 | 22 | // Set the production environment 23 | new webpack.DefinePlugin({ 24 | 'process.env.NODE_ENV': JSON.stringify('production'), 25 | VERSION: JSON.stringify(options.version) 26 | }), 27 | 28 | // Minify with dead-code elimination 29 | new webpack.optimize.UglifyJsPlugin({ 30 | compress: { 31 | warnings: false 32 | } 33 | }) 34 | ] 35 | }) 36 | 37 | module.exports = config 38 | -------------------------------------------------------------------------------- /dist/vue-simple-progress.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * vue-simple-progress v1.1.1 (https://github.com/dzwillia/vue-simple-progress) 3 | * (c) 2019 David Z. Williams 4 | * Released under the MIT License. 5 | */ 6 | (function webpackUniversalModuleDefinition(root, factory) { 7 | if(typeof exports === 'object' && typeof module === 'object') 8 | module.exports = factory(); 9 | else if(typeof define === 'function' && define.amd) 10 | define([], factory); 11 | else if(typeof exports === 'object') 12 | exports["VueSimpleProgress"] = factory(); 13 | else 14 | root["VueSimpleProgress"] = factory(); 15 | })(this, function() { 16 | return /******/ (function(modules) { // webpackBootstrap 17 | /******/ // The module cache 18 | /******/ var installedModules = {}; 19 | /******/ 20 | /******/ // The require function 21 | /******/ function __webpack_require__(moduleId) { 22 | /******/ 23 | /******/ // Check if module is in cache 24 | /******/ if(installedModules[moduleId]) { 25 | /******/ return installedModules[moduleId].exports; 26 | /******/ } 27 | /******/ // Create a new module (and put it into the cache) 28 | /******/ var module = installedModules[moduleId] = { 29 | /******/ i: moduleId, 30 | /******/ l: false, 31 | /******/ exports: {} 32 | /******/ }; 33 | /******/ 34 | /******/ // Execute the module function 35 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 36 | /******/ 37 | /******/ // Flag the module as loaded 38 | /******/ module.l = true; 39 | /******/ 40 | /******/ // Return the exports of the module 41 | /******/ return module.exports; 42 | /******/ } 43 | /******/ 44 | /******/ 45 | /******/ // expose the modules object (__webpack_modules__) 46 | /******/ __webpack_require__.m = modules; 47 | /******/ 48 | /******/ // expose the module cache 49 | /******/ __webpack_require__.c = installedModules; 50 | /******/ 51 | /******/ // define getter function for harmony exports 52 | /******/ __webpack_require__.d = function(exports, name, getter) { 53 | /******/ if(!__webpack_require__.o(exports, name)) { 54 | /******/ Object.defineProperty(exports, name, { 55 | /******/ configurable: false, 56 | /******/ enumerable: true, 57 | /******/ get: getter 58 | /******/ }); 59 | /******/ } 60 | /******/ }; 61 | /******/ 62 | /******/ // getDefaultExport function for compatibility with non-harmony modules 63 | /******/ __webpack_require__.n = function(module) { 64 | /******/ var getter = module && module.__esModule ? 65 | /******/ function getDefault() { return module['default']; } : 66 | /******/ function getModuleExports() { return module; }; 67 | /******/ __webpack_require__.d(getter, 'a', getter); 68 | /******/ return getter; 69 | /******/ }; 70 | /******/ 71 | /******/ // Object.prototype.hasOwnProperty.call 72 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 73 | /******/ 74 | /******/ // __webpack_public_path__ 75 | /******/ __webpack_require__.p = ""; 76 | /******/ 77 | /******/ // Load entry module and return exports 78 | /******/ return __webpack_require__(__webpack_require__.s = 0); 79 | /******/ }) 80 | /************************************************************************/ 81 | /******/ ([ 82 | /* 0 */ 83 | /***/ (function(module, exports, __webpack_require__) { 84 | 85 | "use strict"; 86 | 87 | 88 | Object.defineProperty(exports, "__esModule", { 89 | value: true 90 | }); 91 | exports.VueSimpleProgress = undefined; 92 | 93 | var _Progress = __webpack_require__(1); 94 | 95 | var _Progress2 = _interopRequireDefault(_Progress); 96 | 97 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 98 | 99 | if (typeof window !== 'undefined' && window.Vue) { 100 | Vue.component('vue-simple-progress', _Progress2.default); 101 | } 102 | 103 | exports.VueSimpleProgress = _Progress2.default; 104 | exports.default = _Progress2.default; 105 | 106 | /***/ }), 107 | /* 1 */ 108 | /***/ (function(module, exports, __webpack_require__) { 109 | 110 | var Component = __webpack_require__(2)( 111 | /* script */ 112 | __webpack_require__(3), 113 | /* template */ 114 | __webpack_require__(4), 115 | /* scopeId */ 116 | null, 117 | /* cssModules */ 118 | null 119 | ) 120 | 121 | module.exports = Component.exports 122 | 123 | 124 | /***/ }), 125 | /* 2 */ 126 | /***/ (function(module, exports) { 127 | 128 | // this module is a runtime utility for cleaner component module output and will 129 | // be included in the final webpack user bundle 130 | 131 | module.exports = function normalizeComponent ( 132 | rawScriptExports, 133 | compiledTemplate, 134 | scopeId, 135 | cssModules 136 | ) { 137 | var esModule 138 | var scriptExports = rawScriptExports = rawScriptExports || {} 139 | 140 | // ES6 modules interop 141 | var type = typeof rawScriptExports.default 142 | if (type === 'object' || type === 'function') { 143 | esModule = rawScriptExports 144 | scriptExports = rawScriptExports.default 145 | } 146 | 147 | // Vue.extend constructor export interop 148 | var options = typeof scriptExports === 'function' 149 | ? scriptExports.options 150 | : scriptExports 151 | 152 | // render functions 153 | if (compiledTemplate) { 154 | options.render = compiledTemplate.render 155 | options.staticRenderFns = compiledTemplate.staticRenderFns 156 | } 157 | 158 | // scopedId 159 | if (scopeId) { 160 | options._scopeId = scopeId 161 | } 162 | 163 | // inject cssModules 164 | if (cssModules) { 165 | var computed = Object.create(options.computed || null) 166 | Object.keys(cssModules).forEach(function (key) { 167 | var module = cssModules[key] 168 | computed[key] = function () { return module } 169 | }) 170 | options.computed = computed 171 | } 172 | 173 | return { 174 | esModule: esModule, 175 | exports: scriptExports, 176 | options: options 177 | } 178 | } 179 | 180 | 181 | /***/ }), 182 | /* 3 */ 183 | /***/ (function(module, exports, __webpack_require__) { 184 | 185 | "use strict"; 186 | 187 | 188 | Object.defineProperty(exports, "__esModule", { 189 | value: true 190 | }); 191 | 192 | 193 | var isNumber = function isNumber(n) { 194 | return !isNaN(parseFloat(n)) && isFinite(n); 195 | }; 196 | 197 | exports.default = { 198 | props: { 199 | 'val': { 200 | default: 0 201 | }, 202 | 'max': { 203 | default: 100 204 | }, 205 | 'size': { 206 | default: 3 207 | }, 208 | 'bg-color': { 209 | type: String, 210 | default: '#eee' 211 | }, 212 | 'bar-color': { 213 | type: String, 214 | default: '#2196f3' }, 215 | 'bar-transition': { 216 | type: String, 217 | default: 'all 0.5s ease' 218 | }, 219 | 'bar-border-radius': { 220 | type: Number, 221 | default: 0 222 | }, 223 | 'spacing': { 224 | type: Number, 225 | default: 4 226 | }, 227 | 'text': { 228 | type: String, 229 | default: '' 230 | }, 231 | 'text-align': { 232 | type: String, 233 | default: 'center' }, 234 | 'text-position': { 235 | type: String, 236 | default: 'bottom' }, 237 | 'font-size': { 238 | type: Number, 239 | default: 13 240 | }, 241 | 'text-fg-color': { 242 | type: String, 243 | default: '#222' 244 | } 245 | }, 246 | computed: { 247 | pct: function pct() { 248 | var pct = this.val / this.max * 100; 249 | pct = pct.toFixed(2); 250 | return Math.min(pct, this.max); 251 | }, 252 | size_px: function size_px() { 253 | switch (this.size) { 254 | case 'tiny': 255 | return 2; 256 | case 'small': 257 | return 4; 258 | case 'medium': 259 | return 8; 260 | case 'large': 261 | return 12; 262 | case 'big': 263 | return 16; 264 | case 'huge': 265 | return 32; 266 | case 'massive': 267 | return 64; 268 | } 269 | 270 | return isNumber(this.size) ? this.size : 32; 271 | }, 272 | text_padding: function text_padding() { 273 | switch (this.size) { 274 | case 'tiny': 275 | case 'small': 276 | case 'medium': 277 | case 'large': 278 | case 'big': 279 | case 'huge': 280 | case 'massive': 281 | return Math.min(Math.max(Math.ceil(this.size_px / 8), 3), 12); 282 | } 283 | 284 | return isNumber(this.spacing) ? this.spacing : 4; 285 | }, 286 | text_font_size: function text_font_size() { 287 | switch (this.size) { 288 | case 'tiny': 289 | case 'small': 290 | case 'medium': 291 | case 'large': 292 | case 'big': 293 | case 'huge': 294 | case 'massive': 295 | return Math.min(Math.max(Math.ceil(this.size_px * 1.4), 11), 32); 296 | } 297 | 298 | return isNumber(this.fontSize) ? this.fontSize : 13; 299 | }, 300 | progress_style: function progress_style() { 301 | var style = { 302 | 'background': this.bgColor 303 | }; 304 | 305 | if (this.textPosition == 'middle' || this.textPosition == 'inside') { 306 | style['position'] = 'relative'; 307 | style['min-height'] = this.size_px + 'px'; 308 | style['z-index'] = '-2'; 309 | } 310 | 311 | if (this.barBorderRadius > 0) { 312 | style['border-radius'] = this.barBorderRadius + 'px'; 313 | } 314 | 315 | return style; 316 | }, 317 | bar_style: function bar_style() { 318 | var style = { 319 | 'background': this.barColor, 320 | 'width': this.pct + '%', 321 | 'height': this.size_px + 'px', 322 | 'transition': this.barTransition 323 | }; 324 | 325 | if (this.barBorderRadius > 0) { 326 | style['border-radius'] = this.barBorderRadius + 'px'; 327 | } 328 | 329 | if (this.textPosition == 'middle' || this.textPosition == 'inside') { 330 | style['position'] = 'absolute'; 331 | style['top'] = '0'; 332 | style['height'] = '100%'; 333 | style['min-height'] = this.size_px + 'px', style['z-index'] = '-1'; 334 | } 335 | 336 | return style; 337 | }, 338 | text_style: function text_style() { 339 | var style = { 340 | 'color': this.textFgColor, 341 | 'font-size': this.text_font_size + 'px', 342 | 'text-align': this.textAlign 343 | }; 344 | 345 | if (this.textPosition == 'top' || this.textPosition == 'middle' || this.textPosition == 'inside') style['padding-bottom'] = this.text_padding + 'px'; 346 | if (this.textPosition == 'bottom' || this.textPosition == 'middle' || this.textPosition == 'inside') style['padding-top'] = this.text_padding + 'px'; 347 | 348 | return style; 349 | } 350 | } 351 | }; 352 | 353 | /***/ }), 354 | /* 4 */ 355 | /***/ (function(module, exports) { 356 | 357 | module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; 358 | return _c('div', [(_vm.text.length > 0 && _vm.textPosition == 'top') ? _c('div', { 359 | staticClass: "vue-simple-progress-text", 360 | style: (_vm.text_style) 361 | }, [_vm._v(_vm._s(_vm.text))]) : _vm._e(), _vm._v(" "), _c('div', { 362 | staticClass: "vue-simple-progress", 363 | style: (_vm.progress_style) 364 | }, [(_vm.text.length > 0 && _vm.textPosition == 'middle') ? _c('div', { 365 | staticClass: "vue-simple-progress-text", 366 | style: (_vm.text_style) 367 | }, [_vm._v(_vm._s(_vm.text))]) : _vm._e(), _vm._v(" "), (_vm.text.length > 0 && _vm.textPosition == 'inside') ? _c('div', { 368 | staticStyle: { 369 | "position": "relative", 370 | "left": "-9999px" 371 | }, 372 | style: (_vm.text_style) 373 | }, [_vm._v(_vm._s(_vm.text))]) : _vm._e(), _vm._v(" "), _c('div', { 374 | staticClass: "vue-simple-progress-bar", 375 | style: (_vm.bar_style) 376 | }, [(_vm.text.length > 0 && _vm.textPosition == 'inside') ? _c('div', { 377 | style: (_vm.text_style) 378 | }, [_vm._v(_vm._s(_vm.text))]) : _vm._e()])]), _vm._v(" "), (_vm.text.length > 0 && _vm.textPosition == 'bottom') ? _c('div', { 379 | staticClass: "vue-simple-progress-text", 380 | style: (_vm.text_style) 381 | }, [_vm._v(_vm._s(_vm.text))]) : _vm._e()]) 382 | },staticRenderFns: []} 383 | 384 | /***/ }) 385 | /******/ ])["default"]; 386 | }); -------------------------------------------------------------------------------- /dist/vue-simple-progress.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * vue-simple-progress v1.1.1 (https://github.com/dzwillia/vue-simple-progress) 3 | * (c) 2019 David Z. Williams 4 | * Released under the MIT License. 5 | */ 6 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueSimpleProgress=e():t.VueSimpleProgress=e()}(this,function(){return function(t){function e(s){if(i[s])return i[s].exports;var r=i[s]={i:s,l:!1,exports:{}};return t[s].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:s})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VueSimpleProgress=void 0;var s=i(1),r=function(t){return t&&t.__esModule?t:{default:t}}(s);"undefined"!=typeof window&&window.Vue&&Vue.component("vue-simple-progress",r.default),e.VueSimpleProgress=r.default,e.default=r.default},function(t,e,i){var s=i(2)(i(3),i(4),null,null);t.exports=s.exports},function(t,e){t.exports=function(t,e,i,s){var r,n=t=t||{},o=typeof t.default;"object"!==o&&"function"!==o||(r=t,n=t.default);var a="function"==typeof n?n.options:n;if(e&&(a.render=e.render,a.staticRenderFns=e.staticRenderFns),i&&(a._scopeId=i),s){var u=Object.create(a.computed||null);Object.keys(s).forEach(function(t){var e=s[t];u[t]=function(){return e}}),a.computed=u}return{esModule:r,exports:n,options:a}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){return!isNaN(parseFloat(t))&&isFinite(t)};e.default={props:{val:{default:0},max:{default:100},size:{default:3},"bg-color":{type:String,default:"#eee"},"bar-color":{type:String,default:"#2196f3"},"bar-transition":{type:String,default:"all 0.5s ease"},"bar-border-radius":{type:Number,default:0},spacing:{type:Number,default:4},text:{type:String,default:""},"text-align":{type:String,default:"center"},"text-position":{type:String,default:"bottom"},"font-size":{type:Number,default:13},"text-fg-color":{type:String,default:"#222"}},computed:{pct:function(){var t=this.val/this.max*100;return t=t.toFixed(2),Math.min(t,this.max)},size_px:function(){switch(this.size){case"tiny":return 2;case"small":return 4;case"medium":return 8;case"large":return 12;case"big":return 16;case"huge":return 32;case"massive":return 64}return s(this.size)?this.size:32},text_padding:function(){switch(this.size){case"tiny":case"small":case"medium":case"large":case"big":case"huge":case"massive":return Math.min(Math.max(Math.ceil(this.size_px/8),3),12)}return s(this.spacing)?this.spacing:4},text_font_size:function(){switch(this.size){case"tiny":case"small":case"medium":case"large":case"big":case"huge":case"massive":return Math.min(Math.max(Math.ceil(1.4*this.size_px),11),32)}return s(this.fontSize)?this.fontSize:13},progress_style:function(){var t={background:this.bgColor};return"middle"!=this.textPosition&&"inside"!=this.textPosition||(t.position="relative",t["min-height"]=this.size_px+"px",t["z-index"]="-2"),this.barBorderRadius>0&&(t["border-radius"]=this.barBorderRadius+"px"),t},bar_style:function(){var t={background:this.barColor,width:this.pct+"%",height:this.size_px+"px",transition:this.barTransition};return this.barBorderRadius>0&&(t["border-radius"]=this.barBorderRadius+"px"),"middle"!=this.textPosition&&"inside"!=this.textPosition||(t.position="absolute",t.top="0",t.height="100%",t["min-height"]=this.size_px+"px",t["z-index"]="-1"),t},text_style:function(){var t={color:this.textFgColor,"font-size":this.text_font_size+"px","text-align":this.textAlign};return"top"!=this.textPosition&&"middle"!=this.textPosition&&"inside"!=this.textPosition||(t["padding-bottom"]=this.text_padding+"px"),"bottom"!=this.textPosition&&"middle"!=this.textPosition&&"inside"!=this.textPosition||(t["padding-top"]=this.text_padding+"px"),t}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.text.length>0&&"top"==t.textPosition?i("div",{staticClass:"vue-simple-progress-text",style:t.text_style},[t._v(t._s(t.text))]):t._e(),t._v(" "),i("div",{staticClass:"vue-simple-progress",style:t.progress_style},[t.text.length>0&&"middle"==t.textPosition?i("div",{staticClass:"vue-simple-progress-text",style:t.text_style},[t._v(t._s(t.text))]):t._e(),t._v(" "),t.text.length>0&&"inside"==t.textPosition?i("div",{staticStyle:{position:"relative",left:"-9999px"},style:t.text_style},[t._v(t._s(t.text))]):t._e(),t._v(" "),i("div",{staticClass:"vue-simple-progress-bar",style:t.bar_style},[t.text.length>0&&"inside"==t.textPosition?i("div",{style:t.text_style},[t._v(t._s(t.text))]):t._e()])]),t._v(" "),t.text.length>0&&"bottom"==t.textPosition?i("div",{staticClass:"vue-simple-progress-text",style:t.text_style},[t._v(t._s(t.text))]):t._e()])},staticRenderFns:[]}}]).default}); -------------------------------------------------------------------------------- /examples-src/App.vue: -------------------------------------------------------------------------------- 1 | 112 | 113 | 161 | 162 | 200 | -------------------------------------------------------------------------------- /examples-src/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | const app = new Vue({ 5 | el: '#app', 6 | render: h => h(App) 7 | }) 8 | -------------------------------------------------------------------------------- /examples/examples.bundle.js: -------------------------------------------------------------------------------- 1 | !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=1)}([function(t,e){t.exports=function(t,e,n,r){var i,a=t=t||{},o=typeof t.default;"object"!==o&&"function"!==o||(i=t,a=t.default);var s="function"==typeof a?a.options:a;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),r){var c=Object.create(s.computed||null);Object.keys(r).forEach(function(t){var e=r[t];c[t]=function(){return e}}),s.computed=c}return{esModule:i,exports:a,options:s}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(2),a=r(i),o=n(4),s=r(o);new a.default({el:"#app",render:function(t){return t(s.default)}})},function(t,e,n){"use strict";(function(e){/*! 2 | * Vue.js v2.2.6 3 | * (c) 2014-2017 Evan You 4 | * Released under the MIT License. 5 | */ 6 | function n(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function r(t){var e=parseFloat(t);return isNaN(e)?t:e}function i(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}function o(t,e){return wi.call(t,e)}function s(t){return"string"==typeof t||"number"==typeof t}function c(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function l(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function u(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function f(t,e){for(var n in e)t[n]=e[n];return t}function p(t){return null!==t&&"object"==typeof t}function d(t){return Ti.call(t)===Ei}function v(t){for(var e={},n=0;n=0&&pa[n].id>t.id;)n--;pa.splice(Math.max(n,ma)+1,0,t)}else pa.push(t);va||(va=!0,Wi(ht))}}function gt(t){_a.clear(),yt(t,_a)}function yt(t,e){var n,r,i=Array.isArray(t);if((i||p(t))&&Object.isExtensible(t)){if(t.__ob__){var a=t.__ob__.dep.id;if(e.has(a))return;e.add(a)}if(i)for(n=t.length;n--;)yt(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)yt(t[r[n]],e)}}function _t(t,e,n){ba.get=function(){return this[e][n]},ba.set=function(t){this[e][n]=t},Object.defineProperty(t,n,ba)}function bt(t){t._watchers=[];var e=t.$options;e.props&&xt(t,e.props),e.methods&&Ot(t,e.methods),e.data?$t(t):O(t._data={},!0),e.computed&&Ct(t,e.computed),e.watch&&St(t,e.watch)}function xt(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[],a=!t.$parent;na.shouldConvert=a;for(var o in e)!function(a){i.push(a);var o=R(a,e,n,t);S(r,a,o),a in t||_t(t,"_props",a)}(o);na.shouldConvert=!0}function $t(t){var e=t.$options.data;e=t._data="function"==typeof e?wt(e,t):e||{},d(e)||(e={});for(var n=Object.keys(e),r=t.$options.props,i=n.length;i--;)r&&o(r,n[i])||_(n[i])||_t(t,"_data",n[i]);O(e,!0)}function wt(t,e){try{return t.call(e)}catch(t){return H(t,e,"data()"),{}}}function Ct(t,e){var n=t._computedWatchers=Object.create(null);for(var r in e){var i=e[r],a="function"==typeof i?i:i.get;n[r]=new ya(t,a,h,xa),r in t||kt(t,r,i)}}function kt(t,e,n){"function"==typeof n?(ba.get=At(e),ba.set=h):(ba.get=n.get?!1!==n.cache?At(e):n.get:h,ba.set=n.set?n.set:h),Object.defineProperty(t,e,ba)}function At(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Yi.target&&e.depend(),e.value}}function Ot(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?h:l(e[n],t)}function St(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i-1:t instanceof RegExp&&t.test(e)}function de(t,e){for(var n in t){var r=t[n];if(r){var i=fe(r.componentOptions);i&&!e(i)&&(ve(r),t[n]=null)}}}function ve(t){t&&(t.componentInstance._inactive||dt(t.componentInstance,"deactivated"),t.componentInstance.$destroy())}function he(t){for(var e=t.data,n=t,r=t;r.componentInstance;)r=r.componentInstance._vnode,r.data&&(e=me(r.data,e));for(;n=n.parent;)n.data&&(e=me(e,n.data));return ge(e)}function me(t,e){return{staticClass:ye(t.staticClass,e.staticClass),class:t.class?[t.class,e.class]:e.class}}function ge(t){var e=t.class,n=t.staticClass;return n||e?ye(n,_e(e)):""}function ye(t,e){return t?e?t+" "+e:t:e||""}function _e(t){var e="";if(!t)return e;if("string"==typeof t)return t;if(Array.isArray(t)){for(var n,r=0,i=t.length;r-1?Qa[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Qa[t]=/HTMLUnknownElement/.test(e.toString())}function $e(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function we(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function Ce(t,e){return document.createElementNS(Ka[t],e)}function ke(t){return document.createTextNode(t)}function Ae(t){return document.createComment(t)}function Oe(t,e,n){t.insertBefore(e,n)}function Se(t,e){t.removeChild(e)}function Te(t,e){t.appendChild(e)}function Ee(t){return t.parentNode}function Ne(t){return t.nextSibling}function je(t){return t.tagName}function Me(t,e){t.textContent=e}function Pe(t,e,n){t.setAttribute(e,n)}function Ie(t,e){var n=t.data.ref;if(n){var r=t.context,i=t.componentInstance||t.elm,o=r.$refs;e?Array.isArray(o[n])?a(o[n],i):o[n]===i&&(o[n]=void 0):t.data.refInFor?Array.isArray(o[n])&&o[n].indexOf(i)<0?o[n].push(i):o[n]=[i]:o[n]=i}}function Le(t){return void 0===t||null===t}function De(t){return void 0!==t&&null!==t}function ze(t){return!0===t}function Re(t,e){return t.key===e.key&&t.tag===e.tag&&t.isComment===e.isComment&&De(t.data)===De(e.data)&&Be(t,e)}function Be(t,e){if("input"!==t.tag)return!0;var n;return(De(n=t.data)&&De(n=n.attrs)&&n.type)===(De(n=e.data)&&De(n=n.attrs)&&n.type)}function Fe(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,De(i)&&(a[i]=r);return a}function Ue(t,e){(t.data.directives||e.data.directives)&&He(t,e)}function He(t,e){var n,r,i,a=t===eo,o=e===eo,s=Ve(t.data.directives,t.context),c=Ve(e.data.directives,e.context),l=[],u=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,qe(i,"update",e,t),i.def&&i.def.componentUpdated&&u.push(i)):(qe(i,"bind",e,t),i.def&&i.def.inserted&&l.push(i));if(l.length){var f=function(){for(var n=0;n=0&&" "===(m=t.charAt(h));h--);m&&co.test(m)||(u=!0)}}else void 0===a?(v=i+1,a=t.slice(0,i).trim()):e();if(void 0===a?a=t.slice(0,i).trim():0!==v&&e(),o)for(i=0;i=Ea}function pn(t){return 34===t||39===t}function dn(t){var e=1;for(Pa=Ma;!fn();)if(t=un(),pn(t))vn(t);else if(91===t&&e++,93===t&&e--,0===e){Ia=Ma;break}}function vn(t){for(var e=t;!fn()&&(t=un())!==e;);}function hn(t,e,n){La=n;var r=e.value,i=e.modifiers,a=t.tag,o=t.attrsMap.type;if("select"===a)yn(t,r,i);else if("input"===a&&"checkbox"===o)mn(t,r,i);else if("input"===a&&"radio"===o)gn(t,r,i);else if("input"===a||"textarea"===a)_n(t,r,i);else if(!Mi.isReservedTag(a))return sn(t,r,i),!1;return!0}function mn(t,e,n){var r=n&&n.number,i=an(t,"value")||"null",a=an(t,"true-value")||"true",o=an(t,"false-value")||"false";tn(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===a?":("+e+")":":_q("+e+","+a+")")),rn(t,uo,"var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+a+"):("+o+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+e+"=$$a.concat($$v))}else{$$i>-1&&("+e+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+e+"=$$c}",null,!0)}function gn(t,e,n){var r=n&&n.number,i=an(t,"value")||"null";i=r?"_n("+i+")":i,tn(t,"checked","_q("+e+","+i+")"),rn(t,uo,cn(e,i),null,!0)}function yn(t,e,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",a="var $$selectedVal = "+i+";";a=a+" "+cn(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),rn(t,"change",a,null,!0)}function _n(t,e,n){var r=t.attrsMap.type,i=n||{},a=i.lazy,o=i.number,s=i.trim,c=!a&&"range"!==r,l=a?"change":"range"===r?lo:"input",u="$event.target.value";s&&(u="$event.target.value.trim()"),o&&(u="_n("+u+")");var f=cn(e,u);c&&(f="if($event.target.composing)return;"+f),tn(t,"value","("+e+")"),rn(t,l,f,null,!0),(s||o||"number"===r)&&rn(t,"blur","$forceUpdate()")}function bn(t){var e;t[lo]&&(e=Ri?"change":"input",t[e]=[].concat(t[lo],t[e]||[]),delete t[lo]),t[uo]&&(e=Vi?"click":"change",t[e]=[].concat(t[uo],t[e]||[]),delete t[uo])}function xn(t,e,n,r){if(n){var i=e,a=Da;e=function(n){null!==(1===arguments.length?i(n):i.apply(null,arguments))&&$n(t,e,r,a)}}Da.addEventListener(t,e,r)}function $n(t,e,n,r){(r||Da).removeEventListener(t,e,n)}function wn(t,e){if(t.data.on||e.data.on){var n=e.data.on||{},r=t.data.on||{};Da=e.elm,bn(n),W(n,r,xn,$n,e.context)}}function Cn(t,e){if(t.data.domProps||e.data.domProps){var n,r,i=e.elm,a=t.data.domProps||{},o=e.data.domProps||{};o.__ob__&&(o=e.data.domProps=f({},o));for(n in a)null==o[n]&&(i[n]="");for(n in o)if(r=o[n],"textContent"!==n&&"innerHTML"!==n||(e.children&&(e.children.length=0),r!==a[n]))if("value"===n){i._value=r;var s=null==r?"":String(r);kn(i,e,s)&&(i.value=s)}else i[n]=r}}function kn(t,e,n){return!t.composing&&("option"===e.tag||An(t,n)||On(t,n))}function An(t,e){return document.activeElement!==t&&t.value!==e}function On(t,e){var n=t.value,i=t._vModifiers;return i&&i.number||"number"===t.type?r(n)!==r(e):i&&i.trim?n.trim()!==e.trim():n!==e}function Sn(t){var e=Tn(t.style);return t.staticStyle?f(t.staticStyle,e):e}function Tn(t){return Array.isArray(t)?v(t):"string"==typeof t?vo(t):t}function En(t,e){var n,r={};if(e)for(var i=t;i.componentInstance;)i=i.componentInstance._vnode,i.data&&(n=Sn(i.data))&&f(r,n);(n=Sn(t.data))&&f(r,n);for(var a=t;a=a.parent;)a.data&&(n=Sn(a.data))&&f(r,n);return r}function Nn(t,e){var n=e.data,r=t.data;if(n.staticStyle||n.style||r.staticStyle||r.style){var i,a,o=e.elm,s=t.data.staticStyle,c=t.data.style||{},l=s||c,u=Tn(e.data.style)||{};e.data.style=u.__ob__?f({},u):u;var p=En(e,!0);for(a in l)null==p[a]&&go(o,a,"");for(a in p)(i=p[a])!==l[a]&&go(o,a,null==i?"":i)}}function jn(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Mn(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e);else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");t.setAttribute("class",n.trim())}}function Pn(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&f(e,xo(t.name||"v")),f(e,t),e}return"string"==typeof t?xo(t):void 0}}function In(t){To(function(){To(t)})}function Ln(t,e){(t._transitionClasses||(t._transitionClasses=[])).push(e),jn(t,e)}function Dn(t,e){t._transitionClasses&&a(t._transitionClasses,e),Mn(t,e)}function zn(t,e,n){var r=Rn(t,e),i=r.type,a=r.timeout,o=r.propCount;if(!i)return n();var s=i===wo?Ao:So,c=0,l=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++c>=o&&l()};setTimeout(function(){c0&&(n=wo,u=o,f=a.length):e===Co?l>0&&(n=Co,u=l,f=c.length):(u=Math.max(o,l),n=u>0?o>l?wo:Co:null,f=n?n===wo?a.length:c.length:0),{type:n,timeout:u,propCount:f,hasTransform:n===wo&&Eo.test(r[ko+"Property"])}}function Bn(t,e){for(;t.length1}function qn(t,e){e.data.show||Un(e)}function Kn(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var a,o,s=0,c=t.options.length;s-1,o.selected!==a&&(o.selected=a);else if(m(Gn(o),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Wn(t,e){for(var n=0,r=e.length;n=0&&o[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=o.length-1;c>=i;c--)e.end&&e.end(o[c].tag,n,r);o.length=i,a=i&&o[i-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,r):"p"===s&&(e.start&&e.start(t,[],!1,n,r),e.end&&e.end(t,n,r))}for(var i,a,o=[],s=e.expectHTML,c=e.isUnaryTag||Ni,l=e.canBeLeftOpenTag||Ni,u=0;t;){if(i=t,a&&ks(a)){var f=a.toLowerCase(),p=As[f]||(As[f]=new RegExp("([\\s\\S]*?)(]*>)","i")),d=0,v=t.replace(p,function(t,n,r){return d=r.length,ks(f)||"noscript"===f||(n=n.replace(//g,"$1").replace(//g,"$1")),e.chars&&e.chars(n),""});u+=t.length-v.length,t=v,r(f,u-d,u)}else{var h=t.indexOf("<");if(0===h){if(is.test(t)){var m=t.indexOf("--\x3e");if(m>=0){n(m+3);continue}}if(as.test(t)){var g=t.indexOf("]>");if(g>=0){n(g+2);continue}}var y=t.match(rs);if(y){n(y[0].length);continue}var _=t.match(ns);if(_){var b=u;n(_[0].length),r(_[1],b,u);continue}var x=function(){var e=t.match(ts);if(e){var r={tagName:e[1],attrs:[],start:u};n(e[0].length);for(var i,a;!(i=t.match(es))&&(a=t.match(Yo));)n(a[0].length),r.attrs.push(a);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=u,r}}();if(x){!function(t){var n=t.tagName,i=t.unarySlash;s&&("p"===a&&Ko(n)&&r(a),l(n)&&a===n&&r(n));for(var u=c(n)||"html"===n&&"head"===a||!!i,f=t.attrs.length,p=new Array(f),d=0;d=0){for(w=t.slice(h);!(ns.test(w)||ts.test(w)||is.test(w)||as.test(w)||(C=w.indexOf("<",1))<0);)h+=C,w=t.slice(h);$=t.substring(0,h),n(h)}h<0&&($=t,t=""),e.chars&&$&&e.chars($)}if(t===i){e.chars&&e.chars(t);break}}r()}function fr(t,e){var n=e?js(e):Es;if(n.test(t)){for(var r,i,a=[],o=n.lastIndex=0;r=n.exec(t);){i=r.index,i>o&&a.push(JSON.stringify(t.slice(o,i)));var s=Ze(r[1].trim());a.push("_s("+s+")"),o=i+r[0].length}return o0,Fi=zi&&zi.indexOf("edge/")>0,Ui=zi&&zi.indexOf("android")>0,Hi=zi&&/iphone|ipad|ipod|ios/.test(zi),Vi=zi&&/chrome\/\d+/.test(zi)&&!Fi,Ji=function(){return void 0===bi&&(bi=!Di&&void 0!==e&&"server"===e.process.env.VUE_ENV),bi},qi=Di&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Ki="undefined"!=typeof Symbol&&$(Symbol)&&"undefined"!=typeof Reflect&&$(Reflect.ownKeys),Wi=function(){function t(){r=!1;var t=n.slice(0);n.length=0;for(var e=0;e1?u(n):n;for(var r=u(arguments,1),i=0,a=n.length;i1&&(e[n[0].trim()]=n[1].trim())}}),e}),ho=/^--/,mo=/\s*!important$/,go=function(t,e,n){ho.test(e)?t.style.setProperty(e,n):mo.test(n)?t.style.setProperty(e,n.replace(mo,""),"important"):t.style[_o(e)]=n},yo=["Webkit","Moz","ms"],_o=c(function(t){if(za=za||document.createElement("div"),"filter"!==(t=ki(t))&&t in za.style)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;np?(l=Le(n[m+1])?null:n[m+1].elm,h(t,l,n,f,m,r)):f>m&&g(t,e,u,p)}function b(t,e,n,r){if(t!==e){if(ze(e.isStatic)&&ze(t.isStatic)&&e.key===t.key&&(ze(e.isCloned)||ze(e.isOnce)))return e.elm=t.elm,void(e.componentInstance=t.componentInstance);var i,a=e.data;De(a)&&De(i=a.hook)&&De(i=i.prepatch)&&i(t,e);var o=e.elm=t.elm,s=t.children,c=e.children;if(De(a)&&p(e)){for(i=0;i',n.innerHTML.indexOf(e)>0}("\n"," "),Jo=i("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),qo=i("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Ko=i("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Wo=/([^\s"'<>\/=]+)/,Go=/(?:=)/,Zo=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],Yo=new RegExp("^\\s*"+Wo.source+"(?:\\s*("+Go.source+")\\s*(?:"+Zo.join("|")+"))?"),Qo="[a-zA-Z_][\\w\\-\\.]*",Xo="((?:"+Qo+"\\:)?"+Qo+")",ts=new RegExp("^<"+Xo),es=/^\s*(\/?)>/,ns=new RegExp("^<\\/"+Xo+"[^>]*>"),rs=/^]+>/i,is=/^