(function () { function getOrCreate(modalElement) { if (!modalElement || !window.bootstrap || !window.bootstrap.Modal) { return null; } return window.bootstrap.Modal.getOrCreateInstance(modalElement); } function show(modalElement) { var modal = getOrCreate(modalElement); if (modal) { modal.show(); return true; } return false; } function hide(modalElement) { var modal = getOrCreate(modalElement); if (modal) { modal.hide(); return true; } return false; } window.pulseModal = { getOrCreate: getOrCreate, show: show, hide: hide }; }());