├── .bowerrc ├── .coveralls.yml ├── .gitignore ├── LICENSE ├── README.md ├── bower.json ├── demo ├── demo.all.js ├── demo.all.js.map ├── demo.html ├── demo.js └── webpack.config.js ├── dist ├── vue-country-select.js ├── vue-country-select.js.map └── vue-country-select.min.js ├── gulpfile.js ├── karma.conf.js ├── package.json ├── screenshot.png ├── src ├── countries.js ├── i18n │ ├── en-US.json │ ├── zh-CN.json │ └── zh-TW.json └── vue-country-select.js ├── test └── specs │ ├── i18n │ └── zh-CN.json │ └── vue-country-select.js └── webpack.config.js /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "lib" 3 | } 4 | -------------------------------------------------------------------------------- /.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: V0pcnMLTQ2UPRP5QiBvWjJ8UOSafUlvG6 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /coverage 3 | /node_modules 4 | npm-debug.log 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Haixing Hu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-country-select 2 | 3 | [![Build Status](https://circleci.com/gh/Haixing-Hu/vue-country-select/tree/master.svg?style=shield)](https://circleci.com/gh/Haixing-Hu/vue-country-select/tree/master) 4 | [![Coverage Status](https://coveralls.io/repos/Haixing-Hu/vue-country-select/badge.svg?branch=master&service=github)](https://coveralls.io/github/Haixing-Hu/vue-country-select?branch=master) 5 | [![bitHound Score](https://www.bithound.io/github/Haixing-Hu/vue-country-select/badges/score.svg)](https://www.bithound.io/github/Haixing-Hu/vue-country-select) 6 | [![Dependency Status](https://david-dm.org/Haixing-Hu/vue-country-select.svg)](https://david-dm.org/Haixing-Hu/vue-country-select) 7 | [![devDependency Status](https://david-dm.org/Haixing-Hu/vue-country-select/dev-status.svg)](https://david-dm.org/Haixing-Hu/vue-country-select#info=devDependencies) 8 | 9 | A Vue.js component implementing the select control used to select countries. 10 | 11 | # Demo 12 | 13 | The demo page is [HERE](http://haixing-hu.github.io/vue-country-select/demo.html). 14 | 15 | ![Screenshot](screenshot.png) 16 | 17 | # Requirements 18 | 19 | - [Vue.js](https://github.com/yyx990803/vue) `^1.0.24` 20 | - [vue-select](https://github.com/Haixing-Hu/vue-select) `^0.2.3` 21 | - [vue-i18n-plugin](https://github.com/Haixing-Hu/vue-i18n) `^0.2.2` This is optional. 22 | 23 | # Instllation 24 | 25 | ## npm 26 | 27 | ```shell 28 | $ npm install vue-country-select 29 | ``` 30 | 31 | ## bower 32 | 33 | ```shell 34 | $ bower install vue-country-select 35 | ``` 36 | 37 | # Usage 38 | 39 | The HTML snippets are as follows: 40 | 41 | ```html 42 |
43 |
44 |
45 | 48 |
49 | 51 | 52 |
53 |
54 |

55 | Selected country: {{result}} 56 |

57 |
58 |
59 |
60 |
61 | ``` 62 | 63 | The Javascript snippets are as follows: 64 | 65 | ```javascript 66 | var Vue = require("vue"); 67 | var vm = new Vue({ 68 | el: "#app", 69 | components: { 70 | "vue-country-select": require("vue-country-select") 71 | }, 72 | data: { 73 | result: null 74 | } 75 | }); 76 | ``` 77 | 78 | # Component Properties 79 | 80 | ## `model` 81 | 82 | The model bind to the control, which must be a two way binding variable. 83 | 84 | Note that the value of model could be set to `null`, and in that case the 85 | selection will be set to nothing. Also, if the selection is set to nothing 86 | (that is, the user delete the text in the input box of the selector), the 87 | value of the model will be set to `null` instead of an empty string. 88 | 89 | ## `searchable` 90 | 91 | The optional flag indicates whether to show the search box. 92 | 93 | ## `language` 94 | 95 | The optional code of language used by the 96 | [select2](https://github.com/select2/select2) plugin. 97 | 98 | The supported languages are exactly the same as the supported languages of the 99 | [select2](https://github.com/select2/select2) plugin. In order to use the 100 | supported language, you must also include the corresponding "i18n" js file of 101 | the [select2](https://github.com/select2/select2) plugin in your HTML file. 102 | 103 | Note that the language code passed to this property could be a locale code 104 | consists of a language code and a country code, e.g., `"en-US"`. The component 105 | will automatically convert the locale code to the language code supported by 106 | the [select2](https://github.com/select2/select2) plugin. Since some languages 107 | have different variants in different country or region, e.g., `"zh-CN"` for the 108 | simplified Chinese and `"zh-TW"` for the traditional Chinese, it's recommended 109 | to use the locale code in the form of `"[language]-[country]"`. 110 | 111 | If this property is not set, and the [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) 112 | plugin is used, the component will use the language code `$language` provided 113 | by the [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin; otherwise, the 114 | component will use the default value `"en-US"`. 115 | 116 | ## `theme` 117 | 118 | The optional name of the theme of the [select2](https://github.com/select2/select2) 119 | plugin. Default value is `'bootstrap'`. 120 | 121 | Note that in order to use the bootstrap theme, you must include the CSS file 122 | from the [select2-bootstrap-theme](https://github.com/select2/select2-bootstrap-theme/) project. 123 | And it's very important that the above CSS file must be included AFTER the 124 | CSS file of the bootstrap. 125 | 126 | The following is the correct order for including CSS files: 127 | 128 | ```html 129 | 130 | 131 | 132 | ``` 133 | 134 | Check the [demo page](http://haixing-hu.github.io/vue-country-select/demo.html) for details. 135 | 136 | # API 137 | 138 | ## `control` 139 | 140 | This property is a reference to the JQuery selection of the base select 141 | control. It could be used to call the APIs of 142 | [select2](https://github.com/select2/select2) plugin. For example, 143 | `select.control.val(val)` will set the value of the select to the 144 | specified value, where `select` is the reference to the `vue-country-select` 145 | component. 146 | 147 | # Localization 148 | 149 | This component could use the [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) 150 | plugin to localize the names of countries. 151 | 152 | In order to localize this component, the localization files provided to the 153 | [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin must provide the 154 | following localization messages: 155 | 156 | ```json 157 | { 158 | "country": { 159 | "AF": "Afghanistan", 160 | "AX": "Åland Islands", 161 | "AL": "Albania", 162 | "DZ": "Algeria", 163 | "AS": "American Samoa", 164 | "AD": "Andorra", 165 | "AO": "Angola", 166 | "AI": "Anguilla", 167 | "AQ": "Antarctica", 168 | "AG": "Antigua and Barbuda", 169 | "AR": "Argentina", 170 | "AM": "Armenia", 171 | "AW": "Aruba", 172 | "AU": "Australia", 173 | "AT": "Austria", 174 | "AZ": "Azerbaijan", 175 | "BS": "Bahamas", 176 | "BH": "Bahrain", 177 | "BD": "Bangladesh", 178 | "BB": "Barbados", 179 | "BY": "Belarus", 180 | "BE": "Belgium", 181 | "BZ": "Belize", 182 | "BJ": "Benin", 183 | "BM": "Bermuda", 184 | "BT": "Bhutan", 185 | "BO": "Bolivia, Plurinational State of", 186 | "BQ": "Bonaire, Sint Eustatius and Saba", 187 | "BA": "Bosnia and Herzegovina", 188 | "BW": "Botswana", 189 | "BV": "Bouvet Island", 190 | "BR": "Brazil", 191 | "IO": "British Indian Ocean Territory", 192 | "BN": "Brunei Darussalam", 193 | "BG": "Bulgaria", 194 | "BF": "Burkina Faso", 195 | "BI": "Burundi", 196 | "KH": "Cambodia", 197 | "CM": "Cameroon", 198 | "CA": "Canada", 199 | "CV": "Cape Verde", 200 | "KY": "Cayman Islands", 201 | "CF": "Central African Republic", 202 | "TD": "Chad", 203 | "CL": "Chile", 204 | "CN": "China", 205 | "CX": "Christmas Island", 206 | "CC": "Cocos (Keeling) Islands", 207 | "CO": "Colombia", 208 | "KM": "Comoros", 209 | "CG": "Congo", 210 | "CD": "Congo, the Democratic Republic of the", 211 | "CK": "Cook Islands", 212 | "CR": "Costa Rica", 213 | "CI": "Côte d'Ivoire", 214 | "HR": "Croatia", 215 | "CU": "Cuba", 216 | "CW": "Curaçao", 217 | "CY": "Cyprus", 218 | "CZ": "Czech Republic", 219 | "DK": "Denmark", 220 | "DJ": "Djibouti", 221 | "DM": "Dominica", 222 | "DO": "Dominican Republic", 223 | "EC": "Ecuador", 224 | "EG": "Egypt", 225 | "SV": "El Salvador", 226 | "GQ": "Equatorial Guinea", 227 | "ER": "Eritrea", 228 | "EE": "Estonia", 229 | "ET": "Ethiopia", 230 | "FK": "Falkland Islands (Malvinas)", 231 | "FO": "Faroe Islands", 232 | "FJ": "Fiji", 233 | "FI": "Finland", 234 | "FR": "France", 235 | "GF": "French Guiana", 236 | "PF": "French Polynesia", 237 | "TF": "French Southern Territories", 238 | "GA": "Gabon", 239 | "GM": "Gambia", 240 | "GE": "Georgia", 241 | "DE": "Germany", 242 | "GH": "Ghana", 243 | "GI": "Gibraltar", 244 | "GR": "Greece", 245 | "GL": "Greenland", 246 | "GD": "Grenada", 247 | "GP": "Guadeloupe", 248 | "GU": "Guam", 249 | "GT": "Guatemala", 250 | "GG": "Guernsey", 251 | "GN": "Guinea", 252 | "GW": "Guinea-Bissau", 253 | "GY": "Guyana", 254 | "HT": "Haiti", 255 | "HM": "Heard Island and McDonald Islands", 256 | "VA": "Holy See (Vatican City State)", 257 | "HN": "Honduras", 258 | "HK": "Hong Kong", 259 | "HU": "Hungary", 260 | "IS": "Iceland", 261 | "IN": "India", 262 | "ID": "Indonesia", 263 | "IR": "Iran, Islamic Republic of", 264 | "IQ": "Iraq", 265 | "IE": "Ireland", 266 | "IM": "Isle of Man", 267 | "IL": "Israel", 268 | "IT": "Italy", 269 | "JM": "Jamaica", 270 | "JP": "Japan", 271 | "JE": "Jersey", 272 | "JO": "Jordan", 273 | "KZ": "Kazakhstan", 274 | "KE": "Kenya", 275 | "KI": "Kiribati", 276 | "KP": "Korea, Democratic People's Republic of", 277 | "KR": "Korea, Republic of", 278 | "KW": "Kuwait", 279 | "KG": "Kyrgyzstan", 280 | "LA": "Lao People's Democratic Republic", 281 | "LV": "Latvia", 282 | "LB": "Lebanon", 283 | "LS": "Lesotho", 284 | "LR": "Liberia", 285 | "LY": "Libya", 286 | "LI": "Liechtenstein", 287 | "LT": "Lithuania", 288 | "LU": "Luxembourg", 289 | "MO": "Macao", 290 | "MK": "Macedonia, the Former Yugoslav Republic of", 291 | "MG": "Madagascar", 292 | "MW": "Malawi", 293 | "MY": "Malaysia", 294 | "MV": "Maldives", 295 | "ML": "Mali", 296 | "MT": "Malta", 297 | "MH": "Marshall Islands", 298 | "MQ": "Martinique", 299 | "MR": "Mauritania", 300 | "MU": "Mauritius", 301 | "YT": "Mayotte", 302 | "MX": "Mexico", 303 | "FM": "Micronesia, Federated States of", 304 | "MD": "Moldova, Republic of", 305 | "MC": "Monaco", 306 | "MN": "Mongolia", 307 | "ME": "Montenegro", 308 | "MS": "Montserrat", 309 | "MA": "Morocco", 310 | "MZ": "Mozambique", 311 | "MM": "Myanmar", 312 | "NA": "Namibia", 313 | "NR": "Nauru", 314 | "NP": "Nepal", 315 | "NL": "Netherlands", 316 | "NC": "New Caledonia", 317 | "NZ": "New Zealand", 318 | "NI": "Nicaragua", 319 | "NE": "Niger", 320 | "NG": "Nigeria", 321 | "NU": "Niue", 322 | "NF": "Norfolk Island", 323 | "MP": "Northern Mariana Islands", 324 | "NO": "Norway", 325 | "OM": "Oman", 326 | "PK": "Pakistan", 327 | "PW": "Palau", 328 | "PS": "Palestine, State of", 329 | "PA": "Panama", 330 | "PG": "Papua New Guinea", 331 | "PY": "Paraguay", 332 | "PE": "Peru", 333 | "PH": "Philippines", 334 | "PN": "Pitcairn", 335 | "PL": "Poland", 336 | "PT": "Portugal", 337 | "PR": "Puerto Rico", 338 | "QA": "Qatar", 339 | "RE": "Réunion", 340 | "RO": "Romania", 341 | "RU": "Russian Federation", 342 | "RW": "Rwanda", 343 | "BL": "Saint Barthélemy", 344 | "SH": "Saint Helena, Ascension and Tristan da Cunha", 345 | "KN": "Saint Kitts and Nevis", 346 | "LC": "Saint Lucia", 347 | "MF": "Saint Martin (French part)", 348 | "PM": "Saint Pierre and Miquelon", 349 | "VC": "Saint Vincent and the Grenadines", 350 | "WS": "Samoa", 351 | "SM": "San Marino", 352 | "ST": "Sao Tome and Principe", 353 | "SA": "Saudi Arabia", 354 | "SN": "Senegal", 355 | "RS": "Serbia", 356 | "SC": "Seychelles", 357 | "SL": "Sierra Leone", 358 | "SG": "Singapore", 359 | "SX": "Sint Maarten (Dutch part)", 360 | "SK": "Slovakia", 361 | "SI": "Slovenia", 362 | "SB": "Solomon Islands", 363 | "SO": "Somalia", 364 | "ZA": "South Africa", 365 | "GS": "South Georgia and the South Sandwich Islands", 366 | "SS": "South Sudan", 367 | "ES": "Spain", 368 | "LK": "Sri Lanka", 369 | "SD": "Sudan", 370 | "SR": "Suriname", 371 | "SJ": "Svalbard and Jan Mayen", 372 | "SZ": "Swaziland", 373 | "SE": "Sweden", 374 | "CH": "Switzerland", 375 | "SY": "Syrian Arab Republic", 376 | "TW": "Taiwan, Province of China", 377 | "TJ": "Tajikistan", 378 | "TZ": "Tanzania, United Republic of", 379 | "TH": "Thailand", 380 | "TL": "Timor-Leste", 381 | "TG": "Togo", 382 | "TK": "Tokelau", 383 | "TO": "Tonga", 384 | "TT": "Trinidad and Tobago", 385 | "TN": "Tunisia", 386 | "TR": "Turkey", 387 | "TM": "Turkmenistan", 388 | "TC": "Turks and Caicos Islands", 389 | "TV": "Tuvalu", 390 | "UG": "Uganda", 391 | "UA": "Ukraine", 392 | "AE": "United Arab Emirates", 393 | "GB": "United Kingdom", 394 | "US": "United States", 395 | "UM": "United States Minor Outlying Islands", 396 | "UY": "Uruguay", 397 | "UZ": "Uzbekistan", 398 | "VU": "Vanuatu", 399 | "VE": "Venezuela, Bolivarian Republic of", 400 | "VN": "Viet Nam", 401 | "VG": "Virgin Islands, British", 402 | "VI": "Virgin Islands, U.S.", 403 | "WF": "Wallis and Futuna", 404 | "EH": "Western Sahara", 405 | "YE": "Yemen", 406 | "ZM": "Zambia", 407 | "ZW": "Zimbabwe" 408 | } 409 | } 410 | ``` 411 | 412 | If no [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) is used, or the 413 | localization file of the plugin does not provide the localization name of a 414 | country, the default English name will be used. 415 | 416 | Some localization files could be found in the `src/i18n` directory. 417 | 418 | # Data 419 | 420 | The country list comes from http://data.okfn.org/data/core/country-list 421 | 422 | # Contributing 423 | 424 | - Fork it ! 425 | - Create your top branch from `dev`: `git branch my-new-topic origin/dev` 426 | - Commit your changes: `git commit -am 'Add some topic'` 427 | - Push to the branch: `git push origin my-new-topic` 428 | - Submit a pull request to `dev` branch of `Haixing-Hu/vue-country-select` repository ! 429 | 430 | # Building and Testing 431 | 432 | First you should install all depended NPM packages. The NPM packages are used 433 | for building and testing this package. 434 | 435 | ```shell 436 | $ npm install 437 | ``` 438 | 439 | Then install all depended bower packages. The bower packages are depended by 440 | this packages. 441 | 442 | ```shell 443 | $ bower install 444 | ``` 445 | 446 | Now you can build the project. 447 | ```shell 448 | $ gulp build 449 | ``` 450 | 451 | The following command will test the project. 452 | ```shell 453 | $ gulp test 454 | ``` 455 | 456 | The following command will perform the test and generate a coverage report. 457 | ```shell 458 | $ gulp test:coverage 459 | ``` 460 | 461 | The following command will perform the test, generate a coverage report, and 462 | upload the coverage report to [coveralls.io](https://coveralls.io/). 463 | ```shell 464 | $ gulp test:coveralls 465 | ``` 466 | 467 | You can also run `bower install` and `gulp build` together with the following 468 | command: 469 | ```shell 470 | npm run build 471 | ``` 472 | 473 | Or run `bower install` and `gulp test:coveralls` together with the following 474 | command: 475 | ```shell 476 | npm run test 477 | ``` 478 | 479 | # License 480 | 481 | [The MIT License](http://opensource.org/licenses/MIT) 482 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-country-select", 3 | "description": "A Vue.js component implementing the select control used to select countries.", 4 | "version": "0.2.3", 5 | "keywords": [ 6 | "Vue.js", 7 | "component", 8 | "select", 9 | "jquery.select2", 10 | "country" 11 | ], 12 | "authors": [ 13 | "Haixing Hu" 14 | ], 15 | "homepage": "https://github.com/Haixing-Hu/vue-country-select", 16 | "license": "MIT", 17 | "repository": { 18 | "type": "git", 19 | "url": "git@github.com:Haixing-Hu/vue-country-select.git" 20 | }, 21 | "main": [ 22 | "src/vue-country-select.js" 23 | ], 24 | "ignore": [ 25 | "lib", 26 | "coverage", 27 | "node_modules" 28 | ], 29 | "dependencies": { 30 | "vue": "^1.0.24", 31 | "vue-select": "^0.3.0" 32 | }, 33 | "devDependencies": { 34 | "vue-i18n-plugin": "^0.2.2" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /demo/demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Demo of vue-country-select 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Demo of vue-country-select

14 |
15 |
16 |
17 | 33 | 36 |
37 | 39 | 40 |
41 |
42 |

43 | Selected country: {{result}} 44 |

45 |
46 |
47 |
48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /demo/demo.js: -------------------------------------------------------------------------------- 1 | var Vue = require("vue"); 2 | var i18n = require("vue-i18n-plugin"); 3 | Vue.use(i18n); 4 | 5 | var vm = new Vue({ 6 | el: "#app", 7 | components: { 8 | "vue-country-select": require("../src/vue-country-select.js") 9 | }, 10 | data: { 11 | language: "en-US", 12 | result: null 13 | }, 14 | watch: { 15 | "language": function(val, oldVal) { 16 | this.$setLanguage(val); 17 | } 18 | } 19 | }); -------------------------------------------------------------------------------- /demo/webpack.config.js: -------------------------------------------------------------------------------- 1 | // Configuration file of webpack 2 | var path = require("path"); 3 | var webpack = require("webpack"); 4 | var BowerWebpackPlugin = require("bower-webpack-plugin"); 5 | var pkg = require("../package.json"); 6 | var dirs = pkg.configs.directories; 7 | var version = process.env.VERSION || pkg.version; 8 | var banner = pkg.name + " v" + version + "\n" + 9 | "(c) " + new Date().getFullYear() + 10 | " " + pkg.author.name + "\n" + 11 | "Released under the " + pkg.license + " License."; 12 | var VueLoader = require('vue-loader'); 13 | 14 | module.exports = { 15 | entry: { 16 | "demo": path.join(__dirname, "demo.js") 17 | }, 18 | module: { 19 | loaders: [ 20 | { test: /\.vue$/, loader: "vue" } 21 | ] 22 | }, 23 | vue: { 24 | loaders: { 25 | html: "raw" // use raw-loader to process HTML 26 | } 27 | }, 28 | resolve: { 29 | root: [__dirname], 30 | modulesDirectories: [ "lib" ] 31 | }, 32 | plugins: [ 33 | // new webpack.optimize.DedupePlugin(), 34 | new BowerWebpackPlugin({ 35 | modulesDirectories: [ "lib" ], 36 | manifestFiles: "bower.json", 37 | includes: /.*/, 38 | excludes: [], 39 | searchResolveModulesDirectories: true 40 | }), 41 | new webpack.BannerPlugin(banner) 42 | ], 43 | output: { 44 | path: __dirname, 45 | filename: "[name].all.js", 46 | sourceMapFilename: "[file].map" 47 | }, 48 | }; 49 | -------------------------------------------------------------------------------- /dist/vue-country-select.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * vue-country-select v0.2.2 3 | * (c) 2016 Haixing Hu 4 | * Released under the MIT License. 5 | */ 6 | /******/ (function(modules) { // webpackBootstrap 7 | /******/ // The module cache 8 | /******/ var installedModules = {}; 9 | /******/ 10 | /******/ // The require function 11 | /******/ function __webpack_require__(moduleId) { 12 | /******/ 13 | /******/ // Check if module is in cache 14 | /******/ if(installedModules[moduleId]) 15 | /******/ return installedModules[moduleId].exports; 16 | /******/ 17 | /******/ // Create a new module (and put it into the cache) 18 | /******/ var module = installedModules[moduleId] = { 19 | /******/ exports: {}, 20 | /******/ id: moduleId, 21 | /******/ loaded: false 22 | /******/ }; 23 | /******/ 24 | /******/ // Execute the module function 25 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 26 | /******/ 27 | /******/ // Flag the module as loaded 28 | /******/ module.loaded = true; 29 | /******/ 30 | /******/ // Return the exports of the module 31 | /******/ return module.exports; 32 | /******/ } 33 | /******/ 34 | /******/ 35 | /******/ // expose the modules object (__webpack_modules__) 36 | /******/ __webpack_require__.m = modules; 37 | /******/ 38 | /******/ // expose the module cache 39 | /******/ __webpack_require__.c = installedModules; 40 | /******/ 41 | /******/ // __webpack_public_path__ 42 | /******/ __webpack_require__.p = ""; 43 | /******/ 44 | /******/ // Load entry module and return exports 45 | /******/ return __webpack_require__(0); 46 | /******/ }) 47 | /************************************************************************/ 48 | /******/ ([ 49 | /* 0 */ 50 | /***/ function(module, exports, __webpack_require__) { 51 | 52 | /** 53 | * A bootstrap style selection (combobox) control used to select countries. 54 | * 55 | * @param model 56 | * the model bind to the control, which must be a two way binding variable. 57 | * @param searchable 58 | * the optional flag indicates whether to show the search box. Default 59 | * value is true. 60 | * @param name 61 | * the optional name of the selection control. 62 | * @param language 63 | * the optional code of language used by the select2 plugin. If it is not set, 64 | * and the [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin is used, 65 | * the component will use the language code `$language` provided by the 66 | * [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin; otherwise, the 67 | * component will use the default value "en-US". 68 | * @param theme 69 | * the optional name of the theme of the select2. Default value is 70 | * "bootstrap". 71 | * @author Haixing Hu 72 | */ 73 | module.exports = { 74 | replace: true, 75 | inherit: false, 76 | template: "", 78 | components: { 79 | "vue-select": __webpack_require__(1) 80 | }, 81 | props: { 82 | model: { 83 | required: true, 84 | twoWay: true 85 | }, 86 | searchable: { 87 | type: Boolean, 88 | required: false, 89 | default: true 90 | }, 91 | name: { 92 | type: String, 93 | required: false, 94 | default: "" 95 | }, 96 | language: { 97 | type: String, 98 | required: false, 99 | default: "" 100 | }, 101 | theme: { 102 | type: String, 103 | required: false, 104 | default: "bootstrap" 105 | } 106 | }, 107 | beforeCompile: function() { 108 | var list = __webpack_require__(4); 109 | this.countries = []; 110 | for (var i = 0; i < list.length; ++i) { 111 | var code = list[i].code; 112 | var name = list[i].name; 113 | if (this.$i18n && this.$i18n.country && this.$i18n.country[code]) { 114 | name = this.$i18n.country[code]; 115 | } 116 | this.countries.push({ 117 | value: code, 118 | text: name 119 | }); 120 | } 121 | } 122 | }; 123 | 124 | 125 | /***/ }, 126 | /* 1 */ 127 | /***/ function(module, exports, __webpack_require__) { 128 | 129 | module.exports = __webpack_require__(2); 130 | 131 | /***/ }, 132 | /* 2 */ 133 | /***/ function(module, exports, __webpack_require__) { 134 | 135 | /** 136 | * The default language used by this component. 137 | */ 138 | var DEFAULT_LANGUAGE = "en-US"; 139 | 140 | /** 141 | * A bootstrap style selection (combobox) control using the select2 plugin. 142 | * 143 | * @param options 144 | * the array of options of the selection control. It could be an array of 145 | * strings, e.g., "['opt1', 'opt2']"; or an array of objects specifying 146 | * the text and value of each option, e.g., 147 | * "[{text: 'name1', value: 'val1'}, {text: 'name2', value: 'val2'}]"; 148 | * or it could be an array of objects specifying the option group, e.g. 149 | * "[{label: 'group1', options: [{text: 'name1', value: 'val1'}, {text: 'name2', value: 'val2'}]}, 150 | * {label: 'group2', options: [{text: 'name3', value: 'val3'}, {text: 'name4', value: 'val4'}]}]". 151 | * @param model 152 | * the model bind to the control, which must be a two way binding variable. 153 | * @param searchable 154 | * the optional flag indicates whether to show the search box. Default value 155 | * is false. 156 | * @param matchValue 157 | * the optional flag indicates whether the searching should match both the 158 | * texts and values of options. Default value is true. 159 | * @param language 160 | * the optional code of language used by the select2 plugin. If it is not set, 161 | * and the [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin is used, 162 | * the component will use the language code `$language` provided by the 163 | * [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin; otherwise, the 164 | * component will use the default value "en-US". 165 | * @param theme 166 | * the optional name of the theme of the select2. Default value is "bootstrap". 167 | * @param name 168 | * the optional name of the selection control. 169 | * @author Haixing Hu 170 | */ 171 | module.exports = { 172 | replace: true, 173 | inherit: false, 174 | template: "", 181 | props: { 182 | options: { 183 | type: Array, 184 | required: true 185 | }, 186 | model: { 187 | required: true, 188 | twoWay: true 189 | }, 190 | searchable: { 191 | type: Boolean, 192 | required: false, 193 | default: false 194 | }, 195 | matchValue: { 196 | type: Boolean, 197 | required: false, 198 | default: true 199 | }, 200 | name: { 201 | type: String, 202 | required: false, 203 | default: "" 204 | }, 205 | language: { 206 | type: String, 207 | required: false, 208 | default: "" 209 | }, 210 | theme: { 211 | type: String, 212 | required: false, 213 | default: "bootstrap" 214 | } 215 | }, 216 | data: function() { 217 | return { 218 | optionsType: "unknown" 219 | } 220 | }, 221 | beforeCompile: function() { 222 | this.isChanging = false; 223 | this.control = null; 224 | this.optionsType = this.getOptionsType(); 225 | }, 226 | watch: { 227 | "options": function(val, oldVal) { 228 | //console.debug("options.change"); 229 | this.optionsType = this.getOptionsType(); 230 | var found = this.inOptions(this.model); 231 | var newValue = (found ? this.model : null); 232 | this.control.removeData("data"); // remove the cached options data 233 | // note that setting the model will automatically changed in the "change" 234 | // event of the select2 control 235 | this.control.val(newValue).trigger("change"); 236 | }, 237 | "model": function(val, oldVal) { 238 | //console.debug("model.change"); 239 | if (! this.isChanging) { 240 | this.isChanging = true; 241 | this.control.val(val).trigger("change"); 242 | this.isChanging = false; 243 | } 244 | } 245 | }, 246 | ready: function() { 247 | var language = this.language; 248 | if (language === null || language === "") { 249 | if (this.$language) { 250 | language = this.$language; 251 | } else { 252 | language = DEFAULT_LANGUAGE; 253 | } 254 | } 255 | var args = { 256 | theme: this.theme, 257 | language: this.getLanguageCode(language) 258 | }; 259 | if (! this.searchable) { 260 | args.minimumResultsForSearch = Infinity; // hide the search box 261 | } else { 262 | if (this.matchValue) { 263 | args.matcher = __webpack_require__(3); 264 | } 265 | } 266 | this.control = $(this.$el); 267 | this.control.select2(args); 268 | var me = this; 269 | this.control.on("change", function(e) { 270 | //console.debug("control.change"); 271 | if (! me.isChanging) { 272 | me.isChanging = true; 273 | me.model = me.control.val(); 274 | me.$nextTick(function () { 275 | me.isChanging = false; 276 | }); 277 | } 278 | }); 279 | }, 280 | methods: { 281 | 282 | /** 283 | * Gets the type of the `options` property of this component. 284 | * 285 | * The `options` property of this component may have the following types: 286 | * - "values": the `options` is an array of strings, e.g., `[value1, value2, value3]`; 287 | * - "options": the `options` is an array of options, e.g., `[{text: 'name1', value: 'val1'}, {text: 'name2', value: 'val2'}]`; 288 | * - "groups": the `options` is an array of option groups, e.g., 289 | * `[{label: 'group1', options: [{text: 'name1', value: 'val1'}, {text: 'name2', value: 'val2'}]}, 290 | * {label: 'group2', options: [{text: 'name3', value: 'val3'}, {text: 'name4', value: 'val4'}]}]`; 291 | * 292 | * @param options 293 | * the new options. 294 | * @return 295 | * the string representing the type of the `options` property of this 296 | * component. 297 | */ 298 | getOptionsType: function() { 299 | if (this.options.length === 0) { 300 | return "values"; 301 | } 302 | var el = this.options[0]; 303 | if (typeof el == "string" || el instanceof String) { 304 | return "values"; 305 | } else if (typeof el.text !== "undefined") { 306 | return "options"; 307 | } else if (typeof el.label !== "undefined") { 308 | return "groups"; 309 | } else { 310 | return "unknown"; 311 | } 312 | }, 313 | 314 | /** 315 | * Tests whether a specified value exists in the options. 316 | * 317 | * @param value 318 | * the value to test. 319 | * @return 320 | * true if the specified value exists in the options; false otherwise. 321 | */ 322 | inOptions: function(value) { 323 | var type = this.getOptionsType(); 324 | var list = this.options; 325 | var i, j; 326 | switch (type) { 327 | case "values": 328 | for (i = 0; i < list.length; ++i) { 329 | if (value === list[i]) { 330 | return true; 331 | } 332 | } 333 | break; 334 | case "options": 335 | for (i = 0; i < list.length; ++i) { 336 | if (value === list[i].value) { 337 | return true; 338 | } 339 | } 340 | break; 341 | case "groups": 342 | for (i = 0; i < list.length; ++i) { 343 | var options = list[i].options; 344 | for (j = 0; j < options.length; ++j) { 345 | if (value === options[j].value) { 346 | return true; 347 | } 348 | } 349 | } 350 | break; 351 | default: 352 | break; 353 | } 354 | return false; 355 | }, 356 | 357 | /** 358 | * Gets the language code from the "language-country" locale code. 359 | * 360 | * The function will strip the language code before the first "-" of a 361 | * locale code. For example, pass "en-US" will returns "en". But for some 362 | * special locales, the function reserves the locale code. For example, 363 | * the "zh-CN" for the simplified Chinese and the "zh-TW" for the 364 | * traditional Chinese. 365 | * 366 | * @param locale 367 | * A locale code. 368 | * @return 369 | * the language code of the locale. 370 | */ 371 | getLanguageCode: function(locale) { 372 | if (locale === null || locale.length === 0) { 373 | return "en"; 374 | } 375 | if (locale.length <= 2) { 376 | return locale; 377 | } else { 378 | switch (locale) { 379 | case "pt-BR": 380 | case "zh-CN": 381 | case "zh-TW": 382 | return locale; 383 | default: 384 | // reserve only the first two letters language code 385 | return locale.substr(0, 2); 386 | } 387 | } 388 | } 389 | } 390 | }; 391 | 392 | 393 | /***/ }, 394 | /* 3 */ 395 | /***/ function(module, exports) { 396 | 397 | 398 | var DIACRITICS = { 399 | '\u24B6': 'A', 400 | '\uFF21': 'A', 401 | '\u00C0': 'A', 402 | '\u00C1': 'A', 403 | '\u00C2': 'A', 404 | '\u1EA6': 'A', 405 | '\u1EA4': 'A', 406 | '\u1EAA': 'A', 407 | '\u1EA8': 'A', 408 | '\u00C3': 'A', 409 | '\u0100': 'A', 410 | '\u0102': 'A', 411 | '\u1EB0': 'A', 412 | '\u1EAE': 'A', 413 | '\u1EB4': 'A', 414 | '\u1EB2': 'A', 415 | '\u0226': 'A', 416 | '\u01E0': 'A', 417 | '\u00C4': 'A', 418 | '\u01DE': 'A', 419 | '\u1EA2': 'A', 420 | '\u00C5': 'A', 421 | '\u01FA': 'A', 422 | '\u01CD': 'A', 423 | '\u0200': 'A', 424 | '\u0202': 'A', 425 | '\u1EA0': 'A', 426 | '\u1EAC': 'A', 427 | '\u1EB6': 'A', 428 | '\u1E00': 'A', 429 | '\u0104': 'A', 430 | '\u023A': 'A', 431 | '\u2C6F': 'A', 432 | '\uA732': 'AA', 433 | '\u00C6': 'AE', 434 | '\u01FC': 'AE', 435 | '\u01E2': 'AE', 436 | '\uA734': 'AO', 437 | '\uA736': 'AU', 438 | '\uA738': 'AV', 439 | '\uA73A': 'AV', 440 | '\uA73C': 'AY', 441 | '\u24B7': 'B', 442 | '\uFF22': 'B', 443 | '\u1E02': 'B', 444 | '\u1E04': 'B', 445 | '\u1E06': 'B', 446 | '\u0243': 'B', 447 | '\u0182': 'B', 448 | '\u0181': 'B', 449 | '\u24B8': 'C', 450 | '\uFF23': 'C', 451 | '\u0106': 'C', 452 | '\u0108': 'C', 453 | '\u010A': 'C', 454 | '\u010C': 'C', 455 | '\u00C7': 'C', 456 | '\u1E08': 'C', 457 | '\u0187': 'C', 458 | '\u023B': 'C', 459 | '\uA73E': 'C', 460 | '\u24B9': 'D', 461 | '\uFF24': 'D', 462 | '\u1E0A': 'D', 463 | '\u010E': 'D', 464 | '\u1E0C': 'D', 465 | '\u1E10': 'D', 466 | '\u1E12': 'D', 467 | '\u1E0E': 'D', 468 | '\u0110': 'D', 469 | '\u018B': 'D', 470 | '\u018A': 'D', 471 | '\u0189': 'D', 472 | '\uA779': 'D', 473 | '\u01F1': 'DZ', 474 | '\u01C4': 'DZ', 475 | '\u01F2': 'Dz', 476 | '\u01C5': 'Dz', 477 | '\u24BA': 'E', 478 | '\uFF25': 'E', 479 | '\u00C8': 'E', 480 | '\u00C9': 'E', 481 | '\u00CA': 'E', 482 | '\u1EC0': 'E', 483 | '\u1EBE': 'E', 484 | '\u1EC4': 'E', 485 | '\u1EC2': 'E', 486 | '\u1EBC': 'E', 487 | '\u0112': 'E', 488 | '\u1E14': 'E', 489 | '\u1E16': 'E', 490 | '\u0114': 'E', 491 | '\u0116': 'E', 492 | '\u00CB': 'E', 493 | '\u1EBA': 'E', 494 | '\u011A': 'E', 495 | '\u0204': 'E', 496 | '\u0206': 'E', 497 | '\u1EB8': 'E', 498 | '\u1EC6': 'E', 499 | '\u0228': 'E', 500 | '\u1E1C': 'E', 501 | '\u0118': 'E', 502 | '\u1E18': 'E', 503 | '\u1E1A': 'E', 504 | '\u0190': 'E', 505 | '\u018E': 'E', 506 | '\u24BB': 'F', 507 | '\uFF26': 'F', 508 | '\u1E1E': 'F', 509 | '\u0191': 'F', 510 | '\uA77B': 'F', 511 | '\u24BC': 'G', 512 | '\uFF27': 'G', 513 | '\u01F4': 'G', 514 | '\u011C': 'G', 515 | '\u1E20': 'G', 516 | '\u011E': 'G', 517 | '\u0120': 'G', 518 | '\u01E6': 'G', 519 | '\u0122': 'G', 520 | '\u01E4': 'G', 521 | '\u0193': 'G', 522 | '\uA7A0': 'G', 523 | '\uA77D': 'G', 524 | '\uA77E': 'G', 525 | '\u24BD': 'H', 526 | '\uFF28': 'H', 527 | '\u0124': 'H', 528 | '\u1E22': 'H', 529 | '\u1E26': 'H', 530 | '\u021E': 'H', 531 | '\u1E24': 'H', 532 | '\u1E28': 'H', 533 | '\u1E2A': 'H', 534 | '\u0126': 'H', 535 | '\u2C67': 'H', 536 | '\u2C75': 'H', 537 | '\uA78D': 'H', 538 | '\u24BE': 'I', 539 | '\uFF29': 'I', 540 | '\u00CC': 'I', 541 | '\u00CD': 'I', 542 | '\u00CE': 'I', 543 | '\u0128': 'I', 544 | '\u012A': 'I', 545 | '\u012C': 'I', 546 | '\u0130': 'I', 547 | '\u00CF': 'I', 548 | '\u1E2E': 'I', 549 | '\u1EC8': 'I', 550 | '\u01CF': 'I', 551 | '\u0208': 'I', 552 | '\u020A': 'I', 553 | '\u1ECA': 'I', 554 | '\u012E': 'I', 555 | '\u1E2C': 'I', 556 | '\u0197': 'I', 557 | '\u24BF': 'J', 558 | '\uFF2A': 'J', 559 | '\u0134': 'J', 560 | '\u0248': 'J', 561 | '\u24C0': 'K', 562 | '\uFF2B': 'K', 563 | '\u1E30': 'K', 564 | '\u01E8': 'K', 565 | '\u1E32': 'K', 566 | '\u0136': 'K', 567 | '\u1E34': 'K', 568 | '\u0198': 'K', 569 | '\u2C69': 'K', 570 | '\uA740': 'K', 571 | '\uA742': 'K', 572 | '\uA744': 'K', 573 | '\uA7A2': 'K', 574 | '\u24C1': 'L', 575 | '\uFF2C': 'L', 576 | '\u013F': 'L', 577 | '\u0139': 'L', 578 | '\u013D': 'L', 579 | '\u1E36': 'L', 580 | '\u1E38': 'L', 581 | '\u013B': 'L', 582 | '\u1E3C': 'L', 583 | '\u1E3A': 'L', 584 | '\u0141': 'L', 585 | '\u023D': 'L', 586 | '\u2C62': 'L', 587 | '\u2C60': 'L', 588 | '\uA748': 'L', 589 | '\uA746': 'L', 590 | '\uA780': 'L', 591 | '\u01C7': 'LJ', 592 | '\u01C8': 'Lj', 593 | '\u24C2': 'M', 594 | '\uFF2D': 'M', 595 | '\u1E3E': 'M', 596 | '\u1E40': 'M', 597 | '\u1E42': 'M', 598 | '\u2C6E': 'M', 599 | '\u019C': 'M', 600 | '\u24C3': 'N', 601 | '\uFF2E': 'N', 602 | '\u01F8': 'N', 603 | '\u0143': 'N', 604 | '\u00D1': 'N', 605 | '\u1E44': 'N', 606 | '\u0147': 'N', 607 | '\u1E46': 'N', 608 | '\u0145': 'N', 609 | '\u1E4A': 'N', 610 | '\u1E48': 'N', 611 | '\u0220': 'N', 612 | '\u019D': 'N', 613 | '\uA790': 'N', 614 | '\uA7A4': 'N', 615 | '\u01CA': 'NJ', 616 | '\u01CB': 'Nj', 617 | '\u24C4': 'O', 618 | '\uFF2F': 'O', 619 | '\u00D2': 'O', 620 | '\u00D3': 'O', 621 | '\u00D4': 'O', 622 | '\u1ED2': 'O', 623 | '\u1ED0': 'O', 624 | '\u1ED6': 'O', 625 | '\u1ED4': 'O', 626 | '\u00D5': 'O', 627 | '\u1E4C': 'O', 628 | '\u022C': 'O', 629 | '\u1E4E': 'O', 630 | '\u014C': 'O', 631 | '\u1E50': 'O', 632 | '\u1E52': 'O', 633 | '\u014E': 'O', 634 | '\u022E': 'O', 635 | '\u0230': 'O', 636 | '\u00D6': 'O', 637 | '\u022A': 'O', 638 | '\u1ECE': 'O', 639 | '\u0150': 'O', 640 | '\u01D1': 'O', 641 | '\u020C': 'O', 642 | '\u020E': 'O', 643 | '\u01A0': 'O', 644 | '\u1EDC': 'O', 645 | '\u1EDA': 'O', 646 | '\u1EE0': 'O', 647 | '\u1EDE': 'O', 648 | '\u1EE2': 'O', 649 | '\u1ECC': 'O', 650 | '\u1ED8': 'O', 651 | '\u01EA': 'O', 652 | '\u01EC': 'O', 653 | '\u00D8': 'O', 654 | '\u01FE': 'O', 655 | '\u0186': 'O', 656 | '\u019F': 'O', 657 | '\uA74A': 'O', 658 | '\uA74C': 'O', 659 | '\u01A2': 'OI', 660 | '\uA74E': 'OO', 661 | '\u0222': 'OU', 662 | '\u24C5': 'P', 663 | '\uFF30': 'P', 664 | '\u1E54': 'P', 665 | '\u1E56': 'P', 666 | '\u01A4': 'P', 667 | '\u2C63': 'P', 668 | '\uA750': 'P', 669 | '\uA752': 'P', 670 | '\uA754': 'P', 671 | '\u24C6': 'Q', 672 | '\uFF31': 'Q', 673 | '\uA756': 'Q', 674 | '\uA758': 'Q', 675 | '\u024A': 'Q', 676 | '\u24C7': 'R', 677 | '\uFF32': 'R', 678 | '\u0154': 'R', 679 | '\u1E58': 'R', 680 | '\u0158': 'R', 681 | '\u0210': 'R', 682 | '\u0212': 'R', 683 | '\u1E5A': 'R', 684 | '\u1E5C': 'R', 685 | '\u0156': 'R', 686 | '\u1E5E': 'R', 687 | '\u024C': 'R', 688 | '\u2C64': 'R', 689 | '\uA75A': 'R', 690 | '\uA7A6': 'R', 691 | '\uA782': 'R', 692 | '\u24C8': 'S', 693 | '\uFF33': 'S', 694 | '\u1E9E': 'S', 695 | '\u015A': 'S', 696 | '\u1E64': 'S', 697 | '\u015C': 'S', 698 | '\u1E60': 'S', 699 | '\u0160': 'S', 700 | '\u1E66': 'S', 701 | '\u1E62': 'S', 702 | '\u1E68': 'S', 703 | '\u0218': 'S', 704 | '\u015E': 'S', 705 | '\u2C7E': 'S', 706 | '\uA7A8': 'S', 707 | '\uA784': 'S', 708 | '\u24C9': 'T', 709 | '\uFF34': 'T', 710 | '\u1E6A': 'T', 711 | '\u0164': 'T', 712 | '\u1E6C': 'T', 713 | '\u021A': 'T', 714 | '\u0162': 'T', 715 | '\u1E70': 'T', 716 | '\u1E6E': 'T', 717 | '\u0166': 'T', 718 | '\u01AC': 'T', 719 | '\u01AE': 'T', 720 | '\u023E': 'T', 721 | '\uA786': 'T', 722 | '\uA728': 'TZ', 723 | '\u24CA': 'U', 724 | '\uFF35': 'U', 725 | '\u00D9': 'U', 726 | '\u00DA': 'U', 727 | '\u00DB': 'U', 728 | '\u0168': 'U', 729 | '\u1E78': 'U', 730 | '\u016A': 'U', 731 | '\u1E7A': 'U', 732 | '\u016C': 'U', 733 | '\u00DC': 'U', 734 | '\u01DB': 'U', 735 | '\u01D7': 'U', 736 | '\u01D5': 'U', 737 | '\u01D9': 'U', 738 | '\u1EE6': 'U', 739 | '\u016E': 'U', 740 | '\u0170': 'U', 741 | '\u01D3': 'U', 742 | '\u0214': 'U', 743 | '\u0216': 'U', 744 | '\u01AF': 'U', 745 | '\u1EEA': 'U', 746 | '\u1EE8': 'U', 747 | '\u1EEE': 'U', 748 | '\u1EEC': 'U', 749 | '\u1EF0': 'U', 750 | '\u1EE4': 'U', 751 | '\u1E72': 'U', 752 | '\u0172': 'U', 753 | '\u1E76': 'U', 754 | '\u1E74': 'U', 755 | '\u0244': 'U', 756 | '\u24CB': 'V', 757 | '\uFF36': 'V', 758 | '\u1E7C': 'V', 759 | '\u1E7E': 'V', 760 | '\u01B2': 'V', 761 | '\uA75E': 'V', 762 | '\u0245': 'V', 763 | '\uA760': 'VY', 764 | '\u24CC': 'W', 765 | '\uFF37': 'W', 766 | '\u1E80': 'W', 767 | '\u1E82': 'W', 768 | '\u0174': 'W', 769 | '\u1E86': 'W', 770 | '\u1E84': 'W', 771 | '\u1E88': 'W', 772 | '\u2C72': 'W', 773 | '\u24CD': 'X', 774 | '\uFF38': 'X', 775 | '\u1E8A': 'X', 776 | '\u1E8C': 'X', 777 | '\u24CE': 'Y', 778 | '\uFF39': 'Y', 779 | '\u1EF2': 'Y', 780 | '\u00DD': 'Y', 781 | '\u0176': 'Y', 782 | '\u1EF8': 'Y', 783 | '\u0232': 'Y', 784 | '\u1E8E': 'Y', 785 | '\u0178': 'Y', 786 | '\u1EF6': 'Y', 787 | '\u1EF4': 'Y', 788 | '\u01B3': 'Y', 789 | '\u024E': 'Y', 790 | '\u1EFE': 'Y', 791 | '\u24CF': 'Z', 792 | '\uFF3A': 'Z', 793 | '\u0179': 'Z', 794 | '\u1E90': 'Z', 795 | '\u017B': 'Z', 796 | '\u017D': 'Z', 797 | '\u1E92': 'Z', 798 | '\u1E94': 'Z', 799 | '\u01B5': 'Z', 800 | '\u0224': 'Z', 801 | '\u2C7F': 'Z', 802 | '\u2C6B': 'Z', 803 | '\uA762': 'Z', 804 | '\u24D0': 'a', 805 | '\uFF41': 'a', 806 | '\u1E9A': 'a', 807 | '\u00E0': 'a', 808 | '\u00E1': 'a', 809 | '\u00E2': 'a', 810 | '\u1EA7': 'a', 811 | '\u1EA5': 'a', 812 | '\u1EAB': 'a', 813 | '\u1EA9': 'a', 814 | '\u00E3': 'a', 815 | '\u0101': 'a', 816 | '\u0103': 'a', 817 | '\u1EB1': 'a', 818 | '\u1EAF': 'a', 819 | '\u1EB5': 'a', 820 | '\u1EB3': 'a', 821 | '\u0227': 'a', 822 | '\u01E1': 'a', 823 | '\u00E4': 'a', 824 | '\u01DF': 'a', 825 | '\u1EA3': 'a', 826 | '\u00E5': 'a', 827 | '\u01FB': 'a', 828 | '\u01CE': 'a', 829 | '\u0201': 'a', 830 | '\u0203': 'a', 831 | '\u1EA1': 'a', 832 | '\u1EAD': 'a', 833 | '\u1EB7': 'a', 834 | '\u1E01': 'a', 835 | '\u0105': 'a', 836 | '\u2C65': 'a', 837 | '\u0250': 'a', 838 | '\uA733': 'aa', 839 | '\u00E6': 'ae', 840 | '\u01FD': 'ae', 841 | '\u01E3': 'ae', 842 | '\uA735': 'ao', 843 | '\uA737': 'au', 844 | '\uA739': 'av', 845 | '\uA73B': 'av', 846 | '\uA73D': 'ay', 847 | '\u24D1': 'b', 848 | '\uFF42': 'b', 849 | '\u1E03': 'b', 850 | '\u1E05': 'b', 851 | '\u1E07': 'b', 852 | '\u0180': 'b', 853 | '\u0183': 'b', 854 | '\u0253': 'b', 855 | '\u24D2': 'c', 856 | '\uFF43': 'c', 857 | '\u0107': 'c', 858 | '\u0109': 'c', 859 | '\u010B': 'c', 860 | '\u010D': 'c', 861 | '\u00E7': 'c', 862 | '\u1E09': 'c', 863 | '\u0188': 'c', 864 | '\u023C': 'c', 865 | '\uA73F': 'c', 866 | '\u2184': 'c', 867 | '\u24D3': 'd', 868 | '\uFF44': 'd', 869 | '\u1E0B': 'd', 870 | '\u010F': 'd', 871 | '\u1E0D': 'd', 872 | '\u1E11': 'd', 873 | '\u1E13': 'd', 874 | '\u1E0F': 'd', 875 | '\u0111': 'd', 876 | '\u018C': 'd', 877 | '\u0256': 'd', 878 | '\u0257': 'd', 879 | '\uA77A': 'd', 880 | '\u01F3': 'dz', 881 | '\u01C6': 'dz', 882 | '\u24D4': 'e', 883 | '\uFF45': 'e', 884 | '\u00E8': 'e', 885 | '\u00E9': 'e', 886 | '\u00EA': 'e', 887 | '\u1EC1': 'e', 888 | '\u1EBF': 'e', 889 | '\u1EC5': 'e', 890 | '\u1EC3': 'e', 891 | '\u1EBD': 'e', 892 | '\u0113': 'e', 893 | '\u1E15': 'e', 894 | '\u1E17': 'e', 895 | '\u0115': 'e', 896 | '\u0117': 'e', 897 | '\u00EB': 'e', 898 | '\u1EBB': 'e', 899 | '\u011B': 'e', 900 | '\u0205': 'e', 901 | '\u0207': 'e', 902 | '\u1EB9': 'e', 903 | '\u1EC7': 'e', 904 | '\u0229': 'e', 905 | '\u1E1D': 'e', 906 | '\u0119': 'e', 907 | '\u1E19': 'e', 908 | '\u1E1B': 'e', 909 | '\u0247': 'e', 910 | '\u025B': 'e', 911 | '\u01DD': 'e', 912 | '\u24D5': 'f', 913 | '\uFF46': 'f', 914 | '\u1E1F': 'f', 915 | '\u0192': 'f', 916 | '\uA77C': 'f', 917 | '\u24D6': 'g', 918 | '\uFF47': 'g', 919 | '\u01F5': 'g', 920 | '\u011D': 'g', 921 | '\u1E21': 'g', 922 | '\u011F': 'g', 923 | '\u0121': 'g', 924 | '\u01E7': 'g', 925 | '\u0123': 'g', 926 | '\u01E5': 'g', 927 | '\u0260': 'g', 928 | '\uA7A1': 'g', 929 | '\u1D79': 'g', 930 | '\uA77F': 'g', 931 | '\u24D7': 'h', 932 | '\uFF48': 'h', 933 | '\u0125': 'h', 934 | '\u1E23': 'h', 935 | '\u1E27': 'h', 936 | '\u021F': 'h', 937 | '\u1E25': 'h', 938 | '\u1E29': 'h', 939 | '\u1E2B': 'h', 940 | '\u1E96': 'h', 941 | '\u0127': 'h', 942 | '\u2C68': 'h', 943 | '\u2C76': 'h', 944 | '\u0265': 'h', 945 | '\u0195': 'hv', 946 | '\u24D8': 'i', 947 | '\uFF49': 'i', 948 | '\u00EC': 'i', 949 | '\u00ED': 'i', 950 | '\u00EE': 'i', 951 | '\u0129': 'i', 952 | '\u012B': 'i', 953 | '\u012D': 'i', 954 | '\u00EF': 'i', 955 | '\u1E2F': 'i', 956 | '\u1EC9': 'i', 957 | '\u01D0': 'i', 958 | '\u0209': 'i', 959 | '\u020B': 'i', 960 | '\u1ECB': 'i', 961 | '\u012F': 'i', 962 | '\u1E2D': 'i', 963 | '\u0268': 'i', 964 | '\u0131': 'i', 965 | '\u24D9': 'j', 966 | '\uFF4A': 'j', 967 | '\u0135': 'j', 968 | '\u01F0': 'j', 969 | '\u0249': 'j', 970 | '\u24DA': 'k', 971 | '\uFF4B': 'k', 972 | '\u1E31': 'k', 973 | '\u01E9': 'k', 974 | '\u1E33': 'k', 975 | '\u0137': 'k', 976 | '\u1E35': 'k', 977 | '\u0199': 'k', 978 | '\u2C6A': 'k', 979 | '\uA741': 'k', 980 | '\uA743': 'k', 981 | '\uA745': 'k', 982 | '\uA7A3': 'k', 983 | '\u24DB': 'l', 984 | '\uFF4C': 'l', 985 | '\u0140': 'l', 986 | '\u013A': 'l', 987 | '\u013E': 'l', 988 | '\u1E37': 'l', 989 | '\u1E39': 'l', 990 | '\u013C': 'l', 991 | '\u1E3D': 'l', 992 | '\u1E3B': 'l', 993 | '\u017F': 'l', 994 | '\u0142': 'l', 995 | '\u019A': 'l', 996 | '\u026B': 'l', 997 | '\u2C61': 'l', 998 | '\uA749': 'l', 999 | '\uA781': 'l', 1000 | '\uA747': 'l', 1001 | '\u01C9': 'lj', 1002 | '\u24DC': 'm', 1003 | '\uFF4D': 'm', 1004 | '\u1E3F': 'm', 1005 | '\u1E41': 'm', 1006 | '\u1E43': 'm', 1007 | '\u0271': 'm', 1008 | '\u026F': 'm', 1009 | '\u24DD': 'n', 1010 | '\uFF4E': 'n', 1011 | '\u01F9': 'n', 1012 | '\u0144': 'n', 1013 | '\u00F1': 'n', 1014 | '\u1E45': 'n', 1015 | '\u0148': 'n', 1016 | '\u1E47': 'n', 1017 | '\u0146': 'n', 1018 | '\u1E4B': 'n', 1019 | '\u1E49': 'n', 1020 | '\u019E': 'n', 1021 | '\u0272': 'n', 1022 | '\u0149': 'n', 1023 | '\uA791': 'n', 1024 | '\uA7A5': 'n', 1025 | '\u01CC': 'nj', 1026 | '\u24DE': 'o', 1027 | '\uFF4F': 'o', 1028 | '\u00F2': 'o', 1029 | '\u00F3': 'o', 1030 | '\u00F4': 'o', 1031 | '\u1ED3': 'o', 1032 | '\u1ED1': 'o', 1033 | '\u1ED7': 'o', 1034 | '\u1ED5': 'o', 1035 | '\u00F5': 'o', 1036 | '\u1E4D': 'o', 1037 | '\u022D': 'o', 1038 | '\u1E4F': 'o', 1039 | '\u014D': 'o', 1040 | '\u1E51': 'o', 1041 | '\u1E53': 'o', 1042 | '\u014F': 'o', 1043 | '\u022F': 'o', 1044 | '\u0231': 'o', 1045 | '\u00F6': 'o', 1046 | '\u022B': 'o', 1047 | '\u1ECF': 'o', 1048 | '\u0151': 'o', 1049 | '\u01D2': 'o', 1050 | '\u020D': 'o', 1051 | '\u020F': 'o', 1052 | '\u01A1': 'o', 1053 | '\u1EDD': 'o', 1054 | '\u1EDB': 'o', 1055 | '\u1EE1': 'o', 1056 | '\u1EDF': 'o', 1057 | '\u1EE3': 'o', 1058 | '\u1ECD': 'o', 1059 | '\u1ED9': 'o', 1060 | '\u01EB': 'o', 1061 | '\u01ED': 'o', 1062 | '\u00F8': 'o', 1063 | '\u01FF': 'o', 1064 | '\u0254': 'o', 1065 | '\uA74B': 'o', 1066 | '\uA74D': 'o', 1067 | '\u0275': 'o', 1068 | '\u01A3': 'oi', 1069 | '\u0223': 'ou', 1070 | '\uA74F': 'oo', 1071 | '\u24DF': 'p', 1072 | '\uFF50': 'p', 1073 | '\u1E55': 'p', 1074 | '\u1E57': 'p', 1075 | '\u01A5': 'p', 1076 | '\u1D7D': 'p', 1077 | '\uA751': 'p', 1078 | '\uA753': 'p', 1079 | '\uA755': 'p', 1080 | '\u24E0': 'q', 1081 | '\uFF51': 'q', 1082 | '\u024B': 'q', 1083 | '\uA757': 'q', 1084 | '\uA759': 'q', 1085 | '\u24E1': 'r', 1086 | '\uFF52': 'r', 1087 | '\u0155': 'r', 1088 | '\u1E59': 'r', 1089 | '\u0159': 'r', 1090 | '\u0211': 'r', 1091 | '\u0213': 'r', 1092 | '\u1E5B': 'r', 1093 | '\u1E5D': 'r', 1094 | '\u0157': 'r', 1095 | '\u1E5F': 'r', 1096 | '\u024D': 'r', 1097 | '\u027D': 'r', 1098 | '\uA75B': 'r', 1099 | '\uA7A7': 'r', 1100 | '\uA783': 'r', 1101 | '\u24E2': 's', 1102 | '\uFF53': 's', 1103 | '\u00DF': 's', 1104 | '\u015B': 's', 1105 | '\u1E65': 's', 1106 | '\u015D': 's', 1107 | '\u1E61': 's', 1108 | '\u0161': 's', 1109 | '\u1E67': 's', 1110 | '\u1E63': 's', 1111 | '\u1E69': 's', 1112 | '\u0219': 's', 1113 | '\u015F': 's', 1114 | '\u023F': 's', 1115 | '\uA7A9': 's', 1116 | '\uA785': 's', 1117 | '\u1E9B': 's', 1118 | '\u24E3': 't', 1119 | '\uFF54': 't', 1120 | '\u1E6B': 't', 1121 | '\u1E97': 't', 1122 | '\u0165': 't', 1123 | '\u1E6D': 't', 1124 | '\u021B': 't', 1125 | '\u0163': 't', 1126 | '\u1E71': 't', 1127 | '\u1E6F': 't', 1128 | '\u0167': 't', 1129 | '\u01AD': 't', 1130 | '\u0288': 't', 1131 | '\u2C66': 't', 1132 | '\uA787': 't', 1133 | '\uA729': 'tz', 1134 | '\u24E4': 'u', 1135 | '\uFF55': 'u', 1136 | '\u00F9': 'u', 1137 | '\u00FA': 'u', 1138 | '\u00FB': 'u', 1139 | '\u0169': 'u', 1140 | '\u1E79': 'u', 1141 | '\u016B': 'u', 1142 | '\u1E7B': 'u', 1143 | '\u016D': 'u', 1144 | '\u00FC': 'u', 1145 | '\u01DC': 'u', 1146 | '\u01D8': 'u', 1147 | '\u01D6': 'u', 1148 | '\u01DA': 'u', 1149 | '\u1EE7': 'u', 1150 | '\u016F': 'u', 1151 | '\u0171': 'u', 1152 | '\u01D4': 'u', 1153 | '\u0215': 'u', 1154 | '\u0217': 'u', 1155 | '\u01B0': 'u', 1156 | '\u1EEB': 'u', 1157 | '\u1EE9': 'u', 1158 | '\u1EEF': 'u', 1159 | '\u1EED': 'u', 1160 | '\u1EF1': 'u', 1161 | '\u1EE5': 'u', 1162 | '\u1E73': 'u', 1163 | '\u0173': 'u', 1164 | '\u1E77': 'u', 1165 | '\u1E75': 'u', 1166 | '\u0289': 'u', 1167 | '\u24E5': 'v', 1168 | '\uFF56': 'v', 1169 | '\u1E7D': 'v', 1170 | '\u1E7F': 'v', 1171 | '\u028B': 'v', 1172 | '\uA75F': 'v', 1173 | '\u028C': 'v', 1174 | '\uA761': 'vy', 1175 | '\u24E6': 'w', 1176 | '\uFF57': 'w', 1177 | '\u1E81': 'w', 1178 | '\u1E83': 'w', 1179 | '\u0175': 'w', 1180 | '\u1E87': 'w', 1181 | '\u1E85': 'w', 1182 | '\u1E98': 'w', 1183 | '\u1E89': 'w', 1184 | '\u2C73': 'w', 1185 | '\u24E7': 'x', 1186 | '\uFF58': 'x', 1187 | '\u1E8B': 'x', 1188 | '\u1E8D': 'x', 1189 | '\u24E8': 'y', 1190 | '\uFF59': 'y', 1191 | '\u1EF3': 'y', 1192 | '\u00FD': 'y', 1193 | '\u0177': 'y', 1194 | '\u1EF9': 'y', 1195 | '\u0233': 'y', 1196 | '\u1E8F': 'y', 1197 | '\u00FF': 'y', 1198 | '\u1EF7': 'y', 1199 | '\u1E99': 'y', 1200 | '\u1EF5': 'y', 1201 | '\u01B4': 'y', 1202 | '\u024F': 'y', 1203 | '\u1EFF': 'y', 1204 | '\u24E9': 'z', 1205 | '\uFF5A': 'z', 1206 | '\u017A': 'z', 1207 | '\u1E91': 'z', 1208 | '\u017C': 'z', 1209 | '\u017E': 'z', 1210 | '\u1E93': 'z', 1211 | '\u1E95': 'z', 1212 | '\u01B6': 'z', 1213 | '\u0225': 'z', 1214 | '\u0240': 'z', 1215 | '\u2C6C': 'z', 1216 | '\uA763': 'z', 1217 | '\u0386': '\u0391', 1218 | '\u0388': '\u0395', 1219 | '\u0389': '\u0397', 1220 | '\u038A': '\u0399', 1221 | '\u03AA': '\u0399', 1222 | '\u038C': '\u039F', 1223 | '\u038E': '\u03A5', 1224 | '\u03AB': '\u03A5', 1225 | '\u038F': '\u03A9', 1226 | '\u03AC': '\u03B1', 1227 | '\u03AD': '\u03B5', 1228 | '\u03AE': '\u03B7', 1229 | '\u03AF': '\u03B9', 1230 | '\u03CA': '\u03B9', 1231 | '\u0390': '\u03B9', 1232 | '\u03CC': '\u03BF', 1233 | '\u03CD': '\u03C5', 1234 | '\u03CB': '\u03C5', 1235 | '\u03B0': '\u03C5', 1236 | '\u03C9': '\u03C9', 1237 | '\u03C2': '\u03C3' 1238 | }; 1239 | 1240 | 1241 | function stripDiacritics (text) { 1242 | // Used 'uni range + named function' from http://jsperf.com/diacritics/18 1243 | function match(a) { 1244 | return DIACRITICS[a] || a; 1245 | } 1246 | return text.replace(/[^\u0000-\u007E]/g, match); 1247 | } 1248 | 1249 | // The following matcher is a modification version of the default matcher 1250 | // of select2 1251 | module.exports = matcher = function(params, data) { 1252 | // Always return the object if there is nothing to compare 1253 | if ($.trim(params.term) === '') { 1254 | return data; 1255 | } 1256 | 1257 | // Do a recursive check for options with children 1258 | if (data.children && data.children.length > 0) { 1259 | // Clone the data object if there are children 1260 | // This is required as we modify the object to remove any non-matches 1261 | var match = $.extend(true, {}, data); 1262 | 1263 | // Check each child of the option 1264 | for (var c = data.children.length - 1; c >= 0; c--) { 1265 | var child = data.children[c]; 1266 | 1267 | var matches = matcher(params, child); 1268 | 1269 | // If there wasn't a match, remove the object in the array 1270 | if (matches == null) { 1271 | match.children.splice(c, 1); 1272 | } 1273 | } 1274 | 1275 | // If any children matched, return the new object 1276 | if (match.children.length > 0) { 1277 | return match; 1278 | } 1279 | 1280 | // If there were no matching children, check just the plain object 1281 | return matcher(params, match); 1282 | } 1283 | 1284 | var original = stripDiacritics(data.text).toUpperCase(); 1285 | var term = stripDiacritics(params.term).toUpperCase(); 1286 | 1287 | // Check if the text contains the term 1288 | if (original.indexOf(term) > -1) { 1289 | return data; 1290 | } 1291 | 1292 | // add by Haixing Hu: also match the value of an option 1293 | if (data.id) { 1294 | var originalValue = stripDiacritics(data.id).toUpperCase(); 1295 | if (originalValue.indexOf(term) > -1) { 1296 | return data; 1297 | } 1298 | } 1299 | 1300 | // If it doesn't contain the term, don't return anything 1301 | return null; 1302 | } 1303 | 1304 | /***/ }, 1305 | /* 4 */ 1306 | /***/ function(module, exports) { 1307 | 1308 | /** 1309 | * The list of all countries with their 2 digit codes (ISO 3166-2) 1310 | * 1311 | * @see http://data.okfn.org/data/core/country-list 1312 | */ 1313 | 1314 | module.exports = [{ 1315 | "name": "Afghanistan", 1316 | "code": "AF" 1317 | }, { 1318 | "name": "Åland Islands", 1319 | "code": "AX" 1320 | }, { 1321 | "name": "Albania", 1322 | "code": "AL" 1323 | }, { 1324 | "name": "Algeria", 1325 | "code": "DZ" 1326 | }, { 1327 | "name": "American Samoa", 1328 | "code": "AS" 1329 | }, { 1330 | "name": "Andorra", 1331 | "code": "AD" 1332 | }, { 1333 | "name": "Angola", 1334 | "code": "AO" 1335 | }, { 1336 | "name": "Anguilla", 1337 | "code": "AI" 1338 | }, { 1339 | "name": "Antarctica", 1340 | "code": "AQ" 1341 | }, { 1342 | "name": "Antigua and Barbuda", 1343 | "code": "AG" 1344 | }, { 1345 | "name": "Argentina", 1346 | "code": "AR" 1347 | }, { 1348 | "name": "Armenia", 1349 | "code": "AM" 1350 | }, { 1351 | "name": "Aruba", 1352 | "code": "AW" 1353 | }, { 1354 | "name": "Australia", 1355 | "code": "AU" 1356 | }, { 1357 | "name": "Austria", 1358 | "code": "AT" 1359 | }, { 1360 | "name": "Azerbaijan", 1361 | "code": "AZ" 1362 | }, { 1363 | "name": "Bahamas", 1364 | "code": "BS" 1365 | }, { 1366 | "name": "Bahrain", 1367 | "code": "BH" 1368 | }, { 1369 | "name": "Bangladesh", 1370 | "code": "BD" 1371 | }, { 1372 | "name": "Barbados", 1373 | "code": "BB" 1374 | }, { 1375 | "name": "Belarus", 1376 | "code": "BY" 1377 | }, { 1378 | "name": "Belgium", 1379 | "code": "BE" 1380 | }, { 1381 | "name": "Belize", 1382 | "code": "BZ" 1383 | }, { 1384 | "name": "Benin", 1385 | "code": "BJ" 1386 | }, { 1387 | "name": "Bermuda", 1388 | "code": "BM" 1389 | }, { 1390 | "name": "Bhutan", 1391 | "code": "BT" 1392 | }, { 1393 | "name": "Bolivia, Plurinational State of", 1394 | "code": "BO" 1395 | }, { 1396 | "name": "Bonaire, Sint Eustatius and Saba", 1397 | "code": "BQ" 1398 | }, { 1399 | "name": "Bosnia and Herzegovina", 1400 | "code": "BA" 1401 | }, { 1402 | "name": "Botswana", 1403 | "code": "BW" 1404 | }, { 1405 | "name": "Bouvet Island", 1406 | "code": "BV" 1407 | }, { 1408 | "name": "Brazil", 1409 | "code": "BR" 1410 | }, { 1411 | "name": "British Indian Ocean Territory", 1412 | "code": "IO" 1413 | }, { 1414 | "name": "Brunei Darussalam", 1415 | "code": "BN" 1416 | }, { 1417 | "name": "Bulgaria", 1418 | "code": "BG" 1419 | }, { 1420 | "name": "Burkina Faso", 1421 | "code": "BF" 1422 | }, { 1423 | "name": "Burundi", 1424 | "code": "BI" 1425 | }, { 1426 | "name": "Cambodia", 1427 | "code": "KH" 1428 | }, { 1429 | "name": "Cameroon", 1430 | "code": "CM" 1431 | }, { 1432 | "name": "Canada", 1433 | "code": "CA" 1434 | }, { 1435 | "name": "Cape Verde", 1436 | "code": "CV" 1437 | }, { 1438 | "name": "Cayman Islands", 1439 | "code": "KY" 1440 | }, { 1441 | "name": "Central African Republic", 1442 | "code": "CF" 1443 | }, { 1444 | "name": "Chad", 1445 | "code": "TD" 1446 | }, { 1447 | "name": "Chile", 1448 | "code": "CL" 1449 | }, { 1450 | "name": "China", 1451 | "code": "CN" 1452 | }, { 1453 | "name": "Christmas Island", 1454 | "code": "CX" 1455 | }, { 1456 | "name": "Cocos (Keeling) Islands", 1457 | "code": "CC" 1458 | }, { 1459 | "name": "Colombia", 1460 | "code": "CO" 1461 | }, { 1462 | "name": "Comoros", 1463 | "code": "KM" 1464 | }, { 1465 | "name": "Congo", 1466 | "code": "CG" 1467 | }, { 1468 | "name": "Congo, the Democratic Republic of the", 1469 | "code": "CD" 1470 | }, { 1471 | "name": "Cook Islands", 1472 | "code": "CK" 1473 | }, { 1474 | "name": "Costa Rica", 1475 | "code": "CR" 1476 | }, { 1477 | "name": "Côte d'Ivoire", 1478 | "code": "CI" 1479 | }, { 1480 | "name": "Croatia", 1481 | "code": "HR" 1482 | }, { 1483 | "name": "Cuba", 1484 | "code": "CU" 1485 | }, { 1486 | "name": "Curaçao", 1487 | "code": "CW" 1488 | }, { 1489 | "name": "Cyprus", 1490 | "code": "CY" 1491 | }, { 1492 | "name": "Czech Republic", 1493 | "code": "CZ" 1494 | }, { 1495 | "name": "Denmark", 1496 | "code": "DK" 1497 | }, { 1498 | "name": "Djibouti", 1499 | "code": "DJ" 1500 | }, { 1501 | "name": "Dominica", 1502 | "code": "DM" 1503 | }, { 1504 | "name": "Dominican Republic", 1505 | "code": "DO" 1506 | }, { 1507 | "name": "Ecuador", 1508 | "code": "EC" 1509 | }, { 1510 | "name": "Egypt", 1511 | "code": "EG" 1512 | }, { 1513 | "name": "El Salvador", 1514 | "code": "SV" 1515 | }, { 1516 | "name": "Equatorial Guinea", 1517 | "code": "GQ" 1518 | }, { 1519 | "name": "Eritrea", 1520 | "code": "ER" 1521 | }, { 1522 | "name": "Estonia", 1523 | "code": "EE" 1524 | }, { 1525 | "name": "Ethiopia", 1526 | "code": "ET" 1527 | }, { 1528 | "name": "Falkland Islands (Malvinas)", 1529 | "code": "FK" 1530 | }, { 1531 | "name": "Faroe Islands", 1532 | "code": "FO" 1533 | }, { 1534 | "name": "Fiji", 1535 | "code": "FJ" 1536 | }, { 1537 | "name": "Finland", 1538 | "code": "FI" 1539 | }, { 1540 | "name": "France", 1541 | "code": "FR" 1542 | }, { 1543 | "name": "French Guiana", 1544 | "code": "GF" 1545 | }, { 1546 | "name": "French Polynesia", 1547 | "code": "PF" 1548 | }, { 1549 | "name": "French Southern Territories", 1550 | "code": "TF" 1551 | }, { 1552 | "name": "Gabon", 1553 | "code": "GA" 1554 | }, { 1555 | "name": "Gambia", 1556 | "code": "GM" 1557 | }, { 1558 | "name": "Georgia", 1559 | "code": "GE" 1560 | }, { 1561 | "name": "Germany", 1562 | "code": "DE" 1563 | }, { 1564 | "name": "Ghana", 1565 | "code": "GH" 1566 | }, { 1567 | "name": "Gibraltar", 1568 | "code": "GI" 1569 | }, { 1570 | "name": "Greece", 1571 | "code": "GR" 1572 | }, { 1573 | "name": "Greenland", 1574 | "code": "GL" 1575 | }, { 1576 | "name": "Grenada", 1577 | "code": "GD" 1578 | }, { 1579 | "name": "Guadeloupe", 1580 | "code": "GP" 1581 | }, { 1582 | "name": "Guam", 1583 | "code": "GU" 1584 | }, { 1585 | "name": "Guatemala", 1586 | "code": "GT" 1587 | }, { 1588 | "name": "Guernsey", 1589 | "code": "GG" 1590 | }, { 1591 | "name": "Guinea", 1592 | "code": "GN" 1593 | }, { 1594 | "name": "Guinea-Bissau", 1595 | "code": "GW" 1596 | }, { 1597 | "name": "Guyana", 1598 | "code": "GY" 1599 | }, { 1600 | "name": "Haiti", 1601 | "code": "HT" 1602 | }, { 1603 | "name": "Heard Island and McDonald Islands", 1604 | "code": "HM" 1605 | }, { 1606 | "name": "Holy See (Vatican City State)", 1607 | "code": "VA" 1608 | }, { 1609 | "name": "Honduras", 1610 | "code": "HN" 1611 | }, { 1612 | "name": "Hong Kong", 1613 | "code": "HK" 1614 | }, { 1615 | "name": "Hungary", 1616 | "code": "HU" 1617 | }, { 1618 | "name": "Iceland", 1619 | "code": "IS" 1620 | }, { 1621 | "name": "India", 1622 | "code": "IN" 1623 | }, { 1624 | "name": "Indonesia", 1625 | "code": "ID" 1626 | }, { 1627 | "name": "Iran, Islamic Republic of", 1628 | "code": "IR" 1629 | }, { 1630 | "name": "Iraq", 1631 | "code": "IQ" 1632 | }, { 1633 | "name": "Ireland", 1634 | "code": "IE" 1635 | }, { 1636 | "name": "Isle of Man", 1637 | "code": "IM" 1638 | }, { 1639 | "name": "Israel", 1640 | "code": "IL" 1641 | }, { 1642 | "name": "Italy", 1643 | "code": "IT" 1644 | }, { 1645 | "name": "Jamaica", 1646 | "code": "JM" 1647 | }, { 1648 | "name": "Japan", 1649 | "code": "JP" 1650 | }, { 1651 | "name": "Jersey", 1652 | "code": "JE" 1653 | }, { 1654 | "name": "Jordan", 1655 | "code": "JO" 1656 | }, { 1657 | "name": "Kazakhstan", 1658 | "code": "KZ" 1659 | }, { 1660 | "name": "Kenya", 1661 | "code": "KE" 1662 | }, { 1663 | "name": "Kiribati", 1664 | "code": "KI" 1665 | }, { 1666 | "name": "Korea, Democratic People's Republic of", 1667 | "code": "KP" 1668 | }, { 1669 | "name": "Korea, Republic of", 1670 | "code": "KR" 1671 | }, { 1672 | "name": "Kuwait", 1673 | "code": "KW" 1674 | }, { 1675 | "name": "Kyrgyzstan", 1676 | "code": "KG" 1677 | }, { 1678 | "name": "Lao People's Democratic Republic", 1679 | "code": "LA" 1680 | }, { 1681 | "name": "Latvia", 1682 | "code": "LV" 1683 | }, { 1684 | "name": "Lebanon", 1685 | "code": "LB" 1686 | }, { 1687 | "name": "Lesotho", 1688 | "code": "LS" 1689 | }, { 1690 | "name": "Liberia", 1691 | "code": "LR" 1692 | }, { 1693 | "name": "Libya", 1694 | "code": "LY" 1695 | }, { 1696 | "name": "Liechtenstein", 1697 | "code": "LI" 1698 | }, { 1699 | "name": "Lithuania", 1700 | "code": "LT" 1701 | }, { 1702 | "name": "Luxembourg", 1703 | "code": "LU" 1704 | }, { 1705 | "name": "Macao", 1706 | "code": "MO" 1707 | }, { 1708 | "name": "Macedonia, the Former Yugoslav Republic of", 1709 | "code": "MK" 1710 | }, { 1711 | "name": "Madagascar", 1712 | "code": "MG" 1713 | }, { 1714 | "name": "Malawi", 1715 | "code": "MW" 1716 | }, { 1717 | "name": "Malaysia", 1718 | "code": "MY" 1719 | }, { 1720 | "name": "Maldives", 1721 | "code": "MV" 1722 | }, { 1723 | "name": "Mali", 1724 | "code": "ML" 1725 | }, { 1726 | "name": "Malta", 1727 | "code": "MT" 1728 | }, { 1729 | "name": "Marshall Islands", 1730 | "code": "MH" 1731 | }, { 1732 | "name": "Martinique", 1733 | "code": "MQ" 1734 | }, { 1735 | "name": "Mauritania", 1736 | "code": "MR" 1737 | }, { 1738 | "name": "Mauritius", 1739 | "code": "MU" 1740 | }, { 1741 | "name": "Mayotte", 1742 | "code": "YT" 1743 | }, { 1744 | "name": "Mexico", 1745 | "code": "MX" 1746 | }, { 1747 | "name": "Micronesia, Federated States of", 1748 | "code": "FM" 1749 | }, { 1750 | "name": "Moldova, Republic of", 1751 | "code": "MD" 1752 | }, { 1753 | "name": "Monaco", 1754 | "code": "MC" 1755 | }, { 1756 | "name": "Mongolia", 1757 | "code": "MN" 1758 | }, { 1759 | "name": "Montenegro", 1760 | "code": "ME" 1761 | }, { 1762 | "name": "Montserrat", 1763 | "code": "MS" 1764 | }, { 1765 | "name": "Morocco", 1766 | "code": "MA" 1767 | }, { 1768 | "name": "Mozambique", 1769 | "code": "MZ" 1770 | }, { 1771 | "name": "Myanmar", 1772 | "code": "MM" 1773 | }, { 1774 | "name": "Namibia", 1775 | "code": "NA" 1776 | }, { 1777 | "name": "Nauru", 1778 | "code": "NR" 1779 | }, { 1780 | "name": "Nepal", 1781 | "code": "NP" 1782 | }, { 1783 | "name": "Netherlands", 1784 | "code": "NL" 1785 | }, { 1786 | "name": "New Caledonia", 1787 | "code": "NC" 1788 | }, { 1789 | "name": "New Zealand", 1790 | "code": "NZ" 1791 | }, { 1792 | "name": "Nicaragua", 1793 | "code": "NI" 1794 | }, { 1795 | "name": "Niger", 1796 | "code": "NE" 1797 | }, { 1798 | "name": "Nigeria", 1799 | "code": "NG" 1800 | }, { 1801 | "name": "Niue", 1802 | "code": "NU" 1803 | }, { 1804 | "name": "Norfolk Island", 1805 | "code": "NF" 1806 | }, { 1807 | "name": "Northern Mariana Islands", 1808 | "code": "MP" 1809 | }, { 1810 | "name": "Norway", 1811 | "code": "NO" 1812 | }, { 1813 | "name": "Oman", 1814 | "code": "OM" 1815 | }, { 1816 | "name": "Pakistan", 1817 | "code": "PK" 1818 | }, { 1819 | "name": "Palau", 1820 | "code": "PW" 1821 | }, { 1822 | "name": "Palestine, State of", 1823 | "code": "PS" 1824 | }, { 1825 | "name": "Panama", 1826 | "code": "PA" 1827 | }, { 1828 | "name": "Papua New Guinea", 1829 | "code": "PG" 1830 | }, { 1831 | "name": "Paraguay", 1832 | "code": "PY" 1833 | }, { 1834 | "name": "Peru", 1835 | "code": "PE" 1836 | }, { 1837 | "name": "Philippines", 1838 | "code": "PH" 1839 | }, { 1840 | "name": "Pitcairn", 1841 | "code": "PN" 1842 | }, { 1843 | "name": "Poland", 1844 | "code": "PL" 1845 | }, { 1846 | "name": "Portugal", 1847 | "code": "PT" 1848 | }, { 1849 | "name": "Puerto Rico", 1850 | "code": "PR" 1851 | }, { 1852 | "name": "Qatar", 1853 | "code": "QA" 1854 | }, { 1855 | "name": "Réunion", 1856 | "code": "RE" 1857 | }, { 1858 | "name": "Romania", 1859 | "code": "RO" 1860 | }, { 1861 | "name": "Russian Federation", 1862 | "code": "RU" 1863 | }, { 1864 | "name": "Rwanda", 1865 | "code": "RW" 1866 | }, { 1867 | "name": "Saint Barthélemy", 1868 | "code": "BL" 1869 | }, { 1870 | "name": "Saint Helena, Ascension and Tristan da Cunha", 1871 | "code": "SH" 1872 | }, { 1873 | "name": "Saint Kitts and Nevis", 1874 | "code": "KN" 1875 | }, { 1876 | "name": "Saint Lucia", 1877 | "code": "LC" 1878 | }, { 1879 | "name": "Saint Martin (French part)", 1880 | "code": "MF" 1881 | }, { 1882 | "name": "Saint Pierre and Miquelon", 1883 | "code": "PM" 1884 | }, { 1885 | "name": "Saint Vincent and the Grenadines", 1886 | "code": "VC" 1887 | }, { 1888 | "name": "Samoa", 1889 | "code": "WS" 1890 | }, { 1891 | "name": "San Marino", 1892 | "code": "SM" 1893 | }, { 1894 | "name": "Sao Tome and Principe", 1895 | "code": "ST" 1896 | }, { 1897 | "name": "Saudi Arabia", 1898 | "code": "SA" 1899 | }, { 1900 | "name": "Senegal", 1901 | "code": "SN" 1902 | }, { 1903 | "name": "Serbia", 1904 | "code": "RS" 1905 | }, { 1906 | "name": "Seychelles", 1907 | "code": "SC" 1908 | }, { 1909 | "name": "Sierra Leone", 1910 | "code": "SL" 1911 | }, { 1912 | "name": "Singapore", 1913 | "code": "SG" 1914 | }, { 1915 | "name": "Sint Maarten (Dutch part)", 1916 | "code": "SX" 1917 | }, { 1918 | "name": "Slovakia", 1919 | "code": "SK" 1920 | }, { 1921 | "name": "Slovenia", 1922 | "code": "SI" 1923 | }, { 1924 | "name": "Solomon Islands", 1925 | "code": "SB" 1926 | }, { 1927 | "name": "Somalia", 1928 | "code": "SO" 1929 | }, { 1930 | "name": "South Africa", 1931 | "code": "ZA" 1932 | }, { 1933 | "name": "South Georgia and the South Sandwich Islands", 1934 | "code": "GS" 1935 | }, { 1936 | "name": "South Sudan", 1937 | "code": "SS" 1938 | }, { 1939 | "name": "Spain", 1940 | "code": "ES" 1941 | }, { 1942 | "name": "Sri Lanka", 1943 | "code": "LK" 1944 | }, { 1945 | "name": "Sudan", 1946 | "code": "SD" 1947 | }, { 1948 | "name": "Suriname", 1949 | "code": "SR" 1950 | }, { 1951 | "name": "Svalbard and Jan Mayen", 1952 | "code": "SJ" 1953 | }, { 1954 | "name": "Swaziland", 1955 | "code": "SZ" 1956 | }, { 1957 | "name": "Sweden", 1958 | "code": "SE" 1959 | }, { 1960 | "name": "Switzerland", 1961 | "code": "CH" 1962 | }, { 1963 | "name": "Syrian Arab Republic", 1964 | "code": "SY" 1965 | }, { 1966 | "name": "Taiwan, Province of China", 1967 | "code": "TW" 1968 | }, { 1969 | "name": "Tajikistan", 1970 | "code": "TJ" 1971 | }, { 1972 | "name": "Tanzania, United Republic of", 1973 | "code": "TZ" 1974 | }, { 1975 | "name": "Thailand", 1976 | "code": "TH" 1977 | }, { 1978 | "name": "Timor-Leste", 1979 | "code": "TL" 1980 | }, { 1981 | "name": "Togo", 1982 | "code": "TG" 1983 | }, { 1984 | "name": "Tokelau", 1985 | "code": "TK" 1986 | }, { 1987 | "name": "Tonga", 1988 | "code": "TO" 1989 | }, { 1990 | "name": "Trinidad and Tobago", 1991 | "code": "TT" 1992 | }, { 1993 | "name": "Tunisia", 1994 | "code": "TN" 1995 | }, { 1996 | "name": "Turkey", 1997 | "code": "TR" 1998 | }, { 1999 | "name": "Turkmenistan", 2000 | "code": "TM" 2001 | }, { 2002 | "name": "Turks and Caicos Islands", 2003 | "code": "TC" 2004 | }, { 2005 | "name": "Tuvalu", 2006 | "code": "TV" 2007 | }, { 2008 | "name": "Uganda", 2009 | "code": "UG" 2010 | }, { 2011 | "name": "Ukraine", 2012 | "code": "UA" 2013 | }, { 2014 | "name": "United Arab Emirates", 2015 | "code": "AE" 2016 | }, { 2017 | "name": "United Kingdom", 2018 | "code": "GB" 2019 | }, { 2020 | "name": "United States", 2021 | "code": "US" 2022 | }, { 2023 | "name": "United States Minor Outlying Islands", 2024 | "code": "UM" 2025 | }, { 2026 | "name": "Uruguay", 2027 | "code": "UY" 2028 | }, { 2029 | "name": "Uzbekistan", 2030 | "code": "UZ" 2031 | }, { 2032 | "name": "Vanuatu", 2033 | "code": "VU" 2034 | }, { 2035 | "name": "Venezuela, Bolivarian Republic of", 2036 | "code": "VE" 2037 | }, { 2038 | "name": "Viet Nam", 2039 | "code": "VN" 2040 | }, { 2041 | "name": "Virgin Islands, British", 2042 | "code": "VG" 2043 | }, { 2044 | "name": "Virgin Islands, U.S.", 2045 | "code": "VI" 2046 | }, { 2047 | "name": "Wallis and Futuna", 2048 | "code": "WF" 2049 | }, { 2050 | "name": "Western Sahara", 2051 | "code": "EH" 2052 | }, { 2053 | "name": "Yemen", 2054 | "code": "YE" 2055 | }, { 2056 | "name": "Zambia", 2057 | "code": "ZM" 2058 | }, { 2059 | "name": "Zimbabwe", 2060 | "code": "ZW" 2061 | }]; 2062 | 2063 | /***/ } 2064 | /******/ ]); 2065 | //# sourceMappingURL=vue-country-select.js.map -------------------------------------------------------------------------------- /dist/vue-country-select.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap a945afc763e88703410a","webpack:///./src/vue-country-select.js","webpack:///vue-select (bower component)","webpack:///./lib/vue-select/src/vue-select.js","webpack:///./lib/vue-select/src/value-text-matcher.js","webpack:///./src/countries.js"],"names":[],"mappings":";;;;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;;;;;;ACtEA,yC;;;;;;ACAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yCAAwC;AACxC;AACA,UAAS,6BAA6B,GAAG,6BAA6B;AACtE;AACA,UAAS,4BAA4B,6BAA6B,GAAG,6BAA6B,EAAE;AACpG,UAAS,4BAA4B,6BAA6B,GAAG,6BAA6B,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAA+F,KAAK;AACpG,uGAAsG,UAAU;AAChH;AACA,4EAA2E,UAAU;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC;AACtC;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA8C;AAC9C,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA,MAAK;AACL,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,oEAAmE,6BAA6B,GAAG,6BAA6B;AAChI;AACA,aAAY,4BAA4B,6BAA6B,GAAG,6BAA6B,EAAE;AACvG,aAAY,4BAA4B,6BAA6B,GAAG,6BAA6B,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA,QAAO;AACP;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,6DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA,sBAAqB,oBAAoB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAiC;;AAEjC;AACA,2CAA0C,QAAQ;AAClD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,E;;;;;;ACz4BA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC;AACD;AACA;AACA,EAAC,E","file":"vue-country-select.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap a945afc763e88703410a\n **/","/**\n * A bootstrap style selection (combobox) control used to select countries.\n *\n * @param model\n * the model bind to the control, which must be a two way binding variable.\n * @param searchable\n * the optional flag indicates whether to show the search box. Default\n * value is true.\n * @param name\n * the optional name of the selection control.\n * @param language\n * the optional code of language used by the select2 plugin. If it is not set,\n * and the [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin is used,\n * the component will use the language code `$language` provided by the\n * [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin; otherwise, the\n * component will use the default value \"en-US\".\n * @param theme\n * the optional name of the theme of the select2. Default value is\n * \"bootstrap\".\n * @author Haixing Hu\n */\nmodule.exports = {\n replace: true,\n inherit: false,\n template: \"\",\n components: {\n \"vue-select\": require(\"vue-select\")\n },\n props: {\n model: {\n required: true,\n twoWay: true\n },\n searchable: {\n type: Boolean,\n required: false,\n default: true\n },\n name: {\n type: String,\n required: false,\n default: \"\"\n },\n language: {\n type: String,\n required: false,\n default: \"\"\n },\n theme: {\n type: String,\n required: false,\n default: \"bootstrap\"\n }\n },\n beforeCompile: function() {\n var list = require(\"./countries.js\");\n this.countries = [];\n for (var i = 0; i < list.length; ++i) {\n var code = list[i].code;\n var name = list[i].name;\n if (this.$i18n && this.$i18n.country && this.$i18n.country[code]) {\n name = this.$i18n.country[code];\n }\n this.countries.push({\n value: code,\n text: name\n });\n }\n }\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/vue-country-select.js\n ** module id = 0\n ** module chunks = 0\n **/","module.exports = require(\"./src/vue-select.js\");\n\n\n/*****************\n ** WEBPACK FOOTER\n ** vue-select (bower component)\n ** module id = 1\n ** module chunks = 0\n **/","/**\n * The default language used by this component.\n */\nvar DEFAULT_LANGUAGE = \"en-US\";\n\n/**\n * A bootstrap style selection (combobox) control using the select2 plugin.\n *\n * @param options\n * the array of options of the selection control. It could be an array of\n * strings, e.g., \"['opt1', 'opt2']\"; or an array of objects specifying\n * the text and value of each option, e.g.,\n * \"[{text: 'name1', value: 'val1'}, {text: 'name2', value: 'val2'}]\";\n * or it could be an array of objects specifying the option group, e.g.\n * \"[{label: 'group1', options: [{text: 'name1', value: 'val1'}, {text: 'name2', value: 'val2'}]},\n * {label: 'group2', options: [{text: 'name3', value: 'val3'}, {text: 'name4', value: 'val4'}]}]\".\n * @param model\n * the model bind to the control, which must be a two way binding variable.\n * @param searchable\n * the optional flag indicates whether to show the search box. Default value\n * is false.\n * @param matchValue\n * the optional flag indicates whether the searching should match both the\n * texts and values of options. Default value is true.\n * @param language\n * the optional code of language used by the select2 plugin. If it is not set,\n * and the [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin is used,\n * the component will use the language code `$language` provided by the\n * [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin; otherwise, the\n * component will use the default value \"en-US\".\n * @param theme\n * the optional name of the theme of the select2. Default value is \"bootstrap\".\n * @param name\n * the optional name of the selection control.\n * @author Haixing Hu\n */\nmodule.exports = {\n replace: true,\n inherit: false,\n template: \"\",\n props: {\n options: {\n type: Array,\n required: true\n },\n model: {\n required: true,\n twoWay: true\n },\n searchable: {\n type: Boolean,\n required: false,\n default: false\n },\n matchValue: {\n type: Boolean,\n required: false,\n default: true\n },\n name: {\n type: String,\n required: false,\n default: \"\"\n },\n language: {\n type: String,\n required: false,\n default: \"\"\n },\n theme: {\n type: String,\n required: false,\n default: \"bootstrap\"\n }\n },\n data: function() {\n return {\n optionsType: \"unknown\"\n }\n },\n beforeCompile: function() {\n this.isChanging = false;\n this.control = null;\n this.optionsType = this.getOptionsType();\n },\n watch: {\n \"options\": function(val, oldVal) {\n //console.debug(\"options.change\");\n this.optionsType = this.getOptionsType();\n var found = this.inOptions(this.model);\n var newValue = (found ? this.model : null);\n this.control.removeData(\"data\"); // remove the cached options data\n // note that setting the model will automatically changed in the \"change\"\n // event of the select2 control\n this.control.val(newValue).trigger(\"change\");\n },\n \"model\": function(val, oldVal) {\n //console.debug(\"model.change\");\n if (! this.isChanging) {\n this.isChanging = true;\n this.control.val(val).trigger(\"change\");\n this.isChanging = false;\n }\n }\n },\n ready: function() {\n var language = this.language;\n if (language === null || language === \"\") {\n if (this.$language) {\n language = this.$language;\n } else {\n language = DEFAULT_LANGUAGE;\n }\n }\n var args = {\n theme: this.theme,\n language: this.getLanguageCode(language)\n };\n if (! this.searchable) {\n args.minimumResultsForSearch = Infinity; // hide the search box\n } else {\n if (this.matchValue) {\n args.matcher = require(\"./value-text-matcher.js\");\n }\n }\n this.control = $(this.$el);\n this.control.select2(args);\n var me = this;\n this.control.on(\"change\", function(e) {\n //console.debug(\"control.change\");\n if (! me.isChanging) {\n me.isChanging = true;\n me.model = me.control.val();\n me.$nextTick(function () {\n me.isChanging = false;\n });\n }\n });\n },\n methods: {\n\n /**\n * Gets the type of the `options` property of this component.\n *\n * The `options` property of this component may have the following types:\n * - \"values\": the `options` is an array of strings, e.g., `[value1, value2, value3]`;\n * - \"options\": the `options` is an array of options, e.g., `[{text: 'name1', value: 'val1'}, {text: 'name2', value: 'val2'}]`;\n * - \"groups\": the `options` is an array of option groups, e.g.,\n * `[{label: 'group1', options: [{text: 'name1', value: 'val1'}, {text: 'name2', value: 'val2'}]},\n * {label: 'group2', options: [{text: 'name3', value: 'val3'}, {text: 'name4', value: 'val4'}]}]`;\n *\n * @param options\n * the new options.\n * @return\n * the string representing the type of the `options` property of this\n * component.\n */\n getOptionsType: function() {\n if (this.options.length === 0) {\n return \"values\";\n }\n var el = this.options[0];\n if (typeof el == \"string\" || el instanceof String) {\n return \"values\";\n } else if (typeof el.text !== \"undefined\") {\n return \"options\";\n } else if (typeof el.label !== \"undefined\") {\n return \"groups\";\n } else {\n return \"unknown\";\n }\n },\n\n /**\n * Tests whether a specified value exists in the options.\n *\n * @param value\n * the value to test.\n * @return\n * true if the specified value exists in the options; false otherwise.\n */\n inOptions: function(value) {\n var type = this.getOptionsType();\n var list = this.options;\n var i, j;\n switch (type) {\n case \"values\":\n for (i = 0; i < list.length; ++i) {\n if (value === list[i]) {\n return true;\n }\n }\n break;\n case \"options\":\n for (i = 0; i < list.length; ++i) {\n if (value === list[i].value) {\n return true;\n }\n }\n break;\n case \"groups\":\n for (i = 0; i < list.length; ++i) {\n var options = list[i].options;\n for (j = 0; j < options.length; ++j) {\n if (value === options[j].value) {\n return true;\n }\n }\n }\n break;\n default:\n break;\n }\n return false;\n },\n\n /**\n * Gets the language code from the \"language-country\" locale code.\n *\n * The function will strip the language code before the first \"-\" of a\n * locale code. For example, pass \"en-US\" will returns \"en\". But for some\n * special locales, the function reserves the locale code. For example,\n * the \"zh-CN\" for the simplified Chinese and the \"zh-TW\" for the\n * traditional Chinese.\n *\n * @param locale\n * A locale code.\n * @return\n * the language code of the locale.\n */\n getLanguageCode: function(locale) {\n if (locale === null || locale.length === 0) {\n return \"en\";\n }\n if (locale.length <= 2) {\n return locale;\n } else {\n switch (locale) {\n case \"pt-BR\":\n case \"zh-CN\":\n case \"zh-TW\":\n return locale;\n default:\n // reserve only the first two letters language code\n return locale.substr(0, 2);\n }\n }\n }\n }\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/vue-select/src/vue-select.js\n ** module id = 2\n ** module chunks = 0\n **/","\nvar DIACRITICS = {\n '\\u24B6': 'A',\n '\\uFF21': 'A',\n '\\u00C0': 'A',\n '\\u00C1': 'A',\n '\\u00C2': 'A',\n '\\u1EA6': 'A',\n '\\u1EA4': 'A',\n '\\u1EAA': 'A',\n '\\u1EA8': 'A',\n '\\u00C3': 'A',\n '\\u0100': 'A',\n '\\u0102': 'A',\n '\\u1EB0': 'A',\n '\\u1EAE': 'A',\n '\\u1EB4': 'A',\n '\\u1EB2': 'A',\n '\\u0226': 'A',\n '\\u01E0': 'A',\n '\\u00C4': 'A',\n '\\u01DE': 'A',\n '\\u1EA2': 'A',\n '\\u00C5': 'A',\n '\\u01FA': 'A',\n '\\u01CD': 'A',\n '\\u0200': 'A',\n '\\u0202': 'A',\n '\\u1EA0': 'A',\n '\\u1EAC': 'A',\n '\\u1EB6': 'A',\n '\\u1E00': 'A',\n '\\u0104': 'A',\n '\\u023A': 'A',\n '\\u2C6F': 'A',\n '\\uA732': 'AA',\n '\\u00C6': 'AE',\n '\\u01FC': 'AE',\n '\\u01E2': 'AE',\n '\\uA734': 'AO',\n '\\uA736': 'AU',\n '\\uA738': 'AV',\n '\\uA73A': 'AV',\n '\\uA73C': 'AY',\n '\\u24B7': 'B',\n '\\uFF22': 'B',\n '\\u1E02': 'B',\n '\\u1E04': 'B',\n '\\u1E06': 'B',\n '\\u0243': 'B',\n '\\u0182': 'B',\n '\\u0181': 'B',\n '\\u24B8': 'C',\n '\\uFF23': 'C',\n '\\u0106': 'C',\n '\\u0108': 'C',\n '\\u010A': 'C',\n '\\u010C': 'C',\n '\\u00C7': 'C',\n '\\u1E08': 'C',\n '\\u0187': 'C',\n '\\u023B': 'C',\n '\\uA73E': 'C',\n '\\u24B9': 'D',\n '\\uFF24': 'D',\n '\\u1E0A': 'D',\n '\\u010E': 'D',\n '\\u1E0C': 'D',\n '\\u1E10': 'D',\n '\\u1E12': 'D',\n '\\u1E0E': 'D',\n '\\u0110': 'D',\n '\\u018B': 'D',\n '\\u018A': 'D',\n '\\u0189': 'D',\n '\\uA779': 'D',\n '\\u01F1': 'DZ',\n '\\u01C4': 'DZ',\n '\\u01F2': 'Dz',\n '\\u01C5': 'Dz',\n '\\u24BA': 'E',\n '\\uFF25': 'E',\n '\\u00C8': 'E',\n '\\u00C9': 'E',\n '\\u00CA': 'E',\n '\\u1EC0': 'E',\n '\\u1EBE': 'E',\n '\\u1EC4': 'E',\n '\\u1EC2': 'E',\n '\\u1EBC': 'E',\n '\\u0112': 'E',\n '\\u1E14': 'E',\n '\\u1E16': 'E',\n '\\u0114': 'E',\n '\\u0116': 'E',\n '\\u00CB': 'E',\n '\\u1EBA': 'E',\n '\\u011A': 'E',\n '\\u0204': 'E',\n '\\u0206': 'E',\n '\\u1EB8': 'E',\n '\\u1EC6': 'E',\n '\\u0228': 'E',\n '\\u1E1C': 'E',\n '\\u0118': 'E',\n '\\u1E18': 'E',\n '\\u1E1A': 'E',\n '\\u0190': 'E',\n '\\u018E': 'E',\n '\\u24BB': 'F',\n '\\uFF26': 'F',\n '\\u1E1E': 'F',\n '\\u0191': 'F',\n '\\uA77B': 'F',\n '\\u24BC': 'G',\n '\\uFF27': 'G',\n '\\u01F4': 'G',\n '\\u011C': 'G',\n '\\u1E20': 'G',\n '\\u011E': 'G',\n '\\u0120': 'G',\n '\\u01E6': 'G',\n '\\u0122': 'G',\n '\\u01E4': 'G',\n '\\u0193': 'G',\n '\\uA7A0': 'G',\n '\\uA77D': 'G',\n '\\uA77E': 'G',\n '\\u24BD': 'H',\n '\\uFF28': 'H',\n '\\u0124': 'H',\n '\\u1E22': 'H',\n '\\u1E26': 'H',\n '\\u021E': 'H',\n '\\u1E24': 'H',\n '\\u1E28': 'H',\n '\\u1E2A': 'H',\n '\\u0126': 'H',\n '\\u2C67': 'H',\n '\\u2C75': 'H',\n '\\uA78D': 'H',\n '\\u24BE': 'I',\n '\\uFF29': 'I',\n '\\u00CC': 'I',\n '\\u00CD': 'I',\n '\\u00CE': 'I',\n '\\u0128': 'I',\n '\\u012A': 'I',\n '\\u012C': 'I',\n '\\u0130': 'I',\n '\\u00CF': 'I',\n '\\u1E2E': 'I',\n '\\u1EC8': 'I',\n '\\u01CF': 'I',\n '\\u0208': 'I',\n '\\u020A': 'I',\n '\\u1ECA': 'I',\n '\\u012E': 'I',\n '\\u1E2C': 'I',\n '\\u0197': 'I',\n '\\u24BF': 'J',\n '\\uFF2A': 'J',\n '\\u0134': 'J',\n '\\u0248': 'J',\n '\\u24C0': 'K',\n '\\uFF2B': 'K',\n '\\u1E30': 'K',\n '\\u01E8': 'K',\n '\\u1E32': 'K',\n '\\u0136': 'K',\n '\\u1E34': 'K',\n '\\u0198': 'K',\n '\\u2C69': 'K',\n '\\uA740': 'K',\n '\\uA742': 'K',\n '\\uA744': 'K',\n '\\uA7A2': 'K',\n '\\u24C1': 'L',\n '\\uFF2C': 'L',\n '\\u013F': 'L',\n '\\u0139': 'L',\n '\\u013D': 'L',\n '\\u1E36': 'L',\n '\\u1E38': 'L',\n '\\u013B': 'L',\n '\\u1E3C': 'L',\n '\\u1E3A': 'L',\n '\\u0141': 'L',\n '\\u023D': 'L',\n '\\u2C62': 'L',\n '\\u2C60': 'L',\n '\\uA748': 'L',\n '\\uA746': 'L',\n '\\uA780': 'L',\n '\\u01C7': 'LJ',\n '\\u01C8': 'Lj',\n '\\u24C2': 'M',\n '\\uFF2D': 'M',\n '\\u1E3E': 'M',\n '\\u1E40': 'M',\n '\\u1E42': 'M',\n '\\u2C6E': 'M',\n '\\u019C': 'M',\n '\\u24C3': 'N',\n '\\uFF2E': 'N',\n '\\u01F8': 'N',\n '\\u0143': 'N',\n '\\u00D1': 'N',\n '\\u1E44': 'N',\n '\\u0147': 'N',\n '\\u1E46': 'N',\n '\\u0145': 'N',\n '\\u1E4A': 'N',\n '\\u1E48': 'N',\n '\\u0220': 'N',\n '\\u019D': 'N',\n '\\uA790': 'N',\n '\\uA7A4': 'N',\n '\\u01CA': 'NJ',\n '\\u01CB': 'Nj',\n '\\u24C4': 'O',\n '\\uFF2F': 'O',\n '\\u00D2': 'O',\n '\\u00D3': 'O',\n '\\u00D4': 'O',\n '\\u1ED2': 'O',\n '\\u1ED0': 'O',\n '\\u1ED6': 'O',\n '\\u1ED4': 'O',\n '\\u00D5': 'O',\n '\\u1E4C': 'O',\n '\\u022C': 'O',\n '\\u1E4E': 'O',\n '\\u014C': 'O',\n '\\u1E50': 'O',\n '\\u1E52': 'O',\n '\\u014E': 'O',\n '\\u022E': 'O',\n '\\u0230': 'O',\n '\\u00D6': 'O',\n '\\u022A': 'O',\n '\\u1ECE': 'O',\n '\\u0150': 'O',\n '\\u01D1': 'O',\n '\\u020C': 'O',\n '\\u020E': 'O',\n '\\u01A0': 'O',\n '\\u1EDC': 'O',\n '\\u1EDA': 'O',\n '\\u1EE0': 'O',\n '\\u1EDE': 'O',\n '\\u1EE2': 'O',\n '\\u1ECC': 'O',\n '\\u1ED8': 'O',\n '\\u01EA': 'O',\n '\\u01EC': 'O',\n '\\u00D8': 'O',\n '\\u01FE': 'O',\n '\\u0186': 'O',\n '\\u019F': 'O',\n '\\uA74A': 'O',\n '\\uA74C': 'O',\n '\\u01A2': 'OI',\n '\\uA74E': 'OO',\n '\\u0222': 'OU',\n '\\u24C5': 'P',\n '\\uFF30': 'P',\n '\\u1E54': 'P',\n '\\u1E56': 'P',\n '\\u01A4': 'P',\n '\\u2C63': 'P',\n '\\uA750': 'P',\n '\\uA752': 'P',\n '\\uA754': 'P',\n '\\u24C6': 'Q',\n '\\uFF31': 'Q',\n '\\uA756': 'Q',\n '\\uA758': 'Q',\n '\\u024A': 'Q',\n '\\u24C7': 'R',\n '\\uFF32': 'R',\n '\\u0154': 'R',\n '\\u1E58': 'R',\n '\\u0158': 'R',\n '\\u0210': 'R',\n '\\u0212': 'R',\n '\\u1E5A': 'R',\n '\\u1E5C': 'R',\n '\\u0156': 'R',\n '\\u1E5E': 'R',\n '\\u024C': 'R',\n '\\u2C64': 'R',\n '\\uA75A': 'R',\n '\\uA7A6': 'R',\n '\\uA782': 'R',\n '\\u24C8': 'S',\n '\\uFF33': 'S',\n '\\u1E9E': 'S',\n '\\u015A': 'S',\n '\\u1E64': 'S',\n '\\u015C': 'S',\n '\\u1E60': 'S',\n '\\u0160': 'S',\n '\\u1E66': 'S',\n '\\u1E62': 'S',\n '\\u1E68': 'S',\n '\\u0218': 'S',\n '\\u015E': 'S',\n '\\u2C7E': 'S',\n '\\uA7A8': 'S',\n '\\uA784': 'S',\n '\\u24C9': 'T',\n '\\uFF34': 'T',\n '\\u1E6A': 'T',\n '\\u0164': 'T',\n '\\u1E6C': 'T',\n '\\u021A': 'T',\n '\\u0162': 'T',\n '\\u1E70': 'T',\n '\\u1E6E': 'T',\n '\\u0166': 'T',\n '\\u01AC': 'T',\n '\\u01AE': 'T',\n '\\u023E': 'T',\n '\\uA786': 'T',\n '\\uA728': 'TZ',\n '\\u24CA': 'U',\n '\\uFF35': 'U',\n '\\u00D9': 'U',\n '\\u00DA': 'U',\n '\\u00DB': 'U',\n '\\u0168': 'U',\n '\\u1E78': 'U',\n '\\u016A': 'U',\n '\\u1E7A': 'U',\n '\\u016C': 'U',\n '\\u00DC': 'U',\n '\\u01DB': 'U',\n '\\u01D7': 'U',\n '\\u01D5': 'U',\n '\\u01D9': 'U',\n '\\u1EE6': 'U',\n '\\u016E': 'U',\n '\\u0170': 'U',\n '\\u01D3': 'U',\n '\\u0214': 'U',\n '\\u0216': 'U',\n '\\u01AF': 'U',\n '\\u1EEA': 'U',\n '\\u1EE8': 'U',\n '\\u1EEE': 'U',\n '\\u1EEC': 'U',\n '\\u1EF0': 'U',\n '\\u1EE4': 'U',\n '\\u1E72': 'U',\n '\\u0172': 'U',\n '\\u1E76': 'U',\n '\\u1E74': 'U',\n '\\u0244': 'U',\n '\\u24CB': 'V',\n '\\uFF36': 'V',\n '\\u1E7C': 'V',\n '\\u1E7E': 'V',\n '\\u01B2': 'V',\n '\\uA75E': 'V',\n '\\u0245': 'V',\n '\\uA760': 'VY',\n '\\u24CC': 'W',\n '\\uFF37': 'W',\n '\\u1E80': 'W',\n '\\u1E82': 'W',\n '\\u0174': 'W',\n '\\u1E86': 'W',\n '\\u1E84': 'W',\n '\\u1E88': 'W',\n '\\u2C72': 'W',\n '\\u24CD': 'X',\n '\\uFF38': 'X',\n '\\u1E8A': 'X',\n '\\u1E8C': 'X',\n '\\u24CE': 'Y',\n '\\uFF39': 'Y',\n '\\u1EF2': 'Y',\n '\\u00DD': 'Y',\n '\\u0176': 'Y',\n '\\u1EF8': 'Y',\n '\\u0232': 'Y',\n '\\u1E8E': 'Y',\n '\\u0178': 'Y',\n '\\u1EF6': 'Y',\n '\\u1EF4': 'Y',\n '\\u01B3': 'Y',\n '\\u024E': 'Y',\n '\\u1EFE': 'Y',\n '\\u24CF': 'Z',\n '\\uFF3A': 'Z',\n '\\u0179': 'Z',\n '\\u1E90': 'Z',\n '\\u017B': 'Z',\n '\\u017D': 'Z',\n '\\u1E92': 'Z',\n '\\u1E94': 'Z',\n '\\u01B5': 'Z',\n '\\u0224': 'Z',\n '\\u2C7F': 'Z',\n '\\u2C6B': 'Z',\n '\\uA762': 'Z',\n '\\u24D0': 'a',\n '\\uFF41': 'a',\n '\\u1E9A': 'a',\n '\\u00E0': 'a',\n '\\u00E1': 'a',\n '\\u00E2': 'a',\n '\\u1EA7': 'a',\n '\\u1EA5': 'a',\n '\\u1EAB': 'a',\n '\\u1EA9': 'a',\n '\\u00E3': 'a',\n '\\u0101': 'a',\n '\\u0103': 'a',\n '\\u1EB1': 'a',\n '\\u1EAF': 'a',\n '\\u1EB5': 'a',\n '\\u1EB3': 'a',\n '\\u0227': 'a',\n '\\u01E1': 'a',\n '\\u00E4': 'a',\n '\\u01DF': 'a',\n '\\u1EA3': 'a',\n '\\u00E5': 'a',\n '\\u01FB': 'a',\n '\\u01CE': 'a',\n '\\u0201': 'a',\n '\\u0203': 'a',\n '\\u1EA1': 'a',\n '\\u1EAD': 'a',\n '\\u1EB7': 'a',\n '\\u1E01': 'a',\n '\\u0105': 'a',\n '\\u2C65': 'a',\n '\\u0250': 'a',\n '\\uA733': 'aa',\n '\\u00E6': 'ae',\n '\\u01FD': 'ae',\n '\\u01E3': 'ae',\n '\\uA735': 'ao',\n '\\uA737': 'au',\n '\\uA739': 'av',\n '\\uA73B': 'av',\n '\\uA73D': 'ay',\n '\\u24D1': 'b',\n '\\uFF42': 'b',\n '\\u1E03': 'b',\n '\\u1E05': 'b',\n '\\u1E07': 'b',\n '\\u0180': 'b',\n '\\u0183': 'b',\n '\\u0253': 'b',\n '\\u24D2': 'c',\n '\\uFF43': 'c',\n '\\u0107': 'c',\n '\\u0109': 'c',\n '\\u010B': 'c',\n '\\u010D': 'c',\n '\\u00E7': 'c',\n '\\u1E09': 'c',\n '\\u0188': 'c',\n '\\u023C': 'c',\n '\\uA73F': 'c',\n '\\u2184': 'c',\n '\\u24D3': 'd',\n '\\uFF44': 'd',\n '\\u1E0B': 'd',\n '\\u010F': 'd',\n '\\u1E0D': 'd',\n '\\u1E11': 'd',\n '\\u1E13': 'd',\n '\\u1E0F': 'd',\n '\\u0111': 'd',\n '\\u018C': 'd',\n '\\u0256': 'd',\n '\\u0257': 'd',\n '\\uA77A': 'd',\n '\\u01F3': 'dz',\n '\\u01C6': 'dz',\n '\\u24D4': 'e',\n '\\uFF45': 'e',\n '\\u00E8': 'e',\n '\\u00E9': 'e',\n '\\u00EA': 'e',\n '\\u1EC1': 'e',\n '\\u1EBF': 'e',\n '\\u1EC5': 'e',\n '\\u1EC3': 'e',\n '\\u1EBD': 'e',\n '\\u0113': 'e',\n '\\u1E15': 'e',\n '\\u1E17': 'e',\n '\\u0115': 'e',\n '\\u0117': 'e',\n '\\u00EB': 'e',\n '\\u1EBB': 'e',\n '\\u011B': 'e',\n '\\u0205': 'e',\n '\\u0207': 'e',\n '\\u1EB9': 'e',\n '\\u1EC7': 'e',\n '\\u0229': 'e',\n '\\u1E1D': 'e',\n '\\u0119': 'e',\n '\\u1E19': 'e',\n '\\u1E1B': 'e',\n '\\u0247': 'e',\n '\\u025B': 'e',\n '\\u01DD': 'e',\n '\\u24D5': 'f',\n '\\uFF46': 'f',\n '\\u1E1F': 'f',\n '\\u0192': 'f',\n '\\uA77C': 'f',\n '\\u24D6': 'g',\n '\\uFF47': 'g',\n '\\u01F5': 'g',\n '\\u011D': 'g',\n '\\u1E21': 'g',\n '\\u011F': 'g',\n '\\u0121': 'g',\n '\\u01E7': 'g',\n '\\u0123': 'g',\n '\\u01E5': 'g',\n '\\u0260': 'g',\n '\\uA7A1': 'g',\n '\\u1D79': 'g',\n '\\uA77F': 'g',\n '\\u24D7': 'h',\n '\\uFF48': 'h',\n '\\u0125': 'h',\n '\\u1E23': 'h',\n '\\u1E27': 'h',\n '\\u021F': 'h',\n '\\u1E25': 'h',\n '\\u1E29': 'h',\n '\\u1E2B': 'h',\n '\\u1E96': 'h',\n '\\u0127': 'h',\n '\\u2C68': 'h',\n '\\u2C76': 'h',\n '\\u0265': 'h',\n '\\u0195': 'hv',\n '\\u24D8': 'i',\n '\\uFF49': 'i',\n '\\u00EC': 'i',\n '\\u00ED': 'i',\n '\\u00EE': 'i',\n '\\u0129': 'i',\n '\\u012B': 'i',\n '\\u012D': 'i',\n '\\u00EF': 'i',\n '\\u1E2F': 'i',\n '\\u1EC9': 'i',\n '\\u01D0': 'i',\n '\\u0209': 'i',\n '\\u020B': 'i',\n '\\u1ECB': 'i',\n '\\u012F': 'i',\n '\\u1E2D': 'i',\n '\\u0268': 'i',\n '\\u0131': 'i',\n '\\u24D9': 'j',\n '\\uFF4A': 'j',\n '\\u0135': 'j',\n '\\u01F0': 'j',\n '\\u0249': 'j',\n '\\u24DA': 'k',\n '\\uFF4B': 'k',\n '\\u1E31': 'k',\n '\\u01E9': 'k',\n '\\u1E33': 'k',\n '\\u0137': 'k',\n '\\u1E35': 'k',\n '\\u0199': 'k',\n '\\u2C6A': 'k',\n '\\uA741': 'k',\n '\\uA743': 'k',\n '\\uA745': 'k',\n '\\uA7A3': 'k',\n '\\u24DB': 'l',\n '\\uFF4C': 'l',\n '\\u0140': 'l',\n '\\u013A': 'l',\n '\\u013E': 'l',\n '\\u1E37': 'l',\n '\\u1E39': 'l',\n '\\u013C': 'l',\n '\\u1E3D': 'l',\n '\\u1E3B': 'l',\n '\\u017F': 'l',\n '\\u0142': 'l',\n '\\u019A': 'l',\n '\\u026B': 'l',\n '\\u2C61': 'l',\n '\\uA749': 'l',\n '\\uA781': 'l',\n '\\uA747': 'l',\n '\\u01C9': 'lj',\n '\\u24DC': 'm',\n '\\uFF4D': 'm',\n '\\u1E3F': 'm',\n '\\u1E41': 'm',\n '\\u1E43': 'm',\n '\\u0271': 'm',\n '\\u026F': 'm',\n '\\u24DD': 'n',\n '\\uFF4E': 'n',\n '\\u01F9': 'n',\n '\\u0144': 'n',\n '\\u00F1': 'n',\n '\\u1E45': 'n',\n '\\u0148': 'n',\n '\\u1E47': 'n',\n '\\u0146': 'n',\n '\\u1E4B': 'n',\n '\\u1E49': 'n',\n '\\u019E': 'n',\n '\\u0272': 'n',\n '\\u0149': 'n',\n '\\uA791': 'n',\n '\\uA7A5': 'n',\n '\\u01CC': 'nj',\n '\\u24DE': 'o',\n '\\uFF4F': 'o',\n '\\u00F2': 'o',\n '\\u00F3': 'o',\n '\\u00F4': 'o',\n '\\u1ED3': 'o',\n '\\u1ED1': 'o',\n '\\u1ED7': 'o',\n '\\u1ED5': 'o',\n '\\u00F5': 'o',\n '\\u1E4D': 'o',\n '\\u022D': 'o',\n '\\u1E4F': 'o',\n '\\u014D': 'o',\n '\\u1E51': 'o',\n '\\u1E53': 'o',\n '\\u014F': 'o',\n '\\u022F': 'o',\n '\\u0231': 'o',\n '\\u00F6': 'o',\n '\\u022B': 'o',\n '\\u1ECF': 'o',\n '\\u0151': 'o',\n '\\u01D2': 'o',\n '\\u020D': 'o',\n '\\u020F': 'o',\n '\\u01A1': 'o',\n '\\u1EDD': 'o',\n '\\u1EDB': 'o',\n '\\u1EE1': 'o',\n '\\u1EDF': 'o',\n '\\u1EE3': 'o',\n '\\u1ECD': 'o',\n '\\u1ED9': 'o',\n '\\u01EB': 'o',\n '\\u01ED': 'o',\n '\\u00F8': 'o',\n '\\u01FF': 'o',\n '\\u0254': 'o',\n '\\uA74B': 'o',\n '\\uA74D': 'o',\n '\\u0275': 'o',\n '\\u01A3': 'oi',\n '\\u0223': 'ou',\n '\\uA74F': 'oo',\n '\\u24DF': 'p',\n '\\uFF50': 'p',\n '\\u1E55': 'p',\n '\\u1E57': 'p',\n '\\u01A5': 'p',\n '\\u1D7D': 'p',\n '\\uA751': 'p',\n '\\uA753': 'p',\n '\\uA755': 'p',\n '\\u24E0': 'q',\n '\\uFF51': 'q',\n '\\u024B': 'q',\n '\\uA757': 'q',\n '\\uA759': 'q',\n '\\u24E1': 'r',\n '\\uFF52': 'r',\n '\\u0155': 'r',\n '\\u1E59': 'r',\n '\\u0159': 'r',\n '\\u0211': 'r',\n '\\u0213': 'r',\n '\\u1E5B': 'r',\n '\\u1E5D': 'r',\n '\\u0157': 'r',\n '\\u1E5F': 'r',\n '\\u024D': 'r',\n '\\u027D': 'r',\n '\\uA75B': 'r',\n '\\uA7A7': 'r',\n '\\uA783': 'r',\n '\\u24E2': 's',\n '\\uFF53': 's',\n '\\u00DF': 's',\n '\\u015B': 's',\n '\\u1E65': 's',\n '\\u015D': 's',\n '\\u1E61': 's',\n '\\u0161': 's',\n '\\u1E67': 's',\n '\\u1E63': 's',\n '\\u1E69': 's',\n '\\u0219': 's',\n '\\u015F': 's',\n '\\u023F': 's',\n '\\uA7A9': 's',\n '\\uA785': 's',\n '\\u1E9B': 's',\n '\\u24E3': 't',\n '\\uFF54': 't',\n '\\u1E6B': 't',\n '\\u1E97': 't',\n '\\u0165': 't',\n '\\u1E6D': 't',\n '\\u021B': 't',\n '\\u0163': 't',\n '\\u1E71': 't',\n '\\u1E6F': 't',\n '\\u0167': 't',\n '\\u01AD': 't',\n '\\u0288': 't',\n '\\u2C66': 't',\n '\\uA787': 't',\n '\\uA729': 'tz',\n '\\u24E4': 'u',\n '\\uFF55': 'u',\n '\\u00F9': 'u',\n '\\u00FA': 'u',\n '\\u00FB': 'u',\n '\\u0169': 'u',\n '\\u1E79': 'u',\n '\\u016B': 'u',\n '\\u1E7B': 'u',\n '\\u016D': 'u',\n '\\u00FC': 'u',\n '\\u01DC': 'u',\n '\\u01D8': 'u',\n '\\u01D6': 'u',\n '\\u01DA': 'u',\n '\\u1EE7': 'u',\n '\\u016F': 'u',\n '\\u0171': 'u',\n '\\u01D4': 'u',\n '\\u0215': 'u',\n '\\u0217': 'u',\n '\\u01B0': 'u',\n '\\u1EEB': 'u',\n '\\u1EE9': 'u',\n '\\u1EEF': 'u',\n '\\u1EED': 'u',\n '\\u1EF1': 'u',\n '\\u1EE5': 'u',\n '\\u1E73': 'u',\n '\\u0173': 'u',\n '\\u1E77': 'u',\n '\\u1E75': 'u',\n '\\u0289': 'u',\n '\\u24E5': 'v',\n '\\uFF56': 'v',\n '\\u1E7D': 'v',\n '\\u1E7F': 'v',\n '\\u028B': 'v',\n '\\uA75F': 'v',\n '\\u028C': 'v',\n '\\uA761': 'vy',\n '\\u24E6': 'w',\n '\\uFF57': 'w',\n '\\u1E81': 'w',\n '\\u1E83': 'w',\n '\\u0175': 'w',\n '\\u1E87': 'w',\n '\\u1E85': 'w',\n '\\u1E98': 'w',\n '\\u1E89': 'w',\n '\\u2C73': 'w',\n '\\u24E7': 'x',\n '\\uFF58': 'x',\n '\\u1E8B': 'x',\n '\\u1E8D': 'x',\n '\\u24E8': 'y',\n '\\uFF59': 'y',\n '\\u1EF3': 'y',\n '\\u00FD': 'y',\n '\\u0177': 'y',\n '\\u1EF9': 'y',\n '\\u0233': 'y',\n '\\u1E8F': 'y',\n '\\u00FF': 'y',\n '\\u1EF7': 'y',\n '\\u1E99': 'y',\n '\\u1EF5': 'y',\n '\\u01B4': 'y',\n '\\u024F': 'y',\n '\\u1EFF': 'y',\n '\\u24E9': 'z',\n '\\uFF5A': 'z',\n '\\u017A': 'z',\n '\\u1E91': 'z',\n '\\u017C': 'z',\n '\\u017E': 'z',\n '\\u1E93': 'z',\n '\\u1E95': 'z',\n '\\u01B6': 'z',\n '\\u0225': 'z',\n '\\u0240': 'z',\n '\\u2C6C': 'z',\n '\\uA763': 'z',\n '\\u0386': '\\u0391',\n '\\u0388': '\\u0395',\n '\\u0389': '\\u0397',\n '\\u038A': '\\u0399',\n '\\u03AA': '\\u0399',\n '\\u038C': '\\u039F',\n '\\u038E': '\\u03A5',\n '\\u03AB': '\\u03A5',\n '\\u038F': '\\u03A9',\n '\\u03AC': '\\u03B1',\n '\\u03AD': '\\u03B5',\n '\\u03AE': '\\u03B7',\n '\\u03AF': '\\u03B9',\n '\\u03CA': '\\u03B9',\n '\\u0390': '\\u03B9',\n '\\u03CC': '\\u03BF',\n '\\u03CD': '\\u03C5',\n '\\u03CB': '\\u03C5',\n '\\u03B0': '\\u03C5',\n '\\u03C9': '\\u03C9',\n '\\u03C2': '\\u03C3'\n};\n\n\nfunction stripDiacritics (text) {\n // Used 'uni range + named function' from http://jsperf.com/diacritics/18\n function match(a) {\n return DIACRITICS[a] || a;\n }\n return text.replace(/[^\\u0000-\\u007E]/g, match);\n}\n\n// The following matcher is a modification version of the default matcher\n// of select2\nmodule.exports = matcher = function(params, data) {\n // Always return the object if there is nothing to compare\n if ($.trim(params.term) === '') {\n return data;\n }\n\n // Do a recursive check for options with children\n if (data.children && data.children.length > 0) {\n // Clone the data object if there are children\n // This is required as we modify the object to remove any non-matches\n var match = $.extend(true, {}, data);\n\n // Check each child of the option\n for (var c = data.children.length - 1; c >= 0; c--) {\n var child = data.children[c];\n\n var matches = matcher(params, child);\n\n // If there wasn't a match, remove the object in the array\n if (matches == null) {\n match.children.splice(c, 1);\n }\n }\n\n // If any children matched, return the new object\n if (match.children.length > 0) {\n return match;\n }\n\n // If there were no matching children, check just the plain object\n return matcher(params, match);\n }\n\n var original = stripDiacritics(data.text).toUpperCase();\n var term = stripDiacritics(params.term).toUpperCase();\n\n // Check if the text contains the term\n if (original.indexOf(term) > -1) {\n return data;\n }\n\n // add by Haixing Hu: also match the value of an option\n if (data.id) {\n var originalValue = stripDiacritics(data.id).toUpperCase();\n if (originalValue.indexOf(term) > -1) {\n return data;\n }\n }\n\n // If it doesn't contain the term, don't return anything\n return null;\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/vue-select/src/value-text-matcher.js\n ** module id = 3\n ** module chunks = 0\n **/","/**\n * The list of all countries with their 2 digit codes (ISO 3166-2)\n *\n * @see http://data.okfn.org/data/core/country-list\n */\n\nmodule.exports = [{\n \"name\": \"Afghanistan\",\n \"code\": \"AF\"\n}, {\n \"name\": \"Åland Islands\",\n \"code\": \"AX\"\n}, {\n \"name\": \"Albania\",\n \"code\": \"AL\"\n}, {\n \"name\": \"Algeria\",\n \"code\": \"DZ\"\n}, {\n \"name\": \"American Samoa\",\n \"code\": \"AS\"\n}, {\n \"name\": \"Andorra\",\n \"code\": \"AD\"\n}, {\n \"name\": \"Angola\",\n \"code\": \"AO\"\n}, {\n \"name\": \"Anguilla\",\n \"code\": \"AI\"\n}, {\n \"name\": \"Antarctica\",\n \"code\": \"AQ\"\n}, {\n \"name\": \"Antigua and Barbuda\",\n \"code\": \"AG\"\n}, {\n \"name\": \"Argentina\",\n \"code\": \"AR\"\n}, {\n \"name\": \"Armenia\",\n \"code\": \"AM\"\n}, {\n \"name\": \"Aruba\",\n \"code\": \"AW\"\n}, {\n \"name\": \"Australia\",\n \"code\": \"AU\"\n}, {\n \"name\": \"Austria\",\n \"code\": \"AT\"\n}, {\n \"name\": \"Azerbaijan\",\n \"code\": \"AZ\"\n}, {\n \"name\": \"Bahamas\",\n \"code\": \"BS\"\n}, {\n \"name\": \"Bahrain\",\n \"code\": \"BH\"\n}, {\n \"name\": \"Bangladesh\",\n \"code\": \"BD\"\n}, {\n \"name\": \"Barbados\",\n \"code\": \"BB\"\n}, {\n \"name\": \"Belarus\",\n \"code\": \"BY\"\n}, {\n \"name\": \"Belgium\",\n \"code\": \"BE\"\n}, {\n \"name\": \"Belize\",\n \"code\": \"BZ\"\n}, {\n \"name\": \"Benin\",\n \"code\": \"BJ\"\n}, {\n \"name\": \"Bermuda\",\n \"code\": \"BM\"\n}, {\n \"name\": \"Bhutan\",\n \"code\": \"BT\"\n}, {\n \"name\": \"Bolivia, Plurinational State of\",\n \"code\": \"BO\"\n}, {\n \"name\": \"Bonaire, Sint Eustatius and Saba\",\n \"code\": \"BQ\"\n}, {\n \"name\": \"Bosnia and Herzegovina\",\n \"code\": \"BA\"\n}, {\n \"name\": \"Botswana\",\n \"code\": \"BW\"\n}, {\n \"name\": \"Bouvet Island\",\n \"code\": \"BV\"\n}, {\n \"name\": \"Brazil\",\n \"code\": \"BR\"\n}, {\n \"name\": \"British Indian Ocean Territory\",\n \"code\": \"IO\"\n}, {\n \"name\": \"Brunei Darussalam\",\n \"code\": \"BN\"\n}, {\n \"name\": \"Bulgaria\",\n \"code\": \"BG\"\n}, {\n \"name\": \"Burkina Faso\",\n \"code\": \"BF\"\n}, {\n \"name\": \"Burundi\",\n \"code\": \"BI\"\n}, {\n \"name\": \"Cambodia\",\n \"code\": \"KH\"\n}, {\n \"name\": \"Cameroon\",\n \"code\": \"CM\"\n}, {\n \"name\": \"Canada\",\n \"code\": \"CA\"\n}, {\n \"name\": \"Cape Verde\",\n \"code\": \"CV\"\n}, {\n \"name\": \"Cayman Islands\",\n \"code\": \"KY\"\n}, {\n \"name\": \"Central African Republic\",\n \"code\": \"CF\"\n}, {\n \"name\": \"Chad\",\n \"code\": \"TD\"\n}, {\n \"name\": \"Chile\",\n \"code\": \"CL\"\n}, {\n \"name\": \"China\",\n \"code\": \"CN\"\n}, {\n \"name\": \"Christmas Island\",\n \"code\": \"CX\"\n}, {\n \"name\": \"Cocos (Keeling) Islands\",\n \"code\": \"CC\"\n}, {\n \"name\": \"Colombia\",\n \"code\": \"CO\"\n}, {\n \"name\": \"Comoros\",\n \"code\": \"KM\"\n}, {\n \"name\": \"Congo\",\n \"code\": \"CG\"\n}, {\n \"name\": \"Congo, the Democratic Republic of the\",\n \"code\": \"CD\"\n}, {\n \"name\": \"Cook Islands\",\n \"code\": \"CK\"\n}, {\n \"name\": \"Costa Rica\",\n \"code\": \"CR\"\n}, {\n \"name\": \"Côte d'Ivoire\",\n \"code\": \"CI\"\n}, {\n \"name\": \"Croatia\",\n \"code\": \"HR\"\n}, {\n \"name\": \"Cuba\",\n \"code\": \"CU\"\n}, {\n \"name\": \"Curaçao\",\n \"code\": \"CW\"\n}, {\n \"name\": \"Cyprus\",\n \"code\": \"CY\"\n}, {\n \"name\": \"Czech Republic\",\n \"code\": \"CZ\"\n}, {\n \"name\": \"Denmark\",\n \"code\": \"DK\"\n}, {\n \"name\": \"Djibouti\",\n \"code\": \"DJ\"\n}, {\n \"name\": \"Dominica\",\n \"code\": \"DM\"\n}, {\n \"name\": \"Dominican Republic\",\n \"code\": \"DO\"\n}, {\n \"name\": \"Ecuador\",\n \"code\": \"EC\"\n}, {\n \"name\": \"Egypt\",\n \"code\": \"EG\"\n}, {\n \"name\": \"El Salvador\",\n \"code\": \"SV\"\n}, {\n \"name\": \"Equatorial Guinea\",\n \"code\": \"GQ\"\n}, {\n \"name\": \"Eritrea\",\n \"code\": \"ER\"\n}, {\n \"name\": \"Estonia\",\n \"code\": \"EE\"\n}, {\n \"name\": \"Ethiopia\",\n \"code\": \"ET\"\n}, {\n \"name\": \"Falkland Islands (Malvinas)\",\n \"code\": \"FK\"\n}, {\n \"name\": \"Faroe Islands\",\n \"code\": \"FO\"\n}, {\n \"name\": \"Fiji\",\n \"code\": \"FJ\"\n}, {\n \"name\": \"Finland\",\n \"code\": \"FI\"\n}, {\n \"name\": \"France\",\n \"code\": \"FR\"\n}, {\n \"name\": \"French Guiana\",\n \"code\": \"GF\"\n}, {\n \"name\": \"French Polynesia\",\n \"code\": \"PF\"\n}, {\n \"name\": \"French Southern Territories\",\n \"code\": \"TF\"\n}, {\n \"name\": \"Gabon\",\n \"code\": \"GA\"\n}, {\n \"name\": \"Gambia\",\n \"code\": \"GM\"\n}, {\n \"name\": \"Georgia\",\n \"code\": \"GE\"\n}, {\n \"name\": \"Germany\",\n \"code\": \"DE\"\n}, {\n \"name\": \"Ghana\",\n \"code\": \"GH\"\n}, {\n \"name\": \"Gibraltar\",\n \"code\": \"GI\"\n}, {\n \"name\": \"Greece\",\n \"code\": \"GR\"\n}, {\n \"name\": \"Greenland\",\n \"code\": \"GL\"\n}, {\n \"name\": \"Grenada\",\n \"code\": \"GD\"\n}, {\n \"name\": \"Guadeloupe\",\n \"code\": \"GP\"\n}, {\n \"name\": \"Guam\",\n \"code\": \"GU\"\n}, {\n \"name\": \"Guatemala\",\n \"code\": \"GT\"\n}, {\n \"name\": \"Guernsey\",\n \"code\": \"GG\"\n}, {\n \"name\": \"Guinea\",\n \"code\": \"GN\"\n}, {\n \"name\": \"Guinea-Bissau\",\n \"code\": \"GW\"\n}, {\n \"name\": \"Guyana\",\n \"code\": \"GY\"\n}, {\n \"name\": \"Haiti\",\n \"code\": \"HT\"\n}, {\n \"name\": \"Heard Island and McDonald Islands\",\n \"code\": \"HM\"\n}, {\n \"name\": \"Holy See (Vatican City State)\",\n \"code\": \"VA\"\n}, {\n \"name\": \"Honduras\",\n \"code\": \"HN\"\n}, {\n \"name\": \"Hong Kong\",\n \"code\": \"HK\"\n}, {\n \"name\": \"Hungary\",\n \"code\": \"HU\"\n}, {\n \"name\": \"Iceland\",\n \"code\": \"IS\"\n}, {\n \"name\": \"India\",\n \"code\": \"IN\"\n}, {\n \"name\": \"Indonesia\",\n \"code\": \"ID\"\n}, {\n \"name\": \"Iran, Islamic Republic of\",\n \"code\": \"IR\"\n}, {\n \"name\": \"Iraq\",\n \"code\": \"IQ\"\n}, {\n \"name\": \"Ireland\",\n \"code\": \"IE\"\n}, {\n \"name\": \"Isle of Man\",\n \"code\": \"IM\"\n}, {\n \"name\": \"Israel\",\n \"code\": \"IL\"\n}, {\n \"name\": \"Italy\",\n \"code\": \"IT\"\n}, {\n \"name\": \"Jamaica\",\n \"code\": \"JM\"\n}, {\n \"name\": \"Japan\",\n \"code\": \"JP\"\n}, {\n \"name\": \"Jersey\",\n \"code\": \"JE\"\n}, {\n \"name\": \"Jordan\",\n \"code\": \"JO\"\n}, {\n \"name\": \"Kazakhstan\",\n \"code\": \"KZ\"\n}, {\n \"name\": \"Kenya\",\n \"code\": \"KE\"\n}, {\n \"name\": \"Kiribati\",\n \"code\": \"KI\"\n}, {\n \"name\": \"Korea, Democratic People's Republic of\",\n \"code\": \"KP\"\n}, {\n \"name\": \"Korea, Republic of\",\n \"code\": \"KR\"\n}, {\n \"name\": \"Kuwait\",\n \"code\": \"KW\"\n}, {\n \"name\": \"Kyrgyzstan\",\n \"code\": \"KG\"\n}, {\n \"name\": \"Lao People's Democratic Republic\",\n \"code\": \"LA\"\n}, {\n \"name\": \"Latvia\",\n \"code\": \"LV\"\n}, {\n \"name\": \"Lebanon\",\n \"code\": \"LB\"\n}, {\n \"name\": \"Lesotho\",\n \"code\": \"LS\"\n}, {\n \"name\": \"Liberia\",\n \"code\": \"LR\"\n}, {\n \"name\": \"Libya\",\n \"code\": \"LY\"\n}, {\n \"name\": \"Liechtenstein\",\n \"code\": \"LI\"\n}, {\n \"name\": \"Lithuania\",\n \"code\": \"LT\"\n}, {\n \"name\": \"Luxembourg\",\n \"code\": \"LU\"\n}, {\n \"name\": \"Macao\",\n \"code\": \"MO\"\n}, {\n \"name\": \"Macedonia, the Former Yugoslav Republic of\",\n \"code\": \"MK\"\n}, {\n \"name\": \"Madagascar\",\n \"code\": \"MG\"\n}, {\n \"name\": \"Malawi\",\n \"code\": \"MW\"\n}, {\n \"name\": \"Malaysia\",\n \"code\": \"MY\"\n}, {\n \"name\": \"Maldives\",\n \"code\": \"MV\"\n}, {\n \"name\": \"Mali\",\n \"code\": \"ML\"\n}, {\n \"name\": \"Malta\",\n \"code\": \"MT\"\n}, {\n \"name\": \"Marshall Islands\",\n \"code\": \"MH\"\n}, {\n \"name\": \"Martinique\",\n \"code\": \"MQ\"\n}, {\n \"name\": \"Mauritania\",\n \"code\": \"MR\"\n}, {\n \"name\": \"Mauritius\",\n \"code\": \"MU\"\n}, {\n \"name\": \"Mayotte\",\n \"code\": \"YT\"\n}, {\n \"name\": \"Mexico\",\n \"code\": \"MX\"\n}, {\n \"name\": \"Micronesia, Federated States of\",\n \"code\": \"FM\"\n}, {\n \"name\": \"Moldova, Republic of\",\n \"code\": \"MD\"\n}, {\n \"name\": \"Monaco\",\n \"code\": \"MC\"\n}, {\n \"name\": \"Mongolia\",\n \"code\": \"MN\"\n}, {\n \"name\": \"Montenegro\",\n \"code\": \"ME\"\n}, {\n \"name\": \"Montserrat\",\n \"code\": \"MS\"\n}, {\n \"name\": \"Morocco\",\n \"code\": \"MA\"\n}, {\n \"name\": \"Mozambique\",\n \"code\": \"MZ\"\n}, {\n \"name\": \"Myanmar\",\n \"code\": \"MM\"\n}, {\n \"name\": \"Namibia\",\n \"code\": \"NA\"\n}, {\n \"name\": \"Nauru\",\n \"code\": \"NR\"\n}, {\n \"name\": \"Nepal\",\n \"code\": \"NP\"\n}, {\n \"name\": \"Netherlands\",\n \"code\": \"NL\"\n}, {\n \"name\": \"New Caledonia\",\n \"code\": \"NC\"\n}, {\n \"name\": \"New Zealand\",\n \"code\": \"NZ\"\n}, {\n \"name\": \"Nicaragua\",\n \"code\": \"NI\"\n}, {\n \"name\": \"Niger\",\n \"code\": \"NE\"\n}, {\n \"name\": \"Nigeria\",\n \"code\": \"NG\"\n}, {\n \"name\": \"Niue\",\n \"code\": \"NU\"\n}, {\n \"name\": \"Norfolk Island\",\n \"code\": \"NF\"\n}, {\n \"name\": \"Northern Mariana Islands\",\n \"code\": \"MP\"\n}, {\n \"name\": \"Norway\",\n \"code\": \"NO\"\n}, {\n \"name\": \"Oman\",\n \"code\": \"OM\"\n}, {\n \"name\": \"Pakistan\",\n \"code\": \"PK\"\n}, {\n \"name\": \"Palau\",\n \"code\": \"PW\"\n}, {\n \"name\": \"Palestine, State of\",\n \"code\": \"PS\"\n}, {\n \"name\": \"Panama\",\n \"code\": \"PA\"\n}, {\n \"name\": \"Papua New Guinea\",\n \"code\": \"PG\"\n}, {\n \"name\": \"Paraguay\",\n \"code\": \"PY\"\n}, {\n \"name\": \"Peru\",\n \"code\": \"PE\"\n}, {\n \"name\": \"Philippines\",\n \"code\": \"PH\"\n}, {\n \"name\": \"Pitcairn\",\n \"code\": \"PN\"\n}, {\n \"name\": \"Poland\",\n \"code\": \"PL\"\n}, {\n \"name\": \"Portugal\",\n \"code\": \"PT\"\n}, {\n \"name\": \"Puerto Rico\",\n \"code\": \"PR\"\n}, {\n \"name\": \"Qatar\",\n \"code\": \"QA\"\n}, {\n \"name\": \"Réunion\",\n \"code\": \"RE\"\n}, {\n \"name\": \"Romania\",\n \"code\": \"RO\"\n}, {\n \"name\": \"Russian Federation\",\n \"code\": \"RU\"\n}, {\n \"name\": \"Rwanda\",\n \"code\": \"RW\"\n}, {\n \"name\": \"Saint Barthélemy\",\n \"code\": \"BL\"\n}, {\n \"name\": \"Saint Helena, Ascension and Tristan da Cunha\",\n \"code\": \"SH\"\n}, {\n \"name\": \"Saint Kitts and Nevis\",\n \"code\": \"KN\"\n}, {\n \"name\": \"Saint Lucia\",\n \"code\": \"LC\"\n}, {\n \"name\": \"Saint Martin (French part)\",\n \"code\": \"MF\"\n}, {\n \"name\": \"Saint Pierre and Miquelon\",\n \"code\": \"PM\"\n}, {\n \"name\": \"Saint Vincent and the Grenadines\",\n \"code\": \"VC\"\n}, {\n \"name\": \"Samoa\",\n \"code\": \"WS\"\n}, {\n \"name\": \"San Marino\",\n \"code\": \"SM\"\n}, {\n \"name\": \"Sao Tome and Principe\",\n \"code\": \"ST\"\n}, {\n \"name\": \"Saudi Arabia\",\n \"code\": \"SA\"\n}, {\n \"name\": \"Senegal\",\n \"code\": \"SN\"\n}, {\n \"name\": \"Serbia\",\n \"code\": \"RS\"\n}, {\n \"name\": \"Seychelles\",\n \"code\": \"SC\"\n}, {\n \"name\": \"Sierra Leone\",\n \"code\": \"SL\"\n}, {\n \"name\": \"Singapore\",\n \"code\": \"SG\"\n}, {\n \"name\": \"Sint Maarten (Dutch part)\",\n \"code\": \"SX\"\n}, {\n \"name\": \"Slovakia\",\n \"code\": \"SK\"\n}, {\n \"name\": \"Slovenia\",\n \"code\": \"SI\"\n}, {\n \"name\": \"Solomon Islands\",\n \"code\": \"SB\"\n}, {\n \"name\": \"Somalia\",\n \"code\": \"SO\"\n}, {\n \"name\": \"South Africa\",\n \"code\": \"ZA\"\n}, {\n \"name\": \"South Georgia and the South Sandwich Islands\",\n \"code\": \"GS\"\n}, {\n \"name\": \"South Sudan\",\n \"code\": \"SS\"\n}, {\n \"name\": \"Spain\",\n \"code\": \"ES\"\n}, {\n \"name\": \"Sri Lanka\",\n \"code\": \"LK\"\n}, {\n \"name\": \"Sudan\",\n \"code\": \"SD\"\n}, {\n \"name\": \"Suriname\",\n \"code\": \"SR\"\n}, {\n \"name\": \"Svalbard and Jan Mayen\",\n \"code\": \"SJ\"\n}, {\n \"name\": \"Swaziland\",\n \"code\": \"SZ\"\n}, {\n \"name\": \"Sweden\",\n \"code\": \"SE\"\n}, {\n \"name\": \"Switzerland\",\n \"code\": \"CH\"\n}, {\n \"name\": \"Syrian Arab Republic\",\n \"code\": \"SY\"\n}, {\n \"name\": \"Taiwan, Province of China\",\n \"code\": \"TW\"\n}, {\n \"name\": \"Tajikistan\",\n \"code\": \"TJ\"\n}, {\n \"name\": \"Tanzania, United Republic of\",\n \"code\": \"TZ\"\n}, {\n \"name\": \"Thailand\",\n \"code\": \"TH\"\n}, {\n \"name\": \"Timor-Leste\",\n \"code\": \"TL\"\n}, {\n \"name\": \"Togo\",\n \"code\": \"TG\"\n}, {\n \"name\": \"Tokelau\",\n \"code\": \"TK\"\n}, {\n \"name\": \"Tonga\",\n \"code\": \"TO\"\n}, {\n \"name\": \"Trinidad and Tobago\",\n \"code\": \"TT\"\n}, {\n \"name\": \"Tunisia\",\n \"code\": \"TN\"\n}, {\n \"name\": \"Turkey\",\n \"code\": \"TR\"\n}, {\n \"name\": \"Turkmenistan\",\n \"code\": \"TM\"\n}, {\n \"name\": \"Turks and Caicos Islands\",\n \"code\": \"TC\"\n}, {\n \"name\": \"Tuvalu\",\n \"code\": \"TV\"\n}, {\n \"name\": \"Uganda\",\n \"code\": \"UG\"\n}, {\n \"name\": \"Ukraine\",\n \"code\": \"UA\"\n}, {\n \"name\": \"United Arab Emirates\",\n \"code\": \"AE\"\n}, {\n \"name\": \"United Kingdom\",\n \"code\": \"GB\"\n}, {\n \"name\": \"United States\",\n \"code\": \"US\"\n}, {\n \"name\": \"United States Minor Outlying Islands\",\n \"code\": \"UM\"\n}, {\n \"name\": \"Uruguay\",\n \"code\": \"UY\"\n}, {\n \"name\": \"Uzbekistan\",\n \"code\": \"UZ\"\n}, {\n \"name\": \"Vanuatu\",\n \"code\": \"VU\"\n}, {\n \"name\": \"Venezuela, Bolivarian Republic of\",\n \"code\": \"VE\"\n}, {\n \"name\": \"Viet Nam\",\n \"code\": \"VN\"\n}, {\n \"name\": \"Virgin Islands, British\",\n \"code\": \"VG\"\n}, {\n \"name\": \"Virgin Islands, U.S.\",\n \"code\": \"VI\"\n}, {\n \"name\": \"Wallis and Futuna\",\n \"code\": \"WF\"\n}, {\n \"name\": \"Western Sahara\",\n \"code\": \"EH\"\n}, {\n \"name\": \"Yemen\",\n \"code\": \"YE\"\n}, {\n \"name\": \"Zambia\",\n \"code\": \"ZM\"\n}, {\n \"name\": \"Zimbabwe\",\n \"code\": \"ZW\"\n}];\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/countries.js\n ** module id = 4\n ** module chunks = 0\n **/"],"sourceRoot":""} -------------------------------------------------------------------------------- /dist/vue-country-select.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * vue-country-select v0.2.2 3 | * (c) 2016 Haixing Hu 4 | * Released under the MIT License. 5 | */ 6 | !function(e){function a(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,a),i.loaded=!0,i.exports}var n={};return a.m=e,a.c=n,a.p="",a(0)}([function(e,a,n){e.exports={replace:!0,inherit:!1,template:"",components:{"vue-select":n(1)},props:{model:{required:!0,twoWay:!0},searchable:{type:Boolean,required:!1,"default":!0},name:{type:String,required:!1,"default":""},language:{type:String,required:!1,"default":""},theme:{type:String,required:!1,"default":"bootstrap"}},beforeCompile:function(){var e=n(4);this.countries=[];for(var a=0;a",props:{options:{type:Array,required:!0},model:{required:!0,twoWay:!0},searchable:{type:Boolean,required:!1,"default":!1},matchValue:{type:Boolean,required:!1,"default":!0},name:{type:String,required:!1,"default":""},language:{type:String,required:!1,"default":""},theme:{type:String,required:!1,"default":"bootstrap"}},data:function(){return{optionsType:"unknown"}},beforeCompile:function(){this.isChanging=!1,this.control=null,this.optionsType=this.getOptionsType()},watch:{options:function(e,a){this.optionsType=this.getOptionsType();var n=this.inOptions(this.model),o=n?this.model:null;this.control.removeData("data"),this.control.val(o).trigger("change")},model:function(e,a){this.isChanging||(this.isChanging=!0,this.control.val(e).trigger("change"),this.isChanging=!1)}},ready:function(){var e=this.language;null!==e&&""!==e||(e=this.$language?this.$language:o);var a={theme:this.theme,language:this.getLanguageCode(e)};this.searchable?this.matchValue&&(a.matcher=n(3)):a.minimumResultsForSearch=1/0,this.control=$(this.$el),this.control.select2(a);var i=this;this.control.on("change",function(e){i.isChanging||(i.isChanging=!0,i.model=i.control.val(),i.$nextTick(function(){i.isChanging=!1}))})},methods:{getOptionsType:function(){if(0===this.options.length)return"values";var e=this.options[0];return"string"==typeof e||e instanceof String?"values":"undefined"!=typeof e.text?"options":"undefined"!=typeof e.label?"groups":"unknown"},inOptions:function(e){var a,n,o=this.getOptionsType(),i=this.options;switch(o){case"values":for(a=0;a0){for(var o=$.extend(!0,{},a),i=a.children.length-1;i>=0;i--){var d=a.children[i],c=matcher(e,d);null==c&&o.children.splice(i,1)}return o.children.length>0?o:matcher(e,o)}var t=n(a.text).toUpperCase(),r=n(e.term).toUpperCase();if(t.indexOf(r)>-1)return a;if(a.id){var m=n(a.id).toUpperCase();if(m.indexOf(r)>-1)return a}return null}},function(e,a){e.exports=[{name:"Afghanistan",code:"AF"},{name:"Åland Islands",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"American Samoa",code:"AS"},{name:"Andorra",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antigua and Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE"},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia, Plurinational State of",code:"BO"},{name:"Bonaire, Sint Eustatius and Saba",code:"BQ"},{name:"Bosnia and Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"Bouvet Island",code:"BV"},{name:"Brazil",code:"BR"},{name:"British Indian Ocean Territory",code:"IO"},{name:"Brunei Darussalam",code:"BN"},{name:"Bulgaria",code:"BG"},{name:"Burkina Faso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"Cape Verde",code:"CV"},{name:"Cayman Islands",code:"KY"},{name:"Central African Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"Christmas Island",code:"CX"},{name:"Cocos (Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo",code:"CG"},{name:"Congo, the Democratic Republic of the",code:"CD"},{name:"Cook Islands",code:"CK"},{name:"Costa Rica",code:"CR"},{name:"Côte d'Ivoire",code:"CI"},{name:"Croatia",code:"HR"},{name:"Cuba",code:"CU"},{name:"Curaçao",code:"CW"},{name:"Cyprus",code:"CY"},{name:"Czech Republic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"Dominican Republic",code:"DO"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"El Salvador",code:"SV"},{name:"Equatorial Guinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE"},{name:"Ethiopia",code:"ET"},{name:"Falkland Islands (Malvinas)",code:"FK"},{name:"Faroe Islands",code:"FO"},{name:"Fiji",code:"FJ"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"French Guiana",code:"GF"},{name:"French Polynesia",code:"PF"},{name:"French Southern Territories",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE"},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey",code:"GG"},{name:"Guinea",code:"GN"},{name:"Guinea-Bissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"Heard Island and McDonald Islands",code:"HM"},{name:"Holy See (Vatican City State)",code:"VA"},{name:"Honduras",code:"HN"},{name:"Hong Kong",code:"HK"},{name:"Hungary",code:"HU"},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran, Islamic Republic of",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE"},{name:"Isle of Man",code:"IM"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT"},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:"Korea, Democratic People's Republic of",code:"KP"},{name:"Korea, Republic of",code:"KR"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:"Lao People's Democratic Republic",code:"LA"},{name:"Latvia",code:"LV"},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"Libya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Macao",code:"MO"},{name:"Macedonia, the Former Yugoslav Republic of",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT"},{name:"Marshall Islands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia, Federated States of",code:"FM"},{name:"Moldova, Republic of",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montenegro",code:"ME"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands",code:"NL"},{name:"New Caledonia",code:"NC"},{name:"New Zealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"Norfolk Island",code:"NF"},{name:"Northern Mariana Islands",code:"MP"},{name:"Norway",code:"NO"},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"Palestine, State of",code:"PS"},{name:"Panama",code:"PA"},{name:"Papua New Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn",code:"PN"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"Puerto Rico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Réunion",code:"RE"},{name:"Romania",code:"RO"},{name:"Russian Federation",code:"RU"},{name:"Rwanda",code:"RW"},{name:"Saint Barthélemy",code:"BL"},{name:"Saint Helena, Ascension and Tristan da Cunha",code:"SH"},{name:"Saint Kitts and Nevis",code:"KN"},{name:"Saint Lucia",code:"LC"},{name:"Saint Martin (French part)",code:"MF"},{name:"Saint Pierre and Miquelon",code:"PM"},{name:"Saint Vincent and the Grenadines",code:"VC"},{name:"Samoa",code:"WS"},{name:"San Marino",code:"SM"},{name:"Sao Tome and Principe",code:"ST"},{name:"Saudi Arabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbia",code:"RS"},{name:"Seychelles",code:"SC"},{name:"Sierra Leone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Sint Maarten (Dutch part)",code:"SX"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"Solomon Islands",code:"SB"},{name:"Somalia",code:"SO"},{name:"South Africa",code:"ZA"},{name:"South Georgia and the South Sandwich Islands",code:"GS"},{name:"South Sudan",code:"SS"},{name:"Spain",code:"ES"},{name:"Sri Lanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbard and Jan Mayen",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"Syrian Arab Republic",code:"SY"},{name:"Taiwan, Province of China",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania, United Republic of",code:"TZ"},{name:"Thailand",code:"TH"},{name:"Timor-Leste",code:"TL"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidad and Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turks and Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"United Arab Emirates",code:"AE"},{name:"United Kingdom",code:"GB"},{name:"United States",code:"US"},{name:"United States Minor Outlying Islands",code:"UM"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Venezuela, Bolivarian Republic of",code:"VE"},{name:"Viet Nam",code:"VN"},{name:"Virgin Islands, British",code:"VG"},{name:"Virgin Islands, U.S.",code:"VI"},{name:"Wallis and Futuna",code:"WF"},{name:"Western Sahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}]}]); -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | // Gulp building scripts 2 | var gulp = require("gulp"); 3 | var del = require("del"); 4 | var gutil = require("gulp-util"); 5 | var webpack = require("webpack"); 6 | var webpackConfig = require("./webpack.config.js"); 7 | var runSequence = require("run-sequence"); 8 | var Server = require('karma').Server; 9 | var pkg = require("./package.json"); 10 | var dirs = pkg.configs.directories; 11 | 12 | // --------------------------------------------------------------------- 13 | // | Helper tasks | 14 | // --------------------------------------------------------------------- 15 | 16 | gulp.task("clean", function (done) { 17 | del([ dirs.dist, dirs.coverage ]); 18 | done(); 19 | }); 20 | 21 | gulp.task("webpack-dev", function(done) { 22 | // modify some webpack config options 23 | var webpackDevConfig = Object.create(webpackConfig); 24 | webpackDevConfig.devtool = "sourcemap"; 25 | webpackDevConfig.debug = true; 26 | // create a single instance of the compiler to allow caching 27 | var webpackDevCompiler = webpack(webpackDevConfig); 28 | // run webpack 29 | webpackDevCompiler.run(function(err, stats) { 30 | if(err) throw new gutil.PluginError("webpack:build-dev", err); 31 | gutil.log("[webpack:build-dev]", stats.toString({ 32 | colors: true 33 | })); 34 | done(); 35 | }); 36 | }); 37 | 38 | gulp.task("webpack", function(done) { 39 | // modify some webpack config options 40 | var webpackProdConfig = Object.create(webpackConfig); 41 | webpackProdConfig.plugins.push(new webpack.DefinePlugin({ 42 | "process.env": { 43 | // This has effect on the react lib size 44 | "NODE_ENV": JSON.stringify("production") 45 | } 46 | }), new webpack.optimize.UglifyJsPlugin()); 47 | webpackProdConfig.output.filename = "[name].min.js"; 48 | // run webpack 49 | webpack(webpackProdConfig, function(err, stats) { 50 | if(err) throw new gutil.PluginError("webpack:build", err); 51 | gutil.log("[webpack:build]", stats.toString({ 52 | colors: true 53 | })); 54 | done(); 55 | }); 56 | }); 57 | 58 | gulp.task('test', function(done) { 59 | // Be sure to return the stream 60 | new Server({ 61 | configFile: __dirname + '/karma.conf.js', 62 | singleRun: true 63 | }, done).start(); 64 | }); 65 | 66 | gulp.task('test:coverage', function(done) { 67 | // Be sure to return the stream 68 | process.env.TEST_TYPE = "coverage"; 69 | new Server({ 70 | configFile: __dirname + '/karma.conf.js', 71 | singleRun: true 72 | }, done).start(); 73 | }); 74 | 75 | gulp.task('test:coveralls', function(done) { 76 | // Be sure to return the stream 77 | process.env.TEST_TYPE = "coveralls"; 78 | new Server({ 79 | configFile: __dirname + '/karma.conf.js', 80 | singleRun: true 81 | }, done).start(); 82 | }); 83 | 84 | // --------------------------------------------------------------------- 85 | // | Main tasks | 86 | // --------------------------------------------------------------------- 87 | 88 | gulp.task("build-dev", function (done) { 89 | runSequence( 90 | "clean", 91 | "test:coverage", 92 | "webpack-dev", 93 | done); 94 | }); 95 | 96 | gulp.task("build", function (done) { 97 | runSequence( 98 | "clean", 99 | "test:coveralls", 100 | "webpack-dev", 101 | "webpack", 102 | done); 103 | }); 104 | 105 | gulp.task("default", ["build"]); -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | var VueLoader = require('vue-loader'); 3 | var BowerWebpackPlugin = require("bower-webpack-plugin"); 4 | 5 | module.exports = function (config) { 6 | var settings = { 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | // frameworks to use 11 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 12 | frameworks: ['mocha'], 13 | 14 | // list of files / patterns to load in the browser 15 | files: [ 16 | "./lib/jquery/dist/jquery.min.js", 17 | "./lib/select2/dist/js/select2.min.js", 18 | "./test/specs/**/*.js", 19 | { 20 | pattern: "./test/specs/i18n/*.json", 21 | watched: false, 22 | included: false, 23 | served: true 24 | } 25 | ], 26 | 27 | // list of files to exclude 28 | exclude: [ 29 | ], 30 | 31 | // preprocess matching files before serving them to the browser 32 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 33 | preprocessors: { 34 | "./test/**/*.js": ['webpack', 'sourcemap'], 35 | "./demo/**/*.vue": ['webpack', 'sourcemap'], 36 | "./lib/vue-select/**/*.vue": ['webpack', 'sourcemap'], 37 | "./src/**/*.js": ['webpack', 'sourcemap'] 38 | }, 39 | 40 | webpack: { 41 | devtool: 'inline-source-map', 42 | module: { 43 | loaders: [{ 44 | test: /\.vue$/, loader: "vue" 45 | }], 46 | postLoaders: [{ 47 | test: /\.js$/, 48 | exclude: /test|node_modules|lib|countries.js/, 49 | loader: 'istanbul-instrumenter' 50 | }] 51 | }, 52 | vue: { 53 | loaders: { 54 | html: "raw" // use raw-loader to process HTML 55 | } 56 | }, 57 | resolve: { 58 | root: [__dirname], 59 | modulesDirectories: [ "lib", "node_modules" ] 60 | }, 61 | plugins: [ 62 | // new webpack.optimize.DedupePlugin(), 63 | new BowerWebpackPlugin({ 64 | modulesDirectories: [ "lib" ], 65 | manifestFiles: "bower.json", 66 | includes: /.*/, 67 | excludes: [], 68 | searchResolveModulesDirectories: true 69 | }) 70 | ] 71 | }, 72 | 73 | webpackMiddleware: { 74 | noInfo: true 75 | }, 76 | 77 | // test results reporter to use 78 | // possible values: 'dots', 'progress' 79 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 80 | /* 81 | reporters: [ 82 | 'mocha', 'coverage' 83 | ], 84 | 85 | coverageReporter: { 86 | reporters: [{ 87 | type: 'html', dir: '../coverage' 88 | }, { 89 | type: 'lcov', dir: '../coverage' 90 | }, { 91 | type: 'text-summary', dir: '../coverage' 92 | }] 93 | }, 94 | */ 95 | 96 | // web server port 97 | port: 9876, 98 | 99 | // enable / disable colors in the output (reporters and logs) 100 | colors: true, 101 | 102 | // level of logging 103 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 104 | logLevel: config.LOG_INFO, 105 | 106 | // enable / disable watching file and executing tests whenever any file changes 107 | autoWatch: true, 108 | 109 | // Continuous Integration mode 110 | // if true, Karma captures browsers, runs the tests and exits 111 | singleRun: true 112 | }; 113 | 114 | switch (process.env.TEST_TYPE) { 115 | case 'coverage': 116 | settings.browsers = ['PhantomJS']; 117 | settings.reporters = ['coverage']; 118 | settings.coverageReporter = { 119 | reporters: [{ 120 | type: 'text-summary', dir: "./coverage" 121 | }, { 122 | type: 'html', dir: "./coverage" 123 | }] 124 | }; 125 | break; 126 | case 'coveralls': 127 | settings.browsers = ['PhantomJS']; 128 | settings.reporters = ['coverage', 'coveralls']; 129 | settings.coverageReporter = { 130 | reporters: [{ 131 | type: 'text-summary', dir: "./coverage" 132 | }, { 133 | type: 'lcov', 134 | dir: "./coverage" 135 | }] 136 | }; 137 | break; 138 | case 'sauce': 139 | var batch = process.env.SAUCE || 'batch1'; 140 | var sauce = require('./sauce')[batch]; 141 | settings.sauceLabs = sauce.sauceLabs; 142 | settings.captureTimeout = sauce.captureTimeout; 143 | settings.customLaunchers = sauce.customLaunchers; 144 | settings.browsers = sauce.browsers; 145 | settings.reporters = sauce.reporters; 146 | break; 147 | case 'browser': 148 | settings.browsers = ['Chrome', 'Safari', 'Firefox']; 149 | settings.reporters = ['progress']; 150 | break; 151 | default: 152 | settings.browsers = ['PhantomJS']; 153 | settings.reporters = ['mocha']; 154 | break; 155 | } 156 | 157 | config.set(settings); 158 | }; 159 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-country-select", 3 | "description": "A Vue.js component implementing the select control used to select countries.", 4 | "version": "0.2.3", 5 | "author": { 6 | "name": "Haixing Hu", 7 | "email": "starfish.hu@gmail.com" 8 | }, 9 | "homepage": "https://github.com/Haixing-Hu/vue-country-select", 10 | "license": "MIT", 11 | "repository": { 12 | "type": "git", 13 | "url": "git@github.com:Haixing-Hu/vue-country-select.git" 14 | }, 15 | "bugs": { 16 | "url": "https://github.com/Haixing-Hu/vue-country-select/issues" 17 | }, 18 | "main": "dist/vue-country-select.min.js", 19 | "configs": { 20 | "directories": { 21 | "dist": "dist", 22 | "src": "src", 23 | "test": "test", 24 | "coverage": "coverage" 25 | } 26 | }, 27 | "scripts": { 28 | "build": "bower install && gulp build", 29 | "test": "bower install && gulp test:coveralls", 30 | "coverage": "bower install && gulp test:coverage", 31 | "coveralls": "bower install && gulp test:coveralls", 32 | "ci": "bower install && gulp test:coveralls && gulp build" 33 | }, 34 | "engines": { 35 | "node": ">=0.10.0" 36 | }, 37 | "devDependencies": { 38 | "bower": "^1.7.9", 39 | "bower-update-all": "^0.1.2", 40 | "del": "^2.2.0", 41 | "run-sequence": "^1.2.1", 42 | "bower-webpack-plugin": "^0.1.9", 43 | "gulp": "^3.9.1", 44 | "gulp-util": "^3.0.7", 45 | "webpack": "^1.13.1", 46 | "mocha": "^2.5.3", 47 | "karma": "^0.13.22", 48 | "karma-chrome-launcher": "^1.0.1", 49 | "karma-safari-launcher": "^1.0.0", 50 | "karma-firefox-launcher": "^1.0.0", 51 | "karma-phantomjs-launcher": "^1.0.0", 52 | "karma-sauce-launcher": "^1.0.0", 53 | "karma-mocha": "^1.0.1", 54 | "karma-mocha-reporter": "^2.0.4", 55 | "karma-coverage": "^1.0.0", 56 | "karma-coveralls": "^1.1.2", 57 | "karma-sourcemap-loader": "^0.3.7", 58 | "karma-webpack": "^1.7.0", 59 | "phantomjs-prebuilt": "^2.1.7", 60 | "istanbul": "^0.4.3", 61 | "istanbul-instrumenter-loader": "^0.2.0", 62 | "vue": "^1.0.24", 63 | "vue-loader": "^8.5.2", 64 | "vue-html-loader": "^1.2.2", 65 | "vue-style-loader": "^1.0.0", 66 | "vue-hot-reload-api": "^1.2.0", 67 | "raw-loader": "^0.5.1", 68 | "html-loader": "^0.4.3", 69 | "css-loader": "^0.23.1", 70 | "file-loader": "^0.8.5", 71 | "babel-loader": "^6.2.4", 72 | "babel-core": "^6.8.0", 73 | "babel-plugin-transform-runtime": "^6.8.0", 74 | "babel-runtime": "^6.0.0", 75 | "babel-preset-es2015": "^6.6.0" 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haixing-Hu/vue-country-select/c2dd4945d88fb1e4f886a6d3ae7a99ca5a7a4bf1/screenshot.png -------------------------------------------------------------------------------- /src/countries.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The list of all countries with their 2 digit codes (ISO 3166-2) 3 | * 4 | * @see http://data.okfn.org/data/core/country-list 5 | */ 6 | 7 | module.exports = [{ 8 | "name": "Afghanistan", 9 | "code": "AF" 10 | }, { 11 | "name": "Åland Islands", 12 | "code": "AX" 13 | }, { 14 | "name": "Albania", 15 | "code": "AL" 16 | }, { 17 | "name": "Algeria", 18 | "code": "DZ" 19 | }, { 20 | "name": "American Samoa", 21 | "code": "AS" 22 | }, { 23 | "name": "Andorra", 24 | "code": "AD" 25 | }, { 26 | "name": "Angola", 27 | "code": "AO" 28 | }, { 29 | "name": "Anguilla", 30 | "code": "AI" 31 | }, { 32 | "name": "Antarctica", 33 | "code": "AQ" 34 | }, { 35 | "name": "Antigua and Barbuda", 36 | "code": "AG" 37 | }, { 38 | "name": "Argentina", 39 | "code": "AR" 40 | }, { 41 | "name": "Armenia", 42 | "code": "AM" 43 | }, { 44 | "name": "Aruba", 45 | "code": "AW" 46 | }, { 47 | "name": "Australia", 48 | "code": "AU" 49 | }, { 50 | "name": "Austria", 51 | "code": "AT" 52 | }, { 53 | "name": "Azerbaijan", 54 | "code": "AZ" 55 | }, { 56 | "name": "Bahamas", 57 | "code": "BS" 58 | }, { 59 | "name": "Bahrain", 60 | "code": "BH" 61 | }, { 62 | "name": "Bangladesh", 63 | "code": "BD" 64 | }, { 65 | "name": "Barbados", 66 | "code": "BB" 67 | }, { 68 | "name": "Belarus", 69 | "code": "BY" 70 | }, { 71 | "name": "Belgium", 72 | "code": "BE" 73 | }, { 74 | "name": "Belize", 75 | "code": "BZ" 76 | }, { 77 | "name": "Benin", 78 | "code": "BJ" 79 | }, { 80 | "name": "Bermuda", 81 | "code": "BM" 82 | }, { 83 | "name": "Bhutan", 84 | "code": "BT" 85 | }, { 86 | "name": "Bolivia, Plurinational State of", 87 | "code": "BO" 88 | }, { 89 | "name": "Bonaire, Sint Eustatius and Saba", 90 | "code": "BQ" 91 | }, { 92 | "name": "Bosnia and Herzegovina", 93 | "code": "BA" 94 | }, { 95 | "name": "Botswana", 96 | "code": "BW" 97 | }, { 98 | "name": "Bouvet Island", 99 | "code": "BV" 100 | }, { 101 | "name": "Brazil", 102 | "code": "BR" 103 | }, { 104 | "name": "British Indian Ocean Territory", 105 | "code": "IO" 106 | }, { 107 | "name": "Brunei Darussalam", 108 | "code": "BN" 109 | }, { 110 | "name": "Bulgaria", 111 | "code": "BG" 112 | }, { 113 | "name": "Burkina Faso", 114 | "code": "BF" 115 | }, { 116 | "name": "Burundi", 117 | "code": "BI" 118 | }, { 119 | "name": "Cambodia", 120 | "code": "KH" 121 | }, { 122 | "name": "Cameroon", 123 | "code": "CM" 124 | }, { 125 | "name": "Canada", 126 | "code": "CA" 127 | }, { 128 | "name": "Cape Verde", 129 | "code": "CV" 130 | }, { 131 | "name": "Cayman Islands", 132 | "code": "KY" 133 | }, { 134 | "name": "Central African Republic", 135 | "code": "CF" 136 | }, { 137 | "name": "Chad", 138 | "code": "TD" 139 | }, { 140 | "name": "Chile", 141 | "code": "CL" 142 | }, { 143 | "name": "China", 144 | "code": "CN" 145 | }, { 146 | "name": "Christmas Island", 147 | "code": "CX" 148 | }, { 149 | "name": "Cocos (Keeling) Islands", 150 | "code": "CC" 151 | }, { 152 | "name": "Colombia", 153 | "code": "CO" 154 | }, { 155 | "name": "Comoros", 156 | "code": "KM" 157 | }, { 158 | "name": "Congo", 159 | "code": "CG" 160 | }, { 161 | "name": "Congo, the Democratic Republic of the", 162 | "code": "CD" 163 | }, { 164 | "name": "Cook Islands", 165 | "code": "CK" 166 | }, { 167 | "name": "Costa Rica", 168 | "code": "CR" 169 | }, { 170 | "name": "Côte d'Ivoire", 171 | "code": "CI" 172 | }, { 173 | "name": "Croatia", 174 | "code": "HR" 175 | }, { 176 | "name": "Cuba", 177 | "code": "CU" 178 | }, { 179 | "name": "Curaçao", 180 | "code": "CW" 181 | }, { 182 | "name": "Cyprus", 183 | "code": "CY" 184 | }, { 185 | "name": "Czech Republic", 186 | "code": "CZ" 187 | }, { 188 | "name": "Denmark", 189 | "code": "DK" 190 | }, { 191 | "name": "Djibouti", 192 | "code": "DJ" 193 | }, { 194 | "name": "Dominica", 195 | "code": "DM" 196 | }, { 197 | "name": "Dominican Republic", 198 | "code": "DO" 199 | }, { 200 | "name": "Ecuador", 201 | "code": "EC" 202 | }, { 203 | "name": "Egypt", 204 | "code": "EG" 205 | }, { 206 | "name": "El Salvador", 207 | "code": "SV" 208 | }, { 209 | "name": "Equatorial Guinea", 210 | "code": "GQ" 211 | }, { 212 | "name": "Eritrea", 213 | "code": "ER" 214 | }, { 215 | "name": "Estonia", 216 | "code": "EE" 217 | }, { 218 | "name": "Ethiopia", 219 | "code": "ET" 220 | }, { 221 | "name": "Falkland Islands (Malvinas)", 222 | "code": "FK" 223 | }, { 224 | "name": "Faroe Islands", 225 | "code": "FO" 226 | }, { 227 | "name": "Fiji", 228 | "code": "FJ" 229 | }, { 230 | "name": "Finland", 231 | "code": "FI" 232 | }, { 233 | "name": "France", 234 | "code": "FR" 235 | }, { 236 | "name": "French Guiana", 237 | "code": "GF" 238 | }, { 239 | "name": "French Polynesia", 240 | "code": "PF" 241 | }, { 242 | "name": "French Southern Territories", 243 | "code": "TF" 244 | }, { 245 | "name": "Gabon", 246 | "code": "GA" 247 | }, { 248 | "name": "Gambia", 249 | "code": "GM" 250 | }, { 251 | "name": "Georgia", 252 | "code": "GE" 253 | }, { 254 | "name": "Germany", 255 | "code": "DE" 256 | }, { 257 | "name": "Ghana", 258 | "code": "GH" 259 | }, { 260 | "name": "Gibraltar", 261 | "code": "GI" 262 | }, { 263 | "name": "Greece", 264 | "code": "GR" 265 | }, { 266 | "name": "Greenland", 267 | "code": "GL" 268 | }, { 269 | "name": "Grenada", 270 | "code": "GD" 271 | }, { 272 | "name": "Guadeloupe", 273 | "code": "GP" 274 | }, { 275 | "name": "Guam", 276 | "code": "GU" 277 | }, { 278 | "name": "Guatemala", 279 | "code": "GT" 280 | }, { 281 | "name": "Guernsey", 282 | "code": "GG" 283 | }, { 284 | "name": "Guinea", 285 | "code": "GN" 286 | }, { 287 | "name": "Guinea-Bissau", 288 | "code": "GW" 289 | }, { 290 | "name": "Guyana", 291 | "code": "GY" 292 | }, { 293 | "name": "Haiti", 294 | "code": "HT" 295 | }, { 296 | "name": "Heard Island and McDonald Islands", 297 | "code": "HM" 298 | }, { 299 | "name": "Holy See (Vatican City State)", 300 | "code": "VA" 301 | }, { 302 | "name": "Honduras", 303 | "code": "HN" 304 | }, { 305 | "name": "Hong Kong", 306 | "code": "HK" 307 | }, { 308 | "name": "Hungary", 309 | "code": "HU" 310 | }, { 311 | "name": "Iceland", 312 | "code": "IS" 313 | }, { 314 | "name": "India", 315 | "code": "IN" 316 | }, { 317 | "name": "Indonesia", 318 | "code": "ID" 319 | }, { 320 | "name": "Iran, Islamic Republic of", 321 | "code": "IR" 322 | }, { 323 | "name": "Iraq", 324 | "code": "IQ" 325 | }, { 326 | "name": "Ireland", 327 | "code": "IE" 328 | }, { 329 | "name": "Isle of Man", 330 | "code": "IM" 331 | }, { 332 | "name": "Israel", 333 | "code": "IL" 334 | }, { 335 | "name": "Italy", 336 | "code": "IT" 337 | }, { 338 | "name": "Jamaica", 339 | "code": "JM" 340 | }, { 341 | "name": "Japan", 342 | "code": "JP" 343 | }, { 344 | "name": "Jersey", 345 | "code": "JE" 346 | }, { 347 | "name": "Jordan", 348 | "code": "JO" 349 | }, { 350 | "name": "Kazakhstan", 351 | "code": "KZ" 352 | }, { 353 | "name": "Kenya", 354 | "code": "KE" 355 | }, { 356 | "name": "Kiribati", 357 | "code": "KI" 358 | }, { 359 | "name": "Korea, Democratic People's Republic of", 360 | "code": "KP" 361 | }, { 362 | "name": "Korea, Republic of", 363 | "code": "KR" 364 | }, { 365 | "name": "Kuwait", 366 | "code": "KW" 367 | }, { 368 | "name": "Kyrgyzstan", 369 | "code": "KG" 370 | }, { 371 | "name": "Lao People's Democratic Republic", 372 | "code": "LA" 373 | }, { 374 | "name": "Latvia", 375 | "code": "LV" 376 | }, { 377 | "name": "Lebanon", 378 | "code": "LB" 379 | }, { 380 | "name": "Lesotho", 381 | "code": "LS" 382 | }, { 383 | "name": "Liberia", 384 | "code": "LR" 385 | }, { 386 | "name": "Libya", 387 | "code": "LY" 388 | }, { 389 | "name": "Liechtenstein", 390 | "code": "LI" 391 | }, { 392 | "name": "Lithuania", 393 | "code": "LT" 394 | }, { 395 | "name": "Luxembourg", 396 | "code": "LU" 397 | }, { 398 | "name": "Macao", 399 | "code": "MO" 400 | }, { 401 | "name": "Macedonia, the Former Yugoslav Republic of", 402 | "code": "MK" 403 | }, { 404 | "name": "Madagascar", 405 | "code": "MG" 406 | }, { 407 | "name": "Malawi", 408 | "code": "MW" 409 | }, { 410 | "name": "Malaysia", 411 | "code": "MY" 412 | }, { 413 | "name": "Maldives", 414 | "code": "MV" 415 | }, { 416 | "name": "Mali", 417 | "code": "ML" 418 | }, { 419 | "name": "Malta", 420 | "code": "MT" 421 | }, { 422 | "name": "Marshall Islands", 423 | "code": "MH" 424 | }, { 425 | "name": "Martinique", 426 | "code": "MQ" 427 | }, { 428 | "name": "Mauritania", 429 | "code": "MR" 430 | }, { 431 | "name": "Mauritius", 432 | "code": "MU" 433 | }, { 434 | "name": "Mayotte", 435 | "code": "YT" 436 | }, { 437 | "name": "Mexico", 438 | "code": "MX" 439 | }, { 440 | "name": "Micronesia, Federated States of", 441 | "code": "FM" 442 | }, { 443 | "name": "Moldova, Republic of", 444 | "code": "MD" 445 | }, { 446 | "name": "Monaco", 447 | "code": "MC" 448 | }, { 449 | "name": "Mongolia", 450 | "code": "MN" 451 | }, { 452 | "name": "Montenegro", 453 | "code": "ME" 454 | }, { 455 | "name": "Montserrat", 456 | "code": "MS" 457 | }, { 458 | "name": "Morocco", 459 | "code": "MA" 460 | }, { 461 | "name": "Mozambique", 462 | "code": "MZ" 463 | }, { 464 | "name": "Myanmar", 465 | "code": "MM" 466 | }, { 467 | "name": "Namibia", 468 | "code": "NA" 469 | }, { 470 | "name": "Nauru", 471 | "code": "NR" 472 | }, { 473 | "name": "Nepal", 474 | "code": "NP" 475 | }, { 476 | "name": "Netherlands", 477 | "code": "NL" 478 | }, { 479 | "name": "New Caledonia", 480 | "code": "NC" 481 | }, { 482 | "name": "New Zealand", 483 | "code": "NZ" 484 | }, { 485 | "name": "Nicaragua", 486 | "code": "NI" 487 | }, { 488 | "name": "Niger", 489 | "code": "NE" 490 | }, { 491 | "name": "Nigeria", 492 | "code": "NG" 493 | }, { 494 | "name": "Niue", 495 | "code": "NU" 496 | }, { 497 | "name": "Norfolk Island", 498 | "code": "NF" 499 | }, { 500 | "name": "Northern Mariana Islands", 501 | "code": "MP" 502 | }, { 503 | "name": "Norway", 504 | "code": "NO" 505 | }, { 506 | "name": "Oman", 507 | "code": "OM" 508 | }, { 509 | "name": "Pakistan", 510 | "code": "PK" 511 | }, { 512 | "name": "Palau", 513 | "code": "PW" 514 | }, { 515 | "name": "Palestine, State of", 516 | "code": "PS" 517 | }, { 518 | "name": "Panama", 519 | "code": "PA" 520 | }, { 521 | "name": "Papua New Guinea", 522 | "code": "PG" 523 | }, { 524 | "name": "Paraguay", 525 | "code": "PY" 526 | }, { 527 | "name": "Peru", 528 | "code": "PE" 529 | }, { 530 | "name": "Philippines", 531 | "code": "PH" 532 | }, { 533 | "name": "Pitcairn", 534 | "code": "PN" 535 | }, { 536 | "name": "Poland", 537 | "code": "PL" 538 | }, { 539 | "name": "Portugal", 540 | "code": "PT" 541 | }, { 542 | "name": "Puerto Rico", 543 | "code": "PR" 544 | }, { 545 | "name": "Qatar", 546 | "code": "QA" 547 | }, { 548 | "name": "Réunion", 549 | "code": "RE" 550 | }, { 551 | "name": "Romania", 552 | "code": "RO" 553 | }, { 554 | "name": "Russian Federation", 555 | "code": "RU" 556 | }, { 557 | "name": "Rwanda", 558 | "code": "RW" 559 | }, { 560 | "name": "Saint Barthélemy", 561 | "code": "BL" 562 | }, { 563 | "name": "Saint Helena, Ascension and Tristan da Cunha", 564 | "code": "SH" 565 | }, { 566 | "name": "Saint Kitts and Nevis", 567 | "code": "KN" 568 | }, { 569 | "name": "Saint Lucia", 570 | "code": "LC" 571 | }, { 572 | "name": "Saint Martin (French part)", 573 | "code": "MF" 574 | }, { 575 | "name": "Saint Pierre and Miquelon", 576 | "code": "PM" 577 | }, { 578 | "name": "Saint Vincent and the Grenadines", 579 | "code": "VC" 580 | }, { 581 | "name": "Samoa", 582 | "code": "WS" 583 | }, { 584 | "name": "San Marino", 585 | "code": "SM" 586 | }, { 587 | "name": "Sao Tome and Principe", 588 | "code": "ST" 589 | }, { 590 | "name": "Saudi Arabia", 591 | "code": "SA" 592 | }, { 593 | "name": "Senegal", 594 | "code": "SN" 595 | }, { 596 | "name": "Serbia", 597 | "code": "RS" 598 | }, { 599 | "name": "Seychelles", 600 | "code": "SC" 601 | }, { 602 | "name": "Sierra Leone", 603 | "code": "SL" 604 | }, { 605 | "name": "Singapore", 606 | "code": "SG" 607 | }, { 608 | "name": "Sint Maarten (Dutch part)", 609 | "code": "SX" 610 | }, { 611 | "name": "Slovakia", 612 | "code": "SK" 613 | }, { 614 | "name": "Slovenia", 615 | "code": "SI" 616 | }, { 617 | "name": "Solomon Islands", 618 | "code": "SB" 619 | }, { 620 | "name": "Somalia", 621 | "code": "SO" 622 | }, { 623 | "name": "South Africa", 624 | "code": "ZA" 625 | }, { 626 | "name": "South Georgia and the South Sandwich Islands", 627 | "code": "GS" 628 | }, { 629 | "name": "South Sudan", 630 | "code": "SS" 631 | }, { 632 | "name": "Spain", 633 | "code": "ES" 634 | }, { 635 | "name": "Sri Lanka", 636 | "code": "LK" 637 | }, { 638 | "name": "Sudan", 639 | "code": "SD" 640 | }, { 641 | "name": "Suriname", 642 | "code": "SR" 643 | }, { 644 | "name": "Svalbard and Jan Mayen", 645 | "code": "SJ" 646 | }, { 647 | "name": "Swaziland", 648 | "code": "SZ" 649 | }, { 650 | "name": "Sweden", 651 | "code": "SE" 652 | }, { 653 | "name": "Switzerland", 654 | "code": "CH" 655 | }, { 656 | "name": "Syrian Arab Republic", 657 | "code": "SY" 658 | }, { 659 | "name": "Taiwan, Province of China", 660 | "code": "TW" 661 | }, { 662 | "name": "Tajikistan", 663 | "code": "TJ" 664 | }, { 665 | "name": "Tanzania, United Republic of", 666 | "code": "TZ" 667 | }, { 668 | "name": "Thailand", 669 | "code": "TH" 670 | }, { 671 | "name": "Timor-Leste", 672 | "code": "TL" 673 | }, { 674 | "name": "Togo", 675 | "code": "TG" 676 | }, { 677 | "name": "Tokelau", 678 | "code": "TK" 679 | }, { 680 | "name": "Tonga", 681 | "code": "TO" 682 | }, { 683 | "name": "Trinidad and Tobago", 684 | "code": "TT" 685 | }, { 686 | "name": "Tunisia", 687 | "code": "TN" 688 | }, { 689 | "name": "Turkey", 690 | "code": "TR" 691 | }, { 692 | "name": "Turkmenistan", 693 | "code": "TM" 694 | }, { 695 | "name": "Turks and Caicos Islands", 696 | "code": "TC" 697 | }, { 698 | "name": "Tuvalu", 699 | "code": "TV" 700 | }, { 701 | "name": "Uganda", 702 | "code": "UG" 703 | }, { 704 | "name": "Ukraine", 705 | "code": "UA" 706 | }, { 707 | "name": "United Arab Emirates", 708 | "code": "AE" 709 | }, { 710 | "name": "United Kingdom", 711 | "code": "GB" 712 | }, { 713 | "name": "United States", 714 | "code": "US" 715 | }, { 716 | "name": "United States Minor Outlying Islands", 717 | "code": "UM" 718 | }, { 719 | "name": "Uruguay", 720 | "code": "UY" 721 | }, { 722 | "name": "Uzbekistan", 723 | "code": "UZ" 724 | }, { 725 | "name": "Vanuatu", 726 | "code": "VU" 727 | }, { 728 | "name": "Venezuela, Bolivarian Republic of", 729 | "code": "VE" 730 | }, { 731 | "name": "Viet Nam", 732 | "code": "VN" 733 | }, { 734 | "name": "Virgin Islands, British", 735 | "code": "VG" 736 | }, { 737 | "name": "Virgin Islands, U.S.", 738 | "code": "VI" 739 | }, { 740 | "name": "Wallis and Futuna", 741 | "code": "WF" 742 | }, { 743 | "name": "Western Sahara", 744 | "code": "EH" 745 | }, { 746 | "name": "Yemen", 747 | "code": "YE" 748 | }, { 749 | "name": "Zambia", 750 | "code": "ZM" 751 | }, { 752 | "name": "Zimbabwe", 753 | "code": "ZW" 754 | }]; -------------------------------------------------------------------------------- /src/i18n/en-US.json: -------------------------------------------------------------------------------- 1 | { 2 | "country": { 3 | "AF": "Afghanistan", 4 | "AX": "Åland Islands", 5 | "AL": "Albania", 6 | "DZ": "Algeria", 7 | "AS": "American Samoa", 8 | "AD": "Andorra", 9 | "AO": "Angola", 10 | "AI": "Anguilla", 11 | "AQ": "Antarctica", 12 | "AG": "Antigua and Barbuda", 13 | "AR": "Argentina", 14 | "AM": "Armenia", 15 | "AW": "Aruba", 16 | "AU": "Australia", 17 | "AT": "Austria", 18 | "AZ": "Azerbaijan", 19 | "BS": "Bahamas", 20 | "BH": "Bahrain", 21 | "BD": "Bangladesh", 22 | "BB": "Barbados", 23 | "BY": "Belarus", 24 | "BE": "Belgium", 25 | "BZ": "Belize", 26 | "BJ": "Benin", 27 | "BM": "Bermuda", 28 | "BT": "Bhutan", 29 | "BO": "Bolivia, Plurinational State of", 30 | "BQ": "Bonaire, Sint Eustatius and Saba", 31 | "BA": "Bosnia and Herzegovina", 32 | "BW": "Botswana", 33 | "BV": "Bouvet Island", 34 | "BR": "Brazil", 35 | "IO": "British Indian Ocean Territory", 36 | "BN": "Brunei Darussalam", 37 | "BG": "Bulgaria", 38 | "BF": "Burkina Faso", 39 | "BI": "Burundi", 40 | "KH": "Cambodia", 41 | "CM": "Cameroon", 42 | "CA": "Canada", 43 | "CV": "Cape Verde", 44 | "KY": "Cayman Islands", 45 | "CF": "Central African Republic", 46 | "TD": "Chad", 47 | "CL": "Chile", 48 | "CN": "China", 49 | "CX": "Christmas Island", 50 | "CC": "Cocos (Keeling) Islands", 51 | "CO": "Colombia", 52 | "KM": "Comoros", 53 | "CG": "Congo", 54 | "CD": "Congo, the Democratic Republic of the", 55 | "CK": "Cook Islands", 56 | "CR": "Costa Rica", 57 | "CI": "Côte d'Ivoire", 58 | "HR": "Croatia", 59 | "CU": "Cuba", 60 | "CW": "Curaçao", 61 | "CY": "Cyprus", 62 | "CZ": "Czech Republic", 63 | "DK": "Denmark", 64 | "DJ": "Djibouti", 65 | "DM": "Dominica", 66 | "DO": "Dominican Republic", 67 | "EC": "Ecuador", 68 | "EG": "Egypt", 69 | "SV": "El Salvador", 70 | "GQ": "Equatorial Guinea", 71 | "ER": "Eritrea", 72 | "EE": "Estonia", 73 | "ET": "Ethiopia", 74 | "FK": "Falkland Islands (Malvinas)", 75 | "FO": "Faroe Islands", 76 | "FJ": "Fiji", 77 | "FI": "Finland", 78 | "FR": "France", 79 | "GF": "French Guiana", 80 | "PF": "French Polynesia", 81 | "TF": "French Southern Territories", 82 | "GA": "Gabon", 83 | "GM": "Gambia", 84 | "GE": "Georgia", 85 | "DE": "Germany", 86 | "GH": "Ghana", 87 | "GI": "Gibraltar", 88 | "GR": "Greece", 89 | "GL": "Greenland", 90 | "GD": "Grenada", 91 | "GP": "Guadeloupe", 92 | "GU": "Guam", 93 | "GT": "Guatemala", 94 | "GG": "Guernsey", 95 | "GN": "Guinea", 96 | "GW": "Guinea-Bissau", 97 | "GY": "Guyana", 98 | "HT": "Haiti", 99 | "HM": "Heard Island and McDonald Islands", 100 | "VA": "Holy See (Vatican City State)", 101 | "HN": "Honduras", 102 | "HK": "Hong Kong", 103 | "HU": "Hungary", 104 | "IS": "Iceland", 105 | "IN": "India", 106 | "ID": "Indonesia", 107 | "IR": "Iran, Islamic Republic of", 108 | "IQ": "Iraq", 109 | "IE": "Ireland", 110 | "IM": "Isle of Man", 111 | "IL": "Israel", 112 | "IT": "Italy", 113 | "JM": "Jamaica", 114 | "JP": "Japan", 115 | "JE": "Jersey", 116 | "JO": "Jordan", 117 | "KZ": "Kazakhstan", 118 | "KE": "Kenya", 119 | "KI": "Kiribati", 120 | "KP": "Korea, Democratic People's Republic of", 121 | "KR": "Korea, Republic of", 122 | "KW": "Kuwait", 123 | "KG": "Kyrgyzstan", 124 | "LA": "Lao People's Democratic Republic", 125 | "LV": "Latvia", 126 | "LB": "Lebanon", 127 | "LS": "Lesotho", 128 | "LR": "Liberia", 129 | "LY": "Libya", 130 | "LI": "Liechtenstein", 131 | "LT": "Lithuania", 132 | "LU": "Luxembourg", 133 | "MO": "Macao", 134 | "MK": "Macedonia, the Former Yugoslav Republic of", 135 | "MG": "Madagascar", 136 | "MW": "Malawi", 137 | "MY": "Malaysia", 138 | "MV": "Maldives", 139 | "ML": "Mali", 140 | "MT": "Malta", 141 | "MH": "Marshall Islands", 142 | "MQ": "Martinique", 143 | "MR": "Mauritania", 144 | "MU": "Mauritius", 145 | "YT": "Mayotte", 146 | "MX": "Mexico", 147 | "FM": "Micronesia, Federated States of", 148 | "MD": "Moldova, Republic of", 149 | "MC": "Monaco", 150 | "MN": "Mongolia", 151 | "ME": "Montenegro", 152 | "MS": "Montserrat", 153 | "MA": "Morocco", 154 | "MZ": "Mozambique", 155 | "MM": "Myanmar", 156 | "NA": "Namibia", 157 | "NR": "Nauru", 158 | "NP": "Nepal", 159 | "NL": "Netherlands", 160 | "NC": "New Caledonia", 161 | "NZ": "New Zealand", 162 | "NI": "Nicaragua", 163 | "NE": "Niger", 164 | "NG": "Nigeria", 165 | "NU": "Niue", 166 | "NF": "Norfolk Island", 167 | "MP": "Northern Mariana Islands", 168 | "NO": "Norway", 169 | "OM": "Oman", 170 | "PK": "Pakistan", 171 | "PW": "Palau", 172 | "PS": "Palestine, State of", 173 | "PA": "Panama", 174 | "PG": "Papua New Guinea", 175 | "PY": "Paraguay", 176 | "PE": "Peru", 177 | "PH": "Philippines", 178 | "PN": "Pitcairn", 179 | "PL": "Poland", 180 | "PT": "Portugal", 181 | "PR": "Puerto Rico", 182 | "QA": "Qatar", 183 | "RE": "Réunion", 184 | "RO": "Romania", 185 | "RU": "Russian Federation", 186 | "RW": "Rwanda", 187 | "BL": "Saint Barthélemy", 188 | "SH": "Saint Helena, Ascension and Tristan da Cunha", 189 | "KN": "Saint Kitts and Nevis", 190 | "LC": "Saint Lucia", 191 | "MF": "Saint Martin (French part)", 192 | "PM": "Saint Pierre and Miquelon", 193 | "VC": "Saint Vincent and the Grenadines", 194 | "WS": "Samoa", 195 | "SM": "San Marino", 196 | "ST": "Sao Tome and Principe", 197 | "SA": "Saudi Arabia", 198 | "SN": "Senegal", 199 | "RS": "Serbia", 200 | "SC": "Seychelles", 201 | "SL": "Sierra Leone", 202 | "SG": "Singapore", 203 | "SX": "Sint Maarten (Dutch part)", 204 | "SK": "Slovakia", 205 | "SI": "Slovenia", 206 | "SB": "Solomon Islands", 207 | "SO": "Somalia", 208 | "ZA": "South Africa", 209 | "GS": "South Georgia and the South Sandwich Islands", 210 | "SS": "South Sudan", 211 | "ES": "Spain", 212 | "LK": "Sri Lanka", 213 | "SD": "Sudan", 214 | "SR": "Suriname", 215 | "SJ": "Svalbard and Jan Mayen", 216 | "SZ": "Swaziland", 217 | "SE": "Sweden", 218 | "CH": "Switzerland", 219 | "SY": "Syrian Arab Republic", 220 | "TW": "Taiwan, Province of China", 221 | "TJ": "Tajikistan", 222 | "TZ": "Tanzania, United Republic of", 223 | "TH": "Thailand", 224 | "TL": "Timor-Leste", 225 | "TG": "Togo", 226 | "TK": "Tokelau", 227 | "TO": "Tonga", 228 | "TT": "Trinidad and Tobago", 229 | "TN": "Tunisia", 230 | "TR": "Turkey", 231 | "TM": "Turkmenistan", 232 | "TC": "Turks and Caicos Islands", 233 | "TV": "Tuvalu", 234 | "UG": "Uganda", 235 | "UA": "Ukraine", 236 | "AE": "United Arab Emirates", 237 | "GB": "United Kingdom", 238 | "US": "United States", 239 | "UM": "United States Minor Outlying Islands", 240 | "UY": "Uruguay", 241 | "UZ": "Uzbekistan", 242 | "VU": "Vanuatu", 243 | "VE": "Venezuela, Bolivarian Republic of", 244 | "VN": "Viet Nam", 245 | "VG": "Virgin Islands, British", 246 | "VI": "Virgin Islands, U.S.", 247 | "WF": "Wallis and Futuna", 248 | "EH": "Western Sahara", 249 | "YE": "Yemen", 250 | "ZM": "Zambia", 251 | "ZW": "Zimbabwe" 252 | } 253 | } -------------------------------------------------------------------------------- /src/i18n/zh-CN.json: -------------------------------------------------------------------------------- 1 | { 2 | "country": { 3 | "AF": "阿富汗", 4 | "AX": "奥兰群岛", 5 | "AL": "阿尔巴尼亚", 6 | "DZ": "阿尔及利亚", 7 | "AS": "美属萨摩亚", 8 | "AD": "安道尔", 9 | "AO": "安哥拉", 10 | "AI": "安圭拉", 11 | "AQ": "南极洲", 12 | "AG": "安提瓜和巴布达", 13 | "AR": "阿根廷", 14 | "AM": "亚美尼亚", 15 | "AW": "阿鲁巴", 16 | "AU": "澳大利亚", 17 | "AT": "奥地利", 18 | "AZ": "阿塞拜疆", 19 | "BS": "巴哈马", 20 | "BH": "巴林", 21 | "BD": "孟加拉国", 22 | "BB": "巴巴多斯", 23 | "BY": "白俄罗斯", 24 | "BE": "比利时", 25 | "BZ": "伯利兹", 26 | "BJ": "贝宁", 27 | "BM": "百慕大", 28 | "BT": "不丹", 29 | "BO": "玻利维亚, 多民族国", 30 | "BQ": "博内尔岛, 圣尤斯特歇斯和萨巴", 31 | "BA": "波斯尼亚和黑塞哥维那", 32 | "BW": "博茨瓦纳", 33 | "BV": "布维岛", 34 | "BR": "巴西", 35 | "IO": "英属印度洋领地", 36 | "BN": "文莱达鲁萨兰国", 37 | "BG": "保加利亚", 38 | "BF": "布基纳法索", 39 | "BI": "布隆迪", 40 | "KH": "柬埔寨", 41 | "CM": "喀麦隆", 42 | "CA": "加拿大", 43 | "CV": "佛得角", 44 | "KY": "开曼群岛", 45 | "CF": "中非共和国", 46 | "TD": "乍得", 47 | "CL": "智利", 48 | "CN": "中国", 49 | "CX": "圣诞岛", 50 | "CC": "科科斯群岛", 51 | "CO": "哥伦比亚", 52 | "KM": "科摩罗", 53 | "CG": "刚果", 54 | "CD": "刚果民主共和国", 55 | "CK": "库克群岛", 56 | "CR": "哥斯达黎加", 57 | "CI": "科特迪瓦", 58 | "HR": "克罗地亚", 59 | "CU": "古巴", 60 | "CW": "库拉索", 61 | "CY": "塞浦路斯", 62 | "CZ": "捷克", 63 | "DK": "丹麦", 64 | "DJ": "吉布提", 65 | "DM": "多米尼克", 66 | "DO": "多明尼加共和国", 67 | "EC": "厄瓜多尔", 68 | "EG": "埃及", 69 | "SV": "萨尔瓦多", 70 | "GQ": "赤道几内亚", 71 | "ER": "厄立特里亚", 72 | "EE": "爱沙尼亚", 73 | "ET": "埃塞俄比亚", 74 | "FK": "(马尔维纳斯群岛)福克兰群岛", 75 | "FO": "法罗群岛", 76 | "FJ": "斐济", 77 | "FI": "芬兰", 78 | "FR": "法国", 79 | "GF": "法属圭亚那", 80 | "PF": "法属波利尼西亚", 81 | "TF": "法国南部领土", 82 | "GA": "加蓬", 83 | "GM": "冈比亚", 84 | "GE": "格鲁吉亚", 85 | "DE": "德国", 86 | "GH": "加纳", 87 | "GI": "直布罗陀", 88 | "GR": "希腊", 89 | "GL": "格陵兰岛", 90 | "GD": "格林纳达", 91 | "GP": "瓜德罗普岛", 92 | "GU": "关岛", 93 | "GT": "危地马拉", 94 | "GG": "根西岛", 95 | "GN": "几内亚", 96 | "GW": "几内亚比绍", 97 | "GY": "圭亚那", 98 | "HT": "海地", 99 | "HM": "赫德岛和麦当劳群岛", 100 | "VA": "教廷(梵蒂冈城国)", 101 | "HN": "洪都拉斯", 102 | "HK": "中国香港", 103 | "HU": "匈牙利", 104 | "IS": "冰岛", 105 | "IN": "印度", 106 | "ID": "印度尼西亚", 107 | "IR": "伊朗伊斯兰共和国", 108 | "IQ": "伊拉克", 109 | "IE": "爱尔兰", 110 | "IM": "马恩岛", 111 | "IL": "以色列", 112 | "IT": "意大利", 113 | "JM": "牙买加", 114 | "JP": "日本", 115 | "JE": "泽西岛", 116 | "JO": "约旦", 117 | "KZ": "哈萨克斯坦", 118 | "KE": "肯尼亚", 119 | "KI": "基里巴斯", 120 | "KP": "朝鲜", 121 | "KR": "韩国", 122 | "KW": "科威特", 123 | "KG": "吉尔吉斯斯坦", 124 | "LA": "老挝", 125 | "LV": "拉脱维亚", 126 | "LB": "黎巴嫩", 127 | "LS": "莱索托", 128 | "LR": "利比里亚", 129 | "LY": "利比亚", 130 | "LI": "列支敦士登", 131 | "LT": "立陶宛", 132 | "LU": "卢森堡", 133 | "MO": "中国澳门", 134 | "MK": "马其顿, 前南斯拉夫共和国", 135 | "MG": "马达加斯加", 136 | "MW": "马拉维", 137 | "MY": "马来西亚", 138 | "MV": "马尔代夫", 139 | "ML": "马里", 140 | "MT": "马耳他", 141 | "MH": "马绍尔群岛", 142 | "MQ": "马提尼克岛", 143 | "MR": "毛里塔尼亚", 144 | "MU": "毛里求斯", 145 | "YT": "马约特", 146 | "MX": "墨西哥", 147 | "FM": "密克罗尼西亚联邦", 148 | "MD": "摩尔多瓦共和国", 149 | "MC": "摩纳哥", 150 | "MN": "蒙古", 151 | "ME": "黑山", 152 | "MS": "蒙特塞拉特", 153 | "MA": "摩洛哥", 154 | "MZ": "莫桑比克", 155 | "MM": "缅甸", 156 | "NA": "纳米比亚", 157 | "NR": "瑙鲁", 158 | "NP": "尼泊尔", 159 | "NL": "荷兰", 160 | "NC": "新喀里多尼亚", 161 | "NZ": "新西兰", 162 | "NI": "尼加拉瓜", 163 | "NE": "尼日尔", 164 | "NG": "尼日利亚", 165 | "NU": "纽埃", 166 | "NF": "诺福克岛", 167 | "MP": "北马里亚纳群岛", 168 | "NO": "挪威", 169 | "OM": "阿曼", 170 | "PK": "巴基斯坦", 171 | "PW": "帕劳", 172 | "PS": "巴勒斯坦", 173 | "PA": "巴拿马", 174 | "PG": "巴布亚新几内亚", 175 | "PY": "巴拉圭", 176 | "PE": "秘鲁", 177 | "PH": "菲律宾", 178 | "PN": "皮特凯恩", 179 | "PL": "波兰", 180 | "PT": "葡萄牙", 181 | "PR": "波多黎各", 182 | "QA": "卡塔尔", 183 | "RE": "留尼旺岛", 184 | "RO": "罗马尼亚", 185 | "RU": "俄罗斯联邦", 186 | "RW": "卢旺达", 187 | "BL": "圣巴泰勒米", 188 | "SH": "圣赫勒拿, 阿森松岛和特里斯坦 - 达库尼亚群岛", 189 | "KN": "圣基茨和尼维斯", 190 | "LC": "圣卢西亚", 191 | "MF": "圣马丁(法国部分)", 192 | "PM": "圣皮埃尔和密克隆岛", 193 | "VC": "圣文森特和格林纳丁斯", 194 | "WS": "萨摩亚", 195 | "SM": "圣马力诺", 196 | "ST": "圣多美和普林西比", 197 | "SA": "沙特阿拉伯", 198 | "SN": "塞内加尔", 199 | "RS": "塞尔维亚", 200 | "SC": "塞舌耳", 201 | "SL": "塞拉利昂", 202 | "SG": "新加坡", 203 | "SX": "圣马丁岛(荷兰部分)", 204 | "SK": "斯洛伐克", 205 | "SI": "斯洛文尼亚", 206 | "SB": "所罗门群岛", 207 | "SO": "索马里", 208 | "ZA": "南非", 209 | "GS": "南乔治亚岛和南桑威奇群岛", 210 | "SS": "南苏丹", 211 | "ES": "西班牙", 212 | "LK": "斯里兰卡", 213 | "SD": "苏丹红", 214 | "SR": "苏里南", 215 | "SJ": "斯瓦尔巴和扬马延岛", 216 | "SZ": "斯威士兰", 217 | "SE": "瑞典", 218 | "CH": "瑞士", 219 | "SY": "阿拉伯叙利亚共和国", 220 | "TW": "中国台湾", 221 | "TJ": "塔吉克斯坦", 222 | "TZ": "坦桑尼亚联合共和国", 223 | "TH": "泰国", 224 | "TL": "东帝汶", 225 | "TG": "多哥", 226 | "TK": "托克劳群岛", 227 | "TO": "汤加", 228 | "TT": "特立尼达和多巴哥", 229 | "TN": "突尼斯", 230 | "TR": "土耳其", 231 | "TM": "土库曼斯坦", 232 | "TC": "特克斯和凯科斯群岛", 233 | "TV": "图瓦卢", 234 | "UG": "乌干达", 235 | "UA": "乌克兰", 236 | "AE": "阿联酋", 237 | "GB": "英国", 238 | "US": "美国", 239 | "UM": "美国本土外小岛屿", 240 | "UY": "乌拉圭", 241 | "UZ": "乌兹别克斯坦", 242 | "VU": "瓦努阿图", 243 | "VE": "委内瑞拉玻利瓦尔共和国", 244 | "VN": "越南", 245 | "VG": "英属维尔京群岛", 246 | "VI": "美属维京群岛", 247 | "WF": "瓦利斯和富图纳群岛", 248 | "EH": "西撒哈拉", 249 | "YE": "也门", 250 | "ZM": "赞比亚", 251 | "ZW": "津巴布韦" 252 | } 253 | } -------------------------------------------------------------------------------- /src/i18n/zh-TW.json: -------------------------------------------------------------------------------- 1 | { 2 | "country": { 3 | "AF": "阿富汗", 4 | "AX": "奧蘭群島", 5 | "AL": "阿爾巴尼亞", 6 | "DZ": "阿爾及利亞", 7 | "AS": "美屬薩摩亞", 8 | "AD": "安道爾", 9 | "AO": "安哥拉", 10 | "AI": "安圭拉", 11 | "AQ": "南極洲", 12 | "AG": "安提瓜和巴布達", 13 | "AR": "阿根廷", 14 | "AM": "亞美尼亞", 15 | "AW": "阿魯巴", 16 | "AU": "澳大利亞", 17 | "AT": "奧地利", 18 | "AZ": "阿塞拜疆", 19 | "BS": "巴哈馬", 20 | "BH": "巴林", 21 | "BD": "孟加拉國", 22 | "BB": "巴巴多斯", 23 | "BY": "白俄羅斯", 24 | "BE": "比利時", 25 | "BZ": "伯利茲", 26 | "BJ": "貝寧", 27 | "BM": "百慕大", 28 | "BT": "不丹", 29 | "BO": "玻利維亞, 多民族國", 30 | "BQ": "博內爾島, 聖尤斯特歇斯和薩巴", 31 | "BA": "波斯尼亞和黑塞哥維那", 32 | "BW": "博茨瓦納", 33 | "BV": "布維島", 34 | "BR": "巴西", 35 | "IO": "英屬印度洋領地", 36 | "BN": "文萊達魯薩蘭國", 37 | "BG": "保加利亞", 38 | "BF": "布基納法索", 39 | "BI": "布隆迪", 40 | "KH": "柬埔寨", 41 | "CM": "喀麥隆", 42 | "CA": "加拿大", 43 | "CV": "佛得角", 44 | "KY": "開曼群島", 45 | "CF": "中非共和國", 46 | "TD": "乍得", 47 | "CL": "智利", 48 | "CN": "中國", 49 | "CX": "聖誕島", 50 | "CC": "科科斯群島", 51 | "CO": "哥倫比亞", 52 | "KM": "科摩羅", 53 | "CG": "剛果", 54 | "CD": "剛果民主共和國", 55 | "CK": "庫克群島", 56 | "CR": "哥斯達黎加", 57 | "CI": "科特迪瓦", 58 | "HR": "克羅地亞", 59 | "CU": "古巴", 60 | "CW": "庫拉索", 61 | "CY": "塞浦路斯", 62 | "CZ": "捷克", 63 | "DK": "丹麥", 64 | "DJ": "吉布提", 65 | "DM": "多米尼克", 66 | "DO": "多明尼加共和國", 67 | "EC": "厄瓜多爾", 68 | "EG": "埃及", 69 | "SV": "薩爾瓦多", 70 | "GQ": "赤道幾內亞", 71 | "ER": "厄立特裏亞", 72 | "EE": "愛沙尼亞", 73 | "ET": "埃塞俄比亞", 74 | "FK": "(馬爾維納斯群島)福克蘭群島", 75 | "FO": "法羅群島", 76 | "FJ": "斐濟", 77 | "FI": "芬蘭", 78 | "FR": "法國", 79 | "GF": "法屬圭亞那", 80 | "PF": "法屬波利尼西亞", 81 | "TF": "法國南部領土", 82 | "GA": "加蓬", 83 | "GM": "岡比亞", 84 | "GE": "格魯吉亞", 85 | "DE": "德國", 86 | "GH": "加納", 87 | "GI": "直布羅陀", 88 | "GR": "希臘", 89 | "GL": "格陵蘭島", 90 | "GD": "格林納達", 91 | "GP": "瓜德羅普島", 92 | "GU": "關島", 93 | "GT": "危地馬拉", 94 | "GG": "根西島", 95 | "GN": "幾內亞", 96 | "GW": "幾內亞比紹", 97 | "GY": "圭亞那", 98 | "HT": "海地", 99 | "HM": "赫德島和麥當勞群島", 100 | "VA": "教廷(梵蒂岡城國)", 101 | "HN": "洪都拉斯", 102 | "HK": "中國香港", 103 | "HU": "匈牙利", 104 | "IS": "冰島", 105 | "IN": "印度", 106 | "ID": "印度尼西亞", 107 | "IR": "伊朗伊斯蘭共和國", 108 | "IQ": "伊拉克", 109 | "IE": "愛爾蘭", 110 | "IM": "馬恩島", 111 | "IL": "以色列", 112 | "IT": "意大利", 113 | "JM": "牙買加", 114 | "JP": "日本", 115 | "JE": "澤西島", 116 | "JO": "約旦", 117 | "KZ": "哈薩克斯坦", 118 | "KE": "肯尼亞", 119 | "KI": "基裏巴斯", 120 | "KP": "朝鮮", 121 | "KR": "韓國", 122 | "KW": "科威特", 123 | "KG": "吉爾吉斯斯坦", 124 | "LA": "老撾", 125 | "LV": "拉脫維亞", 126 | "LB": "黎巴嫩", 127 | "LS": "萊索托", 128 | "LR": "利比裏亞", 129 | "LY": "利比亞", 130 | "LI": "列支敦士登", 131 | "LT": "立陶宛", 132 | "LU": "盧森堡", 133 | "MO": "中國澳門", 134 | "MK": "馬其頓, 前南斯拉夫共和國", 135 | "MG": "馬達加斯加", 136 | "MW": "馬拉維", 137 | "MY": "馬來西亞", 138 | "MV": "馬爾代夫", 139 | "ML": "馬裏", 140 | "MT": "馬耳他", 141 | "MH": "馬紹爾群島", 142 | "MQ": "馬提尼克島", 143 | "MR": "毛裏塔尼亞", 144 | "MU": "毛裏求斯", 145 | "YT": "馬約特", 146 | "MX": "墨西哥", 147 | "FM": "密克羅尼西亞聯邦", 148 | "MD": "摩爾多瓦共和國", 149 | "MC": "摩納哥", 150 | "MN": "蒙古", 151 | "ME": "黑山", 152 | "MS": "蒙特塞拉特", 153 | "MA": "摩洛哥", 154 | "MZ": "莫桑比克", 155 | "MM": "緬甸", 156 | "NA": "納米比亞", 157 | "NR": "瑙魯", 158 | "NP": "尼泊爾", 159 | "NL": "荷蘭", 160 | "NC": "新喀裏多尼亞", 161 | "NZ": "新西蘭", 162 | "NI": "尼加拉瓜", 163 | "NE": "尼日爾", 164 | "NG": "尼日利亞", 165 | "NU": "紐埃", 166 | "NF": "諾福克島", 167 | "MP": "北馬裏亞納群島", 168 | "NO": "挪威", 169 | "OM": "阿曼", 170 | "PK": "巴基斯坦", 171 | "PW": "帕勞", 172 | "PS": "巴勒斯坦", 173 | "PA": "巴拿馬", 174 | "PG": "巴布亞新幾內亞", 175 | "PY": "巴拉圭", 176 | "PE": "秘魯", 177 | "PH": "菲律賓", 178 | "PN": "皮特凱恩", 179 | "PL": "波蘭", 180 | "PT": "葡萄牙", 181 | "PR": "波多黎各", 182 | "QA": "卡塔爾", 183 | "RE": "留尼旺島", 184 | "RO": "羅馬尼亞", 185 | "RU": "俄羅斯聯邦", 186 | "RW": "盧旺達", 187 | "BL": "聖巴泰勒米", 188 | "SH": "聖赫勒拿, 阿森松島和特裏斯坦 - 達庫尼亞群島", 189 | "KN": "聖基茨和尼維斯", 190 | "LC": "聖盧西亞", 191 | "MF": "聖馬丁(法國部分)", 192 | "PM": "聖皮埃爾和密克隆島", 193 | "VC": "聖文森特和格林納丁斯", 194 | "WS": "薩摩亞", 195 | "SM": "聖馬力諾", 196 | "ST": "聖多美和普林西比", 197 | "SA": "沙特阿拉伯", 198 | "SN": "塞內加爾", 199 | "RS": "塞爾維亞", 200 | "SC": "塞舌耳", 201 | "SL": "塞拉利昂", 202 | "SG": "新加坡", 203 | "SX": "聖馬丁島(荷蘭部分)", 204 | "SK": "斯洛伐克", 205 | "SI": "斯洛文尼亞", 206 | "SB": "所羅門群島", 207 | "SO": "索馬裏", 208 | "ZA": "南非", 209 | "GS": "南喬治亞島和南桑威奇群島", 210 | "SS": "南蘇丹", 211 | "ES": "西班牙", 212 | "LK": "斯裏蘭卡", 213 | "SD": "蘇丹紅", 214 | "SR": "蘇裏南", 215 | "SJ": "斯瓦爾巴和揚馬延島", 216 | "SZ": "斯威士蘭", 217 | "SE": "瑞典", 218 | "CH": "瑞士", 219 | "SY": "阿拉伯敘利亞共和國", 220 | "TW": "中國臺灣", 221 | "TJ": "塔吉克斯坦", 222 | "TZ": "坦桑尼亞聯合共和國", 223 | "TH": "泰國", 224 | "TL": "東帝汶", 225 | "TG": "多哥", 226 | "TK": "托克勞群島", 227 | "TO": "湯加", 228 | "TT": "特立尼達和多巴哥", 229 | "TN": "突尼斯", 230 | "TR": "土耳其", 231 | "TM": "土庫曼斯坦", 232 | "TC": "特克斯和凱科斯群島", 233 | "TV": "圖瓦盧", 234 | "UG": "烏幹達", 235 | "UA": "烏克蘭", 236 | "AE": "阿聯酋", 237 | "GB": "英國", 238 | "US": "美國", 239 | "UM": "美國本土外小島嶼", 240 | "UY": "烏拉圭", 241 | "UZ": "烏茲別克斯坦", 242 | "VU": "瓦努阿圖", 243 | "VE": "委內瑞拉玻利瓦爾共和國", 244 | "VN": "越南", 245 | "VG": "英屬維爾京群島", 246 | "VI": "美屬維京群島", 247 | "WF": "瓦利斯和富圖納群島", 248 | "EH": "西撒哈拉", 249 | "YE": "也門", 250 | "ZM": "贊比亞", 251 | "ZW": "津巴布韋" 252 | } 253 | } -------------------------------------------------------------------------------- /src/vue-country-select.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A bootstrap style selection (combobox) control used to select countries. 3 | * 4 | * @param model 5 | * the model bind to the control, which must be a two way binding variable. 6 | * @param searchable 7 | * the optional flag indicates whether to show the search box. Default 8 | * value is true. 9 | * @param name 10 | * the optional name of the selection control. 11 | * @param language 12 | * the optional code of language used by the select2 plugin. If it is not set, 13 | * and the [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin is used, 14 | * the component will use the language code `$language` provided by the 15 | * [vue-i18n](https://github.com/Haixing-Hu/vue-i18n) plugin; otherwise, the 16 | * component will use the default value "en-US". 17 | * @param theme 18 | * the optional name of the theme of the select2. Default value is 19 | * "bootstrap". 20 | * @author Haixing Hu 21 | */ 22 | module.exports = { 23 | replace: true, 24 | inherit: false, 25 | template: "", 27 | components: { 28 | "vue-select": require("vue-select") 29 | }, 30 | props: { 31 | model: { 32 | required: true, 33 | twoWay: true 34 | }, 35 | searchable: { 36 | type: Boolean, 37 | required: false, 38 | default: true 39 | }, 40 | name: { 41 | type: String, 42 | required: false, 43 | default: "" 44 | }, 45 | language: { 46 | type: String, 47 | required: false, 48 | default: "" 49 | }, 50 | theme: { 51 | type: String, 52 | required: false, 53 | default: "bootstrap" 54 | } 55 | }, 56 | beforeCompile: function() { 57 | var list = require("./countries.js"); 58 | this.countries = []; 59 | for (var i = 0; i < list.length; ++i) { 60 | var code = list[i].code; 61 | var name = list[i].name; 62 | if (this.$i18n && this.$i18n.country && this.$i18n.country[code]) { 63 | name = this.$i18n.country[code]; 64 | } 65 | this.countries.push({ 66 | value: code, 67 | text: name 68 | }); 69 | } 70 | } 71 | }; 72 | -------------------------------------------------------------------------------- /test/specs/i18n/zh-CN.json: -------------------------------------------------------------------------------- 1 | { 2 | "country": { 3 | "AF": "阿富汗", 4 | "AX": "奥兰群岛", 5 | "AL": "阿尔巴尼亚", 6 | "DZ": "阿尔及利亚", 7 | "AS": "美属萨摩亚", 8 | "AD": "安道尔", 9 | "AO": "安哥拉" 10 | } 11 | } -------------------------------------------------------------------------------- /test/specs/vue-country-select.js: -------------------------------------------------------------------------------- 1 | var assert = require("assert"); 2 | var Vue = require("vue"); 3 | var CountrySelect = require("../../src/vue-country-select.js"); 4 | var VueI18n = require("../../lib/vue-i18n-plugin/src/vue-i18n.js"); 5 | var Countries = require("../../src/countries.js"); 6 | 7 | function getVM(rootId, initResult) { 8 | return Vue.extend({ 9 | template: "
", 10 | el: function() { 11 | var el = document.createElement("div"); 12 | el.id = rootId; 13 | document.body.appendChild(el); 14 | return el; 15 | }, 16 | components: { 17 | "vue-country-select": CountrySelect 18 | }, 19 | data: function() { 20 | return { 21 | result: initResult 22 | }; 23 | } 24 | }); 25 | } 26 | 27 | 28 | describe("vue-country-select", function() { 29 | 30 | describe("static render", function() { 31 | describe("initial model is null", function() { 32 | var VM = getVM("static-render", null); 33 | var vm = new VM(); 34 | it("options should be country list", function(done) { 35 | vm.$nextTick(function() { 36 | var root = $("#static-render"); 37 | var select = root.find("select"); 38 | var options = select.find("option"); 39 | assert.equal(options.length, Countries.length); 40 | var n = options.length; 41 | for (var i = 0; i < n; ++i) { 42 | assert.equal(options[i].text, Countries[i].name); 43 | assert.equal(options[i].value, Countries[i].code); 44 | } 45 | done(); 46 | }); 47 | }); 48 | it("selection should be none", function(done) { 49 | vm.$nextTick(function() { 50 | var root = $("#static-render"); 51 | var select = root.find("select"); 52 | assert.equal(select.val(), null); 53 | done(); 54 | }); 55 | }); 56 | }); 57 | describe("initial model is non-null", function() { 58 | var VM = getVM("static-render-init-non-null", "CN"); 59 | var vm = new VM(); 60 | it("selection should be CN", function(done) { 61 | vm.$nextTick(function() { 62 | var root = $("#static-render-init-non-null"); 63 | var select = root.find("select"); 64 | assert.equal(select.val(), "CN"); 65 | done(); 66 | }); 67 | }); 68 | }); 69 | }); 70 | 71 | describe("change the model", function() { 72 | var VM = getVM("change-model", "CN"); 73 | var vm = new VM(); 74 | it("set model to non-null", function(done) { 75 | vm.$nextTick(function() { 76 | var root = $("#change-model"); 77 | var select = root.find("select"); 78 | assert.equal(vm.result, "CN"); 79 | assert.equal(select.val(), "CN"); 80 | vm.result = "JP"; 81 | vm.$nextTick(function() { 82 | assert.equal(select.val(), "JP"); 83 | done(); 84 | }); 85 | }); 86 | }); 87 | it("set model to null", function(done) { 88 | vm.$nextTick(function() { 89 | var root = $("#change-model"); 90 | var select = root.find("select"); 91 | vm.result = null; 92 | vm.$nextTick(function() { 93 | assert.equal(select.val(), null); 94 | done(); 95 | }); 96 | }); 97 | }); 98 | }); 99 | 100 | describe("change the selection", function() { 101 | var VM = getVM("change-selection", "CN"); 102 | var vm = new VM(); 103 | it("set selection to non-null", function(done) { 104 | vm.$nextTick(function() { 105 | var root = $("#change-selection"); 106 | var select = root.find("select"); 107 | assert.equal(vm.result, "CN"); 108 | assert.equal(select.val(), "CN"); 109 | select.val("JP").trigger("change"); 110 | vm.$nextTick(function() { 111 | assert.equal(vm.result, "JP"); 112 | done(); 113 | }); 114 | }); 115 | }); 116 | it("set selection to null", function(done) { 117 | vm.$nextTick(function() { 118 | var root = $("#change-selection"); 119 | var select = root.find("select"); 120 | select.val(null).trigger("change"); 121 | vm.$nextTick(function() { 122 | assert.equal(vm.result, null); 123 | done(); 124 | }); 125 | }); 126 | }); 127 | }); 128 | 129 | describe("i18n localization", function() { 130 | before(function() { 131 | Vue.use(VueI18n, { 132 | baseUrl: "/base/test/specs/i18n" 133 | }); 134 | }); 135 | it("test i18n localization", function(done) { 136 | var vm = new Vue({ 137 | template: "
", 138 | el: function() { 139 | var el = document.createElement("div"); 140 | el.id = "test-i18n"; 141 | document.body.appendChild(el); 142 | return el; 143 | }, 144 | components: { 145 | "vue-country-select": CountrySelect 146 | }, 147 | data: function() { 148 | return { 149 | result: null 150 | }; 151 | }, 152 | beforeCompile: function() { 153 | this.$setLanguage("zh-CN"); 154 | } 155 | }); 156 | vm.$nextTick(function() { 157 | var root = $("#test-i18n"); 158 | var select = root.find("select"); 159 | var options = select.find("option"); 160 | assert.equal(options.length, Countries.length); 161 | assert.equal(options[0].value, "AF"); 162 | assert.equal(options[0].text, "阿富汗"); 163 | assert.equal(options[1].value, "AX"); 164 | assert.equal(options[1].text, "奥兰群岛"); 165 | assert.equal(options[2].value, "AL"); 166 | assert.equal(options[2].text, "阿尔巴尼亚"); 167 | assert.equal(options[3].value, "DZ"); 168 | assert.equal(options[3].text, "阿尔及利亚"); 169 | assert.equal(options[4].value, "AS"); 170 | assert.equal(options[4].text, "美属萨摩亚"); 171 | assert.equal(options[5].value, "AD"); 172 | assert.equal(options[5].text, "安道尔"); 173 | assert.equal(options[6].value, "AO"); 174 | assert.equal(options[6].text, "安哥拉"); 175 | var n = options.length; 176 | for (var i = 8; i < n; ++i) { 177 | assert.equal(options[i].text, Countries[i].name); 178 | assert.equal(options[i].value, Countries[i].code); 179 | } 180 | done(); 181 | }); 182 | }); 183 | }); 184 | }); -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | // Configuration file of webpack 2 | var path = require("path"); 3 | var webpack = require("webpack"); 4 | var BowerWebpackPlugin = require("bower-webpack-plugin"); 5 | var pkg = require(path.join(__dirname, "package.json")); 6 | var dirs = pkg.configs.directories; 7 | var version = process.env.VERSION || pkg.version; 8 | var banner = pkg.name + " v" + version + "\n" + 9 | "(c) " + new Date().getFullYear() + 10 | " " + pkg.author.name + "\n" + 11 | "Released under the " + pkg.license + " License."; 12 | 13 | module.exports = { 14 | entry: { 15 | "vue-country-select": path.join(__dirname, dirs.src, "vue-country-select.js") 16 | }, 17 | resolve: { 18 | root: [__dirname], 19 | modulesDirectories: [ "lib" ] 20 | }, 21 | plugins: [ 22 | new webpack.optimize.DedupePlugin(), 23 | new BowerWebpackPlugin({ 24 | modulesDirectories: [ "lib" ], 25 | manifestFiles: "bower.json", 26 | includes: /.*/, 27 | excludes: [], 28 | searchResolveModulesDirectories: true 29 | }), 30 | new webpack.BannerPlugin(banner) 31 | ], 32 | output: { 33 | path: path.join(__dirname, dirs.dist), 34 | filename: "[name].js", 35 | sourceMapFilename: "[file].map" 36 | } 37 | }; 38 | --------------------------------------------------------------------------------