multiple-select
Version:
Multiple select is a jQuery plugin to select multiple elements with checkboxes :).
11 lines (9 loc) • 12.8 kB
JavaScript
/**
* multiple-select - Multiple select is a jQuery plugin to select multiple elements with checkboxes :).
*
* @version v1.7.0
* @homepage http://multiple-select.wenzhixin.net.cn
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
* @license MIT
*/
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math==Math&&t},r=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n&&n)||function(){return this}()||n||Function("return this")(),o={},i=function(t){try{return!!t()}catch(t){return!0}},u=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),a=c,f=Function.prototype.call,l=a?f.bind(f):function(){return f.apply(f,arguments)},s={},p={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,v=y&&!p.call({1:2},1);s.f=v?function(t){var n=y(this,t);return!!n&&n.enumerable}:p;var b,g,h=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},d=c,m=Function.prototype,S=m.call,w=d&&m.bind.bind(S,S),O=d?w:function(t){return function(){return S.apply(t,arguments)}},j=O,P=j({}.toString),E=j("".slice),T=function(t){return E(P(t),8,-1)},A=i,x=T,M=Object,F=O("".split),z=A((function(){return!M("z").propertyIsEnumerable(0)}))?function(t){return"String"==x(t)?F(t,""):M(t)}:M,I=function(t){return null==t},C=I,D=TypeError,k=function(t){if(C(t))throw D("Can't call method on "+t);return t},L=z,N=k,_=function(t){return L(N(t))},R="object"==typeof document&&document.all,G={all:R,IS_HTMLDDA:void 0===R&&void 0!==R},H=G.all,U=G.IS_HTMLDDA?function(t){return"function"==typeof t||t===H}:function(t){return"function"==typeof t},q=U,B=G.all,W=G.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:q(t)||t===B}:function(t){return"object"==typeof t?null!==t:q(t)},K=r,Q=U,V=function(t,n){return arguments.length<2?(e=K[t],Q(e)?e:void 0):K[t]&&K[t][n];var e},X=O({}.isPrototypeOf),Y=r,$="undefined"!=typeof navigator&&String(navigator.userAgent)||"",J=Y.process,Z=Y.Deno,tt=J&&J.versions||Z&&Z.version,nt=tt&&tt.v8;nt&&(g=(b=nt.split("."))[0]>0&&b[0]<4?1:+(b[0]+b[1])),!g&&$&&(!(b=$.match(/Edge\/(\d+)/))||b[1]>=74)&&(b=$.match(/Chrome\/(\d+)/))&&(g=+b[1]);var et=g,rt=et,ot=i,it=r.String,ut=!!Object.getOwnPropertySymbols&&!ot((function(){var t=Symbol();return!it(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&rt&&rt<41})),ct=ut&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=V,ft=U,lt=X,st=Object,pt=ct?function(t){return"symbol"==typeof t}:function(t){var n=at("Symbol");return ft(n)&<(n.prototype,st(t))},yt=String,vt=U,bt=function(t){try{return yt(t)}catch(t){return"Object"}},gt=TypeError,ht=function(t){if(vt(t))return t;throw gt(bt(t)+" is not a function")},dt=I,mt=l,St=U,wt=W,Ot=TypeError,jt={exports:{}},Pt=r,Et=Object.defineProperty,Tt=function(t,n){try{Et(Pt,t,{value:n,configurable:!0,writable:!0})}catch(e){Pt[t]=n}return n},At=Tt,xt="__core-js_shared__",Mt=r[xt]||At(xt,{}),Ft=Mt;(jt.exports=function(t,n){return Ft[t]||(Ft[t]=void 0!==n?n:{})})("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=jt.exports,It=k,Ct=Object,Dt=function(t){return Ct(It(t))},kt=Dt,Lt=O({}.hasOwnProperty),Nt=Object.hasOwn||function(t,n){return Lt(kt(t),n)},_t=O,Rt=0,Gt=Math.random(),Ht=_t(1..toString),Ut=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Ht(++Rt+Gt,36)},qt=zt,Bt=Nt,Wt=Ut,Kt=ut,Qt=ct,Vt=r.Symbol,Xt=qt("wks"),Yt=Qt?Vt.for||Vt:Vt&&Vt.withoutSetter||Wt,$t=function(t){return Bt(Xt,t)||(Xt[t]=Kt&&Bt(Vt,t)?Vt[t]:Yt("Symbol."+t)),Xt[t]},Jt=l,Zt=W,tn=pt,nn=function(t,n){var e=t[n];return dt(e)?void 0:ht(e)},en=function(t,n){var e,r;if("string"===n&&St(e=t.toString)&&!wt(r=mt(e,t)))return r;if(St(e=t.valueOf)&&!wt(r=mt(e,t)))return r;if("string"!==n&&St(e=t.toString)&&!wt(r=mt(e,t)))return r;throw Ot("Can't convert object to primitive value")},rn=TypeError,on=$t("toPrimitive"),un=function(t,n){if(!Zt(t)||tn(t))return t;var e,r=nn(t,on);if(r){if(void 0===n&&(n="default"),e=Jt(r,t,n),!Zt(e)||tn(e))return e;throw rn("Can't convert object to primitive value")}return void 0===n&&(n="number"),en(t,n)},cn=pt,an=function(t){var n=un(t,"string");return cn(n)?n:n+""},fn=W,ln=r.document,sn=fn(ln)&&fn(ln.createElement),pn=function(t){return sn?ln.createElement(t):{}},yn=!u&&!i((function(){return 7!=Object.defineProperty(pn("div"),"a",{get:function(){return 7}}).a})),vn=u,bn=l,gn=s,hn=h,dn=_,mn=an,Sn=Nt,wn=yn,On=Object.getOwnPropertyDescriptor;o.f=vn?On:function(t,n){if(t=dn(t),n=mn(n),wn)try{return On(t,n)}catch(t){}if(Sn(t,n))return hn(!bn(gn.f,t,n),t[n])};var jn={},Pn=u&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),En=W,Tn=String,An=TypeError,xn=function(t){if(En(t))return t;throw An(Tn(t)+" is not an object")},Mn=u,Fn=yn,zn=Pn,In=xn,Cn=an,Dn=TypeError,kn=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,Nn="enumerable",_n="configurable",Rn="writable";jn.f=Mn?zn?function(t,n,e){if(In(t),n=Cn(n),In(e),"function"==typeof t&&"prototype"===n&&"value"in e&&Rn in e&&!e[Rn]){var r=Ln(t,n);r&&r[Rn]&&(t[n]=e.value,e={configurable:_n in e?e[_n]:r[_n],enumerable:Nn in e?e[Nn]:r[Nn],writable:!1})}return kn(t,n,e)}:kn:function(t,n,e){if(In(t),n=Cn(n),In(e),Fn)try{return kn(t,n,e)}catch(t){}if("get"in e||"set"in e)throw Dn("Accessors not supported");return"value"in e&&(t[n]=e.value),t};var Gn=jn,Hn=h,Un=u?function(t,n,e){return Gn.f(t,n,Hn(1,e))}:function(t,n,e){return t[n]=e,t},qn={exports:{}},Bn=u,Wn=Nt,Kn=Function.prototype,Qn=Bn&&Object.getOwnPropertyDescriptor,Vn=Wn(Kn,"name"),Xn={EXISTS:Vn,PROPER:Vn&&"something"===function(){}.name,CONFIGURABLE:Vn&&(!Bn||Bn&&Qn(Kn,"name").configurable)},Yn=U,$n=Mt,Jn=O(Function.toString);Yn($n.inspectSource)||($n.inspectSource=function(t){return Jn(t)});var Zn,te,ne,ee=$n.inspectSource,re=U,oe=r.WeakMap,ie=re(oe)&&/native code/.test(String(oe)),ue=Ut,ce=zt("keys"),ae={},fe=ie,le=r,se=W,pe=Un,ye=Nt,ve=Mt,be=function(t){return ce[t]||(ce[t]=ue(t))},ge=ae,he="Object already initialized",de=le.TypeError,me=le.WeakMap;if(fe||ve.state){var Se=ve.state||(ve.state=new me);Se.get=Se.get,Se.has=Se.has,Se.set=Se.set,Zn=function(t,n){if(Se.has(t))throw de(he);return n.facade=t,Se.set(t,n),n},te=function(t){return Se.get(t)||{}},ne=function(t){return Se.has(t)}}else{var we=be("state");ge[we]=!0,Zn=function(t,n){if(ye(t,we))throw de(he);return n.facade=t,pe(t,we,n),n},te=function(t){return ye(t,we)?t[we]:{}},ne=function(t){return ye(t,we)}}var Oe={set:Zn,get:te,has:ne,enforce:function(t){return ne(t)?te(t):Zn(t,{})},getterFor:function(t){return function(n){var e;if(!se(n)||(e=te(n)).type!==t)throw de("Incompatible receiver, "+t+" required");return e}}},je=O,Pe=i,Ee=U,Te=Nt,Ae=u,xe=Xn.CONFIGURABLE,Me=ee,Fe=Oe.enforce,ze=Oe.get,Ie=String,Ce=Object.defineProperty,De=je("".slice),ke=je("".replace),Le=je([].join),Ne=Ae&&!Pe((function(){return 8!==Ce((function(){}),"length",{value:8}).length})),_e=String(String).split("String"),Re=qn.exports=function(t,n,e){"Symbol("===De(Ie(n),0,7)&&(n="["+ke(Ie(n),/^Symbol\(([^)]*)\)/,"$1")+"]"),e&&e.getter&&(n="get "+n),e&&e.setter&&(n="set "+n),(!Te(t,"name")||xe&&t.name!==n)&&(Ae?Ce(t,"name",{value:n,configurable:!0}):t.name=n),Ne&&e&&Te(e,"arity")&&t.length!==e.arity&&Ce(t,"length",{value:e.arity});try{e&&Te(e,"constructor")&&e.constructor?Ae&&Ce(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=Fe(t);return Te(r,"source")||(r.source=Le(_e,"string"==typeof n?n:"")),t};Function.prototype.toString=Re((function(){return Ee(this)&&ze(this).source||Me(this)}),"toString");var Ge=qn.exports,He=U,Ue=jn,qe=Ge,Be=Tt,We={},Ke=Math.ceil,Qe=Math.floor,Ve=Math.trunc||function(t){var n=+t;return(n>0?Qe:Ke)(n)},Xe=function(t){var n=+t;return n!=n||0===n?0:Ve(n)},Ye=Xe,$e=Math.max,Je=Math.min,Ze=Xe,tr=Math.min,nr=function(t){return t>0?tr(Ze(t),9007199254740991):0},er=function(t){return nr(t.length)},rr=_,or=function(t,n){var e=Ye(t);return e<0?$e(e+n,0):Je(e,n)},ir=er,ur=function(t){return function(n,e,r){var o,i=rr(n),u=ir(i),c=or(r,u);if(t&&e!=e){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===e)return t||c||0;return!t&&-1}},cr={includes:ur(!0),indexOf:ur(!1)},ar=Nt,fr=_,lr=cr.indexOf,sr=ae,pr=O([].push),yr=function(t,n){var e,r=fr(t),o=0,i=[];for(e in r)!ar(sr,e)&&ar(r,e)&&pr(i,e);for(;n.length>o;)ar(r,e=n[o++])&&(~lr(i,e)||pr(i,e));return i},vr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");We.f=Object.getOwnPropertyNames||function(t){return yr(t,vr)};var br={};br.f=Object.getOwnPropertySymbols;var gr=V,hr=We,dr=br,mr=xn,Sr=O([].concat),wr=gr("Reflect","ownKeys")||function(t){var n=hr.f(mr(t)),e=dr.f;return e?Sr(n,e(t)):n},Or=Nt,jr=wr,Pr=o,Er=jn,Tr=i,Ar=U,xr=/#|\.prototype\./,Mr=function(t,n){var e=zr[Fr(t)];return e==Cr||e!=Ir&&(Ar(n)?Tr(n):!!n)},Fr=Mr.normalize=function(t){return String(t).replace(xr,".").toLowerCase()},zr=Mr.data={},Ir=Mr.NATIVE="N",Cr=Mr.POLYFILL="P",Dr=Mr,kr=r,Lr=o.f,Nr=Un,_r=function(t,n,e,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:n;if(He(e)&&qe(e,i,r),r.global)o?t[n]=e:Be(n,e);else{try{r.unsafe?t[n]&&(o=!0):delete t[n]}catch(t){}o?t[n]=e:Ue.f(t,n,{value:e,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Rr=Tt,Gr=function(t,n,e){for(var r=jr(n),o=Er.f,i=Pr.f,u=0;u<r.length;u++){var c=r[u];Or(t,c)||e&&Or(e,c)||o(t,c,i(n,c))}},Hr=Dr,Ur=T,qr=Array.isArray||function(t){return"Array"==Ur(t)},Br=TypeError,Wr=an,Kr=jn,Qr=h,Vr={};Vr[$t("toStringTag")]="z";var Xr="[object z]"===String(Vr),Yr=U,$r=T,Jr=$t("toStringTag"),Zr=Object,to="Arguments"==$r(function(){return arguments}()),no=O,eo=i,ro=U,oo=Xr?$r:function(t){var n,e,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Zr(t),Jr))?e:to?$r(n):"Object"==(r=$r(n))&&Yr(n.callee)?"Arguments":r},io=ee,uo=function(){},co=[],ao=V("Reflect","construct"),fo=/^\s*(?:class|function)\b/,lo=no(fo.exec),so=!fo.exec(uo),po=function(t){if(!ro(t))return!1;try{return ao(uo,co,t),!0}catch(t){return!1}},yo=function(t){if(!ro(t))return!1;switch(oo(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return so||!!lo(fo,io(t))}catch(t){return!0}};yo.sham=!0;var vo=!ao||eo((function(){var t;return po(po.call)||!po(Object)||!po((function(){t=!0}))||t}))?yo:po,bo=qr,go=vo,ho=W,mo=$t("species"),So=Array,wo=function(t){var n;return bo(t)&&(n=t.constructor,(go(n)&&(n===So||bo(n.prototype))||ho(n)&&null===(n=n[mo]))&&(n=void 0)),void 0===n?So:n},Oo=i,jo=et,Po=$t("species"),Eo=function(t,n){var e,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(e=a?kr:f?kr[c]||Rr(c,{}):(kr[c]||{}).prototype)for(r in n){if(i=n[r],o=t.dontCallGetSet?(u=Lr(e,r))&&u.value:e[r],!Hr(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Gr(i,o)}(t.sham||o&&o.sham)&&Nr(i,"sham",!0),_r(e,r,i,t)}},To=i,Ao=qr,xo=W,Mo=Dt,Fo=er,zo=function(t){if(t>9007199254740991)throw Br("Maximum allowed index exceeded");return t},Io=function(t,n,e){var r=Wr(n);r in t?Kr.f(t,r,Qr(0,e)):t[r]=e},Co=function(t,n){return new(wo(t))(0===n?0:n)},Do=function(t){return jo>=51||!Oo((function(){var n=[];return(n.constructor={})[Po]=function(){return{foo:1}},1!==n[t](Boolean).foo}))},ko=et,Lo=$t("isConcatSpreadable"),No=ko>=51||!To((function(){var t=[];return t[Lo]=!1,t.concat()[0]!==t})),_o=function(t){if(!xo(t))return!1;var n=t[Lo];return void 0!==n?!!n:Ao(t)};Eo({target:"Array",proto:!0,arity:1,forced:!No||!Do("concat")},{concat:function(t){var n,e,r,o,i,u=Mo(this),c=Co(u,0),a=0;for(n=-1,r=arguments.length;n<r;n++)if(_o(i=-1===n?u:arguments[n]))for(o=Fo(i),zo(a+o),e=0;e<o;e++,a++)e in i&&Io(c,a,i[e]);else zo(a+1),Io(c,a++,i);return c.length=a,c}}),t.fn.multipleSelect.locales["hu-HU"]={formatSelectAll:function(){return"[Összes kiválasztása]"},formatAllSelected:function(){return"Összes kiválasztva"},formatCountSelected:function(t,n){return"".concat(t," / ").concat(n," kiválasztva")},formatNoMatchesFound:function(){return"Nincs találat"}},t.extend(t.fn.multipleSelect.defaults,t.fn.multipleSelect.locales["hu-HU"])}));