UNPKG

69.3 kBJavaScriptView Raw
1/**
2 * multiple-select - Multiple select is a jQuery plugin to select multiple elements with checkboxes :).
3 *
4 * @version v1.4.1
5 * @homepage http://multiple-select.wenzhixin.net.cn
6 * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
7 * @license MIT
8 */
9
10function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var l,n=0;n<t.length;n++)l=t[n],l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}function _createClass(e,t,l){return t&&_defineProperties(e.prototype,t),l&&_defineProperties(e,l),e}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var commonjsGlobal="undefined"==typeof globalThis?"undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window:globalThis;function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}var set,get,has$1,O="object",check=function(e){return e&&e.Math==Math&&e},global_1=check(typeof globalThis=="object"&&globalThis)||check(typeof window=="object"&&window)||check(typeof self=="object"&&self)||check(typeof commonjsGlobal=="object"&&commonjsGlobal)||Function("return this")(),fails=function(e){try{return!!e()}catch(e){return!0}},descriptors=!fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),nativePropertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor&&!nativePropertyIsEnumerable.call({1:2},1),f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor(this,e);return!!t&&t.enumerable}:nativePropertyIsEnumerable,objectPropertyIsEnumerable={f:f},createPropertyDescriptor=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},toString={}.toString,classofRaw=function(e){return toString.call(e).slice(8,-1)},split="".split,indexedObject=fails(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==classofRaw(e)?split.call(e,""):Object(e)}:Object,requireObjectCoercible=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},toIndexedObject=function(e){return indexedObject(requireObjectCoercible(e))},isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},toPrimitive=function(e,t){if(!isObject(e))return e;var l,n;if(t&&"function"==typeof(l=e.toString)&&!isObject(n=l.call(e)))return n;if("function"==typeof(l=e.valueOf)&&!isObject(n=l.call(e)))return n;if(!t&&"function"==typeof(l=e.toString)&&!isObject(n=l.call(e)))return n;throw TypeError("Can't convert object to primitive value")},hasOwnProperty={}.hasOwnProperty,has=function(e,t){return hasOwnProperty.call(e,t)},document$1=global_1.document,EXISTS=isObject(document$1)&&isObject(document$1.createElement),documentCreateElement=function(e){return EXISTS?document$1.createElement(e):{}},ie8DomDefine=!descriptors&&!fails(function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a}),nativeGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$1=descriptors?nativeGetOwnPropertyDescriptor:function(e,t){if(e=toIndexedObject(e),t=toPrimitive(t,!0),ie8DomDefine)try{return nativeGetOwnPropertyDescriptor(e,t)}catch(e){}return has(e,t)?createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(e,t),e[t]):void 0},objectGetOwnPropertyDescriptor={f:f$1},anObject=function(e){if(!isObject(e))throw TypeError(e+" is not an object");return e},nativeDefineProperty=Object.defineProperty,f$2=descriptors?nativeDefineProperty:function(e,t,l){if(anObject(e),t=toPrimitive(t,!0),anObject(l),ie8DomDefine)try{return nativeDefineProperty(e,t,l)}catch(e){}if("get"in l||"set"in l)throw TypeError("Accessors not supported");return"value"in l&&(e[t]=l.value),e},objectDefineProperty={f:f$2},hide=descriptors?function(e,t,l){return objectDefineProperty.f(e,t,createPropertyDescriptor(1,l))}:function(e,t,l){return e[t]=l,e},setGlobal=function(e,t){try{hide(global_1,e,t)}catch(l){global_1[e]=t}return t},shared=createCommonjsModule(function(e){var t=global_1["__core-js_shared__"]||setGlobal("__core-js_shared__",{});(e.exports=function(e,l){return t[e]||(t[e]=l===void 0?{}:l)})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),functionToString=shared("native-function-to-string",Function.toString),WeakMap=global_1.WeakMap,nativeWeakMap="function"==typeof WeakMap&&/native code/.test(functionToString.call(WeakMap)),id=0,postfix=Math.random(),uid=function(e){return"Symbol("+((e===void 0?"":e)+"")+")_"+(++id+postfix).toString(36)},keys=shared("keys"),sharedKey=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys={},WeakMap$1=global_1.WeakMap,enforce=function(e){return has$1(e)?get(e):set(e,{})},getterFor=function(e){return function(t){var l;if(!isObject(t)||(l=get(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return l}};if(nativeWeakMap){var store=new WeakMap$1,wmget=store.get,wmhas=store.has,wmset=store.set;set=function(e,t){return wmset.call(store,e,t),t},get=function(e){return wmget.call(store,e)||{}},has$1=function(e){return wmhas.call(store,e)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(e,t){return hide(e,STATE,t),t},get=function(e){return has(e,STATE)?e[STATE]:{}},has$1=function(e){return has(e,STATE)}}var internalState={set:set,get:get,has:has$1,enforce:enforce,getterFor:getterFor},redefine=createCommonjsModule(function(e){var t=internalState.get,l=internalState.enforce,n=(functionToString+"").split("toString");shared("inspectSource",function(e){return functionToString.call(e)}),(e.exports=function(e,t,o,s){var i=!!s&&!!s.unsafe,a=!!s&&!!s.enumerable,r=!!s&&!!s.noTargetGet;return("function"==typeof o&&("string"==typeof t&&!has(o,"name")&&hide(o,"name",t),l(o).source=n.join("string"==typeof t?t:"")),e===global_1)?void(a?e[t]=o:setGlobal(t,o)):void(i?!r&&e[t]&&(a=!0):delete e[t],a?e[t]=o:hide(e,t,o))})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||functionToString.call(this)})}),path=global_1,aFunction=function(e){return"function"==typeof e?e:void 0},getBuiltIn=function(e,t){return 2>arguments.length?aFunction(path[e])||aFunction(global_1[e]):path[e]&&path[e][t]||global_1[e]&&global_1[e][t]},ceil=Math.ceil,floor=Math.floor,toInteger=function(e){return isNaN(e=+e)?0:(0<e?floor:ceil)(e)},min=Math.min,toLength=function(e){return 0<e?min(toInteger(e),9007199254740991):0},max=Math.max,min$1=Math.min,toAbsoluteIndex=function(e,t){var l=toInteger(e);return 0>l?max(l+t,0):min$1(l,t)},createMethod=function(e){return function(t,l,n){var o,s=toIndexedObject(t),i=toLength(s.length),a=toAbsoluteIndex(n,i);if(e&&l!=l){for(;i>a;)if(o=s[a++],o!=o)return!0;}else for(;i>a;a++)if((e||a in s)&&s[a]===l)return e||a||0;return!e&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},indexOf=arrayIncludes.indexOf,objectKeysInternal=function(e,t){var l,n=toIndexedObject(e),o=0,s=[];for(l in n)!has(hiddenKeys,l)&&has(n,l)&&s.push(l);for(;t.length>o;)has(n,l=t[o++])&&(~indexOf(s,l)||s.push(l));return s},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys$1=enumBugKeys.concat("length","prototype"),f$3=Object.getOwnPropertyNames||function(e){return objectKeysInternal(e,hiddenKeys$1)},objectGetOwnPropertyNames={f:f$3},f$4=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$4},ownKeys=getBuiltIn("Reflect","ownKeys")||function(e){var t=objectGetOwnPropertyNames.f(anObject(e)),l=objectGetOwnPropertySymbols.f;return l?t.concat(l(e)):t},copyConstructorProperties=function(e,t){for(var l,n=ownKeys(t),o=objectDefineProperty.f,s=objectGetOwnPropertyDescriptor.f,a=0;a<n.length;a++)l=n[a],has(e,l)||o(e,l,s(t,l))},replacement=/#|\.prototype\./,isForced=function(e,t){var l=data[normalize(e)];return!(l!=POLYFILL)||l!=NATIVE&&("function"==typeof t?fails(t):!!t)},normalize=isForced.normalize=function(e){return(e+"").replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P",isForced_1=isForced,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,_export=function(e,t){var l,n,o,s,i,a,r=e.target,c=e.global,d=e.stat;if(n=c?global_1:d?global_1[r]||setGlobal(r,{}):(global_1[r]||{}).prototype,n)for(o in t){if(i=t[o],e.noTargetGet?(a=getOwnPropertyDescriptor$1(n,o),s=a&&a.value):s=n[o],l=isForced_1(c?o:r+(d?".":"#")+o,e.forced),!l&&void 0!==s){if(typeof i==typeof s)continue;copyConstructorProperties(i,s)}(e.sham||s&&s.sham)&&hide(i,"sham",!0),redefine(n,o,i,e)}},nativeSymbol=!!Object.getOwnPropertySymbols&&!fails(function(){return!(Symbol()+"")}),Symbol$1=global_1.Symbol,store$1=shared("wks"),wellKnownSymbol=function(e){return store$1[e]||(store$1[e]=nativeSymbol&&Symbol$1[e]||(nativeSymbol?Symbol$1:uid)("Symbol."+e))},objectKeys=Object.keys||function(e){return objectKeysInternal(e,enumBugKeys)},objectDefineProperties=descriptors?Object.defineProperties:function(e,t){anObject(e);for(var l,n=objectKeys(t),o=n.length,s=0;o>s;)objectDefineProperty.f(e,l=n[s++],t[l]);return e},html=getBuiltIn("document","documentElement"),IE_PROTO=sharedKey("IE_PROTO"),PROTOTYPE="prototype",Empty=function(){},createDict=function(){var e,t=documentCreateElement("iframe"),l=enumBugKeys.length,n="<",o="script",s=">";for(t.style.display="none",html.appendChild(t),t.src="java"+o+":"+"",e=t.contentWindow.document,e.open(),e.write(n+o+s+"document.F=Object"+n+"/"+o+s),e.close(),createDict=e.F;l--;)delete createDict[PROTOTYPE][enumBugKeys[l]];return createDict()},objectCreate=Object.create||function(e,t){var l;return null===e?l=createDict():(Empty[PROTOTYPE]=anObject(e),l=new Empty,Empty[PROTOTYPE]=null,l[IE_PROTO]=e),void 0===t?l:objectDefineProperties(l,t)};hiddenKeys[IE_PROTO]=!0;var UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;ArrayPrototype[UNSCOPABLES]==null&&hide(ArrayPrototype,UNSCOPABLES,objectCreate(null));var addToUnscopables=function(e){ArrayPrototype[UNSCOPABLES][e]=!0},$includes=arrayIncludes.includes;_export({target:"Array",proto:!0},{includes:function(e){return $includes(this,e,1<arguments.length?arguments[1]:void 0)}}),addToUnscopables("includes");var toObject=function(e){return Object(requireObjectCoercible(e))},nativeAssign=Object.assign,objectAssign=!nativeAssign||fails(function(){var e={},t={},l=Symbol(),n="abcdefghijklmnopqrst";return e[l]=7,n.split("").forEach(function(e){t[e]=e}),7!=nativeAssign({},e)[l]||objectKeys(nativeAssign({},t)).join("")!=n})?function(e){for(var t=toObject(e),l=arguments.length,n=1,o=objectGetOwnPropertySymbols.f,s=objectPropertyIsEnumerable.f;l>n;)for(var i,a=indexedObject(arguments[n++]),r=o?objectKeys(a).concat(o(a)):objectKeys(a),c=r.length,d=0;c>d;)i=r[d++],(!descriptors||s.call(a,i))&&(t[i]=a[i]);return t}:nativeAssign;_export({target:"Object",stat:!0,forced:Object.assign!==objectAssign},{assign:objectAssign});var MATCH=wellKnownSymbol("match"),isRegexp=function(e){var t;return isObject(e)&&((t=e[MATCH])===void 0?"RegExp"==classofRaw(e):!!t)},notARegexp=function(e){if(isRegexp(e))throw TypeError("The method doesn't accept regular expressions");return e},MATCH$1=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(l){try{return t[MATCH$1]=!1,"/./"[e](t)}catch(e){}}return!1};_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function(e){return!!~(requireObjectCoercible(this)+"").indexOf(notARegexp(e),1<arguments.length?arguments[1]:void 0)}});var VERSION="1.4.1",DEFAULTS={name:"",placeholder:"",data:void 0,locale:void 0,selectAll:!0,single:!1,singleRadio:!1,multiple:!1,hideOptgroupCheckboxes:!1,multipleWidth:80,width:void 0,dropWidth:void 0,maxHeight:250,position:"bottom",displayHtml:!1,displayValues:!1,displayTitle:!1,displayDelimiter:", ",minimumCountSelected:3,ellipsis:!1,isOpen:!1,keepOpen:!1,openOnHover:!1,container:null,filter:!1,filterGroup:!1,filterPlaceholder:"",filterAcceptOnEnter:!1,filterByDataLength:void 0,customFilter:function(e,t){return e.includes(t)},animate:void 0,styler:function(){return!1},textTemplate:function(e){return e[0].innerHTML},labelTemplate:function(e){return e[0].getAttribute("label")},onOpen:function(){return!1},onClose:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onFocus:function(){return!1},onBlur:function(){return!1},onOptgroupClick:function(){return!1},onClick:function(){return!1},onFilter:function(){return!1},onAfterCreate:function(){return!1}},EN={formatSelectAll:function(){return"[Select all]"},formatAllSelected:function(){return"All selected"},formatCountSelected:function(e,t){return e+" of "+t+" selected"},formatNoMatchesFound:function(){return"No matches found"}},METHODS=["getOptions","refreshOptions","getSelects","setSelects","enable","disable","open","close","check","uncheck","checkAll","uncheckAll","checkInvert","focus","blur","refresh","destroy"];Object.assign(DEFAULTS,EN);var Constants={VERSION:"1.4.1",DEFAULTS:DEFAULTS,METHODS:METHODS,LOCALES:{en:EN,"en-US":EN}},isArray=Array.isArray||function(e){return"Array"==classofRaw(e)},nativeGetOwnPropertyNames=objectGetOwnPropertyNames.f,toString$1={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return nativeGetOwnPropertyNames(e)}catch(e){return windowNames.slice()}},f$5=function(e){return windowNames&&"[object Window]"==toString$1.call(e)?getWindowNames(e):nativeGetOwnPropertyNames(toIndexedObject(e))},objectGetOwnPropertyNamesExternal={f:f$5},f$6=wellKnownSymbol,wrappedWellKnownSymbol={f:f$6},defineProperty=objectDefineProperty.f,defineWellKnownSymbol=function(e){var t=path.Symbol||(path.Symbol={});has(t,e)||defineProperty(t,e,{value:wrappedWellKnownSymbol.f(e)})},defineProperty$1=objectDefineProperty.f,TO_STRING_TAG=wellKnownSymbol("toStringTag"),setToStringTag=function(e,t,l){e&&!has(e=l?e:e.prototype,TO_STRING_TAG)&&defineProperty$1(e,TO_STRING_TAG,{configurable:!0,value:t})},aFunction$1=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return e},bindContext=function(e,t,l){return(aFunction$1(e),void 0===t)?e:0===l?function(){return e.call(t)}:1===l?function(l){return e.call(t,l)}:2===l?function(l,n){return e.call(t,l,n)}:3===l?function(l,n,o){return e.call(t,l,n,o)}:function(){return e.apply(t,arguments)}},SPECIES=wellKnownSymbol("species"),arraySpeciesCreate=function(e,t){var l;return isArray(e)&&(l=e.constructor,"function"==typeof l&&(l===Array||isArray(l.prototype))?l=void 0:isObject(l)&&(l=l[SPECIES],null===l&&(l=void 0))),new(void 0===l?Array:l)(0===t?0:t)},push=[].push,createMethod$1=function(e){var t=1==e,l=4==e,n=6==e;return function(o,s,i,a){for(var r,c,d=toObject(o),p=indexedObject(d),u=bindContext(s,i,3),f=toLength(p.length),h=0,g=a||arraySpeciesCreate,m=t?g(o,f):2==e?g(o,0):void 0;f>h;h++)if((5==e||n||h in p)&&(r=p[h],c=u(r,h,d),e))if(t)m[h]=c;else if(c)switch(e){case 3:return!0;case 5:return r;case 6:return h;case 2:push.call(m,r);}else if(l)return!1;return n?-1:3==e||l?l:m}},arrayIteration={forEach:createMethod$1(0),map:createMethod$1(1),filter:createMethod$1(2),some:createMethod$1(3),every:createMethod$1(4),find:createMethod$1(5),findIndex:createMethod$1(6)},$forEach=arrayIteration.forEach,HIDDEN=sharedKey("hidden"),SYMBOL="Symbol",PROTOTYPE$1="prototype",TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),setInternalState=internalState.set,getInternalState=internalState.getterFor(SYMBOL),ObjectPrototype=Object[PROTOTYPE$1],$Symbol=global_1.Symbol,JSON=global_1.JSON,nativeJSONStringify=JSON&&JSON.stringify,nativeGetOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,nativeDefineProperty$1=objectDefineProperty.f,nativeGetOwnPropertyNames$1=objectGetOwnPropertyNamesExternal.f,nativePropertyIsEnumerable$1=objectPropertyIsEnumerable.f,AllSymbols=shared("symbols"),ObjectPrototypeSymbols=shared("op-symbols"),StringToSymbolRegistry=shared("string-to-symbol-registry"),SymbolToStringRegistry=shared("symbol-to-string-registry"),WellKnownSymbolsStore=shared("wks"),QObject=global_1.QObject,USE_SETTER=!QObject||!QObject[PROTOTYPE$1]||!QObject[PROTOTYPE$1].findChild,setSymbolDescriptor=descriptors&&fails(function(){return 7!=objectCreate(nativeDefineProperty$1({},"a",{get:function(){return nativeDefineProperty$1(this,"a",{value:7}).a}})).a})?function(e,t,l){var n=nativeGetOwnPropertyDescriptor$1(ObjectPrototype,t);n&&delete ObjectPrototype[t],nativeDefineProperty$1(e,t,l),n&&e!==ObjectPrototype&&nativeDefineProperty$1(ObjectPrototype,t,n)}:nativeDefineProperty$1,wrap=function(e,t){var l=AllSymbols[e]=objectCreate($Symbol[PROTOTYPE$1]);return setInternalState(l,{type:SYMBOL,tag:e,description:t}),descriptors||(l.description=t),l},isSymbol=nativeSymbol&&"symbol"==typeof $Symbol.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof $Symbol},$defineProperty=function(e,t,l){e===ObjectPrototype&&$defineProperty(ObjectPrototypeSymbols,t,l),anObject(e);var n=toPrimitive(t,!0);return anObject(l),has(AllSymbols,n)?(l.enumerable?(has(e,HIDDEN)&&e[HIDDEN][n]&&(e[HIDDEN][n]=!1),l=objectCreate(l,{enumerable:createPropertyDescriptor(0,!1)})):(!has(e,HIDDEN)&&nativeDefineProperty$1(e,HIDDEN,createPropertyDescriptor(1,{})),e[HIDDEN][n]=!0),setSymbolDescriptor(e,n,l)):nativeDefineProperty$1(e,n,l)},$defineProperties=function(e,t){anObject(e);var l=toIndexedObject(t),n=objectKeys(l).concat($getOwnPropertySymbols(l));return $forEach(n,function(t){(!descriptors||$propertyIsEnumerable.call(l,t))&&$defineProperty(e,t,l[t])}),e},$create=function(e,t){return t===void 0?objectCreate(e):$defineProperties(objectCreate(e),t)},$propertyIsEnumerable=function(e){var t=toPrimitive(e,!0),l=nativePropertyIsEnumerable$1.call(this,t);return(this!==ObjectPrototype||!has(AllSymbols,t)||has(ObjectPrototypeSymbols,t))&&(!(l||!has(this,t)||!has(AllSymbols,t)||has(this,HIDDEN)&&this[HIDDEN][t])||l)},$getOwnPropertyDescriptor=function(e,t){var l=toIndexedObject(e),n=toPrimitive(t,!0);if(l!==ObjectPrototype||!has(AllSymbols,n)||has(ObjectPrototypeSymbols,n)){var o=nativeGetOwnPropertyDescriptor$1(l,n);return o&&has(AllSymbols,n)&&!(has(l,HIDDEN)&&l[HIDDEN][n])&&(o.enumerable=!0),o}},$getOwnPropertyNames=function(e){var t=nativeGetOwnPropertyNames$1(toIndexedObject(e)),l=[];return $forEach(t,function(e){has(AllSymbols,e)||has(hiddenKeys,e)||l.push(e)}),l},$getOwnPropertySymbols=function(e){var t=e===ObjectPrototype,l=nativeGetOwnPropertyNames$1(t?ObjectPrototypeSymbols:toIndexedObject(e)),n=[];return $forEach(l,function(e){has(AllSymbols,e)&&(!t||has(ObjectPrototype,e))&&n.push(AllSymbols[e])}),n};nativeSymbol||($Symbol=function(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?arguments[0]+"":void 0,t=uid(e),l=function(e){this===ObjectPrototype&&l.call(ObjectPrototypeSymbols,e),has(this,HIDDEN)&&has(this[HIDDEN],t)&&(this[HIDDEN][t]=!1),setSymbolDescriptor(this,t,createPropertyDescriptor(1,e))};return descriptors&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype,t,{configurable:!0,set:l}),wrap(t,e)},redefine($Symbol[PROTOTYPE$1],"toString",function(){return getInternalState(this).tag}),objectPropertyIsEnumerable.f=$propertyIsEnumerable,objectDefineProperty.f=$defineProperty,objectGetOwnPropertyDescriptor.f=$getOwnPropertyDescriptor,objectGetOwnPropertyNames.f=objectGetOwnPropertyNamesExternal.f=$getOwnPropertyNames,objectGetOwnPropertySymbols.f=$getOwnPropertySymbols,descriptors&&(nativeDefineProperty$1($Symbol[PROTOTYPE$1],"description",{configurable:!0,get:function(){return getInternalState(this).description}}),redefine(ObjectPrototype,"propertyIsEnumerable",$propertyIsEnumerable,{unsafe:!0})),wrappedWellKnownSymbol.f=function(e){return wrap(wellKnownSymbol(e),e)}),_export({global:!0,wrap:!0,forced:!nativeSymbol,sham:!nativeSymbol},{Symbol:$Symbol}),$forEach(objectKeys(WellKnownSymbolsStore),function(e){defineWellKnownSymbol(e)}),_export({target:SYMBOL,stat:!0,forced:!nativeSymbol},{for:function(e){var t=e+"";if(has(StringToSymbolRegistry,t))return StringToSymbolRegistry[t];var l=$Symbol(t);return StringToSymbolRegistry[t]=l,SymbolToStringRegistry[l]=t,l},keyFor:function(e){if(!isSymbol(e))throw TypeError(e+" is not a symbol");return has(SymbolToStringRegistry,e)?SymbolToStringRegistry[e]:void 0},useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),_export({target:"Object",stat:!0,forced:!nativeSymbol,sham:!descriptors},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),_export({target:"Object",stat:!0,forced:!nativeSymbol},{getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols}),_export({target:"Object",stat:!0,forced:fails(function(){objectGetOwnPropertySymbols.f(1)})},{getOwnPropertySymbols:function(e){return objectGetOwnPropertySymbols.f(toObject(e))}}),JSON&&_export({target:"JSON",stat:!0,forced:!nativeSymbol||fails(function(){var e=$Symbol();return"[null]"!=nativeJSONStringify([e])||"{}"!=nativeJSONStringify({a:e})||"{}"!=nativeJSONStringify(Object(e))})},{stringify:function(e){for(var t,l,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);if(l=t=n[1],(isObject(t)||void 0!==e)&&!isSymbol(e))return isArray(t)||(t=function(e,t){if("function"==typeof l&&(t=l.call(this,e,t)),!isSymbol(t))return t}),n[1]=t,nativeJSONStringify.apply(JSON,n)}}),$Symbol[PROTOTYPE$1][TO_PRIMITIVE]||hide($Symbol[PROTOTYPE$1],TO_PRIMITIVE,$Symbol[PROTOTYPE$1].valueOf),setToStringTag($Symbol,SYMBOL),hiddenKeys[HIDDEN]=!0;var defineProperty$2=objectDefineProperty.f,NativeSymbol=global_1.Symbol;if(descriptors&&"function"==typeof NativeSymbol&&(!("description"in NativeSymbol.prototype)||NativeSymbol().description!==void 0)){var EmptyStringDescriptionStore={},SymbolWrapper=function(){var e=1>arguments.length||void 0===arguments[0]?void 0:arguments[0]+"",t=this instanceof SymbolWrapper?new NativeSymbol(e):void 0===e?NativeSymbol():NativeSymbol(e);return""===e&&(EmptyStringDescriptionStore[t]=!0),t};copyConstructorProperties(SymbolWrapper,NativeSymbol);var symbolPrototype=SymbolWrapper.prototype=NativeSymbol.prototype;symbolPrototype.constructor=SymbolWrapper;var symbolToString=symbolPrototype.toString,native="Symbol(test)"==NativeSymbol("test")+"",regexp=/^Symbol\((.*)\)[^)]+$/;defineProperty$2(symbolPrototype,"description",{configurable:!0,get:function(){var e=isObject(this)?this.valueOf():this,t=symbolToString.call(e);if(has(EmptyStringDescriptionStore,e))return"";var l=native?t.slice(7,-1):t.replace(regexp,"$1");return""===l?void 0:l}}),_export({global:!0,forced:!0},{Symbol:SymbolWrapper})}defineWellKnownSymbol("iterator");var createProperty=function(e,t,l){var n=toPrimitive(t);n in e?objectDefineProperty.f(e,n,createPropertyDescriptor(0,l)):e[n]=l},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(e){return!fails(function(){var t=[],l=t.constructor={};return l[SPECIES$1]=function(){return{foo:1}},1!==t[e](Boolean).foo})},IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=!fails(function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e}),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return t===void 0?isArray(e):!!t},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED},{concat:function(){var e,t,l,o,s,a=toObject(this),r=arraySpeciesCreate(a,0),c=0;for(e=-1,l=arguments.length;e<l;e++)if(s=-1===e?a:arguments[e],isConcatSpreadable(s)){if(o=toLength(s.length),c+o>MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(t=0;t<o;t++,c++)t in s&&createProperty(r,c,s[t])}else{if(c>=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(r,c++,s)}return r.length=c,r}});var $filter=arrayIteration.filter;_export({target:"Array",proto:!0,forced:!arrayMethodHasSpeciesSupport("filter")},{filter:function(e){return $filter(this,e,1<arguments.length?arguments[1]:void 0)}});var $find=arrayIteration.find,FIND="find",SKIPS_HOLES=!0;FIND in[]&&[,][FIND](function(){SKIPS_HOLES=!1}),_export({target:"Array",proto:!0,forced:SKIPS_HOLES},{find:function(e){return $find(this,e,1<arguments.length?arguments[1]:void 0)}}),addToUnscopables(FIND);var IteratorPrototype,PrototypeOfArrayIteratorPrototype,arrayIterator,correctPrototypeGetter=!fails(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),IE_PROTO$1=sharedKey("IE_PROTO"),ObjectPrototype$1=Object.prototype,objectGetPrototypeOf=correctPrototypeGetter?Object.getPrototypeOf:function(e){return e=toObject(e),has(e,IE_PROTO$1)?e[IE_PROTO$1]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ObjectPrototype$1:null},ITERATOR=wellKnownSymbol("iterator"),BUGGY_SAFARI_ITERATORS=!1,returnThis=function(){return this};[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS=!0),IteratorPrototype==null&&(IteratorPrototype={}),has(IteratorPrototype,ITERATOR)||hide(IteratorPrototype,ITERATOR,returnThis);var iteratorsCore={IteratorPrototype:IteratorPrototype,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS},IteratorPrototype$1=iteratorsCore.IteratorPrototype,createIteratorConstructor=function(e,t,l){return e.prototype=objectCreate(IteratorPrototype$1,{next:createPropertyDescriptor(1,l)}),setToStringTag(e,t+" Iterator",!1),e},aPossiblePrototype=function(e){if(!isObject(e)&&null!==e)throw TypeError("Can't set "+(e+" as a prototype"));return e},objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,l={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(l,[]),t=l instanceof Array}catch(e){}return function(l,n){return anObject(l),aPossiblePrototype(n),t?e.call(l,n):l.__proto__=n,l}}():void 0),IteratorPrototype$2=iteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS$1=iteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis$1=function(){return this},defineIterator=function(e,t,l,n,o,s,i){createIteratorConstructor(l,t,n);var a,r,c,d=function(e){return e===o&&h?h:!BUGGY_SAFARI_ITERATORS$1&&e in u?u[e]:e===KEYS?function(){return new l(this,e)}:e===VALUES?function(){return new l(this,e)}:e===ENTRIES?function(){return new l(this,e)}:function(){return new l(this)}},p=!1,u=e.prototype,f=u[ITERATOR$1]||u["@@iterator"]||o&&u[o],h=!BUGGY_SAFARI_ITERATORS$1&&f||d(o),g="Array"==t?u.entries||f:f;if(g&&(a=objectGetPrototypeOf(g.call(new e)),IteratorPrototype$2!==Object.prototype&&a.next&&(objectGetPrototypeOf(a)!==IteratorPrototype$2&&(objectSetPrototypeOf?objectSetPrototypeOf(a,IteratorPrototype$2):"function"!=typeof a[ITERATOR$1]&&hide(a,ITERATOR$1,returnThis$1)),setToStringTag(a,t+" Iterator",!0))),o==VALUES&&f&&f.name!==VALUES&&(p=!0,h=function(){return f.call(this)}),u[ITERATOR$1]!==h&&hide(u,ITERATOR$1,h),o)if(r={values:d(VALUES),keys:s?h:d(KEYS),entries:d(ENTRIES)},i)for(c in r)(BUGGY_SAFARI_ITERATORS$1||p||!(c in u))&&redefine(u,c,r[c]);else _export({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS$1||p},r);return r},ARRAY_ITERATOR="Array Iterator",setInternalState$1=internalState.set,getInternalState$1=internalState.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState$1(this),t=e.target,l=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==l?{value:n,done:!1}:"values"==l?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values");addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var sloppyArrayMethod=function(e,t){var l=[][e];return!l||!fails(function(){l.call(null,t||function(){throw 1},1)})},nativeJoin=[].join,ES3_STRINGS=indexedObject!=Object,SLOPPY_METHOD=sloppyArrayMethod("join",",");_export({target:"Array",proto:!0,forced:ES3_STRINGS||SLOPPY_METHOD},{join:function(e){return nativeJoin.call(toIndexedObject(this),e===void 0?",":e)}});var $map=arrayIteration.map;_export({target:"Array",proto:!0,forced:!arrayMethodHasSpeciesSupport("map")},{map:function(e){return $map(this,e,1<arguments.length?arguments[1]:void 0)}});var SPECIES$2=wellKnownSymbol("species"),nativeSlice=[].slice,max$1=Math.max;_export({target:"Array",proto:!0,forced:!arrayMethodHasSpeciesSupport("slice")},{slice:function(e,t){var l,o,s,i=toIndexedObject(this),a=toLength(i.length),r=toAbsoluteIndex(e,a),c=toAbsoluteIndex(void 0===t?a:t,a);if(isArray(i)&&(l=i.constructor,"function"==typeof l&&(l===Array||isArray(l.prototype))?l=void 0:isObject(l)&&(l=l[SPECIES$2],null===l&&(l=void 0)),l===Array||void 0===l))return nativeSlice.call(i,r,c);for(o=new(void 0===l?Array:l)(max$1(c-r,0)),s=0;r<c;r++,s++)r in i&&createProperty(o,s,i[r]);return o.length=s,o}});var defineProperty$3=objectDefineProperty.f,FunctionPrototype=Function.prototype,FunctionPrototypeToString=FunctionPrototype.toString,nameRE=/^\s*function ([^ (]*)/,NAME="name";descriptors&&!(NAME in FunctionPrototype)&&defineProperty$3(FunctionPrototype,NAME,{configurable:!0,get:function(){try{return FunctionPrototypeToString.call(this).match(nameRE)[1]}catch(e){return""}}});var TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof=function(e){var t,l,n;return e===void 0?"Undefined":null===e?"Null":"string"==typeof(l=tryGet(t=Object(e),TO_STRING_TAG$1))?l:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(n=classofRaw(t))&&"function"==typeof t.callee?"Arguments":n},TO_STRING_TAG$2=wellKnownSymbol("toStringTag"),test={};test[TO_STRING_TAG$2]="z";var objectToString=function(){return"[object "+classof(this)+"]"},ObjectPrototype$2=Object.prototype;objectToString!==ObjectPrototype$2.toString&&redefine(ObjectPrototype$2,"toString",objectToString,{unsafe:!0});var createMethod$2=function(e){return function(t,l){var n,o,s=requireObjectCoercible(t)+"",i=toInteger(l),a=s.length;return 0>i||i>=a?e?"":void 0:(n=s.charCodeAt(i),55296>n||56319<n||i+1===a||56320>(o=s.charCodeAt(i+1))||57343<o?e?s.charAt(i):n:e?s.slice(i,i+2):(n-55296<<10)+(o-56320)+65536)}},stringMultibyte={codeAt:createMethod$2(!1),charAt:createMethod$2(!0)},charAt=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState$2=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",function(e){setInternalState$2(this,{type:STRING_ITERATOR,string:e+"",index:0})},function(){var e,t=getInternalState$2(this),l=t.string,n=t.index;return n>=l.length?{value:void 0,done:!0}:(e=charAt(l,n),t.index+=e.length,{value:e,done:!1})});var regexpFlags=function(){var e=anObject(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},nativeExec=RegExp.prototype.exec,nativeReplace=String.prototype.replace,patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return nativeExec.call(e,"a"),nativeExec.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),NPCG_INCLUDED=/()??/.exec("")[1]!==void 0,PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED;PATCH&&(patchedExec=function(e){var t,l,n,o,s=this;return NPCG_INCLUDED&&(l=new RegExp("^"+s.source+"$(?!\\s)",regexpFlags.call(s))),UPDATES_LAST_INDEX_WRONG&&(t=s.lastIndex),n=nativeExec.call(s,e),UPDATES_LAST_INDEX_WRONG&&n&&(s.lastIndex=s.global?n.index+n[0].length:t),NPCG_INCLUDED&&n&&1<n.length&&nativeReplace.call(n[0],l,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)}),n});var regexpExec=patchedExec,SPECIES$3=wellKnownSymbol("species"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var l="ab".split(e);return 2!==l.length||"a"!==l[0]||"b"!==l[1]}),fixRegexpWellKnownSymbolLogic=function(e,t,l,n){var o=wellKnownSymbol(e),s=!fails(function(){var t={};return t[o]=function(){return 7},7!=""[e](t)}),i=s&&!fails(function(){var t=!1,l=/a/;return l.exec=function(){return t=!0,null},"split"===e&&(l.constructor={},l.constructor[SPECIES$3]=function(){return l}),l[o](""),!t});if(!s||!i||"replace"===e&&!REPLACE_SUPPORTS_NAMED_GROUPS||"split"===e&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC){var a=/./[o],r=l(o,""[e],function(e,t,l,n,o){return t.exec===regexpExec?s&&!o?{done:!0,value:a.call(t,l,n)}:{done:!0,value:e.call(l,t,n)}:{done:!1}}),c=r[0],d=r[1];redefine(String.prototype,e,c),redefine(RegExp.prototype,o,2==t?function(e,t){return d.call(e,this,t)}:function(e){return d.call(e,this)}),n&&hide(RegExp.prototype[o],"sham",!0)}},SPECIES$4=wellKnownSymbol("species"),speciesConstructor=function(e,t){var l,n=anObject(e).constructor;return n===void 0||(l=anObject(n)[SPECIES$4])==null?t:aFunction$1(l)},charAt$1=stringMultibyte.charAt,advanceStringIndex=function(e,t,l){return t+(l?charAt$1(e,t).length:1)},regexpExecAbstract=function(e,t){var l=e.exec;if("function"==typeof l){var n=l.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==classofRaw(e))throw TypeError("RegExp#exec called on incompatible receiver");return regexpExec.call(e,t)},arrayPush=[].push,min$2=Math.min,MAX_UINT32=4294967295,SUPPORTS_Y=!fails(function(){return!RegExp(MAX_UINT32,"y")});fixRegexpWellKnownSymbolLogic("split",2,function(e,t,l){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(e,l){var n=requireObjectCoercible(this)+"",o=void 0===l?MAX_UINT32:l>>>0;if(0===o)return[];if(void 0===e)return[n];if(!isRegexp(e))return t.call(n,e,o);for(var s,i,a,r=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,p=new RegExp(e.source,c+"g");(s=regexpExec.call(p,n))&&(i=p.lastIndex,!(i>d&&(r.push(n.slice(d,s.index)),1<s.length&&s.index<n.length&&arrayPush.apply(r,s.slice(1)),a=s[0].length,d=i,r.length>=o)));)p.lastIndex===s.index&&p.lastIndex++;return d===n.length?(a||!p.test(""))&&r.push(""):r.push(n.slice(d)),r.length>o?r.slice(0,o):r}:function(e,l){return void 0===e&&0===l?[]:t.call(this,e,l)},[function(t,l){var o=requireObjectCoercible(this),s=null==t?void 0:t[e];return void 0===s?n.call(o+"",t,l):s.call(t,o,l)},function(o,s){var a=l(n,o,this,s,n!==t);if(a.done)return a.value;var r=anObject(o),c=this+"",d=speciesConstructor(r,RegExp),u=r.unicode,f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(SUPPORTS_Y?"y":"g"),h=new d(SUPPORTS_Y?r:"^(?:"+r.source+")",f),g=void 0===s?MAX_UINT32:s>>>0;if(0===g)return[];if(0===c.length)return null===regexpExecAbstract(h,c)?[c]:[];for(var m=0,b=0,y=[];b<c.length;){h.lastIndex=SUPPORTS_Y?b:0;var k,S=regexpExecAbstract(h,SUPPORTS_Y?c:c.slice(b));if(null===S||(k=min$2(toLength(h.lastIndex+(SUPPORTS_Y?0:b)),c.length))===m)b=advanceStringIndex(c,b,u);else{if(y.push(c.slice(m,b)),y.length===g)return y;for(var O=1;O<=S.length-1;O++)if(y.push(S[O]),y.length===g)return y;b=m=k}}return y.push(c.slice(m)),y}]},!SUPPORTS_Y);var whitespaces="\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF",whitespace="[\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod$3=function(e){return function(t){var l=requireObjectCoercible(t)+"";return 1&e&&(l=l.replace(ltrim,"")),2&e&&(l=l.replace(rtrim,"")),l}},stringTrim={start:createMethod$3(1),end:createMethod$3(2),trim:createMethod$3(3)},non="\u200B\x85\u180E",forcedStringTrimMethod=function(e){return fails(function(){return!!whitespaces[e]()||non[e]()!=non||whitespaces[e].name!==e})},$trim=stringTrim.trim;_export({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function(){return $trim(this)}});var domIterables={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},$forEach$1=arrayIteration.forEach,arrayForEach=sloppyArrayMethod("forEach")?function(e){return $forEach$1(this,e,1<arguments.length?arguments[1]:void 0)}:[].forEach;for(var COLLECTION_NAME in domIterables){var Collection=global_1[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype&&CollectionPrototype.forEach!==arrayForEach)try{hide(CollectionPrototype,"forEach",arrayForEach)}catch(e){CollectionPrototype.forEach=arrayForEach}}var ITERATOR$2=wellKnownSymbol("iterator"),TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values;for(var COLLECTION_NAME$1 in domIterables){var Collection$1=global_1[COLLECTION_NAME$1],CollectionPrototype$1=Collection$1&&Collection$1.prototype;if(CollectionPrototype$1){if(CollectionPrototype$1[ITERATOR$2]!==ArrayValues)try{hide(CollectionPrototype$1,ITERATOR$2,ArrayValues)}catch(e){CollectionPrototype$1[ITERATOR$2]=ArrayValues}if(CollectionPrototype$1[TO_STRING_TAG$3]||hide(CollectionPrototype$1,TO_STRING_TAG$3,COLLECTION_NAME$1),domIterables[COLLECTION_NAME$1])for(var METHOD_NAME in es_array_iterator)if(CollectionPrototype$1[METHOD_NAME]!==es_array_iterator[METHOD_NAME])try{hide(CollectionPrototype$1,METHOD_NAME,es_array_iterator[METHOD_NAME])}catch(e){CollectionPrototype$1[METHOD_NAME]=es_array_iterator[METHOD_NAME]}}}var FAILS_ON_PRIMITIVES=fails(function(){objectKeys(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES},{keys:function(e){return objectKeys(toObject(e))}});var max$2=Math.max,min$3=Math.min,floor$1=Math.floor,SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d\d?|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d\d?)/g,maybeToString=function(e){return e===void 0?e:e+""};fixRegexpWellKnownSymbolLogic("replace",2,function(e,t,l){function n(e,l,o,s,i,a){var r=o+e.length,c=s.length,n=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==i&&(i=toObject(i),n=SUBSTITUTION_SYMBOLS),t.call(a,n,function(t,a){var d;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return l.slice(0,o);case"'":return l.slice(r);case"<":d=i[a.slice(1,-1)];break;default:var p=+a;if(0==p)return t;if(p>c){var n=floor$1(p/10);return 0===n?t:n<=c?void 0===s[n-1]?a.charAt(1):s[n-1]+a.charAt(1):t}d=s[p-1];}return void 0===d?"":d})}return[function(l,n){var o=requireObjectCoercible(this),s=l==null?void 0:l[e];return s===void 0?t.call(o+"",l,n):s.call(l,o,n)},function(e,o){var s=l(t,e,this,o);if(s.done)return s.value;var a=anObject(e),r=this+"",c="function"==typeof o;c||(o=o+"");var d=a.global;if(d){var p=a.unicode;a.lastIndex=0}for(var u,f=[];(u=regexpExecAbstract(a,r),null!==u)&&!(f.push(u),!d);){var h=u[0]+"";""==h&&(a.lastIndex=advanceStringIndex(r,toLength(a.lastIndex),p))}for(var g="",m=0,b=0;b<f.length;b++){u=f[b];for(var y=u[0]+"",k=max$2(min$3(toInteger(u.index),r.length),0),S=[],O=1;O<u.length;O++)S.push(maybeToString(u[O]));var A=u.groups;if(c){var v=[y].concat(S,k,r);A!==void 0&&v.push(A);var E=o.apply(void 0,v)+""}else E=n(y,r,k,S,A,o);k>=m&&(g+=r.slice(m,k)+E,m=k+y.length)}return g+r.slice(m)}]});var s="s",sprintf=function(e){for(var t=arguments.length,l=Array(1<t?t-1:0),n=1;n<t;n++)l[n-1]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];var s="";return e.slice(0,-1).some(function(e,t){switch(l[t]){default:throw new TypeError("Unrecognized sprintf format");case"s":{var o=n[t];if(null===o||o===void 0)return!0;return s+=e+o,!1}}})?"":s+e.slice(-1)}},compareObjects=function(e,t,l){var n=Object.keys(e),o=Object.keys(t);if(l&&n.length!==o.length)return!1;for(var s,i=0,a=n;i<a.length;i++)if(s=a[i],o.includes(s)&&e[s]!==t[s])return!1;return!0},removeDiacritics=function(e){if(e.normalize)return e.normalize("NFD").replace(/[\u0300-\u036F]/g,"");var t=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}];return t.reduce(function(e,t){var l=t.letters,n=t.base;return e.replace(l,n)},e)};function _templateObject26(){var e=_taggedTemplateLiteral(["[data-group=\"","\"]"]);return _templateObject26=function(){return e},e}function _templateObject25(){var e=_taggedTemplateLiteral(["[value=\"","\"]"]);return _templateObject25=function(){return e},e}function _templateObject24(){var e=_taggedTemplateLiteral(["[value=\"","\"]"]);return _templateObject24=function(){return e},e}function _templateObject23(){var e=_taggedTemplateLiteral(["[value=\"","\"]"]);return _templateObject23=function(){return e},e}function _templateObject22(){var e=_taggedTemplateLiteral(["[value=\"","\"]"]);return _templateObject22=function(){return e},e}function _templateObject21(){var e=_taggedTemplateLiteral(["[","][data-group=\"","\"]"]);return _templateObject21=function(){return e},e}function _templateObject20(){var e=_taggedTemplateLiteral(["input[","]:checked"]);return _templateObject20=function(){return e},e}function _templateObject19(){var e=_taggedTemplateLiteral(["[data-group=\"","\"]"]);return _templateObject19=function(){return e},e}function _templateObject18(){var e=_taggedTemplateLiteral(["[data-group=\"","\"]"]);return _templateObject18=function(){return e},e}function _templateObject17(){var e=_taggedTemplateLiteral(["<span>","</span>"]);return _templateObject17=function(){return e},e}function _templateObject16(){var e=_taggedTemplateLiteral([" data-group=\"","\""]);return _templateObject16=function(){return e},e}function _templateObject15(){var e=_taggedTemplateLiteral(["<input type=\"","\" value=\"","\" ","","","",">"]);return _templateObject15=function(){return e},e}function _templateObject14(){var e=_taggedTemplateLiteral(["<label class=\"","\">"]);return _templateObject14=function(){return e},e}function _templateObject13(){var e=_taggedTemplateLiteral(["<li class=\""," ","\" "," ",">"]);return _templateObject13=function(){return e},e}function _templateObject12(){var e=_taggedTemplateLiteral(["style=\"","\""]);return _templateObject12=function(){return e},e}function _templateObject11(){var e=_taggedTemplateLiteral(["<input type=\"checkbox\" "," ",">"]);return _templateObject11=function(){return e},e}function _templateObject10(){var e=_taggedTemplateLiteral(["<label class=\"optgroup ","\" data-group=\"","\">"]);return _templateObject10=function(){return e},e}function _templateObject9(){var e=_taggedTemplateLiteral(["style=\"","\""]);return _templateObject9=function(){return e},e}function _templateObject8(){var e=_taggedTemplateLiteral(["title=\"","\""]);return _templateObject8=function(){return e},e}function _templateObject7(){var e=_taggedTemplateLiteral(["<li class=\"ms-no-results\">","</li>"]);return _templateObject7=function(){return e},e}function _templateObject6(){var e=_taggedTemplateLiteral(["<input type=\"checkbox\" "," />"]);return _templateObject6=function(){return e},e}function _templateObject5(){var e=_taggedTemplateLiteral(["placeholder=\"","\""]);return _templateObject5=function(){return e},e}function _templateObject4(){var e=_taggedTemplateLiteral(["<div class=\"ms-drop ","\"></div>"]);return _templateObject4=function(){return e},e}function _templateObject3(){var e=_taggedTemplateLiteral(["\n <button type=\"button\" class=\"ms-choice\">\n <span class=\"placeholder\">","</span>\n <div></div>\n </button>\n "]);return _templateObject3=function(){return e},e}function _templateObject2(){var e=_taggedTemplateLiteral(["title=\"","\""]);return _templateObject2=function(){return e},e}function _templateObject(){var e=_taggedTemplateLiteral(["<div class=\"ms-parent ","\" ","/>"]);return _templateObject=function(){return e},e}var MultipleSelect=function(){function e(t,l){_classCallCheck(this,e),this.$el=t,this.options=$.extend({},Constants.DEFAULTS,l)}return _createClass(e,[{key:"init",value:function(){this.initLocale(),this.initContainer(),this.initData(),this.initFilter(),this.initDrop(),this.initView()}},{key:"initLocale",value:function(){if(this.options.locale){var e=$.fn.multipleSelect.locales,t=this.options.locale.split(/-|_/);t[0]=t[0].toLowerCase(),t[1]&&(t[1]=t[1].toUpperCase()),e[this.options.locale]?$.extend(this.options,e[this.options.locale]):e[t.join("-")]?$.extend(this.options,e[t.join("-")]):e[t[0]]&&$.extend(this.options,e[t[0]])}}},{key:"initContainer",value:function(){var t=this,l=this.$el[0],e=l.getAttribute("name")||this.options.name||"";this.$el=this.$el.hide(),this.$label=this.$el.closest("label"),!this.$label.length&&this.$el.attr("id")&&(this.$label=$("label[for=\"".concat(this.$el.attr("id"),"\"]"))),this.$label.find(">input").length&&(this.$label=null),this.$parent=$(sprintf(_templateObject(),s,s)(l.getAttribute("class")||"",sprintf(_templateObject2(),s)(l.getAttribute("title")))),this.options.placeholder=this.options.placeholder||l.getAttribute("placeholder")||"",this.$choice=$(sprintf(_templateObject3(),s)(this.options.placeholder)),this.$drop=$(sprintf(_templateObject4(),s)(this.options.position)),this.options.dropWidth&&this.$drop.css("width",this.options.dropWidth),this.$el.after(this.$parent),this.$parent.append(this.$choice),this.$parent.append(this.$drop),l.disabled&&this.$choice.addClass("disabled"),this.selectAllName="data-name=\"selectAll".concat(e,"\""),this.selectGroupName="data-name=\"selectGroup".concat(e,"\""),this.selectItemName="data-name=\"selectItem".concat(e,"\""),this.options.keepOpen||$(document).click(function(n){$(n.target)[0]===t.$choice[0]||$(n.target).parents(".ms-choice")[0]===t.$choice[0]||($(n.target)[0]===t.$drop[0]||$(n.target).parents(".ms-drop")[0]!==t.$drop[0]&&n.target!==l)&&t.options.isOpen&&t.close()}),this.options.onAfterCreate()}},{key:"initData",value:function(){var e=this,t=[];return this.options.data?(this.options.data.forEach(function(e,t){"optgroup"===e.type&&(e.group=e.group||"group_".concat(t),e.children.forEach(function(t){t.group=t.group||e.group}))}),void(this.data=this.options.data)):void($.each(this.$el.children(),function(l,n){var o=e.initRow(l,n);o&&t.push(e.initRow(l,n))}),this.options.data=t,this.data=t,this.fromHtml=!0)}},{key:"initRow",value:function(e,t,l,n){var o=this,s={},i=$(t);return i.is("option")?(s.type="option",s.group=l,s.text=this.options.textTemplate(i),s.value=t.value,s.selected=t.selected,s.disabled=n||t.disabled,s.classes=t.getAttribute("class")||"",s.title=t.getAttribute("title"),s):i.is("optgroup")?(s.type="optgroup",s.group="group_".concat(e),s.label=this.options.labelTemplate(i),s.disabled=t.disabled,s.children=[],$.each(i.children(),function(e,t){s.children.push(o.initRow(e,t,s.group,s.disabled))}),s):null}},{key:"initFilter",value:function(){if(!this.options.filter&&this.options.filterByDataLength){var e=0,t=!0,l=!1,n=void 0;try{for(var o,s,i=this.data[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)s=o.value,e+="optgroup"===s.type?s.children.length:1}catch(e){l=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(l)throw n}}this.options.filter=e>this.options.filterByDataLength}}},{key:"initDrop",value:function(){var e=this;this.initList(),this.events(),this.update(!0),this.updateOptGroupSelect(!0),this.updateSelectAll(!1,!0),this.options.isOpen&&this.open(),this.options.openOnHover&&this.$parent.hover(function(){e.open()},function(){e.close()})}},{key:"initList",value:function(){var e=this,t=[];this.options.filter&&t.push("\n <div class=\"ms-search\">\n <input type=\"text\" autocomplete=\"off\" autocorrect=\"off\"\n autocapitalize=\"off\" spellcheck=\"false\"\n ".concat(sprintf(_templateObject5(),s)(this.options.filterPlaceholder),">\n </div>\n ")),t.push("<ul>"),this.options.selectAll&&!this.options.single&&t.push(["<li class=\"ms-select-all\">","<label>",sprintf(_templateObject6(),s)(this.selectAllName),"<span>".concat(this.options.formatSelectAll(),"</span>"),"</label>","</li>"].join("")),t.push(this.data.map(function(t){return e.initListItem(t)}).join("")),t.push(sprintf(_templateObject7(),s)(this.options.formatNoMatchesFound())),t.push("</ul>"),this.$drop.html(t.join("")),this.$drop.find("ul").css("max-height","".concat(this.options.maxHeight,"px")),this.$drop.find(".multiple").css("width","".concat(this.options.multipleWidth,"px")),this.$searchInput=this.$drop.find(".ms-search input"),this.$selectAll=this.$drop.find("input[".concat(this.selectAllName,"]")),this.$selectGroups=this.$drop.find("input[".concat(this.selectGroupName,"]")),this.$selectItems=this.$drop.find("input[".concat(this.selectItemName,"]:enabled")),this.$disableItems=this.$drop.find("input[".concat(this.selectItemName,"]:disabled")),this.$noResults=this.$drop.find(".ms-no-results")}},{key:"initListItem",value:function(e){var t=this,l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=sprintf(_templateObject8(),s)(e.title),o=this.options.multiple?"multiple":"",i=this.options.single?"radio":"checkbox",a="";if(this.options.single&&!this.options.singleRadio&&(a="hide-radio "),"optgroup"===e.type){var r=this.options.styler(e),c=r?sprintf(_templateObject9(),s)(r):"",d=[];return d.push(["<li class=\"group ".concat(a,"\" ").concat(c,">"),sprintf(_templateObject10(),s,s)(e.disabled?"disabled":"",e.group),this.options.hideOptgroupCheckboxes||this.options.single?"":sprintf(_templateObject11(),s,s)(this.selectGroupName,e.disabled?"disabled=\"disabled\"":""),e.label,"</label>","</li>"].join("")),d.push(e.children.map(function(e){return t.initListItem(e,1)}).join("")),d.join("")}var p=this.options.styler(e),u=p?sprintf(_templateObject12(),s)(p):"";return a+=e.classes||"",l&&this.options.single&&(a+="option-level-".concat(l," ")),[sprintf(_templateObject13(),s,s,s,s)(o,a,n,u),sprintf(_templateObject14(),s)(e.disabled?"disabled":""),sprintf(_templateObject15(),s,s,s,s,s,s)(i,e.value,this.selectItemName,e.selected?" checked=\"checked\"":"",e.disabled?" disabled=\"disabled\"":"",sprintf(_templateObject16(),s)(e.group)),sprintf(_templateObject17(),s)(e.text),"</label>","</li>"].join("")}},{key:"initView",value:function(){var e;window.getComputedStyle?(e=window.getComputedStyle(this.$el[0]).width,"auto"===e&&(e=this.$drop.outerWidth()+20)):e=this.$el.outerWidth()+20,this.$parent.css("width",this.options.width||e)}},{key:"events",value:function(){var t=this,l=function(l){l.preventDefault(),t[t.options.isOpen?"close":"open"]()};this.$label&&this.$label.length&&this.$label.off("click").on("click",function(n){"label"!==n.target.nodeName.toLowerCase()||(l(n),(!t.options.filter||!t.options.isOpen)&&t.focus(),n.stopPropagation())}),this.$choice.off("click").on("click",l).off("focus").on("focus",this.options.onFocus).off("blur").on("blur",this.options.onBlur),this.$parent.off("keydown").on("keydown",function(l){27!==l.which||t.options.keepOpen||(t.close(),t.$choice.focus())}),this.$searchInput.off("keydown").on("keydown",function(l){9===l.keyCode&&l.shiftKey&&t.close()}).off("keyup").on("keyup",function(l){if(t.options.filterAcceptOnEnter&&[13,32].includes(l.which)&&t.$searchInput.val()){if(t.options.single){var e=t.$selectItems.closest("li").filter(":visible");e.length&&t.setSelects([e.first().find("input[".concat(t.selectItemName,"]")).val()])}else t.$selectAll.click();return t.close(),void t.focus()}t.filter()}),this.$selectAll.off("click").on("click",function(l){var e=$(l.currentTarget).prop("checked"),n=t.$selectItems.filter(":visible");n.length===t.$selectItems.length?t[e?"checkAll":"uncheckAll"]():(t.$selectGroups.prop("checked",e),n.prop("checked",e),t.options[e?"onCheckAll":"onUncheckAll"](),t.update())}),this.$selectGroups.off("click").on("click",function(l){var e=$(l.currentTarget),n=e.parent()[0].getAttribute("data-group"),o=t.$selectItems.filter(":visible"),i=o.filter(sprintf(_templateObject18(),s)(n)),a=i.length!==i.filter(":checked").length;i.prop("checked",a),t.updateSelectAll(!0),t.update(),t.options.onOptgroupClick({label:e.parent().text(),checked:a,children:i.get().map(function(e){return{label:$(e).parent().text(),value:$(e).val(),check:$(e).prop("checked")}})})}),this.$selectItems.off("click").on("click",function(l){var e=$(l.currentTarget);if(t.options.single){var n=e.val();t.$selectItems.filter(function(e,t){return $(t).val()!==n}).each(function(e,t){$(t).prop("checked",!1)})}t.updateSelectAll(!0),t.update(),t.updateOptGroupSelect(),t.options.onClick({label:e.parent().text(),value:e.val(),checked:e.prop("checked")}),t.options.single&&t.options.isOpen&&!t.options.keepOpen&&t.close()})}},{key:"open",value:function(){if(!this.$choice.hasClass("disabled")){if(this.options.isOpen=!0,this.$choice.find(">div").addClass("open"),this.$drop[this.animateMethod("show")](),this.$selectAll.parent().show(),this.$noResults.hide(),this.data.length||(this.$selectAll.parent().hide(),this.$noResults.show()),this.options.container){var e=this.$drop.offset();this.$drop.appendTo($(this.options.container)),this.$drop.offset({top:e.top,left:e.left}).css("min-width","auto").outerWidth(this.$parent.outerWidth())}this.data.length&&this.options.filter&&(this.$searchInput.val(""),this.$searchInput.focus(),this.filter()),this.options.onOpen()}}},{key:"close",value:function(){this.options.isOpen=!1,this.$choice.find(">div").removeClass("open"),this.$drop[this.animateMethod("hide")](),this.options.container&&(this.$parent.append(this.$drop),this.$drop.css({top:"auto",left:"auto"})),this.options.onClose()}},{key:"animateMethod",value:function(e){return{show:{fade:"fadeIn",slide:"slideDown"},hide:{fade:"fadeOut",slide:"slideUp"}}[e][this.options.animate]||e}},{key:"update",value:function(e){var t=this.getSelects("text");this.options.displayHtml?t=this.getSelects("html"):this.options.displayValues&&(t=this.getSelects());var l=this.$choice.find(">span"),n=t.length,o="";0===n?l.addClass("placeholder").html(this.options.placeholder):n<this.options.minimumCountSelected?o=t.join(this.options.displayDelimiter):this.options.formatAllSelected()&&n===this.$selectItems.length+this.$disableItems.length?o=this.options.formatAllSelected():this.options.ellipsis&&n>this.options.minimumCountSelected?o="".concat(t.slice(0,this.options.minimumCountSelected).join(this.options.displayDelimiter),"..."):this.options.formatCountSelected()&&n>this.options.minimumCountSelected?o=this.options.formatCountSelected(n,this.$selectItems.length+this.$disableItems.length):o=t.join(this.options.displayDelimiter),o&&l.removeClass("placeholder").html(o),this.options.displayTitle&&l.prop("title",this.getSelects("text")),this.$el.val(this.getSelects()),this.$drop.find("li").removeClass("selected"),this.$drop.find("input:checked").each(function(e,t){$(t).parents("li").first().addClass("selected")}),e||this.$el.trigger("change")}},{key:"updateSelectAll",value:function(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],l=this.$selectItems;t||(l=l.filter(":visible"));var n=l.filter(":checked").length;this.$selectAll.prop("checked",n===l.length),e&&(n===l.length?this.options.onCheckAll():0===n&&this.options.onUncheckAll())}},{key:"updateOptGroupSelect",value:function(){var e=!!(0<arguments.length&&void 0!==arguments[0])&&arguments[0],t=this.$selectItems;e||(t=t.filter(":visible")),$.each(this.$selectGroups,function(e,l){var n=$(l).parent()[0].getAttribute("data-group"),o=t.filter(sprintf(_templateObject19(),s)(n));$(l).prop("checked",o.length&&o.length===o.filter(":checked").length)})}},{key:"getOptions",value:function(){var e=$.extend({},this.options);return delete e.data,$.extend(!0,{},e)}},{key:"refreshOptions",value:function(e){compareObjects(this.options,e,!0)||(this.options=$.extend(this.options,e),this.destroy(),this.init())}},{key:"getSelects",value:function(e){var t=this,l=[],n=[];return this.$drop.find(sprintf(_templateObject20(),s)(this.selectItemName)).each(function(t,o){l.push($(o).next()["html"===e?"html":"text"]()),n.push($(o).val())}),"text"===e&&this.$selectGroups.length&&(l=[],this.$selectGroups.each(function(e,n){var o=[],i=$.trim($(n).parent().text()),a=$(n).parent().data("group"),r=t.$drop.find(sprintf(_templateObject21(),s,s)(t.selectItemName,a)),c=r.filter(":checked");if(c.length){if(o.push("["),o.push(i),r.length>c.length){var d=[];c.each(function(e,t){d.push($(t).parent().text())}),o.push(": ".concat(d.join(", ")))}o.push("]"),l.push(o.join(""))}})),["html","text"].includes(e)?l:n}},{key:"setSelects",value:function(e){var t=this;this.$selectItems.prop("checked",!1),this.$disableItems.prop("checked",!1),$.each(e,function(e,l){t.$selectItems.filter(sprintf(_templateObject22(),s)(l)).prop("checked",!0),t.$disableItems.filter(sprintf(_templateObject23(),s)(l)).prop("checked",!0)}),this.$selectAll.prop("checked",this.$selectItems.length===this.$selectItems.filter(":checked").length+this.$disableItems.filter(":checked").length),$.each(this.$selectGroups,function(e,l){var n=$(l).parent()[0].getAttribute("data-group"),o=t.$selectItems.filter("[data-group=\"".concat(n,"\"]"));$(l).prop("checked",o.length&&o.length===o.filter(":checked").length)}),this.update(!1)}},{key:"enable",value:function(){this.$choice.removeClass("disabled")}},{key:"disable",value:function(){this.$choice.addClass("disabled")}},{key:"check",value:function(e){this.options.single&&(this.$selectItems.prop("checked",!1),this.$disableItems.prop("checked",!1)),this._check(e,!0)}},{key:"uncheck",value:function(e){this._check(e,!1)}},{key:"_check",value:function(e,t){this.$selectItems.filter(sprintf(_templateObject24(),s)(e)).prop("checked",t),this.$disableItems.filter(sprintf(_templateObject25(),s)(e)).prop("checked",t),this.update(),this.updateOptGroupSelect(!0),this.updateSelectAll(!0,!0)}},{key:"checkAll",value:function(){this._checkAll(!0),this.options.onCheckAll()}},{key:"uncheckAll",value:function(){this._checkAll(!1),this.options.onUncheckAll()}},{key:"_checkAll",value:function(e){this.$selectItems.prop("checked",e),this.$selectGroups.prop("checked",e),this.$selectAll.prop("checked",e),this.update()}},{key:"checkInvert",value:function(){this.options.single||(this.$selectItems.each(function(e,t){$(t).prop("checked",!$(t).prop("checked"))}),this.update(),this.updateOptGroupSelect(!0),this.updateSelectAll(!0,!0))}},{key:"focus",value:function(){this.$choice.focus(),this.options.onFocus()}},{key:"blur",value:function(){this.$choice.blur(),this.options.onBlur()}},{key:"refresh",value:function(){this.destroy(),this.init()}},{key:"filter",value:function(){var e=this,t=$.trim(this.$searchInput.val()),l=t.toLowerCase();0===l.length?(this.$selectAll.closest("li").show(),this.$selectItems.closest("li").show(),this.$disableItems.closest("li").show(),this.$selectGroups.closest("li").show(),this.$noResults.hide()):(!this.options.filterGroup&&this.$selectItems.each(function(n,o){var s=$(o).parent(),i=e.options.customFilter(removeDiacritics(s.text().toLowerCase()),removeDiacritics(l),s.text(),t);s.closest("li")[i?"show":"hide"]()}),this.$disableItems.closest("li").hide(),this.$selectGroups.each(function(n,o){var i=$(o).parent(),a=i[0].getAttribute("data-group");if(e.options.filterGroup){var r=e.options.customFilter(removeDiacritics(i.text().toLowerCase()),removeDiacritics(l),i.text(),t),c=r?"show":"hide";i.closest("li")[c](),e.$selectItems.filter("[data-group=\"".concat(a,"\"]")).closest("li")[c]()}else{var d=e.$selectItems.filter(":visible"),p=d.filter(sprintf(_templateObject26(),s)(a)).length;i.closest("li")[p?"show":"hide"]()}}),this.$selectItems.closest("li").filter(":visible").length?(this.$selectAll.closest("li").show(),this.$noResults.hide()):(this.$selectAll.closest("li").hide(),this.$noResults.show())),this.updateOptGroupSelect(),this.updateSelectAll(),this.options.onFilter(l)}},{key:"destroy",value:function(){this.$parent&&(this.$el.before(this.$parent).show(),this.$parent.remove(),this.fromHtml&&(delete this.options.data,this.fromHtml=!1))}}]),e}();$.fn.multipleSelect=function(e){for(var t=arguments.length,l=Array(1<t?t-1:0),n=1;n<t;n++)l[n-1]=arguments[n];var o;return this.each(function(t,n){var s=$(n),i=s.data("multipleSelect"),a=$.extend({},s.data(),"object"===_typeof(e)&&e);if(i||(i=new MultipleSelect(s,a),s.data("multipleSelect",i)),"string"==typeof e){var r;if(0>$.inArray(e,Constants.METHODS))throw new Error("Unknown method: ".concat(e));o=(r=i)[e].apply(r,l),"destroy"==e&&s.removeData("multipleSelect")}else i.init()}),"undefined"==typeof o?this:o},$.fn.multipleSelect.defaults=Constants.DEFAULTS,$.fn.multipleSelect.locales=Constants.LOCALES,$.fn.multipleSelect.methods=Constants.METHODS;