wishthis/node_modules/fomantic-ui/dist/components/dropdown.min.js

11 lines
No EOL
60 KiB
JavaScript

/*
* # Fomantic UI - 2.9.3
* https://github.com/fomantic/Fomantic-UI
* https://fomantic-ui.com/
*
* Copyright 2023 Contributors
* Released under the MIT license
* https://opensource.org/licenses/MIT
*
*/
!function(ee,te,ne){"use strict";function ie(e){return"function"==typeof e&&"number"!=typeof e.nodeType}te=void 0!==te&&te.Math===Math?te:globalThis,ee.fn.dropdown=function(B){var W,Q=ee(this),Y=ee(ne),$=Date.now(),_=[],X=B,G="string"==typeof X,J=[].slice.call(arguments,1),Z=function(e,t){var n;return 0<=[te,ne].indexOf(e)?n=ee(e):0===(n=ee(t.document).find(e)).length&&(n=t.frameElement?Z(e,t.parent):te),n};return Q.each(function(z){var v,P,t,n,i,e,a,o,s,m=ee.isPlainObject(B)?ee.extend(!0,{},ee.fn.dropdown.settings,B):ee.extend({},ee.fn.dropdown.settings),h=m.className,f=m.message,l=m.fields,g=m.keys,p=m.metadata,F=m.namespace,r=m.regExp,b=m.selector,c=m.error,N=m.templates,d="."+F,u="module-"+F,w=ee(this),y=Z(m.context,te),C=w.find(b.text),x=w.find(b.search),S=w.find(b.sizer),A=w.find(b.input),H=w.find(b.icon),j=w.find(b.clearIcon),T=0<w.prev().find(b.text).length?w.prev().find(b.text):w.prev(),k=w.children(b.menu),L=k.find(b.item),I=m.hideDividers?L.parent().children(b.divider):ee(),D=!1,U=!1,K=!1,O=!1,q=this,E=!1,R=w.data(u),V=!1,M={initialize:function(){M.debug("Initializing dropdown",m),M.is.alreadySetup()?M.setup.reference():(m.ignoreDiacritics&&!String.prototype.normalize&&(m.ignoreDiacritics=!1,M.error(c.noNormalize,q)),M.create.id(),M.setup.layout(),m.values&&(M.set.initialLoad(),M.change.values(m.values),M.remove.initialLoad()),M.refreshData(),M.save.defaults(),M.restore.selected(),M.bind.events(),M.observeChanges(),M.instantiate())},instantiate:function(){M.verbose("Storing instance of dropdown",M),R=M,w.data(u,M)},destroy:function(){M.verbose("Destroying previous dropdown",w),M.remove.tabbable(),M.remove.active(),k.transition("stop all"),k.removeClass(h.visible).addClass(h.hidden),w.off(d).removeData(u),k.off(d),Y.off(i),M.disconnect.menuObserver(),M.disconnect.selectObserver(),M.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in te&&(a=new MutationObserver(M.event.select.mutation),o=new MutationObserver(M.event.menu.mutation),s=new MutationObserver(M.event.class.mutation),M.debug("Setting up mutation observer",a,o,s),M.observe.select(),M.observe.menu(),M.observe.class())},disconnect:{menuObserver:function(){o&&o.disconnect()},selectObserver:function(){a&&a.disconnect()},classObserver:function(){s&&s.disconnect()}},observe:{select:function(){M.has.input()&&a&&a.observe(w[0],{attributes:!0,childList:!0,subtree:!0})},menu:function(){M.has.menu()&&o&&o.observe(k[0],{childList:!0,subtree:!0})},class:function(){M.has.search()&&s&&s.observe(w[0],{attributes:!0})}},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),i="."+e,M.verbose("Creating unique id for element",e)},userChoice:function(e){var n,i;return!!(e=e||M.get.userValues())&&(e=Array.isArray(e)?e:[e],ee.each(e,function(e,t){!1===M.get.item(t)&&(i=m.templates.addition(M.add.variables(f.addResult,t)),i=ee("<div />").html(i).attr("data-"+p.value,t).attr("data-"+p.text,t).addClass(h.addition).addClass(h.item),m.hideAdditions&&i.addClass(h.hidden),n=void 0===n?i:n.add(i),M.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=M.get.userValues();t&&(M.debug("Adding user labels",t),ee.each(t,function(e,t){M.verbose("Adding custom user value"),M.add.label(t,t)}))},menu:function(){k=ee("<div />").addClass(h.menu).appendTo(w)},sizer:function(){S=ee("<span />").addClass(h.sizer).insertAfter(x)}},search:function(e){e=void 0!==e?e:M.get.query(),M.verbose("Searching for query",e),!1===m.fireOnInit&&M.is.initialLoad()?M.verbose("Skipping callback on initial load",m.onSearch):M.has.minCharacters(e)&&!1!==m.onSearch.call(q,e)?M.filter(e):M.hide(null,!0)},select:{firstUnfiltered:function(){M.verbose("Selecting first non-filtered element"),M.remove.selectedItem(),L.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(h.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(b.item).not(b.unselectable).eq(0),e=e.prevAll(b.item).not(b.unselectable).eq(0);0<t.length?(M.verbose("Moving selection to",t),t.addClass(h.selected)):(M.verbose("Moving selection to",e),e.addClass(h.selected))}},setup:{api:function(){var e={debug:m.debug,urlData:{value:M.get.value(),query:M.get.query()},on:!1};M.verbose("First request, initializing API"),w.api(e)},layout:function(){var e;w.is("select")&&(M.setup.select(),M.setup.returnedObject()),M.has.menu()||M.create.menu(),M.is.clearable()&&!M.has.clearItem()&&(M.verbose("Adding clear icon"),j=ee("<i />").addClass("remove icon").insertAfter(H)),M.is.search()&&!M.has.search()&&(M.verbose("Adding search input"),e=w.prev("label"),x=ee("<input />").addClass(h.search).prop("autocomplete",M.is.chrome()?"fomantic-search":"off"),0<e.length&&(e.attr("id")||e.attr("id","_"+M.get.id()+"_formLabel"),x.attr("aria-labelledby",e.attr("id"))),x.insertBefore(C)),M.is.multiple()&&M.is.searchSelection()&&!M.has.sizer()&&M.create.sizer(),m.allowTab&&M.set.tabbable()},select:function(){var e=M.get.selectValues();M.debug("Dropdown initialized on a select",e),0<(A=w.is("select")?w:A).parent(b.dropdown).length?(M.debug("UI dropdown already exists. Creating dropdown menu only"),w=A.closest(b.dropdown),M.has.menu()||M.create.menu(),k=w.children(b.menu),M.setup.menu(e)):(M.debug("Creating entire dropdown from select"),w=ee("<div />").attr("class",A.attr("class")).addClass(h.selection).addClass(h.dropdown).html(N.dropdown(e,l,m.preserveHTML,m.className)).insertBefore(A),A.hasClass(h.multiple)&&!1===A.prop("multiple")&&(M.error(c.missingMultiple),A.prop("multiple",!0)),A.is("[multiple]")&&M.set.multiple(),A.prop("disabled")&&(M.debug("Disabling dropdown"),w.addClass(h.disabled)),A.is("[required]")&&(m.forceSelection=!0),m.allowTab||A.removeAttr("tabindex"),A.prop("required",!1).removeAttr("class").detach().prependTo(w)),M.refresh()},menu:function(e){k.html(N.menu(e,l,m.preserveHTML,m.className)),L=k.find(b.item),I=m.hideDividers?L.parent().children(b.divider):ee()},reference:function(){M.debug("Dropdown behavior was called on select, replacing with closest dropdown"),w=w.parent(b.dropdown),R=w.data(u),q=w[0],M.refresh(),M.setup.returnedObject()},returnedObject:function(){var e=Q.slice(0,z),t=Q.slice(z+1);Q=e.add(w).add(t)}},refresh:function(){M.refreshSelectors(),M.refreshData()},refreshItems:function(){L=k.find(b.item),I=m.hideDividers?L.parent().children(b.divider):ee()},refreshSelectors:function(){M.verbose("Refreshing selector cache"),C=w.find(b.text),x=w.find(b.search),A=w.find(b.input),H=w.find(b.icon),T=0<w.prev().find(b.text).length?w.prev().find(b.text):w.prev(),k=w.children(b.menu),L=k.find(b.item),I=m.hideDividers?L.parent().children(b.divider):ee()},refreshData:function(){M.verbose("Refreshing cached metadata"),L.removeData(p.text).removeData(p.value)},clearData:function(){M.verbose("Clearing metadata"),L.removeData(p.text).removeData(p.value),w.removeData(p.defaultText).removeData(p.defaultValue).removeData(p.placeholderText)},clearItems:function(){k.empty(),M.refreshItems()},toggle:function(){M.verbose("Toggling menu visibility"),M.is.active()?M.hide():M.show()},show:function(e,t){if(e=ie(e)?e:function(){},(E||O)&&M.is.remote()&&M.is.noApiCache()&&!M.has.maxSelections()&&M.clearItems(),!M.can.show()&&M.is.remote()&&(M.debug("No API results retrieved, searching before show"),M.queryRemote(M.get.query(),M.show,[e,t])),M.can.show()&&!M.is.active()){if(M.debug("Showing dropdown"),!M.has.message()||M.has.maxSelections()||M.has.allResultsFiltered()||M.remove.message(),M.is.allFiltered())return!0;!1!==m.onShow.call(q)&&(M.remove.empty(),M.animate.show(function(){M.bind.intent(),M.has.search()&&!t&&M.focusSearch(),M.set.visible(),e.call(q)}))}},hide:function(e,t){var n;e=ie(e)?e:function(){},M.is.active()&&!M.is.animatingOutward()?(M.debug("Hiding dropdown"),!1!==m.onHide.call(q)&&(M.animate.hide(function(){M.remove.visible(),M.is.focusedOnSearch()&&!0!==t&&x.trigger("blur"),e.call(q)}),0<(n=w.find(b.menu)).length&&(M.verbose("Hiding sub-menu",n),n.each(function(){var e=ee(this);M.is.animating(e)||M.animate.hide(!1,e)})))):M.unbind.intent(),E=O=!1},hideOthers:function(){M.verbose("Finding other dropdowns to hide"),Q.not(w).has(b.menu+"."+h.visible).dropdown("hide")},hideMenu:function(){M.verbose("Hiding menu instantaneously"),M.remove.active(),M.remove.visible(),k.transition("destroy").transition("hide")},hideSubMenus:function(){var e=k.children(b.item).find(b.menu);M.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){M.bind.keyboardEvents(),M.bind.inputEvents(),M.bind.mouseEvents()},keyboardEvents:function(){M.verbose("Binding keyboard events"),w.on("keydown"+d,M.event.keydown),M.has.search()&&w.on(M.get.inputEvent()+d,b.search,M.event.input),M.is.multiple()&&Y.on("keydown"+i,M.event.document.keydown)},inputEvents:function(){M.verbose("Binding input change events"),w.on("change"+d,b.input,M.event.change),M.is.multiple()&&M.is.searchSelection()&&w.on("paste"+d,b.search,M.event.paste)},mouseEvents:function(){M.verbose("Binding mouse events"),M.is.multiple()&&w.on("click"+d,b.label,M.event.label.click).on("click"+d,b.remove,M.event.remove.click),M.is.searchSelection()?(w.on("mousedown"+d,M.event.mousedown).on("mouseup"+d,M.event.mouseup).on("mousedown"+d,b.menu,M.event.menu.mousedown).on("mouseup"+d,b.menu,M.event.menu.mouseup).on("click"+d,b.icon,M.event.icon.click).on("click"+d,b.clearIcon,M.event.clearIcon.click).on("focus"+d,b.search,M.event.search.focus).on("click"+d,b.search,M.event.search.focus).on("blur"+d,b.search,M.event.search.blur).on("click"+d,b.text,M.event.text.focus),M.is.multiple()&&w.on("click"+d,M.event.click).on("click"+d,M.event.search.focus)):("click"===m.on?w.on("click"+d,b.icon,M.event.icon.click).on("click"+d,M.event.test.toggle):"hover"===m.on?w.on("mouseenter"+d,M.delay.show).on("mouseleave"+d,M.delay.hide).on("touchstart"+d,M.event.test.toggle).on("touchstart"+d,b.icon,M.event.icon.click):w.on(m.on+d,M.toggle),w.on("mousedown"+d,M.event.mousedown).on("mouseup"+d,M.event.mouseup).on("focus"+d,M.event.focus).on("click"+d,b.clearIcon,M.event.clearIcon.click),M.has.menuSearch()?w.on("blur"+d,b.search,M.event.search.blur):w.on("blur"+d,M.event.blur)),k.on("mouseenter"+d,b.item,M.event.item.mouseenter).on("touchstart"+d,b.item,M.event.item.mouseenter).on("mouseleave"+d,b.item,M.event.item.mouseleave).on("click"+d,b.item,M.event.item.click)},intent:function(){M.verbose("Binding hide intent event to document"),Y.on("click"+i,M.event.test.hide)}},unbind:{intent:function(){M.verbose("Removing hide intent event from document"),Y.off("click"+i)}},filter:function(e){function t(){M.is.multiple()&&M.filterActive(),(e||!e&&0===M.get.activeItem().length)&&M.select.firstUnfiltered(),M.has.allResultsFiltered()?m.onNoResults.call(q,n)?m.allowAdditions?m.hideAdditions&&(M.verbose("User addition with no menu, setting empty style"),M.set.empty(),M.hideMenu()):(M.verbose("All items filtered, showing message",n),M.add.message(f.noResults)):(M.verbose("All items filtered, hiding dropdown",n),M.set.empty(),M.hideMenu()):(M.remove.empty(),M.remove.message()),m.allowAdditions&&M.add.userSuggestion(M.escape.htmlEntities(e)),M.is.searchSelection()&&M.can.show()&&M.is.focusedOnSearch()&&!M.is.empty()&&M.show()}var n=void 0!==e?e:M.get.query();m.useLabels&&M.has.maxSelections()?M.show():m.apiSettings?M.can.useAPI()?M.queryRemote(n,function(){m.filterRemoteData&&M.filterItems(n);var e=A.val();Array.isArray(e)||(e=e&&""!==e?e.split(m.delimiter):[]),M.is.multiple()&&ee.each(e,function(e,t){L.filter('[data-value="'+t+'"]').addClass(h.filtered)}),M.focusSearch(!0),t()}):M.error(c.noAPI):(M.filterItems(n),t())},queryRemote:function(e,o,s){Array.isArray(s)||(s=[s]);var e={errorDuration:!1,cache:"local",throttle:m.throttle,urlData:{query:e}},t={onError:function(e,t,n){M.add.message(f.serverError),E=O=!1,o.apply(null,s),"function"==typeof m.apiSettings.onError&&m.apiSettings.onError.call(this,e,t,n)},onFailure:function(e,t,n){M.add.message(f.serverError),E=O=!1,o.apply(null,s),"function"==typeof m.apiSettings.onFailure&&m.apiSettings.onFailure.call(this,e,t,n)},onSuccess:function(e,t,n){var i=e[l.remoteValues],a=(Array.isArray(i)||(i=[]),M.remove.message(),{});a[l.values]=i,M.setup.menu(a),0!==i.length||m.allowAdditions?""!==(a=M.is.multiple()?M.get.values():M.get.value())&&(M.verbose("Value(s) present after click icon, select value(s) in items"),M.set.selected(a,null,!0,!0)):M.add.message(f.noResults),E=O=!1,o.apply(null,s),"function"==typeof m.apiSettings.onSuccess&&m.apiSettings.onSuccess.call(this,e,t,n)}};w.api("get request")||M.setup.api(),e=ee.extend(!0,{},e,m.apiSettings,t,V?{cache:!1}:{}),w.api("setting",e).api("query"),V=!1},filterItems:function(e){var n=M.remove.diacritics(void 0!==e?e:M.get.query()),i=null,e=M.escape.string(n),t=(m.ignoreSearchCase?"i":"")+"gm",a=new RegExp("^"+e,t);M.has.query()&&(i=[],M.verbose("Searching for matching values",n),L.each(function(){var e,t=ee(this);return!t.hasClass(h.unfilterable)&&("both"!==m.match&&"text"!==m.match||!(-1!==(e=M.remove.diacritics(String(M.get.choiceText(t,!1)))).search(a)||"exact"===m.fullTextSearch&&M.exactSearch(n,e)||!0===m.fullTextSearch&&M.fuzzySearch(n,e)))&&("both"!==m.match&&"value"!==m.match||!(-1!==(t=M.remove.diacritics(String(M.get.choiceValue(t,e)))).search(a)||"exact"===m.fullTextSearch&&M.exactSearch(n,t)||!0===m.fullTextSearch&&M.fuzzySearch(n,t)))?void 0:(i.push(this),!0)})),M.debug("Showing only matched items",n),M.remove.filteredItem(),i&&L.not(i).addClass(h.filtered),M.has.query()?!0===m.hideDividers?I.addClass(h.hidden):"empty"===m.hideDividers&&I.removeClass(h.hidden).filter(function(){var e=ee(this).nextUntil(b.item);return 0===(0<e.length?e:ee(this)).nextUntil(b.divider).filter(b.item+":not(."+h.filtered+")").length}).addClass(h.hidden):I.removeClass(h.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=m.ignoreSearchCase?e.toLowerCase():e,t=m.ignoreSearchCase?t.toLowerCase():t,n<i)return!1;if(i===n)return e===t;for(var a=0,o=0;a<i;a++){for(var s=!1,r=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===r){s=!0;break}if(!s)return!1}return!0},exactSearch:function(e,t){return e=m.ignoreSearchCase?e.toLowerCase():e,-1<(t=m.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){m.useLabels&&L.filter("."+h.active).addClass(h.filtered)},focusSearch:function(e){M.has.search()&&!M.is.focusedOnSearch()&&(e?(w.off("focus"+d,b.search),x.trigger("focus"),w.on("focus"+d,b.search,M.event.search.focus)):x.trigger("focus"))},blurSearch:function(){M.has.search()&&x.trigger("blur")},forceSelection:function(){var e=L.not(h.filtered).filter("."+h.selected).eq(0),t=L.not(h.filtered).filter("."+h.active).eq(0),e=0<e.length?e:t,t=0<e.length;m.allowAdditions||t&&!M.is.multiple()?(M.debug("Forcing partial selection to selected item",e),M.event.item.click.call(e,{},!0)):M.remove.searchTerm()},change:{values:function(e){m.allowAdditions||M.clear(),M.debug("Creating dropdown with specified values",e);var t={};t[l.values]=e,M.setup.menu(t),ee.each(e,function(e,t){if(!0===t.selected&&(M.debug("Setting initial selection to",t[l.value]),M.set.selected(t[l.value]),!M.is.multiple()))return!1}),M.has.selectInput()&&(M.disconnect.selectObserver(),A.html(""),A.append("<option disabled selected value></option>"),ee.each(e,function(e,t){var n=m.templates.deQuote(t[l.value]),i=m.templates.escape(t[l.name]||"",m.preserveHTML);A.append('<option value="'+n+'"'+(!0===t.selected?" selected":"")+">"+i+"</option>")}),M.observe.select())}},event:{paste:function(e){var t,n,i,a,o,s=(e.originalEvent.clipboardData||te.clipboardData).getData("text").split(m.delimiter),r=[];s.forEach(function(e){!1===M.set.selected(M.escape.htmlEntities(e.trim()),null,!1,!0)&&r.push(e.trim())}),e.preventDefault(),0<r.length&&(t=(s=x[0]).selectionStart,n=s.selectionEnd,i=s.value,o=t+(a=r.join(m.delimiter)).length,x.val(i.slice(0,t)+a+i.slice(n)),s.selectionStart=o,s.selectionEnd=o,M.event.input(e))},change:function(){K||(M.debug("Input changed, updating selection"),M.set.selected())},focus:function(){m.showOnFocus&&!D&&M.is.hidden()&&!t&&(E=!0,M.show())},blur:function(e){t=ne.activeElement===this,D||t||(M.remove.activeLabel(),M.hide())},mousedown:function(){M.is.searchSelection(!0)?n=!0:D=!0},mouseup:function(){M.is.searchSelection(!0)?n=!1:D=!1},click:function(e){ee(e.target).is(w)&&(M.is.focusedOnSearch()?M.show():M.focusSearch())},search:{focus:function(e){D=!0,M.is.multiple()&&M.remove.activeLabel(),E||M.is.active()||!(m.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||"touchstart"===e.type||(E=!0,M.search())},blur:function(e){t=ne.activeElement===this,!M.is.searchSelection(!0)||n||U||t||(m.forceSelection?M.forceSelection():m.allowAdditions||M.remove.searchTerm(),M.hide()),n=!1}},clearIcon:{click:function(e){M.clear(),M.is.searchSelection()&&M.remove.searchTerm(),M.hide(),e.stopPropagation()}},icon:{click:function(e){O=!0,M.has.search()?M.is.active()?M.blurSearch():m.showOnFocus?M.focusSearch():M.toggle():M.toggle(),e.stopPropagation()}},text:{focus:function(e){D=!0,M.focusSearch()}},input:function(e){(M.is.multiple()||M.is.searchSelection())&&M.set.filtered(),clearTimeout(M.timer),M.timer=setTimeout(function(){M.search()},m.delay.search)},label:{click:function(e){var t=ee(this),n=w.find(b.label),i=n.filter("."+h.active),a=t.nextAll("."+h.active),o=t.prevAll("."+h.active),a=(0<a.length?t.nextUntil(a):t.prevUntil(o)).add(i).add(t);e.shiftKey?(i.removeClass(h.active),a.addClass(h.active)):e.ctrlKey?t.toggleClass(h.active):(i.removeClass(h.active),t.addClass(h.active)),m.onLabelSelect.apply(this,n.filter("."+h.active)),e.stopPropagation()}},remove:{click:function(e){var t=ee(this).parent();t.hasClass(h.active)?M.remove.activeLabels():M.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=M.is.multiple()?M.show:M.toggle;M.is.bubbledLabelClick(e)||M.is.bubbledIconClick(e)||(M.is.multiple()&&(!M.is.multiple()||M.is.active())||(E=!0),M.determine.eventOnElement(e,t)&&"touchstart"!==e.type&&e.preventDefault())},hide:function(e){M.determine.eventInModule(e,M.hide)&&q.id&&ee(e.target).attr("for")===q.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&M.check.disabled()})}},select:{mutation:function(e){M.is.selectMutation(e)&&(M.debug("<select> modified, recreating menu"),M.disconnect.selectObserver(),M.refresh(),M.setup.select(),M.set.selected(),M.observe.select())}},menu:{mutation:function(e){var e=e[0],t=e.addedNodes?ee(e.addedNodes[0]):ee(!1),e=e.removedNodes?ee(e.removedNodes[0]):ee(!1),t=t.add(e),e=t.is(b.addition)||0<t.closest(b.addition).length,t=t.is(b.message)||0<t.closest(b.message).length;e||t?(M.debug("Updating item selector cache"),M.refreshItems()):(M.debug("Menu modified, updating selector cache"),M.refresh())},mousedown:function(){U=!0},mouseup:function(){U=!1}},item:{mouseenter:function(e){var t=ee(e.target),n=ee(this),i=n.children(b.menu),a=n.siblings(b.item).children(b.menu),n=0<i.length;0<i.find(t).length||!n||(clearTimeout(M.itemTimer),M.itemTimer=setTimeout(function(){M.verbose("Showing sub-menu",i),ee.each(a,function(){M.animate.hide(!1,ee(this))}),M.animate.show(!1,i)},m.delay.show),e.preventDefault())},mouseleave:function(e){var t=ee(this).find(b.menu);0<t.length&&(clearTimeout(M.itemTimer),M.itemTimer=setTimeout(function(){M.verbose("Hiding sub-menu",t),t.each(function(){M.animate.hide(!1,ee(this))})},m.delay.hide))},click:function(e,t){var n=ee(this),e=ee(e&&e.target||""),i=n.find(b.menu),a=M.get.choiceText(n),o=M.get.choiceValue(n,a),s=0<i.length,i=0<i.find(e).length;"input"!==ne.activeElement.tagName.toLowerCase()&&ee(ne.activeElement).trigger("blur"),i||s&&!m.allowCategorySelection||(M.is.searchSelection()&&(m.allowAdditions&&M.remove.userAddition(),m.keepSearchTerm||(M.remove.filteredItem(),M.remove.searchTerm()),!M.is.visible()&&0<e.length&&M.show(),M.is.focusedOnSearch()||!0===t||M.focusSearch(!0)),m.useLabels||(M.remove.filteredItem(),M.set.scrollPosition(n)),M.determine.selectAction.call(this,a,o))}},document:{keydown:function(e){var t=e.which;if(M.is.inObject(t,g)){var n=w.find(b.label),i=n.filter("."+h.active),a=(i.data(p.value),n.index(i)),o=n.length,s=0<i.length,r=1<i.length,l=0===a,c=a+1===o,d=M.is.searchSelection(),u=M.is.focusedOnSearch(),v=M.is.focused(),m=u&&0===M.get.caretPosition(!1),f=m&&0!==M.get.caretPosition(!0);if(!d||s||u)switch(t){case g.leftArrow:!v&&!m||s?s&&(e.shiftKey?M.verbose("Adding previous label to selection"):(M.verbose("Selecting previous label"),n.removeClass(h.active)),l&&!r?i.addClass(h.active):i.prev(b.siblingLabel).addClass(h.active).end(),e.preventDefault()):(M.verbose("Selecting previous label"),n.last().addClass(h.active));break;case g.rightArrow:v&&!s&&n.first().addClass(h.active),s&&(e.shiftKey?M.verbose("Adding next label to selection"):(M.verbose("Selecting next label"),n.removeClass(h.active)),c?d?u?n.removeClass(h.active):M.focusSearch():(r?i.next(b.siblingLabel):i).addClass(h.active):i.next(b.siblingLabel).addClass(h.active),e.preventDefault());break;case g.deleteKey:case g.backspace:s?(M.verbose("Removing active labels"),c&&d&&!u&&M.focusSearch(),i.last().next(b.siblingLabel).addClass(h.active),M.remove.activeLabels(i),M.is.visible()||M.show(),e.preventDefault()):!m||f||s||t!==g.backspace||(M.verbose("Removing last label on input backspace"),i=n.last().addClass(h.active),M.remove.activeLabels(i),M.is.visible()||M.show());break;default:i.removeClass(h.active)}}}},keydown:function(e){var t=e.which;if(M.is.inObject(t,g)||e.key===m.delimiter){var n,i=L.not(b.unselectable).filter("."+h.selected).eq(0),a=k.children("."+h.active).eq(0),i=0<i.length?i:a,a=0<i.length?i.siblings(":not(."+h.filtered+")").addBack():k.children(":not(."+h.filtered+")"),o=i.children(b.menu),s=i.closest(b.menu),r=s.hasClass(h.visible)||s.hasClass(h.animating)||0<s.parent(b.menu).length,l=0<o.length,c=0<i.length,d=0<i.not(b.unselectable).length,u=e.key===m.delimiter&&M.is.multiple();if(m.allowAdditions&&(t===g.enter||u)&&(d&&m.hideAdditions&&(M.verbose("Selecting item from keyboard shortcut",i),M.event.item.click.call(i,e)),M.is.searchSelection()&&M.remove.searchTerm(),M.is.multiple()&&e.preventDefault()),M.is.visible()){if(t!==g.enter&&!u||(t===g.enter&&c&&l&&!m.allowCategorySelection?(M.verbose("Pressed enter on unselectable category, opening sub menu"),t=g.rightArrow):d&&(M.verbose("Selecting item from keyboard shortcut",i),M.event.item.click.call(i,e),M.is.searchSelection()&&(m.keepSearchTerm||M.remove.searchTerm(),M.is.multiple()&&x.trigger("focus"))),e.preventDefault()),c&&(t===g.leftArrow&&s[0]!==k[0]&&(M.verbose("Left key pressed, closing sub-menu"),M.animate.hide(!1,s),i.removeClass(h.selected),s.closest(b.item).addClass(h.selected),e.preventDefault()),t===g.rightArrow&&l&&(M.verbose("Right key pressed, opening sub-menu"),M.animate.show(!1,o),i.removeClass(h.selected),o.find(b.item).eq(0).addClass(h.selected),e.preventDefault())),t===g.upArrow){if(n=(c&&r?i.prevAll(b.item+":not("+b.unselectable+")"):L).eq(0),a.index(n)<0)return M.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();M.verbose("Up key pressed, changing active item"),i.removeClass(h.selected),n.addClass(h.selected),M.set.scrollPosition(n),m.selectOnKeydown&&M.is.single()&&!n.hasClass(h.actionable)&&M.set.selectedItem(n),e.preventDefault()}if(t===g.downArrow){if(0===(n=(c&&r?i.nextAll(b.item+":not("+b.unselectable+")"):L).eq(0)).length)return M.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();M.verbose("Down key pressed, changing active item"),L.removeClass(h.selected),n.addClass(h.selected),M.set.scrollPosition(n),m.selectOnKeydown&&M.is.single()&&!n.hasClass(h.actionable)&&M.set.selectedItem(n),e.preventDefault()}t===g.pageUp&&(M.scrollPage("up"),e.preventDefault()),t===g.pageDown&&(M.scrollPage("down"),e.preventDefault()),t===g.escape&&(M.verbose("Escape key pressed, closing dropdown"),M.hide(),e.stopPropagation())}else t!==g.enter&&!u||e.preventDefault(),t!==g.downArrow||M.is.visible()||(M.verbose("Down key pressed, showing dropdown"),M.show(),e.preventDefault())}else M.has.search()||M.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e,t=A[0];t&&(e=ne.createEvent("HTMLEvents"),M.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){v=!0,M.verbose("Determining action",m.action),ie(M.action[m.action])?(M.verbose("Triggering preset action",m.action,e,t),M.action[m.action].call(q,e,t,this)):ie(m.action)?(M.verbose("Triggering user action",m.action,e,t),m.action.call(q,e,t,this)):M.error(c.action,m.action),v=!1},eventInModule:function(e,t){var e=ee(e.target),n=0<e.closest(ne.documentElement).length,e=0<e.closest(w).length;return t=ie(t)?t:function(){},n&&!e?(M.verbose("Triggering event",t),t(),!0):(M.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=ee(e.target),i=n.closest(b.siblingLabel),e=ne.body.contains(e.target),i=0===w.find(i).length||!(M.is.multiple()&&m.useLabels),n=0===n.closest(k).length;return t=ie(t)?t:function(){},e&&i&&n?(M.verbose("Triggering event",t),t(),!0):(M.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=void 0!==t?t:e,M.can.activate(ee(n))&&(M.set.selected(t,ee(n),!1,m.keepSearchTerm),M.is.multiple()||!m.collapseOnActionable&&ee(n).hasClass(h.actionable)||M.hideAndClear())},select:function(e,t,n){t=void 0!==t?t:e,M.can.activate(ee(n))&&(M.set.value(t,e,ee(n)),M.is.multiple()||!m.collapseOnActionable&&ee(n).hasClass(h.actionable)||M.hideAndClear())},combo:function(e,t,n){M.set.selected(t=void 0!==t?t:e,ee(n)),M.hideAndClear()},hide:function(e,t,n){M.set.value(t,e,ee(n)),M.hideAndClear()}},get:{id:function(){return e},defaultText:function(){return w.data(p.defaultText)},defaultValue:function(){return w.data(p.defaultValue)},placeholderText:function(){return"auto"!==m.placeholder&&"string"==typeof m.placeholder?m.placeholder:w.data(p.placeholderText)||""},text:function(){return m.preserveHTML?C.html():C.text()},query:function(){return String(x.val()).trim()},searchWidth:function(e){return e=void 0!==e?e:x.val(),S.text(e),Math.ceil(S.width()+(M.is.edge()?3:1))},selectionCount:function(){var e=M.get.values();return M.is.multiple()?Array.isArray(e)?e.length:0:""!==M.get.value()?1:0},transition:function(e){return"auto"===m.transition?M.is.upward(e)?"slide up":"slide down":m.transition},userValues:function(){var e=M.get.values(!0);return!!e&&(e=Array.isArray(e)?e:[e],ee.grep(e,function(e){return!1===M.get.item(e)}))},uniqueArray:function(n){return ee.grep(n,function(e,t){return ee.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=x[0];return e&&"selectionEnd"in i?i.selectionEnd:!e&&"selectionStart"in i?i.selectionStart:ne.selection?(i.focus(),n=(t=ne.selection.createRange()).text.length,e?n:(t.moveStart("character",-i.value.length),t.text.length-n)):void 0},value:function(){var e=0<A.length?A.val():w.data(p.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return void 0===e||t?"":e},values:function(e){var t=M.get.value();return""===t?"":!M.has.selectInput()&&M.is.multiple()?"string"==typeof t?(e?t:M.escape.htmlEntities(t)).split(m.delimiter):"":t},remoteValues:function(){var e=M.get.values(),i=!1;return e&&ee.each(e="string"==typeof e?[e]:e,function(e,t){var n=M.read.remoteData(t);M.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)}),i},choiceText:function(e,t){if(t=void 0!==t?t:m.preserveHTML,e)return 0<e.find(b.menu).length&&(M.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(b.menu).remove(),e.find(b.menuIcon).remove()),void 0!==e.data(p.text)?e.data(p.text):t?e.html()&&e.html().trim():e.text()&&e.text().trim()},choiceValue:function(e,t){return t=t||M.get.choiceText(e),!!e&&(void 0!==e.data(p.value)?String(e.data(p.value)):"string"==typeof t?String(m.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=x[0];return!!e&&(void 0!==e.oninput?"input":void 0!==e.onpropertychange?"propertychange":"keyup")},selectValues:function(){var o={},s=[],r=[];return w.find("option").each(function(){var e=ee(this),t=e.html(),n=e.attr("disabled"),i=void 0!==e.attr("value")?e.attr("value"):t,a=void 0!==e.data(p.text)?e.data(p.text):t,e=e.parent("optgroup");"auto"===m.placeholder&&""===i?o.placeholder=t:(e.length===s.length&&e[0]===s[0]||(r.push({type:"header",divider:m.headerDivider,name:e.attr("label")||""}),s=e),r.push({name:t,value:i,text:M.escape.htmlEntities(a,!0),disabled:n}))}),m.placeholder&&"auto"!==m.placeholder&&(M.debug("Setting placeholder value to",m.placeholder),o.placeholder=m.placeholder),m.sortSelect?(!0===m.sortSelect?r.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===m.sortSelect?r.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):ie(m.sortSelect)&&r.sort(m.sortSelect),o[l.values]=r,M.debug("Retrieved and sorted values from select",o)):(o[l.values]=r,M.debug("Retrieved values from select",o)),o},activeItem:function(){return L.filter("."+h.active)},selectedItem:function(){var e=L.not(b.unselectable).filter("."+h.selected);return 0<e.length?e:L.eq(0)},itemWithAdditions:function(e){var t=M.get.item(e),e=M.create.userChoice(e);return t=e&&0<e.length?0<t.length?t.add(e):e:t},item:function(n,i){var e,a,o=!1;return n=void 0!==n?n:void 0!==M.get.values()?M.get.values():M.get.text(),e=(a=M.is.multiple()&&Array.isArray(n))?0<n.length:null!=n,i=""===n||!1===n||!0===n||(i||!1),e&&L.each(function(){var e=ee(this),t=M.get.choiceText(e),t=M.get.choiceValue(e,t);if(null!=t)if(a)-1!==ee.inArray(M.escape.htmlEntities(String(t)),n.map(String).map(M.escape.htmlEntities))&&(o=o?o.add(e):e);else if(i){if(M.verbose("Ambiguous dropdown value using strict type check",e,n),t===n)return o=e,!0}else if(m.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),M.escape.htmlEntities(String(t))===M.escape.htmlEntities(String(n)))return M.verbose("Found select item by value",t,n),o=e,!0}),o},displayType:function(){return w.hasClass("column")?"flex":m.displayType}},check:{maxSelections:function(e){return!!m.maxSelections&&((e=void 0!==e?e:M.get.selectionCount())>=m.maxSelections?(M.debug("Maximum selection count reached"),m.useLabels&&(L.addClass(h.filtered),M.add.message(f.maxSelections)),!0):(M.verbose("No longer at maximum selection count"),M.remove.message(),M.remove.filteredItem(),M.is.searchSelection()&&M.filterItems(),!1))},disabled:function(){x.attr("tabindex",M.is.disabled()?-1:0)}},restore:{defaults:function(e){M.clear(e),M.restore.defaultText(),M.restore.defaultValue()},defaultText:function(){var e=M.get.defaultText();e===M.get.placeholderText?(M.debug("Restoring default placeholder text",e),M.set.placeholderText(e)):(M.debug("Restoring default text",e),M.set.text(e))},placeholderText:function(){M.set.placeholderText()},defaultValue:function(){var e=M.get.defaultValue();void 0!==e&&(M.debug("Restoring default value",e),""!==e?(M.set.value(e),M.set.selected()):(M.remove.activeItem(),M.remove.selectedItem()))},labels:function(){m.allowAdditions&&(m.useLabels||(M.error(c.labels),m.useLabels=!0),M.debug("Restoring selected values"),M.create.userLabels()),M.check.maxSelections()},selected:function(){M.restore.values(),M.is.multiple()?(M.debug("Restoring previously selected values and labels"),M.restore.labels()):M.debug("Restoring previously selected values")},values:function(){M.set.initialLoad(),m.apiSettings&&m.saveRemoteData&&M.get.remoteValues()?M.restore.remoteValues():M.set.selected();var e=M.get.value();!e||""===e||Array.isArray(e)&&0===e.length?A.addClass(h.noselection):A.removeClass(h.noselection),M.remove.initialLoad()},remoteValues:function(){var e=M.get.remoteValues();M.debug("Recreating selected from session data",e),e&&(M.is.single()?ee.each(e,function(e,t){M.set.text(t)}):m.useLabels&&ee.each(e,function(e,t){M.add.label(e,t)}))}},read:{remoteData:function(e){if(void 0!==te.Storage)return void 0!==(e=sessionStorage.getItem(e+i))&&e;M.error(c.noStorage)}},save:{defaults:function(){M.save.defaultText(),M.save.placeholderText(),M.save.defaultValue()},defaultValue:function(){var e=M.get.value();M.verbose("Saving default value as",e),w.data(p.defaultValue,e)},defaultText:function(){var e=M.get.text();M.verbose("Saving default text as",e),w.data(p.defaultText,e)},placeholderText:function(){var e;!1!==m.placeholder&&C.hasClass(h.placeholder)&&(e=M.get.text(),M.verbose("Saving placeholder text as",e),w.data(p.placeholderText,e))},remoteData:function(e,t){void 0===te.Storage?M.error(c.noStorage):(M.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t+i,e))}},clear:function(e){M.is.multiple()&&m.useLabels?M.remove.labels(w.find(b.label),e):(M.remove.activeItem(),M.remove.selectedItem(),M.remove.filteredItem()),M.set.placeholderText(),M.clearValue(e)},clearValue:function(e){M.set.value("",null,null,e)},clearCache:function(){M.debug("Clearing API cache once"),V=!0},scrollPage:function(e,t){var t=t||M.get.selectedItem(),n=t.closest(b.menu),i=n.outerHeight(),a=n.scrollTop(),o=L.eq(0).outerHeight(),i=Math.floor(i/o),a="up"===e?a-o*i:a+o*i,o=L.not(b.unselectable),i="up"===e?o.index(t)-i:o.index(t)+i,i=("up"===e?0<=i:i<o.length)?o.eq(i):"up"===e?o.first():o.last();0<i.length&&(M.debug("Scrolling page",e,i),t.removeClass(h.selected),i.addClass(h.selected),m.selectOnKeydown&&M.is.single()&&!i.hasClass(h.actionable)&&M.set.selectedItem(i),n.scrollTop(a))},set:{filtered:function(){var e=M.is.multiple(),t=M.is.searchSelection(),n=e&&t,t=t?M.get.query():"",i="string"==typeof t&&0<t.length,a=M.get.searchWidth(),t=""!==t;e&&i&&(M.verbose("Adjusting input width",a),x.css("width",a+"px")),i||n&&t?(M.verbose("Hiding placeholder text"),C.addClass(h.filtered)):e&&(!n||t)||(M.verbose("Showing placeholder text"),C.removeClass(h.filtered))},empty:function(){w.addClass(h.empty)},loading:function(){w.addClass(h.loading)},placeholderText:function(e){e=e||M.get.placeholderText(),M.debug("Setting placeholder text",e),M.set.text(e),C.addClass(h.placeholder)},tabbable:function(){M.is.searchSelection()?(M.debug("Added tabindex to searchable dropdown"),x.val(""),M.check.disabled(),k.attr("tabindex",-1)):(M.debug("Added tabindex to dropdown"),void 0===w.attr("tabindex")&&(w.attr("tabindex",A.attr("tabindex")||0),k.attr("tabindex",-1))),A.removeAttr("tabindex")},initialLoad:function(){M.verbose("Setting initial load"),P=!0},activeItem:function(e){m.allowAdditions&&0<e.filter(b.addition).length?e.addClass(h.filtered):e.addClass(h.active)},partialSearch:function(e){var t=M.get.query().length;x.val(e.slice(0,t))},scrollPosition:function(e,t){var n,i,a=(e=e||M.get.selectedItem()).closest(b.menu),o=e&&0<e.length;t=void 0!==t&&t,0===M.get.activeItem().length&&(t=!1),e&&0<a.length&&o&&(e.position().top,a.addClass(h.loading),e=(o=a.scrollTop())-a.offset().top+e.offset().top,t||(i=o+a.height()<e+5,n=e-5<o),M.debug("Scrolling to active item",e),(t||n||i)&&a.scrollTop(e),a.removeClass(h.loading))},text:function(e,t){"combo"===m.action?(M.debug("Changing combo button text",e,T),m.preserveHTML?T.html(e):T.text(e)):"activate"===m.action&&(e===M.get.placeholderText()&&!t||C.removeClass(h.placeholder),M.debug("Changing text",e,C),C.removeClass(h.filtered),m.preserveHTML?C.html(e):C.text(e))},selectedItem:function(e){var t=M.get.choiceValue(e),n=M.get.choiceText(e,!1),i=M.get.choiceText(e);M.debug("Setting user selection to item",e),M.remove.activeItem(),M.set.partialSearch(n),M.set.activeItem(e),M.set.selected(t,e),M.set.text(i)},selectedLetter:function(e){var t,n=L.filter("."+h.selected),i=0<n.length&&M.has.firstLetter(n,e),a=!1;i&&(t=n.nextAll(L).eq(0),M.has.firstLetter(t,e)&&(a=t)),a||L.each(function(){if(M.has.firstLetter(ee(this),e))return a=ee(this),!1}),a&&(M.verbose("Scrolling to next value with letter",e),M.set.scrollPosition(a),n.removeClass(h.selected),a.addClass(h.selected),m.selectOnKeydown&&M.is.single()&&!t.hasClass(h.actionable)&&M.set.selectedItem(a))},direction:function(e){"auto"===m.direction?(e?M.is.upward(e)&&M.remove.upward(e):M.remove.upward(),(M.can.openDownward(e)?M.remove:M.set).upward(e),M.is.leftward(e)||M.can.openRightward(e)||M.set.leftward(e)):"upward"===m.direction&&M.set.upward(e)},upward:function(e){(e||w).addClass(h.upward)},leftward:function(e){(e||k).addClass(h.leftward)},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=void 0),void 0===e||""===e||Array.isArray(e)&&0===e.length?A.addClass(h.noselection):A.removeClass(h.noselection);var a=M.escape.value(e),o=0<A.length,s=M.get.values(),r=void 0!==e?String(e):e;if(o){if(!m.allowReselection&&r==s&&(M.verbose("Skipping value update already same value",e,s),!M.is.initialLoad()))return;M.is.single()&&M.has.selectInput()&&M.can.extendSelect()&&(M.debug("Adding user option",e),M.add.optionValue(e)),M.debug("Updating input value",a,s),K=!0,A.val(a),!1===m.fireOnInit&&M.is.initialLoad()?M.debug("Input native change event ignored on initial load"):!0!==i&&M.trigger.change(),K=!1}else M.verbose("Storing value in metadata",a,A),a!==s&&w.data(p.value,r);!1===m.fireOnInit&&M.is.initialLoad()?M.verbose("No callback on initial load",m.onChange):!0!==i&&m.onChange.call(q,e,t,n)},active:function(){w.addClass(h.active)},multiple:function(){w.addClass(h.multiple)},visible:function(){w.addClass(h.visible)},exactly:function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),M.debug("Setting selected to exact values"),M.clear(),M.set.selected(e,t,n)},selected:function(e,l,c,d){"boolean"==typeof l&&(d=c,c=l,l=void 0);var u=M.is.multiple();if(!(l=m.allowAdditions?l||M.get.itemWithAdditions(e):l||M.get.item(e)))return!1;M.debug("Setting selected menu item to",l),M.is.multiple()&&!d&&M.remove.searchWidth(),M.is.single()?(M.remove.activeItem(),M.remove.selectedItem()):m.useLabels&&M.remove.selectedItem(),l.each(function(){var e=ee(this),t=M.get.choiceText(e),n=M.get.choiceValue(e,t),i=e.hasClass(h.filtered),a=e.hasClass(h.active),o=e.hasClass(h.actionable),s=e.hasClass(h.addition),r=u&&l&&1===l.length;o?(u&&a&&!s||!m.apiSettings||!m.saveRemoteData||M.save.remoteData(t,n),m.onActionable.call(q,n,t,e)):u?!a||s?(m.apiSettings&&m.saveRemoteData&&M.save.remoteData(t,n),m.useLabels?(M.add.value(n,t,e,c),M.add.label(n,t,r),M.set.activeItem(e),M.filterActive(),M.select.nextAvailable(l)):(M.add.value(n,t,e,c),M.set.text(M.add.variables(f.count)),M.set.activeItem(e))):i||!m.useLabels&&!v||(M.debug("Selected active value, removing label"),M.remove.selected(n)):(m.apiSettings&&m.saveRemoteData&&M.save.remoteData(t,n),d||e.hasClass(h.actionable)||M.set.text(t,!0),M.set.value(n,t,e,c),e.addClass(h.active).addClass(h.selected))}),d||M.remove.searchTerm(),M.is.allFiltered()&&(M.set.empty(),M.hideMenu())}},add:{label:function(e,t,n){var i,a=M.is.searchSelection()?x:C,o=M.escape.value(e);m.ignoreCase&&(o=o.toLowerCase()),i=ee("<a />").addClass(h.label).attr("data-"+p.value,o).html(N.label(o,t,m.preserveHTML,m.className)),i=m.onLabelCreate.call(i,o,t),M.has.label(e)?M.debug("User selection already exists, skipping",o):(m.label.variation&&i.addClass(m.label.variation),!0===n&&m.label.transition?(M.debug("Animating in label",i),i.addClass(h.hidden).insertBefore(a).transition({animation:m.label.transition,debug:m.debug,verbose:m.verbose,silent:m.silent,duration:m.label.duration})):(M.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=k.children(b.message),e=m.templates.message(M.add.variables(e));0<t.length?t.html(e):ee("<div/>").html(e).addClass(h.message).appendTo(k)},optionValue:function(e){var t=M.escape.value(e);0<A.find('option[value="'+M.escape.string(t)+'"]').length||(M.disconnect.selectObserver(),M.is.single()&&(M.verbose("Removing previous user addition"),A.find("option."+h.addition).remove()),ee("<option/>").prop("value",t).addClass(h.addition).text(e).appendTo(A),M.verbose("Adding user addition as an <option>",e),M.observe.select())},userSuggestion:function(e){var t=k.children(b.addition),n=M.get.item(e),n=n&&0<n.not(b.addition).length,i=0<t.length;m.useLabels&&M.has.maxSelections()||(""===e||n?t.remove():(i?(t.data(p.value,e).data(p.text,e).attr("data-"+p.value,e).attr("data-"+p.text,e).removeClass(h.filtered),m.hideAdditions||(n=m.templates.addition(M.add.variables(f.addResult,e)),t.html(n)),M.verbose("Replacing user suggestion with new value",t)):((t=M.create.userChoice(e)).prependTo(k),M.verbose("Adding item choice to menu corresponding with user choice addition",t)),m.hideAdditions&&!M.is.allFiltered()||t.addClass(h.selected).siblings().removeClass(h.selected),M.refreshItems()))},variables:function(e,t){var n=-1!==e.search("{count}"),i=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return M.verbose("Adding templated variables to message",e),n&&(e=e.replace("{count}",M.get.selectionCount())),i&&(e=e.replace("{maxCount}",m.maxSelections)),a&&(n=t||M.get.query(),e=e.replace("{term}",n)),e},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=void 0);var a,o=M.get.values(!0);M.has.value(e)?M.debug("Value already selected"):""===e?M.debug("Cannot select blank values from multiselect"):(a=Array.isArray(o)?(a=n&&n.hasClass(h.actionable)?o:o.concat([e]),M.get.uniqueArray(a)):[e],M.has.selectInput()?M.can.extendSelect()&&(M.debug("Adding value to select",e,a,A),M.add.optionValue(e)):(a=a.join(m.delimiter),M.debug("Setting hidden input to delimited value",a,A)),!1===m.fireOnInit&&M.is.initialLoad()?M.verbose("Skipping onadd callback on initial load",m.onAdd):m.onAdd.call(q,e,t,n),M.set.value(a,t,n,i),M.check.maxSelections())}},remove:{active:function(){w.removeClass(h.active)},activeLabel:function(){w.find(b.label).removeClass(h.active)},empty:function(){w.removeClass(h.empty)},loading:function(){w.removeClass(h.loading)},initialLoad:function(){P=!1},upward:function(e){(e||w).removeClass(h.upward)},leftward:function(e){(e||k).removeClass(h.leftward)},visible:function(){w.removeClass(h.visible)},activeItem:function(){L.removeClass(h.active)},filteredItem:function(){m.useLabels&&M.has.maxSelections()||((m.useLabels&&M.is.multiple()?L.not("."+h.active):L).removeClass(h.filtered),m.hideDividers&&I.removeClass(h.hidden),M.remove.empty())},optionValue:function(e){var e=M.escape.value(e),t=A.find('option[value="'+M.escape.string(e)+'"]');0<t.length&&t.hasClass(h.addition)&&(M.disconnect.selectObserver(),t.remove(),M.verbose("Removing user addition as an <option>",e),M.observe.select())},message:function(){k.children(b.message).remove()},searchWidth:function(){x.css("width","")},searchTerm:function(){M.verbose("Cleared search term"),x.val(""),M.set.filtered()},userAddition:function(){L.filter(b.addition).remove()},selected:function(e,t,i){if(!(t=m.allowAdditions?t||M.get.itemWithAdditions(e):t||M.get.item(e)))return!1;t.each(function(){var e=ee(this),t=M.get.choiceText(e),n=M.get.choiceValue(e,t);M.is.multiple()?m.useLabels?(M.remove.value(n,t,e,i),M.remove.label(n)):(M.remove.value(n,t,e,i),0===M.get.selectionCount()?M.set.placeholderText():M.set.text(M.add.variables(f.count))):M.remove.value(n,t,e,i),e.removeClass(h.filtered).removeClass(h.active),m.useLabels&&e.removeClass(h.selected)})},selectedItem:function(){L.removeClass(h.selected)},value:function(e,t,n,i){var a,o=M.get.values(!0);M.has.selectInput()?(M.verbose("Input is <select> removing selected option",e),a=M.remove.arrayValue(e,o),M.remove.optionValue(e)):(M.verbose("Removing from delimited values",e),a=(a=M.remove.arrayValue(e,o)).join(m.delimiter)),!1===m.fireOnInit&&M.is.initialLoad()?M.verbose("No callback on initial load",m.onRemove):m.onRemove.call(q,e,t,n),M.set.value(a,t,n,i),M.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=ee.grep(e,function(e){return t!=e}),M.verbose("Removed value from delimited string",t,e),e},label:function(e,t){e=M.escape.value(e),e=w.find(b.label).filter("[data-"+p.value+'="'+M.escape.string(m.ignoreCase?e.toLowerCase():e)+'"]');M.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||w.find(b.label).filter("."+h.active),M.verbose("Removing active label selections",e),M.remove.labels(e)},labels:function(e,a){e=e||w.find(b.label),M.verbose("Removing labels",e),e.each(function(){var e=ee(this),t=e.data(p.value),n=void 0!==t?String(t):t,i=M.is.userValue(n);!1===m.onLabelRemove.call(e,t)?M.debug("Label remove callback cancelled removal"):(M.remove.message(),i?(M.remove.value(n,n,M.get.item(n),a),M.remove.label(n)):M.remove.selected(n,!1,a))})},tabbable:function(){M.is.searchSelection()?(M.debug("Searchable dropdown initialized"),x.removeAttr("tabindex")):(M.debug("Simple selection dropdown initialized"),w.removeAttr("tabindex")),k.removeAttr("tabindex")},diacritics:function(e){return m.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},has:{menuSearch:function(){return M.has.search()&&0<x.closest(k).length},clearItem:function(){return 0<j.length},search:function(){return 0<x.length},sizer:function(){return 0<S.length},selectInput:function(){return A.is("select")},minCharacters:function(e){return m.minCharacters&&!O?(e=void 0!==e?String(e):String(M.get.query())).length>=m.minCharacters:!(O=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=M.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<A.length},items:function(){return 0<L.length},menu:function(){return 0<k.length},subMenu:function(e){return 0<(e||k).find(b.menu).length},message:function(){return 0<k.children(b.message).length},label:function(e){var e=M.escape.value(e),t=w.find(b.label);return m.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+p.value+'="'+M.escape.string(e)+'"]').length},maxSelections:function(){return m.maxSelections&&M.get.selectionCount()>=m.maxSelections},allResultsFiltered:function(){var e=L.not(b.addition);return e.filter(b.unselectable).length===e.length},userSuggestion:function(){return 0<k.children(b.addition).length},query:function(){return""!==M.get.query()},value:function(e){return m.ignoreCase?M.has.valueIgnoringCase(e):M.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=M.get.values(!0);return!!(Array.isArray(t)?t&&-1!==ee.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=M.get.values(!0),i=!1;return Array.isArray(e)||(e=[e]),ee.each(e,function(e,t){if(String(n).toLowerCase()===String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return w.hasClass(h.active)},animatingInward:function(){return k.transition("is inward")},animatingOutward:function(){return k.transition("is outward")},bubbledLabelClick:function(e){return ee(e.target).is("select, input")&&0<w.closest("label").length},bubbledIconClick:function(e){return 0<ee(e.target).closest(H).length},edge:function(){return!!te.chrome&&!!te.StyleMedia},empty:function(){return w.hasClass(h.empty)},chrome:function(){return!!te.chrome&&!te.StyleMedia},alreadySetup:function(){return w.is("select")&&void 0!==w.parent(b.dropdown).data(u)&&0===w.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):k.transition&&k.transition("is animating")},leftward:function(e){return(e||k).hasClass(h.leftward)},clearable:function(){return w.hasClass(h.clearable)||m.clearable},disabled:function(){return w.hasClass(h.disabled)},focused:function(){return ne.activeElement===w[0]},focusedOnSearch:function(){return ne.activeElement===x[0]},allFiltered:function(){return(M.is.multiple()||M.has.search())&&!(!m.hideAdditions&&M.has.userSuggestion())&&!M.has.message()&&M.has.allResultsFiltered()},hidden:function(e){return!M.is.visible(e)},initialLoad:function(){return P},inObject:function(n,e){var i=!1;return ee.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return w.hasClass(h.multiple)},remote:function(){return m.apiSettings&&M.can.useAPI()},noApiCache:function(){return V||m.apiSettings&&!m.apiSettings.cache},single:function(){return!M.is.multiple()},selectMutation:function(e){var n=!1;return ee.each(e,function(e,t){if(ee(t.target).is("option, optgroup")||ee(t.addedNodes).is("select")||ee(t.target).is("select")&&"attributes"!==t.type)return!(n=!0)}),n},search:function(){return w.hasClass(h.search)},searchSelection:function(e){return M.has.search()&&1===(e?x.parents(b.dropdown):x.parent(b.dropdown)).length},selection:function(){return w.hasClass(h.selection)},userValue:function(e){return-1!==ee.inArray(e,M.get.userValues())},upward:function(e){return(e||w).hasClass(h.upward)},visible:function(e){return(e||k).hasClass(h.visible)},verticallyScrollableContext:function(){var e=y[0]!==te&&y.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=y[0]!==te&&y.css("overflow-X");return"auto"===e||"scroll"===e}},can:{activate:function(e){return m.useLabels||!M.has.maxSelections()||M.has.maxSelections()&&e.hasClass(h.active)},openDownward:function(e){var t,e=e||k;return e.addClass(h.loading),t={context:{offset:y[0]===te?{top:0,left:0}:y.offset(),scrollTop:y.scrollTop(),height:y.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},M.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),M.has.subMenu(e)&&(t.menu.height+=e.find(b.menu).first().outerHeight()),t=(t={above:t.context.scrollTop<=t.menu.offset.top-t.context.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top-t.context.offset.top+t.menu.height}).below?(M.verbose("Dropdown can fit in context downward",t),!0):t.above?(M.verbose("Dropdown cannot fit below, opening upward",t),!1):(M.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(h.loading),t},openRightward:function(e){var t,e=e||k,n=!0;return e.addClass(h.loading),t={context:{offset:y[0]===te?{top:0,left:0}:y.offset(),scrollLeft:y.scrollLeft(),width:y.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},M.is.horizontallyScrollableContext()&&(t.menu.offset.left+=t.context.scrollLeft),(t=t.menu.offset.left-t.context.offset.left+t.menu.width>=t.context.scrollLeft+t.context.width)&&(M.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(h.loading),n},extendSelect:function(){return m.allowAdditions||m.apiSettings},show:function(){return!M.is.disabled()&&(M.has.items()||M.has.message())},useAPI:function(){return void 0!==ee.fn.api},useElement:function(e){return void 0!==ee.fn[e]||(M.error(c.noElement.replace("{element}",e)),!1)}},animate:{show:function(e,t){var n=t||k,i=t?function(){}:function(){M.hideSubMenus(),M.hideOthers(),M.set.active()};e=ie(e)?e:function(){},M.verbose("Doing menu show animation",n),M.set.direction(t),t=m.transition.showMethod||M.get.transition(t),M.is.selection()&&M.set.scrollPosition(M.get.selectedItem(),!0),(M.is.hidden(n)||M.is.animating(n))&&("none"===t?(i(),n.transition({displayType:M.get.displayType()}).transition("show"),e.call(q)):M.can.useElement("transition")&&n.transition({animation:t+" in",debug:m.debug,verbose:m.verbose,silent:m.silent,duration:m.transition.showDuration||m.duration,queue:!0,onStart:i,displayType:M.get.displayType(),onComplete:function(){e.call(q)}}))},hide:function(e,t){var n=t||k,i=t?function(){}:function(){M.unbind.intent(),M.remove.active()},t=m.transition.hideMethod||M.get.transition(t);e=ie(e)?e:function(){},(M.is.visible(n)||M.is.animating(n))&&(M.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:M.get.displayType()}).transition("hide"),e.call(q)):void 0!==ee.fn.transition?n.transition({animation:t+" out",duration:m.transition.hideDuration||m.duration,debug:m.debug,verbose:m.verbose,silent:m.silent,queue:!1,onStart:i,displayType:M.get.displayType(),onComplete:function(){e.call(q)}}):M.error(c.transition))}},hideAndClear:function(){M.remove.searchTerm(),M.has.maxSelections()||(M.has.search()?M.hide(function(){M.remove.filteredItem()}):M.hide())},delay:{show:function(){M.verbose("Delaying show event to ensure user intent"),clearTimeout(M.timer),M.timer=setTimeout(function(){M.show()},m.delay.show)},hide:function(){M.verbose("Delaying hide event to ensure user intent"),clearTimeout(M.timer),M.timer=setTimeout(function(){M.hide()},m.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,n=n&&-1!==e.search(r.quote),a=[];return i||!n?e:(M.debug("Encoding quote values for use in select",e),t?(ee.each(e,function(e,t){a.push(t.replace(r.quote,"&quot;"))}),a):e.replace(r.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(r.escape,"\\$&")},htmlEntities:function(e,t){var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(t?/&/g:/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(M.debug("Changing setting",e,t),ee.isPlainObject(e))ee.extend(!0,m,e);else{if(void 0===t)return m[e];ee.isPlainObject(m[e])?ee.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(ee.isPlainObject(e))ee.extend(!0,M,e);else{if(void 0===t)return M[e];M[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?M.performance.log(arguments):(M.debug=Function.prototype.bind.call(console.info,console,m.name+":"),M.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?M.performance.log(arguments):(M.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),M.verbose.apply(console,arguments)))},error:function(){m.silent||(M.error=Function.prototype.bind.call(console.error,console,m.name+":"),M.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=Date.now())-($||t),$=t,_.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:q,"Execution Time":n})),clearTimeout(M.performance.timer),M.performance.timer=setTimeout(function(){M.performance.display()},500)},display:function(){var e=m.name+":",n=0;$=!1,clearTimeout(M.performance.timer),ee.each(_,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0<_.length&&(console.groupCollapsed(e),console.table?console.table(_):ee.each(_,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),_=[]}},invoke:function(i,e,t){var a,o,n,s=R;return e=e||J,t=t||q,"string"==typeof i&&void 0!==s&&(i=i.split(/[ .]/),a=i.length-1,ee.each(i,function(e,t){var n=e!==a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(ee.isPlainObject(s[n])&&e!==a)s=s[n];else{if(void 0!==s[n])return o=s[n],!1;{if(!ee.isPlainObject(s[t])||e===a)return void 0!==s[t]?o=s[t]:M.error(c.method,i),!1;s=s[t]}}})),ie(o)?n=o.apply(t,e):void 0!==o&&(n=o),Array.isArray(W)?W.push(n):void 0!==W?W=[W,n]:void 0!==n&&(W=n),o}};G?(void 0===R&&M.initialize(),M.invoke(X)):(void 0!==R&&R.invoke("destroy"),M.initialize())}),void 0!==W?W:Q},ee.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:te,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:"exact",ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!1,allowAdditions:!1,keepSearchTerm:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!1,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,displayType:!1,headerDivider:!0,collapseOnActionable:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onActionable:function(e,t,n){},onSearch:function(e){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return ee(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noElement:"This module requires ui {element}",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[\s#$()*+,.:=?@[\\\]^{|}-]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",description:"description",descriptionVertical:"descriptionVertical",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider",actionable:"actionable"},keys:{backspace:8,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",description:"description",descriptionVertical:"vertical",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",text:"text",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable",actionable:"actionable"}},ee.fn.dropdown.settings.templates={deQuote:function(e,t){return String(e).replace(/"/g,t?"&quot;":"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&amp;")).replace(/["'<>`]/g,function(e){return n[e]}):e},dropdown:function(e,t,n,i){var a=e.placeholder||!1,o="",s=ee.fn.dropdown.settings.templates.escape,r=ee.fn.dropdown.settings.templates.deQuote;return(o+='<i class="dropdown icon"></i>')+(a?'<div class="default text">'+s(a,n)+"</div>":'<div class="text"></div>')+('<div class="'+r(i.menu)+'">')+ee.fn.dropdown.settings.templates.menu(e,t,n,i)+"</div>"},menu:function(e,c,d,u){var e=e[c.values]||[],v="",m=ee.fn.dropdown.settings.templates.escape,f=ee.fn.dropdown.settings.templates.deQuote;return ee.each(e,function(e,t){var n,i,a,o,s,r=t[c.type]||"item",l=-1!==r.indexOf("menu");"item"===r||l?(n=t[c.text]?' data-text="'+f(t[c.text],!0)+'"':"",o=t[c.actionable]?u.actionable+" ":"",s=t[c.disabled]?u.disabled+" ":"",i=t[c.descriptionVertical]?u.descriptionVertical+" ":"",a=""!==m(t[c.description]||"",d),v+='<div class="'+f(o+s+i+(t[c.class]||u.item))+'" data-value="'+f(t[c.value],!0)+'"'+n+">",l&&(v+='<i class="'+(-1!==r.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[c.image]&&(v+='<img class="'+f(t[c.imageClass]||u.image)+'" src="'+f(t[c.image])+'">'),t[c.icon]&&(v+='<i class="'+f(t[c.icon]+" "+(t[c.iconClass]||u.icon))+'"></i>'),a&&(v=(v+='<span class="'+f(u.description)+'">'+m(t[c.description]||"",d)+"</span>")+(l?"":'<span class="'+f(u.text)+'">')),l&&(v+='<span class="'+f(u.text)+'">'),v+=m(t[c.name]||"",d),l?v=(v=(v+="</span>")+'<div class="'+f(r)+'">')+ee.fn.dropdown.settings.templates.menu(t,c,d,u)+"</div>":a&&(v+="</span>"),v+="</div>"):"header"===r&&(o=m(t[c.name]||"",d),s=f(t[c.icon]||u.groupIcon),""===o&&""===s||(v+='<div class="'+f(t[c.class]||u.header)+'">',""!==s&&(v+='<i class="'+f(s+" "+(t[c.iconClass]||u.icon))+'"></i>'),v=v+o+"</div>"),t[c.divider]&&(v+='<div class="'+f(u.divider)+'"></div>'))}),v},label:function(e,t,n,i){var a=ee.fn.dropdown.settings.templates.escape,o=ee.fn.dropdown.settings.templates.deQuote;return a(t,n)+'<i class="'+o(i.delete)+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document);