UNPKG

multiple-select

Version:

Multiple select is a jQuery plugin to select multiple elements with checkboxes :).

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