{ "version": 3, "sources": ["src/app/shared/services/guid.service.ts"], "sourcesContent": ["import { Injectable } from '@angular/core';\r\nimport { getWindow } from '@app/shared/services/browser/window-ref.service';\r\n\r\nexport const newGuid = (): string => {\r\n const win = getWindow();\r\n let d = new Date().getTime();\r\n\r\n if (win.performance && typeof win.performance.now === 'function') {\r\n d += performance.now(); // use high-precision timer if available\r\n }\r\n\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\r\n // eslint-disable-next-line no-bitwise\r\n const r = (d + Math.random() * 16) % 16 | 0;\r\n d = Math.floor(d / 16);\r\n // eslint-disable-next-line no-bitwise\r\n return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);\r\n });\r\n};\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class GuidService {\r\n constructor() {}\r\n\r\n public newGuid(): string {\r\n return newGuid();\r\n }\r\n}\r\n"], "mappings": "iDAGO,IAAMA,EAAUA,IAAa,CAClC,IAAMC,EAAMC,EAAS,EACjBC,EAAI,IAAIC,KAAI,EAAGC,QAAO,EAE1B,OAAIJ,EAAIK,aAAe,OAAOL,EAAIK,YAAYC,KAAQ,aACpDJ,GAAKG,YAAYC,IAAG,GAGf,uCAAuCC,QAAQ,QAAUC,GAAK,CAEnE,IAAMC,GAAKP,EAAIQ,KAAKC,OAAM,EAAK,IAAM,GAAK,EAC1CT,OAAAA,EAAIQ,KAAKE,MAAMV,EAAI,EAAE,GAEbM,IAAM,IAAMC,EAAKA,EAAI,EAAO,GAAKI,SAAS,EAAE,CACtD,CAAC,CACH,EAGaC,GAAW,IAAA,CAAlB,MAAOA,CAAW,CACtBC,aAAA,CAAe,CAERhB,SAAO,CACZ,OAAOA,EAAO,CAChB,4CALWe,EAAW,6BAAXA,EAAWE,QAAXF,EAAWG,UAAAC,WADE,MAAM,CAAA,SACnBJ,CAAW,GAAA", "names": ["newGuid", "win", "getWindow", "d", "Date", "getTime", "performance", "now", "replace", "c", "r", "Math", "random", "floor", "toString", "GuidService", "constructor", "factory", "\u0275fac", "providedIn"] }