PageSourceSearch

https://crisiscleanup.org/assets/AdminGodMode-BY0G_aPX.js

js crisiscleanup.org collected 2026-10-02 16:30:30 UTC 2,319 bytes, 8 lines download raw bytes

1import{a9 as _,z as d,a3 as g,a4 as v,ac as y,ai as b,k as w,m as x}from"./vendor-vue-BR-eKINF.js";import{l as r,m as L,g as h}from"./map-BjrB6nGp.js";import{U as m,m as $}from"./index-D5O7lgDh.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new o.Error().stack;i&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[i]="d8209a54-d7ec-42dc-ad9e-bdc75c53d170",o._sentryDebugIdIdentifier="sentry-dbid-d8209a54-d7ec-42dc-ad9e-bdc75c53d170")}catch{}})();const M={id:"godModeMap",class:"h-full w-full"},D=19,S=_({__name:"AdminGodMode",setup(o){const i=d([]),l=d(),{t:u}=g(),f=async()=>{const{data:n}=await w.get("https://api.crisiscleanup.org/user_geo_locations",{params:{limit:1e3,updated_at__gte:x().subtract(30,"days").toISOString()}}),a=n.results.map(({user:s,point:t,updated_at:c})=>({user_id:s,location:t==null?void 0:t.coordinates,timestamp:c?new Date(c):null})),e=new Map;return a.forEach(s=>{const t=e.get(s.user_id);(!t||new Date(s.timestamp)>new Date(t.timestamp))&&e.set(s.user_id,s)}),[...e.values()]};function p(){h(i.value,a=>{const e=m.find(a.user_id);if(e){const s=e.email?`<div class="text-sm"><a href="mailto:${e.email}" class="ml-1">${e.email}</a></div>`:"",t=e.mobile?`<div class="text-sm"><a href="tel:${e.mobile}" class="ml-1">${e.mobile}</a></div>`:"",c=r.popup({closeButton:!0,closeOnClick:!0,autoClose:!1,closeOnEscapeKey:!0}).setContent(`<div class="flex flex-col items-center">
2          <div class="text-sm font-bold">${e.full_name}</div>
3          ${s}
4          ${t}
5          <div class="text-sm">${e.organization.name}</div>
6          <div class="text-xs italic">${u("casesVue.last_seen")} ${$(a.timestamp)}</div>
7        </div>`);c.setLatLng([a.location[1],a.location[0]]),c.openOn(l.value)}}).addTo(l.value)}return v(async()=>{i.value=await f();const n=i.value.map(s=>s.user_id),a=100,e=[];for(let s=0;s<n.length;s+=a)e.push(m.api().get(`/users?id__in=${n.slice(s,s+a).join(",")}&fields=id,first_name,last_name,email,mobile,organization,files`,{dataKey:"results"}));await Promise.all(e),l.value=r.map("godModeMap",{zoomControl:!0}).setView([35.7465122599185,-96.41150963125656],3),r.tileLayer(L,{maxZoom:D}).addTo(l.value),p()}),(n,a)=>(y(),b("div",M))}});export{S as default};
8//# sourceMappingURL=AdminGodMode-BY0G_aPX.js.map

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.