PageSourceSearch

https://plausible.piwigo.org/script.js

js piwigo.org collected 2026-09-24 08:35:24 UTC 4,773 bytes, 1 lines download raw bytes

1!function(){"use strict";(t=>{const{screen:{width:e,height:a},navigator:{language:n,doNotTrack:r,msDoNotTrack:i},location:o,document:c,history:s,top:d,doNotTrack:l}=t,{currentScript:u,referrer:f}=c;if(!u)return;const{hostname:h,href:m,origin:p}=o;let g;try{g=m.startsWith("data:")?void 0:t.localStorage}catch{}const y="data-",v="false",b="true",T=u.getAttribute.bind(u),w=t=>T(`${y}${t}`),S=w("website-id"),x=w("host-url"),k=w("before-send"),E=w("distinct-id")||void 0,M=w("tag")||void 0,$=w("auto-track")!==v,j=w("do-not-track")===b,N=w("exclude-search")===b,O=w("exclude-hash")===b,A=w("domains")||"",I=w("fetch-credentials")||"omit",L=w("performance")===b,P=w("auto-pageview")!==v,K=A.split(",").map(t=>t.trim()),R=`${(x||""||u.src.split("/").slice(0,-1).join("/")).replace(/\/$/,"")}/api/send`,_=`${e}x${a}`,D=/data-umami-event-([\w-_]+)/,W=`${y}umami-event`,B=300,C=t=>{if(!t)return t;try{const e=new URL(t,o.href);return N&&(e.search=""),O&&(e.hash=""),e.toString()}catch{return t}},J=()=>{return{website:S,screen:_,language:n,title:c.title,hostname:h,url:Y,referrer:(t=Z,t===p||t?.startsWith(p+"/")?t.slice(p.length):t),tag:M,id:at||void 0};var t},U=(t,e,a)=>{a&&("function"==typeof X&&X(),Z=Y,Y=C(a),Y!==Z&&P&&setTimeout(G,B))},q=()=>et||!S||g?.getItem("umami.disabled")||A&&!K.includes(h)||j&&(()=>{const t=l||r||i;return 1===t||"1"===t||"yes"===t})(),z=async(e,a="event")=>{if(q())return;const n=t[k];if("function"==typeof n&&(e=await Promise.resolve(n(a,e))),e)try{const t=await fetch(R,{keepalive:!0,method:"POST",body:JSON.stringify({type:a,payload:e}),headers:{"Content-Type":"application/json","x-umami-website-id":S,"x-umami-hostname":h,...void 0!==V&&{"x-umami-cache":V}},credentials:I}),n=await t.json();n&&(et=!!n.disabled,V=n.cache)}catch(t){}},F=()=>{tt||(tt=!0,P&&G(),(()=>{const t=(t,e,a)=>{const n=t[e];return(...e)=>{const r=n.apply(t,e);return a.apply(null,e),r}};s.pushState=t(s,"pushState",U),s.replaceState=t(s,"replaceState",U)})(),(()=>{const t=async t=>{const e=t.getAttribute(W);if(e){const a={};return t.getAttributeNames().forEach(e=>{const n=e.match(D);n&&(a[n[1]]=t.getAttribute(e))}),G(e,a)}};c.addEventListener("click",e=>{const a=e.target.closest(`[${W}]`);if(a){if("A"===a.tagName&&a.href){const{href:n,target:r}=a,i="_blank"===r||e.ctrlKey||e.shiftKey||e.metaKey||e.button&&1===e.button;return i||e.preventDefault(),t(a).finally(()=>{i||(("_top"===r?d.location:o).href=n)})}return t(a)}},!0)})(),L&&Q())},G=(t,e)=>z("string"==typeof t?{...J(),name:t,data:e}:"object"==typeof t?{...t}:"function"==typeof t?t(J()):J()),H=(t,e)=>{const a="string"==typeof t?t:t.id;return void 0!==a&&(at=a),V="",z({...J(),data:"object"==typeof t?t:e},"identify")},Q=()=>{const e={};let a,n=!1,r=!0,i=0,o=0;const s=(t,e)=>{try{new PerformanceObserver(t=>{t.getEntries().forEach(e)}).observe({type:t,buffered:!0})}catch{}};s("navigation",t=>{i=t.activationStart||0,e.ttfb=Math.max(t.responseStart-i,0)}),s("paint",t=>{"first-contentful-paint"===t.name&&(e.fcp=Math.max(t.startTime-i,0))}),s("largest-contentful-paint",t=>{e.lcp=Math.max(t.startTime-i,0)});let d=0,l=[];s("layout-shift",t=>{if(!t.hadRecentInput){const a=l[l.length-1],n=l[0];a&&t.startTime-a.startTime-a.duration<1e3&&t.startTime-n.startTime<5e3?(d+=t.value,l.push(t)):(d=t.value,l=[t]),d>(e.cls||0)&&(e.cls=d)}});let u,f={};const h=t=>{t.forEach(t=>{if(t.interactionId){const e=f[t.interactionId];(!e||t.duration>e)&&(f[t.interactionId]=t.duration)}})};try{u=new PerformanceObserver(t=>h(t.getEntries())),u.observe({type:"event",buffered:!0,durationThreshold:40})}catch{}const m=e=>{try{return t.performance?.getEntriesByType?.(e)||[]}catch{return[]}},p=()=>{n||((()=>{if(r){if(void 0===e.ttfb){const t=m("navigation")?.[0];t&&(e.ttfb=Math.max(t.responseStart-(t.activationStart||0),0))}if(void 0===e.fcp){const t=m("paint")?.find(t=>"first-contentful-paint"===t.name);t&&(e.fcp=Math.max(t.startTime-i,0))}if(void 0===e.lcp){const t=m("largest-contentful-paint"),a=t?.[t.length-1];a&&(e.lcp=Math.max(a.startTime-i,0))}}})(),(()=>{u&&h(u.takeRecords());const t=Object.values(f).sort((t,e)=>e-t);if(t.length){const a=Math.floor(.02*Math.max(t.length,10));e.inp=t[Math.min(a,t.length-1)]}})(),e.duration=Math.round(performance.now()-o),n=!0,a&&clearTimeout(a),z({...J(),...e},"performance"))};X=()=>{p(),r=!1,Object.keys(e).forEach(t=>{delete e[t]}),i=0,o=performance.now(),d=0,l=[],f={},n=!1,a&&clearTimeout(a),a=setTimeout(p,1e4)},a=setTimeout(p,1e4),c.addEventListener("visibilitychange",()=>{"hidden"===c.visibilityState&&p()}),t.addEventListener("pagehide",p)};t.umami||(t.umami={track:G,identify:H,getSession:()=>({cache:V,website:S})});let V,X,Y=C(m),Z=C(f),tt=!1,et=!1,at=E;E&&H(E),$&&!q()&&("complete"===c.readyState?F():c.addEventListener("readystatechange",F,!0))})(window)}();

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.