@ionic/core 7.3.2-dev.11693254222.1822966d → 7.3.2-dev.11693262117.17edbf6d

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 (124) hide show
  1. package/components/action-sheet.js +8 -17
  2. package/components/alert.js +8 -17
  3. package/components/framework-delegate.js +2 -5
  4. package/components/ion-loading.js +8 -17
  5. package/components/ion-menu.js +1 -1
  6. package/components/ion-modal.js +12 -33
  7. package/components/ion-picker.js +8 -17
  8. package/components/ion-toast.js +8 -17
  9. package/components/overlays.js +22 -1
  10. package/components/popover.js +9 -30
  11. package/dist/cjs/{framework-delegate-91be3b84.js → framework-delegate-e8174951.js} +2 -5
  12. package/dist/cjs/index.cjs.js +2 -2
  13. package/dist/cjs/ion-action-sheet.cjs.entry.js +9 -18
  14. package/dist/cjs/ion-alert.cjs.entry.js +9 -18
  15. package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
  16. package/dist/cjs/ion-datetime_3.cjs.entry.js +9 -18
  17. package/dist/cjs/ion-loading.cjs.entry.js +9 -18
  18. package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
  19. package/dist/cjs/ion-modal.cjs.entry.js +13 -34
  20. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  21. package/dist/cjs/ion-popover.cjs.entry.js +10 -31
  22. package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
  23. package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
  24. package/dist/cjs/ion-toast.cjs.entry.js +9 -18
  25. package/dist/cjs/{overlays-cf7fa4cf.js → overlays-2b9fa92e.js} +23 -1
  26. package/dist/collection/components/action-sheet/action-sheet.js +8 -17
  27. package/dist/collection/components/alert/alert.js +8 -17
  28. package/dist/collection/components/loading/loading.js +8 -17
  29. package/dist/collection/components/modal/modal.js +12 -33
  30. package/dist/collection/components/picker/picker.js +8 -17
  31. package/dist/collection/components/popover/popover.js +9 -30
  32. package/dist/collection/components/toast/toast.js +8 -17
  33. package/dist/collection/utils/framework-delegate.js +2 -5
  34. package/dist/collection/utils/overlays.js +21 -0
  35. package/dist/docs.json +1 -1
  36. package/dist/esm/{framework-delegate-43758c88.js → framework-delegate-2b76c681.js} +2 -5
  37. package/dist/esm/index.js +2 -2
  38. package/dist/esm/ion-action-sheet.entry.js +9 -18
  39. package/dist/esm/ion-alert.entry.js +9 -18
  40. package/dist/esm/ion-app_8.entry.js +1 -1
  41. package/dist/esm/ion-datetime_3.entry.js +9 -18
  42. package/dist/esm/ion-loading.entry.js +9 -18
  43. package/dist/esm/ion-menu_3.entry.js +2 -2
  44. package/dist/esm/ion-modal.entry.js +13 -34
  45. package/dist/esm/ion-nav_2.entry.js +1 -1
  46. package/dist/esm/ion-popover.entry.js +10 -31
  47. package/dist/esm/ion-select_3.entry.js +2 -2
  48. package/dist/esm/ion-tab_2.entry.js +1 -1
  49. package/dist/esm/ion-toast.entry.js +9 -18
  50. package/dist/esm/{overlays-236d01c6.js → overlays-66222f79.js} +23 -2
  51. package/dist/esm-es5/framework-delegate-2b76c681.js +4 -0
  52. package/dist/esm-es5/index.js +1 -1
  53. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  54. package/dist/esm-es5/ion-alert.entry.js +1 -1
  55. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  56. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  57. package/dist/esm-es5/ion-loading.entry.js +1 -1
  58. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  59. package/dist/esm-es5/ion-modal.entry.js +1 -1
  60. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  61. package/dist/esm-es5/ion-popover.entry.js +1 -1
  62. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  63. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  64. package/dist/esm-es5/ion-toast.entry.js +1 -1
  65. package/dist/esm-es5/{overlays-236d01c6.js → overlays-66222f79.js} +1 -1
  66. package/dist/ionic/index.esm.js +1 -1
  67. package/dist/ionic/ionic.esm.js +1 -1
  68. package/dist/ionic/{p-04515b10.system.entry.js → p-0494a5b7.system.entry.js} +1 -1
  69. package/dist/ionic/p-16fd72f2.entry.js +4 -0
  70. package/dist/ionic/p-1c9e3bc7.entry.js +4 -0
  71. package/dist/ionic/{p-4852bb39.entry.js → p-20087c90.entry.js} +1 -1
  72. package/dist/ionic/{p-5c0754cd.entry.js → p-229df0d8.entry.js} +1 -1
  73. package/dist/ionic/p-2a51c81c.entry.js +4 -0
  74. package/dist/ionic/p-2a649b3e.system.entry.js +4 -0
  75. package/dist/ionic/p-3ef9e271.system.entry.js +4 -0
  76. package/dist/ionic/{p-ed290b4a.entry.js → p-5c96dc4e.entry.js} +1 -1
  77. package/dist/ionic/{p-f2c1459b.system.entry.js → p-6b9bf14c.system.entry.js} +1 -1
  78. package/dist/ionic/p-6d484719.system.entry.js +4 -0
  79. package/dist/ionic/p-70d137a0.js +4 -0
  80. package/dist/ionic/p-721933ff.system.js +1 -1
  81. package/dist/ionic/{p-e484ae56.entry.js → p-7776d062.entry.js} +1 -1
  82. package/dist/ionic/p-7ac9bdfa.system.entry.js +4 -0
  83. package/dist/ionic/{p-f1bf45b2.system.entry.js → p-8074bdd7.system.entry.js} +1 -1
  84. package/dist/ionic/p-8d53d5a5.entry.js +4 -0
  85. package/dist/ionic/{p-33dc95e4.system.js → p-8d9475b5.system.js} +1 -1
  86. package/dist/ionic/{p-fb16e75c.entry.js → p-9888a5a7.entry.js} +1 -1
  87. package/dist/ionic/{p-5f5d78da.system.js → p-a0ffdd91.system.js} +1 -1
  88. package/dist/ionic/p-a133c215.system.entry.js +4 -0
  89. package/dist/ionic/{p-50e474b3.system.entry.js → p-b2098e96.system.entry.js} +1 -1
  90. package/dist/ionic/p-b34c1ae1.js +4 -0
  91. package/dist/ionic/p-c0b4ca5c.system.entry.js +4 -0
  92. package/dist/ionic/p-cf768a4f.entry.js +4 -0
  93. package/dist/ionic/{p-ff0f2ef4.system.entry.js → p-d1356034.system.entry.js} +1 -1
  94. package/dist/ionic/p-ddffbfa9.entry.js +4 -0
  95. package/dist/ionic/p-e2e2c2b0.entry.js +4 -0
  96. package/dist/ionic/p-ebb442c4.system.entry.js +4 -0
  97. package/dist/ionic/{p-c275a599.system.js → p-f8e4da48.system.js} +1 -1
  98. package/dist/types/components/action-sheet/action-sheet.d.ts +1 -1
  99. package/dist/types/components/alert/alert.d.ts +1 -1
  100. package/dist/types/components/loading/loading.d.ts +1 -1
  101. package/dist/types/components/modal/modal.d.ts +1 -1
  102. package/dist/types/components/picker/picker.d.ts +1 -1
  103. package/dist/types/components/popover/popover.d.ts +1 -1
  104. package/dist/types/components/toast/toast.d.ts +1 -1
  105. package/dist/types/utils/overlays.d.ts +9 -0
  106. package/hydrate/index.js +77 -146
  107. package/package.json +1 -1
  108. package/dist/esm-es5/framework-delegate-43758c88.js +0 -4
  109. package/dist/ionic/p-13df6e84.system.entry.js +0 -4
  110. package/dist/ionic/p-2bdc6097.entry.js +0 -4
  111. package/dist/ionic/p-2d37d114.system.entry.js +0 -4
  112. package/dist/ionic/p-3c14c5b9.system.entry.js +0 -4
  113. package/dist/ionic/p-4adb3257.entry.js +0 -4
  114. package/dist/ionic/p-647c433f.entry.js +0 -4
  115. package/dist/ionic/p-77465c7a.entry.js +0 -4
  116. package/dist/ionic/p-870fee8d.system.entry.js +0 -4
  117. package/dist/ionic/p-8d1ef5d0.entry.js +0 -4
  118. package/dist/ionic/p-ad5a562b.system.entry.js +0 -4
  119. package/dist/ionic/p-d3602489.entry.js +0 -4
  120. package/dist/ionic/p-e015fbd9.system.entry.js +0 -4
  121. package/dist/ionic/p-e30f020d.entry.js +0 -4
  122. package/dist/ionic/p-f2743457.js +0 -4
  123. package/dist/ionic/p-f4bbbc33.js +0 -4
  124. package/dist/ionic/p-f94cad00.system.entry.js +0 -4
