1/*! 2 * jQuery Form Plugin 3 * version: 3.50.0-2014.02.05 4 * Requires jQuery v1.5 or later 5 * Copyright (c) 2013 M. Alsup 6 * Examples and documentation at: http://malsup.com/jquery/form/ 7 * Project repository: https://github.com/malsup/form 8 * Dual licensed under the MIT and GPL licenses. 9 * https://github.com/malsup/form#copyright-and-license 10 */ 11!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";var t={};t.fileapi=void 0!==e("<input type='file'/>").get(0).files,t.formdata=void 0!==window.FormData;var r=!!e.fn.prop;function a(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function n(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function i(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}e.fn.attr2=function(){if(!r)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(a){if(!this.length)return i("ajaxSubmit: skipping submit process - no element selected"),this;var n,o,s,u=this;"function"==typeof a?a={success:a}:void 0===a&&(a={}),n=a.type||this.attr2("method"),(s=(s="string"==typeof(o=a.url||this.attr2("action"))?e.trim(o):"")||window.location.href||"")&&(s=(s.match(/^([^#]+)/)||[])[1]),a=e.extend(!0,{url:s,success:e.ajaxSettings.success,type:n||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},a);var c={};if(this.trigger("form-pre-serialize",[this,a,c]),c.veto)return i("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(a.beforeSerialize&&!1===a.beforeSerialize(this,a))return i("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var l=a.traditional;void 0===l&&(l=e.ajaxSettings.traditional);var f,m=[],p=this.formToArray(a.semantic,m);if(a.data&&(a.extraData=a.data,f=e.param(a.data,l)),a.beforeSubmit&&!1===a.beforeSubmit(p,this,a))return i("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[p,this,a,c]),c.veto)return i("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var d=e.param(p,l);f&&(d=d?d+"&"+f:f),"GET"==a.type.toUpperCase()?(a.url+=(a.url.indexOf("?")>=0?"&":"?")+d,a.data=null):a.data=d;var h=[];if(a.resetForm&&h.push(function(){u.resetForm()}),a.clearForm&&h.push(function(){u.clearForm(a.includeHidden)}),!a.dataType&&a.target){var v=a.success||function(){};h.push(function(t){var r=a.replaceTarget?"replaceWith":"html";e(a.target)[r](t).each(v,arguments)})}else a.success&&h.push(a.success);if(a.success=function(e,t,r){for(var n=a.context||this,i=0,o=h.length;i<o;i++)h[i].apply(n,[e,t,r||u,u])},a.error){var g=a.error;a.error=function(e,t,r){var n=a.context||this;g.apply(n,[e,t,r,u])}}if(a.complete){var x=a.complete;a.complete=function(e,t){var r=a.context||this;x.apply(r,[e,t,u])}}var b=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}).length>0,y="multipart/form-data",T=u.attr("enctype")==y||u.attr("encoding")==y,j=t.fileapi&&t.formdata;i("fileAPI :"+j);var w,S=(b||T)&&!j;!1!==a.iframe&&(a.iframe||S)?a.closeKeepAlive?e.get(a.closeKeepAlive,function(){w=k(p)}):w=k(p):w=(b||T)&&j?function(t){for(var r=new FormData,i=0;i<t.length;i++)r.append(t[i].name,t[i].value);if(a.extraData){var o=function(t){var r,n,i=e.param(t,a.traditional).split("&"),o=i.length,s=[];for(r=0;r<o;r++)i[r]=i[r].replace(/\+/g," "),n=i[r].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}(a.extraData);for(i=0;i<o.length;i++)o[i]&&r.append(o[i][0],o[i][1])}a.data=null;var s=e.extend(!0,{},e.ajaxSettings,a,{contentType:!1,processData:!1,cache:!1,type:n||"POST"});a.uploadProgress&&(s.xhr=function(){var t=e.ajaxSettings.xhr();return t.upload&&t.upload.addEventListener("progress",function(e){var t=0,r=e.loaded||e.position,n=e.total;e.lengthComputable&&(t=Math.ceil(r/n*100)),a.uploadProgress(e,r,n,t)},!1),t});s.data=null;var u=s.beforeSend;return s.beforeSend=function(e,t){a.formData?t.data=a.formData:t.data=r,u&&u.call(this,e,t)},e.ajax(s)}(p):e.ajax(a),u.removeData("jqxhr").data("jqxhr",w);for(var D=0;D<m.length;D++)m[D]=null;return this.trigger("form-submit-notify",[this,a]),this;function k(t){var o,s,c,l,f,p,d,h,v,g,x,b,y=u[0],T=e.Deferred();if(T.abort=function(e){h.abort(e)},t)for(s=0;s<m.length;s++)o=e(m[s]),r?o.prop("disabled",!1):o.removeAttr("disabled");if((c=e.extend(!0,{},e.ajaxSettings,a)).context=c.context||c,f="jqFormIO"+(new Date).getTime(),c.iframeTarget?(g=(p=e(c.iframeTarget)).attr2("name"))?f=g:p.attr2("name",f):(p=e('<iframe name="'+f+'" src="'+c.iframeSrc+'" />')).css({position:"absolute",top:"-1000px",left:"-1000px"}),d=p[0],h={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";i("aborting upload... "+r),this.aborted=1;try{d.contentWindow.document.execCommand&&d.contentWindow.document.execCommand("Stop")}catch(e){}p.attr("src",c.iframeSrc),h.error=r,c.error&&c.error.call(c.context,h,r,t),l&&e.event.trigger("ajaxError",[h,c,r]),c.complete&&c.complete.call(c.context,h,r)}},(l=c.global)&&0===e.active++&&e.event.trigger("ajaxStart"),l&&e.event.trigger("ajaxSend",[h,c]),c.beforeSend&&!1===c.beforeSend.c
11all(c.context,h,c))return c.global&&e.active--,T.reject(),T;if(h.aborted)return T.reject(),T;(v=y.clk)&&(g=v.name)&&!v.disabled&&(c.extraData=c.extraData||{},c.extraData[g]=v.value,"image"==v.type&&(c.extraData[g+".x"]=y.clk_x,c.extraData[g+".y"]=y.clk_y));function j(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(e){i("cannot get iframe.contentWindow document: "+e)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){i("cannot get iframe.contentDocument: "+r),t=e.document}return t}var w=e("meta[name=csrf-token]").attr("content"),S=e("meta[name=csrf-param]").attr("content");function D(){var t=u.attr2("target"),r=u.attr2("action"),a=u.attr("enctype")||u.attr("encoding")||"multipart/form-data";y.setAttribute("target",f),n&&!/post/i.test(n)||y.setAttribute("method","POST"),r!=c.url&&y.setAttribute("action",c.url),c.skipEncodingOverride||n&&!/post/i.test(n)||u.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),c.timeout&&(b=setTimeout(function(){x=!0,M(1)},c.timeout));var o=[];try{if(c.extraData)for(var s in c.extraData)c.extraData.hasOwnProperty(s)&&(e.isPlainObject(c.extraData[s])&&c.extraData[s].hasOwnProperty("name")&&c.extraData[s].hasOwnProperty("value")?o.push(e('<input type="hidden" name="'+c.extraData[s].name+'">').val(c.extraData[s].value).appendTo(y)[0]):o.push(e('<input type="hidden" name="'+s+'">').val(c.extraData[s]).appendTo(y)[0]));c.iframeTarget||p.appendTo("body"),d.attachEvent?d.attachEvent("onload",M):d.addEventListener("load",M,!1),setTimeout(function e(){try{var t=j(d).readyState;i("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(e){i("Server abort: ",e," (",e.name,")"),M(2),b&&clearTimeout(b),b=void 0}},15);try{y.submit()}catch(e){document.createElement("form").submit.apply(y)}}finally{y.setAttribute("action",r),y.setAttribute("enctype",a),t?y.setAttribute("target",t):u.removeAttr("target"),e(o).remove()}}S&&w&&(c.extraData=c.extraData||{},c.extraData[S]=w),c.forceSync?D():setTimeout(D,10);var k,A,L,E=50;function M(t){if(!h.aborted&&!L){if((A=j(d))||(i("cannot access response document"),t=2),1===t&&h)return h.abort("timeout"),void T.reject(h,"timeout");if(2==t&&h)return h.abort("server abort"),void T.reject(h,"error","server abort");if(A&&A.location.href!=c.iframeSrc||x){d.detachEvent?d.detachEvent("onload",M):d.removeEventListener("load",M,!1);var r,a="success";try{if(x)throw"timeout";var n="xml"==c.dataType||A.XMLDocument||e.isXMLDoc(A);if(i("isXml="+n),!n&&window.opera&&(null===A.body||!A.body.innerHTML)&&--E)return i("requeing onLoad callback, DOM not available"),void setTimeout(M,250);var o=A.body?A.body:A.documentElement;h.responseText=o?o.innerHTML:null,h.responseXML=A.XMLDocument?A.XMLDocument:A,n&&(c.dataType="xml"),h.getResponseHeader=function(e){return{"content-type":c.dataType}[e.toLowerCase()]},o&&(h.status=Number(o.getAttribute("status"))||h.status,h.statusText=o.getAttribute("statusText")||h.statusText);var s=(c.dataType||"").toLowerCase(),u=/(json|script|text)/.test(s);if(u||c.textarea){var f=A.getElementsByTagName("textarea")[0];if(f)h.responseText=f.value,h.status=Number(f.getAttribute("status"))||h.status,h.statusText=f.getAttribute("statusText")||h.statusText;else if(u){var m=A.getElementsByTagName("pre")[0],v=A.getElementsByTagName("body")[0];m?h.responseText=m.textContent?m.textContent:m.innerText:v&&(h.responseText=v.textContent?v.textContent:v.innerText)}}else"xml"==s&&!h.responseXML&&h.responseText&&(h.responseXML=F(h.responseText));try{k=X(h,s,c)}catch(e){a="parsererror",h.error=r=e||a}}catch(e){i("error caught: ",e),a="error",h.error=r=e||a}h.aborted&&(i("upload aborted"),a=null),h.status&&(a=h.status>=200&&h.status<300||304===h.status?"success":"error"),"success"===a?(c.success&&c.success.call(c.context,k,"success",h),T.resolve(h.responseText,"success",h),l&&e.event.trigger("ajaxSuccess",[h,c])):a&&(void 0===r&&(r=h.statusText),c.error&&c.error.call(c.context,h,a,r),T.reject(h,"error",r),l&&e.event.trigger("ajaxError",[h,c,r])),l&&e.event.trigger("ajaxComplete",[h,c]),l&&! --e.active&&e.event.trigger("ajaxStop"),c.complete&&c.complete.call(c.context,h,a),L=!0,c.timeout&&clearTimeout(b),setTimeout(function(){c.iframeTarget?p.attr("src",c.iframeSrc):p.remove(),h.responseXML=null},100)}}}var F=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},O=e.parseJSON||function(e){return window.eval("("+e+")")},X=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(
11o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=O(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return T}},e.fn.ajaxForm=function(t){if((t=t||{}).delegation=t.delegation&&e.isFunction(e.fn.on),!t.delegation&&0===this.length){var r={s:this.selector,c:this.context};return!e.isReady&&r.s?(i("DOM not ready, queuing ajaxForm"),e(function(){e(r.s,r.c).ajaxForm(t)}),this):(i("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return t.delegation?(e(document).off("submit.form-plugin",this.selector,a).off("click.form-plugin",this.selector,n).on("submit.form-plugin",this.selector,t,a).on("click.form-plugin",this.selector,t,n),this):this.ajaxFormUnbind().bind("submit.form-plugin",t,a).bind("click.form-plugin",t,n)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(r,a){var n=[];if(0===this.length)return n;var i,o,s,u,c,l,f,m,p=this[0],d=this.attr("id"),h=r?p.getElementsByTagName("*"):p.elements;if(h&&!/MSIE [678]/.test(navigator.userAgent)&&(h=e(h).get()),d&&(i=e(":input[form="+d+"]").get()).length&&(h=(h||[]).concat(i)),!h||!h.length)return n;for(o=0,f=h.length;o<f;o++)if((u=(l=h[o]).name)&&!l.disabled)if(r&&p.clk&&"image"==l.type)p.clk==l&&(n.push({name:u,value:e(l).val(),type:l.type}),n.push({name:u+".x",value:p.clk_x},{name:u+".y",value:p.clk_y}));else if((c=e.fieldValue(l,!0))&&c.constructor==Array)for(a&&a.push(l),s=0,m=c.length;s<m;s++)n.push({name:u,value:c[s]});else if(t.fileapi&&"file"==l.type){a&&a.push(l);var v=l.files;if(v.length)for(s=0;s<v.length;s++)n.push({name:u,value:v[s],type:l.type});else n.push({name:u,value:"",type:l.type})}else null!=c&&(a&&a.push(l),n.push({name:u,value:c,type:l.type,required:l.required}));if(!r&&p.clk){var g=e(p.clk),x=g[0];(u=x.name)&&!x.disabled&&"image"==x.type&&(n.push({name:u,value:g.val()}),n.push({name:u+".x",value:p.clk_x},{name:u+".y",value:p.clk_y}))}return n},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor==Array)for(var i=0,o=n.length;i<o;i++)r.push({name:a,value:n[i]});else null!=n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;a<n;a++){var i=this[a],o=e.fieldValue(i,t);null==o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(o<0)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;f<l;f++){var m=u[f];if(m.selected){var p=m.value;if(p||(p=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return p;s.push(p)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(!0===t&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1});; 12!function(t,o){"use strict";"function"==typeof define&&define.amd?define(["jquery"],o):"object"==typeof exports?module.exports=o(require("jquery")):t.bootbox=o(t.jQuery)}(this,function t(o,e){"use strict";function a(t){var o=f[b.locale];return o?o[t]:f.en[t]}function n(t,e,a){t.stopPropagation(),t.preventDefault(),o.isFunction(a)&&!1===a.call(e,t)||e.modal("hide")}function r(t,e){var a=0;o.each(t,function(t,o){e(t,o,a++)})}function l(t){var e,a;if("object"!=typeof t)throw new Error("Please supply an object of options");
12if(!t.message)throw new Error("Please specify a message");return(t=o.extend({},b,t)).buttons||(t.buttons={}),e=t.buttons,a=function(t){var o,e=0;for(o in t)e++;return e}(e),r(e,function(t,n,r){if(o.isFunction(n)&&(n=e[t]={callback:n}),"object"!==o.type(n))throw new Error("button with key "+t+" must be an object");n.label||(n.label=t),n.className||(n.className=2>=a&&r===a-1?"btn-primary":"btn-default")}),t}function i(t,e,a){return o.extend(!0,{},t,function(t,o){var e=t.length,a={};if(1>e||e>2)throw new Error("Invalid argument length");return 2===e||"string"==typeof t[0]?(a[o[0]]=t[0],a[o[1]]=t[1]):a=t[0],a}(e,a))}function c(t,o,e,a){return u(i({className:"bootbox-"+t,buttons:s.apply(null,o)},a,e),o)}function s(){for(var t={},o=0,e=arguments.length;e>o;o++){var n=arguments[o],r=n.toLowerCase(),l=n.toUpperCase();t[r]={label:a(l)}}return t}function u(t,o){var a={};return r(o,function(t,o){a[o]=!0}),r(t.buttons,function(t){if(a[t]===e)throw new Error("button key "+t+" is not allowed (options are "+o.join("\n")+")")}),t}var p={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>",header:"<div class='modal-header'><h4 class='modal-title'></h4></div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>×</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />",textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'></select>",checkbox:"<div class='checkbox'><label>
12<input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />",time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />"}},b={locale:"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},d={alert:function(){var t;if((t=c("alert",["ok"],["message","callback"],arguments)).callback&&!o.isFunction(t.callback))throw new Error("alert requires callback property to be a function when provided");return t.buttons.ok.callback=t.onEscape=function(){return!o.isFunction(t.callback)||t.callback.call(this)},d.dialog(t)},confirm:function(){var t;if((t=c("confirm",["cancel","confirm"],["message","callback"],arguments)).buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,!1)},t.buttons.confirm.callback=function(){return t.callback.call(this,!0)},!o.isFunction(t.callback))throw new Error("confirm requires a callback");return d.dialog(t)},prompt:function(){var t,a,n,l,c,b,f;if(l=o(p.form),a={className:"bootbox-prompt",buttons:s("cancel","confirm"),value:"",inputType:"text"},b=(t=u(i(a,arguments,["title","callback"]),["cancel","confirm"])).show===e||t.show,t.message=l,t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,null)},t.buttons.confirm.callback=function(){var e;switch(t.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":e=c.val();break;case"checkbox":var a=c.find("input:checked");e=[],r(a,function(t,a){e.push(o(a).val())})}return t.callback.call(this,e)},t.show=!1,!t.title)throw new Error("prompt requires a title");if(!o.isFunction(t.callback))throw new Error("prompt requires a callback");if(!p.inputs[t.inputType])throw new Error("invalid prompt type");switch(c=o(p.inputs[t.inputType]),t.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":c.val(t.value);break;case"select":var m={};if(f=t.inputOptions||[],!o.isArray(f))throw new Error("Please pass an array of input options");if(!f.length)throw new Error("prompt with select requires options");r(f,function(t,a){var n=c;if(a.value===e||a.text===e)throw new Error("given options in wrong format");a.group&&(m[a.group]||(m[a.group]=o("<optgroup/>").attr("label",a.group)),n=m[a.group]),n.append("<option value='"+a.value+"'>"+a.text+"</option>")}),r(m,function(t,o){c.append(o)}),c.val(t.value);break;case"checkbox":var C=o.isArray(t.value)?t.value:[t.value];if(!(f=t.inputOptions||[]).length)throw new Error("prompt with checkbox requires options");if(!f[0].value||!f[0].text)throw new Error("given options in wrong format");c=o("<div/>"),r(f,function(e,a){var n=o(p.inputs[t.inputType]);n.find("input").attr("value",a.value),n.find("label").append(a.text),r(C,function(t,o){o===a.value&&n.find("input").prop("checked",!0)}),c.append(n)})}return t.placeholder&&c.attr("placeholder",t.placeholder),t.pattern&&c.attr("pattern",t.pattern),t.maxlength&&c.attr("maxlength",t.maxlength),l.append(c),l.on("submit",function(t){t.preventDefault(),t.stopPropagation(),n.find(".btn-primary").click()}),(n=d.dialog(t)).off("shown.bs.modal"),n.on("shown.bs.modal",function(){c.focus()}),!0===b&&n.modal("show"),n}};d.dialog=function(t){t=l(t);var a=o(p.dialog),i=a.find(".modal-dialog"),c=a.find(".modal-body"),s=t.buttons,u="",b={onEscape:t.onEscape};if(o.fn.modal===e)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(r(s,function(t,o){u+="<button data-bb-handler='"+t+"' type='button' class='btn "+o.className+"'>"+o.label+"</button>",b[t]=o.callback}),c.find(".bootbox-body").html(t.message),!0===t.animate&&a.addClass("fade"),t.className&&a.addClass(t.className),"large"===t.size?i.addClass("modal-lg"):"small"===t.size&&i.addClass("modal-sm"),t.title&&c.before(p.header),t.closeButton){var d=o(p.closeButton);
12t.title?a.find(".modal-header").prepend(d):d.css("margin-top","-10px").prependTo(c)}return t.title&&a.find(".modal-title").html(t.title),u.length&&(c.after(p.footer),a.find(".modal-footer").html(u)),a.on("hidden.bs.modal",function(t){t.target===this&&a.remove()}),a.on("shown.bs.modal",function(){a.find(".btn-primary:first").focus()}),"static"!==t.backdrop&&a.on("click.dismiss.bs.modal",function(t){a.children(".modal-backdrop").length&&(t.currentTarget=a.children(".modal-backdrop").get(0)),t.target===t.currentTarget&&a.trigger("escape.close.bb")}),a.on("escape.close.bb",function(t){b.onEscape&&n(t,a,b.onEscape)}),a.on("click",".modal-footer button",function(t){var e=o(this).data("bb-handler");n(t,a,b[e])}),a.on("click",".bootbox-close-button",function(t){n(t,a,b.onEscape)}),a.on("keyup",function(t){27===t.which&&a.trigger("escape.close.bb")}),o(t.container).append(a),a.modal({backdrop:!!t.backdrop&&"static",keyboard:!1,show:!1}),t.show&&a.modal("show"),a},d.setDefaults=function(){var t={};2===arguments.length?t[arguments[0]]=arguments[1]:t=arguments[0],o.extend(b,t)},d.hideAll=function(){return o(".bootbox").modal("hide"),d};var f={bg_BG:{OK:"Ðк",CANCEL:"ÐÑказ",CONFIRM:"ÐоÑвÑÑждавам"},br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"ZruÅ¡it",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"ÎνÏάξει",CANCEL:"ÎκÏÏÏÏη",CONFIRM:"ÎÏιβεβαίÏÏη"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fa:{OK:"ÙØ¨ÙÙ",CANCEL:"ÙØºÙ",CONFIRM:"تاÛÛØ¯"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"××ש×ר",CANCEL:"×××××",CONFIRM:"××ש×ר"},hu:{OK:"OK",CANCEL:"Mégsem",CONFIRM:"MegerÅsÃt"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"ãã£ã³ã»ã«",CONFIRM:"確èª"},lt:{OK:"Gerai",CANCEL:"AtÅ¡aukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"ApstiprinÄt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"ÐÑмена",CONFIRM:"ÐÑимениÑÑ"},sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"à¸à¸à¸¥à¸",CANCEL:"ยà¸à¹à¸¥à¸´à¸",CONFIRM:"ยืà¸à¸¢à¸±à¸"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"åæ¶",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"åæ¶",CONFIRM:"確èª"}};return d.addLocale=function(t,e){return o.each(["OK","CANCEL","CONFIRM"],function(t,o){if(!e[o])throw new Error("Please supply a translation for '"+o+"'")}),f[t]={OK:e.OK,CANCEL:e.CANCEL,CONFIRM:e.CONFIRM},d},d.removeLocale=function(t){return delete f[t],d},d.setLocale=function(t){return d.setDefaults("locale",t)},d.init=function(e){return t(e||o)},d});; 13/*! ======================================================================== 14 * Bootstrap Toggle: bootstrap-toggle.js v2.2.0 15 * http://www.bootstraptoggle.com 16 * ======================================================================== 17 * Copyright 2014 Min Hur, The New York Times Company 18 * Licensed under MIT 19 * ======================================================================== */ 20!function(t){"use strict";var e=function(e,s){this.$element=t(e),this.options=t.extend({},this.defaults(),s),this.render()};e.VERSION="2.2.0",e.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"default",size:"normal",style:"",width:null,height:null},e.prototype.defaults=function(){return{on:this.$element.attr("data-on")||e.DEFAULTS.on,off:this.$element.attr("data-off")||e.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||e.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||e.DEFAULTS.offstyle,size:this.$element.attr("data-size")||e.DEFAULTS.size,style:this.$element.attr("data-style")||e.DEFAULTS.style,width:this.$element.attr("data-width")||e.DEFAULTS.width,height:this.$element.attr("data-height")||e.DEFAULTS.height}},e.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var e="large"===this.options.size?"btn-lg":"small"===this.options.size?"btn-sm":"mini"===this.options.size?"btn-xs":"",s=t('<label class="btn">').html(this.options.on).addClass(this._onstyle+" "+e),o=t('<label class="btn">').html(this.options.off).addClass(this._offstyle+" "+e+" active"),i=t('<span class="toggle-handle btn btn-default">').addClass(e),n=t('<div class="toggle-group">').append(s,o,i),l=t('<div class="toggle btn" data-toggle="toggle">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(e).addClass(this.options.style);this.$element.wrap(l),t.extend(this,{$toggle:this.$element.parent(),$toggleOn:s,$toggleOff:o,$toggleGroup:n}),this.$toggle.append(n);var h=this.options.width||Math.max(s.outerWidth(),o.outerWidth())+i.outerWidth()/2,a=this.options.height||Math.max(s.outerHeight(),o.outerHeight());s.addClass("toggle-on"),o.addClass("toggle-off"),this.$toggle.css({width:h,height:a}),this.options.height&&(s.css("line-height",s.height()+"px"),o.css("line-height",o.height()+"px")),this.update(!0),this.trigger(!0)},e.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},e.prototype.on=function(t){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),t||this.trigger()},e.prototype.off=function(t){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),t||this.trigger()},e.prototype.enable=function(){this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},e.prototype.disable=function(){this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},e.prototype.update=function(t){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(t):this.off(t)},e.prototype.trigger=function(e){this.$element.off("change.bs.toggle"),e||this.$element.change(),this.$element.on("change.bs.toggle",t.proxy(function(){this.update()},this))},e.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var s=t.fn.bootstrapToggle;t.fn.bootstrapToggle=function(s){return this.each(function(){var o=t(this),i=o.data("bs.toggle"),n="object"==typeof s&&s;i||o.data("bs.toggle",i=new e(this,n)),"string"==typeof s&&i[s]&&i[s]()})},t.fn.bootstrapToggle.Constructor=e,t.fn.toggle.noConflict=function(){return t.fn.bootstrapToggle=s,this},t(function(){t("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),t(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(e){t(this).find("input[type=checkbox]").bootstrapToggle("toggle"),e.preventDefault()})}(jQuery);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.