@ionic/core 8.7.12-dev.11764957130.14454872 → 8.7.12-dev.11764961567.138743ff

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/components/modal.js +77 -63
  2. package/components/overlays.js +15 -11
  3. package/css/core.css +1 -1
  4. package/css/core.css.map +1 -1
  5. package/css/ionic.bundle.css +1 -1
  6. package/css/ionic.bundle.css.map +1 -1
  7. package/dist/cjs/index.cjs.js +1 -1
  8. package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
  9. package/dist/cjs/ion-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
  11. package/dist/cjs/ion-loading.cjs.entry.js +1 -1
  12. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  13. package/dist/cjs/ion-modal.cjs.entry.js +78 -64
  14. package/dist/cjs/ion-popover.cjs.entry.js +1 -1
  15. package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
  16. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  17. package/dist/cjs/ion-toast.cjs.entry.js +1 -1
  18. package/dist/cjs/{overlays-DxIZwUXI.js → overlays-D3xMmZCY.js} +15 -11
  19. package/dist/collection/components/modal/modal.ios.css +0 -14
  20. package/dist/collection/components/modal/modal.js +75 -61
  21. package/dist/collection/components/modal/modal.md.css +0 -14
  22. package/dist/collection/utils/overlays.js +15 -11
  23. package/dist/docs.json +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/esm/ion-action-sheet.entry.js +1 -1
  26. package/dist/esm/ion-alert.entry.js +1 -1
  27. package/dist/esm/ion-datetime_3.entry.js +1 -1
  28. package/dist/esm/ion-loading.entry.js +1 -1
  29. package/dist/esm/ion-menu_3.entry.js +1 -1
  30. package/dist/esm/ion-modal.entry.js +78 -64
  31. package/dist/esm/ion-popover.entry.js +1 -1
  32. package/dist/esm/ion-select-modal.entry.js +1 -1
  33. package/dist/esm/ion-select_3.entry.js +1 -1
  34. package/dist/esm/ion-toast.entry.js +1 -1
  35. package/dist/esm/{overlays-BymNv-BL.js → overlays-DYKBVm6h.js} +15 -11
  36. package/dist/ionic/index.esm.js +1 -1
  37. package/dist/ionic/ionic.esm.js +1 -1
  38. package/dist/ionic/{p-e16b69e1.entry.js → p-038f3a87.entry.js} +1 -1
  39. package/dist/ionic/{p-510d86e1.entry.js → p-1cf19c5a.entry.js} +1 -1
  40. package/dist/ionic/{p-0b80d700.entry.js → p-3fad4ab5.entry.js} +1 -1
  41. package/dist/ionic/{p-98fc09eb.entry.js → p-7928cc4d.entry.js} +1 -1
  42. package/dist/ionic/p-90969bdf.entry.js +4 -0
  43. package/dist/ionic/{p-cb93126d.entry.js → p-985f02a8.entry.js} +1 -1
  44. package/dist/ionic/p-CHK505Co.js +4 -0
  45. package/dist/ionic/{p-15193d01.entry.js → p-a480563a.entry.js} +1 -1
  46. package/dist/ionic/{p-7da39a4d.entry.js → p-b4b6513a.entry.js} +1 -1
  47. package/dist/ionic/{p-83be404e.entry.js → p-caa8efa1.entry.js} +1 -1
  48. package/dist/ionic/{p-7380261c.entry.js → p-ede27a66.entry.js} +1 -1
  49. package/dist/types/components/modal/modal.d.ts +13 -1
  50. package/hydrate/index.js +92 -74
  51. package/hydrate/index.mjs +92 -74
  52. package/package.json +1 -1
  53. package/dist/ionic/p-1b1cb250.entry.js +0 -4
  54. package/dist/ionic/p-D87hU-Ly.js +0 -4
package/hydrate/index.mjs CHANGED
@@ -6252,7 +6252,7 @@ const setRootAriaHidden = (hidden = false) => {
6252
6252
  }
6253
6253
  };
6254
6254
  const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
6255
- var _a, _b;
6255
+ var _a, _b, _c;
6256
6256
  if (overlay.presented) {
6257
6257
  return;
6258
6258
  }
@@ -6286,9 +6286,10 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
6286
6286
  */
6287
6287
  const overlayEl = overlay.el;
6288
6288
  const shouldTrapFocus = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false;
6289
- // Only lock out root content when backdrop is active. Developers relying on showBackdrop=false
6290
- // expect background interaction to remain enabled.
6291
- const shouldLockRoot = shouldTrapFocus && overlayEl.showBackdrop !== false;
6289
+ // Only lock out root content when backdrop is always active. Developers relying on
6290
+ // showBackdrop=false or backdropBreakpoint expect background interaction at some point.
6291
+ const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
6292
+ const shouldLockRoot = shouldTrapFocus && backdropAlwaysActive;
6292
6293
  overlay.presented = true;
6293
6294
  overlay.willPresent.emit();
6294
6295
  if (shouldLockRoot) {
@@ -6300,7 +6301,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
6300
6301
  }
6301
6302
  document.body.classList.add(BACKDROP_NO_SCROLL);
6302
6303
  }
