├── .babelrc ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── demo ├── App.vue ├── demo.js ├── demo.js.map ├── index.html └── main.js ├── dist ├── build.js └── build.js.map ├── package.json ├── src ├── MultipleFileUploader.vue └── index.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["latest", { 4 | "es2015": { "modules": false } 5 | }] 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .idea/ -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | demo/ 3 | node_modules/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 UPDIVISION 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. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue2-multi-uploader 2 | 3 | > A drag and drop multiple file uploader component that uses Vue.js v2 and Axios. Uploader shows file names, sizes and total size of files added. It also allows 4 | setting a minimum required number of files to upload. 5 | 6 | ### Demo 7 | See live demo [here](https://updivision.github.io/vue2-multi-uploader/). 8 | 9 | ### Latest 10 | PostData and other changes contributed by [SergioReis97](https://github.com/SergioReis97) via PR. Thanks! 11 | Message props contributed by [Mushood](https://github.com/Mushood) via PR. Thank you! 12 | 13 | Optional `maxItems` prop added to allow setting a maximum number of files allowed per upload. 14 | Default `maxItems` is set to 30. 15 | 16 | Optional `method` prop allows PUT method to be used. Default method remains POST, if you want to use PUT just add `method="put"` to your template. 17 | 18 | Optional `postMeta` prop added so you can include additional metadata that needs to be sent along. This prop can be in the form of a string, array or object and empty `postMeta` data is not sent. To pass a string use `:postMeta="'string'"`, to include an array you should use `:postMeta="['value']"` and for an object use `:postMeta="{name: 'value'}"`. 19 | 20 | ### Install 21 | 22 | ``` bash 23 | npm i @updivision/vue2-multi-uploader 24 | ``` 25 | #### ES6 26 | ```javascript 27 | import MultipleFileUploader from '@updivision/vue2-multi-uploader' 28 | export default { 29 | ... 30 | components: { 31 | MultipleFileUploader 32 | }, 33 | ... 34 | } 35 | ``` 36 | ### Props 37 | 38 | | Prop name | Type | Required | Default 39 | | ------------- |:-------------:| -----:| -----:| 40 | | postURL | String | yes | - 41 | | successMessagePath | String | yes | - 42 | | errorMessagePath | String | yes | - 43 | | minItems | Number | no | 1 44 | | maxItems | Number | no | 30 45 | | method | String | no | POST 46 | | postMeta | String, Array, Object | no | - 47 | | postData | Object | no | - 48 | | showHttpMessages | Boolean | no | true 49 | | postHeader | Object | no | null 50 | 51 | ### Message Props 52 | All text in the component is also configurable. Below is the list of available props that can be configured, if necessary. Default values are provided for each prop. 53 | 54 | | Prop name | Type | Required | Default 55 | | ------------- |:-------------: | -----: | -----:| 56 | | headerMessage | String | no | Add files 57 | | dropAreaPrimaryMessage | String | no | Drop multiple files here. 58 | | dropAreaSecondaryMessage | String | no | or click to upload 59 | | fileNameMessage | String | no | Names 60 | | fileSizeMessage | String | no | Sizes 61 | | totalFileMessage | String | no | Total files: 62 | | totalUploadSizeMessage | String | no | Total upload size: 63 | | removeFileMessage | String | no | Remove files 64 | | uploadButtonMessage | String | no | Upload 65 | | cancelButtonMessage | String | no | Cancel 66 | | fileUploadErrorMessage | String | no | An error has occurred 67 | | minFilesErrorMessage | String | no | Minimum files that need to be added to uploader 68 | | maxFilesErrorMessage | String | no | Maximum files that can be added to uploader 69 | | retryErrorMessage | String | no | Please remove the files and try again. 70 | | httpMethodErrorMessage | String | no | This HTTP method is not allowed. Please use either 'put' or 'post' methods. 71 | 72 | 73 | #### postURL 74 | Set your POST url in the postURL prop. 75 | 76 | #### JSON Responses 77 | Set JSON success and error response messages to your custom JSON responses via props: 78 | `successMessagePath`, 79 | `errorMessagePath` 80 | 81 | Example template to use: 82 | ``` html 83 | 84 | ``` 85 | Minimum items to upload (optional) 86 | You can modify the minimum number of files required for the upload to take place by changing the value of minItems prop. Default is set to 1. 87 | Here is an example template for uploading a minimum of 5 items and a maximum of 10 items: 88 | ``` html 89 | 90 | ``` 91 | ### Events 92 | Fires `upload-success` or `upload-error` respectively. Success handler receives axios response object. Error handler receives axios error object. 93 | ```html 94 | 95 | ``` 96 | ```javascript 97 | ... 98 | success_handler: function(response){ 99 | 100 | }, 101 | ... 102 | ``` 103 | 104 | ### Dependencies 105 | Axios, ES6-Promise 106 | 107 | ### CSS 108 | CSS style is not scoped so it's easy for you to overwrite your own style. 109 | Bootstrap CSS is used in demo but not required for the component. 110 | 111 | Class dropAreaDragging is active for giving some user feedback. 112 | Example: 113 | 114 | ``` 115 | .dropAreaDragging{ 116 | background-color:#ccc; 117 | } 118 | ``` 119 | 120 | ### LICENSE 121 | 122 | --- 123 | The MIT License (MIT) 124 | 125 | Copyright (c) 2018 UPDIVISION 126 | 127 | Permission is hereby granted, free of charge, to any person obtaining a copy 128 | of this software and associated documentation files (the "Software"), to deal 129 | in the Software without restriction, including without limitation the rights 130 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 131 | copies of the Software, and to permit persons to whom the Software is 132 | furnished to do so, subject to the following conditions: 133 | 134 | The above copyright notice and this permission notice shall be included in all 135 | copies or substantial portions of the Software. 136 | 137 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 138 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 139 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 140 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 141 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 142 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 143 | SOFTWARE. 144 | -------------------------------------------------------------------------------- /demo/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /demo/demo.js: -------------------------------------------------------------------------------- 1 | !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/demo/",t(t.s=30)}([function(e,t,n){"use strict";function r(e){return"[object Array]"===C.call(e)}function o(e){return"[object ArrayBuffer]"===C.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function a(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function s(e){return"string"==typeof e}function c(e){return"number"==typeof e}function u(e){return void 0===e}function l(e){return null!==e&&"object"==typeof e}function f(e){return"[object Date]"===C.call(e)}function d(e){return"[object File]"===C.call(e)}function p(e){return"[object Blob]"===C.call(e)}function v(e){return"[object Function]"===C.call(e)}function h(e){return l(e)&&v(e.pipe)}function m(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function g(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function y(){return"undefined"!=typeof window&&"undefined"!=typeof document&&"function"==typeof document.createElement}function _(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||r(e)||(e=[e]),r(e))for(var n=0,o=e.length;n=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){c.headers[e]={}}),o.forEach(["post","put","patch"],function(e){c.headers[e]=o.merge(s)}),e.exports=c}).call(t,n(3))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){h&&p&&(h=!1,p.length?v=p.concat(v):m=-1,v.length&&s())}function s(){if(!h){var e=o(a);h=!0;for(var t=v.length;t;){for(p=v,v=[];++m1)for(var n=1;n=0&&Math.floor(t)===t&&isFinite(e)}function d(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function p(e){var t=parseFloat(e);return isNaN(t)?e:t}function v(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o-1)return e.splice(n,1)}}function m(e,t){return ii.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function y(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function _(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function b(e,t){for(var n in t)e[n]=t[n];return e}function w(e){for(var t={},n=0;n0&&(a=ge(a,(t||"")+"_"+n),me(a[0])&&me(u)&&(l[c]=j(u.text+a[0].text),a.shift()),l.push.apply(l,a)):s(a)?me(u)?l[c]=j(u.text+a):""!==a&&l.push(j(a)):me(a)&&me(u)?l[c]=j(u.text+a.text):(i(e._isVList)&&o(a.tag)&&r(a.key)&&o(t)&&(a.key="__vlist"+t+"_"+n+"__"),l.push(a)));return l}function ye(e,t){return(e.__esModule||Li&&"Module"===e[Symbol.toStringTag])&&(e=e.default),c(e)?t.extend(e):e}function _e(e,t,n,r,o){var i=Hi();return i.asyncFactory=e,i.asyncMeta={data:t,context:n,children:r,tag:o},i}function be(e,t,n){if(i(e.error)&&o(e.errorComp))return e.errorComp;if(o(e.resolved))return e.resolved;if(i(e.loading)&&o(e.loadingComp))return e.loadingComp;if(!o(e.contexts)){var a=e.contexts=[n],s=!0,u=function(){for(var e=0,t=a.length;epa&&ca[n].id>e.id;)n--;ca.splice(n+1,0,e)}else ca.push(e);fa||(fa=!0,ae(Re))}}function ze(e,t,n){ma.get=function(){return this[t][n]},ma.set=function(e){this[t][n]=e},Object.defineProperty(e,n,ma)}function qe(e){e._watchers=[];var t=e.$options;t.props&&Ve(e,t.props),t.methods&&Ze(e,t.methods),t.data?Ke(e):D(e._data={},!0),t.computed&&We(e,t.computed),t.watch&&t.watch!==Ti&&Ye(e,t.watch)}function Ve(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[],i=!e.$parent;Ki.shouldConvert=i;for(var a in t)!function(i){o.push(i);var a=Z(i,t,n,e);R(r,i,a),i in e||ze(e,"_props",i)}(a);Ki.shouldConvert=!0}function Ke(e){var t=e.$options.data;t=e._data="function"==typeof t?Je(t,e):t||{},u(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,o=(e.$options.methods,n.length);o--;){var i=n[o];r&&m(r,i)||k(i)||ze(e,"_data",i)}D(t,!0)}function Je(e,t){try{return e.call(t,t)}catch(e){return te(e,t,"data()"),{}}}function We(e,t){var n=e._computedWatchers=Object.create(null),r=Ni();for(var o in t){var i=t[o],a="function"==typeof i?i:i.get;r||(n[o]=new ha(e,a||x,x,ga)),o in e||Xe(e,o,i)}}function Xe(e,t,n){var r=!Ni();"function"==typeof n?(ma.get=r?Ge(t):n,ma.set=x):(ma.get=n.get?r&&!1!==n.cache?Ge(t):n.get:x,ma.set=n.set?n.set:x),Object.defineProperty(e,t,ma)}function Ge(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),Ri.target&&t.depend(),t.value}}function Ze(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?x:y(t[n],e)}function Ye(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o=0||n.indexOf(e[o])<0)&&r.push(e[o]);return r}return e}function Mt(e){this._init(e)}function Et(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=_(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}function jt(e){e.mixin=function(e){return this.options=X(this.options,e),this}}function Nt(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=X(n.options,e),a.super=n,a.options.props&&It(a),a.options.computed&&Lt(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,vi.forEach(function(e){a[e]=n[e]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=b({},a.options),o[r]=a,a}}function It(e){var t=e.options.props;for(var n in t)ze(e.prototype,"_props",n)}function Lt(e){var t=e.options.computed;for(var n in t)Xe(e.prototype,n,t[n])}function Pt(e){vi.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&u(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function Dt(e){return e&&(e.Ctor.options.name||e.tag)}function Rt(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!l(e)&&e.test(t)}function Ft(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var a=n[i];if(a){var s=Dt(a.componentOptions);s&&!t(s)&&Bt(n,i,r,o)}}}function Bt(e,t,n,r){var o=e[t];o&&o!==r&&o.componentInstance.$destroy(),e[t]=null,h(n,t)}function Ut(e){for(var t=e.data,n=e,r=e;o(r.componentInstance);)r=r.componentInstance._vnode,r.data&&(t=Ht(r.data,t));for(;o(n=n.parent);)n.data&&(t=Ht(t,n.data));return zt(t.staticClass,t.class)}function Ht(e,t){return{staticClass:qt(e.staticClass,t.staticClass),class:o(e.class)?[e.class,t.class]:t.class}}function zt(e,t){return o(e)||o(t)?qt(e,Vt(t)):""}function qt(e,t){return e?t?e+" "+t:e:t||""}function Vt(e){return Array.isArray(e)?Kt(e):c(e)?Jt(e):"string"==typeof e?e:""}function Kt(e){for(var t,n="",r=0,i=e.length;r-1?Xa[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Xa[e]=/HTMLUnknownElement/.test(t.toString())}function Gt(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function Zt(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function Yt(e,t){return document.createElementNS(qa[e],t)}function Qt(e){return document.createTextNode(e)}function en(e){return document.createComment(e)}function tn(e,t,n){e.insertBefore(t,n)}function nn(e,t){e.removeChild(t)}function rn(e,t){e.appendChild(t)}function on(e){return e.parentNode}function an(e){return e.nextSibling}function sn(e){return e.tagName}function cn(e,t){e.textContent=t}function un(e,t,n){e.setAttribute(t,n)}function ln(e,t){var n=e.data.ref;if(n){var r=e.context,o=e.componentInstance||e.elm,i=r.$refs;t?Array.isArray(i[n])?h(i[n],o):i[n]===o&&(i[n]=void 0):e.data.refInFor?Array.isArray(i[n])?i[n].indexOf(o)<0&&i[n].push(o):i[n]=[o]:i[n]=o}}function fn(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&o(e.data)===o(t.data)&&dn(e,t)||i(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&r(t.asyncFactory.error))}function dn(e,t){if("input"!==e.tag)return!0;var n,r=o(n=e.data)&&o(n=n.attrs)&&n.type,i=o(n=t.data)&&o(n=n.attrs)&&n.type;return r===i||Ga(r)&&Ga(i)}function pn(e,t,n){var r,i,a={};for(r=t;r<=n;++r)i=e[r].key,o(i)&&(a[i]=r);return a}function vn(e,t){(e.data.directives||t.data.directives)&&hn(e,t)}function hn(e,t){var n,r,o,i=e===Qa,a=t===Qa,s=mn(e.data.directives,e.context),c=mn(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,yn(o,"update",t,e),o.def&&o.def.componentUpdated&&l.push(o)):(yn(o,"bind",t,e),o.def&&o.def.inserted&&u.push(o));if(u.length){var f=function(){for(var n=0;n=0&&" "===(m=e.charAt(h));h--);m&&as.test(m)||(l=!0)}}else void 0===i?(v=o+1,i=e.slice(0,o).trim()):t();if(void 0===i?i=e.slice(0,o).trim():0!==v&&t(),a)for(o=0;o-1?{exp:e.slice(0,Oa),key:'"'+e.slice(Oa+1)+'"'}:{exp:e,key:null};for(Sa=e,Oa=Ma=Ea=0;!Pn();)Ta=Ln(),Dn(Ta)?Fn(Ta):91===Ta&&Rn(Ta);return{exp:e.slice(0,Ma),key:e.slice(Ma+1,Ea)}}function Ln(){return Sa.charCodeAt(++Oa)}function Pn(){return Oa>=ka}function Dn(e){return 34===e||39===e}function Rn(e){var t=1;for(Ma=Oa;!Pn();)if(e=Ln(),Dn(e))Fn(e);else if(91===e&&t++,93===e&&t--,0===t){Ea=Oa;break}}function Fn(e){for(var t=e;!Pn()&&(e=Ln())!==t;);}function Bn(e,t,n){ja=n;var r=t.value,o=t.modifiers,i=e.tag,a=e.attrsMap.type;if(e.component)return jn(e,r,o),!1;if("select"===i)zn(e,r,o);else if("input"===i&&"checkbox"===a)Un(e,r,o);else if("input"===i&&"radio"===a)Hn(e,r,o);else if("input"===i||"textarea"===i)qn(e,r,o);else if(!mi.isReservedTag(i))return jn(e,r,o),!1;return!0}function Un(e,t,n){var r=n&&n.number,o=Mn(e,"value")||"null",i=Mn(e,"true-value")||"true",a=Mn(e,"false-value")||"false";kn(e,"checked","Array.isArray("+t+")?_i("+t+","+o+")>-1"+("true"===i?":("+t+")":":_q("+t+","+i+")")),On(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+t+"=$$a.concat([$$v]))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+Nn(t,"$$c")+"}",null,!0)}function Hn(e,t,n){var r=n&&n.number,o=Mn(e,"value")||"null";o=r?"_n("+o+")":o,kn(e,"checked","_q("+t+","+o+")"),On(e,"change",Nn(t,o),null,!0)}function zn(e,t,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",i="var $$selectedVal = "+o+";";i=i+" "+Nn(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),On(e,"change",i,null,!0)}function qn(e,t,n){var r=e.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?ss:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Nn(t,l);c&&(f="if($event.target.composing)return;"+f),kn(e,"value","("+t+")"),On(e,u,f,null,!0),(s||a)&&On(e,"blur","$forceUpdate()")}function Vn(e){if(o(e[ss])){var t=Ci?"change":"input";e[t]=[].concat(e[ss],e[t]||[]),delete e[ss]}o(e[cs])&&(e.change=[].concat(e[cs],e.change||[]),delete e[cs])}function Kn(e,t,n){var r=Na;return function o(){null!==e.apply(null,arguments)&&Wn(t,o,n,r)}}function Jn(e,t,n,r,o){t=ie(t),n&&(t=Kn(t,e,r)),Na.addEventListener(e,t,Oi?{capture:r,passive:o}:r)}function Wn(e,t,n,r){(r||Na).removeEventListener(e,t._withTask||t,n)}function Xn(e,t){if(!r(e.data.on)||!r(t.data.on)){var n=t.data.on||{},o=e.data.on||{};Na=t.elm,Vn(n),le(n,o,Jn,Wn,t.context),Na=void 0}}function Gn(e,t){if(!r(e.data.domProps)||!r(t.data.domProps)){var n,i,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};o(c.__ob__)&&(c=t.data.domProps=b({},c));for(n in s)r(c[n])&&(a[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=i;var u=r(i)?"":String(i);Zn(a,u)&&(a.value=u)}else a[n]=i}}}function Zn(e,t){return!e.composing&&("OPTION"===e.tagName||Yn(e,t)||Qn(e,t))}function Yn(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}function Qn(e,t){var n=e.value,r=e._vModifiers;return o(r)&&r.number?p(n)!==p(t):o(r)&&r.trim?n.trim()!==t.trim():n!==t}function er(e){var t=tr(e.style);return e.staticStyle?b(e.staticStyle,t):t}function tr(e){return Array.isArray(e)?w(e):"string"==typeof e?fs(e):e}function nr(e,t){var n,r={};if(t)for(var o=e;o.componentInstance;)o=o.componentInstance._vnode,o.data&&(n=er(o.data))&&b(r,n);(n=er(e.data))&&b(r,n);for(var i=e;i=i.parent;)i.data&&(n=er(i.data))&&b(r,n);return r}function rr(e,t){var n=t.data,i=e.data;if(!(r(n.staticStyle)&&r(n.style)&&r(i.staticStyle)&&r(i.style))){var a,s,c=t.elm,u=i.staticStyle,l=i.normalizedStyle||i.style||{},f=u||l,d=tr(t.data.style)||{};t.data.normalizedStyle=o(d.__ob__)?b({},d):d;var p=nr(t,!0);for(s in f)r(p[s])&&vs(c,s,"");for(s in p)(a=p[s])!==f[s]&&vs(c,s,null==a?"":a)}}function or(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function ir(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function ar(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&b(t,ys(e.name||"v")),b(t,e),t}return"string"==typeof e?ys(e):void 0}}function sr(e){ks(function(){ks(e)})}function cr(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),or(e,t))}function ur(e,t){e._transitionClasses&&h(e._transitionClasses,t),ir(e,t)}function lr(e,t,n){var r=fr(e,t),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===bs?Cs:As,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=bs,l=a,f=i.length):t===ws?u>0&&(n=ws,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?bs:ws:null,f=n?n===bs?i.length:c.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===bs&&Ss.test(r[xs+"Property"])}}function dr(e,t){for(;e.length1}function yr(e,t){!0!==t.data.show&&vr(t)}function _r(e,t,n){br(e,t,n),(Ci||Ai)&&setTimeout(function(){br(e,t,n)},0)}function br(e,t,n){var r=t.value,o=e.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=e.options.length;s-1,a.selected!==i&&(a.selected=i);else if(C(xr(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));o||(e.selectedIndex=-1)}}function wr(e,t){return t.every(function(t){return!C(t,e)})}function xr(e){return"_value"in e?e._value:e.value}function Cr(e){e.target.composing=!0}function $r(e){e.target.composing&&(e.target.composing=!1,Ar(e.target,"input"))}function Ar(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function kr(e){return!e.componentInstance||e.data&&e.data.transition?e:kr(e.componentInstance._vnode)}function Sr(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Sr(xe(t.children)):e}function Tr(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var o=n._parentListeners;for(var i in o)t[si(i)]=o[i];return t}function Or(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function Mr(e){for(;e=e.parent;)if(e.data.transition)return!0}function Er(e,t){return t.key===e.key&&t.tag===e.tag}function jr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Nr(e){e.data.newPos=e.elm.getBoundingClientRect()}function Ir(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,o=t.top-n.top;if(r||o){e.data.moved=!0;var i=e.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}function Lr(e,t){var n=t?zs(t):Us;if(n.test(e)){for(var r,o,i=[],a=n.lastIndex=0;r=n.exec(e);){o=r.index,o>a&&i.push(JSON.stringify(e.slice(a,o)));var s=xn(r[1].trim());i.push("_s("+s+")"),a=o+r[0].length}return a=0&&a[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(var c=a.length-1;c>=o;c--)t.end&&t.end(a[c].tag,n,r);a.length=o,i=o&&a[o-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,r):"p"===s&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}for(var o,i,a=[],s=t.expectHTML,c=t.isUnaryTag||fi,u=t.canBeLeftOpenTag||fi,l=0;e;){if(o=e,i&&gc(i)){var f=0,d=i.toLowerCase(),p=yc[d]||(yc[d]=new RegExp("([\\s\\S]*?)(]*>)","i")),v=e.replace(p,function(e,n,r){return f=r.length,gc(d)||"noscript"===d||(n=n.replace(//g,"$1").replace(//g,"$1")),Cc(d,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});l+=e.length-v.length,e=v,r(d,l-f,l)}else{var h=e.indexOf("<");if(0===h){if(rc.test(e)){var m=e.indexOf("--\x3e");if(m>=0){t.shouldKeepComment&&t.comment(e.substring(4,m)),n(m+3);continue}}if(oc.test(e)){var g=e.indexOf("]>");if(g>=0){n(g+2);continue}}var y=e.match(nc);if(y){n(y[0].length);continue}var _=e.match(tc);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var w=function(){var t=e.match(Qs);if(t){var r={tagName:t[1],attrs:[],start:l};n(t[0].length);for(var o,i;!(o=e.match(ec))&&(i=e.match(Gs));)n(i[0].length),r.attrs.push(i);if(o)return r.unarySlash=o[1],n(o[0].length),r.end=l,r}}();if(w){!function(e){var n=e.tagName,o=e.unarySlash;s&&("p"===i&&Xs(n)&&r(i),u(n)&&i===n&&r(n));for(var l=c(n)||!!o,f=e.attrs.length,d=new Array(f),p=0;p=0){for(C=e.slice(h);!(tc.test(C)||Qs.test(C)||rc.test(C)||oc.test(C)||($=C.indexOf("<",1))<0);)h+=$,C=e.slice(h);x=e.substring(0,h),n(h)}h<0&&(x=e,e=""),t.chars&&x&&t.chars(x)}if(e===o){t.chars&&t.chars(e);break}}r()}function Hr(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ao(t),parent:n,children:[]}}function zr(e,t){function n(e){e.pre&&(s=!1),fc(e.tag)&&(c=!1)}ac=t.warn||$n,fc=t.isPreTag||fi,dc=t.mustUseProp||fi,pc=t.getTagNamespace||fi,cc=An(t.modules,"transformNode"),uc=An(t.modules,"preTransformNode"),lc=An(t.modules,"postTransformNode"),sc=t.delimiters;var r,o,i=[],a=!1!==t.preserveWhitespace,s=!1,c=!1;return Ur(e,{warn:ac,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,start:function(e,a,u){var l=o&&o.ns||pc(e);Ci&&"svg"===l&&(a=uo(a));var f=Hr(e,a,o);l&&(f.ns=l),co(f)&&!Ni()&&(f.forbidden=!0);for(var d=0;d':'
',mc.innerHTML.indexOf(" ")>0}function ei(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}/*! 2 | * Vue.js v2.5.8 3 | * (c) 2014-2017 Evan You 4 | * Released under the MIT License. 5 | */ 6 | var ti=Object.freeze({}),ni=Object.prototype.toString,ri=v("slot,component",!0),oi=v("key,ref,slot,slot-scope,is"),ii=Object.prototype.hasOwnProperty,ai=/-(\w)/g,si=g(function(e){return e.replace(ai,function(e,t){return t?t.toUpperCase():""})}),ci=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),ui=/\B([A-Z])/g,li=g(function(e){return e.replace(ui,"-$1").toLowerCase()}),fi=function(e,t,n){return!1},di=function(e){return e},pi="data-server-rendered",vi=["component","directive","filter"],hi=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],mi={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:fi,isReservedAttr:fi,isUnknownElement:fi,getTagNamespace:x,parsePlatformTagName:di,mustUseProp:fi,_lifecycleHooks:hi},gi=/[^\w.$]/,yi="__proto__"in{},_i="undefined"!=typeof window,bi="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,wi=bi&&WXEnvironment.platform.toLowerCase(),xi=_i&&window.navigator.userAgent.toLowerCase(),Ci=xi&&/msie|trident/.test(xi),$i=xi&&xi.indexOf("msie 9.0")>0,Ai=xi&&xi.indexOf("edge/")>0,ki=xi&&xi.indexOf("android")>0||"android"===wi,Si=xi&&/iphone|ipad|ipod|ios/.test(xi)||"ios"===wi,Ti=(xi&&/chrome\/\d+/.test(xi),{}.watch),Oi=!1;if(_i)try{var Mi={};Object.defineProperty(Mi,"passive",{get:function(){Oi=!0}}),window.addEventListener("test-passive",null,Mi)}catch(e){}var Ei,ji,Ni=function(){return void 0===Ei&&(Ei=!_i&&void 0!==e&&"server"===e.process.env.VUE_ENV),Ei},Ii=_i&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Li="undefined"!=typeof Symbol&&O(Symbol)&&"undefined"!=typeof Reflect&&O(Reflect.ownKeys);ji="undefined"!=typeof Set&&O(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var Pi=x,Di=0,Ri=function(){this.id=Di++,this.subs=[]};Ri.prototype.addSub=function(e){this.subs.push(e)},Ri.prototype.removeSub=function(e){h(this.subs,e)},Ri.prototype.depend=function(){Ri.target&&Ri.target.addDep(this)},Ri.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t1?_(n):n;for(var r=_(arguments,1),o=0,i=n.length;oparseInt(this.max)&&Bt(c,u[0],u,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Aa={KeepAlive:$a};!function(e){var t={};t.get=function(){return mi},Object.defineProperty(e,"config",t),e.util={warn:Pi,extend:b,mergeOptions:X,defineReactive:R},e.set=F,e.delete=B,e.nextTick=ae,e.options=Object.create(null),vi.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,b(e.options.components,Aa),Et(e),jt(e),Nt(e),Pt(e)}(Mt),Object.defineProperty(Mt.prototype,"$isServer",{get:Ni}),Object.defineProperty(Mt.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Mt.version="2.5.8";var ka,Sa,Ta,Oa,Ma,Ea,ja,Na,Ia,La=v("style,class"),Pa=v("input,textarea,option,select,progress"),Da=function(e,t,n){return"value"===n&&Pa(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Ra=v("contenteditable,draggable,spellcheck"),Fa=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ba="http://www.w3.org/1999/xlink",Ua=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Ha=function(e){return Ua(e)?e.slice(6,e.length):""},za=function(e){return null==e||!1===e},qa={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Va=v("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Ka=v("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Ja=function(e){return"pre"===e},Wa=function(e){return Va(e)||Ka(e)},Xa=Object.create(null),Ga=v("text,number,password,search,email,tel,url"),Za=Object.freeze({createElement:Zt,createElementNS:Yt,createTextNode:Qt,createComment:en,insertBefore:tn,removeChild:nn,appendChild:rn,parentNode:on,nextSibling:an,tagName:sn,setTextContent:cn,setAttribute:un}),Ya={create:function(e,t){ln(t)},update:function(e,t){e.data.ref!==t.data.ref&&(ln(e,!0),ln(t))},destroy:function(e){ln(e,!0)}},Qa=new Bi("",{},[]),es=["create","activate","update","remove","destroy"],ts={create:vn,update:vn,destroy:function(e){vn(e,Qa)}},ns=Object.create(null),rs=[Ya,ts],os={create:_n,update:_n},is={create:wn,update:wn},as=/[\w).+\-_$\]]/,ss="__r",cs="__c",us={create:Xn,update:Xn},ls={create:Gn,update:Gn},fs=g(function(e){var t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach(function(e){if(e){var n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}),ds=/^--/,ps=/\s*!important$/,vs=function(e,t,n){if(ds.test(t))e.style.setProperty(t,n);else if(ps.test(n))e.style.setProperty(t,n.replace(ps,""),"important");else{var r=ms(t);if(Array.isArray(n))for(var o=0,i=n.length;ov?(f=r(n[g+1])?null:n[g+1].elm,y(e,f,n,p,g,i)):p>g&&b(e,t,d,v)}function C(e,t,n,r){for(var i=n;i\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Zs="[a-zA-Z_][\\w\\-\\.]*",Ys="((?:"+Zs+"\\:)?"+Zs+")",Qs=new RegExp("^<"+Ys),ec=/^\s*(\/?)>/,tc=new RegExp("^<\\/"+Ys+"[^>]*>"),nc=/^]+>/i,rc=/^