@ionic/core 8.5.5-dev.11744727671.1ce813fb → 8.5.5-dev.11744728652.115947e1

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 (36) hide show
  1. package/components/index.js +1 -1
  2. package/components/ion-router.js +4 -4
  3. package/components/ion-segment-button.js +2 -2
  4. package/components/ion-toast.js +2 -2
  5. package/dist/cjs/index.cjs.js +0 -2
  6. package/dist/cjs/ion-route_4.cjs.entry.js +4 -4
  7. package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
  8. package/dist/cjs/ion-toast.cjs.entry.js +2 -2
  9. package/dist/collection/components/router/router.js +4 -4
  10. package/dist/collection/components/segment-button/segment-button.js +2 -2
  11. package/dist/collection/components/toast/toast.js +2 -2
  12. package/dist/collection/index.js +1 -1
  13. package/dist/docs.json +1 -1
  14. package/dist/esm/index.js +1 -1
  15. package/dist/esm/ion-route_4.entry.js +4 -4
  16. package/dist/esm/ion-segment_2.entry.js +2 -2
  17. package/dist/esm/ion-toast.entry.js +2 -2
  18. package/dist/esm-es5/index.js +1 -1
  19. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  20. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  21. package/dist/esm-es5/ion-toast.entry.js +1 -1
  22. package/dist/ionic/index.esm.js +1 -1
  23. package/dist/ionic/ionic.esm.js +1 -1
  24. package/dist/ionic/{p-cf356ebb.system.entry.js → p-1b6232eb.system.entry.js} +1 -1
  25. package/dist/ionic/{p-fcb8b828.entry.js → p-4da92dac.entry.js} +1 -1
  26. package/dist/ionic/p-57e55ecb.system.js +4 -0
  27. package/dist/ionic/{p-7a6a7d75.system.entry.js → p-66df5468.system.entry.js} +2 -2
  28. package/dist/ionic/{p-cc852fe4.system.entry.js → p-6f832afe.system.entry.js} +1 -1
  29. package/dist/ionic/{p-5b6f0155.entry.js → p-8450f761.entry.js} +1 -1
  30. package/dist/ionic/{p-3592aa68.entry.js → p-bad3ea7a.entry.js} +1 -1
  31. package/dist/ionic/p-f725bf9e.system.js +1 -1
  32. package/dist/types/index.d.ts +1 -1
  33. package/hydrate/index.js +8 -8
  34. package/hydrate/index.mjs +8 -8
  35. package/package.json +1 -1
  36. package/dist/ionic/p-4e88c353.system.js +0 -4
@@ -10,7 +10,7 @@ export { g as getTimeGivenProgression } from './cubic-bezier.js';
10
10
  export { createGesture } from './index3.js';
11
11
  export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global.js';
12
12
  export { c as componentOnReady } from './helpers.js';
13
- export { L as LogLevel, p as printIonError, a as printIonWarning } from './index4.js';
13
+ export { L as LogLevel } from './index4.js';
14
14
  export { I as IonicSafeString, g as getMode, s as setupConfig } from './config.js';
15
15
  export { o as openURL } from './theme.js';
16
16
  export { m as menuController } from './index5.js';
