PageSourceSearch

https://growth.now.site/chunks/mobile-handler.js

js now.site collected 2026-10-03 19:04:44 UTC 4,163 bytes, 34 lines download raw bytes

1import{i}from"./chat-boot-initializer.js";import"./module-loader-helpers.js";import"./index.js";import"./icons.js";import"./helpers.js";import"./tslib.es6.js";import"./graphql-types.js";import"./action-types.js";import"./x-mark-icon.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"f4d6832021306a9b9930d10359e99f83cbb254ff"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4628601c-1b93-442c-96d0-a5720de24474",e._sentryDebugIdIdentifier="sentry-dbid-4628601c-1b93-442c-96d0-a5720de24474")})()}catch{}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(t){for(var n=1;n<arguments.length;n++){var o=arguments[n];if(o!=null)for(var d in o)o.hasOwnProperty(d)&&(t[d]=o[d])}return t})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:nutshell-peanut":!0})}catch{}})();const f=e=>{const t=window.innerHeight,n=()=>{const o=window.innerHeight;if(t-o>100){const d=t-o;e.contentWindow&&e.contentWindow.postMessage({type:"KEYBOARD_HEIGHT_CHANGE",visibleHeight:o,windowHeight:t,keyboardHeight:d},"*"),document.body.classList.add("keyboard-open"),i()&&(e.style.height=`${o}px`,e.contentDocument&&(e.contentDocument.documentElement.style.height="100%",e.contentDocument.body.style.height="100%"))}else e.contentWindow&&e.contentWindow.postMessage({type:"KEYBOARD_HEIGHT_CHANGE",visibleHeight:o,windowHeight:t,keyboardHeight:0},"*"),document.body.classList.remove("keyboard-open"),i()&&(e.style.height="100%")};window.addEventListener("resize",n)},h=e=>{e.addEventListener("load",()=>{const n=e.contentDocument||e.contentWindow?.document;if(n){const o=n.createElement("script");o.textContent=`
2                document.addEventListener('focusin', function(e) {
3                    if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') {
4                        window.parent.postMessage({ type: 'INPUT_FOCUSED' }, '*');
5                        // Scroll element into view with a slight delay to account for keyboard
6                        setTimeout(() => {
7                            e.target.scrollIntoView({ behavior: 'smooth', block: 'center' });
8                        }, 300);
9                    }
10                });
11
12                document.addEventListener('focusout', function(e) {
13                    if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') {
14                        window.parent.postMessage({ type: 'INPUT_BLURRED' }, '*');
15                    }
16                });
17            `,n.head.appendChild(o)}});const t=n=>{n.data&&n.data.type==="INPUT_FOCUSED"?(document.body.classList.add("input-focused"),window.scrollTo(0,0)):n.data&&n.data.type==="INPUT_BLURRED"&&document.body.classList.remove("input-focused")};window.addEventListener("message",t)},w=e=>{const t=e.createElement("script");t.textContent=`
18        window.addEventListener('message', (event) => {
19            if (event.data && event.data.type === 'KEYBOARD_HEIGHT_CHANGE') {
20                const chatContent = document.querySelector('.chat-content');
21                if (chatContent) {
22                    const keyboardHeight = event.data.windowHeight - event.data.visibleHeight;
23                    if (keyboardHeight > 100) {
24                        // Keyboard is likely open
25                        chatContent.style.height = \`calc(100% - \${keyboardHeight}px)\`;
26                    } else {
27                        // Keyboard is likely closed
28                        chatContent.style.height = '100%';
29                    }
30                }
31            }
32        });
33    `,e.head.appendChild(t)};export{w as injectMobileKeyboardScript,h as setupIOSInputHandlers,f as setupMobileKeyboardHandlers};
34//# sourceMappingURL=mobile-handler.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.