package/hydrate/index.js CHANGED
@@ -8004,7 +8004,6 @@ const CoreDelegate = () => {
8004
8004
  const attachViewToDom = async (parentElement, userComponent, userComponentProps = {}, cssClasses = []) => {
8005
8005
  var _a, _b;
8006
8006
  BaseComponent = parentElement;
8007
- let ChildComponent;
8008
8007
  /**
8009
8008
  * If passing in a component via the `component` props
8010
8009
  * we need to append it inside of our overlay component.
@@ -8031,7 +8030,6 @@ const CoreDelegate = () => {
8031
8030
  * inside of the overlay component.
8032
8031
  */
8033
8032
  BaseComponent.appendChild(el);
8034
- ChildComponent = el;
8035
8033
  await new Promise((resolve) => componentOnReady(el, resolve));
8036
8034
  }
8037
8035
  else if (BaseComponent.children.length > 0 &&
@@ -8040,7 +8038,7 @@ const CoreDelegate = () => {
8040
8038
  * The delegate host wrapper el is only needed for modals and popovers
8041
8039
  * because they allow the dev to provide custom content to the overlay.
8042
8040
  */
8043
- const root = (ChildComponent = BaseComponent.children[0]);
8041
+ const root = BaseComponent.children[0];
8044
8042
  if (!root.classList.contains('ion-delegate-host')) {
8045
8043
  /**
8046
8044
  * If the root element is not a delegate host, it means
@@ -8055,7 +8053,6 @@ const CoreDelegate = () => {
8055
8053
  el.append(...BaseComponent.children);
8056
8054
  // Append the new parent element to the original parent element.
8057
8055
  BaseComponent.appendChild(el);
8058
- ChildComponent = el;
8059
8056
  }
8060
8057
  }
8061
8058
  /**
@@ -8071,7 +8068,7 @@ const CoreDelegate = () => {
8071
8068
  Reference = document.createComment('ionic teleport');
8072
8069
  BaseComponent.parentNode.insertBefore(Reference, BaseComponent);
8073
8070
  app.appendChild(BaseComponent);
8074
- return ChildComponent;
8071
+ return BaseComponent;
8075
8072
  };
8076
8073
  const removeViewFromDom = () => {
8077
8074
  /**
@@ -8705,6 +8702,27 @@ const createDelegateController = (ref) => {
8705
8702
  removeViewFromDom,
8706
8703
  };
8707
8704
  };
8705
+ /**
8706
+ * Creates a lock controller.
8707
+ *
8708
+ * This function locks transitions.
8709
+ * The unlock() function within it calls resolve on this function, unlocking the transitions.
8710
+ */
8711
+ const createLockController = () => {
8712
+ let waitPromise;
8713
+ const lock = async () => {
8714
+ const p = waitPromise;
8715
+ let resolve;
8716
+ waitPromise = new Promise((r) => (resolve = r));
8717
+ if (p !== undefined) {
8718
+ await p;
8719
+ }
8720
+ return resolve;
8721
+ };
8722
+ return {
8723
+ lock,
8724
+ };
8725
+ };
8708
8726
  /**
8709
8727
  * Constructs a trigger interaction for an overlay.
8710
8728
  * Presents an overlay when the trigger is clicked.
@@ -9876,6 +9894,7 @@ class ActionSheet {
9876
9894
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
9877
9895
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
9878
9896
  this.delegateController = createDelegateController(this);
9897
+ this.lockController = createLockController();
9879
9898
  this.triggerController = createTriggerController();
9880
9899
  this.presented = false;
9881
9900
  this.onBackdropTap = () => {
@@ -9923,21 +9942,10 @@ class ActionSheet {
9923
9942
  * Present the action sheet overlay after it has been created.
9924
9943
  */
9925
9944
  async present() {
9926
- /**
9927
- * When using an inline action sheet
9928
- * and dismissing a action sheet it is possible to
9929
- * quickly present the action sheet while it is
9930
- * dismissing. We need to await any current
9931
- * transition to allow the dismiss to finish
9932
- * before presenting again.
9933
- */
9934
- if (this.currentTransition !== undefined) {
9935
- await this.currentTransition;
9936
- }
9945
+ const unlock = await this.lockController.lock();
9937
9946
  await this.delegateController.attachViewToDom();
9938
- this.currentTransition = present(this, 'actionSheetEnter', iosEnterAnimation$6, mdEnterAnimation$5);
9939
- await this.currentTransition;
9940
- this.currentTransition = undefined;
9947
+ await present(this, 'actionSheetEnter', iosEnterAnimation$6, mdEnterAnimation$5);
9948
+ unlock();
9941
9949
  }
9942
9950
  /**
9943
9951
  * Dismiss the action sheet overlay after it has been presented.
@@ -9949,11 +9957,12 @@ class ActionSheet {
9949
9957
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
9950
9958
  */
9951
9959
  async dismiss(data, role) {
9952
- this.currentTransition = dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$6, mdLeaveAnimation$5);
9953
- const dismissed = await this.currentTransition;
9960
+ const unlock = await this.lockController.lock();
9961
+ const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$6, mdLeaveAnimation$5);
9954
9962
  if (dismissed) {
9955
9963
  this.delegateController.removeViewFromDom();
9956
9964
  }
9965
+ unlock();
9957
9966
  return dismissed;
9958
9967
  }
9959
9968
  /**
@@ -10363,6 +10372,7 @@ class Alert {
10363
10372
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
10364
10373
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
10365
10374
  this.delegateController = createDelegateController(this);
10375
+ this.lockController = createLockController();
10366
10376
  this.triggerController = createTriggerController();
10367
10377
  this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
10368
10378
  this.processedInputs = [];
@@ -10529,21 +10539,10 @@ class Alert {
10529
10539
  * Present the alert overlay after it has been created.
10530
10540
  */
10531
10541
  async present() {
10532
- /**
10533
- * When using an inline alert
10534
- * and dismissing an alert it is possible to
10535
- * quickly present the alert while it is
10536
- * dismissing. We need to await any current
10537
- * transition to allow the dismiss to finish
10538
- * before presenting again.
10539
- */
10540
- if (this.currentTransition !== undefined) {
10541
- await this.currentTransition;
10542
- }
10542
+ const unlock = await this.lockController.lock();
10543
10543
  await this.delegateController.attachViewToDom();
10544
- this.currentTransition = present(this, 'alertEnter', iosEnterAnimation$5, mdEnterAnimation$4);
10545
- await this.currentTransition;
10546
- this.currentTransition = undefined;
10544
+ await present(this, 'alertEnter', iosEnterAnimation$5, mdEnterAnimation$4);
10545
+ unlock();
10547
10546
  }
10548
10547
  /**
10549
10548
  * Dismiss the alert overlay after it has been presented.
@@ -10555,11 +10554,12 @@ class Alert {
10555
10554
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
10556
10555
  */
10557
10556
  async dismiss(data, role) {
10558
- this.currentTransition = dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$5, mdLeaveAnimation$4);
10559
- const dismissed = await this.currentTransition;
10557
+ const unlock = await this.lockController.lock();
10558
+ const dismissed = await dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$5, mdLeaveAnimation$4);
10560
10559
  if (dismissed) {
10561
10560
  this.delegateController.removeViewFromDom();
10562
10561
  }
10562
+ unlock();
10563
10563
  return dismissed;
10564
10564
  }
