PageSourceSearch

https://www.kafe.cz/build/DdPYzQ6T2.js

js kafe.cz collected 2026-10-02 08:41:10 UTC 3,214 bytes, 1 lines download raw bytes

1import{t as e}from"./CoucXh9X.js";import{t}from"./Ceu-LYw1.js";import{t as i}from"./kncy5Ng42.js";var s=class t{static instances=new Map;triggers=null;close=null;dialog=null;enableClose=!0;identifier="";constructor(e,s=!0,o=void 0){this.dialog=e,this.enableClose=s,this.identifier=e.getAttribute("data-identifier")??"",this.dialog.setAttribute("tabindex","-1"),this.triggers=document.querySelectorAll(".js-modal-trigger."+this.identifier),this.close=this.dialog.querySelectorAll(".js-modal-close"),this.dialog&&(0===this.close.length&&s||(t.instances.set(this.identifier,this),this.bindTriggers(),this.enableClose&&this.close.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),this.closeModal("close-button")})}),i.onPress("Escape",this.identifier,()=>{"function"==typeof o?o():this.enableClose&&this.closeModal("escape")}),this.dialog.addEventListener("cancel",e=>{e.preventDefault(),"function"==typeof o?o():this.enableClose&&this.closeModal("escape")}),this.dialog.addEventListener("click",e=>{e.target===this.dialog&&null!=this.dialog?.getAttribute("open")&&this.enableClose&&(e.preventDefault(),this.closeModal("backdrop"))})))}bindTriggers(e=document){e.querySelectorAll(`.js-modal-trigger.${this.identifier}:not(.modal-trigger-initialized)`).forEach(e=>{e.classList.add("modal-trigger-initialized"),e.addEventListener("click",()=>{this.showLoading(e,!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.showModal(),this.showLoading(e,!1)})})})})}showLoading(e,t){const i=e.querySelector(".js-modal-loading-spinner"),s=e.querySelector(".js-modal-trigger-label");i&&s&&(i.classList.toggle("hidden",!t),s.classList.toggle("invisible",t))}showModal(){this.dialog?.showModal(),this.dialog?.focus(),i.setActiveCallback("Escape",this.identifier),e.dispatch({name:"modal",value:{event:"open",identifier:this.identifier}})}closeModal(t="programmatic"){this.dialog?.close(),e.dispatch({name:"modal",value:{event:"close",identifier:this.identifier,type:t}})}},o=class{types={success:{alert:"alert--success",color:"text-success",icon:"success_fill"},warning:{alert:"alert--warning",color:"text-pending",icon:"warning_fill"},error:{alert:"alert--error",color:"text-error",icon:"warning_fill"},info:{alert:"alert--info",color:"text-info",icon:"info_fill"}};constructor(){const e=document.querySelector(".js-notification-bar")?.querySelector(".js-notification-bar-close");e&&e.addEventListener("click",()=>{this.hide()})}set(e,i){const s=document.querySelector(".js-notification-bar"),o=s?.querySelector(".alert__text"),l=s?.querySelector(".icon");s?.classList.remove("-top-full"),s?.classList.remove("lg:top-0"),s?.classList.add("top-full"),s?.classList.add("opacity-100"),s?.classList.remove("opacity-0"),Object.values(this.types).map(e=>(s?.classList.remove(e.alert),l?.classList.remove(e.color),e)),o&&(o.innerHTML=e),l&&t.setName(l,this.types[i].icon),s?.classList.add(this.types[i].alert),l?.classList.add(this.types[i].color),setTimeout(this.hide,5e3)}hide(){const e=document.querySelector(".js-notification-bar");e?.classList.add("-top-full"),e?.classList.add("lg:top-0"),e?.classList.remove("top-full"),e?.classList.add("opacity-0"),e?.classList.remove("opacity-100")}};export{s as n,o as t};

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.