import{A as f,Qa as l,b as s,s as p,y as c}from"./chunk-4BILO7NM.js";var x=(()=>{let a=class a{constructor(t){this.datePipe=t,this.showPrompt=!1,this.promptHandled=new s,this.isMobileDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isSafari=/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent),this.isLegacySafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&parseInt((navigator.userAgent.match(/version\/(\d+)/i)||[])[1])<=17,this.isPWA=window.matchMedia("(display-mode: standalone)").matches}generateId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)})}deepClone(t,e=new WeakMap){if(t===null||typeof t!="object")return t;if(Array.isArray(t)&&t.every(r=>typeof r!="object"&&typeof r!="function"))return[...t];if(e.has(t))return e.get(t);if(t instanceof Date)return new Date(t.getTime());if(t instanceof Map){let r=new Map;return e.set(t,r),t.forEach((i,h)=>{typeof i!="function"&&r.set(this.deepClone(h,e),this.deepClone(i,e))}),r}if(t instanceof Set){let r=new Set;return e.set(t,r),t.forEach(i=>{typeof i!="function"&&r.add(this.deepClone(i,e))}),r}if(Array.isArray(t)){let r=[];e.set(t,r);for(let i=0;i<t.length;i++)typeof t[i]!="function"&&(r[i]=this.deepClone(t[i],e));return r}let n={};e.set(t,n);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];typeof i!="function"&&(n[r]=this.deepClone(i,e))}return n}base64UrlEncode(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}transformDate(t,e){return this.datePipe.transform(t,e)}getDateAsString(t,e=!0){return e?`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}T${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:t.toISOString().slice(0,16)}prompt(t,e,n,r=void 0){return this.resetPrompt(),this.promptHeader=t,this.promptDescription=e,this.promptConfirmLabel=n,this.promptCancelLabel=r,this.showPrompt=!0,this.promptHandled.pipe(p(1))}resetPrompt(){this.promptHandled=new s}cancelPrompt(){this.promptHandled.next(!1),this.showPrompt=!1}confirmPrompt(){this.promptHandled.next(!0),this.showPrompt=!1}};a.\u0275fac=function(e){return new(e||a)(f(l))},a.\u0275prov=c({token:a,factory:a.\u0275fac});let o=a;return o})();export{x as a};
