/*! * (C) Ionic http://ionicframework.com - MIT License */ import{w as o}from"./p-7b30edcc.js";import{r}from"./p-b51e4004.js";import{a as t}from"./p-06fee233.js";const e=(t,e,i)=>{let n,s;if(void 0!==o&&"MutationObserver"in o){const o=Array.isArray(e)?e:[e];n=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t.nodeType===Node.ELEMENT_NODE&&o.includes(t.slot))return i(),void r((()=>c(t)))})),n.observe(t,{childList:!0,subtree:!0})}const c=o=>{var r;s&&(s.disconnect(),s=void 0),s=new MutationObserver((o=>{i();for(const r of o)for(const o of r.removedNodes)o.nodeType===Node.ELEMENT_NODE&&o.slot===e&&d()})),s.observe(null!==(r=o.parentElement)&&void 0!==r?r:o,{subtree:!0,childList:!0})},d=()=>{s&&(s.disconnect(),s=void 0)};return{destroy:()=>{n&&(n.disconnect(),n=void 0),d()}}},i=(o,r,e)=>{const i=null==o?0:o.toString().length,s=n(i,r);if(void 0===e)return s;try{return e(i,r)}catch(o){return t("Exception in provided `counterFormatter`.",o),s}},n=(o,r)=>`${o} / ${r}`;export{e as c,i as g}