/* * # Fomantic UI - 2.8.4 * https://github.com/fomantic/Fomantic-UI * http://fomantic-ui.com/ * * Copyright 2014 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(I,R,N,P){"use strict";I.isFunction=I.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},R=void 0!==R&&R.Math==Math?R:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),I.fn.modal=function(M){var H,e=I(this),T=I(R),D=I(N),A=I("body"),E=e.selector||"",O=(new Date).getTime(),L=[],z=M,j="string"==typeof z,q=[].slice.call(arguments,1),B=R.requestAnimationFrame||R.mozRequestAnimationFrame||R.webkitRequestAnimationFrame||R.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,r,e,t,n,a,s,i,c,l,d,u=I.isPlainObject(M)?I.extend(!0,{},I.fn.modal.settings,M):I.extend({},I.fn.modal.settings),m=u.selector,f=u.className,g=u.namespace,h=u.error,v="."+g,b="module-"+g,p=I(this),y=I(u.context),w=p.find(m.close),S=this,C=p.data(b),x=!1,k="",F="";d={initialize:function(){d.cache={},d.verbose("Initializing dimmer",y),d.create.id(),d.create.dimmer(),u.allowMultiple&&d.create.innerDimmer(),u.centered||p.addClass("top aligned"),d.refreshModals(),d.bind.events(),u.observeChanges&&d.observeChanges(),d.instantiate()},instantiate:function(){d.verbose("Storing instance of modal"),C=d,p.data(b,C)},create:{dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},i=I.extend(!0,e,u.dimmerSettings);I.fn.dimmer!==P?(d.debug("Creating dimmer"),t=y.dimmer(i),u.detachable?(d.verbose("Modal is detachable, moving content into dimmer"),t.dimmer("add content",p)):d.set.undetached(),n=t.dimmer("get dimmer")):d.error(h.dimmer)},id:function(){c=(Math.random().toString(16)+"000000000").substr(2,8),i="."+c,d.verbose("Creating unique id for element",c)},innerDimmer:function(){0==p.find(m.dimmer).length&&p.prepend('
')}},destroy:function(){l&&l.disconnect(),d.verbose("Destroying previous modal"),p.removeData(b).off(v),T.off(i),n.off(i),w.off(v),y.dimmer("destroy")},observeChanges:function(){"MutationObserver"in R&&((l=new MutationObserver(function(e){d.debug("DOM tree modified, refreshing"),d.refresh()})).observe(S,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",l))},refresh:function(){d.remove.scrolling(),d.cacheSizes(),d.can.useFlex()||d.set.modalOffset(),d.set.screenHeight(),d.set.type()},refreshModals:function(){r=p.siblings(m.modal),o=r.add(p)},attachEvents:function(e,i){var n=I(e);i=I.isFunction(d[i])?d[i]:d.toggle,0=e.clientX))&&d.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(a)d.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(s)d.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var i=0 .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front"}}}(jQuery,window,document);