System.register([],(function(o,e){"use strict";return{execute:function(){var e=document.createElement("style");function t(o){n(jQuery(this).closest(".saai-modal").attr("id"))}function n(o){const e=jQuery(`#${o}`);e.removeClass("show"),jQuery("body").css("overflow",""),e.data("retain-on-close")||setTimeout((()=>{e.remove()}),300)}e.textContent=".saai-modal{position:fixed;display:flex;justify-content:center;align-items:flex-start;top:-9999px;left:-9999px;width:0;height:0;background-color:rgba(0,0,0,.5);opacity:0;transition:opacity .3s ease;overflow-y:auto}.saai-modal.show{top:0;left:0;width:100%;height:100vh;z-index:100000;opacity:1;padding:0;overflow-y:auto}.saai-modal.flex-center{align-items:center}.saai-modal .saai-modal-box{position:relative;margin:5vh 5vw;width:100%;max-width:1000px;background-color:#fff;border-radius:10px;display:flex;flex-direction:column}.saai-modal .saai-modal-box .saai-modal-box-content{padding:2vh 1vw;flex:1 1 auto}.saai-modal .saai-modal-box .saai-modal-close{position:absolute;top:10px;right:10px;padding:0;margin:0;background:none;border:none;cursor:pointer;z-index:1}\n/*$vite$:1*/",document.head.appendChild(e),o({c:n,s:function(o){if(jQuery(`#${o.id}`).length>0)return jQuery(`#${o.id}`).addClass("show"),void jQuery("body").css("overflow","hidden");const e=function(o){const e={width:1e3,height:500,showCloseButton:!0,retainOnClose:!1,flexCenter:!1},t=lodash.defaults(o,e),n=["saai-modal"];return t.flexCenter&&n.push("flex-center"),`\n        <div id="${t.id}" class="${n.join(" ")}" data-retain-on-close="${t.retainOnClose}">\n            <div class="saai-modal-box" style="max-width: ${t.width}px; min-height: ${t.height}px;">\n                <div class="saai-modal-box-content">\n                    ${t.content}\n                </div>\n                ${t.showCloseButton?'\n                    <button class="saai-modal-close">\n                        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n                        <path d="M18 6L6 18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n                        <path d="M6 6L18 18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n                        </svg>\n                    </button>\n                ':""}\n            </div>\n        </div>\n    `}(o);jQuery(document.body).append(e),jQuery(document.body).on("click",".saai-modal-close",t),jQuery(document.body).on("click",".saai-modal",(function(o){o.target===this&&n(jQuery(this).attr("id"))})),setTimeout((()=>{jQuery(".saai-modal").addClass("show"),jQuery("body").css("overflow","hidden")}),100)}})}}}));
