@ionic/core 7.3.4-dev.11694548895.1578981b → 7.3.4-dev.11694698515.1504c90b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "7.3.4-dev.11694548895.1578981b",
3
+ "version": "7.3.4-dev.11694698515.1504c90b",
4
4
  "description": "Base components for Ionic",
5
5
  "keywords": [
6
6
  "ionic",
@@ -1,4 +0,0 @@
1
- import{__awaiter,__generator}from"tslib";
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */import{g as getScrollElement,c as scrollByPoint,f as findClosestIonContent}from"./index-746a238e.js";import{a as addEventListener,b as removeEventListener,r as raf,c as componentOnReady}from"./helpers-3379ba19.js";import{a as KeyboardResize,K as Keyboard}from"./keyboard-b063f012.js";import{w as win}from"./index-7a14ecec.js";import"./index-595d62c9.js";import"./capacitor-b4979570.js";var cloneMap=new WeakMap;var relocateInput=function(e,t,n,r,o){if(r===void 0){r=0}if(o===void 0){o=false}if(cloneMap.has(e)===n){return}if(n){addClone(e,t,r,o)}else{removeClone(e,t)}};var isFocused=function(e){return e===e.getRootNode().activeElement};var addClone=function(e,t,n,r){if(r===void 0){r=false}var o=t.parentNode;var i=t.cloneNode(false);i.classList.add("cloned-input");i.tabIndex=-1;if(r){i.disabled=true}o.appendChild(i);cloneMap.set(e,i);var a=e.ownerDocument;var l=a.dir==="rtl"?9999:-9999;e.style.pointerEvents="none";t.style.transform="translate3d(".concat(l,"px,").concat(n,"px,0) scale(0)")};var removeClone=function(e,t){var n=cloneMap.get(e);if(n){cloneMap.delete(e);n.remove()}e.style.pointerEvents="";t.style.transform=""};var SCROLL_AMOUNT_PADDING=50;var enableHideCaretOnScroll=function(e,t,n){if(!n||!t){return function(){return}}var r=function(n){if(isFocused(t)){relocateInput(e,t,n)}};var o=function(){return relocateInput(e,t,false)};var i=function(){return r(true)};var a=function(){return r(false)};addEventListener(n,"ionScrollStart",i);addEventListener(n,"ionScrollEnd",a);t.addEventListener("blur",o);return function(){removeEventListener(n,"ionScrollStart",i);removeEventListener(n,"ionScrollEnd",a);t.removeEventListener("blur",o)}};var SKIP_SELECTOR="input, textarea, [no-blur], [contenteditable]";var enableInputBlurring=function(){var e=true;var t=false;var n=document;var r=function(){t=true};var o=function(){e=true};var i=function(r){if(t){t=false;return}var o=n.activeElement;if(!o){return}if(o.matches(SKIP_SELECTOR)){return}var i=r.target;if(i===o){return}if(i.matches(SKIP_SELECTOR)||i.closest(SKIP_SELECTOR)){return}e=false;setTimeout((function(){if(!e){o.blur()}}),50)};addEventListener(n,"ionScrollStart",r);n.addEventListener("focusin",o,true);n.addEventListener("touchend",i,false);return function(){removeEventListener(n,"ionScrollStart",r,true);n.removeEventListener("focusin",o,true);n.removeEventListener("touchend",i,false)}};var SCROLL_ASSIST_SPEED=.3;var getScrollData=function(e,t,n,r){var o;var i=(o=e.closest("ion-item,[ion-item]"))!==null&&o!==void 0?o:e;return calcScrollData(i.getBoundingClientRect(),t.getBoundingClientRect(),n,r)};var calcScrollData=function(e,t,n,r){var o=e.top;var i=e.bottom;var a=t.top;var l=Math.min(t.bottom,r-n);var s=a+15;var u=l-SCROLL_AMOUNT_PADDING;var c=u-i;var d=s-o;var f=Math.round(c<0?-c:d>0?-d:0);var v=Math.min(f,o-a);var S=Math.abs(v);var m=S/SCROLL_ASSIST_SPEED;var p=Math.min(400,Math.max(150,m));return{scrollAmount:v,scrollDuration:p,scrollPadding:n,inputSafeY:-(o-s)+4}};var PADDING_TIMER_KEY="$ionPaddingTimer";var setScrollPadding=function(e,t,n){var r=e[PADDING_TIMER_KEY];if(r){clearTimeout(r)}if(t>0){e.style.setProperty("--keyboard-offset","".concat(t,"px"))}else{e[PADDING_TIMER_KEY]=setTimeout((function(){e.style.setProperty("--keyboard-offset","0px");if(n){n()}}),120)}};var setClearScrollPaddingListener=function(e,t,n){var r=function(){if(t){setScrollPadding(t,0,n)}};e.addEventListener("focusout",r,{once:true})};var currentPadding=0;var SKIP_SCROLL_ASSIST="data-ionic-skip-scroll-assist";var enableScrollAssist=function(e,t,n,r,o,i,a,l){if(l===void 0){l=false}var s=i&&(a===undefined||a.mode===KeyboardResize.None);var u=win!==undefined?win.innerHeight:0;var c=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(i){if(t.hasAttribute(SKIP_SCROLL_ASSIST)){t.removeAttribute(SKIP_SCROLL_ASSIST);return[2]}jsSetFocus(e,t,n,r,o,s,l,u);return[2]}))}))};e.addEventListener("focusin",c,true);return function(){e.removeEventListener("focusin",c,true)}};var setManualFocus=function(e){if(document.activeElement===e){return}e.setAttribute(SKIP_SCROLL_ASSIST,"true");e.focus()};var jsSetFocus=function(e,t,n,r,o,i,a,l){if(a===void 0){a=false}if(l===void 0){l=0}return __awaiter(void 0,void 0,void 0,(function(){var s,u,c,d,f,v;return __generator(this,(function(S){switch(S.label){case 0:if(!n&&!r){return[2]}s=getScrollData(e,n||r,o,l);if(n&&Math.abs(s.scrollAmount)<4){setManualFocus(t);if(i&&n!==null){setScrollPadding(n,currentPadding);setClearScrollPaddingListener(t,n,(function(){return currentPadding=0}))}return[2]}relocateInput(e,t,true,s.inputSafeY,a);setManualFocus(t);raf((function(){return e.click()}));if(i&&n){currentPadding=s.scrollPadding;setScrollPadding(n,currentPadding)}if(!(typeof window!=="undefined"))return[3,3];c=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:if(u!==undefined){clearTimeout(u)}window.removeEventListener("ionKeyboardDidShow",d);window.removeEventListener("ionKeyboardDidShow",c);if(!n)return[3,2];return[4,scrollByPoint(n,0,s.scrollAmount,s.scrollDuration)];case 1:r.sent();r.label=2;case 2:relocateInput(e,t,false,s.inputSafeY);setManualFocus(t);if(i){setClearScrollPaddingListener(t,n,(function(){return currentPadding=0}))}return[2]}}))}))};d=function(){window.removeEventListener("ionKeyboardDidShow",d);window.addEventListener("ionKeyboardDidShow",c)};if(!n)return[3,2];return[4,getScrollElement(n)];case 1:f=S.sent();v=f.scrollHeight-f.clientHeight;if(s.scrollAmount>v-f.scrollTop){if(t.type==="password"){s.scrollAmount+=SCROLL_AMOUNT_PADDING;window.addEventListener("ionKeyboardDidShow",d)}else{window.addEventListener("ionKeyboardDidShow",c)}u=setTimeout(c,1e3);return[2]}S.label=2;case 2:c();S.label=3;case 3:return[2]}}))}))};var INPUT_BLURRING=true;var startInputShims=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var n,r,o,i,a,l,s,u,c,d,f,v,S,m,p,L,_;return __generator(this,(function(E){switch(E.label){case 0:n=document;r=t==="ios";o=t==="android";i=e.getNumber("keyboardHeight",290);a=e.getBoolean("scrollAssist",true);l=e.getBoolean("hideCaretOnScroll",r);s=e.getBoolean("inputBlurring",r);u=e.getBoolean("scrollPadding",true);c=Array.from(n.querySelectorAll("ion-input, ion-textarea"));d=new WeakMap;f=new WeakMap;return[4,Keyboard.getResizeMode()];case 1:v=E.sent();S=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,n,r,s,c,S,c;return __generator(this,(function(m){switch(m.label){case 0:return[4,new Promise((function(t){return componentOnReady(e,t)}))];case 1:m.sent();t=e.shadowRoot||e;n=t.querySelector("input")||t.querySelector("textarea");r=findClosestIonContent(e);s=!r?e.closest("ion-footer"):null;if(!n){return[2]}if(!!r&&l&&!d.has(e)){c=enableHideCaretOnScroll(e,n,r);d.set(e,c)}S=n.type==="date"||n.type==="datetime-local";if(!S&&(!!r||!!s)&&a&&!f.has(e)){c=enableScrollAssist(e,n,r,s,i,u,v,o);f.set(e,c)}return[2]}}))}))};m=function(e){if(l){var t=d.get(e);if(t){t()}d.delete(e)}if(a){var t=f.get(e);if(t){t()}f.delete(e)}};if(s&&INPUT_BLURRING){enableInputBlurring()}for(p=0,L=c;p<L.length;p++){_=L[p];S(_)}n.addEventListener("ionInputDidLoad",(function(e){S(e.detail)}));n.addEventListener("ionInputDidUnload",(function(e){m(e.detail)}));return[2]}}))}))};export{startInputShims};
@@ -1,4 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r["throw"](e))}catch(e){o(e)}}function s(e){e.done?n(e.value):i(e.value).then(a,u)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(t){return s([e,t])}}function s(u){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(n=0)),n)try{if(r=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1];o=u;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(u);break}if(o[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
2
- /*!
3
- * (C) Ionic http://ionicframework.com - MIT License
4
- */System.register(["./p-64475ab5.system.js","./p-815c2fba.system.js","./p-bba2ce59.system.js","./p-0e94957a.system.js","./p-479cdbf8.system.js","./p-ccdcb022.system.js"],(function(e){"use strict";var t,n,r,i,o,a,u,s,c,f;return{setters:[function(e){t=e.g;n=e.c;r=e.f},function(e){i=e.a;o=e.b;a=e.r;u=e.c},function(e){s=e.a;c=e.K},function(e){f=e.w},function(){},function(){}],execute:function(){var l=this;var d=new WeakMap;var v=function(e,t,n,r,i){if(r===void 0){r=0}if(i===void 0){i=false}if(d.has(e)===n){return}if(n){p(e,t,r,i)}else{m(e,t)}};var h=function(e){return e===e.getRootNode().activeElement};var p=function(e,t,n,r){if(r===void 0){r=false}var i=t.parentNode;var o=t.cloneNode(false);o.classList.add("cloned-input");o.tabIndex=-1;if(r){o.disabled=true}i.appendChild(o);d.set(e,o);var a=e.ownerDocument;var u=a.dir==="rtl"?9999:-9999;e.style.pointerEvents="none";t.style.transform="translate3d(".concat(u,"px,").concat(n,"px,0) scale(0)")};var m=function(e,t){var n=d.get(e);if(n){d.delete(e);n.remove()}e.style.pointerEvents="";t.style.transform=""};var b=50;var w=function(e,t,n){if(!n||!t){return function(){return}}var r=function(n){if(h(t)){v(e,t,n)}};var a=function(){return v(e,t,false)};var u=function(){return r(true)};var s=function(){return r(false)};i(n,"ionScrollStart",u);i(n,"ionScrollEnd",s);t.addEventListener("blur",a);return function(){o(n,"ionScrollStart",u);o(n,"ionScrollEnd",s);t.removeEventListener("blur",a)}};var y="input, textarea, [no-blur], [contenteditable]";var g=function(){var e=true;var t=false;var n=document;var r=function(){t=true};var a=function(){e=true};var u=function(r){if(t){t=false;return}var i=n.activeElement;if(!i){return}if(i.matches(y)){return}var o=r.target;if(o===i){return}if(o.matches(y)||o.closest(y)){return}e=false;setTimeout((function(){if(!e){i.blur()}}),50)};i(n,"ionScrollStart",r);n.addEventListener("focusin",a,true);n.addEventListener("touchend",u,false);return function(){o(n,"ionScrollStart",r,true);n.removeEventListener("focusin",a,true);n.removeEventListener("touchend",u,false)}};var _=.3;var S=function(e,t,n,r){var i;var o=(i=e.closest("ion-item,[ion-item]"))!==null&&i!==void 0?i:e;return E(o.getBoundingClientRect(),t.getBoundingClientRect(),n,r)};var E=function(e,t,n,r){var i=e.top;var o=e.bottom;var a=t.top;var u=Math.min(t.bottom,r-n);var s=a+15;var c=u-b;var f=c-o;var l=s-i;var d=Math.round(f<0?-f:l>0?-l:0);var v=Math.min(d,i-a);var h=Math.abs(v);var p=h/_;var m=Math.min(400,Math.max(150,p));return{scrollAmount:v,scrollDuration:m,scrollPadding:n,inputSafeY:-(i-s)+4}};var L="$ionPaddingTimer";var x=function(e,t,n){var r=e[L];if(r){clearTimeout(r)}if(t>0){e.style.setProperty("--keyboard-offset","".concat(t,"px"))}else{e[L]=setTimeout((function(){e.style.setProperty("--keyboard-offset","0px");if(n){n()}}),120)}};var k=function(e,t,n){var r=function(){if(t){x(t,0,n)}};e.addEventListener("focusout",r,{once:true})};var A=0;var D="data-ionic-skip-scroll-assist";var M=function(e,t,n,r,i,o,a,u){if(u===void 0){u=false}var c=o&&(a===undefined||a.mode===s.None);var d=f!==undefined?f.innerHeight:0;var v=function(){return __awaiter(l,void 0,void 0,(function(){return __generator(this,(function(o){if(t.hasAttribute(D)){t.removeAttribute(D);return[2]}T(e,t,n,r,i,c,u,d);return[2]}))}))};e.addEventListener("focusin",v,true);return function(){e.removeEventListener("focusin",v,true)}};var P=function(e){if(document.activeElement===e){return}e.setAttribute(D,"true");e.focus()};var T=function(e,r,i,o,u,s,c,f){if(c===void 0){c=false}if(f===void 0){f=0}return __awaiter(l,void 0,void 0,(function(){var l,d,h,p,m,w;var y=this;return __generator(this,(function(g){switch(g.label){case 0:if(!i&&!o){return[2]}l=S(e,i||o,u,f);if(i&&Math.abs(l.scrollAmount)<4){P(r);if(s&&i!==null){x(i,A);k(r,i,(function(){return A=0}))}return[2]}v(e,r,true,l.inputSafeY,c);P(r);a((function(){return e.click()}));if(s&&i){A=l.scrollPadding;x(i,A)}if(!(typeof window!=="undefined"))return[3,3];h=function(){return __awaiter(y,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(d!==undefined){clearTimeout(d)}window.removeEventListener("ionKeyboardDidShow",p);window.removeEventListener("ionKeyboardDidShow",h);if(!i)return[3,2];return[4,n(i,0,l.scrollAmount,l.scrollDuration)];case 1:t.sent();t.label=2;case 2:v(e,r,false,l.inputSafeY);P(r);if(s){k(r,i,(function(){return A=0}))}return[2]}}))}))};p=function(){window.removeEventListener("ionKeyboardDidShow",p);window.addEventListener("ionKeyboardDidShow",h)};if(!i)return[3,2];return[4,t(i)];case 1:m=g.sent();w=m.scrollHeight-m.clientHeight;if(l.scrollAmount>w-m.scrollTop){if(r.type==="password"){l.scrollAmount+=b;window.addEventListener("ionKeyboardDidShow",p)}else{window.addEventListener("ionKeyboardDidShow",h)}d=setTimeout(h,1e3);return[2]}g.label=2;case 2:h();g.label=3;case 3:return[2]}}))}))};var B=true;var K=e("startInputShims",(function(e,t){return __awaiter(l,void 0,void 0,(function(){var n,i,o,a,s,f,l,d,v,h,p,m,b,y,_,S,E;var L=this;return __generator(this,(function(x){switch(x.label){case 0:n=document;i=t==="ios";o=t==="android";a=e.getNumber("keyboardHeight",290);s=e.getBoolean("scrollAssist",true);f=e.getBoolean("hideCaretOnScroll",i);l=e.getBoolean("inputBlurring",i);d=e.getBoolean("scrollPadding",true);v=Array.from(n.querySelectorAll("ion-input, ion-textarea"));h=new WeakMap;p=new WeakMap;return[4,c.getResizeMode()];case 1:m=x.sent();b=function(e){return __awaiter(L,void 0,void 0,(function(){var t,n,i,c,l,v,l;return __generator(this,(function(b){switch(b.label){case 0:return[4,new Promise((function(t){return u(e,t)}))];case 1:b.sent();t=e.shadowRoot||e;n=t.querySelector("input")||t.querySelector("textarea");i=r(e);c=!i?e.closest("ion-footer"):null;if(!n){return[2]}if(!!i&&f&&!h.has(e)){l=w(e,n,i);h.set(e,l)}v=n.type==="date"||n.type==="datetime-local";if(!v&&(!!i||!!c)&&s&&!p.has(e)){l=M(e,n,i,c,a,d,m,o);p.set(e,l)}return[2]}}))}))};y=function(e){if(f){var t=h.get(e);if(t){t()}h.delete(e)}if(s){var t=p.get(e);if(t){t()}p.delete(e)}};if(l&&B){g()}for(_=0,S=v;_<S.length;_++){E=S[_];b(E)}n.addEventListener("ionInputDidLoad",(function(e){b(e.detail)}));n.addEventListener("ionInputDidUnload",(function(e){y(e.detail)}));return[2]}}))}))}))}}}));
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{g as o,c as t,f as n}from"./p-b24aa895.js";import{a as i,b as a,r,c as e}from"./p-63eb0acd.js";import{a as s,K as c}from"./p-419eb426.js";import{w as d}from"./p-b347cfd1.js";import"./p-1b8e1d03.js";import"./p-cc196b34.js";const l=new WeakMap,u=(o,t,n,i=0,a=!1)=>{l.has(o)!==n&&(n?f(o,t,i,a):p(o,t))},f=(o,t,n,i=!1)=>{const a=t.parentNode,r=t.cloneNode(!1);r.classList.add("cloned-input"),r.tabIndex=-1,i&&(r.disabled=!0),a.appendChild(r),l.set(o,r);const e="rtl"===o.ownerDocument.dir?9999:-9999;o.style.pointerEvents="none",t.style.transform=`translate3d(${e}px,${n}px,0) scale(0)`},p=(o,t)=>{const n=l.get(o);n&&(l.delete(o),n.remove()),o.style.pointerEvents="",t.style.transform=""},w="input, textarea, [no-blur], [contenteditable]",m="$ionPaddingTimer",b=(o,t,n)=>{const i=o[m];i&&clearTimeout(i),t>0?o.style.setProperty("--keyboard-offset",`${t}px`):o[m]=setTimeout((()=>{o.style.setProperty("--keyboard-offset","0px"),n&&n()}),120)},h=(o,t,n)=>{o.addEventListener("focusout",(()=>{t&&b(t,0,n)}),{once:!0})};let y=0;const S="data-ionic-skip-scroll-assist",M=o=>{document.activeElement!==o&&(o.setAttribute(S,"true"),o.focus())},v=async(n,i,a,e,s,c,d=!1,l=0)=>{if(!a&&!e)return;const f=((o,t,n,i)=>{var a;return((o,t,n,i)=>{const a=o.top,r=o.bottom,e=t.top,s=e+15,c=Math.min(t.bottom,i-n)-50-r,d=s-a,l=Math.round(c<0?-c:d>0?-d:0),u=Math.min(l,a-e),f=Math.abs(u);return{scrollAmount:u,scrollDuration:Math.min(400,Math.max(150,f/.3)),scrollPadding:n,inputSafeY:4-(a-s)}})((null!==(a=o.closest("ion-item,[ion-item]"))&&void 0!==a?a:o).getBoundingClientRect(),t.getBoundingClientRect(),n,i)})(n,a||e,s,l);if(a&&Math.abs(f.scrollAmount)<4)return M(i),void(c&&null!==a&&(b(a,y),h(i,a,(()=>y=0))));if(u(n,i,!0,f.inputSafeY,d),M(i),r((()=>n.click())),c&&a&&(y=f.scrollPadding,b(a,y)),"undefined"!=typeof window){let r;const e=async()=>{void 0!==r&&clearTimeout(r),window.removeEventListener("ionKeyboardDidShow",s),window.removeEventListener("ionKeyboardDidShow",e),a&&await t(a,0,f.scrollAmount,f.scrollDuration),u(n,i,!1,f.inputSafeY),M(i),c&&h(i,a,(()=>y=0))},s=()=>{window.removeEventListener("ionKeyboardDidShow",s),window.addEventListener("ionKeyboardDidShow",e)};if(a){const t=await o(a);if(f.scrollAmount>t.scrollHeight-t.clientHeight-t.scrollTop)return"password"===i.type?(f.scrollAmount+=50,window.addEventListener("ionKeyboardDidShow",s)):window.addEventListener("ionKeyboardDidShow",e),void(r=setTimeout(e,1e3))}e()}},D=async(o,t)=>{const r=document,l="ios"===t,f="android"===t,p=o.getNumber("keyboardHeight",290),m=o.getBoolean("scrollAssist",!0),b=o.getBoolean("hideCaretOnScroll",l),h=o.getBoolean("inputBlurring",l),y=o.getBoolean("scrollPadding",!0),M=Array.from(r.querySelectorAll("ion-input, ion-textarea")),D=new WeakMap,x=new WeakMap,k=await c.getResizeMode(),K=async o=>{await new Promise((t=>e(o,t)));const t=o.shadowRoot||o,r=t.querySelector("input")||t.querySelector("textarea"),c=n(o),l=c?null:o.closest("ion-footer");if(r){if(c&&b&&!D.has(o)){const t=((o,t,n)=>{if(!n||!t)return()=>{};const r=n=>{var i;(i=t)===i.getRootNode().activeElement&&u(o,t,n)},e=()=>u(o,t,!1),s=()=>r(!0),c=()=>r(!1);return i(n,"ionScrollStart",s),i(n,"ionScrollEnd",c),t.addEventListener("blur",e),()=>{a(n,"ionScrollStart",s),a(n,"ionScrollEnd",c),t.removeEventListener("blur",e)}})(o,r,c);D.set(o,t)}if("date"!==r.type&&"datetime-local"!==r.type&&(c||l)&&m&&!x.has(o)){const t=((o,t,n,i,a,r,e,c=!1)=>{const l=r&&(void 0===e||e.mode===s.None),u=void 0!==d?d.innerHeight:0,f=async()=>{t.hasAttribute(S)?t.removeAttribute(S):v(o,t,n,i,a,l,c,u)};return o.addEventListener("focusin",f,!0),()=>{o.removeEventListener("focusin",f,!0)}})(o,r,c,l,p,y,k,f);x.set(o,t)}}};h&&(()=>{let o=!0,t=!1;const n=document;i(n,"ionScrollStart",(()=>{t=!0})),n.addEventListener("focusin",(()=>{o=!0}),!0),n.addEventListener("touchend",(i=>{if(t)return void(t=!1);const a=n.activeElement;if(!a)return;if(a.matches(w))return;const r=i.target;r!==a&&(r.matches(w)||r.closest(w)||(o=!1,setTimeout((()=>{o||a.blur()}),50)))}),!1)})();for(const o of M)K(o);r.addEventListener("ionInputDidLoad",(o=>{K(o.detail)})),r.addEventListener("ionInputDidUnload",(o=>{(o=>{if(b){const t=D.get(o);t&&t(),D.delete(o)}if(m){const t=x.get(o);t&&t(),x.delete(o)}})(o.detail)}))};export{D as startInputShims}