/* * # Fomantic UI - 2.9.2 * https://github.com/fomantic/Fomantic-UI * https://fomantic-ui.com/ * * Copyright 2023 Contributors * Released under the MIT license * https://opensource.org/licenses/MIT * */ !function(X,R,U){"use strict";function V(e){return"function"==typeof e&&"number"!=typeof e.nodeType}R=void 0!==R&&R.Math===Math?R:globalThis,X.fn.modal=function(L){var N,e=X(this),I=X(R),j=X(U),z=X("body"),q=e.selector||"",B=Date.now(),W=[],P=L,K="string"==typeof P,Q=[].slice.call(arguments,1);return e.each(function(){var i,o,s,e,n,t,a,r,c,l,d,u=X.isPlainObject(L)?X.extend(!0,{},X.fn.modal.settings,L):X.extend({},X.fn.modal.settings),f=u.selector,m=u.className,h=u.namespace,g=u.fields,v=u.error,p="."+h,b="module-"+h,y=X(this),x=[R,U].indexOf(u.context)<0?j.find(u.context):z,k=x[0]===z[0],w=y.find(f.closeIcon),C=y.hasClass("modal"),S=this,A=C?y.data(b):void 0,M=!1,D="",T="",H=!1,F=!1,O=!1,E={initialize:function(){var s;E.create.id(),C||(E.create.modal(),V(u.onHidden))||(u.onHidden=function(){E.destroy(),y.remove()}),y.addClass(u.class),""!==u.title&&y.find(f.title).html(E.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&y.find(f.content).html(E.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),E.has.configActions()&&(0===(s=y.find(f.actions).addClass(u.classActions)).length?s=X("
",{class:m.actions+" "+(u.classActions||"")}).appendTo(y):s.empty(),u.actions.forEach(function(e){var t=e[g.icon]?"':"",i=E.helpers.escape(e[g.text]||"",u.preserveHTML),n=E.helpers.deQuote(e[g.class]||""),o=e[g.click]&&V(e[g.click])?e[g.click]:function(){};s.append(X("",{html:t+i,"aria-label":(e[g.text]||e[g.icon]||"").replace(/<[^>]+(>|$)/g,""),class:m.button+" "+n,on:{click:function(){var e=X(this);e.is(f.approve)||e.is(f.deny)||!1===o.call(S,y)||E.hide()}}}))})),E.cache={},E.verbose("Initializing dimmer",x),E.create.dimmer(),u.allowMultiple&&E.create.innerDimmer(),u.centered||y.addClass("top aligned"),E.refreshModals(),E.bind.events(),E.observeChanges(),E.instantiate(),u.autoShow&&E.show()},instantiate:function(){E.verbose("Storing instance of modal"),A=E,y.data(b,A)},create:{modal:function(){var e;y=X("",{class:m.modal,role:"dialog","aria-modal":!0}),u.closeIcon&&(w=X("",{class:m.close,role:"button",tabindex:0,"aria-label":u.text.close}),y.append(w)),""!==u.title&&(e="_"+E.get.id()+"title",y.attr("aria-labelledby",e),X("",{class:m.title,id:e}).appendTo(y)),""!==u.content&&(e="_"+E.get.id()+"desc",y.attr("aria-describedby",e),X("",{class:m.content,id:e}).appendTo(y)),E.has.configActions()&&X("",{class:m.actions}).appendTo(y),x.append(y),S=y[0]},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=X.extend(!0,e,u.dimmerSettings);void 0===X.fn.dimmer?E.error(v.dimmer):(E.debug("Creating dimmer"),n=x.dimmer(e),H=E.is.scrolling(),u.detachable?(E.verbose("Modal is detachable, moving content into dimmer"),n.dimmer("add content",y)):E.set.undetached(),t=n.dimmer("get dimmer"))},id:function(){l=(Math.random().toString(16)+"000000000").slice(2,10),c="."+l,E.verbose("Creating unique id for element",l)},innerDimmer:function(){0===y.find(f.dimmer).length&&X("",{class:m.innerDimmer}).prependTo(y)}},destroy:function(){d&&d.disconnect(),E.verbose("Destroying previous modal"),y.removeData(b).off(p),I.off(c),t.off(c),w.off(c),i&&i.off(c),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in R&&((d=new MutationObserver(function(e){function o(e){for(var t=[],i=0,n=e.length;i