You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
2.8 KiB

(()=>{var t={4222:t=>{let e,o=0;function n(t,e,n){const i=document.getElementById("alert-holder"),r="om-alert"+o++;i.insertAdjacentHTML("beforeend",`<div id="${r}" class="alert alert-${t} alert-dismissible fade show m-0" role="alert">${e}\n\t\t\t<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="${i.getAttribute("data-lbl-close")}"></button>\n\t\t</div>`),n>0&&setTimeout((()=>{bootstrap.Alert.getOrCreateInstance(`#${r}`).close()}),n)}function i(){return!!e&&!!e.debug}function r(){i()&&console.info.apply(this,arguments)}function s(t,e){const o=e||{},n=t||{},i=JSON.stringify(Object.assign({},o,n));Wicket.WebSocket.send(i)}function c(t,e){"undefined"!=typeof Notification&&"granted"!==Notification.permission&&"denied"!==Notification.permission?Promise.resolve(Notification.requestPermission()).then((function(e){"granted"===e&&t()})):(r("No notification API for this browser"),"function"==typeof e&&e())}t.exports={init:function(t){e=t},tmpl:function(t,e){return $(t).clone().attr("id",e||"")},debugEnabled:i,enableDebug:function(){e&&(e.debug=!0)},sendMessage:s,alert:n,error:function(t,e){return"object"==typeof t&&(t=t.name+": "+t.message),!0!==e&&n("danger",t,2e4),console.error(t)},info:r,log:function(){i()&&console.log.apply(this,arguments)},wbAction:function(t){s(t,{area:"room",type:"wb"})},roomAction:function(t){s(t,{area:"room",type:"room"})},setCssVar:function(t,e){document.querySelector("body").style.setProperty(t,e)},ping:function(){setTimeout((()=>{s({type:"ping"}),fetch("./ping",{cache:"no-store"})}),3e4)},notify:function(t,e,o){if("undefined"!=typeof Notification&&window===window.parent){function n(){const o={tag:e};try{new Notification(t,o)}catch(t){console.error("Failed to create Notification"+t)}}"granted"===Notification.permission?n():c((()=>n()))}else r("No notification API for this browser"),"function"==typeof o&&o()},requestNotifyPermission:c}},1789:t=>{const e="openmeetings";t.exports={isRtl:"rtl"===document.querySelector("html").getAttribute("dir"),load:function(){let t={};try{t=JSON.parse(localStorage.getItem(e))||t}catch(t){}return t},save:function(t){const o=JSON.stringify(t);return localStorage.setItem(e,o),o}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,o),r.exports}(()=>{function t(){document.documentElement.style.setProperty("--app-height",`${window.innerHeight}px`)}Wicket.BrowserInfo.collectExtraInfo=function(t){const e=window.location;t.codebase=e.origin+e.pathname,t.settings=Settings.load()},$(window).on("resize",t),t(),Object.assign(window,{Settings:o(1789),OmUtil:o(4222),fixJQueryUIDialogTouch:function(t){t.parent().find(".ui-dialog-titlebar-close").appendTo(t.parent())},showBusyIndicator:function(){$("#busy-indicator").show()},hideBusyIndicator:function(){$("#busy-indicator").hide()}})})()})();