diff --git a/.babelrc b/.babelrc
index c4466cc1..88b7baae 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,15 +1,5 @@
{
- "presets": ["@vue/app"],
- "env": {
- "test": {
- "presets": [
- [
- "@vue/app",
- {
- "modules": "commonjs"
- }
- ]
- ]
- }
- }
+ "presets": [
+ "@vue/cli-plugin-babel/preset"
+ ]
}
diff --git a/.circleci/config.yml b/.circleci/config.yml
index e36333f3..e9cc44ee 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -3,7 +3,7 @@ jobs:
build:
docker:
# specify the version you desire here
- - image: cimg/node:12.22.12
+ - image: cimg/node:14.18.1
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
new file mode 100644
index 00000000..83393535
--- /dev/null
+++ b/.github/workflows/gh-pages.yml
@@ -0,0 +1,53 @@
+# Sample workflow for building and deploying a Jekyll site to GitHub Pages
+name: Deploy Docs with GitHub Pages
+
+on:
+ # Runs on pushes targeting the default branch
+ push:
+ branches: ["master"]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
+concurrency:
+ group: "pages"
+ cancel-in-progress: false
+
+jobs:
+ # Build job
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Setup Pages
+ uses: actions/configure-pages@v5
+ - name: Build with Jekyll
+ uses: actions/jekyll-build-pages@v1
+ with:
+ source: ./docs
+ destination: ./docs/_site
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v3
+ with:
+ path: ./docs/_site
+
+ # Deployment job
+ deploy:
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ runs-on: ubuntu-latest
+ needs: build
+ steps:
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v4
diff --git a/.gitignore b/.gitignore
index ae828f87..9416d9ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ selenium-debug.log
tests/unit/coverage
tests/e2e/reports
.idea/
+/documentation/shiki/
diff --git a/.npmignore b/.npmignore
index 417737b3..09890a48 100644
--- a/.npmignore
+++ b/.npmignore
@@ -20,3 +20,4 @@ index.html
config.js
bower.json
v1/
+.idea/
diff --git a/.tern-project b/.tern-project
deleted file mode 100644
index 25491702..00000000
--- a/.tern-project
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ecmaVersion": 6,
- "plugins": {
- "modules": {},
- "es_modules": {},
- "doc_comment": {
- "fullDocs": true
- }
- }
-}
diff --git a/README.md b/README.md
index 3fb0f5e1..3c2c590d 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,20 @@
-# vue-multiselect ![Build Status](https://circleci.com/gh/shentao/vue-multiselect/tree/2.0.svg?style=shield&circle-token=5c931ff28fd12587610f835472becdd514d09cef)[![Codecov branch](https://img.shields.io/codecov/c/github/shentao/vue-multiselect/2.0.svg)](https://codecov.io/gh/shentao/vue-multiselect/branch/2.0)[![npm](https://img.shields.io/npm/v/vue-multiselect.svg)](https://www.npmjs.com/package/vue-multiselect)
-Probably the most complete *selecting* solution for Vue.js 2.0, without jQuery.
+# vue-multiselect
-### Vue 3.0 Support
-For Vue 3.0 compatible version see [`next`](https://github.com/shentao/vue-multiselect/tree/next) branch.
+## Documentation for version 3
-
-
-
-
-## Documentation
-Visit: [vue-multiselect.js.org](https://vue-multiselect.js.org/#sub-getting-started)
+Documentation for v3.0.0 is almost the same as for v2.x as it is mostly backward compatible. For the full docs for v3 and previous versions, check out: [vue-multiselect.js.org](https://vue-multiselect.js.org/#sub-getting-started)
## Sponsors
-
+
-
+
@@ -33,7 +26,7 @@ Visit: [vue-multiselect.js.org](https://vue-multiselect.js.org/#sub-getting-star
-
+
@@ -50,47 +43,39 @@ Visit: [vue-multiselect.js.org](https://vue-multiselect.js.org/#sub-getting-star
* V-model support
* Vuex support
* Async options support
-* \> 95% test coverage
* Fully configurable (see props list below)
-## Breaking changes:
-* Instead of Vue.partial for custom option templates you can use a custom render function.
-* The `:key` props has changed to `:track-by`, due to conflicts with Vue 2.0.
-* Support for `v-model`
-* `@update` has changed to `@input` to also work with v-model
-* `:selected` has changed to `:value` for the same reason
-* Browserify users: if you wish to import `.vue` files, please add `vueify` transform.
## Install & basic usage
```bash
-npm install vue-multiselect
+npm install vue-multiselect@next
```
```vue
-
-
+
-
+
```
## JSFiddle
@@ -98,63 +83,62 @@ npm install vue-multiselect
[Example JSFiddle](https://jsfiddle.net/mattelen/8cyt3hrn/5/) – Use this for issue reproduction.
## Examples
-in jade-lang/pug-lang
### Single select / dropdown
-``` jade
-multiselect(
- :value="value",
- :options="source",
- :searchable="false",
- :close-on-select="false",
- :allow-empty="false",
- @input="updateSelected",
- label="name",
- placeholder="Select one",
+```vue
+
```
### Single select with search
-``` jade
-multiselect(
- v-model="value",
- :options="source",
- :close-on-select="true",
- :clear-on-select="false",
- placeholder="Select one",
- label="name",
+```vue
+
```
### Multiple select with search
-``` jade
-multiselect(
- v-model="multiValue",
- :options="source",
- :multiple="true",
- :close-on-select="true",
- placeholder="Pick some",
- label="name",
+```vue
+
```
### Tagging
with `@tag` event
-``` jade
-multiselect(
- v-model="taggingSelected",
- :options="taggingOptions",
- :multiple="true",
- :taggable="true",
- @tag="addTag",
- tag-placeholder="Add this as new tag",
- placeholder="Type to search or add tag",
- label="name",
+```vue
+
```
``` javascript
@@ -170,19 +154,21 @@ addTag (newTag) {
```
### Asynchronous dropdown
-``` jade
-multiselect(
- v-model="selectedCountries",
- :options="countries",
- :multiple="multiple",
- :searchable="searchable",
- @search-change="asyncFind",
- placeholder="Type to search",
+```vue
+
+
Oops! No elements found. Consider changing the search query.
+
+
```
``` javascript
@@ -193,24 +179,19 @@ methods: {
}
```
+## Special Thanks
+
+Thanks to Matt Elen for contributing this version!
+
+> A Vue 3 upgrade of [@shentao's](https://github.com/shentao) [vue-mulitselect](https://github.com/shentao/vue-multiselect) component. The idea is that when you upgrade to Vue 3, you can swap the two components out, and everything should simply work. Feel free to check out our story of how we upgraded our product to Vue 3 on our blog at [suade.org](https://suade.org/a-products-vue-3-migration-a-real-life-story/)
+
## Contributing
``` bash
-# serve with hot reload at localhost:8080
-npm run dev
-
# distribution build with minification
npm run bundle
-# build the documentation into docs
-npm run docs
-
# run unit tests
npm run test
-# run unit tests watch
-npm run unit
-
```
-
-For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
diff --git a/bower.json b/bower.json
deleted file mode 100644
index ab548b05..00000000
--- a/bower.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "vue-multiselect",
- "description": "Multiselect component for vue.js",
- "main": [
- "./dist/vue-multiselect.min.js",
- "./dist/vue-multiselect.min.css"
- ],
- "authors": [
- "Damian Dulisz "
- ],
- "license": "MIT",
- "keywords": [
- "vuejs",
- "multiselect",
- "selectize",
- "ui-select",
- "select2"
- ],
- "homepage": "https://github.com/shentao/vue-multiselect",
- "moduleType": [],
- "ignore": [
- "**/.*",
- "node_modules",
- "bower_components",
- "test",
- "tests"
- ]
-}
diff --git a/build/build.js b/build/build.js
deleted file mode 100644
index 8210eaae..00000000
--- a/build/build.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// https://github.com/shelljs/shelljs
-require('./check-versions')()
-
-process.env.NODE_ENV = 'production'
-
-var ora = require('ora')
-var path = require('path')
-var chalk = require('chalk')
-var shell = require('shelljs')
-var webpack = require('webpack')
-var config = require('../config')
-var webpackConfig = require('./webpack.docs.conf')
-
-var spinner = ora('building docs...')
-spinner.start()
-
-var assetsPath = path.join(config.docs.assetsRoot, config.docs.assetsSubDirectory)
-shell.rm('-rf', assetsPath)
-shell.mkdir('-p', assetsPath)
-shell.config.silent = true
-shell.cp('-R', 'static/*', assetsPath)
-shell.config.silent = false
-
-webpack(webpackConfig, function (err, stats) {
- spinner.stop()
- if (err) throw err
- process.stdout.write(stats.toString({
- colors: true,
- modules: false,
- children: false,
- chunks: false,
- chunkModules: false
- }) + '\n\n')
-
- console.log(chalk.cyan(' Build complete.\n'))
- console.log(chalk.yellow(
- ' Tip: built files are meant to be served over an HTTP server.\n' +
- ' Opening index.html over file:// won\'t work.\n'
- ))
-})
diff --git a/build/bundle.js b/build/bundle.js
deleted file mode 100644
index 62bd30ca..00000000
--- a/build/bundle.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// https://github.com/shelljs/shelljs
-require('./check-versions')()
-
-process.env.NODE_ENV = 'production'
-
-var ora = require('ora')
-var path = require('path')
-var chalk = require('chalk')
-var shell = require('shelljs')
-var webpack = require('webpack')
-var config = require('../config')
-var webpackConfig = require('./webpack.bundle.conf')
-
-var spinner = ora('building bundle...')
-spinner.start()
-
-var assetsPath = path.join(config.bundle.assetsRoot, config.bundle.assetsSubDirectory)
-shell.rm('-rf', assetsPath)
-shell.mkdir('-p', assetsPath)
-
-webpack(webpackConfig, function (err, stats) {
- spinner.stop()
- if (err) throw err
- process.stdout.write(stats.toString({
- colors: true,
- modules: false,
- children: false,
- chunks: false,
- chunkModules: false
- }) + '\n\n')
-
- console.log(chalk.cyan(' Build complete.\n'))
-})
diff --git a/build/check-versions.js b/build/check-versions.js
deleted file mode 100644
index 6c6c4a29..00000000
--- a/build/check-versions.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var chalk = require('chalk')
-var semver = require('semver')
-var packageConfig = require('../package.json')
-
-function exec (cmd) {
- return require('child_process').execSync(cmd).toString().trim()
-}
-
-var versionRequirements = [
- {
- name: 'node',
- currentVersion: semver.clean(process.version),
- versionRequirement: packageConfig.engines.node
- },
- {
- name: 'npm',
- currentVersion: exec('npm --version'),
- versionRequirement: packageConfig.engines.npm
- }
-]
-
-module.exports = function () {
- var warnings = []
- for (var i = 0; i < versionRequirements.length; i++) {
- var mod = versionRequirements[i]
- if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
- warnings.push(mod.name + ': ' +
- chalk.red(mod.currentVersion) + ' should be ' +
- chalk.green(mod.versionRequirement)
- )
- }
- }
-
- if (warnings.length) {
- console.log('')
- console.log(chalk.yellow('To use this template, you must update following to modules:'))
- console.log()
- for (var j = 0; j < warnings.length; j++) {
- var warning = warnings[j]
- console.log(' ' + warning)
- }
- console.log()
- process.exit(1)
- }
-}
diff --git a/build/dev-client.js b/build/dev-client.js
deleted file mode 100644
index 18aa1e21..00000000
--- a/build/dev-client.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* eslint-disable */
-require('eventsource-polyfill')
-var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
-
-hotClient.subscribe(function (event) {
- if (event.action === 'reload') {
- window.location.reload()
- }
-})
diff --git a/build/dev-server.js b/build/dev-server.js
deleted file mode 100644
index 0a1a406c..00000000
--- a/build/dev-server.js
+++ /dev/null
@@ -1,83 +0,0 @@
-require('./check-versions')()
-
-var config = require('../config')
-if (!process.env.NODE_ENV) {
- process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
-}
-
-var opn = require('opn')
-var path = require('path')
-var express = require('express')
-var webpack = require('webpack')
-var proxyMiddleware = require('http-proxy-middleware')
-var webpackConfig = process.env.NODE_ENV === 'testing'
- ? require('./webpack.prod.conf')
- : require('./webpack.dev.conf')
-
-// default port where dev server listens for incoming traffic
-var port = process.env.PORT || config.dev.port
-// automatically open browser, if not set will be false
-var autoOpenBrowser = !!config.dev.autoOpenBrowser
-// Define HTTP proxies to your custom API backend
-// https://github.com/chimurai/http-proxy-middleware
-var proxyTable = config.dev.proxyTable
-
-var app = express()
-var compiler = webpack(webpackConfig)
-
-var devMiddleware = require('webpack-dev-middleware')(compiler, {
- publicPath: webpackConfig.output.publicPath,
- quiet: true
-})
-
-var hotMiddleware = require('webpack-hot-middleware')(compiler, {
- log: () => {}
-})
-// force page reload when html-webpack-plugin template changes
-compiler.plugin('compilation', function (compilation) {
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
- hotMiddleware.publish({ action: 'reload' })
- cb()
- })
-})
-
-// proxy api requests
-Object.keys(proxyTable).forEach(function (context) {
- var options = proxyTable[context]
- if (typeof options === 'string') {
- options = { target: options }
- }
- app.use(proxyMiddleware(options.filter || context, options))
-})
-
-// handle fallback for HTML5 history API
-app.use(require('connect-history-api-fallback')())
-
-// serve webpack bundle output
-app.use(devMiddleware)
-
-// enable hot-reload and state-preserving
-// compilation error display
-app.use(hotMiddleware)
-
-// serve pure static assets
-var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
-app.use(staticPath, express.static('./static'))
-
-var uri = 'http://localhost:' + port
-
-devMiddleware.waitUntilValid(function () {
- console.log('> Listening at ' + uri + '\n')
-})
-
-module.exports = app.listen(port, function (err) {
- if (err) {
- console.log(err)
- return
- }
-
- // when env is testing, don't need open it
- if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
- opn(uri)
- }
-})
diff --git a/build/utils.js b/build/utils.js
deleted file mode 100644
index c849a5d2..00000000
--- a/build/utils.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var path = require('path')
-var config = require('../config')
-var ExtractTextPlugin = require('extract-text-webpack-plugin')
-
-exports.assetsPath = function (_path) {
- var assetsSubDirectory = process.env.NODE_ENV === 'production'
- ? config.docs.assetsSubDirectory
- : config.dev.assetsSubDirectory
- return path.posix.join(assetsSubDirectory, _path)
-}
-
-exports.cssLoaders = function (options) {
- options = options || {}
- // generate loader string to be used with extract text plugin
- function generateLoaders (loaders) {
- var sourceLoader = loaders.map(function (loader) {
- var extraParamChar
- if (/\?/.test(loader)) {
- loader = loader.replace(/\?/, '-loader?')
- extraParamChar = '&'
- } else {
- loader = loader + '-loader'
- extraParamChar = '?'
- }
- return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
- }).join('!')
-
- // Extract CSS when that option is specified
- // (which is the case during production build)
- if (options.extract) {
- return ExtractTextPlugin.extract({
- use: sourceLoader,
- fallback: 'vue-style-loader'
- })
- } else {
- return ['vue-style-loader', sourceLoader].join('!')
- }
- }
-
- // http://vuejs.github.io/vue-loader/en/configurations/extract-css.html
- return {
- css: generateLoaders(['css']),
- postcss: generateLoaders(['css']),
- less: generateLoaders(['css', 'less']),
- sass: generateLoaders(['css', 'sass?indentedSyntax']),
- scss: generateLoaders(['css', 'sass']),
- stylus: generateLoaders(['css', 'stylus']),
- styl: generateLoaders(['css', 'stylus'])
- }
-}
-
-// Generate loaders for standalone style files (outside of .vue)
-exports.styleLoaders = function (options) {
- var output = []
- var loaders = exports.cssLoaders(options)
- for (var extension in loaders) {
- var loader = loaders[extension]
- output.push({
- test: new RegExp('\\.' + extension + '$'),
- loader: loader
- })
- }
- return output
-}
diff --git a/build/vue-loader.conf.js b/build/vue-loader.conf.js
deleted file mode 100644
index 9b1ed49d..00000000
--- a/build/vue-loader.conf.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var utils = require('./utils')
-var config = require('../config')
-var isProduction = process.env.NODE_ENV === 'production'
-
-module.exports = {
- loaders: utils.cssLoaders({
- sourceMap: isProduction
- ? config.docs.productionSourceMap
- : config.dev.cssSourceMap,
- extract: isProduction
- }),
- postcss: [
- require('autoprefixer')({
- browsers: ['last 2 versions']
- })
- ]
-}
diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js
deleted file mode 100644
index 191f98bd..00000000
--- a/build/webpack.base.conf.js
+++ /dev/null
@@ -1,81 +0,0 @@
-var path = require('path')
-var config = require('../config')
-var utils = require('./utils')
-var vueLoaderConfig = require('./vue-loader.conf')
-
-function resolve (dir) {
- return path.join(__dirname, '..', dir)
-}
-
-module.exports = {
- entry: {
- app: './documentation/main.js'
- },
- output: {
- path: config.docs.assetsRoot,
- filename: '[name].js',
- publicPath: process.env.NODE_ENV === 'production'
- ? config.docs.assetsPublicPath
- : config.dev.assetsPublicPath
- },
- resolve: {
- extensions: ['.pug', '.js', '.vue', '.json'],
- modules: [
- resolve('src'),
- resolve('documentation'),
- resolve('node_modules')
- ],
- alias: {
- 'vue$': 'vue/dist/vue',
- 'vue-multiselect': path.resolve(__dirname, '../src/Multiselect'), // for consistent docs
- 'src': path.resolve(__dirname, '../src'),
- 'assets': path.resolve(__dirname, '../documentation/assets'),
- 'examples': path.resolve(__dirname, '../documentation/partials/examples'),
- 'components': path.resolve(__dirname, '../src/components')
- }
- },
- module: {
- rules: [
- {
- test: /\.(js|vue)$/,
- loader: 'eslint-loader',
- enforce: 'pre',
- include: [resolve('src'), resolve('test')],
- options: {
- formatter: require('eslint-friendly-formatter')
- }
- },
- {
- test: /\.vue$/,
- loader: 'vue-loader',
- options: vueLoaderConfig
- },
- {
- test: /\.js$/,
- loader: 'babel-loader',
- include: [resolve('src'), resolve('documentation'), resolve('test')]
- },
- {
- test: /\.pug$/,
- use: 'pug-loader',
- include: [resolve('src'), resolve('documentation')]
- },
- {
- test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
- loader: 'url-loader',
- query: {
- limit: 10000,
- name: utils.assetsPath('img/[name].[hash:7].[ext]')
- }
- },
- {
- test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
- loader: 'url-loader',
- query: {
- limit: 10000,
- name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
- }
- }
- ]
- }
-}
diff --git a/build/webpack.bundle.conf.js b/build/webpack.bundle.conf.js
deleted file mode 100644
index 9ca15c99..00000000
--- a/build/webpack.bundle.conf.js
+++ /dev/null
@@ -1,48 +0,0 @@
-const webpack = require('webpack')
-const base = require('./webpack.base.conf')
-const config = require('../config')
-const ExtractTextPlugin = require('extract-text-webpack-plugin')
-const utils = require('./utils')
-const { merge } = require('webpack-merge')
-const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
-
-const env = process.env.NODE_ENV === 'testing'
- ? require('../config/test.env')
- : config.bundle.env
-
-base.entry = {
- 'VueMultiselect': './src/index.js'
-}
-
-const webpackConfig = merge(base, {
- output: {
- path: config.bundle.assetsRoot,
- publicPath: config.bundle.assetsPublicPath,
- filename: 'vue-multiselect.min.js',
- library: 'VueMultiselect',
- libraryTarget: 'umd'
- },
- module: {
- rules: utils.styleLoaders({
- sourceMap: config.bundle.productionSourceMap,
- extract: true
- })
- },
- devtool: config.bundle.productionSourceMap ? '#source-map' : false,
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': env
- }),
- new webpack.optimize.UglifyJsPlugin({
- compress: { warnings: false }
- }),
- new ExtractTextPlugin({
- filename: 'vue-multiselect.min.css'
- }),
- new OptimizeCssAssetsPlugin({
- cssProcessor: require('cssnano')
- })
- ]
-})
-
-module.exports = webpackConfig
diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js
deleted file mode 100644
index 65bd3032..00000000
--- a/build/webpack.dev.conf.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var utils = require('./utils')
-var webpack = require('webpack')
-var config = require('../config')
-const { merge } = require('webpack-merge')
-var baseWebpackConfig = require('./webpack.base.conf')
-var HtmlWebpackPlugin = require('html-webpack-plugin')
-var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
-
-// add hot-reload related code to entry chunks
-Object.keys(baseWebpackConfig.entry).forEach(function (name) {
- baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
-})
-
-module.exports = merge(baseWebpackConfig, {
- module: {
- rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
- },
- // cheap-module-eval-source-map is faster for development
- devtool: '#cheap-module-eval-source-map',
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': config.dev.env
- }),
- // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
- new webpack.HotModuleReplacementPlugin(),
- new webpack.NoEmitOnErrorsPlugin(),
- // https://github.com/ampedandwired/html-webpack-plugin
- new HtmlWebpackPlugin({
- filename: 'index.html',
- template: './documentation/index.pug',
- inject: true
- }),
- new FriendlyErrorsPlugin()
- ]
-})
diff --git a/build/webpack.docs.conf.js b/build/webpack.docs.conf.js
deleted file mode 100644
index 6de0fa3d..00000000
--- a/build/webpack.docs.conf.js
+++ /dev/null
@@ -1,122 +0,0 @@
-var path = require('path')
-var utils = require('./utils')
-var webpack = require('webpack')
-var config = require('../config')
-const { merge } = require('webpack-merge')
-var baseWebpackConfig = require('./webpack.base.conf')
-var HtmlWebpackPlugin = require('html-webpack-plugin')
-var ExtractTextPlugin = require('extract-text-webpack-plugin')
-var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
-var CopyWebpackPlugin = require('copy-webpack-plugin')
-
-var env = process.env.NODE_ENV === 'testing'
- ? require('../config/test.env')
- : config.docs.env
-
-var webpackConfig = merge(baseWebpackConfig, {
- module: {
- rules: utils.styleLoaders({
- sourceMap: false,
- extract: true
- })
- },
- devtool: config.docs.productionSourceMap ? '#source-map' : false,
- output: {
- path: config.docs.assetsRoot,
- filename: utils.assetsPath('js/[name].[chunkhash].js'),
- chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
- },
- plugins: [
- // http://vuejs.github.io/vue-loader/en/workflow/production.html
- new webpack.DefinePlugin({
- 'process.env': env
- }),
- new webpack.optimize.UglifyJsPlugin({
- compress: {
- warnings: false
- },
- sourceMap: true
- }),
- // extract css into its own file
- new ExtractTextPlugin({
- filename: utils.assetsPath('css/[name].[contenthash].css')
- }),
- // Compress extracted CSS. We are using this plugin so that possible
- // duplicated CSS from different components can be deduped.
- new OptimizeCSSPlugin(),
- // generate dist index.html with correct asset hash for caching.
- // you can customize output by editing /index.html
- // see https://github.com/ampedandwired/html-webpack-plugin
- new HtmlWebpackPlugin({
- filename: process.env.NODE_ENV === 'testing'
- ? 'index.html'
- : config.docs.index,
- template: 'documentation/index.pug',
- inject: true,
- minify: {
- removeComments: true,
- collapseWhitespace: true,
- removeAttributeQuotes: true
- // more options:
- // https://github.com/kangax/html-minifier#options-quick-reference
- },
- // necessary to consistently work with multiple chunks via CommonsChunkPlugin
- chunksSortMode: 'dependency'
- }),
- // split vendor js into its own file
- new webpack.optimize.CommonsChunkPlugin({
- name: 'vendor',
- minChunks: function (module, count) {
- // any required modules inside node_modules are extracted to vendor
- return (
- module.resource &&
- /\.js$/.test(module.resource) &&
- module.resource.indexOf(
- path.join(__dirname, '../node_modules')
- ) === 0
- )
- }
- }),
- // extract webpack runtime and module manifest to its own file in order to
- // prevent vendor hash from being updated whenever app bundle is updated
- new webpack.optimize.CommonsChunkPlugin({
- name: 'manifest',
- chunks: ['vendor']
- }),
- new CopyWebpackPlugin([
- {
- from: path.join(__dirname, '../static'),
- to: path.join(__dirname, '../docs/static')
- },
- {
- from: path.join(__dirname, '../v1'),
- to: path.join(__dirname, '../docs/v1')
- }
- ])
- ]
-})
-
-if (config.docs.productionGzip) {
- var CompressionWebpackPlugin = require('compression-webpack-plugin')
-
- webpackConfig.plugins.push(
- new CompressionWebpackPlugin({
- asset: '[path].gz[query]',
- algorithm: 'gzip',
- test: new RegExp(
- '\\.(' +
- config.docs.productionGzipExtensions.join('|') +
- ')$'
- ),
- threshold: 10240,
- minRatio: 0.8
- })
- )
-}
-
-if (config.docs.bundleAnalyzerReport) {
- var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
- webpackConfig.plugins.push(new BundleAnalyzerPlugin())
-}
-
-module.exports = webpackConfig
diff --git a/build/webpack.test.conf.js b/build/webpack.test.conf.js
deleted file mode 100644
index b9a4e199..00000000
--- a/build/webpack.test.conf.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// This is the webpack config used for unit tests.
-
-var utils = require('./utils')
-var webpack = require('webpack')
-const { merge } = require('webpack-merge')
-var baseConfig = require('./webpack.base.conf')
-
-var webpackConfig = merge(baseConfig, {
- // use inline sourcemap for karma-sourcemap-loader
- module: {
- rules: utils.styleLoaders()
- },
- devtool: '#inline-source-map',
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': require('../config/test.env')
- })
- ]
-})
-
-// no need for app entry during tests
-delete webpackConfig.entry
-
-module.exports = webpackConfig
diff --git a/config/dev.env.js b/config/dev.env.js
deleted file mode 100644
index 66916133..00000000
--- a/config/dev.env.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const { merge } = require('webpack-merge')
-var prodEnv = require('./prod.env')
-
-module.exports = merge(prodEnv, {
- NODE_ENV: '"development"'
-})
diff --git a/config/index.js b/config/index.js
deleted file mode 100644
index 6d87091a..00000000
--- a/config/index.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// see http://vuejs-templates.github.io/webpack for documentation.
-var path = require('path')
-
-module.exports = {
- dev: {
- env: require('./dev.env'),
- port: 8080,
- autoOpenBrowser: true,
- assetsSubDirectory: 'static',
- assetsPublicPath: '/',
- proxyTable: {},
- // CSS Sourcemaps off by default because relative paths are "buggy"
- // with this option, according to the CSS-Loader README
- // (https://github.com/webpack/css-loader#sourcemaps)
- // In our experience, they generally work as expected,
- // just be aware of this issue when enabling this option.
- cssSourceMap: false
- },
- bundle: {
- env: require('./prod.env'),
- assetsRoot: path.resolve(__dirname, '../dist'),
- assetsPublicPath: '/',
- assetsSubDirectory: '/',
- productionSourceMap: true,
- productionGzip: false,
- productionGzipExtensions: ['js', 'css'],
- bundleAnalyzerReport: process.env.npm_config_report
- },
- docs: {
- env: require('./prod.env'),
- index: path.resolve(__dirname, '../docs/index.html'),
- assetsRoot: path.resolve(__dirname, '../docs'),
- assetsPublicPath: '',
- assetsSubDirectory: 'static',
- productionSourceMap: true,
- productionGzip: false,
- productionGzipExtensions: ['js', 'css'],
- bundleAnalyzerReport: process.env.npm_config_report
- }
-}
diff --git a/config/prod.env.js b/config/prod.env.js
deleted file mode 100644
index 773d263d..00000000
--- a/config/prod.env.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
- NODE_ENV: '"production"'
-}
diff --git a/config/test.env.js b/config/test.env.js
deleted file mode 100644
index 4594d4ac..00000000
--- a/config/test.env.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const { merge } = require('webpack-merge')
-var devEnv = require('./dev.env')
-
-module.exports = merge(devEnv, {
- NODE_ENV: '"testing"'
-})
diff --git a/dist/vue-multiselect.common.js b/dist/vue-multiselect.common.js
new file mode 100644
index 00000000..db0b0a46
--- /dev/null
+++ b/dist/vue-multiselect.common.js
@@ -0,0 +1,4473 @@
+module.exports =
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ }
+/******/ };
+/******/
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/
+/******/ // create a fake namespace object
+/******/ // mode & 1: value is a module id, require it
+/******/ // mode & 2: merge all properties of value into the ns
+/******/ // mode & 4: return value when already ns object
+/******/ // mode & 8|1: behave like require
+/******/ __webpack_require__.t = function(value, mode) {
+/******/ if(mode & 1) value = __webpack_require__(value);
+/******/ if(mode & 8) return value;
+/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ var ns = Object.create(null);
+/******/ __webpack_require__.r(ns);
+/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ return ns;
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = "fb15");
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ "00ee":
+/***/ (function(module, exports, __webpack_require__) {
+
+var wellKnownSymbol = __webpack_require__("b622");
+
+var TO_STRING_TAG = wellKnownSymbol('toStringTag');
+var test = {};
+
+test[TO_STRING_TAG] = 'z';
+
+module.exports = String(test) === '[object z]';
+
+
+/***/ }),
+
+/***/ "0366":
+/***/ (function(module, exports, __webpack_require__) {
+
+var aFunction = __webpack_require__("1c0b");
+
+// optional / simple context binding
+module.exports = function (fn, that, length) {
+ aFunction(fn);
+ if (that === undefined) return fn;
+ switch (length) {
+ case 0: return function () {
+ return fn.call(that);
+ };
+ case 1: return function (a) {
+ return fn.call(that, a);
+ };
+ case 2: return function (a, b) {
+ return fn.call(that, a, b);
+ };
+ case 3: return function (a, b, c) {
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function (/* ...args */) {
+ return fn.apply(that, arguments);
+ };
+};
+
+
+/***/ }),
+
+/***/ "06cf":
+/***/ (function(module, exports, __webpack_require__) {
+
+var DESCRIPTORS = __webpack_require__("83ab");
+var propertyIsEnumerableModule = __webpack_require__("d1e7");
+var createPropertyDescriptor = __webpack_require__("5c6c");
+var toIndexedObject = __webpack_require__("fc6a");
+var toPrimitive = __webpack_require__("c04e");
+var has = __webpack_require__("5135");
+var IE8_DOM_DEFINE = __webpack_require__("0cfb");
+
+var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+
+// `Object.getOwnPropertyDescriptor` method
+// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
+exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
+ O = toIndexedObject(O);
+ P = toPrimitive(P, true);
+ if (IE8_DOM_DEFINE) try {
+ return nativeGetOwnPropertyDescriptor(O, P);
+ } catch (error) { /* empty */ }
+ if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
+};
+
+
+/***/ }),
+
+/***/ "0cfb":
+/***/ (function(module, exports, __webpack_require__) {
+
+var DESCRIPTORS = __webpack_require__("83ab");
+var fails = __webpack_require__("d039");
+var createElement = __webpack_require__("cc12");
+
+// Thank's IE8 for his funny defineProperty
+module.exports = !DESCRIPTORS && !fails(function () {
+ return Object.defineProperty(createElement('div'), 'a', {
+ get: function () { return 7; }
+ }).a != 7;
+});
+
+
+/***/ }),
+
+/***/ "0d03":
+/***/ (function(module, exports, __webpack_require__) {
+
+var redefine = __webpack_require__("6eeb");
+
+var DatePrototype = Date.prototype;
+var INVALID_DATE = 'Invalid Date';
+var TO_STRING = 'toString';
+var nativeDateToString = DatePrototype[TO_STRING];
+var getTime = DatePrototype.getTime;
+
+// `Date.prototype.toString` method
+// https://tc39.es/ecma262/#sec-date.prototype.tostring
+if (new Date(NaN) + '' != INVALID_DATE) {
+ redefine(DatePrototype, TO_STRING, function toString() {
+ var value = getTime.call(this);
+ // eslint-disable-next-line no-self-compare -- NaN check
+ return value === value ? nativeDateToString.call(this) : INVALID_DATE;
+ });
+}
+
+
+/***/ }),
+
+/***/ "129f":
+/***/ (function(module, exports) {
+
+// `SameValue` abstract operation
+// https://tc39.es/ecma262/#sec-samevalue
+module.exports = Object.is || function is(x, y) {
+ // eslint-disable-next-line no-self-compare -- NaN check
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+};
+
+
+/***/ }),
+
+/***/ "13d5":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var $ = __webpack_require__("23e7");
+var $reduce = __webpack_require__("d58f").left;
+var arrayMethodIsStrict = __webpack_require__("a640");
+var CHROME_VERSION = __webpack_require__("2d00");
+var IS_NODE = __webpack_require__("605d");
+
+var STRICT_METHOD = arrayMethodIsStrict('reduce');
+// Chrome 80-82 has a critical bug
+// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
+var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
+
+// `Array.prototype.reduce` method
+// https://tc39.es/ecma262/#sec-array.prototype.reduce
+$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
+ reduce: function reduce(callbackfn /* , initialValue */) {
+ return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+
+
+/***/ }),
+
+/***/ "14c3":
+/***/ (function(module, exports, __webpack_require__) {
+
+var classof = __webpack_require__("c6b6");
+var regexpExec = __webpack_require__("9263");
+
+// `RegExpExec` abstract operation
+// https://tc39.es/ecma262/#sec-regexpexec
+module.exports = function (R, S) {
+ var exec = R.exec;
+ if (typeof exec === 'function') {
+ var result = exec.call(R, S);
+ if (typeof result !== 'object') {
+ throw TypeError('RegExp exec method returned something other than an Object or null');
+ }
+ return result;
+ }
+
+ if (classof(R) !== 'RegExp') {
+ throw TypeError('RegExp#exec called on incompatible receiver');
+ }
+
+ return regexpExec.call(R, S);
+};
+
+
+
+/***/ }),
+
+/***/ "1be4":
+/***/ (function(module, exports, __webpack_require__) {
+
+var getBuiltIn = __webpack_require__("d066");
+
+module.exports = getBuiltIn('document', 'documentElement');
+
+
+/***/ }),
+
+/***/ "1c0b":
+/***/ (function(module, exports) {
+
+module.exports = function (it) {
+ if (typeof it != 'function') {
+ throw TypeError(String(it) + ' is not a function');
+ } return it;
+};
+
+
+/***/ }),
+
+/***/ "1d80":
+/***/ (function(module, exports) {
+
+// `RequireObjectCoercible` abstract operation
+// https://tc39.es/ecma262/#sec-requireobjectcoercible
+module.exports = function (it) {
+ if (it == undefined) throw TypeError("Can't call method on " + it);
+ return it;
+};
+
+
+/***/ }),
+
+/***/ "1dde":
+/***/ (function(module, exports, __webpack_require__) {
+
+var fails = __webpack_require__("d039");
+var wellKnownSymbol = __webpack_require__("b622");
+var V8_VERSION = __webpack_require__("2d00");
+
+var SPECIES = wellKnownSymbol('species');
+
+module.exports = function (METHOD_NAME) {
+ // We can't use this feature detection in V8 since it causes
+ // deoptimization and serious performance degradation
+ // https://github.com/zloirock/core-js/issues/677
+ return V8_VERSION >= 51 || !fails(function () {
+ var array = [];
+ var constructor = array.constructor = {};
+ constructor[SPECIES] = function () {
+ return { foo: 1 };
+ };
+ return array[METHOD_NAME](Boolean).foo !== 1;
+ });
+};
+
+
+/***/ }),
+
+/***/ "23cb":
+/***/ (function(module, exports, __webpack_require__) {
+
+var toInteger = __webpack_require__("a691");
+
+var max = Math.max;
+var min = Math.min;
+
+// Helper for a popular repeating case of the spec:
+// Let integer be ? ToInteger(index).
+// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
+module.exports = function (index, length) {
+ var integer = toInteger(index);
+ return integer < 0 ? max(integer + length, 0) : min(integer, length);
+};
+
+
+/***/ }),
+
+/***/ "23e7":
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__("da84");
+var getOwnPropertyDescriptor = __webpack_require__("06cf").f;
+var createNonEnumerableProperty = __webpack_require__("9112");
+var redefine = __webpack_require__("6eeb");
+var setGlobal = __webpack_require__("ce4e");
+var copyConstructorProperties = __webpack_require__("e893");
+var isForced = __webpack_require__("94ca");
+
+/*
+ options.target - name of the target object
+ options.global - target is the global object
+ options.stat - export as static methods of target
+ options.proto - export as prototype methods of target
+ options.real - real prototype method for the `pure` version
+ options.forced - export even if the native feature is available
+ options.bind - bind methods to the target, required for the `pure` version
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
+ options.sham - add a flag to not completely full polyfills
+ options.enumerable - export as enumerable property
+ options.noTargetGet - prevent calling a getter on target
+*/
+module.exports = function (options, source) {
+ var TARGET = options.target;
+ var GLOBAL = options.global;
+ var STATIC = options.stat;
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
+ if (GLOBAL) {
+ target = global;
+ } else if (STATIC) {
+ target = global[TARGET] || setGlobal(TARGET, {});
+ } else {
+ target = (global[TARGET] || {}).prototype;
+ }
+ if (target) for (key in source) {
+ sourceProperty = source[key];
+ if (options.noTargetGet) {
+ descriptor = getOwnPropertyDescriptor(target, key);
+ targetProperty = descriptor && descriptor.value;
+ } else targetProperty = target[key];
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
+ // contained in target
+ if (!FORCED && targetProperty !== undefined) {
+ if (typeof sourceProperty === typeof targetProperty) continue;
+ copyConstructorProperties(sourceProperty, targetProperty);
+ }
+ // add a flag to not completely full polyfills
+ if (options.sham || (targetProperty && targetProperty.sham)) {
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
+ }
+ // extend global
+ redefine(target, key, sourceProperty, options);
+ }
+};
+
+
+/***/ }),
+
+/***/ "241c":
+/***/ (function(module, exports, __webpack_require__) {
+
+var internalObjectKeys = __webpack_require__("ca84");
+var enumBugKeys = __webpack_require__("7839");
+
+var hiddenKeys = enumBugKeys.concat('length', 'prototype');
+
+// `Object.getOwnPropertyNames` method
+// https://tc39.es/ecma262/#sec-object.getownpropertynames
+exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
+ return internalObjectKeys(O, hiddenKeys);
+};
+
+
+/***/ }),
+
+/***/ "25f0":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var redefine = __webpack_require__("6eeb");
+var anObject = __webpack_require__("825a");
+var fails = __webpack_require__("d039");
+var flags = __webpack_require__("ad6d");
+
+var TO_STRING = 'toString';
+var RegExpPrototype = RegExp.prototype;
+var nativeToString = RegExpPrototype[TO_STRING];
+
+var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
+// FF44- RegExp#toString has a wrong name
+var INCORRECT_NAME = nativeToString.name != TO_STRING;
+
+// `RegExp.prototype.toString` method
+// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
+if (NOT_GENERIC || INCORRECT_NAME) {
+ redefine(RegExp.prototype, TO_STRING, function toString() {
+ var R = anObject(this);
+ var p = String(R.source);
+ var rf = R.flags;
+ var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
+ return '/' + p + '/' + f;
+ }, { unsafe: true });
+}
+
+
+/***/ }),
+
+/***/ "277d":
+/***/ (function(module, exports, __webpack_require__) {
+
+var $ = __webpack_require__("23e7");
+var isArray = __webpack_require__("e8b5");
+
+// `Array.isArray` method
+// https://tc39.es/ecma262/#sec-array.isarray
+$({ target: 'Array', stat: true }, {
+ isArray: isArray
+});
+
+
+/***/ }),
+
+/***/ "2d00":
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__("da84");
+var userAgent = __webpack_require__("342f");
+
+var process = global.process;
+var versions = process && process.versions;
+var v8 = versions && versions.v8;
+var match, version;
+
+if (v8) {
+ match = v8.split('.');
+ version = match[0] + match[1];
+} else if (userAgent) {
+ match = userAgent.match(/Edge\/(\d+)/);
+ if (!match || match[1] >= 74) {
+ match = userAgent.match(/Chrome\/(\d+)/);
+ if (match) version = match[1];
+ }
+}
+
+module.exports = version && +version;
+
+
+/***/ }),
+
+/***/ "342f":
+/***/ (function(module, exports, __webpack_require__) {
+
+var getBuiltIn = __webpack_require__("d066");
+
+module.exports = getBuiltIn('navigator', 'userAgent') || '';
+
+
+/***/ }),
+
+/***/ "37e8":
+/***/ (function(module, exports, __webpack_require__) {
+
+var DESCRIPTORS = __webpack_require__("83ab");
+var definePropertyModule = __webpack_require__("9bf2");
+var anObject = __webpack_require__("825a");
+var objectKeys = __webpack_require__("df75");
+
+// `Object.defineProperties` method
+// https://tc39.es/ecma262/#sec-object.defineproperties
+module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
+ anObject(O);
+ var keys = objectKeys(Properties);
+ var length = keys.length;
+ var index = 0;
+ var key;
+ while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
+ return O;
+};
+
+
+/***/ }),
+
+/***/ "3bbe":
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__("861d");
+
+module.exports = function (it) {
+ if (!isObject(it) && it !== null) {
+ throw TypeError("Can't set " + String(it) + ' as a prototype');
+ } return it;
+};
+
+
+/***/ }),
+
+/***/ "428f":
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__("da84");
+
+module.exports = global;
+
+
+/***/ }),
+
+/***/ "44ad":
+/***/ (function(module, exports, __webpack_require__) {
+
+var fails = __webpack_require__("d039");
+var classof = __webpack_require__("c6b6");
+
+var split = ''.split;
+
+// fallback for non-array-like ES3 and non-enumerable old V8 strings
+module.exports = fails(function () {
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
+ // eslint-disable-next-line no-prototype-builtins -- safe
+ return !Object('z').propertyIsEnumerable(0);
+}) ? function (it) {
+ return classof(it) == 'String' ? split.call(it, '') : Object(it);
+} : Object;
+
+
+/***/ }),
+
+/***/ "44d2":
+/***/ (function(module, exports, __webpack_require__) {
+
+var wellKnownSymbol = __webpack_require__("b622");
+var create = __webpack_require__("7c73");
+var definePropertyModule = __webpack_require__("9bf2");
+
+var UNSCOPABLES = wellKnownSymbol('unscopables');
+var ArrayPrototype = Array.prototype;
+
+// Array.prototype[@@unscopables]
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+if (ArrayPrototype[UNSCOPABLES] == undefined) {
+ definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
+ configurable: true,
+ value: create(null)
+ });
+}
+
+// add a key to Array.prototype[@@unscopables]
+module.exports = function (key) {
+ ArrayPrototype[UNSCOPABLES][key] = true;
+};
+
+
+/***/ }),
+
+/***/ "4930":
+/***/ (function(module, exports, __webpack_require__) {
+
+var IS_NODE = __webpack_require__("605d");
+var V8_VERSION = __webpack_require__("2d00");
+var fails = __webpack_require__("d039");
+
+module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
+ /* global Symbol -- required for testing */
+ return !Symbol.sham &&
+ // Chrome 38 Symbol has incorrect toString conversion
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
+ (IS_NODE ? V8_VERSION === 38 : V8_VERSION > 37 && V8_VERSION < 41);
+});
+
+
+/***/ }),
+
+/***/ "498a":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var $ = __webpack_require__("23e7");
+var $trim = __webpack_require__("58a8").trim;
+var forcedStringTrimMethod = __webpack_require__("c8d2");
+
+// `String.prototype.trim` method
+// https://tc39.es/ecma262/#sec-string.prototype.trim
+$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
+ trim: function trim() {
+ return $trim(this);
+ }
+});
+
+
+/***/ }),
+
+/***/ "4d64":
+/***/ (function(module, exports, __webpack_require__) {
+
+var toIndexedObject = __webpack_require__("fc6a");
+var toLength = __webpack_require__("50c4");
+var toAbsoluteIndex = __webpack_require__("23cb");
+
+// `Array.prototype.{ indexOf, includes }` methods implementation
+var createMethod = function (IS_INCLUDES) {
+ return function ($this, el, fromIndex) {
+ var O = toIndexedObject($this);
+ var length = toLength(O.length);
+ var index = toAbsoluteIndex(fromIndex, length);
+ var value;
+ // Array#includes uses SameValueZero equality algorithm
+ // eslint-disable-next-line no-self-compare -- NaN check
+ if (IS_INCLUDES && el != el) while (length > index) {
+ value = O[index++];
+ // eslint-disable-next-line no-self-compare -- NaN check
+ if (value != value) return true;
+ // Array#indexOf ignores holes, Array#includes - not
+ } else for (;length > index; index++) {
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
+ } return !IS_INCLUDES && -1;
+ };
+};
+
+module.exports = {
+ // `Array.prototype.includes` method
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
+ includes: createMethod(true),
+ // `Array.prototype.indexOf` method
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
+ indexOf: createMethod(false)
+};
+
+
+/***/ }),
+
+/***/ "4de4":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var $ = __webpack_require__("23e7");
+var $filter = __webpack_require__("b727").filter;
+var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
+
+var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
+
+// `Array.prototype.filter` method
+// https://tc39.es/ecma262/#sec-array.prototype.filter
+// with adding support of @@species
+$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
+ filter: function filter(callbackfn /* , thisArg */) {
+ return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+
+
+/***/ }),
+
+/***/ "4e82":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var $ = __webpack_require__("23e7");
+var aFunction = __webpack_require__("1c0b");
+var toObject = __webpack_require__("7b0b");
+var fails = __webpack_require__("d039");
+var arrayMethodIsStrict = __webpack_require__("a640");
+
+var test = [];
+var nativeSort = test.sort;
+
+// IE8-
+var FAILS_ON_UNDEFINED = fails(function () {
+ test.sort(undefined);
+});
+// V8 bug
+var FAILS_ON_NULL = fails(function () {
+ test.sort(null);
+});
+// Old WebKit
+var STRICT_METHOD = arrayMethodIsStrict('sort');
+
+var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD;
+
+// `Array.prototype.sort` method
+// https://tc39.es/ecma262/#sec-array.prototype.sort
+$({ target: 'Array', proto: true, forced: FORCED }, {
+ sort: function sort(comparefn) {
+ return comparefn === undefined
+ ? nativeSort.call(toObject(this))
+ : nativeSort.call(toObject(this), aFunction(comparefn));
+ }
+});
+
+
+/***/ }),
+
+/***/ "50c4":
+/***/ (function(module, exports, __webpack_require__) {
+
+var toInteger = __webpack_require__("a691");
+
+var min = Math.min;
+
+// `ToLength` abstract operation
+// https://tc39.es/ecma262/#sec-tolength
+module.exports = function (argument) {
+ return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
+};
+
+
+/***/ }),
+
+/***/ "5135":
+/***/ (function(module, exports) {
+
+var hasOwnProperty = {}.hasOwnProperty;
+
+module.exports = function (it, key) {
+ return hasOwnProperty.call(it, key);
+};
+
+
+/***/ }),
+
+/***/ "5692":
+/***/ (function(module, exports, __webpack_require__) {
+
+var IS_PURE = __webpack_require__("c430");
+var store = __webpack_require__("c6cd");
+
+(module.exports = function (key, value) {
+ return store[key] || (store[key] = value !== undefined ? value : {});
+})('versions', []).push({
+ version: '3.9.1',
+ mode: IS_PURE ? 'pure' : 'global',
+ copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
+});
+
+
+/***/ }),
+
+/***/ "56ef":
+/***/ (function(module, exports, __webpack_require__) {
+
+var getBuiltIn = __webpack_require__("d066");
+var getOwnPropertyNamesModule = __webpack_require__("241c");
+var getOwnPropertySymbolsModule = __webpack_require__("7418");
+var anObject = __webpack_require__("825a");
+
+// all object keys, includes non-enumerable and symbols
+module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
+ return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
+};
+
+
+/***/ }),
+
+/***/ "5899":
+/***/ (function(module, exports) {
+
+// a string of all valid unicode whitespaces
+module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
+
+
+/***/ }),
+
+/***/ "58a8":
+/***/ (function(module, exports, __webpack_require__) {
+
+var requireObjectCoercible = __webpack_require__("1d80");
+var whitespaces = __webpack_require__("5899");
+
+var whitespace = '[' + whitespaces + ']';
+var ltrim = RegExp('^' + whitespace + whitespace + '*');
+var rtrim = RegExp(whitespace + whitespace + '*$');
+
+// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
+var createMethod = function (TYPE) {
+ return function ($this) {
+ var string = String(requireObjectCoercible($this));
+ if (TYPE & 1) string = string.replace(ltrim, '');
+ if (TYPE & 2) string = string.replace(rtrim, '');
+ return string;
+ };
+};
+
+module.exports = {
+ // `String.prototype.{ trimLeft, trimStart }` methods
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
+ start: createMethod(1),
+ // `String.prototype.{ trimRight, trimEnd }` methods
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
+ end: createMethod(2),
+ // `String.prototype.trim` method
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
+ trim: createMethod(3)
+};
+
+
+/***/ }),
+
+/***/ "5c6c":
+/***/ (function(module, exports) {
+
+module.exports = function (bitmap, value) {
+ return {
+ enumerable: !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable: !(bitmap & 4),
+ value: value
+ };
+};
+
+
+/***/ }),
+
+/***/ "605d":
+/***/ (function(module, exports, __webpack_require__) {
+
+var classof = __webpack_require__("c6b6");
+var global = __webpack_require__("da84");
+
+module.exports = classof(global.process) == 'process';
+
+
+/***/ }),
+
+/***/ "65f0":
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__("861d");
+var isArray = __webpack_require__("e8b5");
+var wellKnownSymbol = __webpack_require__("b622");
+
+var SPECIES = wellKnownSymbol('species');
+
+// `ArraySpeciesCreate` abstract operation
+// https://tc39.es/ecma262/#sec-arrayspeciescreate
+module.exports = function (originalArray, length) {
+ var C;
+ if (isArray(originalArray)) {
+ C = originalArray.constructor;
+ // cross-realm fallback
+ if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
+ else if (isObject(C)) {
+ C = C[SPECIES];
+ if (C === null) C = undefined;
+ }
+ } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
+};
+
+
+/***/ }),
+
+/***/ "69f3":
+/***/ (function(module, exports, __webpack_require__) {
+
+var NATIVE_WEAK_MAP = __webpack_require__("7f9a");
+var global = __webpack_require__("da84");
+var isObject = __webpack_require__("861d");
+var createNonEnumerableProperty = __webpack_require__("9112");
+var objectHas = __webpack_require__("5135");
+var shared = __webpack_require__("c6cd");
+var sharedKey = __webpack_require__("f772");
+var hiddenKeys = __webpack_require__("d012");
+
+var WeakMap = global.WeakMap;
+var set, get, has;
+
+var enforce = function (it) {
+ return has(it) ? get(it) : set(it, {});
+};
+
+var getterFor = function (TYPE) {
+ return function (it) {
+ var state;
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
+ throw TypeError('Incompatible receiver, ' + TYPE + ' required');
+ } return state;
+ };
+};
+
+if (NATIVE_WEAK_MAP) {
+ var store = shared.state || (shared.state = new WeakMap());
+ var wmget = store.get;
+ var wmhas = store.has;
+ var wmset = store.set;
+ set = function (it, metadata) {
+ metadata.facade = it;
+ wmset.call(store, it, metadata);
+ return metadata;
+ };
+ get = function (it) {
+ return wmget.call(store, it) || {};
+ };
+ has = function (it) {
+ return wmhas.call(store, it);
+ };
+} else {
+ var STATE = sharedKey('state');
+ hiddenKeys[STATE] = true;
+ set = function (it, metadata) {
+ metadata.facade = it;
+ createNonEnumerableProperty(it, STATE, metadata);
+ return metadata;
+ };
+ get = function (it) {
+ return objectHas(it, STATE) ? it[STATE] : {};
+ };
+ has = function (it) {
+ return objectHas(it, STATE);
+ };
+}
+
+module.exports = {
+ set: set,
+ get: get,
+ has: has,
+ enforce: enforce,
+ getterFor: getterFor
+};
+
+
+/***/ }),
+
+/***/ "6b0d":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", { value: true });
+// runtime helper for setting properties on components
+// in a tree-shakable way
+exports.default = (sfc, props) => {
+ const target = sfc.__vccOpts || sfc;
+ for (const [key, val] of props) {
+ target[key] = val;
+ }
+ return target;
+};
+
+
+/***/ }),
+
+/***/ "6eeb":
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__("da84");
+var createNonEnumerableProperty = __webpack_require__("9112");
+var has = __webpack_require__("5135");
+var setGlobal = __webpack_require__("ce4e");
+var inspectSource = __webpack_require__("8925");
+var InternalStateModule = __webpack_require__("69f3");
+
+var getInternalState = InternalStateModule.get;
+var enforceInternalState = InternalStateModule.enforce;
+var TEMPLATE = String(String).split('String');
+
+(module.exports = function (O, key, value, options) {
+ var unsafe = options ? !!options.unsafe : false;
+ var simple = options ? !!options.enumerable : false;
+ var noTargetGet = options ? !!options.noTargetGet : false;
+ var state;
+ if (typeof value == 'function') {
+ if (typeof key == 'string' && !has(value, 'name')) {
+ createNonEnumerableProperty(value, 'name', key);
+ }
+ state = enforceInternalState(value);
+ if (!state.source) {
+ state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
+ }
+ }
+ if (O === global) {
+ if (simple) O[key] = value;
+ else setGlobal(key, value);
+ return;
+ } else if (!unsafe) {
+ delete O[key];
+ } else if (!noTargetGet && O[key]) {
+ simple = true;
+ }
+ if (simple) O[key] = value;
+ else createNonEnumerableProperty(O, key, value);
+// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
+})(Function.prototype, 'toString', function toString() {
+ return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
+});
+
+
+/***/ }),
+
+/***/ "7156":
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__("861d");
+var setPrototypeOf = __webpack_require__("d2bb");
+
+// makes subclassing work correct for wrapped built-ins
+module.exports = function ($this, dummy, Wrapper) {
+ var NewTarget, NewTargetPrototype;
+ if (
+ // it can work only with native `setPrototypeOf`
+ setPrototypeOf &&
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
+ typeof (NewTarget = dummy.constructor) == 'function' &&
+ NewTarget !== Wrapper &&
+ isObject(NewTargetPrototype = NewTarget.prototype) &&
+ NewTargetPrototype !== Wrapper.prototype
+ ) setPrototypeOf($this, NewTargetPrototype);
+ return $this;
+};
+
+
+/***/ }),
+
+/***/ "7418":
+/***/ (function(module, exports) {
+
+exports.f = Object.getOwnPropertySymbols;
+
+
+/***/ }),
+
+/***/ "7839":
+/***/ (function(module, exports) {
+
+// IE8- don't enum bug keys
+module.exports = [
+ 'constructor',
+ 'hasOwnProperty',
+ 'isPrototypeOf',
+ 'propertyIsEnumerable',
+ 'toLocaleString',
+ 'toString',
+ 'valueOf'
+];
+
+
+/***/ }),
+
+/***/ "7b0b":
+/***/ (function(module, exports, __webpack_require__) {
+
+var requireObjectCoercible = __webpack_require__("1d80");
+
+// `ToObject` abstract operation
+// https://tc39.es/ecma262/#sec-toobject
+module.exports = function (argument) {
+ return Object(requireObjectCoercible(argument));
+};
+
+
+/***/ }),
+
+/***/ "7c73":
+/***/ (function(module, exports, __webpack_require__) {
+
+var anObject = __webpack_require__("825a");
+var defineProperties = __webpack_require__("37e8");
+var enumBugKeys = __webpack_require__("7839");
+var hiddenKeys = __webpack_require__("d012");
+var html = __webpack_require__("1be4");
+var documentCreateElement = __webpack_require__("cc12");
+var sharedKey = __webpack_require__("f772");
+
+var GT = '>';
+var LT = '<';
+var PROTOTYPE = 'prototype';
+var SCRIPT = 'script';
+var IE_PROTO = sharedKey('IE_PROTO');
+
+var EmptyConstructor = function () { /* empty */ };
+
+var scriptTag = function (content) {
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
+};
+
+// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
+var NullProtoObjectViaActiveX = function (activeXDocument) {
+ activeXDocument.write(scriptTag(''));
+ activeXDocument.close();
+ var temp = activeXDocument.parentWindow.Object;
+ activeXDocument = null; // avoid memory leak
+ return temp;
+};
+
+// Create object with fake `null` prototype: use iframe Object with cleared prototype
+var NullProtoObjectViaIFrame = function () {
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = documentCreateElement('iframe');
+ var JS = 'java' + SCRIPT + ':';
+ var iframeDocument;
+ iframe.style.display = 'none';
+ html.appendChild(iframe);
+ // https://github.com/zloirock/core-js/issues/475
+ iframe.src = String(JS);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write(scriptTag('document.F=Object'));
+ iframeDocument.close();
+ return iframeDocument.F;
+};
+
+// Check for document.domain and active x support
+// No need to use active x approach when document.domain is not set
+// see https://github.com/es-shims/es5-shim/issues/150
+// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
+// avoid IE GC bug
+var activeXDocument;
+var NullProtoObject = function () {
+ try {
+ /* global ActiveXObject -- old IE */
+ activeXDocument = document.domain && new ActiveXObject('htmlfile');
+ } catch (error) { /* ignore */ }
+ NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
+ var length = enumBugKeys.length;
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
+ return NullProtoObject();
+};
+
+hiddenKeys[IE_PROTO] = true;
+
+// `Object.create` method
+// https://tc39.es/ecma262/#sec-object.create
+module.exports = Object.create || function create(O, Properties) {
+ var result;
+ if (O !== null) {
+ EmptyConstructor[PROTOTYPE] = anObject(O);
+ result = new EmptyConstructor();
+ EmptyConstructor[PROTOTYPE] = null;
+ // add "__proto__" for Object.getPrototypeOf polyfill
+ result[IE_PROTO] = O;
+ } else result = NullProtoObject();
+ return Properties === undefined ? result : defineProperties(result, Properties);
+};
+
+
+/***/ }),
+
+/***/ "7db0":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var $ = __webpack_require__("23e7");
+var $find = __webpack_require__("b727").find;
+var addToUnscopables = __webpack_require__("44d2");
+
+var FIND = 'find';
+var SKIPS_HOLES = true;
+
+// Shouldn't skip holes
+if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
+
+// `Array.prototype.find` method
+// https://tc39.es/ecma262/#sec-array.prototype.find
+$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
+ find: function find(callbackfn /* , that = undefined */) {
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+
+// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
+addToUnscopables(FIND);
+
+
+/***/ }),
+
+/***/ "7f9a":
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__("da84");
+var inspectSource = __webpack_require__("8925");
+
+var WeakMap = global.WeakMap;
+
+module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
+
+
+/***/ }),
+
+/***/ "825a":
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__("861d");
+
+module.exports = function (it) {
+ if (!isObject(it)) {
+ throw TypeError(String(it) + ' is not an object');
+ } return it;
+};
+
+
+/***/ }),
+
+/***/ "83ab":
+/***/ (function(module, exports, __webpack_require__) {
+
+var fails = __webpack_require__("d039");
+
+// Detect IE8's incomplete defineProperty implementation
+module.exports = !fails(function () {
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
+});
+
+
+/***/ }),
+
+/***/ "8418":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var toPrimitive = __webpack_require__("c04e");
+var definePropertyModule = __webpack_require__("9bf2");
+var createPropertyDescriptor = __webpack_require__("5c6c");
+
+module.exports = function (object, key, value) {
+ var propertyKey = toPrimitive(key);
+ if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
+ else object[propertyKey] = value;
+};
+
+
+/***/ }),
+
+/***/ "841c":
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
+var anObject = __webpack_require__("825a");
+var requireObjectCoercible = __webpack_require__("1d80");
+var sameValue = __webpack_require__("129f");
+var regExpExec = __webpack_require__("14c3");
+
+// @@search logic
+fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
+ return [
+ // `String.prototype.search` method
+ // https://tc39.es/ecma262/#sec-string.prototype.search
+ function search(regexp) {
+ var O = requireObjectCoercible(this);
+ var searcher = regexp == undefined ? undefined : regexp[SEARCH];
+ return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
+ },
+ // `RegExp.prototype[@@search]` method
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
+ function (regexp) {
+ var res = maybeCallNative(nativeSearch, regexp, this);
+ if (res.done) return res.value;
+
+ var rx = anObject(regexp);
+ var S = String(this);
+
+ var previousLastIndex = rx.lastIndex;
+ if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
+ var result = regExpExec(rx, S);
+ if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
+ return result === null ? -1 : result.index;
+ }
+ ];
+});
+
+
+/***/ }),
+
+/***/ "861d":
+/***/ (function(module, exports) {
+
+module.exports = function (it) {
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+};
+
+
+/***/ }),
+
+/***/ "8875":
+/***/ (function(module, exports, __webpack_require__) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
+// MIT license
+// source: https://github.com/amiller-gh/currentScript-polyfill
+
+// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
+
+(function (root, factory) {
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {}
+}(typeof self !== 'undefined' ? self : this, function () {
+ function getCurrentScript () {
+ var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
+ // for chrome
+ if (!descriptor && 'currentScript' in document && document.currentScript) {
+ return document.currentScript
+ }
+
+ // for other browsers with native support for currentScript
+ if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
+ return document.currentScript
+ }
+
+ // IE 8-10 support script readyState
+ // IE 11+ & Firefox support stack trace
+ try {
+ throw new Error();
+ }
+ catch (err) {
+ // Find the second match for the "at" string to get file src url from stack.
+ var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
+ ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
+ stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
+ scriptLocation = (stackDetails && stackDetails[1]) || false,
+ line = (stackDetails && stackDetails[2]) || false,
+ currentLocation = document.location.href.replace(document.location.hash, ''),
+ pageSource,
+ inlineScriptSourceRegExp,
+ inlineScriptSource,
+ scripts = document.getElementsByTagName('script'); // Live NodeList collection
+
+ if (scriptLocation === currentLocation) {
+ pageSource = document.documentElement.outerHTML;
+ inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*\n\n\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","function isEmpty (opt) {\n if (opt === 0) return false\n if (Array.isArray(opt) && opt.length === 0) return true\n return !opt\n}\n\nfunction not (fun) {\n return (...params) => !fun(...params)\n}\n\nfunction includes (str, query) {\n /* istanbul ignore else */\n if (str === undefined) str = 'undefined'\n if (str === null) str = 'null'\n if (str === false) str = 'false'\n const text = str.toString().toLowerCase()\n return text.indexOf(query.trim()) !== -1\n}\n\nfunction filterOptions (options, search, label, customLabel) {\n return search ? options\n .filter((option) => includes(customLabel(option, label), search))\n .sort((a, b) => customLabel(a, label).length - customLabel(b, label).length) : options\n}\n\nfunction stripGroups (options) {\n return options.filter((option) => !option.$isLabel)\n}\n\nfunction flattenOptions (values, label) {\n return (options) =>\n options.reduce((prev, curr) => {\n /* istanbul ignore else */\n if (curr[values] && curr[values].length) {\n prev.push({\n $groupLabel: curr[label],\n $isLabel: true\n })\n return prev.concat(curr[values])\n }\n return prev\n }, [])\n}\n\nfunction filterGroups (search, label, values, groupLabel, customLabel) {\n return (groups) =>\n groups.map((group) => {\n /* istanbul ignore else */\n if (!group[values]) {\n console.warn(`Options passed to vue-multiselect do not contain groups, despite the config.`)\n return []\n }\n const groupOptions = filterOptions(group[values], search, label, customLabel)\n\n return groupOptions.length\n ? {\n [groupLabel]: group[groupLabel],\n [values]: groupOptions\n }\n : []\n })\n}\n\nconst flow = (...fns) => (x) => fns.reduce((v, f) => f(v), x)\n\nexport default {\n data () {\n return {\n search: '',\n isOpen: false,\n preferredOpenDirection: 'below',\n optimizedHeight: this.maxHeight\n }\n },\n props: {\n /**\n * Decide whether to filter the results based on search query.\n * Useful for async filtering, where we search through more complex data.\n * @type {Boolean}\n */\n internalSearch: {\n type: Boolean,\n default: true\n },\n /**\n * Array of available options: Objects, Strings or Integers.\n * If array of objects, visible label will default to option.label.\n * If `labal` prop is passed, label will equal option['label']\n * @type {Array}\n */\n options: {\n type: Array,\n required: true\n },\n /**\n * Equivalent to the `multiple` attribute on a `` input.\n * @default false\n * @type {Boolean}\n */\n multiple: {\n type: Boolean,\n default: false\n },\n /**\n * Key to compare objects\n * @default 'id'\n * @type {String}\n */\n trackBy: {\n type: String\n },\n /**\n * Label to look for in option Object\n * @default 'label'\n * @type {String}\n */\n label: {\n type: String\n },\n /**\n * Enable/disable search in options\n * @default true\n * @type {Boolean}\n */\n searchable: {\n type: Boolean,\n default: true\n },\n /**\n * Clear the search input after `)\n * @default true\n * @type {Boolean}\n */\n clearOnSelect: {\n type: Boolean,\n default: true\n },\n /**\n * Hide already selected options\n * @default false\n * @type {Boolean}\n */\n hideSelected: {\n type: Boolean,\n default: false\n },\n /**\n * Equivalent to the `placeholder` attribute on a `` input.\n * @default 'Select option'\n * @type {String}\n */\n placeholder: {\n type: String,\n default: 'Select option'\n },\n /**\n * Allow to remove all selected values\n * @default true\n * @type {Boolean}\n */\n allowEmpty: {\n type: Boolean,\n default: true\n },\n /**\n * Reset this.internalValue, this.search after this.internalValue changes.\n * Useful if want to create a stateless dropdown.\n * @default false\n * @type {Boolean}\n */\n resetAfter: {\n type: Boolean,\n default: false\n },\n /**\n * Enable/disable closing after selecting an option\n * @default true\n * @type {Boolean}\n */\n closeOnSelect: {\n type: Boolean,\n default: true\n },\n /**\n * Function to interpolate the custom label\n * @default false\n * @type {Function}\n */\n customLabel: {\n type: Function,\n default (option, label) {\n if (isEmpty(option)) return ''\n return label ? option[label] : option\n }\n },\n /**\n * Disable / Enable tagging\n * @default false\n * @type {Boolean}\n */\n taggable: {\n type: Boolean,\n default: false\n },\n /**\n * String to show when highlighting a potential tag\n * @default 'Press enter to create a tag'\n * @type {String}\n */\n tagPlaceholder: {\n type: String,\n default: 'Press enter to create a tag'\n },\n /**\n * By default new tags will appear above the search results.\n * Changing to 'bottom' will revert this behaviour\n * and will proritize the search results\n * @default 'top'\n * @type {String}\n */\n tagPosition: {\n type: String,\n default: 'top'\n },\n /**\n * Number of allowed selected options. No limit if 0.\n * @default 0\n * @type {Number}\n */\n max: {\n type: [Number, Boolean],\n default: false\n },\n /**\n * Will be passed with all events as second param.\n * Useful for identifying events origin.\n * @default null\n * @type {String|Integer}\n */\n id: {\n default: null\n },\n /**\n * Limits the options displayed in the dropdown\n * to the first X options.\n * @default 1000\n * @type {Integer}\n */\n optionsLimit: {\n type: Number,\n default: 1000\n },\n /**\n * Name of the property containing\n * the group values\n * @default 1000\n * @type {String}\n */\n groupValues: {\n type: String\n },\n /**\n * Name of the property containing\n * the group label\n * @default 1000\n * @type {String}\n */\n groupLabel: {\n type: String\n },\n /**\n * Allow to select all group values\n * by selecting the group label\n * @default false\n * @type {Boolean}\n */\n groupSelect: {\n type: Boolean,\n default: false\n },\n /**\n * Array of keyboard keys to block\n * when selecting\n * @default 1000\n * @type {String}\n */\n blockKeys: {\n type: Array,\n default () {\n return []\n }\n },\n /**\n * Prevent from wiping up the search value\n * @default false\n * @type {Boolean}\n */\n preserveSearch: {\n type: Boolean,\n default: false\n },\n /**\n * Select 1st options if value is empty\n * @default false\n * @type {Boolean}\n */\n preselectFirst: {\n type: Boolean,\n default: false\n },\n /**\n * Prevent autofocus\n * @default false\n * @type {Boolean}\n */\n preventAutofocus: {\n type: Boolean,\n default: false\n }\n },\n mounted () {\n /* istanbul ignore else */\n if (!this.multiple && this.max) {\n console.warn('[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false.')\n }\n if (\n this.preselectFirst &&\n !this.internalValue.length &&\n this.options.length\n ) {\n this.select(this.filteredOptions[0])\n }\n },\n computed: {\n internalValue () {\n return this.modelValue || this.modelValue === 0\n ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue]\n : []\n },\n filteredOptions () {\n const search = this.search || ''\n const normalizedSearch = search.toLowerCase().trim()\n\n let options = this.options.concat()\n\n /* istanbul ignore else */\n if (this.internalSearch) {\n options = this.groupValues\n ? this.filterAndFlat(options, normalizedSearch, this.label)\n : filterOptions(options, normalizedSearch, this.label, this.customLabel)\n } else {\n options = this.groupValues ? flattenOptions(this.groupValues, this.groupLabel)(options) : options\n }\n\n options = this.hideSelected\n ? options.filter(not(this.isSelected))\n : options\n\n /* istanbul ignore else */\n if (this.taggable && normalizedSearch.length && !this.isExistingOption(normalizedSearch)) {\n if (this.tagPosition === 'bottom') {\n options.push({isTag: true, label: search})\n } else {\n options.unshift({isTag: true, label: search})\n }\n }\n\n return options.slice(0, this.optionsLimit)\n },\n valueKeys () {\n if (this.trackBy) {\n return this.internalValue.map((element) => element[this.trackBy])\n } else {\n return this.internalValue\n }\n },\n optionKeys () {\n const options = this.groupValues ? this.flatAndStrip(this.options) : this.options\n return options.map((element) => this.customLabel(element, this.label).toString().toLowerCase())\n },\n currentOptionLabel () {\n return this.multiple\n ? this.searchable ? '' : this.placeholder\n : this.internalValue.length\n ? this.getOptionLabel(this.internalValue[0])\n : this.searchable ? '' : this.placeholder\n }\n },\n watch: {\n internalValue: {\n handler () {\n /* istanbul ignore else */\n if (this.resetAfter && this.internalValue.length) {\n this.search = ''\n this.$emit('update:modelValue', this.multiple ? [] : null)\n }\n },\n deep: true\n },\n search () {\n this.$emit('search-change', this.search)\n }\n },\n emits: ['open', 'search-change', 'close', 'select', 'update:modelValue', 'remove', 'tag'],\n methods: {\n /**\n * Returns the internalValue in a way it can be emited to the parent\n * @returns {Object||Array||String||Integer}\n */\n getValue () {\n return this.multiple\n ? this.internalValue\n : this.internalValue.length === 0\n ? null\n : this.internalValue[0]\n },\n /**\n * Filters and then flattens the options list\n * @param {Array}\n * @return {Array} returns a filtered and flat options list\n */\n filterAndFlat (options, search, label) {\n return flow(\n filterGroups(search, label, this.groupValues, this.groupLabel, this.customLabel),\n flattenOptions(this.groupValues, this.groupLabel)\n )(options)\n },\n /**\n * Flattens and then strips the group labels from the options list\n * @param {Array}\n * @return {Array} returns a flat options list without group labels\n */\n flatAndStrip (options) {\n return flow(\n flattenOptions(this.groupValues, this.groupLabel),\n stripGroups\n )(options)\n },\n /**\n * Updates the search value\n * @param {String}\n */\n updateSearch (query) {\n this.search = query\n },\n /**\n * Finds out if the given query is already present\n * in the available options\n * @param {String}\n * @return {Boolean} returns true if element is available\n */\n isExistingOption (query) {\n return !this.options\n ? false\n : this.optionKeys.indexOf(query) > -1\n },\n /**\n * Finds out if the given element is already present\n * in the result value\n * @param {Object||String||Integer} option passed element to check\n * @returns {Boolean} returns true if element is selected\n */\n isSelected (option) {\n const opt = this.trackBy\n ? option[this.trackBy]\n : option\n return this.valueKeys.indexOf(opt) > -1\n },\n /**\n * Finds out if the given option is disabled\n * @param {Object||String||Integer} option passed element to check\n * @returns {Boolean} returns true if element is disabled\n */\n isOptionDisabled (option) {\n return !!option.$isDisabled\n },\n /**\n * Returns empty string when options is null/undefined\n * Returns tag query if option is tag.\n * Returns the customLabel() results and casts it to string.\n *\n * @param {Object||String||Integer} Passed option\n * @returns {Object||String}\n */\n getOptionLabel (option) {\n if (isEmpty(option)) return ''\n /* istanbul ignore else */\n if (option.isTag) return option.label\n /* istanbul ignore else */\n if (option.$isLabel) return option.$groupLabel\n\n const label = this.customLabel(option, this.label)\n /* istanbul ignore else */\n if (isEmpty(label)) return ''\n return label\n },\n /**\n * Add the given option to the list of selected options\n * or sets the option as the selected option.\n * If option is already selected -> remove it from the results.\n *\n * @param {Object||String||Integer} option to select/deselect\n * @param {Boolean} block removing\n */\n select (option, key) {\n /* istanbul ignore else */\n if (option.$isLabel && this.groupSelect) {\n this.selectGroup(option)\n return\n }\n if (this.blockKeys.indexOf(key) !== -1 ||\n this.disabled ||\n option.$isDisabled ||\n option.$isLabel\n ) return\n /* istanbul ignore else */\n if (this.max && this.multiple && this.internalValue.length === this.max) return\n /* istanbul ignore else */\n if (key === 'Tab' && !this.pointerDirty) return\n if (option.isTag) {\n this.$emit('tag', option.label, this.id)\n this.search = ''\n if (this.closeOnSelect && !this.multiple) this.deactivate()\n } else {\n const isSelected = this.isSelected(option)\n\n if (isSelected) {\n if (key !== 'Tab') this.removeElement(option)\n return\n }\n\n if (this.multiple) {\n this.$emit('update:modelValue', this.internalValue.concat([option]))\n } else {\n this.$emit('update:modelValue', option)\n }\n\n this.$emit('select', option, this.id)\n\n /* istanbul ignore else */\n if (this.clearOnSelect) this.search = ''\n }\n /* istanbul ignore else */\n if (this.closeOnSelect) this.deactivate()\n },\n /**\n * Add the given group options to the list of selected options\n * If all group optiona are already selected -> remove it from the results.\n *\n * @param {Object||String||Integer} group to select/deselect\n */\n selectGroup (selectedGroup) {\n const group = this.options.find((option) => {\n return option[this.groupLabel] === selectedGroup.$groupLabel\n })\n\n if (!group) return\n\n if (this.wholeGroupSelected(group)) {\n this.$emit('remove', group[this.groupValues], this.id)\n\n const groupValues = this.trackBy ? group[this.groupValues].map(val => val[this.trackBy]) : group[this.groupValues]\n const newValue = this.internalValue.filter(\n option => groupValues.indexOf(this.trackBy ? option[this.trackBy] : option) === -1\n )\n\n this.$emit('update:modelValue', newValue)\n } else {\n let optionsToAdd = group[this.groupValues].filter(\n option => !(this.isOptionDisabled(option) || this.isSelected(option))\n )\n\n // if max is defined then just select options respecting max\n if (this.max) {\n optionsToAdd.splice(this.max - this.internalValue.length)\n }\n\n this.$emit('select', optionsToAdd, this.id)\n this.$emit(\n 'update:modelValue',\n this.internalValue.concat(optionsToAdd)\n )\n }\n\n if (this.closeOnSelect) this.deactivate()\n },\n /**\n * Helper to identify if all values in a group are selected\n *\n * @param {Object} group to validated selected values against\n */\n wholeGroupSelected (group) {\n return group[this.groupValues].every((option) => this.isSelected(option) || this.isOptionDisabled(option)\n )\n },\n /**\n * Helper to identify if all values in a group are disabled\n *\n * @param {Object} group to check for disabled values\n */\n wholeGroupDisabled (group) {\n return group[this.groupValues].every(this.isOptionDisabled)\n },\n /**\n * Removes the given option from the selected options.\n * Additionally checks this.allowEmpty prop if option can be removed when\n * it is the last selected option.\n *\n * @param {type} option description\n * @return {type} description\n */\n removeElement (option, shouldClose = true) {\n /* istanbul ignore else */\n if (this.disabled) return\n /* istanbul ignore else */\n if (option.$isDisabled) return\n /* istanbul ignore else */\n if (!this.allowEmpty && this.internalValue.length <= 1) {\n this.deactivate()\n return\n }\n\n const index = typeof option === 'object'\n ? this.valueKeys.indexOf(option[this.trackBy])\n : this.valueKeys.indexOf(option)\n\n if (this.multiple) {\n const newValue = this.internalValue.slice(0, index).concat(this.internalValue.slice(index + 1))\n this.$emit('update:modelValue', newValue)\n } else {\n this.$emit('update:modelValue', null)\n }\n this.$emit('remove', option, this.id)\n\n /* istanbul ignore else */\n if (this.closeOnSelect && shouldClose) this.deactivate()\n },\n /**\n * Calls this.removeElement() with the last element\n * from this.internalValue (selected element Array)\n *\n * @fires this#removeElement\n */\n removeLastElement () {\n /* istanbul ignore else */\n if (this.blockKeys.indexOf('Delete') !== -1) return\n /* istanbul ignore else */\n if (this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length) {\n this.removeElement(this.internalValue[this.internalValue.length - 1], false)\n }\n },\n /**\n * Opens the multiselect’s dropdown.\n * Sets this.isOpen to TRUE\n */\n activate () {\n /* istanbul ignore else */\n if (this.isOpen || this.disabled) return\n\n this.adjustPosition()\n /* istanbul ignore else */\n if (this.groupValues && this.pointer === 0 && this.filteredOptions.length) {\n this.pointer = 1\n }\n\n this.isOpen = true\n /* istanbul ignore else */\n if (this.searchable) {\n if (!this.preserveSearch) this.search = ''\n if (!this.preventAutofocus) this.$nextTick(() => this.$refs.search && this.$refs.search.focus())\n } else if (!this.preventAutofocus) {\n if (typeof this.$el !== 'undefined') this.$el.focus()\n }\n this.$emit('open', this.id)\n },\n /**\n * Closes the multiselect’s dropdown.\n * Sets this.isOpen to FALSE\n */\n deactivate () {\n /* istanbul ignore else */\n if (!this.isOpen) return\n\n this.isOpen = false\n /* istanbul ignore else */\n if (this.searchable) {\n if (this.$refs.search !== null && typeof this.$refs.search !== 'undefined') this.$refs.search.blur()\n } else {\n if (typeof this.$el !== 'undefined') this.$el.blur()\n }\n if (!this.preserveSearch) this.search = ''\n this.$emit('close', this.getValue(), this.id)\n },\n /**\n * Call this.activate() or this.deactivate()\n * depending on this.isOpen value.\n *\n * @fires this#activate || this#deactivate\n * @property {Boolean} isOpen indicates if dropdown is open\n */\n toggle () {\n this.isOpen\n ? this.deactivate()\n : this.activate()\n },\n /**\n * Updates the hasEnoughSpace variable used for\n * detecting where to expand the dropdown\n */\n adjustPosition () {\n if (typeof window === 'undefined') return\n\n const spaceAbove = this.$el.getBoundingClientRect().top\n const spaceBelow = window.innerHeight - this.$el.getBoundingClientRect().bottom\n const hasEnoughSpaceBelow = spaceBelow > this.maxHeight\n\n if (hasEnoughSpaceBelow || spaceBelow > spaceAbove || this.openDirection === 'below' || this.openDirection === 'bottom') {\n this.preferredOpenDirection = 'below'\n this.optimizedHeight = Math.min(spaceBelow - 40, this.maxHeight)\n } else {\n this.preferredOpenDirection = 'above'\n this.optimizedHeight = Math.min(spaceAbove - 40, this.maxHeight)\n }\n }\n }\n}\n","export default {\n data () {\n return {\n pointer: 0,\n pointerDirty: false\n }\n },\n props: {\n /**\n * Enable/disable highlighting of the pointed value.\n * @type {Boolean}\n * @default true\n */\n showPointer: {\n type: Boolean,\n default: true\n },\n optionHeight: {\n type: Number,\n default: 40\n }\n },\n computed: {\n pointerPosition () {\n return this.pointer * this.optionHeight\n },\n visibleElements () {\n return this.optimizedHeight / this.optionHeight\n }\n },\n watch: {\n filteredOptions () {\n this.pointerAdjust()\n },\n isOpen () {\n this.pointerDirty = false\n },\n pointer () {\n this.$refs.search && this.$refs.search.setAttribute('aria-activedescendant', this.id + '-' + this.pointer.toString())\n }\n },\n methods: {\n optionHighlight (index, option) {\n return {\n 'multiselect__option--highlight': index === this.pointer && this.showPointer,\n 'multiselect__option--selected': this.isSelected(option)\n }\n },\n groupHighlight (index, selectedGroup) {\n if (!this.groupSelect) {\n return [\n 'multiselect__option--disabled',\n {'multiselect__option--group': selectedGroup.$isLabel}\n ]\n }\n\n const group = this.options.find((option) => {\n return option[this.groupLabel] === selectedGroup.$groupLabel\n })\n\n return group && !this.wholeGroupDisabled(group) ? [\n 'multiselect__option--group',\n {'multiselect__option--highlight': index === this.pointer && this.showPointer},\n {'multiselect__option--group-selected': this.wholeGroupSelected(group)}\n ] : 'multiselect__option--disabled'\n },\n addPointerElement ({key} = 'Enter') {\n /* istanbul ignore else */\n if (this.filteredOptions.length > 0) {\n this.select(this.filteredOptions[this.pointer], key)\n }\n this.pointerReset()\n },\n pointerForward () {\n /* istanbul ignore else */\n if (this.pointer < this.filteredOptions.length - 1) {\n this.pointer++\n /* istanbul ignore next */\n if (this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight) {\n this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight\n }\n /* istanbul ignore else */\n if (\n this.filteredOptions[this.pointer] &&\n this.filteredOptions[this.pointer].$isLabel &&\n !this.groupSelect\n ) this.pointerForward()\n }\n this.pointerDirty = true\n },\n pointerBackward () {\n if (this.pointer > 0) {\n this.pointer--\n /* istanbul ignore else */\n if (this.$refs.list.scrollTop >= this.pointerPosition) {\n this.$refs.list.scrollTop = this.pointerPosition\n }\n /* istanbul ignore else */\n if (\n this.filteredOptions[this.pointer] &&\n this.filteredOptions[this.pointer].$isLabel &&\n !this.groupSelect\n ) this.pointerBackward()\n } else {\n /* istanbul ignore else */\n if (\n this.filteredOptions[this.pointer] &&\n this.filteredOptions[0].$isLabel &&\n !this.groupSelect\n ) this.pointerForward()\n }\n this.pointerDirty = true\n },\n pointerReset () {\n /* istanbul ignore else */\n if (!this.closeOnSelect) return\n this.pointer = 0\n /* istanbul ignore else */\n if (this.$refs.list) {\n this.$refs.list.scrollTop = 0\n }\n },\n pointerAdjust () {\n /* istanbul ignore else */\n if (this.pointer >= this.filteredOptions.length - 1) {\n this.pointer = this.filteredOptions.length\n ? this.filteredOptions.length - 1\n : 0\n }\n\n if (this.filteredOptions.length > 0 &&\n this.filteredOptions[this.pointer].$isLabel &&\n !this.groupSelect\n ) {\n this.pointerForward()\n }\n },\n pointerSet (index) {\n this.pointer = index\n this.pointerDirty = true\n }\n }\n}\n","export { default } from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Multiselect.vue?vue&type=script&lang=js\"; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Multiselect.vue?vue&type=script&lang=js\"","import { render } from \"./Multiselect.vue?vue&type=template&id=2fe91855\"\nimport script from \"./Multiselect.vue?vue&type=script&lang=js\"\nexport * from \"./Multiselect.vue?vue&type=script&lang=js\"\n\nimport \"./Multiselect.vue?vue&type=style&index=0&id=2fe91855&lang=css\"\n\nimport exportComponent from \"/home/matt/git/vue-multiselect/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import Multiselect from './Multiselect.vue'\nimport multiselectMixin from './multiselectMixin.js'\nimport pointerMixin from './pointerMixin.js'\n\nexport default Multiselect\n\nexport {Multiselect, multiselectMixin, pointerMixin}\n","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n /* global Symbol -- safe */\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/vue-multiselect.css b/dist/vue-multiselect.css
new file mode 100644
index 00000000..9c9a6ad1
--- /dev/null
+++ b/dist/vue-multiselect.css
@@ -0,0 +1,468 @@
+
+
+ fieldset[disabled] .multiselect {
+ pointer-events: none;
+ }
+
+ .multiselect__spinner {
+ position: absolute;
+ right: 1px;
+ top: 1px;
+ width: 40px;
+ height: 38px;
+ background: #fff;
+ display: block;
+ }
+
+ .multiselect__spinner::before,
+ .multiselect__spinner::after {
+ position: absolute;
+ content: "";
+ top: 50%;
+ left: 50%;
+ margin: -8px 0 0 -8px;
+ width: 16px;
+ height: 16px;
+ border-radius: 100%;
+ border-color: #41b883 transparent transparent;
+ border-style: solid;
+ border-width: 2px;
+ box-shadow: 0 0 0 1px transparent;
+ }
+
+ .multiselect__spinner::before {
+ animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
+ animation-iteration-count: infinite;
+ }
+
+ .multiselect__spinner::after {
+ animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
+ animation-iteration-count: infinite;
+ }
+
+ .multiselect__loading-enter-active,
+ .multiselect__loading-leave-active {
+ transition: opacity 0.4s ease-in-out;
+ opacity: 1;
+ }
+
+ .multiselect__loading-enter,
+ .multiselect__loading-leave-active {
+ opacity: 0;
+ }
+
+ .multiselect,
+ .multiselect__input,
+ .multiselect__single {
+ font-family: inherit;
+ font-size: 16px;
+ touch-action: manipulation;
+ }
+
+ .multiselect {
+ box-sizing: content-box;
+ display: block;
+ position: relative;
+ width: 100%;
+ min-height: 40px;
+ text-align: left;
+ color: #35495e;
+ }
+
+ .multiselect * {
+ box-sizing: border-box;
+ }
+
+ .multiselect:focus {
+ outline: none;
+ }
+
+ .multiselect--disabled {
+ background: #ededed;
+ pointer-events: none;
+ opacity: 0.6;
+ }
+
+ .multiselect--active {
+ z-index: 50;
+ }
+
+ .multiselect--active:not(.multiselect--above) .multiselect__current,
+ .multiselect--active:not(.multiselect--above) .multiselect__input,
+ .multiselect--active:not(.multiselect--above) .multiselect__tags {
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+
+ .multiselect--active .multiselect__select {
+ transform: rotateZ(180deg);
+ }
+
+ .multiselect--above.multiselect--active .multiselect__current,
+ .multiselect--above.multiselect--active .multiselect__input,
+ .multiselect--above.multiselect--active .multiselect__tags {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ }
+
+ .multiselect__input,
+ .multiselect__single {
+ position: relative;
+ display: inline-block;
+ min-height: 20px;
+ line-height: 20px;
+ border: none;
+ border-radius: 5px;
+ background: #fff;
+ padding: 0 0 0 5px;
+ width: calc(100%);
+ transition: border 0.1s ease;
+ box-sizing: border-box;
+ margin-bottom: 8px;
+ vertical-align: top;
+ }
+
+ .multiselect__input::placeholder {
+ color: #35495e;
+ }
+
+ .multiselect__tag ~ .multiselect__input,
+ .multiselect__tag ~ .multiselect__single {
+ width: auto;
+ }
+
+ .multiselect__input:hover,
+ .multiselect__single:hover {
+ border-color: #cfcfcf;
+ }
+
+ .multiselect__input:focus,
+ .multiselect__single:focus {
+ border-color: #a8a8a8;
+ outline: none;
+ }
+
+ .multiselect__single {
+ padding-left: 5px;
+ margin-bottom: 8px;
+ }
+
+ .multiselect__tags-wrap {
+ display: inline;
+ }
+
+ .multiselect__tags {
+ min-height: 40px;
+ display: block;
+ padding: 8px 40px 0 8px;
+ border-radius: 5px;
+ border: 1px solid #e8e8e8;
+ background: #fff;
+ font-size: 14px;
+ }
+
+ .multiselect__tag {
+ position: relative;
+ display: inline-block;
+ padding: 4px 26px 4px 10px;
+ border-radius: 5px;
+ margin-right: 10px;
+ color: #fff;
+ line-height: 1;
+ background: #41b883;
+ margin-bottom: 5px;
+ white-space: nowrap;
+ overflow: hidden;
+ max-width: 100%;
+ text-overflow: ellipsis;
+ }
+
+ .multiselect__tag-icon {
+ cursor: pointer;
+ margin-left: 7px;
+ position: absolute;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ font-weight: 700;
+ font-style: initial;
+ width: 22px;
+ text-align: center;
+ line-height: 22px;
+ transition: all 0.2s ease;
+ border-radius: 5px;
+ }
+
+ .multiselect__tag-icon::after {
+ content: "×";
+ color: #266d4d;
+ font-size: 14px;
+ }
+
+ /* // Remove these lines to avoid green closing button
+ //.multiselect__tag-icon:focus,
+ //.multiselect__tag-icon:hover {
+ // background: #369a6e;
+ //} */
+
+ .multiselect__tag-icon:focus::after,
+ .multiselect__tag-icon:hover::after {
+ color: white;
+ }
+
+ .multiselect__current {
+ line-height: 16px;
+ min-height: 40px;
+ box-sizing: border-box;
+ display: block;
+ overflow: hidden;
+ padding: 8px 12px 0;
+ padding-right: 30px;
+ white-space: nowrap;
+ margin: 0;
+ text-decoration: none;
+ border-radius: 5px;
+ border: 1px solid #e8e8e8;
+ cursor: pointer;
+ }
+
+ .multiselect__select {
+ line-height: 16px;
+ display: block;
+ position: absolute;
+ box-sizing: border-box;
+ width: 40px;
+ height: 38px;
+ right: 1px;
+ top: 1px;
+ padding: 4px 8px;
+ margin: 0;
+ text-decoration: none;
+ text-align: center;
+ cursor: pointer;
+ transition: transform 0.2s ease;
+ }
+
+ .multiselect__select::before {
+ position: relative;
+ right: 0;
+ top: 65%;
+ color: #999;
+ margin-top: 4px;
+ border-style: solid;
+ border-width: 5px 5px 0 5px;
+ border-color: #999 transparent transparent transparent;
+ content: "";
+ }
+
+ .multiselect__placeholder {
+ color: #adadad;
+ display: inline-block;
+ margin-bottom: 10px;
+ padding-top: 2px;
+ }
+
+ .multiselect--active .multiselect__placeholder {
+ display: none;
+ }
+
+ .multiselect__content-wrapper {
+ position: absolute;
+ display: block;
+ background: #fff;
+ width: 100%;
+ max-height: 240px;
+ overflow: auto;
+ border: 1px solid #e8e8e8;
+ border-top: none;
+ border-bottom-left-radius: 5px;
+ border-bottom-right-radius: 5px;
+ z-index: 50;
+ -webkit-overflow-scrolling: touch;
+ }
+
+ .multiselect__content {
+ list-style: none;
+ display: inline-block;
+ padding: 0;
+ margin: 0;
+ min-width: 100%;
+ vertical-align: top;
+ }
+
+ .multiselect--above .multiselect__content-wrapper {
+ bottom: 100%;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ border-bottom: none;
+ border-top: 1px solid #e8e8e8;
+ }
+
+ .multiselect__content::-webkit-scrollbar {
+ display: none;
+ }
+
+ .multiselect__element {
+ display: block;
+ }
+
+ .multiselect__option {
+ display: block;
+ padding: 12px;
+ min-height: 40px;
+ line-height: 16px;
+ text-decoration: none;
+ text-transform: none;
+ vertical-align: middle;
+ position: relative;
+ cursor: pointer;
+ white-space: nowrap;
+ }
+
+ .multiselect__option::after {
+ top: 0;
+ right: 0;
+ position: absolute;
+ line-height: 40px;
+ padding-right: 12px;
+ padding-left: 20px;
+ font-size: 13px;
+ }
+
+ .multiselect__option--highlight {
+ background: #41b883;
+ outline: none;
+ color: white;
+ }
+
+ .multiselect__option--highlight::after {
+ content: attr(data-select);
+ background: #41b883;
+ color: white;
+ }
+
+ .multiselect__option--selected {
+ background: #f3f3f3;
+ color: #35495e;
+ font-weight: bold;
+ }
+
+ .multiselect__option--selected::after {
+ content: attr(data-selected);
+ color: silver;
+ background: inherit;
+ }
+
+ .multiselect__option--selected.multiselect__option--highlight {
+ background: #ff6a6a;
+ color: #fff;
+ }
+
+ .multiselect__option--selected.multiselect__option--highlight::after {
+ background: #ff6a6a;
+ content: attr(data-deselect);
+ color: #fff;
+ }
+
+ .multiselect--disabled .multiselect__current,
+ .multiselect--disabled .multiselect__select {
+ background: #ededed;
+ color: #a6a6a6;
+ }
+
+ .multiselect__option--disabled {
+ background: #ededed !important;
+ color: #a6a6a6 !important;
+ cursor: text;
+ pointer-events: none;
+ }
+
+ .multiselect__option--group {
+ background: #ededed;
+ color: #35495e;
+ }
+
+ .multiselect__option--group.multiselect__option--highlight {
+ background: #35495e;
+ color: #fff;
+ }
+
+ .multiselect__option--group.multiselect__option--highlight::after {
+ background: #35495e;
+ }
+
+ .multiselect__option--disabled.multiselect__option--highlight {
+ background: #dedede;
+ }
+
+ .multiselect__option--group-selected.multiselect__option--highlight {
+ background: #ff6a6a;
+ color: #fff;
+ }
+
+ .multiselect__option--group-selected.multiselect__option--highlight::after {
+ background: #ff6a6a;
+ content: attr(data-deselect);
+ color: #fff;
+ }
+
+ .multiselect-enter-active,
+ .multiselect-leave-active {
+ transition: all 0.15s ease;
+ }
+
+ .multiselect-enter,
+ .multiselect-leave-active {
+ opacity: 0;
+ }
+
+ .multiselect__strong {
+ margin-bottom: 8px;
+ line-height: 20px;
+ display: inline-block;
+ vertical-align: top;
+ }
+
+ *[dir="rtl"] .multiselect {
+ text-align: right;
+ }
+
+ *[dir="rtl"] .multiselect__select {
+ right: auto;
+ left: 1px;
+ }
+
+ *[dir="rtl"] .multiselect__tags {
+ padding: 8px 8px 0 40px;
+ }
+
+ *[dir="rtl"] .multiselect__content {
+ text-align: right;
+ }
+
+ *[dir="rtl"] .multiselect__option::after {
+ right: auto;
+ left: 0;
+ }
+
+ *[dir="rtl"] .multiselect__clear {
+ right: auto;
+ left: 12px;
+ }
+
+ *[dir="rtl"] .multiselect__spinner {
+ right: auto;
+ left: 1px;
+ }
+
+ @keyframes spinning {
+ from {
+ transform: rotate(0);
+ }
+
+ to {
+ transform: rotate(2turn);
+ }
+ }
diff --git a/dist/vue-multiselect.esm.css b/dist/vue-multiselect.esm.css
new file mode 100644
index 00000000..9c9a6ad1
--- /dev/null
+++ b/dist/vue-multiselect.esm.css
@@ -0,0 +1,468 @@
+
+
+ fieldset[disabled] .multiselect {
+ pointer-events: none;
+ }
+
+ .multiselect__spinner {
+ position: absolute;
+ right: 1px;
+ top: 1px;
+ width: 40px;
+ height: 38px;
+ background: #fff;
+ display: block;
+ }
+
+ .multiselect__spinner::before,
+ .multiselect__spinner::after {
+ position: absolute;
+ content: "";
+ top: 50%;
+ left: 50%;
+ margin: -8px 0 0 -8px;
+ width: 16px;
+ height: 16px;
+ border-radius: 100%;
+ border-color: #41b883 transparent transparent;
+ border-style: solid;
+ border-width: 2px;
+ box-shadow: 0 0 0 1px transparent;
+ }
+
+ .multiselect__spinner::before {
+ animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
+ animation-iteration-count: infinite;
+ }
+
+ .multiselect__spinner::after {
+ animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
+ animation-iteration-count: infinite;
+ }
+
+ .multiselect__loading-enter-active,
+ .multiselect__loading-leave-active {
+ transition: opacity 0.4s ease-in-out;
+ opacity: 1;
+ }
+
+ .multiselect__loading-enter,
+ .multiselect__loading-leave-active {
+ opacity: 0;
+ }
+
+ .multiselect,
+ .multiselect__input,
+ .multiselect__single {
+ font-family: inherit;
+ font-size: 16px;
+ touch-action: manipulation;
+ }
+
+ .multiselect {
+ box-sizing: content-box;
+ display: block;
+ position: relative;
+ width: 100%;
+ min-height: 40px;
+ text-align: left;
+ color: #35495e;
+ }
+
+ .multiselect * {
+ box-sizing: border-box;
+ }
+
+ .multiselect:focus {
+ outline: none;
+ }
+
+ .multiselect--disabled {
+ background: #ededed;
+ pointer-events: none;
+ opacity: 0.6;
+ }
+
+ .multiselect--active {
+ z-index: 50;
+ }
+
+ .multiselect--active:not(.multiselect--above) .multiselect__current,
+ .multiselect--active:not(.multiselect--above) .multiselect__input,
+ .multiselect--active:not(.multiselect--above) .multiselect__tags {
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+
+ .multiselect--active .multiselect__select {
+ transform: rotateZ(180deg);
+ }
+
+ .multiselect--above.multiselect--active .multiselect__current,
+ .multiselect--above.multiselect--active .multiselect__input,
+ .multiselect--above.multiselect--active .multiselect__tags {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ }
+
+ .multiselect__input,
+ .multiselect__single {
+ position: relative;
+ display: inline-block;
+ min-height: 20px;
+ line-height: 20px;
+ border: none;
+ border-radius: 5px;
+ background: #fff;
+ padding: 0 0 0 5px;
+ width: calc(100%);
+ transition: border 0.1s ease;
+ box-sizing: border-box;
+ margin-bottom: 8px;
+ vertical-align: top;
+ }
+
+ .multiselect__input::placeholder {
+ color: #35495e;
+ }
+
+ .multiselect__tag ~ .multiselect__input,
+ .multiselect__tag ~ .multiselect__single {
+ width: auto;
+ }
+
+ .multiselect__input:hover,
+ .multiselect__single:hover {
+ border-color: #cfcfcf;
+ }
+
+ .multiselect__input:focus,
+ .multiselect__single:focus {
+ border-color: #a8a8a8;
+ outline: none;
+ }
+
+ .multiselect__single {
+ padding-left: 5px;
+ margin-bottom: 8px;
+ }
+
+ .multiselect__tags-wrap {
+ display: inline;
+ }
+
+ .multiselect__tags {
+ min-height: 40px;
+ display: block;
+ padding: 8px 40px 0 8px;
+ border-radius: 5px;
+ border: 1px solid #e8e8e8;
+ background: #fff;
+ font-size: 14px;
+ }
+
+ .multiselect__tag {
+ position: relative;
+ display: inline-block;
+ padding: 4px 26px 4px 10px;
+ border-radius: 5px;
+ margin-right: 10px;
+ color: #fff;
+ line-height: 1;
+ background: #41b883;
+ margin-bottom: 5px;
+ white-space: nowrap;
+ overflow: hidden;
+ max-width: 100%;
+ text-overflow: ellipsis;
+ }
+
+ .multiselect__tag-icon {
+ cursor: pointer;
+ margin-left: 7px;
+ position: absolute;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ font-weight: 700;
+ font-style: initial;
+ width: 22px;
+ text-align: center;
+ line-height: 22px;
+ transition: all 0.2s ease;
+ border-radius: 5px;
+ }
+
+ .multiselect__tag-icon::after {
+ content: "×";
+ color: #266d4d;
+ font-size: 14px;
+ }
+
+ /* // Remove these lines to avoid green closing button
+ //.multiselect__tag-icon:focus,
+ //.multiselect__tag-icon:hover {
+ // background: #369a6e;
+ //} */
+
+ .multiselect__tag-icon:focus::after,
+ .multiselect__tag-icon:hover::after {
+ color: white;
+ }
+
+ .multiselect__current {
+ line-height: 16px;
+ min-height: 40px;
+ box-sizing: border-box;
+ display: block;
+ overflow: hidden;
+ padding: 8px 12px 0;
+ padding-right: 30px;
+ white-space: nowrap;
+ margin: 0;
+ text-decoration: none;
+ border-radius: 5px;
+ border: 1px solid #e8e8e8;
+ cursor: pointer;
+ }
+
+ .multiselect__select {
+ line-height: 16px;
+ display: block;
+ position: absolute;
+ box-sizing: border-box;
+ width: 40px;
+ height: 38px;
+ right: 1px;
+ top: 1px;
+ padding: 4px 8px;
+ margin: 0;
+ text-decoration: none;
+ text-align: center;
+ cursor: pointer;
+ transition: transform 0.2s ease;
+ }
+
+ .multiselect__select::before {
+ position: relative;
+ right: 0;
+ top: 65%;
+ color: #999;
+ margin-top: 4px;
+ border-style: solid;
+ border-width: 5px 5px 0 5px;
+ border-color: #999 transparent transparent transparent;
+ content: "";
+ }
+
+ .multiselect__placeholder {
+ color: #adadad;
+ display: inline-block;
+ margin-bottom: 10px;
+ padding-top: 2px;
+ }
+
+ .multiselect--active .multiselect__placeholder {
+ display: none;
+ }
+
+ .multiselect__content-wrapper {
+ position: absolute;
+ display: block;
+ background: #fff;
+ width: 100%;
+ max-height: 240px;
+ overflow: auto;
+ border: 1px solid #e8e8e8;
+ border-top: none;
+ border-bottom-left-radius: 5px;
+ border-bottom-right-radius: 5px;
+ z-index: 50;
+ -webkit-overflow-scrolling: touch;
+ }
+
+ .multiselect__content {
+ list-style: none;
+ display: inline-block;
+ padding: 0;
+ margin: 0;
+ min-width: 100%;
+ vertical-align: top;
+ }
+
+ .multiselect--above .multiselect__content-wrapper {
+ bottom: 100%;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ border-bottom: none;
+ border-top: 1px solid #e8e8e8;
+ }
+
+ .multiselect__content::-webkit-scrollbar {
+ display: none;
+ }
+
+ .multiselect__element {
+ display: block;
+ }
+
+ .multiselect__option {
+ display: block;
+ padding: 12px;
+ min-height: 40px;
+ line-height: 16px;
+ text-decoration: none;
+ text-transform: none;
+ vertical-align: middle;
+ position: relative;
+ cursor: pointer;
+ white-space: nowrap;
+ }
+
+ .multiselect__option::after {
+ top: 0;
+ right: 0;
+ position: absolute;
+ line-height: 40px;
+ padding-right: 12px;
+ padding-left: 20px;
+ font-size: 13px;
+ }
+
+ .multiselect__option--highlight {
+ background: #41b883;
+ outline: none;
+ color: white;
+ }
+
+ .multiselect__option--highlight::after {
+ content: attr(data-select);
+ background: #41b883;
+ color: white;
+ }
+
+ .multiselect__option--selected {
+ background: #f3f3f3;
+ color: #35495e;
+ font-weight: bold;
+ }
+
+ .multiselect__option--selected::after {
+ content: attr(data-selected);
+ color: silver;
+ background: inherit;
+ }
+
+ .multiselect__option--selected.multiselect__option--highlight {
+ background: #ff6a6a;
+ color: #fff;
+ }
+
+ .multiselect__option--selected.multiselect__option--highlight::after {
+ background: #ff6a6a;
+ content: attr(data-deselect);
+ color: #fff;
+ }
+
+ .multiselect--disabled .multiselect__current,
+ .multiselect--disabled .multiselect__select {
+ background: #ededed;
+ color: #a6a6a6;
+ }
+
+ .multiselect__option--disabled {
+ background: #ededed !important;
+ color: #a6a6a6 !important;
+ cursor: text;
+ pointer-events: none;
+ }
+
+ .multiselect__option--group {
+ background: #ededed;
+ color: #35495e;
+ }
+
+ .multiselect__option--group.multiselect__option--highlight {
+ background: #35495e;
+ color: #fff;
+ }
+
+ .multiselect__option--group.multiselect__option--highlight::after {
+ background: #35495e;
+ }
+
+ .multiselect__option--disabled.multiselect__option--highlight {
+ background: #dedede;
+ }
+
+ .multiselect__option--group-selected.multiselect__option--highlight {
+ background: #ff6a6a;
+ color: #fff;
+ }
+
+ .multiselect__option--group-selected.multiselect__option--highlight::after {
+ background: #ff6a6a;
+ content: attr(data-deselect);
+ color: #fff;
+ }
+
+ .multiselect-enter-active,
+ .multiselect-leave-active {
+ transition: all 0.15s ease;
+ }
+
+ .multiselect-enter,
+ .multiselect-leave-active {
+ opacity: 0;
+ }
+
+ .multiselect__strong {
+ margin-bottom: 8px;
+ line-height: 20px;
+ display: inline-block;
+ vertical-align: top;
+ }
+
+ *[dir="rtl"] .multiselect {
+ text-align: right;
+ }
+
+ *[dir="rtl"] .multiselect__select {
+ right: auto;
+ left: 1px;
+ }
+
+ *[dir="rtl"] .multiselect__tags {
+ padding: 8px 8px 0 40px;
+ }
+
+ *[dir="rtl"] .multiselect__content {
+ text-align: right;
+ }
+
+ *[dir="rtl"] .multiselect__option::after {
+ right: auto;
+ left: 0;
+ }
+
+ *[dir="rtl"] .multiselect__clear {
+ right: auto;
+ left: 12px;
+ }
+
+ *[dir="rtl"] .multiselect__spinner {
+ right: auto;
+ left: 1px;
+ }
+
+ @keyframes spinning {
+ from {
+ transform: rotate(0);
+ }
+
+ to {
+ transform: rotate(2turn);
+ }
+ }
diff --git a/dist/vue-multiselect.esm.js b/dist/vue-multiselect.esm.js
new file mode 100644
index 00000000..f8573f64
--- /dev/null
+++ b/dist/vue-multiselect.esm.js
@@ -0,0 +1,1349 @@
+import { openBlock, createBlock, withKeys, withModifiers, renderSlot, createVNode, withDirectives, Fragment, renderList, toDisplayString, vShow, createCommentVNode, Transition, withCtx, createTextVNode } from 'vue';
+
+function isEmpty (opt) {
+ if (opt === 0) return false
+ if (Array.isArray(opt) && opt.length === 0) return true
+ return !opt
+}
+
+function not (fun) {
+ return (...params) => !fun(...params)
+}
+
+function includes (str, query) {
+ /* istanbul ignore else */
+ if (str === undefined) str = 'undefined';
+ if (str === null) str = 'null';
+ if (str === false) str = 'false';
+ const text = str.toString().toLowerCase();
+ return text.indexOf(query.trim()) !== -1
+}
+
+function filterOptions (options, search, label, customLabel) {
+ return search ? options
+ .filter((option) => includes(customLabel(option, label), search))
+ .sort((a, b) => customLabel(a, label).length - customLabel(b, label).length) : options
+}
+
+function stripGroups (options) {
+ return options.filter((option) => !option.$isLabel)
+}
+
+function flattenOptions (values, label) {
+ return (options) =>
+ options.reduce((prev, curr) => {
+ /* istanbul ignore else */
+ if (curr[values] && curr[values].length) {
+ prev.push({
+ $groupLabel: curr[label],
+ $isLabel: true
+ });
+ return prev.concat(curr[values])
+ }
+ return prev
+ }, [])
+}
+
+function filterGroups (search, label, values, groupLabel, customLabel) {
+ return (groups) =>
+ groups.map((group) => {
+ /* istanbul ignore else */
+ if (!group[values]) {
+ console.warn(`Options passed to vue-multiselect do not contain groups, despite the config.`);
+ return []
+ }
+ const groupOptions = filterOptions(group[values], search, label, customLabel);
+
+ return groupOptions.length
+ ? {
+ [groupLabel]: group[groupLabel],
+ [values]: groupOptions
+ }
+ : []
+ })
+}
+
+const flow = (...fns) => (x) => fns.reduce((v, f) => f(v), x);
+
+var multiselectMixin = {
+ data () {
+ return {
+ search: '',
+ isOpen: false,
+ preferredOpenDirection: 'below',
+ optimizedHeight: this.maxHeight
+ }
+ },
+ props: {
+ /**
+ * Decide whether to filter the results based on search query.
+ * Useful for async filtering, where we search through more complex data.
+ * @type {Boolean}
+ */
+ internalSearch: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Array of available options: Objects, Strings or Integers.
+ * If array of objects, visible label will default to option.label.
+ * If `labal` prop is passed, label will equal option['label']
+ * @type {Array}
+ */
+ options: {
+ type: Array,
+ required: true
+ },
+ /**
+ * Equivalent to the `multiple` attribute on a `` input.
+ * @default false
+ * @type {Boolean}
+ */
+ multiple: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Key to compare objects
+ * @default 'id'
+ * @type {String}
+ */
+ trackBy: {
+ type: String
+ },
+ /**
+ * Label to look for in option Object
+ * @default 'label'
+ * @type {String}
+ */
+ label: {
+ type: String
+ },
+ /**
+ * Enable/disable search in options
+ * @default true
+ * @type {Boolean}
+ */
+ searchable: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Clear the search input after `)
+ * @default true
+ * @type {Boolean}
+ */
+ clearOnSelect: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Hide already selected options
+ * @default false
+ * @type {Boolean}
+ */
+ hideSelected: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Equivalent to the `placeholder` attribute on a `` input.
+ * @default 'Select option'
+ * @type {String}
+ */
+ placeholder: {
+ type: String,
+ default: 'Select option'
+ },
+ /**
+ * Allow to remove all selected values
+ * @default true
+ * @type {Boolean}
+ */
+ allowEmpty: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Reset this.internalValue, this.search after this.internalValue changes.
+ * Useful if want to create a stateless dropdown.
+ * @default false
+ * @type {Boolean}
+ */
+ resetAfter: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Enable/disable closing after selecting an option
+ * @default true
+ * @type {Boolean}
+ */
+ closeOnSelect: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Function to interpolate the custom label
+ * @default false
+ * @type {Function}
+ */
+ customLabel: {
+ type: Function,
+ default (option, label) {
+ if (isEmpty(option)) return ''
+ return label ? option[label] : option
+ }
+ },
+ /**
+ * Disable / Enable tagging
+ * @default false
+ * @type {Boolean}
+ */
+ taggable: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * String to show when highlighting a potential tag
+ * @default 'Press enter to create a tag'
+ * @type {String}
+ */
+ tagPlaceholder: {
+ type: String,
+ default: 'Press enter to create a tag'
+ },
+ /**
+ * By default new tags will appear above the search results.
+ * Changing to 'bottom' will revert this behaviour
+ * and will proritize the search results
+ * @default 'top'
+ * @type {String}
+ */
+ tagPosition: {
+ type: String,
+ default: 'top'
+ },
+ /**
+ * Number of allowed selected options. No limit if 0.
+ * @default 0
+ * @type {Number}
+ */
+ max: {
+ type: [Number, Boolean],
+ default: false
+ },
+ /**
+ * Will be passed with all events as second param.
+ * Useful for identifying events origin.
+ * @default null
+ * @type {String|Integer}
+ */
+ id: {
+ default: null
+ },
+ /**
+ * Limits the options displayed in the dropdown
+ * to the first X options.
+ * @default 1000
+ * @type {Integer}
+ */
+ optionsLimit: {
+ type: Number,
+ default: 1000
+ },
+ /**
+ * Name of the property containing
+ * the group values
+ * @default 1000
+ * @type {String}
+ */
+ groupValues: {
+ type: String
+ },
+ /**
+ * Name of the property containing
+ * the group label
+ * @default 1000
+ * @type {String}
+ */
+ groupLabel: {
+ type: String
+ },
+ /**
+ * Allow to select all group values
+ * by selecting the group label
+ * @default false
+ * @type {Boolean}
+ */
+ groupSelect: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Array of keyboard keys to block
+ * when selecting
+ * @default 1000
+ * @type {String}
+ */
+ blockKeys: {
+ type: Array,
+ default () {
+ return []
+ }
+ },
+ /**
+ * Prevent from wiping up the search value
+ * @default false
+ * @type {Boolean}
+ */
+ preserveSearch: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Select 1st options if value is empty
+ * @default false
+ * @type {Boolean}
+ */
+ preselectFirst: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Prevent autofocus
+ * @default false
+ * @type {Boolean}
+ */
+ preventAutofocus: {
+ type: Boolean,
+ default: false
+ }
+ },
+ mounted () {
+ /* istanbul ignore else */
+ if (!this.multiple && this.max) {
+ console.warn('[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false.');
+ }
+ if (
+ this.preselectFirst &&
+ !this.internalValue.length &&
+ this.options.length
+ ) {
+ this.select(this.filteredOptions[0]);
+ }
+ },
+ computed: {
+ internalValue () {
+ return this.modelValue || this.modelValue === 0
+ ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue]
+ : []
+ },
+ filteredOptions () {
+ const search = this.search || '';
+ const normalizedSearch = search.toLowerCase().trim();
+
+ let options = this.options.concat();
+
+ /* istanbul ignore else */
+ if (this.internalSearch) {
+ options = this.groupValues
+ ? this.filterAndFlat(options, normalizedSearch, this.label)
+ : filterOptions(options, normalizedSearch, this.label, this.customLabel);
+ } else {
+ options = this.groupValues ? flattenOptions(this.groupValues, this.groupLabel)(options) : options;
+ }
+
+ options = this.hideSelected
+ ? options.filter(not(this.isSelected))
+ : options;
+
+ /* istanbul ignore else */
+ if (this.taggable && normalizedSearch.length && !this.isExistingOption(normalizedSearch)) {
+ if (this.tagPosition === 'bottom') {
+ options.push({isTag: true, label: search});
+ } else {
+ options.unshift({isTag: true, label: search});
+ }
+ }
+
+ return options.slice(0, this.optionsLimit)
+ },
+ valueKeys () {
+ if (this.trackBy) {
+ return this.internalValue.map((element) => element[this.trackBy])
+ } else {
+ return this.internalValue
+ }
+ },
+ optionKeys () {
+ const options = this.groupValues ? this.flatAndStrip(this.options) : this.options;
+ return options.map((element) => this.customLabel(element, this.label).toString().toLowerCase())
+ },
+ currentOptionLabel () {
+ return this.multiple
+ ? this.searchable ? '' : this.placeholder
+ : this.internalValue.length
+ ? this.getOptionLabel(this.internalValue[0])
+ : this.searchable ? '' : this.placeholder
+ }
+ },
+ watch: {
+ internalValue: {
+ handler () {
+ /* istanbul ignore else */
+ if (this.resetAfter && this.internalValue.length) {
+ this.search = '';
+ this.$emit('update:modelValue', this.multiple ? [] : null);
+ }
+ },
+ deep: true
+ },
+ search () {
+ this.$emit('search-change', this.search);
+ }
+ },
+ emits: ['open', 'search-change', 'close', 'select', 'update:modelValue', 'remove', 'tag'],
+ methods: {
+ /**
+ * Returns the internalValue in a way it can be emited to the parent
+ * @returns {Object||Array||String||Integer}
+ */
+ getValue () {
+ return this.multiple
+ ? this.internalValue
+ : this.internalValue.length === 0
+ ? null
+ : this.internalValue[0]
+ },
+ /**
+ * Filters and then flattens the options list
+ * @param {Array}
+ * @return {Array} returns a filtered and flat options list
+ */
+ filterAndFlat (options, search, label) {
+ return flow(
+ filterGroups(search, label, this.groupValues, this.groupLabel, this.customLabel),
+ flattenOptions(this.groupValues, this.groupLabel)
+ )(options)
+ },
+ /**
+ * Flattens and then strips the group labels from the options list
+ * @param {Array}
+ * @return {Array} returns a flat options list without group labels
+ */
+ flatAndStrip (options) {
+ return flow(
+ flattenOptions(this.groupValues, this.groupLabel),
+ stripGroups
+ )(options)
+ },
+ /**
+ * Updates the search value
+ * @param {String}
+ */
+ updateSearch (query) {
+ this.search = query;
+ },
+ /**
+ * Finds out if the given query is already present
+ * in the available options
+ * @param {String}
+ * @return {Boolean} returns true if element is available
+ */
+ isExistingOption (query) {
+ return !this.options
+ ? false
+ : this.optionKeys.indexOf(query) > -1
+ },
+ /**
+ * Finds out if the given element is already present
+ * in the result value
+ * @param {Object||String||Integer} option passed element to check
+ * @returns {Boolean} returns true if element is selected
+ */
+ isSelected (option) {
+ const opt = this.trackBy
+ ? option[this.trackBy]
+ : option;
+ return this.valueKeys.indexOf(opt) > -1
+ },
+ /**
+ * Finds out if the given option is disabled
+ * @param {Object||String||Integer} option passed element to check
+ * @returns {Boolean} returns true if element is disabled
+ */
+ isOptionDisabled (option) {
+ return !!option.$isDisabled
+ },
+ /**
+ * Returns empty string when options is null/undefined
+ * Returns tag query if option is tag.
+ * Returns the customLabel() results and casts it to string.
+ *
+ * @param {Object||String||Integer} Passed option
+ * @returns {Object||String}
+ */
+ getOptionLabel (option) {
+ if (isEmpty(option)) return ''
+ /* istanbul ignore else */
+ if (option.isTag) return option.label
+ /* istanbul ignore else */
+ if (option.$isLabel) return option.$groupLabel
+
+ const label = this.customLabel(option, this.label);
+ /* istanbul ignore else */
+ if (isEmpty(label)) return ''
+ return label
+ },
+ /**
+ * Add the given option to the list of selected options
+ * or sets the option as the selected option.
+ * If option is already selected -> remove it from the results.
+ *
+ * @param {Object||String||Integer} option to select/deselect
+ * @param {Boolean} block removing
+ */
+ select (option, key) {
+ /* istanbul ignore else */
+ if (option.$isLabel && this.groupSelect) {
+ this.selectGroup(option);
+ return
+ }
+ if (this.blockKeys.indexOf(key) !== -1 ||
+ this.disabled ||
+ option.$isDisabled ||
+ option.$isLabel
+ ) return
+ /* istanbul ignore else */
+ if (this.max && this.multiple && this.internalValue.length === this.max) return
+ /* istanbul ignore else */
+ if (key === 'Tab' && !this.pointerDirty) return
+ if (option.isTag) {
+ this.$emit('tag', option.label, this.id);
+ this.search = '';
+ if (this.closeOnSelect && !this.multiple) this.deactivate();
+ } else {
+ const isSelected = this.isSelected(option);
+
+ if (isSelected) {
+ if (key !== 'Tab') this.removeElement(option);
+ return
+ }
+
+ if (this.multiple) {
+ this.$emit('update:modelValue', this.internalValue.concat([option]));
+ } else {
+ this.$emit('update:modelValue', option);
+ }
+
+ this.$emit('select', option, this.id);
+
+ /* istanbul ignore else */
+ if (this.clearOnSelect) this.search = '';
+ }
+ /* istanbul ignore else */
+ if (this.closeOnSelect) this.deactivate();
+ },
+ /**
+ * Add the given group options to the list of selected options
+ * If all group optiona are already selected -> remove it from the results.
+ *
+ * @param {Object||String||Integer} group to select/deselect
+ */
+ selectGroup (selectedGroup) {
+ const group = this.options.find((option) => {
+ return option[this.groupLabel] === selectedGroup.$groupLabel
+ });
+
+ if (!group) return
+
+ if (this.wholeGroupSelected(group)) {
+ this.$emit('remove', group[this.groupValues], this.id);
+
+ const groupValues = this.trackBy ? group[this.groupValues].map(val => val[this.trackBy]) : group[this.groupValues];
+ const newValue = this.internalValue.filter(
+ option => groupValues.indexOf(this.trackBy ? option[this.trackBy] : option) === -1
+ );
+
+ this.$emit('update:modelValue', newValue);
+ } else {
+ let optionsToAdd = group[this.groupValues].filter(
+ option => !(this.isOptionDisabled(option) || this.isSelected(option))
+ );
+
+ // if max is defined then just select options respecting max
+ if (this.max) {
+ optionsToAdd.splice(this.max - this.internalValue.length);
+ }
+
+ this.$emit('select', optionsToAdd, this.id);
+ this.$emit(
+ 'update:modelValue',
+ this.internalValue.concat(optionsToAdd)
+ );
+ }
+
+ if (this.closeOnSelect) this.deactivate();
+ },
+ /**
+ * Helper to identify if all values in a group are selected
+ *
+ * @param {Object} group to validated selected values against
+ */
+ wholeGroupSelected (group) {
+ return group[this.groupValues].every((option) => this.isSelected(option) || this.isOptionDisabled(option)
+ )
+ },
+ /**
+ * Helper to identify if all values in a group are disabled
+ *
+ * @param {Object} group to check for disabled values
+ */
+ wholeGroupDisabled (group) {
+ return group[this.groupValues].every(this.isOptionDisabled)
+ },
+ /**
+ * Removes the given option from the selected options.
+ * Additionally checks this.allowEmpty prop if option can be removed when
+ * it is the last selected option.
+ *
+ * @param {type} option description
+ * @return {type} description
+ */
+ removeElement (option, shouldClose = true) {
+ /* istanbul ignore else */
+ if (this.disabled) return
+ /* istanbul ignore else */
+ if (option.$isDisabled) return
+ /* istanbul ignore else */
+ if (!this.allowEmpty && this.internalValue.length <= 1) {
+ this.deactivate();
+ return
+ }
+
+ const index = typeof option === 'object'
+ ? this.valueKeys.indexOf(option[this.trackBy])
+ : this.valueKeys.indexOf(option);
+
+ if (this.multiple) {
+ const newValue = this.internalValue.slice(0, index).concat(this.internalValue.slice(index + 1));
+ this.$emit('update:modelValue', newValue);
+ } else {
+ this.$emit('update:modelValue', null);
+ }
+ this.$emit('remove', option, this.id);
+
+ /* istanbul ignore else */
+ if (this.closeOnSelect && shouldClose) this.deactivate();
+ },
+ /**
+ * Calls this.removeElement() with the last element
+ * from this.internalValue (selected element Array)
+ *
+ * @fires this#removeElement
+ */
+ removeLastElement () {
+ /* istanbul ignore else */
+ if (this.blockKeys.indexOf('Delete') !== -1) return
+ /* istanbul ignore else */
+ if (this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length) {
+ this.removeElement(this.internalValue[this.internalValue.length - 1], false);
+ }
+ },
+ /**
+ * Opens the multiselect’s dropdown.
+ * Sets this.isOpen to TRUE
+ */
+ activate () {
+ /* istanbul ignore else */
+ if (this.isOpen || this.disabled) return
+
+ this.adjustPosition();
+ /* istanbul ignore else */
+ if (this.groupValues && this.pointer === 0 && this.filteredOptions.length) {
+ this.pointer = 1;
+ }
+
+ this.isOpen = true;
+ /* istanbul ignore else */
+ if (this.searchable) {
+ if (!this.preserveSearch) this.search = '';
+ if (!this.preventAutofocus) this.$nextTick(() => this.$refs.search && this.$refs.search.focus());
+ } else if (!this.preventAutofocus) {
+ if (typeof this.$el !== 'undefined') this.$el.focus();
+ }
+ this.$emit('open', this.id);
+ },
+ /**
+ * Closes the multiselect’s dropdown.
+ * Sets this.isOpen to FALSE
+ */
+ deactivate () {
+ /* istanbul ignore else */
+ if (!this.isOpen) return
+
+ this.isOpen = false;
+ /* istanbul ignore else */
+ if (this.searchable) {
+ if (this.$refs.search !== null && typeof this.$refs.search !== 'undefined') this.$refs.search.blur();
+ } else {
+ if (typeof this.$el !== 'undefined') this.$el.blur();
+ }
+ if (!this.preserveSearch) this.search = '';
+ this.$emit('close', this.getValue(), this.id);
+ },
+ /**
+ * Call this.activate() or this.deactivate()
+ * depending on this.isOpen value.
+ *
+ * @fires this#activate || this#deactivate
+ * @property {Boolean} isOpen indicates if dropdown is open
+ */
+ toggle () {
+ this.isOpen
+ ? this.deactivate()
+ : this.activate();
+ },
+ /**
+ * Updates the hasEnoughSpace variable used for
+ * detecting where to expand the dropdown
+ */
+ adjustPosition () {
+ if (typeof window === 'undefined') return
+
+ const spaceAbove = this.$el.getBoundingClientRect().top;
+ const spaceBelow = window.innerHeight - this.$el.getBoundingClientRect().bottom;
+ const hasEnoughSpaceBelow = spaceBelow > this.maxHeight;
+
+ if (hasEnoughSpaceBelow || spaceBelow > spaceAbove || this.openDirection === 'below' || this.openDirection === 'bottom') {
+ this.preferredOpenDirection = 'below';
+ this.optimizedHeight = Math.min(spaceBelow - 40, this.maxHeight);
+ } else {
+ this.preferredOpenDirection = 'above';
+ this.optimizedHeight = Math.min(spaceAbove - 40, this.maxHeight);
+ }
+ }
+ }
+};
+
+var pointerMixin = {
+ data () {
+ return {
+ pointer: 0,
+ pointerDirty: false
+ }
+ },
+ props: {
+ /**
+ * Enable/disable highlighting of the pointed value.
+ * @type {Boolean}
+ * @default true
+ */
+ showPointer: {
+ type: Boolean,
+ default: true
+ },
+ optionHeight: {
+ type: Number,
+ default: 40
+ }
+ },
+ computed: {
+ pointerPosition () {
+ return this.pointer * this.optionHeight
+ },
+ visibleElements () {
+ return this.optimizedHeight / this.optionHeight
+ }
+ },
+ watch: {
+ filteredOptions () {
+ this.pointerAdjust();
+ },
+ isOpen () {
+ this.pointerDirty = false;
+ },
+ pointer () {
+ this.$refs.search && this.$refs.search.setAttribute('aria-activedescendant', this.id + '-' + this.pointer.toString());
+ }
+ },
+ methods: {
+ optionHighlight (index, option) {
+ return {
+ 'multiselect__option--highlight': index === this.pointer && this.showPointer,
+ 'multiselect__option--selected': this.isSelected(option)
+ }
+ },
+ groupHighlight (index, selectedGroup) {
+ if (!this.groupSelect) {
+ return [
+ 'multiselect__option--disabled',
+ {'multiselect__option--group': selectedGroup.$isLabel}
+ ]
+ }
+
+ const group = this.options.find((option) => {
+ return option[this.groupLabel] === selectedGroup.$groupLabel
+ });
+
+ return group && !this.wholeGroupDisabled(group) ? [
+ 'multiselect__option--group',
+ {'multiselect__option--highlight': index === this.pointer && this.showPointer},
+ {'multiselect__option--group-selected': this.wholeGroupSelected(group)}
+ ] : 'multiselect__option--disabled'
+ },
+ addPointerElement ({key} = 'Enter') {
+ /* istanbul ignore else */
+ if (this.filteredOptions.length > 0) {
+ this.select(this.filteredOptions[this.pointer], key);
+ }
+ this.pointerReset();
+ },
+ pointerForward () {
+ /* istanbul ignore else */
+ if (this.pointer < this.filteredOptions.length - 1) {
+ this.pointer++;
+ /* istanbul ignore next */
+ if (this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight) {
+ this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight;
+ }
+ /* istanbul ignore else */
+ if (
+ this.filteredOptions[this.pointer] &&
+ this.filteredOptions[this.pointer].$isLabel &&
+ !this.groupSelect
+ ) this.pointerForward();
+ }
+ this.pointerDirty = true;
+ },
+ pointerBackward () {
+ if (this.pointer > 0) {
+ this.pointer--;
+ /* istanbul ignore else */
+ if (this.$refs.list.scrollTop >= this.pointerPosition) {
+ this.$refs.list.scrollTop = this.pointerPosition;
+ }
+ /* istanbul ignore else */
+ if (
+ this.filteredOptions[this.pointer] &&
+ this.filteredOptions[this.pointer].$isLabel &&
+ !this.groupSelect
+ ) this.pointerBackward();
+ } else {
+ /* istanbul ignore else */
+ if (
+ this.filteredOptions[this.pointer] &&
+ this.filteredOptions[0].$isLabel &&
+ !this.groupSelect
+ ) this.pointerForward();
+ }
+ this.pointerDirty = true;
+ },
+ pointerReset () {
+ /* istanbul ignore else */
+ if (!this.closeOnSelect) return
+ this.pointer = 0;
+ /* istanbul ignore else */
+ if (this.$refs.list) {
+ this.$refs.list.scrollTop = 0;
+ }
+ },
+ pointerAdjust () {
+ /* istanbul ignore else */
+ if (this.pointer >= this.filteredOptions.length - 1) {
+ this.pointer = this.filteredOptions.length
+ ? this.filteredOptions.length - 1
+ : 0;
+ }
+
+ if (this.filteredOptions.length > 0 &&
+ this.filteredOptions[this.pointer].$isLabel &&
+ !this.groupSelect
+ ) {
+ this.pointerForward();
+ }
+ },
+ pointerSet (index) {
+ this.pointer = index;
+ this.pointerDirty = true;
+ }
+ }
+};
+
+var script = {
+ name: 'vue-multiselect',
+ mixins: [multiselectMixin, pointerMixin],
+ compatConfig: {
+ MODE: 3,
+ ATTR_ENUMERATED_COERCION: false
+ },
+ props: {
+ /**
+ * name attribute to match optional label element
+ * @default ''
+ * @type {String}
+ */
+ name: {
+ type: String,
+ default: ''
+ },
+ /**
+ * Presets the selected options value.
+ * @type {Object||Array||String||Integer}
+ */
+ modelValue: {
+ type: null,
+ default () {
+ return []
+ }
+ },
+ /**
+ * String to show when pointing to an option
+ * @default 'Press enter to select'
+ * @type {String}
+ */
+ selectLabel: {
+ type: String,
+ default: 'Press enter to select'
+ },
+ /**
+ * String to show when pointing to an option
+ * @default 'Press enter to select'
+ * @type {String}
+ */
+ selectGroupLabel: {
+ type: String,
+ default: 'Press enter to select group'
+ },
+ /**
+ * String to show next to selected option
+ * @default 'Selected'
+ * @type {String}
+ */
+ selectedLabel: {
+ type: String,
+ default: 'Selected'
+ },
+ /**
+ * String to show when pointing to an already selected option
+ * @default 'Press enter to remove'
+ * @type {String}
+ */
+ deselectLabel: {
+ type: String,
+ default: 'Press enter to remove'
+ },
+ /**
+ * String to show when pointing to an already selected option
+ * @default 'Press enter to remove'
+ * @type {String}
+ */
+ deselectGroupLabel: {
+ type: String,
+ default: 'Press enter to deselect group'
+ },
+ /**
+ * Decide whether to show pointer labels
+ * @default true
+ * @type {Boolean}
+ */
+ showLabels: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Limit the display of selected options. The rest will be hidden within the limitText string.
+ * @default 99999
+ * @type {Integer}
+ */
+ limit: {
+ type: Number,
+ default: 99999
+ },
+ /**
+ * Sets maxHeight style value of the dropdown
+ * @default 300
+ * @type {Integer}
+ */
+ maxHeight: {
+ type: Number,
+ default: 300
+ },
+ /**
+ * Function that process the message shown when selected
+ * elements pass the defined limit.
+ * @default 'and * more'
+ * @param {Int} count Number of elements more than limit
+ * @type {Function}
+ */
+ limitText: {
+ type: Function,
+ default: (count) => `and ${count} more`
+ },
+ /**
+ * Set true to trigger the loading spinner.
+ * @default False
+ * @type {Boolean}
+ */
+ loading: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Disables the multiselect if true.
+ * @default false
+ * @type {Boolean}
+ */
+ disabled: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Fixed opening direction
+ * @default ''
+ * @type {String}
+ */
+ openDirection: {
+ type: String,
+ default: ''
+ },
+ /**
+ * Shows slot with message about empty options
+ * @default true
+ * @type {Boolean}
+ */
+ showNoOptions: {
+ type: Boolean,
+ default: true
+ },
+ showNoResults: {
+ type: Boolean,
+ default: true
+ },
+ tabindex: {
+ type: Number,
+ default: 0
+ }
+ },
+ computed: {
+ hasOptionGroup () {
+ return this.groupValues && this.groupLabel && this.groupSelect
+ },
+ isSingleLabelVisible () {
+ return (
+ (this.singleValue || this.singleValue === 0) &&
+ (!this.isOpen || !this.searchable) &&
+ !this.visibleValues.length
+ )
+ },
+ isPlaceholderVisible () {
+ return !this.internalValue.length && (!this.searchable || !this.isOpen)
+ },
+ visibleValues () {
+ return this.multiple ? this.internalValue.slice(0, this.limit) : []
+ },
+ singleValue () {
+ return this.internalValue[0]
+ },
+ deselectLabelText () {
+ return this.showLabels ? this.deselectLabel : ''
+ },
+ deselectGroupLabelText () {
+ return this.showLabels ? this.deselectGroupLabel : ''
+ },
+ selectLabelText () {
+ return this.showLabels ? this.selectLabel : ''
+ },
+ selectGroupLabelText () {
+ return this.showLabels ? this.selectGroupLabel : ''
+ },
+ selectedLabelText () {
+ return this.showLabels ? this.selectedLabel : ''
+ },
+ inputStyle () {
+ if (
+ this.searchable ||
+ (this.multiple && this.modelValue && this.modelValue.length)
+ ) {
+ // Hide input by setting the width to 0 allowing it to receive focus
+ return this.isOpen
+ ? {width: '100%'}
+ : {width: '0', position: 'absolute', padding: '0'}
+ }
+ return ''
+ },
+ contentStyle () {
+ return this.options.length
+ ? {display: 'inline-block'}
+ : {display: 'block'}
+ },
+ isAbove () {
+ if (this.openDirection === 'above' || this.openDirection === 'top') {
+ return true
+ } else if (
+ this.openDirection === 'below' ||
+ this.openDirection === 'bottom'
+ ) {
+ return false
+ } else {
+ return this.preferredOpenDirection === 'above'
+ }
+ },
+ showSearchInput () {
+ return (
+ this.searchable &&
+ (this.hasSingleSelectedSlot &&
+ (this.visibleSingleValue || this.visibleSingleValue === 0)
+ ? this.isOpen
+ : true)
+ )
+ }
+ }
+};
+
+const _hoisted_1 = {
+ ref: "tags",
+ class: "multiselect__tags"
+};
+const _hoisted_2 = { class: "multiselect__tags-wrap" };
+const _hoisted_3 = { class: "multiselect__spinner" };
+const _hoisted_4 = { key: 0 };
+const _hoisted_5 = { class: "multiselect__option" };
+const _hoisted_6 = { class: "multiselect__option" };
+const _hoisted_7 = /*#__PURE__*/createTextVNode("No elements found. Consider changing the search query.");
+const _hoisted_8 = { class: "multiselect__option" };
+const _hoisted_9 = /*#__PURE__*/createTextVNode("List is empty.");
+
+function render(_ctx, _cache, $props, $setup, $data, $options) {
+ return (openBlock(), createBlock("div", {
+ tabindex: _ctx.searchable ? -1 : $props.tabindex,
+ class: [{ 'multiselect--active': _ctx.isOpen, 'multiselect--disabled': $props.disabled, 'multiselect--above': $options.isAbove, 'multiselect--has-options-group': $options.hasOptionGroup }, "multiselect"],
+ onFocus: _cache[14] || (_cache[14] = $event => (_ctx.activate())),
+ onBlur: _cache[15] || (_cache[15] = $event => (_ctx.searchable ? false : _ctx.deactivate())),
+ onKeydown: [
+ _cache[16] || (_cache[16] = withKeys(withModifiers($event => (_ctx.pointerForward()), ["self","prevent"]), ["down"])),
+ _cache[17] || (_cache[17] = withKeys(withModifiers($event => (_ctx.pointerBackward()), ["self","prevent"]), ["up"]))
+ ],
+ onKeypress: _cache[18] || (_cache[18] = withKeys(withModifiers($event => (_ctx.addPointerElement($event)), ["stop","self"]), ["enter","tab"])),
+ onKeyup: _cache[19] || (_cache[19] = withKeys($event => (_ctx.deactivate()), ["esc"])),
+ role: "combobox",
+ "aria-owns": 'listbox-'+_ctx.id
+ }, [
+ renderSlot(_ctx.$slots, "caret", { toggle: _ctx.toggle }, () => [
+ createVNode("div", {
+ onMousedown: _cache[1] || (_cache[1] = withModifiers($event => (_ctx.toggle()), ["prevent","stop"])),
+ class: "multiselect__select"
+ }, null, 32 /* HYDRATE_EVENTS */)
+ ]),
+ renderSlot(_ctx.$slots, "clear", { search: _ctx.search }),
+ createVNode("div", _hoisted_1, [
+ renderSlot(_ctx.$slots, "selection", {
+ search: _ctx.search,
+ remove: _ctx.removeElement,
+ values: $options.visibleValues,
+ isOpen: _ctx.isOpen
+ }, () => [
+ withDirectives(createVNode("div", _hoisted_2, [
+ (openBlock(true), createBlock(Fragment, null, renderList($options.visibleValues, (option, index) => {
+ return renderSlot(_ctx.$slots, "tag", {
+ option: option,
+ search: _ctx.search,
+ remove: _ctx.removeElement
+ }, () => [
+ (openBlock(), createBlock("span", {
+ class: "multiselect__tag",
+ key: index
+ }, [
+ createVNode("span", {
+ textContent: toDisplayString(_ctx.getOptionLabel(option))
+ }, null, 8 /* PROPS */, ["textContent"]),
+ createVNode("i", {
+ tabindex: "1",
+ onKeypress: withKeys(withModifiers($event => (_ctx.removeElement(option)), ["prevent"]), ["enter"]),
+ onMousedown: withModifiers($event => (_ctx.removeElement(option)), ["prevent"]),
+ class: "multiselect__tag-icon"
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, ["onKeypress", "onMousedown"])
+ ]))
+ ])
+ }), 256 /* UNKEYED_FRAGMENT */))
+ ], 512 /* NEED_PATCH */), [
+ [vShow, $options.visibleValues.length > 0]
+ ]),
+ (_ctx.internalValue && _ctx.internalValue.length > $props.limit)
+ ? renderSlot(_ctx.$slots, "limit", { key: 0 }, () => [
+ createVNode("strong", {
+ class: "multiselect__strong",
+ textContent: toDisplayString($props.limitText(_ctx.internalValue.length - $props.limit))
+ }, null, 8 /* PROPS */, ["textContent"])
+ ])
+ : createCommentVNode("v-if", true)
+ ]),
+ createVNode(Transition, { name: "multiselect__loading" }, {
+ default: withCtx(() => [
+ renderSlot(_ctx.$slots, "loading", {}, () => [
+ withDirectives(createVNode("div", _hoisted_3, null, 512 /* NEED_PATCH */), [
+ [vShow, $props.loading]
+ ])
+ ])
+ ]),
+ _: 3 /* FORWARDED */
+ }),
+ (_ctx.searchable)
+ ? (openBlock(), createBlock("input", {
+ key: 0,
+ ref: "search",
+ name: $props.name,
+ id: _ctx.id,
+ type: "text",
+ autocomplete: "off",
+ spellcheck: false,
+ placeholder: _ctx.placeholder,
+ style: $options.inputStyle,
+ value: _ctx.search,
+ disabled: $props.disabled,
+ tabindex: $props.tabindex,
+ onInput: _cache[2] || (_cache[2] = $event => (_ctx.updateSearch($event.target.value))),
+ onFocus: _cache[3] || (_cache[3] = withModifiers($event => (_ctx.activate()), ["prevent"])),
+ onBlur: _cache[4] || (_cache[4] = withModifiers($event => (_ctx.deactivate()), ["prevent"])),
+ onKeyup: _cache[5] || (_cache[5] = withKeys($event => (_ctx.deactivate()), ["esc"])),
+ onKeydown: [
+ _cache[6] || (_cache[6] = withKeys(withModifiers($event => (_ctx.pointerForward()), ["prevent"]), ["down"])),
+ _cache[7] || (_cache[7] = withKeys(withModifiers($event => (_ctx.pointerBackward()), ["prevent"]), ["up"])),
+ _cache[9] || (_cache[9] = withKeys(withModifiers($event => (_ctx.removeLastElement()), ["stop"]), ["delete"]))
+ ],
+ onKeypress: _cache[8] || (_cache[8] = withKeys(withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
+ class: "multiselect__input",
+ "aria-controls": 'listbox-'+_ctx.id
+ }, null, 44 /* STYLE, PROPS, HYDRATE_EVENTS */, ["name", "id", "placeholder", "value", "disabled", "tabindex", "aria-controls"]))
+ : createCommentVNode("v-if", true),
+ ($options.isSingleLabelVisible)
+ ? (openBlock(), createBlock("span", {
+ key: 1,
+ class: "multiselect__single",
+ onMousedown: _cache[10] || (_cache[10] = withModifiers((...args) => (_ctx.toggle && _ctx.toggle(...args)), ["prevent"]))
+ }, [
+ renderSlot(_ctx.$slots, "singleLabel", { option: $options.singleValue }, () => [
+ createTextVNode(toDisplayString(_ctx.currentOptionLabel), 1 /* TEXT */)
+ ])
+ ], 32 /* HYDRATE_EVENTS */))
+ : createCommentVNode("v-if", true),
+ ($options.isPlaceholderVisible)
+ ? (openBlock(), createBlock("span", {
+ key: 2,
+ class: "multiselect__placeholder",
+ onMousedown: _cache[11] || (_cache[11] = withModifiers((...args) => (_ctx.toggle && _ctx.toggle(...args)), ["prevent"]))
+ }, [
+ renderSlot(_ctx.$slots, "placeholder", {}, () => [
+ createTextVNode(toDisplayString(_ctx.placeholder), 1 /* TEXT */)
+ ])
+ ], 32 /* HYDRATE_EVENTS */))
+ : createCommentVNode("v-if", true)
+ ], 512 /* NEED_PATCH */),
+ createVNode(Transition, { name: "multiselect" }, {
+ default: withCtx(() => [
+ withDirectives(createVNode("div", {
+ class: "multiselect__content-wrapper",
+ onFocus: _cache[12] || (_cache[12] = (...args) => (_ctx.activate && _ctx.activate(...args))),
+ tabindex: "-1",
+ onMousedown: _cache[13] || (_cache[13] = withModifiers(() => {}, ["prevent"])),
+ style: { maxHeight: _ctx.optimizedHeight + 'px' },
+ ref: "list"
+ }, [
+ createVNode("ul", {
+ class: "multiselect__content",
+ style: $options.contentStyle,
+ role: "listbox",
+ id: 'listbox-'+_ctx.id
+ }, [
+ renderSlot(_ctx.$slots, "beforeList"),
+ (_ctx.multiple && _ctx.max === _ctx.internalValue.length)
+ ? (openBlock(), createBlock("li", _hoisted_4, [
+ createVNode("span", _hoisted_5, [
+ renderSlot(_ctx.$slots, "maxElements", {}, () => [
+ createTextVNode("Maximum of " + toDisplayString(_ctx.max) + " options selected. First remove a selected option to select another.", 1 /* TEXT */)
+ ])
+ ])
+ ]))
+ : createCommentVNode("v-if", true),
+ (!_ctx.max || _ctx.internalValue.length < _ctx.max)
+ ? (openBlock(true), createBlock(Fragment, { key: 1 }, renderList(_ctx.filteredOptions, (option, index) => {
+ return (openBlock(), createBlock("li", {
+ class: "multiselect__element",
+ key: index,
+ id: _ctx.id + '-' + index,
+ role: !(option && (option.$isLabel || option.$isDisabled)) ? 'option' : null
+ }, [
+ (!(option && (option.$isLabel || option.$isDisabled)))
+ ? (openBlock(), createBlock("span", {
+ key: 0,
+ class: [_ctx.optionHighlight(index, option), "multiselect__option"],
+ onClick: withModifiers($event => (_ctx.select(option)), ["stop"]),
+ onMouseenter: withModifiers($event => (_ctx.pointerSet(index)), ["self"]),
+ "data-select": option && option.isTag ? _ctx.tagPlaceholder : $options.selectLabelText,
+ "data-selected": $options.selectedLabelText,
+ "data-deselect": $options.deselectLabelText
+ }, [
+ renderSlot(_ctx.$slots, "option", {
+ option: option,
+ search: _ctx.search,
+ index: index
+ }, () => [
+ createVNode("span", null, toDisplayString(_ctx.getOptionLabel(option)), 1 /* TEXT */)
+ ])
+ ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"]))
+ : createCommentVNode("v-if", true),
+ (option && (option.$isLabel || option.$isDisabled))
+ ? (openBlock(), createBlock("span", {
+ key: 1,
+ "data-select": _ctx.groupSelect && $options.selectGroupLabelText,
+ "data-deselect": _ctx.groupSelect && $options.deselectGroupLabelText,
+ class: [_ctx.groupHighlight(index, option), "multiselect__option"],
+ onMouseenter: withModifiers($event => (_ctx.groupSelect && _ctx.pointerSet(index)), ["self"]),
+ onMousedown: withModifiers($event => (_ctx.selectGroup(option)), ["prevent"])
+ }, [
+ renderSlot(_ctx.$slots, "option", {
+ option: option,
+ search: _ctx.search,
+ index: index
+ }, () => [
+ createVNode("span", null, toDisplayString(_ctx.getOptionLabel(option)), 1 /* TEXT */)
+ ])
+ ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, ["data-select", "data-deselect", "onMouseenter", "onMousedown"]))
+ : createCommentVNode("v-if", true)
+ ], 8 /* PROPS */, ["id", "role"]))
+ }), 128 /* KEYED_FRAGMENT */))
+ : createCommentVNode("v-if", true),
+ withDirectives(createVNode("li", null, [
+ createVNode("span", _hoisted_6, [
+ renderSlot(_ctx.$slots, "noResult", { search: _ctx.search }, () => [
+ _hoisted_7
+ ])
+ ])
+ ], 512 /* NEED_PATCH */), [
+ [vShow, $props.showNoResults && (_ctx.filteredOptions.length === 0 && _ctx.search && !$props.loading)]
+ ]),
+ withDirectives(createVNode("li", null, [
+ createVNode("span", _hoisted_8, [
+ renderSlot(_ctx.$slots, "noOptions", {}, () => [
+ _hoisted_9
+ ])
+ ])
+ ], 512 /* NEED_PATCH */), [
+ [vShow, $props.showNoOptions && ((_ctx.options.length === 0 || ($options.hasOptionGroup === true && _ctx.filteredOptions.length === 0)) && !_ctx.search && !$props.loading)]
+ ]),
+ renderSlot(_ctx.$slots, "afterList")
+ ], 12 /* STYLE, PROPS */, ["id"])
+ ], 36 /* STYLE, HYDRATE_EVENTS */), [
+ [vShow, _ctx.isOpen]
+ ])
+ ]),
+ _: 3 /* FORWARDED */
+ })
+ ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, ["tabindex", "aria-owns"]))
+}
+
+script.render = render;
+
+export default script;
+export { script as Multiselect, multiselectMixin, pointerMixin };
diff --git a/dist/vue-multiselect.js b/dist/vue-multiselect.js
new file mode 100644
index 00000000..0f276d97
--- /dev/null
+++ b/dist/vue-multiselect.js
@@ -0,0 +1,1358 @@
+var VueMultiselect = (function (exports, vue) {
+ 'use strict';
+
+ function isEmpty (opt) {
+ if (opt === 0) return false
+ if (Array.isArray(opt) && opt.length === 0) return true
+ return !opt
+ }
+
+ function not (fun) {
+ return (...params) => !fun(...params)
+ }
+
+ function includes (str, query) {
+ /* istanbul ignore else */
+ if (str === undefined) str = 'undefined';
+ if (str === null) str = 'null';
+ if (str === false) str = 'false';
+ const text = str.toString().toLowerCase();
+ return text.indexOf(query.trim()) !== -1
+ }
+
+ function filterOptions (options, search, label, customLabel) {
+ return search ? options
+ .filter((option) => includes(customLabel(option, label), search))
+ .sort((a, b) => customLabel(a, label).length - customLabel(b, label).length) : options
+ }
+
+ function stripGroups (options) {
+ return options.filter((option) => !option.$isLabel)
+ }
+
+ function flattenOptions (values, label) {
+ return (options) =>
+ options.reduce((prev, curr) => {
+ /* istanbul ignore else */
+ if (curr[values] && curr[values].length) {
+ prev.push({
+ $groupLabel: curr[label],
+ $isLabel: true
+ });
+ return prev.concat(curr[values])
+ }
+ return prev
+ }, [])
+ }
+
+ function filterGroups (search, label, values, groupLabel, customLabel) {
+ return (groups) =>
+ groups.map((group) => {
+ /* istanbul ignore else */
+ if (!group[values]) {
+ console.warn(`Options passed to vue-multiselect do not contain groups, despite the config.`);
+ return []
+ }
+ const groupOptions = filterOptions(group[values], search, label, customLabel);
+
+ return groupOptions.length
+ ? {
+ [groupLabel]: group[groupLabel],
+ [values]: groupOptions
+ }
+ : []
+ })
+ }
+
+ const flow = (...fns) => (x) => fns.reduce((v, f) => f(v), x);
+
+ var multiselectMixin = {
+ data () {
+ return {
+ search: '',
+ isOpen: false,
+ preferredOpenDirection: 'below',
+ optimizedHeight: this.maxHeight
+ }
+ },
+ props: {
+ /**
+ * Decide whether to filter the results based on search query.
+ * Useful for async filtering, where we search through more complex data.
+ * @type {Boolean}
+ */
+ internalSearch: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Array of available options: Objects, Strings or Integers.
+ * If array of objects, visible label will default to option.label.
+ * If `labal` prop is passed, label will equal option['label']
+ * @type {Array}
+ */
+ options: {
+ type: Array,
+ required: true
+ },
+ /**
+ * Equivalent to the `multiple` attribute on a `` input.
+ * @default false
+ * @type {Boolean}
+ */
+ multiple: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Key to compare objects
+ * @default 'id'
+ * @type {String}
+ */
+ trackBy: {
+ type: String
+ },
+ /**
+ * Label to look for in option Object
+ * @default 'label'
+ * @type {String}
+ */
+ label: {
+ type: String
+ },
+ /**
+ * Enable/disable search in options
+ * @default true
+ * @type {Boolean}
+ */
+ searchable: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Clear the search input after `)
+ * @default true
+ * @type {Boolean}
+ */
+ clearOnSelect: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Hide already selected options
+ * @default false
+ * @type {Boolean}
+ */
+ hideSelected: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Equivalent to the `placeholder` attribute on a `` input.
+ * @default 'Select option'
+ * @type {String}
+ */
+ placeholder: {
+ type: String,
+ default: 'Select option'
+ },
+ /**
+ * Allow to remove all selected values
+ * @default true
+ * @type {Boolean}
+ */
+ allowEmpty: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Reset this.internalValue, this.search after this.internalValue changes.
+ * Useful if want to create a stateless dropdown.
+ * @default false
+ * @type {Boolean}
+ */
+ resetAfter: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Enable/disable closing after selecting an option
+ * @default true
+ * @type {Boolean}
+ */
+ closeOnSelect: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Function to interpolate the custom label
+ * @default false
+ * @type {Function}
+ */
+ customLabel: {
+ type: Function,
+ default (option, label) {
+ if (isEmpty(option)) return ''
+ return label ? option[label] : option
+ }
+ },
+ /**
+ * Disable / Enable tagging
+ * @default false
+ * @type {Boolean}
+ */
+ taggable: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * String to show when highlighting a potential tag
+ * @default 'Press enter to create a tag'
+ * @type {String}
+ */
+ tagPlaceholder: {
+ type: String,
+ default: 'Press enter to create a tag'
+ },
+ /**
+ * By default new tags will appear above the search results.
+ * Changing to 'bottom' will revert this behaviour
+ * and will proritize the search results
+ * @default 'top'
+ * @type {String}
+ */
+ tagPosition: {
+ type: String,
+ default: 'top'
+ },
+ /**
+ * Number of allowed selected options. No limit if 0.
+ * @default 0
+ * @type {Number}
+ */
+ max: {
+ type: [Number, Boolean],
+ default: false
+ },
+ /**
+ * Will be passed with all events as second param.
+ * Useful for identifying events origin.
+ * @default null
+ * @type {String|Integer}
+ */
+ id: {
+ default: null
+ },
+ /**
+ * Limits the options displayed in the dropdown
+ * to the first X options.
+ * @default 1000
+ * @type {Integer}
+ */
+ optionsLimit: {
+ type: Number,
+ default: 1000
+ },
+ /**
+ * Name of the property containing
+ * the group values
+ * @default 1000
+ * @type {String}
+ */
+ groupValues: {
+ type: String
+ },
+ /**
+ * Name of the property containing
+ * the group label
+ * @default 1000
+ * @type {String}
+ */
+ groupLabel: {
+ type: String
+ },
+ /**
+ * Allow to select all group values
+ * by selecting the group label
+ * @default false
+ * @type {Boolean}
+ */
+ groupSelect: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Array of keyboard keys to block
+ * when selecting
+ * @default 1000
+ * @type {String}
+ */
+ blockKeys: {
+ type: Array,
+ default () {
+ return []
+ }
+ },
+ /**
+ * Prevent from wiping up the search value
+ * @default false
+ * @type {Boolean}
+ */
+ preserveSearch: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Select 1st options if value is empty
+ * @default false
+ * @type {Boolean}
+ */
+ preselectFirst: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Prevent autofocus
+ * @default false
+ * @type {Boolean}
+ */
+ preventAutofocus: {
+ type: Boolean,
+ default: false
+ }
+ },
+ mounted () {
+ /* istanbul ignore else */
+ if (!this.multiple && this.max) {
+ console.warn('[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false.');
+ }
+ if (
+ this.preselectFirst &&
+ !this.internalValue.length &&
+ this.options.length
+ ) {
+ this.select(this.filteredOptions[0]);
+ }
+ },
+ computed: {
+ internalValue () {
+ return this.modelValue || this.modelValue === 0
+ ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue]
+ : []
+ },
+ filteredOptions () {
+ const search = this.search || '';
+ const normalizedSearch = search.toLowerCase().trim();
+
+ let options = this.options.concat();
+
+ /* istanbul ignore else */
+ if (this.internalSearch) {
+ options = this.groupValues
+ ? this.filterAndFlat(options, normalizedSearch, this.label)
+ : filterOptions(options, normalizedSearch, this.label, this.customLabel);
+ } else {
+ options = this.groupValues ? flattenOptions(this.groupValues, this.groupLabel)(options) : options;
+ }
+
+ options = this.hideSelected
+ ? options.filter(not(this.isSelected))
+ : options;
+
+ /* istanbul ignore else */
+ if (this.taggable && normalizedSearch.length && !this.isExistingOption(normalizedSearch)) {
+ if (this.tagPosition === 'bottom') {
+ options.push({isTag: true, label: search});
+ } else {
+ options.unshift({isTag: true, label: search});
+ }
+ }
+
+ return options.slice(0, this.optionsLimit)
+ },
+ valueKeys () {
+ if (this.trackBy) {
+ return this.internalValue.map((element) => element[this.trackBy])
+ } else {
+ return this.internalValue
+ }
+ },
+ optionKeys () {
+ const options = this.groupValues ? this.flatAndStrip(this.options) : this.options;
+ return options.map((element) => this.customLabel(element, this.label).toString().toLowerCase())
+ },
+ currentOptionLabel () {
+ return this.multiple
+ ? this.searchable ? '' : this.placeholder
+ : this.internalValue.length
+ ? this.getOptionLabel(this.internalValue[0])
+ : this.searchable ? '' : this.placeholder
+ }
+ },
+ watch: {
+ internalValue: {
+ handler () {
+ /* istanbul ignore else */
+ if (this.resetAfter && this.internalValue.length) {
+ this.search = '';
+ this.$emit('update:modelValue', this.multiple ? [] : null);
+ }
+ },
+ deep: true
+ },
+ search () {
+ this.$emit('search-change', this.search);
+ }
+ },
+ emits: ['open', 'search-change', 'close', 'select', 'update:modelValue', 'remove', 'tag'],
+ methods: {
+ /**
+ * Returns the internalValue in a way it can be emited to the parent
+ * @returns {Object||Array||String||Integer}
+ */
+ getValue () {
+ return this.multiple
+ ? this.internalValue
+ : this.internalValue.length === 0
+ ? null
+ : this.internalValue[0]
+ },
+ /**
+ * Filters and then flattens the options list
+ * @param {Array}
+ * @return {Array} returns a filtered and flat options list
+ */
+ filterAndFlat (options, search, label) {
+ return flow(
+ filterGroups(search, label, this.groupValues, this.groupLabel, this.customLabel),
+ flattenOptions(this.groupValues, this.groupLabel)
+ )(options)
+ },
+ /**
+ * Flattens and then strips the group labels from the options list
+ * @param {Array}
+ * @return {Array} returns a flat options list without group labels
+ */
+ flatAndStrip (options) {
+ return flow(
+ flattenOptions(this.groupValues, this.groupLabel),
+ stripGroups
+ )(options)
+ },
+ /**
+ * Updates the search value
+ * @param {String}
+ */
+ updateSearch (query) {
+ this.search = query;
+ },
+ /**
+ * Finds out if the given query is already present
+ * in the available options
+ * @param {String}
+ * @return {Boolean} returns true if element is available
+ */
+ isExistingOption (query) {
+ return !this.options
+ ? false
+ : this.optionKeys.indexOf(query) > -1
+ },
+ /**
+ * Finds out if the given element is already present
+ * in the result value
+ * @param {Object||String||Integer} option passed element to check
+ * @returns {Boolean} returns true if element is selected
+ */
+ isSelected (option) {
+ const opt = this.trackBy
+ ? option[this.trackBy]
+ : option;
+ return this.valueKeys.indexOf(opt) > -1
+ },
+ /**
+ * Finds out if the given option is disabled
+ * @param {Object||String||Integer} option passed element to check
+ * @returns {Boolean} returns true if element is disabled
+ */
+ isOptionDisabled (option) {
+ return !!option.$isDisabled
+ },
+ /**
+ * Returns empty string when options is null/undefined
+ * Returns tag query if option is tag.
+ * Returns the customLabel() results and casts it to string.
+ *
+ * @param {Object||String||Integer} Passed option
+ * @returns {Object||String}
+ */
+ getOptionLabel (option) {
+ if (isEmpty(option)) return ''
+ /* istanbul ignore else */
+ if (option.isTag) return option.label
+ /* istanbul ignore else */
+ if (option.$isLabel) return option.$groupLabel
+
+ const label = this.customLabel(option, this.label);
+ /* istanbul ignore else */
+ if (isEmpty(label)) return ''
+ return label
+ },
+ /**
+ * Add the given option to the list of selected options
+ * or sets the option as the selected option.
+ * If option is already selected -> remove it from the results.
+ *
+ * @param {Object||String||Integer} option to select/deselect
+ * @param {Boolean} block removing
+ */
+ select (option, key) {
+ /* istanbul ignore else */
+ if (option.$isLabel && this.groupSelect) {
+ this.selectGroup(option);
+ return
+ }
+ if (this.blockKeys.indexOf(key) !== -1 ||
+ this.disabled ||
+ option.$isDisabled ||
+ option.$isLabel
+ ) return
+ /* istanbul ignore else */
+ if (this.max && this.multiple && this.internalValue.length === this.max) return
+ /* istanbul ignore else */
+ if (key === 'Tab' && !this.pointerDirty) return
+ if (option.isTag) {
+ this.$emit('tag', option.label, this.id);
+ this.search = '';
+ if (this.closeOnSelect && !this.multiple) this.deactivate();
+ } else {
+ const isSelected = this.isSelected(option);
+
+ if (isSelected) {
+ if (key !== 'Tab') this.removeElement(option);
+ return
+ }
+
+ if (this.multiple) {
+ this.$emit('update:modelValue', this.internalValue.concat([option]));
+ } else {
+ this.$emit('update:modelValue', option);
+ }
+
+ this.$emit('select', option, this.id);
+
+ /* istanbul ignore else */
+ if (this.clearOnSelect) this.search = '';
+ }
+ /* istanbul ignore else */
+ if (this.closeOnSelect) this.deactivate();
+ },
+ /**
+ * Add the given group options to the list of selected options
+ * If all group optiona are already selected -> remove it from the results.
+ *
+ * @param {Object||String||Integer} group to select/deselect
+ */
+ selectGroup (selectedGroup) {
+ const group = this.options.find((option) => {
+ return option[this.groupLabel] === selectedGroup.$groupLabel
+ });
+
+ if (!group) return
+
+ if (this.wholeGroupSelected(group)) {
+ this.$emit('remove', group[this.groupValues], this.id);
+
+ const groupValues = this.trackBy ? group[this.groupValues].map(val => val[this.trackBy]) : group[this.groupValues];
+ const newValue = this.internalValue.filter(
+ option => groupValues.indexOf(this.trackBy ? option[this.trackBy] : option) === -1
+ );
+
+ this.$emit('update:modelValue', newValue);
+ } else {
+ let optionsToAdd = group[this.groupValues].filter(
+ option => !(this.isOptionDisabled(option) || this.isSelected(option))
+ );
+
+ // if max is defined then just select options respecting max
+ if (this.max) {
+ optionsToAdd.splice(this.max - this.internalValue.length);
+ }
+
+ this.$emit('select', optionsToAdd, this.id);
+ this.$emit(
+ 'update:modelValue',
+ this.internalValue.concat(optionsToAdd)
+ );
+ }
+
+ if (this.closeOnSelect) this.deactivate();
+ },
+ /**
+ * Helper to identify if all values in a group are selected
+ *
+ * @param {Object} group to validated selected values against
+ */
+ wholeGroupSelected (group) {
+ return group[this.groupValues].every((option) => this.isSelected(option) || this.isOptionDisabled(option)
+ )
+ },
+ /**
+ * Helper to identify if all values in a group are disabled
+ *
+ * @param {Object} group to check for disabled values
+ */
+ wholeGroupDisabled (group) {
+ return group[this.groupValues].every(this.isOptionDisabled)
+ },
+ /**
+ * Removes the given option from the selected options.
+ * Additionally checks this.allowEmpty prop if option can be removed when
+ * it is the last selected option.
+ *
+ * @param {type} option description
+ * @return {type} description
+ */
+ removeElement (option, shouldClose = true) {
+ /* istanbul ignore else */
+ if (this.disabled) return
+ /* istanbul ignore else */
+ if (option.$isDisabled) return
+ /* istanbul ignore else */
+ if (!this.allowEmpty && this.internalValue.length <= 1) {
+ this.deactivate();
+ return
+ }
+
+ const index = typeof option === 'object'
+ ? this.valueKeys.indexOf(option[this.trackBy])
+ : this.valueKeys.indexOf(option);
+
+ if (this.multiple) {
+ const newValue = this.internalValue.slice(0, index).concat(this.internalValue.slice(index + 1));
+ this.$emit('update:modelValue', newValue);
+ } else {
+ this.$emit('update:modelValue', null);
+ }
+ this.$emit('remove', option, this.id);
+
+ /* istanbul ignore else */
+ if (this.closeOnSelect && shouldClose) this.deactivate();
+ },
+ /**
+ * Calls this.removeElement() with the last element
+ * from this.internalValue (selected element Array)
+ *
+ * @fires this#removeElement
+ */
+ removeLastElement () {
+ /* istanbul ignore else */
+ if (this.blockKeys.indexOf('Delete') !== -1) return
+ /* istanbul ignore else */
+ if (this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length) {
+ this.removeElement(this.internalValue[this.internalValue.length - 1], false);
+ }
+ },
+ /**
+ * Opens the multiselect’s dropdown.
+ * Sets this.isOpen to TRUE
+ */
+ activate () {
+ /* istanbul ignore else */
+ if (this.isOpen || this.disabled) return
+
+ this.adjustPosition();
+ /* istanbul ignore else */
+ if (this.groupValues && this.pointer === 0 && this.filteredOptions.length) {
+ this.pointer = 1;
+ }
+
+ this.isOpen = true;
+ /* istanbul ignore else */
+ if (this.searchable) {
+ if (!this.preserveSearch) this.search = '';
+ if (!this.preventAutofocus) this.$nextTick(() => this.$refs.search && this.$refs.search.focus());
+ } else if (!this.preventAutofocus) {
+ if (typeof this.$el !== 'undefined') this.$el.focus();
+ }
+ this.$emit('open', this.id);
+ },
+ /**
+ * Closes the multiselect’s dropdown.
+ * Sets this.isOpen to FALSE
+ */
+ deactivate () {
+ /* istanbul ignore else */
+ if (!this.isOpen) return
+
+ this.isOpen = false;
+ /* istanbul ignore else */
+ if (this.searchable) {
+ if (this.$refs.search !== null && typeof this.$refs.search !== 'undefined') this.$refs.search.blur();
+ } else {
+ if (typeof this.$el !== 'undefined') this.$el.blur();
+ }
+ if (!this.preserveSearch) this.search = '';
+ this.$emit('close', this.getValue(), this.id);
+ },
+ /**
+ * Call this.activate() or this.deactivate()
+ * depending on this.isOpen value.
+ *
+ * @fires this#activate || this#deactivate
+ * @property {Boolean} isOpen indicates if dropdown is open
+ */
+ toggle () {
+ this.isOpen
+ ? this.deactivate()
+ : this.activate();
+ },
+ /**
+ * Updates the hasEnoughSpace variable used for
+ * detecting where to expand the dropdown
+ */
+ adjustPosition () {
+ if (typeof window === 'undefined') return
+
+ const spaceAbove = this.$el.getBoundingClientRect().top;
+ const spaceBelow = window.innerHeight - this.$el.getBoundingClientRect().bottom;
+ const hasEnoughSpaceBelow = spaceBelow > this.maxHeight;
+
+ if (hasEnoughSpaceBelow || spaceBelow > spaceAbove || this.openDirection === 'below' || this.openDirection === 'bottom') {
+ this.preferredOpenDirection = 'below';
+ this.optimizedHeight = Math.min(spaceBelow - 40, this.maxHeight);
+ } else {
+ this.preferredOpenDirection = 'above';
+ this.optimizedHeight = Math.min(spaceAbove - 40, this.maxHeight);
+ }
+ }
+ }
+ };
+
+ var pointerMixin = {
+ data () {
+ return {
+ pointer: 0,
+ pointerDirty: false
+ }
+ },
+ props: {
+ /**
+ * Enable/disable highlighting of the pointed value.
+ * @type {Boolean}
+ * @default true
+ */
+ showPointer: {
+ type: Boolean,
+ default: true
+ },
+ optionHeight: {
+ type: Number,
+ default: 40
+ }
+ },
+ computed: {
+ pointerPosition () {
+ return this.pointer * this.optionHeight
+ },
+ visibleElements () {
+ return this.optimizedHeight / this.optionHeight
+ }
+ },
+ watch: {
+ filteredOptions () {
+ this.pointerAdjust();
+ },
+ isOpen () {
+ this.pointerDirty = false;
+ },
+ pointer () {
+ this.$refs.search && this.$refs.search.setAttribute('aria-activedescendant', this.id + '-' + this.pointer.toString());
+ }
+ },
+ methods: {
+ optionHighlight (index, option) {
+ return {
+ 'multiselect__option--highlight': index === this.pointer && this.showPointer,
+ 'multiselect__option--selected': this.isSelected(option)
+ }
+ },
+ groupHighlight (index, selectedGroup) {
+ if (!this.groupSelect) {
+ return [
+ 'multiselect__option--disabled',
+ {'multiselect__option--group': selectedGroup.$isLabel}
+ ]
+ }
+
+ const group = this.options.find((option) => {
+ return option[this.groupLabel] === selectedGroup.$groupLabel
+ });
+
+ return group && !this.wholeGroupDisabled(group) ? [
+ 'multiselect__option--group',
+ {'multiselect__option--highlight': index === this.pointer && this.showPointer},
+ {'multiselect__option--group-selected': this.wholeGroupSelected(group)}
+ ] : 'multiselect__option--disabled'
+ },
+ addPointerElement ({key} = 'Enter') {
+ /* istanbul ignore else */
+ if (this.filteredOptions.length > 0) {
+ this.select(this.filteredOptions[this.pointer], key);
+ }
+ this.pointerReset();
+ },
+ pointerForward () {
+ /* istanbul ignore else */
+ if (this.pointer < this.filteredOptions.length - 1) {
+ this.pointer++;
+ /* istanbul ignore next */
+ if (this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight) {
+ this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight;
+ }
+ /* istanbul ignore else */
+ if (
+ this.filteredOptions[this.pointer] &&
+ this.filteredOptions[this.pointer].$isLabel &&
+ !this.groupSelect
+ ) this.pointerForward();
+ }
+ this.pointerDirty = true;
+ },
+ pointerBackward () {
+ if (this.pointer > 0) {
+ this.pointer--;
+ /* istanbul ignore else */
+ if (this.$refs.list.scrollTop >= this.pointerPosition) {
+ this.$refs.list.scrollTop = this.pointerPosition;
+ }
+ /* istanbul ignore else */
+ if (
+ this.filteredOptions[this.pointer] &&
+ this.filteredOptions[this.pointer].$isLabel &&
+ !this.groupSelect
+ ) this.pointerBackward();
+ } else {
+ /* istanbul ignore else */
+ if (
+ this.filteredOptions[this.pointer] &&
+ this.filteredOptions[0].$isLabel &&
+ !this.groupSelect
+ ) this.pointerForward();
+ }
+ this.pointerDirty = true;
+ },
+ pointerReset () {
+ /* istanbul ignore else */
+ if (!this.closeOnSelect) return
+ this.pointer = 0;
+ /* istanbul ignore else */
+ if (this.$refs.list) {
+ this.$refs.list.scrollTop = 0;
+ }
+ },
+ pointerAdjust () {
+ /* istanbul ignore else */
+ if (this.pointer >= this.filteredOptions.length - 1) {
+ this.pointer = this.filteredOptions.length
+ ? this.filteredOptions.length - 1
+ : 0;
+ }
+
+ if (this.filteredOptions.length > 0 &&
+ this.filteredOptions[this.pointer].$isLabel &&
+ !this.groupSelect
+ ) {
+ this.pointerForward();
+ }
+ },
+ pointerSet (index) {
+ this.pointer = index;
+ this.pointerDirty = true;
+ }
+ }
+ };
+
+ var script = {
+ name: 'vue-multiselect',
+ mixins: [multiselectMixin, pointerMixin],
+ compatConfig: {
+ MODE: 3,
+ ATTR_ENUMERATED_COERCION: false
+ },
+ props: {
+ /**
+ * name attribute to match optional label element
+ * @default ''
+ * @type {String}
+ */
+ name: {
+ type: String,
+ default: ''
+ },
+ /**
+ * Presets the selected options value.
+ * @type {Object||Array||String||Integer}
+ */
+ modelValue: {
+ type: null,
+ default () {
+ return []
+ }
+ },
+ /**
+ * String to show when pointing to an option
+ * @default 'Press enter to select'
+ * @type {String}
+ */
+ selectLabel: {
+ type: String,
+ default: 'Press enter to select'
+ },
+ /**
+ * String to show when pointing to an option
+ * @default 'Press enter to select'
+ * @type {String}
+ */
+ selectGroupLabel: {
+ type: String,
+ default: 'Press enter to select group'
+ },
+ /**
+ * String to show next to selected option
+ * @default 'Selected'
+ * @type {String}
+ */
+ selectedLabel: {
+ type: String,
+ default: 'Selected'
+ },
+ /**
+ * String to show when pointing to an already selected option
+ * @default 'Press enter to remove'
+ * @type {String}
+ */
+ deselectLabel: {
+ type: String,
+ default: 'Press enter to remove'
+ },
+ /**
+ * String to show when pointing to an already selected option
+ * @default 'Press enter to remove'
+ * @type {String}
+ */
+ deselectGroupLabel: {
+ type: String,
+ default: 'Press enter to deselect group'
+ },
+ /**
+ * Decide whether to show pointer labels
+ * @default true
+ * @type {Boolean}
+ */
+ showLabels: {
+ type: Boolean,
+ default: true
+ },
+ /**
+ * Limit the display of selected options. The rest will be hidden within the limitText string.
+ * @default 99999
+ * @type {Integer}
+ */
+ limit: {
+ type: Number,
+ default: 99999
+ },
+ /**
+ * Sets maxHeight style value of the dropdown
+ * @default 300
+ * @type {Integer}
+ */
+ maxHeight: {
+ type: Number,
+ default: 300
+ },
+ /**
+ * Function that process the message shown when selected
+ * elements pass the defined limit.
+ * @default 'and * more'
+ * @param {Int} count Number of elements more than limit
+ * @type {Function}
+ */
+ limitText: {
+ type: Function,
+ default: (count) => `and ${count} more`
+ },
+ /**
+ * Set true to trigger the loading spinner.
+ * @default False
+ * @type {Boolean}
+ */
+ loading: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Disables the multiselect if true.
+ * @default false
+ * @type {Boolean}
+ */
+ disabled: {
+ type: Boolean,
+ default: false
+ },
+ /**
+ * Fixed opening direction
+ * @default ''
+ * @type {String}
+ */
+ openDirection: {
+ type: String,
+ default: ''
+ },
+ /**
+ * Shows slot with message about empty options
+ * @default true
+ * @type {Boolean}
+ */
+ showNoOptions: {
+ type: Boolean,
+ default: true
+ },
+ showNoResults: {
+ type: Boolean,
+ default: true
+ },
+ tabindex: {
+ type: Number,
+ default: 0
+ }
+ },
+ computed: {
+ hasOptionGroup () {
+ return this.groupValues && this.groupLabel && this.groupSelect
+ },
+ isSingleLabelVisible () {
+ return (
+ (this.singleValue || this.singleValue === 0) &&
+ (!this.isOpen || !this.searchable) &&
+ !this.visibleValues.length
+ )
+ },
+ isPlaceholderVisible () {
+ return !this.internalValue.length && (!this.searchable || !this.isOpen)
+ },
+ visibleValues () {
+ return this.multiple ? this.internalValue.slice(0, this.limit) : []
+ },
+ singleValue () {
+ return this.internalValue[0]
+ },
+ deselectLabelText () {
+ return this.showLabels ? this.deselectLabel : ''
+ },
+ deselectGroupLabelText () {
+ return this.showLabels ? this.deselectGroupLabel : ''
+ },
+ selectLabelText () {
+ return this.showLabels ? this.selectLabel : ''
+ },
+ selectGroupLabelText () {
+ return this.showLabels ? this.selectGroupLabel : ''
+ },
+ selectedLabelText () {
+ return this.showLabels ? this.selectedLabel : ''
+ },
+ inputStyle () {
+ if (
+ this.searchable ||
+ (this.multiple && this.modelValue && this.modelValue.length)
+ ) {
+ // Hide input by setting the width to 0 allowing it to receive focus
+ return this.isOpen
+ ? {width: '100%'}
+ : {width: '0', position: 'absolute', padding: '0'}
+ }
+ return ''
+ },
+ contentStyle () {
+ return this.options.length
+ ? {display: 'inline-block'}
+ : {display: 'block'}
+ },
+ isAbove () {
+ if (this.openDirection === 'above' || this.openDirection === 'top') {
+ return true
+ } else if (
+ this.openDirection === 'below' ||
+ this.openDirection === 'bottom'
+ ) {
+ return false
+ } else {
+ return this.preferredOpenDirection === 'above'
+ }
+ },
+ showSearchInput () {
+ return (
+ this.searchable &&
+ (this.hasSingleSelectedSlot &&
+ (this.visibleSingleValue || this.visibleSingleValue === 0)
+ ? this.isOpen
+ : true)
+ )
+ }
+ }
+ };
+
+ const _hoisted_1 = {
+ ref: "tags",
+ class: "multiselect__tags"
+ };
+ const _hoisted_2 = { class: "multiselect__tags-wrap" };
+ const _hoisted_3 = { class: "multiselect__spinner" };
+ const _hoisted_4 = { key: 0 };
+ const _hoisted_5 = { class: "multiselect__option" };
+ const _hoisted_6 = { class: "multiselect__option" };
+ const _hoisted_7 = /*#__PURE__*/vue.createTextVNode("No elements found. Consider changing the search query.");
+ const _hoisted_8 = { class: "multiselect__option" };
+ const _hoisted_9 = /*#__PURE__*/vue.createTextVNode("List is empty.");
+
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
+ return (vue.openBlock(), vue.createBlock("div", {
+ tabindex: _ctx.searchable ? -1 : $props.tabindex,
+ class: [{ 'multiselect--active': _ctx.isOpen, 'multiselect--disabled': $props.disabled, 'multiselect--above': $options.isAbove, 'multiselect--has-options-group': $options.hasOptionGroup }, "multiselect"],
+ onFocus: _cache[14] || (_cache[14] = $event => (_ctx.activate())),
+ onBlur: _cache[15] || (_cache[15] = $event => (_ctx.searchable ? false : _ctx.deactivate())),
+ onKeydown: [
+ _cache[16] || (_cache[16] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerForward()), ["self","prevent"]), ["down"])),
+ _cache[17] || (_cache[17] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerBackward()), ["self","prevent"]), ["up"]))
+ ],
+ onKeypress: _cache[18] || (_cache[18] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["stop","self"]), ["enter","tab"])),
+ onKeyup: _cache[19] || (_cache[19] = vue.withKeys($event => (_ctx.deactivate()), ["esc"])),
+ role: "combobox",
+ "aria-owns": 'listbox-'+_ctx.id
+ }, [
+ vue.renderSlot(_ctx.$slots, "caret", { toggle: _ctx.toggle }, () => [
+ vue.createVNode("div", {
+ onMousedown: _cache[1] || (_cache[1] = vue.withModifiers($event => (_ctx.toggle()), ["prevent","stop"])),
+ class: "multiselect__select"
+ }, null, 32 /* HYDRATE_EVENTS */)
+ ]),
+ vue.renderSlot(_ctx.$slots, "clear", { search: _ctx.search }),
+ vue.createVNode("div", _hoisted_1, [
+ vue.renderSlot(_ctx.$slots, "selection", {
+ search: _ctx.search,
+ remove: _ctx.removeElement,
+ values: $options.visibleValues,
+ isOpen: _ctx.isOpen
+ }, () => [
+ vue.withDirectives(vue.createVNode("div", _hoisted_2, [
+ (vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($options.visibleValues, (option, index) => {
+ return vue.renderSlot(_ctx.$slots, "tag", {
+ option: option,
+ search: _ctx.search,
+ remove: _ctx.removeElement
+ }, () => [
+ (vue.openBlock(), vue.createBlock("span", {
+ class: "multiselect__tag",
+ key: index
+ }, [
+ vue.createVNode("span", {
+ textContent: vue.toDisplayString(_ctx.getOptionLabel(option))
+ }, null, 8 /* PROPS */, ["textContent"]),
+ vue.createVNode("i", {
+ tabindex: "1",
+ onKeypress: vue.withKeys(vue.withModifiers($event => (_ctx.removeElement(option)), ["prevent"]), ["enter"]),
+ onMousedown: vue.withModifiers($event => (_ctx.removeElement(option)), ["prevent"]),
+ class: "multiselect__tag-icon"
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, ["onKeypress", "onMousedown"])
+ ]))
+ ])
+ }), 256 /* UNKEYED_FRAGMENT */))
+ ], 512 /* NEED_PATCH */), [
+ [vue.vShow, $options.visibleValues.length > 0]
+ ]),
+ (_ctx.internalValue && _ctx.internalValue.length > $props.limit)
+ ? vue.renderSlot(_ctx.$slots, "limit", { key: 0 }, () => [
+ vue.createVNode("strong", {
+ class: "multiselect__strong",
+ textContent: vue.toDisplayString($props.limitText(_ctx.internalValue.length - $props.limit))
+ }, null, 8 /* PROPS */, ["textContent"])
+ ])
+ : vue.createCommentVNode("v-if", true)
+ ]),
+ vue.createVNode(vue.Transition, { name: "multiselect__loading" }, {
+ default: vue.withCtx(() => [
+ vue.renderSlot(_ctx.$slots, "loading", {}, () => [
+ vue.withDirectives(vue.createVNode("div", _hoisted_3, null, 512 /* NEED_PATCH */), [
+ [vue.vShow, $props.loading]
+ ])
+ ])
+ ]),
+ _: 3 /* FORWARDED */
+ }),
+ (_ctx.searchable)
+ ? (vue.openBlock(), vue.createBlock("input", {
+ key: 0,
+ ref: "search",
+ name: $props.name,
+ id: _ctx.id,
+ type: "text",
+ autocomplete: "off",
+ spellcheck: false,
+ placeholder: _ctx.placeholder,
+ style: $options.inputStyle,
+ value: _ctx.search,
+ disabled: $props.disabled,
+ tabindex: $props.tabindex,
+ onInput: _cache[2] || (_cache[2] = $event => (_ctx.updateSearch($event.target.value))),
+ onFocus: _cache[3] || (_cache[3] = vue.withModifiers($event => (_ctx.activate()), ["prevent"])),
+ onBlur: _cache[4] || (_cache[4] = vue.withModifiers($event => (_ctx.deactivate()), ["prevent"])),
+ onKeyup: _cache[5] || (_cache[5] = vue.withKeys($event => (_ctx.deactivate()), ["esc"])),
+ onKeydown: [
+ _cache[6] || (_cache[6] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerForward()), ["prevent"]), ["down"])),
+ _cache[7] || (_cache[7] = vue.withKeys(vue.withModifiers($event => (_ctx.pointerBackward()), ["prevent"]), ["up"])),
+ _cache[9] || (_cache[9] = vue.withKeys(vue.withModifiers($event => (_ctx.removeLastElement()), ["stop"]), ["delete"]))
+ ],
+ onKeypress: _cache[8] || (_cache[8] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
+ class: "multiselect__input",
+ "aria-controls": 'listbox-'+_ctx.id
+ }, null, 44 /* STYLE, PROPS, HYDRATE_EVENTS */, ["name", "id", "placeholder", "value", "disabled", "tabindex", "aria-controls"]))
+ : vue.createCommentVNode("v-if", true),
+ ($options.isSingleLabelVisible)
+ ? (vue.openBlock(), vue.createBlock("span", {
+ key: 1,
+ class: "multiselect__single",
+ onMousedown: _cache[10] || (_cache[10] = vue.withModifiers((...args) => (_ctx.toggle && _ctx.toggle(...args)), ["prevent"]))
+ }, [
+ vue.renderSlot(_ctx.$slots, "singleLabel", { option: $options.singleValue }, () => [
+ vue.createTextVNode(vue.toDisplayString(_ctx.currentOptionLabel), 1 /* TEXT */)
+ ])
+ ], 32 /* HYDRATE_EVENTS */))
+ : vue.createCommentVNode("v-if", true),
+ ($options.isPlaceholderVisible)
+ ? (vue.openBlock(), vue.createBlock("span", {
+ key: 2,
+ class: "multiselect__placeholder",
+ onMousedown: _cache[11] || (_cache[11] = vue.withModifiers((...args) => (_ctx.toggle && _ctx.toggle(...args)), ["prevent"]))
+ }, [
+ vue.renderSlot(_ctx.$slots, "placeholder", {}, () => [
+ vue.createTextVNode(vue.toDisplayString(_ctx.placeholder), 1 /* TEXT */)
+ ])
+ ], 32 /* HYDRATE_EVENTS */))
+ : vue.createCommentVNode("v-if", true)
+ ], 512 /* NEED_PATCH */),
+ vue.createVNode(vue.Transition, { name: "multiselect" }, {
+ default: vue.withCtx(() => [
+ vue.withDirectives(vue.createVNode("div", {
+ class: "multiselect__content-wrapper",
+ onFocus: _cache[12] || (_cache[12] = (...args) => (_ctx.activate && _ctx.activate(...args))),
+ tabindex: "-1",
+ onMousedown: _cache[13] || (_cache[13] = vue.withModifiers(() => {}, ["prevent"])),
+ style: { maxHeight: _ctx.optimizedHeight + 'px' },
+ ref: "list"
+ }, [
+ vue.createVNode("ul", {
+ class: "multiselect__content",
+ style: $options.contentStyle,
+ role: "listbox",
+ id: 'listbox-'+_ctx.id
+ }, [
+ vue.renderSlot(_ctx.$slots, "beforeList"),
+ (_ctx.multiple && _ctx.max === _ctx.internalValue.length)
+ ? (vue.openBlock(), vue.createBlock("li", _hoisted_4, [
+ vue.createVNode("span", _hoisted_5, [
+ vue.renderSlot(_ctx.$slots, "maxElements", {}, () => [
+ vue.createTextVNode("Maximum of " + vue.toDisplayString(_ctx.max) + " options selected. First remove a selected option to select another.", 1 /* TEXT */)
+ ])
+ ])
+ ]))
+ : vue.createCommentVNode("v-if", true),
+ (!_ctx.max || _ctx.internalValue.length < _ctx.max)
+ ? (vue.openBlock(true), vue.createBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.filteredOptions, (option, index) => {
+ return (vue.openBlock(), vue.createBlock("li", {
+ class: "multiselect__element",
+ key: index,
+ id: _ctx.id + '-' + index,
+ role: !(option && (option.$isLabel || option.$isDisabled)) ? 'option' : null
+ }, [
+ (!(option && (option.$isLabel || option.$isDisabled)))
+ ? (vue.openBlock(), vue.createBlock("span", {
+ key: 0,
+ class: [_ctx.optionHighlight(index, option), "multiselect__option"],
+ onClick: vue.withModifiers($event => (_ctx.select(option)), ["stop"]),
+ onMouseenter: vue.withModifiers($event => (_ctx.pointerSet(index)), ["self"]),
+ "data-select": option && option.isTag ? _ctx.tagPlaceholder : $options.selectLabelText,
+ "data-selected": $options.selectedLabelText,
+ "data-deselect": $options.deselectLabelText
+ }, [
+ vue.renderSlot(_ctx.$slots, "option", {
+ option: option,
+ search: _ctx.search,
+ index: index
+ }, () => [
+ vue.createVNode("span", null, vue.toDisplayString(_ctx.getOptionLabel(option)), 1 /* TEXT */)
+ ])
+ ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"]))
+ : vue.createCommentVNode("v-if", true),
+ (option && (option.$isLabel || option.$isDisabled))
+ ? (vue.openBlock(), vue.createBlock("span", {
+ key: 1,
+ "data-select": _ctx.groupSelect && $options.selectGroupLabelText,
+ "data-deselect": _ctx.groupSelect && $options.deselectGroupLabelText,
+ class: [_ctx.groupHighlight(index, option), "multiselect__option"],
+ onMouseenter: vue.withModifiers($event => (_ctx.groupSelect && _ctx.pointerSet(index)), ["self"]),
+ onMousedown: vue.withModifiers($event => (_ctx.selectGroup(option)), ["prevent"])
+ }, [
+ vue.renderSlot(_ctx.$slots, "option", {
+ option: option,
+ search: _ctx.search,
+ index: index
+ }, () => [
+ vue.createVNode("span", null, vue.toDisplayString(_ctx.getOptionLabel(option)), 1 /* TEXT */)
+ ])
+ ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, ["data-select", "data-deselect", "onMouseenter", "onMousedown"]))
+ : vue.createCommentVNode("v-if", true)
+ ], 8 /* PROPS */, ["id", "role"]))
+ }), 128 /* KEYED_FRAGMENT */))
+ : vue.createCommentVNode("v-if", true),
+ vue.withDirectives(vue.createVNode("li", null, [
+ vue.createVNode("span", _hoisted_6, [
+ vue.renderSlot(_ctx.$slots, "noResult", { search: _ctx.search }, () => [
+ _hoisted_7
+ ])
+ ])
+ ], 512 /* NEED_PATCH */), [
+ [vue.vShow, $props.showNoResults && (_ctx.filteredOptions.length === 0 && _ctx.search && !$props.loading)]
+ ]),
+ vue.withDirectives(vue.createVNode("li", null, [
+ vue.createVNode("span", _hoisted_8, [
+ vue.renderSlot(_ctx.$slots, "noOptions", {}, () => [
+ _hoisted_9
+ ])
+ ])
+ ], 512 /* NEED_PATCH */), [
+ [vue.vShow, $props.showNoOptions && ((_ctx.options.length === 0 || ($options.hasOptionGroup === true && _ctx.filteredOptions.length === 0)) && !_ctx.search && !$props.loading)]
+ ]),
+ vue.renderSlot(_ctx.$slots, "afterList")
+ ], 12 /* STYLE, PROPS */, ["id"])
+ ], 36 /* STYLE, HYDRATE_EVENTS */), [
+ [vue.vShow, _ctx.isOpen]
+ ])
+ ]),
+ _: 3 /* FORWARDED */
+ })
+ ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, ["tabindex", "aria-owns"]))
+ }
+
+ script.render = render;
+
+ exports.Multiselect = script;
+ exports.default = script;
+ exports.multiselectMixin = multiselectMixin;
+ exports.pointerMixin = pointerMixin;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+ return exports;
+
+}({}, Vue));
diff --git a/dist/vue-multiselect.min.css b/dist/vue-multiselect.min.css
deleted file mode 100644
index 00f94045..00000000
--- a/dist/vue-multiselect.min.css
+++ /dev/null
@@ -1 +0,0 @@
-fieldset[disabled] .multiselect{pointer-events:none}.multiselect__spinner{position:absolute;right:1px;top:1px;width:40px;height:38px;background:#fff;display:block}.multiselect__spinner:after,.multiselect__spinner:before{position:absolute;content:"";top:50%;left:50%;margin:-8px 0 0 -8px;width:16px;height:16px;border-radius:100%;border:2px solid transparent;border-top-color:#41b883;-webkit-box-shadow:0 0 0 1px transparent;box-shadow:0 0 0 1px transparent}.multiselect__spinner:before{-webkit-animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__spinner:after{-webkit-animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__loading-enter-active,.multiselect__loading-leave-active{-webkit-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out;opacity:1}.multiselect__loading-enter,.multiselect__loading-leave-active{opacity:0}.multiselect,.multiselect__input,.multiselect__single{font-family:inherit;font-size:16px;-ms-touch-action:manipulation;touch-action:manipulation}.multiselect{-webkit-box-sizing:content-box;box-sizing:content-box;display:block;position:relative;width:100%;min-height:40px;text-align:left;color:#35495e}.multiselect *{-webkit-box-sizing:border-box;box-sizing:border-box}.multiselect:focus{outline:none}.multiselect--disabled{background:#ededed;pointer-events:none;opacity:.6}.multiselect--active{z-index:50}.multiselect--active:not(.multiselect--above) .multiselect__current,.multiselect--active:not(.multiselect--above) .multiselect__input,.multiselect--active:not(.multiselect--above) .multiselect__tags{border-bottom-left-radius:0;border-bottom-right-radius:0}.multiselect--active .multiselect__select{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.multiselect--above.multiselect--active .multiselect__current,.multiselect--above.multiselect--active .multiselect__input,.multiselect--above.multiselect--active .multiselect__tags{border-top-left-radius:0;border-top-right-radius:0}.multiselect__input,.multiselect__single{position:relative;display:inline-block;min-height:20px;line-height:20px;border:none;border-radius:5px;background:#fff;padding:0 0 0 5px;width:100%;-webkit-transition:border .1s ease;transition:border .1s ease;-webkit-box-sizing:border-box;box-sizing:border-box;margin-bottom:8px;vertical-align:top}.multiselect__input::-webkit-input-placeholder{color:#35495e}.multiselect__input::-moz-placeholder{color:#35495e}.multiselect__input:-ms-input-placeholder{color:#35495e}.multiselect__input::-ms-input-placeholder{color:#35495e}.multiselect__input::placeholder{color:#35495e}.multiselect__tag~.multiselect__input,.multiselect__tag~.multiselect__single{width:auto}.multiselect__input:hover,.multiselect__single:hover{border-color:#cfcfcf}.multiselect__input:focus,.multiselect__single:focus{border-color:#a8a8a8;outline:none}.multiselect__single{padding-left:5px;margin-bottom:8px}.multiselect__tags-wrap{display:inline}.multiselect__tags{min-height:40px;display:block;padding:8px 40px 0 8px;border-radius:5px;border:1px solid #e8e8e8;background:#fff;font-size:14px}.multiselect__tag{position:relative;display:inline-block;padding:4px 26px 4px 10px;border-radius:5px;margin-right:10px;color:#fff;line-height:1;background:#41b883;margin-bottom:5px;white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}.multiselect__tag-icon{cursor:pointer;margin-left:7px;position:absolute;right:0;top:0;bottom:0;font-weight:700;font-style:normal;width:22px;text-align:center;line-height:22px;-webkit-transition:all .2s ease;transition:all .2s ease;border-radius:5px}.multiselect__tag-icon:after{content:"\D7";color:#266d4d;font-size:14px}.multiselect__tag-icon:focus,.multiselect__tag-icon:hover{background:#369a6e}.multiselect__tag-icon:focus:after,.multiselect__tag-icon:hover:after{color:#fff}.multiselect__current{min-height:40px;overflow:hidden;padding:8px 30px 0 12px;white-space:nowrap;border-radius:5px;border:1px solid #e8e8e8}.multiselect__current,.multiselect__select{line-height:16px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;margin:0;text-decoration:none;cursor:pointer}.multiselect__select{position:absolute;width:40px;height:38px;right:1px;top:1px;padding:4px 8px;text-align:center;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.multiselect__select:before{position:relative;right:0;top:65%;color:#999;margin-top:4px;border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 0;content:""}.multiselect__placeholder{color:#adadad;display:inline-block;margin-bottom:10px;padding-top:2px}.multiselect--active .multiselect__placeholder{display:none}.multiselect__content-wrapper{position:absolute;display:block;background:#fff;width:100%;max-height:240px;overflow:auto;border:1px solid #e8e8e8;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;z-index:50;-webkit-overflow-scrolling:touch}.multiselect__content{list-style:none;display:inline-block;padding:0;margin:0;min-width:100%;vertical-align:top}.multiselect--above .multiselect__content-wrapper{bottom:100%;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom:none;border-top:1px solid #e8e8e8}.multiselect__content::webkit-scrollbar{display:none}.multiselect__element{display:block}.multiselect__option{display:block;padding:12px;min-height:40px;line-height:16px;text-decoration:none;text-transform:none;vertical-align:middle;position:relative;cursor:pointer;white-space:nowrap}.multiselect__option:after{top:0;right:0;position:absolute;line-height:40px;padding-right:12px;padding-left:20px;font-size:13px}.multiselect__option--highlight{background:#41b883;outline:none;color:#fff}.multiselect__option--highlight:after{content:attr(data-select);background:#41b883;color:#fff}.multiselect__option--selected{background:#f3f3f3;color:#35495e;font-weight:700}.multiselect__option--selected:after{content:attr(data-selected);color:silver;background:inherit}.multiselect__option--selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect--disabled .multiselect__current,.multiselect--disabled .multiselect__select{background:#ededed;color:#a6a6a6}.multiselect__option--disabled{background:#ededed!important;color:#a6a6a6!important;cursor:text;pointer-events:none}.multiselect__option--group{background:#ededed;color:#35495e}.multiselect__option--group.multiselect__option--highlight{background:#35495e;color:#fff}.multiselect__option--group.multiselect__option--highlight:after{background:#35495e}.multiselect__option--disabled.multiselect__option--highlight{background:#dedede}.multiselect__option--group-selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--group-selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect-enter-active,.multiselect-leave-active{-webkit-transition:all .15s ease;transition:all .15s ease}.multiselect-enter,.multiselect-leave-active{opacity:0}.multiselect__strong{margin-bottom:8px;line-height:20px;display:inline-block;vertical-align:top}[dir=rtl] .multiselect{text-align:right}[dir=rtl] .multiselect__select{right:auto;left:1px}[dir=rtl] .multiselect__tags{padding:8px 8px 0 40px}[dir=rtl] .multiselect__content{text-align:right}[dir=rtl] .multiselect__option:after{right:auto;left:0}[dir=rtl] .multiselect__clear{right:auto;left:12px}[dir=rtl] .multiselect__spinner{right:auto;left:1px}@-webkit-keyframes spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(2turn);transform:rotate(2turn)}}@keyframes spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(2turn);transform:rotate(2turn)}}
\ No newline at end of file
diff --git a/dist/vue-multiselect.min.css.map b/dist/vue-multiselect.min.css.map
deleted file mode 100644
index 86e7b4e1..00000000
--- a/dist/vue-multiselect.min.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["webpack:///./src/Multiselect.vue"],"names":[],"mappings":";AACA;EACE,qBAAqB;CACtB;AACD;EACE,mBAAmB;EACnB,WAAW;EACX,SAAS;EACT,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,eAAe;CAChB;AACD;;EAEE,mBAAmB;EACnB,YAAY;EACZ,SAAS;EACT,UAAU;EACV,sBAAsB;EACtB,YAAY;EACZ,aAAa;EACb,oBAAoB;EACpB,8CAA8C;EAC9C,oBAAoB;EACpB,kBAAkB;EAClB,0CAA0C;UAClC,kCAAkC;CAC3C;AACD;EACE,qEAAqE;UAC7D,6DAA6D;EACrE,4CAA4C;UACpC,oCAAoC;CAC7C;AACD;EACE,qEAAqE;UAC7D,6DAA6D;EACrE,4CAA4C;UACpC,oCAAoC;CAC7C;AACD;;EAEE,6CAA6C;EAC7C,qCAAqC;EACrC,WAAW;CACZ;AACD;;EAEE,WAAW;CACZ;AACD;;;EAGE,qBAAqB;EACrB,gBAAgB;EAChB,+BAA+B;MAC3B,2BAA2B;CAChC;AACD;EACE,gCAAgC;UACxB,wBAAwB;EAChC,eAAe;EACf,mBAAmB;EACnB,YAAY;EACZ,iBAAiB;EACjB,iBAAiB;EACjB,eAAe;CAChB;AACD;EACE,+BAA+B;UACvB,uBAAuB;CAChC;AACD;EACE,cAAc;CACf;AACD;EACE,oBAAoB;EACpB,qBAAqB;EACrB,aAAa;CACd;AACD;EACE,YAAY;CACb;AACD;;;EAGE,6BAA6B;EAC7B,8BAA8B;CAC/B;AACD;EACE,mCAAmC;UAC3B,2BAA2B;CACpC;AACD;;;EAGE,0BAA0B;EAC1B,2BAA2B;CAC5B;AACD;;EAEE,mBAAmB;EACnB,sBAAsB;EACtB,iBAAiB;EACjB,kBAAkB;EAClB,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,mBAAmB;EACnB,kBAAkB;EAClB,qCAAqC;EACrC,6BAA6B;EAC7B,+BAA+B;UACvB,uBAAuB;EAC/B,mBAAmB;EACnB,oBAAoB;CACrB;AACD;EACE,eAAe;CAChB;AACD;EACE,eAAe;CAChB;AACD;EACE,eAAe;CAChB;AACD;EACE,eAAe;CAChB;AACD;EACE,eAAe;CAChB;AACD;;EAEE,YAAY;CACb;AACD;;EAEE,sBAAsB;CACvB;AACD;;EAEE,sBAAsB;EACtB,cAAc;CACf;AACD;EACE,kBAAkB;EAClB,mBAAmB;CACpB;AACD;EACE,gBAAgB;CACjB;AACD;EACE,iBAAiB;EACjB,eAAe;EACf,wBAAwB;EACxB,mBAAmB;EACnB,0BAA0B;EAC1B,iBAAiB;EACjB,gBAAgB;CACjB;AACD;EACE,mBAAmB;EACnB,sBAAsB;EACtB,2BAA2B;EAC3B,mBAAmB;EACnB,mBAAmB;EACnB,YAAY;EACZ,eAAe;EACf,oBAAoB;EACpB,mBAAmB;EACnB,oBAAoB;EACpB,iBAAiB;EACjB,gBAAgB;EAChB,wBAAwB;CACzB;AACD;EACE,gBAAgB;EAChB,iBAAiB;EACjB,mBAAmB;EACnB,SAAS;EACT,OAAO;EACP,UAAU;EACV,iBAAiB;EACjB,oBAAoB;EACpB,YAAY;EACZ,mBAAmB;EACnB,kBAAkB;EAClB,kCAAkC;EAClC,0BAA0B;EAC1B,mBAAmB;CACpB;AACD;EACE,eAAa;EACb,eAAe;EACf,gBAAgB;CACjB;AACD;;EAEE,oBAAoB;CACrB;AACD;;EAEE,aAAa;CACd;AACD;EACE,kBAAkB;EAClB,iBAAiB;EACjB,+BAA+B;UACvB,uBAAuB;EAC/B,eAAe;EACf,iBAAiB;EACjB,oBAAoB;EACpB,oBAAoB;EACpB,oBAAoB;EACpB,UAAU;EACV,sBAAsB;EACtB,mBAAmB;EACnB,0BAA0B;EAC1B,gBAAgB;CACjB;AACD;EACE,kBAAkB;EAClB,eAAe;EACf,mBAAmB;EACnB,+BAA+B;UACvB,uBAAuB;EAC/B,YAAY;EACZ,aAAa;EACb,WAAW;EACX,SAAS;EACT,iBAAiB;EACjB,UAAU;EACV,sBAAsB;EACtB,mBAAmB;EACnB,gBAAgB;EAChB,gDAAgD;EAChD,wCAAwC;EACxC,gCAAgC;EAChC,6DAA6D;CAC9D;AACD;EACE,mBAAmB;EACnB,SAAS;EACT,SAAS;EACT,YAAY;EACZ,gBAAgB;EAChB,oBAAoB;EACpB,4BAA4B;EAC5B,0DAA0D;EAC1D,YAAY;CACb;AACD;EACE,eAAe;EACf,sBAAsB;EACtB,oBAAoB;EACpB,iBAAiB;CAClB;AACD;EACE,cAAc;CACf;AACD;EACE,mBAAmB;EACnB,eAAe;EACf,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,eAAe;EACf,0BAA0B;EAC1B,iBAAiB;EACjB,+BAA+B;EAC/B,gCAAgC;EAChC,YAAY;EACZ,kCAAkC;CACnC;AACD;EACE,iBAAiB;EACjB,sBAAsB;EACtB,WAAW;EACX,UAAU;EACV,gBAAgB;EAChB,oBAAoB;CACrB;AACD;EACE,aAAa;EACb,6BAA6B;EAC7B,8BAA8B;EAC9B,4BAA4B;EAC5B,6BAA6B;EAC7B,oBAAoB;EACpB,8BAA8B;CAC/B;AACD;EACE,cAAc;CACf;AACD;EACE,eAAe;CAChB;AACD;EACE,eAAe;EACf,cAAc;EACd,iBAAiB;EACjB,kBAAkB;EAClB,sBAAsB;EACtB,qBAAqB;EACrB,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;EAChB,oBAAoB;CACrB;AACD;EACE,OAAO;EACP,SAAS;EACT,mBAAmB;EACnB,kBAAkB;EAClB,oBAAoB;EACpB,mBAAmB;EACnB,gBAAgB;CACjB;AACD;EACE,oBAAoB;EACpB,cAAc;EACd,aAAa;CACd;AACD;EACE,2BAA2B;EAC3B,oBAAoB;EACpB,aAAa;CACd;AACD;EACE,oBAAoB;EACpB,eAAe;EACf,kBAAkB;CACnB;AACD;EACE,6BAA6B;EAC7B,cAAc;EACd,oBAAoB;CACrB;AACD;EACE,oBAAoB;EACpB,YAAY;CACb;AACD;EACE,oBAAoB;EACpB,6BAA6B;EAC7B,YAAY;CACb;AACD;;EAEE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,+BAA+B;EAC/B,0BAA0B;EAC1B,aAAa;EACb,qBAAqB;CACtB;AACD;EACE,oBAAoB;EACpB,eAAe;CAChB;AACD;EACE,oBAAoB;EACpB,YAAY;CACb;AACD;EACE,oBAAoB;CACrB;AACD;EACE,oBAAoB;CACrB;AACD;EACE,oBAAoB;EACpB,YAAY;CACb;AACD;EACE,oBAAoB;EACpB,6BAA6B;EAC7B,YAAY;CACb;AACD;;EAEE,mCAAmC;EACnC,2BAA2B;CAC5B;AACD;;EAEE,WAAW;CACZ;AACD;EACE,mBAAmB;EACnB,kBAAkB;EAClB,sBAAsB;EACtB,oBAAoB;CACrB;AACD;EACE,kBAAkB;CACnB;AACD;EACE,YAAY;EACZ,UAAU;CACX;AACD;EACE,0BAA0B;CAC3B;AACD;EACE,kBAAkB;CACnB;AACD;EACE,YAAY;EACZ,QAAQ;CACT;AACD;EACE,YAAY;EACZ,WAAW;CACZ;AACD;EACE,YAAY;EACZ,UAAU;CACX;AACD;AACA;IACI,6BAA6B;YACrB,qBAAqB;CAChC;AACD;IACI,iCAAiC;YACzB,yBAAyB;CACpC;CACA;AACD;AACA;IACI,6BAA6B;YACrB,qBAAqB;CAChC;AACD;IACI,iCAAiC;YACzB,yBAAyB;CACpC;CACA","file":"vue-multiselect.min.css","sourcesContent":["\nfieldset[disabled] .multiselect {\n pointer-events: none;\n}\n.multiselect__spinner {\n position: absolute;\n right: 1px;\n top: 1px;\n width: 40px;\n height: 38px;\n background: #fff;\n display: block;\n}\n.multiselect__spinner:before,\n.multiselect__spinner:after {\n position: absolute;\n content: \"\";\n top: 50%;\n left: 50%;\n margin: -8px 0 0 -8px;\n width: 16px;\n height: 16px;\n border-radius: 100%;\n border-color: #41b883 transparent transparent;\n border-style: solid;\n border-width: 2px;\n -webkit-box-shadow: 0 0 0 1px transparent;\n box-shadow: 0 0 0 1px transparent;\n}\n.multiselect__spinner:before {\n -webkit-animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);\n animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n}\n.multiselect__spinner:after {\n -webkit-animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);\n animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);\n -webkit-animation-iteration-count: infinite;\n animation-iteration-count: infinite;\n}\n.multiselect__loading-enter-active,\n.multiselect__loading-leave-active {\n -webkit-transition: opacity 0.4s ease-in-out;\n transition: opacity 0.4s ease-in-out;\n opacity: 1;\n}\n.multiselect__loading-enter,\n.multiselect__loading-leave-active {\n opacity: 0;\n}\n.multiselect,\n.multiselect__input,\n.multiselect__single {\n font-family: inherit;\n font-size: 16px;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n}\n.multiselect {\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n display: block;\n position: relative;\n width: 100%;\n min-height: 40px;\n text-align: left;\n color: #35495e;\n}\n.multiselect * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.multiselect:focus {\n outline: none;\n}\n.multiselect--disabled {\n background: #ededed;\n pointer-events: none;\n opacity: 0.6;\n}\n.multiselect--active {\n z-index: 50;\n}\n.multiselect--active:not(.multiselect--above) .multiselect__current,\n.multiselect--active:not(.multiselect--above) .multiselect__input,\n.multiselect--active:not(.multiselect--above) .multiselect__tags {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n.multiselect--active .multiselect__select {\n -webkit-transform: rotateZ(180deg);\n transform: rotateZ(180deg);\n}\n.multiselect--above.multiselect--active .multiselect__current,\n.multiselect--above.multiselect--active .multiselect__input,\n.multiselect--above.multiselect--active .multiselect__tags {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.multiselect__input,\n.multiselect__single {\n position: relative;\n display: inline-block;\n min-height: 20px;\n line-height: 20px;\n border: none;\n border-radius: 5px;\n background: #fff;\n padding: 0 0 0 5px;\n width: calc(100%);\n -webkit-transition: border 0.1s ease;\n transition: border 0.1s ease;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin-bottom: 8px;\n vertical-align: top;\n}\n.multiselect__input::-webkit-input-placeholder {\n color: #35495e;\n}\n.multiselect__input::-moz-placeholder {\n color: #35495e;\n}\n.multiselect__input:-ms-input-placeholder {\n color: #35495e;\n}\n.multiselect__input::-ms-input-placeholder {\n color: #35495e;\n}\n.multiselect__input::placeholder {\n color: #35495e;\n}\n.multiselect__tag ~ .multiselect__input,\n.multiselect__tag ~ .multiselect__single {\n width: auto;\n}\n.multiselect__input:hover,\n.multiselect__single:hover {\n border-color: #cfcfcf;\n}\n.multiselect__input:focus,\n.multiselect__single:focus {\n border-color: #a8a8a8;\n outline: none;\n}\n.multiselect__single {\n padding-left: 5px;\n margin-bottom: 8px;\n}\n.multiselect__tags-wrap {\n display: inline;\n}\n.multiselect__tags {\n min-height: 40px;\n display: block;\n padding: 8px 40px 0 8px;\n border-radius: 5px;\n border: 1px solid #e8e8e8;\n background: #fff;\n font-size: 14px;\n}\n.multiselect__tag {\n position: relative;\n display: inline-block;\n padding: 4px 26px 4px 10px;\n border-radius: 5px;\n margin-right: 10px;\n color: #fff;\n line-height: 1;\n background: #41b883;\n margin-bottom: 5px;\n white-space: nowrap;\n overflow: hidden;\n max-width: 100%;\n text-overflow: ellipsis;\n}\n.multiselect__tag-icon {\n cursor: pointer;\n margin-left: 7px;\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n font-weight: 700;\n font-style: initial;\n width: 22px;\n text-align: center;\n line-height: 22px;\n -webkit-transition: all 0.2s ease;\n transition: all 0.2s ease;\n border-radius: 5px;\n}\n.multiselect__tag-icon:after {\n content: \"×\";\n color: #266d4d;\n font-size: 14px;\n}\n.multiselect__tag-icon:focus,\n.multiselect__tag-icon:hover {\n background: #369a6e;\n}\n.multiselect__tag-icon:focus:after,\n.multiselect__tag-icon:hover:after {\n color: white;\n}\n.multiselect__current {\n line-height: 16px;\n min-height: 40px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: block;\n overflow: hidden;\n padding: 8px 12px 0;\n padding-right: 30px;\n white-space: nowrap;\n margin: 0;\n text-decoration: none;\n border-radius: 5px;\n border: 1px solid #e8e8e8;\n cursor: pointer;\n}\n.multiselect__select {\n line-height: 16px;\n display: block;\n position: absolute;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 40px;\n height: 38px;\n right: 1px;\n top: 1px;\n padding: 4px 8px;\n margin: 0;\n text-decoration: none;\n text-align: center;\n cursor: pointer;\n -webkit-transition: -webkit-transform 0.2s ease;\n transition: -webkit-transform 0.2s ease;\n transition: transform 0.2s ease;\n transition: transform 0.2s ease, -webkit-transform 0.2s ease;\n}\n.multiselect__select:before {\n position: relative;\n right: 0;\n top: 65%;\n color: #999;\n margin-top: 4px;\n border-style: solid;\n border-width: 5px 5px 0 5px;\n border-color: #999999 transparent transparent transparent;\n content: \"\";\n}\n.multiselect__placeholder {\n color: #adadad;\n display: inline-block;\n margin-bottom: 10px;\n padding-top: 2px;\n}\n.multiselect--active .multiselect__placeholder {\n display: none;\n}\n.multiselect__content-wrapper {\n position: absolute;\n display: block;\n background: #fff;\n width: 100%;\n max-height: 240px;\n overflow: auto;\n border: 1px solid #e8e8e8;\n border-top: none;\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n z-index: 50;\n -webkit-overflow-scrolling: touch;\n}\n.multiselect__content {\n list-style: none;\n display: inline-block;\n padding: 0;\n margin: 0;\n min-width: 100%;\n vertical-align: top;\n}\n.multiselect--above .multiselect__content-wrapper {\n bottom: 100%;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n border-bottom: none;\n border-top: 1px solid #e8e8e8;\n}\n.multiselect__content::webkit-scrollbar {\n display: none;\n}\n.multiselect__element {\n display: block;\n}\n.multiselect__option {\n display: block;\n padding: 12px;\n min-height: 40px;\n line-height: 16px;\n text-decoration: none;\n text-transform: none;\n vertical-align: middle;\n position: relative;\n cursor: pointer;\n white-space: nowrap;\n}\n.multiselect__option:after {\n top: 0;\n right: 0;\n position: absolute;\n line-height: 40px;\n padding-right: 12px;\n padding-left: 20px;\n font-size: 13px;\n}\n.multiselect__option--highlight {\n background: #41b883;\n outline: none;\n color: white;\n}\n.multiselect__option--highlight:after {\n content: attr(data-select);\n background: #41b883;\n color: white;\n}\n.multiselect__option--selected {\n background: #f3f3f3;\n color: #35495e;\n font-weight: bold;\n}\n.multiselect__option--selected:after {\n content: attr(data-selected);\n color: silver;\n background: inherit;\n}\n.multiselect__option--selected.multiselect__option--highlight {\n background: #ff6a6a;\n color: #fff;\n}\n.multiselect__option--selected.multiselect__option--highlight:after {\n background: #ff6a6a;\n content: attr(data-deselect);\n color: #fff;\n}\n.multiselect--disabled .multiselect__current,\n.multiselect--disabled .multiselect__select {\n background: #ededed;\n color: #a6a6a6;\n}\n.multiselect__option--disabled {\n background: #ededed !important;\n color: #a6a6a6 !important;\n cursor: text;\n pointer-events: none;\n}\n.multiselect__option--group {\n background: #ededed;\n color: #35495e;\n}\n.multiselect__option--group.multiselect__option--highlight {\n background: #35495e;\n color: #fff;\n}\n.multiselect__option--group.multiselect__option--highlight:after {\n background: #35495e;\n}\n.multiselect__option--disabled.multiselect__option--highlight {\n background: #dedede;\n}\n.multiselect__option--group-selected.multiselect__option--highlight {\n background: #ff6a6a;\n color: #fff;\n}\n.multiselect__option--group-selected.multiselect__option--highlight:after {\n background: #ff6a6a;\n content: attr(data-deselect);\n color: #fff;\n}\n.multiselect-enter-active,\n.multiselect-leave-active {\n -webkit-transition: all 0.15s ease;\n transition: all 0.15s ease;\n}\n.multiselect-enter,\n.multiselect-leave-active {\n opacity: 0;\n}\n.multiselect__strong {\n margin-bottom: 8px;\n line-height: 20px;\n display: inline-block;\n vertical-align: top;\n}\n*[dir=\"rtl\"] .multiselect {\n text-align: right;\n}\n*[dir=\"rtl\"] .multiselect__select {\n right: auto;\n left: 1px;\n}\n*[dir=\"rtl\"] .multiselect__tags {\n padding: 8px 8px 0px 40px;\n}\n*[dir=\"rtl\"] .multiselect__content {\n text-align: right;\n}\n*[dir=\"rtl\"] .multiselect__option:after {\n right: auto;\n left: 0;\n}\n*[dir=\"rtl\"] .multiselect__clear {\n right: auto;\n left: 12px;\n}\n*[dir=\"rtl\"] .multiselect__spinner {\n right: auto;\n left: 1px;\n}\n@-webkit-keyframes spinning {\nfrom {\n -webkit-transform: rotate(0);\n transform: rotate(0);\n}\nto {\n -webkit-transform: rotate(2turn);\n transform: rotate(2turn);\n}\n}\n@keyframes spinning {\nfrom {\n -webkit-transform: rotate(0);\n transform: rotate(0);\n}\nto {\n -webkit-transform: rotate(2turn);\n transform: rotate(2turn);\n}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Multiselect.vue"],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/vue-multiselect.min.js b/dist/vue-multiselect.min.js
deleted file mode 100644
index 0bac0fa7..00000000
--- a/dist/vue-multiselect.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueMultiselect=e():t.VueMultiselect=e()}(this,function(){return 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={};return e.m=t,e.c=n,e.i=function(t){return t},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=89)}([function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(35),i=Function.prototype,o=i.call,s=r&&i.bind.bind(o,o);t.exports=r?s:function(t){return function(){return o.apply(t,arguments)}}},function(t,e,n){var r=n(59),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},function(t,e,n){var r=n(4),i=n(43).f,o=n(30),s=n(11),u=n(33),a=n(95),l=n(66);t.exports=function(t,e){var n,c,f,p,h,d=t.target,v=t.global,g=t.stat;if(n=v?r:g?r[d]||u(d,{}):(r[d]||{}).prototype)for(c in e){if(p=e[c],t.dontCallGetSet?(h=i(n,c),f=h&&h.value):f=n[c],!l(v?c:d+(g?".":"#")+c,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;a(p,f)}(t.sham||f&&f.sham)&&o(p,"sham",!0),s(n,c,p,t)}}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(e,n(139))},function(t,e,n){var r=n(0);t.exports=!r(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},function(t,e,n){var r=n(8),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},function(t,e,n){var r=n(1),i=n(14),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},function(t,e,n){var r=n(2),i=n(59),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},function(t,e,n){var r=n(4),i=n(47),o=n(7),s=n(75),u=n(72),a=n(76),l=i("wks"),c=r.Symbol,f=c&&c.for,p=a?c:c&&c.withoutSetter||s;t.exports=function(t){if(!o(l,t)||!u&&"string"!=typeof l[t]){var e="Symbol."+t;u&&o(c,t)?l[t]=c[t]:l[t]=a&&f?f(e):p(e)}return l[t]}},function(t,e,n){var r=n(123);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(2),i=n(13),o=n(104),s=n(33);t.exports=function(t,e,n,u){u||(u={});var a=u.enumerable,l=void 0!==u.name?u.name:e;if(r(n)&&o(n,l,u),u.global)a?t[e]=n:s(e,n);else{try{u.unsafe?t[e]&&(a=!0):delete t[e]}catch(t){}a?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},function(t,e,n){var r=n(35),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},function(t,e,n){var r=n(5),i=n(62),o=n(77),s=n(6),u=n(50),a=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor;e.f=r?o?function(t,e,n){if(s(t),e=u(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=c(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(s(t),e=u(e),s(n),i)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw a("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(24),i=Object;t.exports=function(t){return i(r(t))}},function(t,e,n){var r=n(1),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},function(t,e,n){var r=n(0),i=n(9),o=n(23),s=i("species");t.exports=function(t){return o>=51||!r(function(){var e=[],n=e.constructor={};return n[s]=function(){return{foo:1}},1!==e[t](Boolean).foo})}},function(t,e,n){var r=n(4),i=n(2),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(15);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(39),i=n(24);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(29),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,n){var r=n(100),i=n(1),o=n(39),s=n(14),u=n(10),a=n(28),l=i([].push),c=function(t){var e=1==t,n=2==t,i=3==t,c=4==t,f=6==t,p=7==t,h=5==t||f;return function(d,v,g,y){for(var b,m,x=s(d),_=o(x),O=r(v,g),w=u(_),S=0,E=y||a,L=e?E(d,w):n||p?E(d,0):void 0;w>S;S++)if((h||S in _)&&(b=_[S],m=O(b,S,x),t))if(e)L[S]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return S;case 2:l(L,b)}else switch(t){case 4:return!1;case 7:l(L,b)}return f?-1:i||c?c:L}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},function(t,e){var n=TypeError;t.exports=function(t){if(t>9007199254740991)throw n("Maximum allowed index exceeded");return t}},function(t,e,n){var r,i,o=n(4),s=n(97),u=o.process,a=o.Deno,l=u&&u.versions||a&&a.version,c=l&&l.v8;c&&(r=c.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},function(t,e,n){var r=n(40),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},function(t,e,n){var r=n(2),i=n(74),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){var n=[][t];return!!n&&r(function(){n.call(null,e||function(){return 1},1)})}},function(t,e,n){"use strict";var r=n(5),i=n(18),o=TypeError,s=Object.getOwnPropertyDescriptor,u=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=u?function(t,e){if(i(t)&&!s(t,"length").writable)throw o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},function(t,e,n){var r=n(94);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},function(t,e,n){var r=n(51),i=n(2),o=n(15),s=n(9),u=s("toStringTag"),a=Object,l="Arguments"==o(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(t){}};t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=a(t),u))?n:l?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},function(t,e,n){var r=n(5),i=n(13),o=n(31);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var r=n(50),i=n(13),o=n(31);t.exports=function(t,e,n){var s=r(e);s in t?i.f(t,s,o(0,n)):t[s]=n}},function(t,e,n){var r=n(4),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){var r=n(0);t.exports=!r(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},function(t,e,n){var r=n(5),i=n(7),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,u=i(o,"name"),a=u&&"something"===function(){}.name,l=u&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:u,PROPER:a,CONFIGURABLE:l}},function(t,e,n){var r=n(15),i=n(1);t.exports=function(t){if("Function"===r(t))return i(t)}},function(t,e){t.exports={}},function(t,e,n){var r=n(1),i=n(0),o=n(15),s=Object,u=r("".split);t.exports=i(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"==o(t)?u(t,""):s(t)}:s},function(t,e){t.exports=function(t){return null===t||void 0===t}},function(t,e,n){var r=n(17),i=n(2),o=n(44),s=n(76),u=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,u(t))}},function(t,e,n){var r,i=n(6),o=n(107),s=n(34),u=n(38),a=n(101),l=n(60),c=n(70),f=c("IE_PROTO"),p=function(){},h=function(t){return"\n\n\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","function isEmpty (opt) {\n if (opt === 0) return false\n if (Array.isArray(opt) && opt.length === 0) return true\n return !opt\n}\n\nfunction not (fun) {\n return (...params) => !fun(...params)\n}\n\nfunction includes (str, query) {\n /* istanbul ignore else */\n if (str === undefined) str = 'undefined'\n if (str === null) str = 'null'\n if (str === false) str = 'false'\n const text = str.toString().toLowerCase()\n return text.indexOf(query.trim()) !== -1\n}\n\nfunction filterOptions (options, search, label, customLabel) {\n return search ? options\n .filter((option) => includes(customLabel(option, label), search))\n .sort((a, b) => customLabel(a, label).length - customLabel(b, label).length) : options\n}\n\nfunction stripGroups (options) {\n return options.filter((option) => !option.$isLabel)\n}\n\nfunction flattenOptions (values, label) {\n return (options) =>\n options.reduce((prev, curr) => {\n /* istanbul ignore else */\n if (curr[values] && curr[values].length) {\n prev.push({\n $groupLabel: curr[label],\n $isLabel: true\n })\n return prev.concat(curr[values])\n }\n return prev\n }, [])\n}\n\nfunction filterGroups (search, label, values, groupLabel, customLabel) {\n return (groups) =>\n groups.map((group) => {\n /* istanbul ignore else */\n if (!group[values]) {\n console.warn(`Options passed to vue-multiselect do not contain groups, despite the config.`)\n return []\n }\n const groupOptions = filterOptions(group[values], search, label, customLabel)\n\n return groupOptions.length\n ? {\n [groupLabel]: group[groupLabel],\n [values]: groupOptions\n }\n : []\n })\n}\n\nconst flow = (...fns) => (x) => fns.reduce((v, f) => f(v), x)\n\nexport default {\n data () {\n return {\n search: '',\n isOpen: false,\n preferredOpenDirection: 'below',\n optimizedHeight: this.maxHeight\n }\n },\n props: {\n /**\n * Decide whether to filter the results based on search query.\n * Useful for async filtering, where we search through more complex data.\n * @type {Boolean}\n */\n internalSearch: {\n type: Boolean,\n default: true\n },\n /**\n * Array of available options: Objects, Strings or Integers.\n * If array of objects, visible label will default to option.label.\n * If `labal` prop is passed, label will equal option['label']\n * @type {Array}\n */\n options: {\n type: Array,\n required: true\n },\n /**\n * Equivalent to the `multiple` attribute on a `` input.\n * @default false\n * @type {Boolean}\n */\n multiple: {\n type: Boolean,\n default: false\n },\n /**\n * Key to compare objects\n * @default 'id'\n * @type {String}\n */\n trackBy: {\n type: String\n },\n /**\n * Label to look for in option Object\n * @default 'label'\n * @type {String}\n */\n label: {\n type: String\n },\n /**\n * Enable/disable search in options\n * @default true\n * @type {Boolean}\n */\n searchable: {\n type: Boolean,\n default: true\n },\n /**\n * Clear the search input after `)\n * @default true\n * @type {Boolean}\n */\n clearOnSelect: {\n type: Boolean,\n default: true\n },\n /**\n * Hide already selected options\n * @default false\n * @type {Boolean}\n */\n hideSelected: {\n type: Boolean,\n default: false\n },\n /**\n * Equivalent to the `placeholder` attribute on a `` input.\n * @default 'Select option'\n * @type {String}\n */\n placeholder: {\n type: String,\n default: 'Select option'\n },\n /**\n * Allow to remove all selected values\n * @default true\n * @type {Boolean}\n */\n allowEmpty: {\n type: Boolean,\n default: true\n },\n /**\n * Reset this.internalValue, this.search after this.internalValue changes.\n * Useful if want to create a stateless dropdown.\n * @default false\n * @type {Boolean}\n */\n resetAfter: {\n type: Boolean,\n default: false\n },\n /**\n * Enable/disable closing after selecting an option\n * @default true\n * @type {Boolean}\n */\n closeOnSelect: {\n type: Boolean,\n default: true\n },\n /**\n * Function to interpolate the custom label\n * @default false\n * @type {Function}\n */\n customLabel: {\n type: Function,\n default (option, label) {\n if (isEmpty(option)) return ''\n return label ? option[label] : option\n }\n },\n /**\n * Disable / Enable tagging\n * @default false\n * @type {Boolean}\n */\n taggable: {\n type: Boolean,\n default: false\n },\n /**\n * String to show when highlighting a potential tag\n * @default 'Press enter to create a tag'\n * @type {String}\n */\n tagPlaceholder: {\n type: String,\n default: 'Press enter to create a tag'\n },\n /**\n * By default new tags will appear above the search results.\n * Changing to 'bottom' will revert this behaviour\n * and will proritize the search results\n * @default 'top'\n * @type {String}\n */\n tagPosition: {\n type: String,\n default: 'top'\n },\n /**\n * Number of allowed selected options. No limit if 0.\n * @default 0\n * @type {Number}\n */\n max: {\n type: [Number, Boolean],\n default: false\n },\n /**\n * Will be passed with all events as second param.\n * Useful for identifying events origin.\n * @default null\n * @type {String|Integer}\n */\n id: {\n default: null\n },\n /**\n * Limits the options displayed in the dropdown\n * to the first X options.\n * @default 1000\n * @type {Integer}\n */\n optionsLimit: {\n type: Number,\n default: 1000\n },\n /**\n * Name of the property containing\n * the group values\n * @default 1000\n * @type {String}\n */\n groupValues: {\n type: String\n },\n /**\n * Name of the property containing\n * the group label\n * @default 1000\n * @type {String}\n */\n groupLabel: {\n type: String\n },\n /**\n * Allow to select all group values\n * by selecting the group label\n * @default false\n * @type {Boolean}\n */\n groupSelect: {\n type: Boolean,\n default: false\n },\n /**\n * Array of keyboard keys to block\n * when selecting\n * @default 1000\n * @type {String}\n */\n blockKeys: {\n type: Array,\n default () {\n return []\n }\n },\n /**\n * Prevent from wiping up the search value\n * @default false\n * @type {Boolean}\n */\n preserveSearch: {\n type: Boolean,\n default: false\n },\n /**\n * Select 1st options if value is empty\n * @default false\n * @type {Boolean}\n */\n preselectFirst: {\n type: Boolean,\n default: false\n },\n /**\n * Prevent autofocus\n * @default false\n * @type {Boolean}\n */\n preventAutofocus: {\n type: Boolean,\n default: false\n }\n },\n mounted () {\n /* istanbul ignore else */\n if (!this.multiple && this.max) {\n console.warn('[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false.')\n }\n if (\n this.preselectFirst &&\n !this.internalValue.length &&\n this.options.length\n ) {\n this.select(this.filteredOptions[0])\n }\n },\n computed: {\n internalValue () {\n return this.modelValue || this.modelValue === 0\n ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue]\n : []\n },\n filteredOptions () {\n const search = this.search || ''\n const normalizedSearch = search.toLowerCase().trim()\n\n let options = this.options.concat()\n\n /* istanbul ignore else */\n if (this.internalSearch) {\n options = this.groupValues\n ? this.filterAndFlat(options, normalizedSearch, this.label)\n : filterOptions(options, normalizedSearch, this.label, this.customLabel)\n } else {\n options = this.groupValues ? flattenOptions(this.groupValues, this.groupLabel)(options) : options\n }\n\n options = this.hideSelected\n ? options.filter(not(this.isSelected))\n : options\n\n /* istanbul ignore else */\n if (this.taggable && normalizedSearch.length && !this.isExistingOption(normalizedSearch)) {\n if (this.tagPosition === 'bottom') {\n options.push({isTag: true, label: search})\n } else {\n options.unshift({isTag: true, label: search})\n }\n }\n\n return options.slice(0, this.optionsLimit)\n },\n valueKeys () {\n if (this.trackBy) {\n return this.internalValue.map((element) => element[this.trackBy])\n } else {\n return this.internalValue\n }\n },\n optionKeys () {\n const options = this.groupValues ? this.flatAndStrip(this.options) : this.options\n return options.map((element) => this.customLabel(element, this.label).toString().toLowerCase())\n },\n currentOptionLabel () {\n return this.multiple\n ? this.searchable ? '' : this.placeholder\n : this.internalValue.length\n ? this.getOptionLabel(this.internalValue[0])\n : this.searchable ? '' : this.placeholder\n }\n },\n watch: {\n internalValue: {\n handler () {\n /* istanbul ignore else */\n if (this.resetAfter && this.internalValue.length) {\n this.search = ''\n this.$emit('update:modelValue', this.multiple ? [] : null)\n }\n },\n deep: true\n },\n search () {\n this.$emit('search-change', this.search)\n }\n },\n emits: ['open', 'search-change', 'close', 'select', 'update:modelValue', 'remove', 'tag'],\n methods: {\n /**\n * Returns the internalValue in a way it can be emited to the parent\n * @returns {Object||Array||String||Integer}\n */\n getValue () {\n return this.multiple\n ? this.internalValue\n : this.internalValue.length === 0\n ? null\n : this.internalValue[0]\n },\n /**\n * Filters and then flattens the options list\n * @param {Array}\n * @return {Array} returns a filtered and flat options list\n */\n filterAndFlat (options, search, label) {\n return flow(\n filterGroups(search, label, this.groupValues, this.groupLabel, this.customLabel),\n flattenOptions(this.groupValues, this.groupLabel)\n )(options)\n },\n /**\n * Flattens and then strips the group labels from the options list\n * @param {Array}\n * @return {Array} returns a flat options list without group labels\n */\n flatAndStrip (options) {\n return flow(\n flattenOptions(this.groupValues, this.groupLabel),\n stripGroups\n )(options)\n },\n /**\n * Updates the search value\n * @param {String}\n */\n updateSearch (query) {\n this.search = query\n },\n /**\n * Finds out if the given query is already present\n * in the available options\n * @param {String}\n * @return {Boolean} returns true if element is available\n */\n isExistingOption (query) {\n return !this.options\n ? false\n : this.optionKeys.indexOf(query) > -1\n },\n /**\n * Finds out if the given element is already present\n * in the result value\n * @param {Object||String||Integer} option passed element to check\n * @returns {Boolean} returns true if element is selected\n */\n isSelected (option) {\n const opt = this.trackBy\n ? option[this.trackBy]\n : option\n return this.valueKeys.indexOf(opt) > -1\n },\n /**\n * Finds out if the given option is disabled\n * @param {Object||String||Integer} option passed element to check\n * @returns {Boolean} returns true if element is disabled\n */\n isOptionDisabled (option) {\n return !!option.$isDisabled\n },\n /**\n * Returns empty string when options is null/undefined\n * Returns tag query if option is tag.\n * Returns the customLabel() results and casts it to string.\n *\n * @param {Object||String||Integer} Passed option\n * @returns {Object||String}\n */\n getOptionLabel (option) {\n if (isEmpty(option)) return ''\n /* istanbul ignore else */\n if (option.isTag) return option.label\n /* istanbul ignore else */\n if (option.$isLabel) return option.$groupLabel\n\n const label = this.customLabel(option, this.label)\n /* istanbul ignore else */\n if (isEmpty(label)) return ''\n return label\n },\n /**\n * Add the given option to the list of selected options\n * or sets the option as the selected option.\n * If option is already selected -> remove it from the results.\n *\n * @param {Object||String||Integer} option to select/deselect\n * @param {Boolean} block removing\n */\n select (option, key) {\n /* istanbul ignore else */\n if (option.$isLabel && this.groupSelect) {\n this.selectGroup(option)\n return\n }\n if (this.blockKeys.indexOf(key) !== -1 ||\n this.disabled ||\n option.$isDisabled ||\n option.$isLabel\n ) return\n /* istanbul ignore else */\n if (this.max && this.multiple && this.internalValue.length === this.max) return\n /* istanbul ignore else */\n if (key === 'Tab' && !this.pointerDirty) return\n if (option.isTag) {\n this.$emit('tag', option.label, this.id)\n this.search = ''\n if (this.closeOnSelect && !this.multiple) this.deactivate()\n } else {\n const isSelected = this.isSelected(option)\n\n if (isSelected) {\n if (key !== 'Tab') this.removeElement(option)\n return\n }\n\n if (this.multiple) {\n this.$emit('update:modelValue', this.internalValue.concat([option]))\n } else {\n this.$emit('update:modelValue', option)\n }\n\n this.$emit('select', option, this.id)\n\n /* istanbul ignore else */\n if (this.clearOnSelect) this.search = ''\n }\n /* istanbul ignore else */\n if (this.closeOnSelect) this.deactivate()\n },\n /**\n * Add the given group options to the list of selected options\n * If all group optiona are already selected -> remove it from the results.\n *\n * @param {Object||String||Integer} group to select/deselect\n */\n selectGroup (selectedGroup) {\n const group = this.options.find((option) => {\n return option[this.groupLabel] === selectedGroup.$groupLabel\n })\n\n if (!group) return\n\n if (this.wholeGroupSelected(group)) {\n this.$emit('remove', group[this.groupValues], this.id)\n\n const groupValues = this.trackBy ? group[this.groupValues].map(val => val[this.trackBy]) : group[this.groupValues]\n const newValue = this.internalValue.filter(\n option => groupValues.indexOf(this.trackBy ? option[this.trackBy] : option) === -1\n )\n\n this.$emit('update:modelValue', newValue)\n } else {\n let optionsToAdd = group[this.groupValues].filter(\n option => !(this.isOptionDisabled(option) || this.isSelected(option))\n )\n\n // if max is defined then just select options respecting max\n if (this.max) {\n optionsToAdd.splice(this.max - this.internalValue.length)\n }\n\n this.$emit('select', optionsToAdd, this.id)\n this.$emit(\n 'update:modelValue',\n this.internalValue.concat(optionsToAdd)\n )\n }\n\n if (this.closeOnSelect) this.deactivate()\n },\n /**\n * Helper to identify if all values in a group are selected\n *\n * @param {Object} group to validated selected values against\n */\n wholeGroupSelected (group) {\n return group[this.groupValues].every((option) => this.isSelected(option) || this.isOptionDisabled(option)\n )\n },\n /**\n * Helper to identify if all values in a group are disabled\n *\n * @param {Object} group to check for disabled values\n */\n wholeGroupDisabled (group) {\n return group[this.groupValues].every(this.isOptionDisabled)\n },\n /**\n * Removes the given option from the selected options.\n * Additionally checks this.allowEmpty prop if option can be removed when\n * it is the last selected option.\n *\n * @param {type} option description\n * @return {type} description\n */\n removeElement (option, shouldClose = true) {\n /* istanbul ignore else */\n if (this.disabled) return\n /* istanbul ignore else */\n if (option.$isDisabled) return\n /* istanbul ignore else */\n if (!this.allowEmpty && this.internalValue.length <= 1) {\n this.deactivate()\n return\n }\n\n const index = typeof option === 'object'\n ? this.valueKeys.indexOf(option[this.trackBy])\n : this.valueKeys.indexOf(option)\n\n if (this.multiple) {\n const newValue = this.internalValue.slice(0, index).concat(this.internalValue.slice(index + 1))\n this.$emit('update:modelValue', newValue)\n } else {\n this.$emit('update:modelValue', null)\n }\n this.$emit('remove', option, this.id)\n\n /* istanbul ignore else */\n if (this.closeOnSelect && shouldClose) this.deactivate()\n },\n /**\n * Calls this.removeElement() with the last element\n * from this.internalValue (selected element Array)\n *\n * @fires this#removeElement\n */\n removeLastElement () {\n /* istanbul ignore else */\n if (this.blockKeys.indexOf('Delete') !== -1) return\n /* istanbul ignore else */\n if (this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length) {\n this.removeElement(this.internalValue[this.internalValue.length - 1], false)\n }\n },\n /**\n * Opens the multiselect’s dropdown.\n * Sets this.isOpen to TRUE\n */\n activate () {\n /* istanbul ignore else */\n if (this.isOpen || this.disabled) return\n\n this.adjustPosition()\n /* istanbul ignore else */\n if (this.groupValues && this.pointer === 0 && this.filteredOptions.length) {\n this.pointer = 1\n }\n\n this.isOpen = true\n /* istanbul ignore else */\n if (this.searchable) {\n if (!this.preserveSearch) this.search = ''\n if (!this.preventAutofocus) this.$nextTick(() => this.$refs.search && this.$refs.search.focus())\n } else if (!this.preventAutofocus) {\n if (typeof this.$el !== 'undefined') this.$el.focus()\n }\n this.$emit('open', this.id)\n },\n /**\n * Closes the multiselect’s dropdown.\n * Sets this.isOpen to FALSE\n */\n deactivate () {\n /* istanbul ignore else */\n if (!this.isOpen) return\n\n this.isOpen = false\n /* istanbul ignore else */\n if (this.searchable) {\n if (this.$refs.search !== null && typeof this.$refs.search !== 'undefined') this.$refs.search.blur()\n } else {\n if (typeof this.$el !== 'undefined') this.$el.blur()\n }\n if (!this.preserveSearch) this.search = ''\n this.$emit('close', this.getValue(), this.id)\n },\n /**\n * Call this.activate() or this.deactivate()\n * depending on this.isOpen value.\n *\n * @fires this#activate || this#deactivate\n * @property {Boolean} isOpen indicates if dropdown is open\n */\n toggle () {\n this.isOpen\n ? this.deactivate()\n : this.activate()\n },\n /**\n * Updates the hasEnoughSpace variable used for\n * detecting where to expand the dropdown\n */\n adjustPosition () {\n if (typeof window === 'undefined') return\n\n const spaceAbove = this.$el.getBoundingClientRect().top\n const spaceBelow = window.innerHeight - this.$el.getBoundingClientRect().bottom\n const hasEnoughSpaceBelow = spaceBelow > this.maxHeight\n\n if (hasEnoughSpaceBelow || spaceBelow > spaceAbove || this.openDirection === 'below' || this.openDirection === 'bottom') {\n this.preferredOpenDirection = 'below'\n this.optimizedHeight = Math.min(spaceBelow - 40, this.maxHeight)\n } else {\n this.preferredOpenDirection = 'above'\n this.optimizedHeight = Math.min(spaceAbove - 40, this.maxHeight)\n }\n }\n }\n}\n","export default {\n data () {\n return {\n pointer: 0,\n pointerDirty: false\n }\n },\n props: {\n /**\n * Enable/disable highlighting of the pointed value.\n * @type {Boolean}\n * @default true\n */\n showPointer: {\n type: Boolean,\n default: true\n },\n optionHeight: {\n type: Number,\n default: 40\n }\n },\n computed: {\n pointerPosition () {\n return this.pointer * this.optionHeight\n },\n visibleElements () {\n return this.optimizedHeight / this.optionHeight\n }\n },\n watch: {\n filteredOptions () {\n this.pointerAdjust()\n },\n isOpen () {\n this.pointerDirty = false\n },\n pointer () {\n this.$refs.search && this.$refs.search.setAttribute('aria-activedescendant', this.id + '-' + this.pointer.toString())\n }\n },\n methods: {\n optionHighlight (index, option) {\n return {\n 'multiselect__option--highlight': index === this.pointer && this.showPointer,\n 'multiselect__option--selected': this.isSelected(option)\n }\n },\n groupHighlight (index, selectedGroup) {\n if (!this.groupSelect) {\n return [\n 'multiselect__option--disabled',\n {'multiselect__option--group': selectedGroup.$isLabel}\n ]\n }\n\n const group = this.options.find((option) => {\n return option[this.groupLabel] === selectedGroup.$groupLabel\n })\n\n return group && !this.wholeGroupDisabled(group) ? [\n 'multiselect__option--group',\n {'multiselect__option--highlight': index === this.pointer && this.showPointer},\n {'multiselect__option--group-selected': this.wholeGroupSelected(group)}\n ] : 'multiselect__option--disabled'\n },\n addPointerElement ({key} = 'Enter') {\n /* istanbul ignore else */\n if (this.filteredOptions.length > 0) {\n this.select(this.filteredOptions[this.pointer], key)\n }\n this.pointerReset()\n },\n pointerForward () {\n /* istanbul ignore else */\n if (this.pointer < this.filteredOptions.length - 1) {\n this.pointer++\n /* istanbul ignore next */\n if (this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight) {\n this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight\n }\n /* istanbul ignore else */\n if (\n this.filteredOptions[this.pointer] &&\n this.filteredOptions[this.pointer].$isLabel &&\n !this.groupSelect\n ) this.pointerForward()\n }\n this.pointerDirty = true\n },\n pointerBackward () {\n if (this.pointer > 0) {\n this.pointer--\n /* istanbul ignore else */\n if (this.$refs.list.scrollTop >= this.pointerPosition) {\n this.$refs.list.scrollTop = this.pointerPosition\n }\n /* istanbul ignore else */\n if (\n this.filteredOptions[this.pointer] &&\n this.filteredOptions[this.pointer].$isLabel &&\n !this.groupSelect\n ) this.pointerBackward()\n } else {\n /* istanbul ignore else */\n if (\n this.filteredOptions[this.pointer] &&\n this.filteredOptions[0].$isLabel &&\n !this.groupSelect\n ) this.pointerForward()\n }\n this.pointerDirty = true\n },\n pointerReset () {\n /* istanbul ignore else */\n if (!this.closeOnSelect) return\n this.pointer = 0\n /* istanbul ignore else */\n if (this.$refs.list) {\n this.$refs.list.scrollTop = 0\n }\n },\n pointerAdjust () {\n /* istanbul ignore else */\n if (this.pointer >= this.filteredOptions.length - 1) {\n this.pointer = this.filteredOptions.length\n ? this.filteredOptions.length - 1\n : 0\n }\n\n if (this.filteredOptions.length > 0 &&\n this.filteredOptions[this.pointer].$isLabel &&\n !this.groupSelect\n ) {\n this.pointerForward()\n }\n },\n pointerSet (index) {\n this.pointer = index\n this.pointerDirty = true\n }\n }\n}\n","export { default } from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Multiselect.vue?vue&type=script&lang=js\"; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Multiselect.vue?vue&type=script&lang=js\"","import { render } from \"./Multiselect.vue?vue&type=template&id=2fe91855\"\nimport script from \"./Multiselect.vue?vue&type=script&lang=js\"\nexport * from \"./Multiselect.vue?vue&type=script&lang=js\"\n\nimport \"./Multiselect.vue?vue&type=style&index=0&id=2fe91855&lang=css\"\n\nimport exportComponent from \"/home/matt/git/vue-multiselect/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import Multiselect from './Multiselect.vue'\nimport multiselectMixin from './multiselectMixin.js'\nimport pointerMixin from './pointerMixin.js'\n\nexport default Multiselect\n\nexport {Multiselect, multiselectMixin, pointerMixin}\n","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n /* global Symbol -- safe */\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/vue-multiselect.umd.min.js b/dist/vue-multiselect.umd.min.js
new file mode 100644
index 00000000..30ac3b84
--- /dev/null
+++ b/dist/vue-multiselect.umd.min.js
@@ -0,0 +1,2 @@
+(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["vue-multiselect"]=t(require("vue")):e["vue-multiselect"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"00ee":function(e,t,n){var r=n("b622"),i=r("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},"0366":function(e,t,n){var r=n("1c0b");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},"06cf":function(e,t,n){var r=n("83ab"),i=n("d1e7"),o=n("5c6c"),c=n("fc6a"),s=n("c04e"),a=n("5135"),l=n("0cfb"),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=c(e),t=s(t,!0),l)try{return u(e,t)}catch(n){}if(a(e,t))return o(!i.f.call(e,t),e[t])}},"0cfb":function(e,t,n){var r=n("83ab"),i=n("d039"),o=n("cc12");e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d03":function(e,t,n){var r=n("6eeb"),i=Date.prototype,o="Invalid Date",c="toString",s=i[c],a=i.getTime;new Date(NaN)+""!=o&&r(i,c,(function(){var e=a.call(this);return e===e?s.call(this):o}))},"129f":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},"13d5":function(e,t,n){"use strict";var r=n("23e7"),i=n("d58f").left,o=n("a640"),c=n("2d00"),s=n("605d"),a=o("reduce"),l=!s&&c>79&&c<83;r({target:"Array",proto:!0,forced:!a||l},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(e,t,n){var r=n("c6b6"),i=n("9263");e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var o=n.call(e,t);if("object"!==typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"1be4":function(e,t,n){var r=n("d066");e.exports=r("document","documentElement")},"1c0b":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"1d80":function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},"1dde":function(e,t,n){var r=n("d039"),i=n("b622"),o=n("2d00"),c=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[],n=t.constructor={};return n[c]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},"23cb":function(e,t,n){var r=n("a691"),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},"23e7":function(e,t,n){var r=n("da84"),i=n("06cf").f,o=n("9112"),c=n("6eeb"),s=n("ce4e"),a=n("e893"),l=n("94ca");e.exports=function(e,t){var n,u,f,p,d,h,b=e.target,g=e.global,v=e.stat;if(u=g?r:v?r[b]||s(b,{}):(r[b]||{}).prototype,u)for(f in t){if(d=t[f],e.noTargetGet?(h=i(u,f),p=h&&h.value):p=u[f],n=l(g?f:b+(v?".":"#")+f,e.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;a(d,p)}(e.sham||p&&p.sham)&&o(d,"sham",!0),c(u,f,d,e)}}},"241c":function(e,t,n){var r=n("ca84"),i=n("7839"),o=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},"25f0":function(e,t,n){"use strict";var r=n("6eeb"),i=n("825a"),o=n("d039"),c=n("ad6d"),s="toString",a=RegExp.prototype,l=a[s],u=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),f=l.name!=s;(u||f)&&r(RegExp.prototype,s,(function(){var e=i(this),t=String(e.source),n=e.flags,r=String(void 0===n&&e instanceof RegExp&&!("flags"in a)?c.call(e):n);return"/"+t+"/"+r}),{unsafe:!0})},"277d":function(e,t,n){var r=n("23e7"),i=n("e8b5");r({target:"Array",stat:!0},{isArray:i})},"2d00":function(e,t,n){var r,i,o=n("da84"),c=n("342f"),s=o.process,a=s&&s.versions,l=a&&a.v8;l?(r=l.split("."),i=r[0]+r[1]):c&&(r=c.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=c.match(/Chrome\/(\d+)/),r&&(i=r[1]))),e.exports=i&&+i},"342f":function(e,t,n){var r=n("d066");e.exports=r("navigator","userAgent")||""},"37e8":function(e,t,n){var r=n("83ab"),i=n("9bf2"),o=n("825a"),c=n("df75");e.exports=r?Object.defineProperties:function(e,t){o(e);var n,r=c(t),s=r.length,a=0;while(s>a)i.f(e,n=r[a++],t[n]);return e}},"3bbe":function(e,t,n){var r=n("861d");e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"428f":function(e,t,n){var r=n("da84");e.exports=r},"44ad":function(e,t,n){var r=n("d039"),i=n("c6b6"),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},"44d2":function(e,t,n){var r=n("b622"),i=n("7c73"),o=n("9bf2"),c=r("unscopables"),s=Array.prototype;void 0==s[c]&&o.f(s,c,{configurable:!0,value:i(null)}),e.exports=function(e){s[c][e]=!0}},4930:function(e,t,n){var r=n("605d"),i=n("2d00"),o=n("d039");e.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!Symbol.sham&&(r?38===i:i>37&&i<41)}))},"498a":function(e,t,n){"use strict";var r=n("23e7"),i=n("58a8").trim,o=n("c8d2");r({target:"String",proto:!0,forced:o("trim")},{trim:function(){return i(this)}})},"4d64":function(e,t,n){var r=n("fc6a"),i=n("50c4"),o=n("23cb"),c=function(e){return function(t,n,c){var s,a=r(t),l=i(a.length),u=o(c,l);if(e&&n!=n){while(l>u)if(s=a[u++],s!=s)return!0}else for(;l>u;u++)if((e||u in a)&&a[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},"4de4":function(e,t,n){"use strict";var r=n("23e7"),i=n("b727").filter,o=n("1dde"),c=o("filter");r({target:"Array",proto:!0,forced:!c},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},"4e82":function(e,t,n){"use strict";var r=n("23e7"),i=n("1c0b"),o=n("7b0b"),c=n("d039"),s=n("a640"),a=[],l=a.sort,u=c((function(){a.sort(void 0)})),f=c((function(){a.sort(null)})),p=s("sort"),d=u||!f||!p;r({target:"Array",proto:!0,forced:d},{sort:function(e){return void 0===e?l.call(o(this)):l.call(o(this),i(e))}})},"50c4":function(e,t,n){var r=n("a691"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},5135:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},5692:function(e,t,n){var r=n("c430"),i=n("c6cd");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(e,t,n){var r=n("d066"),i=n("241c"),o=n("7418"),c=n("825a");e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(c(e)),n=o.f;return n?t.concat(n(e)):t}},5899:function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(e,t,n){var r=n("1d80"),i=n("5899"),o="["+i+"]",c=RegExp("^"+o+o+"*"),s=RegExp(o+o+"*$"),a=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(c,"")),2&e&&(n=n.replace(s,"")),n}};e.exports={start:a(1),end:a(2),trim:a(3)}},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"605d":function(e,t,n){var r=n("c6b6"),i=n("da84");e.exports="process"==r(i.process)},"65f0":function(e,t,n){var r=n("861d"),i=n("e8b5"),o=n("b622"),c=o("species");e.exports=function(e,t){var n;return i(e)&&(n=e.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?r(n)&&(n=n[c],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},"69f3":function(e,t,n){var r,i,o,c=n("7f9a"),s=n("da84"),a=n("861d"),l=n("9112"),u=n("5135"),f=n("c6cd"),p=n("f772"),d=n("d012"),h=s.WeakMap,b=function(e){return o(e)?i(e):r(e,{})},g=function(e){return function(t){var n;if(!a(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(c){var v=f.state||(f.state=new h),m=v.get,y=v.has,O=v.set;r=function(e,t){return t.facade=e,O.call(v,e,t),t},i=function(e){return m.call(v,e)||{}},o=function(e){return y.call(v,e)}}else{var x=p("state");d[x]=!0,r=function(e,t){return t.facade=e,l(e,x,t),t},i=function(e){return u(e,x)?e[x]:{}},o=function(e){return u(e,x)}}e.exports={set:r,get:i,has:o,enforce:b,getterFor:g}},"6b0d":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n}},"6eeb":function(e,t,n){var r=n("da84"),i=n("9112"),o=n("5135"),c=n("ce4e"),s=n("8925"),a=n("69f3"),l=a.get,u=a.enforce,f=String(String).split("String");(e.exports=function(e,t,n,s){var a,l=!!s&&!!s.unsafe,p=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),a=u(n),a.source||(a.source=f.join("string"==typeof t?t:""))),e!==r?(l?!d&&e[t]&&(p=!0):delete e[t],p?e[t]=n:i(e,t,n)):p?e[t]=n:c(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||s(this)}))},7156:function(e,t,n){var r=n("861d"),i=n("d2bb");e.exports=function(e,t,n){var o,c;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(c=o.prototype)&&c!==n.prototype&&i(e,c),e}},7418:function(e,t){t.f=Object.getOwnPropertySymbols},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(e,t,n){var r=n("1d80");e.exports=function(e){return Object(r(e))}},"7c73":function(e,t,n){var r,i=n("825a"),o=n("37e8"),c=n("7839"),s=n("d012"),a=n("1be4"),l=n("cc12"),u=n("f772"),f=">",p="<",d="prototype",h="script",b=u("IE_PROTO"),g=function(){},v=function(e){return p+h+f+e+p+"/"+h+f},m=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){var e,t=l("iframe"),n="java"+h+":";return t.style.display="none",a.appendChild(t),t.src=String(n),e=t.contentWindow.document,e.open(),e.write(v("document.F=Object")),e.close(),e.F},O=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}O=r?m(r):y();var e=c.length;while(e--)delete O[d][c[e]];return O()};s[b]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(g[d]=i(e),n=new g,g[d]=null,n[b]=e):n=O(),void 0===t?n:o(n,t)}},"7db0":function(e,t,n){"use strict";var r=n("23e7"),i=n("b727").find,o=n("44d2"),c="find",s=!0;c in[]&&Array(1)[c]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(c)},"7f9a":function(e,t,n){var r=n("da84"),i=n("8925"),o=r.WeakMap;e.exports="function"===typeof o&&/native code/.test(i(o))},"825a":function(e,t,n){var r=n("861d");e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},"83ab":function(e,t,n){var r=n("d039");e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(e,t,n){"use strict";var r=n("c04e"),i=n("9bf2"),o=n("5c6c");e.exports=function(e,t,n){var c=r(t);c in e?i.f(e,c,o(0,n)):e[c]=n}},"841c":function(e,t,n){"use strict";var r=n("d784"),i=n("825a"),o=n("1d80"),c=n("129f"),s=n("14c3");r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),a=String(this),l=o.lastIndex;c(l,0)||(o.lastIndex=0);var u=s(o,a);return c(o.lastIndex,l)||(o.lastIndex=l),null===u?-1:u.index}]}))},"861d":function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},8875:function(e,t,n){var r,i,o;(function(n,c){i=[],r=c,o="function"===typeof r?r.apply(t,i):r,void 0===o||(e.exports=o)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var n,r,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,c=/@([^@]*):(\d+):(\d+)\s*$/gi,s=o.exec(d.stack)||c.exec(d.stack),a=s&&s[1]||!1,l=s&&s[2]||!1,u=document.location.href.replace(document.location.hash,""),f=document.getElementsByTagName("script");a===u&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*\n\n\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","function isEmpty (opt) {\n if (opt === 0) return false\n if (Array.isArray(opt) && opt.length === 0) return true\n return !opt\n}\n\nfunction not (fun) {\n return (...params) => !fun(...params)\n}\n\nfunction includes (str, query) {\n /* istanbul ignore else */\n if (str === undefined) str = 'undefined'\n if (str === null) str = 'null'\n if (str === false) str = 'false'\n const text = str.toString().toLowerCase()\n return text.indexOf(query.trim()) !== -1\n}\n\nfunction filterOptions (options, search, label, customLabel) {\n return search ? options\n .filter((option) => includes(customLabel(option, label), search))\n .sort((a, b) => customLabel(a, label).length - customLabel(b, label).length) : options\n}\n\nfunction stripGroups (options) {\n return options.filter((option) => !option.$isLabel)\n}\n\nfunction flattenOptions (values, label) {\n return (options) =>\n options.reduce((prev, curr) => {\n /* istanbul ignore else */\n if (curr[values] && curr[values].length) {\n prev.push({\n $groupLabel: curr[label],\n $isLabel: true\n })\n return prev.concat(curr[values])\n }\n return prev\n }, [])\n}\n\nfunction filterGroups (search, label, values, groupLabel, customLabel) {\n return (groups) =>\n groups.map((group) => {\n /* istanbul ignore else */\n if (!group[values]) {\n console.warn(`Options passed to vue-multiselect do not contain groups, despite the config.`)\n return []\n }\n const groupOptions = filterOptions(group[values], search, label, customLabel)\n\n return groupOptions.length\n ? {\n [groupLabel]: group[groupLabel],\n [values]: groupOptions\n }\n : []\n })\n}\n\nconst flow = (...fns) => (x) => fns.reduce((v, f) => f(v), x)\n\nexport default {\n data () {\n return {\n search: '',\n isOpen: false,\n preferredOpenDirection: 'below',\n optimizedHeight: this.maxHeight\n }\n },\n props: {\n /**\n * Decide whether to filter the results based on search query.\n * Useful for async filtering, where we search through more complex data.\n * @type {Boolean}\n */\n internalSearch: {\n type: Boolean,\n default: true\n },\n /**\n * Array of available options: Objects, Strings or Integers.\n * If array of objects, visible label will default to option.label.\n * If `labal` prop is passed, label will equal option['label']\n * @type {Array}\n */\n options: {\n type: Array,\n required: true\n },\n /**\n * Equivalent to the `multiple` attribute on a `` input.\n * @default false\n * @type {Boolean}\n */\n multiple: {\n type: Boolean,\n default: false\n },\n /**\n * Key to compare objects\n * @default 'id'\n * @type {String}\n */\n trackBy: {\n type: String\n },\n /**\n * Label to look for in option Object\n * @default 'label'\n * @type {String}\n */\n label: {\n type: String\n },\n /**\n * Enable/disable search in options\n * @default true\n * @type {Boolean}\n */\n searchable: {\n type: Boolean,\n default: true\n },\n /**\n * Clear the search input after `)\n * @default true\n * @type {Boolean}\n */\n clearOnSelect: {\n type: Boolean,\n default: true\n },\n /**\n * Hide already selected options\n * @default false\n * @type {Boolean}\n */\n hideSelected: {\n type: Boolean,\n default: false\n },\n /**\n * Equivalent to the `placeholder` attribute on a `` input.\n * @default 'Select option'\n * @type {String}\n */\n placeholder: {\n type: String,\n default: 'Select option'\n },\n /**\n * Allow to remove all selected values\n * @default true\n * @type {Boolean}\n */\n allowEmpty: {\n type: Boolean,\n default: true\n },\n /**\n * Reset this.internalValue, this.search after this.internalValue changes.\n * Useful if want to create a stateless dropdown.\n * @default false\n * @type {Boolean}\n */\n resetAfter: {\n type: Boolean,\n default: false\n },\n /**\n * Enable/disable closing after selecting an option\n * @default true\n * @type {Boolean}\n */\n closeOnSelect: {\n type: Boolean,\n default: true\n },\n /**\n * Function to interpolate the custom label\n * @default false\n * @type {Function}\n */\n customLabel: {\n type: Function,\n default (option, label) {\n if (isEmpty(option)) return ''\n return label ? option[label] : option\n }\n },\n /**\n * Disable / Enable tagging\n * @default false\n * @type {Boolean}\n */\n taggable: {\n type: Boolean,\n default: false\n },\n /**\n * String to show when highlighting a potential tag\n * @default 'Press enter to create a tag'\n * @type {String}\n */\n tagPlaceholder: {\n type: String,\n default: 'Press enter to create a tag'\n },\n /**\n * By default new tags will appear above the search results.\n * Changing to 'bottom' will revert this behaviour\n * and will proritize the search results\n * @default 'top'\n * @type {String}\n */\n tagPosition: {\n type: String,\n default: 'top'\n },\n /**\n * Number of allowed selected options. No limit if 0.\n * @default 0\n * @type {Number}\n */\n max: {\n type: [Number, Boolean],\n default: false\n },\n /**\n * Will be passed with all events as second param.\n * Useful for identifying events origin.\n * @default null\n * @type {String|Integer}\n */\n id: {\n default: null\n },\n /**\n * Limits the options displayed in the dropdown\n * to the first X options.\n * @default 1000\n * @type {Integer}\n */\n optionsLimit: {\n type: Number,\n default: 1000\n },\n /**\n * Name of the property containing\n * the group values\n * @default 1000\n * @type {String}\n */\n groupValues: {\n type: String\n },\n /**\n * Name of the property containing\n * the group label\n * @default 1000\n * @type {String}\n */\n groupLabel: {\n type: String\n },\n /**\n * Allow to select all group values\n * by selecting the group label\n * @default false\n * @type {Boolean}\n */\n groupSelect: {\n type: Boolean,\n default: false\n },\n /**\n * Array of keyboard keys to block\n * when selecting\n * @default 1000\n * @type {String}\n */\n blockKeys: {\n type: Array,\n default () {\n return []\n }\n },\n /**\n * Prevent from wiping up the search value\n * @default false\n * @type {Boolean}\n */\n preserveSearch: {\n type: Boolean,\n default: false\n },\n /**\n * Select 1st options if value is empty\n * @default false\n * @type {Boolean}\n */\n preselectFirst: {\n type: Boolean,\n default: false\n },\n /**\n * Prevent autofocus\n * @default false\n * @type {Boolean}\n */\n preventAutofocus: {\n type: Boolean,\n default: false\n }\n },\n mounted () {\n /* istanbul ignore else */\n if (!this.multiple && this.max) {\n console.warn('[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false.')\n }\n if (\n this.preselectFirst &&\n !this.internalValue.length &&\n this.options.length\n ) {\n this.select(this.filteredOptions[0])\n }\n },\n computed: {\n internalValue () {\n return this.modelValue || this.modelValue === 0\n ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue]\n : []\n },\n filteredOptions () {\n const search = this.search || ''\n const normalizedSearch = search.toLowerCase().trim()\n\n let options = this.options.concat()\n\n /* istanbul ignore else */\n if (this.internalSearch) {\n options = this.groupValues\n ? this.filterAndFlat(options, normalizedSearch, this.label)\n : filterOptions(options, normalizedSearch, this.label, this.customLabel)\n } else {\n options = this.groupValues ? flattenOptions(this.groupValues, this.groupLabel)(options) : options\n }\n\n options = this.hideSelected\n ? options.filter(not(this.isSelected))\n : options\n\n /* istanbul ignore else */\n if (this.taggable && normalizedSearch.length && !this.isExistingOption(normalizedSearch)) {\n if (this.tagPosition === 'bottom') {\n options.push({isTag: true, label: search})\n } else {\n options.unshift({isTag: true, label: search})\n }\n }\n\n return options.slice(0, this.optionsLimit)\n },\n valueKeys () {\n if (this.trackBy) {\n return this.internalValue.map((element) => element[this.trackBy])\n } else {\n return this.internalValue\n }\n },\n optionKeys () {\n const options = this.groupValues ? this.flatAndStrip(this.options) : this.options\n return options.map((element) => this.customLabel(element, this.label).toString().toLowerCase())\n },\n currentOptionLabel () {\n return this.multiple\n ? this.searchable ? '' : this.placeholder\n : this.internalValue.length\n ? this.getOptionLabel(this.internalValue[0])\n : this.searchable ? '' : this.placeholder\n }\n },\n watch: {\n internalValue: {\n handler () {\n /* istanbul ignore else */\n if (this.resetAfter && this.internalValue.length) {\n this.search = ''\n this.$emit('update:modelValue', this.multiple ? [] : null)\n }\n },\n deep: true\n },\n search () {\n this.$emit('search-change', this.search)\n }\n },\n emits: ['open', 'search-change', 'close', 'select', 'update:modelValue', 'remove', 'tag'],\n methods: {\n /**\n * Returns the internalValue in a way it can be emited to the parent\n * @returns {Object||Array||String||Integer}\n */\n getValue () {\n return this.multiple\n ? this.internalValue\n : this.internalValue.length === 0\n ? null\n : this.internalValue[0]\n },\n /**\n * Filters and then flattens the options list\n * @param {Array}\n * @return {Array} returns a filtered and flat options list\n */\n filterAndFlat (options, search, label) {\n return flow(\n filterGroups(search, label, this.groupValues, this.groupLabel, this.customLabel),\n flattenOptions(this.groupValues, this.groupLabel)\n )(options)\n },\n /**\n * Flattens and then strips the group labels from the options list\n * @param {Array}\n * @return {Array} returns a flat options list without group labels\n */\n flatAndStrip (options) {\n return flow(\n flattenOptions(this.groupValues, this.groupLabel),\n stripGroups\n )(options)\n },\n /**\n * Updates the search value\n * @param {String}\n */\n updateSearch (query) {\n this.search = query\n },\n /**\n * Finds out if the given query is already present\n * in the available options\n * @param {String}\n * @return {Boolean} returns true if element is available\n */\n isExistingOption (query) {\n return !this.options\n ? false\n : this.optionKeys.indexOf(query) > -1\n },\n /**\n * Finds out if the given element is already present\n * in the result value\n * @param {Object||String||Integer} option passed element to check\n * @returns {Boolean} returns true if element is selected\n */\n isSelected (option) {\n const opt = this.trackBy\n ? option[this.trackBy]\n : option\n return this.valueKeys.indexOf(opt) > -1\n },\n /**\n * Finds out if the given option is disabled\n * @param {Object||String||Integer} option passed element to check\n * @returns {Boolean} returns true if element is disabled\n */\n isOptionDisabled (option) {\n return !!option.$isDisabled\n },\n /**\n * Returns empty string when options is null/undefined\n * Returns tag query if option is tag.\n * Returns the customLabel() results and casts it to string.\n *\n * @param {Object||String||Integer} Passed option\n * @returns {Object||String}\n */\n getOptionLabel (option) {\n if (isEmpty(option)) return ''\n /* istanbul ignore else */\n if (option.isTag) return option.label\n /* istanbul ignore else */\n if (option.$isLabel) return option.$groupLabel\n\n const label = this.customLabel(option, this.label)\n /* istanbul ignore else */\n if (isEmpty(label)) return ''\n return label\n },\n /**\n * Add the given option to the list of selected options\n * or sets the option as the selected option.\n * If option is already selected -> remove it from the results.\n *\n * @param {Object||String||Integer} option to select/deselect\n * @param {Boolean} block removing\n */\n select (option, key) {\n /* istanbul ignore else */\n if (option.$isLabel && this.groupSelect) {\n this.selectGroup(option)\n return\n }\n if (this.blockKeys.indexOf(key) !== -1 ||\n this.disabled ||\n option.$isDisabled ||\n option.$isLabel\n ) return\n /* istanbul ignore else */\n if (this.max && this.multiple && this.internalValue.length === this.max) return\n /* istanbul ignore else */\n if (key === 'Tab' && !this.pointerDirty) return\n if (option.isTag) {\n this.$emit('tag', option.label, this.id)\n this.search = ''\n if (this.closeOnSelect && !this.multiple) this.deactivate()\n } else {\n const isSelected = this.isSelected(option)\n\n if (isSelected) {\n if (key !== 'Tab') this.removeElement(option)\n return\n }\n\n if (this.multiple) {\n this.$emit('update:modelValue', this.internalValue.concat([option]))\n } else {\n this.$emit('update:modelValue', option)\n }\n\n this.$emit('select', option, this.id)\n\n /* istanbul ignore else */\n if (this.clearOnSelect) this.search = ''\n }\n /* istanbul ignore else */\n if (this.closeOnSelect) this.deactivate()\n },\n /**\n * Add the given group options to the list of selected options\n * If all group optiona are already selected -> remove it from the results.\n *\n * @param {Object||String||Integer} group to select/deselect\n */\n selectGroup (selectedGroup) {\n const group = this.options.find((option) => {\n return option[this.groupLabel] === selectedGroup.$groupLabel\n })\n\n if (!group) return\n\n if (this.wholeGroupSelected(group)) {\n this.$emit('remove', group[this.groupValues], this.id)\n\n const groupValues = this.trackBy ? group[this.groupValues].map(val => val[this.trackBy]) : group[this.groupValues]\n const newValue = this.internalValue.filter(\n option => groupValues.indexOf(this.trackBy ? option[this.trackBy] : option) === -1\n )\n\n this.$emit('update:modelValue', newValue)\n } else {\n let optionsToAdd = group[this.groupValues].filter(\n option => !(this.isOptionDisabled(option) || this.isSelected(option))\n )\n\n // if max is defined then just select options respecting max\n if (this.max) {\n optionsToAdd.splice(this.max - this.internalValue.length)\n }\n\n this.$emit('select', optionsToAdd, this.id)\n this.$emit(\n 'update:modelValue',\n this.internalValue.concat(optionsToAdd)\n )\n }\n\n if (this.closeOnSelect) this.deactivate()\n },\n /**\n * Helper to identify if all values in a group are selected\n *\n * @param {Object} group to validated selected values against\n */\n wholeGroupSelected (group) {\n return group[this.groupValues].every((option) => this.isSelected(option) || this.isOptionDisabled(option)\n )\n },\n /**\n * Helper to identify if all values in a group are disabled\n *\n * @param {Object} group to check for disabled values\n */\n wholeGroupDisabled (group) {\n return group[this.groupValues].every(this.isOptionDisabled)\n },\n /**\n * Removes the given option from the selected options.\n * Additionally checks this.allowEmpty prop if option can be removed when\n * it is the last selected option.\n *\n * @param {type} option description\n * @return {type} description\n */\n removeElement (option, shouldClose = true) {\n /* istanbul ignore else */\n if (this.disabled) return\n /* istanbul ignore else */\n if (option.$isDisabled) return\n /* istanbul ignore else */\n if (!this.allowEmpty && this.internalValue.length <= 1) {\n this.deactivate()\n return\n }\n\n const index = typeof option === 'object'\n ? this.valueKeys.indexOf(option[this.trackBy])\n : this.valueKeys.indexOf(option)\n\n if (this.multiple) {\n const newValue = this.internalValue.slice(0, index).concat(this.internalValue.slice(index + 1))\n this.$emit('update:modelValue', newValue)\n } else {\n this.$emit('update:modelValue', null)\n }\n this.$emit('remove', option, this.id)\n\n /* istanbul ignore else */\n if (this.closeOnSelect && shouldClose) this.deactivate()\n },\n /**\n * Calls this.removeElement() with the last element\n * from this.internalValue (selected element Array)\n *\n * @fires this#removeElement\n */\n removeLastElement () {\n /* istanbul ignore else */\n if (this.blockKeys.indexOf('Delete') !== -1) return\n /* istanbul ignore else */\n if (this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length) {\n this.removeElement(this.internalValue[this.internalValue.length - 1], false)\n }\n },\n /**\n * Opens the multiselect’s dropdown.\n * Sets this.isOpen to TRUE\n */\n activate () {\n /* istanbul ignore else */\n if (this.isOpen || this.disabled) return\n\n this.adjustPosition()\n /* istanbul ignore else */\n if (this.groupValues && this.pointer === 0 && this.filteredOptions.length) {\n this.pointer = 1\n }\n\n this.isOpen = true\n /* istanbul ignore else */\n if (this.searchable) {\n if (!this.preserveSearch) this.search = ''\n if (!this.preventAutofocus) this.$nextTick(() => this.$refs.search && this.$refs.search.focus())\n } else if (!this.preventAutofocus) {\n if (typeof this.$el !== 'undefined') this.$el.focus()\n }\n this.$emit('open', this.id)\n },\n /**\n * Closes the multiselect’s dropdown.\n * Sets this.isOpen to FALSE\n */\n deactivate () {\n /* istanbul ignore else */\n if (!this.isOpen) return\n\n this.isOpen = false\n /* istanbul ignore else */\n if (this.searchable) {\n if (this.$refs.search !== null && typeof this.$refs.search !== 'undefined') this.$refs.search.blur()\n } else {\n if (typeof this.$el !== 'undefined') this.$el.blur()\n }\n if (!this.preserveSearch) this.search = ''\n this.$emit('close', this.getValue(), this.id)\n },\n /**\n * Call this.activate() or this.deactivate()\n * depending on this.isOpen value.\n *\n * @fires this#activate || this#deactivate\n * @property {Boolean} isOpen indicates if dropdown is open\n */\n toggle () {\n this.isOpen\n ? this.deactivate()\n : this.activate()\n },\n /**\n * Updates the hasEnoughSpace variable used for\n * detecting where to expand the dropdown\n */\n adjustPosition () {\n if (typeof window === 'undefined') return\n\n const spaceAbove = this.$el.getBoundingClientRect().top\n const spaceBelow = window.innerHeight - this.$el.getBoundingClientRect().bottom\n const hasEnoughSpaceBelow = spaceBelow > this.maxHeight\n\n if (hasEnoughSpaceBelow || spaceBelow > spaceAbove || this.openDirection === 'below' || this.openDirection === 'bottom') {\n this.preferredOpenDirection = 'below'\n this.optimizedHeight = Math.min(spaceBelow - 40, this.maxHeight)\n } else {\n this.preferredOpenDirection = 'above'\n this.optimizedHeight = Math.min(spaceAbove - 40, this.maxHeight)\n }\n }\n }\n}\n","export default {\n data () {\n return {\n pointer: 0,\n pointerDirty: false\n }\n },\n props: {\n /**\n * Enable/disable highlighting of the pointed value.\n * @type {Boolean}\n * @default true\n */\n showPointer: {\n type: Boolean,\n default: true\n },\n optionHeight: {\n type: Number,\n default: 40\n }\n },\n computed: {\n pointerPosition () {\n return this.pointer * this.optionHeight\n },\n visibleElements () {\n return this.optimizedHeight / this.optionHeight\n }\n },\n watch: {\n filteredOptions () {\n this.pointerAdjust()\n },\n isOpen () {\n this.pointerDirty = false\n },\n pointer () {\n this.$refs.search && this.$refs.search.setAttribute('aria-activedescendant', this.id + '-' + this.pointer.toString())\n }\n },\n methods: {\n optionHighlight (index, option) {\n return {\n 'multiselect__option--highlight': index === this.pointer && this.showPointer,\n 'multiselect__option--selected': this.isSelected(option)\n }\n },\n groupHighlight (index, selectedGroup) {\n if (!this.groupSelect) {\n return [\n 'multiselect__option--disabled',\n {'multiselect__option--group': selectedGroup.$isLabel}\n ]\n }\n\n const group = this.options.find((option) => {\n return option[this.groupLabel] === selectedGroup.$groupLabel\n })\n\n return group && !this.wholeGroupDisabled(group) ? [\n 'multiselect__option--group',\n {'multiselect__option--highlight': index === this.pointer && this.showPointer},\n {'multiselect__option--group-selected': this.wholeGroupSelected(group)}\n ] : 'multiselect__option--disabled'\n },\n addPointerElement ({key} = 'Enter') {\n /* istanbul ignore else */\n if (this.filteredOptions.length > 0) {\n this.select(this.filteredOptions[this.pointer], key)\n }\n this.pointerReset()\n },\n pointerForward () {\n /* istanbul ignore else */\n if (this.pointer < this.filteredOptions.length - 1) {\n this.pointer++\n /* istanbul ignore next */\n if (this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight) {\n this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight\n }\n /* istanbul ignore else */\n if (\n this.filteredOptions[this.pointer] &&\n this.filteredOptions[this.pointer].$isLabel &&\n !this.groupSelect\n ) this.pointerForward()\n }\n this.pointerDirty = true\n },\n pointerBackward () {\n if (this.pointer > 0) {\n this.pointer--\n /* istanbul ignore else */\n if (this.$refs.list.scrollTop >= this.pointerPosition) {\n this.$refs.list.scrollTop = this.pointerPosition\n }\n /* istanbul ignore else */\n if (\n this.filteredOptions[this.pointer] &&\n this.filteredOptions[this.pointer].$isLabel &&\n !this.groupSelect\n ) this.pointerBackward()\n } else {\n /* istanbul ignore else */\n if (\n this.filteredOptions[this.pointer] &&\n this.filteredOptions[0].$isLabel &&\n !this.groupSelect\n ) this.pointerForward()\n }\n this.pointerDirty = true\n },\n pointerReset () {\n /* istanbul ignore else */\n if (!this.closeOnSelect) return\n this.pointer = 0\n /* istanbul ignore else */\n if (this.$refs.list) {\n this.$refs.list.scrollTop = 0\n }\n },\n pointerAdjust () {\n /* istanbul ignore else */\n if (this.pointer >= this.filteredOptions.length - 1) {\n this.pointer = this.filteredOptions.length\n ? this.filteredOptions.length - 1\n : 0\n }\n\n if (this.filteredOptions.length > 0 &&\n this.filteredOptions[this.pointer].$isLabel &&\n !this.groupSelect\n ) {\n this.pointerForward()\n }\n },\n pointerSet (index) {\n this.pointer = index\n this.pointerDirty = true\n }\n }\n}\n","import { render } from \"./Multiselect.vue?vue&type=template&id=2fe91855\"\nimport script from \"./Multiselect.vue?vue&type=script&lang=js\"\nexport * from \"./Multiselect.vue?vue&type=script&lang=js\"\n\nimport \"./Multiselect.vue?vue&type=style&index=0&id=2fe91855&lang=css\"\n\nimport exportComponent from \"/home/matt/git/vue-multiselect/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import Multiselect from './Multiselect.vue'\nimport multiselectMixin from './multiselectMixin.js'\nimport pointerMixin from './pointerMixin.js'\n\nexport default Multiselect\n\nexport {Multiselect, multiselectMixin, pointerMixin}\n","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n /* global Symbol -- safe */\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/docs/CNAME b/docs/CNAME
index 45644587..8f5b7e4a 100644
--- a/docs/CNAME
+++ b/docs/CNAME
@@ -1 +1 @@
-vue-multiselect.js.org
+vue-multiselect.js.org
\ No newline at end of file
diff --git a/docs/assets/ActionDispatcher-09ad388b.js b/docs/assets/ActionDispatcher-09ad388b.js
new file mode 100644
index 00000000..cf3fea14
--- /dev/null
+++ b/docs/assets/ActionDispatcher-09ad388b.js
@@ -0,0 +1,37 @@
+const e=`
+
+ Open console to see logs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+