PageSourceSearch

https://iank.it/_astro/ClientRouter.astro_astro_type_script_index_0_lang.CLDwYp7M.js

js iank.it collected 2026-09-25 22:45:46 UTC 12,601 bytes, 1 lines download raw bytes

1import{i as W}from"./index.Bel2lkwj.js";const y="data-astro-transition-persist",V=["data-astro-transition","data-astro-transition-fallback"],P=new Set;function _(t){const e=t.src?new URL(t.src,location.href).href:t.textContent;return P.has(e)?!0:(P.add(e),!1)}function j(t){for(const e of t.scripts)!e.hasAttribute("data-astro-rerun")&&_(e)&&(e.dataset.astroExec="")}function K(t){const e=document.documentElement,n=[...e.attributes].filter(({name:r})=>(e.removeAttribute(r),V.includes(r)));[...t.documentElement.attributes,...n].forEach(({name:r,value:o})=>e.setAttribute(r,o))}function G(t){for(const e of Array.from(document.head.children)){const n=Q(e,t);n?n.remove():e.remove()}document.head.append(...t.head.children)}function z(t,e){e.replaceWith(t);for(const n of e.querySelectorAll(`[${y}]`)){const r=n.getAttribute(y),o=t.querySelector(`[${y}="${r}"]`);o&&(o.replaceWith(n),o.localName==="astro-island"&&Z(n)&&!tt(n,o)&&(n.setAttribute("ssr",""),n.setAttribute("props",o.getAttribute("props"))))}}const J=()=>{const t=document.activeElement;if(t?.closest(`[${y}]`)){if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){const e=t.selectionStart,n=t.selectionEnd;return()=>S({activeElement:t,start:e,end:n})}return()=>S({activeElement:t})}else return()=>S({activeElement:null})},S=({activeElement:t,start:e,end:n})=>{t&&(t.focus(),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(typeof e=="number"&&(t.selectionStart=e),typeof n=="number"&&(t.selectionEnd=n)))},Q=(t,e)=>{const n=t.getAttribute(y),r=n&&e.head.querySelector(`[${y}="${n}"]`);if(r)return r;if(t.matches("link[rel=stylesheet]")){const o=t.getAttribute("href");return e.head.querySelector(`link[rel=stylesheet][href="${o}"]`)}return null},Z=t=>{const e=t.dataset.astroTransitionPersistProps;return e==null||e==="false"},tt=(t,e)=>t.getAttribute("props")===e.getAttribute("props"),et=t=>{j(t),K(t),G(t);const e=J();z(t.body,document.body),e()},nt="astro:before-preparation",ot="astro:after-preparation",rt="astro:before-swap",it="astro:after-swap",st=t=>document.dispatchEvent(new Event(t));class X extends Event{from;to;direction;navigationType;sourceElement;info;newDocument;signal;constructor(e,n,r,o,s,u,a,c,d,l){super(e,n),this.from=r,this.to=o,this.direction=s,this.navigationType=u,this.sourceElement=a,this.info=c,this.newDocument=d,this.signal=l,Object.defineProperties(this,{from:{enumerable:!0},to:{enumerable:!0,writable:!0},direction:{enumerable:!0,writable:!0},navigationType:{enumerable:!0},sourceElement:{enumerable:!0},info:{enumerable:!0},newDocument:{enumerable:!0,writable:!0},signal:{enumerable:!0}})}}class at extends X{formData;loader;constructor(e,n,r,o,s,u,a,c,d,l){super(nt,{cancelable:!0},e,n,r,o,s,u,a,c),this.formData=d,this.loader=l.bind(this,this),Object.defineProperties(this,{formData:{enumerable:!0},loader:{enumerable:!0,writable:!0}})}}class ct extends X{direction;viewTransition;swap;constructor(e,n){super(rt,void 0,e.from,e.to,e.direction,e.navigationType,e.sourceElement,e.info,e.newDocument,e.signal),this.direction=e.direction,this.viewTransition=n,this.swap=()=>et(this.newDocument),Object.defineProperties(this,{direction:{enumerable:!0},viewTransition:{enumerable:!0},swap:{enumerable:!0,writable:!0}})}}async function lt(t,e,n,r,o,s,u,a,c){const d=new at(t,e,n,r,o,s,window.document,u,a,c);return document.dispatchEvent(d)&&(await d.loader(),d.defaultPrevented||(st(ot),d.navigationType!=="traverse"&&L({scrollX,scrollY}))),d}function ut(t,e){const n=new ct(t,e);return document.dispatchEvent(n),n.swap(),n}const dt=history.pushState.bind(history),A=history.replaceState.bind(history),L=t=>{history.state&&(history.scrollRestoration="manual",A({...history.state,...t},""))},x=!!document.startViewTransition,D=()=>!!document.querySelector('[name="astro-view-transitions-enabled"]'),Y=(t,e)=>t.pathname===e.pathname&&t.search===e.search;let m,w,v;const C=t=>document.dispatchEvent(new Event(t)),$=()=>C("astro:page-load"),ft=()=>{let t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="astro-route-announcer",document.body.append(t),setTimeout(()=>{let e=document.title||document.querySelector("h1")?.textContent||location.pathname;t.textContent=e},60)},k="data-astro-transition-persist",I="data-astro-transition",R="data-astro-transition-fallback";let N,g=0;history.state?(g=history.state.index,scrollTo({left:history.state.scrollX,top:history.state.scrollY})):D()&&(A({index:g,scrollX,scrollY},""),history.scrollRestoration="manual");async function mt(t,e){try{const n=await fetch(t,e),o=(n.headers.get("content-type")??"").split(";",1)[0].trim();return o!=="text/html"&&o!=="application/xhtml+xml"?null:{html:await n.text(),redirected:n.redirected?n.url:void 0,mediaType:o}}catch{return null}}function q(){const t=document.querySelector('[name="astro-view-transitions-fallback"]');return t?t.getAttribute("content"):"animate"}function ht(){let t=Promise.resolve(),e=!1;for(const n of document.getElementsByTagName("script"))n.dataset.astroExec===void 0&&n.getAttribute("type")==="module"&&(e=n.getAttribute("src")===null);e&&document.body.insertAdjacentHTML("beforeend",'<script type="module" src="data:application/javascript,"/>');for(const n of document.getElementsByTagName("script")){if(n.dataset.astroExec==="")continue;const r=n.getAttribute("type");if(r&&r!=="module"&&r!=="text/javascript")continue;const o=document.createElement("script");o.innerHTML=n.innerHTML;
1for(const s of n.attributes){if(s.name==="src"){const u=new Promise(a=>{o.onload=o.onerror=a});t=t.then(()=>u)}o.setAttribute(s.name,s.value)}o.dataset.astroExec="",n.replaceWith(o)}return t}const B=(t,e,n,r,o)=>{const s=Y(e,t),u=document.title;document.title=r;let a=!1;if(t.href!==location.href&&!o)if(n.history==="replace"){const c=history.state;A({...n.state,index:c.index,scrollX:c.scrollX,scrollY:c.scrollY},"",t.href)}else dt({...n.state,index:++g,scrollX:0,scrollY:0},"",t.href);if(document.title=u,v=t,s||(scrollTo({left:0,top:0,behavior:"instant"}),a=!0),o)scrollTo(o.scrollX,o.scrollY);else{if(t.hash){history.scrollRestoration="auto";const c=history.state;location.href=t.href,history.state||(A(c,""),s&&window.dispatchEvent(new PopStateEvent("popstate")))}else a||scrollTo({left:0,top:0,behavior:"instant"});history.scrollRestoration="manual"}};function pt(t){const e=[];for(const n of t.querySelectorAll("head link[rel=stylesheet]"))if(!document.querySelector(`[${k}="${n.getAttribute(k)}"], link[rel=stylesheet][href="${n.getAttribute("href")}"]`)){const r=document.createElement("link");r.setAttribute("rel","preload"),r.setAttribute("as","style"),r.setAttribute("href",n.getAttribute("href")),e.push(new Promise(o=>{["load","error"].forEach(s=>r.addEventListener(s,o)),document.head.append(r)}))}return e}async function M(t,e,n,r,o){async function s(c){function d(p){const h=p.effect;return!h||!(h instanceof KeyframeEffect)||!h.target?!1:window.getComputedStyle(h.target,h.pseudoElement).animationIterationCount==="infinite"}const l=document.getAnimations();document.documentElement.setAttribute(R,c);const f=document.getAnimations().filter(p=>!l.includes(p)&&!d(p));return Promise.allSettled(f.map(p=>p.finished))}if(o==="animate"&&!n.transitionSkipped&&!t.signal.aborted)try{await s("old")}catch{}const u=document.title,a=ut(t,n.viewTransition);B(a.to,a.from,e,u,r),C(it),o==="animate"&&(!n.transitionSkipped&&!a.signal.aborted?s("new").finally(()=>n.viewTransitionFinished()):n.viewTransitionFinished())}function wt(){return m?.controller.abort(),m={controller:new AbortController}}async function U(t,e,n,r,o){const s=wt();if(!D()||location.origin!==n.origin){s===m&&(m=void 0),location.href=n.href;return}const u=o?"traverse":r.history==="replace"?"replace":"push";if(u!=="traverse"&&L({scrollX,scrollY}),Y(e,n)&&(t!=="back"&&n.hash||t==="back"&&e.hash)){B(n,e,r,document.title,o),s===m&&(m=void 0);return}
1const a=await lt(e,n,t,u,r.sourceElement,r.info,s.controller.signal,r.formData,c);if(a.defaultPrevented||a.signal.aborted){s===m&&(m=void 0),a.signal.aborted||(location.href=n.href);return}async function c(i){const f=i.to.href,p={signal:i.signal};if(i.formData){p.method="POST";const b=i.sourceElement instanceof HTMLFormElement?i.sourceElement:i.sourceElement instanceof HTMLElement&&"form"in i.sourceElement?i.sourceElement.form:i.sourceElement?.closest("form");p.body=e!==void 0&&Reflect.get(HTMLFormElement.prototype,"attributes",b).getNamedItem("enctype")?.value==="application/x-www-form-urlencoded"?new URLSearchParams(i.formData):i.formData}const h=await mt(f,p);if(h===null){i.preventDefault();return}if(h.redirected){const b=new URL(h.redirected);if(b.origin!==i.to.origin){i.preventDefault();return}i.to=b}if(N??=new DOMParser,i.newDocument=N.parseFromString(h.html,h.mediaType),i.newDocument.querySelectorAll("noscript").forEach(b=>b.remove()),!i.newDocument.querySelector('[name="astro-view-transitions-enabled"]')&&!i.formData){i.preventDefault();return}const E=pt(i.newDocument);E.length&&!i.signal.aborted&&await Promise.all(E)}async function d(){if(w&&w.viewTransition){try{w.viewTransition.skipTransition()}catch{}try{await w.viewTransition.updateCallbackDone}catch{}}return w={transitionSkipped:!1}}const l=await d();if(a.signal.aborted){s===m&&(m=void 0);return}if(document.documentElement.setAttribute(I,a.direction),x)l.viewTransition=document.startViewTransition(async()=>await M(a,r,l,o));else{const i=(async()=>{await Promise.resolve(),await M(a,r,l,o,q())})();l.viewTransition={updateCallbackDone:i,ready:i,finished:new Promise(f=>l.viewTransitionFinished=f),skipTransition:()=>{l.transitionSkipped=!0,document.documentElement.removeAttribute(R)},types:new Set}}l.viewTransition?.updateCallbackDone.finally(async()=>{await ht(),$(),ft()}),l.viewTransition?.finished.finally(()=>{l.viewTransition=void 0,l===w&&(w=void 0),s===m&&(m=void 0),document.documentElement.removeAttribute(I),document.documentElement.removeAttribute(R)});try{await l.viewTransition?.updateCallbackDone}catch(i){const f=i;console.log("[astro]",f.name,f.message,f.stack)}}async function O(t,e){await U("forward",v,new URL(t,location.href),e??{})}function bt(t){if(!D()&&t.state){location.reload();return}if(t.state===null)return;const e=history.state,n=e.index,r=n>g?"forward":"back";g=n,U(r,v,new URL(location.href),{},e)}const F=()=>{history.state&&(scrollX!==history.state.scrollX||scrollY!==history.state.scrollY)&&L({scrollX,scrollY})};{if(x||q()!=="none")if(v=new URL(location.href),addEventListener("popstate",bt),addEventListener("load",$),"onscrollend"in window)addEventListener("scrollend",F);else{let t,e,n,r;const o=()=>{if(r!==history.state?.index){clearInterval(t),t=void 0;return}if(e===scrollY&&n===scrollX){clearInterval(t),t=void 0,F();return}else e=scrollY,n=scrollX};addEventListener("scroll",()=>{t===void 0&&(r=history.state?.index,e=scrollY,n=scrollX,t=window.setInterval(o,50))},{passive:!0})}for(const t of document.getElementsByTagName("script"))_(t),t.dataset.astroExec=""}let T=null;function yt(){const t=document.querySelector('[name="astro-view-transitions-fallback"]');return t?t.getAttribute("content"):"animate"}function H(t){return t.dataset.astroReload!==void 0}const gt=t=>t.button&&t.button!==0||t.metaKey||t.ctrlKey||t.altKey||t.shiftKey;(x||yt()!=="none")&&(document.addEventListener("click",t=>{let e=t.target;if(T=gt(t)?e:null,t.composed&&(e=t.composedPath()[0]),e instanceof Element&&(e=e.closest("a, area")),!(e instanceof HTMLAnchorElement)&&!(e instanceof SVGAElement)&&!(e instanceof HTMLAreaElement))return;const n=e instanceof HTMLElement?e.target:e.target.baseVal,r=e instanceof HTMLElement?e.href:e.href.baseVal,o=new URL(r,location.href).origin;H(e)||e.hasAttribute("download")||!e.href||n&&n!=="_self"||o!==location.origin||T||t.defaultPrevented||(t.preventDefault(),O(r,{history:e.dataset.astroHistory==="replace"?"replace":"auto",sourceElement:e}))}),document.addEventListener("submit",t=>{let e=t.target;const n=t.submitter,r=n&&n===T;if(T=null,e.tagName!=="FORM"||t.defaultPrevented||H(e)||r)return;
1const o=e,s=new FormData(o,n),u=typeof o.action=="string"?o.action:o.getAttribute("action"),a=typeof o.method=="string"?o.method:o.getAttribute("method");let c=n?.getAttribute("formaction")??u??location.pathname;const d=n?.getAttribute("formmethod")??a??"get";if(d==="dialog"||location.origin!==new URL(c,location.href).origin)return;const l={sourceElement:n??o};if(d==="get"){const i=new URLSearchParams(s),f=new URL(c);f.search=i.toString(),c=f.toString()}else l.formData=s;t.preventDefault(),O(c,l)}),W({prefetchAll:!0}));

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.