6303
- (_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
6304
+ (_b = overlay.willPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
6304
6305
  const mode = getIonMode$1(overlay);
6305
6306
  // get the user's animation fn if one was provided
6306
6307
  const animationBuilder = overlay.enterAnimation
@@ -6309,7 +6310,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
6309
6310
  const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
6310
6311
  if (completed) {
6311
6312
  overlay.didPresent.emit();
6312
- (_b = overlay.didPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
6313
+ (_c = overlay.didPresentShorthand) === null || _c === void 0 ? void 0 : _c.emit();
6313
6314
  }
6314
6315
  /**
6315
6316
  * If the focused element is already
@@ -6387,7 +6388,7 @@ const restoreElementFocus = async (overlayEl) => {
6387
6388
  }
6388
6389
  };
6389
6390
  const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
6390
- var _a, _b;
6391
+ var _a, _b, _c;
6391
6392
  if (!overlay.presented) {
6392
6393
  return false;
6393
6394
  }
@@ -6403,11 +6404,14 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
6403
6404
  * is dismissed.
6404
6405
  */
6405
6406
  const overlaysLockingRoot = presentedOverlays.filter((o) => {
6407
+ var _a;
6406
6408
  const el = o;
6407
- return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && el.showBackdrop !== false;
6409
+ const backdropAlwaysActive = el.showBackdrop !== false && !(((_a = el.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
6410
+ return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && backdropAlwaysActive;
6408
6411
  });
6409
6412
  const overlayEl = overlay.el;
6410
- const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && overlayEl.showBackdrop !== false;
6413
+ const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
6414
+ const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && backdropAlwaysActive;
6411
6415
  /**
6412
6416
  * If this is the last visible overlay that is trapping focus
6413
6417
  * then we want to re-add the root to the accessibility tree.
@@ -6422,7 +6426,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
6422
6426
  // Overlay contents should not be clickable during dismiss
6423
6427
  overlay.el.style.setProperty('pointer-events', 'none');
6424
6428
  overlay.willDismiss.emit({ data, role });
6425
- (_a = overlay.willDismissShorthand) === null || _a === void 0 ? void 0 : _a.emit({ data, role });
6429
+ (_b = overlay.willDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
6426
6430
  const mode = getIonMode$1(overlay);
6427
6431
  const animationBuilder = overlay.leaveAnimation
6428
6432
  ? overlay.leaveAnimation
@@ -6432,7 +6436,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
6432
6436
  await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
6433
6437
  }
6434
6438
  overlay.didDismiss.emit({ data, role });
6435
- (_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
6439
+ (_c = overlay.didDismissShorthand) === null || _c === void 0 ? void 0 : _c.emit({ data, role });
6436
6440
  // Get a reference to all animations currently assigned to this overlay
6437
6441
  // Then tear them down to return the overlay to its initial visual state
6438
6442
  const animations = activeAnimations.get(overlay) || [];
@@ -22557,9 +22561,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
22557
22561
  };
22558
22562
  };
22559
22563
 
22560
- const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.ion-disable-focus-trap.show-modal){pointer-events:none}:host(.ion-disable-focus-trap.show-modal) ion-backdrop{pointer-events:none}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}";
22564
+ const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}";
22561
22565
 
22562
- const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.ion-disable-focus-trap.show-modal){pointer-events:none}:host(.ion-disable-focus-trap.show-modal) ion-backdrop{pointer-events:none}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}";
22566
+ const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}";
22563
22567
 
22564
22568
  // TODO(FW-2832): types
22565
22569
  /**
@@ -22592,8 +22596,6 @@ class Modal {
22592
22596
  this.inline = false;
22593
22597
  // Whether or not modal is being dismissed via gesture
22594
22598
  this.gestureAnimationDismissing = false;
22595
- // Elements that had pointer-events disabled for background interaction
22596
- this.pointerEventsDisabledElements = [];
22597
22599
  this.presented = false;
22598
22600
  /** @internal */
22599
22601
  this.hasController = false;
@@ -23015,13 +23017,7 @@ class Modal {
23015
23017
  };
23016
23018
  window.addEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
23017
23019
  }
23018
- /**
23019
- * Recalculate isSheetModal here because framework bindings (e.g., Angular)
23020
- * may not have been applied when componentWillLoad ran.
23021
- */
23022
- const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
23023
- this.isSheetModal = isSheetModal;
23024
- if (isSheetModal) {
23020
+ if (this.isSheetModal) {
23025
23021
  this.initSheetGesture();
23026
23022
  }
23027
23023
  else if (hasCardModal) {
@@ -23104,49 +23100,77 @@ class Modal {
23104
23100
  this.moveSheetToBreakpoint = moveSheetToBreakpoint;
23105
23101
  this.gesture.enable(true);
23106
23102
  /**
23107
- * When the backdrop doesn't block pointer events (showBackdrop=false,
23108
- * focusTrap=false, or backdropBreakpoint > 0), the modal's original parent
23109
- * may block pointer events after the modal is moved to ion-app. This only
23110
- * applies when the modal is in a child route (detected by the modal being
23111
- * inside a route wrapper like ion-page). Disable pointer-events on the child
23112
- * route's wrapper elements up to (and including) the first ion-router-outlet.
23113
- * We stop there because parent elements may contain sibling content that
23114
- * should remain interactive.
23103
+ * When backdrop interaction is allowed, nested router outlets from child routes
23104
+ * may block pointer events to parent content. Apply passthrough styles only when
23105
+ * the modal was the sole content of a child route page.
23115
23106
  * See https://github.com/ionic-team/ionic-framework/issues/30700
23116
23107
  */
23117
- const backdropNotBlocking = this.showBackdrop === false || this.focusTrap === false || this.backdropBreakpoint > 0;
23118
- if (backdropNotBlocking && this.cachedOriginalParent) {
23119
- // Find the first meaningful parent (skip template and other non-semantic wrappers).
23120
- // In Ionic React, modals are wrapped in a <template> element.
23121
- let semanticParent = this.cachedOriginalParent;
23122
- while (semanticParent && (semanticParent.tagName === 'TEMPLATE' || semanticParent.tagName === 'SLOT')) {
23123
- semanticParent = semanticParent.parentElement;
23124
- }
23125
- // Check if the modal is inside a route wrapper (ion-page or div.ion-page)
23126
- // If the modal is inside ion-content or other content containers, this fix doesn't apply
23127
- const parentIsRouteWrapper = semanticParent && (semanticParent.tagName === 'ION-PAGE' || semanticParent.classList.contains('ion-page'));
23128
- if (parentIsRouteWrapper && semanticParent) {
23129
- this.pointerEventsDisabledElements = [];
23130
- let current = semanticParent;
23131
- while (current && current.tagName !== 'ION-APP') {
23132
- const tagName = current.tagName;
23133
- // Check for ion-page tag or elements with ion-page class
23134
- // (React renders IonPage as div.ion-page, not ion-page tag)
23135
- const isIonPage = tagName === 'ION-PAGE' || current.classList.contains('ion-page');
23136
- const isRouterOutlet = tagName === 'ION-ROUTER-OUTLET';
23137
- const isNav = tagName === 'ION-NAV';
23138
- if (isIonPage || isRouterOutlet || isNav) {
23139
- current.style.setProperty('pointer-events', 'none');
23140
- this.pointerEventsDisabledElements.push(current);
23141
- }
23142
- // Stop after processing the first ion-router-outlet - parent elements
23143
- // may contain sibling content (like buttons) that should remain interactive
23144
- if (isRouterOutlet) {
23145
- break;
23146
- }
23147
- current = current.parentElement;
23148
- }
23149
- }
23108
+ const backdropNotBlocking = this.showBackdrop === false || this.focusTrap === false || backdropBreakpoint > 0;
23109
+ if (backdropNotBlocking) {
23110
+ this.setupChildRoutePassthrough();
23111
+ }
23112
+ }
23113
+ /**
23114
+ * For sheet modals that allow background interaction, sets up pointer-events
23115
+ * passthrough on child route page wrappers and nested router outlets.
23116
+ */
23117
+ setupChildRoutePassthrough() {
23118
+ var _a;
23119
+ const pageParent = this.getOriginalPageParent();
23120
+ // Skip ion-app (controller modals) and pages with other content (inline modals)
23121
+ if (!pageParent || pageParent.tagName === 'ION-APP') {
23122
+ return;
23123
+ }
23124
+ const hasVisibleContent = Array.from(pageParent.children).some((child) => {
23125
+ var _a;
23126
+ if (child === this.el)
23127
+ return false;
23128
+ if (child instanceof HTMLElement && window.getComputedStyle(child).display === 'none')
23129
+ return false;
23130
+ if (child.tagName === 'TEMPLATE' || child.tagName === 'SLOT')
23131
+ return false;
23132
+ if (child.nodeType === Node.TEXT_NODE && !((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()))
23133
+ return false;
23134
+ return true;
23135
+ });
23136
+ if (hasVisibleContent) {
23137
+ return;
23138
+ }
23139
+ // Child route case: page only contained the modal
23140
+ pageParent.classList.add('ion-page-overlay-passthrough');
23141
+ // Also make nested router outlets passthrough
23142
+ const routerOutlet = pageParent.parentElement;
23143
+ if ((routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.tagName) === 'ION-ROUTER-OUTLET' && ((_a = routerOutlet.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) !== 'ION-APP') {
23144
+ routerOutlet.style.setProperty('pointer-events', 'none');
23145
+ routerOutlet.setAttribute('data-overlay-passthrough', 'true');
23146
+ }
23147
+ }
23148
+ /**
23149
+ * Finds the ion-page ancestor of the modal's original parent location.
23150
+ */
23151
+ getOriginalPageParent() {
23152
+ if (!this.cachedOriginalParent) {
23153
+ return null;
23154
+ }
23155
+ let pageParent = this.cachedOriginalParent;
23156
+ while (pageParent && !pageParent.classList.contains('ion-page')) {
23157
+ pageParent = pageParent.parentElement;
23158
+ }
23159
+ return pageParent;
23160
+ }
23161
+ /**
23162
+ * Removes passthrough styles added by setupChildRoutePassthrough.
23163
+ */
23164
+ cleanupChildRoutePassthrough() {
23165
+ const pageParent = this.getOriginalPageParent();
23166
+ if (!pageParent) {
23167
+ return;
23168
+ }
23169
+ pageParent.classList.remove('ion-page-overlay-passthrough');
23170
+ const routerOutlet = pageParent.parentElement;
23171
+ if (routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.hasAttribute('data-overlay-passthrough')) {
23172
+ routerOutlet.style.removeProperty('pointer-events');
23173
+ routerOutlet.removeAttribute('data-overlay-passthrough');
23150
23174
  }
23151
23175
  }
23152
23176
  sheetOnDismiss() {
@@ -23237,13 +23261,7 @@ class Modal {
23237
23261
  }
23238
23262
  this.cleanupViewTransitionListener();
23239
23263
  this.cleanupParentRemovalObserver();
23240
- /**
23241
- * Clean up pointer-events changes made in initSheetGesture.
23242
- */
23243
- for (const element of this.pointerEventsDisabledElements) {
23244
- element.style.removeProperty('pointer-events');
23245
- }
23246
- this.pointerEventsDisabledElements = [];
23264
+ this.cleanupChildRoutePassthrough();
23247
23265
  }
23248
23266
  this.currentBreakpoint = undefined;
23249
23267
  this.animation = undefined;
@@ -23481,20 +23499,20 @@ class Modal {
23481
23499
  const isCardModal = presentingElement !== undefined && mode === 'ios';
23482
23500
  const isHandleCycle = handleBehavior === 'cycle';
23483
23501
  const isSheetModalWithHandle = isSheetModal && showHandle;
23484
- return (hAsync(Host, Object.assign({ key: 'd93e3750351017ef6f45a8a131a0722c31ef7c34', "no-router": true,
23502
+ return (hAsync(Host, Object.assign({ key: '3bdb8abb1c5bccc9d3b20ed419c85144ccf4d209', "no-router": true,
23485
23503
  // Allow the modal to be navigable when the handle is focusable
23486
23504
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
23487
23505
  zIndex: `${20000 + this.overlayIndex}`,
23488
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: 'e76fd5404593e02c790e9cdf0ad7e03c7377fe93', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '1d57865a48d2ec5cf9c29388a05dd8c960aad079', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '44879f6ac725b09562a3f8a6d4be15634634a10d',
23506
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '7d15fea01ca56670cfdfcfe1e3b86b6e6353ee65', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '875ed586a3c55dc19ba5ab97c37da8e09dc2afbe', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '4fc03a83d5b827c2aaaeaea386a966290f43eb99',
23489
23507
  /*
23490
23508
  role and aria-modal must be used on the
23491
23509
  same element. They must also be set inside the
23492
23510
  shadow DOM otherwise ion-button will not be highlighted
23493
23511
  when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
23494
23512
  */
23495
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '1e4ee030c5993ea1e3a1fe7368a50eb349f4b5eb', class: "modal-handle",
23513
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'dbae13fa667f3c974e3c88da7067d6426a92e83a', class: "modal-handle",
23496
23514
  // Prevents the handle from receiving keyboard focus when it does not cycle
23497
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: '4bfacca293cd3b63a617235d90545e385c094379', onSlotchange: this.onSlotChange }))));
23515
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: '0284e13c0dd87ba76e6b9982f25d1b41a1766bfc', onSlotchange: this.onSlotChange }))));
23498
23516
  }
23499
23517
  get el() { return getElement(this); }
23500
23518
  static get watchers() { return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "8.7.12-dev.11764957130.14454872",
3
+ "version": "8.7.12-dev.11764961567.138743ff",
4
4
  "description": "Base components for Ionic",
5
5
  "keywords": [
6
6
  "ionic",
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{r as t,c as o,f as i,w as a,e,h as r,d as s,g as n}from"./p-C8IsBmNU.js";import{f as d,i as h,d as p,r as l,a as c,p as m}from"./p-CwgG81ZD.js";import{C as f,a as b,d as u}from"./p-D-eFFUkA.js";import{e as x,g as v,r as w,b as g,h as k}from"./p-CTfR9YZG.js";import{c as y}from"./p-B-hirT0v.js";import{g as A}from"./p-CIGNaXM1.js";import{G as Y,O as D,F as E,e as B,B as T,j as O,k as S,f as C,g as M,h as j}from"./p-D87hU-Ly.js";import{g as P}from"./p-DiVJyqlX.js";import{e as I,w as L}from"./p-DUt5fQmA.js";import{b as N}from"./p-BFvmZNyx.js";import{KEYBOARD_DID_OPEN as $}from"./p-9eeaBrnk.js";import{c as R}from"./p-DDb5r57F.js";import{g as z}from"./p-hHmYLOfE.js";import{createGesture as W}from"./p-Cl0B-RWe.js";import{w as F}from"./p-ZjP4CjeZ.js";import"./p-B0q1YL7N.js";import"./p-BTEOs1at.js";import"./p-D13Eaw-8.js";var H;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(H||(H={}));const V={getEngine(){const t=A();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const o=this.getEngine();o&&o.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return H.Default;const{style:o}=await t.getInfo();return o}},Z=(t,o)=>{if(1===o)return 0;const i=1/(1-o);return t*i+-o*i},G=()=>{!F||F.innerWidth>=768||V.setStyle({style:H.Dark})},U=(t=H.Default)=>{!F||F.innerWidth>=768||V.setStyle({style:t})},K=async(t,o)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,Y)&&(o.isRunning()?o.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},_=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,q=.915,X=(t,o)=>x(400,t/Math.abs(1.1*o),500),J=t=>{const{currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:a}=t,e=void 0===i||i<o,r=e?`calc(var(--backdrop-opacity) * ${o})`:"0",s=R("backdropAnimation").fromTo("opacity",0,r);return e&&s.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:R("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*o}%)`}]),backdropAnimation:s,contentAnimation:a?void 0:R("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-o)+"%"},{offset:1,opacity:1,maxHeight:100*o+"%"}])}},Q=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=`calc(var(--backdrop-opacity) * ${Z(o,i)})`,e=[{offset:0,opacity:a},{offset:1,opacity:0}],r=[{offset:0,opacity:a},{offset:i,opacity:0},{offset:1,opacity:0}],s=R("backdropAnimation").keyframes(0!==i?r:e);return{wrapperAnimation:R("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*o}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:s}},tt=(t,o)=>{const{presentingEl:i,currentBreakpoint:a,expandToScroll:e}=o,r=v(t),{wrapperAnimation:s,backdropAnimation:n,contentAnimation:d}=void 0!==a?J(o):{backdropAnimation:R().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:R().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};n.addElement(r.querySelector("ion-backdrop")),s.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!e&&(null==d||d.addElement(t.querySelector(".ion-page")));const h=R("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([s]);if(d&&h.addAnimation(d),i){const t=window.innerWidth<768,o="ION-MODAL"===i.tagName&&void 0!==i.presentingElement,a=v(i),e=R().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${o?"-10px":t}) scale(0.915)`;e.afterStyles({transform:a}).beforeAddWrite((()=>r.style.setProperty("background-color","black"))).addElement(i).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),h.addAnimation(e)}else if(h.addAnimation(n),o){const t=`translateY(-10px) scale(${o?q:1})`;e.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const i=R().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);h.addAnimation([e,i])}else s.fromTo("opacity","0","1")}else h.addAnimation(n);return h},ot=(t,o,i=500)=>{const{presentingEl:a,currentBreakpoint:e}=o,r=v(t),{wrapperAnimation:s,backdropAnimation:n}=void 0!==e?Q(o):{backdropAnimation:R().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:R().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(r.querySelector("ion-backdrop")),s.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=R("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i).addAnimation(s);if(a){const t=window.innerWidth<768,o="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,i=v(a),e=R().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(r.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&r.style.setProperty("background-color",""))})),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",i=`translateY(${o?"-10px":t}) scale(0.915)`;e.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:i,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(e)}else if(d.addAnimation(n),o){const t=`translateY(-10px) scale(${o?q:1})`;e.addElement(i.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=R().addElement(i.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([e,a])}else s.fromTo("opacity","1","0")}else d.addAnimation(n);return d},it=(t,o)=>{const{currentBreakpoint:i,expandToScroll:a}=o,e=v(t),{wrapperAnimation:r,backdropAnimation:s,contentAnimation:n}=void 0!==i?J(o):{backdropAnimation:R().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:R().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};s.addElement(e.querySelector("ion-backdrop")),r.addElement(e.querySelector(".modal-wrapper")),!a&&(null==n||n.addElement(t.querySelector(".ion-page")));const d=R().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([s,r]);return n&&d.addAnimation(n),d},at=(t,o)=>{const{currentBreakpoint:i}=o,a=v(t),{wrapperAnimation:e,backdropAnimation:r}=void 0!==i?Q(o):{backdropAnimation:R().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:R().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return r.addElement(a.querySelector("ion-backdrop")),e.addElement(a.querySelector(".modal-wrapper")),R().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([r,e])},et=class{constructor(i){t(this,i),this.didPresent=o(this,"ionModalDidPresent",7),this.willPresent=o(this,"ionModalWillPresent",7),this.willDismiss=o(this,"ionModalWillDismiss",7),this.didDismiss=o(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=o(this,"ionBreakpointDidChange",7),this.didPresentShorthand=o(this,"didPresent",7),this.willPresentShorthand=o(this,"willPresent",7),this.willDismissShorthand=o(this,"willDismiss",7),this.didDismissShorthand=o(this,"didDismiss",7),this.ionMount=o(this,"ionMount",7),this.lockController=y(),this.triggerController=B(),this.coreDelegate=f(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.pointerEventsDisabledElements=[],this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="none",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:o}=this;"cycle"===o&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,T)},this.onLifecycle=t=>{const o=this.usersElement,i=rt[t.type];if(o&&i){const a=new CustomEvent(i,{bubbles:!1,cancelable:!1,detail:t.detail});o.dispatchEvent(a)}},this.onModalFocus=t=>{const{dragHandleEl:o,el:i}=this;t.target===i&&o&&-1!==o.tabIndex&&o.focus()},this.onSlotChange=({target:t})=>{t.assignedElements().forEach((t=>{t.querySelectorAll("ion-modal").forEach((t=>{null===t.getAttribute("data-parent-ion-modal")&&t.setAttribute("data-parent-ion-modal",this.el.id)}))}))}}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:i}=this;t&&i.addClickListener(o,t)}onWindowResize(){"ios"!==N(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this.handleViewTransition()}),50))}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,o)=>t-o)))}connectedCallback(){const{el:t}=this;O(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver()}componentWillLoad(){var t;const{breakpoints:o,initialBreakpoint:a,el:e,htmlAttributes:r}=this,s=this.isSheetModal=void 0!==o&&void 0!==a,n=["aria-label","role"];this.inheritedAttributes=g(e,n),e.parentNode&&(this.cachedOriginalParent=e.parentNode),void 0!==r&&n.forEach((t=>{r[t]&&(this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:r[t]}),delete r[t])})),s&&(this.currentBreakpoint=this.initialBreakpoint),void 0===o||void 0===a||o.includes(a)||i("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),(null===(t=this.htmlAttributes)||void 0===t?void 0:t.id)||S(this.el)}componentDidLoad(){!0===this.isOpen&&w((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const o=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:o,delegate:this.workingDelegate=o?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,o){const{canDismiss:i}=this;return"function"==typeof i?i(t,o):i}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:o,el:i}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:e,delegate:r}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await b(r,i,this.component,["ion-page"],this.componentProps,e),k(i)?await I(this.usersElement):this.keepContentsMounted||await L(),a((()=>this.el.classList.add("show-modal")));const s=void 0!==o;s&&"ios"===N(this)&&(this.statusBarStyle=await V.getStyle(),G()),await C(this,"modalEnter",tt,it,{presentingEl:o,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll}),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),w((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener($,this.keyboardOpenCallback));const n=void 0!==this.breakpoints&&void 0!==this.initialBreakpoint;this.isSheetModal=n,n?this.initSheetGesture():s&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()}initSwipeToClose(){var t;if("ios"!==N(this))return;const{el:o}=this,i=this.leaveAnimation||e.get("modalLeave",ot),a=this.animation=i(o,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});if(!c(o))return void m(o);const r=null!==(t=this.statusBarStyle)&&void 0!==t?t:H.Default;this.gesture=((t,o,i,a)=>{const e=.5,r=t.offsetHeight;let s=!1,n=!1,c=null,m=null,f=!0,b=0;const u=W({el:t,gestureName:"modalSwipeToClose",gesturePriority:D,direction:"y",threshold:10,canStart:t=>{const o=t.event.target;if(null===o||!o.closest)return!0;if(c=d(o),c){if(h(c)){const t=v(c);m=t.querySelector(".inner-scroll")}else m=c;return!c.querySelector("ion-refresher")&&0===m.scrollTop}return null===o.closest("ion-footer")},onStart:i=>{const{deltaY:a}=i;f=!c||!h(c)||c.scrollY,n=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&c&&p(c),o.progressStart(!0,s?1:0)},onMove:t=>{const{deltaY:a}=t;a>0&&c&&p(c);const s=t.deltaY/r,d=s>=0&&n,h=d?.2:.9999,l=d?_(s/h):s,m=x(1e-4,l,h);o.progressStep(m),m>=e&&b<e?U(i):m<e&&b>=e&&G(),b=m},onEnd:i=>{const d=i.velocityY,h=i.deltaY/r,p=h>=0&&n,m=p?.2:.9999,b=p?_(h/m):h,v=x(1e-4,b,m),w=!p&&(i.deltaY+1e3*d)/r>=e;let g=w?-.001:.001;w?(o.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=z([0,0],[.32,.72],[0,1],[1,1],v)[0]):(o.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=z([0,0],[1,0],[.68,.28],[1,1],v)[0]);const k=X(w?h*r:(1-v)*r,d);s=w,u.enable(!1),c&&l(c,f),o.onFinish((()=>{w||u.enable(!0)})).progressEnd(w?1:0,g,k),p&&v>m/4?K(t,o):w&&a()}});return u})(o,a,r,(()=>{this.gestureAnimationDismissing=!0,U(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,Y),this.gestureAnimationDismissing=!1}))})),this.gesture.enable(!0)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:o,backdropBreakpoint:i}=this;if(!t||void 0===o)return;const a=this.enterAnimation||e.get("modalEnter",tt),r=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:this.expandToScroll});r.progressStart(!0,1);const{gesture:s,moveSheetToBreakpoint:n}=((t,o,i,a,e,r,s=[],n,p,l,c)=>{const m={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==e?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-e,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},f=t.querySelector("ion-content"),b=i.clientHeight;let u=a,g=0,k=!1,y=null,A=null,Y=null,D=null;const B=s[s.length-1],T=s[0],O=r.childAnimations.find((t=>"wrapperAnimation"===t.id)),S=r.childAnimations.find((t=>"backdropAnimation"===t.id)),C=r.childAnimations.find((t=>"contentAnimation"===t.id)),M=()=>{!1!==t.focusTrap&&!1!==t.showBackdrop&&(t.style.setProperty("pointer-events","auto"),o.style.setProperty("pointer-events","auto"),t.classList.remove(E))},j=()=>{t.style.setProperty("pointer-events","none"),o.style.setProperty("pointer-events","none"),t.classList.add(E)},P=o=>{if(!A&&(A=Array.from(t.querySelectorAll("ion-footer")),!A.length))return;const i=t.querySelector(".ion-page");if(D=o,"stationary"===o)A.forEach((t=>{t.classList.remove("modal-footer-moving"),t.style.removeProperty("position"),t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("top"),t.style.removeProperty("left"),null==i||i.style.removeProperty("padding-bottom"),null==i||i.appendChild(t)}));else{let o=0;A.forEach(((i,a)=>{const e=i.getBoundingClientRect(),r=document.body.getBoundingClientRect();o+=i.clientHeight;const s=e.top-r.top,n=e.left-r.left;if(i.style.setProperty("--pinned-width",`${i.clientWidth}px`),i.style.setProperty("--pinned-height",`${i.clientHeight}px`),i.style.setProperty("--pinned-top",`${s}px`),i.style.setProperty("--pinned-left",`${n}px`),0===a){Y=s;const o=t.querySelector("ion-header");o&&(Y-=o.clientHeight)}})),A.forEach((t=>{null==i||i.style.setProperty("padding-bottom",`${o}px`),t.classList.add("modal-footer-moving"),t.style.setProperty("position","absolute"),t.style.setProperty("width","var(--pinned-width)"),t.style.setProperty("height","var(--pinned-height)"),t.style.setProperty("top","var(--pinned-top)"),t.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(t)}))}};O&&S&&(O.keyframes([...m.WRAPPER_KEYFRAMES]),S.keyframes([...m.BACKDROP_KEYFRAMES]),null==C||C.keyframes([...m.CONTENT_KEYFRAMES]),r.progressStart(!0,1-u),u>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?M():j()),f&&u!==B&&n&&(f.scrollY=!1);const I=o=>{const{breakpoint:i,canDismiss:a,breakpointOffset:d,animated:h}=o,p=a&&0===i,b=p?u:i,x=0!==b;return u=0,O&&S&&(O.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-b)}%)`}]),S.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${Z(1-d,e)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${Z(b,e)})`}]),C&&C.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*b+"%"}]),r.progressStep(0)),L.enable(!1),p?K(t,r):x||l(),!f||b!==s[s.length-1]&&n||(f.scrollY=!0),n||0!==b||P("stationary"),new Promise((o=>{r.onFinish((()=>{x?(n||P("stationary"),O&&S?w((()=>{O.keyframes([...m.WRAPPER_KEYFRAMES]),S.keyframes([...m.BACKDROP_KEYFRAMES]),null==C||C.keyframes([...m.CONTENT_KEYFRAMES]),r.progressStart(!0,1-b),u=b,c(u),u>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?M():j(),L.enable(!0),o()})):(L.enable(!0),o())):o()}),{oneTimeCallback:!0}).progressEnd(1,0,h?500:0)}))},L=W({el:i,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const o=d(t.event.target);if(u=p(),!n&&o)return 0===(h(o)?v(o).querySelector(".inner-scroll"):o).scrollTop;if(1===u&&o){const t=h(o)?v(o).querySelector(".inner-scroll"):o;return!o.querySelector("ion-refresher")&&0===t.scrollTop}return!0},onStart:o=>{if(k=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===T,!n){const t=d(o.event.target);y=t&&h(t)?v(t).querySelector(".inner-scroll"):t}n||P("moving"),o.deltaY>0&&f&&(f.scrollY=!1),w((()=>{t.focus()})),r.progressStart(!0,1-u)},onMove:t=>{if(n||null===Y||null===D||(t.currentY>=Y&&"moving"===D?P("stationary"):t.currentY<Y&&"stationary"===D&&P("moving")),!n&&t.deltaY<=0&&y)return;t.deltaY>0&&f&&(f.scrollY=!1);const o=s.length>1?1-s[1]:void 0,i=1-u+t.deltaY/b,a=void 0!==o&&i>=o&&k,e=a?.95:.9999,d=a&&void 0!==o?o+_((i-o)/(e-o)):i;g=x(1e-4,d,e),r.progressStep(g)},onEnd:t=>{if(!n&&t.deltaY<=0&&y&&y.scrollTop>0)return void P("stationary");const o=u-(t.deltaY+350*t.velocityY)/b,i=s.reduce(((t,i)=>Math.abs(i-o)<Math.abs(t-o)?i:t));I({breakpoint:i,breakpointOffset:g,canDismiss:k,animated:!0})}});return{gesture:L,moveSheetToBreakpoint:I}})(this.el,this.backdropEl,t,o,i,r,this.sortedBreakpoints,this.expandToScroll,(()=>{var t;return null!==(t=this.currentBreakpoint)&&void 0!==t?t:0}),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}));if(this.gesture=s,this.moveSheetToBreakpoint=n,this.gesture.enable(!0),(!1===this.showBackdrop||!1===this.focusTrap||this.backdropBreakpoint>0)&&this.cachedOriginalParent){let t=this.cachedOriginalParent;for(;t&&("TEMPLATE"===t.tagName||"SLOT"===t.tagName);)t=t.parentElement;if(t&&("ION-PAGE"===t.tagName||t.classList.contains("ion-page"))&&t){this.pointerEventsDisabledElements=[];let o=t;for(;o&&"ION-APP"!==o.tagName;){const t=o.tagName,i="ION-ROUTER-OUTLET"===t;if(("ION-PAGE"===t||o.classList.contains("ion-page")||i||"ION-NAV"===t)&&(o.style.setProperty("pointer-events","none"),this.pointerEventsDisabledElements.push(o)),i)break;o=o.parentElement}}}}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,Y),this.gestureAnimationDismissing=!1}))}async dismiss(t,o){var i;if(this.gestureAnimationDismissing&&o!==Y)return!1;const e=await this.lockController.lock();if(await this.dismissNestedModals(),"handler"!==o&&!await this.checkCanDismiss(t,o))return e(),!1;const{presentingElement:r}=this;void 0!==r&&"ios"===N(this)&&U(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener($,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=await M(this,t,o,"modalLeave",ot,at,{presentingEl:r,currentBreakpoint:null!==(i=this.currentBreakpoint)&&void 0!==i?i:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(s){const{delegate:t}=this.getDelegate();await u(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver();for(const t of this.pointerEventsDisabledElements)t.style.removeProperty("pointer-events");this.pointerEventsDisabledElements=[]}return this.currentBreakpoint=void 0,this.animation=void 0,e(),s}onDidDismiss(){return j(this.el,"ionModalDidDismiss")}onWillDismiss(){return j(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void i("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void i(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:o,moveSheetToBreakpoint:a,canDismiss:e,breakpoints:r,animated:s}=this;o!==t&&a&&(this.sheetTransition=a({breakpoint:t,breakpointOffset:1-o,canDismiss:void 0!==e&&!0!==e&&0===r[0],animated:s}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:o}=this;if(!t||null==o)return!1;const i=t.filter((t=>0!==t)),a=i.indexOf(o),e=i[(a+1)%i.length];return await this.setCurrentBreakpoint(e),!0}initViewTransitionListener(){"ios"!==N(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(this.currentViewIsPortrait=window.innerWidth<768)}handleViewTransition(){const t=window.innerWidth<768;if(this.currentViewIsPortrait===t)return;this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0);const{presentingElement:o}=this;if(!o)return;let i;i=this.currentViewIsPortrait&&!t?((t,o,i=300)=>{const{presentingEl:a}=o;if(!a)return R("portrait-to-landscape-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,r=v(a),s=document.body,n=R("portrait-to-landscape-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i),d=R().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",o="translateY(0px) scale(1)";d.addElement(a).afterStyles({transform:o}).fromTo("transform",t,o).fromTo("filter","contrast(0.85)","contrast(1)");const i=R().addElement(r.querySelector(".modal-shadow")).afterStyles({transform:o,opacity:"0"}).fromTo("transform",t,o);n.addAnimation([d,i])}else{const o=v(t),i=R().addElement(o.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=R().addElement(o.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),r=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:"translateY(0px) scale(1)","border-radius":"0px"}).beforeAddWrite((()=>s.style.setProperty("background-color",""))).fromTo("transform",r,"translateY(0px) scale(1)").fromTo("filter","contrast(0.85)","contrast(1)").fromTo("border-radius","10px 10px 0 0","0px"),n.addAnimation([d,i,e])}return n})(this.el,{presentingEl:o}):((t,o,i=300)=>{const{presentingEl:a}=o;if(!a)return R("landscape-to-portrait-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,r=v(a),s=document.body,n=R("landscape-to-portrait-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i),d=R().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",o="translateY(0) scale(1)";d.addElement(a).afterStyles({transform:o}).fromTo("transform",t,o);const i=R().addElement(r.querySelector(".modal-shadow")).afterStyles({transform:o,opacity:"0"}).fromTo("transform",t,o);n.addAnimation([d,i])}else{const o=v(t),i=R().addElement(o.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=R().addElement(o.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),r=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:r}).beforeAddWrite((()=>s.style.setProperty("background-color","black"))).keyframes([{offset:0,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"0px"},{offset:.2,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"10px 10px 0 0"},{offset:1,transform:r,filter:"contrast(0.85)",borderRadius:"10px 10px 0 0"}]),n.addAnimation([d,i,e])}return n})(this.el,{presentingEl:o}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=i,i.play().then((()=>{this.viewTransitionAnimation=void 0,this.reinitSwipeToClose()}))}cleanupViewTransitionListener(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0)}reinitSwipeToClose(){"ios"===N(this)&&this.presentingElement&&(this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation&&(this.animation.progressEnd(0,0,0),this.animation.destroy(),this.animation=void 0),w((()=>{this.ensureCorrectModalPosition(),this.initSwipeToClose()})))}ensureCorrectModalPosition(){const{el:t,presentingElement:o}=this,i=v(t).querySelector(".modal-wrapper");if(i&&(i.style.transform="translateY(0vh)",i.style.opacity="1"),"ION-MODAL"===(null==o?void 0:o.tagName))if(window.innerWidth<768){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px";o.style.transform=`translateY(${t}) scale(0.915)`}else o.style.transform="translateY(0px) scale(1)"}async dismissNestedModals(){const t=document.querySelectorAll(`ion-modal[data-parent-ion-modal="${this.el.id}"]`);null==t||t.forEach((async t=>{await t.dismiss(void 0,"parent-dismissed")}))}initParentRemovalObserver(){"undefined"!=typeof MutationObserver&&"undefined"!=typeof window&&this.cachedOriginalParent&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_NODE&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(this.parentRemovalObserver=new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&t.removedNodes.length>0&&(Array.from(t.removedNodes).some((t=>{var o,i;const a=t===this.cachedOriginalParent,e=!!this.cachedOriginalParent&&(null===(i=(o=t).contains)||void 0===i?void 0:i.call(o,this.cachedOriginalParent));return a||e}))||this.cachedOriginalParent&&!this.cachedOriginalParent.isConnected)&&(this.dismiss(void 0,"parent-removed"),this.cachedOriginalParent=void 0)}))})),this.parentRemovalObserver.observe(document.body,{childList:!0,subtree:!0}))}cleanupParentRemovalObserver(){var t;null===(t=this.parentRemovalObserver)||void 0===t||t.disconnect(),this.parentRemovalObserver=void 0}render(){const{handle:t,isSheetModal:o,presentingElement:i,htmlAttributes:a,handleBehavior:e,inheritedAttributes:n,focusTrap:d,expandToScroll:h}=this,p=!1!==t&&o,l=N(this),c=void 0!==i&&"ios"===l,m="cycle"===e;return r(s,Object.assign({key:"d93e3750351017ef6f45a8a131a0722c31ef7c34","no-router":!0,tabIndex:m&&o&&p?0:-1},a,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[l]:!0,"modal-default":!c&&!o,"modal-card":c,"modal-sheet":o,"modal-no-expand-scroll":o&&!h,"overlay-hidden":!0,[E]:!1===d},P(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle,onFocus:this.onModalFocus}),r("ion-backdrop",{key:"e76fd5404593e02c790e9cdf0ad7e03c7377fe93",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===l&&r("div",{key:"1d57865a48d2ec5cf9c29388a05dd8c960aad079",class:"modal-shadow"}),r("div",Object.assign({key:"44879f6ac725b09562a3f8a6d4be15634634a10d",role:"dialog"},n,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),p&&r("button",{key:"1e4ee030c5993ea1e3a1fe7368a50eb349f4b5eb",class:"modal-handle",tabIndex:m?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:void 0,part:"handle",ref:t=>this.dragHandleEl=t}),r("slot",{key:"4bfacca293cd3b63a617235d90545e385c094379",onSlotchange:this.onSlotChange})))}get el(){return n(this)}static get watchers(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}},rt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};et.style={ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.ion-disable-focus-trap.show-modal){pointer-events:none}:host(.ion-disable-focus-trap.show-modal) ion-backdrop{pointer-events:none}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.ion-disable-focus-trap.show-modal){pointer-events:none}:host(.ion-disable-focus-trap.show-modal) ion-backdrop{pointer-events:none}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'};export{et as ion_modal}
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{d as n}from"./p-ZjP4CjeZ.js";import{n as o,c as e,f as t,m as i,g as a}from"./p-CTfR9YZG.js";import{OVERLAY_BACK_BUTTON_PRIORITY as s,shouldUseCloseWatcher as r}from"./p-B0q1YL7N.js";import{e as d,j as l,f as c}from"./p-C8IsBmNU.js";import{b as u}from"./p-BFvmZNyx.js";import{C as m}from"./p-D-eFFUkA.js";import{B as p}from"./p-BTEOs1at.js";const v='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-checkbox:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-radio:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',f=(n,o)=>{const e=n.querySelector(v);b(e,null!=o?o:n)},h=(n,o)=>{const e=Array.from(n.querySelectorAll(v));b(e.length>0?e[e.length-1]:null,null!=o?o:n)},b=(n,e)=>{let t=n;const i=null==n?void 0:n.shadowRoot;if(i&&(t=i.querySelector(v)||n),t){const n=t.closest("ion-radio-group");n?n.setFocus():o(t)}else e.focus()};let y=0,w=0;const g=new WeakMap,O=n=>({create:o=>D(n,o),dismiss:(o,e,t)=>P(document,o,e,n,t),getTop:async()=>E(document,n)}),T=O("ion-alert"),k=O("ion-action-sheet"),x=O("ion-loading"),j=O("ion-modal"),A=O("ion-picker-legacy"),C=O("ion-popover"),N=O("ion-toast"),B=n=>{"undefined"!=typeof document&&F(document);const o=y++;n.overlayIndex=o},I=n=>(n.hasAttribute("id")||(n.id="ion-overlay-"+ ++w),n.id),D=(n,o)=>"undefined"!=typeof window&&void 0!==window.customElements?window.customElements.whenDefined(n).then((()=>{const t=document.createElement(n);return t.classList.add("overlay-hidden"),Object.assign(t,Object.assign(Object.assign({},o),{hasController:!0})),q(document).appendChild(t),new Promise((n=>e(t,n)))})):Promise.resolve(),S=(n,e)=>{let t=n;const i=null==n?void 0:n.shadowRoot;i&&(t=i.querySelector(v)||n),t?o(t):e.focus()},F=n=>{0===y&&(y=1,n.addEventListener("focus",(o=>{((n,o)=>{const e=E(o,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover"),t=n.target;e&&t&&(e.classList.contains(X)||(e.shadowRoot?(()=>{if(e.contains(t))e.lastFocus=t;else if("ION-TOAST"===t.tagName)S(e.lastFocus,e);else{const n=e.lastFocus;f(e),n===o.activeElement&&h(e),e.lastFocus=o.activeElement}})():(()=>{if(e===t)e.lastFocus=void 0;else if("ION-TOAST"===t.tagName)S(e.lastFocus,e);else{const n=a(e);if(!n.contains(t))return;const i=n.querySelector(".ion-overlay-wrapper");if(!i)return;if(i.contains(t)||t===n.querySelector("ion-backdrop"))e.lastFocus=t;else{const n=e.lastFocus;f(i,e),n===o.activeElement&&h(i,e),e.lastFocus=o.activeElement}}})()))})(o,n)}),!0),n.addEventListener("ionBackButton",(o=>{const e=E(n);(null==e?void 0:e.backdropDismiss)&&o.detail.register(s,(()=>{e.dismiss(void 0,_)}))})),r()||n.addEventListener("keydown",(o=>{if("Escape"===o.key){const o=E(n);(null==o?void 0:o.backdropDismiss)&&o.dismiss(void 0,_)}})))},P=(n,o,e,t,i)=>{const a=E(n,t,i);return a?a.dismiss(o,e):Promise.reject("overlay does not exist")},Z=(n,o)=>((n,o)=>(void 0===o&&(o="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"),Array.from(n.querySelectorAll(o)).filter((n=>n.overlayIndex>0))))(n,o).filter((n=>!n.classList.contains("overlay-hidden"))),E=(n,o,e)=>{const t=Z(n,o);return void 0===e?t[t.length-1]:t.find((n=>n.id===e))},G=(n=!1)=>{const o=q(document).querySelector("ion-router-outlet, #ion-view-container-root");o&&(n?o.setAttribute("aria-hidden","true"):o.removeAttribute("aria-hidden"))},L=async(n,o,e,t,i)=>{var a,s;if(n.presented)return;"ION-TOAST"!==n.el.tagName&&M(n.el);const r=n.el,l="ION-TOAST"!==r.tagName&&!1!==r.focusTrap&&!1!==r.showBackdrop;if(n.presented=!0,n.willPresent.emit(),l){const n=q(document).querySelector("ion-router-outlet, #ion-view-container-root");!!n&&n.contains(r)||G(!0),document.body.classList.add(p)}null===(a=n.willPresentShorthand)||void 0===a||a.emit();const c=u(n),m=n.enterAnimation?n.enterAnimation:d.get(o,"ios"===c?e:t);await U(n,m,n.el,i)&&(n.didPresent.emit(),null===(s=n.didPresentShorthand)||void 0===s||s.emit()),!n.keyboardClose||null!==document.activeElement&&n.el.contains(document.activeElement)||n.el.focus(),n.el.removeAttribute("aria-hidden"),n.el.removeAttribute("inert")},M=async n=>{let o=document.activeElement;if(!o)return;o.blur();const e=null==o?void 0:o.shadowRoot;e&&(o=e.querySelector(v)||o),await n.onDidDismiss(),null!==document.activeElement&&document.activeElement!==document.body||o.focus()},$=async(o,e,t,i,a,s,r)=>{var c,m;if(!o.presented)return!1;const v=(void 0!==n?Z(n):[]).filter((n=>"ION-TOAST"!==n.tagName&&!1!==n.focusTrap&&!1!==n.showBackdrop)),f=o.el;"ION-TOAST"!==f.tagName&&!1!==f.focusTrap&&!1!==f.showBackdrop&&1===v.length&&v[0].id===f.id&&(G(!1),document.body.classList.remove(p)),o.presented=!1;try{o.el.style.setProperty("pointer-events","none"),o.willDismiss.emit({data:e,role:t}),null===(c=o.willDismissShorthand)||void 0===c||c.emit({data:e,role:t});const n=u(o),l=o.leaveAnimation?o.leaveAnimation:d.get(i,"ios"===n?a:s);t!==H&&await U(o,l,o.el,r),o.didDismiss.emit({data:e,role:t}),null===(m=o.didDismissShorthand)||void 0===m||m.emit({data:e,role:t}),(g.get(o)||[]).forEach((n=>n.destroy())),g.delete(o),o.el.classList.add("overlay-hidden"),o.el.style.removeProperty("pointer-events"),void 0!==o.el.lastFocus&&(o.el.lastFocus=void 0)}catch(n){l(`[${o.el.tagName.toLowerCase()}] - `,n)}return o.el.remove(),!0},q=n=>n.querySelector("ion-app")||n.body,U=async(n,o,e,t)=>{e.classList.remove("overlay-hidden");const i=o(n.el,t);n.animated&&d.getBoolean("animated",!0)||i.duration(0),n.keyboardClose&&i.beforeAddWrite((()=>{const n=e.ownerDocument.activeElement;(null==n?void 0:n.matches("input,ion-input, ion-textarea"))&&n.blur()}));const a=g.get(n)||[];return g.set(n,[...a,i]),await i.play(),!0},V=(n,o)=>{let e;const t=new Promise((n=>e=n));return Y(n,o,(n=>{e(n.detail)})),t},Y=(n,o,e)=>{const a=t=>{i(n,o,a),e(t)};t(n,o,a)},z=n=>"cancel"===n||n===_,R=n=>n(),W=(n,o)=>{if("function"==typeof n)return d.get("_zoneGate",R)((()=>{try{return n(o)}catch(n){throw n}}))},_="backdrop",H="gesture",J=39,K=n=>{let o,e=!1;const t=m(),i=(i=!1)=>{if(o&&!i)return{delegate:o,inline:e};const{el:a,hasController:s,delegate:r}=n;return e=null!==a.parentNode&&!s,o=e?r||t:r,{inline:e,delegate:o}};return{attachViewToDom:async o=>{const{delegate:e}=i(!0);if(e)return await e.attachViewToDom(n.el,o);const{hasController:t}=n;if(t&&void 0!==o)throw new Error("framework delegate is missing");return null},removeViewFromDom:()=>{const{delegate:o}=i();o&&void 0!==n.el&&o.removeViewFromDom(n.el.parentElement,n.el)}}},Q=()=>{let n;const o=()=>{n&&(n(),n=void 0)};return{addClickListener:(e,t)=>{o();const i=void 0!==t?document.getElementById(t):null;i?n=((n,o)=>{const e=()=>{o.present()};return n.addEventListener("click",e),()=>{n.removeEventListener("click",e)}})(i,e):c(`[${e.tagName.toLowerCase()}] - A trigger element with the ID "${t}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,e)},removeClickListener:o}},X="ion-disable-focus-trap";export{_ as B,X as F,H as G,J as O,T as a,k as b,C as c,K as d,Q as e,L as f,$ as g,V as h,z as i,B as j,I as k,x as l,j as m,f as n,E as o,A as p,h as q,W as s,N as t}