PageSourceSearch

https://sensori-sulmona.web.app/_app/immutable/nodes/11.79sEtlF1.js

js sensori-sulmona.web.app collected 2026-10-03 12:36:00 UTC 2,687 bytes, 1 lines download raw bytes

1import{a as c,f as n}from"../chunks/VwYwsrZD.js";import"../chunks/CavcNVTH.js";import{a as J}from"../chunks/2j6Q-QeC.js";import{aI as K,aF as O,a_ as o,Q as r,aS as v,aM as a,aa as s,aA as y,b5 as S}from"../chunks/FCc_dNMQ.js";import{e as z,s as d}from"../chunks/uCbWMyK6.js";import{i as C}from"../chunks/DfKfOWC2.js";import{e as V}from"../chunks/Wkj4hLgL.js";import{i as W}from"../chunks/Dv76yCdu.js";import{g as R}from"../chunks/DGkSXBWv.js";import{g as X}from"../chunks/DRqYOy2S.js";import{A as Y}from"../chunks/DuE25Udr.js";var Z=n('<div class="error-message svelte-172r23c"> </div>'),$=n('<p class="loading svelte-172r23c">Caricamento in corso...</p>'),tt=n('<p class="empty-state svelte-172r23c">Nessun sensore presente</p>'),et=n('<tr class="clickable-row svelte-172r23c"><td class="svelte-172r23c"> </td><td class="svelte-172r23c"> </td><td class="svelte-172r23c"> </td><td class="svelte-172r23c"> </td></tr>'),at=n('<div class="table-container svelte-172r23c"><table class="svelte-172r23c"><thead class="svelte-172r23c"><tr><th class="svelte-172r23c">ID</th><th class="svelte-172r23c">Nome</th><th class="svelte-172r23c">Indirizzo</th><th class="svelte-172r23c">Descrizione</th></tr></thead><tbody class="svelte-172r23c"></tbody></table></div>'),rt=n('<div class="container svelte-172r23c"><nav class="path-nav svelte-172r23c"><a href="/admin">Admin</a> / <span>Sensori</span></nav> <div class="header-row svelte-172r23c"><h1 class="svelte-172r23c">Gestione Sensori</h1> <button class="btn-primary svelte-172r23c">Aggiungi sensore</button></div> <!> <!></div>');function ht(D,E){K(E,!1);let f=y([]),h=y(!0),m=y("");J(async()=>{await M()});async function M(){try{v(h,!0),v(m,"");const t=await X(!0),e=await fetch(`${Y}?action=listSensors`,{headers:{Authorization:`Bearer ${t}`}});if(!e.ok)throw new Error("Errore nel caricamento dei sensori");const i=await e.json();v(f,i.sensors||[])}catch(t){v(m,t?.message??String(t))}finally{v(h,!1)}}function N(t){R(`/admin/sensors/${encodeURIComponent(t)}`)}function U(){R("/admin/sensors/new")}W();var _=rt(),u=o(r(_),2),j=o(r(u),2);a(u);var x=o(u,2);{var B=t=>{var e=Z(),i=r(e,!0);a(e),S(()=>d(i,s(m))),c(t,e)};C(x,t=>{s(m)&&t(B)})}var F=o(x,2);{var G=t=>{var e=$();c(t,e)},L=t=>{var e=tt();c(t,e)},P=t=>{var e=at(),i=r(e),A=o(r(i));V(A,5,()=>s(f),b=>b.id,(b,l)=>{var p=et(),g=r(p),Q=r(g,!0);a(g);var w=o(g),T=r(w,!0);a(w);var k=o(w),q=r(k,!0);a(k);var I=o(k),H=r(I,!0);a(I),a(p),S(()=>{d(Q,s(l).id),d(T,s(l).name),d(q,s(l).address??"—"),d(H,s(l).description??"—")}),z("click",p,()=>N(s(l).id)),c(b,p)}),a(A),a(i),a(e),c(t,e)};C(F,t=>{s(h)?t(G):s(f).length===0?t(L,1):t(P,-1)})}a(_),z("click",j,U),c(D,_),O()}export{ht as component};

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.