10565
10565
  /**
@@ -19797,6 +19797,7 @@ class Loading {
19797
19797
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
19798
19798
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
19799
19799
  this.delegateController = createDelegateController(this);
19800
+ this.lockController = createLockController();
19800
19801
  this.triggerController = createTriggerController();
19801
19802
  this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
19802
19803
  this.presented = false;
@@ -19862,24 +19863,13 @@ class Loading {
19862
19863
  * Present the loading overlay after it has been created.
19863
19864
  */
19864
19865
  async present() {
19865
- /**
19866
- * When using an inline loading indicator
19867
- * and dismissing a loading indicator it is possible to
19868
- * quickly present the loading indicator while it is
19869
- * dismissing. We need to await any current
19870
- * transition to allow the dismiss to finish
19871
- * before presenting again.
19872
- */
19873
- if (this.currentTransition !== undefined) {
19874
- await this.currentTransition;
19875
- }
19866
+ const unlock = await this.lockController.lock();
19876
19867
  await this.delegateController.attachViewToDom();
19877
- this.currentTransition = present(this, 'loadingEnter', iosEnterAnimation$4, mdEnterAnimation$3);
19878
- await this.currentTransition;
19868
+ await present(this, 'loadingEnter', iosEnterAnimation$4, mdEnterAnimation$3);
19879
19869
  if (this.duration > 0) {
19880
19870
  this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
19881
19871
  }
19882
- this.currentTransition = undefined;
19872
+ unlock();
19883
19873
  }
19884
19874
  /**
19885
19875
  * Dismiss the loading overlay after it has been presented.
@@ -19891,14 +19881,15 @@ class Loading {
19891
19881
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
19892
19882
  */
19893
19883
  async dismiss(data, role) {
19884
+ const unlock = await this.lockController.lock();
19894
19885
  if (this.durationTimeout) {
19895
19886
  clearTimeout(this.durationTimeout);
19896
19887
  }
19897
- this.currentTransition = dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation$4, mdLeaveAnimation$3);
19898
- const dismissed = await this.currentTransition;
19888
+ const dismissed = await dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation$4, mdLeaveAnimation$3);
19899
19889
  if (dismissed) {
19900
19890
  this.delegateController.removeViewFromDom();
19901
19891
  }
19892
+ unlock();
19902
19893
  return dismissed;
19903
19894
  }
19904
19895
  /**
@@ -22399,6 +22390,7 @@ class Modal {
22399
22390
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
22400
22391
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
22401
22392
  this.ionMount = createEvent(this, "ionMount", 7);
22393
+ this.lockController = createLockController();
22402
22394
  this.triggerController = createTriggerController();
22403
22395
  this.coreDelegate = CoreDelegate();
22404
22396
  this.isSheetModal = false;
@@ -22566,18 +22558,8 @@ class Modal {
22566
22558
  if (this.presented) {
22567
22559
  return;
22568
22560
  }
22561
+ const unlock = await this.lockController.lock();
22569
22562
  const { presentingElement, el } = this;
22570
- /**
22571
- * When using an inline modal
22572
- * and dismissing a modal it is possible to
22573
- * quickly present the modal while it is
22574
- * dismissing. We need to await any current
22575
- * transition to allow the dismiss to finish
22576
- * before presenting again.
22577
- */
22578
- if (this.currentTransition !== undefined) {
22579
- await this.currentTransition;
22580
- }
22581
22563
  /**
22582
22564
  * If the modal is presented multiple times (inline modals), we
22583
22565
  * need to reset the current breakpoint to the initial breakpoint.
@@ -22609,11 +22591,6 @@ class Modal {
22609
22591
  await waitForMount();
22610
22592
  }
22611
22593
  writeTask(() => this.el.classList.add('show-modal'));
22612
- this.currentTransition = present(this, 'modalEnter', iosEnterAnimation$3, mdEnterAnimation$2, {
22613
- presentingEl: presentingElement,
22614
- currentBreakpoint: this.initialBreakpoint,
22615
- backdropBreakpoint: this.backdropBreakpoint,
22616
- });
22617
22594
  /* tslint:disable-next-line */
