PageSourceSearch

https://bumpy.app/assets/lib-yhiab-qT.js

js bumpy.app collected 2026-09-25 03:09:50 UTC 11,141 bytes, 2 lines download raw bytes

1import{B as e,C as t,E as n,I as r,K as i,L as a,M as o,S as s,U as c,j as l,z as u}from"./utils-GkGtz_nY.js";import{C as d,S as f,_ as p,b as m,d as h,h as g,m as _,p as v,u as y,w as b,x,y as S}from"./components-tENy2wFK.js";import{a as C,c as w,g as T,n as E,s as D}from"./errorBoundaries-YqARUzdQ.js";var O=`application/x-www-form-urlencoded`;function k(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function A(e){return k(e)&&e.tagName.toLowerCase()===`button`}function j(e){return k(e)&&e.tagName.toLowerCase()===`form`}function M(e){return k(e)&&e.tagName.toLowerCase()===`input`}function N(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function P(e,t){return e.button===0&&(!t||t===`_self`)&&!N(e)}function F(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function I(e,t){let n=F(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var L=null;function R(){if(L===null)try{new FormData(document.createElement(`form`),0),L=!1}catch{L=!0}return L}var z=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function B(e){return e!=null&&!z.has(e)?(u(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${O}"`),null):e}function V(e,t){let n,r,i,a,s;if(j(e)){let s=e.getAttribute(`action`);r=s?o(s,t):null,n=e.getAttribute(`method`)||`get`,i=B(e.getAttribute(`enctype`))||O,a=new FormData(e)}else if(A(e)||M(e)&&(e.type===`submit`||e.type===`image`)){let s=e.form;if(s==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let c=e.getAttribute(`formaction`)||s.getAttribute(`action`);if(r=c?o(c,t):null,n=e.getAttribute(`formmethod`)||s.getAttribute(`method`)||`get`,i=B(e.getAttribute(`formenctype`))||B(s.getAttribute(`enctype`))||O,a=new FormData(s,e),!R()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(k(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=O,s=e;return a&&i===`text/plain`&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:s}}var H=i(c(),1),U=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{U&&(window.__reactRouterVersion=`8`)}catch{}var W=H.forwardRef(function({onClick:t,discover:r=`render`,prefetch:i=`none`,relative:a,reloadDocument:o,replace:c,mask:u,state:d,target:p,to:m,preventScrollReset:g,viewTransition:_,defaultShouldRevalidate:v,...b},x){let{basename:S,navigator:T,useTransitions:E}=H.useContext(f),O=typeof m==`string`&&e.test(m),k=n(m,S);m=k.to;let A=y(m,{relative:a}),j=h(),M=null;if(u){let e=l(u,[],j.mask?j.mask.pathname:`/`,!0);S!==`/`&&(e.pathname=e.pathname===`/`?S:s([S,e.pathname])),M=T.createHref(e)}let[N,P,F]=w(i,b),I=ee(m,{replace:c,mask:u,state:d,target:p,preventScrollReset:g,relative:a,viewTransition:_,defaultShouldRevalidate:v,useTransitions:E});function L(e){t&&t(e),e.defaultPrevented||I(e)}let R=!(k.isExternal||o),z=H.createElement(`a`,{...b,...F,href:(R?M:void 0)||k.absoluteURL||A,onClick:R?L:t,ref:D(x,P),target:p,"data-discover":!O&&r===`render`?`true`:void 0});return N&&!O?H.createElement(H.Fragment,null,z,H.createElement(C,{page:A})):z});W.displayName=`Link`;var G=H.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:s,children:c,...l},u){let d=p(a,{relative:l.relative}),m=h(),g=H.useContext(x),{navigator:_,basename:v}=H.useContext(f),y=g!=null&&le(d)&&s===!0,b=_.encodeLocation?_.encodeLocation(d).pathname:d.pathname,S=m.pathname,C=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;t||(S=S.toLowerCase(),C=C?C.toLowerCase():null,b=b.toLowerCase()),C&&v&&(C=o(C,v)||C);let w=b!==`/`&&b.endsWith(`/`)?b.length-1:b.length,T=S===b||!r&&S.startsWith(b)&&S.charAt(w)===`/`,E=C!=null&&(C===b||!r&&
1C.startsWith(b)&&C.charAt(w)===`/`),D={isActive:T,isPending:E,isTransitioning:y},O=T?e:void 0,k;k=typeof n==`function`?n(D):[n,T?`active`:null,E?`pending`:null,y?`transitioning`:null].filter(Boolean).join(` `);let A=typeof i==`function`?i(D):i;return H.createElement(W,{...l,"aria-current":O,className:k,ref:u,style:A,to:a,viewTransition:s},typeof c==`function`?c(D):c)});G.displayName=`NavLink`;var K=H.forwardRef(({discover:t=`render`,fetcherKey:n,navigate:r,reloadDocument:i,replace:a,state:o,method:s=`get`,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:m,...h},g)=>{let{useTransitions:_}=H.useContext(f),v=ie(),y=ae(c,{relative:u}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&e.test(c);return H.createElement(`form`,{ref:g,method:b,action:y,onSubmit:i?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,i=t?.getAttribute(`formmethod`)||s,c=()=>v(t||e.currentTarget,{fetcherKey:n,method:i,navigate:r,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:m});_&&r!==!1?H.startTransition(()=>c()):c()},...h,"data-discover":!x&&t===`render`?`true`:void 0})});K.displayName=`Form`;function q({getKey:e,storageKey:t,...n}){let r=H.useContext(E),{basename:i}=H.useContext(f),a=h(),o=v();oe({getKey:e,storageKey:t});let s=H.useMemo(()=>{if(!r||!e)return null;let t=$(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];
1typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),H.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${T(JSON.stringify(t||Z))}, ${T(JSON.stringify(s))})`}})}q.displayName=`ScrollRestoration`;function J(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Y(e){let t=H.useContext(m);return a(t,J(e)),t}function X(e){let t=H.useContext(x);return a(t,J(e)),t}function ee(e,{target:t,replace:n,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=_(),f=h(),m=p(e,{relative:s});return H.useCallback(p=>{if(P(p,t)){p.preventDefault();let t=n===void 0?r(f)===r(m):n,h=()=>d(e,{replace:t,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?H.startTransition(()=>h()):h()}},[f,d,m,n,i,a,t,e,o,s,c,l,u])}function te(e){u(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=H.useRef(F(e)),n=H.useRef(!1),r=h(),i=H.useMemo(()=>I(r.search,n.current?null:t.current),[r.search]),a=_();return[i,H.useCallback((e,t)=>{let r=F(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var ne=0,re=()=>`__${String(++ne)}__`;function ie(){let{router:e}=Y(`useSubmit`),{basename:t}=H.useContext(f),n=S(),r=e.fetch,i=e.navigate;return H.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=V(e,t);a.navigate===!1?await r(a.fetcherKey||re(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ae(e,{relative:t}={}){let{basename:n}=H.useContext(f),i=H.useContext(d);a(i,`useFormAction must be used inside a RouteContext`);let[o]=i.matches.slice(-1),c={...p(e||`.`,{relative:t})},l=h();if(e==null){c.search=l.search;let e=new URLSearchParams(c.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return(!e||e===`.`)&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(c.pathname=c.pathname===`/`?n:s([n,c.pathname])),r(c)}var Z=`react-router-scroll-positions`,Q={};function $(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:o(e.pathname,n)||e.pathname},t)),i??=e.key,i}function oe({getKey:e,storageKey:t}={}){let{router:n}=Y(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=X(`useScrollRestoration`),{basename:a}=H.useContext(f),o=h(),s=v(),c=g();H.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),ce(H.useCallback(e=>{e.persisted&&(window.history.scrollRestoration=`manual`)},[])),se(H.useCallback(()=>{if(c.state===`idle`){let t=$(o,s,a,e);Q[t]=window.scrollY}try{sessionStorage.setItem(t||Z,JSON.stringify(Q))}catch(e){u(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(H.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Z);e&&(Q=JSON.parse(e))}catch{}},[t]),H.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Q,()=>window.scrollY,e?(t,n)=>$(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),H.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{u(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function se(e,t){let{capture:n}=t||{};H.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function ce(e,t){let{capture:n}=t||{};H.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pageshow`,e,t),()=>{window.removeEventListener(`pageshow`,e,t)}},[e,n])}function le(e,{relative:n}={}){let r=H.useContext(b);a(r!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Y(`useViewTransitionState`),s=p(e,{relative:n});if(!r.isTransitioning)return!1;let c=o(r.currentLocation.pathname,i)||r.currentLocation.pathname,l=o(r.nextLocation.pathname,i)||r.nextLocation.pathname;return t(s.pathname,l)!=null||t(s.pathname,c)!=null}export{te as i,G as n,q as r,W as t};
2//# sourceMappingURL=lib-yhiab-qT.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.