UNPKG

27.4 kBJavaScriptView Raw
1/**
2 * multiple-select - Multiple select is a jQuery plugin to select multiple elements with checkboxes :).
3 *
4 * @version v1.5.2
5 * @homepage http://multiple-select.wenzhixin.net.cn
6 * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
7 * @license MIT
8 */
9
10!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).MultipleSelect=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r,n,o,i="object",u=function(t){return t&&t.Math==Math&&t},a=u(typeof globalThis==i&&globalThis)||u(typeof window==i&&window)||u(typeof self==i&&self)||u(typeof t==i&&t)||Function("return this")(),c=function(t){try{return!!t()}catch(t){return!0}},l=!c((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),f={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,p={f:s&&!f.call({1:2},1)?function(t){var e=s(this,t);return!!e&&e.enumerable}:f},h=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d={}.toString,y=function(t){return d.call(t).slice(8,-1)},v="".split,g=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==y(t)?v.call(t,""):Object(t)}:Object,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return g(b(t))},S=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t,e){if(!S(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!S(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!S(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!S(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,_=function(t,e){return w.call(t,e)},j=a.document,x=S(j)&&S(j.createElement),A=function(t){return x?j.createElement(t):{}},E=!l&&!c((function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a})),T=Object.getOwnPropertyDescriptor,I={f:l?T:function(t,e){if(t=m(t),e=O(e,!0),E)try{return T(t,e)}catch(t){}if(_(t,e))return h(!p.f.call(t,e),t[e])}},P=function(t){if(!S(t))throw TypeError(String(t)+" is not an object");return t},V=Object.defineProperty,N={f:l?V:function(t,e,r){if(P(t),e=O(e,!0),P(r),E)try{return V(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},$=l?function(t,e,r){return N.f(t,e,h(1,r))}:function(t,e,r){return t[e]=r,t},L=function(t,e){try{$(a,t,e)}catch(r){a[t]=e}return e},k=e((function(t){var e=a["__core-js_shared__"]||L("__core-js_shared__",{});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),M=k("native-function-to-string",Function.toString),R=a.WeakMap,C="function"==typeof R&&/native code/.test(M.call(R)),F=0,D=Math.random(),G=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++F+D).toString(36)},U=k("keys"),B=function(t){return U[t]||(U[t]=G(t))},z={},Y=a.WeakMap;if(C){var H=new Y,W=H.get,X=H.has,q=H.set;r=function(t,e){return q.call(H,t,e),e},n=function(t){return W.call(H,t)||{}},o=function(t){return X.call(H,t)}}else{var J=B("state");z[J]=!0,r=function(t,e){return $(t,J,e),e},n=function(t){return _(t,J)?t[J]:{}},o=function(t){return _(t,J)}}var Q={set:r,get:n,has:o,enforce:function(t){return o(t)?n(t):r(t,{})},getterFor:function(t){return function(e){var r;if(!S(e)||(r=n(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},Z=e((function(t){var e=Q.get,r=Q.enforce,n=String(M).split("toString");k("inspectSource",(function(t){return M.call(t)})),(t.exports=function(t,e,o,i){var u=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,l=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||_(o,"name")||$(o,"name",e),r(o).source=n.join("string"==typeof e?e:"")),t!==a?(u?!l&&t[e]&&(c=!0):delete t[e],c?t[e]=o:$(t,e,o)):c?t[e]=o:L(e,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||M.call(this)}))})),K=a,tt=function(t){return"function"==typeof t?t:void 0},et=function(t,e){return arguments.length<2?tt(K[t])||tt(a[t]):K[t]&&K[t][e]||a[t]&&a[t][e]},rt=Math.ceil,nt=Math.floor,ot=function(t){return isNaN(t=+t)?0:(t>0?nt:rt)(t)},it=Math.min,ut=function(t){return t>0?it(ot(t),9007199254740991):0},at=Math.max,ct=Math.min,lt=function(t){return function(e,r,n){var o,i=m(e),u=ut(i.length),a=function(t,e){var r=ot(t);return r<0?at(r+e,0):ct(r,e)}(n,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},ft={includes:lt(!0),indexOf:lt(!1)}.indexOf,st=function(t,e){var r,n=m(t),o=0,i=[];for(r in n)!_(z,r)&&_(n,r)&&i.push(r);for(;e.length>o;)_(n,r=e[o++])&&(~ft(i,r)||i.push(r));return i},pt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ht=pt.concat("length","prototype"),dt={f:Object.getOwnPropertyNames||function(t){return st(t,ht)}},yt={f:Object.getOwnPropertySymbols},vt=et("Reflect","ownKeys")||function(t){var e=dt.f(P(t)),r=yt.f;return r?e.concat(r(t)):e},gt=function(t,e){for(var r=vt(e),n=N.f,o=I.f,i=0;i<r.length;i++){var u=r[i];_(t,u)||n(t,u,o(e,u))}},bt=/#|\.prototype\./,mt=function(t,e){var r=Ot[St(t)];return r==_t||r!=wt&&("function"==typeof e?c(e):!!e)},St=mt.normalize=function(t){return String(t).replace(bt,".").toLowerCase()},Ot=mt.data={},wt=mt.NATIVE="N",_t=mt.POLYFILL="P",jt=mt,xt=I.f,At=function(t,e){var r,n,o,i,u,c=t.target,l=t.global,f=t.stat;if(r=l?a:f?a[c]||L(c,{}):(a[c]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(u=xt(r,n))&&u.value:r[n],!jt(l?n:c+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;gt(i,o)}(t.sham||o&&o.sham)&&$(i,"sham",!0),Z(r,n,i,t)}},Et=!!Object.getOwnPropertySymbols&&!c((function(){return!String(Symbol())})),Tt=Array.isArray||function(t){return"Array"==y(t)},It=function(t){return Object(b(t))},Pt=Object.keys||function(t){return st(t,pt)},Vt=l?Object.defineProperties:function(t,e){P(t);for(var r,n=Pt(e),o=n.length,i=0;o>i;)N.f(t,r=n[i++],e[r]);return t},Nt=et("document","documentElement"),$t=B("IE_PROTO"),Lt=function(){},kt=function(){var t,e=A("iframe"),r=pt.length;for(e.style.display="none",Nt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),kt=t.F;r--;)delete kt.prototype[pt[r]];return kt()},Mt=Object.create||function(t,e){var r;return null!==t?(Lt.prototype=P(t),r=new Lt,Lt.prototype=null,r[$t]=t):r=kt(),void 0===e?r:Vt(r,e)};z[$t]=!0;var Rt=dt.f,Ct={}.toString,Ft="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Dt={f:function(t){return Ft&&"[object Window]"==Ct.call(t)?function(t){try{return Rt(t)}catch(t){return Ft.slice()}}(t):Rt(m(t))}},Gt=a.Symbol,Ut=k("wks"),Bt=function(t){return Ut[t]||(Ut[t]=Et&&Gt[t]||(Et?Gt:G)("Symbol."+t))},zt={f:Bt},Yt=N.f,Ht=function(t){var e=K.Symbol||(K.Symbol={});_(e,t)||Yt(e,t,{value:zt.f(t)})},Wt=N.f,Xt=Bt("toStringTag"),qt=function(t,e,r){t&&!_(t=r?t:t.prototype,Xt)&&Wt(t,Xt,{configurable:!0,value:e})},Jt=function(t,e,r){if(function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function")}(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},Qt=Bt("species"),Zt=function(t,e){var r;return Tt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Tt(r.prototype)?S(r)&&null===(r=r[Qt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Kt=[].push,te=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,u=5==t||i;return function(a,c,l,f){for(var s,p,h=It(a),d=g(h),y=Jt(c,l,3),v=ut(d.length),b=0,m=f||Zt,S=e?m(a,v):r?m(a,0):void 0;v>b;b++)if((u||b in d)&&(p=y(s=d[b],b,h),t))if(e)S[b]=p;else if(p)switch(t){case 3:return!0;case 5:return s;case 6:return b;case 2:Kt.call(S,s)}else if(o)return!1;return i?-1:n||o?o:S}},ee={forEach:te(0),map:te(1),filter:te(2),some:te(3),every:te(4),find:te(5),findIndex:te(6)}.forEach,re=B("hidden"),ne=Bt("toPrimitive"),oe=Q.set,ie=Q.getterFor("Symbol"),ue=Object.prototype,ae=a.Symbol,ce=a.JSON,le=ce&&ce.stringify,fe=I.f,se=N.f,pe=Dt.f,he=p.f,de=k("symbols"),ye=k("op-symbols"),ve=k("string-to-symbol-registry"),ge=k("symbol-to-string-registry"),be=k("wks"),me=a.QObject,Se=!me||!me.prototype||!me.prototype.findChild,Oe=l&&c((function(){return 7!=Mt(se({},"a",{get:function(){return se(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=fe(ue,e);n&&delete ue[e],se(t,e,r),n&&t!==ue&&se(ue,e,n)}:se,we=function(t,e){var r=de[t]=Mt(ae.prototype);return oe(r,{type:"Symbol",tag:t,description:e}),l||(r.description=e),r},_e=Et&&"symbol"==typeof ae.iterator?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof ae},je=function(t,e,r){t===ue&&je(ye,e,r),P(t);var n=O(e,!0);return P(r),_(de,n)?(r.enumerable?(_(t,re)&&t[re][n]&&(t[re][n]=!1),r=Mt(r,{enumerable:h(0,!1)})):(_(t,re)||se(t,re,h(1,{})),t[re][n]=!0),Oe(t,n,r)):se(t,n,r)},xe=function(t,e){P(t);var r=m(e),n=Pt(r).concat(Ie(r));return ee(n,(function(e){l&&!Ae.call(r,e)||je(t,e,r[e])})),t},Ae=function(t){var e=O(t,!0),r=he.call(this,e);return!(this===ue&&_(de,e)&&!_(ye,e))&&(!(r||!_(this,e)||!_(de,e)||_(this,re)&&this[re][e])||r)},Ee=function(t,e){var r=m(t),n=O(e,!0);if(r!==ue||!_(de,n)||_(ye,n)){var o=fe(r,n);return!o||!_(de,n)||_(r,re)&&r[re][n]||(o.enumerable=!0),o}},Te=function(t){var e=pe(m(t)),r=[];return ee(e,(function(t){_(de,t)||_(z,t)||r.push(t)})),r},Ie=function(t){var e=t===ue,r=pe(e?ye:m(t)),n=[];return ee(r,(function(t){!_(de,t)||e&&!_(ue,t)||n.push(de[t])})),n};Et||(Z((ae=function(){if(this instanceof ae)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=G(t),r=function(t){this===ue&&r.call(ye,t),_(this,re)&&_(this[re],e)&&(this[re][e]=!1),Oe(this,e,h(1,t))};return l&&Se&&Oe(ue,e,{configurable:!0,set:r}),we(e,t)}).prototype,"toString",(function(){return ie(this).tag})),p.f=Ae,N.f=je,I.f=Ee,dt.f=Dt.f=Te,yt.f=Ie,l&&(se(ae.prototype,"description",{configurable:!0,get:function(){return ie(this).description}}),Z(ue,"propertyIsEnumerable",Ae,{unsafe:!0})),zt.f=function(t){return we(Bt(t),t)}),At({global:!0,wrap:!0,forced:!Et,sham:!Et},{Symbol:ae}),ee(Pt(be),(function(t){Ht(t)})),At({target:"Symbol",stat:!0,forced:!Et},{for:function(t){var e=String(t);if(_(ve,e))return ve[e];var r=ae(e);return ve[e]=r,ge[r]=e,r},keyFor:function(t){if(!_e(t))throw TypeError(t+" is not a symbol");if(_(ge,t))return ge[t]},useSetter:function(){Se=!0},useSimple:function(){Se=!1}}),At({target:"Object",stat:!0,forced:!Et,sham:!l},{create:function(t,e){return void 0===e?Mt(t):xe(Mt(t),e)},defineProperty:je,defineProperties:xe,getOwnPropertyDescriptor:Ee}),At({target:"Object",stat:!0,forced:!Et},{getOwnPropertyNames:Te,getOwnPropertySymbols:Ie}),At({target:"Object",stat:!0,forced:c((function(){yt.f(1)}))},{getOwnPropertySymbols:function(t){return yt.f(It(t))}}),ce&&At({target:"JSON",stat:!0,forced:!Et||c((function(){var t=ae();return"[null]"!=le([t])||"{}"!=le({a:t})||"{}"!=le(Object(t))}))},{stringify:function(t){for(var e,r,n=[t],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=e=n[1],(S(e)||void 0!==t)&&!_e(t))return Tt(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!_e(e))return e}),n[1]=e,le.apply(ce,n)}}),ae.prototype[ne]||$(ae.prototype,ne,ae.prototype.valueOf),qt(ae,"Symbol"),z[re]=!0;var Pe=N.f,Ve=a.Symbol;if(l&&"function"==typeof Ve&&(!("description"in Ve.prototype)||void 0!==Ve().description)){var Ne={},$e=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof $e?new Ve(t):void 0===t?Ve():Ve(t);return""===t&&(Ne[e]=!0),e};gt($e,Ve);var Le=$e.prototype=Ve.prototype;Le.constructor=$e;var ke=Le.toString,Me="Symbol(test)"==String(Ve("test")),Re=/^Symbol\((.*)\)[^)]+$/;Pe(Le,"description",{configurable:!0,get:function(){var t=S(this)?this.valueOf():this,e=ke.call(t);if(_(Ne,t))return"";var r=Me?e.slice(7,-1):e.replace(Re,"$1");return""===r?void 0:r}}),At({global:!0,forced:!0},{Symbol:$e})}Ht("iterator");var Ce=function(t,e,r){var n=O(e);n in t?N.f(t,n,h(0,r)):t[n]=r},Fe=Bt("species"),De=Bt("isConcatSpreadable"),Ge=!c((function(){var t=[];return t[De]=!1,t.concat()[0]!==t})),Ue=function(t){return!c((function(){var e=[];return(e.constructor={})[Fe]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("concat"),Be=function(t){if(!S(t))return!1;var e=t[De];return void 0!==e?!!e:Tt(t)};At({target:"Array",proto:!0,forced:!Ge||!Ue},{concat:function(t){var e,r,n,o,i,u=It(this),a=Zt(u,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(i=-1===e?u:arguments[e],Be(i)){if(c+(o=ut(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<o;r++,c++)r in i&&Ce(a,c,i[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Ce(a,c++,i)}return a.length=c,a}});var ze=Bt("unscopables"),Ye=Array.prototype;null==Ye[ze]&&$(Ye,ze,Mt(null));var He,We,Xe,qe=function(t){Ye[ze][t]=!0},Je=!c((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Qe=B("IE_PROTO"),Ze=Object.prototype,Ke=Je?Object.getPrototypeOf:function(t){return t=It(t),_(t,Qe)?t[Qe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ze:null},tr=Bt("iterator"),er=!1;[].keys&&("next"in(Xe=[].keys())?(We=Ke(Ke(Xe)))!==Object.prototype&&(He=We):er=!0),null==He&&(He={}),_(He,tr)||$(He,tr,(function(){return this}));var rr={IteratorPrototype:He,BUGGY_SAFARI_ITERATORS:er},nr=rr.IteratorPrototype,or=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return P(r),function(t){if(!S(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),ir=rr.IteratorPrototype,ur=rr.BUGGY_SAFARI_ITERATORS,ar=Bt("iterator"),cr=function(){return this},lr=function(t,e,r,n,o,i,u){!function(t,e,r){var n=e+" Iterator";t.prototype=Mt(nr,{next:h(1,r)}),qt(t,n,!1)}(r,e,n);var a,c,l,f=function(t){if(t===o&&v)return v;if(!ur&&t in d)return d[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},s=e+" Iterator",p=!1,d=t.prototype,y=d[ar]||d["@@iterator"]||o&&d[o],v=!ur&&y||f(o),g="Array"==e&&d.entries||y;if(g&&(a=Ke(g.call(new t)),ir!==Object.prototype&&a.next&&(Ke(a)!==ir&&(or?or(a,ir):"function"!=typeof a[ar]&&$(a,ar,cr)),qt(a,s,!0))),"values"==o&&y&&"values"!==y.name&&(p=!0,v=function(){return y.call(this)}),d[ar]!==v&&$(d,ar,v),o)if(c={values:f("values"),keys:i?v:f("keys"),entries:f("entries")},u)for(l in c)!ur&&!p&&l in d||Z(d,l,c[l]);else At({target:e,proto:!0,forced:ur||p},c);return c},fr=Q.set,sr=Q.getterFor("Array Iterator"),pr=lr(Array,"Array",(function(t,e){fr(this,{type:"Array Iterator",target:m(t),index:0,kind:e})}),(function(){var t=sr(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");qe("keys"),qe("values"),qe("entries");var hr=function(t,e,r){var n,o;return or&&"function"==typeof(n=e.constructor)&&n!==r&&S(o=n.prototype)&&o!==r.prototype&&or(t,o),t},dr="[\t\n\v\f\r                 \u2028\u2029\ufeff]",yr=RegExp("^"+dr+dr+"*"),vr=RegExp(dr+dr+"*$"),gr=function(t){return function(e){var r=String(b(e));return 1&t&&(r=r.replace(yr,"")),2&t&&(r=r.replace(vr,"")),r}},br={start:gr(1),end:gr(2),trim:gr(3)},mr=dt.f,Sr=I.f,Or=N.f,wr=br.trim,_r=a.Number,jr=_r.prototype,xr="Number"==y(Mt(jr)),Ar=function(t){var e,r,n,o,i,u,a,c,l=O(t,!1);if("string"==typeof l&&l.length>2)if(43===(e=(l=wr(l)).charCodeAt(0))||45===e){if(88===(r=l.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+l}for(u=(i=l.slice(2)).length,a=0;a<u;a++)if((c=i.charCodeAt(a))<48||c>o)return NaN;return parseInt(i,n)}return+l};if(jt("Number",!_r(" 0o1")||!_r("0b1")||_r("+0x1"))){for(var Er,Tr=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof Tr&&(xr?c((function(){jr.valueOf.call(r)})):"Number"!=y(r))?hr(new _r(Ar(e)),r,Tr):Ar(e)},Ir=l?mr(_r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),Pr=0;Ir.length>Pr;Pr++)_(_r,Er=Ir[Pr])&&!_(Tr,Er)&&Or(Tr,Er,Sr(_r,Er));Tr.prototype=jr,jr.constructor=Tr,Z(a,"Number",Tr)}var Vr=Bt("toStringTag"),Nr="Arguments"==y(function(){return arguments}()),$r={};$r[Bt("toStringTag")]="z";var Lr="[object z]"!==String($r)?function(){return"[object "+function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Vr))?r:Nr?y(e):"Object"==(n=y(e))&&"function"==typeof e.callee?"Arguments":n}(this)+"]"}:$r.toString,kr=Object.prototype;Lr!==kr.toString&&Z(kr,"toString",Lr,{unsafe:!0});var Mr=function(t){return function(e,r){var n,o,i=String(b(e)),u=ot(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=i.charCodeAt(u))<55296||n>56319||u+1===a||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):n:t?i.slice(u,u+2):o-56320+(n-55296<<10)+65536}},Rr={codeAt:Mr(!1),charAt:Mr(!0)},Cr=Rr.charAt,Fr=Q.set,Dr=Q.getterFor("String Iterator");lr(String,"String",(function(t){Fr(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Dr(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Cr(r,n),e.index+=t.length,{value:t,done:!1})}));var Gr,Ur,Br=function(){var t=P(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},zr=RegExp.prototype.exec,Yr=String.prototype.replace,Hr=zr,Wr=(Gr=/a/,Ur=/b*/g,zr.call(Gr,"a"),zr.call(Ur,"a"),0!==Gr.lastIndex||0!==Ur.lastIndex),Xr=void 0!==/()??/.exec("")[1];(Wr||Xr)&&(Hr=function(t){var e,r,n,o,i=this;return Xr&&(r=new RegExp("^"+i.source+"$(?!\\s)",Br.call(i))),Wr&&(e=i.lastIndex),n=zr.call(i,t),Wr&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),Xr&&n&&n.length>1&&Yr.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var qr=Hr,Jr=Bt("species"),Qr=!c((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Zr=!c((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),Kr=Rr.charAt,tn=function(t,e,r){return e+(r?Kr(t,e).length:1)},en=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==y(t))throw TypeError("RegExp#exec called on incompatible receiver");return qr.call(t,e)},rn=Math.max,nn=Math.min,on=Math.floor,un=/\$([$&'`]|\d\d?|<[^>]*>)/g,an=/\$([$&'`]|\d\d?)/g;!function(t,e,r,n){var o=Bt(t),i=!c((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),u=i&&!c((function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[Jr]=function(){return r}),r[o](""),!e}));if(!i||!u||"replace"===t&&!Qr||"split"===t&&!Zr){var a=/./[o],l=r(o,""[t],(function(t,e,r,n,o){return e.exec===qr?i&&!o?{done:!0,value:a.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}})),f=l[0],s=l[1];Z(String.prototype,t,f),Z(RegExp.prototype,o,2==e?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)}),n&&$(RegExp.prototype[o],"sham",!0)}}("replace",2,(function(t,e,r){return[function(r,n){var o=b(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,o,n):e.call(String(o),r,n)},function(t,o){var i=r(e,t,this,o);if(i.done)return i.value;var u=P(t),a=String(this),c="function"==typeof o;c||(o=String(o));var l=u.global;if(l){var f=u.unicode;u.lastIndex=0}for(var s=[];;){var p=en(u,a);if(null===p)break;if(s.push(p),!l)break;""===String(p[0])&&(u.lastIndex=tn(a,ut(u.lastIndex),f))}for(var h,d="",y=0,v=0;v<s.length;v++){p=s[v];for(var g=String(p[0]),b=rn(nn(ot(p.index),a.length),0),m=[],S=1;S<p.length;S++)m.push(void 0===(h=p[S])?h:String(h));var O=p.groups;if(c){var w=[g].concat(m,b,a);void 0!==O&&w.push(O);var _=String(o.apply(void 0,w))}else _=n(g,a,b,m,O,o);b>=y&&(d+=a.slice(y,b)+_,y=b+g.length)}return d+a.slice(y)}];function n(t,r,n,o,i,u){var a=n+t.length,c=o.length,l=an;return void 0!==i&&(i=It(i),l=un),e.call(u,l,(function(e,u){var l;switch(u.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(a);case"<":l=i[u.slice(1,-1)];break;default:var f=+u;if(0===f)return e;if(f>c){var s=on(f/10);return 0===s?e:s<=c?void 0===o[s-1]?u.charAt(1):o[s-1]+u.charAt(1):e}l=o[f-1]}return void 0===l?"":l}))}}));var cn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ln=Bt("iterator"),fn=Bt("toStringTag"),sn=pr.values;for(var pn in cn){var hn=a[pn],dn=hn&&hn.prototype;if(dn){if(dn[ln]!==sn)try{$(dn,ln,sn)}catch(t){dn[ln]=sn}if(dn[fn]||$(dn,fn,pn),cn[pn])for(var yn in pr)if(dn[yn]!==pr[yn])try{$(dn,yn,pr[yn])}catch(t){dn[yn]=pr[yn]}}}function vn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function bn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gn(r,!0).forEach((function(e){vn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gn(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var mn=window.jQuery;var Sn=function(t,e,r,n,o,i,u,a,c,l){"boolean"!=typeof u&&(c=a,a=u,u=!1);var f,s="function"==typeof r?r.options:r;if(t&&t.render&&(s.render=t.render,s.staticRenderFns=t.staticRenderFns,s._compiled=!0,o&&(s.functional=!0)),n&&(s._scopeId=n),i?(f=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(i)},s._ssrRegister=f):e&&(f=u?function(){e.call(this,l(this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),f)if(s.functional){var p=s.render;s.render=function(t,e){return f.call(e),p(t,e)}}else{var h=s.beforeCreate;s.beforeCreate=h?[].concat(h,f):[f]}return r};const On={name:"MultipleSelect",props:{value:{type:[String,Number,Array,Object],default:void 0},name:{type:String,default:void 0},multiple:{type:[Boolean,String],default:!1},disabled:{type:Boolean,default:!1},width:{type:[Number,String],default:void 0},data:{type:[Array,Object],default:function(){}},options:{type:Object,default:function(){return{}}}},data:function(){return{currentValue:this.value}},watch:{value:function(){this.currentValue!==this.value&&(this.currentValue=this.value,this._initDefaultValue())},multiple:function(){this._initSelect()},disabled:function(){var t=this;this.$nextTick((function(){t.disabled?t.disable():t.enable()}))},width:function(){this._initSelectValue()},options:{handler:function(){this._initSelectValue()},deep:!0},data:{handler:function(){this._initSelectValue()},deep:!0}},beforeUpdate:function(){var t=this;(this.slotDefault||this.slotDefault!==this.$slots.default)&&(this.slotDefault=this.$slots.default,this.$nextTick((function(){t._refresh(),t._initSelectValue()})))},destroyed:function(){this.destroy(!0)},mounted:function(){var t=this;this._refresh(),this.$select=mn(this.$el).change((function(){var e=t.getSelects();Array.isArray(t.currentValue)?t.currentValue=e:"number"==typeof t.currentValue?t.currentValue=e.length?+e[0]:void 0:t.currentValue=e.length?e[0]:void 0,t.$emit("input",t.currentValue),t.$emit("change",t.currentValue)})),this.$select.val()&&(void 0===this.currentValue||Array.isArray(this.currentValue)&&!this.currentValue.length)&&(this.currentValue=this.$select.val(),this.$emit("input",this.currentValue),this.$emit("change",this.currentValue));var e=function(e){/^on[A-Z]/.test(e)&&(mn.fn.multipleSelect.defaults[e]=function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];t.$emit.apply(t,[e.replace(/([A-Z])/g,"-$1").toLowerCase()].concat(n))})};for(var r in mn.fn.multipleSelect.defaults)e(r);this._initSelectValue()},methods:bn({_initSelectValue:function(){this._initSelect(),void 0===this.currentValue||Array.isArray(this.currentValue)&&!this.currentValue.length||this._initDefaultValue()},_initSelect:function(){var t,e=bn({},(t=this.options)?mn.extend(!0,Array.isArray(t)?[]:{},t):t,{single:!this.multiple,width:this.width,data:this.data});this._hasInit?this.refreshOptions(e):(this.$select.multipleSelect(e),this._hasInit=!0)},_initDefaultValue:function(){var t=this;this.$nextTick((function(){t.setSelects(Array.isArray(t.currentValue)?t.currentValue:[t.currentValue],!0)}))}},function(){var t={},e=!0,r=!1,n=void 0;try{for(var o,i=function(){var e=o.value;t[e]=function(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=this.$select).multipleSelect.apply(t,[e].concat(n))}},u=mn.fn.multipleSelect.methods[Symbol.iterator]();!(e=(o=u.next()).done);e=!0)i()}catch(t){r=!0,n=t}finally{try{e||null==u.return||u.return()}finally{if(r)throw n}}return t}(),{_refresh:function(){if(this.$slots.default){var t=!0,e=!1,r=void 0;try{for(var n,o=this.$slots.default[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var i=n.value;"OPTION"===i.elm.nodeName&&i.data.domProps&&i.data.domProps.value&&mn(i.elm).data("value",i.data.domProps.value)}}catch(t){e=!0,r=t}finally{try{t||null==o.return||o.return()}finally{if(e)throw r}}}},refresh:function(){this._refresh(),this.$select.multipleSelect("refresh")}})};var wn=function(){var t=this.$createElement;return(this._self._c||t)("select",{attrs:{name:this.name,multiple:this.multiple,disabled:this.disabled}},[this._t("default")],2)};wn._withStripped=!0;return Sn({render:wn,staticRenderFns:[]},void 0,On,void 0,!1,void 0,void 0,void 0)}));