/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{w as o}from"./p-W-2TssC9.js";import{r as t}from"./p-BiTKUjko.js";const r=(r,i,e)=>{let s;const n=()=>void 0!==i()&&void 0===r.label&&null!==e(),d=()=>{const t=i();if(void 0===t)return;if(!n())return void t.style.removeProperty("width");const c=e().scrollWidth;if(0===c&&null===t.offsetParent&&void 0!==o&&"IntersectionObserver"in o){if(void 0!==s)return;const o=s=new IntersectionObserver((t=>{1===t[0].intersectionRatio&&(d(),o.disconnect(),s=void 0)}),{threshold:.01,root:r});o.observe(t)}else t.style.setProperty("width",.75*c+"px")};return{calculateNotchWidth:()=>{n()&&t((()=>{d()}))},destroy:()=>{s&&(s.disconnect(),s=void 0)}}};export{r as c}