vue-bootstrap-multiselect
Version:
Multiselect packages for Vue.js 2 by bootstrap 4 without jQuery
8 lines • 39 kB
JavaScript
var VueBootstrapMultiselect=function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=41)}([function(t,e,n){"use strict";function o(t){return"[object Array]"===O.call(t)}function r(t){return"[object ArrayBuffer]"===O.call(t)}function i(t){return"undefined"!=typeof FormData&&t instanceof FormData}function s(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function a(t){return"string"==typeof t}function u(t){return"number"==typeof t}function c(t){return void 0===t}function p(t){return null!==t&&"object"==typeof t}function l(t){return"[object Date]"===O.call(t)}function f(t){return"[object File]"===O.call(t)}function d(t){return"[object Blob]"===O.call(t)}function h(t){return"[object Function]"===O.call(t)}function m(t){return p(t)&&h(t.pipe)}function w(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function y(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function v(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function g(t,e){if(null!==t&&void 0!==t)if("object"==typeof t||o(t)||(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function x(){function t(t,n){"object"==typeof e[n]&&"object"==typeof t?e[n]=x(e[n],t):e[n]=t}for(var e={},n=0,o=arguments.length;n<o;n++)g(arguments[n],t);return e}function S(t,e,n){return g(e,function(e,o){t[o]=n&&"function"==typeof e?b(e,n):e}),t}var b=n(14),_=n(90),O=Object.prototype.toString;t.exports={isArray:o,isArrayBuffer:r,isBuffer:_,isFormData:i,isArrayBufferView:s,isString:a,isNumber:u,isObject:p,isUndefined:c,isDate:l,isFile:f,isBlob:d,isFunction:h,isStream:m,isURLSearchParams:w,isStandardBrowserEnv:v,forEach:g,merge:x,extend:S,trim:y}},function(t,e){t.exports=function(t,e,n,o,r){var i,s=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(i=t,s=t.default);var u="function"==typeof s?s.options:s;e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns),o&&(u._scopeId=o);var c;if(r?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=c):n&&(c=n),c){var p=u.functional,l=p?u.render:u.beforeCreate;p?u.render=function(t,e){return c.call(e),l(t,e)}:u.beforeCreate=l?[].concat(l,c):[c]}return{esModule:i,exports:s,options:u}}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var o=n(8),r=n(2),i=n(62),s=n(66),a=function(t,e,n){var u,c,p,l=t&a.F,f=t&a.G,d=t&a.S,h=t&a.P,m=t&a.B,w=t&a.W,y=f?r:r[e]||(r[e]={}),v=y.prototype,g=f?o:d?o[e]:(o[e]||{}).prototype;f&&(n=e);for(u in n)(c=!l&&g&&void 0!==g[u])&&u in y||(p=c?g[u]:n[u],y[u]=f&&"function"!=typeof g[u]?n[u]:m&&c?i(p,o):w&&g[u]==p?function(t){var e=function(e,n,o){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,o)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(p):h&&"function"==typeof p?i(Function.call,p):p,h&&((y.virtual||(y.virtual={}))[u]=p,t&a.R&&v&&!v[u]&&s(v,u,p)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";(function(e){function o(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var r=n(0),i=n(38),s={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=n(10):void 0!==e&&(t=n(10)),t}(),transformRequest:[function(t,e){return i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(o(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(o(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){a.headers[t]={}}),r.forEach(["post","put","patch"],function(t){a.headers[t]=r.merge(s)}),t.exports=a}).call(e,n(91))},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var o=n(1)(n(43),n(99),null,null,null);t.exports=o.exports},function(t,e,n){"use strict";var o=n(0),r=n(30),i=n(33),s=n(39),a=n(37),u=n(13),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(32);t.exports=function(t){return new Promise(function(e,p){var l=t.data,f=t.headers;o.isFormData(l)&&delete f["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||a(t.url)||(d=new window.XDomainRequest,h="onload",m=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var w=t.auth.username||"",y=t.auth.password||"";f.Authorization="Basic "+c(w+":"+y)}if(d.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[h]=function(){if(d&&(4===d.readyState||m)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,o=t.responseType&&"text"!==t.responseType?d.response:d.responseText,i={data:o,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:n,config:t,request:d};r(e,p,i),d=null}},d.onerror=function(){p(u("Network Error",t,null,d)),d=null},d.ontimeout=function(){p(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",d)),d=null},o.isStandardBrowserEnv()){var v=n(35),g=(t.withCredentials||a(t.url))&&t.xsrfCookieName?v.read(t.xsrfCookieName):void 0;g&&(f[t.xsrfHeaderName]=g)}if("setRequestHeader"in d&&o.forEach(f,function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete f[e]:d.setRequestHeader(e,t)}),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),p(t),d=null)}),void 0===l&&(l=null),d.send(l)})}},function(t,e,n){"use strict";function o(t){this.message=t}o.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},o.prototype.__CANCEL__=!0,t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var o=n(29);t.exports=function(t,e,n,r,i){var s=new Error(t);return o(s,e,n,r,i)}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];return t.apply(e,n)}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var o=n(61);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e,n){var o=n(59),r=n(67),i=n(79),s=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(o(t),e=i(e,!0),o(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var o=n(71),r=n(64);t.exports=Object.keys||function(t){return o(t,r)}},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},function(t,e,n){var o=n(16),r=n(15);t.exports=function(t){return o(r(t))}},function(t,e,n){var o=n(15);t.exports=function(t){return Object(o(t))}},function(t,e,n){function o(t){n(85)}var r=n(1)(n(42),n(97),o,null,null);t.exports=r.exports},function(t,e,n){t.exports=n(24)},function(t,e,n){"use strict";function o(t){var e=new s(t),n=i(s.prototype.request,e);return r.extend(n,s.prototype,e),r.extend(n,e),n}var r=n(0),i=n(14),s=n(26),a=n(7),u=o(a);u.Axios=s,u.create=function(t){return o(r.merge(a,t))},u.Cancel=n(11),u.CancelToken=n(25),u.isCancel=n(12),u.all=function(t){return Promise.all(t)},u.spread=n(40),t.exports=u,t.exports.default=u},function(t,e,n){"use strict";function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}var r=n(11);o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},function(t,e,n){"use strict";function o(t){this.defaults=t,this.interceptors={request:new s,response:new s}}var r=n(7),i=n(0),s=n(27),a=n(28),u=n(36),c=n(34);o.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),t=i.merge(r,this.defaults,{method:"get"},t),t.method=t.method.toLowerCase(),t.baseURL&&!u(t.url)&&(t.url=c(t.baseURL,t.url));var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},i.forEach(["delete","get","head","options"],function(t){o.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){o.prototype[t]=function(e,n,o){return this.request(i.merge(o||{},{method:t,url:e,data:n}))}}),t.exports=o},function(t,e,n){"use strict";function o(){this.handlers=[]}var r=n(0);o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},function(t,e,n){"use strict";function o(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var r=n(0),i=n(31),s=n(12),a=n(7);t.exports=function(t){return o(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return o(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return s(e)||(o(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";t.exports=function(t,e,n,o,r){return t.config=e,n&&(t.code=n),t.request=o,t.response=r,t}},function(t,e,n){"use strict";var o=n(13);t.exports=function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(o("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";var o=n(0);t.exports=function(t,e,n){return o.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";function o(){this.message="String contains an invalid character"}function r(t){for(var e,n,r=String(t),s="",a=0,u=i;r.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&e>>8-a%1*8)){if((n=r.charCodeAt(a+=.75))>255)throw new o;e=e<<8|n}return s}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",t.exports=r},function(t,e,n){"use strict";function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var r=n(0);t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var s=[];r.forEach(e,function(t,e){null!==t&&void 0!==t&&(r.isArray(t)&&(e+="[]"),r.isArray(t)||(t=[t]),r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))}))}),i=s.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var o=n(0);t.exports=o.isStandardBrowserEnv()?function(){return{write:function(t,e,n,r,i,s){var a=[];a.push(t+"="+encodeURIComponent(e)),o.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),o.isString(r)&&a.push("path="+r),o.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";var o=n(0);t.exports=o.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(r.setAttribute("href",e),e=r.href),r.setAttribute("href",e),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");return e=t(window.location.href),function(n){var r=o.isString(n)?t(n):n;return r.protocol===e.protocol&&r.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";var o=n(0);t.exports=function(t,e){o.forEach(t,function(n,o){o!==e&&o.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[o])})}},function(t,e,n){"use strict";var o=n(0);t.exports=function(t){var e,n,r,i={};return t?(o.forEach(t.split("\n"),function(t){r=t.indexOf(":"),e=o.trim(t.substr(0,r)).toLowerCase(),n=o.trim(t.substr(r+1)),e&&(i[e]=i[e]?i[e]+", "+n:n)}),i):i}},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){t.exports=n(22)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(53),r=n.n(o),i=n(49),s=n.n(i),a=n(50),u=n.n(a),c=n(52),p=n.n(c),l=n(95),f=n.n(l),d=n(93),h=n.n(d),m=n(92),w=n.n(m),y=n(94),v=n.n(y),g=n(23),x=n.n(g);e.default={components:{tags:f.a,search:h.a,list:w.a,stub:v.a},props:{shortTags:{type:Boolean},placeholder:{type:String},stubPlaceholder:{type:String},optionTitleName:{type:String,default:"title"},optionImageName:{type:String,default:"image"},optionKeyName:{type:String,default:"id"},asyncSearchCallback:{type:Function,default:null},asyncSearchUrl:{type:String,default:null},name:{type:String,default:null},attachInput:{type:Boolean,default:!1},isMulti:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!0},noResultsPlaceholder:{type:String,default:"No results"},value:{type:[Array,Object,String],default:function(){return[]}},allValues:{type:[Array,Object],default:function(){return[]}},onChange:{type:Function,default:null}},data:function(){return{showDropdownList:!1,selectedOptions:[],searchOptions:null,defaultSearchOptions:[]}},computed:{options:function(){return this.selectedOptions},dropdownOptions:function(){for(var t=[],e=this.searchOptions instanceof Object?this.searchOptions:this.defaultSearchOptions,n=this.options,o=0;o<e.length;o++){for(var r=!1,i=0;i<n.length;i++)n[i][this.optionKeyName]===e[o][this.optionKeyName]&&(r=!0);r||t.push(e[o])}return t},showSearch:function(){return!(!this.isSearch||!this.isMulti&&p()(this.options).length)},showStub:function(){return!(this.isSearch&&(this.isMulti||!p()(this.options).length)||this.options.length)}},methods:{handleShowDropdownList:function(){this.showDropdownList=!0},handleHideDropdownList:function(){this.showDropdownList=!1},handleSelectFromDropdownList:function(t){if(this.isMulti){var e=u()([],this.selectedOptions);e.push(t),this.selectedOptions=e}else this.selectedOptions=[t];this.dropdownOptions.length&&this.isMulti||this.handleHideDropdownList(),this.onChange instanceof Function&&this.onChange(this.selectedOptions)},handleDropOption:function(t){for(var e=[],n=0;n<this.selectedOptions.length;n++)this.selectedOptions[n]!==t&&e.push(this.selectedOptions[n]);this.selectedOptions=e,this.searchOptions instanceof Object&&-1===this.searchOptions.indexOf(t)&&this.searchOptions.push(t)},handleSearch:function(t){var e=this;if(null===t)return void(this.searchOptions=null);if(t=t.toLowerCase(),this.asyncSearchCallback instanceof Function||null!==this.asyncSearchUrl){this.handleHideDropdownList();var n=this,o=null;if(o=null!==this.asyncSearchUrl?x.a.get(this.asyncSearchUrl+(-1===this.asyncSearchUrl.indexOf("?")?"?":"&")+"query="+t):this.asyncSearchCallback(t),"function"==typeof o.then&&"function"==typeof o.catch)return void o.then(function(t){n.searchOptions=n.convertOptionsToObjects(t.data),e.handleShowDropdownList()}).catch(function(t){console.log("Error response",t),e.handleShowDropdownList()})}for(var r=[],i=u()([],this.defaultSearchOptions),s=0;s<i.length;s++)-1!==i[s][this.optionTitleName].toLowerCase().indexOf(t)&&r.push(i[s]);this.searchOptions=r,this.handleShowDropdownList()},convertOptionsToObjects:function(t){var e=[];if("string"==typeof t&&(t=[t]),Array.isArray(t))for(var n=0;n<t.length;n++)if(t[n]instanceof Object){var o=t[n];if(void 0===o[this.optionTitleName])continue;void 0===o[this.optionKeyName]&&(o[this.optionKeyName]=o[this.optionTitleName]),o[this.optionKeyName]=s()(o[this.optionKeyName])?parseInt(o[this.optionKeyName]):o[this.optionKeyName],e.push(o)}else{t[n]=s()(t[n])?parseInt(t[n]):t[n];var i=!1;if(this.defaultSearchOptions.length)for(var a=0;a<this.defaultSearchOptions.length;a++)if(this.defaultSearchOptions[a][this.optionKeyName]+""==t[n]+""){e.push(this.defaultSearchOptions[a]),i=!0;break}if(!i){var u;e.push((u={},r()(u,this.optionKeyName,t[n]),r()(u,this.optionTitleName,t[n]),u))}}else if(void 0===t[this.optionKeyName]||void 0===t[this.optionTitleName]||this.isMulti)for(var c in t){var p,l=s()(c)?parseInt(c):c;e.push((p={},r()(p,this.optionKeyName,l),r()(p,this.optionTitleName,t[c]),p))}else{var f;t[this.optionKeyName]=s()(t[this.optionKeyName])?parseInt(t[this.optionKeyName]):t[this.optionKeyName];var d=(f={},r()(f,this.optionKeyName,t[this.optionKeyName]),r()(f,this.optionTitleName,t[this.optionTitleName]),f);void 0!==t[this.optionImageName]&&(d[this.optionImageName]=t[this.optionImageName]),e.push(d)}return e},getChildrenByName:function(t){for(var e=0;e<this.$children.length;e++){var n=this.$children[e];if(n.$options._componentTag===t)return n}return null},handleKeyDown:function(t){var e=this.getChildrenByName("list"),n=this.getChildrenByName("search");"ArrowDown"===t.key?(t.preventDefault(),this.showDropdownList?e.handlePressDown():this.handleShowDropdownList()):"ArrowUp"===t.key&&this.showDropdownList?(t.preventDefault(),e.handlePressUp()):"Enter"===t.key&&this.showDropdownList?(e.handleSelect(e.$options.propsData.options[e._data.hoverIndex],t),this.isMulti||(e._data.hoverIndex=null)):"Tab"!==t.key&&this.showSearch?n.$refs.input.focus():"Tab"===t.key&&this.handleHideDropdownList()}},mounted:function(){this.defaultSearchOptions=this.convertOptionsToObjects(this.allValues),this.selectedOptions=this.convertOptionsToObjects(this.value)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{dropdownListCount:{type:Number,required:!0},isShowDropdownList:{type:Boolean},onShowDropdownList:{type:Function},onHideDropdownList:{type:Function},optionsCount:{type:Number,required:!0}},data:function(){return{}},computed:{},methods:{handleClickCaret:function(t){var e=this,n=e.isShowDropdownList;setTimeout(function(){n?e.onHideDropdownList():e.onShowDropdownList()},10)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{show:{type:Boolean,default:!1},titleName:{type:String},imageName:{type:String},keyName:{type:String},onSelect:{type:Function},onHide:{type:Function},options:{type:Array,default:function(){return[]}}},data:function(){return{hoverIndex:null}},computed:{width:function(){return this.$parent.$el.offsetWidth>0?this.$parent.$el.offsetWidth:null},searchQuery:function(){return this.$parent.getChildrenByName("search")._data.query}},methods:{handleSelect:function(t,e){e.stopPropagation(),this.onSelect(t)},handlePressUp:function(t){this.hoverIndex?this.options.length?this.hoverIndex--:this.onHide():this.hoverIndex=0,this.$refs.dropdownItem[this.hoverIndex]&&this.$refs.dropdownItem[this.hoverIndex].offsetTop<this.$refs.dropdownList.scrollTop&&(this.$refs.dropdownList.scrollTop=this.$refs.dropdownItem[this.hoverIndex].offsetTop)},handlePressDown:function(){if(null===this.hoverIndex?this.hoverIndex=0:this.hoverIndex+1>=this.options.length-1?this.hoverIndex=this.options.length-1:this.hoverIndex++,this.$refs.dropdownItem[this.hoverIndex]){this.$refs.dropdownItem[this.hoverIndex].offsetTop+this.$refs.dropdownItem[this.hoverIndex].offsetHeight-this.$refs.dropdownList.scrollTop>250&&(this.$refs.dropdownList.scrollTop+=this.$refs.dropdownItem[this.hoverIndex].offsetHeight)}}},watch:{options:function(t){this.hoverIndex>t.length-1&&(this.hoverIndex=t.length-1)}},mounted:function(){var t=this;document.addEventListener("click",function(){t.onHide()})}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(9),r=n.n(o);e.default={components:{caret:r.a},props:{placeholder:{type:String,default:"Start typing..."},isShowDropdownList:{type:Boolean},onShowDropdownList:{type:Function},onHideDropdownList:{type:Function},onSearch:{type:Function,required:!0},searchUrl:{type:String,default:null},dropdownListCount:{type:Number,required:!0},isMulti:{type:Boolean},isShow:{type:Boolean,required:!0},optionsCount:{type:Number,required:!0}},data:function(){return{query:null,isLoading:!1}},computed:{},methods:{handleInputFocus:function(t){var e=this;setTimeout(function(){null!==e.query&&e.query.length&&e.onShowDropdownList()},.1)}},watch:{query:function(t){var e=this,n=this;setTimeout(function(){n.query===t&&e.onSearch(null===t?null:t.length?t:null)},200),null!==t&&t.length?this.isLoading=!0:(this.onHideDropdownList(),this.isLoading=!1)},isShowDropdownList:function(t){t&&this.isLoading&&(this.isLoading=!1)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(9),r=n.n(o);e.default={components:{caret:r.a},props:{placeholder:{type:String,default:"Select option"},isShowDropdownList:{type:Boolean},onShowDropdownList:{type:Function},onHideDropdownList:{type:Function},dropdownListCount:{type:Number,required:!0},isShow:{type:Boolean,required:!0},optionsCount:{type:Number,required:!0}},methods:{handleClickByStub:function(t){t.stopPropagation(),this.isShowDropdownList?this.onHideDropdownList():this.onShowDropdownList()}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(96),r=n.n(o),i=n(9),s=n.n(i);e.default={components:{tag:r.a,caret:s.a},props:{short:{type:Boolean,required:!0},options:{type:[Array,Object],default:function(){return[]}},titleName:{type:String},imageName:{type:String},keyName:{type:String},onDrop:{type:Function,required:!0},dropdownListCount:{type:Number,required:!0},isShowDropdownList:{type:Boolean},onShowDropdownList:{type:Function},onHideDropdownList:{type:Function},isShowSearch:{type:Boolean}},data:function(){return{}},computed:{},methods:{handleDrop:function(t,e){e.stopPropagation(),this.onDrop(t)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{short:{type:Boolean,required:!0},option:{type:[Object,String],default:null},titleName:{type:String,default:"title"},imageName:{type:String,default:"image"},keyName:{type:String,default:"id"},onDrop:{type:Function,required:!0},optionsCount:{type:Number,required:!0}},data:function(){return{}},computed:{image:function(){return this.option.hasOwnProperty(this.imageName)&&this.option[this.imageName]?this.option[this.imageName]:null}}}},function(t,e,n){t.exports={default:n(54),__esModule:!0}},function(t,e,n){t.exports={default:n(55),__esModule:!0}},function(t,e,n){t.exports={default:n(56),__esModule:!0}},function(t,e,n){t.exports={default:n(57),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var o=n(51),r=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default=function(t,e,n){return e in t?(0,r.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){n(81),t.exports=n(2).Number.isInteger},function(t,e,n){n(82),t.exports=n(2).Object.assign},function(t,e,n){n(83);var o=n(2).Object;t.exports=function(t,e,n){return o.defineProperty(t,e,n)}},function(t,e,n){n(84),t.exports=n(2).Object.keys},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var o=n(6);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var o=n(20),r=n(78),i=n(77);t.exports=function(t){return function(e,n,s){var a,u=o(e),c=r(u.length),p=i(s,c);if(t&&n!=n){for(;c>p;)if((a=u[p++])!=a)return!0}else for(;c>p;p++)if((t||p in u)&&u[p]===n)return t||p||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var o=n(58);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,r){return t.call(e,n,o,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var o=n(6),r=n(8).document,i=o(r)&&o(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var o=n(17),r=n(74);t.exports=n(3)?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(3)&&!n(5)(function(){return 7!=Object.defineProperty(n(63)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var o=n(6),r=Math.floor;t.exports=function(t){return!o(t)&&isFinite(t)&&r(t)===t}},function(t,e,n){"use strict";var o=n(18),r=n(70),i=n(72),s=n(21),a=n(16),u=Object.assign;t.exports=!u||n(5)(function(){var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=o})?function(t,e){for(var n=s(t),u=arguments.length,c=1,p=r.f,l=i.f;u>c;)for(var f,d=a(arguments[c++]),h=p?o(d).concat(p(d)):o(d),m=h.length,w=0;m>w;)l.call(d,f=h[w++])&&(n[f]=d[f]);return n}:u},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var o=n(65),r=n(20),i=n(60)(!1),s=n(75)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),u=0,c=[];for(n in a)n!=s&&o(a,n)&&c.push(n);for(;e.length>u;)o(a,n=e[u++])&&(~i(c,n)||c.push(n));return c}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var o=n(4),r=n(2),i=n(5);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],s={};s[t]=e(n),o(o.S+o.F*i(function(){n(1)}),"Object",s)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var o=n(76)("keys"),r=n(80);t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t,e,n){var o=n(8),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e,n){var o=n(19),r=Math.max,i=Math.min;t.exports=function(t,e){return t=o(t),t<0?r(t+e,0):i(t,e)}},function(t,e,n){var o=n(19),r=Math.min;t.exports=function(t){return t>0?r(o(t),9007199254740991):0}},function(t,e,n){var o=n(6);t.exports=function(t,e){if(!o(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!o(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},function(t,e,n){var o=n(4);o(o.S,"Number",{isInteger:n(68)})},function(t,e,n){var o=n(4);o(o.S+o.F,"Object",{assign:n(69)})},function(t,e,n){var o=n(4);o(o.S+o.F*!n(3),"Object",{defineProperty:n(17).f})},function(t,e,n){var o=n(21),r=n(18);n(73)("keys",function(){return function(t){return r(o(t))}})},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function o(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
t.exports=function(t){return null!=t&&(n(t)||o(t)||!!t._isBuffer)}},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function r(t){if(p===setTimeout)return setTimeout(t,0);if((p===n||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);if((l===o||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function s(){m&&d&&(m=!1,d.length?h=d.concat(h):w=-1,h.length&&a())}function a(){if(!m){var t=r(s);m=!0;for(var e=h.length;e;){for(d=h,h=[];++w<e;)d&&d[w].run();w=-1,e=h.length}d=null,m=!1,i(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var p,l,f=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:n}catch(t){p=n}try{l="function"==typeof clearTimeout?clearTimeout:o}catch(t){l=o}}();var d,h=[],m=!1,w=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.push(new u(t,e)),1!==h.length||m||r(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e,n){function o(t){n(88)}var r=n(1)(n(44),n(102),o,null,null);t.exports=r.exports},function(t,e,n){function o(t){n(86)}var r=n(1)(n(45),n(98),o,null,null);t.exports=r.exports},function(t,e,n){function o(t){n(89)}var r=n(1)(n(46),n(103),o,null,null);t.exports=r.exports},function(t,e,n){var o=n(1)(n(47),n(101),null,null,null);t.exports=o.exports},function(t,e,n){function o(t){n(87)}var r=n(1)(n(48),n(100),o,null,null);t.exports=r.exports},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"form-control p-0 multiselect",attrs:{tabindex:"1"},on:{keydown:t.handleKeyDown}},[n("tags",{tag:"component",attrs:{short:t.shortTags,options:t.options,"title-name":t.optionTitleName,"image-name":t.optionImageName,"key-name":t.optionKeyName,"on-drop":t.handleDropOption,"dropdown-list-count":Object.keys(t.dropdownOptions).length,"is-show-dropdown-list":t.showDropdownList,"on-show-dropdown-list":t.handleShowDropdownList,"on-hide-dropdown-list":t.handleHideDropdownList,"is-show-search":t.showSearch}}),t._v(" "),n("search",{tag:"component",attrs:{"is-show-dropdown-list":t.showDropdownList,"dropdown-list-count":Object.keys(t.dropdownOptions).length,"on-show-dropdown-list":t.handleShowDropdownList,"on-hide-dropdown-list":t.handleHideDropdownList,placeholder:t.placeholder,"on-search":t.handleSearch,"is-show":t.showSearch,"options-count":t.options.length}}),t._v(" "),n("stub",{tag:"component",attrs:{"is-show-dropdown-list":t.showDropdownList,"dropdown-list-count":Object.keys(t.dropdownOptions).length,"on-show-dropdown-list":t.handleShowDropdownList,"on-hide-dropdown-list":t.handleHideDropdownList,placeholder:t.stubPlaceholder,"is-show":t.showStub,"options-count":t.options.length}}),t._v(" "),n("list",{tag:"component",attrs:{show:t.showDropdownList,options:t.dropdownOptions,"on-select":t.handleSelectFromDropdownList,"on-hide":t.handleHideDropdownList,"title-name":t.optionTitleName,"image-name":t.optionImageName,"key-name":t.optionKeyName}}),t._v(" "),t._l(t.options,function(e){return t.attachInput?n("input",{attrs:{type:"hidden",name:t.name+(t.isMulti?"[]":"")},domProps:{value:e.id}}):t._e()})],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isShow?n("div",{staticClass:"d-flex"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.query,expression:"query"}],ref:"input",staticClass:"m-0 d-inline-flex form-control w-100 border-0 rounded",attrs:{type:"text",tabindex:"-1",placeholder:t.placeholder},domProps:{value:t.query},on:{focus:t.handleInputFocus,click:t.handleInputFocus,input:function(e){e.target.composing||(t.query=e.target.value)}}}),t._v(" "),n("div",{staticClass:"d-flex align-items-center text-center"},[t.isLoading?n("div",{staticClass:"spinner"}):t._e(),t._v(" "),t.isLoading?t._e():n("caret",{tag:"component",attrs:{"options-count":t.optionsCount,"dropdown-list-count":t.dropdownListCount,"is-show-dropdown-list":t.isShowDropdownList,"on-show-dropdown-list":t.onShowDropdownList,"on-hide-dropdown-list":t.onHideDropdownList}})],1)]):t._e()},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"d-inline-flex py-2 px-3",class:{"align-self-center":t.optionsCount<=1,"align-self-end":t.optionsCount>1},on:{click:t.handleClickCaret}},[n("i",{staticClass:"fa",class:{"fa-caret-up":t.isShowDropdownList,"fa-caret-down":!t.isShowDropdownList}})])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("table",{staticClass:"tag rounded",class:{"w-100":!t.short,"mr-2":t.short,"mb-2":t.optionsCount>1}},[n("tr",[null!==t.image?n("td",{staticClass:"image align-top p-0"},[n("img",{attrs:{src:t.image,alt:t.option[t.titleName]}})]):t._e(),t._v(" "),n("td",{staticClass:"text-left align-middle p-2",class:{"w-100":!t.short}},[t._v(t._s(t.option[t.titleName]))]),t._v(" "),n("td",{staticClass:"action p-2",on:{click:function(e){t.onDrop(t.option,e)}}},[n("i",{staticClass:"fa fa-remove"})])])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isShowSearch&&t.options.length?n("div",{staticClass:"m-2",class:{"d-flex flex-wrap mb-2":t.short}},t._l(t.options,function(e,o){return n("tag",{key:"object"==typeof e?e[t.keyName]:o,tag:"component",attrs:{"title-name":t.titleName,"image-name":t.imageName,"key-name":t.keyName,option:e,short:t.short,"on-drop":t.handleDrop,"options-count":t.options.length}})})):!t.isShowSearch&&t.options.length?n("div",{staticClass:"d-flex"},[n("div",{staticClass:"m-0 d-inline-flex w-100"},[t.options.length?n("div",{staticClass:"m-2",class:{"w-100":!t.short}},t._l(t.options,function(e,o){return n("tag",{key:"object"==typeof e?e[t.keyName]:o,tag:"component",attrs:{"title-name":t.titleName,"image-name":t.imageName,"key-name":t.keyName,option:e,short:t.short,"on-drop":t.handleDrop,"options-count":t.options.length}})})):t._e()]),t._v(" "),n("caret",{tag:"component",attrs:{"options-count":t.options.length,"dropdown-list-count":t.dropdownListCount,"is-show-dropdown-list":t.isShowDropdownList,"on-show-dropdown-list":t.onShowDropdownList,"on-hide-dropdown-list":t.onHideDropdownList}})],1):t._e()},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"dropdownList",staticClass:"multiselect-dropdown-list"},[t.show?n("ul",{staticClass:"list-group mt-1",style:null===t.width?null:"width:"+t.width+"px"},[t.options.length?t._e():n("li",{staticClass:"list-group-item py-2 px-3"},[t._v(t._s(t.$parent._props.noResultsPlaceholder))]),t._v(" "),t._l(t.options,function(e,o){return n("li",{ref:"dropdownItem",refInFor:!0,staticClass:"list-group-item",class:{hover:t.hoverIndex===o,"p-2":!0},on:{click:function(n){t.handleSelect(e,n)},mouseover:function(e){t.hoverIndex=o}}},[e.hasOwnProperty("image")?n("span",{staticClass:"image mr-2"},[n("img",{attrs:{src:e[t.imageName]}})]):t._e(),t._v(" "),n("span",{class:{"pl-1":!e.hasOwnProperty("image")},domProps:{innerHTML:t._s(t.searchQuery&&t.searchQuery.length?e[t.titleName].replace(new RegExp("("+t.searchQuery+")","gi"),"<span style='background: #fff2a8;'>$1</span>"):e[t.titleName])}})])})],2):t._e()])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isShow?n("div",{staticClass:"d-flex"},[n("div",{staticClass:"text-muted m-0 d-inline-flex form-control w-100 border-0 rounded stub",on:{click:t.handleClickByStub}},[t._v(t._s(t.placeholder)+"\n ")]),t._v(" "),n("caret",{tag:"component",attrs:{"options-count":t.optionsCount,"dropdown-list-count":t.dropdownListCount,"is-show-dropdown-list":t.isShowDropdownList,"on-show-dropdown-list":t.onShowDropdownList,"on-hide-dropdown-list":t.onHideDropdownList}})],1):t._e()},staticRenderFns:[]}}]);
//# sourceMappingURL=vue-bootstrap-multiselect.min.js.map