PageSourceSearch

https://themennonitemap.org/_nuxt/CIcNjJIi.js

js themennonitemap.org collected 2026-10-04 17:16:30 UTC 3,934 bytes, 1 lines download raw bytes

1import{f as T,z as N,g as y,r as f,D as $,i as h,c as x,a as s,j as B,b as v,w,y as t,t as c,d as l,k as n,q as i,m as D,l as q,o as k,A as V}from"./ChgoMiCU.js";import{a as b}from"./F6AYdsB6.js";const C={class:"space-y-4 max-w-xl"},M={class:"flex items-center gap-2"},_={class:"text-lg text-white"},E={key:0,class:"text-red-400 text-sm"},F={class:"block text-sm text-gray-300"},P={class:"block text-sm text-gray-300"},j={class:"block text-sm text-gray-300"},O={class:"block text-sm text-gray-300"},Y={class:"block text-sm text-gray-300"},z={class:"block text-sm text-gray-300"},A={class:"block text-sm text-gray-300"},H={class:"block text-sm text-gray-300"},J=T({__name:"[id]",setup(R){const U=N(),d=y(()=>String(U.params.id)),m=y(()=>d.value==="new"),u=f(""),p=f(!1),o=$({settlement_id:0,year:new Date().getFullYear(),population:0,males:void 0,females:void 0,households:void 0,determination_method:"",source:""});h(async()=>{if(m.value)return;const r=await b(`/api/population/${d.value}`);Object.assign(o,r)});async function S(){p.value=!0,u.value="";try{if(m.value){const r=await b("/api/population",{method:"POST",body:o});await V(`/admin/population/${r.id}`)}else await b(`/api/population/${d.value}`,{method:"PUT",body:o})}catch(r){u.value=r instanceof Error?r.message:"Save failed"}finally{p.value=!1}}return(r,e)=>{const g=q;return k(),x("div",C,[s("div",M,[v(g,{variant:"ghost",class:"cursor-pointer",onClick:e[0]||(e[0]=a=>("navigateTo"in r?r.navigateTo:t(V))("/admin/population"))},{default:w(()=>e[9]||(e[9]=[l("Back")])),_:1}),s("h2",_,c(t(m)?"New population row":`Edit population #${t(d)}`),1)]),t(u)?(k(),x("p",E,c(t(u)),1)):B("",!0),s("form",{class:"grid grid-cols-1 gap-3",onSubmit:D(S,["prevent"])},[s("label",F,[e[10]||(e[10]=l("Settlement id ")),n(s("input",{"onUpdate:modelValue":e[1]||(e[1]=a=>t(o).settlement_id=a),type:"number",required:"",class:"mt-1 w-full rounded bg-gray-800 border border-gray-700 p-2 text-white"},null,512),[[i,t(o).settlement_id,void 0,{number:!0}]])]),s("label",P,[e[11]||(e[11]=l("Year ")),n(s("input",{"onUpdate:modelValue":e[2]||(e[2]=a=>t(o).year=a),type:"number",required:"",class:"mt-1 w-full rounded bg-gray-800 border border-gray-700 p-2 text-white"},null,512),[[i,t(o).year,void 0,{number:!0}]])]),s("label",j,[e[12]||(e[12]=l("Population ")),n(s("input",{"onUpdate:modelValue":e[3]||(e[3]=a=>t(o).population=a),type:"number",required:"",class:"mt-1 w-full rounded bg-gray-800 border border-gray-700 p-2 text-white"},null,512),[[i,t(o).population,void 0,{number:!0}]])]),s("label",O,[e[13]||(e[13]=l("Males ")),n(s("input",{"onUpdate:modelValue":e[4]||(e[4]=a=>t(o).males=a),type:"number",class:"mt-1 w-full rounded bg-gray-800 border border-gray-700 p-2 text-white"},null,512),[[i,t(o).males,void 0,{number:!0}]])]),s("label",Y,[e[14]||(e[14]=l("Females ")),n(s("input",{"onUpdate:modelValue":e[5]||(e[5]=a=>t(o).females=a),type:"number",class:"mt-1 w-full rounded bg-gray-800 border border-gray-700 p-2 text-white"},null,512),[[i,t(o).females,void 0,{number:!0}]])]),s("label",z,[e[15]||(e[15]=l("Households ")),n(s("input",{"onUpdate:modelValue":e[6]||(e[6]=a=>t(o).households=a),type:"number",class:"mt-1 w-full rounded bg-gray-800 border border-gray-700 p-2 text-white"},null,512),[[i,t(o).households,void 0,{number:!0}]])]),s("label",A,[e[16]||(e[16]=l("Determination method ")),n(s("input",{"onUpdate:modelValue":e[7]||(e[7]=a=>t(o).determination_method=a),placeholder:"census",class:"mt-1 w-full rounded bg-gray-800 border border-gray-700 p-2 text-white"},null,512),[[i,t(o).determination_method]])]),s("label",H,[e[17]||(e[17]=l("Source ")),n(s("input",{"onUpdate:modelValue":e[8]||(e[8]=a=>t(o).source=a),class:"mt-1 w-full rounded bg-gray-800 border border-gray-700 p-2 text-white"},null,512),[[i,t(o).source]])]),v(g,{type:"submit",class:"cursor-pointer",loading:t(p)},{default:w(()=>e[18]||(e[18]=[l("Save")])),_:1},8,["loading"])],32)])}}});export{J as default};

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.