/* * # Fomantic UI - 2.8.8 * https://github.com/fomantic/Fomantic-UI * http://fomantic-ui.com/ * * Copyright 2022 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(te,ne,ie,ae){"use strict";te.isFunction=te.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ne=void 0!==ne&&ne.Math==Math?ne:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),te.fn.dropdown=function(B){var K,W=te(this),Q=te(ie),Y=W.selector||"",$="ontouchstart"in ie.documentElement,X=$?"touchstart":"click",G=(new Date).getTime(),J=[],Z=B,_="string"==typeof Z,ee=[].slice.call(arguments,1);return W.each(function(n){var d,e,t,i,a,s,o,r,l,v=te.isPlainObject(B)?te.extend(!0,{},te.fn.dropdown.settings,B):te.extend({},te.fn.dropdown.settings),m=v.className,h=v.message,c=v.fields,f=v.keys,g=v.metadata,u=v.namespace,p=v.regExp,b=v.selector,w=v.error,C=v.templates,y="."+u,x="module-"+u,S=te(this),A=te(v.context),T=S.find(b.text),L=S.find(b.search),I=S.find(b.sizer),D=S.find(b.input),k=S.find(b.icon),O=S.find(b.clearIcon),q=0").html(i).attr("data-"+g.value,t).attr("data-"+g.text,t).addClass(m.addition).addClass(m.item),v.hideAdditions&&i.addClass(m.hidden),n=n===ae?i:n.add(i),U.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=U.get.userValues();t&&(U.debug("Adding user labels",t),te.each(t,function(e,t){U.verbose("Adding custom user value"),U.add.label(t,t)}))},menu:function(){R=te("
").addClass(m.menu).appendTo(S)},sizer:function(){I=te("").addClass(m.sizer).insertAfter(L)}},search:function(e){e=e!==ae?e:U.get.query(),U.verbose("Searching for query",e),!1===v.fireOnInit&&U.is.initialLoad()?U.verbose("Skipping callback on initial load",v.onSearch):U.has.minCharacters(e)&&!1!==v.onSearch.call(N,e)?U.filter(e):U.hide(null,!0)},select:{firstUnfiltered:function(){U.verbose("Selecting first non-filtered element"),U.remove.selectedItem(),V.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(m.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(b.item).not(b.unselectable).eq(0),e=e.prevAll(b.item).not(b.unselectable).eq(0);0").addClass("remove icon").insertBefore(T)),U.is.search()&&!U.has.search()&&(U.verbose("Adding search input"),L=te("").addClass(m.search).prop("autocomplete",U.is.chrome()?"fomantic-search":"off").insertBefore(T)),U.is.multiple()&&U.is.searchSelection()&&!U.has.sizer()&&U.create.sizer(),v.allowTab&&U.set.tabbable()},select:function(){var e=U.get.selectValues();U.debug("Dropdown initialized on a select",e),0<(D=S.is("select")?S:D).parent(b.dropdown).length?(U.debug("UI dropdown already exists. Creating dropdown menu only"),S=D.closest(b.dropdown),U.has.menu()||U.create.menu(),R=S.children(b.menu),U.setup.menu(e)):(U.debug("Creating entire dropdown from select"),S=te("
").attr("class",D.attr("class")).addClass(m.selection).addClass(m.dropdown).html(C.dropdown(e,c,v.preserveHTML,v.className)).insertBefore(D),D.hasClass(m.multiple)&&!1===D.prop("multiple")&&(U.error(w.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&U.set.multiple(),D.prop("disabled")&&(U.debug("Disabling dropdown"),S.addClass(m.disabled)),D.removeAttr("required").removeAttr("class").detach().prependTo(S)),U.refresh()},menu:function(e){R.html(C.menu(e,c,v.preserveHTML,v.className)),V=R.find(b.item),E=v.hideDividers?V.parent().children(b.divider):te()},reference:function(){U.debug("Dropdown behavior was called on select, replacing with closest dropdown"),S=S.parent(b.dropdown),j=S.data(x),N=S.get(0),U.refresh(),U.setup.returnedObject()},returnedObject:function(){var e=W.slice(0,n),t=W.slice(n+1);W=e.add(S).add(t)}},refresh:function(){U.refreshSelectors(),U.refreshData()},refreshItems:function(){V=R.find(b.item),E=v.hideDividers?V.parent().children(b.divider):te()},refreshSelectors:function(){U.verbose("Refreshing selector cache"),T=S.find(b.text),L=S.find(b.search),D=S.find(b.input),k=S.find(b.icon),q=0"),te.each(e,function(e,t){var n=v.templates.deQuote(t[c.value]),t=v.templates.escape(t[c.name]||"",v.preserveHTML);D.append('")}),U.observe.select())}},event:{change:function(){F||(U.debug("Input changed, updating selection"),U.set.selected())},focus:function(){v.showOnFocus&&!M&&U.is.hidden()&&!t&&(H=!0,U.show())},blur:function(e){t=ie.activeElement===this,M||t||(U.remove.activeLabel(),U.hide())},mousedown:function(){U.is.searchSelection()?i=!0:M=!0},mouseup:function(){U.is.searchSelection()?i=!1:M=!1},click:function(e){te(e.target).is(S)&&(U.is.focusedOnSearch()?U.show():U.focusSearch())},search:{focus:function(e){M=!0,U.is.multiple()&&U.remove.activeLabel(),H||U.is.active()||!(v.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||(H=!0,U.search())},blur:function(e){t=ie.activeElement===this,U.is.searchSelection()&&!i&&(z||t||(v.forceSelection?U.forceSelection():v.allowAdditions||U.remove.searchTerm(),U.hide())),i=!1}},clearIcon:{click:function(e){U.clear(),U.is.searchSelection()&&U.remove.searchTerm(),U.hide(),e.stopPropagation()}},icon:{click:function(e){P=!0,U.has.search()?U.is.active()?U.blurSearch():v.showOnFocus?U.focusSearch():U.toggle():U.toggle(),e.stopPropagation()}},text:{focus:function(e){M=!0,U.focusSearch()}},input:function(e){(U.is.multiple()||U.is.searchSelection())&&U.set.filtered(),clearTimeout(U.timer),U.timer=setTimeout(U.search,v.delay.search)},label:{click:function(e){var t=te(this),n=S.find(b.label),i=n.filter("."+m.active),a=t.nextAll("."+m.active),s=t.prevAll("."+m.active),s=(0 modified, recreating menu"),U.is.selectMutation(e)&&(U.disconnect.selectObserver(),U.refresh(),U.setup.select(),U.set.selected(),U.observe.select())}},menu:{mutation:function(e){var t=e[0],e=t.addedNodes?te(t.addedNodes[0]):te(!1),t=t.removedNodes?te(t.removedNodes[0]):te(!1),e=e.add(t),t=e.is(b.addition)||0=v.maxSelections?(U.debug("Maximum selection count reached"),v.useLabels&&(V.addClass(m.filtered),U.add.message(h.maxSelections)),!0):(U.verbose("No longer at maximum selection count"),U.remove.message(),U.remove.filteredItem(),U.is.searchSelection()&&U.filterItems(),!1))},disabled:function(){L.attr("tabindex",U.is.disabled()?-1:0)}},restore:{defaults:function(e){U.clear(e),U.restore.defaultText(),U.restore.defaultValue()},defaultText:function(){var e=U.get.defaultText();e===U.get.placeholderText?(U.debug("Restoring default placeholder text",e),U.set.placeholderText(e)):(U.debug("Restoring default text",e),U.set.text(e))},placeholderText:function(){U.set.placeholderText()},defaultValue:function(){var e=U.get.defaultValue();e!==ae&&(U.debug("Restoring default value",e),""!==e?(U.set.value(e),U.set.selected()):(U.remove.activeItem(),U.remove.selectedItem()))},labels:function(){v.allowAdditions&&(v.useLabels||(U.error(w.labels),v.useLabels=!0),U.debug("Restoring selected values"),U.create.userLabels()),U.check.maxSelections()},selected:function(){U.restore.values(),U.is.multiple()?(U.debug("Restoring previously selected values and labels"),U.restore.labels()):U.debug("Restoring previously selected values")},values:function(){U.set.initialLoad(),v.apiSettings&&v.saveRemoteData&&U.get.remoteValues()?U.restore.remoteValues():U.set.selected();var e=U.get.value();!e||""===e||Array.isArray(e)&&0===e.length?D.addClass(m.noselection):D.removeClass(m.noselection),U.remove.initialLoad()},remoteValues:function(){var e=U.get.remoteValues();U.debug("Recreating selected from session data",e),e&&(U.is.single()?te.each(e,function(e,t){U.set.text(t)}):te.each(e,function(e,t){U.add.label(e,t)}))}},read:{remoteData:function(e){if(ne.Storage!==ae)return(e=sessionStorage.getItem(e))!==ae&&e;U.error(w.noStorage)}},save:{defaults:function(){U.save.defaultText(),U.save.placeholderText(),U.save.defaultValue()},defaultValue:function(){var e=U.get.value();U.verbose("Saving default value as",e),S.data(g.defaultValue,e)},defaultText:function(){var e=U.get.text();U.verbose("Saving default text as",e),S.data(g.defaultText,e)},placeholderText:function(){var e;!1!==v.placeholder&&T.hasClass(m.placeholder)&&(e=U.get.text(),U.verbose("Saving placeholder text as",e),S.data(g.placeholderText,e))},remoteData:function(e,t){ne.Storage!==ae?(U.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):U.error(w.noStorage)}},clear:function(e){U.is.multiple()&&v.useLabels?U.remove.labels(S.find(b.label),e):(U.remove.activeItem(),U.remove.selectedItem(),U.remove.filteredItem()),U.set.placeholderText(),U.clearValue(e)},clearValue:function(e){U.set.value("",null,null,e)},scrollPage:function(e,t){var n=t||U.get.selectedItem(),i=n.closest(b.menu),a=i.outerHeight(),s=i.scrollTop(),t=V.eq(0).outerHeight(),a=Math.floor(a/t),s=(i.prop("scrollHeight"),"up"==e?s-t*a:s+t*a),t=V.not(b.unselectable),a="up"==e?t.index(n)-a:t.index(n)+a,t=("up"==e?0<=a:a").addClass(m.label).attr("data-"+g.value,s).html(C.label(s,t,v.preserveHTML,v.className)),i=v.onLabelCreate.call(i,s,t),U.has.label(e)?U.debug("User selection already exists, skipping",s):(v.label.variation&&i.addClass(v.label.variation),!0===n?(U.debug("Animating in label",i),i.addClass(m.hidden).insertBefore(a).transition({animation:v.label.transition,debug:v.debug,verbose:v.verbose,duration:v.label.duration})):(U.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=R.children(b.message),e=v.templates.message(U.add.variables(e));0").html(e).addClass(m.message).appendTo(R)},optionValue:function(e){var t=U.escape.value(e);0").prop("value",t).addClass(m.addition).html(e).appendTo(D),U.verbose("Adding user addition as an