/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ !function(t){"use strict";function i(i,o){return o?("object"==typeof i?(i=i instanceof jQuery?i:t.$(i),i.parent().length&&(o.persist=i,o.persist.data("modalPersistParent",i.parent()))):i="string"==typeof i||"number"==typeof i?t.$("
").html(i):t.$("
").html("UIkit.modal Error: Unsupported data type: "+typeof i),i.appendTo(o.element.find(".uk-modal-dialog")),o):void 0}var o,e=!1,n=0,s=t.$html;t.component("modal",{defaults:{keyboard:!0,bgclose:!0,minScrollHeight:150,center:!1,modal:!0},scrollable:!1,transition:!1,init:function(){if(o||(o=t.$("body")),this.element.length){var i=this;this.paddingdir="padding-"+("left"==t.langdirection?"right":"left"),this.dialog=this.find(".uk-modal-dialog"),this.active=!1,this.element.attr("aria-hidden",this.element.hasClass("uk-open")),this.on("click",".uk-modal-close",function(t){t.preventDefault(),i.hide()}).on("click",function(o){var e=t.$(o.target);e[0]==i.element[0]&&i.options.bgclose&&i.hide()})}},toggle:function(){return this[this.isActive()?"hide":"show"]()},show:function(){if(this.element.length){if(!this.isActive())return this.options.modal&&e&&e.hide(!0),this.element.removeClass("uk-open").show(),this.resize(),this.options.modal&&(e=this),this.active=!0,n++,this.element.addClass("uk-open"),s.addClass("uk-modal-page").height(),this.element.attr("aria-hidden","false"),this.element.trigger("show.uk.modal"),t.Utils.checkDisplay(this.dialog,!0),this}},hide:function(i){if(!i&&t.support.transition){var o=this;this.one(t.support.transition.end,function(){o._hide()}).removeClass("uk-open")}else this._hide();return this},resize:function(){var t=o.width();if(this.scrollbarwidth=window.innerWidth-t,o.css(this.paddingdir,this.scrollbarwidth),this.element.css("overflow-y",this.scrollbarwidth?"scroll":"auto"),!this.updateScrollable()&&this.options.center){var i=this.dialog.outerHeight(),e=parseInt(this.dialog.css("margin-top"),10)+parseInt(this.dialog.css("margin-bottom"),10);i+ei?20:i)-o;return t.css("height",n
',t.modal.alert=function(i,o){o=t.$.extend(!0,{bgclose:!1,keyboard:!1,modal:!1,labels:t.modal.labels},o);var e=t.modal.dialog(['
'+String(i)+"
",'"].join(""),o);e.on("show.uk.modal",function(){setTimeout(function(){e.element.find("button:first").focus()},50)}),e.show()},t.modal.confirm=function(i,o,e){o=t.$.isFunction(o)?o:function(){},e=t.$.extend(!0,{bgclose:!1,keyboard:!1,modal:!1,labels:t.modal.labels},e);var n=t.modal.dialog(['
'+String(i)+"
",'"].join(""),e);n.element.find(".js-modal-confirm").on("click",function(){o(),n.hide()}),n.on("show.uk.modal",function(){setTimeout(function(){n.element.find("button:first").focus()},50)}),n.show()},t.modal.prompt=function(i,o,e,n){e=t.$.isFunction(e)?e:function(){},n=t.$.extend(!0,{bgclose:!1,keyboard:!1,modal:!1,labels:t.modal.labels},n);var s=t.modal.dialog([i?'
'+String(i)+"
":"",'

','"].join(""),n),a=s.element.find("input[type='text']").val(o||"").on("keyup",function(t){13==t.keyCode&&s.element.find(".js-modal-ok").trigger("click")});s.element.find(".js-modal-ok").on("click",function(){e(a.val())!==!1&&s.hide()}),s.on("show.uk.modal",function(){setTimeout(function(){a.focus()},50)}),s.show()},t.modal.blockUI=function(i,o){var e=t.modal.dialog(['
'+String(i||'
...
')+"
"].join(""),t.$.extend({bgclose:!1,keyboard:!1,modal:!1},o));return e.content=e.element.find(".uk-modal-content:first"),e.show(),e},t.modal.labels={Ok:"Ok",Cancel:"Cancel"}}(UIkit);