fomantic-ui 2.10.0-beta.13 → 2.10.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +1 -1
- package/dist/components/api.min.js +1 -1
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +1 -1
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +56 -66
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +3 -4
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +3 -4
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +1 -1
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +3 -4
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +3 -4
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +3 -4
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +3 -4
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +3 -4
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +53 -53
- package/dist/semantic.js +95 -112
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/modules/dropdown.js +55 -65
- package/src/definitions/modules/embed.js +2 -3
- package/src/definitions/modules/flyout.js +2 -3
- package/src/definitions/modules/modal.js +2 -3
- package/src/definitions/modules/popup.js +2 -3
- package/src/definitions/modules/rating.js +2 -3
- package/src/definitions/modules/search.js +2 -3
- package/src/definitions/modules/toast.js +2 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.10.0-beta.
|
2
|
+
* # Fomantic UI - 2.10.0-beta.14+ea33639
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!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(W){let B=ee(this),Z=ee(ne),$=Date.now(),_=[],Q=W,X="string"==typeof Q,Y=[].slice.call(arguments,1),G=function(e,t){let n;return 0<=[te,ne].indexOf(e)?n=ee(e):0===(n=ee(t.document).find(e)).length&&(n=t.frameElement?G(e,t.parent):te),n},J;return B.each(function(P){let v=ee.isPlainObject(W)?ee.extend(!0,{},ee.fn.dropdown.settings,W):ee.extend({},ee.fn.dropdown.settings),f=v.className,m=v.message,c=v.fields,g=v.keys,p=v.metadata;var z=v.namespace;let o=v.regExp,b=v.selector,l=v.error,s=v.templates,t="."+z,e="module-"+z,w=ee(this),a=G(v.context,te),r=w.find(b.text),h=w.find(b.search),n=w.find(b.sizer),d=w.find(b.input),F=w.find(b.icon),N=w.find(b.clearIcon),i=0<w.prev().find(b.text).length?w.prev().find(b.text):w.prev(),C=w.children(b.menu),y=C.find(b.item),u=v.hideDividers?y.parent().children(b.divider):ee(),S=!1,j=!1,H=!1,x=!1,A=this,T=!1,k=w.data(e),U,K,L,I,D,O,E,q,R,V,M=!1;V={initialize:function(){V.debug("Initializing dropdown",v),V.is.alreadySetup()?V.setup.reference():(V.create.id(),V.setup.layout(),v.values&&(V.set.initialLoad(),V.change.values(v.values),V.remove.initialLoad()),""!==V.get.placeholderText()&&V.set.placeholderText(),V.refreshData(),V.save.defaults(),V.restore.selected(),V.bind.events(),V.observeChanges(),V.instantiate())},instantiate:function(){V.verbose("Storing instance of dropdown",V),k=V,w.data(e,V)},destroy:function(){V.verbose("Destroying previous dropdown",w),V.remove.tabbable(),V.remove.active(),C.transition("stop all"),C.removeClass(f.visible).addClass(f.hidden),w.off(t).removeData(e),C.off(t),Z.off(D),V.disconnect.menuObserver(),V.disconnect.selectObserver(),V.disconnect.classObserver()},observeChanges:function(){E=new MutationObserver(V.event.select.mutation),q=new MutationObserver(V.event.menu.mutation),R=new MutationObserver(V.event.class.mutation),V.debug("Setting up mutation observer",E,q,R),V.observe.select(),V.observe.menu(),V.observe.class()},disconnect:{menuObserver:function(){q&&q.disconnect()},selectObserver:function(){E&&E.disconnect()},classObserver:function(){R&&R.disconnect()}},observe:{select:function(){V.has.input()&&E&&E.observe(w[0],{attributes:!0,childList:!0,subtree:!0})},menu:function(){V.has.menu()&&q&&q.observe(C[0],{childList:!0,subtree:!0})},class:function(){V.has.search()&&R&&R.observe(w[0],{attributes:!0})}},create:{id:function(){O=(Math.random().toString(16)+"000000000").slice(2,10),D="."+O,V.verbose("Creating unique id for element",O)},userChoice:function(e){let n,i,a;return!!(e=e||V.get.userValues())&&(e=Array.isArray(e)?e:[e],ee.each(e,function(e,t){!1===V.get.item(t)&&(a=v.templates.addition(V.add.variables(m.addResult,t)),i=ee("<div />").html(a).attr("data-"+p.value,t).attr("data-"+p.text,t).addClass(f.addition).addClass(f.item),v.hideAdditions&&i.addClass(f.hidden),n=void 0===n?i:n.add(i),V.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=V.get.userValues();t&&(V.debug("Adding user labels",t),ee.each(t,function(e,t){V.verbose("Adding custom user value"),V.add.label(t,t)}))},menu:function(){C=ee("<div />").addClass(f.menu).appendTo(w)},sizer:function(){n=ee("<span />").addClass(f.sizer).insertAfter(h)}},search:function(e){e=void 0!==e?e:V.get.query(),V.verbose("Searching for query",e),!1===v.fireOnInit&&V.is.initialLoad()?V.verbose("Skipping callback on initial load",v.onSearch):V.has.minCharacters(e)&&!1!==v.onSearch.call(A,e)?V.filter(e):V.hide(null,!0)},select:{firstUnfiltered:function(){V.verbose("Selecting first non-filtered element"),V.remove.selectedItem(),y.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(f.selected)},nextAvailable:function(e){let t=(e=e.eq(0)).nextAll(b.item).not(b.unselectable).eq(0),n=e.prevAll(b.item).not(b.unselectable).eq(0);0<t.length?(V.verbose("Moving selection to",t),t.addClass(f.selected)):(V.verbose("Moving selection to",n),n.addClass(f.selected))}},setup:{api:function(){var e={debug:v.debug,urlData:{value:V.get.value(),query:V.get.query()},on:!1};V.verbose("First request, initializing API"),w.api(e)},layout:function(){if(w.is("select")&&(V.setup.select(),V.setup.returnedObject()),V.has.menu()||V.create.menu(),V.is.clearable()&&!V.has.clearItem()&&(V.verbose("Adding clear icon"),N=ee("<i />").addClass("remove icon").insertAfter(F)),V.is.search()&&!V.has.search()){V.verbose("Adding search input");let e=w.prev("label");h=ee("<input />").addClass(f.search).prop("autocomplete",V.is.chrome()?"fomantic-search":"off"),0<e.length&&(e.attr("id")||e.attr("id","_"+V.get.id()+"_formLabel"),h.attr("aria-labelledby",e.attr("id"))),h.insertBefore(r)}V.is.multiple()&&V.is.searchSelection()&&!V.has.sizer()&&V.create.sizer(),v.allowTab&&V.set.tabbable()},select:function(){var e=V.get.selectValues();V.debug("Dropdown initialized on a select",e),0<(d=w.is("select")?w:d).parent(b.dropdown).length?(V.debug("UI dropdown already exists. Creating dropdown menu only"),w=d.closest(b.dropdown),V.has.menu()||V.create.menu(),C=w.children(b.menu),V.setup.menu(e)):(V.debug("Creating entire dropdown from select"),w=ee("<div />").attr("class",d.attr("class")).addClass(f.selection).addClass(f.dropdown).html(s.dropdown(e,v)).insertBefore(d),d.hasClass(f.multiple)&&!1===d.prop("multiple")&&(V.error(l.missingMultiple),d.prop("multiple",!0)),d.is("[multiple]")&&V.set.multiple(),d.prop("disabled")&&(V.debug("Disabling dropdown"),w.addClass(f.disabled)),d.is("[required]")&&(v.forceSelection=!0),v.allowTab||d.removeAttr("tabindex"),d.prop("required",!1).removeAttr("class").detach().prependTo(w)),V.refresh()},menu:function(e){C.html(s.menu(e,v)),y=C.find(b.item),u=v.hideDividers?y.parent().children(b.divider):ee()},reference:function(){V.debug("Dropdown behavior was called on select, replacing with closest dropdown"),w=w.parent(b.dropdown),k=w.data(e),A=w[0],V.refresh(),V.setup.returnedObject()},returnedObject:function(){let e=B.slice(0,P);var t=B.slice(P+1);B=e.add(w).add(t)}},refresh:function(){V.refreshSelectors(),V.refreshData()},refreshItems:function(){y=C.find(b.item),u=v.hideDividers?y.parent().children(b.divider):ee()},refreshSelectors:function(){V.verbose("Refreshing selector cache"),r=w.find(b.text),h=w.find(b.search),d=w.find(b.input),F=w.find(b.icon),i=0<w.prev().find(b.text).length?w.prev().find(b.text):w.prev(),C=w.children(b.menu),y=C.find(b.item),u=v.hideDividers?y.parent().children(b.divider):ee()},refreshData:function(){V.verbose("Refreshing cached metadata"),y.removeData(p.text).removeData(p.value)},clearData:function(){V.verbose("Clearing metadata"),y.removeData(p.text).removeData(p.value),w.removeData(p.defaultText).removeData(p.defaultValue).removeData(p.placeholderText)},clearItems:function(){C.empty(),V.refreshItems()},toggle:function(){V.verbose("Toggling menu visibility"),V.is.active()?V.hide():V.show()},show:function(e,t){if(e=ie(e)?e:function(){},(T||x)&&V.is.remote()&&V.is.noApiCache()&&!V.has.maxSelections()&&V.clearItems(),!V.can.show()&&V.is.remote()&&(V.debug("No API results retrieved, searching before show"),V.queryRemote(V.get.query(),V.show,[e,t])),V.can.show()&&!V.is.active()){if(V.debug("Showing dropdown"),!V.has.message()||V.has.maxSelections()||V.has.allResultsFiltered()||V.remove.message(),V.is.allFiltered())return!0;!1!==v.onShow.call(A)&&(V.remove.empty(),V.animate.show(function(){V.bind.intent(),V.has.search()&&!t&&V.focusSearch(),V.set.visible(),e.call(A)}))}},hide:function(t,n){if(t=ie(t)?t:function(){},V.is.active()&&!V.is.animatingOutward()){if(V.debug("Hiding dropdown"),!1!==v.onHide.call(A)){V.animate.hide(function(){V.remove.visible(),V.is.focusedOnSearch()&&!0!==n&&h.trigger("blur"),t.call(A)});let e=w.find(b.menu);0<e.length&&(V.verbose("Hiding sub-menu",e),e.each(function(){var e=ee(this);V.is.animating(e)||V.animate.hide(!1,e)}))}}else V.unbind.intent();x=!1,T=!1},hideOthers:function(){V.verbose("Finding other dropdowns to hide"),B.not(w).has(b.menu+"."+f.visible).dropdown("hide")},hideMenu:function(){V.verbose("Hiding menu instantaneously"),V.remove.active(),V.remove.visible(),C.transition("destroy").transition("hide")},hideSubMenus:function(){let e=C.children(b.item).find(b.menu);V.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){V.bind.keyboardEvents(),V.bind.inputEvents(),V.bind.mouseEvents()},keyboardEvents:function(){V.verbose("Binding keyboard events"),w.on("keydown"+t,V.event.keydown),V.has.search()&&w.on(V.get.inputEvent()+t,b.search,V.event.input),V.is.multiple()&&Z.on("keydown"+D,V.event.document.keydown)},inputEvents:function(){V.verbose("Binding input change events"),w.on("change"+t,b.input,V.event.change),V.is.multiple()&&V.is.searchSelection()&&w.on("paste"+t,b.search,V.event.paste)},mouseEvents:function(){V.verbose("Binding mouse events"),V.is.multiple()&&w.on("click"+t,b.label,V.event.label.click).on("click"+t,b.remove,V.event.remove.click),V.is.searchSelection()?(w.on("mousedown"+t,V.event.mousedown).on("mouseup"+t,V.event.mouseup).on("mousedown"+t,b.menu,V.event.menu.mousedown).on("mouseup"+t,b.menu,V.event.menu.mouseup).on("click"+t,b.icon,V.event.icon.click).on("click"+t,b.clearIcon,V.event.clearIcon.click).on("focus"+t,b.search,V.event.search.focus).on("click"+t,b.search,V.event.search.focus).on("blur"+t,b.search,V.event.search.blur).on("click"+t,b.text,V.event.text.focus),V.is.multiple()&&w.on("click"+t,V.event.click).on("click"+t,V.event.search.focus)):("click"===v.on?w.on("click"+t,b.icon,V.event.icon.click).on("click"+t,V.event.test.toggle):"hover"===v.on?w.on("mouseenter"+t,V.delay.show).on("mouseleave"+t,V.delay.hide).on("touchstart"+t,V.event.test.toggle).on("touchstart"+t,b.icon,V.event.icon.click):w.on(v.on+t,V.toggle),w.on("mousedown"+t,V.event.mousedown).on("mouseup"+t,V.event.mouseup).on("focus"+t,V.event.focus).on("click"+t,b.clearIcon,V.event.clearIcon.click),V.has.menuSearch()?w.on("blur"+t,b.search,V.event.search.blur):w.on("blur"+t,V.event.blur)),C.on("mouseenter"+t,b.item,V.event.item.mouseenter).on("touchstart"+t,b.item,V.event.item.mouseenter).on("mouseleave"+t,b.item,V.event.item.mouseleave).on("click"+t,b.item,V.event.item.click)},intent:function(){V.verbose("Binding hide intent event to document"),Z.on("click"+D,V.event.test.hide)}},unbind:{intent:function(){V.verbose("Removing hide intent event from document"),Z.off("click"+D)}},filter:function(e){function t(){V.is.multiple()&&V.filterActive(),(e||!e&&0===V.get.activeItem().length)&&V.select.firstUnfiltered(),V.has.allResultsFiltered()?v.onNoResults.call(A,n)?v.allowAdditions?v.hideAdditions&&(V.verbose("User addition with no menu, setting empty style"),V.set.empty(),V.hideMenu()):(V.verbose("All items filtered, showing message",n),V.add.message(m.noResults)):(V.verbose("All items filtered, hiding dropdown",n),V.set.empty(),V.hideMenu()):(V.remove.empty(),V.remove.message()),v.allowAdditions&&V.add.userSuggestion(V.escape.htmlEntities(e)),V.is.searchSelection()&&V.can.show()&&V.is.focusedOnSearch()&&!V.is.empty()&&V.show()}let n=void 0!==e?e:V.get.query();v.useLabels&&V.has.maxSelections()?V.show():v.apiSettings?V.can.useAPI()?V.queryRemote(n,function(){v.filterRemoteData&&V.filterItems(n);let e=d.val();Array.isArray(e)||(e=e&&""!==e?e.split(v.delimiter):[]),V.is.multiple()&&ee.each(e,function(e,t){y.filter("[data-"+p.value+'="'+CSS.escape(t)+'"]').addClass(f.filtered)}),V.focusSearch(!0),t()}):V.error(l.noAPI):(V.filterItems(n),t())},queryRemote:function(e,s,l){Array.isArray(l)||(l=[l]);var e={errorDuration:!1,cache:"local",throttle:v.throttle,urlData:{query:e}},t={onError:function(e,t,n){V.add.message(m.serverError),x=!1,T=!1,s.apply(null,l),"function"==typeof v.apiSettings.onError&&v.apiSettings.onError.call(this,e,t,n)},onFailure:function(e,t,n){V.add.message(m.serverError),x=!1,T=!1,s.apply(null,l),"function"==typeof v.apiSettings.onFailure&&v.apiSettings.onFailure.call(this,e,t,n)},onSuccess:function(e,t,n){let i=e[c.remoteValues],a=(Array.isArray(i)||(i=[]),V.remove.message(),{});var o;a[c.values]=i,V.setup.menu(a),0!==i.length||v.allowAdditions?""!==(o=V.is.multiple()?V.get.values():V.get.value())&&(V.verbose("Value(s) present after click icon, select value(s) in items"),V.set.selected(o,null,!0,!0)):V.add.message(m.noResults),x=!1,T=!1,s.apply(null,l),"function"==typeof v.apiSettings.onSuccess&&v.apiSettings.onSuccess.call(this,e,t,n)}};w.api("get request")||V.setup.api(),e=ee.extend(!0,{},e,v.apiSettings,t,M?{cache:!1}:{}),w.api("setting",e).api("query"),M=!1},filterItems:function(e){let i=V.remove.diacritics(void 0!==e?e:V.get.query()),s=null;var n=V.escape.string(i),l=v.ignoreSearchCase?"i":"";let a=new RegExp("^"+n,l+"gm");if(V.remove.filteredItem(),V.has.query()&&(s=[],V.verbose("Searching for matching values",i),y.each(function(){let e=ee(this),t,n;return!e.hasClass(f.unfilterable)&&("both"!==v.match&&"text"!==v.match||!(-1!==(t=V.remove.diacritics(String(V.get.choiceText(e,!1)))).search(a)||"exact"===v.fullTextSearch&&V.exactSearch(i,t)||!0===v.fullTextSearch&&V.fuzzySearch(i,t)))&&("both"!==v.match&&"value"!==v.match||!(-1!==(n=V.remove.diacritics(String(V.get.choiceValue(e,t)))).search(a)||"exact"===v.fullTextSearch&&V.exactSearch(i,n)||!0===v.fullTextSearch&&V.fuzzySearch(i,n)))?void 0:(s.push(this),!0)})),V.debug("Showing only matched items",i),s&&(y.not(s).addClass(f.filtered),v.highlightMatches&&("both"===v.match||"text"===v.match))){let t=e.split("");n=v.ignoreDiacritics?"[̀-ͯ]?":"",e="(?![^<]*>)";let a=new RegExp(e+"("+t.join(n+")(.*?)"+e+"(")+n+")",l),o=function(){let e=[].slice.call(arguments,1,2*t.length).map(function(e,t){return 1&t?e:"<mark>"+e+"</mark>"});return e.join("")};ee.each(s,function(e,t){let n=ee(t),i=V.get.choiceText(n,!0);v.ignoreDiacritics&&(i=i.normalize("NFD")),n.html(i.replace(a,o))})}V.has.query()?!0===v.hideDividers?u.addClass(f.hidden):"empty"===v.hideDividers&&u.removeClass(f.hidden).filter(function(){let e=ee(this).nextUntil(b.item);return 0===(0<e.length?e:ee(this)).nextUntil(b.divider).filter(b.item+":not(."+f.filtered+")").length}).addClass(f.hidden):u.removeClass(f.hidden)},fuzzySearch:function(i,a){var o=a.length,e=i.length;if(v.ignoreSearchCase&&(i=i.toLowerCase(),a=a.toLowerCase()),o<e)return!1;if(e===o)return i===a;for(let t=0,n=0;t<e;t++){let e=!1;for(var s=i.charCodeAt(t);n<o;)if(a.charCodeAt(n++)===s){e=!0;break}if(!e)return!1}return!0},exactSearch:function(e,t){return e=v.ignoreSearchCase?e.toLowerCase():e,-1<(t=v.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){v.useLabels&&y.filter("."+f.active).addClass(f.filtered)},focusSearch:function(e){V.has.search()&&!V.is.focusedOnSearch()&&(e?(w.off("focus"+t,b.search),h.trigger("focus"),w.on("focus"+t,b.search,V.event.search.focus)):h.trigger("focus"))},blurSearch:function(){V.has.search()&&h.trigger("blur")},forceSelection:function(){var e=y.not(f.filtered).filter("."+f.selected).eq(0),t=y.not(f.filtered).filter("."+f.active).eq(0),e=0<e.length?e:t,t=0<e.length;v.allowAdditions||t&&!V.is.multiple()?(V.debug("Forcing partial selection to selected item",e),V.event.item.click.call(e,{},!0)):V.remove.searchTerm()},change:{values:function(e){v.allowAdditions||V.clear(),V.debug("Creating dropdown with specified values",e);let t={};t[c.values]=e,V.setup.menu(t),ee.each(e,function(e,t){if(!0===t.selected&&(V.debug("Setting initial selection to",t[c.value]),V.set.selected(t[c.value]),!V.is.multiple()))return!1}),V.has.selectInput()&&(V.disconnect.selectObserver(),d.html(""),d.append("<option disabled selected value></option>"),ee.each(e,function(e,t){var n=v.templates.escape(t[c.value]),i=v.templates.escape(t[c.name]||"",v);d.append('<option value="'+n+'"'+(!0===t.selected?" selected":"")+">"+i+"</option>")}),V.observe.select())}},event:{paste:function(n){let e=(n.originalEvent.clipboardData||te.clipboardData).getData("text"),t=e.split(v.delimiter),i=[];if(t.forEach(function(e){!1===V.set.selected(V.escape.htmlEntities(e.trim()),null,!1,!0)&&i.push(e.trim())}),n.preventDefault(),0<i.length){let e=h[0];var a=e.selectionStart,o=e.selectionEnd;let t=e.value;var s=i.join(v.delimiter),l=a+s.length;h.val(t.slice(0,a)+s+t.slice(o)),e.selectionStart=l,e.selectionEnd=l,V.event.input(n)}},change:function(){H||(V.debug("Input changed, updating selection"),V.set.selected())},focus:function(){v.showOnFocus&&!S&&V.is.hidden()&&!L&&(T=!0,V.show())},blur:function(e){L=ne.activeElement===this,S||L||(V.remove.activeLabel(),V.hide())},mousedown:function(){V.is.searchSelection(!0)?I=!0:S=!0},mouseup:function(){V.is.searchSelection(!0)?I=!1:S=!1},click:function(e){let t=ee(e.target);t.is(w)&&(V.is.focusedOnSearch()?V.show():V.focusSearch())},search:{focus:function(e){S=!0,V.is.multiple()&&V.remove.activeLabel(),T||V.is.active()||!(v.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||"touchstart"===e.type||(T=!0,V.search())},blur:function(e){L=ne.activeElement===this,!V.is.searchSelection(!0)||I||j||L||(v.forceSelection?V.forceSelection():v.allowAdditions||v.keepSearchTerm||V.has.menuSearch()||V.remove.searchTerm(),V.hide()),I=!1}},clearIcon:{click:function(e){V.clear(),V.is.searchSelection()&&V.remove.searchTerm(),v.collapseOnClearable&&V.hide(),e.stopPropagation()}},icon:{click:function(e){x=!0,V.has.search()?V.is.active()?V.blurSearch():v.showOnFocus?V.focusSearch():V.toggle():V.toggle(),e.stopPropagation()}},text:{focus:function(e){S=!0,V.focusSearch()}},input:function(e){(V.is.multiple()||V.is.searchSelection())&&V.set.filtered(),clearTimeout(V.timer),V.timer=setTimeout(function(){V.search()},v.delay.search)},label:{click:function(e){let t=ee(this),n=w.find(b.label),i=n.filter("."+f.active);var a=t.nextAll("."+f.active),o=t.prevAll("."+f.active);let s=(0<a.length?t.nextUntil(a):t.prevUntil(o)).add(i).add(t);e.shiftKey?(i.removeClass(f.active),s.addClass(f.active)):e.ctrlKey?t.toggleClass(f.active):(i.removeClass(f.active),t.addClass(f.active)),v.onLabelSelect.apply(this,n.filter("."+f.active)),e.stopPropagation()}},remove:{click:function(e){let t=ee(this).parent();t.hasClass(f.active)?V.remove.activeLabels():V.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=V.is.multiple()?V.show:V.toggle;V.is.bubbledLabelClick(e)||V.is.bubbledIconClick(e)||(V.is.multiple()&&(!V.is.multiple()||V.is.active())||(T=!0),V.determine.eventOnElement(e,t)&&"touchstart"!==e.type&&e.preventDefault())},hide:function(e){V.determine.eventInModule(e,V.hide)&&A.id&&ee(e.target).attr("for")===A.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&V.check.disabled()})}},select:{mutation:function(e){V.is.selectMutation(e)&&(V.debug("<select> modified, recreating menu"),V.disconnect.selectObserver(),V.refresh(),V.setup.select(),V.set.selected(),V.observe.select())}},menu:{mutation:function(e){e=e[0];let t=e.addedNodes?ee(e.addedNodes[0]):ee(!1);e=e.removedNodes?ee(e.removedNodes[0]):ee(!1);let n=t.add(e);var e=n.is(b.addition)||0<n.closest(b.addition).length,i=n.is(b.message)||0<n.closest(b.message).length;e||i?(V.debug("Updating item selector cache"),V.refreshItems()):(V.debug("Menu modified, updating selector cache"),V.refresh())},mousedown:function(){j=!0},mouseup:function(){j=!1}},item:{mouseenter:function(e){var t=ee(e.target);let n=ee(this),i=n.children(b.menu),a=n.siblings(b.item).children(b.menu);var o=0<i.length;0<i.find(t).length||!o||(clearTimeout(V.itemTimer),V.itemTimer=setTimeout(function(){V.verbose("Showing sub-menu",i),ee.each(a,function(){V.animate.hide(!1,ee(this))}),V.animate.show(!1,i)},v.delay.show),e.preventDefault())},mouseleave:function(e){let t=ee(this).find(b.menu);0<t.length&&(clearTimeout(V.itemTimer),V.itemTimer=setTimeout(function(){V.verbose("Hiding sub-menu",t),t.each(function(){V.animate.hide(!1,ee(this))})},v.delay.hide))},click:function(e,t){let n=ee(this);e=ee(e&&e.target||"");let i=n.find(b.menu);var a=V.get.choiceText(n),o=V.get.choiceValue(n,a),s=0<i.length,l=0<i.find(e).length;"input"!==ne.activeElement.tagName.toLowerCase()&&ee(ne.activeElement).trigger("blur"),l||s&&!v.allowCategorySelection||(V.is.searchSelection()&&(v.allowAdditions&&V.remove.userAddition(),v.keepSearchTerm||(V.is.multiple()&&V.remove.filteredItem(),V.remove.searchTerm()),!V.is.visible()&&0<e.length&&V.show(),V.is.focusedOnSearch()||!0===t||V.focusSearch(!0)),v.useLabels||(V.remove.filteredItem(),V.set.scrollPosition(n)),V.determine.selectAction.call(this,a,o))}},document:{keydown:function(n){var i=n.which;if(V.is.inObject(i,g)){let e=w.find(b.label),t=e.filter("."+f.active);t.data(p.value);var a=e.index(t),o=e.length,s=0<t.length,l=1<t.length,r=0===a,c=a+1===o,d=V.is.searchSelection(),u=V.is.focusedOnSearch(),v=V.is.focused(),m=u&&0===V.get.caretPosition(!1),h=m&&0!==V.get.caretPosition(!0);if(!d||s||u)switch(i){case g.leftArrow:!v&&!m||s?s&&(n.shiftKey?V.verbose("Adding previous label to selection"):(V.verbose("Selecting previous label"),e.removeClass(f.active)),r&&!l?t.addClass(f.active):t.prev(b.siblingLabel).addClass(f.active).end(),n.preventDefault()):(V.verbose("Selecting previous label"),e.last().addClass(f.active));break;case g.rightArrow:v&&!s&&e.first().addClass(f.active),s&&(n.shiftKey?V.verbose("Adding next label to selection"):(V.verbose("Selecting next label"),e.removeClass(f.active)),c?d?u?e.removeClass(f.active):V.focusSearch():(l?t.next(b.siblingLabel):t).addClass(f.active):t.next(b.siblingLabel).addClass(f.active),n.preventDefault());break;case g.deleteKey:case g.backspace:s?(V.verbose("Removing active labels"),c&&d&&!u&&V.focusSearch(),t.last().next(b.siblingLabel).addClass(f.active),V.remove.activeLabels(t),V.is.visible()||V.show(),n.preventDefault()):!m||h||s||i!==g.backspace||(V.verbose("Removing last label on input backspace"),t=e.last().addClass(f.active),V.remove.activeLabels(t),V.is.visible()||V.show());break;default:t.removeClass(f.active)}}}},keydown:function(o){let s=o.which;if(V.is.inObject(s,g)||o.key===v.delimiter){var l=y.not(b.unselectable).filter("."+f.selected).eq(0),r=C.children("."+f.active).eq(0);let e=0<l.length?l:r,t=0<e.length?e.siblings(":not(."+f.filtered+")").addBack():C.children(":not(."+f.filtered+")"),n=e.children(b.menu),i=e.closest(b.menu);var l=i.hasClass(f.visible)||i.hasClass(f.animating)||0<i.parent(b.menu).length,r=0<n.length,c=0<e.length,d=0<e.not(b.unselectable).length,u=o.key===v.delimiter&&V.is.multiple();let a;if(v.allowAdditions&&(s===g.enter||u)&&(d&&v.hideAdditions&&(V.verbose("Selecting item from keyboard shortcut",e),V.event.item.click.call(e,o)),V.is.searchSelection()&&!v.keepSearchTerm&&V.remove.searchTerm(),V.is.multiple()&&o.preventDefault()),V.is.visible()){if(s!==g.enter&&!u||(s===g.enter&&c&&r&&!v.allowCategorySelection?(V.verbose("Pressed enter on unselectable category, opening sub menu"),s=g.rightArrow):d&&(V.verbose("Selecting item from keyboard shortcut",e),V.event.item.click.call(e,o),V.is.searchSelection()&&(v.keepSearchTerm||V.remove.searchTerm(),V.is.multiple()&&h.trigger("focus"))),o.preventDefault()),c&&(s===g.leftArrow&&i[0]!==C[0]&&(V.verbose("Left key pressed, closing sub-menu"),V.animate.hide(!1,i),e.removeClass(f.selected),i.closest(b.item).addClass(f.selected),o.preventDefault()),s===g.rightArrow&&r&&(V.verbose("Right key pressed, opening sub-menu"),V.animate.show(!1,n),e.removeClass(f.selected),n.find(b.item).eq(0).addClass(f.selected),o.preventDefault())),s===g.upArrow){if(a=(c&&l?e.prevAll(b.item+":not("+b.unselectable+")"):y).eq(0),t.index(a)<0)return V.verbose("Up key pressed but reached top of current menu"),void o.preventDefault();V.verbose("Up key pressed, changing active item"),e.removeClass(f.selected),a.addClass(f.selected),V.set.scrollPosition(a),v.selectOnKeydown&&V.is.single()&&!a.hasClass(f.actionable)&&V.set.selectedItem(a),o.preventDefault()}if(s===g.downArrow){if(0===(a=(c&&l?e.nextAll(b.item+":not("+b.unselectable+")"):y).eq(0)).length)return V.verbose("Down key pressed but reached bottom of current menu"),void o.preventDefault();V.verbose("Down key pressed, changing active item"),y.removeClass(f.selected),a.addClass(f.selected),V.set.scrollPosition(a),v.selectOnKeydown&&V.is.single()&&!a.hasClass(f.actionable)&&V.set.selectedItem(a),o.preventDefault()}s===g.pageUp&&(V.scrollPage("up"),o.preventDefault()),s===g.pageDown&&(V.scrollPage("down"),o.preventDefault()),s===g.escape&&(V.verbose("Escape key pressed, closing dropdown"),V.hide(),o.stopPropagation())}else s!==g.enter&&!u||o.preventDefault(),s!==g.downArrow||V.is.visible()||(T=!0,V.verbose("Down key pressed, showing dropdown"),V.show(),o.preventDefault())}else V.has.search()||V.set.selectedLetter(String.fromCharCode(s))}},trigger:{change:function(){let t=d[0];if(t){let e=ne.createEvent("HTMLEvents");V.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e)}}},determine:{selectAction:function(e,t){U=!0,V.verbose("Determining action",v.action),ie(V.action[v.action])?(V.verbose("Triggering preset action",v.action,e,t),V.action[v.action].call(A,e,t,this)):ie(v.action)?(V.verbose("Triggering user action",v.action,e,t),v.action.call(A,e,t,this)):V.error(l.action,v.action),U=!1},eventInModule:function(e,t){let n=ee(e.target);var e=0<n.closest(ne.documentElement).length,i=0<n.closest(w).length;return t=ie(t)?t:function(){},e&&!i?(V.verbose("Triggering event",t),t(),!0):(V.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){let n=ee(e.target);var i=n.closest(b.siblingLabel),e=ne.body.contains(e.target),i=0===w.find(i).length||!(V.is.multiple()&&v.useLabels),a=0===n.closest(C).length;return t=ie(t)?t:function(){},e&&i&&a?(V.verbose("Triggering event",t),t(),!0):(V.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=void 0!==t?t:e,V.can.activate(ee(n))&&(V.set.selected(t,ee(n),!1,v.keepSearchTerm),V.is.multiple()||!v.collapseOnActionable&&ee(n).hasClass(f.actionable)||V.hideAndClear())},select:function(e,t,n){t=void 0!==t?t:e,V.can.activate(ee(n))&&(V.set.value(t,e,ee(n)),V.is.multiple()||!v.collapseOnActionable&&ee(n).hasClass(f.actionable)||V.hideAndClear())},combo:function(e,t,n){t=void 0!==t?t:e,V.set.selected(t,ee(n)),V.hideAndClear()},hide:function(e,t,n){V.set.value(t,e,ee(n)),V.hideAndClear()}},get:{id:function(){return O},defaultText:function(){return w.data(p.defaultText)},defaultValue:function(){return w.data(p.defaultValue)},placeholderText:function(){return"auto"!==v.placeholder&&"string"==typeof v.placeholder?v.placeholder:w.data(p.placeholderText)||""},text:function(){return v.preserveHTML?r.html():r.text()},query:function(){return String(h.val()).trim()},searchWidth:function(e){return e=void 0!==e?e:h.val(),n.text(e),Math.ceil(n.width()+1)},selectionCount:function(){var e=V.get.values();return V.is.multiple()?Array.isArray(e)?e.length:0:""!==V.get.value()?1:0},transition:function(e){return"auto"===v.transition?V.is.upward(e)?"slide up":"slide down":v.transition},userValues:function(){let e=V.get.values(!0);return!!e&&(e=Array.isArray(e)?e:[e],ee.grep(e,function(e){return!1===V.get.item(e)}))},uniqueArray:function(n){return ee.grep(n,function(e,t){return ee.inArray(e,n)===t})},caretPosition:function(e){let t=h[0],n;var i;return e&&"selectionEnd"in t?t.selectionEnd:!e&&"selectionStart"in t?t.selectionStart:ne.selection?(t.focus(),i=(n=ne.selection.createRange()).text.length,e?i:(n.moveStart("character",-t.value.length),n.text.length-i)):void 0},value:function(){var e=0<d.length?d.val():w.data(p.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return void 0===e||t?"":e},values:function(e){let t=V.get.value();return""===t?"":!V.has.selectInput()&&V.is.multiple()?"string"==typeof t?(e?t:V.escape.htmlEntities(t)).split(v.delimiter):"":t},remoteValues:function(){let e=V.get.values(),i=!1;return e&&("string"==typeof e&&(e=[e]),ee.each(e,function(e,t){var n=V.read.remoteData(t);V.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)})),i},choiceText:function(e,t){if(t=void 0!==t?t:v.preserveHTML,e)return 0<e.find(b.menu).length&&(V.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||V.get.choiceText(e),!!e&&(void 0!==e.data(p.value)?String(e.data(p.value)):"string"==typeof t?String(v.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=h[0];return!!e&&(void 0!==e.oninput?"input":void 0!==e.onpropertychange?"propertychange":"keyup")},selectValues:function(){let s={},l=[],r=[];return w.find("option").each(function(){let e=ee(this);var 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;let o=e.parent("optgroup");"auto"===v.placeholder&&""===i?s.placeholder=t:(o.length===l.length&&o[0]===l[0]||(r.push({type:"header",divider:v.headerDivider,name:o.attr("label")||""}),l=o),r.push({name:t,value:i,text:V.escape.htmlEntities(a,!0),disabled:n}))}),v.placeholder&&"auto"!==v.placeholder&&(V.debug("Setting placeholder value to",v.placeholder),s.placeholder=v.placeholder),v.sortSelect?(!0===v.sortSelect?r.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===v.sortSelect?r.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):ie(v.sortSelect)&&r.sort(v.sortSelect),s[c.values]=r,V.debug("Retrieved and sorted values from select",s)):(s[c.values]=r,V.debug("Retrieved values from select",s)),s},activeItem:function(){return y.filter("."+f.active)},selectedItem:function(){var e=y.not(b.unselectable).filter("."+f.selected);return 0<e.length?e:y.eq(0)},itemWithAdditions:function(e){let t=V.get.item(e);var e=V.create.userChoice(e),n=e&&0<e.length;return t=n?0<t.length?t.add(e):e:t},item:function(i,a){let o=!1;var e;let s;return i=void 0!==i?i:void 0!==V.get.values()?V.get.values():V.get.text(),e=(s=V.is.multiple()&&Array.isArray(i))?0<i.length:null!=i,a=""===i||!1===i||!0===i||(a||!1),e&&y.each(function(){var e=ee(this),t=V.get.choiceText(e);let n=V.get.choiceValue(e,t);if(null!==n&&void 0!==n)if(s)-1!==ee.inArray(V.escape.htmlEntities(String(n)),i.map(String).map(V.escape.htmlEntities))&&(o=o?o.add(e):e);else if(a){if(V.verbose("Ambiguous dropdown value using strict type check",e,i),n===i)return o=e,!0}else if(v.ignoreCase&&(n=n.toLowerCase(),i=i.toLowerCase()),V.escape.htmlEntities(String(n))===V.escape.htmlEntities(String(i)))return V.verbose("Found select item by value",n,i),o=e,!0}),o},displayType:function(){return w.hasClass("column")?"flex":v.displayType}},check:{maxSelections:function(e){return!!v.maxSelections&&((e=void 0!==e?e:V.get.selectionCount())>=v.maxSelections?(V.debug("Maximum selection count reached"),v.useLabels&&(y.addClass(f.filtered),V.add.message(m.maxSelections)),!0):(V.verbose("No longer at maximum selection count"),V.remove.message(),V.remove.filteredItem(),V.is.searchSelection()&&V.filterItems(),!1))},disabled:function(){h.attr("tabindex",V.is.disabled()?-1:0)}},restore:{defaults:function(e){V.clear(e),V.restore.defaultText(),V.restore.defaultValue()},defaultText:function(){var e=V.get.defaultText();e===V.get.placeholderText?(V.debug("Restoring default placeholder text",e),V.set.placeholderText(e)):(V.debug("Restoring default text",e),V.set.text(e))},placeholderText:function(){V.set.placeholderText()},defaultValue:function(){var e=V.get.defaultValue();void 0!==e&&(V.debug("Restoring default value",e),""!==e?(V.set.value(e),V.set.selected()):(V.remove.activeItem(),V.remove.selectedItem()))},labels:function(){v.allowAdditions&&(v.useLabels||(V.error(l.labels),v.useLabels=!0),V.debug("Restoring selected values"),V.create.userLabels()),V.check.maxSelections()},selected:function(){V.restore.values(),V.is.multiple()?(V.debug("Restoring previously selected values and labels"),V.restore.labels()):V.debug("Restoring previously selected values")},values:function(){V.set.initialLoad(),v.apiSettings&&v.saveRemoteData&&V.get.remoteValues()?V.restore.remoteValues():V.set.selected();var e=V.get.value();!e||""===e||Array.isArray(e)&&0===e.length?d.addClass(f.noselection):d.removeClass(f.noselection),V.remove.initialLoad()},remoteValues:function(){var e=V.get.remoteValues();V.debug("Recreating selected from session data",e),e&&(V.is.single()?ee.each(e,function(e,t){V.set.text(t)}):v.useLabels&&ee.each(e,function(e,t){V.add.label(e,t)}))}},read:{remoteData:function(e){if(void 0!==te.Storage)return void 0!==(e=sessionStorage.getItem(e+D))&&e;V.error(l.noStorage)}},save:{defaults:function(){V.save.defaultText(),V.save.placeholderText(),V.save.defaultValue()},defaultValue:function(){var e=V.get.value();V.verbose("Saving default value as",e),w.data(p.defaultValue,e)},defaultText:function(){var e=V.get.text();V.verbose("Saving default text as",e),w.data(p.defaultText,e)},placeholderText:function(){var e;!1!==v.placeholder&&r.hasClass(f.placeholder)&&(e=V.get.text(),V.verbose("Saving placeholder text as",e),w.data(p.placeholderText,e))},remoteData:function(e,t){void 0===te.Storage?V.error(l.noStorage):(V.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t+D,e))}},clear:function(e){V.is.multiple()&&v.useLabels?V.remove.labels(w.find(b.label),e):(V.remove.activeItem(),V.remove.selectedItem(),V.remove.filteredItem()),V.set.placeholderText(),V.clearValue(e)},clearValue:function(e){V.set.value("",null,null,e)},clearCache:function(){V.debug("Clearing API cache once"),M=!0},scrollPage:function(e,t){let n=t||V.get.selectedItem(),i=n.closest(b.menu);var t=i.outerHeight(),a=i.scrollTop(),o=y.eq(0).outerHeight(),t=Math.floor(t/o),a="up"===e?a-o*t:a+o*t;let s=y.not(b.unselectable),l;o="up"===e?s.index(n)-t:s.index(n)+t,t="up"===e?0<=o:o<s.length,0<(l=t?s.eq(o):"up"===e?s.first():s.last()).length&&(V.debug("Scrolling page",e,l),n.removeClass(f.selected),l.addClass(f.selected),v.selectOnKeydown&&V.is.single()&&!l.hasClass(f.actionable)&&V.set.selectedItem(l),i.scrollTop(a))},set:{filtered:function(){var e=V.is.multiple(),t=V.is.searchSelection(),n=e&&t,t=t?V.get.query():"",i="string"==typeof t&&0<t.length,a=V.get.searchWidth(),t=""!==t;e&&i&&(V.verbose("Adjusting input width",a),h.css("width",a+"px")),i||n&&t?(V.verbose("Hiding placeholder text"),r.addClass(f.filtered)):e&&(!n||t)||(V.verbose("Showing placeholder text"),r.removeClass(f.filtered))},empty:function(){w.addClass(f.empty)},loading:function(){w.addClass(f.loading)},placeholderText:function(e){e=e||V.get.placeholderText(),V.debug("Setting placeholder text",e),V.set.text(e),r.addClass(f.placeholder)},tabbable:function(){V.is.searchSelection()?(V.debug("Added tabindex to searchable dropdown"),h.val(""),V.check.disabled(),C.attr("tabindex",-1)):(V.debug("Added tabindex to dropdown"),void 0===w.attr("tabindex")&&(w.attr("tabindex",d.attr("tabindex")||0),C.attr("tabindex",-1))),d.removeAttr("tabindex")},initialLoad:function(){V.verbose("Setting initial load"),K=!0},activeItem:function(e){v.allowAdditions&&0<e.filter(b.addition).length?e.addClass(f.filtered):e.addClass(f.active)},partialSearch:function(e){var t=V.get.query().length;h.val(e.slice(0,t))},scrollPosition:function(e,t){var n,i;let a,o,s;e=e||V.get.selectedItem(),a=e.closest(b.menu),n=e&&0<e.length,t=void 0!==t&&t,0===V.get.activeItem().length&&(t=!1),e&&0<a.length&&n&&(e.position().top,a.addClass(f.loading),e=(n=a.scrollTop())-a.offset().top+e.offset().top,t||(i=a.height(),s=n+i<e+5,o=e-5<n),V.debug("Scrolling to active item",e),(t||o||s)&&a.scrollTop(e),a.removeClass(f.loading))},text:function(e,t){"combo"===v.action?(V.debug("Changing combo button text",e,i),v.preserveHTML?i.html(e):i.text(e)):"activate"!==v.action&&!ie(v.action)||(e===V.get.placeholderText()&&!t||r.removeClass(f.placeholder),V.debug("Changing text",e,r),r.removeClass(f.filtered),v.preserveHTML?r.html(e):r.text(e))},selectedItem:function(e){var t=V.get.choiceValue(e),n=V.get.choiceText(e,!1),i=V.get.choiceText(e);V.debug("Setting user selection to item",e),V.remove.activeItem(),V.set.partialSearch(n),V.set.activeItem(e),V.set.selected(t,e),V.set.text(i)},selectedLetter:function(e){let t=y.filter("."+f.selected);var n=0<t.length&&V.has.firstLetter(t,e);let i=!1,a;n&&(a=t.nextAll(y).eq(0),V.has.firstLetter(a,e)&&(i=a)),i||y.each(function(){if(V.has.firstLetter(ee(this),e))return i=ee(this),!1}),i&&(V.verbose("Scrolling to next value with letter",e),V.set.scrollPosition(i),t.removeClass(f.selected),i.addClass(f.selected),!v.selectOnKeydown||!V.is.single()||a&&a.hasClass(f.actionable)||V.set.selectedItem(i))},direction:function(e){"auto"===v.direction?(e?V.is.upward(e)&&V.remove.upward(e):V.remove.upward(),(V.can.openDownward(e)?V.remove:V.set).upward(e),V.is.leftward(e)||V.can.openRightward(e)||V.set.leftward(e)):"upward"===v.direction&&V.set.upward(e)},upward:function(e){let t=e||w;t.addClass(f.upward)},leftward:function(e){let t=e||C;t.addClass(f.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?d.addClass(f.noselection):d.removeClass(f.noselection);var a=V.escape.value(e),o=0<d.length,s=V.get.values(),l=void 0!==e?String(e):e;if(o){if(!v.allowReselection&&l==s&&(V.verbose("Skipping value update already same value",e,s),!V.is.initialLoad()))return;V.is.single()&&V.has.selectInput()&&V.can.extendSelect()&&(V.debug("Adding user option",e),V.add.optionValue(e)),V.debug("Updating input value",a,s),H=!0,d.val(a),!1===v.fireOnInit&&V.is.initialLoad()?V.debug("Input native change event ignored on initial load"):!0!==i&&V.trigger.change(),H=!1}else V.verbose("Storing value in metadata",a,d),a!==s&&w.data(p.value,l);!1===v.fireOnInit&&V.is.initialLoad()?V.verbose("No callback on initial load",v.onChange):!0!==i&&v.onChange.call(A,e,t,n)},active:function(){w.addClass(f.active)},multiple:function(){w.addClass(f.multiple)},visible:function(){w.addClass(f.visible)},exactly:function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),V.debug("Setting selected to exact values"),V.clear(),V.set.selected(e,t,n)},selected:function(e,r,c,d){"boolean"==typeof r&&(d=c,c=r,r=void 0);let u=V.is.multiple();return!(!(r=v.allowAdditions?r||V.get.itemWithAdditions(e):r||V.get.item(e))&&void 0!==e)&&(u?(d||V.remove.searchWidth(),v.useLabels&&(V.remove.selectedItem(),void 0===e&&V.remove.labels(w.find(b.label),!0))):(V.remove.activeItem(),V.remove.selectedItem()),!!r&&(V.debug("Setting selected menu item to",r),r.each(function(){let e=ee(this);var t=V.get.choiceText(e),n=V.get.choiceValue(e,t),i=e.hasClass(f.filtered),a=e.hasClass(f.active),o=e.hasClass(f.actionable),s=e.hasClass(f.addition),l=u&&r&&1===r.length;o?(u&&a&&!s||!v.apiSettings||!v.saveRemoteData||V.save.remoteData(t,n),v.onActionable.call(A,n,t,e)):u?!a||s?(v.apiSettings&&v.saveRemoteData&&V.save.remoteData(t,n),v.useLabels?(V.add.label(n,t,l),V.add.value(n,t,e,c),V.set.activeItem(e),V.filterActive(),V.select.nextAvailable(r)):(V.add.value(n,t,e,c),V.set.text(V.add.variables(m.count)),V.set.activeItem(e))):i||!v.useLabels&&!U||(V.debug("Selected active value, removing label"),V.remove.selected(n)):(v.apiSettings&&v.saveRemoteData&&V.save.remoteData(t,n),d||e.hasClass(f.actionable)||V.set.text(t,!0),V.set.value(n,t,e,c),e.addClass(f.active).addClass(f.selected))}),d||V.remove.searchTerm(),void(V.is.allFiltered()&&(V.set.empty(),V.hideMenu()))))}},add:{label:function(e,t,n){var i=V.is.searchSelection()?h:r;let a=V.escape.value(e),o;v.ignoreCase&&(a=a.toLowerCase()),o=ee("<a />").addClass(f.label).attr("data-"+p.value,a).html(s.label(a,t,v)),o=v.onLabelCreate.call(o,a,t),V.has.label(e)?V.debug("User selection already exists, skipping",a):(v.label.variation&&o.addClass(v.label.variation),!0===n&&v.label.transition?(V.debug("Animating in label",o),o.addClass(f.hidden).insertBefore(i).transition({animation:v.label.transition,debug:v.debug,verbose:v.verbose,silent:v.silent,duration:v.label.duration})):(V.debug("Adding selection label",o),o.insertBefore(i)))},message:function(e){let t=C.children(b.message);e=v.templates.message(V.add.variables(e));0<t.length?t.html(e):ee("<div/>").html(e).addClass(f.message).appendTo(C)},optionValue:function(e){var t=V.escape.value(e);0<d.find('option[value="'+CSS.escape(t)+'"]').length||(V.disconnect.selectObserver(),V.is.single()&&(V.verbose("Removing previous user addition"),d.find("option."+f.addition).remove()),ee("<option/>").prop("value",t).addClass(f.addition).text(e).appendTo(d),V.verbose("Adding user addition as an <option>",e),V.observe.select())},userSuggestion:function(e){let t=C.children(b.addition),n=V.get.item(e);var i=n&&0<n.not(b.addition).length,a=0<t.length;v.useLabels&&V.has.maxSelections()||(""===e||i?t.remove():(a?(t.data(p.value,e).data(p.text,e).attr("data-"+p.value,e).attr("data-"+p.text,e).removeClass(f.filtered),v.hideAdditions||(i=v.templates.addition(V.add.variables(m.addResult,e)),t.html(i)),V.verbose("Replacing user suggestion with new value",t)):((t=V.create.userChoice(e)).prependTo(C),V.verbose("Adding item choice to menu corresponding with user choice addition",t)),v.hideAdditions&&!V.is.allFiltered()||t.addClass(f.selected).siblings().removeClass(f.selected),V.refreshItems()))},variables:function(e,t){var n=-1!==e.search("{count}"),i=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return V.verbose("Adding templated variables to message",e),n&&(e=e.replace("{count}",V.get.selectionCount())),i&&(e=e.replace("{maxCount}",v.maxSelections)),a&&(n=t||V.get.query(),e=e.replace("{term}",n)),e},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=void 0);let a=V.get.values(!0),o;V.has.value(e)?V.debug("Value already selected"):""===e?V.debug("Cannot select blank values from multiselect"):(o=Array.isArray(a)?(o=n&&n.hasClass(f.actionable)?a:a.concat([e]),V.get.uniqueArray(o)):[e],V.has.selectInput()?V.can.extendSelect()&&(V.debug("Adding value to select",e,o,d),V.add.optionValue(e)):(o=o.join(v.delimiter),V.debug("Setting hidden input to delimited value",o,d)),!1===v.fireOnInit&&V.is.initialLoad()?V.verbose("Skipping onadd callback on initial load",v.onAdd):v.onAdd.call(A,e,t,n),V.set.value(o,t,n,i),V.check.maxSelections())}},remove:{active:function(){w.removeClass(f.active)},activeLabel:function(){w.find(b.label).removeClass(f.active)},empty:function(){w.removeClass(f.empty)},loading:function(){w.removeClass(f.loading)},initialLoad:function(){K=!1},upward:function(e){let t=e||w;t.removeClass(f.upward)},leftward:function(e){let t=e||C;t.removeClass(f.leftward)},visible:function(){w.removeClass(f.visible)},activeItem:function(){y.removeClass(f.active)},filteredItem:function(){v.highlightMatches&&ee.each(y,function(e,t){let n=ee(t);n.html(n.html().replace(/<\/?mark>/g,""))}),v.useLabels&&V.has.maxSelections()||((v.useLabels&&V.is.multiple()?y.not("."+f.active):y).removeClass(f.filtered),v.hideDividers&&u.removeClass(f.hidden),V.remove.empty())},optionValue:function(e){e=V.escape.value(e);let t=d.find('option[value="'+CSS.escape(e)+'"]');0<t.length&&t.hasClass(f.addition)&&(V.disconnect.selectObserver(),t.remove(),V.verbose("Removing user addition as an <option>",e),V.observe.select())},message:function(){C.children(b.message).remove()},searchWidth:function(){h.css("width","")},searchTerm:function(){V.verbose("Cleared search term"),h.val(""),V.set.filtered()},userAddition:function(){y.filter(b.addition).remove()},selected:function(e,t,i){if(!(t=v.allowAdditions?t||V.get.itemWithAdditions(e):t||V.get.item(e)))return!1;t.each(function(){let e=ee(this);var t=V.get.choiceText(e),n=V.get.choiceValue(e,t);V.is.multiple()?v.useLabels?(V.remove.value(n,t,e,i),V.remove.label(n)):(V.remove.value(n,t,e,i),0===V.get.selectionCount()?V.set.placeholderText():V.set.text(V.add.variables(m.count))):V.remove.value(n,t,e,i),e.removeClass(f.filtered).removeClass(f.active),v.useLabels&&e.removeClass(f.selected)})},selectedItem:function(){y.removeClass(f.selected)},value:function(e,t,n,i){var a=V.get.values(!0);let o;V.has.selectInput()?(V.verbose("Input is <select> removing selected option",e),o=V.remove.arrayValue(e,a),V.remove.optionValue(e)):(V.verbose("Removing from delimited values",e),o=(o=V.remove.arrayValue(e,a)).join(v.delimiter)),!1===v.fireOnInit&&V.is.initialLoad()?V.verbose("No callback on initial load",v.onRemove):v.onRemove.call(A,e,t,n),V.set.value(o,t,n,i),V.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=ee.grep(e,function(e){return t!=e}),V.verbose("Removed value from delimited string",t,e),e},label:function(e,t){let n=V.escape.value(e),i=w.find(b.label),a=i.filter("[data-"+p.value+'="'+CSS.escape(v.ignoreCase?n.toLowerCase():n)+'"]');V.verbose("Removing label",a),a.remove()},activeLabels:function(e){e=e||w.find(b.label).filter("."+f.active),V.verbose("Removing active label selections",e),V.remove.labels(e)},labels:function(e,a){e=e||w.find(b.label),V.verbose("Removing labels",e),e.each(function(){let e=ee(this);var t=e.data(p.value),n=void 0!==t?String(t):t,i=V.is.userValue(n);!1===v.onLabelRemove.call(e,t)?V.debug("Label remove callback cancelled removal"):(V.remove.message(),i?(V.remove.value(n,n,V.get.item(n),a),V.remove.label(n)):V.remove.selected(n,!1,a))})},tabbable:function(){V.is.searchSelection()?(V.debug("Searchable dropdown initialized"),h.removeAttr("tabindex")):(V.debug("Simple selection dropdown initialized"),w.removeAttr("tabindex")),C.removeAttr("tabindex")},diacritics:function(e){return v.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},has:{menuSearch:function(){return V.has.search()&&0<h.closest(C).length},clearItem:function(){return 0<N.length},search:function(){return 0<h.length},sizer:function(){return 0<n.length},selectInput:function(){return d.is("select")},minCharacters:function(e){return v.minCharacters&&!x?(e=void 0!==e?String(e):String(V.get.query())).length>=v.minCharacters:!(x=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=V.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<d.length},items:function(){return 0<y.length},menu:function(){return 0<C.length},subMenu:function(e){return 0<(e||C).find(b.menu).length},message:function(){return 0<C.children(b.message).length},label:function(e){let t=V.escape.value(e),n=w.find(b.label);return v.ignoreCase&&(t=t.toLowerCase()),0<n.filter("[data-"+p.value+'="'+CSS.escape(t)+'"]').length},maxSelections:function(){return v.maxSelections&&V.get.selectionCount()>=v.maxSelections},allResultsFiltered:function(){let e=y.not(b.addition);return e.filter(b.unselectable).length===e.length},userSuggestion:function(){return 0<C.children(b.addition).length},query:function(){return""!==V.get.query()},value:function(e){return v.ignoreCase?V.has.valueIgnoringCase(e):V.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=V.get.values(!0);return!!(Array.isArray(t)?t&&-1!==ee.inArray(e,t):t==e)},valueIgnoringCase:function(n){let e=V.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(f.active)},animatingInward:function(){return C.transition("is inward")},animatingOutward:function(){return C.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(F).length},empty:function(){return w.hasClass(f.empty)},chrome:function(){return!!te.chrome&&!te.StyleMedia},alreadySetup:function(){return w.is("select")&&void 0!==w.parent(b.dropdown).data(e)&&0===w.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):C.transition&&C.transition("is animating")},leftward:function(e){let t=e||C;return t.hasClass(f.leftward)},clearable:function(){var e=w.hasClass(f.clearable);return!e&&v.clearable&&w.addClass(f.clearable),e||v.clearable},disabled:function(){return w.hasClass(f.disabled)},focused:function(){return ne.activeElement===w[0]},focusedOnSearch:function(){return ne.activeElement===h[0]},allFiltered:function(){return(V.is.multiple()||V.has.search())&&!(!v.hideAdditions&&V.has.userSuggestion())&&!V.has.message()&&V.has.allResultsFiltered()},hidden:function(e){return!V.is.visible(e)},initialLoad:function(){return K},inObject:function(n,e){let i=!1;return ee.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return w.hasClass(f.multiple)},remote:function(){return v.apiSettings&&V.can.useAPI()},noApiCache:function(){return M||v.apiSettings&&!v.apiSettings.cache},single:function(){return!V.is.multiple()},selectMutation:function(e){let 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(f.search)},searchSelection:function(e){return V.has.search()&&1===(e?h.parents(b.dropdown):h.parent(b.dropdown)).length},selection:function(){return w.hasClass(f.selection)},userValue:function(e){return-1!==ee.inArray(e,V.get.userValues())},upward:function(e){let t=e||w;return t.hasClass(f.upward)},visible:function(e){return(e||C).hasClass(f.visible)},verticallyScrollableContext:function(){var e=a[0]!==te&&a.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=a[0]!==te&&a.css("overflow-X");return"auto"===e||"scroll"===e}},can:{activate:function(e){return v.useLabels||!V.has.maxSelections()||V.has.maxSelections()&&e.hasClass(f.active)},openDownward:function(e){let t=e||C,n;let i;return t.addClass(f.loading),i={context:{offset:a[0]===te?{top:0,left:0}:a.offset(),scrollTop:a.scrollTop(),height:a.outerHeight()},menu:{offset:t.offset(),height:t.outerHeight()}},V.is.verticallyScrollableContext()&&(i.menu.offset.top+=i.context.scrollTop),V.has.subMenu(t)&&(i.menu.height+=t.find(b.menu).first().outerHeight()),e={above:i.context.scrollTop<=i.menu.offset.top-i.context.offset.top-i.menu.height,below:i.context.scrollTop+i.context.height>=i.menu.offset.top-i.context.offset.top+i.menu.height},n=e.below?(V.verbose("Dropdown can fit in context downward",e),!0):e.above?(V.verbose("Dropdown cannot fit below, opening upward",e),!1):(V.verbose("Dropdown cannot fit in either direction, favoring downward",e),!0),t.removeClass(f.loading),n},openRightward:function(e){let t=e||C,n=!0;let i;return t.addClass(f.loading),i={context:{offset:a[0]===te?{top:0,left:0}:a.offset(),scrollLeft:a.scrollLeft(),width:a.outerWidth()},menu:{offset:t.offset(),width:t.outerWidth()}},V.is.horizontallyScrollableContext()&&(i.menu.offset.left+=i.context.scrollLeft),(e=i.menu.offset.left-i.context.offset.left+i.menu.width>=i.context.scrollLeft+i.context.width)&&(V.verbose("Dropdown cannot fit in context rightward",e),n=!1),t.removeClass(f.loading),n},extendSelect:function(){return v.allowAdditions||v.apiSettings},show:function(){return!V.is.disabled()&&(V.has.items()||V.has.message())},useAPI:function(){return void 0!==ee.fn.api},useElement:function(e){return void 0!==ee.fn[e]||(V.error(l.noElement.replace("{element}",e)),!1)}},animate:{show:function(e,t){let n=t||C,i=t?function(){}:function(){V.hideSubMenus(),V.hideOthers(),V.set.active()};e=ie(e)?e:function(){},V.verbose("Doing menu show animation",n),V.set.direction(t),t=v.transition.showMethod||V.get.transition(t),V.is.selection()&&V.set.scrollPosition(V.get.selectedItem(),!0),(V.is.hidden(n)||V.is.animating(n))&&("none"===t?(i(),n.transition({displayType:V.get.displayType()}).transition("show"),e.call(A)):V.can.useElement("transition")&&n.transition({animation:t+" in",debug:v.debug,verbose:v.verbose,silent:v.silent,duration:v.transition.showDuration||v.duration,queue:!0,onStart:i,displayType:V.get.displayType(),onComplete:function(){e.call(A)}}))},hide:function(e,t){let n=t||C,i=t?function(){}:function(){V.unbind.intent(),V.remove.active()};t=v.transition.hideMethod||V.get.transition(t);e=ie(e)?e:function(){},(V.is.visible(n)||V.is.animating(n))&&(V.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:V.get.displayType()}).transition("hide"),e.call(A)):void 0!==ee.fn.transition?n.transition({animation:t+" out",duration:v.transition.hideDuration||v.duration,debug:v.debug,verbose:v.verbose,silent:v.silent,queue:!1,onStart:i,displayType:V.get.displayType(),onComplete:function(){e.call(A)}}):V.error(l.transition))}},hideAndClear:function(){V.remove.searchTerm(),V.has.maxSelections()||(V.has.search()?V.hide(function(){V.remove.filteredItem()}):V.hide())},delay:{show:function(){V.verbose("Delaying show event to ensure user intent"),clearTimeout(V.timer),V.timer=setTimeout(function(){V.show()},v.delay.show)},hide:function(){V.verbose("Delaying hide event to ensure user intent"),clearTimeout(V.timer),V.timer=setTimeout(function(){V.hide()},v.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,n=n&&-1!==e.search(o.quote);let a=[];return i||!n?e:(V.debug("Encoding quote values for use in select",e),t?(ee.each(e,function(e,t){a.push(t.replace(o.quote,"""))}),a):e.replace(o.quote,"""))},string:function(e){return(e=String(e)).replace(o.escape,"\\$&")},htmlEntities:function(e,t){t=(t="number"!=typeof t&&t)?/["&'<>]/g:/["'<>]|&(?![\d#A-Za-z]{1,12};)/g;const n={'"':""","&":"&","'":"'","<":"<",">":">"};return String(e).replace(t,e=>n[e])}},setting:function(e,t){if(V.debug("Changing setting",e,t),ee.isPlainObject(e))ee.extend(!0,v,e);else{if(void 0===t)return v[e];ee.isPlainObject(v[e])?ee.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(ee.isPlainObject(e))ee.extend(!0,V,e);else{if(void 0===t)return V[e];V[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?V.performance.log(arguments):(V.debug=Function.prototype.bind.call(console.info,console,v.name+":"),V.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?V.performance.log(arguments):(V.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),V.verbose.apply(console,arguments)))},error:function(){v.silent||(V.error=Function.prototype.bind.call(console.error,console,v.name+":"),V.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=Date.now())-($||t),$=t,_.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:A,"Execution Time":n})),clearTimeout(V.performance.timer),V.performance.timer=setTimeout(function(){V.performance.display()},500)},display:function(){var e=v.name+":";let n=0;$=!1,clearTimeout(V.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){let a=k,o,s,n;return e=e||Y,t=t||A,"string"==typeof i&&void 0!==a&&(i=i.split(/[ .]/),o=i.length-1,ee.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(ee.isPlainObject(a[n])&&e!==o)a=a[n];else{if(void 0!==a[n])return s=a[n],!1;{if(!ee.isPlainObject(a[t])||e===o)return void 0!==a[t]?s=a[t]:V.error(l.method,i),!1;a=a[t]}}})),ie(s)?n=s.apply(t,e):void 0!==s&&(n=s),Array.isArray(J)?J.push(n):void 0!==J?J=[J,n]:void 0!==n&&(J=n),s}},X?(void 0===k&&V.initialize(),V.invoke(Q)):(void 0!==k&&k.invoke("destroy"),V.initialize())}),void 0!==J?J:B},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",highlightMatches:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!1,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,collapseOnClearable:!1,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}"},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",data:"data",type:"type",image:"image",imageClass:"imageClass",alt:"alt",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={escape:function(e,t){if(void 0!==t&&t.preserveHTML)return e;const n={'"':""","&":"&","'":"'","<":"<",">":">"};return String(e).replace(/["'<>]|&(?![\d#A-Za-z]{1,12};)/g,e=>n[e])},dropdown:function(e,t){var n=e.placeholder||!1,i="",a=t.className;let o=t.templates.escape;return(i+='<i class="dropdown icon"></i>')+(n?'<div class="default text">'+o(n,t)+"</div>":'<div class="text"></div>')+('<div class="'+o(a.menu)+'">')+t.templates.menu(e,t)+"</div>"},menu:function(e,u){let v=u.fields;e=e[v.values]||[];let m="",h=u.className,f=u.templates.escape;return ee.each(e,function(e,t){let n=t[v.type]||"item";var i=-1!==n.indexOf("menu");let a="";var o,s,l,r,c,d=t[v.data];if(d){let e,t;for(e in d)t=String(e).replace(/\W/g,""),Object.prototype.hasOwnProperty.call(d,e)&&-1===["text","value"].indexOf(t.toLowerCase())&&(a+=" data-"+t+'="'+f(String(d[e]))+'"')}"item"===n||i?(o=t[v.text]?' data-text="'+f(t[v.text])+'"':"",r=t[v.actionable]?h.actionable+" ":"",c=t[v.disabled]?h.disabled+" ":"",s=t[v.descriptionVertical]?h.descriptionVertical+" ":"",l=""!==f(t[v.description]||"",u),m+='<div class="'+f(r+c+s+(t[v.class]||h.item))+'" data-value="'+f(t[v.value])+'"'+o+a+">",i&&(m+='<i class="'+(-1!==n.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[v.image]&&(m+='<img class="'+f(t[v.imageClass]||h.image)+'" src="'+f(t[v.image])+'"'+(t[v.alt]?' alt="'+f(t[v.alt])+'"':"")+">"),t[v.icon]&&(m+='<i class="'+f(t[v.icon]+" "+(t[v.iconClass]||h.icon))+'"></i>'),l&&(m=(m+='<span class="'+f(h.description)+'">'+f(t[v.description]||"",u)+"</span>")+(i?"":'<span class="'+f(h.text)+'">')),i&&(m+='<span class="'+f(h.text)+'">'),m+=f(t[v.name]||"",u),i?m=(m=(m+="</span>")+'<div class="'+f(n)+'">')+u.templates.menu(t,u)+"</div>":l&&(m+="</span>"),m+="</div>"):"header"===n&&(r=t[v.name]||"",c=t[v.icon]||h.groupIcon,""===r&&""===c||(m+='<div class="'+f(t[v.class]||h.header)+'">',""!==c&&(m+='<i class="'+f(c+" "+(t[v.iconClass]||h.icon))+'"></i>'),m=m+f(r,u)+"</div>"),t[v.divider]&&(m+='<div class="'+f(h.divider)+'"></div>'))}),m},label:function(e,t,n){var i=n.className;let a=n.templates.escape;return a(t,n)+'<i class="'+a(i.delete)+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document);
|
11
|
+
!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(W){let B=ee(this),G=ee(ne),$=Date.now(),_=[],Q=W,X="string"==typeof Q,Y=[].slice.call(arguments,1),J=function(e,t){let n;return 0<=[te,ne].indexOf(e)?n=ee(e):0===(n=ee(t.document).find(e)).length&&(n=t.frameElement?J(e,t.parent):te),n},Z;return B.each(function(P){let v=ee.isPlainObject(W)?ee.extend(!0,{},ee.fn.dropdown.settings,W):ee.extend({},ee.fn.dropdown.settings),f=v.className,m=v.message,c=v.fields,g=v.keys,p=v.metadata;var z=v.namespace;let F=v.regExp,b=v.selector,l=v.error,o=v.templates,t="."+z,e="module-"+z,w=ee(this),a=J(v.context,te),s=w.find(b.text),h=w.find(b.search),n=w.find(b.sizer),r=w.find(b.input),i=w.find(b.icon),H=w.find(b.clearIcon),d=0<w.prev().find(b.text).length?w.prev().find(b.text):w.prev(),C=w.children(b.menu),y=C.find(b.item),u=v.hideDividers?y.parent().children(b.divider):ee(),S=!1,N=!1,j=!1,x=!1,A=this,T=!1,k=w.data(e),U,K,L,I,D,O,R,E,q,V,M=!1;V={initialize:function(){V.debug("Initializing dropdown",v),V.is.alreadySetup()?V.setup.reference():(V.create.id(),V.setup.layout(),v.values&&(V.set.initialLoad(),V.change.values(v.values),V.remove.initialLoad()),""!==V.get.placeholderText()&&V.set.placeholderText(),V.refreshData(),V.save.defaults(),V.restore.selected(),V.bind.events(),V.observeChanges(),V.instantiate())},instantiate:function(){V.verbose("Storing instance of dropdown",V),k=V,w.data(e,V)},destroy:function(){V.verbose("Destroying previous dropdown",w),V.remove.tabbable(),V.remove.active(),C.transition("stop all"),C.removeClass(f.visible).addClass(f.hidden),w.off(t).removeData(e),C.off(t),G.off(D),V.disconnect.menuObserver(),V.disconnect.selectObserver(),V.disconnect.classObserver()},observeChanges:function(){R=new MutationObserver(V.event.select.mutation),E=new MutationObserver(V.event.menu.mutation),q=new MutationObserver(V.event.class.mutation),V.debug("Setting up mutation observer",R,E,q),V.observe.select(),V.observe.menu(),V.observe.class()},disconnect:{menuObserver:function(){E&&E.disconnect()},selectObserver:function(){R&&R.disconnect()},classObserver:function(){q&&q.disconnect()}},observe:{select:function(){V.has.input()&&R&&R.observe(w[0],{attributes:!0,childList:!0,subtree:!0})},menu:function(){V.has.menu()&&E&&E.observe(C[0],{childList:!0,subtree:!0})},class:function(){V.has.search()&&q&&q.observe(w[0],{attributes:!0})}},create:{id:function(){O=(Math.random().toString(16)+"000000000").slice(2,10),D="."+O,V.verbose("Creating unique id for element",O)},userChoice:function(e){let n,i,a;return!!(e=e||V.get.userValues())&&(e=Array.isArray(e)?e:[e],ee.each(e,function(e,t){!1===V.get.item(t)&&(a=v.templates.addition(V.add.variables(m.addResult,v.templates.escape(t,v))),i=ee("<div />").html(a).attr("data-"+p.value,t).attr("data-"+p.text,t).addClass(f.addition).addClass(f.item),v.hideAdditions&&i.addClass(f.hidden),n=void 0===n?i:n.add(i),V.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=V.get.userValues();t&&(V.debug("Adding user labels",t),ee.each(t,function(e,t){V.verbose("Adding custom user value"),V.add.label(t,t)}))},menu:function(){C=ee("<div />").addClass(f.menu).appendTo(w)},sizer:function(){n=ee("<span />").addClass(f.sizer).insertAfter(h)}},search:function(e){e=void 0!==e?e:V.get.query(),V.verbose("Searching for query",e),!1===v.fireOnInit&&V.is.initialLoad()?V.verbose("Skipping callback on initial load",v.onSearch):V.has.minCharacters(e)&&!1!==v.onSearch.call(A,e)?V.filter(e):V.hide(null,!0)},select:{firstUnfiltered:function(){V.verbose("Selecting first non-filtered element"),V.remove.selectedItem(),y.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(f.selected)},nextAvailable:function(e){let t=(e=e.eq(0)).nextAll(b.item).not(b.unselectable).eq(0),n=e.prevAll(b.item).not(b.unselectable).eq(0);0<t.length?(V.verbose("Moving selection to",t),t.addClass(f.selected)):(V.verbose("Moving selection to",n),n.addClass(f.selected))}},setup:{api:function(){var e={debug:v.debug,urlData:{value:V.get.value(),query:V.get.query()},on:!1};V.verbose("First request, initializing API"),w.api(e)},layout:function(){if(w.is("select")&&(V.setup.select(),V.setup.returnedObject()),V.has.menu()||V.create.menu(),V.is.clearable()&&!V.has.clearItem()&&(V.verbose("Adding clear icon"),H=ee("<i />").addClass("remove icon").insertAfter(i)),V.is.search()&&!V.has.search()){V.verbose("Adding search input");let e=w.prev("label");h=ee("<input />").addClass(f.search).prop("autocomplete",V.is.chrome()?"fomantic-search":"off"),0<e.length&&(e.attr("id")||e.attr("id","_"+V.get.id()+"_formLabel"),h.attr("aria-labelledby",e.attr("id"))),h.insertBefore(s)}V.is.multiple()&&V.is.searchSelection()&&!V.has.sizer()&&V.create.sizer(),v.allowTab&&V.set.tabbable()},select:function(){var e=V.get.selectValues();V.debug("Dropdown initialized on a select",e),0<(r=w.is("select")?w:r).parent(b.dropdown).length?(V.debug("UI dropdown already exists. Creating dropdown menu only"),w=r.closest(b.dropdown),V.has.menu()||V.create.menu(),C=w.children(b.menu),V.setup.menu(e)):(V.debug("Creating entire dropdown from select"),w=ee("<div />").attr("class",r.attr("class")).addClass(f.selection).addClass(f.dropdown).html(o.dropdown(e,v)).insertBefore(r),r.hasClass(f.multiple)&&!1===r.prop("multiple")&&(V.error(l.missingMultiple),r.prop("multiple",!0)),r.is("[multiple]")&&V.set.multiple(),r.prop("disabled")&&(V.debug("Disabling dropdown"),w.addClass(f.disabled)),r.is("[required]")&&(v.forceSelection=!0),v.allowTab||r.removeAttr("tabindex"),r.prop("required",!1).removeAttr("class").detach().prependTo(w)),V.refresh()},menu:function(e){C.html(o.menu(e,v)),y=C.find(b.item),u=v.hideDividers?y.parent().children(b.divider):ee()},reference:function(){V.debug("Dropdown behavior was called on select, replacing with closest dropdown"),w=w.parent(b.dropdown),k=w.data(e),A=w[0],V.refresh(),V.setup.returnedObject()},returnedObject:function(){let e=B.slice(0,P);var t=B.slice(P+1);B=e.add(w).add(t)}},refresh:function(){V.refreshSelectors(),V.refreshData()},refreshItems:function(){y=C.find(b.item),u=v.hideDividers?y.parent().children(b.divider):ee()},refreshSelectors:function(){V.verbose("Refreshing selector cache"),s=w.find(b.text),h=w.find(b.search),r=w.find(b.input),i=w.find(b.icon),d=0<w.prev().find(b.text).length?w.prev().find(b.text):w.prev(),C=w.children(b.menu),y=C.find(b.item),u=v.hideDividers?y.parent().children(b.divider):ee()},refreshData:function(){V.verbose("Refreshing cached metadata"),y.removeData(p.text).removeData(p.value)},clearData:function(){V.verbose("Clearing metadata"),y.removeData(p.text).removeData(p.value),w.removeData(p.defaultText).removeData(p.defaultValue).removeData(p.placeholderText)},clearItems:function(){C.empty(),V.refreshItems()},toggle:function(){V.verbose("Toggling menu visibility"),V.is.active()?V.hide():V.show()},show:function(e,t){if(e=ie(e)?e:function(){},(T||x)&&V.is.remote()&&V.is.noApiCache()&&!V.has.maxSelections()&&V.clearItems(),!V.can.show()&&V.is.remote()&&(V.debug("No API results retrieved, searching before show"),V.queryRemote(V.get.query(),V.show,[e,t])),V.can.show()&&!V.is.active()){if(V.debug("Showing dropdown"),!V.has.message()||V.has.maxSelections()||V.has.allResultsFiltered()||V.remove.message(),V.is.allFiltered())return!0;!1!==v.onShow.call(A)&&(V.remove.empty(),V.animate.show(function(){V.bind.intent(),V.has.search()&&!t&&V.focusSearch(),V.set.visible(),e.call(A)}))}},hide:function(t,n){if(t=ie(t)?t:function(){},V.is.active()&&!V.is.animatingOutward()){if(V.debug("Hiding dropdown"),!1!==v.onHide.call(A)){V.animate.hide(function(){V.remove.visible(),V.is.focusedOnSearch()&&!0!==n&&h.trigger("blur"),t.call(A)});let e=w.find(b.menu);0<e.length&&(V.verbose("Hiding sub-menu",e),e.each(function(){var e=ee(this);V.is.animating(e)||V.animate.hide(!1,e)}))}}else V.unbind.intent();x=!1,T=!1},hideOthers:function(){V.verbose("Finding other dropdowns to hide"),B.not(w).has(b.menu+"."+f.visible).dropdown("hide")},hideMenu:function(){V.verbose("Hiding menu instantaneously"),V.remove.active(),V.remove.visible(),C.transition("destroy").transition("hide")},hideSubMenus:function(){let e=C.children(b.item).find(b.menu);V.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){V.bind.keyboardEvents(),V.bind.inputEvents(),V.bind.mouseEvents()},keyboardEvents:function(){V.verbose("Binding keyboard events"),w.on("keydown"+t,V.event.keydown),V.has.search()&&w.on(V.get.inputEvent()+t,b.search,V.event.input),V.is.multiple()&&G.on("keydown"+D,V.event.document.keydown)},inputEvents:function(){V.verbose("Binding input change events"),w.on("change"+t,b.input,V.event.change),V.is.multiple()&&V.is.searchSelection()&&w.on("paste"+t,b.search,V.event.paste)},mouseEvents:function(){V.verbose("Binding mouse events"),V.is.multiple()&&w.on("click"+t,b.label,V.event.label.click).on("click"+t,b.remove,V.event.remove.click),V.is.searchSelection()?(w.on("mousedown"+t,V.event.mousedown).on("mouseup"+t,V.event.mouseup).on("mousedown"+t,b.menu,V.event.menu.mousedown).on("mouseup"+t,b.menu,V.event.menu.mouseup).on("click"+t,b.icon,V.event.icon.click).on("click"+t,b.clearIcon,V.event.clearIcon.click).on("focus"+t,b.search,V.event.search.focus).on("click"+t,b.search,V.event.search.focus).on("blur"+t,b.search,V.event.search.blur).on("click"+t,b.text,V.event.text.focus),V.is.multiple()&&w.on("click"+t,V.event.click).on("click"+t,V.event.search.focus)):("click"===v.on?w.on("click"+t,b.icon,V.event.icon.click).on("click"+t,V.event.test.toggle):"hover"===v.on?w.on("mouseenter"+t,V.delay.show).on("mouseleave"+t,V.delay.hide).on("touchstart"+t,V.event.test.toggle).on("touchstart"+t,b.icon,V.event.icon.click):w.on(v.on+t,V.toggle),w.on("mousedown"+t,V.event.mousedown).on("mouseup"+t,V.event.mouseup).on("focus"+t,V.event.focus).on("click"+t,b.clearIcon,V.event.clearIcon.click),V.has.menuSearch()?w.on("blur"+t,b.search,V.event.search.blur):w.on("blur"+t,V.event.blur)),C.on("mouseenter"+t,b.item,V.event.item.mouseenter).on("touchstart"+t,b.item,V.event.item.mouseenter).on("mouseleave"+t,b.item,V.event.item.mouseleave).on("click"+t,b.item,V.event.item.click)},intent:function(){V.verbose("Binding hide intent event to document"),G.on("click"+D,V.event.test.hide)}},unbind:{intent:function(){V.verbose("Removing hide intent event from document"),G.off("click"+D)}},filter:function(e){function t(){V.is.multiple()&&V.filterActive(),(e||!e&&0===V.get.activeItem().length)&&V.select.firstUnfiltered(),V.has.allResultsFiltered()?v.onNoResults.call(A,n)?v.allowAdditions?v.hideAdditions&&(V.verbose("User addition with no menu, setting empty style"),V.set.empty(),V.hideMenu()):(V.verbose("All items filtered, showing message",n),V.add.message(m.noResults)):(V.verbose("All items filtered, hiding dropdown",n),V.set.empty(),V.hideMenu()):(V.remove.empty(),V.remove.message()),v.allowAdditions&&V.add.userSuggestion(v.preserveHTML?V.escape.htmlEntities(e):e),V.is.searchSelection()&&V.can.show()&&V.is.focusedOnSearch()&&!V.is.empty()&&V.show()}let n=void 0!==e?e:V.get.query();v.useLabels&&V.has.maxSelections()?V.show():v.apiSettings?V.can.useAPI()?V.queryRemote(n,function(){v.filterRemoteData&&V.filterItems(n);let e=r.val();Array.isArray(e)||(e=e&&""!==e?e.split(v.delimiter):[]),V.is.multiple()&&ee.each(e,function(e,t){y.filter("[data-"+p.value+'="'+CSS.escape(t)+'"]').addClass(f.filtered)}),V.focusSearch(!0),t()}):V.error(l.noAPI):(V.filterItems(n),t())},queryRemote:function(e,s,l){Array.isArray(l)||(l=[l]);var e={errorDuration:!1,cache:"local",throttle:v.throttle,urlData:{query:e}},t={onError:function(e,t,n){V.add.message(m.serverError),x=!1,T=!1,s.apply(null,l),"function"==typeof v.apiSettings.onError&&v.apiSettings.onError.call(this,e,t,n)},onFailure:function(e,t,n){V.add.message(m.serverError),x=!1,T=!1,s.apply(null,l),"function"==typeof v.apiSettings.onFailure&&v.apiSettings.onFailure.call(this,e,t,n)},onSuccess:function(e,t,n){let i=e[c.remoteValues],a=(Array.isArray(i)||(i=[]),V.remove.message(),{});var o;a[c.values]=i,V.setup.menu(a),0!==i.length||v.allowAdditions?""!==(o=V.is.multiple()?V.get.values(!0):V.get.value())&&(V.verbose("Value(s) present after click icon, select value(s) in items"),V.set.selected(o,null,!0,!0)):V.add.message(m.noResults),x=!1,T=!1,s.apply(null,l),"function"==typeof v.apiSettings.onSuccess&&v.apiSettings.onSuccess.call(this,e,t,n)}};w.api("get request")||V.setup.api(),e=ee.extend(!0,{},e,v.apiSettings,t,M?{cache:!1}:{}),w.api("setting",e).api("query"),M=!1},filterItems:function(e){let i=V.remove.diacritics(void 0!==e?e:V.get.query()),s=null;var n=V.escape.string(i),l=v.ignoreSearchCase?"i":"";let a=new RegExp("^"+n,l+"gm");if(V.remove.filteredItem(),V.has.query()&&(s=[],V.verbose("Searching for matching values",i),y.each(function(){let e=ee(this),t,n;return!e.hasClass(f.unfilterable)&&("both"!==v.match&&"text"!==v.match||!(-1!==(t=V.remove.diacritics(String(V.get.choiceText(e,!1)))).search(a)||"exact"===v.fullTextSearch&&V.exactSearch(i,t)||!0===v.fullTextSearch&&V.fuzzySearch(i,t)))&&("both"!==v.match&&"value"!==v.match||!(-1!==(n=V.remove.diacritics(String(V.get.choiceValue(e,t)))).search(a)||"exact"===v.fullTextSearch&&V.exactSearch(i,n)||!0===v.fullTextSearch&&V.fuzzySearch(i,n)))?void 0:(s.push(this),!0)})),V.debug("Showing only matched items",i),s&&(y.not(s).addClass(f.filtered),v.highlightMatches&&("both"===v.match||"text"===v.match))){let t=e.split("");n=v.ignoreDiacritics?"[̀-ͯ]?":"",e="(?![^<]*>)";let a=new RegExp(e+"("+t.join(n+")(.*?)"+e+"(")+n+")",l),o=function(){let e=[].slice.call(arguments,1,2*t.length).map(function(e,t){return 1&t?e:"<mark>"+e+"</mark>"});return e.join("")};ee.each(s,function(e,t){let n=ee(t),i=V.get.choiceText(n,!0);v.ignoreDiacritics&&(i=i.normalize("NFD")),n.html(i.replace(a,o))})}V.has.query()?!0===v.hideDividers?u.addClass(f.hidden):"empty"===v.hideDividers&&u.removeClass(f.hidden).filter(function(){let e=ee(this).nextUntil(b.item);return 0===(0<e.length?e:ee(this)).nextUntil(b.divider).filter(b.item+":not(."+f.filtered+")").length}).addClass(f.hidden):u.removeClass(f.hidden)},fuzzySearch:function(i,a){var o=a.length,e=i.length;if(v.ignoreSearchCase&&(i=i.toLowerCase(),a=a.toLowerCase()),o<e)return!1;if(e===o)return i===a;for(let t=0,n=0;t<e;t++){let e=!1;for(var s=i.charCodeAt(t);n<o;)if(a.charCodeAt(n++)===s){e=!0;break}if(!e)return!1}return!0},exactSearch:function(e,t){return e=v.ignoreSearchCase?e.toLowerCase():e,-1<(t=v.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){v.useLabels&&y.filter("."+f.active).addClass(f.filtered)},focusSearch:function(e){V.has.search()&&!V.is.focusedOnSearch()&&(e?(w.off("focus"+t,b.search),h.trigger("focus"),w.on("focus"+t,b.search,V.event.search.focus)):h.trigger("focus"))},blurSearch:function(){V.has.search()&&h.trigger("blur")},forceSelection:function(){var e=y.not(f.filtered).filter("."+f.selected).eq(0),t=y.not(f.filtered).filter("."+f.active).eq(0),e=0<e.length?e:t,t=0<e.length;v.allowAdditions||t&&!V.is.multiple()?(V.debug("Forcing partial selection to selected item",e),V.event.item.click.call(e,{},!0)):V.remove.searchTerm()},change:{values:function(e){v.allowAdditions||V.clear(),V.debug("Creating dropdown with specified values",e);let t={};t[c.values]=e,V.setup.menu(t),ee.each(e,function(e,t){if(!0===t.selected&&(V.debug("Setting initial selection to",t[c.value]),V.set.selected(t[c.value]),!V.is.multiple()))return!1}),V.has.selectInput()&&(V.disconnect.selectObserver(),r.html(""),r.append("<option disabled selected value></option>"),ee.each(e,function(e,t){var n=v.templates.escape(t[c.value]),i=v.templates.escape(t[c.name]||"",v);r.append('<option value="'+n+'"'+(!0===t.selected?" selected":"")+">"+i+"</option>")}),V.observe.select())}},event:{paste:function(n){let e=(n.originalEvent.clipboardData||te.clipboardData).getData("text"),t=e.split(v.delimiter),i=[];if(t.forEach(function(e){e=v.preserveHTML?V.escape.htmlEntities(e.trim()):e.trim();!1===V.set.selected(e,null,!1,!0)&&i.push(e)}),n.preventDefault(),0<i.length){let e=h[0];var a=e.selectionStart,o=e.selectionEnd;let t=e.value;var s=i.join(v.delimiter),l=a+s.length;h.val(t.slice(0,a)+s+t.slice(o)),e.selectionStart=l,e.selectionEnd=l,V.event.input(n)}},change:function(){j||(V.debug("Input changed, updating selection"),V.set.selected())},focus:function(){v.showOnFocus&&!S&&V.is.hidden()&&!L&&(T=!0,V.show())},blur:function(e){L=ne.activeElement===this,S||L||(V.remove.activeLabel(),V.hide())},mousedown:function(){V.is.searchSelection(!0)?I=!0:S=!0},mouseup:function(){V.is.searchSelection(!0)?I=!1:S=!1},click:function(e){let t=ee(e.target);t.is(w)&&(V.is.focusedOnSearch()?V.show():V.focusSearch())},search:{focus:function(e){S=!0,V.is.multiple()&&V.remove.activeLabel(),T||V.is.active()||!(v.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||"touchstart"===e.type||(T=!0,V.search())},blur:function(e){L=ne.activeElement===this,!V.is.searchSelection(!0)||I||N||L||(v.forceSelection?V.forceSelection():v.allowAdditions||v.keepSearchTerm||V.has.menuSearch()||V.remove.searchTerm(),V.hide()),I=!1}},clearIcon:{click:function(e){V.clear(),V.is.searchSelection()&&V.remove.searchTerm(),v.collapseOnClearable&&V.hide(),e.stopPropagation()}},icon:{click:function(e){x=!0,V.has.search()?V.is.active()?V.blurSearch():v.showOnFocus?V.focusSearch():V.toggle():V.toggle(),e.stopPropagation()}},text:{focus:function(e){S=!0,V.focusSearch()}},input:function(e){(V.is.multiple()||V.is.searchSelection())&&V.set.filtered(),clearTimeout(V.timer),V.timer=setTimeout(function(){V.search()},v.delay.search)},label:{click:function(e){let t=ee(this),n=w.find(b.label),i=n.filter("."+f.active);var a=t.nextAll("."+f.active),o=t.prevAll("."+f.active);let s=(0<a.length?t.nextUntil(a):t.prevUntil(o)).add(i).add(t);e.shiftKey?(i.removeClass(f.active),s.addClass(f.active)):e.ctrlKey?t.toggleClass(f.active):(i.removeClass(f.active),t.addClass(f.active)),v.onLabelSelect.apply(this,n.filter("."+f.active)),e.stopPropagation()}},remove:{click:function(e){let t=ee(this).parent();t.hasClass(f.active)?V.remove.activeLabels():V.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=V.is.multiple()?V.show:V.toggle;V.is.bubbledLabelClick(e)||V.is.bubbledIconClick(e)||(V.is.multiple()&&(!V.is.multiple()||V.is.active())||(T=!0),V.determine.eventOnElement(e,t)&&"touchstart"!==e.type&&e.preventDefault())},hide:function(e){V.determine.eventInModule(e,V.hide)&&A.id&&ee(e.target).attr("for")===A.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&V.check.disabled()})}},select:{mutation:function(e){V.is.selectMutation(e)&&(V.debug("<select> modified, recreating menu"),V.disconnect.selectObserver(),V.refresh(),V.setup.select(),V.set.selected(),V.observe.select())}},menu:{mutation:function(e){e=e[0];let t=e.addedNodes?ee(e.addedNodes[0]):ee(!1);e=e.removedNodes?ee(e.removedNodes[0]):ee(!1);let n=t.add(e);var e=n.is(b.addition)||0<n.closest(b.addition).length,i=n.is(b.message)||0<n.closest(b.message).length;e||i?(V.debug("Updating item selector cache"),V.refreshItems()):(V.debug("Menu modified, updating selector cache"),V.refresh())},mousedown:function(){N=!0},mouseup:function(){N=!1}},item:{mouseenter:function(e){var t=ee(e.target);let n=ee(this),i=n.children(b.menu),a=n.siblings(b.item).children(b.menu);var o=0<i.length;0<i.find(t).length||!o||(clearTimeout(V.itemTimer),V.itemTimer=setTimeout(function(){V.verbose("Showing sub-menu",i),ee.each(a,function(){V.animate.hide(!1,ee(this))}),V.animate.show(!1,i)},v.delay.show),e.preventDefault())},mouseleave:function(e){let t=ee(this).find(b.menu);0<t.length&&(clearTimeout(V.itemTimer),V.itemTimer=setTimeout(function(){V.verbose("Hiding sub-menu",t),t.each(function(){V.animate.hide(!1,ee(this))})},v.delay.hide))},click:function(e,t){let n=ee(this);e=ee(e&&e.target||"");let i=n.find(b.menu);var a=V.get.choiceText(n),o=V.get.choiceValue(n,a),s=0<i.length,l=0<i.find(e).length;"input"!==ne.activeElement.tagName.toLowerCase()&&ee(ne.activeElement).trigger("blur"),l||s&&!v.allowCategorySelection||(V.is.searchSelection()&&(v.allowAdditions&&V.remove.userAddition(),v.keepSearchTerm||(V.is.multiple()&&V.remove.filteredItem(),V.remove.searchTerm()),!V.is.visible()&&0<e.length&&V.show(),V.is.focusedOnSearch()||!0===t||V.focusSearch(!0)),v.useLabels||(V.remove.filteredItem(),V.set.scrollPosition(n)),V.determine.selectAction.call(this,a,o))}},document:{keydown:function(n){var i=n.which;if(V.is.inObject(i,g)){let e=w.find(b.label),t=e.filter("."+f.active);t.data(p.value);var a=e.index(t),o=e.length,s=0<t.length,l=1<t.length,r=0===a,c=a+1===o,d=V.is.searchSelection(),u=V.is.focusedOnSearch(),v=V.is.focused(),m=u&&0===V.get.caretPosition(!1),h=m&&0!==V.get.caretPosition(!0);if(!d||s||u)switch(i){case g.leftArrow:!v&&!m||s?s&&(n.shiftKey?V.verbose("Adding previous label to selection"):(V.verbose("Selecting previous label"),e.removeClass(f.active)),r&&!l?t.addClass(f.active):t.prev(b.siblingLabel).addClass(f.active).end(),n.preventDefault()):(V.verbose("Selecting previous label"),e.last().addClass(f.active));break;case g.rightArrow:v&&!s&&e.first().addClass(f.active),s&&(n.shiftKey?V.verbose("Adding next label to selection"):(V.verbose("Selecting next label"),e.removeClass(f.active)),c?d?u?e.removeClass(f.active):V.focusSearch():(l?t.next(b.siblingLabel):t).addClass(f.active):t.next(b.siblingLabel).addClass(f.active),n.preventDefault());break;case g.deleteKey:case g.backspace:s?(V.verbose("Removing active labels"),c&&d&&!u&&V.focusSearch(),t.last().next(b.siblingLabel).addClass(f.active),V.remove.activeLabels(t),V.is.visible()||V.show(),n.preventDefault()):!m||h||s||i!==g.backspace||(V.verbose("Removing last label on input backspace"),t=e.last().addClass(f.active),V.remove.activeLabels(t),V.is.visible()||V.show());break;default:t.removeClass(f.active)}}}},keydown:function(o){let s=o.which;if(V.is.inObject(s,g)||o.key===v.delimiter){var l=y.not(b.unselectable).filter("."+f.selected).eq(0),r=C.children("."+f.active).eq(0);let e=0<l.length?l:r,t=0<e.length?e.siblings(":not(."+f.filtered+")").addBack():C.children(":not(."+f.filtered+")"),n=e.children(b.menu),i=e.closest(b.menu);var l=i.hasClass(f.visible)||i.hasClass(f.animating)||0<i.parent(b.menu).length,r=0<n.length,c=0<e.length,d=0<e.not(b.unselectable).length,u=o.key===v.delimiter&&V.is.multiple();let a;if(v.allowAdditions&&(s===g.enter||u)&&(d&&v.hideAdditions&&(V.verbose("Selecting item from keyboard shortcut",e),V.event.item.click.call(e,o)),V.is.searchSelection()&&!v.keepSearchTerm&&V.remove.searchTerm(),V.is.multiple()&&o.preventDefault()),V.is.visible()){if(s!==g.enter&&!u||(s===g.enter&&c&&r&&!v.allowCategorySelection?(V.verbose("Pressed enter on unselectable category, opening sub menu"),s=g.rightArrow):d&&(V.verbose("Selecting item from keyboard shortcut",e),V.event.item.click.call(e,o),V.is.searchSelection()&&(v.keepSearchTerm||V.remove.searchTerm(),V.is.multiple()&&h.trigger("focus"))),o.preventDefault()),c&&(s===g.leftArrow&&i[0]!==C[0]&&(V.verbose("Left key pressed, closing sub-menu"),V.animate.hide(!1,i),e.removeClass(f.selected),i.closest(b.item).addClass(f.selected),o.preventDefault()),s===g.rightArrow&&r&&(V.verbose("Right key pressed, opening sub-menu"),V.animate.show(!1,n),e.removeClass(f.selected),n.find(b.item).eq(0).addClass(f.selected),o.preventDefault())),s===g.upArrow){if(a=(c&&l?e.prevAll(b.item+":not("+b.unselectable+")"):y).eq(0),t.index(a)<0)return V.verbose("Up key pressed but reached top of current menu"),void o.preventDefault();V.verbose("Up key pressed, changing active item"),e.removeClass(f.selected),a.addClass(f.selected),V.set.scrollPosition(a),v.selectOnKeydown&&V.is.single()&&!a.hasClass(f.actionable)&&V.set.selectedItem(a),o.preventDefault()}if(s===g.downArrow){if(0===(a=(c&&l?e.nextAll(b.item+":not("+b.unselectable+")"):y).eq(0)).length)return V.verbose("Down key pressed but reached bottom of current menu"),void o.preventDefault();V.verbose("Down key pressed, changing active item"),y.removeClass(f.selected),a.addClass(f.selected),V.set.scrollPosition(a),v.selectOnKeydown&&V.is.single()&&!a.hasClass(f.actionable)&&V.set.selectedItem(a),o.preventDefault()}s===g.pageUp&&(V.scrollPage("up"),o.preventDefault()),s===g.pageDown&&(V.scrollPage("down"),o.preventDefault()),s===g.escape&&(V.verbose("Escape key pressed, closing dropdown"),V.hide(),o.stopPropagation())}else s!==g.enter&&!u||o.preventDefault(),s!==g.downArrow||V.is.visible()||(T=!0,V.verbose("Down key pressed, showing dropdown"),V.show(),o.preventDefault())}else V.has.search()||V.set.selectedLetter(String.fromCharCode(s))}},trigger:{change:function(){let t=r[0];if(t){let e=ne.createEvent("HTMLEvents");V.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e)}}},determine:{selectAction:function(e,t){U=!0,V.verbose("Determining action",v.action),ie(V.action[v.action])?(V.verbose("Triggering preset action",v.action,e,t),V.action[v.action].call(A,e,t,this)):ie(v.action)?(V.verbose("Triggering user action",v.action,e,t),v.action.call(A,e,t,this)):V.error(l.action,v.action),U=!1},eventInModule:function(e,t){let n=ee(e.target);var e=0<n.closest(ne.documentElement).length,i=0<n.closest(w).length;return t=ie(t)?t:function(){},e&&!i?(V.verbose("Triggering event",t),t(),!0):(V.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){let n=ee(e.target);var i=n.closest(b.siblingLabel),e=ne.body.contains(e.target),i=0===w.find(i).length||!(V.is.multiple()&&v.useLabels),a=0===n.closest(C).length;return t=ie(t)?t:function(){},e&&i&&a?(V.verbose("Triggering event",t),t(),!0):(V.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=void 0!==t?t:e,V.can.activate(ee(n))&&(V.set.selected(t,ee(n),!1,v.keepSearchTerm),V.is.multiple()||!v.collapseOnActionable&&ee(n).hasClass(f.actionable)||V.hideAndClear())},select:function(e,t,n){t=void 0!==t?t:e,V.can.activate(ee(n))&&(V.set.value(t,e,ee(n)),V.is.multiple()||!v.collapseOnActionable&&ee(n).hasClass(f.actionable)||V.hideAndClear())},combo:function(e,t,n){t=void 0!==t?t:e,V.set.selected(t,ee(n)),V.hideAndClear()},hide:function(e,t,n){V.set.value(t,e,ee(n)),V.hideAndClear()}},get:{id:function(){return O},defaultText:function(){return w.data(p.defaultText)},defaultValue:function(){return w.data(p.defaultValue)},placeholderText:function(){return"auto"!==v.placeholder&&"string"==typeof v.placeholder?v.placeholder:w.data(p.placeholderText)||""},text:function(){return v.preserveHTML?s.html():s.text()},query:function(){return String(h.val()).trim()},searchWidth:function(e){return e=void 0!==e?e:h.val(),n.text(e),Math.ceil(n.width()+1)},selectionCount:function(){var e=V.get.values();return V.is.multiple()?Array.isArray(e)?e.length:0:""!==V.get.value()?1:0},transition:function(e){return"auto"===v.transition?V.is.upward(e)?"slide up":"slide down":v.transition},userValues:function(){let e=V.get.values(!0);return!!e&&(e=Array.isArray(e)?e:[e],ee.grep(e,function(e){return!1===V.get.item(e)}))},uniqueArray:function(n){return ee.grep(n,function(e,t){return ee.inArray(e,n)===t})},caretPosition:function(e){let t=h[0],n;var i;return e&&"selectionEnd"in t?t.selectionEnd:!e&&"selectionStart"in t?t.selectionStart:ne.selection?(t.focus(),i=(n=ne.selection.createRange()).text.length,e?i:(n.moveStart("character",-t.value.length),n.text.length-i)):void 0},value:function(){var e=0<r.length?r.val():w.data(p.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return void 0===e||t?"":e},values:function(e){let t=V.get.value();return""===t?"":!V.has.selectInput()&&V.is.multiple()?"string"==typeof t?(e?t:V.escape.htmlEntities(t)).split(v.delimiter):"":t},remoteValues:function(){let e=V.get.values(),i=!1;return e&&("string"==typeof e&&(e=[e]),ee.each(e,function(e,t){var n=V.read.remoteData(t);V.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)})),i},choiceText:function(e,t){if(t=void 0!==t?t:v.preserveHTML,e)return 0<e.find(b.menu).length&&(V.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||V.get.choiceText(e),!!e&&(void 0!==e.data(p.value)?String(e.data(p.value)):"string"==typeof t?String(v.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=h[0];return!!e&&(void 0!==e.oninput?"input":void 0!==e.onpropertychange?"propertychange":"keyup")},selectValues:function(){let s={},l=[],r=[];return w.find("option").each(function(){let e=ee(this);var t=V.escape.assumeUnescapedAmpLtGt(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;let o=e.parent("optgroup");"auto"===v.placeholder&&""===i?s.placeholder=t:(o.length===l.length&&o[0]===l[0]||(r.push({type:"header",divider:v.headerDivider,name:o.attr("label")||""}),l=o),r.push({name:t,value:i,text:a,disabled:n}))}),v.placeholder&&"auto"!==v.placeholder&&(V.debug("Setting placeholder value to",v.placeholder),s.placeholder=v.placeholder),v.sortSelect?(!0===v.sortSelect?r.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===v.sortSelect?r.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):ie(v.sortSelect)&&r.sort(v.sortSelect),s[c.values]=r,V.debug("Retrieved and sorted values from select",s)):(s[c.values]=r,V.debug("Retrieved values from select",s)),s},activeItem:function(){return y.filter("."+f.active)},selectedItem:function(){var e=y.not(b.unselectable).filter("."+f.selected);return 0<e.length?e:y.eq(0)},itemWithAdditions:function(e){let t=V.get.item(e);var e=V.create.userChoice(e),n=e&&0<e.length;return t=n?0<t.length?t.add(e):e:t},item:function(i,a){let o=!1;var e;let s;return i=void 0!==i?i:void 0!==V.get.values()?V.get.values():V.get.text(),e=(s=V.is.multiple()&&Array.isArray(i))?0<i.length:null!=i,a=""===i||!1===i||!0===i||(a||!1),e&&y.each(function(){var e=ee(this),t=V.get.choiceText(e);let n=V.get.choiceValue(e,t);if(null!==n&&void 0!==n)if(s)-1!==ee.inArray(V.escape.htmlEntities(String(n)),i.map(String))&&(o=o?o.add(e):e);else if(a){if(V.verbose("Ambiguous dropdown value using strict type check",e,i),n===i)return o=e,!0}else if(v.ignoreCase&&(n=n.toLowerCase(),i=i.toLowerCase()),V.escape.htmlEntities(String(n))===V.escape.htmlEntities(String(i)))return V.verbose("Found select item by value",n,i),o=e,!0}),o},displayType:function(){return w.hasClass("column")?"flex":v.displayType}},check:{maxSelections:function(e){return!!v.maxSelections&&((e=void 0!==e?e:V.get.selectionCount())>=v.maxSelections?(V.debug("Maximum selection count reached"),v.useLabels&&(y.addClass(f.filtered),V.add.message(m.maxSelections)),!0):(V.verbose("No longer at maximum selection count"),V.remove.message(),V.remove.filteredItem(),V.is.searchSelection()&&V.filterItems(),!1))},disabled:function(){h.attr("tabindex",V.is.disabled()?-1:0)}},restore:{defaults:function(e){V.clear(e),V.restore.defaultText(),V.restore.defaultValue()},defaultText:function(){var e=V.get.defaultText();e===V.get.placeholderText?(V.debug("Restoring default placeholder text",e),V.set.placeholderText(e)):(V.debug("Restoring default text",e),V.set.text(e))},placeholderText:function(){V.set.placeholderText()},defaultValue:function(){var e=V.get.defaultValue();void 0!==e&&(V.debug("Restoring default value",e),""!==e?(V.set.value(e),V.set.selected()):(V.remove.activeItem(),V.remove.selectedItem()))},labels:function(){v.allowAdditions&&(v.useLabels||(V.error(l.labels),v.useLabels=!0),V.debug("Restoring selected values"),V.create.userLabels()),V.check.maxSelections()},selected:function(){V.restore.values(),V.is.multiple()?(V.debug("Restoring previously selected values and labels"),V.restore.labels()):V.debug("Restoring previously selected values")},values:function(){V.set.initialLoad(),v.apiSettings&&v.saveRemoteData&&V.get.remoteValues()?V.restore.remoteValues():V.set.selected();var e=V.get.value();!e||""===e||Array.isArray(e)&&0===e.length?r.addClass(f.noselection):r.removeClass(f.noselection),V.remove.initialLoad()},remoteValues:function(){var e=V.get.remoteValues();V.debug("Recreating selected from session data",e),e&&(V.is.single()?ee.each(e,function(e,t){V.set.text(t)}):v.useLabels&&ee.each(e,function(e,t){V.add.label(e,t)}))}},read:{remoteData:function(e){if(void 0!==te.Storage)return void 0!==(e=sessionStorage.getItem(e+D))&&e;V.error(l.noStorage)}},save:{defaults:function(){V.save.defaultText(),V.save.placeholderText(),V.save.defaultValue()},defaultValue:function(){var e=V.get.value();V.verbose("Saving default value as",e),w.data(p.defaultValue,e)},defaultText:function(){var e=V.get.text();V.verbose("Saving default text as",e),w.data(p.defaultText,e)},placeholderText:function(){var e;!1!==v.placeholder&&s.hasClass(f.placeholder)&&(e=V.get.text(),V.verbose("Saving placeholder text as",e),w.data(p.placeholderText,e))},remoteData:function(e,t){void 0===te.Storage?V.error(l.noStorage):(V.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t+D,e))}},clear:function(e){V.is.multiple()&&v.useLabels?V.remove.labels(w.find(b.label),e):(V.remove.activeItem(),V.remove.selectedItem(),V.remove.filteredItem()),V.set.placeholderText(),V.clearValue(e)},clearValue:function(e){V.set.value("",null,null,e)},clearCache:function(){V.debug("Clearing API cache once"),M=!0},scrollPage:function(e,t){let n=t||V.get.selectedItem(),i=n.closest(b.menu);var t=i.outerHeight(),a=i.scrollTop(),o=y.eq(0).outerHeight(),t=Math.floor(t/o),a="up"===e?a-o*t:a+o*t;let s=y.not(b.unselectable),l;o="up"===e?s.index(n)-t:s.index(n)+t,t="up"===e?0<=o:o<s.length,0<(l=t?s.eq(o):"up"===e?s.first():s.last()).length&&(V.debug("Scrolling page",e,l),n.removeClass(f.selected),l.addClass(f.selected),v.selectOnKeydown&&V.is.single()&&!l.hasClass(f.actionable)&&V.set.selectedItem(l),i.scrollTop(a))},set:{filtered:function(){var e=V.is.multiple(),t=V.is.searchSelection(),n=e&&t,t=t?V.get.query():"",i="string"==typeof t&&0<t.length,a=V.get.searchWidth(),t=""!==t;e&&i&&(V.verbose("Adjusting input width",a),h.css("width",a+"px")),i||n&&t?(V.verbose("Hiding placeholder text"),s.addClass(f.filtered)):e&&(!n||t)||(V.verbose("Showing placeholder text"),s.removeClass(f.filtered))},empty:function(){w.addClass(f.empty)},loading:function(){w.addClass(f.loading)},placeholderText:function(e){e=e||V.get.placeholderText(),V.debug("Setting placeholder text",e),V.set.text(e),s.addClass(f.placeholder)},tabbable:function(){V.is.searchSelection()?(V.debug("Added tabindex to searchable dropdown"),h.val(""),V.check.disabled(),C.attr("tabindex",-1)):(V.debug("Added tabindex to dropdown"),void 0===w.attr("tabindex")&&(w.attr("tabindex",r.attr("tabindex")||0),C.attr("tabindex",-1))),r.removeAttr("tabindex")},initialLoad:function(){V.verbose("Setting initial load"),K=!0},activeItem:function(e){v.allowAdditions&&0<e.filter(b.addition).length?e.addClass(f.filtered):e.addClass(f.active)},partialSearch:function(e){var t=V.get.query().length;h.val(e.slice(0,t))},scrollPosition:function(e,t){var n,i;let a,o,s;e=e||V.get.selectedItem(),a=e.closest(b.menu),n=e&&0<e.length,t=void 0!==t&&t,0===V.get.activeItem().length&&(t=!1),e&&0<a.length&&n&&(e.position().top,a.addClass(f.loading),e=(n=a.scrollTop())-a.offset().top+e.offset().top,t||(i=a.height(),s=n+i<e+5,o=e-5<n),V.debug("Scrolling to active item",e),(t||o||s)&&a.scrollTop(e),a.removeClass(f.loading))},text:function(e,t){"combo"===v.action?(V.debug("Changing combo button text",e,d),v.preserveHTML?d.html(e):d.text(e)):"activate"!==v.action&&!ie(v.action)||(e===V.get.placeholderText()&&!t||s.removeClass(f.placeholder),V.debug("Changing text",e,s),s.removeClass(f.filtered),v.preserveHTML?s.html(e):s.text(e))},selectedItem:function(e){var t=V.get.choiceValue(e),n=V.get.choiceText(e,!1),i=V.get.choiceText(e);V.debug("Setting user selection to item",e),V.remove.activeItem(),V.set.partialSearch(n),V.set.activeItem(e),V.set.selected(t,e),V.set.text(i)},selectedLetter:function(e){let t=y.filter("."+f.selected);var n=0<t.length&&V.has.firstLetter(t,e);let i=!1,a;n&&(a=t.nextAll(y).eq(0),V.has.firstLetter(a,e)&&(i=a)),i||y.each(function(){if(V.has.firstLetter(ee(this),e))return i=ee(this),!1}),i&&(V.verbose("Scrolling to next value with letter",e),V.set.scrollPosition(i),t.removeClass(f.selected),i.addClass(f.selected),!v.selectOnKeydown||!V.is.single()||a&&a.hasClass(f.actionable)||V.set.selectedItem(i))},direction:function(e){"auto"===v.direction?(e?V.is.upward(e)&&V.remove.upward(e):V.remove.upward(),(V.can.openDownward(e)?V.remove:V.set).upward(e),V.is.leftward(e)||V.can.openRightward(e)||V.set.leftward(e)):"upward"===v.direction&&V.set.upward(e)},upward:function(e){let t=e||w;t.addClass(f.upward)},leftward:function(e){let t=e||C;t.addClass(f.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?r.addClass(f.noselection):r.removeClass(f.noselection);var a=0<r.length,o=V.get.values(),s=void 0!==e?String(e):e;if(a){if(!v.allowReselection&&s==o&&(V.verbose("Skipping value update already same value",e,o),!V.is.initialLoad()))return;V.is.single()&&V.has.selectInput()&&V.can.extendSelect()&&(V.debug("Adding user option",e),V.add.optionValue(e)),V.debug("Updating input value",e,o),j=!0,r.val(e),!1===v.fireOnInit&&V.is.initialLoad()?V.debug("Input native change event ignored on initial load"):!0!==i&&V.trigger.change(),j=!1}else V.verbose("Storing value in metadata",e,r),e!==o&&w.data(p.value,s);!1===v.fireOnInit&&V.is.initialLoad()?V.verbose("No callback on initial load",v.onChange):!0!==i&&v.onChange.call(A,e,t,n)},active:function(){w.addClass(f.active)},multiple:function(){w.addClass(f.multiple)},visible:function(){w.addClass(f.visible)},exactly:function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),V.debug("Setting selected to exact values"),V.clear(),V.set.selected(e,t,n)},selected:function(e,r,c,d){"boolean"==typeof r&&(d=c,c=r,r=void 0);let u=V.is.multiple();return!(!(r=v.allowAdditions?r||V.get.itemWithAdditions(e):r||V.get.item(e))&&void 0!==e)&&(u?(d||V.remove.searchWidth(),v.useLabels&&(V.remove.selectedItem(),void 0===e&&V.remove.labels(w.find(b.label),!0))):(V.remove.activeItem(),V.remove.selectedItem()),!!r&&(V.debug("Setting selected menu item to",r),r.each(function(){let e=ee(this);var t=V.get.choiceText(e),n=V.get.choiceValue(e,t),i=e.hasClass(f.filtered),a=e.hasClass(f.active),o=e.hasClass(f.actionable),s=e.hasClass(f.addition),l=u&&r&&1===r.length;o?(u&&a&&!s||!v.apiSettings||!v.saveRemoteData||V.save.remoteData(t,n),v.onActionable.call(A,n,t,e)):u?!a||s?(v.apiSettings&&v.saveRemoteData&&V.save.remoteData(t,n),v.useLabels?(V.add.label(n,t,l),V.add.value(n,t,e,c),V.set.activeItem(e),V.filterActive(),V.select.nextAvailable(r)):(V.add.value(n,t,e,c),V.set.text(V.add.variables(m.count)),V.set.activeItem(e))):i||!v.useLabels&&!U||(V.debug("Selected active value, removing label"),V.remove.selected(n)):(v.apiSettings&&v.saveRemoteData&&V.save.remoteData(t,n),d||e.hasClass(f.actionable)||V.set.text(t,!0),V.set.value(n,t,e,c),e.addClass(f.active).addClass(f.selected))}),d||V.remove.searchTerm(),void(V.is.allFiltered()&&(V.set.empty(),V.hideMenu()))))}},add:{label:function(e,t,n){var i=V.is.searchSelection()?h:s;let a;v.ignoreCase&&(e=e.toLowerCase()),a=ee("<a />").addClass(f.label).attr("data-"+p.value,e).html(o.label(e,t,v)),a=v.onLabelCreate.call(a,e,t),V.has.label(e)?V.debug("User selection already exists, skipping",e):(v.label.variation&&a.addClass(v.label.variation),!0===n&&v.label.transition?(V.debug("Animating in label",a),a.addClass(f.hidden).insertBefore(i).transition({animation:v.label.transition,debug:v.debug,verbose:v.verbose,silent:v.silent,duration:v.label.duration})):(V.debug("Adding selection label",a),a.insertBefore(i)))},message:function(e){let t=C.children(b.message);e=v.templates.message(V.add.variables(e));0<t.length?t.html(e):ee("<div/>").html(e).addClass(f.message).appendTo(C)},optionValue:function(e){0<r.find('option[value="'+CSS.escape(e)+'"]').length||(V.disconnect.selectObserver(),V.is.single()&&(V.verbose("Removing previous user addition"),r.find("option."+f.addition).remove()),ee("<option/>").prop("value",e).addClass(f.addition).text(e).appendTo(r),V.verbose("Adding user addition as an <option>",e),V.observe.select())},userSuggestion:function(e){let t=C.children(b.addition),n=V.get.item(e);var i=n&&0<n.not(b.addition).length,a=0<t.length;v.useLabels&&V.has.maxSelections()||(""===e||i?t.remove():(a?(t.data(p.value,e).data(p.text,e).attr("data-"+p.value,e).attr("data-"+p.text,e).removeClass(f.filtered),v.hideAdditions||(i=v.templates.addition(V.add.variables(m.addResult,v.templates.escape(e,v))),t.html(i)),V.verbose("Replacing user suggestion with new value",t)):((t=V.create.userChoice(e)).prependTo(C),V.verbose("Adding item choice to menu corresponding with user choice addition",t)),v.hideAdditions&&!V.is.allFiltered()||t.addClass(f.selected).siblings().removeClass(f.selected),V.refreshItems()))},variables:function(e,t){var n=-1!==e.search("{count}"),i=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return V.verbose("Adding templated variables to message",e),n&&(e=e.replace("{count}",V.get.selectionCount())),i&&(e=e.replace("{maxCount}",v.maxSelections)),a&&(n=t||V.get.query(),e=e.replace("{term}",n)),e},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=void 0);let a=V.get.values(!0),o;V.has.value(e)?V.debug("Value already selected"):""===e?V.debug("Cannot select blank values from multiselect"):(o=Array.isArray(a)?(o=n&&n.hasClass(f.actionable)?a:a.concat([e]),V.get.uniqueArray(o)):[e],V.has.selectInput()?V.can.extendSelect()&&(V.debug("Adding value to select",e,o,r),V.add.optionValue(e)):(o=o.join(v.delimiter),V.debug("Setting hidden input to delimited value",o,r)),!1===v.fireOnInit&&V.is.initialLoad()?V.verbose("Skipping onadd callback on initial load",v.onAdd):v.onAdd.call(A,e,t,n),V.set.value(o,t,n,i),V.check.maxSelections())}},remove:{active:function(){w.removeClass(f.active)},activeLabel:function(){w.find(b.label).removeClass(f.active)},empty:function(){w.removeClass(f.empty)},loading:function(){w.removeClass(f.loading)},initialLoad:function(){K=!1},upward:function(e){let t=e||w;t.removeClass(f.upward)},leftward:function(e){let t=e||C;t.removeClass(f.leftward)},visible:function(){w.removeClass(f.visible)},activeItem:function(){y.removeClass(f.active)},filteredItem:function(){v.highlightMatches&&ee.each(y,function(e,t){let n=ee(t);n.html(n.html().replace(/<\/?mark>/g,""))}),v.useLabels&&V.has.maxSelections()||((v.useLabels&&V.is.multiple()?y.not("."+f.active):y).removeClass(f.filtered),v.hideDividers&&u.removeClass(f.hidden),V.remove.empty())},optionValue:function(e){let t=r.find('option[value="'+CSS.escape(e)+'"]');0<t.length&&t.hasClass(f.addition)&&(V.disconnect.selectObserver(),t.remove(),V.verbose("Removing user addition as an <option>",e),V.observe.select())},message:function(){C.children(b.message).remove()},searchWidth:function(){h.css("width","")},searchTerm:function(){V.verbose("Cleared search term"),h.val(""),V.set.filtered()},userAddition:function(){y.filter(b.addition).remove()},selected:function(e,t,i){if(!(t=v.allowAdditions?t||V.get.itemWithAdditions(e):t||V.get.item(e)))return!1;t.each(function(){let e=ee(this);var t=V.get.choiceText(e),n=V.get.choiceValue(e,t);V.is.multiple()?v.useLabels?(V.remove.value(n,t,e,i),V.remove.label(n)):(V.remove.value(n,t,e,i),0===V.get.selectionCount()?V.set.placeholderText():V.set.text(V.add.variables(m.count))):V.remove.value(n,t,e,i),e.removeClass(f.filtered).removeClass(f.active),v.useLabels&&e.removeClass(f.selected)})},selectedItem:function(){y.removeClass(f.selected)},value:function(e,t,n,i){var a=V.get.values(!0);let o;V.has.selectInput()?(V.verbose("Input is <select> removing selected option",e),o=V.remove.arrayValue(e,a),V.remove.optionValue(e)):(V.verbose("Removing from delimited values",e),o=(o=V.remove.arrayValue(e,a)).join(v.delimiter)),!1===v.fireOnInit&&V.is.initialLoad()?V.verbose("No callback on initial load",v.onRemove):v.onRemove.call(A,e,t,n),V.set.value(o,t,n,i),V.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=ee.grep(e,function(e){return t!=e}),V.verbose("Removed value from delimited string",t,e),e},label:function(e,t){let n=w.find(b.label),i=n.filter("[data-"+p.value+'="'+CSS.escape(v.ignoreCase?e.toLowerCase():e)+'"]');V.verbose("Removing label",i),i.remove()},activeLabels:function(e){e=e||w.find(b.label).filter("."+f.active),V.verbose("Removing active label selections",e),V.remove.labels(e)},labels:function(e,a){e=e||w.find(b.label),V.verbose("Removing labels",e),e.each(function(){let e=ee(this);var t=e.data(p.value),n=void 0!==t?String(t):t,i=V.is.userValue(n);!1===v.onLabelRemove.call(e,t)?V.debug("Label remove callback cancelled removal"):(V.remove.message(),i?(V.remove.value(n,n,V.get.item(n),a),V.remove.label(n)):V.remove.selected(n,!1,a))})},tabbable:function(){V.is.searchSelection()?(V.debug("Searchable dropdown initialized"),h.removeAttr("tabindex")):(V.debug("Simple selection dropdown initialized"),w.removeAttr("tabindex")),C.removeAttr("tabindex")},diacritics:function(e){return v.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},has:{menuSearch:function(){return V.has.search()&&0<h.closest(C).length},clearItem:function(){return 0<H.length},search:function(){return 0<h.length},sizer:function(){return 0<n.length},selectInput:function(){return r.is("select")},minCharacters:function(e){return v.minCharacters&&!x?(e=void 0!==e?String(e):String(V.get.query())).length>=v.minCharacters:!(x=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=V.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<r.length},items:function(){return 0<y.length},menu:function(){return 0<C.length},subMenu:function(e){return 0<(e||C).find(b.menu).length},message:function(){return 0<C.children(b.message).length},label:function(e){let t=w.find(b.label);return v.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+p.value+'="'+CSS.escape(e)+'"]').length},maxSelections:function(){return v.maxSelections&&V.get.selectionCount()>=v.maxSelections},allResultsFiltered:function(){let e=y.not(b.addition);return e.filter(b.unselectable).length===e.length},userSuggestion:function(){return 0<C.children(b.addition).length},query:function(){return""!==V.get.query()},value:function(e){return v.ignoreCase?V.has.valueIgnoringCase(e):V.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=V.get.values(!0);return!!(Array.isArray(t)?t&&-1!==ee.inArray(e,t):t==e)},valueIgnoringCase:function(n){let e=V.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(f.active)},animatingInward:function(){return C.transition("is inward")},animatingOutward:function(){return C.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(i).length},empty:function(){return w.hasClass(f.empty)},chrome:function(){return!!te.chrome&&!te.StyleMedia},alreadySetup:function(){return w.is("select")&&void 0!==w.parent(b.dropdown).data(e)&&0===w.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):C.transition&&C.transition("is animating")},leftward:function(e){let t=e||C;return t.hasClass(f.leftward)},clearable:function(){var e=w.hasClass(f.clearable);return!e&&v.clearable&&w.addClass(f.clearable),e||v.clearable},disabled:function(){return w.hasClass(f.disabled)},focused:function(){return ne.activeElement===w[0]},focusedOnSearch:function(){return ne.activeElement===h[0]},allFiltered:function(){return(V.is.multiple()||V.has.search())&&!(!v.hideAdditions&&V.has.userSuggestion())&&!V.has.message()&&V.has.allResultsFiltered()},hidden:function(e){return!V.is.visible(e)},initialLoad:function(){return K},inObject:function(n,e){let i=!1;return ee.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return w.hasClass(f.multiple)},remote:function(){return v.apiSettings&&V.can.useAPI()},noApiCache:function(){return M||v.apiSettings&&!v.apiSettings.cache},single:function(){return!V.is.multiple()},selectMutation:function(e){let 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(f.search)},searchSelection:function(e){return V.has.search()&&1===(e?h.parents(b.dropdown):h.parent(b.dropdown)).length},selection:function(){return w.hasClass(f.selection)},userValue:function(e){return-1!==ee.inArray(e,V.get.userValues())},upward:function(e){let t=e||w;return t.hasClass(f.upward)},visible:function(e){return(e||C).hasClass(f.visible)},verticallyScrollableContext:function(){var e=a[0]!==te&&a.css("overflow-y");return"auto"===e||"scroll"===e},horizontallyScrollableContext:function(){var e=a[0]!==te&&a.css("overflow-X");return"auto"===e||"scroll"===e}},can:{activate:function(e){return v.useLabels||!V.has.maxSelections()||V.has.maxSelections()&&e.hasClass(f.active)},openDownward:function(e){let t=e||C,n;let i;return t.addClass(f.loading),i={context:{offset:a[0]===te?{top:0,left:0}:a.offset(),scrollTop:a.scrollTop(),height:a.outerHeight()},menu:{offset:t.offset(),height:t.outerHeight()}},V.is.verticallyScrollableContext()&&(i.menu.offset.top+=i.context.scrollTop),V.has.subMenu(t)&&(i.menu.height+=t.find(b.menu).first().outerHeight()),e={above:i.context.scrollTop<=i.menu.offset.top-i.context.offset.top-i.menu.height,below:i.context.scrollTop+i.context.height>=i.menu.offset.top-i.context.offset.top+i.menu.height},n=e.below?(V.verbose("Dropdown can fit in context downward",e),!0):e.above?(V.verbose("Dropdown cannot fit below, opening upward",e),!1):(V.verbose("Dropdown cannot fit in either direction, favoring downward",e),!0),t.removeClass(f.loading),n},openRightward:function(e){let t=e||C,n=!0;let i;return t.addClass(f.loading),i={context:{offset:a[0]===te?{top:0,left:0}:a.offset(),scrollLeft:a.scrollLeft(),width:a.outerWidth()},menu:{offset:t.offset(),width:t.outerWidth()}},V.is.horizontallyScrollableContext()&&(i.menu.offset.left+=i.context.scrollLeft),(e=i.menu.offset.left-i.context.offset.left+i.menu.width>=i.context.scrollLeft+i.context.width)&&(V.verbose("Dropdown cannot fit in context rightward",e),n=!1),t.removeClass(f.loading),n},extendSelect:function(){return v.allowAdditions||v.apiSettings},show:function(){return!V.is.disabled()&&(V.has.items()||V.has.message())},useAPI:function(){return void 0!==ee.fn.api},useElement:function(e){return void 0!==ee.fn[e]||(V.error(l.noElement.replace("{element}",e)),!1)}},animate:{show:function(e,t){let n=t||C,i=t?function(){}:function(){V.hideSubMenus(),V.hideOthers(),V.set.active()};e=ie(e)?e:function(){},V.verbose("Doing menu show animation",n),V.set.direction(t),t=v.transition.showMethod||V.get.transition(t),V.is.selection()&&V.set.scrollPosition(V.get.selectedItem(),!0),(V.is.hidden(n)||V.is.animating(n))&&("none"===t?(i(),n.transition({displayType:V.get.displayType()}).transition("show"),e.call(A)):V.can.useElement("transition")&&n.transition({animation:t+" in",debug:v.debug,verbose:v.verbose,silent:v.silent,duration:v.transition.showDuration||v.duration,queue:!0,onStart:i,displayType:V.get.displayType(),onComplete:function(){e.call(A)}}))},hide:function(e,t){let n=t||C,i=t?function(){}:function(){V.unbind.intent(),V.remove.active()};t=v.transition.hideMethod||V.get.transition(t);e=ie(e)?e:function(){},(V.is.visible(n)||V.is.animating(n))&&(V.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:V.get.displayType()}).transition("hide"),e.call(A)):void 0!==ee.fn.transition?n.transition({animation:t+" out",duration:v.transition.hideDuration||v.duration,debug:v.debug,verbose:v.verbose,silent:v.silent,queue:!1,onStart:i,displayType:V.get.displayType(),onComplete:function(){e.call(A)}}):V.error(l.transition))}},hideAndClear:function(){V.remove.searchTerm(),V.has.maxSelections()||(V.has.search()?V.hide(function(){V.remove.filteredItem()}):V.hide())},delay:{show:function(){V.verbose("Delaying show event to ensure user intent"),clearTimeout(V.timer),V.timer=setTimeout(function(){V.show()},v.delay.show)},hide:function(){V.verbose("Delaying hide event to ensure user intent"),clearTimeout(V.timer),V.timer=setTimeout(function(){V.hide()},v.delay.hide)}},escape:{string:function(e){return(e=String(e)).replace(F.escape,"\\$&")},htmlEntities:function(e){const t={'"':""","&":"&","'":"'","<":"<",">":">"};return String(e).replace(/["&'<>]/g,e=>t[e])},assumeUnescapedAmpLtGt:function(e){if(v.preserveHTML)return e;const t={"&":"&","<":"<",">":">"};return e.replace(/&(?:amp|lt|gt);/g,e=>t[e])}},setting:function(e,t){if(V.debug("Changing setting",e,t),ee.isPlainObject(e))ee.extend(!0,v,e);else{if(void 0===t)return v[e];ee.isPlainObject(v[e])?ee.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(ee.isPlainObject(e))ee.extend(!0,V,e);else{if(void 0===t)return V[e];V[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?V.performance.log(arguments):(V.debug=Function.prototype.bind.call(console.info,console,v.name+":"),V.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?V.performance.log(arguments):(V.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),V.verbose.apply(console,arguments)))},error:function(){v.silent||(V.error=Function.prototype.bind.call(console.error,console,v.name+":"),V.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=Date.now())-($||t),$=t,_.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:A,"Execution Time":n})),clearTimeout(V.performance.timer),V.performance.timer=setTimeout(function(){V.performance.display()},500)},display:function(){var e=v.name+":";let n=0;$=!1,clearTimeout(V.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){let a=k,o,s,n;return e=e||Y,t=t||A,"string"==typeof i&&void 0!==a&&(i=i.split(/[ .]/),o=i.length-1,ee.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(ee.isPlainObject(a[n])&&e!==o)a=a[n];else{if(void 0!==a[n])return s=a[n],!1;{if(!ee.isPlainObject(a[t])||e===o)return void 0!==a[t]?s=a[t]:V.error(l.method,i),!1;a=a[t]}}})),ie(s)?n=s.apply(t,e):void 0!==s&&(n=s),Array.isArray(Z)?Z.push(n):void 0!==Z?Z=[Z,n]:void 0!==n&&(Z=n),s}},X?(void 0===k&&V.initialize(),V.invoke(Q)):(void 0!==k&&k.invoke("destroy"),V.initialize())}),void 0!==Z?Z:B},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",highlightMatches:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!1,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,collapseOnClearable:!1,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}"},regExp:{escape:/[\s#$()*+,.:=?@[\\\]^{|}-]/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",data:"data",type:"type",image:"image",imageClass:"imageClass",alt:"alt",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={escape:function(e,t){if(void 0!==t&&t.preserveHTML)return e;const n={'"':""","&":"&","'":"'","<":"<",">":">"};return String(e).replace(/["&'<>]/g,e=>n[e])},dropdown:function(e,t){var n=e.placeholder||!1,i="",a=t.className;let o=t.templates.escape;return(i+='<i class="dropdown icon"></i>')+(n?'<div class="default text">'+o(n,t)+"</div>":'<div class="text"></div>')+('<div class="'+o(a.menu)+'">')+t.templates.menu(e,t)+"</div>"},menu:function(e,u){let v=u.fields;e=e[v.values]||[];let m="",h=u.className,f=u.templates.escape;return ee.each(e,function(e,t){let n=t[v.type]||"item";var i=-1!==n.indexOf("menu");let a="";var o,s,l,r,c,d=t[v.data];if(d){let e,t;for(e in d)t=String(e).replace(/\W/g,""),Object.prototype.hasOwnProperty.call(d,e)&&-1===["text","value"].indexOf(t.toLowerCase())&&(a+=" data-"+t+'="'+f(String(d[e]))+'"')}"item"===n||i?(o=t[v.text]?' data-text="'+f(t[v.text])+'"':"",r=t[v.actionable]?h.actionable+" ":"",c=t[v.disabled]?h.disabled+" ":"",s=t[v.descriptionVertical]?h.descriptionVertical+" ":"",l=""!==f(t[v.description]||"",u),m+='<div class="'+f(r+c+s+(t[v.class]||h.item))+'" data-value="'+f(t[v.value])+'"'+o+a+">",i&&(m+='<i class="'+(-1!==n.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[v.image]&&(m+='<img class="'+f(t[v.imageClass]||h.image)+'" src="'+f(t[v.image])+'"'+(t[v.alt]?' alt="'+f(t[v.alt])+'"':"")+">"),t[v.icon]&&(m+='<i class="'+f(t[v.icon]+" "+(t[v.iconClass]||h.icon))+'"></i>'),l&&(m=(m+='<span class="'+f(h.description)+'">'+f(t[v.description]||"",u)+"</span>")+(i?"":'<span class="'+f(h.text)+'">')),i&&(m+='<span class="'+f(h.text)+'">'),m+=f(t[v.name]||"",u),i?m=(m=(m+="</span>")+'<div class="'+f(n)+'">')+u.templates.menu(t,u)+"</div>":l&&(m+="</span>"),m+="</div>"):"header"===n&&(r=t[v.name]||"",c=t[v.icon]||h.groupIcon,""===r&&""===c||(m+='<div class="'+f(t[v.class]||h.header)+'">',""!==c&&(m+='<i class="'+f(c+" "+(t[v.iconClass]||h.icon))+'"></i>'),m=m+f(r,u)+"</div>"),t[v.divider]&&(m+='<div class="'+f(h.divider)+'"></div>'))}),m},label:function(e,t,n){var i=n.className;let a=n.templates.escape;return a(t,n)+'<i class="'+a(i.delete)+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document);
|
package/dist/components/embed.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.14+ea33639 - Embed
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -612,8 +612,7 @@
|
|
612
612
|
|
613
613
|
templates: {
|
614
614
|
escape: function (string) {
|
615
|
-
const
|
616
|
-
const escape = {
|
615
|
+
const escapeMap = {
|
617
616
|
'"': '"',
|
618
617
|
'&': '&',
|
619
618
|
"'": ''',
|
@@ -621,7 +620,7 @@
|
|
621
620
|
'>': '>',
|
622
621
|
};
|
623
622
|
|
624
|
-
return String(string).replace(
|
623
|
+
return String(string).replace(/["&'<>]/g, (chr) => escapeMap[chr]);
|
625
624
|
},
|
626
625
|
iframe: function (url, parameters) {
|
627
626
|
let src = url;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.10.0-beta.
|
2
|
+
* # Fomantic UI - 2.10.0-beta.14+ea33639
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(U,e){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,U.fn.embed=function(v){let g=U(this),y=Date.now(),w=[],D=v,P="string"==typeof D,C=[].slice.call(arguments,1),E;return g.each(function(){let t=U.isPlainObject(v)?U.extend(!0,{},U.fn.embed.settings,v):U.extend({},U.fn.embed.settings),e=t.selector,o=t.className,a=t.sources,l=t.error,r=t.metadata;var n=t.namespace;let i=t.templates,c="."+n,d="module-"+n,u=U(this),s=void u.find(e.placeholder),m=void u.find(e.icon),p=u.find(e.embed),f=this,h=u.data(d),b;b={initialize:function(){b.debug("Initializing embed"),b.determine.autoplay(),b.create(),b.bind.events(),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),h=b,u.data(d,b)},destroy:function(){b.verbose("Destroying previous instance of embed"),b.reset(),u.removeData(d).off(c)},refresh:function(){b.verbose("Refreshing selector cache"),s=u.find(e.placeholder),m=u.find(e.icon),p=u.find(e.embed)},bind:{events:function(){b.has.placeholder()&&(b.debug("Adding placeholder events"),u.on("click"+c,e.placeholder,b.createAndShow).on("click"+c,e.icon,b.createAndShow))}},create:function(){b.get.placeholder()?b.createPlaceholder():b.createAndShow()},createPlaceholder:function(e){var o=b.get.icon(),n=b.get.alt();e=e||b.get.placeholder(),u.html(i.placeholder(e,o,n)),b.debug("Creating placeholder for embed",e,o,n)},createEmbed:function(e){b.refresh(),e=e||b.get.url(),p=U("<div/>").addClass(o.embed).html(b.generate.embed(e)).appendTo(u),t.onCreate.call(f,e),b.debug("Creating embed object",p)},changeEmbed:function(e){p.html(b.generate.embed(e))},createAndShow:function(){b.createEmbed(),b.show()},change:function(e,o,n){b.debug("Changing video to ",e,o,n),u.data(r.source,e).data(r.id,o),n?u.data(r.url,n):u.removeData(r.url),b.has.embed()?b.changeEmbed():b.create()},reset:function(){b.debug("Clearing embed and showing placeholder"),b.remove.data(),b.remove.active(),b.remove.embed(),b.showPlaceholder(),t.onReset.call(f)},show:function(){b.debug("Showing embed"),b.set.active(),t.onDisplay.call(f)},hide:function(){b.debug("Hiding embed"),b.showPlaceholder()},showPlaceholder:function(){b.debug("Showing placeholder image"),b.remove.active(),t.onPlaceholderDisplay.call(f)},get:{id:function(){return t.id||u.data(r.id)},placeholder:function(){return t.placeholder||u.data(r.placeholder)},alt:function(){return t.alt||u.data(r.alt)},icon:function(){return t.icon||(void 0!==u.data(r.icon)?u.data(r.icon):b.determine.icon())},source:function(e){return t.source||(void 0!==u.data(r.source)?u.data(r.source):b.determine.source())},type:function(){var e=b.get.source();return void 0!==a[e]&&a[e].type},url:function(){return t.url||(void 0!==u.data(r.url)?u.data(r.url):b.determine.url())}},determine:{autoplay:function(){b.should.autoplay()&&(t.autoplay=!0)},source:function(n){let t=!1;return(n=n||b.get.url())&&U.each(a,function(e,o){if(-1!==n.search(o.domain))return t=e,!1}),t},icon:function(){var e=b.get.source();return void 0!==a[e]&&a[e].icon},url:function(){var e=t.id||u.data(r.id),o=t.source||u.data(r.source),o=void 0!==a[o]&&a[o].url.replace("{id}",e);return o&&u.data(r.url,o),o}},set:{active:function(){u.addClass(o.active)}},remove:{data:function(){u.removeData(r.id).removeData(r.icon).removeData(r.placeholder).removeData(r.alt).removeData(r.source).removeData(r.url)},active:function(){u.removeClass(o.active)},embed:function(){p.empty()}},encode:{parameters:function(e){let o=[],n;for(n in e)o.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return o.join("&")}},generate:{embed:function(e){b.debug("Generating embed html");var o=b.get.source();let n;return(e=b.get.url(e))?(o=b.generate.parameters(o),n=i.iframe(e,o)):b.error(l.noURL,u),n},parameters:function(e,o){let n=a[e]&&void 0!==a[e].parameters?a[e].parameters(t):{};return(o=o||t.parameters)&&(n=U.extend({},n,o)),n=t.onEmbed(n),b.encode.parameters(n)}},has:{embed:function(){return 0<p.length},placeholder:function(){return t.placeholder||u.data(r.placeholder)}},should:{autoplay:function(){return"auto"===t.autoplay?t.placeholder||void 0!==u.data(r.placeholder):t.autoplay}},is:{video:function(){return"video"===b.get.type()}},setting:function(e,o){if(b.debug("Changing setting",e,o),U.isPlainObject(e))U.extend(!0,t,e);else{if(void 0===o)return t[e];U.isPlainObject(t[e])?U.extend(!0,t[e],o):t[e]=o}},internal:function(e,o){if(U.isPlainObject(e))U.extend(!0,b,e);else{if(void 0===o)return b[e];b[e]=o}},debug:function(){!t.silent&&t.debug&&(t.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,t.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!t.silent&&t.verbose&&t.debug&&(t.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,t.name+":"),b.verbose.apply(console,arguments)))},error:function(){t.silent||(b.error=Function.prototype.bind.call(console.error,console,t.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var o,n;t.performance&&(n=(o=Date.now())-(y||o),y=o,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(function(){b.performance.display()},500)},display:function(){let e=t.name+":",n=0;y=!1,clearTimeout(b.performance.timer),U.each(w,function(e,o){n+=o["Execution Time"]}),e+=" "+n+"ms",1<g.length&&(e+=" ("+g.length+")"),0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):U.each(w,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(t,e,o){let a=h,r,i,n;var c;return e=e||C,o=o||f,"string"==typeof t&&void 0!==a&&(t=t.split(/[ .]/),r=t.length-1,U.each(t,function(e,o){var n=e!==r?o+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(U.isPlainObject(a[n])&&e!==r)a=a[n];else{if(void 0!==a[n])return i=a[n],!1;{if(!U.isPlainObject(a[o])||e===r)return void 0!==a[o]?i=a[o]:b.error(l.method,t),!1;a=a[o]}}})),"function"==typeof(c=i)&&"number"!=typeof c.nodeType?n=i.apply(o,e):void 0!==i&&(n=i),Array.isArray(E)?E.push(n):void 0!==E?E=[E,n]:void 0!==n&&(E=n),i}},P?(void 0===h&&b.initialize(),b.invoke(D)):(void 0!==h&&h.invoke("destroy"),b.initialize())}),void 0!==E?E:this},U.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,placeholder:!1,alt:!1,autoplay:"auto",color:"#444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",alt:"alt",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||void 0,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||void 0,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{escape:function(e){const o={'"':""","&":"&","'":"'","<":"<",">":">"};return String(e).replace(/["'<>]
|
11
|
+
!function(U,e){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,U.fn.embed=function(v){let g=U(this),y=Date.now(),w=[],D=v,P="string"==typeof D,C=[].slice.call(arguments,1),E;return g.each(function(){let t=U.isPlainObject(v)?U.extend(!0,{},U.fn.embed.settings,v):U.extend({},U.fn.embed.settings),e=t.selector,o=t.className,a=t.sources,l=t.error,r=t.metadata;var n=t.namespace;let i=t.templates,c="."+n,d="module-"+n,u=U(this),s=void u.find(e.placeholder),m=void u.find(e.icon),p=u.find(e.embed),f=this,h=u.data(d),b;b={initialize:function(){b.debug("Initializing embed"),b.determine.autoplay(),b.create(),b.bind.events(),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),h=b,u.data(d,b)},destroy:function(){b.verbose("Destroying previous instance of embed"),b.reset(),u.removeData(d).off(c)},refresh:function(){b.verbose("Refreshing selector cache"),s=u.find(e.placeholder),m=u.find(e.icon),p=u.find(e.embed)},bind:{events:function(){b.has.placeholder()&&(b.debug("Adding placeholder events"),u.on("click"+c,e.placeholder,b.createAndShow).on("click"+c,e.icon,b.createAndShow))}},create:function(){b.get.placeholder()?b.createPlaceholder():b.createAndShow()},createPlaceholder:function(e){var o=b.get.icon(),n=b.get.alt();e=e||b.get.placeholder(),u.html(i.placeholder(e,o,n)),b.debug("Creating placeholder for embed",e,o,n)},createEmbed:function(e){b.refresh(),e=e||b.get.url(),p=U("<div/>").addClass(o.embed).html(b.generate.embed(e)).appendTo(u),t.onCreate.call(f,e),b.debug("Creating embed object",p)},changeEmbed:function(e){p.html(b.generate.embed(e))},createAndShow:function(){b.createEmbed(),b.show()},change:function(e,o,n){b.debug("Changing video to ",e,o,n),u.data(r.source,e).data(r.id,o),n?u.data(r.url,n):u.removeData(r.url),b.has.embed()?b.changeEmbed():b.create()},reset:function(){b.debug("Clearing embed and showing placeholder"),b.remove.data(),b.remove.active(),b.remove.embed(),b.showPlaceholder(),t.onReset.call(f)},show:function(){b.debug("Showing embed"),b.set.active(),t.onDisplay.call(f)},hide:function(){b.debug("Hiding embed"),b.showPlaceholder()},showPlaceholder:function(){b.debug("Showing placeholder image"),b.remove.active(),t.onPlaceholderDisplay.call(f)},get:{id:function(){return t.id||u.data(r.id)},placeholder:function(){return t.placeholder||u.data(r.placeholder)},alt:function(){return t.alt||u.data(r.alt)},icon:function(){return t.icon||(void 0!==u.data(r.icon)?u.data(r.icon):b.determine.icon())},source:function(e){return t.source||(void 0!==u.data(r.source)?u.data(r.source):b.determine.source())},type:function(){var e=b.get.source();return void 0!==a[e]&&a[e].type},url:function(){return t.url||(void 0!==u.data(r.url)?u.data(r.url):b.determine.url())}},determine:{autoplay:function(){b.should.autoplay()&&(t.autoplay=!0)},source:function(n){let t=!1;return(n=n||b.get.url())&&U.each(a,function(e,o){if(-1!==n.search(o.domain))return t=e,!1}),t},icon:function(){var e=b.get.source();return void 0!==a[e]&&a[e].icon},url:function(){var e=t.id||u.data(r.id),o=t.source||u.data(r.source),o=void 0!==a[o]&&a[o].url.replace("{id}",e);return o&&u.data(r.url,o),o}},set:{active:function(){u.addClass(o.active)}},remove:{data:function(){u.removeData(r.id).removeData(r.icon).removeData(r.placeholder).removeData(r.alt).removeData(r.source).removeData(r.url)},active:function(){u.removeClass(o.active)},embed:function(){p.empty()}},encode:{parameters:function(e){let o=[],n;for(n in e)o.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return o.join("&")}},generate:{embed:function(e){b.debug("Generating embed html");var o=b.get.source();let n;return(e=b.get.url(e))?(o=b.generate.parameters(o),n=i.iframe(e,o)):b.error(l.noURL,u),n},parameters:function(e,o){let n=a[e]&&void 0!==a[e].parameters?a[e].parameters(t):{};return(o=o||t.parameters)&&(n=U.extend({},n,o)),n=t.onEmbed(n),b.encode.parameters(n)}},has:{embed:function(){return 0<p.length},placeholder:function(){return t.placeholder||u.data(r.placeholder)}},should:{autoplay:function(){return"auto"===t.autoplay?t.placeholder||void 0!==u.data(r.placeholder):t.autoplay}},is:{video:function(){return"video"===b.get.type()}},setting:function(e,o){if(b.debug("Changing setting",e,o),U.isPlainObject(e))U.extend(!0,t,e);else{if(void 0===o)return t[e];U.isPlainObject(t[e])?U.extend(!0,t[e],o):t[e]=o}},internal:function(e,o){if(U.isPlainObject(e))U.extend(!0,b,e);else{if(void 0===o)return b[e];b[e]=o}},debug:function(){!t.silent&&t.debug&&(t.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,t.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!t.silent&&t.verbose&&t.debug&&(t.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,t.name+":"),b.verbose.apply(console,arguments)))},error:function(){t.silent||(b.error=Function.prototype.bind.call(console.error,console,t.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var o,n;t.performance&&(n=(o=Date.now())-(y||o),y=o,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(function(){b.performance.display()},500)},display:function(){let e=t.name+":",n=0;y=!1,clearTimeout(b.performance.timer),U.each(w,function(e,o){n+=o["Execution Time"]}),e+=" "+n+"ms",1<g.length&&(e+=" ("+g.length+")"),0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):U.each(w,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(t,e,o){let a=h,r,i,n;var c;return e=e||C,o=o||f,"string"==typeof t&&void 0!==a&&(t=t.split(/[ .]/),r=t.length-1,U.each(t,function(e,o){var n=e!==r?o+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(U.isPlainObject(a[n])&&e!==r)a=a[n];else{if(void 0!==a[n])return i=a[n],!1;{if(!U.isPlainObject(a[o])||e===r)return void 0!==a[o]?i=a[o]:b.error(l.method,t),!1;a=a[o]}}})),"function"==typeof(c=i)&&"number"!=typeof c.nodeType?n=i.apply(o,e):void 0!==i&&(n=i),Array.isArray(E)?E.push(n):void 0!==E?E=[E,n]:void 0!==n&&(E=n),i}},P?(void 0===h&&b.initialize(),b.invoke(D)):(void 0!==h&&h.invoke("destroy"),b.initialize())}),void 0!==E?E:this},U.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,placeholder:!1,alt:!1,autoplay:"auto",color:"#444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",alt:"alt",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||void 0,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||void 0,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{escape:function(e){const o={'"':""","&":"&","'":"'","<":"<",">":">"};return String(e).replace(/["&'<>]/g,e=>o[e])},iframe:function(e,o){let n=e,t=U.fn.embed.settings.templates.escape;return o&&(n+="?"+o),'<iframe src="'+t(n)+'" width="100%" height="100%" msallowFullScreen allowFullScreen></iframe>'},placeholder:function(e,o,n){let t="",a=U.fn.embed.settings.templates.escape;return o&&(t+='<i class="'+a(o)+' icon"></i>'),e&&(t+='<img class="placeholder" src="'+a(e)+'"'+(n?' alt="'+a(n)+'"':"")+">"),t}},api:!1,onPause:function(){},onPlay:function(){},onStop:function(){}}}(jQuery,window,document);
|
package/dist/components/feed.css
CHANGED
package/dist/components/flag.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.14+ea33639 - Flyout
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -1023,8 +1023,7 @@
|
|
1023
1023
|
return string;
|
1024
1024
|
}
|
1025
1025
|
|
1026
|
-
const
|
1027
|
-
const escape = {
|
1026
|
+
const escapeMap = {
|
1028
1027
|
'"': '"',
|
1029
1028
|
'&': '&',
|
1030
1029
|
"'": ''',
|
@@ -1032,7 +1031,7 @@
|
|
1032
1031
|
'>': '>',
|
1033
1032
|
};
|
1034
1033
|
|
1035
|
-
return String(string).replace(
|
1034
|
+
return String(string).replace(/["&'<>]/g, (chr) => escapeMap[chr]);
|
1036
1035
|
},
|
1037
1036
|
},
|
1038
1037
|
|