@ionic/core 7.8.5-dev.11712853167.1d02271c → 7.8.5-nightly.20240412

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 (51) hide show
  1. package/components/ios.transition.js +67 -90
  2. package/dist/cjs/{index-034460de.js → index-1f7c54f8.js} +2 -2
  3. package/dist/cjs/index.cjs.js +3 -3
  4. package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
  5. package/dist/cjs/ion-modal.cjs.entry.js +1 -1
  6. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  7. package/dist/cjs/ion-popover.cjs.entry.js +1 -1
  8. package/dist/cjs/{ios.transition-26c5adb2.js → ios.transition-30830fc4.js} +68 -91
  9. package/dist/cjs/{md.transition-75533d44.js → md.transition-7f581866.js} +1 -1
  10. package/dist/collection/utils/transition/ios.transition.js +67 -90
  11. package/dist/docs.json +1 -1
  12. package/dist/esm/{index-68278972.js → index-fae1515c.js} +2 -2
  13. package/dist/esm/index.js +3 -3
  14. package/dist/esm/ion-app_8.entry.js +1 -1
  15. package/dist/esm/ion-modal.entry.js +1 -1
  16. package/dist/esm/ion-nav_2.entry.js +1 -1
  17. package/dist/esm/ion-popover.entry.js +1 -1
  18. package/dist/esm/{ios.transition-471e5da1.js → ios.transition-a50a9a55.js} +68 -91
  19. package/dist/esm/{md.transition-12c07448.js → md.transition-0da92976.js} +1 -1
  20. package/dist/esm-es5/{index-68278972.js → index-fae1515c.js} +1 -1
  21. package/dist/esm-es5/index.js +1 -1
  22. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  23. package/dist/esm-es5/ion-modal.entry.js +1 -1
  24. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  25. package/dist/esm-es5/ion-popover.entry.js +1 -1
  26. package/dist/esm-es5/ios.transition-a50a9a55.js +4 -0
  27. package/dist/esm-es5/{md.transition-12c07448.js → md.transition-0da92976.js} +1 -1
  28. package/dist/ionic/index.esm.js +1 -1
  29. package/dist/ionic/ionic.esm.js +1 -1
  30. package/dist/ionic/p-0047bd0e.js +4 -0
  31. package/dist/ionic/{p-99d8b626.entry.js → p-05c69a9b.entry.js} +1 -1
  32. package/dist/ionic/{p-85ea810f.system.js → p-0609a7d8.system.js} +1 -1
  33. package/dist/ionic/{p-be403dff.entry.js → p-19dd9808.entry.js} +1 -1
  34. package/dist/ionic/{p-4e9552a3.js → p-1cd372ed.js} +1 -1
  35. package/dist/ionic/{p-815c676c.entry.js → p-200d971f.entry.js} +1 -1
  36. package/dist/ionic/{p-a258956b.system.entry.js → p-52f1dc25.system.entry.js} +1 -1
  37. package/dist/ionic/p-6a6550fa.js +4 -0
  38. package/dist/ionic/p-6ecddf53.system.js +4 -0
  39. package/dist/ionic/{p-8444e4c0.entry.js → p-83090da8.entry.js} +1 -1
  40. package/dist/ionic/{p-f3d07c09.system.entry.js → p-a4151856.system.entry.js} +1 -1
  41. package/dist/ionic/{p-9d3363aa.system.entry.js → p-ac8686ab.system.entry.js} +1 -1
  42. package/dist/ionic/{p-414c5031.system.entry.js → p-ba87a6dd.system.entry.js} +1 -1
  43. package/dist/ionic/{p-8668ffee.system.js → p-e0948431.system.js} +1 -1
  44. package/dist/ionic/p-e933e886.system.js +1 -1
  45. package/dist/ionic/{p-0020292d.system.js → p-f4fb429a.system.js} +1 -1
  46. package/hydrate/index.js +73 -96
  47. package/package.json +1 -1
  48. package/dist/esm-es5/ios.transition-471e5da1.js +0 -4
  49. package/dist/ionic/p-1a244094.js +0 -4
  50. package/dist/ionic/p-3420329d.js +0 -4
  51. package/dist/ionic/p-de6623db.system.js +0 -4
@@ -55,22 +55,20 @@ const createLargeTitleTransition = (rootAnimation, rtl, backDirection, enteringE
55
55
  const leavingLargeTitleBox = leavingLargeTitle.getBoundingClientRect();
56
56
  const enteringBackButtonBox = enteringBackButton.getBoundingClientRect();
57
57
  const enteringBackButtonTextEl = shadow(enteringBackButton).querySelector('.button-text');
58
- // Text element not rendered if developers pass text="" to the back button
59
- const enteringBackButtonTextBox = enteringBackButtonTextEl === null || enteringBackButtonTextEl === void 0 ? void 0 : enteringBackButtonTextEl.getBoundingClientRect();
58
+ const enteringBackButtonTextBox = enteringBackButtonTextEl.getBoundingClientRect();
60
59
  const leavingLargeTitleTextEl = shadow(leavingLargeTitle).querySelector('.toolbar-title');
61
60
  const leavingLargeTitleTextBox = leavingLargeTitleTextEl.getBoundingClientRect();
62
- animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, leavingLargeTitleTextBox, enteringBackButtonBox, enteringBackButtonTextEl, enteringBackButtonTextBox);
61
+ animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, leavingLargeTitleTextBox, enteringBackButtonTextEl, enteringBackButtonTextBox);
63
62
  animateBackButton(rootAnimation, rtl, backDirection, enteringBackButton, enteringBackButtonBox, enteringBackButtonTextEl, enteringBackButtonTextBox, leavingLargeTitle, leavingLargeTitleTextBox);
64
63
  }
65
64
  else if (shouldAnimationBackward) {
66
65
  const enteringLargeTitleBox = enteringLargeTitle.getBoundingClientRect();
67
66
  const leavingBackButtonBox = leavingBackButton.getBoundingClientRect();
68
67
  const leavingBackButtonTextEl = shadow(leavingBackButton).querySelector('.button-text');
69
- // Text element not rendered if developers pass text="" to the back button
70
- const leavingBackButtonTextBox = leavingBackButtonTextEl === null || leavingBackButtonTextEl === void 0 ? void 0 : leavingBackButtonTextEl.getBoundingClientRect();
68
+ const leavingBackButtonTextBox = leavingBackButtonTextEl.getBoundingClientRect();
71
69
  const enteringLargeTitleTextEl = shadow(enteringLargeTitle).querySelector('.toolbar-title');
72
70
  const enteringLargeTitleTextBox = enteringLargeTitleTextEl.getBoundingClientRect();
73
- animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, enteringLargeTitleTextBox, leavingBackButtonBox, leavingBackButtonTextEl, leavingBackButtonTextBox);
71
+ animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, enteringLargeTitleTextBox, leavingBackButtonTextEl, leavingBackButtonTextBox);
74
72
  animateBackButton(rootAnimation, rtl, backDirection, leavingBackButton, leavingBackButtonBox, leavingBackButtonTextEl, leavingBackButtonTextBox, enteringLargeTitle, enteringLargeTitleTextBox);