@@ -633,19 +633,19 @@ const Router = /*@__PURE__*/ proxyCustomElement(class Router extends HTMLElement
633
633
  /** @internal */
634
634
  async navChanged(direction) {
635
635
  if (this.busy) {
636
- printIonWarning('[ion-router] - router is busy, navChanged was cancelled');
636
+ printIonWarning('[ion-router] - Router is busy, navChanged was cancelled.');
637
637
  return false;
638
638
  }
639
639
  const { ids, outlet } = await readNavState(window.document.body);
640
640
  const routes = readRoutes(this.el);
641
641
  const chain = findChainForIDs(ids, routes);
642
642
  if (!chain) {
643
- printIonWarning('[ion-router] - no matching URL for ', ids.map((i) => i.id));
643
+ printIonWarning('[ion-router] - No matching URL for', ids.map((i) => i.id));
644
644
  return false;
645
645
  }
646
646
  const segments = chainToSegments(chain);
647
647
  if (!segments) {
648
- printIonWarning('[ion-router] - router could not match path because some required param is missing');
648
+ printIonWarning('[ion-router] - Router could not match path because some required param is missing.');
649
649
  return false;
650
650
  }
651
651
  this.setSegments(segments, direction);
@@ -755,7 +755,7 @@ const Router = /*@__PURE__*/ proxyCustomElement(class Router extends HTMLElement
755
755
  }
756
756
  async writeNavState(node, chain, direction, segments, redirectFrom, index = 0, animation) {
757
757
  if (this.busy) {
758
- printIonWarning('[ion-router] - router is busy, transition was cancelled');
758
+ printIonWarning('[ion-router] - Router is busy, transition was cancelled');
759
759
  return false;
760
760
  }
761
761
  this.busy = true;
@@ -104,7 +104,7 @@ const SegmentButton = /*@__PURE__*/ proxyCustomElement(class SegmentButton exten
104
104
  const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
105
105
  const mode = getIonMode(this);
106
106
  const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
107
- return (h(Host, { key: '942543aa0831be593fdcb1c9b2a9d6274960e19d', class: {
107
+ return (h(Host, { key: 'd79dad80db69123510c6d52bbf4424558600c14a', class: {
108
108
  [mode]: true,
109
109
  'in-toolbar': hostContext('ion-toolbar', this.el),
110
110
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
@@ -120,7 +120,7 @@ const SegmentButton = /*@__PURE__*/ proxyCustomElement(class SegmentButton exten
120
120
  'ion-activatable': true,
121
121
  'ion-activatable-instant': true,
122
122
  'ion-focusable': true,
123
- } }, h("button", Object.assign({ key: '8626909ed9845a7415431569a2942ae6e6a66436', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '67e324cb8e4d6eae267e4d26cf31d1171962c189', class: "button-inner" }, h("slot", { key: 'bf2079234feace62d36e61ad575fe7e123d8d8c5' })), mode === 'md' && h("ion-ripple-effect", { key: '8927b08e885b9e48e62fa2cc7f39a0465ece1525' })), h("div", { key: '212d9868d30e7c2d55e818a0208eff575d6caf79', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: '6794df030daed42f8da1d66370b1ddbc48d7ae43', part: "indicator-background", class: "segment-button-indicator-background" }))));
123
+ } }, h("button", Object.assign({ key: '781fd7fef443a2fbd404b8a399d1203794759a69', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '64df08f60ea17481183f8ad284884b9979eaeb24', class: "button-inner" }, h("slot", { key: '2b7ef328023ab5ccc0adc6f865e5e7121467eeb8' })), mode === 'md' && h("ion-ripple-effect", { key: '1fd5e6179227925a03b6c3b5258bbf4ea99bfef1' })), h("div", { key: 'dbcedad6988b0eadeebe02bdafdedb8eb37af19c', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: 'f4f1789f66bdfa2de5445bc0d292116a93bad7cc', part: "indicator-background", class: "segment-button-indicator-background" }))));
124
124
  }
125
125
  get el() { return this; }
126
126
  static get watchers() { return {
@@ -831,9 +831,9 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class Toast extends HTMLElement {
831
831
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
832
832
  printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
833
833
  }
834
- return (h(Host, Object.assign({ key: '2eed5d7f9d3b7aa54517cba8252aebd45f1c370e', tabindex: "-1" }, this.htmlAttributes, { style: {
834
+ return (h(Host, Object.assign({ key: 'a2216d860255c99337464370dcb12f6125871a50', tabindex: "-1" }, this.htmlAttributes, { style: {
835
835
  zIndex: `${60000 + this.overlayIndex}`,
836
- }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'b5e862b039db0f09b94b34061521dbd992642d10', class: wrapperClass }, h("div", { key: '719468757a222c08e4ffc12b2ba7019198b167b2', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: 'f5f7c75cd65119e4b2e4e2a8bbab4e627b5b0cfd', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '44c3880f89cd69fab10396568593162e275feb0f', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
836
+ }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'd5adf8bc4c6c52431600033a76c4795689f9b412', class: wrapperClass }, h("div", { key: 'ab694497ae37ceba123217eb48800129b9bebb84', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '224854fa3989ce0eb69416cb5b0cc55fc9f131ea', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: 'c8e11fb5bdac202987f5c8613a0ebbd42bda946e', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
837
837
  }
838
838
  get el() { return this; }
839
839
  static get watchers() { return {
@@ -144,8 +144,6 @@ Object.defineProperty(exports, 'LogLevel', {
144
144
  return index$2.LogLevel;
145
145
  }
146
146
  });
147
- exports.printIonError = index$2.printIonError;
148
- exports.printIonWarning = index$2.printIonWarning;
149
147
  exports.IonicSafeString = config.IonicSafeString;
150
148
  exports.getMode = config.getMode;
151
149
  exports.setupConfig = config.setupConfig;
@@ -697,19 +697,19 @@ const Router = class {
697
697
  /** @internal */
698
698
  async navChanged(direction) {
699
699
  if (this.busy) {
700
- index$1.printIonWarning('[ion-router] - router is busy, navChanged was cancelled');
700
+ index$1.printIonWarning('[ion-router] - Router is busy, navChanged was cancelled.');
701
701
  return false;
702
702
  }
703
703
  const { ids, outlet } = await readNavState(window.document.body);
704
704
  const routes = readRoutes(this.el);
705
705
  const chain = findChainForIDs(ids, routes);
706
706
  if (!chain) {
707
- index$1.printIonWarning('[ion-router] - no matching URL for ', ids.map((i) => i.id));
707
+ index$1.printIonWarning('[ion-router] - No matching URL for', ids.map((i) => i.id));
708
708
  return false;
709
709
  }
710
710
  const segments = chainToSegments(chain);
711
711
  if (!segments) {
712
- index$1.printIonWarning('[ion-router] - router could not match path because some required param is missing');
712
+ index$1.printIonWarning('[ion-router] - Router could not match path because some required param is missing.');
713
713
  return false;
714
714
  }
715
715
  this.setSegments(segments, direction);
@@ -819,7 +819,7 @@ const Router = class {
819
819
  }
820
820
  async writeNavState(node, chain, direction, segments, redirectFrom, index = 0, animation) {
821
821
  if (this.busy) {
822
- index$1.printIonWarning('[ion-router] - router is busy, transition was cancelled');
822
+ index$1.printIonWarning('[ion-router] - Router is busy, transition was cancelled');
823
823
  return false;
824
824
  }
825
825
  this.busy = true;
@@ -657,7 +657,7 @@ const SegmentButton = class {
657
657
  const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
658
658
  const mode = ionicGlobal.getIonMode(this);
659
659
  const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
660
- return (index.h(index.Host, { key: '942543aa0831be593fdcb1c9b2a9d6274960e19d', class: {
660
+ return (index.h(index.Host, { key: 'd79dad80db69123510c6d52bbf4424558600c14a', class: {
661
661
  [mode]: true,
662
662
  'in-toolbar': theme.hostContext('ion-toolbar', this.el),
663
663
  'in-toolbar-color': theme.hostContext('ion-toolbar[color]', this.el),
@@ -673,7 +673,7 @@ const SegmentButton = class {
673
673
  'ion-activatable': true,
674
674
  'ion-activatable-instant': true,
675
675
  'ion-focusable': true,
676
- } }, index.h("button", Object.assign({ key: '8626909ed9845a7415431569a2942ae6e6a66436', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), index.h("span", { key: '67e324cb8e4d6eae267e4d26cf31d1171962c189', class: "button-inner" }, index.h("slot", { key: 'bf2079234feace62d36e61ad575fe7e123d8d8c5' })), mode === 'md' && index.h("ion-ripple-effect", { key: '8927b08e885b9e48e62fa2cc7f39a0465ece1525' })), index.h("div", { key: '212d9868d30e7c2d55e818a0208eff575d6caf79', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, index.h("div", { key: '6794df030daed42f8da1d66370b1ddbc48d7ae43', part: "indicator-background", class: "segment-button-indicator-background" }))));
676
+ } }, index.h("button", Object.assign({ key: '781fd7fef443a2fbd404b8a399d1203794759a69', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), index.h("span", { key: '64df08f60ea17481183f8ad284884b9979eaeb24', class: "button-inner" }, index.h("slot", { key: '2b7ef328023ab5ccc0adc6f865e5e7121467eeb8' })), mode === 'md' && index.h("ion-ripple-effect", { key: '1fd5e6179227925a03b6c3b5258bbf4ea99bfef1' })), index.h("div", { key: 'dbcedad6988b0eadeebe02bdafdedb8eb37af19c', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, index.h("div", { key: 'f4f1789f66bdfa2de5445bc0d292116a93bad7cc', part: "indicator-background", class: "segment-button-indicator-background" }))));
677
677
  }
678
678
  get el() { return index.getElement(this); }
679
679
  static get watchers() { return {
@@ -832,9 +832,9 @@ const Toast = class {
832
832
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
833
833
  index$1.printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
834
834
  }
835
- return (index$3.h(index$3.Host, Object.assign({ key: '2eed5d7f9d3b7aa54517cba8252aebd45f1c370e', tabindex: "-1" }, this.htmlAttributes, { style: {
835
+ return (index$3.h(index$3.Host, Object.assign({ key: 'a2216d860255c99337464370dcb12f6125871a50', tabindex: "-1" }, this.htmlAttributes, { style: {
836
836
  zIndex: `${60000 + this.overlayIndex}`,
837
- }, class: theme.createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), index$3.h("div", { key: 'b5e862b039db0f09b94b34061521dbd992642d10', class: wrapperClass }, index$3.h("div", { key: '719468757a222c08e4ffc12b2ba7019198b167b2', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index$3.h("ion-icon", { key: 'f5f7c75cd65119e4b2e4e2a8bbab4e627b5b0cfd', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index$3.h("div", { key: '44c3880f89cd69fab10396568593162e275feb0f', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
837
+ }, class: theme.createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), index$3.h("div", { key: 'd5adf8bc4c6c52431600033a76c4795689f9b412', class: wrapperClass }, index$3.h("div", { key: 'ab694497ae37ceba123217eb48800129b9bebb84', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index$3.h("ion-icon", { key: '224854fa3989ce0eb69416cb5b0cc55fc9f131ea', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index$3.h("div", { key: 'c8e11fb5bdac202987f5c8613a0ebbd42bda946e', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
838
838
  }
839
839
  get el() { return index$3.getElement(this); }
840
840
  static get watchers() { return {
@@ -107,19 +107,19 @@ export class Router {
107
107
  /** @internal */
108
108
  async navChanged(direction) {
109
109
  if (this.busy) {
110
- printIonWarning('[ion-router] - router is busy, navChanged was cancelled');
110
+ printIonWarning('[ion-router] - Router is busy, navChanged was cancelled.');
111
111
  return false;
112
112
  }
113
113
  const { ids, outlet } = await readNavState(window.document.body);
114
114
  const routes = readRoutes(this.el);
115
115
  const chain = findChainForIDs(ids, routes);
116
116
  if (!chain) {
117
- printIonWarning('[ion-router] - no matching URL for ', ids.map((i) => i.id));
117
+ printIonWarning('[ion-router] - No matching URL for', ids.map((i) => i.id));
118
118
  return false;
119
119
  }
120
120
  const segments = chainToSegments(chain);
121
121
  if (!segments) {
122
- printIonWarning('[ion-router] - router could not match path because some required param is missing');
122
+ printIonWarning('[ion-router] - Router could not match path because some required param is missing.');
123
123
  return false;
124
124
  }
125
125
  this.setSegments(segments, direction);
@@ -229,7 +229,7 @@ export class Router {
229
229
  }
230
230
  async writeNavState(node, chain, direction, segments, redirectFrom, index = 0, animation) {
231
231
  if (this.busy) {
232
- printIonWarning('[ion-router] - router is busy, transition was cancelled');
232
+ printIonWarning('[ion-router] - Router is busy, transition was cancelled');
233
233
  return false;
234
234
  }
235
235
  this.busy = true;
@@ -100,7 +100,7 @@ export class SegmentButton {
100
100
  const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
101
101
  const mode = getIonMode(this);
102
102
  const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
103
- return (h(Host, { key: '942543aa0831be593fdcb1c9b2a9d6274960e19d', class: {
103
+ return (h(Host, { key: 'd79dad80db69123510c6d52bbf4424558600c14a', class: {
104
104
  [mode]: true,
105
105
  'in-toolbar': hostContext('ion-toolbar', this.el),
106
106
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
@@ -116,7 +116,7 @@ export class SegmentButton {
116
116
  'ion-activatable': true,
117
117
  'ion-activatable-instant': true,
118
118
  'ion-focusable': true,
119
- } }, h("button", Object.assign({ key: '8626909ed9845a7415431569a2942ae6e6a66436', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '67e324cb8e4d6eae267e4d26cf31d1171962c189', class: "button-inner" }, h("slot", { key: 'bf2079234feace62d36e61ad575fe7e123d8d8c5' })), mode === 'md' && h("ion-ripple-effect", { key: '8927b08e885b9e48e62fa2cc7f39a0465ece1525' })), h("div", { key: '212d9868d30e7c2d55e818a0208eff575d6caf79', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: '6794df030daed42f8da1d66370b1ddbc48d7ae43', part: "indicator-background", class: "segment-button-indicator-background" }))));
119
+ } }, h("button", Object.assign({ key: '781fd7fef443a2fbd404b8a399d1203794759a69', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '64df08f60ea17481183f8ad284884b9979eaeb24', class: "button-inner" }, h("slot", { key: '2b7ef328023ab5ccc0adc6f865e5e7121467eeb8' })), mode === 'md' && h("ion-ripple-effect", { key: '1fd5e6179227925a03b6c3b5258bbf4ea99bfef1' })), h("div", { key: 'dbcedad6988b0eadeebe02bdafdedb8eb37af19c', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: 'f4f1789f66bdfa2de5445bc0d292116a93bad7cc', part: "indicator-background", class: "segment-button-indicator-background" }))));
120
120
  }
121
121
  static get is() { return "ion-segment-button"; }
122
122
  static get encapsulation() { return "shadow"; }
@@ -391,9 +391,9 @@ export class Toast {
391
391
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
392
392
  printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
393
393
  }
394
- return (h(Host, Object.assign({ key: '2eed5d7f9d3b7aa54517cba8252aebd45f1c370e', tabindex: "-1" }, this.htmlAttributes, { style: {
394
+ return (h(Host, Object.assign({ key: 'a2216d860255c99337464370dcb12f6125871a50', tabindex: "-1" }, this.htmlAttributes, { style: {
395
395
  zIndex: `${60000 + this.overlayIndex}`,
396
- }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'b5e862b039db0f09b94b34061521dbd992642d10', class: wrapperClass }, h("div", { key: '719468757a222c08e4ffc12b2ba7019198b167b2', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: 'f5f7c75cd65119e4b2e4e2a8bbab4e627b5b0cfd', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '44c3880f89cd69fab10396568593162e275feb0f', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
396
+ }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'd5adf8bc4c6c52431600033a76c4795689f9b412', class: wrapperClass }, h("div", { key: 'ab694497ae37ceba123217eb48800129b9bebb84', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '224854fa3989ce0eb69416cb5b0cc55fc9f131ea', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: 'c8e11fb5bdac202987f5c8613a0ebbd42bda946e', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
397
397
  }
398
398
  static get is() { return "ion-toast"; }
399
399
  static get encapsulation() { return "shadow"; }
@@ -10,7 +10,7 @@ export { getTimeGivenProgression } from './utils/animation/cubic-bezier';
10
10
  export { createGesture } from './utils/gesture';
11
11
  export { initialize } from './global/ionic-global';
12
12
  export { componentOnReady } from './utils/helpers';
13
- export { LogLevel, printIonError, printIonWarning } from './utils/logging';
13
+ export { LogLevel } from './utils/logging';
14
14
  export { isPlatform, getPlatforms } from './utils/platform';
15
15
  export { IonicSafeString } from './utils/sanitization';
16
16
  export { getMode, setupConfig } from './utils/config';
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-04-15T14:36:18",
2
+ "timestamp": "2025-04-15T14:52:40",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.20.0",
package/dist/esm/index.js CHANGED
@@ -9,7 +9,7 @@ export { g as getTimeGivenProgression } from './cubic-bezier-fe2083dc.js';
9
9
  export { createGesture } from './index-39782642.js';
10
10
  export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global-b26f573e.js';
11
11
  export { c as componentOnReady } from './helpers-d94bc8ad.js';
12
- export { L as LogLevel, d as printIonError, p as printIonWarning } from './index-cfd9c1f2.js';
12
+ export { L as LogLevel } from './index-cfd9c1f2.js';
13
13
  export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-9898ed97.js';
14
14
  export { o as openURL } from './theme-01f3f29c.js';
15
15
  export { m as menuController } from './index-18f31305.js';
@@ -693,19 +693,19 @@ const Router = class {
693
693
  /** @internal */
694
694
  async navChanged(direction) {
695
695
  if (this.busy) {
696
- printIonWarning('[ion-router] - router is busy, navChanged was cancelled');
696
+ printIonWarning('[ion-router] - Router is busy, navChanged was cancelled.');
697
697
  return false;
698
698
  }
699
699
  const { ids, outlet } = await readNavState(window.document.body);
700
700
  const routes = readRoutes(this.el);
701
701
  const chain = findChainForIDs(ids, routes);
702
702
  if (!chain) {
703
- printIonWarning('[ion-router] - no matching URL for ', ids.map((i) => i.id));
703
+ printIonWarning('[ion-router] - No matching URL for', ids.map((i) => i.id));
704
704
  return false;
705
705
  }
706
706
  const segments = chainToSegments(chain);
707
707
  if (!segments) {
708
- printIonWarning('[ion-router] - router could not match path because some required param is missing');
708
+ printIonWarning('[ion-router] - Router could not match path because some required param is missing.');
709
709
  return false;
710
710
  }
711
711
  this.setSegments(segments, direction);
@@ -815,7 +815,7 @@ const Router = class {
815
815
  }
816
816
  async writeNavState(node, chain, direction, segments, redirectFrom, index = 0, animation) {
817
817
  if (this.busy) {
818
- printIonWarning('[ion-router] - router is busy, transition was cancelled');
818
+ printIonWarning('[ion-router] - Router is busy, transition was cancelled');
819
819
  return false;
820
820
  }
821
821
  this.busy = true;
@@ -653,7 +653,7 @@ const SegmentButton = class {
653
653
  const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
654
654
  const mode = getIonMode(this);
655
655
  const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
656
- return (h(Host, { key: '942543aa0831be593fdcb1c9b2a9d6274960e19d', class: {
656
+ return (h(Host, { key: 'd79dad80db69123510c6d52bbf4424558600c14a', class: {
657
657
  [mode]: true,
658
658
  'in-toolbar': hostContext('ion-toolbar', this.el),
659
659
  'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
@@ -669,7 +669,7 @@ const SegmentButton = class {
669
669
  'ion-activatable': true,
670
670
  'ion-activatable-instant': true,
671
671
  'ion-focusable': true,
672
- } }, h("button", Object.assign({ key: '8626909ed9845a7415431569a2942ae6e6a66436', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '67e324cb8e4d6eae267e4d26cf31d1171962c189', class: "button-inner" }, h("slot", { key: 'bf2079234feace62d36e61ad575fe7e123d8d8c5' })), mode === 'md' && h("ion-ripple-effect", { key: '8927b08e885b9e48e62fa2cc7f39a0465ece1525' })), h("div", { key: '212d9868d30e7c2d55e818a0208eff575d6caf79', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: '6794df030daed42f8da1d66370b1ddbc48d7ae43', part: "indicator-background", class: "segment-button-indicator-background" }))));
672
+ } }, h("button", Object.assign({ key: '781fd7fef443a2fbd404b8a399d1203794759a69', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '64df08f60ea17481183f8ad284884b9979eaeb24', class: "button-inner" }, h("slot", { key: '2b7ef328023ab5ccc0adc6f865e5e7121467eeb8' })), mode === 'md' && h("ion-ripple-effect", { key: '1fd5e6179227925a03b6c3b5258bbf4ea99bfef1' })), h("div", { key: 'dbcedad6988b0eadeebe02bdafdedb8eb37af19c', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: 'f4f1789f66bdfa2de5445bc0d292116a93bad7cc', part: "indicator-background", class: "segment-button-indicator-background" }))));
673
673
  }
674
674
  get el() { return getElement(this); }
675
675
  static get watchers() { return {
@@ -828,9 +828,9 @@ const Toast = class {
828
828
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
829
829
  printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
830
830
  }
831
- return (h(Host, Object.assign({ key: '2eed5d7f9d3b7aa54517cba8252aebd45f1c370e', tabindex: "-1" }, this.htmlAttributes, { style: {
831
+ return (h(Host, Object.assign({ key: 'a2216d860255c99337464370dcb12f6125871a50', tabindex: "-1" }, this.htmlAttributes, { style: {
832
832
  zIndex: `${60000 + this.overlayIndex}`,
833
- }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'b5e862b039db0f09b94b34061521dbd992642d10', class: wrapperClass }, h("div", { key: '719468757a222c08e4ffc12b2ba7019198b167b2', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: 'f5f7c75cd65119e4b2e4e2a8bbab4e627b5b0cfd', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '44c3880f89cd69fab10396568593162e275feb0f', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
833
+ }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'd5adf8bc4c6c52431600033a76c4795689f9b412', class: wrapperClass }, h("div", { key: 'ab694497ae37ceba123217eb48800129b9bebb84', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '224854fa3989ce0eb69416cb5b0cc55fc9f131ea', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: 'c8e11fb5bdac202987f5c8613a0ebbd42bda946e', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
834
834
  }
835
835
  get el() { return getElement(this); }
836
836
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- export{c as createAnimation}from"./animation-8b25e105.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-68c0d151.js";export{iosTransitionAnimation}from"./ios.transition-4047cb68.js";export{mdTransitionAnimation}from"./md.transition-30ce8d1b.js";export{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";export{createGesture}from"./index-39782642.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./ionic-global-b26f573e.js";export{c as componentOnReady}from"./helpers-d94bc8ad.js";export{L as LogLevel,d as printIonError,p as printIonWarning}from"./index-cfd9c1f2.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./config-9898ed97.js";export{o as openURL}from"./theme-01f3f29c.js";export{m as menuController}from"./index-18f31305.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-d99dcb0a.js";import"./index-a5d50daf.js";import"./index-527b9e34.js";import"./gesture-controller-314a54f6.js";import"./hardware-back-button-a7eb8233.js";import"./framework-delegate-56b467ad.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-8b25e105.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-68c0d151.js";export{iosTransitionAnimation}from"./ios.transition-4047cb68.js";export{mdTransitionAnimation}from"./md.transition-30ce8d1b.js";export{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";export{createGesture}from"./index-39782642.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./ionic-global-b26f573e.js";export{c as componentOnReady}from"./helpers-d94bc8ad.js";export{L as LogLevel}from"./index-cfd9c1f2.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./config-9898ed97.js";export{o as openURL}from"./theme-01f3f29c.js";export{m as menuController}from"./index-18f31305.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-d99dcb0a.js";import"./index-a5d50daf.js";import"./index-527b9e34.js";import"./gesture-controller-314a54f6.js";import"./hardware-back-button-a7eb8233.js";import"./framework-delegate-56b467ad.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};
@@ -1,4 +1,4 @@
1
1
  import{__awaiter,__generator,__spreadArray}from"tslib";
2
2
  /*!
3
3
  * (C) Ionic http://ionicframework.com - MIT License
4
- */import{r as registerInstance,c as createEvent,f as getElement,h,e as Host}from"./index-527b9e34.js";import{c as componentOnReady,p as debounce}from"./helpers-d94bc8ad.js";import{d as printIonError,p as printIonWarning}from"./index-cfd9c1f2.js";import{o as openURL,c as createColorClasses}from"./theme-01f3f29c.js";import{b as getIonMode}from"./ionic-global-b26f573e.js";var Route=function(){function r(r){registerInstance(this,r);this.ionRouteDataChanged=createEvent(this,"ionRouteDataChanged",7);this.url="";this.component=undefined;this.componentProps=undefined;this.beforeLeave=undefined;this.beforeEnter=undefined}r.prototype.onUpdate=function(r){this.ionRouteDataChanged.emit(r)};r.prototype.onComponentProps=function(r,e){if(r===e){return}var t=r?Object.keys(r):[];var n=e?Object.keys(e):[];if(t.length!==n.length){this.onUpdate(r);return}for(var i=0,a=t;i<a.length;i++){var o=a[i];if(r[o]!==e[o]){this.onUpdate(r);return}}};r.prototype.connectedCallback=function(){this.ionRouteDataChanged.emit()};Object.defineProperty(r,"watchers",{get:function(){return{url:["onUpdate"],component:["onUpdate"],componentProps:["onComponentProps"]}},enumerable:false,configurable:true});return r}();var RouteRedirect=function(){function r(r){registerInstance(this,r);this.ionRouteRedirectChanged=createEvent(this,"ionRouteRedirectChanged",7);this.from=undefined;this.to=undefined}r.prototype.propDidChange=function(){this.ionRouteRedirectChanged.emit()};r.prototype.connectedCallback=function(){this.ionRouteRedirectChanged.emit()};Object.defineProperty(r,"watchers",{get:function(){return{from:["propDidChange"],to:["propDidChange"]}},enumerable:false,configurable:true});return r}();var ROUTER_INTENT_NONE="root";var ROUTER_INTENT_FORWARD="forward";var ROUTER_INTENT_BACK="back";var generatePath=function(r){var e=r.filter((function(r){return r.length>0})).join("/");return"/"+e};var generateUrl=function(r,e,t){var n=generatePath(r);if(e){n="#"+n}if(t!==undefined){n+="?"+t}return n};var writeSegments=function(r,e,t,n,i,a,o){var u=generateUrl(__spreadArray(__spreadArray([],parsePath(e).segments,true),n,true),t,o);if(i===ROUTER_INTENT_FORWARD){r.pushState(a,"",u)}else{r.replaceState(a,"",u)}};var chainToSegments=function(r){var e=[];for(var t=0,n=r;t<n.length;t++){var i=n[t];for(var a=0,o=i.segments;a<o.length;a++){var u=o[a];if(u[0]===":"){var s=i.params&&i.params[u.slice(1)];if(!s){return null}e.push(s)}else if(u!==""){e.push(u)}}}return e};var removePrefix=function(r,e){if(r.length>e.length){return null}if(r.length<=1&&r[0]===""){return e}for(var t=0;t<r.length;t++){if(r[t]!==e[t]){return null}}if(e.length===r.length){return[""]}return e.slice(r.length)};var readSegments=function(r,e,t){var n=parsePath(e).segments;var i=t?r.hash.slice(1):r.pathname;var a=parsePath(i).segments;return removePrefix(n,a)};var parsePath=function(r){var e=[""];var t;if(r!=null){var n=r.indexOf("?");if(n>-1){t=r.substring(n+1);r=r.substring(0,n)}e=r.split("/").map((function(r){return r.trim()})).filter((function(r){return r.length>0}));if(e.length===0){e=[""]}}return{segments:e,queryString:t}};var printRoutes=function(r){console.group("[ion-core] ROUTES[".concat(r.length,"]"));var e=function(r){var e=[];r.forEach((function(r){return e.push.apply(e,r.segments)}));var t=r.map((function(r){return r.id}));console.debug("%c ".concat(generatePath(e)),"font-weight: bold; padding-left: 20px","=>\t","(".concat(t.join(", "),")"))};for(var t=0,n=r;t<n.length;t++){var i=n[t];e(i)}console.groupEnd()};var printRedirects=function(r){console.group("[ion-core] REDIRECTS[".concat(r.length,"]"));for(var e=0,t=r;e<t.length;e++){var n=t[e];if(n.to){console.debug("FROM: ","$c ".concat(generatePath(n.from)),"font-weight: bold"," TO: ","$c ".concat(generatePath(n.to.segments)),"font-weight: bold")}}console.groupEnd()};var writeNavState=function(r,e,t,n){var i=[];for(var a=4;a<arguments.length;a++){i[a-4]=arguments[a]}return __awaiter(void 0,__spreadArray([r,e,t,n],i,true),void 0,(function(r,e,t,n,i,a){var o,u,s,f;if(i===void 0){i=false}return __generator(this,(function(c){switch(c.label){case 0:c.trys.push([0,6,,7]);o=searchNavNode(r);if(n>=e.length||!o){return[2,i]}return[4,new Promise((function(r){return componentOnReady(o,r)}))];case 1:c.sent();u=e[n];return[4,o.setRouteId(u.id,u.params,t,a)];case 2:s=c.sent();if(s.changed){t=ROUTER_INTENT_NONE;i=true}return[4,writeNavState(s.element,e,t,n+1,i,a)];case 3:i=c.sent();if(!s.markVisible)return[3,5];return[4,s.markVisible()];case 4:c.sent();c.label=5;case 5:return[2,i];case 6:f=c.sent();printIonError("[ion-router] - Exception in writeNavState:",f);return[2,false];case 7:return[2]}}))}))};var readNavState=function(r){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(a){switch(a.label){case 0:e=[];n=r;a.label=1;case 1:if(!(t=searchNavNode(n)))return[3,3];return[4,t.getRouteId()];case 2:i=a.sent();if(i){n=i.element;i.element=undefined;e.push(i)}else{return[3,3]}return[3,1];case 3:return[2,{ids:e,outlet:t}]}}))}))};var waitUntilNavNode=function(){if(searchNavNode(document.body)){return Promise.resolve()}return new Promise((function(r){window.addEventListener("ionNavWillLoad",(function(){return r()}),{once:true})}))};var OUTLET_SELECTOR=":not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet";var searchNavNode=function(r){if(!r){return undefined}if(r.matches(OUTLET_SELECTOR)){return r}var e=r.querySelector(OUTLET_SELECTOR);return e!==null&&e!==void 0?e:undefined};var matchesRedirect=function(r,e){var t=e.from,n=e.to;if(n===undefined){return false}if(t.length>r.length){return false}for(var i=0;i<t.length;i++){var a=t[i];if(a==="*"){return true}if(a!==r[i]){return false}}return t.length===r.length};var findRouteRedirect=function(r,e){return e.find((function(e){return matchesRedirect(r,e)}))};var matchesIDs=function(r,e){var t=Math.min(r.length,e.length);var n=0;for(var i=0;i<t;i++){var a=r[i];var o=e[i];if(a.id.toLowerCase()!==o.id){break}if(a.params){var u=Object.keys(a.params);if(u.length===o.segments.length){var s=u.map((function(r){return":".concat(r)}));for(var f=0;f<s.length;f++){if(s[f].toLowerCase()!==o.segments[f]){break}n++}}}n++}return n};var matchesSegments=function(r,e){var t=new RouterSegments(r);var n=false;var i;for(var a=0;a<e.length;a++){var o=e[a].segments;if(o[0]===""){n=true}else{for(var u=0,s=o;u<s.length;u++){var f=s[u];var c=t.next();if(f[0]===":"){if(c===""){return null}i=i||[];var h=i[a]||(i[a]={});h[f.slice(1)]=c}else if(c!==f){return null}}n=false}}var d=n?n===(t.next()===""):true;if(!d){return null}if(i){return e.map((function(r,e){return{id:r.id,segments:r.segments,params:mergeParams(r.params,i[e]),beforeEnter:r.beforeEnter,beforeLeave:r.beforeLeave}}))}return e};var mergeParams=function(r,e){return r||e?Object.assign(Object.assign({},r),e):undefined};var findChainForIDs=function(r,e){var t=null;var n=0;for(var i=0,a=e;i<a.length;i++){var o=a[i];var u=matchesIDs(r,o);if(u>n){t=o;n=u}}if(t){return t.map((function(e,t){var n;return{id:e.id,segments:e.segments,params:mergeParams(e.params,(n=r[t])===null||n===void 0?void 0:n.params)}}))}return null};var findChainForSegments=function(r,e){var t=null;var n=0;for(var i=0,a=e;i<a.length;i++){var o=a[i];var u=matchesSegments(r,o);if(u!==null){var s=computePriority(u);if(s>n){n=s;t=u}}}return t};var computePriority=function(r){var e=1;var t=1;for(var n=0,i=r;n<i.length;n++){var a=i[n];for(var o=0,u=a.segments;o<u.length;o++){var s=u[o];if(s[0]===":"){e+=Math.pow(1,t)}else if(s!==""){e+=Math.pow(2,t)}t++}}return e};var RouterSegments=function(){function r(r){this.segments=r.slice()}r.prototype.next=function(){if(this.segments.length>0){return this.segments.shift()}return""};return r}();var readProp=function(r,e){if(e in r){return r[e]}if(r.hasAttribute(e)){return r.getAttribute(e)}return null};var readRedirects=function(r){return Array.from(r.children).filter((function(r){return r.tagName==="ION-ROUTE-REDIRECT"})).map((function(r){var e=readProp(r,"to");return{from:parsePath(readProp(r,"from")).segments,to:e==null?undefined:parsePath(e)}}))};var readRoutes=function(r){return flattenRouterTree(readRouteNodes(r))};var readRouteNodes=function(r){return Array.from(r.children).filter((function(r){return r.tagName==="ION-ROUTE"&&r.component})).map((function(r){var e=readProp(r,"component");return{segments:parsePath(readProp(r,"url")).segments,id:e.toLowerCase(),params:r.componentProps,beforeLeave:r.beforeLeave,beforeEnter:r.beforeEnter,children:readRouteNodes(r)}}))};var flattenRouterTree=function(r){var e=[];for(var t=0,n=r;t<n.length;t++){var i=n[t];flattenNode([],e,i)}return e};var flattenNode=function(r,e,t){r=__spreadArray(__spreadArray([],r,true),[{id:t.id,segments:t.segments,params:t.params,beforeLeave:t.beforeLeave,beforeEnter:t.beforeEnter}],false);if(t.children.length===0){e.push(r);return}for(var n=0,i=t.children;n<i.length;n++){var a=i[n];flattenNode(r,e,a)}};var Router=function(){function r(r){registerInstance(this,r);this.ionRouteWillChange=createEvent(this,"ionRouteWillChange",7);this.ionRouteDidChange=createEvent(this,"ionRouteDidChange",7);this.previousPath=null;this.busy=false;this.state=0;this.lastState=0;this.root="/";this.useHash=true}r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,waitUntilNavNode()];case 1:n.sent();return[4,this.runGuards(this.getSegments())];case 2:r=n.sent();if(!(r!==true))return[3,5];if(!(typeof r==="object"))return[3,4];e=r.redirect;t=parsePath(e);this.setSegments(t.segments,ROUTER_INTENT_NONE,t.queryString);return[4,this.writeNavStateRoot(t.segments,ROUTER_INTENT_NONE)];case 3:n.sent();n.label=4;case 4:return[3,7];case 5:return[4,this.onRoutesChanged()];case 6:n.sent();n.label=7;case 7:return[2]}}))}))};r.prototype.componentDidLoad=function(){window.addEventListener("ionRouteRedirectChanged",debounce(this.onRedirectChanged.bind(this),10));window.addEventListener("ionRouteDataChanged",debounce(this.onRoutesChanged.bind(this),100))};r.prototype.onPopState=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t;return __generator(this,(function(n){switch(n.label){case 0:r=this.historyDirection();e=this.getSegments();return[4,this.runGuards(e)];case 1:t=n.sent();if(t!==true){if(typeof t==="object"){e=parsePath(t.redirect).segments}else{return[2,false]}}return[2,this.writeNavStateRoot(e,r)]}}))}))};r.prototype.onBackButton=function(r){var e=this;r.detail.register(0,(function(r){e.back();r()}))};r.prototype.canTransition=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.runGuards()];case 1:r=e.sent();if(r!==true){if(typeof r==="object"){return[2,r.redirect]}else{return[2,false]}}return[2,true]}}))}))};r.prototype.push=function(r){return __awaiter(this,arguments,void 0,(function(r,e,t){var n,i,a,o,u;if(e===void 0){e="forward"}return __generator(this,(function(s){switch(s.label){case 0:if(r.startsWith(".")){i=(n=this.previousPath)!==null&&n!==void 0?n:"/";a=new URL(r,"https://host/".concat(i));r=a.pathname+a.search}o=parsePath(r);return[4,this.runGuards(o.segments)];case 1:u=s.sent();if(u!==true){if(typeof u==="object"){o=parsePath(u.redirect)}else{return[2,false]}}this.setSegments(o.segments,e,o.queryString);return[2,this.writeNavStateRoot(o.segments,e,t)]}}))}))};r.prototype.back=function(){window.history.back();return Promise.resolve(this.waitPromise)};r.prototype.printDebug=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){printRoutes(readRoutes(this.el));printRedirects(readRedirects(this.el));return[2]}))}))};r.prototype.navChanged=function(r){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,a,o;return __generator(this,(function(u){switch(u.label){case 0:if(this.busy){printIonWarning("[ion-router] - router is busy, navChanged was cancelled");return[2,false]}return[4,readNavState(window.document.body)];case 1:e=u.sent(),t=e.ids,n=e.outlet;i=readRoutes(this.el);a=findChainForIDs(t,i);if(!a){printIonWarning("[ion-router] - no matching URL for ",t.map((function(r){return r.id})));return[2,false]}o=chainToSegments(a);if(!o){printIonWarning("[ion-router] - router could not match path because some required param is missing");return[2,false]}this.setSegments(o,r);return[4,this.safeWriteNavState(n,a,ROUTER_INTENT_NONE,o,null,t.length)];case 2:u.sent();return[2,true]}}))}))};r.prototype.onRedirectChanged=function(){var r=this.getSegments();if(r&&findRouteRedirect(r,readRedirects(this.el))){this.writeNavStateRoot(r,ROUTER_INTENT_NONE)}};r.prototype.onRoutesChanged=function(){return this.writeNavStateRoot(this.getSegments(),ROUTER_INTENT_NONE)};r.prototype.historyDirection=function(){var r;var e=window;if(e.history.state===null){this.state++;e.history.replaceState(this.state,e.document.title,(r=e.document.location)===null||r===void 0?void 0:r.href)}var t=e.history.state;var n=this.lastState;this.lastState=t;if(t>n||t>=n&&n>0){return ROUTER_INTENT_FORWARD}if(t<n){return ROUTER_INTENT_BACK}return ROUTER_INTENT_NONE};r.prototype.writeNavStateRoot=function(r,e,t){return __awaiter(this,void 0,void 0,(function(){var n,i,a,o,u,s,f,c;return __generator(this,(function(h){if(!r){printIonError("[ion-router] - URL is not part of the routing set");return[2,false]}n=readRedirects(this.el);i=findRouteRedirect(r,n);a=null;if(i){o=i.to,u=o.segments,s=o.queryString;this.setSegments(u,e,s);a=i.from;r=u}f=readRoutes(this.el);c=findChainForSegments(r,f);if(!c){printIonError("[ion-router] - The path does not match any route");return[2,false]}return[2,this.safeWriteNavState(document.body,c,e,r,a,0,t)]}))}))};r.prototype.safeWriteNavState=function(r,e,t,n,i){return __awaiter(this,arguments,void 0,(function(r,e,t,n,i,a,o){var u,s,f;if(a===void 0){a=0}return __generator(this,(function(c){switch(c.label){case 0:return[4,this.lock()];case 1:u=c.sent();s=false;c.label=2;case 2:c.trys.push([2,4,,5]);return[4,this.writeNavState(r,e,t,n,i,a,o)];case 3:s=c.sent();return[3,5];case 4:f=c.sent();printIonError("[ion-router] - Exception in safeWriteNavState:",f);return[3,5];case 5:u();return[2,s]}}))}))};r.prototype.lock=function(){return __awaiter(this,void 0,void 0,(function(){var r,e;return __generator(this,(function(t){switch(t.label){case 0:r=this.waitPromise;this.waitPromise=new Promise((function(r){return e=r}));if(!(r!==undefined))return[3,2];return[4,r];case 1:t.sent();t.label=2;case 2:return[2,e]}}))}))};r.prototype.runGuards=function(){return __awaiter(this,arguments,void 0,(function(r,e){var t,n,i,a,o,u,s;if(r===void 0){r=this.getSegments()}return __generator(this,(function(f){switch(f.label){case 0:if(e===undefined){e=parsePath(this.previousPath).segments}if(!r||!e){return[2,true]}t=readRoutes(this.el);n=findChainForSegments(e,t);i=n&&n[n.length-1].beforeLeave;if(!i)return[3,2];return[4,i()];case 1:o=f.sent();return[3,3];case 2:o=true;f.label=3;case 3:a=o;if(a===false||typeof a==="object"){return[2,a]}u=findChainForSegments(r,t);s=u&&u[u.length-1].beforeEnter;return[2,s?s():true]}}))}))};r.prototype.writeNavState=function(r,e,t,n,i){return __awaiter(this,arguments,void 0,(function(r,e,t,n,i,a,o){var u,s;if(a===void 0){a=0}return __generator(this,(function(f){switch(f.label){case 0:if(this.busy){printIonWarning("[ion-router] - router is busy, transition was cancelled");return[2,false]}this.busy=true;u=this.routeChangeEvent(n,i);if(u){this.ionRouteWillChange.emit(u)}return[4,writeNavState(r,e,t,a,false,o)];case 1:s=f.sent();this.busy=false;if(u){this.ionRouteDidChange.emit(u)}return[2,s]}}))}))};r.prototype.setSegments=function(r,e,t){this.state++;writeSegments(window.history,this.root,this.useHash,r,e,this.state,t)};r.prototype.getSegments=function(){return readSegments(window.location,this.root,this.useHash)};r.prototype.routeChangeEvent=function(r,e){var t=this.previousPath;var n=generatePath(r);this.previousPath=n;if(n===t){return null}var i=e?generatePath(e):null;return{from:t,redirectedFrom:i,to:n}};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();var routerLinkCss=":host{--background:transparent;--color:var(--ion-color-primary, #0054e9);background:var(--background);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}a{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit}";var IonRouterLinkStyle0=routerLinkCss;var RouterLink=function(){function r(r){var e=this;registerInstance(this,r);this.onClick=function(r){openURL(e.href,r,e.routerDirection,e.routerAnimation)};this.color=undefined;this.href=undefined;this.rel=undefined;this.routerDirection="forward";this.routerAnimation=undefined;this.target=undefined}r.prototype.render=function(){var r;var e=getIonMode(this);var t={href:this.href,rel:this.rel,target:this.target};return h(Host,{key:"11183264fb6ae0db9a7a47c71b6862d60001b834",onClick:this.onClick,class:createColorClasses(this.color,(r={},r[e]=true,r["ion-activatable"]=true,r))},h("a",Object.assign({key:"3e0e5242161cb0df593d6d573e51b8ba750065a1"},t),h("slot",{key:"5bd808e98a4627bb1236f0d955f4b32971355417"})))};return r}();RouterLink.style=IonRouterLinkStyle0;export{Route as ion_route,RouteRedirect as ion_route_redirect,Router as ion_router,RouterLink as ion_router_link};
4
+ */import{r as registerInstance,c as createEvent,f as getElement,h,e as Host}from"./index-527b9e34.js";import{c as componentOnReady,p as debounce}from"./helpers-d94bc8ad.js";import{d as printIonError,p as printIonWarning}from"./index-cfd9c1f2.js";import{o as openURL,c as createColorClasses}from"./theme-01f3f29c.js";import{b as getIonMode}from"./ionic-global-b26f573e.js";var Route=function(){function r(r){registerInstance(this,r);this.ionRouteDataChanged=createEvent(this,"ionRouteDataChanged",7);this.url="";this.component=undefined;this.componentProps=undefined;this.beforeLeave=undefined;this.beforeEnter=undefined}r.prototype.onUpdate=function(r){this.ionRouteDataChanged.emit(r)};r.prototype.onComponentProps=function(r,e){if(r===e){return}var t=r?Object.keys(r):[];var n=e?Object.keys(e):[];if(t.length!==n.length){this.onUpdate(r);return}for(var i=0,a=t;i<a.length;i++){var o=a[i];if(r[o]!==e[o]){this.onUpdate(r);return}}};r.prototype.connectedCallback=function(){this.ionRouteDataChanged.emit()};Object.defineProperty(r,"watchers",{get:function(){return{url:["onUpdate"],component:["onUpdate"],componentProps:["onComponentProps"]}},enumerable:false,configurable:true});return r}();var RouteRedirect=function(){function r(r){registerInstance(this,r);this.ionRouteRedirectChanged=createEvent(this,"ionRouteRedirectChanged",7);this.from=undefined;this.to=undefined}r.prototype.propDidChange=function(){this.ionRouteRedirectChanged.emit()};r.prototype.connectedCallback=function(){this.ionRouteRedirectChanged.emit()};Object.defineProperty(r,"watchers",{get:function(){return{from:["propDidChange"],to:["propDidChange"]}},enumerable:false,configurable:true});return r}();var ROUTER_INTENT_NONE="root";var ROUTER_INTENT_FORWARD="forward";var ROUTER_INTENT_BACK="back";var generatePath=function(r){var e=r.filter((function(r){return r.length>0})).join("/");return"/"+e};var generateUrl=function(r,e,t){var n=generatePath(r);if(e){n="#"+n}if(t!==undefined){n+="?"+t}return n};var writeSegments=function(r,e,t,n,i,a,o){var u=generateUrl(__spreadArray(__spreadArray([],parsePath(e).segments,true),n,true),t,o);if(i===ROUTER_INTENT_FORWARD){r.pushState(a,"",u)}else{r.replaceState(a,"",u)}};var chainToSegments=function(r){var e=[];for(var t=0,n=r;t<n.length;t++){var i=n[t];for(var a=0,o=i.segments;a<o.length;a++){var u=o[a];if(u[0]===":"){var s=i.params&&i.params[u.slice(1)];if(!s){return null}e.push(s)}else if(u!==""){e.push(u)}}}return e};var removePrefix=function(r,e){if(r.length>e.length){return null}if(r.length<=1&&r[0]===""){return e}for(var t=0;t<r.length;t++){if(r[t]!==e[t]){return null}}if(e.length===r.length){return[""]}return e.slice(r.length)};var readSegments=function(r,e,t){var n=parsePath(e).segments;var i=t?r.hash.slice(1):r.pathname;var a=parsePath(i).segments;return removePrefix(n,a)};var parsePath=function(r){var e=[""];var t;if(r!=null){var n=r.indexOf("?");if(n>-1){t=r.substring(n+1);r=r.substring(0,n)}e=r.split("/").map((function(r){return r.trim()})).filter((function(r){return r.length>0}));if(e.length===0){e=[""]}}return{segments:e,queryString:t}};var printRoutes=function(r){console.group("[ion-core] ROUTES[".concat(r.length,"]"));var e=function(r){var e=[];r.forEach((function(r){return e.push.apply(e,r.segments)}));var t=r.map((function(r){return r.id}));console.debug("%c ".concat(generatePath(e)),"font-weight: bold; padding-left: 20px","=>\t","(".concat(t.join(", "),")"))};for(var t=0,n=r;t<n.length;t++){var i=n[t];e(i)}console.groupEnd()};var printRedirects=function(r){console.group("[ion-core] REDIRECTS[".concat(r.length,"]"));for(var e=0,t=r;e<t.length;e++){var n=t[e];if(n.to){console.debug("FROM: ","$c ".concat(generatePath(n.from)),"font-weight: bold"," TO: ","$c ".concat(generatePath(n.to.segments)),"font-weight: bold")}}console.groupEnd()};var writeNavState=function(r,e,t,n){var i=[];for(var a=4;a<arguments.length;a++){i[a-4]=arguments[a]}return __awaiter(void 0,__spreadArray([r,e,t,n],i,true),void 0,(function(r,e,t,n,i,a){var o,u,s,f;if(i===void 0){i=false}return __generator(this,(function(c){switch(c.label){case 0:c.trys.push([0,6,,7]);o=searchNavNode(r);if(n>=e.length||!o){return[2,i]}return[4,new Promise((function(r){return componentOnReady(o,r)}))];case 1:c.sent();u=e[n];return[4,o.setRouteId(u.id,u.params,t,a)];case 2:s=c.sent();if(s.changed){t=ROUTER_INTENT_NONE;i=true}return[4,writeNavState(s.element,e,t,n+1,i,a)];case 3:i=c.sent();if(!s.markVisible)return[3,5];return[4,s.markVisible()];case 4:c.sent();c.label=5;case 5:return[2,i];case 6:f=c.sent();printIonError("[ion-router] - Exception in writeNavState:",f);return[2,false];case 7:return[2]}}))}))};var readNavState=function(r){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(a){switch(a.label){case 0:e=[];n=r;a.label=1;case 1:if(!(t=searchNavNode(n)))return[3,3];return[4,t.getRouteId()];case 2:i=a.sent();if(i){n=i.element;i.element=undefined;e.push(i)}else{return[3,3]}return[3,1];case 3:return[2,{ids:e,outlet:t}]}}))}))};var waitUntilNavNode=function(){if(searchNavNode(document.body)){return Promise.resolve()}return new Promise((function(r){window.addEventListener("ionNavWillLoad",(function(){return r()}),{once:true})}))};var OUTLET_SELECTOR=":not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet";var searchNavNode=function(r){if(!r){return undefined}if(r.matches(OUTLET_SELECTOR)){return r}var e=r.querySelector(OUTLET_SELECTOR);return e!==null&&e!==void 0?e:undefined};var matchesRedirect=function(r,e){var t=e.from,n=e.to;if(n===undefined){return false}if(t.length>r.length){return false}for(var i=0;i<t.length;i++){var a=t[i];if(a==="*"){return true}if(a!==r[i]){return false}}return t.length===r.length};var findRouteRedirect=function(r,e){return e.find((function(e){return matchesRedirect(r,e)}))};var matchesIDs=function(r,e){var t=Math.min(r.length,e.length);var n=0;for(var i=0;i<t;i++){var a=r[i];var o=e[i];if(a.id.toLowerCase()!==o.id){break}if(a.params){var u=Object.keys(a.params);if(u.length===o.segments.length){var s=u.map((function(r){return":".concat(r)}));for(var f=0;f<s.length;f++){if(s[f].toLowerCase()!==o.segments[f]){break}n++}}}n++}return n};var matchesSegments=function(r,e){var t=new RouterSegments(r);var n=false;var i;for(var a=0;a<e.length;a++){var o=e[a].segments;if(o[0]===""){n=true}else{for(var u=0,s=o;u<s.length;u++){var f=s[u];var c=t.next();if(f[0]===":"){if(c===""){return null}i=i||[];var h=i[a]||(i[a]={});h[f.slice(1)]=c}else if(c!==f){return null}}n=false}}var d=n?n===(t.next()===""):true;if(!d){return null}if(i){return e.map((function(r,e){return{id:r.id,segments:r.segments,params:mergeParams(r.params,i[e]),beforeEnter:r.beforeEnter,beforeLeave:r.beforeLeave}}))}return e};var mergeParams=function(r,e){return r||e?Object.assign(Object.assign({},r),e):undefined};var findChainForIDs=function(r,e){var t=null;var n=0;for(var i=0,a=e;i<a.length;i++){var o=a[i];var u=matchesIDs(r,o);if(u>n){t=o;n=u}}if(t){return t.map((function(e,t){var n;return{id:e.id,segments:e.segments,params:mergeParams(e.params,(n=r[t])===null||n===void 0?void 0:n.params)}}))}return null};var findChainForSegments=function(r,e){var t=null;var n=0;for(var i=0,a=e;i<a.length;i++){var o=a[i];var u=matchesSegments(r,o);if(u!==null){var s=computePriority(u);if(s>n){n=s;t=u}}}return t};var computePriority=function(r){var e=1;var t=1;for(var n=0,i=r;n<i.length;n++){var a=i[n];for(var o=0,u=a.segments;o<u.length;o++){var s=u[o];if(s[0]===":"){e+=Math.pow(1,t)}else if(s!==""){e+=Math.pow(2,t)}t++}}return e};var RouterSegments=function(){function r(r){this.segments=r.slice()}r.prototype.next=function(){if(this.segments.length>0){return this.segments.shift()}return""};return r}();var readProp=function(r,e){if(e in r){return r[e]}if(r.hasAttribute(e)){return r.getAttribute(e)}return null};var readRedirects=function(r){return Array.from(r.children).filter((function(r){return r.tagName==="ION-ROUTE-REDIRECT"})).map((function(r){var e=readProp(r,"to");return{from:parsePath(readProp(r,"from")).segments,to:e==null?undefined:parsePath(e)}}))};var readRoutes=function(r){return flattenRouterTree(readRouteNodes(r))};var readRouteNodes=function(r){return Array.from(r.children).filter((function(r){return r.tagName==="ION-ROUTE"&&r.component})).map((function(r){var e=readProp(r,"component");return{segments:parsePath(readProp(r,"url")).segments,id:e.toLowerCase(),params:r.componentProps,beforeLeave:r.beforeLeave,beforeEnter:r.beforeEnter,children:readRouteNodes(r)}}))};var flattenRouterTree=function(r){var e=[];for(var t=0,n=r;t<n.length;t++){var i=n[t];flattenNode([],e,i)}return e};var flattenNode=function(r,e,t){r=__spreadArray(__spreadArray([],r,true),[{id:t.id,segments:t.segments,params:t.params,beforeLeave:t.beforeLeave,beforeEnter:t.beforeEnter}],false);if(t.children.length===0){e.push(r);return}for(var n=0,i=t.children;n<i.length;n++){var a=i[n];flattenNode(r,e,a)}};var Router=function(){function r(r){registerInstance(this,r);this.ionRouteWillChange=createEvent(this,"ionRouteWillChange",7);this.ionRouteDidChange=createEvent(this,"ionRouteDidChange",7);this.previousPath=null;this.busy=false;this.state=0;this.lastState=0;this.root="/";this.useHash=true}r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,waitUntilNavNode()];case 1:n.sent();return[4,this.runGuards(this.getSegments())];case 2:r=n.sent();if(!(r!==true))return[3,5];if(!(typeof r==="object"))return[3,4];e=r.redirect;t=parsePath(e);this.setSegments(t.segments,ROUTER_INTENT_NONE,t.queryString);return[4,this.writeNavStateRoot(t.segments,ROUTER_INTENT_NONE)];case 3:n.sent();n.label=4;case 4:return[3,7];case 5:return[4,this.onRoutesChanged()];case 6:n.sent();n.label=7;case 7:return[2]}}))}))};r.prototype.componentDidLoad=function(){window.addEventListener("ionRouteRedirectChanged",debounce(this.onRedirectChanged.bind(this),10));window.addEventListener("ionRouteDataChanged",debounce(this.onRoutesChanged.bind(this),100))};r.prototype.onPopState=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t;return __generator(this,(function(n){switch(n.label){case 0:r=this.historyDirection();e=this.getSegments();return[4,this.runGuards(e)];case 1:t=n.sent();if(t!==true){if(typeof t==="object"){e=parsePath(t.redirect).segments}else{return[2,false]}}return[2,this.writeNavStateRoot(e,r)]}}))}))};r.prototype.onBackButton=function(r){var e=this;r.detail.register(0,(function(r){e.back();r()}))};r.prototype.canTransition=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.runGuards()];case 1:r=e.sent();if(r!==true){if(typeof r==="object"){return[2,r.redirect]}else{return[2,false]}}return[2,true]}}))}))};r.prototype.push=function(r){return __awaiter(this,arguments,void 0,(function(r,e,t){var n,i,a,o,u;if(e===void 0){e="forward"}return __generator(this,(function(s){switch(s.label){case 0:if(r.startsWith(".")){i=(n=this.previousPath)!==null&&n!==void 0?n:"/";a=new URL(r,"https://host/".concat(i));r=a.pathname+a.search}o=parsePath(r);return[4,this.runGuards(o.segments)];case 1:u=s.sent();if(u!==true){if(typeof u==="object"){o=parsePath(u.redirect)}else{return[2,false]}}this.setSegments(o.segments,e,o.queryString);return[2,this.writeNavStateRoot(o.segments,e,t)]}}))}))};r.prototype.back=function(){window.history.back();return Promise.resolve(this.waitPromise)};r.prototype.printDebug=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){printRoutes(readRoutes(this.el));printRedirects(readRedirects(this.el));return[2]}))}))};r.prototype.navChanged=function(r){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,a,o;return __generator(this,(function(u){switch(u.label){case 0:if(this.busy){printIonWarning("[ion-router] - Router is busy, navChanged was cancelled.");return[2,false]}return[4,readNavState(window.document.body)];case 1:e=u.sent(),t=e.ids,n=e.outlet;i=readRoutes(this.el);a=findChainForIDs(t,i);if(!a){printIonWarning("[ion-router] - No matching URL for",t.map((function(r){return r.id})));return[2,false]}o=chainToSegments(a);if(!o){printIonWarning("[ion-router] - Router could not match path because some required param is missing.");return[2,false]}this.setSegments(o,r);return[4,this.safeWriteNavState(n,a,ROUTER_INTENT_NONE,o,null,t.length)];case 2:u.sent();return[2,true]}}))}))};r.prototype.onRedirectChanged=function(){var r=this.getSegments();if(r&&findRouteRedirect(r,readRedirects(this.el))){this.writeNavStateRoot(r,ROUTER_INTENT_NONE)}};r.prototype.onRoutesChanged=function(){return this.writeNavStateRoot(this.getSegments(),ROUTER_INTENT_NONE)};r.prototype.historyDirection=function(){var r;var e=window;if(e.history.state===null){this.state++;e.history.replaceState(this.state,e.document.title,(r=e.document.location)===null||r===void 0?void 0:r.href)}var t=e.history.state;var n=this.lastState;this.lastState=t;if(t>n||t>=n&&n>0){return ROUTER_INTENT_FORWARD}if(t<n){return ROUTER_INTENT_BACK}return ROUTER_INTENT_NONE};r.prototype.writeNavStateRoot=function(r,e,t){return __awaiter(this,void 0,void 0,(function(){var n,i,a,o,u,s,f,c;return __generator(this,(function(h){if(!r){printIonError("[ion-router] - URL is not part of the routing set");return[2,false]}n=readRedirects(this.el);i=findRouteRedirect(r,n);a=null;if(i){o=i.to,u=o.segments,s=o.queryString;this.setSegments(u,e,s);a=i.from;r=u}f=readRoutes(this.el);c=findChainForSegments(r,f);if(!c){printIonError("[ion-router] - The path does not match any route");return[2,false]}return[2,this.safeWriteNavState(document.body,c,e,r,a,0,t)]}))}))};r.prototype.safeWriteNavState=function(r,e,t,n,i){return __awaiter(this,arguments,void 0,(function(r,e,t,n,i,a,o){var u,s,f;if(a===void 0){a=0}return __generator(this,(function(c){switch(c.label){case 0:return[4,this.lock()];case 1:u=c.sent();s=false;c.label=2;case 2:c.trys.push([2,4,,5]);return[4,this.writeNavState(r,e,t,n,i,a,o)];case 3:s=c.sent();return[3,5];case 4:f=c.sent();printIonError("[ion-router] - Exception in safeWriteNavState:",f);return[3,5];case 5:u();return[2,s]}}))}))};r.prototype.lock=function(){return __awaiter(this,void 0,void 0,(function(){var r,e;return __generator(this,(function(t){switch(t.label){case 0:r=this.waitPromise;this.waitPromise=new Promise((function(r){return e=r}));if(!(r!==undefined))return[3,2];return[4,r];case 1:t.sent();t.label=2;case 2:return[2,e]}}))}))};r.prototype.runGuards=function(){return __awaiter(this,arguments,void 0,(function(r,e){var t,n,i,a,o,u,s;if(r===void 0){r=this.getSegments()}return __generator(this,(function(f){switch(f.label){case 0:if(e===undefined){e=parsePath(this.previousPath).segments}if(!r||!e){return[2,true]}t=readRoutes(this.el);n=findChainForSegments(e,t);i=n&&n[n.length-1].beforeLeave;if(!i)return[3,2];return[4,i()];case 1:o=f.sent();return[3,3];case 2:o=true;f.label=3;case 3:a=o;if(a===false||typeof a==="object"){return[2,a]}u=findChainForSegments(r,t);s=u&&u[u.length-1].beforeEnter;return[2,s?s():true]}}))}))};r.prototype.writeNavState=function(r,e,t,n,i){return __awaiter(this,arguments,void 0,(function(r,e,t,n,i,a,o){var u,s;if(a===void 0){a=0}return __generator(this,(function(f){switch(f.label){case 0:if(this.busy){printIonWarning("[ion-router] - Router is busy, transition was cancelled");return[2,false]}this.busy=true;u=this.routeChangeEvent(n,i);if(u){this.ionRouteWillChange.emit(u)}return[4,writeNavState(r,e,t,a,false,o)];case 1:s=f.sent();this.busy=false;if(u){this.ionRouteDidChange.emit(u)}return[2,s]}}))}))};r.prototype.setSegments=function(r,e,t){this.state++;writeSegments(window.history,this.root,this.useHash,r,e,this.state,t)};r.prototype.getSegments=function(){return readSegments(window.location,this.root,this.useHash)};r.prototype.routeChangeEvent=function(r,e){var t=this.previousPath;var n=generatePath(r);this.previousPath=n;if(n===t){return null}var i=e?generatePath(e):null;return{from:t,redirectedFrom:i,to:n}};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();var routerLinkCss=":host{--background:transparent;--color:var(--ion-color-primary, #0054e9);background:var(--background);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}a{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit}";var IonRouterLinkStyle0=routerLinkCss;var RouterLink=function(){function r(r){var e=this;registerInstance(this,r);this.onClick=function(r){openURL(e.href,r,e.routerDirection,e.routerAnimation)};this.color=undefined;this.href=undefined;this.rel=undefined;this.routerDirection="forward";this.routerAnimation=undefined;this.target=undefined}r.prototype.render=function(){var r;var e=getIonMode(this);var t={href:this.href,rel:this.rel,target:this.target};return h(Host,{key:"11183264fb6ae0db9a7a47c71b6862d60001b834",onClick:this.onClick,class:createColorClasses(this.color,(r={},r[e]=true,r["ion-activatable"]=true,r))},h("a",Object.assign({key:"3e0e5242161cb0df593d6d573e51b8ba750065a1"},t),h("slot",{key:"5bd808e98a4627bb1236f0d955f4b32971355417"})))};return r}();RouterLink.style=IonRouterLinkStyle0;export{Route as ion_route,RouteRedirect as ion_route_redirect,Router as ion_router,RouterLink as ion_router_link};