PageSourceSearch

https://www.vestigia.hu/build/assets/CreateEditPlace-BOaPULJg.js

js vestigia.hu collected 2026-10-04 22:54:10 UTC 7,323 bytes, 7 lines download raw bytes

1import{a5 as P,d as D,u as R,i as T,T as U,o as _,a as w,b as o,t as u,e as t,f as v,m as V,q as g,v as y,F as C,r as M,g as N,w as S}from"./app-BG__IGI2.js";import{s as I,S as A,c as L,b as $,_ as F}from"./Map.vue_vue_type_style_index_0_lang-BATO2_2P.js";import{S as O,_ as q}from"./AppLayout-DKPcWMBC.js";import{_ as B}from"./NameEditor.vue_vue_type_script_setup_true_lang-CTGiCAfc.js";import{c as j}from"./cloneDeep-DI5TgUvB.js";import{c as G}from"./createLucideIcon-RV-YRlYn.js";import{i as H,a as Y,S as x}from"./_Uint8Array-DGtZMZNr.js";import{S as k}from"./isObject-Da4pw9bu.js";import{i as z}from"./isArray-BJUmqqsI.js";import"./rotate-ccw-Zo0irZcx.js";import"./toString-C1nIt63K.js";import"./ApplicationLogo.vue_vue_type_script_setup_true_lang-DHl-rpk9.js";import"./index-DCuZsciy.js";import"./search-BMrwWZA7.js";import"./map-pin-BZFGCZP_.js";import"./DocumentStatus-E1-5wwna.js";import"./trash-2-C5qSsV8_.js";import"./CustomMultiselect-BvKer-NF.js";import"./_plugin-vue_export-helper-oyyxUWJl.js";import"./languages-DsWIFI8c.js";import"./circle-plus-DuSPgXgM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"cc996dc295571afb58509b6f457fccb3083ab528"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;
1n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4f2741a9-ba1a-4782-9985-4ea0ffa3445a",e._sentryDebugIdIdentifier="sentry-dbid-4f2741a9-ba1a-4782-9985-4ea0ffa3445a")})()}catch{}/**
2 * @license lucide-vue-next v0.439.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const W=G("WandSparklesIcon",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);function J(){}function Z(e,n,i,m){for(var s=e.length,c=i+-1;++c<s;)if(n(e[c],c,e))return c;return-1}function K(e){return e!==e}function Q(e,n,i){for(var m=i-1,s=e.length;++m<s;)if(e[m]===n)return m;return-1}function X(e,n,i){return n===n?Q(e,n,i):Z(e,K,i)}function ee(e,n){var i=e==null?0:e.length;return!!i&&X(e,n,0)>-1}var E=k?k.isConcatSpreadable:void 0;function te(e){return z(e)||H(e)||!!(E&&e&&e[E])}function ne(e,n,i,m,s){var c=-1,h=e.length;for(i||(i=te),s||(s=[]);++c<h;){var p=e[c];i(p)?Y(s,p):s[s.length]=p}return s}function se(e){var n=e==null?0:e.length;return n?ne(e):[]}var ae=1/0,oe=x&&1/I(new x([,-0]))[1]==ae?function(e){return new x(e)}:J,le=200;function ie(e,n,i){var m=-1,s=ee,c=e.length,h=!0,p=[],f=p;if(c>=le){var a=n?null:oe(e);if(a)return I(a);h=!1,s=L,f=new A}else f=n?[]:p;e:for(;++m<c;){var b=e[m],d=n?n(b):b;if(b=b!==0?b:0,h&&d===d){for(var l=f.length;l--;)if(f[l]===d)continue e;n&&f.push(d),p.push(b)}else s(f,d,i)||(f!==p&&f.push(d),p.push(b))}return p}function re(e,n){return e&&e.length?ie(e,$(n)):[]}function de(){async function e(n){return(await P.get(`/api/osm/search?q=${n}`)).data}return{search:e}}const ce={class:"mx-2 mb-6 mt-3 text-xl font-semibold leading-tight text-gray-800"},pe={class:"form-control w-full"},ue={class:"label"},me={class:"label-text"},fe={class:"mb-2 flex gap-x-2"},be=["placeholder"],he=["placeholder"],_e=["placeholder"],ge={class:"pl-1"},ye={class:"flex items-center gap-2"},we={class:"badge badge-primary badge-sm font-bold uppercase"},ve={class:"text-sm"},xe={class:"text-sm font-bold"},Ce=["href"],Se=["onClick"],ke={class:"form-control"},Ee={class:"label"},Ie={class:"label-text"},Pe=["placeholder"],De={class:"mt-4 flex justify-between"},Re=["disabled"],Te=["disabled"],Ue={layout:q},tt=D({...Ue,__name:"CreateEditPlace",props:{place:{type:Object,default:null}},emits:["submit"],setup(e,{emit:n}){const i=e,m=n,{t:s}=R(),{search:c}=de(),h=T([]);async function p(){const d=await Promise.all(a.names.filter(l=>!!l.name).map(l=>c(l.name)));h.value=re(se(d),"place_id")}function f(d){a.lat=d.lat,a.lon=d.lon,a.osm_id=d.osm_type.substring(0,1).toUpperCase()+d.osm_id,h.value=[]}const a=U(i.place?j(i.place):{names:[{name:"",primary:!0}],osm_id:void 0,lat:void 0,lon:void 0,comment:""});function b(){i.place?a.patch(route("places.update",i.place.id),{onSuccess(){m("submit")}}):a.post(route("places.store"),{onSuccess(){m("submit")}})}return(d,l)=>(_(),w(C,null,[o("h2",ce,u(e.place?t(s)("CreateEditPlace.Edit"):t(s)("CreateEditPlace.Create")),1),o("form",{class:"rounded-lg bg-base-100 p-4 shadow-sm",onSubmit:S(b,["prevent"]),onReset:l[5]||(l[5]=S(r=>t(a).reset(),["prevent"]))},[v(B,{modelValue:t(a).names,"onUpdate:modelValue":l[0]||(l[0]=r=>t(a).names=r)},null,8,["modelValue"]),o("label",pe,[o("div",ue,[o("span",me,u(t(s)("CreateEditPlace.Geolocation")),1)]),(_(),V(F,{key:JSON.stringify([t(a).lat,t(a).lon]),places:[{names:[],lat:t(a).lat,lon:t(a).lon}],class:"mb-4"},null,8,["places"])),o("div",fe,[g(o("input",{"onUpdate:modelValue":l[1]||(l[1]=r=>t(a).osm_id=r),type:"text",placeholder:t(s)("CreateEditPlace.OsmID"),class:"input input-bordered w-full"},null,8,be),[[y,t(a).osm_id,void 0,{number:!0}]]),g(o("input",{"onUpdate:modelValue":l[2]||(l[2]=r=>t(a).lat=r),type:"number",step:"0.000000000001",placeholder:t(s)("CreateEditPlace.Latitude"),class:"input input-bordered w-full",disabled:""},null,8,he),[[y,t(a).lat,void 0,{number:!0}]]),g(o("input",{"onUpdate:modelValue":l[3]||(l[3]=r=>t(a).lon=r),type:"number",step:"0.000000000001",placeholder:t(s)("CreateEditPlace.Longitude"),class:"input input-bordered w-full",disabled:""},null,8,_e),[[y,t(a).lon,void 0,{number:!0}]]),o("button",{type:"button",class:"btn btn-ghost",onClick:p},[v(t(W))])])]),(_(!0),w(C,null,M(h.value,r=>(_(),w("div",{key:r.place_id,class:"flex items-center justify-between rounded-lg p-2 hover:bg-black/5"},[o("div",ge,[o("div",null,u(r.display_name),1),o("div",ye,[o("span",we,u(r.addresstype),1),o("span",ve,u(r.lat)+", "+u(r.lon),1),o("span",xe,u(r.osm_type.substring(0,1).toUpperCase())+u(r.osm_id),1),o("a",{href:`https://nominatim.openstreetmap.org/ui/details.html?place_id=${r.place_id}`,class:"link flex items-center gap-1 text-sm",target:"_blank"},[l[6]||(l[6]=N(" OpenStreetMap ")),v(t(O),{class:"size-3"})],8,Ce)])]),o("button",{type:"button",class:"btn btn-ghost",onClick:Ve=>f(r)},u(t(s)("CreateEditPlace.SelectSuggestion")),9,Se)]))),128)),o("label",ke,[o("div",Ee,[o("span",Ie,u(t(s)("CreateEditPlace.Comment")),1)]),g(o("textarea",{"onUpdate:modelValue":l[4]||(l[4]=r=>t(a).comment=r),class:"textarea textarea-bordered h-24",placeholder:t(s)("CreateEditPlace.Comment")},null,8,Pe),[[y,t(a).comment]])]),o("div",De,[o("button",{type:"reset",class:"btn btn-outline btn-error w-64",disabled:!t(a).isDirty},u(t(s)("CreateEditPlace.ClearForm")),9,Re),o("button",{type:"submit",class:"btn btn-primary w-64",disabled:!t(a).isDirty},u(e.place?t(s)("CreateEditPlace.Update"):t(s)("CreateEditPlace.Create")),9,Te)])],32)],64))}});
6export{tt as default};
7//# sourceMappingURL=CreateEditPlace-BOaPULJg.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.