22618
22595
  if (typeof window !== 'undefined') {
22619
22596
  /**
@@ -22656,14 +22633,18 @@ class Modal {
22656
22633
  this.statusBarStyle = await StatusBar.getStyle();
22657
22634
  setCardStatusBarDark();
22658
22635
  }
22659
- await this.currentTransition;
22636
+ await present(this, 'modalEnter', iosEnterAnimation$3, mdEnterAnimation$2, {
22637
+ presentingEl: presentingElement,
22638
+ currentBreakpoint: this.initialBreakpoint,
22639
+ backdropBreakpoint: this.backdropBreakpoint,
22640
+ });
22660
22641
  if (this.isSheetModal) {
22661
22642
  this.initSheetGesture();
22662
22643
  }
22663
22644
  else if (hasCardModal) {
22664
22645
  this.initSwipeToClose();
22665
22646
  }
22666
- this.currentTransition = undefined;
22647
+ unlock();
22667
22648
  }
22668
22649
  initSwipeToClose() {
22669
22650
  var _a;
@@ -22753,6 +22734,7 @@ class Modal {
22753
22734
  if (this.gestureAnimationDismissing && role !== GESTURE) {
22754
22735
  return false;
22755
22736
  }
22737
+ const unlock = await this.lockController.lock();
22756
22738
  /**
22757
22739
  * If a canDismiss handler is responsible
22758
22740
  * for calling the dismiss method, we should
@@ -22776,24 +22758,12 @@ class Modal {
22776
22758
  window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
22777
22759
  this.keyboardOpenCallback = undefined;
22778
22760
  }
22779
- /**
22780
- * When using an inline modal
22781
- * and presenting a modal it is possible to
22782
- * quickly dismiss the modal while it is
22783
- * presenting. We need to await any current
22784
- * transition to allow the present to finish
22785
- * before dismissing again.
22786
- */
22787
- if (this.currentTransition !== undefined) {
22788
- await this.currentTransition;
22789
- }
22790
22761
  const enteringAnimation = activeAnimations.get(this) || [];
22791
- this.currentTransition = dismiss(this, data, role, 'modalLeave', iosLeaveAnimation$3, mdLeaveAnimation$2, {
22762
+ const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation$3, mdLeaveAnimation$2, {
22792
22763
  presentingEl: presentingElement,
22793
22764
  currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
22794
22765
  backdropBreakpoint: this.backdropBreakpoint,
22795
22766
  });
22796
- const dismissed = await this.currentTransition;
22797
22767
  if (dismissed) {
22798
22768
  const { delegate } = this.getDelegate();
22799
22769
  await detachComponent(delegate, this.usersElement);
@@ -22807,8 +22777,8 @@ class Modal {
22807
22777
  enteringAnimation.forEach((ani) => ani.destroy());
22808
22778
  }
22809
22779
  this.currentBreakpoint = undefined;
22810
- this.currentTransition = undefined;
22811
22780
  this.animation = undefined;
22781
+ unlock();
22812
22782
  return dismissed;
22813
22783
  }
22814
22784
  /**
@@ -24027,6 +23997,7 @@ class Picker {
24027
23997
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
24028
23998
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
24029
23999
  this.delegateController = createDelegateController(this);
24000
+ this.lockController = createLockController();
24030
24001
  this.triggerController = createTriggerController();
24031
24002
  this.onBackdropTap = () => {
24032
24003
  this.dismiss(undefined, BACKDROP);
@@ -24093,24 +24064,13 @@ class Picker {
24093
24064
  * Present the picker overlay after it has been created.
24094
24065
  */
24095
24066
  async present() {
24096
- /**
24097
- * When using an inline picker
24098
- * and dismissing an picker it is possible to
24099
- * quickly present the picker while it is
24100
- * dismissing. We need to await any current
24101
- * transition to allow the dismiss to finish
24102
- * before presenting again.
24103
- */
24104
- if (this.currentTransition !== undefined) {
24105
- await this.currentTransition;
24106
- }
24067
+ const unlock = await this.lockController.lock();
24107
24068
  await this.delegateController.attachViewToDom();
24108
- this.currentTransition = present(this, 'pickerEnter', iosEnterAnimation$2, iosEnterAnimation$2, undefined);
24109
- await this.currentTransition;
24110
- this.currentTransition = undefined;
24069
+ await present(this, 'pickerEnter', iosEnterAnimation$2, iosEnterAnimation$2, undefined);
24111
24070
  if (this.duration > 0) {
24112
24071
  this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
24113
24072
  }
24073
+ unlock();
24114
24074
  }
24115
24075
  /**
24116
24076
  * Dismiss the picker overlay after it has been presented.
@@ -24122,14 +24082,15 @@ class Picker {
24122
24082
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
24123
24083
  */
24124
24084
  async dismiss(data, role) {
24085
+ const unlock = await this.lockController.lock();
24125
24086
  if (this.durationTimeout) {
24126
24087
  clearTimeout(this.durationTimeout);
24127
24088
  }
24128
- this.currentTransition = dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation$2, iosLeaveAnimation$2);
24129
- const dismissed = await this.currentTransition;
24089
+ const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation$2, iosLeaveAnimation$2);
24130
24090
  if (dismissed) {
24131
24091
  this.delegateController.removeViewFromDom();
24132
24092
  }
24093
+ unlock();
24133
24094
  return dismissed;
24134
24095
  }
24135
24096
  /**
@@ -26450,6 +26411,7 @@ class Popover {
26450
26411
  this.ionMount = createEvent(this, "ionMount", 7);
26451
26412
  this.parentPopover = null;
26452
26413
  this.coreDelegate = CoreDelegate();
26414
+ this.lockController = createLockController();
26453
26415
  this.inline = false;
26454
26416
  this.focusDescendantOnPresent = false;
26455
26417
  this.onBackdropTap = () => {
@@ -26626,25 +26588,15 @@ class Popover {
26626
26588
  if (this.presented) {
26627
26589
  return;
26628
26590
  }
26629
- /**
26630
- * When using an inline popover
26631
- * and dismissing a popover it is possible to
26632
- * quickly present the popover while it is
26633
- * dismissing. We need to await any current
26634
- * transition to allow the dismiss to finish
26635
- * before presenting again.
26636
- */
26637
- if (this.currentTransition !== undefined) {
26638
- await this.currentTransition;
26639
- }
26591
+ const unlock = await this.lockController.lock();
26640
26592
  const { el } = this;
26641
26593
  const { inline, delegate } = this.getDelegate(true);
26642
- this.ionMount.emit();
26643
26594
  this.usersElement = await attachComponent(delegate, el, this.component, ['popover-viewport'], this.componentProps, inline);
26644
26595
  if (!this.keyboardEvents) {
26645
26596
  this.configureKeyboardInteraction();
26646
26597
  }
26647
26598
  this.configureDismissInteraction();
26599
+ this.ionMount.emit();
26648
26600
  /**
26649
26601
  * When using the lazy loaded build of Stencil, we need to wait
26650
26602
  * for every Stencil component instance to be ready before presenting
@@ -26667,7 +26619,7 @@ class Popover {
26667
26619
  else if (!this.keepContentsMounted) {
26668
26620
  await waitForMount();
26669
26621
  }
26670
- this.currentTransition = present(this, 'popoverEnter', iosEnterAnimation$1, mdEnterAnimation$1, {
26622
+ await present(this, 'popoverEnter', iosEnterAnimation$1, mdEnterAnimation$1, {
26671
26623
  event: event || this.event,
26672
26624
  size: this.size,
26673
26625
  trigger: this.triggerEl,
@@ -26675,8 +26627,6 @@ class Popover {
26675
26627
  side: this.side,
26676
26628
  align: this.alignment,
26677
26629
  });
26678
- await this.currentTransition;
26679
- this.currentTransition = undefined;
26680
26630
  /**
26681
26631
  * If popover is nested and was
26682
26632
  * presented using the "Right" arrow key,
@@ -26686,6 +26636,7 @@ class Popover {
26686
26636
  if (this.focusDescendantOnPresent) {
26687
26637
  focusFirstDescendant(this.el, this.el);
26688
26638
  }
26639
+ unlock();
26689
26640
  }
26690
26641
  /**
26691
26642
  * Dismiss the popover overlay after it has been presented.
@@ -26696,23 +26647,12 @@ class Popover {
26696
26647
  * a parent popover if this popover is nested. Defaults to `true`.
26697
26648
  */
