PageSourceSearch

https://portal.urbis.primaria-calimanesti.ro/assets/LayerPopup-83306457.js

js primaria-calimanesti.ro collected 2026-09-25 02:08:55 UTC 113,641 bytes, 1 lines download raw bytes

1import{c as H,a1 as je,a2 as Be,$ as Re,i as qe,e as He,a3 as Ne,m as Qe,l as Je,r as Ze,f as We,s as Ke,k as xe,C as Ye}from"./primevue-ca313794.js";import{_ as ne,A as de,a as $e,D as Xe}from"./MetaDataImportPopup-e376edf7.js";import{_ as U,aH as K,z as he,y as fe,A as te,l as A,B as q,E as G,D as re,a9 as ge,Q as be,u as et,a7 as tt,P as rt,T as it,S as lt,C as ot,J as st,Y as at,i as nt,am as f,V as L,aa as _,aB as dt,aC as pt,aN as O,aG as S,w as pe,bm as J,bn as Z,aL as ue,bo as M,aM as ut,M as yt,bp as ct,N as mt}from"./index-cc1a661b.js";import{h as c,d,l as g,x as b,f as a,e as u,n as x,q as ht,g as p,t as m,s as n,A as k,F as E,p as ft,a7 as gt,a4 as P,i as ye,j as W}from"./vendor-ea0043bb.js";import{L as ce}from"./LayerAttributePopup-72843616.js";import{D as ve}from"./DateInput-c786bc11.js";import{B as Ie}from"./BooleanInput-018648e6.js";import{R as bt}from"./RangeInput-700daa02.js";import{A as vt}from"./ArrayInput-9b06f7f8.js";import{C as Ce}from"./ColorInput-010b1085.js";import{L as It,a as Ct,b as Tt,c as Vt,d as Dt,e as St}from"./LayerLocalizationComponent-69f0fd78.js";import{M as Lt}from"./MapElement-218bb5fd.js";import{P as Te}from"./PhotoInput-46ed3585.js";import{T as kt}from"./TimeInput-f2c928e0.js";import{F as At}from"./FileInput-8ff7d25a.js";import{M as wt}from"./MapBoundingBox-d4968557.js";import{D as _t}from"./document-type-0a620a59.js";import{L as Ft}from"./LayerFiltersContainer-7434ab12.js";import{c as Ot}from"./cloneDeep-d0c278ca.js";import"./mapbox-v3-eadefc84.js";import"./geo-1391ac6a.js";import"./mapbox-addons-be198bf9.js";import"./editor-b65e0429.js";import"./pdf-7415fc80.js";import"./MapFeatureFormElement-1e618c8b.js";import"./VisibilityTriggers-70301eca.js";import"./BindToVariable-5f80cf31.js";import"./StylePopup-82459987.js";import"./StyleFormulaPopup-5ca20d2a.js";import"./map-controller-afea0ffa.js";import"./defineProperty-60fb0633.js";const Pt={name:"LegendCard",props:{layer:{type:Object,required:!0},children:{required:!0,type:Array}},components:{draggable:K},methods:{getDrawingTypeByLayer(e){return he(e)},getLayerShapeCss(e,t){return fe(e,t)},deleteLegendItem(e){this.$emit("delete",e)},openEditLegend(e){this.$emit("edit",e)}}},Gt={class:"flex align-items-center justify-content-between card px-3 py-1 m-2"},zt={class:"flex align-items-center"},Mt=["src"],Et={class:"actions",style:{display:"flex",gap:".5rem"}};function Ut(e,t,o,s,r,i){const y=H,V=c("LegendCard",!0),T=c("draggable");return d(),g(T,{tag:"div",class:"dragArea",list:o.children,group:{name:"legend"},"item-key":"title"},{item:b(({element:h,index:I})=>[a("div",null,[a("div",Gt,[a("div",zt,[h.style&&Object.keys(h.style).length?(d(),u("div",{key:0,class:x(["layer-icon mr-2",i.getDrawingTypeByLayer(o.layer)]),style:ht(i.getLayerShapeCss(o.layer,h.style))},null,6)):h.icon?(d(),u("img",{key:1,src:h.icon,alt:"",class:"layer-icon mr-2"},null,8,Mt)):p("",!0),a("div",{class:x({"font-bold":h.children})},m(h.title),3)]),a("div",Et,[n(y,{icon:"pi pi-pencil",class:"p-button-success",onClick:D=>i.openEditLegend(h)},null,8,["onClick"]),n(y,{icon:"pi pi-trash",class:"p-button-danger",onClick:D=>i.deleteLegendItem(h)},null,8,["onClick"])])]),h.children?(d(),g(V,{key:0,children:h.children,layer:o.layer,onDelete:i.deleteLegendItem,onEdit:i.openEditLegend},null,8,["children","layer","onDelete","onEdit"])):p("",!0)])]),_:1},8,["list"])}const jt=U(Pt,[["render",Ut],["__scopeId","data-v-0182c131"]]),Bt={name:"LegendItemPopup",components:{PhotoInput:Te,TextInput:te},props:{layer:Object,data:Object,isGroup:{type:Boolean,default:!1}},data(){return{item:{id:Math.floor(Math.random()*999999),title:"",icon:"",children:[]}}},mounted(){this.data&&(this.item=JSON.parse(JSON.stringify(this.data)))},methods:{close(){this.$emit("close")},async isValid(){return await this.v$.$validate()},async save(){if(!await this.isValid()){this.$toast.add({severity:"error",summary:this.$t("Missing data"),detail:this.$t("Please fix the errors first!"),life:5e3});return}this.isGroup?(delete this.item.icon,delete this.item.style):delete this.item.children,this.data?this.$emit("edit",this.item):this.$emit("add",this.item)},getFileName(e){return String(e||"").split("/").pop().split(".").slice(0,-1).join(".")},onFileSelect(e){this.item.title||(this.item.title=this.getFileName(e.name).replace(/_|-/g," "))}},validations(){return{item:{title:{required:A.withMessage(this.$t("Field is required!"),q)},icon:{requiredIf:A.withMessage(this.$t("You have to select an image file!"),G(!(this.isGroup||this.item.style)))}}}},setup(){return{v$:re()}}},Rt={class:"grid p-fluid"},qt={class:"col-12 field"},Ht={key:0,class:"col-12 field"};function Nt(e,t,o,s,r,i){const y=c("TextInput"),V=c("PhotoInput"),T=H,h=c("CardViewModal");return d(),g(h,{onClose:i.close,size:"small"},{"header-text":b(()=>[k(m(o.data?o.data.title:o.isGroup?e.$t("Create group"):e.$t("Create legend item")),1)]),"main-content":b(()=>[a("div",Rt,[a("div",qt,[n(y,{modelValue:r.item.title,"onUpdate:modelValue":t[0]||(t[0]=I=>r.item.title=I),label:e.$t("Title"),error:s.v$?.item?.title?.$errors,invalid:s.v$?.item?.title?.$errors?.length}
1,null,8,["modelValue","label","error","invalid"])]),o.isGroup||r.item.style?p("",!0):(d(),u("div",Ht,[n(V,{label:e.$t("Icon"),modelValue:r.item.icon,"onUpdate:modelValue":t[1]||(t[1]=I=>r.item.icon=I),document:o.layer,error:s.v$?.item?.icon?.$errors,invalid:s.v$?.item?.icon?.$errors?.length,onFileSelect:i.onFileSelect},null,8,["label","modelValue","document","error","invalid","onFileSelect"])]))])]),"footer-buttons":b(()=>[n(T,{label:e.$t("Save"),icon:"pi pi-save",class:"p-button-primary",iconPos:"left",onClick:i.save},null,8,["label","onClick"])]),_:1},8,["onClose"])}const Qt=U(Bt,[["render",Nt]]);const Jt={name:"SpecificationCard",props:{layer:{type:Object,required:!0},children:{required:!0,type:Array}},components:{draggable:K},methods:{deleteItem(e){this.$emit("delete",e)},editItem(e){this.$emit("edit",e)}}},Zt={class:"flex align-items-center justify-content-between card px-3 py-1 m-2"},Wt={class:"flex align-items-center"},Kt={key:0,class:"font-normal"},xt={key:0},Yt=["href"],$t={class:"flex align-items-center",style:{gap:".5rem"}};function Xt(e,t,o,s,r,i){const y=H,V=c("SpecificationCard",!0),T=c("draggable");return d(),g(T,{tag:"div",class:"dragArea",list:o.children,group:{name:"specifications"},"item-key":"title"},{item:b(({element:h,index:I})=>[a("div",null,[a("div",Zt,[a("div",Wt,[a("div",{class:x({"font-bold":h.children})},[k(m(h.title)+" ",1),h.children?p("",!0):(d(),u("span",Kt,[k(": "),/photo|file/.test(h.dataType)?(d(),u("a",{key:1,href:h.value,target:"_blank"},m(h.value),9,Yt)):(d(),u("span",xt,m(h.value),1))]))],2)]),a("div",$t,[n(y,{icon:"pi pi-pencil",class:"p-button-success",onClick:D=>i.editItem(h)},null,8,["onClick"]),n(y,{icon:"pi pi-trash",class:"p-button-danger",onClick:D=>i.deleteItem(h)},null,8,["onClick"])])]),h.children?(d(),g(V,{key:0,children:h.children,layer:o.layer,onDelete:i.deleteItem,onEdit:i.editItem},null,8,["children","layer","onDelete","onEdit"])):p("",!0)])]),_:1},8,["list"])}const er=U(Jt,[["render",Xt],["__scopeId","data-v-1b9140c5"]]),tr={name:"SpecificationPopup",components:{ColorInput:Ce,FileInput:At,PhotoInput:Te,BooleanInput:Ie,TimeInput:kt,DateInput:ve,NumberInput:ge,ListInput:be,TextInput:te},props:{layer:Object,data:Object,isGroup:{type:Boolean,default:!1},standardAttributes:{type:Array,default:function(){return[]}}},data(){return{item:{id:Math.floor(Math.random()*999999),title:"",children:[],value:"",dataType:"",attributeId:null},dataTypes:[{code:"string",title:"Text"},{code:"integer",title:"Integer"},{code:"decimal",title:"Decimal"},{code:"date",title:"Date"},{code:"time",title:"Time"},{code:"boolean",title:"Boolean"},{code:"photo",title:"Photo"},{code:"file",title:"File"},{code:"color",title:"Color"}]}},mounted(){this.data&&(this.item=JSON.parse(JSON.stringify({...this.item,...this.data})))},methods:{close(){this.$emit("close")},onDataTypeChange(){this.item.value=""},async isValid(){return await this.v$.$validate()},async save(){if(!await this.isValid()){this.$toast.add({severity:"error",summary:this.$t("Missing data"),detail:this.$t("Please fix the errors first!"),life:5e3});return}this.isGroup?(delete this.item.value,delete this.item.dataType,delete this.item.attributeId):delete this.item.children,this.data?this.$emit("edit",this.item):this.$emit("add",this.item)}},validations(){return{item:{title:{required:A.withMessage(this.$t("Field is required!"),q)},dataType:{requiredIf:A.withMessage(this.$t("Field is required!"),G(!this.isGroup))},value:{requiredIf:A.withMessage(this.$t("Field is required!"),G(!this.isGroup))}}}},setup(){return{v$:re()}}},rr={class:"grid p-fluid"},ir={class:"col-12 field"},lr={class:"col-12 field"},or={key:0,class:"col-12 field"},sr={class:"col-12 field"};function ar(e,t,o,s,r,i){const y=c("TextInput"),V=c("ListInput"),T=c("NumberInput"),h=c("DateInput"),I=c("TimeInput"),D=c("BooleanInput"),w=c("PhotoInput"),z=c("FileInput"),N=c("ColorInput"),Q=H,j=c("CardViewModal");return d(),g(j,{onClose:i.close,size:"small"},{"header-text":b(()=>[k(m(o.data?o.data.title:o.isGroup?e.$t("Create group"):e.$t("Create item")),1)]),"main-content":b(()=>[a("div",rr,[a("div",ir,[n(y,{modelValue:r.item.title,"onUpdate:modelValue":t[0]||(t[0]=v=>r.item.title=v),label:e.$t("Title"),error:s.v$?.item?.title?.$errors,invalid:s.v$?.item?.title?.$errors?.length}
1,null,8,["modelValue","label","error","invalid"])]),o.isGroup?p("",!0):(d(),u(E,{key:0},[a("div",lr,[n(V,{label:e.$t("Value type"),modelValue:r.item.dataType,"onUpdate:modelValue":t[1]||(t[1]=v=>r.item.dataType=v),options:r.dataTypes,"option-label":"title","option-value":"code",onChange:i.onDataTypeChange,error:s.v$?.item?.dataType?.$errors,invalid:s.v$?.item?.dataType?.$errors?.length},null,8,["label","modelValue","options","onChange","error","invalid"])]),r.item.dataType?(d(),u("div",or,[r.item.dataType==="string"?(d(),g(y,{key:0,modelValue:r.item.value,"onUpdate:modelValue":t[2]||(t[2]=v=>r.item.value=v),label:e.$t("Value"),error:s.v$?.item?.value?.$errors,invalid:s.v$?.item?.value?.$errors?.length},null,8,["modelValue","label","error","invalid"])):p("",!0),r.item.dataType==="integer"?(d(),g(T,{key:1,modelValue:r.item.value,"onUpdate:modelValue":t[3]||(t[3]=v=>r.item.value=v),label:e.$t("Value"),error:s.v$?.item?.value?.$errors,invalid:s.v$?.item?.value?.$errors?.length},null,8,["modelValue","label","error","invalid"])):p("",!0),r.item.dataType==="decimal"?(d(),g(T,{key:2,modelValue:r.item.value,"onUpdate:modelValue":t[4]||(t[4]=v=>r.item.value=v),label:e.$t("Value"),error:s.v$?.item?.value?.$errors,invalid:s.v$?.item?.value?.$errors?.length,decimal:!0},null,8,["modelValue","label","error","invalid"])):p("",!0),r.item.dataType==="date"?(d(),g(h,{key:3,modelValue:r.item.value,"onUpdate:modelValue":t[5]||(t[5]=v=>r.item.value=v),label:e.$t("Value"),error:s.v$?.item?.value?.$errors,invalid:s.v$?.item?.value?.$errors?.length},null,8,["modelValue","label","error","invalid"])):p("",!0),r.item.dataType==="time"?(d(),g(I,{key:4,modelValue:r.item.value,"onUpdate:modelValue":t[6]||(t[6]=v=>r.item.value=v),label:e.$t("Value"),error:s.v$?.item?.value?.$errors,invalid:s.v$?.item?.value?.$errors?.length},null,8,["modelValue","label","error","invalid"])):p("",!0),r.item.dataType==="boolean"?(d(),g(D,{key:5,modelValue:r.item.value,"onUpdate:modelValue":t[7]||(t[7]=v=>r.item.value=v),label:e.$t("Value"),error:s.v$?.item?.value?.$errors,invalid:s.v$?.item?.value?.$errors?.length},null,8,["modelValue","label","error","invalid"])):p("",!0),r.item.dataType==="photo"?(d(),g(w,{key:6,modelValue:r.item.value,"onUpdate:modelValue":t[8]||(t[8]=v=>r.item.value=v),label:e.$t("Value"),error:s.v$?.item?.value?.$errors,invalid:s.v$?.item?.value?.$errors?.length,document:o.layer},null,8,["modelValue","label","error","invalid","document"])):p("",!0),r.item.dataType==="file"?(d(),g(z,{key:7,modelValue:r.item.value,"onUpdate:modelValue":t[9]||(t[9]=v=>r.item.value=v),label:e.$t("Value"),error:s.v$?.item?.value?.$errors,invalid:s.v$?.item?.value?.$errors?.length,document:o.layer},null,8,["modelValue","label","error","invalid","document"])):p("",!0),r.item.dataType==="color"?(d(),g(N,{key:8,modelValue:r.item.value,"onUpdate:modelValue":t[10]||(t[10]=v=>r.item.value=v),label:e.$t("Value"),error:s.v$?.item?.value?.$errors,invalid:s.v$?.item?.value?.$errors?.length},null,8,["modelValue","label","error","invalid"])):p("",!0)])):p("",!0),a("div",sr,[n(V,{label:e.$t("Standard match"),modelValue:r.item.attributeId,"onUpdate:modelValue":t[11]||(t[11]=v=>r.item.attributeId=v),options:o.standardAttributes,"option-label":"title","option-value":"attributeId"},null,8,["label","modelValue","options"])])],64))])]),"footer-buttons":b(()=>[n(Q,{label:e.$t("Save"),icon:"pi pi-save",class:"p-button-primary",iconPos:"left",onClick:i.save},null,8,["label","onClick"])]),_:1},8,["onClose"])}const nr=U(tr,[["render",ar]]),dr={name:"AutocompleteInput",props:{value:Object,label:{type:String,required:!0},optionLabel:{type:String,required:!1,default:"label"},optionValue:{type:String,required:!1,default:"value"},placeholder:{type:String,default:""},options:{type:Array},error:{default:null},hideLabel:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},showErrors:{type:Boolean,default:!0}},data(){return{filteredOptions:null}},computed:{searchValue:{get(){return this.options.find(e=>e[this.optionValue]===this.value)},set(e){e&&e[this.optionValue]?this.$emit("input",this.optionValue?e[this.optionValue]:e):this.filterOptions({query:e})}}},methods:{filterOptions(e){this.filteredOptions=this.options.filter(t=>t[this.optionLabel].toLowerCase().includes(e.query.toLowerCase()))}}},pr={key:0,class:"p-error"},ur={class:"p-error"};function yr(e,t,o,s,r,i){const y=je;return d(),u(E,null,[o.hideLabel?p("",!0):(d(),u("label",{key:0,class:x({"p-error":o.invalid})},m(o.label),3)),n(y,{modelValue:i.searchValue,"onUpdate:modelValue":t[0]||(t[0]=V=>i.searchValue=V),suggestions:r.filteredOptions,onComplete:i.filterOptions,completeOnFocus:!0,dropdown:"",dropdownMode:"current",forceSelection:"",field:o.optionLabel,placeholder:e.$t("Choose option..."),virtualScrollerOptions:{itemSize:44}},null,8,["modelValue","suggestions","onComplete","field","placeholder"]),o.error&&o.showErrors?(d(),u(E,{key:1},[typeof o.error=="string"?(d(),u("small",pr,m(o.error),1)):typeof o.error=="object"&&o.error.length?(d(!0),u(E,{key:1},ft(o.error,V=>(d(),u("small",ur,m(V.$message),1))),256)):p("",!0)],64)):p("",!0)],64)}const cr=U(dr,[["render",yr]]);var Ve=(e=>
1(e[e.Active=1]="Active",e[e.Pending=2]="Pending",e[e.Committed=3]="Committed",e[e.Cancelled=4]="Cancelled",e[e.Processing=5]="Processing",e[e.Failed=6]="Failed",e[e.Preparing=7]="Preparing",e[e.Converting=8]="Converting",e[e.Prepared=9]="Prepared",e[e.Converted=10]="Converted",e[e.Translated=11]="Translated",e[e.Queued=12]="Queued",e[e.Expired=29]="Expired",e))(Ve||{});const me=["title","groupId","dataType"],mr=["children","id","title"],hr={name:"LayerPopup",mixins:[et],components:{LayerZoomSettingsComponent:It,LayerLocalizationComponent:Ct,LayerLabelComponent:Tt,LayerStyleComponent:Vt,EditorInput:tt,MultiUpload:rt,TreeInput:it,SortableTree:lt,CodeInput:ot,MapBoundingBox:wt,MetaDataImportPopup:ne,TreeSelectInput:st,SpecificationPopup:nr,SpecificationCard:er,LegendItemPopup:Qt,LegendCard:jt,MapElement:Lt,LabelPopup:Dt,LabelRulesPopup:St,ColorInput:Ce,ArrayInput:vt,RangeInput:bt,ListInput:be,BooleanInput:Ie,NumberInput:ge,TextInput:te,LayerAttributePopup:ce,AttributeGroupPopup:de,draggable:K,AutocompleteInput:cr,MultiListInput:at,DraggableAttribute:$e,DraggableGroup:Xe,DateInput:ve,LayerFiltersContainer:Ft,DraggableComponent:K},props:{data:{type:Object,required:!1},editLayerTab:{type:String,default:"tab-details"},sourceLayer:{type:Object,required:!1},isTemporary:{type:Object,default:!1},isPrivate:{type:Object,default:!1}},computed:{modalTitle(){return this.data?.documentId?`${this.data.title} / ID: ${this.data.documentId}`:this.isTemporary?this.$t("Create temporary layer"):this.isPrivate?this.$t("Create private layer"):this.$t("Create layer")},isOffline(){return nt()},sourceOptions(){const e=JSON.parse(JSON.stringify(this.projects)),t=o=>{o.forEach(s=>{s.children&&t(s.children),(!s.properties.shapeType||s.documentId===this.layer.documentId)&&(s.disabled=!0,s.selectable=!1)})};return t(e),e},documentsQuery:{get(){return this.layer.properties||(this.layer.properties={}),this.layer.properties.query||(this.layer.properties.query={}),this.layer.properties.query}},localDataSource:{get(){return this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.hasOwnProperty("isTiles")||(this.layer.properties.dataSource.isTiles=!this.isOffline),this.layer.properties.dataSource.isTiles},set(e){this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.isTiles=e}},centroidDataSource:{get(){return this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.isCentroid},set(e){this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.isCentroid=e}},urlDataSource:{get(){return this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.url},set(e){this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.url=e}},headerDataSource:{get(){return this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.header},set(e){this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.header=e}},formCategoryDataSource:{get(){return this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.formCategoryId},set(e){this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.formCategoryId=e}},formTypeDataSource:{get(){return this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.formTypeId},set(e){this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.formTypeId=e}},coordinatesDataSource:{get(){return this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.coordinates},set(e){this.layer.properties||(this.layer.properties={}),this.layer.properties.dataSource||(this.layer.properties.dataSource={}),this.layer.properties.dataSource.coordinates=e}},layerConfigs(){return this.layer.properties||(this.layer.properties={}),this.layer.properties.configs||(this.layer.properties.configs={}),this.layer.properties.configs},layerOrganization(){this.layer||(this.layer={}),this.layer.organizationId=this.layerOrganization?this.layerOrganization.organizationId:null},...gt({common:"GET_COMMON_DATA",currentProject:"GET_CURRENT_PROJECT",user:"GET_USER",currentOrganizationId:"GET_SELECTED_ORGANIZATION_ID"}),isDrawable(){return this.layer.documentCategory&&![f.DocumentTypes.TilesService,f.DocumentTypes.DataView,f.DocumentTypes.Folder,f.DocumentTypes.DataSourceCollection].includes(this.layer.documentCategory.documentCategoryId)},isFolder(){return this.layer.documentCategory?.documentCategoryId===f.DocumentTypes.Folder},isTileService(){return this.layer.documentCategory&&[f.DocumentTypes.Raster,f.DocumentTypes.RasterDem,f.DocumentTypes.TilesService,f.DocumentTypes.RasterVideo,f.DocumentTypes.RasterImage,f.DocumentTypes.PointCloud,f.DocumentTypes.Tile3D,f.DocumentTypes.Terrain,f.DocumentTypes.Object3D,f.DocumentTypes.Polygon3D,f.DocumentTypes.Line3D,f.DocumentTypes.Point3D,f.DocumentTypes.Potree].includes(this.layer.documentCategory.documentCategoryId)},isDataSourceCollection(){return this.layer.documentCategory?.documentCategoryId===f.DocumentTypes.DataSourceCollection},isRasterVideo(){return this.layer.documentCategory?.documentCategoryId===f.DocumentTypes.RasterVideo},isRasterImage(){return this.layer.documentCategory?.documentCategoryId===f.DocumentTypes.RasterImage},isDataView(){return this.layer&&this.layer.documentCategory&&this.layer.documentCategory.documentCategoryId===f.DocumentTypes.DataView},isVector(){return this.layer&&this.layer.documentCategory&&this.layer.documentCategory.documentCategoryId===f.DocumentTypes.Vector},isRaster(){return this.layer.documentCategory&&this.layer.documentCategory.documentCategoryId===f.DocumentTypes.Raster},isRasterDem(){return this.layer.documentCategory&&this.layer.documentCategory.documentCategoryId===f.DocumentTypes.RasterDem},isVectorTiles(){return this.layer.documentCategory&&this.layer.documentCategory.documentCategoryId===f.DocumentTypes.VectorTiles},isExtrusion(){return this.layer.documentCategory&&this.layer.documentCategory.documentCategoryId===f.DocumentTypes.Extrusion},isHeatmap(){return this.layer.documentCategory&&this.layer.documentCategory.documentCategoryId===f.DocumentTypes.Heatmap},isMBTilesCollection(){return this.layer?.documentCategory?.documentCategoryId===f.DocumentTypes.MBTilesCollection},isGeoreference(){return this.layer?.documentCategory?.documentCategoryId===f.DocumentTypes.Georeference},isPointCloud(){return this.layer?.documentCategory?.documentCategoryId===f.DocumentTypes.PointCloud},isDeckglLayer(){return[f.DocumentTypes.Vehicles,f.DocumentTypes.Object3D,f.DocumentTypes.Stations,f.DocumentTypes.PointOfInterest,f.DocumentTypes.StreetLight].includes(this.layer?.documentCategory?.documentCategoryId)},tabs(){let e=[];return e.push({label:this.$t("Details"),value:"tab-details",command:()=>{this.currentTab="tab-details"}}),(this.isDrawable||this.isRaster||this.isDataView||!this.isFolder)&&e.push({label:this.$t("Style"),value:"tab-style",command:()=>{this.currentTab="tab-style"}}),this.isDataView&&e.push({label:this.$t("Filters"),value:"tab-filters",command:()=>{this.currentTab="tab-filters"}}),(this.isDrawable||this.isRaster||this.isDataView||!this.isFolder)&&e.push({label:this.$t("Attributes"),value:"tab-attributes",command:()=>{this.currentTab="tab-attributes"}}),(this.isDrawable||this.isDataView||!this.isFolder)&&e.push({label:this.$t("Label"),value:"tab-label",command:()=>{this.currentTab="tab-label"}}),this.isFolder||e.push({label:this.$t("Legend"),value:"tab-legend",command:()=>{this.currentTab="tab-legend"}}),(this.isDrawable||this.isDataView||!this.isFolder)&&e.push({label:this.$t("Zoom"),value:"tab-settings",command:()=>{this.currentTab="tab-settings"}}),e.push({label:this.$t("Localization"),value:"tab-localization",command:()=>{this.currentTab="tab-localization"}}),this.isFolder||e.push({label:this.$t("Specifications"),value:"tab-specifications",command:()=>{this.currentTab="tab-specifications"}}),e.push({label:this.$t("Properties"),value:"tab-properties",command:()=>{this.currentTab="tab-properties"}}),this.hasChildrenLayers&&e.push({label:this.$t("Children layers"),value:"tab-children-layers",command:()=>{this.currentTab="tab-children-layers"}}),this.isMBTilesCollection&&e.push({label:this.$t("MB tiles"),value:"tab-mb-tiles",command:()=>{this.currentTab="tab-mb-tiles"}}),e},activeTabIndex(){return this.tabs.findIndex(e=>e.value===this.currentTab)},layerTypes(){return L(this.common.documentTypes.filter(e=>this?.layer?.documentCategory?.documentCategoryId?e.documentCategoryId===this.layer.documentCategory.documentCategoryId:!0).map(e=>({documentTypeId:e.documentTypeId,parentDocumentTypeId:e.parentDocumentTypeId,depth:e.depth,title:e.title})),"documentTypeId","parentDocumentTypeId",void 0,0)},formDocTypes(){return this.layer?.properties?.documentCategory?.documentCategoryId?L(this.common.documentTypes.filter(e=>this.layer?.properties?.documentCategory?.documentCategoryId?e.documentCategoryId===this.layer?.properties?.documentCategory?.documentCategoryId:!0).map(e=>({documentTypeId:e.documentTypeId,parentDocumentTypeId:e.parentDocumentTypeId,depth:e.depth,title:e.title})),"documentTypeId","parentDocumentTypeId",void 0,0):[]},FEFormDocTypes(){return this.layer?.properties?.featureEditOverride?.documentCategory?.documentCategoryId?L(this.common.documentTypes.filter(e=>this.layer?.properties?.featureEditOverride?.documentCategory?.documentCategoryId?e.documentCategoryId===this.layer?.properties?.featureEditOverride?.documentCategory?.documentCategoryId:!0).map(e=>({documentTypeId:e.documentTypeId,parentDocumentTypeId:e.parentDocumentTypeId,depth:e.depth,title:e.title})),"documentTypeId","parentDocumentTypeId",void 0,0):[]},LVFormDocTypes(){return this.layer?.properties?.layerViewInfo?.documentCategory?.documentCategoryId?L(this.common.documentTypes.filter(e=>this.layer?.properties?.layerViewInfo?.documentCategory?.documentCategoryId?e.documentCategoryId===this.layer?.properties?.layerViewInfo?.documentCategory?.documentCategoryId:!0).map(e=>({documentTypeId:e.documentTypeId,parentDocumentTypeId:e.parentDocumentTypeId,depth:e.depth,title:e.title})),"documentTypeId","parentDocumentTypeId",void 0,0):[]},FVFormDocTypes(){return this.layer?.properties?.featureViewInfo?.documentCategory?.documentCategoryId?L(this.common.documentTypes.filter(e=>this.layer?.properties?.featureViewInfo?.documentCategory?.documentCategoryId?e.documentCategoryId===this.layer?.properties?.featureViewInfo?.documentCategory?.documentCategoryId:!0).map(e=>({documentTypeId:e.documentTypeId,parentDocumentTypeId:e.parentDocumentTypeId,depth:e.depth,title:e.title})),"documentTypeId","parentDocumentTypeId",void 0,0):[]},documentCategories(){return L(this.common.documentCategories.map(t=>({documentCategoryId:t.documentCategoryId,parentDocumentCategoryId:t.parentDocumentCategoryId,depth:t.depth,title:t.title})),"documentCategoryId","parentDocumentCategoryId",void 0,0).filter(t=>t.documentCategoryId===_.Document)},formDocCategories(){return L(this.common.documentCategories.map(t=>({documentCategoryId:t.documentCategoryId,parentDocumentCategoryId:t.parentDocumentCategoryId,depth:t.depth,title:t.title})),"documentCategoryId","parentDocumentCategoryId",void 0,0).filter(t=>t.documentCategoryId===_.Form)},documentTypes(){return L(this.common.documentTypes.filter(e=>this.documentsQuery&&this.documentsQuery.documentCategoryIds&&this.documentsQuery.documentCategoryIds.length?this.documentsQuery.documentCategoryIds.includes(e.documentCategoryId):!0).map(e=>({documentTypeId:e.documentTypeId,parentDocumentTypeId:e.parentDocumentTypeId,depth:e.depth,title:e.title})),"documentTypeId","parentDocumentTypeId",void 0,0)},nestedOrganizationTypes(){return L(this.organizationTypes,"organizationTypeId","parentOrganizationTypeId",void 0,0).filter(e=>this.documentsQuery.organizationCategoryIds?.includes(e.organizationCategoryId))},documentDetails(){return this.layer.documentDetails||(this.layer.documentDetails=[]),this.layer.documentDetails},formTypes(){return L(this.common.documentTypes.filter(e=>this?.layer?.properties?.dataSource?.formCategoryId?e.documentCategoryId===this?.layer?.properties?.dataSource?.formCategoryId:e.documentCategoryId===18).map(e=>({documentTypeId:e.documentTypeId,parentDocumentTypeId:e.parentDocumentTypeId,depth:e.depth,title:e.title})),"documentTypeId","parentDocumentTypeId",void 0,0)}},watch:{"layer.isPrivate":function(e,t){this.isFirstLoad||(this.layer.parentDocumentId=null,this.getProjectsAndLayers()),this.isFirstLoad=!1},"layer.properties.header"(){if(this.labelFields&&this.labelFields["text-field"]&&this.layer?.properties?.header){this.labelFields["text-field"].options=[];for(let e in this.layer.properties.header)this.labelFields["text-field"].options.push(this.layer.properties.header[e].title)}if(this.fillExtrusionFields&&this.fillExtrusionFields["fill-extrusion-height"]&&this.layer?.properties?.header){this.fillExtrusionFields["fill-extrusion-height"].options=[];for(let e in this.layer.properties.header)/integer|decimal/.test(this.layer.properties.header[e]?.dataType?.code)&&this.fillExtrusionFields["fill-extrusion-height"].options.push(this.layer.properties.header[e].title)}if(this.fillExtrusionFields&&this.fillExtrusionFields["fill-extrusion-base"]&&this.layer?.properties?.header){this.fillExtrusionFields["fill-extrusion-base"].options=[];for(let e in this.layer.properties.header)/integer|decimal/.test(this.layer.properties.header[e]?.dataType?.code)&&this.fillExtrusionFields["fill-extrusion-base"].options.push(this.layer.properties.header[e].title)}},"layer.properties.overrideGeometriesType"(e,t){t&&(this.layer.properties.schemaId=null,this.layer.properties.datasetId=null,this.layer.properties.processId=null,this.layer.properties.geometriesOverrideParams=[])}},data(){return{currentTab:"tab-details",isFirstLoad:!0,layer:{title:"",description:"",documentCategory:null,documentType:null,timeStamp:null,isCanceled:!1,organizationId:null,parentDocumentId:null,properties:{shapeType:null,style:{},header:{},label:{minzoom:0,maxzoom:24}
1,settings:{minzoom:0,maxzoom:24,cluster:!0,clusterMaxZoom:14,clusterRadius:50,drawMinZoom:0,forceCenteredLabel:!0},dataSource:{url:"",isTiles:!this.isOffline},legend:[],specifications:[],selection:null,withoutSelectionIcon:!1,hoverInfoType:"auto",hoverInfoHeader:"",hoverInfoBody:"",featureViewInfo:{type:"auto",header:"",body:""},layerViewInfo:{documentCategory:null,documentType:null},isTemporary:!1},isPrivate:!1,locationCoordinates:{lng:"",lat:"",zoom:15,bounds:""}},shapeTypes:[{title:"MultiPolygon",shapeTypeId:1},{title:"MultiPoint",shapeTypeId:2},{title:"MultiLine",shapeTypeId:3}],labelFields:null,fillExtrusionFields:null,styleFields:null,styleHeatmapFields:null,viewOnly:!1,layerCategories:[],attribute:null,attributeGroup:null,restrictedAttributeTitles:[],restrictedGroupTitles:[],attributesArray:[],commonAttributesArray:[],attributesGroup:null,attributesGroupArray:[],commonAttributesGroupArray:[],showSmartSelectDefaultValue:{organization:!1},organizations:[],projects:[],isSaving:!1,standardAttributes:[],legendItemTemplate:{id:"",title:"",icon:"",style:null},showLegendItemPopup:!1,isLegendItemGroup:!1,legendItem:null,specificationItem:null,isSpecificationGroup:!1,showSpecificationPopup:!1,filteredOrganizations:null,shapeTypeIsVisible:!0,hasChildrenLayers:!1,childrenLayers:[],selectionModes:[{title:this.$t("Fill"),value:"fill"},{title:this.$t("Outline"),value:"outline"}],attributeDialog:null,groupDialog:null,metadataDialog:null,mbTilesList:[],selectedMbTiles:null,mbTilesFolders:[],selectedMBTilesFolder:null,MBTilesFilters:{global:{value:null,matchMode:Be.CONTAINS}},documentsCollection:_.DocumentsCollection,organizationsCollection:_.OrganizationCollection,mbtileCollection:_.MBTileCollection,heatmapCategory:_.Heatmap,statuses:[],intervalTypes:[{intervalTypeId:1,title:"Astazi"},{intervalTypeId:2,title:"Saptamana curenta"},{intervalTypeId:3,title:"Saptamana trecuta"},{intervalTypeId:4,title:"Luna curenta"},{intervalTypeId:5,title:"Luna trecuta"},{intervalTypeId:6,title:"Anul curent"},{intervalTypeId:7,title:"Anul trecut"},{intervalTypeId:8,title:"Alta perioada"}],departments:[],hoverInfoTypes:[{name:"Auto",value:"auto"},{name:"Custom",value:"custom"},{name:"Form",value:"form"}],geometriesOverrideType:[{name:"Schema",value:"schema"},{name:"Dataset",value:"dataset"},{name:"Process",value:"process"}],nestedOrganizationCategories:[],organizationTypes:[],selectedOrganizationCategy:void 0,processingStatus:Ve.Processing,schemaOptions:[],isSearchingSchemas:!1,datasetOptions:[],isSearchingDatasets:!1,processOptions:[],isSearchingProcesses:!1,copyItems:dt,pasteItems:pt,formCategories:[],defaultLayerStyleSetting:null}},beforeMount(){this.getStandardAttributes()},mounted(){if(this.editLayerTab&&(this.currentTab=this.editLayerTab),this.layerCategories=this.common.documentCategories.filter(e=>e.parentDocumentCategoryId===3).map(e=>({documentCategoryId:e.documentCategoryId,title:e.title})),this.getStatuses(),this.loadDefaultLayerStyleSetting(),this.shapeTypes=this.shapeTypes.map(e=>({title:e.title,shapeTypeId:e.shapeTypeId})),this.labelFields=O.label,this.fillExtrusionFields=O.extrusion,this.data){if(this.layer=JSON.parse(JSON.stringify(this.data)),this.isMBTilesCollection&&(this.getMBTilesFolders(),this.getMBTilesList(),this.getDocumentDetails()),this.isDataView&&(this.layer.properties||(this.layer.properties={}),this.layer.properties.filters||(this.layer.properties.filters={operator:"OR",rules:[]})),this.sourceLayer)this.layer.properties||(this.layer.properties={}),this.layer.properties.style=S(this.sourceLayer.properties.style),this.layer.properties.styleHover=S(this.sourceLayer?.properties?.styleHover),this.layer.properties.styleFocus=S(this.sourceLayer?.properties?.styleFocus),this.layer.properties.styleHighlight=S(this.sourceLayer?.properties?.styleHighlight),this.layer.properties.styleHeatmap=S(this.sourceLayer?.properties?.styleHeatmap),this.layer.properties.header=S(this.sourceLayer.properties.header),this.layer.properties.headerGroup=S(this.sourceLayer.properties.headerGroup),this.layer.properties.styleRules=this.sourceLayer.properties.styleRules,this.layer.properties.label=this.sourceLayer.properties.label,this.layer.properties.settings=this.sourceLayer.properties.settings,this.layer.properties.shapeType=this.sourceLayer.properties.shapeType,this.layer.properties.legend=this.sourceLayer.properties.legend,this.layer.locationCoordinates=this.sourceLayer.locationCoordinates,[this.sourceLayer.documentCategory&&_.DataView].includes(this.sourceLayer.documentCategory.documentCategoryId)?this.layer.relatedDocumentId=this.sourceLayer.relatedDocumentId:this.layer.relatedDocumentId=this.sourceLayer.documentId,this.shapeTypeChanged(),this.layer.properties.style=this.sourceLayer.properties.style,this.attributesArrayMaker();else if(this.layer.properties||(this.layer.properties={}),!(this.layer&&this.layer.documentCategory&&this.layer.documentCategory.documentCategoryId===14)){let e=this.data.geometry?.features||this.data.features;if(this.data.geometry&&e.length&&(!this.layer?.properties?.header||!Object.keys(this.layer.properties.header).length)){const t=e[0].properties;if(t){this.layer.properties.header||(this.layer.properties.header={});for(let o in t)this.layer.properties.header.hasOwnProperty(o)||(this.layer.properties.header[o]={title:o,dataType:{code:"string",title:"Text"},isRequired:!1})}}}this.layer.properties.hoverInfoType||(this.layer.properties.hoverInfoType="auto"),this.layer.properties.featureViewInfo||(this.layer.properties.featureViewInfo={}),this.layer.properties.featureViewInfo.type||(this.layer.properties.featureViewInfo.type="auto"),this.layer.properties.layerViewInfo||(this.layer.properties.layerViewInfo={}),this.getChildrenLayers()}else this.layer.properties.isTemporary=this.isTemporary,this.layer.isPrivate=this.isPrivate;if(this.layer.locationCoordinates||(this.layer.locationCoordinates={lng:"",lat:"",zoom:15,bounds:""}),!this.layer?.properties?.header)this.layer.properties.header={};else if(Array.isArray(this.layer.properties.header)){let e={};for(let t of this.layer.properties.header)e[t.title]=t;this.layer.properties.header=e}(!this.layer.properties.label||!Object.keys(this.layer.properties.label).length)&&(this.layer.properties.label={minzoom:0,maxzoom:24}),this.layer.properties.style||(this.layer.properties.style={},this.layer.properties.styleHover={},this.layer.properties.styleFocus={},this.layer.properties.styleHighlight={},this.layer.properties.styleHeatmap={}),this.layer.properties.settings||(this.layer.properties.settings={minzoom:0,maxzoom:24}),this.layer.properties.legend||(this.layer.properties.legend=[]),this.layer.properties.specifications||(this.layer.properties.specifications=[]),this.labelFields&&this.labelFields["text-field"]&&this.layer.properties.header&&(this.labelFields["text-field"].options=Object.keys(this.layer.properties.header)),this.fillExtrusionFields&&this.fillExtrusionFields["fill-extrusion-height"]&&this.layer.properties.header&&(this.fillExtrusionFields["fill-extrusion-height"].options=Object.keys(this.layer.properties.header)),this.fillExtrusionFields&&this.fillExtrusionFields["fill-extrusion-base"]&&this.layer.properties.header&&(this.fillExtrusionFields["fill-extrusion-base"].options=Object.keys(this.layer.properties.header)),(!this.data||!this.data.documentId)&&(this.layer.timeStamp=new Date),this.layer.documentCategory&&(this.layer.documentCategory={documentCategoryId:this.layer.documentCategory.documentCategoryId,title:this.layer.documentCategory.title}),this.layer.properties.shapeType&&(this.layer.properties.shapeType={title:this.layer.properties.shapeType.title,shapeTypeId:this.layer.properties.shapeType.shapeTypeId}),this.sourceLayer||(this.shapeTypeChanged(),this.attributesArrayMaker()),setTimeout(()=>{for(let e in this.showSmartSelectDefaultValue)this.showSmartSelectDefaultValue[e]=!0},1e3),this.getUserDepartments(),this.layer.organizationId&&this.getDepartments(),this.getOrganizationTypes(),this.layer?.properties?.datasetId?this.getDatasets(this.layer.properties.datasetId):this.layer?.properties?.schemaId?this.get
1Schemas(null,this.layer.properties.schemaId):this.layer?.properties?.processId&&this.getProcesses(this.layer.properties.processId),this.layer?.properties?.featureEditOverride||(this.layer.properties.featureEditOverride={}),this.formCategories=L(this.common.documentCategories.filter(e=>e.documentCategoryId===18||e.parentDocumentCategoryId===18).map(e=>({documentCategoryId:e.documentCategoryId,parentDocumentCategoryId:e.parentDocumentCategoryId,depth:e.depth,title:e.title})),"documentCategoryId","parentDocumentCategoryId",void 0,0)},methods:{selectDataset(e){if(e){const t=this.datasetOptions.find(o=>o.documentId===e);this.layer.properties.geometriesOverrideParams=t.properties.sqlParams.map(o=>({key:o.title,value:""}))}else this.layer.properties.geometriesOverrideParams=[]},addParameter(){this.layer.properties.geometriesOverrideParams||(this.layer.properties.geometriesOverrideParams=[]),this.layer.properties.geometriesOverrideParams.push({key:"",value:""})},removeParameter(e){this.layer.properties.geometriesOverrideParams=this.layer.properties.geometriesOverrideParams.filter((t,o)=>o!==e)},getSchemas(e,t=null){if(!e&&!t){this.schemaOptions=[];return}this.isSearchingSchemas=!0;const o={};t?o.schemaId=t:o.filter=e,this.$store.dispatch("getSchemas",{query:{moduleId:this.$route?.meta?.moduleId},data:o}).then(s=>{this.schemaOptions=s,this.isSearchingSchemas=!1}).catch(s=>{this.isSearchingSchemas=!1,this.schemaOptions=[]})},getDatasets(e){if(!e){this.datasetOptions=[];return}this.isSearchingDatasets=!0,this.$store.dispatch("documentSearch",{data:{filter:e,documentCategoryId:_.SQLScript}}).then(t=>{this.datasetOptions=t,this.isSearchingDatasets=!1}).catch(t=>{this.isSearchingDatasets=!1,this.datasetOptions=[]})},getProcesses(e){if(!e){this.processOptions=[];return}this.isSearchingProcesses=!0,this.$store.dispatch("documentSearch",{data:{filter:e,documentCategoryId:_.Process}}).then(t=>{this.processOptions=t,this.isSearchingProcesses=!1}).catch(t=>{this.isSearchingProcesses=!1,this.processOptions=[]})},getDepartments(){this.$store.dispatch("getOrganizationDescendants",{query:{organizationId:this.layer.organizationId}}).then(e=>{this.departments=e}).catch()},getOrganizationTypes(){this.$store.dispatch("getOrganizationCategories",{query:{moduleId:this.$route?.meta?.moduleId},data:this.params}).then(e=>{this.nestedOrganizationCategories=L(e,"organizationCategoryId","parentOrganizationCategoryId",void 0,0)}),this.$store.dispatch("getOrganizationTypes",{query:{moduleId:this.$route?.meta?.moduleId}}).then(e=>{this.organizationTypes=e})},getStatuses(){this.$store.dispatch("getStatuses").then(e=>{this.statuses=e}).catch()},onSourceDocumentChanged(){this.shapeTypeIsVisible=!1,setTimeout(()=>{this.$store.dispatch("getDocumentById",{query:{moduleId:this.$route?.meta?.moduleId},data:{documentId:this.layer?.relatedDocumentId}}).then(e=>{this.layer.properties||(this.layer.properties={}),this.layer.properties.style=S(e.properties.style),this.layer.properties.styleHover=S(e?.properties?.styleHover),this.layer.properties.styleFocus=S(e?.properties?.styleFocus),this.layer.properties.styleHighlight=S(e?.properties?.styleHighlight),this.layer.properties.styleHeatmap=S(e?.properties?.styleHeatmap),this.layer.properties.header=S(e.properties.header),this.layer.properties.headerGroup=S(e.properties.headerGroup),this.layer.properties.styleRules=e.properties.styleRules,this.layer.properties.label=e.properties.label,this.layer.properties.settings=e.properties.settings,this.layer.properties.shapeType=e.properties.shapeType,this.layer.properties.legend=e.properties.legend,this.layer.locationCoordinates=e.locationCoordinates,this.shapeTypeChanged(),this.layer.properties.style=e.properties.style,this.attributesArrayMaker(),this.shapeTypeIsVisible=!0}).catch(e=>{})},1e3)},getUserDepartments(){this.$store.dispatch("getUserDepartments",{query:{moduleId:this.$route?.meta?.moduleId}}).then(e=>{this.organizations=L(e.map(t=>({organizationId:t.organizationId,parentOrganizationId:t.parentOrganizationId,depth:t.depth,title:t.title,id:t.organizationId,label:t.title})),"organizationId","parentOrganizationId",void 0,0),(!this.data||!this.data.documentId)&&!this.layer.organizationId&&this.currentProject?.department?.organizationId&&(this.layer.organizationId=this.currentProject?.department?.organizationId),this.layer.organizationId&&this.getProjectsAndLayers()}).catch(e=>{this.getProjectsAndLayers()})},filterOrganizations(e){this.filteredOrganizations=this.organizations.filter(t=>t.label.toLowerCase().includes(e.query.toLowerCase()))},onDragStart(e,t){t&&e.preventDefault()},attributesArrayMaker(){for(let s=0;s<this.commonAttributesGroupArray;s++)this.commonAttributesGroupArray[s].children=[];for(let s=0;s<this.attributesGroupArray;s++)this.attributesGroupArray[s].children=[];let e=[],t=[];if(this.layer.properties.headerGroup){for(let s in this.layer.properties.headerGroup){const r=this.layer.properties.headerGroup[s];r.hasOwnProperty("children")||(r.children=[]),r.children.length&&(r.children=Object.values(this.layer.properties.header).reduce((i,y)=>(y.groupId==r.id&&y.groupId!=null&&i.push(y),i),[]).sort((i,y)=>i.position&&y.position?i.position-y.position:0)),t.push({...r})}t=t.sort((s,r)=>s.position&&r.position?s.position-r.position:0)}for(let s in this.layer.properties.header){const r=this.layer.properties.header[s];if(r.dataType){let i=this.attributesArray.findIndex(y=>y.title===s);i<0&&(i=this.commonAttributesArray.findIndex(y=>y.title===s)),e.push({...r,position:i>-1?i+1:r.position})}}const o=pe(t,[]);e=e.filter(s=>!s.groupId&&!o.find(r=>r.title===s.title)).sort((s,r)=>s.position&&r.position?s.position-r.position:0),this.commonAttributesGroupArray=t.filter(s=>s.isCommon),this.attributesGroupArray=t.filter(s=>!s.isCommon),this.commonAttributesArray=e.filter(s=>s.isCommon),this.attributesArray=e.filter(s=>!s.isCommon)},async isValid(){return await this.v$.$validate()},close(){this.$emit("close")},finalAttributeArray(){let e=[],t=1;for(let o=0;o<this.commonAttributesGroupArray.length;o++)if(this.commonAttributesGroupArray[o].position=t,t++,this.commonAttributesGroupArray[o].children)for(let s=0;s<this.commonAttributesGroupArray[o].children.length;s++)this.commonAttributesGroupArray[o].children[s].groupId=this.commonAttributesGroupArray[o].id,this.commonAttributesGroupArray[o].children[s].position=t,t++,e.push(this.commonAttributesGroupArray[o].children[s]);for(let o=0;o<this.commonAttributesArray.length;o++)this.commonAttributesArray[o].groupId=null,this.commonAttributesArray[o].position=t,t++,e.push(this.commonAttributesArray[o]);for(let o=0;o<this.attributesGroupArray.length;o++)if(this.attributesGroupArray[o].position=t,t++,this.attributesGroupArray[o].children)for(let s=0;s<this.attributesGroupArray[o].children.length;s++)this.attributesGroupArray[o].children[s].groupId=this.attributesGroupArray[o].id,this.attributesGroupArray[o].children[s].position=t,t++,e.push(this.attributesGroupArray[o].children[s]);for(let o=0;o<this.attributesArray.length;o++)this.attributesArray[o].groupId=null,this.attributesArray[o].position=t,t++,e.push(this.attributesArray[o]);return e},mergeMbtileCollection(){this.layer?.documentId&&(this.$store.dispatch("mergeMbtileCollection",{query:{moduleId:this.$route?.meta?.moduleId},data:{documentId:this.layer.documentId}}).then(e=>{}).catch(e=>{}),this.close())},async save(){let e=this.finalAttributeArray();if(!await this.isValid()){this.$toast.add({severity:"error",summary:this.$t("Missing data"),detail:this.$t("Please fix the errors first!"),life:5e3});return}if(this.isDataView&&this.layer.properties.filters){if(!this.layer.properties.filters.operator){this.$toast.add({severity:"error",summary:this.$t("Missing operator"),detail:this.$t("Please set an operator!"),life:5e3}),this.currentTab="tab-filters";return}const r=i=>{for(let y=0;y<i.length;y++){if(i[y].rules){if(!i[y].rules.length)throw this.$toast.add({severity:"error",summary:this.$t("No empty groups"),detail:this.$t("Please remove them!"),life:5e3}),this.currentTab="tab-filters","err";r(i[y].rules)}if(!i[y].operator)throw this.$toast.add({severity:"error",summary:this.$t("Missing operator"),detail:this.$t("Please set an operator!"),life:5e3}),this.currentTab="tab-filters","err";if(i[y].type==="block"&&(!i[y].field||!i[y].value))throw this.$toast.add({severity:"error",summary:this.$t("Missing values"),detail:this.$t("Please set all values!"),life:5e3}),this.currentTab="tab-filters","err"}};try{this.layer.properties.filters.rules.length&&r(this.layer.properties.filters.rules)}catch{return}}this.isSaving=!0,this.layer.properties.header={};for(let r=0;r<e.length;r++)this.layer.properties.header[e[r].title]={...e[r]};this.layer.properties.headerGroup={};for(let r=0;r<this.commonAttributesGroupArray.length;r++)this.layer.properties.headerGroup[this.commonAttributesGroupArray[r].title]={...this.commonAttributesGroupArray[r]};for(let r=0;r<this.attributesGroupArray.length;r++)this.layer.properties.headerGroup[this.attributesGroupArray[r].title]={...this.attributesGroupArray[r]};const o=["id","groupId","position","title","children"],s=Ot(this.layer);for(const[r,i]of Object.entries(s.properties.headerGroup))for(const[y,V]of Object.entries(i))o.includes(y)||delete i[y],y=="children"&&V.forEac
1h(T=>{for(const[h,I]of Object.entries(T))o.includes(h)||delete T[h]});if(this.data&&this.data.documentId){let r=JSON.parse(JSON.stringify(s));delete r.geometry,r.properties.styleRules&&r.properties.styleRules.length?r.properties.styleExpression=J(Z(r.properties.styleRules),{},r.properties.style):r.properties.styleExpression=ue(r.properties),r.properties.labelRules&&r.properties.labelRules.length?r.properties.labelExpression=J(Z(r.properties.labelRules),{},r.properties.label):r.properties.labelExpression=null,this.isRaster&&(r.properties.shapeType=this.shapeTypes[0]),(f.isLocalLayer(r)||r?.documentCategory?.documentCategoryId===136)&&(r.properties||(r.properties={}),r.properties.dataSource||(r.properties.dataSource={}),r.properties.dataSource.isTiles=!1),this.$store.dispatch("editLayer",{query:{moduleId:this.$route?.meta?.moduleId},data:r}).then(i=>{this.updateLayerImages(i),this.$emit("editLayer",i),this.isSaving=!1}).catch(i=>{this.isSaving=!1,this.$toast.add({severity:"error",summary:"Error",detail:i,life:5e3})})}else this.layer.properties.styleRules&&this.layer.properties.styleRules.length?this.layer.properties.styleExpression=J(Z(this.layer.properties.styleRules),{}):this.layer.properties.styleExpression=ue(this.layer.properties),this.layer.properties.labelRules&&this.layer.properties.labelRules.length&&(this.layer.properties.labelExpression=J(Z(this.layer.properties.labelRules),{})),this.layer.properties.style&&(this.layer.properties.style=M(this.layer.properties.style)),this.layer.properties.styleHover&&(this.layer.properties.styleHover=M(this.layer.properties.styleHover)),this.layer.properties.styleFocus&&(this.layer.properties.styleFocus=M(this.layer.properties.styleFocus)),this.layer.properties.styleHighlight&&(this.layer.properties.styleHighlight=M(this.layer.properties.styleHighlight)),this.layer.properties.styleHeatmap&&(this.layer.properties.styleHeatmap=M(this.layer.properties.styleHeatmap)),this.layer.properties.label&&(this.layer.properties.label=M(this.layer.properties.label)),this.isRaster&&(this.layer.properties.shapeType=this.shapeTypes[0]),this.$store.dispatch("addLayer",{query:{moduleId:this.$route?.meta?.moduleId},data:this.layer}).then(r=>{this.updateLayerImages(r),this.$emit("addLayer",r),this.isSaving=!1}
1).catch(r=>{this.isSaving=!1,this.$toast.add({severity:"error",summary:"Error",detail:r,life:5e3})})},documentCategoryChanged(){this.shapeTypeIsVisible=this.layer.documentCategory?.documentCategoryId!==136,setTimeout(()=>{this.layer.documentType=null,this.layer?.properties?.dataSource&&(this.layer.properties.dataSource.isTiles=!this.isOffline),this.shapeTypeChanged(),this.isMBTilesCollection&&(this.getMBTilesFolders(),this.getMBTilesList()),this.isFolder&&(this.layer.properties.toggleChildren=!0)},1e3)},shapeTypeChanged(){setTimeout(()=>{this.styleFields=null,this.styleHeatmapFields=null,this.layer.properties||(this.layer.properties={}),this.layer.properties.style={},this.layer.properties.styleHover={},this.layer.properties.styleFocus={},this.layer.properties.styleHighlight={},this.layer.properties.styleHeatmap={},this.isExtrusion?(this.styleFields=O.extrusion,this.layer.properties.shapeType=this.shapeTypes[0]):this.isRaster?(this.styleFields=O.raster,this.layer.properties.shapeType=this.shapeTypes[0]):/point/gi.test(this.layer?.properties?.shapeType?.title)?(this.styleFields=O.circle,this.isHeatmap&&(this.styleHeatmapFields=O.heatmap)):/polygon/gi.test(this.layer?.properties?.shapeType?.title)?this.styleFields={...O.fill,...O.border}:/line/gi.test(this.layer?.properties?.shapeType?.title)&&(this.styleFields=O.line);for(let e in this.styleFields)this.fieldMatchShape(e)&&(this.layer.properties.style[e]=this.layer.properties.styleHover[e]=this.layer.properties.styleFocus[e]=this.layer.properties.styleHighlight[e]=this.styleFields[e].value);this?.data?.properties?.style&&(this.layer.properties.style=this.data.properties.style),this?.data?.properties?.styleHover&&(this.layer.properties.styleHover=this.data.properties.styleHover),this?.data?.properties?.styleFocus&&(this.layer.properties.styleFocus=this.data.properties.styleFocus),this?.data?.properties?.styleHighlight&&(this.layer.properties.styleHighlight=this.data.properties.styleHighlight),this?.data?.properties?.styleHeatmap&&(this.layer.properties.styleHeatmap=this.data.properties.styleHeatmap),!this.data?.documentId&&!this.sourceLayer&&this.applyDefaultStyleSettingToNewLayer()},1e3)},getDefaultStyleForShape(e,t){if(!e||typeof e!="object")return null;if(!(Object.prototype.hasOwnProperty.call(e,"point")||Object.prototype.hasOwnProperty.call(e,"polygon")||Object.prototype.hasOwnProperty.call(e,"line")))return e;const s=String(t||"").toLowerCase();return/polygon/.test(s)?e.polygon||null:/line/.test(s)?e.line||null:/point|circle/.test(s)&&e.point||null},applyDefaultStyleSettingToNewLayer(){if(!this.defaultLayerStyleSetting||!this.layer?.properties)return;const e=this.layer?.properties?.shapeType?.title,t=this.getDefaultStyleForShape(this.defaultLayerStyleSetting,e);!t||typeof t!="object"||(this.layer.properties.style=S(t))},async loadDefaultLayerStyleSetting(){try{const e=await this.$store.dispatch("getDocuments",{query:{moduleId:this.$route?.meta?.moduleId},data:{skip:0,take:1,documentTypeId:_t.StyleSettingDefault,orderBy:"documentId DESC"}});this.defaultLayerStyleSetting=e?.[0]?.fields?.style||null,!this.data?.documentId&&!this.sourceLayer&&this.applyDefaultStyleSettingToNewLayer()}catch{this.defaultLayerStyleSetting=null}},fieldMatchShape(e){return!/point/gi.test(this.layer?.properties?.shapeType?.title)||String(e).startsWith(ut(this.layer?.properties?.shapeType?.title))||this.isRaster&&String(e).startsWith("raster")},showAttributePopup(){this.attributeDialog=null;const e=this;this.attributeDialog=this.$dialog.open(P("div"),{props:{modal:!0,style:{width:"640px"}},templates:{header:P("div",{id:"attributeModalHeader"})},onClose(){e.attribute=null,e.attributeGroup=null},emits:{onSave:this.attributeSaved}}),this.$nextTick(()=>{this.attributeDialog.content=P(ce,{data:this.attribute,restrictedTitles:this.restrictedAttributeTitles,standardAttributes:this.standardAttributes,documentsList:this.projects,viewOnly:this.viewOnly})})},attributeSaved(e,t,o){if(this.attributeGroup){const s=this.attributesGroupArray.find(r=>r.title===this.attributeGroup);if(t){const r=s.children.findIndex(i=>i.title===t.title);e.title!==t.title&&(e.previousTitle=t.title),e?.dataType?.code!==t?.dataType?.code&&(e.previousDataType=t.dataType),s.children[r]=e}else s.children[o?"unshift":"push"](e)}else if(t){const s=this.attributesArray.findIndex(r=>r.title===t.title);e.title!==t.title&&(e.previousTitle=t.title),e?.dataType?.code!==t?.dataType?.code&&(e.previousDataType=t.dataType),this.attributesArray[s]=e}else this.attributesArray[o?"unshift":"push"](e);this.attributeDialog&&this.attributeDialog.close()},renameKey(e,t,o,s,r){return Object.keys(e).reduce((y,V)=>(t===V?(V=o,y[V]=s):y[V]=e[V],y),{})},setRestrictedAttributeTitles(){const e=[];this.attributesArray.forEach(t=>{e.push(t.title)}),this.commonAttributesArray.forEach(t=>{e.push(t.title)}),this.attributesGroupArray.forEach(t=>
1{t.children.forEach(o=>{e.push(o.title)})}),this.commonAttributesGroupArray.forEach(t=>{t.children.forEach(o=>{e.push(o.title)})}),this.restrictedAttributeTitles=e},addAttribute(){this.setRestrictedAttributeTitles(),this.showAttributePopup()},copyAttribute(e){navigator.clipboard.writeText(JSON.stringify(e)).then(()=>this.$toast.add({severity:"success",summary:"Succes",detail:"Copiat cu succes",life:5e3})).catch(t=>{console.log(t)})},copyAttributeGroup(e){navigator.clipboard.writeText(JSON.stringify(e)).then(()=>this.$toast.add({severity:"success",summary:"Succes",detail:"Copiat cu succes",life:5e3})).catch(t=>{console.log(t)})},async pasteAttribute(){try{const e=await navigator.clipboard.readText(),t=JSON.parse(e);if(!(s=>me.every(r=>s.hasOwnProperty(r)))(t)){this.$toast.add({severity:"error",summary:"Eroare",detail:"Structura nu este corecta.",life:5e3});return}if(this.attributesArray.find(s=>s.title===t.title)){this.$toast.add({severity:"error",summary:"Eroare",detail:"Atributul exista.",life:5e3});return}t.position=this.attributesArray.length-1,t.groupId=null,this.attributesArray.push(t)}catch{this.$toast.add({severity:"error",summary:"Eroare",detail:"Nu se pot citi datele.",life:5e3})}},async pasteGroup(){try{const e=await navigator.clipboard.readText(),t=JSON.parse(e),o=i=>mr.every(y=>i.hasOwnProperty(y)),s=i=>me.every(y=>i.hasOwnProperty(y)),r=i=>i.every(y=>s(y));if(!o(t)){this.$toast.add({severity:"error",summary:"Eroare",detail:"Structura nu este corecta.",life:5e3});return}if(this.attributesGroupArray.find(i=>i.title===t.title)){this.$toast.add({severity:"error",summary:"Eroare",detail:"Atributul exista.",life:5e3});return}if(t.position=this.attributesGroupArray.length-1,t.id=Date.now(),!r(t.children)){this.$toast.add({severity:"error",summary:"Eroare",detail:"Structura nu este corecta.",life:5e3});return}t.children.forEach(i=>{i.groupId=t.id}),this.attributesGroupArray.push(t)}catch{this.$toast.add({severity:"error",summary:"Eroare",detail:"Nu se pot citi datele.",life:5e3})}},editAttribute(e,t=!1){this.setRestrictedAttributeTitles(),e.title?(this.attribute=this.attributesArray.find(o=>o.title===e.title),this.attribute||(this.attribute=this.commonAttributesArray.find(o=>o.title===e.title),this.attribute||(delete e.position,e.groupId=null,this.attributesArray.push(e),this.attribute=e))):(this.attributeGroup=e.group.title,e.attribute?this.attribute=e.group.children.find(o=>o.title===e.attribute.title)||e.attribute:this.attribute=null),this.attribute&&this.restrictedAttributeTitles.splice(this.restrictedAttributeTitles.findIndex(o=>o===this.attribute.title),1),this.viewOnly=t,this.showAttributePopup()},setTab(e){this.currentTab=e},getDrawingTypeByLayer(e){return he(e)},deleteAttribute(e){this.$confirm.require({message:yt(this.$t("Are you sure want to delete %s?"),[e.title]),header:this.$t("Confirm action"),icon:"pi pi-exclamation-triangle",accept:()=>{this.attributesArray=this.attributesArray.filter(t=>t.title!==e.title),this.attributesGroupArray.forEach(t=>{t.children=t.children.filter(o=>o.title!==e.title)})},reject:()=>{}})},deleteGroup(e){this.$confirm.require({message:this.$t("Are you sure want to delete ")+e.title+" ?",header:this.$t("Confirm action"),icon:"pi pi-exclamation-triangle",accept:()=>{this.attributesGroupArray=this.attributesGroupArray.filter(t=>t.title!==e.title);for(let t of e.children)delete t.groupId,this.attributesArray.push(t)},reject:()=>{}})},showGroupPopup(){this.groupDialog=null;const e=this;this.groupDialog=this.$dialog.open(P("div"),{props:{modal:!0,style:{width:"640px"}},templates:{header:P("div",{id:"groupModalHeader"})},onClose(){e.attributesGroup=null},emits:{onSave:this.saveAttributeGroup}}),this.$nextTick(()=>{this.groupDialog.content=P(de,{data:this.attributesGroup,restrictedTitles:this.restrictedGroupTitles})})},addGroup(){this.restrictedGroupTitles=this.attributesGroupArray.map(e=>e.title),this.showGroupPopup()},editGroup(e){this.restrictedGroupTitles=[],this.attributesGroupArray.forEach(t=>{t.title===e.title?this.attributesGroup=t:this.restrictedGroupTitles.push(t.title)}),this.showGroupPopup()},getLayerShapeCss(e,t){return fe(e,t)},saveAttributeGroup(e,t,o){if(this.layer.properties.headerGroup||(this.layer.properties.headerGroup={}),t){const s=this.attributesGroupArray.findIndex(r=>r.title===t.title);this.attributesGroupArray[s]=e}else this.attributesGroupArray[o?"unshift":"push"](e);this.groupDialog.close()},async updateLayerImages(e){let t=[];if(e.properties&&e.properties.styleExpression&&e.properties.styleExpression["icon-image"]&&t.push(...ct(e.properties.styleExpression["icon-image"],[])),e.properties&&e.properties.style&&e.properties.style["icon-image"]&&t.push(e.properties.style["icon-image"]),t.length)for(let o=0;o<t.length;o++)await this.$store.dispatch("updateFile",{query:{moduleId:this.$route?.meta?.moduleId},data:{url:t[o],documentId:e.documentId}}).then().catch()},getProjects(){this.$store.dispatch("getUserProjects",{query:{moduleId:this.$route?.meta?.moduleId}}).then(e=>{this.projects=e,this.setParentLocalization()}).catch(e=>{this.$toast.add({severity:"error",summary:"Error",detail:this.$t(e),life:5e3})})},getProjectsAndLayers(){this.$store.dispatch("getProjectsAndLayers",{query:{moduleId:this.$route?.meta?.moduleId},data:{organizationIds:this.currentOrganizationId?[this.currentOrganizationId]:this.layer?.organizationId?[this.layer.organizationId]:null,isTemporary:this.isTemporary,isPrivate:this.layer.isPrivate}}
1).then(e=>{this.projects=e,(!this.data||!this.data.documentId)&&!this.layer.parentDocumentId&&this.currentProject&&(this.layer.parentDocumentId=this.currentProject.documentId?this.currentProject.documentId:null),this.setParentLocalization()}).catch(e=>{})},getStandardAttributes(){this.$store.dispatch("getAttributes",{query:{moduleId:this.$route?.meta?.moduleId}}).then(e=>{this.standardAttributes=e}).catch(e=>{})},askImportLegend(e){this.layer.properties.legend.length?this.$confirm.require({message:this.$t("Overwrite existing rules?"),header:this.$t("Confirm action"),icon:"pi pi-exclamation-triangle",accept:()=>{e==="rules"?this.importLegendFromStyleRules(!0):this.importLegendFromStyle(!0)},reject:()=>{e==="rules"?this.importLegendFromStyleRules(!1):this.importLegendFromStyle(!1)}}):e==="rules"?this.importLegendFromStyleRules(!1):this.importLegendFromStyle(!1)},importLegendFromStyleRules(e){e&&(this.layer.properties.legend=[]);for(let t of this.layer.properties.styleRules)this.layer.properties.legend.push({...this.legendItemTemplate,id:Math.floor(Math.random()*999999),title:t.styleName||this.layer.title,style:t.style});this.$toast.add({severity:"success",summary:"Done!",detail:this.$t("Legend from style expressions has been set!"),life:5e3})},importLegendFromStyle(e){e&&(this.layer.properties.legend=[]),this.layer.properties.legend.push({...this.legendItemTemplate,id:Math.floor(Math.random()*999999),title:this.layer.properties.styleName||this.layer.title,style:this.layer.properties.style}),this.$toast.add({severity:"success",summary:"Done!",detail:this.$t("Legend from style has been set!"),life:5e3})},deleteLegendItem(e){this.layer.properties.legend=this.layer.properties.legend.filter(t=>t.id!==e.id);for(let t=0;t<this.layer.properties.legend.length;t++)this.layer.properties.legend[t].children&&(this.layer.properties.legend[t].children=this.layer.properties.legend[t].children.filter(o=>o.id!==e.id))},openLegendItemPopup(e){this.legendItem=null,this.isLegendItemGroup=!!e,this.showLegendItemPopup=!0},onAddLegendItem(e){this.layer.properties.legend.push(e),this.showLegendItemPopup=!1},onEditLegendItem(e){const t=this.layer.properties.legend.findIndex(o=>o.id===e.id);if(t>-1)this.layer.properties.legend[t]=e;else for(let o=0;o<this.layer.properties.legend.length;o++)if(this.layer.properties.legend[o].children){const s=this.layer.properties.legend[o].children.filter(r=>r.id===e.id);s>-1&&(this.layer.properties.legend[o].children[s]=e)}this.showLegendItemPopup=!1},editLegendItem(e){this.isLegendItemGroup=!!e.children,this.legendItem=e,this.showLegendItemPopup=!0},openSpecificationPopup(e){this.specificationItem=null,this.isSpecificationGroup=!!e,this.showSpecificationPopup=!0},deleteSpecificationItem(e){this.layer.properties.specifications=this.layer.properties.specifications.filter(t=>t.id!==e.id);for(let t=0;t<this.layer.properties.specifications.length;t++)this.layer.properties.specifications[t].children&&(this.layer.properties.specifications[t].children=this.layer.properties.specifications[t].children.filter(o=>o.id!==e.id))},editSpecificationItem(e){this.isSpecificationGroup=!!e.children,this.specificationItem=e,this.showSpecificationPopup=!0},onAddSpecificationItem(e){this.layer.properties.specifications.push(e),this.showSpecificationPopup=!1},onEditSpecificationItem(e){const t=this.layer.properties.specifications.findIndex(o=>o.id===e.id);if(t>-1)this.layer.properties.specifications[t]=e;else for(let o=0;o<this.layer.properties.specifications.length;o++)if(this.layer.properties.specifications[o].children){const s=this.layer.properties.specifications[o].children.filter(r=>r.id===e.id);s>-1&&(this.layer.properties.specifications[o].children[s]=e)}this.showSpecificationPopup=!1},importHeaderFromGeometries(){this.$store.dispatch("getGeometries",{query:{moduleId:this.$route?.meta?.moduleId},data:{documentIds:[this.data.documentId],skip:0,take:1,orderBy:[],filter:"",allAttributes:!0}}).then(e=>{if(e&&e.length){const t=e[0].attributes;if(t&&Object.keys(t).length){this.layer.properties.header||(this.layer.properties.header={});for(let o in t)this.layer.properties.header.hasOwnProperty(o)||(this.layer.properties.header[o]={title:o,dataType:{code:"string",title:"Text"},isRequired:!1});this.attributesArrayMaker(),this.$toast.add({severity:"success",summary:"Success",detail
1:this.$t("Attributes have been imported!"),life:5e3})}else this.$toast.add({severity:"warn",summary:"Warning",detail:this.$t("There are no attributes found!"),life:5e3})}else this.$toast.add({severity:"warn",summary:"Warning",detail:this.$t("There are no geometries found!"),life:5e3})}).catch(e=>{this.$toast.add({severity:"error",summary:"Error",detail:this.$t(e),life:5e3})})},importFromJson(e,t){const o=e.target,s=new FileReader;s.onload=()=>{const r=JSON.parse(s.result);let i=!0;switch(t){case"style":r.hasOwnProperty("style")||(i=!1);break;case"label":r.hasOwnProperty("label")||(i=!1);break;case"attributes":r.hasOwnProperty("header")||(i=!1);break}i?(this.layer.properties={...this.layer.properties,...r},t==="attributes"&&this.attributesArrayMaker(),this.$toast.add({severity:"success",summary:"Done!",detail:this.$t("Import has been completed!"),life:5e3})):this.$toast.add({severity:"error",summary:"Error!",detail:this.$t("Import failed! Data is not correct!"),life:5e3})},s.readAsText(o.files[0])},getExportContent(e){let t=null;switch(e){case"style":t={style:this.layer?.properties?.style,styleHover:this.layer?.properties?.styleHover,styleFocus:this.layer?.properties?.styleFocus,styleHighlight:this.layer?.properties?.styleHighlight,styleHeatmap:this.layer?.properties?.styleHeatmap,styleName:this.layer?.properties?.styleName,styleExpression:this.layer?.properties?.styleExpression,styleRules:this.layer?.properties?.styleRules};break;case"label":t={label:this.layer?.properties?.label,labelExpression:this.layer?.properties?.labelExpression,labelRules:this.layer?.properties?.labelRules};break;case"attributes":t={header:this.layer?.properties?.header,headerGroup:this.layer?.properties?.headerGroup};break}return t},exportToJson(e){let t=this.getExportContent(e);const o=new Blob([JSON.stringify(t)],{type:"text/plain;charset=utf-8"});mt.saveAs(o,`${this.layer.title}-${e}.json`)},setParentLocalization(){if(this.layer.parentDocumentId&&!this.layer.locationCoordinates.lng){const e=pe(this.projects,[]).find(t=>t.documentId===this.layer.parentDocumentId);e&&e?.locationCoordinates?.lng&&e?.locationCoordinates?.lat&&(this.layer.locationCoordinates=e.locationCoordinates)}},onDepartmentChange(){this.layer.parentDocumentId=null,this.getProjectsAndLayers(),this.getDepartments()},showMetaDataImport(){this.metadataDialog=null,this.metadataDialog=this.$dialog.open(P("div"),{props:{modal:!0,style:{width:"640px"}},templates:{header:P("div",{id:"metadataModalHeader"})},emits:{onSave:this.saveMetaDataImport}}),this.$nextTick(()=>{this.metadataDialog.content=P(ne,{groups:this.attributesGroupArray})})},openMetaDataImport(){this.showMetaDataImport()},saveMetaDataImport(e,t=null){for(let o in e)this.attributeGroup=t,this.attributeSaved(e[o]);this.metadataDialog.close()},getChildrenLayers(){(typeof this.layer.documentId=="number"||this.layer.documentId instanceof Number)&&this.$store.dispatch("getFullProject",{query:{moduleId:this.$route?.meta?.moduleId},data:{parentDocumentId:this.layer.documentId}}).then(e=>{e?.documentChildren?.length&&(this.childrenLayers=e.documentChildren.map(t=>({documentId:t.documentId,title:t.title})),this.hasChildrenLayers=!0)}).catch(e=>{this.$toast.add({severity:"error",summary:"Error",detail:this.$t(e),life:5e3})})},onLayerSort(){let e=[];for(let t=0;t<this.childrenLayers.length;t++)e.push({documentId:this.childrenLayers[t].documentId,position:t});e.length&&this.$store.dispatch("documentsReorder",{query:{moduleId:this.$route?.meta?.moduleId},data:e}).then(t=>{}).catch(t=>{})},getMBTilesFolders(){this.$store.dispatch("getMBTilesFolders").then(e=>{Array.isArray(e)&&(this.mbTilesFolders=e)}).catch(e=>{})},getMBTilesList(e=null){e&&this.$store.dispatch("getMbtilesFiles",{query:{path:e}}).then(t=>{Array.isArray(t)?this.mbTilesList=t.map(o=>({title:o.label,documentId:this.layer.documentId||null,properties:{filePath:o.value}})):this.$toast.add({severity:"error",summary:"Error",detail:this.$t("MBTiles list could not be fetched!"),life:5e3})}).catch(t=>{this.$toast.add({severity:"error",summary:"Error",detail:this.$t("MBTiles list could not be fetched!"),life:5e3})})},getDocumentDetails(){this.$store.dispatch("getDocumentDetails",{query:{documentId:this.layer.documentId}}).then(e=>{this.layer.documentDetails=e}).catch(e=>{this.$toast.add({severity:"error",summary:"Error",detail:e,life:5e3})})},addMBTileToLayer(){this.documentDetails.push(...this.selectedMbTiles),this.selectedMbTiles=null},deleteTile(e){this.layer.documentDetails=this.documentDetails.filter((t,o)=>o!==e)},deleteSelectedTiles(){this.$confirm.require({message:this.$t("Are you sure want to delete this item?"),header:this.$t("Confirm action"),icon:"pi pi-exclamation-triangle",accept:()=>{this.layer.documentDetails=[]},reject:()=>{}})}},validations(){return{layer:{title:{required:A.withMessage(this.$t("Field is required!"),q)},documentCategory:{required:A.withMessage(this.$t("Field is required!"),q)},organizationId:{required:A.withMessage(this.$t("Field is required!"),q)},properties:{shapeType:{requiredIf:A.withMessage(this.$t("Field is required!"),G(this.isDrawable&&!this.isGeoreference&&!this.isPointCloud&&this.layer.documentCategory?.documentCategoryId!==_.Folder))},documentCategory:{requiredIf:A.withMessage(this.$t("Field is required!"),G(this.layer.properties.hoverInfoType==="form"))},documentType:{requiredIf:A.withMessage(this.$t("Field is required!"),G(this.layer.properties.hoverInfoType==="form"))},featureViewInfo:{documentCategory:{requiredIf:A.withMessage(this.$t("Field is required!"),G(this.layer.properties?.featureViewInfo?.type==="form"))},documentType:{requiredIf:A.withMessage(this.$t("Field is required!"),G(this.layer.properties?.featureViewInfo?.type==="form"))}}}}}},setup(){return{v$:re()}}},fr={key:0,class:"pt-3"},gr={class:"grid p-fluid"},br={class:"col-12 field"},vr={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Ir={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Cr={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Tr={key:0},Vr={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Dr={key:0,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Sr={key:1,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Lr={key:2,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},kr={key:3,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Ar={key:4,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},wr={key:5,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},_r={key:6,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Fr={key:7,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Or={key:8,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Pr={key:9,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Gr={key:10,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},zr={key:11,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Mr={key:12,class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Er={key:13,class:"col-12 field"},Ur={class:"card"},jr={class:"grid p-fluid"},Br={class:"col-12 grid p-fluid"},Rr={class:"col-4 field"},qr={class:"col-4 field"},Hr={class:"col-4 field"},Nr={class:"col-12 grid p-fluid"},Qr={class:"col-4 field"},Jr={key:0,class:"col-4 field"},Zr={key:1,class:"col-4 field"},Wr={class:"col-12 grid p-fluid"},Kr={class:"col-4 field"},xr={class:"col-4 field"},Yr={key:14,class:"col-12 field"},$r={class:"card shadow-2"},Xr={class:"grid p-fluid"},ei={class:"col-12 grid p-fluid"},ti={class:"col-4 field"}
1,ri={class:"col-4 field"},ii={class:"col-12 grid p-fluid"},li={class:"col-4 field"},oi={key:0,class:"col-4 field"},si={key:1,class:"col-4 field"},ai={class:"col-12 grid p-fluid"},ni={class:"col-4 field"},di={key:15,class:"col-12 field"},pi={class:"card shadow-2"},ui={class:"grid p-fluid"},yi={class:"col-12 grid p-fluid"},ci={class:"col-4 field"},mi={class:"col-4 field"},hi={class:"col-4 field"},fi={key:1,class:"pt-3"},gi={key:2,class:"pt-3"},bi={key:3,class:"pt-3"},vi={class:"p-button p-component p-button-primary gis-upload-button mx-2 mb-2"},Ii=a("i",{class:"pi pi-upload mr-2"},null,-1),Ci={class:"p-button-label"},Ti={key:0},Vi={key:2},Di={key:4},Si={key:6},Li={key:4,class:"pt-3"},ki={class:"card mt-5"},Ai={class:"grid p-fluid"},wi={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},_i={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Fi={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Oi={key:5,class:"pt-3"},Pi={key:6,class:"pt-3"},Gi={key:7,class:"pt-3"},zi={key:8,class:"pt-3"},Mi={key:9,class:"pt-3"},Ei={class:"grid p-fluid"},Ui={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},ji={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Bi={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Ri={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},qi={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Hi={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Ni={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Qi={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Ji={class:"col-12 sm:col-6 md:col-4 lg:col-3 field gis-layer-popup--hint-holder"},Zi={class:"col-12 sm:col-6 md:col-4 lg:col-3 field"},Wi={class:"col-6 field"},Ki={class:"col-12 field"},xi={key:0,class:"col-12"},Yi={style:{"min-width":"240px"}},$i={key:0,class:"grid"},Xi={class:"col-12 sm:col-6 field"},el={class:"col-12 sm:col-6 field"},tl={key:1,class:"grid p-fluid"},rl={class:"col-12 field"},il={class:"col-12 field"},ll={key:2},ol={class:"col-12"},sl={class:"grid"},al={class:"col-12 sm:col-6 field"},nl={class:"col-12 sm:col-6 field"},dl={key:1,class:"col-12"},pl={class:"grid"},ul={class:"col-12 sm:col-6 field"},yl={class:"col-12 sm:col-6 field"},cl={key:2,class:"col-12"},ml={style:{"min-width":"240px"}},hl={key:0,class:"grid"},fl={class:"col-12 sm:col-6 field"},gl={class:"col-12 sm:col-6 field"},bl={key:1,class:"grid p-fluid"},vl={class:"col-12 field"},Il={class:"col-12 field"},Cl={key:2},Tl={class:"col-12"},Vl={class:"grid"},Dl={key:0,class:"col-12 sm:col-6 md:col-4 field"},Sl={key:1,class:"col-12 sm:col-6 md:col-4 field"},Ll={key:2,class:"col-12 sm:col-6 md:col-4 field"},kl={key:3,class:"col-12 sm:col-6 md:col-8",style:{padding:".5rem","border-radius":"var(--border-radius)",background:"var(--surface-50)"}},Al={key:0,style:{display:"flex",gap:".1rem"},class:"mb-2"},wl={style:{border:"1px solid var(--surface-100)","border-radius":"var(--border-radius)","background-color":"var(--surface-0)","overflow-x":"auto"}},_l={class:"flex justify-content-between align-items-center",style:{"border-bottom":"1px solid var(--surface-100)",padding:"1rem",gap:".5rem"}},Fl=a("div",{class:"p-2 drag-handle",style:{"background-color":"var(--surface-100)","border-radius":"100%",cursor:"pointer"}},[a("i",{class:"fa fa-hand-paper-o",style:{"font-size":"1.25rem"}})],-1),Ol={key:0,class:"field flex-1"},Pl={key:1,style:{width:"100%"}},Gl={style:{display:"flex",gap:".25rem"}},zl={style:{padding:"1rem"}},Ml={class:"field"},El={key:1,class:"flex justify-content-end mt-2"},Ul={key:4,class:"col-12"},jl={key:10,class:"pt-3"},Bl={class:"grid p-fluid"},Rl={class:"col-12 field"},ql={class:"block text-center font-italic mb-2"},Hl=a("i",{class:"fa fa-info-circle"},null,-1),Nl={key:11,class:"pt-3"},Ql={class:"grid"},Jl={class:"col-12 md:col-4 field"},Zl={class:"col-12 md:col-8 field"},Wl={class:"col-12 field"},Kl={class:"col-12 p-fluid"},xl={class:"grid"},Yl={class:"col-9"},$l={class:"my-2"},Xl={class:"col-3 text-right"},eo={class:"flex justify-content-start"},to={class:"p-input-icon-left"},ro=a("i",{class:"pi pi-search"},null,-1);function io(e,t,o,s,r,i){const y=Re,V=qe,T=c("TextInput"),h=c("TreeSelectInput"),I=c("ListInput"),D=He,w=c("MultiListInput"),z=c("DateInput"),N=c("MultiUpload"),Q=c("BooleanInput"),j=c("NumberInput"),v=c("layer-filters-container"),De=c("LayerStyleComponent"),ie=Ne,C=H,Y=Qe,le=c("DraggableGroup"),oe=c("DraggableAttribute"),Se=c("LayerLabelComponent"),Le=c("LegendCard"),ke=c("LayerZoomSettingsComponent"),Ae=c("LayerLocalizationComponent"),we=c("SpecificationCard"),$=Je,se=c("EditorInput"),X=Ze,B=We,R=c("TreeInput"),_e=c("CodeInput"),Fe=c("DraggableComponent"),Oe=c("SortableTree"),Pe=Ke,ae=xe,Ge=Ye,ze=c("CardViewModal"),Me=c("LegendItemPopup"),Ee=c("SpecificationPopup"),ee=ye("tooltip"),Ue=ye("safe-html");return d(),u(E,null,[n(ze,{onClose:i.close,draggable:!1},{"header-text":b(()=>[k(m(i.modalTitle),1)]),"main-content":b(()=>[n(y,{model:i.tabs,activeIndex:i.activeTabIndex},null,8,["model","activeIndex"]),r.currentTab==="tab-details"?(d(),u("div",fr,[a("div",gr,[a("div",br,[a("label",null,m(e.$t("Layer description")),1),n(V,{modelValue:r.layer.description,"onUpdate:modelValue":t[0]||(t[0]=l=>r.layer.description=l),autoResize:!0,rows:"5",onBlur:t[1]||(t[1]=l=>r.layer.description=e.$purify.sanitize(r.layer.description))},null,8,["modelValue"])]),a("div",vr,[n(T,{label:e.$t("Layer name"),modelValue:r.layer.title,"onUpdate:modelValue":t[2]||(t[2]=l=>r.layer.title=l),error:s.v$?.layer?.title?.$errors,invalid:s.v$?.layer?.title?.$errors?.length}
1,null,8,["label","modelValue","error","invalid"])]),a("div",Ir,[n(h,{label:e.$t("Department"),options:r.organizations,modelValue:r.layer.organizationId,"onUpdate:modelValue":t[3]||(t[3]=l=>r.layer.organizationId=l),placeholder:e.$t("Department"),"id-key":"organizationId","label-key":"title","model-type":"id",onChange:i.onDepartmentChange,error:s.v$?.layer?.organizationId?.$errors,invalid:s.v$?.layer?.organizationId?.$errors?.length},null,8,["label","options","modelValue","placeholder","onChange","error","invalid"])]),a("div",Cr,[n(h,{label:e.$t("Parent"),modelValue:r.layer.parentDocumentId,"onUpdate:modelValue":t[4]||(t[4]=l=>r.layer.parentDocumentId=l),options:r.projects,placeholder:e.$t("Choose option..."),"id-key":"documentId","label-key":"title","model-type":"id",onChange:i.setParentLocalization},null,8,["label","modelValue","options","placeholder","onChange"]),r.layer.organizationId?p("",!0):(d(),u("small",Tr,m(e.$t("Select a department first...")),1))]),a("div",Vr,[n(h,{label:e.$t("Category"),modelValue:r.layer.documentCategory,"onUpdate:modelValue":t[5]||(t[5]=l=>r.layer.documentCategory=l),options:r.layerCategories,placeholder:e.$t("Choose option..."),"id-key":"documentCategoryId","label-key":"title","model-type":"object",onChange:i.documentCategoryChanged,error:s.v$?.layer?.documentCategory?.$errors,invalid:s.v$?.layer?.documentCategory?.$errors?.length},null,8,["label","modelValue","options","placeholder","onChange","error","invalid"])]),!i.isOffline&&!i.isDataSourceCollection?(d(),u("div",Dr,[n(h,{label:e.$t("Type"),modelValue:r.layer.documentType,"onUpdate:modelValue":t[6]||(t[6]=l=>r.layer.documentType=l),options:i.layerTypes,placeholder:e.$t("Choose option..."),"id-key":"documentTypeId","label-key":"title","model-type":"object"},null,8,["label","modelValue","options","placeholder"])])):p("",!0),r.layer.documentCategory&&!i.isDrawable&&i.isDataView?(d(),u("div",Sr,[n(h,{label:e.$t("Source"),modelValue:r.layer.relatedDocumentId,"onUpdate:modelValue":t[7]||(t[7]=l=>r.layer.relatedDocumentId=l),options:i.sourceOptions,placeholder:e.$t("Choose option..."),"id-key":"documentId","label-key":"title","model-type":"id",disabled:i.isDataView&&o.sourceLayer,onChange:i.onSourceDocumentChanged,"selection-mode":"single"},null,8,["label","modelValue","options","placeholder","disabled","onChange"])])):p("",!0),r.layer.documentCategory?.documentCategoryId===296?(d(),u("div",Lr,[n(I,{label:e.$t("Form category"),modelValue:i.formCategoryDataSource,"onUpdate:modelValue":t[8]||(t[8]=l=>i.formCategoryDataSource=l),options:r.formCategories,"option-label":"title","option-value":"documentCategoryId","id-key":"documentCategoryId",onChange:e.onFormCategoryChange},null,8,["label","modelValue","options","onChange"])])):p("",!0),r.layer.documentCategory?.documentCategoryId===296?(d(),u("div",kr,[n(I,{label:e.$t("Form type"),modelValue:i.formTypeDataSource,"onUpdate:modelValue":t[9]||(t[9]=l=>i.formTypeDataSource=l),options:i.formTypes,"option-label":"title","option-value":"documentTypeId","id-key":"documentTypeId"},null,8,["label","modelValue","options"])])):p("",!0),i.isDrawable||i.isDataView?(d(),u("div",Ar,[r.shapeTypeIsVisible?(d(),g(h,{key:0,label:e.$t("Shape type"),modelValue:r.layer.properties.shapeType,"onUpdate:modelValue":t[10]||(t[10]=l=>r.layer.properties.shapeType=l),options:r.shapeTypes,placeholder:e.$t("Choose option..."),"id-key":"shapeTypeId","label-key":"title","model-type":"object",onChange:i.shapeTypeChanged,disabled:i.isDataView||o.sourceLayer,error:s.v$?.layer?.properties?.shapeType?.$errors,invalid:s.v$?.layer?.properties?.shapeType?.$errors?.length&&r.layer.documentCategory?.documentCategoryId!==136},null,8,["label","modelValue","options","placeholder","onChange","disabled","error","invalid"])):p("",!0)])):p("",!0),r.layer.documentCategory&&!i.isFolder&&!i.isDataSourceCollection?(d(),u("div",wr,[a("label",null,m(e.$t("View as tiles")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:i.localDataSource,"onUpdate:modelValue":t[11]||(t[11]=l=>i.localDataSource=l),disabled:i.isOffline},null,8,["onLabel","offLabel","modelValue","disabled"])])):p("",!0),r.layer.documentCategory&&!i.isFolder&&!i.isDataSourceCollection?(d(),u("div",_r,[a("label",null,m(e.$t("View as centroid")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:i.centroidDataSource,"onUpdate:modelValue":t[12]||(t[12]=l=>i.centroidDataSource=l)},null,8,["onLabel","offLabel","modelValue"])])):p("",!0),i.isTileService?(d(),u("div",Fr,[n(T,{label:e.$t("Tiles URL"),modelValue:i.urlDataSource,"onUpdate:modelValue":t[13]||(t[13]=l=>i.urlDataSource=l)},null,8,["label","modelValue"])])):p("",!0),i.isTileService?(d(),u("div",Or,[n(T,{label:e.$t("Header"),modelValue:i.headerDataSource,"onUpdate:modelValue":t[14]||(t[14]=l=>i.headerDataSource=l)},null,8,["label","modelValue"])])):p("",!0),i.isRasterDem?(d(),u("div",Pr,[n(T,{label:e.$t("Resource URL"),modelValue:r.layer.properties.originalResourceUrl,"onUpdate:modelValue":t[15]||(t[15]=l=>r.layer.properties.originalResourceUrl=l)},null,8,["label","modelValue"])])):p("",!0),i.isRasterDem?(d(),u("div",Gr,[n(T,{label:e.$t("Dem Projection"),modelValue:r.layer.properties.originalResourceProjection,"onUpdate:modelValue":t[16]||(t[16]=l=>r.layer.properties.originalResourceProjection=l)},null,8,["label","modelValue"])])):p("",!0),i.isRasterVideo||i.isRasterImage?(d(),u("div",zr,[n(T,{label:e.$t("Coordinates"),modelValue:i.coordinatesDataSource,"onUpdate:modelValue":t[17]||(t[17]=l=>i.coordinatesDataSource=l)},null,8,["label","modelValue"])])):p("",!0),r.layer.documentCategory&&i.isDrawable&&i.isVectorTiles&&
1!(r.layer.properties&&r.layer.properties.dataSource&&r.layer.properties.dataSource.isTiles)?(d(),u("div",Mr,[n(T,{label:e.$t("Layer"),modelValue:r.layer.properties.dataSource.sourceLayer,"onUpdate:modelValue":t[18]||(t[18]=l=>r.layer.properties.dataSource.sourceLayer=l)},null,8,["label","modelValue"])])):p("",!0),r.layer.documentCategory&&r.layer.documentCategory.documentCategoryId===r.documentsCollection&&i.documentsQuery?(d(),u("div",Er,[a("label",null,m(e.$t("Document queries")),1),a("div",Ur,[a("div",jr,[a("div",Br,[a("div",Rr,[n(w,{label:e.$t("Document categories"),modelValue:i.documentsQuery.documentCategoryIds,"onUpdate:modelValue":t[19]||(t[19]=l=>i.documentsQuery.documentCategoryIds=l),options:i.documentCategories,optionLabel:"title",optionValue:"documentCategoryId","id-key":"documentCategoryId"},null,8,["label","modelValue","options"])]),a("div",qr,[n(w,{label:e.$t("Document types"),modelValue:i.documentsQuery.documentTypeIds,"onUpdate:modelValue":t[20]||(t[20]=l=>i.documentsQuery.documentTypeIds=l),options:i.documentTypes,optionLabel:"title",optionValue:"documentTypeId","id-key":"documentTypeId"},null,8,["label","modelValue","options"])]),a("div",Hr,[n(w,{label:e.$t("Statuses"),modelValue:i.documentsQuery.statusIds,"onUpdate:modelValue":t[21]||(t[21]=l=>i.documentsQuery.statusIds=l),options:r.statuses,optionLabel:"title",optionValue:"statusId","id-key":"statusId"},null,8,["label","modelValue","options"])])]),a("div",Nr,[a("div",Qr,[n(I,{label:e.$t("Interval"),modelValue:i.documentsQuery.intervalTypeId,"onUpdate:modelValue":t[22]||(t[22]=l=>i.documentsQuery.intervalTypeId=l),options:r.intervalTypes,optionLabel:"title",optionValue:"intervalTypeId","id-key":"intervalTypeId"},null,8,["label","modelValue","options"])]),i.documentsQuery.intervalTypeId===8?(d(),u("div",Jr,[n(z,{modelValue:i.documentsQuery.startDate,"onUpdate:modelValue":t[23]||(t[23]=l=>i.documentsQuery.startDate=l),placeholder:e.$t("Start date"),label:e.$t("Start date")},null,8,["modelValue","placeholder","label"])])):p("",!0),i.documentsQuery.intervalTypeId===8?(d(),u("div",Zr,[n(z,{modelValue:i.documentsQuery.endDate,"onUpdate:modelValue":t[24]||(t[24]=l=>i.documentsQuery.endDate=l),placeholder:e.$t("End date"),label:e.$t("End date")},null,8,["modelValue","placeholder","label"])])):p("",!0)]),a("div",Wr,[a("div",Kr,[n(w,{label:e.$t("Departments"),modelValue:i.documentsQuery.departmentIds,"onUpdate:modelValue":t[25]||(t[25]=l=>i.documentsQuery.departmentIds=l),options:r.departments,optionLabel:"title",optionValue:"organizationId","id-key":"organizationId"},null,8,["label","modelValue","options"])]),a("div",xr,[a("label",null,m(e.$t("Reference layer's geometries")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:i.documentsQuery.referenceLayerGeometries,"onUpdate:modelValue":t[26]||(t[26]=l=>i.documentsQuery.referenceLayerGeometries=l)},null,8,["onLabel","offLabel","modelValue"])])])])])])):p("",!0),r.layer.documentCategory&&r.layer.documentCategory.documentCategoryId===r.organizationsCollection&&i.documentsQuery?(d(),u("div",Yr,[a("label",null,m(e.$t("Organization queries")),1),a("div",$r,[a("div",Xr,[a("div",ei,[a("div",ti,[n(w,{label:e.$t("Organization categories"),modelValue:i.documentsQuery.organizationCategoryIds,"onUpdate:modelValue":t[27]||(t[27]=l=>i.documentsQuery.organizationCategoryIds=l),options:r.nestedOrganizationCategories,optionLabel:"title",optionValue:"organizationCategoryId","id-key":"organizationCategoryId"},null,8,["label","modelValue","options"])]),a("div",ri,[n(w,{label:e.$t("Organizations types"),modelValue:i.documentsQuery.organizationTypeIds,"onUpdate:modelValue":t[28]||(t[28]=l=>i.documentsQuery.organizationTypeIds=l),options:i.nestedOrganizationTypes,optionLabel:"title",optionValue:"organizationTypeId","id-key":"organizationTypeId"},null,8,["label","modelValue","options"])])]),a("div",ii,[a("div",li,[n(I,{label:e.$t("Interval"),modelValue:i.documentsQuery.intervalTypeId,"onUpdate:modelValue":t[29]||(t[29]=l=>i.documentsQuery.intervalTypeId=l),options:r.intervalTypes,optionLabel:"title",optionValue:"intervalTypeId","id-key":"intervalTypeId"},null,8,["label","modelValue","options"])]),i.documentsQuery.intervalTypeId===8?(d(),u("div",oi,[n(z,{modelValue:i.documentsQuery.startDate,"onUpdate:modelValue":t[30]||(t[30]=l=>i.documentsQuery.startDate=l),placeholder:e.$t("Start date"),label:e.$t("Start date")},null,8,["modelValue","placeholder","label"])])):p("",!0),i.documentsQuery.intervalTypeId===8?(d(),u("div",si,[n(z,{modelValue:i.documentsQuery.endDate,"onUpdate:modelValue":t[31]||(t[31]=l=>i.documentsQuery.endDate=l),placeholder:e.$t("End date"),label:e.$t("End date")},null,8,["modelValue","placeholder","label"])])):p("",!0)]),a("div",ai,[a("div",ni,[n(w,{label:e.$t("Departments"),modelValue:i.documentsQuery.departmentIds,"onUpdate:modelValue":t[32]||(t[32]=l=>i.documentsQuery.departmentIds=l),options:r.departments,optionLabel:"title",optionValue:"organizationId","id-key":"organizationId"},null,8,["label","modelValue","options"])])])])])])):p("",!0),i.isDeckglLayer?(d(),u("div",di,[a("div",pi,[a("div",ui,[a("div",yi,[a("div",ci,[n(N,{label:e.$t("3d Model"),modelValue:r.layer.properties.model3d,"onUpdate:modelValue":t[33]||(t[33]=l=>r.layer.properties.model3d=l),"is-multiple":!1,document:r.layer,"accepted-mime-types":"image/glb,image/gltf"},null,8,["label","modelValue","document"])]),a("div",mi,[n(Q,{label:e.$t("Scale by zoom"),modelValue:r.layer.properties.scaleByZoom,"onUpdate:modelValue":t[34]||(t[34]=l=>r.layer.properties.scaleByZoom=l)},null,8,["label","modelValue"])]),a("div",hi,[n(j,{label:e.$t("Scale size"),modelValue:r.layer.properties.sizeScale,"onUpdate:modelValue":t[35]||(t[35]=l=>r.layer.properties.sizeScale=l),min:0},null,8,["label","modelValue"])])])])])])):p("",!0)])])):p("",!0),r.currentTab==="tab-filters"&&r.layer.properties.filters?(d(),u("div",fi,[n(v,{dataFilters:r.layer.properties.filters,attributes:r.layer.properties.header},null,8,["dataFilters","attributes"])])):p("",!0),r.currentTab==="tab-style"?(
1d(),u("div",gi,[r.styleFields?(d(),g(De,{key:0,"style-heatmap-fields":r.styleHeatmapFields,"style-fields":r.styleFields,layer:r.layer},null,8,["style-heatmap-fields","style-fields","layer"])):(d(),g(ie,{key:1,severity:"info"},{default:b(()=>[k(m(e.$t("Select shape type first, to see the options here.")),1)]),_:1}))])):p("",!0),r.currentTab==="tab-attributes"?(d(),u("div",bi,[n(C,{icon:"pi pi-plus",severity:"success",onClick:i.addAttribute,label:e.$t("Create attribute"),class:"btn1 mb-2"},null,8,["onClick","label"]),n(C,{icon:"pi pi-plus",severity:"success",onClick:i.addGroup,label:e.$t("Create group"),class:"ml-2 mb-2"},null,8,["onClick","label"]),this.data&&(!r.layer.properties.header||!Object.keys(r.layer.properties.header).length)?(d(),g(C,{key:0,onClick:i.importHeaderFromGeometries,label:e.$t("Import from geometries"),class:"ml-2 mb-2",icon:"pi pi-upload"},null,8,["onClick","label"])):p("",!0),a("label",vi,[Ii,a("span",Ci,m(e.$t("Import from .json")),1),a("input",{type:"file",accept:"application/json",onChange:t[36]||(t[36]=l=>i.importFromJson(l,"attributes"))},null,32)]),n(C,{label:e.$t("Export to .json"),icon:"pi pi-download",onClick:t[37]||(t[37]=l=>i.exportToJson("attributes")),class:"p-button-primary mr-2 mb-2"},null,8,["label"]),n(C,{severity:"info",label:e.$t("Import from meta data"),icon:"pi pi-upload",onClick:i.openMetaDataImport,class:"p-button-primary mr-2 mb-2"},null,8,["label","onClick"]),n(C,{severity:"info",label:e.$t("Inserează atribut"),icon:"pi pi-copy",onClick:i.pasteAttribute,class:"p-button-primary mr-2 mb-2"},null,8,["label","onClick"]),n(C,{severity:"info",label:e.$t("Inserează grup"),icon:"pi pi-copy",onClick:i.pasteGroup,class:"p-button-primary mr-2 mb-2"},null,8,["label","onClick"]),n(Y),a("div",null,[r.commonAttributesGroupArray.length?(d(),u("h5",Ti,m(e.$t("Common groups")),1)):p("",!0),r.commonAttributesGroupArray.length>0?(d(),g(le,{key:1,groups:r.commonAttributesGroupArray,onViewAttribute:t[38]||(t[38]=l=>i.editAttribute(l,!0)),disabled:""},null,8,["groups"])):p("",!0),r.commonAttributesArray.length?(d(),u("h5",Vi,m(e.$t("Common attributes")),1)):p("",!0),r.commonAttributesArray.length>0?(d(),g(oe,{key:3,attributes:r.commonAttributesArray,"meta-attributes":r.standardAttributes,onViewAttribute:t[39]||(t[39]=l=>i.editAttribute(l,!0)),disabled:""},null,8,["attributes","meta-attributes"])):p("",!0),r.attributesGroupArray.length?(d(),u("h5",Di,m(e.$t("Groups")),1)):p("",!0),r.attributesGroupArray.length>0?(d(),g(le,{key:5,groups:r.attributesGroupArray,"meta-attributes":r.standardAttributes,onEditGroup:i.editGroup,onDeleteGroup:i.deleteGroup,onEditAttribute:i.editAttribute,onDeleteAttribute:i.deleteAttribute,onCopyAttribute:i.copyAttribute,onCopyAttributeGroup:i.copyAttributeGroup},null,8,["groups","meta-attributes","onEditGroup","onDeleteGroup","onEditAttribute","onDeleteAttribute","onCopyAttribute","onCopyAttributeGroup"])):p("",!0),r.attributesArray.length?(d(),u("h5",Si,m(e.$t("Ungrouped attributes")),1)):p("",!0),r.attributesArray.length>0?(d(),g(oe,{key:7,attributes:r.attributesArray,"meta-attributes":r.standardAttributes,onEditAttribute:i.editAttribute,onCopyAttribute:i.copyAttribute,onDeleteAttribute:i.deleteAttribute},null,8,["attributes","meta-attributes","onEditAttribute","onCopyAttribute","onDeleteAttribute"])):p("",!0)])])):p("",!0),r.currentTab==="tab-label"?(d(),u("div",Li,[r.labelFields?(d(),g(Se,{key:0,"label-fields":r.labelFields,layer:r.layer},null,8,["label-fields","layer"])):p("",!0),a("div",ki,[a("div",Ai,[a("div",wi,[n(j,{label:e.$t("Label min zoom"),modelValue:r.layer.properties.label.minzoom,"onUpdate:modelValue":t[40]||(t[40]=l=>r.layer.properties.label.minzoom=l),min:0,max:24,step:1},null,8,["label","modelValue"])]),a("div",_i,[n(j,{label:e.$t("Label max zoom"),modelValue:r.layer.properties.label.maxzoom,"onUpdate:modelValue":t[41]||(t[41]=l=>r.layer.properties.label.maxzoom=l),min:0,max:24,step:1},null,8,["label","modelValue"])]),a("div",Fi,[a("label",null,m(e.$t("Force centered label")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:r.layer.properties.settings.forceCenteredLabel,"onUpdate:modelValue":t[42]||(t[42]=l=>r.layer.properties.settings.forceCenteredLabel=l)},null,8,["onLabel","offLabel","modelValue"])])])])])):p("",!0),r.currentTab==="tab-legend"?(d(),u("div",Oi,[n(C,{icon:"pi pi-plus",severity:"success",label:e.$t("Create item"),class:"mr-1 mb-2",onClick:t[43]||(t[43]=l=>i.openLegendItemPopup(!1))},null,8,["label"]),n(C,{icon:"pi pi-plus",severity:"success",label:e.$t("Create group"),class:"mr-1 mb-2",onClick:t[44]||(t[44]=l=>i.openLegendItemPopup(!0))},null,8,["label"]),r.layer.properties&&r.layer.properties.styleRules&&r.layer.properties.styleRules.length?(d(),g(C,{key:0,label:e.$t("Import from expressions"),class:"mr-1 mb-2",onClick:t[45]||(t[45]=l=>i.askImportLegend("rules")),icon:"pi pi-upload"},null,8,["label"])):r.layer.properties&&r.layer.properties.style&&Object.keys(r.layer.properties.style).length?(d(),g(C,{key:1,label:e.$t("Import from style"),class:"mr-1 mb-2",onClick:t[46]||(t[46]=l=>i.askImportLegend("style")),icon:"pi pi-upload"},null,8,["label"])):p("",!0),n(Y),n(Le,{children:r.layer.properties.legend,layer:r.layer,onDelete:i.deleteLegendItem,onEdit:i.editLegendItem},null,8,["children","layer","onDelete","onEdit"])])):p("",!0),r.currentTab==="tab-settings"?(d(),u("div",Pi,[n(ke,{layer:r.layer},null,8,["layer"])])):p("",!0),r.currentTab==="tab-localization"?(d(),u("div",Gi,[n(Ae,{layer:r.layer},null,8,["layer"])])):p("",!0),r.currentTab==="tab-specifications"?(d(),u("div",zi,[n(C,{icon:"pi pi-plus",severity:"success",label:e.$t("Create item"),class:"mr-1",onClick:t[47]||(t[47]=l=>i.openSpecificationPopup(!1))},null,8,["label"]),n(C,{icon:"pi pi-plus",severity:"success",label:e.$t("Create group"),class:"mr-1",onClick:t[48]||(t[48]=l=>i.openSpecificationPopup(!0))},null,8,["label"]),n(Y),n(we,{children:r.layer.properties.specifications,layer:r.layer,onDelete:i.deleteSpecificationItem,onEdit:i.editSpecificationItem},null,8,["children","layer","onDelete","onEdit"])])):p("",!0),r.currentTab==="tab-properties"?(d(),u("div",Mi,[a("div",Ei,[a("div",Ui,[a("label",null,m(e.$t("Private layer")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:r.layer.isPrivate,"onUpdate:modelValue":t[49]||(t[49]=l=>r.layer.isPrivate=l)},null,8,["onLabel","offLabel","modelValue"])]),W((d(),u("div",ji,[a("label",null,m(e.$t("Automatic child load")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:i.layerConfigs.automaticallyLoadChildren,"onUpdate:modelValue":t[50]||(t[50]=l=>i.layerConfigs.automaticallyLoadChildren=l)},null,8,["onLabel","offLabel","modelValue"])])),[[ee,e.$t("Automatically load the child layers"),void 0,{bottom:!0}]]),a("div",Bi,[a("label",null,m(e.$t("Indoor view")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:i.layerConfigs.indoorView,"onUpdate:modelValue":t[51]||(t[51]=l=>i.layerConfigs.indoorView=l)},null,8,["onLabel","offLabel","modelValue"])]),a("div",Ri,[a("label",null,m(e.$t("Hover info")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:r.layer.properties.hoverInfo,"onUpdate:modelValue":t[52]||(t[52]=l=>r.layer.properties.hoverInfo=l)},null,8,["onLabel","offLabel","modelValue"])]),W((d(),u("div",qi,[a("label",null,m(e.$t("Action on children")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:r.layer.properties.toggleChildren,"onUpdate:modelValue":t[53]||(t[53]=l=>r.layer.properties.toggleChildren=l)},null,8,["onLabel","offLabel","modelValue"])])),[[ee,e.$t("Apply the toggleable action to all children"),void 0,{bottom:!0}]]),a("div",Hi,[a("label",null,m(e.$t("Disable feature selection")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:r.layer.properties.disableFeatureSelection,"onUpdate:modelValue":t[54]||(t[54]=l=>r.layer.properties.disableFeatureSelection=l)},null,8,["onLabel","offLabel","modelValue"])]),a("div",Ni,[a("label",null,m(e.$t("Avoid user boundary")),1),n(D,{onLabel:e.$t("yes"),offLabel:e.$t("no"),modelValue:r.layer.properties.avoidUserBoundary,"onUpdate:modelValue":t[55]||(t[55]=l=>r.layer.properties.avoidUserBoundary=l)},null,8,["onLabel","offLabel","modelValue"])]),a("div",Qi,[n(T,{label:e.$t("Label displayed at the intersection"),modelValue:r.layer.properties.intersectionLabel,"onUpdate:modelValue":t[56]||(t[56]=l=>r.layer.properties.intersectionLabel=l)},null,8,["label","modelValue"]),W(a("small",null,null,512),[[Ue,"ex: ${properties.NumeAtribut} ${properties['Nume Atribut 2']"]])]),a("div",Ji,[n(I,{label:e.$t("On geometry click, open in"),modelValue:i.layerConfigs.onGeometryClickOpenIn,"onUpdate:modelValue":t[57]||(t[57]=l=>i.layerConfigs.onGeometryClickOpenIn=l),options:["sidebar","modal","popup","map_popup","floating",""]},null,8,["label","modelValue"]),i.layerConfigs.onGeometryClickOpenIn=="floating"?W((d(),g(C,{key:0,icon:"pi pi-question-circle",class:"p-button-text gis-layer-popup--hint-btn"},null,512)),[[ee,`${e.$t("Bottom sheet floating attributes.")}`]]):p("",!0)]),a("div",Zi,[/point/gi.test(r.layer?.properties?.shapeType?.title)?(d(),u(E,{key:1},[n(Q,{label:e.$t("Without selection mode icon"),modelValue:r.layer.properties.withoutSelectionIcon,"onUpdate:modelValue":t[59]||(t[59]=l=>r.layer.properties.withoutSelectionIcon=l)},null,8,["label","modelValue"]),r.layer.properties.withoutSelectionIcon?p("",!0):(d(),g(N,{key:0,label:e.$t("Selection mode icon"),modelValue:r.layer.properties.selection,"onUpdate:modelValue":t[60
1]||(t[60]=l=>r.layer.properties.selection=l),"is-multiple":!1,document:r.layer,"accepted-mime-types":"image/png,image/jpg,image/jpeg,image/gif"},null,8,["label","modelValue","document"]))],64)):(d(),g(I,{key:0,label:e.$t("Selection mode"),placeholder:e.$t("Fill"),modelValue:r.layer.properties.selection,"onUpdate:modelValue":t[58]||(t[58]=l=>r.layer.properties.selection=l),options:r.selectionModes,"option-label":"title","option-value":"value"},null,8,["label","placeholder","modelValue","options"]))]),a("div",Wi,[r.layer?.documentCategory?.documentCategoryId===r.heatmapCategory?(d(),g(I,{key:0,label:e.$t("Attribute"),modelValue:r.layer.properties.heatmapAttribute,"onUpdate:modelValue":t[61]||(t[61]=l=>r.layer.properties.heatmapAttribute=l),options:r.attributesArray,"transform-to-tree":!1,"option-label":"title","option-value":"title"},null,8,["label","modelValue","options"])):p("",!0)]),a("div",Ki,[n(w,{label:e.$t("Select metadata to filter child layers"),modelValue:i.layerConfigs.filterBy,"onUpdate:modelValue":t[62]||(t[62]=l=>i.layerConfigs.filterBy=l),options:r.standardAttributes,optionLabel:"title",optionValue:"attributeId","id-key":"attributeId"},null,8,["label","modelValue","options"])]),r.layer.properties.hoverInfo?(d(),u("div",xi,[n(B,{pt:{content:{style:"border: 1px solid var(--surface-50); border-top: none; padding: .5rem;"}},header:e.$t("Hover settings")},{icons:b(()=>[a("div",Yi,[n($,{modelValue:r.layer.properties.hoverInfoType,"onUpdate:modelValue":t[63]||(t[63]=l=>r.layer.properties.hoverInfoType=l),options:r.hoverInfoTypes,optionValue:"value",optionLabel:"name"},null,8,["modelValue","options"])])]),default:b(()=>[r.layer.properties.hoverInfoType==="form"?(d(),u("div",$i,[a("div",Xi,[n(I,{label:e.$t("Document category"),modelValue:r.layer.properties.documentCategory,"onUpdate:modelValue":t[64]||(t[64]=l=>r.layer.properties.documentCategory=l),options:i.formDocCategories,"option-label":"title","id-key":"documentCategoryId",error:s.v$?.layer?.properties?.documentCategory?.$errors,invalid:s.v$?.layer?.properties?.documentCategory?.$errors?.length,onChange:t[65]||(t[65]=l=>r.layer.properties.documentType=null)},null,8,["label","modelValue","options","error","invalid"])]),a("div",el,[n(I,{label:e.$t("Document type"),modelValue:r.layer.properties.documentType,"onUpdate:modelValue":t[66]||(t[66]=l=>r.layer.properties.documentType=l),options:i.formDocTypes,"option-label":"title","id-key":"documentTypeId",error:s.v$?.layer?.properties?.documentType?.$errors,invalid:s.v$?.layer?.properties?.documentType?.$errors?.length},null,8,["label","modelValue","options","error","invalid"])])])):r.layer.properties.hoverInfoType==="custom"?(d(),u("div",tl,[a("div",rl,[n(T,{label:e.$t("Header"),modelValue:r.layer.properties.hoverInfoHeader,"onUpdate:modelValue":t[67]||(t[67]=l=>r.layer.properties.hoverInfoHeader=l)},null,8,["label","modelValue"])]),a("div",il,[n(se,{label:e.$t("Body"),modelValue:r.layer.properties.hoverInfoBody,"onUpdate:modelValue":t[68]||(t[68]=l=>r.layer.properties.hoverInfoBody=l)},null,8,["label","modelValue"])])])):(d(),u("div",ll,[n(X,{closable:!1},{default:b(()=>[k(m(e.$t("Will display all attributes automatically.")),1)]),_:1})]))]),_:1},8,["pt","header"])])):p("",!0),a("div",ol,[n(B,{pt:{content:{style:"border: 1px solid var(--surface-50); border-top: none; padding: .5rem;"}},header:e.$t("Edit feature override")},{default:b(()=>[a("div",sl,[a("div",al,[n(I,{label:e.$t("Document category"),modelValue:r.layer.properties.featureEditOverride.documentCategory,"onUpdate:modelValue":t[69]||(t[69]=l=>r.layer.properties.featureEditOverride.documentCategory=l),options:i.formDocCategories,"option-label":"title","id-key":"documentCategoryId",onChange:t[70]||(t[70]=l=>r.layer.properties.featureEditOverride.documentType=null)},null,8,["label","modelValue","options"])]),a("div",nl,[n(I,{label:e.$t("Document type"),modelValue:r.layer.properties.featureEditOverride.documentType,"onUpdate:modelValue":t[71]||(t[71]=l=>r.layer.properties.featureEditOverride.documentType=l),options:i.FEFormDocTypes,"option-label":"title","id-key":"documentTypeId"},null,8,["label","modelValue","options"])])])]),_:1},8,["pt","header"])]),r.layer.properties.layerViewInfo?(d(),u("div",dl,[n(B,{pt:{content:{style:"border: 1px solid var(--surface-50); border-top: none; padding: .5rem;"}},header:e.$t("Layer info settings")},{default:b(()=>[a("div",pl,[a("div",ul,[n(I,{label:e.$t("Document category"),modelValue:r.layer.properties.layerViewInfo.documentCategory,"onUpdate:modelValue":t[72]||(t[72]=l=>r.layer.properties.layerViewInfo.documentCategory=l),options:i.formDocCategories,"option-label":"title","id-key":"documentCategoryId",onChange:t[73]||(t[73]=l=>r.layer.properties.layerViewInfo.documentType=null)},null,8,["label","modelValue","options"])]),a("div",yl,[n(I,{label:e.$t("Document type"),modelValue:r.layer.properties.layerViewInfo.documentType,"onUpdate:modelValue":t[74]||(t[74]=l=>r.layer.properties.layerViewInfo.documentType=l),options:i.LVFormDocTypes,"option-label":"title","id-key":"documentTypeId"},null,8,["label","modelValue","options"])])])]),_:1},8,["pt","header"])])):p("",!0),r.layer.properties.featureViewInfo?(d(),u("div",cl,[n(B,{pt:{content:{style:"border: 1px solid var(--surface-50); border-top: none; padding: .5rem;"}},header:e.$t("View info settings")},{icons:b(()=>[a("div",ml,[n($,{modelValue:r.layer.properties.featureViewInfo.type,"onUpdate:modelValue":t[75]||(t[75]=l=>r.layer.properties.featureViewInfo.type=l),options:r.hoverInfoTypes,optionValue:"value",optionLabel:"name"},null,8,["modelValue","options"])])]),default:b(()=>[r.layer.properties.featureViewInfo.type==="form"?(d(),u("div",hl,[a("div",fl,[n(I,{label:e.$t("Document category"),modelValue:r.layer.properties.featureViewInfo.documentCategory,"onUpdate:modelValue":t[76]||(t[76]=l=>r.layer.properties.featureViewInfo.documentCategory=l),options:i.formDocCategories,"option-label":"title","id-key":"documentCategoryId",error:s.v$?.layer?.properties?.featureViewInfo?.documentCategory?.$errors,invalid:s.v$?.layer?.properties?.featureViewInfo?.documentCategory?.$errors?.length,onChange:t[77]||(t[77]=l=>r.layer.properties.featureViewInfo.documentType=null)}
1,null,8,["label","modelValue","options","error","invalid"])]),a("div",gl,[n(I,{label:e.$t("Document type"),modelValue:r.layer.properties.featureViewInfo.documentType,"onUpdate:modelValue":t[78]||(t[78]=l=>r.layer.properties.featureViewInfo.documentType=l),options:i.FVFormDocTypes,"option-label":"title","id-key":"documentTypeId",error:s.v$?.layer?.properties?.featureViewInfo?.documentType?.$errors,invalid:s.v$?.layer?.properties?.featureViewInfo?.documentType?.$errors?.length},null,8,["label","modelValue","options","error","invalid"])])])):r.layer.properties.featureViewInfo.type==="custom"?(d(),u("div",bl,[a("div",vl,[n(T,{label:e.$t("Header"),modelValue:r.layer.properties.featureViewInfo.header,"onUpdate:modelValue":t[79]||(t[79]=l=>r.layer.properties.featureViewInfo.header=l)},null,8,["label","modelValue"])]),a("div",Il,[n(se,{label:e.$t("Body"),modelValue:r.layer.properties.featureViewInfo.body,"onUpdate:modelValue":t[80]||(t[80]=l=>r.layer.properties.featureViewInfo.body=l)},null,8,["label","modelValue"])])])):(d(),u("div",Cl,[n(X,{closable:!1},{default:b(()=>[k(m(e.$t("Will display all attributes automatically.")),1)]),_:1})]))]),_:1},8,["pt","header"])])):p("",!0),a("div",Tl,[n(B,{pt:{content:{style:"border: 1px solid var(--surface-50); border-top: none; padding: .5rem; padding-bottom: 0;"}},header:e.$t("Override geometries retrieval")},{icons:b(()=>[n($,{modelValue:r.layer.properties.overrideGeometriesType,"onUpdate:modelValue":t[81]||(t[81]=l=>r.layer.properties.overrideGeometriesType=l),options:r.geometriesOverrideType,optionValue:"value",optionLabel:"name"},null,8,["modelValue","options"])]),default:b(()=>[a("div",Vl,[r.layer.properties.overrideGeometriesType==="schema"?(d(),u("div",Dl,[n(R,{label:e.$t("Schema"),options:r.schemaOptions,modelValue:r.layer.properties.schemaId,"onUpdate:modelValue":t[82]||(t[82]=l=>r.layer.properties.schemaId=l),"item-key":"schemaId","label-key":"(${schemaId}) ${title}","is-multi":!1,"model-type":"id","model-schema":["schemaId","title"],"is-loading":r.isSearchingSchemas,async:!0,onFilter:i.getSchemas,"selected-label-pattern":"(${schemaId}) ${title}"},null,8,["label","options","modelValue","is-loading","onFilter"])])):r.layer.properties.overrideGeometriesType==="dataset"?(d(),u("div",Sl,[n(R,{label:e.$t("Dataset"),options:r.datasetOptions,modelValue:r.layer.properties.datasetId,"onUpdate:modelValue":[t[83]||(t[83]=l=>r.layer.properties.datasetId=l),i.selectDataset],"item-key":"documentId","label-key":"(${documentId}) ${title}","is-multi":!1,"model-type":"id","model-schema":["documentId","title"],"is-loading":r.isSearchingDatasets,async:!0,onFilter:i.getDatasets,"selected-label-pattern":"(${documentId}) ${title}"},null,8,["label","options","modelValue","is-loading","onFilter","onUpdate:modelValue"])])):r.layer.properties.overrideGeometriesType==="process"?(d(),u("div",Ll,[n(R,{label:e.$t("Process"),options:r.processOptions,modelValue:r.layer.properties.processId,"onUpdate:modelValue":t[84]||(t[84]=l=>r.layer.properties.processId=l),"item-key":"documentId","label-key":"(${documentId}) ${title}","is-multi":!1,"model-type":"id","model-schema":["documentId","title"],"is-loading":r.isSearchingProcesses,async:!0,onFilter:i.getProcesses,"selected-label-pattern":"(${documentId}) ${title}"},null,8,["label","options","modelValue","is-loading","onFilter"])])):p("",!0),["dataset","schema","process"].includes(r.layer.properties.overrideGeometriesType)?(d(),u("div",kl,[r.layer.properties.overrideGeometriesType==="schema"?(d(),u("div",Al,[n(C,{onClick:t[85]||(t[85]=l=>r.copyItems(r.layer.properties.geometriesOverrideParams.map(F=>({key:F.key,value:F.value})),"param")),severity:"primary",icon:"fa fa-copy",size:"small",label:e.$t("Copy parameters")},null,8,["label"]),n(C,{onClick:t[86]||(t[86]=l=>r.pasteItems(e.$toast,e.$t,r.layer.properties,"geometriesOverrideParams","param")),severity:"info",icon:"fa fa-paste",size:"small",label:e.$t("Paste parameters")},null,8,["label"])])):p("",!0),n(Fe,{list:r.layer.properties.geometriesOverrideParams,group:"geometriesOverrideParams","ghost-class":"custom-ghost-class",style:{display:"flex","flex-direction":"column",gap:".5rem"},handle:".drag-handle"},{item:b(l=>[a("div",wl,[a("div",_l,[Fl,r.layer.properties.overrideGeometriesType==="schema"?(d(),u("div",Ol,[n(T,{modelValue:r.layer.properties.geometriesOverrideParams[l.index].key,"onUpdate:modelValue":F=>r.layer.properties.geometriesOverrideParams[l.index].key=F,placeholder:"key"},null,8,["modelValue","onUpdate:modelValue"])])):(d(),u("div",Pl,[a("strong",null,"$"+m(l.index+1)+" "+m(l.element.key),1)])),a("div",Gl,[n(C,{onClick:F=>r.copyItems([l.element],"param"),class:"p-button-secondary",icon:"pi pi-copy"},null,8,["onClick"]),r.layer.properties.overrideGeometriesType==="schema"?(d(),g(C,{key:0,onClick:F=>i.removeParameter(l.index),class:"p-button-danger",icon:"pi pi-trash"},null,8,["onClick"])):p("",!0)])]),a("div",zl,[a("div",Ml,[n(_e,{modelValue:r.layer.properties.geometriesOverrideParams[l.index].value,"onUpdate:modelValue":F=>r.layer.properties.geometriesOverrideParams[l.index].value=F,placeholder:"value",he
1ight:"80px",language:"javascript"},null,8,["modelValue","onUpdate:modelValue"])])])])]),_:1},8,["list","handle"]),r.layer.properties.overrideGeometriesType==="schema"?(d(),u("div",El,[n(C,{onClick:i.addParameter,style:{width:"fit-content"},class:"button-text",icon:"pi pi-plus",label:e.$t("Add parameter")},null,8,["onClick","label"])])):p("",!0)])):(d(),u("div",Ul,[n(X,{closable:!1},{default:b(()=>[k(m(e.$t("No override set.")),1)]),_:1})]))])]),_:1},8,["pt","header"])])])])):p("",!0),r.currentTab==="tab-children-layers"?(d(),u("div",jl,[a("div",Bl,[a("div",Rl,[a("small",ql,[Hl,k(" "+m(e.$t("Drag and drop to change the position of items.")),1)]),n(Oe,{data:r.childrenLayers,"item-key":"documentId","item-parent-key":"group","allow-actions":[],onMoved:i.onLayerSort},null,8,["data","onMoved"])])])])):p("",!0),r.currentTab==="tab-mb-tiles"?(d(),u("div",Nl,[a("div",Ql,[a("div",Jl,[n(R,{label:"Tiles folder","hide-label":!0,placeholder:e.$t("MB tiles folder..."),modelValue:r.selectedMBTilesFolder,"onUpdate:modelValue":t[87]||(t[87]=l=>r.selectedMBTilesFolder=l),options:r.mbTilesFolders,"label-key":"value","item-key":"value","transform-to-tree":!1,"model-type":"id",onChange:t[88]||(t[88]=l=>i.getMBTilesList(r.selectedMBTilesFolder))},null,8,["placeholder","modelValue","options"])]),a("div",Zl,[n(R,{label:"Tiles","hide-label":!0,placeholder:e.$t("Available MB tiles..."),modelValue:r.selectedMbTiles,"onUpdate:modelValue":t[89]||(t[89]=l=>r.selectedMbTiles=l),options:r.mbTilesList,"label-key":"title","item-key":"title","model-type":"object","is-multi":!0,"show-tree-select-options":!0},null,8,["placeholder","modelValue","options"])]),a("div",Wl,[n(C,{label:e.$t("Select"),onClick:i.addMBTileToLayer},null,8,["label","onClick"])]),a("div",Kl,[a("div",xl,[a("div",Yl,[a("h6",$l,m(e.$t("Selected MB tiles")),1)]),a("div",Xl,[i.documentDetails?.length?(d(),g(C,{key:0,icon:"pi pi-trash","icon-pos":"right",severity:"danger",label:e.$t("Clear"),onClick:i.deleteSelectedTiles,class:"w-auto"},null,8,["label","onClick"])):p("",!0)])]),i.documentDetails.length?(d(),g(Ge,{key:1,filters:r.MBTilesFilters,"onUpdate:filters":t[91]||(t[91]=l=>r.MBTilesFilters=l),value:i.documentDetails,paginator:"",rowsPerPageOptions:[15,30,50,100],showGridlines:"",stripedRows:"",rows:15,dataKey:"title",globalFilterFields:["title"]},{header:b(()=>[a("div",eo,[a("span",to,[ro,n(Pe,{modelValue:r.MBTilesFilters.global.value,"onUpdate:modelValue":t[90]||(t[90]=l=>r.MBTilesFilters.global.value=l),placeholder:e.$t("Search...")},null,8,["modelValue","placeholder"])])])]),empty:b(()=>[k(" No results found.")]),default:b(()=>[n(ae,{field:"title",header:e.$t("Title"),sortable:""},{body:b(({data:l})=>[k(m(l.title),1)]),_:1},8,["header"]),n(ae,{bodyStyle:"text-align:center; max-width: 50px;"},{body:b(l=>[n(C,{icon:"pi pi-trash",class:"p-button-text p-button-rounded p-button-danger",onClick:F=>i.deleteTile(l.index)},null,8,["onClick"])]),_:1})]),_:1},8,["filters","value"])):(d(),g(ie,{key:0,severity:"info"},{default:b(()=>[k(m(e.$t("Search and select MB tiles from the selector above.")),1)]),_:1}))])])])):p("",!0)]),"footer-buttons":b(()=>[r.layer?.documentId&&r.layer?.documentCategory?.documentCategoryId===r.mbtileCollection&&r.layer?.status?.statusId!==r.processingStatus&&i.documentDetails?.length?(d(),g(C,{key:0,label:e.$t("Merge"),icon:"pi pi-save",class:"p-button-info",iconPos:"left",loading:r.isSaving,onClick:i.mergeMbtileCollection},null,8,["label","loading","onClick"])):p("",!0),n(C,{label:e.$t("Save"),icon:"pi pi-save",class:"p-button-primary",iconPos:"left",loading:r.isSaving,onClick:i.save},null,8,["label","loading","onClick"])]),_:1},8,["onClose"]),r.showLegendItemPopup?(d(),g(Me,{key:0,data:r.legendItem,layer:r.layer,"is-group":r.isLegendItemGroup,onClose:t[92]||(t[92]=l=>r.showLegendItemPopup=!1),onAdd:i.onAddLegendItem,onEdit:i.onEditLegendItem},null,8,["data","layer","is-group","onAdd","onEdit"])):p("",!0),r.showSpecificationPopup?(d(),g(Ee,{key:1,data:r.specificationItem,layer:r.layer,"is-group":r.isSpecificationGroup,"standard-attributes":r.standardAttributes,onClose:t[93]||(t[93]=l=>r.showSpecificationPopup=!1),onAdd:i.onAddSpecificationItem,onEdit:i.onEditSpecificationItem},null,8,["data","layer","is-group","standard-attributes","onAdd","onEdit"])):p("",!0)],64)}const Mo=U(hr,[["render",io]]);export{Mo 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.