{"version":3,"file":"main.js","sources":["../../../src/assets/scripts/main.entry.ts"],"sourcesContent":["window.setState = window.setState || function (key: string, value: string) {\n window.localStorage.setItem(key, value);\n window.dispatchEvent(new StorageEvent('storage', { key, newValue: value }));\n};\n\nElement.prototype.observeResize =\n Element.prototype.observeResize ||\n function (this: Element, callback: () => any) {\n if ('ResizeObserver' in window) {\n // create an Observer instance\n const resizeObserver = new ResizeObserver(callback);\n\n // start observing a DOM node\n resizeObserver.observe(this);\n } else {\n let lastRect = this.getBoundingClientRect();\n\n setInterval(() => {\n const rect = this.getBoundingClientRect();\n if (Math.floor(rect.width) != Math.floor(lastRect.width) || Math.floor(rect.height) != Math.floor(lastRect.height)) {\n lastRect = rect;\n callback();\n }\n }, 500);\n }\n };\n\nHTMLElement.prototype.onOutsideClick =\n HTMLElement.prototype.onOutsideClick ||\n function (this: HTMLElement, handler: (e: Event) => any, otherDependenceElement?: HTMLElement[]) {\n\n const listener = (event: any) => {\n // Do nothing if clicking ref's element or descendent elements\n if (!this || this.contains(event.target)) {\n return;\n }\n\n if (otherDependenceElement && otherDependenceElement.some((r) => r?.contains(event.target))) {\n return;\n }\n\n handler(event);\n };\n\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n }"],"names":["key","value","callback","lastRect","rect","handler","otherDependenceElement","listener","event","r"],"mappings":"AAAA,OAAO,SAAW,OAAO,UAAY,SAAUA,EAAaC,EAAe,CAClE,OAAA,aAAa,QAAQD,EAAKC,CAAK,EAC/B,OAAA,cAAc,IAAI,aAAa,UAAW,CAAE,IAAAD,EAAK,SAAUC,CAAO,CAAA,CAAC,CAC5E,EAEA,QAAQ,UAAU,cAChB,QAAQ,UAAU,eAClB,SAAyBC,EAAqB,CAC5C,GAAI,mBAAoB,OAEC,IAAI,eAAeA,CAAQ,EAGnC,QAAQ,IAAI,MACtB,CACD,IAAAC,EAAW,KAAK,wBAEpB,YAAY,IAAM,CACV,MAAAC,EAAO,KAAK,yBACd,KAAK,MAAMA,EAAK,KAAK,GAAK,KAAK,MAAMD,EAAS,KAAK,GAAK,KAAK,MAAMC,EAAK,MAAM,GAAK,KAAK,MAAMD,EAAS,MAAM,KACpGA,EAAAC,EACFF,MAEV,GAAG,EAEV,EAEF,YAAY,UAAU,eACpB,YAAY,UAAU,gBACtB,SAA6BG,EAA4BC,EAAwC,CAEzF,MAAAC,EAAYC,GAAe,CAE3B,CAAC,MAAQ,KAAK,SAASA,EAAM,MAAM,GAInCF,GAA0BA,EAAuB,KAAMG,GAAMA,GAAA,YAAAA,EAAG,SAASD,EAAM,OAAO,GAI1FH,EAAQG,CAAK,CAAA,EAGN,SAAA,iBAAiB,YAAaD,CAAQ,EACtC,SAAA,iBAAiB,aAAcA,CAAQ,CAClD"}