26698
26649
  async dismiss(data, role, dismissParentPopover = true) {
26699
- /**
26700
- * When using an inline popover
26701
- * and presenting a popover it is possible to
26702
- * quickly dismiss the popover while it is
26703
- * presenting. We need to await any current
26704
- * transition to allow the present to finish
26705
- * before dismissing again.
26706
- */
26707
- if (this.currentTransition !== undefined) {
26708
- await this.currentTransition;
26709
- }
26650
+ const unlock = await this.lockController.lock();
26710
26651
  const { destroyKeyboardInteraction, destroyDismissInteraction } = this;
26711
26652
  if (dismissParentPopover && this.parentPopover) {
26712
26653
  this.parentPopover.dismiss(data, role, dismissParentPopover);
26713
26654
  }
26714
- this.currentTransition = dismiss(this, data, role, 'popoverLeave', iosLeaveAnimation$1, mdLeaveAnimation$1, this.event);
26715
- const shouldDismiss = await this.currentTransition;
26655
+ const shouldDismiss = await dismiss(this, data, role, 'popoverLeave', iosLeaveAnimation$1, mdLeaveAnimation$1, this.event);
26716
26656
  if (shouldDismiss) {
26717
26657
  if (destroyKeyboardInteraction) {
26718
26658
  destroyKeyboardInteraction();
@@ -26730,7 +26670,7 @@ class Popover {
26730
26670
  const { delegate } = this.getDelegate();
26731
26671
  await detachComponent(delegate, this.usersElement);
26732
26672
  }
26733
- this.currentTransition = undefined;
26673
+ unlock();
26734
26674
  return shouldDismiss;
26735
26675
  }
26736
26676
  /**
@@ -33474,6 +33414,7 @@ class Toast {
33474
33414
  this.willDismissShorthand = createEvent(this, "willDismiss", 7);
33475
33415
  this.didDismissShorthand = createEvent(this, "didDismiss", 7);
33476
33416
  this.delegateController = createDelegateController(this);
33417
+ this.lockController = createLockController();
33477
33418
  this.triggerController = createTriggerController();
33478
33419
  this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
33479
33420
  this.presented = false;
@@ -33543,30 +33484,19 @@ class Toast {
33543
33484
  * Present the toast overlay after it has been created.
33544
33485
  */
33545
33486
  async present() {
33546
- /**
33547
- * When using an inline toast
33548
- * and dismissing a toast it is possible to
33549
- * quickly present the toast while it is
33550
- * dismissing. We need to await any current
33551
- * transition to allow the dismiss to finish
33552
- * before presenting again.
33553
- */
33554
- if (this.currentTransition !== undefined) {
33555
- await this.currentTransition;
33556
- }
33487
+ const unlock = await this.lockController.lock();
33557
33488
  await this.delegateController.attachViewToDom();
33558
- this.currentTransition = present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, this.position);
33559
- await this.currentTransition;
33489
+ await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, this.position);
33560
33490
  /**
33561
33491
  * Content is revealed to screen readers after
33562
33492
  * the transition to avoid jank since this
33563
33493
  * state updates will cause a re-render.
33564
33494
  */
33565
33495
  this.revealContentToScreenReader = true;
33566
- this.currentTransition = undefined;
33567
33496
  if (this.duration > 0) {
33568
33497
  this.durationTimeout = setTimeout(() => this.dismiss(undefined, 'timeout'), this.duration);
33569
33498
  }
33499
+ unlock();
33570
33500
  }
33571
33501
  /**
33572
33502
  * Dismiss the toast overlay after it has been presented.
@@ -33578,15 +33508,16 @@ class Toast {
33578
33508
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
33579
33509
  */
33580
33510
  async dismiss(data, role) {
33511
+ const unlock = await this.lockController.lock();
33581
33512
  if (this.durationTimeout) {
33582
33513
  clearTimeout(this.durationTimeout);
33583
33514
  }
33584
- this.currentTransition = dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, this.position);
33585
- const dismissed = await this.currentTransition;
33515
+ const dismissed = await dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, this.position);
33586
33516
  if (dismissed) {
33587
33517
  this.delegateController.removeViewFromDom();
33588
33518
  this.revealContentToScreenReader = false;
33589
33519
  }
33520
+ unlock();
33590
33521
  return dismissed;
33591
33522
  }
33592
33523
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "7.3.2-dev.11693254222.1822966d",
3
+ "version": "7.3.2-dev.11693262117.17edbf6d",
4
4
  "description": "Base components for Ionic",
