/* * # 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(T,e,F,D){"use strict";T.isFunction=T.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),T.fn.dimmer=function(p){var h,b=T(this),v=(new Date).getTime(),y=[],C=p,w="string"==typeof C,x=[].slice.call(arguments,1);return b.each(function(){var o,i,a=T.isPlainObject(p)?T.extend(!0,{},T.fn.dimmer.settings,p):T.extend({},T.fn.dimmer.settings),n=a.selector,c=a.namespace,e=a.className,l=a.error,t="."+c,u="module-"+c,f=b.selector||"",g="ontouchstart"in F.documentElement?"touchstart":"click",r=T(this),s=this,d=r.data(u),m={preinitialize:function(){o=m.is.dimmer()?(i=r.parent(),r):(i=r,m.has.dimmer()?a.dimmerName?i.find(n.dimmer).filter("."+a.dimmerName):i.find(n.dimmer):m.create())},initialize:function(){m.debug("Initializing dimmer",a),m.bind.events(),m.set.dimmable(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),d=m,r.data(u,d)},destroy:function(){m.verbose("Destroying previous module",o),m.unbind.events(),m.remove.variation(),i.off(t)},bind:{events:function(){"hover"==a.on?i.on("mouseenter"+t,m.show).on("mouseleave"+t,m.hide):"click"==a.on&&i.on(g+t,m.toggle),m.is.page()&&(m.debug("Setting as a page dimmer",i),m.set.pageDimmer()),m.is.closable()&&(m.verbose("Adding dimmer close event",o),i.on(g+t,n.dimmer,m.event.click))}},unbind:{events:function(){r.removeData(u),i.off(t)}},event:{click:function(e){m.verbose("Determining if event occurred on dimmer",e),0!==o.find(e.target).length&&!T(e.target).is(n.content)||(m.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=T(e);m.debug("Add content to dimmer",e),e.parent()[0]!==o[0]&&e.detach().appendTo(o)},create:function(){var e=T(a.template.dimmer(a));return a.dimmerName&&(m.debug("Creating named dimmer",a.dimmerName),e.addClass(a.dimmerName)),e.appendTo(i),e},show:function(e){e=T.isFunction(e)?e:function(){},m.debug("Showing dimmer",o,a),m.set.variation(),m.is.dimmed()&&!m.is.animating()||!m.is.enabled()?m.debug("Dimmer is already shown or disabled"):(m.animate.show(e),a.onShow.call(s),a.onChange.call(s))},hide:function(e){e=T.isFunction(e)?e:function(){},m.is.dimmed()||m.is.animating()?(m.debug("Hiding dimmer",o),m.animate.hide(e),a.onHide.call(s),a.onChange.call(s)):m.debug("Dimmer is not visible")},toggle:function(){m.verbose("Toggling dimmer visibility",o),m.is.dimmed()?m.is.closable()&&m.hide():m.show()},animate:{show:function(e){e=T.isFunction(e)?e:function(){},a.useCSS&&T.fn.transition!==D&&o.transition("is supported")?(a.useFlex?(m.debug("Using flex dimmer"),m.remove.legacy()):(m.debug("Using legacy non-flex dimmer"),m.set.legacy()),"auto"!==a.opacity&&m.set.opacity(),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.showMethod||a.transition)+" in",queue:!1,duration:m.get.duration(),useFailSafe:!0,onStart:function(){m.set.dimmed()},onComplete:function(){m.set.active(),e()}})):(m.verbose("Showing dimmer animation with javascript"),m.set.dimmed(),"auto"==a.opacity&&(a.opacity=.8),o.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(m.get.duration(),a.opacity,function(){o.removeAttr("style"),m.set.active(),e()}))},hide:function(e){e=T.isFunction(e)?e:function(){},a.useCSS&&T.fn.transition!==D&&o.transition("is supported")?(m.verbose("Hiding dimmer with css"),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.hideMethod||a.transition)+" out",queue:!1,duration:m.get.duration(),useFailSafe:!0,onComplete:function(){m.remove.dimmed(),m.remove.variation(),m.remove.active(),e()}})):(m.verbose("Hiding dimmer with javascript"),o.stop().fadeOut(m.get.duration(),function(){m.remove.dimmed(),m.remove.active(),o.removeAttr("style"),e()}))}},get:{dimmer:function(){return o},duration:function(){return m.is.active()?a.transition.hideDuration||a.duration.hide||a.duration:a.transition.showDuration||a.duration.show||a.duration}},has:{dimmer:function(){return a.dimmerName?0 .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(e){var i,n=T("
").addClass("ui dimmer");return e.displayLoader&&(i=T("
").addClass(e.className.loader).addClass(e.loaderVariation),e.loaderText&&(i.text(e.loaderText),i.addClass("text")),n.append(i)),n}}}}(jQuery,window,document);