75
73
  }
76
74
  return {
@@ -84,29 +82,26 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
84
82
  const TEXT_ORIGIN_X = rtl ? 'right' : 'left';
85
83
  const ICON_ORIGIN_X = rtl ? 'left' : 'right';
86
84
  const CONTAINER_ORIGIN_X = rtl ? 'right' : 'left';
87
- let WIDTH_SCALE = 1;
88
- let HEIGHT_SCALE = 1;
89
- let TEXT_START_SCALE = `scale(${HEIGHT_SCALE})`;
85
+ /**
86
+ * When the title and back button texts match
87
+ * then they should overlap during the page transition.
88
+ * If the texts do not match up then the back button text scale adjusts
89
+ * to not perfectly match the large title text otherwise the
90
+ * proportions will be incorrect.
91
+ * When the texts match we scale both the width and height to account for
92
+ * font weight differences between the title and back button.
93
+ */
94
+ const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
95
+ const WIDTH_SCALE = largeTitleTextBox.width / backButtonTextBox.width;
96
+ /**
97
+ * We subtract an offset to account for slight sizing/padding
98
+ * differences between the title and the back button.
99
+ */
100
+ const HEIGHT_SCALE = (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET) / backButtonTextBox.height;
101
+ const TEXT_START_SCALE = doTitleAndButtonTextsMatch
102
+ ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})`
103
+ : `scale(${HEIGHT_SCALE})`;
90
104
  const TEXT_END_SCALE = 'scale(1)';
91
- if (backButtonTextEl && backButtonTextBox) {
92
- /**
93
- * When the title and back button texts match then they should overlap during the
94
- * page transition. If the texts do not match up then the back button text scale
95
- * adjusts to not perfectly match the large title text otherwise the proportions
96
- * will be incorrect. When the texts match we scale both the width and height to
97
- * account for font weight differences between the title and back button.
98
- */
99
- const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
100
- WIDTH_SCALE = largeTitleTextBox.width / backButtonTextBox.width;
101
- /**
102
- * Subtract an offset to account for slight sizing/padding differences between the
103
- * title and the back button.
104
- */
105
- HEIGHT_SCALE = (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET) / backButtonTextBox.height;
106
- if (doTitleAndButtonTextsMatch) {
107
- TEXT_START_SCALE = `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})`;
108
- }
109
- }
110
105
  const backButtonIconEl = shadow(backButtonEl).querySelector('ion-icon');
111
106
  const backButtonIconBox = backButtonIconEl.getBoundingClientRect();
112
107
  /**
@@ -203,11 +198,11 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
203
198
  top: '0px',
204
199
  [CONTAINER_ORIGIN_X]: '0px',
205
200
  })
206
- /**
207
- * The write hooks must be set on this animation as it is guaranteed to run. Other
208
- * animations such as the back button text animation will not run if the back button
209
- * has no visible text.
210
- */
201
+ .keyframes(CONTAINER_KEYFRAMES);
202
+ enteringBackButtonTextAnimation
203
+ .beforeStyles({
204
+ 'transform-origin': `${TEXT_ORIGIN_X} top`,
205
+ })
211
206
  .beforeAddWrite(() => {
212
207
  backButtonEl.style.setProperty('display', 'none');
213
208
  clonedBackButtonEl.style.setProperty(TEXT_ORIGIN_X, BACK_BUTTON_START_OFFSET);
@@ -216,11 +211,6 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
216
211
  backButtonEl.style.setProperty('display', '');
217
212
  clonedBackButtonEl.style.setProperty('display', 'none');
218
213
  clonedBackButtonEl.style.removeProperty(TEXT_ORIGIN_X);
219
- })
220
- .keyframes(CONTAINER_KEYFRAMES);
221
- enteringBackButtonTextAnimation
222
- .beforeStyles({
223
- 'transform-origin': `${TEXT_ORIGIN_X} top`,
224
214
  })
225
215
  .keyframes(TEXT_KEYFRAMES);
226
216
  enteringBackButtonIconAnimation
@@ -234,7 +224,7 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
234
224
  enteringBackButtonAnimation,
235
225
  ]);
236
226
  };
237
- const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, largeTitleTextBox, backButtonBox, backButtonTextEl, backButtonTextBox) => {
227
+ const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, largeTitleTextBox, backButtonTextEl, backButtonTextBox) => {
238
228
  var _a, _b;
239
229
  /**
240
230
  * The horizontal transform origin for the large title
@@ -254,65 +244,52 @@ const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, larg
254
244
  * title and the back button due to padding and font weight.
255
245
  */
256
246
  const LARGE_TITLE_TRANSLATION_OFFSET = 8;
257
- let END_TRANSLATE_X = rtl
258
- ? `-${window.innerWidth - backButtonBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
259
- : `${backButtonBox.x + LARGE_TITLE_TRANSLATION_OFFSET}px`;
260
247
  /**
261
- * How much to scale the large title up/down by.
248
+ * The scaled title should (roughly) overlap the back button.
249
+ * This ensures that the back button and title overlap during
250
+ * the animation. Note that since both elements either fade in
251
+ * or fade out over the course of the animation, neither element
252
+ * will be fully visible on top of the other. As a result, the overlap
253
+ * does not need to be perfect, so approximate values are acceptable here.
262
254
  */
263
- let HEIGHT_SCALE = 0.5;
255
+ const END_TRANSLATE_X = rtl
256
+ ? `-${window.innerWidth - backButtonTextBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
257
+ : `${backButtonTextBox.x - LARGE_TITLE_TRANSLATION_OFFSET}px`;
264
258
  /**
265
- * The large title always starts full size.
259
+ * The top of the scaled large title
260
+ * should match with the top of the
261
+ * back button text element.
262
+ * We subtract 2px to account for the top padding
263
+ * on the large title element.
266
264
  */
267
- const START_SCALE = 'scale(1)';
265
+ const LARGE_TITLE_TOP_PADDING = 2;
266
+ const END_TRANSLATE_Y = `${backButtonTextBox.y - LARGE_TITLE_TOP_PADDING}px`;
268
267
  /**
269
- * By default, we don't worry about having the large title scaled to perfectly
270
- * match the back button because we don't know if the back button's text matches
271
- * the large title's text.
268
+ * In the forward direction, the large title should start at its
269
+ * normal size and then scale down to be (roughly) the size of the
270
+ * back button on the other view. In the backward direction, the
271
+ * large title should start at (roughly) the size of the back button
272
+ * and then scale up to its original size.
273
+ *
274
+ * Note that since both elements either fade in
275
+ * or fade out over the course of the animation, neither element
276
+ * will be fully visible on top of the other. As a result, the overlap
277
+ * does not need to be perfect, so approximate values are acceptable here.
272
278
  */
273
- let END_SCALE = `scale(${HEIGHT_SCALE})`;
274
- // Text element not rendered if developers pass text="" to the back button
275
- if (backButtonTextEl && backButtonTextBox) {
276
- /**
277
- * The scaled title should (roughly) overlap the back button. This ensures that
278
- * the back button and title overlap during the animation. Note that since both
279
- * elements either fade in or fade out over the course of the animation, neither
280
- * element will be fully visible on top of the other. As a result, the overlap
281
- * does not need to be perfect, so approximate values are acceptable here.
282
- */
283
- END_TRANSLATE_X = rtl
284
- ? `-${window.innerWidth - backButtonTextBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
285
- : `${backButtonTextBox.x - LARGE_TITLE_TRANSLATION_OFFSET}px`;
286
- /**
287
- * In the forward direction, the large title should start at its normal size and
288
- * then scale down to be (roughly) the size of the back button on the other view.
289
- * In the backward direction, the large title should start at (roughly) the size
290
- * of the back button and then scale up to its original size.
291
- * Note that since both elements either fade in or fade out over the course of the
292
- * animation, neither element will be fully visible on top of the other. As a result,
293
- * the overlap does not need to be perfect, so approximate values are acceptable here.
294
- */
295
- /**
296
- * When the title and back button texts match then they should overlap during the
297
- * page transition. If the texts do not match up then the large title text scale
298
- * adjusts to not perfectly match the back button text otherwise the proportions
299
- * will be incorrect. When the texts match we scale both the width and height to
300
- * account for font weight differences between the title and back button.
301
- */
302
- const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
303
- const WIDTH_SCALE = backButtonTextBox.width / largeTitleTextBox.width;
304
- HEIGHT_SCALE = backButtonTextBox.height / (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET);
305
- if (doTitleAndButtonTextsMatch) {
306
- END_SCALE = `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})`;
307
- }
308
- }
309
279
  /**
310
- * The midpoints of the back button and the title should align such that the back
311
- * button and title appear to be centered with each other.
280
+ * When the title and back button texts match
281
+ * then they should overlap during the page transition.
282
+ * If the texts do not match up then the large title text scale adjusts
283
+ * to not perfectly match the back button text otherwise the
284
+ * proportions will be incorrect.
285
+ * When the texts match we scale both the width and height to account for
286
+ * font weight differences between the title and back button.
312
287
  */
313
- const backButtonMidPoint = backButtonBox.top + backButtonBox.height / 2;
314
- const titleMidPoint = (largeTitleBox.height * HEIGHT_SCALE) / 2;
315
- const END_TRANSLATE_Y = `${backButtonMidPoint - titleMidPoint}px`;
288
+ const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
289
+ const WIDTH_SCALE = backButtonTextBox.width / largeTitleTextBox.width;
290
+ const HEIGHT_SCALE = backButtonTextBox.height / (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET);
291
+ const START_SCALE = 'scale(1)';
292
+ const END_SCALE = doTitleAndButtonTextsMatch ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})` : `scale(${HEIGHT_SCALE})`;
316
293
  const BACKWARDS_KEYFRAMES = [
317
294
  { offset: 0, opacity: 0, transform: `translate3d(${END_TRANSLATE_X}, ${END_TRANSLATE_Y}, 0) ${END_SCALE}` },
318
295
  { offset: 0.1, opacity: 0 },
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-04-11T16:34:31",
2
+ "timestamp": "2024-04-12T06:07:26",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.14.1",
@@ -10,8 +10,8 @@ const LIFECYCLE_WILL_LEAVE = 'ionViewWillLeave';
10
10
  const LIFECYCLE_DID_LEAVE = 'ionViewDidLeave';
11
11
  const LIFECYCLE_WILL_UNLOAD = 'ionViewWillUnload';
12
12
 
13
- const iosTransitionAnimation = () => import('./ios.transition-471e5da1.js');
14
- const mdTransitionAnimation = () => import('./md.transition-12c07448.js');
13
+ const iosTransitionAnimation = () => import('./ios.transition-a50a9a55.js');
14
+ const mdTransitionAnimation = () => import('./md.transition-0da92976.js');
15
15
  // TODO(FW-2832): types
16
16
  const transition = (opts) => {
17
17
  return new Promise((resolve, reject) => {
package/dist/esm/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  export { c as createAnimation } from './animation-6a0c5338.js';
5
- export { a as LIFECYCLE_DID_ENTER, c as LIFECYCLE_DID_LEAVE, L as LIFECYCLE_WILL_ENTER, b as LIFECYCLE_WILL_LEAVE, d as LIFECYCLE_WILL_UNLOAD, g as getIonPageElement } from './index-68278972.js';
6
- export { iosTransitionAnimation } from './ios.transition-471e5da1.js';
7
- export { mdTransitionAnimation } from './md.transition-12c07448.js';
5
+ export { a as LIFECYCLE_DID_ENTER, c as LIFECYCLE_DID_LEAVE, L as LIFECYCLE_WILL_ENTER, b as LIFECYCLE_WILL_LEAVE, d as LIFECYCLE_WILL_UNLOAD, g as getIonPageElement } from './index-fae1515c.js';
6
+ export { iosTransitionAnimation } from './ios.transition-a50a9a55.js';
7
+ export { mdTransitionAnimation } from './md.transition-0da92976.js';
8
8
  export { g as getTimeGivenProgression } from './cubic-bezier-fe2083dc.js';
9
9
  export { createGesture } from './index-2cf77112.js';
10
10
  export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global-94f25d1b.js';
@@ -13,7 +13,7 @@ import { c as createKeyboardController } from './keyboard-controller-ec5c2bfa.js
13
13
  import { g as getTimeGivenProgression } from './cubic-bezier-fe2083dc.js';
14
14
  import { a as attachComponent, d as detachComponent } from './framework-delegate-ed4ba327.js';
15
15
  import { c as createLockController } from './lock-controller-316928be.js';
16
- import { t as transition } from './index-68278972.js';
16
+ import { t as transition } from './index-fae1515c.js';
17
17
  import './index-a5d50daf.js';
18
18
  import './keyboard-73175e24.js';
19
19
  import './capacitor-59395cbd.js';
@@ -10,7 +10,7 @@ import { p as printIonWarning } from './index-9b0d46f4.js';
10
10
  import { g as getCapacitor } from './capacitor-59395cbd.js';
11
11
  import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-b874c3c3.js';
12
12
  import { g as getClassMap } from './theme-01f3f29c.js';
13
- import { e as deepReady, w as waitForMount } from './index-68278972.js';
13
+ import { e as deepReady, w as waitForMount } from './index-fae1515c.js';
14
14
  import { b as getIonMode, c as config } from './ionic-global-94f25d1b.js';
15
15
  import { KEYBOARD_DID_OPEN } from './keyboard-52278bd7.js';
16
16
  import { c as createAnimation } from './animation-6a0c5338.js';
@@ -4,7 +4,7 @@
4
4
  import { r as registerInstance, d as createEvent, h, f as getElement, H as Host } from './index-a1a47f01.js';
5
5
  import { g as getTimeGivenProgression } from './cubic-bezier-fe2083dc.js';
6
6
  import { o as assert, s as shallowEqualStringMap } from './helpers-be245865.js';
7
- import { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-68278972.js';
7
+ import { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-fae1515c.js';
8
8
  import { b as getIonMode, c as config } from './ionic-global-94f25d1b.js';
9
9
  import { a as attachComponent } from './framework-delegate-ed4ba327.js';
10
10
 
@@ -9,7 +9,7 @@ import { p as printIonWarning } from './index-9b0d46f4.js';
9
9
  import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod } from './overlays-b874c3c3.js';
10
10
  import { b as getIonMode, a as isPlatform } from './ionic-global-94f25d1b.js';
11
11
  import { g as getClassMap } from './theme-01f3f29c.js';
12
- import { e as deepReady, w as waitForMount } from './index-68278972.js';
12
+ import { e as deepReady, w as waitForMount } from './index-fae1515c.js';
13
13
  import { c as createAnimation } from './animation-6a0c5338.js';
14
14
  import './index-a5d50daf.js';
15
15
  import './hardware-back-button-6107a37c.js';
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { c as createAnimation } from './animation-6a0c5338.js';
5
- import { g as getIonPageElement } from './index-68278972.js';
5
+ import { g as getIonPageElement } from './index-fae1515c.js';
6
6
  import './index-a5d50daf.js';
7
7
  import './helpers-be245865.js';
8
8
  import './index-a1a47f01.js';
@@ -59,22 +59,20 @@ const createLargeTitleTransition = (rootAnimation, rtl, backDirection, enteringE
59
59
  const leavingLargeTitleBox = leavingLargeTitle.getBoundingClientRect();
60
60
  const enteringBackButtonBox = enteringBackButton.getBoundingClientRect();
61
61
  const enteringBackButtonTextEl = shadow(enteringBackButton).querySelector('.button-text');
62
- // Text element not rendered if developers pass text="" to the back button
63
- const enteringBackButtonTextBox = enteringBackButtonTextEl === null || enteringBackButtonTextEl === void 0 ? void 0 : enteringBackButtonTextEl.getBoundingClientRect();
62
+ const enteringBackButtonTextBox = enteringBackButtonTextEl.getBoundingClientRect();
64
63
  const leavingLargeTitleTextEl = shadow(leavingLargeTitle).querySelector('.toolbar-title');
65
64
  const leavingLargeTitleTextBox = leavingLargeTitleTextEl.getBoundingClientRect();
66
- animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, leavingLargeTitleTextBox, enteringBackButtonBox, enteringBackButtonTextEl, enteringBackButtonTextBox);
65
+ animateLargeTitle(rootAnimation, rtl, backDirection, leavingLargeTitle, leavingLargeTitleBox, leavingLargeTitleTextBox, enteringBackButtonTextEl, enteringBackButtonTextBox);
67
66
  animateBackButton(rootAnimation, rtl, backDirection, enteringBackButton, enteringBackButtonBox, enteringBackButtonTextEl, enteringBackButtonTextBox, leavingLargeTitle, leavingLargeTitleTextBox);
68
67
  }
69
68
  else if (shouldAnimationBackward) {
70
69
  const enteringLargeTitleBox = enteringLargeTitle.getBoundingClientRect();
71
70
  const leavingBackButtonBox = leavingBackButton.getBoundingClientRect();
72
71
  const leavingBackButtonTextEl = shadow(leavingBackButton).querySelector('.button-text');
73
- // Text element not rendered if developers pass text="" to the back button
74
- const leavingBackButtonTextBox = leavingBackButtonTextEl === null || leavingBackButtonTextEl === void 0 ? void 0 : leavingBackButtonTextEl.getBoundingClientRect();
72
+ const leavingBackButtonTextBox = leavingBackButtonTextEl.getBoundingClientRect();
75
73
  const enteringLargeTitleTextEl = shadow(enteringLargeTitle).querySelector('.toolbar-title');
76
74
  const enteringLargeTitleTextBox = enteringLargeTitleTextEl.getBoundingClientRect();
77
- animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, enteringLargeTitleTextBox, leavingBackButtonBox, leavingBackButtonTextEl, leavingBackButtonTextBox);
75
+ animateLargeTitle(rootAnimation, rtl, backDirection, enteringLargeTitle, enteringLargeTitleBox, enteringLargeTitleTextBox, leavingBackButtonTextEl, leavingBackButtonTextBox);
78
76
  animateBackButton(rootAnimation, rtl, backDirection, leavingBackButton, leavingBackButtonBox, leavingBackButtonTextEl, leavingBackButtonTextBox, enteringLargeTitle, enteringLargeTitleTextBox);
79
77
  }
80
78
  return {
@@ -88,29 +86,26 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
88
86
  const TEXT_ORIGIN_X = rtl ? 'right' : 'left';
89
87
  const ICON_ORIGIN_X = rtl ? 'left' : 'right';
90
88
  const CONTAINER_ORIGIN_X = rtl ? 'right' : 'left';
91
- let WIDTH_SCALE = 1;
92
- let HEIGHT_SCALE = 1;
93
- let TEXT_START_SCALE = `scale(${HEIGHT_SCALE})`;
89
+ /**
90
+ * When the title and back button texts match
91
+ * then they should overlap during the page transition.
92
+ * If the texts do not match up then the back button text scale adjusts
93
+ * to not perfectly match the large title text otherwise the
94
+ * proportions will be incorrect.
95
+ * When the texts match we scale both the width and height to account for
96
+ * font weight differences between the title and back button.
97
+ */
98
+ const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
99
+ const WIDTH_SCALE = largeTitleTextBox.width / backButtonTextBox.width;
100
+ /**
101
+ * We subtract an offset to account for slight sizing/padding
102
+ * differences between the title and the back button.
103
+ */
104
+ const HEIGHT_SCALE = (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET) / backButtonTextBox.height;
105
+ const TEXT_START_SCALE = doTitleAndButtonTextsMatch
106
+ ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})`
107
+ : `scale(${HEIGHT_SCALE})`;
94
108
  const TEXT_END_SCALE = 'scale(1)';