5
5
  "keywords": [
6
6
  "ionic",
@@ -1,4 +0,0 @@
1
- import{__awaiter,__generator}from"tslib";
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */import{c as componentOnReady}from"./helpers-3379ba19.js";var attachComponent=function(e,n,t,r,o,i){return __awaiter(void 0,void 0,void 0,(function(){var a,c;return __generator(this,(function(s){switch(s.label){case 0:if(e){return[2,e.attachViewToDom(n,t,o,r)]}if(!i&&typeof t!=="string"&&!(t instanceof HTMLElement)){throw new Error("framework delegate is missing")}c=typeof t==="string"?(a=n.ownerDocument)===null||a===void 0?void 0:a.createElement(t):t;if(r){r.forEach((function(e){return c.classList.add(e)}))}if(o){Object.assign(c,o)}n.appendChild(c);return[4,new Promise((function(e){return componentOnReady(c,e)}))];case 1:s.sent();return[2,c]}}))}))};var detachComponent=function(e,n){if(n){if(e){var t=n.parentElement;return e.removeViewFromDom(t,n)}n.remove()}return Promise.resolve()};var CoreDelegate=function(){var e;var n;var t=function(t,r,o,i){if(o===void 0){o={}}if(i===void 0){i=[]}return __awaiter(void 0,void 0,void 0,(function(){var a,c,s,d,u,l,m;return __generator(this,(function(f){switch(f.label){case 0:e=t;if(!r)return[3,2];d=typeof r==="string"?(a=e.ownerDocument)===null||a===void 0?void 0:a.createElement(r):r;i.forEach((function(e){return d.classList.add(e)}));Object.assign(d,o);e.appendChild(d);s=d;return[4,new Promise((function(e){return componentOnReady(d,e)}))];case 1:f.sent();return[3,3];case 2:if(e.children.length>0&&(e.tagName==="ION-MODAL"||e.tagName==="ION-POPOVER")){u=s=e.children[0];if(!u.classList.contains("ion-delegate-host")){l=(c=e.ownerDocument)===null||c===void 0?void 0:c.createElement("div");l.classList.add("ion-delegate-host");i.forEach((function(e){return l.classList.add(e)}));l.append.apply(l,e.children);e.appendChild(l);s=l}}f.label=3;case 3:m=document.querySelector("ion-app")||document.body;n=document.createComment("ionic teleport");e.parentNode.insertBefore(n,e);m.appendChild(e);return[2,s]}}))}))};var r=function(){if(e&&n){n.parentNode.insertBefore(e,n);n.remove()}return Promise.resolve()};return{attachViewToDom:t,removeViewFromDom:r}};export{CoreDelegate as C,attachComponent as a,detachComponent as d};
@@ -1,4 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,i){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i["throw"](t))}catch(t){o(t)}}function l(t){t.done?r(t.value):n(t.value).then(a,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(i=1,n&&(o=s[0]&2?n["return"]:s[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;if(n=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];n=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */System.register(["./p-5b553dc0.system.js","./p-2b89ea1b.system.js","./p-8ba724fa.system.js","./p-815c2fba.system.js","./p-c275a599.system.js","./p-44bc8b45.system.js","./p-7b16490a.system.js","./p-6b2641f6.system.js","./p-14d7b7e2.system.js","./p-ccdcb022.system.js","./p-0e94957a.system.js","./p-fa8d4788.system.js","./p-9e852ff1.system.js","./p-33dc95e4.system.js","./p-8c15eda7.system.js","./p-479cdbf8.system.js"],(function(t){"use strict";var e,r,i,n,o,a,s,l,d,c,p,u,h,b,f,g,m,x,v,k,w,y,z,C;return{setters:[function(t){e=t.r;r=t.d;i=t.i;n=t.h;o=t.H;a=t.f},function(t){s=t.E;l=t.a},function(t){d=t.c},function(t){c=t.r},function(t){p=t.d;u=t.e;h=t.B;b=t.i;f=t.j;g=t.k;m=t.f;x=t.g;v=t.h;k=t.s},function(t){w=t.g},function(t){y=t.c;z=t.b},function(t){C=t.c},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var j=function(t){var e=C();var r=C();var i=C();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);i.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:"0.01",transform:"scale(1.1)"},{offset:1,opacity:"1",transform:"scale(1)"}]);return e.addElement(t).easing("ease-in-out").duration(200).addAnimation([r,i])};var I=function(t){var e=C();var r=C();var i=C();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);i.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:.99,transform:"scale(1)"},{offset:1,opacity:0,transform:"scale(0.9)"}]);return e.addElement(t).easing("ease-in-out").duration(200).addAnimation([r,i])};var A=function(t){var e=C();var r=C();var i=C();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);i.addElement(t.querySelector(".alert-wrapper")).keyframes([{offset:0,opacity:"0.01",transform:"scale(0.9)"},{offset:1,opacity:"1",transform:"scale(1)"}]);return e.addElement(t).easing("ease-in-out").duration(150).addAnimation([r,i])};var T=function(t){var e=C();var r=C();var i=C();r.addElement(t.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)",0);i.addElement(t.querySelector(".alert-wrapper")).fromTo("opacity",.99,0);return e.addElement(t).easing("ease-in-out").duration(150).addAnimation([r,i])};var _=".sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;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;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;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);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:14px;line-height:20px;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, #e6e6e6)}.alert-button-inner.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--max-width:270px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:14px}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.alert-translucent.sc-ion-alert-ios-h .alert-wrapper.sc-ion-alert-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.alert-head.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:7px;text-align:center}.alert-title.sc-ion-alert-ios{margin-top:8px;color:var(--ion-text-color, #000);font-size:17px;font-weight:600}.alert-sub-title.sc-ion-alert-ios{color:var(--ion-color-step-600, #666666);font-size:14px}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:21px;color:var(--ion-text-color, #000);font-size:13px;text-align:center}.alert-message.sc-ion-alert-ios{max-height:240px}.alert-message.sc-ion-alert-ios:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:12px}.alert-input.sc-ion-alert-ios{border-radius:4px;margin-top:10px;-webkit-padding-start:6px;padding-inline-start:6px;-webkit-padding-end:6px;padding-inline-end:6px;padding-top:6px;padding-bottom:6px;border:0.55px solid var(--ion-color-step-250, #bfbfbf);background-color:var(--ion-background-color, #fff);-webkit-appearance:none;-moz-appearance:none;appearance:none}.alert-input.sc-ion-alert-ios::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-clear{display:none}.alert-radio-group.sc-ion-alert-ios,.alert-checkbox-group.sc-ion-alert-ios{-ms-scroll-chaining:none;overscroll-behavior:contain;max-height:240px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);overflow-y:auto;-webkit-overflow-scrolling:touch}.alert-tappable.sc-ion-alert-ios{min-height:44px}.alert-radio-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;-ms-flex-order:0;order:0;color:var(--ion-text-color, #000)}[aria-checked=true].sc-ion-alert-ios .alert-radio-label.sc-ion-alert-ios{color:var(--ion-color-primary, #3880ff)}.alert-radio-icon.sc-ion-alert-ios{position:relative;-ms-flex-order:1;order:1;min-width:30px}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{top:-7px;position:absolute;width:6px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary, #3880ff)}@supports (inset-inline-start: 0){[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{inset-inline-start:7px}}@supports not (inset-inline-start: 0){[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{left:7px}[dir=rtl].sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios,[dir=rtl] .sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{left:unset;right:unset;right:7px}[dir=rtl].sc-ion-alert-ios [aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{left:unset;right:unset;right:7px}@supports selector(:dir(rtl)){[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios:dir(rtl){left:unset;right:unset;right:7px}}}.alert-checkbox-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-text-color, #000)}.alert-checkbox-icon.sc-ion-alert-ios{border-radius:50%;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:6px;margin-inline-end:6px;margin-top:10px;margin-bottom:10px;position:relative;width:24px;height:24px;border-width:1px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));background-color:var(--ion-item-background, var(--ion-background-color, #fff));contain:strict}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{border-color:var(--ion-color-primary, #3880ff);background-color:var(--ion-color-primary, #3880ff)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{top:4px;position:absolute;width:5px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:1px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-background-color, #fff)}@supports (inset-inline-start: 0){[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{inset-inline-start:9px}}@supports not (inset-inline-start: 0){[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{left:9px}[dir=rtl].sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios,[dir=rtl] .sc-ion-alert-ios-h [aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{left:unset;right:unset;right:9px}[dir=rtl].sc-ion-alert-ios [aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{left:unset;right:unset;right:9px}@supports selector(:dir(rtl)){[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios:dir(rtl){left:unset;right:unset;right:9px}}}.alert-button-group.sc-ion-alert-ios{-webkit-margin-end:-0.55px;margin-inline-end:-0.55px;-ms-flex-wrap:wrap;flex-wrap:wrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:0;-ms-flex:1 1 auto;flex:1 1 auto;min-width:50%;height:44px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);background-color:transparent;color:var(--ion-color-primary, #3880ff);font-size:17px;overflow:hidden}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child{border-right:0}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:first-child{border-right:0}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:first-child:dir(rtl){border-right:0}}.alert-button.sc-ion-alert-ios:last-child{border-right:0;font-weight:bold}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}}.alert-button.ion-activated.sc-ion-alert-ios{background-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1)}.alert-button-role-destructive.sc-ion-alert-ios,.alert-button-role-destructive.ion-activated.sc-ion-alert-ios,.alert-button-role-destructive.ion-focused.sc-ion-alert-ios{color:var(--ion-color-danger, #eb445a)}";var D=".sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;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;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;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);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-md::-webkit-scrollbar,.alert-message.sc-ion-alert-md::-webkit-scrollbar{display:none}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:14px;line-height:20px;z-index:0}.alert-button.ion-focused.sc-ion-alert-md,.alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100, #e6e6e6)}.alert-button-inner.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-md,.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md,.alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-md,.alert-checkbox.sc-ion-alert-md,.alert-input.sc-ion-alert-md,.alert-radio.sc-ion-alert-md{outline:none}.alert-radio-icon.sc-ion-alert-md,.alert-checkbox-icon.sc-ion-alert-md,.alert-checkbox-inner.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);font-size:14px}.alert-wrapper.sc-ion-alert-md{border-radius:4px;-webkit-box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)}.alert-head.sc-ion-alert-md{-webkit-padding-start:23px;padding-inline-start:23px;-webkit-padding-end:23px;padding-inline-end:23px;padding-top:20px;padding-bottom:15px;text-align:start}.alert-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:20px;font-weight:500}.alert-sub-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:16px}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550, #737373)}.alert-message.sc-ion-alert-md{max-height:266px;font-size:16px}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md+.alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150, #d9d9d9);color:var(--ion-text-color, #000)}.alert-input.sc-ion-alert-md::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, #999999));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary, #3880ff)}.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{position:relative;max-height:266px;border-top:1px solid var(--ion-color-step-150, #d9d9d9);border-bottom:1px solid var(--ion-color-step-150, #d9d9d9);overflow:auto}.alert-tappable.sc-ion-alert-md{position:relative;min-height:48px}.alert-radio-label.sc-ion-alert-md{-webkit-padding-start:52px;padding-inline-start:52px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-color-step-850, #262626);font-size:16px}.alert-radio-icon.sc-ion-alert-md{top:0;border-radius:50%;display:block;position:relative;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, #737373)}@supports (inset-inline-start: 0){.alert-radio-icon.sc-ion-alert-md{inset-inline-start:26px}}@supports not (inset-inline-start: 0){.alert-radio-icon.sc-ion-alert-md{left:26px}[dir=rtl].sc-ion-alert-md-h .alert-radio-icon.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h .alert-radio-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}[dir=rtl].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}@supports selector(:dir(rtl)){.alert-radio-icon.sc-ion-alert-md:dir(rtl){left:unset;right:unset;right:26px}}}.alert-radio-inner.sc-ion-alert-md{top:3px;border-radius:50%;position:absolute;width:10px;height:10px;-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--ion-color-primary, #3880ff)}@supports (inset-inline-start: 0){.alert-radio-inner.sc-ion-alert-md{inset-inline-start:3px}}@supports not (inset-inline-start: 0){.alert-radio-inner.sc-ion-alert-md{left:3px}[dir=rtl].sc-ion-alert-md-h .alert-radio-inner.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h .alert-radio-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}[dir=rtl].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}@supports selector(:dir(rtl)){.alert-radio-inner.sc-ion-alert-md:dir(rtl){left:unset;right:unset;right:3px}}}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850, #262626)}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #3880ff)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}.alert-checkbox-label.sc-ion-alert-md{-webkit-padding-start:53px;padding-inline-start:53px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-color-step-850, #262626);font-size:16px}.alert-checkbox-icon.sc-ion-alert-md{top:0;border-radius:2px;position:relative;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, #737373);contain:strict}@supports (inset-inline-start: 0){.alert-checkbox-icon.sc-ion-alert-md{inset-inline-start:26px}}@supports not (inset-inline-start: 0){.alert-checkbox-icon.sc-ion-alert-md{left:26px}[dir=rtl].sc-ion-alert-md-h .alert-checkbox-icon.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h .alert-checkbox-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}[dir=rtl].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{left:unset;right:unset;right:26px}@supports selector(:dir(rtl)){.alert-checkbox-icon.sc-ion-alert-md:dir(rtl){left:unset;right:unset;right:26px}}}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #3880ff);background-color:var(--ion-color-primary, #3880ff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{top:0;position:absolute;width:6px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast, #fff)}@supports (inset-inline-start: 0){[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{inset-inline-start:3px}}@supports not (inset-inline-start: 0){[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{left:3px}[dir=rtl].sc-ion-alert-md-h [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md,[dir=rtl] .sc-ion-alert-md-h [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}[dir=rtl].sc-ion-alert-md [aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{left:unset;right:unset;right:3px}@supports selector(:dir(rtl)){[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md:dir(rtl){left:unset;right:unset;right:3px}}}.alert-button-group.sc-ion-alert-md{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.alert-button.sc-ion-alert-md{border-radius:2px;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:0;margin-bottom:0;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary, #3880ff);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}.alert-button-inner.sc-ion-alert-md{-ms-flex-pack:end;justify-content:flex-end}";var S=t("ion_alert",function(){function t(t){var i=this;e(this,t);this.didPresent=r(this,"ionAlertDidPresent",7);this.willPresent=r(this,"ionAlertWillPresent",7);this.willDismiss=r(this,"ionAlertWillDismiss",7);this.didDismiss=r(this,"ionAlertDidDismiss",7);this.didPresentShorthand=r(this,"didPresent",7);this.willPresentShorthand=r(this,"willPresent",7);this.willDismissShorthand=r(this,"willDismiss",7);this.didDismissShorthand=r(this,"didDismiss",7);this.delegateController=p(this);this.triggerController=u();this.customHTMLEnabled=y.get("innerHTMLTemplatesEnabled",s);this.processedInputs=[];this.processedButtons=[];this.presented=false;this.onBackdropTap=function(){i.dismiss(undefined,h)};this.dispatchCancelHandler=function(t){var e=t.detail.role;if(b(e)){var r=i.processedButtons.find((function(t){return t.role==="cancel"}));i.callButtonHandler(r)}};this.overlayIndex=undefined;this.delegate=undefined;this.hasController=false;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.cssClass=undefined;this.header=undefined;this.subHeader=undefined;this.message=undefined;this.buttons=[];this.inputs=[];this.backdropDismiss=true;this.translucent=false;this.animated=true;this.htmlAttributes=undefined;this.isOpen=false;this.trigger=undefined}t.prototype.onIsOpenChange=function(t,e){if(t===true&&e===false){this.present()}else if(t===false&&e===true){this.dismiss()}};t.prototype.triggerChanged=function(){var t=this,e=t.trigger,r=t.el,i=t.triggerController;if(e){i.addClickListener(r,e)}};t.prototype.onKeydown=function(t){var e=new Set(this.processedInputs.map((function(t){return t.type})));if(!e.has("radio")||t.target&&!this.el.contains(t.target)||t.target.classList.contains("alert-button")){return}var r=this.el.querySelectorAll(".alert-radio");var i=Array.from(r).filter((function(t){return!t.disabled}));var n=i.findIndex((function(e){return e.id===t.target.id}));var o;if(["ArrowDown","ArrowRight"].includes(t.key)){o=n===i.length-1?i[0]:i[n+1]}if(["ArrowUp","ArrowLeft"].includes(t.key)){o=n===0?i[i.length-1]:i[n-1]}if(o&&i.includes(o)){var a=this.processedInputs.find((function(t){return t.id===(o===null||o===void 0?void 0:o.id)}));if(a){this.rbClick(a);o.focus()}}};t.prototype.buttonsChanged=function(){var t=this.buttons;this.processedButtons=t.map((function(t){return typeof t==="string"?{text:t,role:t.toLowerCase()==="cancel"?"cancel":undefined}:t}))};t.prototype.inputsChanged=function(){var t=this;var e=this.inputs;var r=e.find((function(t){return!t.disabled}));var i=e.find((function(t){return t.checked&&!t.disabled}));var n=i||r;var o=new Set(e.map((function(t){return t.type})));if(o.has("checkbox")&&o.has("radio")){console.warn("Alert cannot mix input types: ".concat(Array.from(o.values()).join("/"),". Please see alert docs for more info."))}this.inputType=o.values().next().value;this.processedInputs=e.map((function(e,r){var i;return{type:e.type||"text",name:e.name||"".concat(r),placeholder:e.placeholder||"",value:e.value,label:e.label,checked:!!e.checked,disabled:!!e.disabled,id:e.id||"alert-input-".concat(t.overlayIndex,"-").concat(r),handler:e.handler,min:e.min,max:e.max,cssClass:(i=e.cssClass)!==null&&i!==void 0?i:"",attributes:e.attributes||{},tabindex:e.type==="radio"&&e!==n?-1:0}}))};t.prototype.connectedCallback=function(){f(this.el);this.triggerChanged()};t.prototype.componentWillLoad=function(){g(this.el);this.inputsChanged();this.buttonsChanged()};t.prototype.disconnectedCallback=function(){this.triggerController.removeClickListener();if(this.gesture){this.gesture.destroy();this.gesture=undefined}};t.prototype.componentDidLoad=function(){var t=this;if(!this.gesture&&z(this)==="ios"&&this.wrapperEl){this.gesture=d(this.wrapperEl,(function(t){return t.classList.contains("alert-button")}));this.gesture.enable(true)}if(this.isOpen===true){c((function(){return t.present()}))}};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(this.currentTransition!==undefined))return[3,2];return[4,this.currentTransition];case 1:t.sent();t.label=2;case 2:return[4,this.delegateController.attachViewToDom()];case 3:t.sent();this.currentTransition=m(this,"alertEnter",j,A);return[4,this.currentTransition];case 4:t.sent();this.currentTransition=undefined;return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(i){switch(i.label){case 0:this.currentTransition=x(this,t,e,"alertLeave",I,T);return[4,this.currentTransition];case 1:r=i.sent();if(r){this.delegateController.removeViewFromDom()}return[2,r]}}))}))};t.prototype.onDidDismiss=function(){return v(this.el,"ionAlertDidDismiss")};t.prototype.onWillDismiss=function(){return v(this.el,"ionAlertWillDismiss")};t.prototype.rbClick=function(t){for(var e=0,r=this.processedInputs;e<r.length;e++){var n=r[e];n.checked=n===t;n.tabindex=n===t?0:-1}this.activeId=t.id;k(t.handler,t);i(this)};t.prototype.cbClick=function(t){t.checked=!t.checked;k(t.handler,t);i(this)};t.prototype.buttonClick=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,i;return __generator(this,(function(n){switch(n.label){case 0:e=t.role;r=this.getValues();if(b(e)){return[2,this.dismiss({values:r},e)]}return[4,this.callButtonHandler(t,r)];case 1:i=n.sent();if(i!==false){return[2,this.dismiss(Object.assign({values:r},i),t.role)]}return[2,false]}}))}))};t.prototype.callButtonHandler=function(t,e){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(i){switch(i.label){case 0:if(!(t===null||t===void 0?void 0:t.handler))return[3,2];return[4,k(t.handler,e)];case 1:r=i.sent();if(r===false){return[2,false]}if(typeof r==="object"){return[2,r]}i.label=2;case 2:return[2,{}]}}))}))};t.prototype.getValues=function(){if(this.processedInputs.length===0){return undefined}if(this.inputType==="radio"){var t=this.processedInputs.find((function(t){return!!t.checked}));return t?t.value:undefined}if(this.inputType==="checkbox"){return this.processedInputs.filter((function(t){return t.checked})).map((function(t){return t.value}))}var e={};this.processedInputs.forEach((function(t){e[t.name]=t.value||""}));return e};t.prototype.renderAlertInputs=function(){switch(this.inputType){case"checkbox":return this.renderCheckbox();case"radio":return this.renderRadio();default:return this.renderInput()}};t.prototype.renderCheckbox=function(){var t=this;var e=this.processedInputs;var r=z(this);if(e.length===0){return null}return n("div",{class:"alert-checkbox-group"},e.map((function(e){return n("button",{type:"button",onClick:function(){return t.cbClick(e)},"aria-checked":"".concat(e.checked),id:e.id,disabled:e.disabled,tabIndex:e.tabindex,role:"checkbox",class:Object.assign(Object.assign({},w(e.cssClass)),{"alert-tappable":true,"alert-checkbox":true,"alert-checkbox-button":true,"ion-focusable":true,"alert-checkbox-button-disabled":e.disabled||false})},n("div",{class:"alert-button-inner"},n("div",{class:"alert-checkbox-icon"},n("div",{class:"alert-checkbox-inner"})),n("div",{class:"alert-checkbox-label"},e.label)),r==="md"&&n("ion-ripple-effect",null))})))};t.prototype.renderRadio=function(){var t=this;var e=this.processedInputs;if(e.length===0){return null}return n("div",{class:"alert-radio-group",role:"radiogroup","aria-activedescendant":this.activeId},e.map((function(e){return n("button",{type:"button",onClick:function(){return t.rbClick(e)},"aria-checked":"".concat(e.checked),disabled:e.disabled,id:e.id,tabIndex:e.tabindex,class:Object.assign(Object.assign({},w(e.cssClass)),{"alert-radio-button":true,"alert-tappable":true,"alert-radio":true,"ion-focusable":true,"alert-radio-button-disabled":e.disabled||false}),role:"radio"},n("div",{class:"alert-button-inner"},n("div",{class:"alert-radio-icon"},n("div",{class:"alert-radio-inner"})),n("div",{class:"alert-radio-label"},e.label)))})))};t.prototype.renderInput=function(){var t=this.processedInputs;if(t.length===0){return null}return n("div",{class:"alert-input-group"},t.map((function(t){var e,r,i,o;if(t.type==="textarea"){return n("div",{class:"alert-input-wrapper"},n("textarea",Object.assign({placeholder:t.placeholder,value:t.value,id:t.id,tabIndex:t.tabindex},t.attributes,{disabled:(r=(e=t.attributes)===null||e===void 0?void 0:e.disabled)!==null&&r!==void 0?r:t.disabled,class:E(t),onInput:function(e){var r;t.value=e.target.value;if((r=t.attributes)===null||r===void 0?void 0:r.onInput){t.attributes.onInput(e)}}})))}else{return n("div",{class:"alert-input-wrapper"},n("input",Object.assign({placeholder:t.placeholder,type:t.type,min:t.min,max:t.max,value:t.value,id:t.id,tabIndex:t.tabindex},t.attributes,{disabled:(o=(i=t.attributes)===null||i===void 0?void 0:i.disabled)!==null&&o!==void 0?o:t.disabled,class:E(t),onInput:function(e){var r;t.value=e.target.value;if((r=t.attributes)===null||r===void 0?void 0:r.onInput){t.attributes.onInput(e)}}})))}})))};t.prototype.renderAlertButtons=function(){var t=this;var e=this.processedButtons;var r=z(this);var i={"alert-button-group":true,"alert-button-group-vertical":e.length>2};return n("div",{class:i},e.map((function(e){return n("button",Object.assign({},e.htmlAttributes,{type:"button",id:e.id,class:O(e),tabIndex:0,onClick:function(){return t.buttonClick(e)}}),n("span",{class:"alert-button-inner"},e.text),r==="md"&&n("ion-ripple-effect",null))})))};t.prototype.renderAlertMessage=function(t){var e=this,r=e.customHTMLEnabled,i=e.message;if(r){return n("div",{id:t,class:"alert-message",innerHTML:l(i)})}return n("div",{id:t,class:"alert-message"},i)};t.prototype.render=function(){var t;var e=this;var r=this,i=r.overlayIndex,a=r.header,s=r.subHeader,l=r.message,d=r.htmlAttributes;var c=z(this);var p="alert-".concat(i,"-hdr");var u="alert-".concat(i,"-sub-hdr");var h="alert-".concat(i,"-msg");var b=this.inputs.length>0||this.buttons.length>0?"alertdialog":"alert";var f=a?p:s?u:null;return n(o,Object.assign({role:b,"aria-modal":"true","aria-labelledby":f,"aria-describedby":l!==undefined?h:null,tabindex:"-1"},d,{style:{zIndex:"".concat(2e4+i)},class:Object.assign(Object.assign({},w(this.cssClass)),(t={},t[c]=true,t["overlay-hidden"]=true,t["alert-translucent"]=this.translucent,t)),onIonAlertWillDismiss:this.dispatchCancelHandler,onIonBackdropTap:this.onBackdropTap}),n("ion-backdrop",{tappable:this.backdropDismiss}),n("div",{tabindex:"0"}),n("div",{class:"alert-wrapper ion-overlay-wrapper",ref:function(t){return e.wrapperEl=t}},n("div",{class:"alert-head"},a&&n("h2",{id:p,class:"alert-title"},a),s&&n("h2",{id:u,class:"alert-sub-title"},s)),this.renderAlertMessage(h),this.renderAlertInputs(),this.renderAlertButtons()),n("div",{tabindex:"0"}))};Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"],buttons:["buttonsChanged"],inputs:["inputsChanged"]}},enumerable:false,configurable:true});return t}());var E=function(t){var e,r,i;return Object.assign(Object.assign({"alert-input":true,"alert-input-disabled":((r=(e=t.attributes)===null||e===void 0?void 0:e.disabled)!==null&&r!==void 0?r:t.disabled)||false},w(t.cssClass)),w(t.attributes?(i=t.attributes.class)===null||i===void 0?void 0:i.toString():""))};var O=function(t){var e;return Object.assign((e={"alert-button":true,"ion-focusable":true,"ion-activatable":true},e["alert-button-role-".concat(t.role)]=t.role!==undefined,e),w(t.cssClass))};S.style={ios:_,md:D}}}}));