UNPKG

forms-reactive

Version:

Reactive Form Web Component

11 lines 1.94 kB
import{w as e}from"./p-3647f076.js";import{r as n}from"./p-c1432a35.js";import{b as t}from"./p-8613551a.js"; /*! * (C) Ionic http://ionicframework.com - MIT License */const r=(t,r,o)=>{let i;const s=()=>{const e=r();if(e===undefined||t.label!==undefined||o()===null){return false}return true};const f=()=>{if(s()){n((()=>{u()}))}};const u=()=>{const n=r();if(n===undefined){return}if(!s()){n.style.removeProperty("width");return}const f=o().scrollWidth;if(f===0&&n.offsetParent===null&&e!==undefined&&"IntersectionObserver"in e){if(i!==undefined){return}const e=i=new IntersectionObserver((n=>{if(n[0].intersectionRatio===1){u();e.disconnect();i=undefined}}),{threshold:.01,root:t});e.observe(n);return}n.style.setProperty("width",`${f*.75}px`)};const d=()=>{if(i){i.disconnect();i=undefined}};return{calculateNotchWidth:f,destroy:d}}; /*! * (C) Ionic http://ionicframework.com - MIT License */const o=(t,r,o)=>{let i;let s;if(e!==undefined&&"MutationObserver"in e){const e=Array.isArray(r)?r:[r];i=new MutationObserver((t=>{for(const r of t){for(const t of r.addedNodes){if(t.nodeType===Node.ELEMENT_NODE&&e.includes(t.slot)){o();n((()=>f(t)));return}}}}));i.observe(t,{childList:true,subtree:true})}const f=e=>{var n;if(s){s.disconnect();s=undefined}s=new MutationObserver((e=>{o();for(const n of e){for(const e of n.removedNodes){if(e.nodeType===Node.ELEMENT_NODE&&e.slot===r){d()}}}}));s.observe((n=e.parentElement)!==null&&n!==void 0?n:e,{subtree:true,childList:true})};const u=()=>{if(i){i.disconnect();i=undefined}d()};const d=()=>{if(s){s.disconnect();s=undefined}};return{destroy:u}}; /*! * (C) Ionic http://ionicframework.com - MIT License */const i=(e,n,r)=>{const o=e==null?0:e.toString().length;const i=s(o,n);if(r===undefined){return i}try{return r(o,n)}catch(e){t("Exception in provided `counterFormatter`.",e);return i}};const s=(e,n)=>`${e} / ${n}`;export{r as a,o as c,i as g}; //# sourceMappingURL=p-fd1bd491.js.map