/** * Bootbox.js 鈥 alert, confirm, prompt, and flexible dialogs for the Bootstrap framework * @version: 6.0.0 * @project: https://github.com/makeusabrew/bootbox * @license: MIT http://bootboxjs.com/license.txt */ !function(e,t){'use strict';'function'==typeof define&&define.amd?define(['jquery'],t):'object'==typeof exports?module.exports=t(require('jquery')):e.bootbox=t(e.jQuery)}(this,function t(s,c){'use strict';let r={};r.VERSION='6.0.0';let i={en:{OK:'OK',CANCEL:'Cancel',CONFIRM:'OK'}},d={dialog:'',header:'',footer:'',closeButton:'',form:'
',button:'',option:'',promptMessage:'
',inputs:{text:'',textarea:'',email:'',select:'',checkbox:'
',radio:'
',date:'',time:'',number:'',password:'',range:''}},u={locale:'en',backdrop:'static',animate:!0,className:null,closeButton:!0,show:!0,container:'body',value:'',inputType:'text',errorMessage:null,swapButtonOrder:!1,centerVertical:!1,multiple:!1,scrollable:!1,reusable:!1,relatedTarget:null,size:null,id:null};function l(e,t,o){return s.extend(!0,{},e,function(e,t){var o=e.length;let a={};if(o<1||2').attr('label',t.group)),o=r[t.group]);let a=s(d.option);a.attr('value',t.value).text(t.text),o.append(a)}),f(r,function(e,t){l.append(t)}),l.val(n.value),n.bootstrap<5&&l.removeClass('form-select').addClass('form-control');break;case'checkbox':let t=s.isArray(n.value)?n.value:[n.value];if(!(i=n.inputOptions||[]).length)throw new Error('prompt with "inputType" set to "checkbox" requires at least one option');l=s('
'),f(i,function(e,o){if(o.value===c||o.text===c)throw new Error('each option needs a "value" property and a "text" property');let a=s(d.inputs[n.inputType]);a.find('input').attr('value',o.value),a.find('label').append('\n'+o.text),f(t,function(e,t){t===o.value&&a.find('input').prop('checked',!0)}),l.append(a)});break;case'radio':if(n.value!==c&&s.isArray(n.value))throw new Error('prompt with "inputType" set to "radio" requires a single, non-array value for "value"');if(!(i=n.inputOptions||[]).length)throw new Error('prompt with "inputType" set to "radio" requires at least one option');l=s('
');let a=!0;f(i,function(e,t){if(t.value===c||t.text===c)throw new Error('each option needs a "value" property and a "text" property');let o=s(d.inputs[n.inputType]);o.find('input').attr('value',t.value),o.find('label').append('\n'+t.text),n.value!==c&&t.value===n.value&&(o.find('input').prop('checked',!0),a=!1),l.append(o)}),a&&l.find('input[type="radio"]').first().prop('checked',!0)}return e.append(l),e.on('submit',function(e){e.preventDefault(),e.stopPropagation(),t.find('.bootbox-accept').trigger('click')}),''!==s.trim(n.message)&&(a=s(d.promptMessage).html(n.message),e.prepend(a)),n.message=e,(t=r.dialog(n)).off('shown.bs.modal',m),t.on('shown.bs.modal',function(){l.focus()}),!0===o&&t.modal('show'),t},r}),function(e,t){'use strict';'function'==typeof define&&define.amd?define(['bootbox'],t):'object'==typeof module&&module.exports?t(require('./bootbox')):t(e.bootbox)}(this,function(e){'use strict';e.addLocale('ar',{OK:'賲賵丕賮賯',CANCEL:'丕賱睾丕亍',CONFIRM:'鬲兀賰賷丿'}),e.addLocale('az',{OK:'OK',CANCEL:'陌mtina et',CONFIRM:'T蓹sdiq et'}),e.addLocale('bg-BG',{OK:'袨泻',CANCEL:'袨褌泻邪蟹',CONFIRM:'袩芯褌胁褗褉卸写邪胁邪屑'}),e.addLocale('cs',{OK:'OK',CANCEL:'Zru拧it',CONFIRM:'Potvrdit'}),e.addLocale('da',{OK:'OK',CANCEL:'Annuller',CONFIRM:'Accepter'}),e.addLocale('de',{OK:'OK',CANCEL:'Abbrechen',CONFIRM:'Akzeptieren'}),e.addLocale('el',{OK:'螘谓蟿维尉蔚喂',CANCEL:'螒魏蠉蟻蠅蟽畏',CONFIRM:'螘蟺喂尾蔚尾伪委蠅蟽畏'}),e.addLocale('en',{OK:'OK',CANCEL:'Cancel',CONFIRM:'OK'}),e.addLocale('es',{OK:'OK',CANCEL:'Cancelar',CONFIRM:'Aceptar'}),e.addLocale('et',{OK:'OK',CANCEL:'Katkesta',CONFIRM:'OK'}),e.addLocale('eu',{OK:'OK',CANCEL:'Ezeztatu',CONFIRM:'Onartu'}),e.addLocale('fa',{OK:'賯亘賵賱',CANCEL:'賱睾賵',CONFIRM:'鬲丕蹖蹖丿'}),e.addLocale('fi',{OK:'OK',CANCEL:'Peruuta',CONFIRM:'OK'}),e.addLocale('fr',{OK:'OK',CANCEL:'Annuler',CONFIRM:'Confirmer'}),e.addLocale('he',{OK:'讗讬砖讜专',CANCEL:'讘讬讟讜诇',CONFIRM:'讗讬砖讜专'}),e.addLocale('hr',{OK:'OK',CANCEL:'Odustani',CONFIRM:'Potvrdi'}),e.addLocale('hu',{OK:'OK',CANCEL:'M茅gsem',CONFIRM:'Meger艖s铆t'}),e.addLocale('id',{OK:'OK',CANCEL:'Batal',CONFIRM:'OK'}),e.addLocale('it',{OK:'OK',CANCEL:'Annulla',CONFIRM:'Conferma'}),e.addLocale('ja',{OK:'OK',CANCEL:'銈儯銉炽偦銉?,CONFIRM:'纰鸿獚'}),e.addLocale('ka',{OK:'OK',CANCEL:'醿掅儛醿a儱醿涐償醿戓儛',CONFIRM:'醿撫儛醿撫儛醿♂儮醿a儬醿斸儜醿?}),e.addLocale('ko',{OK:'OK',CANCEL:'旆唽',CONFIRM:'頇曥澑'}),e.addLocale('lt',{OK:'Gerai',CANCEL:'At拧aukti',CONFIRM:'Patvirtinti'}),e.addLocale('lv',{OK:'Labi',CANCEL:'Atcelt',CONFIRM:'Apstiprin膩t'}),e.addLocale('nl',{OK:'OK',CANCEL:'Annuleren',CONFIRM:'Accepteren'}),e.addLocale('no',{OK:'OK',CANCEL:'Avbryt',CONFIRM:'OK'}),e.addLocale('pl',{OK:'OK',CANCEL:'Anuluj',CONFIRM:'Potwierd藕'}),e.addLocale('pt-BR',{OK:'OK',CANCEL:'Cancelar',CONFIRM:'Sim'}),e.addLocale('pt',{OK:'OK',CANCEL:'Cancelar',CONFIRM:'Confirmar'}),e.addLocale('ru',{OK:'OK',CANCEL:'袨褌屑械薪邪',CONFIRM:'袩褉懈屑械薪懈褌褜'}),e.addLocale('sk',{OK:'OK',CANCEL:'Zru拧i钮',CONFIRM:'Potvrdi钮'}),e.addLocale('sl',{OK:'OK',CANCEL:'Prekli膷i',CONFIRM:'Potrdi'}),e.addLocale('sq',{OK:'OK',CANCEL:'Anulo',CONFIRM:'Prano'}),e.addLocale('sv',{OK:'OK',CANCEL:'Avbryt',CONFIRM:'OK'}),e.addLocale('sw',{OK:'Sawa',CANCEL:'Ghairi',CONFIRM:'Thibitisha'}),e.addLocale('ta',{OK:'喈氞喈?,CANCEL:'喈班喁嵿喁 喈氞瘑喈瘝',CONFIRM:'喈夃喁佮喈 喈氞瘑喈瘝'}),e.addLocale('th',{OK:'喔曕竵喔ム竾',CANCEL:'喔⑧竵喙€喔ム复喔?,CONFIRM:'喔⑧阜喔權涪喔编笝'}),e.addLocale('tr',{OK:'Tamam',CANCEL:'陌ptal',CONFIRM:'Onayla'}),e.addLocale('uk',{OK:'OK',CANCEL:'袙褨写屑褨薪邪',CONFIRM:'袩褉懈泄薪褟褌懈'}),e.addLocale('vi',{OK:'OK',CANCEL:'H峄 b峄?,CONFIRM:'X谩c nh岷璶'}),e.addLocale('zh-CN',{OK:'OK',CANCEL:'鍙栨秷',CONFIRM:'纭'}),e.addLocale('zh-TW',{OK:'OK',CANCEL:'鍙栨秷',CONFIRM:'纰鸿獚'})});