import{w as n,B as e}from"./p-03169580.js";import{c as s,e as t}from"./p-f44f0a67.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const i="ionViewWillEnter";const o="ionViewDidEnter";const a="ionViewWillLeave";const c="ionViewDidLeave";const r="ionViewWillUnload";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const f=()=>import("./p-5f454e4a.js");const l=()=>import("./p-b8afa92d.js");const u=e=>new Promise(((s,t)=>{n((()=>{d(e);p(e).then((n=>{if(n.animation){n.animation.destroy()}w(e);s(n)}),(n=>{w(e);t(n)}))}))}));const d=n=>{const e=n.enteringEl;const s=n.leavingEl;L(e,s,n.direction);if(n.showGoBack){e.classList.add("can-go-back")}else{e.classList.remove("can-go-back")}E(e,false);e.style.setProperty("pointer-events","none");if(s){E(s,false);s.style.setProperty("pointer-events","none")}};const p=async n=>{const s=await m(n);const t=s&&e.isBrowser?b(s,n):v(n);return t};const w=n=>{const e=n.enteringEl;const s=n.leavingEl;e.classList.remove("ion-page-invisible");e.style.removeProperty("pointer-events");if(s!==undefined){s.classList.remove("ion-page-invisible");s.style.removeProperty("pointer-events")}};const m=async n=>{if(!n.leavingEl||!n.animated||n.duration===0){return undefined}if(n.animationBuilder){return n.animationBuilder}const e=n.mode==="ios"?(await f()).iosTransitionAnimation:(await l()).mdTransitionAnimation;return e};const b=async(n,e)=>{await g(e,true);const s=n(e.baseEl,e);h(e.enteringEl,e.leavingEl);const t=await P(s,e);if(e.progressCallback){e.progressCallback(undefined)}if(t){V(e.enteringEl,e.leavingEl)}return{hasCompleted:t,animation:s}};const v=async n=>{const e=n.enteringEl;const s=n.leavingEl;await g(n,false);h(e,s);V(e,s);return{hasCompleted:true}};const g=async(n,e)=>{const s=n.deepWait!==undefined?n.deepWait:e;const t=s?[C(n.enteringEl),C(n.leavingEl)]:[k(n.enteringEl),k(n.leavingEl)];await Promise.all(t);await y(n.viewIsReady,n.enteringEl)};const y=async(n,e)=>{if(n){await n(e)}};const P=(n,e)=>{const s=e.progressCallback;const t=new Promise((e=>{n.onFinish((n=>e(n===1)))}));if(s){n.progressStart(true);s(n)}else{n.play()}return t};const h=(n,e)=>{j(e,a);j(n,i)};const V=(n,e)=>{j(n,o);j(e,c)};const j=(n,e)=>{if(n){const s=new CustomEvent(e,{bubbles:false,cancelable:false});n.dispatchEvent(s)}};const k=n=>{if(n){return new Promise((e=>s(n,e)))}return Promise.resolve()};const C=async n=>{const e=n;if(e){if(e.componentOnReady!=null){const n=await e.componentOnReady();if(n!=null){return}}else if(e.__registerHost!=null){const n=new Promise((n=>t(n)));await n;return}await Promise.all(Array.from(e.children).map(C))}};const E=(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")}};const L=(n,e,s)=>{if(n!==undefined){n.style.zIndex=s==="back"?"99":"101"}if(e!==undefined){e.style.zIndex="100"}};const W=n=>{if(n.classList.contains("ion-page")){return n}const e=n.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs");if(e){return e}return n};export{r as L,a,c as b,C as d,W as g,j as l,E as s,u as t};
//# sourceMappingURL=p-b6b05afd.js.map