95
- if (backButtonTextEl && backButtonTextBox) {
96
- /**
97
- * When the title and back button texts match then they should overlap during the
98
- * page transition. If the texts do not match up then the back button text scale
99
- * adjusts to not perfectly match the large title text otherwise the proportions
100
- * will be incorrect. When the texts match we scale both the width and height to
101
- * account for font weight differences between the title and back button.
102
- */
103
- const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
104
- WIDTH_SCALE = largeTitleTextBox.width / backButtonTextBox.width;
105
- /**
106
- * Subtract an offset to account for slight sizing/padding differences between the
107
- * title and the back button.
108
- */
109
- HEIGHT_SCALE = (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET) / backButtonTextBox.height;
110
- if (doTitleAndButtonTextsMatch) {
111
- TEXT_START_SCALE = `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})`;
112
- }
113
- }
114
109
  const backButtonIconEl = shadow(backButtonEl).querySelector('ion-icon');
115
110
  const backButtonIconBox = backButtonIconEl.getBoundingClientRect();
116
111
  /**
@@ -207,11 +202,11 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
207
202
  top: '0px',
208
203
  [CONTAINER_ORIGIN_X]: '0px',
209
204
  })
210
- /**
211
- * The write hooks must be set on this animation as it is guaranteed to run. Other
212
- * animations such as the back button text animation will not run if the back button
213
- * has no visible text.
214
- */
205
+ .keyframes(CONTAINER_KEYFRAMES);
206
+ enteringBackButtonTextAnimation
207
+ .beforeStyles({
208
+ 'transform-origin': `${TEXT_ORIGIN_X} top`,
209
+ })
215
210
  .beforeAddWrite(() => {
216
211
  backButtonEl.style.setProperty('display', 'none');
217
212
  clonedBackButtonEl.style.setProperty(TEXT_ORIGIN_X, BACK_BUTTON_START_OFFSET);
@@ -220,11 +215,6 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
220
215
  backButtonEl.style.setProperty('display', '');
221
216
  clonedBackButtonEl.style.setProperty('display', 'none');
222
217
  clonedBackButtonEl.style.removeProperty(TEXT_ORIGIN_X);
223
- })
224
- .keyframes(CONTAINER_KEYFRAMES);
225
- enteringBackButtonTextAnimation
226
- .beforeStyles({
227
- 'transform-origin': `${TEXT_ORIGIN_X} top`,
228
218
  })
