PageSourceSearch

https://baode.netlify.app/chunk-YAJZ7BMK.js

js baode.netlify.app collected 2026-10-03 10:30:15 UTC 6,167 bytes, 9 lines download raw bytes

1import{ia as F,ja as $}from"./chunk-3D6T4IK6.js";import{Wd as I,a as C,b as T,f as z,g as w,ie as O,re as S,se as y,ue as W,we as N,ze as A}from"./chunk-W5AAH4LA.js";var R=z(F(),1);var k=(n=>(n[n.All=1]="All",n[n.Title=2]="Title",n[n.Desc=3]="Desc",n[n.Url=4]="Url",n[n.Current=5]="Current",n[n.Quick=6]="Quick",n[n.Id=7]="Id",n[n.Tag=8]="Tag",n[n.Class=9]="Class",n))(k||{});function Q(e){return Math.floor(Math.random()*e)}function ot(e,t){if(!t.trim())return[];t=t.toLowerCase();let{type:a,id:s}=D(),{oneIndex:o,twoIndex:u}=H(s),c=Number(a)||1,l=[],p=[{nav:l,id:-1,title:A("_searchRes"),icon:""}],n=new Map;c===9&&(p=[]);function d(m){m=m||e;t:for(let f=0;f<m.length;f++){let r=m[f];if(c===9){r.title&&(r.title.toLowerCase().includes(t)||r.id==t)&&r.nav?.[0]?.name&&p.push(r),Array.isArray(r.nav)&&d(r.nav);continue}if(Array.isArray(r.nav)&&d(r.nav),r.name){r.name=B(r.name),r.desc=B(r.desc);let g=r.name.toLowerCase(),b=r.desc.toLowerCase(),L=r.url.toLowerCase();if(b[0]==="!")continue;let M=()=>{if(g.includes(t)){let i=r,h=new RegExp(`(${t})`,"i");if(i.__name__=i.name,i.name=i.name.replace(h,"<b>$1</b>"),!n.has(i.id))return n.set(i.id,!0),l.push(i),!0}return!1},_=()=>{if(L.includes(t)&&!n.has(r.id)||r.tags.some(h=>h.url?.includes(t))&&!n.has(r.id))return n.set(r.id,!0),l.push(r),!0},P=()=>{if(b.includes(t)){let i=r,h=new RegExp(`(${t})`,"i");if(i.__desc__=i.desc,i.desc=i.desc.replace(h,"<b>$1</b>"),!n.has(i.id))return n.set(i.id,!0),l.push(i),!0}return!1},Y=()=>{if(r.top&&g.includes(t)){let i=r,h=new RegExp(`(${t})`,"i");if(i.__name__=i.name,i.name=i.name.replace(h,"<b>$1</b>"),!n.has(i.id))return n.set(i.id,!0),l.push(i),!0}return!1},q=()=>r.tags.forEach(i=>{W()[i.id]?.name?.toLowerCase()===t&&(n.has(r.id)||(n.set(r.id,!0),l.push(r)))}),G=()=>r.id==t?(l.push(r),!0):!1;try{switch(c){case 4:_();break;case 2:M();break;case 3:P();break;case 6:Y();break;case 8:q();break;case 7:if(G())break t;break;default:M(),P(),_()}}catch(i){console.error(i)}}}}return c===5?d(e[o].nav[u].nav):d(),c!==9&&l.length<=0?[]:p}function x(){return`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}`}var v;function st(){v&&clearInterval(v);let e="random-light-bg",t=document.getElementById(e)||document.createElement("div"),a=Q(360);t.id=e,t.className="dark-bg",t.style.cssText=`
2    position: fixed;
3    top: 0;
4    left: 0;
5    right: 0;
6    bottom: 0;
7    z-index: -3;
8    transition: 1s linear;
9  `,t.style.backgroundImage=`linear-gradient(${a}deg, ${x()} 0%, ${x()} 100%)`,document.body.appendChild(t),v=setInterval(()=>{let o=`linear-gradient(${a}deg, ${x()} 0%, ${x()} 100%)`;t.style.opacity="0.3",setTimeout(()=>{t.style.backgroundImage=o,t.style.opacity="1"},1e3)},1e4)}function at(){v&&(clearInterval(v),v=null);let e=document.getElementById("random-light-bg");e&&e.parentNode?.removeChild(e)}function D(e=!0){let{href:t}=location,a=t.split("?")[1]||"",s=R.default.parse(a),o=s.id;if(e&&s.id==null)try{let u=localStorage.getItem(I.LOCATION);u&&(o=JSON.parse(u).id)}catch{}return T(C({},s),{type:s.type,q:s.q||"",id:o})}function it(){let{id:e}=D();window.localStorage.setItem(I.LOCATION,JSON.stringify({id:e}))}function ct(){let e=y().list[0]||{};try{let t=window.localStorage.getItem(I.SEARCH_ENGINE);if(t){let a=JSON.parse(t),s=y().list.find(o=>o.name===a.name);s&&(e=s)}}catch{}return e}function lt(e){window.localStorage.setItem(I.SEARCH_ENGINE,JSON.stringify(e))}function ut(){let e=window.localStorage.getItem(I.IS_DARK),t=window?.matchMedia?.("(prefers-color-scheme: dark)")?.matches;return!e&&t?t:!!Number(e)}function dt(e){return w(this,null,function*(){try{return yield navigator.clipboard.writeText(e),!0}catch(t){return $.emit("MESSAGE",{type:"error",message:t.message}),!1}})}function ft(e){return w(this,null,function*(){let t={valid:!1,url:e};if(!e||e==="null"||e==="undefined")return t;let{protocol:a}=window.location;return a==="https:"&&e.startsWith("http:")?t:new Promise(s=>{let o=document.createElement("img");o.src=e,o.style.display="none",o.onload=()=>{o.parentNode?.removeChild(o),t.valid=!0,s(t)},o.onerror=()=>{o.parentNode?.removeChild(o),s(t)},document.body.append(o)})})}function B(e=""){return e?e.replace(/<b>|<\/b>/g,""):""}function mt(){let{id:e}=D(),{oneIndex:t,twoIndex:a}=H(e),s=[],o=N();try{o[t]&&o[t]?.nav?.length>0&&(O||!o[t].nav[a].ownVisible)?s=o[t].nav[a].nav:s=[]}catch{s=[]}return s}function E(e){return String(e).padStart(2,"0")}function gt(e){let t=document.querySelectorAll(e),a=Number.MAX_SAFE_INTEGER;if(t.length<=0)return a;let o=t[0].parentNode.clientWidth,u=0;for(let c=0;c<t.length;c++){let l=t[c];if(u+=l.clientWidth,u>o){a=c-1;break}}return a}function U(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function pt(){let e=new Date,t=new Date(e.getFullYear(),0,0),a=e-t,s=1e3*60*60*24;return Math.floor(a/s)}function ht(){let e=A("_weeks"),t=new Date,a=t.getFullYear(),s=E(t.getHours()),o=E(t.getMinutes()),u=E(t.getSeconds()),c=t.getMonth()+1,l=t.getDate(),p=t.getDay(),n=E(l);return{year:a,hours:s,minutes:o,seconds:u,month:c,date:l,zeroDate:n,dayText:e[p]}}function bt(){let{theme:e,appTheme:t}=S(),a=U()?t:e;return a==="Current"?e:a}function H(e,t=0,a=!1){e=Number(e);let s=t,o=t,u=t,c=-1,l=[],p=N();t:for(let n=0;n<p.length;n++){let d=p[n];if(d.id===e){s=n,l.push(d.title);break}if(Array.isArray(d.nav))for(let m=0;m<d.nav.length;m++){let f=d.nav[m];if(f.id===e){c=d.id,s=n,o=m,l.push(d.title,f.title);break t}if(Array.isArray(f.nav))for(let r=0;r<f.nav.length;r++){let g=f.nav[r];
9if(g.id===e){c=f.id,s=n,o=m,u=r,l.push(d.title,f.title,g.title);break t}if(a&&Array.isArray(g.nav)){for(let b=0;b<g.nav.length;b++)if(g.nav[b].id===e){c=g.id,s=n,o=m,u=r,l.push(d.title,f.title,g.title);break t}}}}}return{parentId:c,oneIndex:s,twoIndex:o,threeIndex:u,breadcrumb:l}}function It(e,t,a){if(!e||!t)return;let s=e.offsetWidth,o=t.offsetWidth,c=t.offsetLeft-(s-o)/2;e.scrollTo(C({left:c,behavior:"smooth"},a))}function vt(e){e.target.style.display="none"}export{k as a,Q as b,ot as c,x as d,st as e,at as f,D as g,it as h,ct as i,lt as j,ut as k,dt as l,ft as m,B as n,mt as o,gt as p,U as q,pt as r,ht as s,bt as t,H as u,It as v,vt as w};

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.