/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{e as i,B as n}from"./p-40ff71fd.js";import{c as a}from"./p-1373e401.js";const e="ionViewWillEnter",o="ionViewDidEnter",s="ionViewWillLeave",t="ionViewDidLeave",r="ionViewWillUnload",c=n=>new Promise(((a,e)=>{i((()=>{p(n),d(n).then((i=>{i.animation&&i.animation.destroy(),w(n),a(i)}),(i=>{w(n),e(i)}))}))})),p=i=>{const n=i.enteringEl,a=i.leavingEl;j(n,a,i.direction),i.showGoBack?n.classList.add("can-go-back"):n.classList.remove("can-go-back"),V(n,!1),n.style.setProperty("pointer-events","none"),a&&(V(a,!1),a.style.setProperty("pointer-events","none"))},d=async i=>{const a=!i.noAnimation&&await l(i);return a&&n.isBrowser?m(a,i):v(i)},w=i=>{const n=i.enteringEl,a=i.leavingEl;n.classList.remove("ion-page-invisible"),n.style.removeProperty("pointer-events"),void 0!==a&&(a.classList.remove("ion-page-invisible"),a.style.removeProperty("pointer-events"))},l=async i=>{if(i.leavingEl&&i.animated&&0!==i.duration)return i.animationBuilder?i.animationBuilder:"ios"===i.mode?(await __sc_import_ionic("./p-303ae206.js")).iosTransitionAnimation:(await __sc_import_ionic("./p-2d79a57b.js")).mdTransitionAnimation},m=async(i,n)=>{await u(n,!0);const a=i(n.baseEl,n);g(n.enteringEl,n.leavingEl);const e=await f(a,n);return n.progressCallback&&n.progressCallback(void 0),e&&y(n.enteringEl,n.leavingEl),{hasCompleted:e,animation:a}},v=async i=>{const n=i.enteringEl,a=i.leavingEl;return await u(i,!1),g(n,a),y(n,a),{hasCompleted:!0}},u=async(i,n)=>{const a=(void 0!==i.deepWait?i.deepWait:n)?[P(i.enteringEl),P(i.leavingEl)]:[h(i.enteringEl),h(i.leavingEl)];await Promise.all(a),await b(i.viewIsReady,i.enteringEl)},b=async(i,n)=>{i&&await i(n)},f=(i,n)=>{const a=n.progressCallback,e=new Promise((n=>{i.onFinish((i=>n(1===i)))}));return a?(i.progressStart(!0),a(i)):i.play(),e},g=(i,n)=>{_(n,s),_(i,e)},y=(i,n)=>{_(i,o),_(n,t)},_=(i,n)=>{if(i){const a=new CustomEvent(n,{bubbles:!1,cancelable:!1});i.dispatchEvent(a)}},h=i=>i?new Promise((n=>a(i,n))):Promise.resolve(),P=async i=>{const n=i;if(n){if(null!=n.componentOnReady&&null!=await n.componentOnReady())return;await Promise.all(Array.from(n.children).map(P))}},V=(i,n)=>{n?(i.setAttribute("aria-hidden","true"),i.classList.add("ion-page-hidden")):(i.hidden=!1,i.removeAttribute("aria-hidden"),i.classList.remove("ion-page-hidden"))},j=(i,n,a)=>{void 0!==i&&(i.style.zIndex="back"===a?"99":"101"),void 0!==n&&(n.style.zIndex="100")},k=i=>{if(i.classList.contains("ion-page"))return i;return i.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||i};export{e as L,o as a,s as b,t as c,r as d,P as e,k as g,_ as l,V as s,c as t}