{"version":3,"file":"eagami-ui-testing.mjs","sources":["../../../testing/src/native-dialog.ts","../../../testing/src/eagami-ui-testing.ts"],"sourcesContent":["/**\n * Fills in the native `<dialog>` methods jsdom leaves unimplemented, so a spec\n * can create a component that opens an `ea-dialog` or `ea-drawer` without the\n * test runner throwing on `showModal()` or `close()`. Call once from the test\n * setup file. Only missing methods are patched, so a runtime that implements\n * the element keeps its own behavior.\n */\nexport function installNativeDialogShim(): void {\n  if (typeof HTMLDialogElement === 'undefined') {\n    return;\n  }\n  const proto = HTMLDialogElement.prototype;\n  if (typeof proto.show !== 'function') {\n    proto.show = function (this: HTMLDialogElement): void {\n      this.open = true;\n    };\n  }\n  if (typeof proto.showModal !== 'function') {\n    proto.showModal = function (this: HTMLDialogElement): void {\n      this.open = true;\n    };\n  }\n  if (typeof proto.close !== 'function') {\n    proto.close = function (this: HTMLDialogElement, returnValue?: string): void {\n      if (!this.open) {\n        return;\n      }\n      if (returnValue !== undefined) {\n        this.returnValue = returnValue;\n      }\n      this.open = false;\n      this.dispatchEvent(new Event('close'));\n    };\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;SACa,uBAAuB,GAAA;AACrC,IAAA,IAAI,OAAO,iBAAiB,KAAK,WAAW,EAAE;QAC5C;IACF;AACA,IAAA,MAAM,KAAK,GAAG,iBAAiB,CAAC,SAAS;AACzC,IAAA,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE;QACpC,KAAK,CAAC,IAAI,GAAG,YAAA;AACX,YAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAClB,QAAA,CAAC;IACH;AACA,IAAA,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,EAAE;QACzC,KAAK,CAAC,SAAS,GAAG,YAAA;AAChB,YAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAClB,QAAA,CAAC;IACH;AACA,IAAA,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU,EAAE;AACrC,QAAA,KAAK,CAAC,KAAK,GAAG,UAAmC,WAAoB,EAAA;AACnE,YAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACd;YACF;AACA,YAAA,IAAI,WAAW,KAAK,SAAS,EAAE;AAC7B,gBAAA,IAAI,CAAC,WAAW,GAAG,WAAW;YAChC;AACA,YAAA,IAAI,CAAC,IAAI,GAAG,KAAK;YACjB,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AACxC,QAAA,CAAC;IACH;AACF;;AClCA;;AAEG;;;;"}