229
219
  .keyframes(TEXT_KEYFRAMES);
230
220
  enteringBackButtonIconAnimation
@@ -238,7 +228,7 @@ const animateBackButton = (rootAnimation, rtl, backDirection, backButtonEl, back
238
228
  enteringBackButtonAnimation,
239
229
  ]);
240
230
  };
241
- const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, largeTitleTextBox, backButtonBox, backButtonTextEl, backButtonTextBox) => {
231
+ const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, largeTitleBox, largeTitleTextBox, backButtonTextEl, backButtonTextBox) => {
242
232
  var _a, _b;
243
233
  /**
244
234
  * The horizontal transform origin for the large title
@@ -258,65 +248,52 @@ const animateLargeTitle = (rootAnimation, rtl, backDirection, largeTitleEl, larg
258
248
  * title and the back button due to padding and font weight.
259
249
  */
260
250
  const LARGE_TITLE_TRANSLATION_OFFSET = 8;
261
- let END_TRANSLATE_X = rtl
262
- ? `-${window.innerWidth - backButtonBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
263
- : `${backButtonBox.x + LARGE_TITLE_TRANSLATION_OFFSET}px`;
264
251
  /**
265
- * How much to scale the large title up/down by.
252
+ * The scaled title should (roughly) overlap the back button.
253
+ * This ensures that the back button and title overlap during
254
+ * the animation. Note that since both elements either fade in
255
+ * or fade out over the course of the animation, neither element
256
+ * will be fully visible on top of the other. As a result, the overlap
257
+ * does not need to be perfect, so approximate values are acceptable here.
266
258
  */
267
- let HEIGHT_SCALE = 0.5;
259
+ const END_TRANSLATE_X = rtl
260
+ ? `-${window.innerWidth - backButtonTextBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
261
+ : `${backButtonTextBox.x - LARGE_TITLE_TRANSLATION_OFFSET}px`;
268
262
  /**
269
- * The large title always starts full size.
263
+ * The top of the scaled large title
264
+ * should match with the top of the
265
+ * back button text element.
266
+ * We subtract 2px to account for the top padding
267
+ * on the large title element.
270
268
  */
271
- const START_SCALE = 'scale(1)';
269
+ const LARGE_TITLE_TOP_PADDING = 2;
270
+ const END_TRANSLATE_Y = `${backButtonTextBox.y - LARGE_TITLE_TOP_PADDING}px`;
272
271
  /**
273
- * By default, we don't worry about having the large title scaled to perfectly
274
- * match the back button because we don't know if the back button's text matches
275
- * the large title's text.
272
+ * In the forward direction, the large title should start at its
273
+ * normal size and then scale down to be (roughly) the size of the
274
+ * back button on the other view. In the backward direction, the
275
+ * large title should start at (roughly) the size of the back button
276
+ * and then scale up to its original size.
277
+ *
278
+ * Note that since both elements either fade in
279
+ * or fade out over the course of the animation, neither element
280
+ * will be fully visible on top of the other. As a result, the overlap
281
+ * does not need to be perfect, so approximate values are acceptable here.
276
282
  */
277
- let END_SCALE = `scale(${HEIGHT_SCALE})`;
278
- // Text element not rendered if developers pass text="" to the back button
279
- if (backButtonTextEl && backButtonTextBox) {
280
- /**
281
- * The scaled title should (roughly) overlap the back button. This ensures that
282
- * the back button and title overlap during the animation. Note that since both
283
- * elements either fade in or fade out over the course of the animation, neither
284
- * element will be fully visible on top of the other. As a result, the overlap
285
- * does not need to be perfect, so approximate values are acceptable here.
286
- */
287
- END_TRANSLATE_X = rtl
288
- ? `-${window.innerWidth - backButtonTextBox.right - LARGE_TITLE_TRANSLATION_OFFSET}px`
289
- : `${backButtonTextBox.x - LARGE_TITLE_TRANSLATION_OFFSET}px`;
290
- /**
291
- * In the forward direction, the large title should start at its normal size and
292
- * then scale down to be (roughly) the size of the back button on the other view.
293
- * In the backward direction, the large title should start at (roughly) the size
294
- * of the back button and then scale up to its original size.
295
- * Note that since both elements either fade in or fade out over the course of the
296
- * animation, neither element will be fully visible on top of the other. As a result,
297
- * the overlap does not need to be perfect, so approximate values are acceptable here.
298
- */
299
- /**
300
- * When the title and back button texts match then they should overlap during the
301
- * page transition. If the texts do not match up then the large title text scale
302
- * adjusts to not perfectly match the back button text otherwise the proportions
303
- * will be incorrect. When the texts match we scale both the width and height to
304
- * account for font weight differences between the title and back button.
305
- */
306
- const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
307
- const WIDTH_SCALE = backButtonTextBox.width / largeTitleTextBox.width;
308
- HEIGHT_SCALE = backButtonTextBox.height / (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET);
309
- if (doTitleAndButtonTextsMatch) {
310
- END_SCALE = `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})`;
311
- }
312
- }
313
283
  /**
314
- * The midpoints of the back button and the title should align such that the back
315
- * button and title appear to be centered with each other.
284
+ * When the title and back button texts match
285
+ * then they should overlap during the page transition.
286
+ * If the texts do not match up then the large title text scale adjusts
287
+ * to not perfectly match the back button text otherwise the
288
+ * proportions will be incorrect.
289
+ * When the texts match we scale both the width and height to account for
290
+ * font weight differences between the title and back button.
316
291
  */
317
- const backButtonMidPoint = backButtonBox.top + backButtonBox.height / 2;
318
- const titleMidPoint = (largeTitleBox.height * HEIGHT_SCALE) / 2;
319
- const END_TRANSLATE_Y = `${backButtonMidPoint - titleMidPoint}px`;
292
+ const doTitleAndButtonTextsMatch = ((_a = backButtonTextEl.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === ((_b = largeTitleEl.textContent) === null || _b === void 0 ? void 0 : _b.trim());
293
+ const WIDTH_SCALE = backButtonTextBox.width / largeTitleTextBox.width;
294
+ const HEIGHT_SCALE = backButtonTextBox.height / (largeTitleTextBox.height - LARGE_TITLE_SIZE_OFFSET);
295
+ const START_SCALE = 'scale(1)';
296
+ const END_SCALE = doTitleAndButtonTextsMatch ? `scale(${WIDTH_SCALE}, ${HEIGHT_SCALE})` : `scale(${HEIGHT_SCALE})`;
320
297
  const BACKWARDS_KEYFRAMES = [
321
298
  { offset: 0, opacity: 0, transform: `translate3d(${END_TRANSLATE_X}, ${END_TRANSLATE_Y}, 0) ${END_SCALE}` },
322
299
  { offset: 0.1, opacity: 0 },
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { c as createAnimation } from './animation-6a0c5338.js';
5
- import { g as getIonPageElement } from './index-68278972.js';
5
+ import { g as getIonPageElement } from './index-fae1515c.js';
6
6
  import './index-a5d50daf.js';
7
7
  import './helpers-be245865.js';
8
8
  import './index-a1a47f01.js';
@@ -1,4 +1,4 @@
1
1
  import{__awaiter,__generator}from"tslib";
2
2
  /*!
3
3
  * (C) Ionic http://ionicframework.com - MIT License
4
- */import{w as writeTask,B as Build}from"./index-a1a47f01.js";import{r as raf}from"./helpers-be245865.js";var LIFECYCLE_WILL_ENTER="ionViewWillEnter";var LIFECYCLE_DID_ENTER="ionViewDidEnter";var LIFECYCLE_WILL_LEAVE="ionViewWillLeave";var LIFECYCLE_DID_LEAVE="ionViewDidLeave";var LIFECYCLE_WILL_UNLOAD="ionViewWillUnload";var iosTransitionAnimation=function(){return import("./ios.transition-471e5da1.js")};var mdTransitionAnimation=function(){return import("./md.transition-12c07448.js")};var transition=function(n){return new Promise((function(e,i){writeTask((function(){beforeTransition(n);runTransition(n).then((function(i){if(i.animation){i.animation.destroy()}afterTransition(n);e(i)}),(function(e){afterTransition(n);i(e)}))}))}))};var beforeTransition=function(n){var e=n.enteringEl;var i=n.leavingEl;setZIndex(e,i,n.direction);if(n.showGoBack){e.classList.add("can-go-back")}else{e.classList.remove("can-go-back")}setPageHidden(e,false);e.style.setProperty("pointer-events","none");if(i){setPageHidden(i,false);i.style.setProperty("pointer-events","none")}};var runTransition=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:return[4,getAnimationBuilder(n)];case 1:e=r.sent();i=e&&Build.isBrowser?animation(e,n):noAnimation(n);return[2,i]}}))}))};var afterTransition=function(n){var e=n.enteringEl;var i=n.leavingEl;e.classList.remove("ion-page-invisible");e.style.removeProperty("pointer-events");if(i!==undefined){i.classList.remove("ion-page-invisible");i.style.removeProperty("pointer-events")}};var getAnimationBuilder=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:if(!n.leavingEl||!n.animated||n.duration===0){return[2,undefined]}if(n.animationBuilder){return[2,n.animationBuilder]}if(!(n.mode==="ios"))return[3,2];return[4,iosTransitionAnimation()];case 1:i=r.sent().iosTransitionAnimation;return[3,4];case 2:return[4,mdTransitionAnimation()];case 3:i=r.sent().mdTransitionAnimation;r.label=4;case 4:e=i;return[2,e]}}))}))};var animation=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){var i,r;return __generator(this,(function(t){switch(t.label){case 0:return[4,waitForReady(e,true)];case 1:t.sent();i=n(e.baseEl,e);fireWillEvents(e.enteringEl,e.leavingEl);return[4,playTransition(i,e)];case 2:r=t.sent();if(e.progressCallback){e.progressCallback(undefined)}if(r){fireDidEvents(e.enteringEl,e.leavingEl)}return[2,{hasCompleted:r,animation:i}]}}))}))};var noAnimation=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:e=n.enteringEl;i=n.leavingEl;return[4,waitForReady(n,false)];case 1:r.sent();fireWillEvents(e,i);fireDidEvents(e,i);return[2,{hasCompleted:true}]}}))}))};var waitForReady=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){var i;return __generator(this,(function(r){switch(r.label){case 0:i=n.deepWait!==undefined?n.deepWait:e;if(!i)return[3,2];return[4,Promise.all([deepReady(n.enteringEl),deepReady(n.leavingEl)])];case 1:r.sent();r.label=2;case 2:return[4,notifyViewReady(n.viewIsReady,n.enteringEl)];case 3:r.sent();return[2]}}))}))};var notifyViewReady=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!n)return[3,2];return[4,n(e)];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};var playTransition=function(n,e){var i=e.progressCallback;var r=new Promise((function(e){n.onFinish((function(n){return e(n===1)}))}));if(i){n.progressStart(true);i(n)}else{n.play()}return r};var fireWillEvents=function(n,e){lifecycle(e,LIFECYCLE_WILL_LEAVE);lifecycle(n,LIFECYCLE_WILL_ENTER)};var fireDidEvents=function(n,e){lifecycle(n,LIFECYCLE_DID_ENTER);lifecycle(e,LIFECYCLE_DID_LEAVE)};var lifecycle=function(n,e){if(n){var i=new CustomEvent(e,{bubbles:false,cancelable:false});n.dispatchEvent(i)}};var waitForMount=function(){return new Promise((function(n){return raf((function(){return raf((function(){return n()}))}))}))};var deepReady=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(t){switch(t.label){case 0:e=n;if(!e)return[3,6];if(!(e.componentOnReady!=null))return[3,2];return[4,e.componentOnReady()];case 1:i=t.sent();if(i!=null){return[2]}return[3,4];case 2:if(!(e.__registerHost!=null))return[3,4];r=new Promise((function(n){return raf(n)}));return[4,r];case 3:t.sent();return[2];case 4:return[4,Promise.all(Array.from(e.children).map(deepReady))];case 5:t.sent();t.label=6;case 6:return[2]}}))}))};var setPageHidden=function(n,e){if(e){n.setAttribute("aria-hidden","true");n.classList.add("ion-page-hidden")}else{n.hidden=false;n.removeAttribute("aria-hidden");n.classList.remove("ion-page-hidden")}};var setZIndex=function(n,e,i){if(n!==undefined){n.style.zIndex=i==="back"?"99":"101"}if(e!==undefined){e.style.zIndex="100"}};var getIonPageElement=function(n){if(n.classList.contains("ion-page")){return n}var e=n.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs");if(e){return e}return n};export{LIFECYCLE_WILL_ENTER as L,LIFECYCLE_DID_ENTER as a,LIFECYCLE_WILL_LEAVE as b,LIFECYCLE_DID_LEAVE as c,LIFECYCLE_WILL_UNLOAD as d,deepReady as e,getIonPageElement as g,lifecycle as l,setPageHidden as s,transition as t,waitForMount as w};
4
+ */import{w as writeTask,B as Build}from"./index-a1a47f01.js";import{r as raf}from"./helpers-be245865.js";var LIFECYCLE_WILL_ENTER="ionViewWillEnter";var LIFECYCLE_DID_ENTER="ionViewDidEnter";var LIFECYCLE_WILL_LEAVE="ionViewWillLeave";var LIFECYCLE_DID_LEAVE="ionViewDidLeave";var LIFECYCLE_WILL_UNLOAD="ionViewWillUnload";var iosTransitionAnimation=function(){return import("./ios.transition-a50a9a55.js")};var mdTransitionAnimation=function(){return import("./md.transition-0da92976.js")};var transition=function(n){return new Promise((function(e,i){writeTask((function(){beforeTransition(n);runTransition(n).then((function(i){if(i.animation){i.animation.destroy()}afterTransition(n);e(i)}),(function(e){afterTransition(n);i(e)}))}))}))};var beforeTransition=function(n){var e=n.enteringEl;var i=n.leavingEl;setZIndex(e,i,n.direction);if(n.showGoBack){e.classList.add("can-go-back")}else{e.classList.remove("can-go-back")}setPageHidden(e,false);e.style.setProperty("pointer-events","none");if(i){setPageHidden(i,false);i.style.setProperty("pointer-events","none")}};var runTransition=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:return[4,getAnimationBuilder(n)];case 1:e=r.sent();i=e&&Build.isBrowser?animation(e,n):noAnimation(n);return[2,i]}}))}))};var afterTransition=function(n){var e=n.enteringEl;var i=n.leavingEl;e.classList.remove("ion-page-invisible");e.style.removeProperty("pointer-events");if(i!==undefined){i.classList.remove("ion-page-invisible");i.style.removeProperty("pointer-events")}};var getAnimationBuilder=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:if(!n.leavingEl||!n.animated||n.duration===0){return[2,undefined]}if(n.animationBuilder){return[2,n.animationBuilder]}if(!(n.mode==="ios"))return[3,2];return[4,iosTransitionAnimation()];case 1:i=r.sent().iosTransitionAnimation;return[3,4];case 2:return[4,mdTransitionAnimation()];case 3:i=r.sent().mdTransitionAnimation;r.label=4;case 4:e=i;return[2,e]}}))}))};var animation=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){var i,r;return __generator(this,(function(t){switch(t.label){case 0:return[4,waitForReady(e,true)];case 1:t.sent();i=n(e.baseEl,e);fireWillEvents(e.enteringEl,e.leavingEl);return[4,playTransition(i,e)];case 2:r=t.sent();if(e.progressCallback){e.progressCallback(undefined)}if(r){fireDidEvents(e.enteringEl,e.leavingEl)}return[2,{hasCompleted:r,animation:i}]}}))}))};var noAnimation=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:e=n.enteringEl;i=n.leavingEl;return[4,waitForReady(n,false)];case 1:r.sent();fireWillEvents(e,i);fireDidEvents(e,i);return[2,{hasCompleted:true}]}}))}))};var waitForReady=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){var i;return __generator(this,(function(r){switch(r.label){case 0:i=n.deepWait!==undefined?n.deepWait:e;if(!i)return[3,2];return[4,Promise.all([deepReady(n.enteringEl),deepReady(n.leavingEl)])];case 1:r.sent();r.label=2;case 2:return[4,notifyViewReady(n.viewIsReady,n.enteringEl)];case 3:r.sent();return[2]}}))}))};var notifyViewReady=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!n)return[3,2];return[4,n(e)];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};var playTransition=function(n,e){var i=e.progressCallback;var r=new Promise((function(e){n.onFinish((function(n){return e(n===1)}))}));if(i){n.progressStart(true);i(n)}else{n.play()}return r};var fireWillEvents=function(n,e){lifecycle(e,LIFECYCLE_WILL_LEAVE);lifecycle(n,LIFECYCLE_WILL_ENTER)};var fireDidEvents=function(n,e){lifecycle(n,LIFECYCLE_DID_ENTER);lifecycle(e,LIFECYCLE_DID_LEAVE)};var lifecycle=function(n,e){if(n){var i=new CustomEvent(e,{bubbles:false,cancelable:false});n.dispatchEvent(i)}};var waitForMount=function(){return new Promise((function(n){return raf((function(){return raf((function(){return n()}))}))}))};var deepReady=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(t){switch(t.label){case 0:e=n;if(!e)return[3,6];if(!(e.componentOnReady!=null))return[3,2];return[4,e.componentOnReady()];case 1:i=t.sent();if(i!=null){return[2]}return[3,4];case 2:if(!(e.__registerHost!=null))return[3,4];r=new Promise((function(n){return raf(n)}));return[4,r];case 3:t.sent();return[2];case 4:return[4,Promise.all(Array.from(e.children).map(deepReady))];case 5:t.sent();t.label=6;case 6:return[2]}}))}))};var setPageHidden=function(n,e){if(e){n.setAttribute("aria-hidden","true");n.classList.add("ion-page-hidden")}else{n.hidden=false;n.removeAttribute("aria-hidden");n.classList.remove("ion-page-hidden")}};var setZIndex=function(n,e,i){if(n!==undefined){n.style.zIndex=i==="back"?"99":"101"}if(e!==undefined){e.style.zIndex="100"}};var getIonPageElement=function(n){if(n.classList.contains("ion-page")){return n}var e=n.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs");if(e){return e}return n};export{LIFECYCLE_WILL_ENTER as L,LIFECYCLE_DID_ENTER as a,LIFECYCLE_WILL_LEAVE as b,LIFECYCLE_DID_LEAVE as c,LIFECYCLE_WILL_UNLOAD as d,deepReady as e,getIonPageElement as g,lifecycle as l,setPageHidden as s,transition as t,waitForMount as w};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- export{c as createAnimation}from"./animation-6a0c5338.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./index-68278972.js";export{iosTransitionAnimation}from"./ios.transition-471e5da1.js";export{mdTransitionAnimation}from"./md.transition-12c07448.js";export{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";export{createGesture}from"./index-2cf77112.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./ionic-global-94f25d1b.js";export{c as componentOnReady}from"./helpers-be245865.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./config-49c88215.js";export{o as openURL}from"./theme-01f3f29c.js";export{m as menuController}from"./index-6e05b96e.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./overlays-b874c3c3.js";import"./index-a5d50daf.js";import"./index-a1a47f01.js";import"./gesture-controller-1bf57181.js";import"./hardware-back-button-6107a37c.js";import"./index-9b0d46f4.js";import"./framework-delegate-ed4ba327.js";var IonicSlides=function(e){var o=e.swiper,t=e.extendParams;var s={effect:undefined,direction:"horizontal",initialSlide:0,loop:false,parallax:false,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:false,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:false,freeModeMomentum:true,freeModeMomentumRatio:1,freeModeMomentumBounce:true,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:false,freeModeMinimumVelocity:.02,autoHeight:false,setWrapperSize:false,zoom:{maxRatio:3,minRatio:1,toggle:false},touchRatio:1,touchAngle:45,simulateTouch:true,touchStartPreventDefault:false,shortSwipes:true,longSwipes:true,longSwipesRatio:.5,longSwipesMs:300,followFinger:true,threshold:0,touchMoveStopPropagation:true,touchReleaseOnEdges:false,iOSEdgeSwipeDetection:false,iOSEdgeSwipeThreshold:20,resistance:true,resistanceRatio:.85,watchSlidesProgress:false,watchSlidesVisibility:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,loopAdditionalSlides:0,noSwiping:true,runCallbacksOnInit:true,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:true},flipEffect:{slideShadows:true,limitRotation:true},cubeEffect:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:false},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};if(o.pagination){s.pagination={type:"bullets",clickable:false,hideOnClick:false}}if(o.scrollbar){s.scrollbar={hide:true}}t(s)};export{IonicSlides};
4
+ export{c as createAnimation}from"./animation-6a0c5338.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./index-fae1515c.js";export{iosTransitionAnimation}from"./ios.transition-a50a9a55.js";export{mdTransitionAnimation}from"./md.transition-0da92976.js";export{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";export{createGesture}from"./index-2cf77112.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./ionic-global-94f25d1b.js";export{c as componentOnReady}from"./helpers-be245865.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./config-49c88215.js";export{o as openURL}from"./theme-01f3f29c.js";export{m as menuController}from"./index-6e05b96e.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./overlays-b874c3c3.js";import"./index-a5d50daf.js";import"./index-a1a47f01.js";import"./gesture-controller-1bf57181.js";import"./hardware-back-button-6107a37c.js";import"./index-9b0d46f4.js";import"./framework-delegate-ed4ba327.js";var IonicSlides=function(e){var o=e.swiper,t=e.extendParams;var s={effect:undefined,direction:"horizontal",initialSlide:0,loop:false,parallax:false,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:false,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:false,freeModeMomentum:true,freeModeMomentumRatio:1,freeModeMomentumBounce:true,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:false,freeModeMinimumVelocity:.02,autoHeight:false,setWrapperSize:false,zoom:{maxRatio:3,minRatio:1,toggle:false},touchRatio:1,touchAngle:45,simulateTouch:true,touchStartPreventDefault:false,shortSwipes:true,longSwipes:true,longSwipesRatio:.5,longSwipesMs:300,followFinger:true,threshold:0,touchMoveStopPropagation:true,touchReleaseOnEdges:false,iOSEdgeSwipeDetection:false,iOSEdgeSwipeThreshold:20,resistance:true,resistanceRatio:.85,watchSlidesProgress:false,watchSlidesVisibility:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,loopAdditionalSlides:0,noSwiping:true,runCallbacksOnInit:true,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:true},flipEffect:{slideShadows:true,limitRotation:true},cubeEffect:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:false},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};if(o.pagination){s.pagination={type:"bullets",clickable:false,hideOnClick:false}}if(o.scrollbar){s.scrollbar={hide:true}}t(s)};export{IonicSlides};