text: !function(a){a(["jquery"],function(a,b){function c(a){u.modal(K).find(".modal-content").append(a)}function d(){var b,c;try{c=require("Q")}catch(a){c=window.Q}return c?b=c.defer():(b=a.Deferred(),b.promise=b.promise()),b.promise.element=g(!0).find(J),b}function e(b){if(!1===b)return x;var c=a(w).addClass("modal-footer").prop("id",C);if(b)for(var d=0,e=b.length;d<e;d++){var f=b[d],h=a("<button>").addClass("btn btn-"+(f.style||"primary"));for(var i in f)if(f.hasOwnProperty(i))switch(i){case"close":f[i]&&h.attr("data-dismiss","modal").addClass("x");break;case y:var j=f.click.bind(g(!0).find(".modal-content"));h.click(j);break;case"text":h.html(f[i]);break;default:h.attr(i,f[i])}c.append(h)}else c.append('<button class="x btn btn-primary" data-dismiss=modal type=button>Close</button>');return c}function f(b){var c,d=b.loading?O.loadingHtml:b.message||b;return d.on||d.onclick?(c=!0===b.clone?a(d).clone():a(d),c.addClass(b.useBin&&!b.loading?L:N)):c=a(w).attr("style","position:relative;word-wrap:break-word;").addClass(I).html(d),b.css&&b.css!==c.css&&c.css(b.css),c}function g(b){function c(){return a('<div id="myEmodal" class="modal fade" tabindex="-1"><style>.modal-xl{width:96%;}.modal-body{max-height: calc(100vh - 145px);overflow-y: auto;}</style><div class=modal-dialog><div class=modal-content> <div class=modal-header><button type=button class="x close" data-dismiss=modal><span aria-hidden=true>&times;</span><span class=sr-only>Close</span></button><h4 class=modal-title></h4></div></div></div></div>').on("hidden.bs.modal",h).on(y,"button.x",function(b){var c=a(b.currentTarget);if(c.prop("type")!==B)return u.modal(z);try{if(c.closest("form")[0].checkValidity())return t()}catch(a){return t()}return u})}return u||(a("#"+v).length||a("body").append(a(w).prop("id",v).hide()),u=c()),b&&u?u:u.on(A,function(){a(this).find(E).first().focus()})}function h(){if(u){var a=u.find("."+L).removeClass(L).appendTo("#"+v);u.off(D).off(A).find(".modal-content > div:not(:first-child)").remove(),O.allowContentRecycle&&!H.clone||a.remove()}}function i(b,c){if(!b)throw new Error("Invalid parameters!");h(),H=b;var d=g();d.find(J).removeClass("modal-sm modal-lg modal-xl").addClass(b.size?"modal-"+b.size:O.size),d.find(".modal-title").html((b.title||c||O.title)+" ").append(a("<small>").html(b.subtitle||x)),d.on(D,b.onHide)}function j(a,b){G[a]=b}function k(b,c){function e(a){return u.find("."+I).html(b.success?b.success(a):a),g.resolve(u)}function f(a,c){var d=b.error?b.error(a,c,h):'<div class="alert alert-danger"><strong>XHR Fail: </strong>URL [ '+h.url+"] load fail.</div>";return u.find("."+I).html(d),g.reject(a)}var g=d(),h={async:!0,deferred:g,loading:!0,title:b.title||c||O.title,url:b.url||b,dataType:b.dataType||"text"};return b.url&&a.extend(h,b),a.ajax(h).done(e).fail(f),l(h,c)}function l(b,g){i(b,g);var h=b.deferred||d();return c(a(w).append(f(b),e(b.buttons))),b.async||u.on(A,h.resolve),h.promise}function m(b,c){function e(b){t();var c=a(b.currentTarget).html();return G[c]?f.resolve():f.reject()}var f=d();return l({async:!0,buttons:[{close:!0,click:e,text:G[b.label]?G[b.label]:G[O.confirmLabel],style:b.style&&b.style[0]||F},{close:!0,click:e,text:G[b.label]?b.label:O.confirmLabel,style:b.style&&b.style[1]}],deferred:f,message:b.message||b,onHide:e,size:b.size,title:b.title||c})}function n(b,c){function e(){return a(this).parent().find("div."+N).fadeOut(function(){a(this).remove()}),f.resolve()}var f=d(),g='<div class=modal-body style="position: absolute;width: 100%;background-color: rgba(255,255,255,0.8);height: 100%;">%1%</div><iframe class="embed-responsive-item" frameborder=0 src="%0%" style="width:100%;height:75vh;display:block;"/>'.replace("%0%",b.message||b.url||b).replace("%1%",O.loadingHtml),h=a(g).load(e);return l({async:!0,buttons:b.buttons||!1,deferred:f,message:h,size:b.size||M.xl,title:b.title||c})}function o(){return a("#"+v+" > *").remove()}function p(b,c){function f(a){var b=u.find(E).val();return t(),a.type!==B?g.reject(b):g.resolve(b),!1}var g=d(),h={deferred:g};if("object"==typeof b?a.extend(h,b):(h.message=b,h.title=c),h.async=!0,h.buttons)for(var i,j=0,k=h.buttons.length;j<k;j++)i=h.buttons[j],i.style=(i.style||"default")+" pull-left",i.type=i.type||"button";var m=e([{close:!0,type:"reset",text:G.OK,style:F},{close:!1,type:B,text:O.confirmLabel}].concat(h.buttons||[]));return h.buttons=!1,h.onHide=f,h.message=a('<form role=form style="margin-bottom:0;"><div class=modal-body><label for=prompt-input class=control-label>'+(h.message||x)+'</label><input type=text class=form-control required autocomplete="on" value="'+(h.value||x)+(h.pattern?'" pattern="'+h.pattern:x)+'"></div></form>').append(m).on(B,f),l(h)}function q(a){g(!0).find(J).prop("id",a)}function r(b){return a.extend(O,b)}function s(b){return u&&u.remove(),a.extend(K,b)}function t(){return u&&u.off(D).modal(z),u}var u,v="recycle-bin",w="<div>",x="",y="click",z="hide",A="shown.bs.modal",B="submit",C="eFooter",D=z+".bs.modal",E="input",F="danger",G={OK:"Cancel",True:"False",Yes:"No"},H={},I="modal-body",J=".modal-dialog",K={},L="modal-rec",M={sm:"sm",lg:"lg",xl:"xl"},N="modal-tmp",O={allowContentRecycle:!0,confirmLabel:Object.keys(G)[0],labels:G,loadingHtml:'<h5>Loading...</h5><div class=progress><div class="progress-bar progress-bar-striped active" style="width: 100%"></div></div>',size:x,title:"Attention"};return b.addLabel=j,b.ajax=k,b.alert=l,b.close=t,b.confirm=m,b.emptyBin=o,b.iframe=n,b.prompt=p,b.setId=q,b.setEModalOptions=r,b.setModalOptions=s,b.size=M,b.version="1.2.65",b})}("function"==typeof define&&define.amd?define:function(a,b){this.eModal="undefined"!=typeof module&&module.exports?b(require(a[0]),module.exports):b(window.$,{})});