1import{r as S,j as N}from"./chunk-6CSD65Y2-C0TiM0T8.js";import{M as A,r as W,u as R,o as q}from"./react-Dja6yQfE.js";function $({children:t,...n}){const i=S.useContext(A);n={...i,...n},n.transition=W(n.transition,i.transition),n.isStatic=R(()=>n.isStatic);const s=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations,n.isValidProp]);return N.jsx(A.Provider,{value:s,children:t})}function F(t){const n=R(()=>q(t)),{isStatic:i}=S.useContext(A);if(i){const[,s]=S.useState(t);S.useEffect(()=>n.on("change",s),[])}return n}const _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function H(t){const n=t??_;return n[Math.floor(Math.random()*n.length)]}function I(t,n,i,s){return typeof t=="function"?t(n,i):t??s}function J(t){return t!==null&&typeof t=="object"&&"set"in t&&typeof t.set=="function"}function U(t){return typeof t=="string"?document.querySelector(t):t}function tt(t,n={}){const{chars:i,delay:s=0,duration:r=1,interval:p=.05,onComplete:C}=n,b=J(t);let f,g;if(b)f=t.get(),g=e=>t.set(e);else{const e=U(t);if(!e)return{stop:()=>{},play:()=>{},finish:()=>{},finished:Promise.resolve()};f=e.textContent||"",g=l=>{e.textContent=l}}const u=f.length,c=new Array(u).fill("idle"),m=new Array(u).fill(null);let d=null,a=!1,h=null;const v=new Promise(e=>{h=e});function y(){let e="";for(let l=0;l<u;l++){const o=f[l];o===" "||c[l]==="revealed"?e+=o:c[l]==="scrambling"?e+=H(i):e+=o}g(e)}function x(){c.every((l,o)=>l==="revealed"||f[o]===" ")&&(w(),C==null||C(),h==null||h())}function D(){d||(d=setInterval(y,p*1e3))}function w(){d&&(clearInterval(d),d=null)}function L(){for(let e=0;e<m.length;e++)m[e]&&(m[e](),m[e]=null)}function E(e,l){const o=setTimeout(()=>{a&&(c[e]="revealed",y(),x())},l);m[e]=()=>clearTimeout(o)}function P(){if(!a){a=!0;for(let e=0;e<u;e++)if(f[e]===" ")c[e]="revealed";else{const l=I(s,e,u,0);c[e]=l===0?"scrambling":"idle"}D();for(let e=0;e<u;e++){if(f[e]===" ")continue;const l=I(s,e,u,0),o=I(r,e,u,0);if(l>0){const M=setTimeout(()=>{a&&(c[e]="scrambling",o!==1/0&&E(e,o*1e3))},l*1e3);m[e]=()=>clearTimeout(M)}else o!==1/0&&E(e,o*1e3)}y()}}function O(){if(a){a=!1,L();for(let e=0;e<u;e++)c[e]="revealed";w(),g(f),h==null||h()}}function k(){if(!a)return;a=!1,L();let e=1/0;for(let o=0;o<u;o++){if(f[o]===" ")continue;const M=I(r,o,u,0);M!==1/0&&(e=Math.min(e,M))}e===1/0&&(e=0);for(let o=0;o<u;o++){if(f[o]===" "){c[o]="revealed";continue}const M=I(r,o,u,0),T=M===1/0?0:M-e;if(T===0)c[o]="revealed";else{c[o]="scrambling";const B=setTimeout(()=>{c[o]="revealed",y(),x()},T*1e3);m[o]=()=>clearTimeout(B)}}c.some(o=>o==="scrambling")?D():w(),y(),x()}return P(),{stop:O,play:P,finish:k,finished:v}}function V(t,n){return t.length>n.length||t.length>0&&!n.startsWith(t)}function j(t,n,i){return t+(n-t)*i}function et(t,n,i,s,r){if(V(n,t))return i*r;if(s==="natural")return z(t,n,i);if(typeof s=="number"&&s>0){const p=i*(s/100);return i+j(-p,p,Math.random())}return i}function z(t,n,i){const s=n.length,r=t[s],p=t[s-1];if(!r)return i;const b=t.slice(0,s).lastIndexOf(" "),f=s-b-1,g=b+1,c=t.slice(s).indexOf(" "),d=(c===-1?t.length:s+c)-g;let a=1;if(p&&/[.!?]/.test(p)&&r===" "&&(a*=3),d<=3?a*=.7:(f===0&&r!==" "&&(a*=1.5),f===d-1&&(a*=1.4)),f>0&&f<d-1&&d>3){const x=Math.min(f/d,.4);a*=1-x}G.has(r)&&(a*=1.5),K.has(r)&&(a*=1.5),/\d/.test(r)&&(a*=1.3),d>8&&(a*=1.3),r!==r.toLowerCase()&&(a*=1.25);const h=200;if(s>h){const x=Math.min((s-h)/1e3,.3);a*=1+x}const v=j(-.25,.25,Math.random());a*=1+v;const y=i*a;return Math.max(i*.2,y)}const G=new Set([".",",","!","?",":",";","'",'"',"-","(",")"]),K=new Set(["!","@","#","$","%","^","&","*","(",")","_","+","{","}","|",":",'"',"<",">","?"]);function Q(t,n){let i=n-1;for(;i>=0&&/\s/.test(t[i]);)i--;for(;i>=0&&!/\s/.test(t[i]);)i--;return Math.max(0,i+1)}function X(t,n){const i=Math.min(t.length,n.length);let s=0;for(let r=0;r<i&&t[r]===n[r];r++)s=r+1;return s}function nt(t,n,i,s){if(i==="type"&&V(t,n)){if(s==="all")return n.slice(0,X(t,n));if(s==="word"){const r=Q(t,t.length);return t.slice(0,r)}else return t.slice(0,-1)}return n.slice(0,t.length+1)}export{$ as M,nt as a,et as g,tt as s,F as u};
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.