UNPKG

16.9 kBJavaScriptView Raw
1/**
2 * multiple-select - Multiple select is a jQuery plugin to select multiple elements with checkboxes :).
3 *
4 * @version v1.6.0
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?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),o={},c=function(t){try{return!!t()}catch(t){return!0}},u=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!c((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),i=l,a=Function.prototype.call,f=i?a.bind(a):function(){return a.apply(a,arguments)},s={},p={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,m=d&&!p.call({1:2},1);s.f=m?function(t){var e=d(this,t);return!!e&&e.enumerable}:p;var S,y,h=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=l,b=Function.prototype,g=b.call,w=v&&b.bind.bind(g,g),A=v?w:function(t){return function(){return g.apply(t,arguments)}},O=A,j=O({}.toString),T=O("".slice),N=function(t){return T(j(t),8,-1)},C=c,x=N,F=Object,M=A("".split),z=C((function(){return!F("z").propertyIsEnumerable(0)}))?function(t){return"String"==x(t)?M(t,""):F(t)}:F,P=function(t){return null==t},E=P,I=TypeError,D=function(t){if(E(t))throw I("Can't call method on "+t);return t},k=z,R=D,L=function(t){return k(R(t))},U="object"==typeof document&&document.all,_={all:U,IS_HTMLDDA:void 0===U&&void 0!==U},V=_.all,q=_.IS_HTMLDDA?function(t){return"function"==typeof t||t===V}:function(t){return"function"==typeof t},B=q,G=_.all,H=_.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:B(t)||t===G}:function(t){return"object"==typeof t?null!==t:B(t)},W=r,K=q,Q=function(t,e){return arguments.length<2?(n=W[t],K(n)?n:void 0):W[t]&&W[t][e];var n},X=A({}.isPrototypeOf),Y=r,$="undefined"!=typeof navigator&&String(navigator.userAgent)||"",J=Y.process,Z=Y.Deno,tt=J&&J.versions||Z&&Z.version,et=tt&&tt.v8;et&&(y=(S=et.split("."))[0]>0&&S[0]<4?1:+(S[0]+S[1])),!y&&$&&(!(S=$.match(/Edge\/(\d+)/))||S[1]>=74)&&(S=$.match(/Chrome\/(\d+)/))&&(y=+S[1]);var nt=y,rt=nt,ot=c,ct=r.String,ut=!!Object.getOwnPropertySymbols&&!ot((function(){var t=Symbol();return!ct(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&rt&&rt<41})),lt=ut&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,it=Q,at=q,ft=X,st=Object,pt=lt?function(t){return"symbol"==typeof t}:function(t){var e=it("Symbol");return at(e)&&ft(e.prototype,st(t))},dt=String,mt=q,St=function(t){try{return dt(t)}catch(t){return"Object"}},yt=TypeError,ht=function(t){if(mt(t))return t;throw yt(St(t)+" is not a function")},vt=P,bt=f,gt=q,wt=H,At=TypeError,Ot={exports:{}},jt=r,Tt=Object.defineProperty,Nt=function(t,e){try{Tt(jt,t,{value:e,configurable:!0,writable:!0})}catch(n){jt[t]=e}return e},Ct=Nt,xt="__core-js_shared__",Ft=r[xt]||Ct(xt,{}),Mt=Ft;(Ot.exports=function(t,e){return Mt[t]||(Mt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var zt=Ot.exports,Pt=D,Et=Object,It=function(t){return Et(Pt(t))},Dt=It,kt=A({}.hasOwnProperty),Rt=Object.hasOwn||function(t,e){return kt(Dt(t),e)},Lt=A,Ut=0,_t=Math.random(),Vt=Lt(1..toString),qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Vt(++Ut+_t,36)},Bt=zt,Gt=Rt,Ht=qt,Wt=ut,Kt=lt,Qt=r.Symbol,Xt=Bt("wks"),Yt=Kt?Qt.for||Qt:Qt&&Qt.withoutSetter||Ht,$t=function(t){return Gt(Xt,t)||(Xt[t]=Wt&&Gt(Qt,t)?Qt[t]:Yt("Symbol."+t)),Xt[t]},Jt=f,Zt=H,te=pt,ee=function(t,e){var n=t[e];return vt(n)?void 0:ht(n)},ne=function(t,e){var n,r;if("string"===e&&gt(n=t.toString)&&!wt(r=bt(n,t)))return r;if(gt(n=t.valueOf)&&!wt(r=bt(n,t)))return r;if("string"!==e&&gt(n=t.toString)&&!wt(r=bt(n,t)))return r;throw At("Can't convert object to primitive value")},re=TypeError,oe=$t("toPrimitive"),ce=function(t,e){if(!Zt(t)||te(t))return t;var n,r=ee(t,oe);if(r){if(void 0===e&&(e="default"),n=Jt(r,t,e),!Zt(n)||te(n))return n;throw re("Can't convert object to primitive value")}return void 0===e&&(e="number"),ne(t,e)},ue=pt,le=function(t){var e=ce(t,"string");return ue(e)?e:e+""},ie=H,ae=r.document,fe=ie(ae)&&ie(ae.createElement),se=function(t){return fe?ae.createElement(t):{}},pe=!u&&!c((function(){return 7!=Object.defineProperty(se("div"),"a",{get:function(){return 7}}).a})),de=u,me=f,Se=s,ye=h,he=L,ve=le,be=Rt,ge=pe,we=Object.getOwnPropertyDescriptor;o.f=de?we:function(t,e){if(t=he(t),e=ve(e),ge)try{return we(t,e)}catch(t){}if(be(t,e))return ye(!me(Se.f,t,e),t[e])};var Ae={},Oe=u&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),je=H,Te=String,Ne=TypeError,Ce=function(t){if(je(t))return t;throw Ne(Te(t)+" is not an object")},xe=u,Fe=pe,Me=Oe,ze=Ce,Pe=le,Ee=TypeError,Ie=Object.defineProperty,De=Object.getOwnPropertyDescriptor,ke="enumerable",Re="configurable",Le="writable";Ae.f=xe?Me?function(t,e,n){if(ze(t),e=Pe(e),ze(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Le in n&&!n[Le]){var r=De(t,e);r&&r[Le]&&(t[e]=n.value,n={configurable:Re in n?n[Re]:r[Re],enumerable:ke in n?n[ke]:r[ke],writable:!1})}return Ie(t,e,n)}:Ie:function(t,e,n){if(ze(t),e=Pe(e),ze(n),Fe)try{return Ie(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Ee("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Ue=Ae,_e=h,Ve=u?function(t,e,n){return Ue.f(t,e,_e(1,n))}:function(t,e,n){return t[e]=n,t},qe={exports:{}},Be=u,Ge=Rt,He=Function.prototype,We=Be&&Object.getOwnPropertyDescriptor,Ke=Ge(He,"name"),Qe={EXISTS:Ke,PROPER:Ke&&"something"===function(){}.name,CONFIGURABLE:Ke&&(!Be||Be&&We(He,"name").configurable)},Xe=q,Ye=Ft,$e=A(Function.toString);Xe(Ye.inspectSource)||(Ye.inspectSource=function(t){return $e(t)});var Je,Ze,tn,en=Ye.inspectSource,nn=q,rn=r.WeakMap,on=nn(rn)&&/native code/.test(String(rn)),cn=qt,un=zt("keys"),ln={},an=on,fn=r,sn=H,pn=Ve,dn=Rt,mn=Ft,Sn=function(t){return un[t]||(un[t]=cn(t))},yn=ln,hn="Object already initialized",vn=fn.TypeError,bn=fn.WeakMap;if(an||mn.state){var gn=mn.state||(mn.state=new bn);gn.get=gn.get,gn.has=gn.has,gn.set=gn.set,Je=function(t,e){if(gn.has(t))throw vn(hn);return e.facade=t,gn.set(t,e),e},Ze=function(t){return gn.get(t)||{}},tn=function(t){return gn.has(t)}}else{var wn=Sn("state");yn[wn]=!0,Je=function(t,e){if(dn(t,wn))throw vn(hn);return e.facade=t,pn(t,wn,e),e},Ze=function(t){return dn(t,wn)?t[wn]:{}},tn=function(t){return dn(t,wn)}}var An={set:Je,get:Ze,has:tn,enforce:function(t){return tn(t)?Ze(t):Je(t,{})},getterFor:function(t){return function(e){var n;if(!sn(e)||(n=Ze(e)).type!==t)throw vn("Incompatible receiver, "+t+" required");return n}}},On=A,jn=c,Tn=q,Nn=Rt,Cn=u,xn=Qe.CONFIGURABLE,Fn=en,Mn=An.enforce,zn=An.get,Pn=String,En=Object.defineProperty,In=On("".slice),Dn=On("".replace),kn=On([].join),Rn=Cn&&!jn((function(){return 8!==En((function(){}),"length",{value:8}).length})),Ln=String(String).split("String"),Un=qe.exports=function(t,e,n){"Symbol("===In(Pn(e),0,7)&&(e="["+Dn(Pn(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!Nn(t,"name")||xn&&t.name!==e)&&(Cn?En(t,"name",{value:e,configurable:!0}):t.name=e),Rn&&n&&Nn(n,"arity")&&t.length!==n.arity&&En(t,"length",{value:n.arity});try{n&&Nn(n,"constructor")&&n.constructor?Cn&&En(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=Mn(t);return Nn(r,"source")||(r.source=kn(Ln,"string"==typeof e?e:"")),t};Function.prototype.toString=Un((function(){return Tn(this)&&zn(this).source||Fn(this)}),"toString");var _n=qe.exports,Vn=q,qn=Ae,Bn=_n,Gn=Nt,Hn={},Wn=Math.ceil,Kn=Math.floor,Qn=Math.trunc||function(t){var e=+t;return(e>0?Kn:Wn)(e)},Xn=function(t){var e=+t;return e!=e||0===e?0:Qn(e)},Yn=Xn,$n=Math.max,Jn=Math.min,Zn=Xn,tr=Math.min,er=function(t){return t>0?tr(Zn(t),9007199254740991):0},nr=function(t){return er(t.length)},rr=L,or=function(t,e){var n=Yn(t);return n<0?$n(n+e,0):Jn(n,e)},cr=nr,ur=function(t){return function(e,n,r){var o,c=rr(e),u=cr(c),l=or(r,u);if(t&&n!=n){for(;u>l;)if((o=c[l++])!=o)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}},lr={includes:ur(!0),indexOf:ur(!1)},ir=Rt,ar=L,fr=lr.indexOf,sr=ln,pr=A([].push),dr=function(t,e){var n,r=ar(t),o=0,c=[];for(n in r)!ir(sr,n)&&ir(r,n)&&pr(c,n);for(;e.length>o;)ir(r,n=e[o++])&&(~fr(c,n)||pr(c,n));return c},mr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Hn.f=Object.getOwnPropertyNames||function(t){return dr(t,mr)};var Sr={};Sr.f=Object.getOwnPropertySymbols;var yr=Q,hr=Hn,vr=Sr,br=Ce,gr=A([].concat),wr=yr("Reflect","ownKeys")||function(t){var e=hr.f(br(t)),n=vr.f;return n?gr(e,n(t)):e},Ar=Rt,Or=wr,jr=o,Tr=Ae,Nr=c,Cr=q,xr=/#|\.prototype\./,Fr=function(t,e){var n=zr[Mr(t)];return n==Er||n!=Pr&&(Cr(e)?Nr(e):!!e)},Mr=Fr.normalize=function(t){return String(t).replace(xr,".").toLowerCase()},zr=Fr.data={},Pr=Fr.NATIVE="N",Er=Fr.POLYFILL="P",Ir=Fr,Dr=r,kr=o.f,Rr=Ve,Lr=function(t,e,n,r){r||(r={});var o=r.enumerable,c=void 0!==r.name?r.name:e;if(Vn(n)&&Bn(n,c,r),r.global)o?t[e]=n:Gn(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:qn.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Ur=Nt,_r=function(t,e,n){for(var r=Or(e),o=Tr.f,c=jr.f,u=0;u<r.length;u++){var l=r[u];Ar(t,l)||n&&Ar(n,l)||o(t,l,c(e,l))}},Vr=Ir,qr=N,Br=Array.isArray||function(t){return"Array"==qr(t)},Gr=TypeError,Hr=le,Wr=Ae,Kr=h,Qr={};Qr[$t("toStringTag")]="z";var Xr="[object z]"===String(Qr),Yr=q,$r=N,Jr=$t("toStringTag"),Zr=Object,to="Arguments"==$r(function(){return arguments}()),eo=A,no=c,ro=q,oo=Xr?$r:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Zr(t),Jr))?n:to?$r(e):"Object"==(r=$r(e))&&Yr(e.callee)?"Arguments":r},co=en,uo=function(){},lo=[],io=Q("Reflect","construct"),ao=/^\s*(?:class|function)\b/,fo=eo(ao.exec),so=!ao.exec(uo),po=function(t){if(!ro(t))return!1;try{return io(uo,lo,t),!0}catch(t){return!1}},mo=function(t){if(!ro(t))return!1;switch(oo(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return so||!!fo(ao,co(t))}catch(t){return!0}};mo.sham=!0;var So=!io||no((function(){var t;return po(po.call)||!po(Object)||!po((function(){t=!0}))||t}))?mo:po,yo=Br,ho=So,vo=H,bo=$t("species"),go=Array,wo=function(t){var e;return yo(t)&&(e=t.constructor,(ho(e)&&(e===go||yo(e.prototype))||vo(e)&&null===(e=e[bo]))&&(e=void 0)),void 0===e?go:e},Ao=c,Oo=nt,jo=$t("species"),To=function(t,e){var n,r,o,c,u,l=t.target,i=t.global,a=t.stat;if(n=i?Dr:a?Dr[l]||Ur(l,{}):(Dr[l]||{}).prototype)for(r in e){if(c=e[r],o=t.dontCallGetSet?(u=kr(n,r))&&u.value:n[r],!Vr(i?r:l+(a?".":"#")+r,t.forced)&&void 0!==o){if(typeof c==typeof o)continue;_r(c,o)}(t.sham||o&&o.sham)&&Rr(c,"sham",!0),Lr(n,r,c,t)}},No=c,Co=Br,xo=H,Fo=It,Mo=nr,zo=function(t){if(t>9007199254740991)throw Gr("Maximum allowed index exceeded");return t},Po=function(t,e,n){var r=Hr(e);r in t?Wr.f(t,r,Kr(0,n)):t[r]=n},Eo=function(t,e){return new(wo(t))(0===e?0:e)},Io=function(t){return Oo>=51||!Ao((function(){var e=[];return(e.constructor={})[jo]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Do=nt,ko=$t("isConcatSpreadable"),Ro=Do>=51||!No((function(){var t=[];return t[ko]=!1,t.concat()[0]!==t})),Lo=function(t){if(!xo(t))return!1;var e=t[ko];return void 0!==e?!!e:Co(t)};To({target:"Array",proto:!0,arity:1,forced:!Ro||!Io("concat")},{concat:function(t){var e,n,r,o,c,u=Fo(this),l=Eo(u,0),i=0;for(e=-1,r=arguments.length;e<r;e++)if(Lo(c=-1===e?u:arguments[e]))for(o=Mo(c),zo(i+o),n=0;n<o;n++,i++)n in c&&Po(l,i,c[n]);else zo(i+1),Po(l,i++,c);return l.length=i,l}}),t.fn.multipleSelect.locales["fr-FR"]={formatSelectAll:function(){return"[Tout sélectionner]"},formatAllSelected:function(){return"Tous sélectionnés"},formatCountSelected:function(t,e){return"".concat(t," de ").concat(e," sélectionnés")},formatNoMatchesFound:function(){return"Aucun résultat"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["fr-FR"]),t.fn.multipleSelect.locales["es-ES"]={formatSelectAll:function(){return"[Seleccionar todo]"},formatAllSelected:function(){return"Todos seleccionados"},formatCountSelected:function(t,e){return"".concat(t," de ").concat(e," seleccionado")},formatNoMatchesFound:function(){return"No se encontraron coincidencias"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["es-ES"]),t.fn.multipleSelect.locales["da-DK"]={formatSelectAll:function(){return"[Vælg/fravælg alle]"},formatAllSelected:function(){return"Alle valgt"},formatCountSelected:function(t,e){return"".concat(t," af ").concat(e," valgt")},formatNoMatchesFound:function(){return"Søgning uden resultat"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["da-DK"]),t.fn.multipleSelect.locales["zh-CN"]={formatSelectAll:function(){return"[全选]"},formatAllSelected:function(){return"已选择所有记录"},formatCountSelected:function(t,e){return"已从".concat(e,"条记录中选择").concat(t,"条")},formatNoMatchesFound:function(){return"没有找到记录"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["zh-CN"]),t.fn.multipleSelect.locales["pt-BR"]={formatSelectAll:function(){return"[Selecionar todos]"},formatAllSelected:function(){return"Todos selecionados"},formatCountSelected:function(t,e){return"".concat(t," de ").concat(e," selecionado(s)")},formatNoMatchesFound:function(){return"Nenhum resultado encontrado"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["pt-BR"]),t.fn.multipleSelect.locales["vi-VN"]={formatSelectAll:function(){return"[Tất cả]"},formatAllSelected:function(){return"Chọn tất cả"},formatCountSelected:function(t,e){return"Đã chọn ".concat(t," trong ").concat(e)},formatNoMatchesFound:function(){return"Không tìm thấy kết quả."}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["vi-VN"]),t.fn.multipleSelect.locales["hu-HU"]={formatSelectAll:function(){return"[Összes kiválasztása]"},formatAllSelected:function(){return"Összes kiválasztva"},formatCountSelected:function(t,e){return"".concat(t," / ").concat(e," kiválasztva")},formatNoMatchesFound:function(){return"Nincs találat"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["hu-HU"]),t.fn.multipleSelect.locales["ru-RU"]={formatSelectAll:function(){return"[Выбрать все]"},formatAllSelected:function(){return"Выбрано все"},formatCountSelected:function(t,e){return"".concat(t," из ").concat(e," выбрано")},formatNoMatchesFound:function(){return"Совпадений не найдено"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["ru-RU"]),t.fn.multipleSelect.locales["zh-TW"]={formatSelectAll:function(){return"[全選]"},formatAllSelected:function(){return"已選擇所有記錄"},formatCountSelected:function(t,e){return"已從".concat(e,"條記錄中選擇").concat(t,"條")},formatNoMatchesFound:function(){return"沒有找到記錄"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["zh-TW"]),t.fn.multipleSelect.locales["it-IT"]={formatSelectAll:function(){return"[Seleziona tutti]"},formatAllSelected:function(){return"Tutti selezionati"},formatCountSelected:function(t,e){return"".concat(t," di ").concat(e," selezionati")},formatNoMatchesFound:function(){return"Nessun risultato"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["it-IT"]),t.fn.multipleSelect.locales["en-US"]={formatSelectAll:function(){return"[Select all]"},formatAllSelected:function(){return"All selected"},formatCountSelected:function(t,e){return"".concat(t," of ").concat(e," selected")},formatNoMatchesFound:function(){return"No matches found"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["en-US"]),t.fn.multipleSelect.locales["cz-CS"]={formatSelectAll:function(){return"[Vybrat vše]"},formatAllSelected:function(){return"Vše vybráno"},formatCountSelected:function(t,e){return"".concat(t," z ").concat(e," vybráno")},formatNoMatchesFound:function(){return"Nebylo nalezeno"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["cz-CS"])}));