site: built from c60ea4e
This commit is contained in:
commit
709fcec0e5
59 files changed
+5301
No files matched your search
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import{_ as Or}from"./Search.astro_astro_type_script_index_0_lang.CJiOmi4V.js";var Ur=Object.defineProperty,D=(u,e)=>{for(var t in e)Ur(u,t,{get:e[t],enumerable:!0})};function L(){}function Ee(u){return u()}function Hu(){return Object.create(null)}function W(u){u.forEach(Ee)}function ce(u){return typeof u=="function"}function cu(u,e){return u!=u?e==e:u!==e||u&&typeof u=="object"||typeof u=="function"}var iu;function _u(u,e){return u===e?!0:(iu||(iu=document.createElement("a")),iu.href=e,u===iu.href)}function zr(u){return Object.keys(u).length===0}function g(u,e){u.appendChild(e)}function b(u,e,t){u.insertBefore(e,t||null)}function R(u){u.parentNode&&u.parentNode.removeChild(u)}function lu(u,e){for(let t=0;t<u.length;t+=1)u[t]&&u[t].d(e)}function T(u){return document.createElement(u)}function wr(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function N(u){return document.createTextNode(u)}function p(){return N(" ")}function Q(){return N("")}function V(u,e,t,a){return u.addEventListener(e,t,a),()=>u.removeEventListener(e,t,a)}function h(u,e,t){t==null?u.removeAttribute(e):u.getAttribute(e)!==t&&u.setAttribute(e,t)}function xr(u){return Array.from(u.childNodes)}function z(u,e){e=""+e,u.data!==e&&(u.data=e)}function Eu(u,e){u.value=e??""}function q(u,e,t){u.classList.toggle(e,!!t)}var jr=class{is_svg=!1;e=void 0;n=void 0;t=void 0;a=void 0;constructor(u=!1){this.is_svg=u,this.e=this.n=null}c(u){this.h(u)}m(u,e,t=null){this.e||(this.is_svg?this.e=wr(e.nodeName):this.e=T(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(u)),this.i(t)}h(u){this.e.innerHTML=u,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(u){for(let e=0;e<this.n.length;e+=1)b(this.t,this.n[e],u)}p(u){this.d(),this.h(u),this.i(this.a)}d(){this.n.forEach(R)}},tu;function eu(u){tu=u}function Ir(){if(!tu)throw new Error("Function called outside component initialization");return tu}function Lr(u){Ir().$$.on_destroy.push(u)}var Y=[],au=[],X=[],Tu=[],Pr=Promise.resolve(),Fu=!1;function qr(){Fu||(Fu=!0,Pr.then(Ce))}function Ru(u){X.push(u)}function Kr(u){Tu.push(u)}var ku=new Set,Z=0;function Ce(){if(Z!==0)return;const u=tu;do{try{for(;Z<Y.length;){const e=Y[Z];Z++,eu(e),Vr(e.$$)}}catch(e){throw Y.length=0,Z=0,e}for(eu(null),Y.length=0,Z=0;au.length;)au.pop()();for(let e=0;e<X.length;e+=1){const t=X[e];ku.has(t)||(ku.add(t),t())}X.length=0}while(Y.length);for(;Tu.length;)Tu.pop()();Fu=!1,ku.clear(),eu(u)}function Vr(u){if(u.fragment!==null){u.update(),W(u.before_update);const e=u.dirty;u.dirty=[-1],u.fragment&&u.fragment.p(u.ctx,e),u.after_update.forEach(Ru)}}function Gr(u){const e=[],t=[];X.forEach(a=>u.indexOf(a)===-1?e.push(a):t.push(a)),t.forEach(a=>a()),X=e}var ou=new Set,G;function ru(){G={r:0,c:[],p:G}}function su(){G.r||W(G.c),G=G.p}function U(u,e){u&&u.i&&(ou.delete(u),u.i(e))}function x(u,e,t,a){if(u&&u.o){if(ou.has(u))return;ou.add(u),G.c.push(()=>{ou.delete(u),a&&(t&&u.d(1),a())}),u.o(e)}else a&&a()}function j(u){return u?.length!==void 0?u:Array.from(u)}function Wr(u,e){x(u,1,1,()=>{e.delete(u.key)})}function Jr(u,e,t,a,r,l,s,n,i,C,E,B){let _=u.length,d=l.length,o=_;const c={};for(;o--;)c[u[o].key]=o;const m=[],A=new Map,k=new Map,F=[];for(o=d;o--;){const y=B(r,l,o),H=t(y);let S=s.get(H);S?F.push(()=>S.p(y,e)):(S=C(H,y),S.c()),A.set(H,m[o]=S),H in c&&k.set(H,Math.abs(o-c[H]))}const v=new Set,K=new Set;function P(y){U(y,1),y.m(n,E),s.set(y.key,y),E=y.first,d--}for(;_&&d;){const y=m[d-1],H=u[_-1],S=y.key,w=H.key;y===H?(E=y.first,_--,d--):A.has(w)?!s.has(S)||v.has(S)?P(y):K.has(w)?_--:k.get(S)>k.get(w)?(K.add(S),P(y)):(v.add(w),_--):(i(H,s),_--)}for(;_--;){const y=u[_];A.has(y.key)||i(y,s)}for(;d;)P(m[d-1]);return W(F),m}function Zr(u,e,t){const a=u.$$.props[e];a!==void 0&&(u.$$.bound[a]=t,t(u.$$.ctx[a]))}function bu(u){u&&u.c()}function Cu(u,e,t){const{fragment:a,after_update:r}=u.$$;a&&a.m(e,t),Ru(()=>{const l=u.$$.on_mount.map(Ee).filter(ce);u.$$.on_destroy?u.$$.on_destroy.push(...l):W(l),u.$$.on_mount=[]}),r.forEach(Ru)}function du(u,e){const t=u.$$;t.fragment!==null&&(Gr(t.after_update),W(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Yr(u,e){u.$$.dirty[0]===-1&&(Y.push(u),qr(),u.$$.dirty.fill(0)),u.$$.dirty[e/31|0]|=1<<e%31}function Bu(u,e,t,a,r,l,s=null,n=[-1]){const i=tu;eu(u);const C=u.$$={fragment:null,ctx:[],props:l,update:L,not_equal:r,bound:Hu(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(i?i.$$.context:[])),callbacks:Hu(),dirty:n,skip_bound:!1,root:e.target||i.$$.root};s&&s(C.root);let E=!1;if(C.ctx=t?t(u,e.props||{},(B,_,...d)=>{const o=d.length?d[0]:_;return C.ctx&&r(C.ctx[B],C.ctx[B]=o)&&(!C.skip_bound&&C.bound[B]&&C.bound[B](o),E&&Yr(u,B)),_}):[],C.update(),E=!0,W(C.before_update),C.fragment=a?a(C.ctx):!1,e.target){if(e.hydrate){const B=xr(e.target);C.fragment&&C.fragment.l(B),B.forEach(R)}else C.fragment&&C.fragment.c();e.iLine truncated
|
||||
`)),document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"?console.error(`[DEBUG: Loaded from ${document.currentScript.src??"bad script location"}]`):console.error("no known script location")}E||t(24,E=C?12:30);let O={...m||{},excerptLength:E};await f.options(O);for(const M of A){if(!M.bundlePath)throw new Error("mergeIndex requires a bundlePath parameter");const I=M.bundlePath;delete M.bundlePath,await f.mergeIndex(I,M)}S=f,Tr()}},Tr=async()=>{S&&(Nu=await S.filters(),(!$||!Object.keys($).length)&&t(18,$=Nu))},Fr=f=>{let O={};return Object.entries(f).filter(([,M])=>M).forEach(([M])=>{let[I,J]=M.split(/:(.*)$/);O[I]=O[I]||[],O[I].push(J)}),O};let uu;const Rr=async(f,O)=>{if(!f){t(15,Au=!1),uu&&clearTimeout(uu);return}const M=Fr(O),I=()=>Dr(f,M);c>0&&f?(uu&&clearTimeout(uu),uu=setTimeout(I,c),await Mu(),S.preload(f,{filters:M})):I(),br()},Mu=async()=>{for(;!S;)Su(),await new Promise(f=>setTimeout(f,50))},Dr=async(f,O)=>{t(16,yu=f||""),typeof _=="function"&&(f=_(f)),t(14,mu=!0),t(15,Au=!0),await Mu();const M=++pu,I={filters:O};P&&typeof P=="object"&&(I.sort=P);const J=await S.search(f,I);pu===M&&(J.filters&&Object.keys(J.filters)?.length&&t(18,$=J.filters),t(13,vu=J),t(14,mu=!1),t(17,gu=s))},br=()=>{const f=nu.offsetWidth;f!=mr&&t(10,w.style.paddingRight=`${f+2}px`,w)},vr=f=>{f?.preventDefault(),t(17,gu+=s)},pr=f=>{f.key==="Escape"&&(t(9,H=""),w.blur()),f.key==="Enter"&&f.preventDefault()};function yr(){H=this.value,t(9,H),t(23,k)}function Nr(f){au[f?"unshift":"push"](()=>{w=f,t(10,w)})}function Sr(f){au[f?"unshift":"push"](()=>{nu=f,t(11,nu)})}const Mr=()=>{t(9,H=""),w.blur()};function Hr(f){y=f,t(0,y)}return u.$$set=f=>{"base_path"in f&&t(25,l=f.base_path),"page_size"in f&&t(26,s=f.page_size),"reset_styles"in f&&t(1,n=f.reset_styles),"show_images"in f&&t(2,i=f.show_images),"show_sub_results"in f&&t(3,C=f.show_sub_results),"excerpt_length"in f&&t(24,E=f.excerpt_length),"process_result"in f&&t(4,B=f.process_result),"process_term"in f&&t(27,_=f.process_term),"show_empty_filters"in f&&t(5,d=f.show_empty_filters),"open_filters"in f&&t(6,o=f.open_filters),"debounce_timeout_ms"in f&&t(28,c=f.debounce_timeout_ms),"pagefind_options"in f&&t(29,m=f.pagefind_options),"merge_index"in f&&t(30,A=f.merge_index),"trigger_search_term"in f&&t(23,k=f.trigger_search_term),"translations"in f&&t(7,F=f.translations),"autofocus"in f&&t(8,v=f.autofocus),"focus_on_slash"in f&&t(31,K=f.focus_on_slash),"sort"in f&&t(32,P=f.sort),"selected_filters"in f&&t(0,y=f.selected_filters)},u.$$.update=()=>{u.$$.dirty[0]&8388608&&k&&(t(9,H=k),t(23,k="")),u.$$.dirty[0]&513&&Rr(H,y)},[y,n,i,C,B,d,o,F,v,H,w,nu,hu,vu,mu,Au,yu,gu,$,Ar,gr,Su,vr,k,E,l,s,_,c,m,A,K,P,pr,yr,Nr,Sr,Mr,Hr]}var hl=class extends fu{constructor(u){super(),Bu(this,u,fl,dl,cu,{base_path:25,page_size:26,reset_styles:1,show_images:2,show_sub_results:3,excerpt_length:24,process_result:4,process_term:27,show_empty_filters:5,open_filters:6,debounce_timeout_ms:28,pagefind_options:29,merge_index:30,trigger_search_term:23,translations:7,autofocus:8,focus_on_slash:31,sort:32,selected_filters:0},null,[-1,-1])}},ml=hl,Du;try{document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&(Du=new URL(document.currentScript.src).pathname.match(/^(.*\/)(?:pagefind-)?ui.js.*$/)[1])}catch{Du="/pagefind/"}var gl=class{constructor(u){this._pfs=null;let e=u.element??"[data-pagefind-ui]",t=u.bundlePath??Du,a=u.pageSize??5,r=u.resetStyles??!0,l=u.showImages??!0,s=u.showSubResults??!1,n=u.excerptLength??0,i=u.processResult??null,C=u.processTerm??null,E=u.showEmptyFilters??!0,B=u.openFilters??[],_=u.debounceTimeoutMs??300,d=u.mergeIndex??[],o=u.translations??[],c=u.autofocus??!1,m=u.focusOnSlash??!1,A=u.sort??null;delete u.element,delete u.bundlePath,delete u.pageSize,delete u.resetStyles,delete u.showImages,delete u.showSubResults,delete u.excerptLength,delete u.processResult,delete u.processTerm,delete u.showEmptyFilters,delete u.openFilters,delete u.debounceTimeoutMs,delete u.mergeIndex,delete u.translations,delete u.autofocus,delete u.focusOnSlash,delete u.sort;const k=e instanceof HTMLElement?e:document.querySelector(e);k?this._pfs=new ml({target:k,props:{base_path:t,page_size:a,reset_styles:r,show_images:l,show_sub_results:s,excerpt_length:n,process_result:i,process_term:C,show_empty_filters:E,open_filters:B,debounce_timeout_ms:_,merge_index:d,translations:o,autofocus:c,focus_on_slash:m,sort:A,pagefind_options:u}}):console.error(`Pagefind UI couldn't find the selector ${e}`)}triggerSearch(u){this._pfs.$$set({trigger_search_term:u})}triggerFilters(u){let e={};for(let[t,a]of Object.entries(u))if(Array.isArray(a))for(let r of a)e[`${t}:${r}`]=!0;else e[`${t}:${a}`]=!0;this._pfs.$$set({selected_filters:e})}destroy(){this._pfs.$destroy()}};export{gl as PagefindUI};
|
||||
Reference in new issue
Block a user