@opengis/partsmap 0.0.63 → 0.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PartsMap.js +1 -1
- package/dist/PartsMap.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/PartsMap.js
CHANGED
@@ -20610,7 +20610,7 @@ const By = /* @__PURE__ */ hn(Iy, [["render", Ry], ["__scopeId", "data-v-3740577
|
|
20610
20610
|
],
|
20611
20611
|
handleDebouncedUpdateValue: Uh((g) => {
|
20612
20612
|
this.handleSearchValue(g);
|
20613
|
-
},
|
20613
|
+
}, 300)
|
20614
20614
|
};
|
20615
20615
|
},
|
20616
20616
|
watch: {
|
package/dist/PartsMap.umd.cjs
CHANGED
@@ -582,4 +582,4 @@ uniform ${P} ${k} u_${L};
|
|
582
582
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(w){return w instanceof this?w:new this(w)}static concat(w,...E){const C=new this(w);return E.forEach(N=>C.set(N)),C}static accessor(w){const C=(this[fu]=this[fu]={accessors:{}}).accessors,N=this.prototype;function W(T){const c=Vo(T);C[c]||(Uf(N,T),C[c]=!0)}return fe.isArray(w)?w.forEach(W):W(w),this}}Gi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fe.reduceDescriptors(Gi.prototype,({value:g},w)=>{let E=w[0].toUpperCase()+w.slice(1);return{get:()=>g,set(C){this[E]=C}}}),fe.freezeMethods(Gi);function Pc(g,w){const E=this||Oo,C=w||E,N=Gi.from(C.headers);let W=C.data;return fe.forEach(g,function(c){W=c.call(E,W,N.normalize(),w?w.status:void 0)}),N.normalize(),W}function mu(g){return!!(g&&g.__CANCEL__)}function Vs(g,w,E){lt.call(this,g??"canceled",lt.ERR_CANCELED,w,E),this.name="CanceledError"}fe.inherits(Vs,lt,{__CANCEL__:!0});function gu(g,w,E){const C=E.config.validateStatus;!E.status||!C||C(E.status)?g(E):w(new lt("Request failed with status code "+E.status,[lt.ERR_BAD_REQUEST,lt.ERR_BAD_RESPONSE][Math.floor(E.status/100)-4],E.config,E.request,E))}function jf(g){const w=/^([-+\w]{1,25})(:?\/\/|:)/.exec(g);return w&&w[1]||""}function $f(g,w){g=g||10;const E=new Array(g),C=new Array(g);let N=0,W=0,T;return w=w!==void 0?w:1e3,function(ye){const xe=Date.now(),be=C[W];T||(T=xe),E[N]=ye,C[N]=xe;let le=W,ae=0;for(;le!==N;)ae+=E[le++],le=le%g;if(N=(N+1)%g,N===W&&(W=(W+1)%g),xe-T<w)return;const dt=be&&xe-be;return dt?Math.round(ae*1e3/dt):void 0}}function qf(g,w){let E=0,C=1e3/w,N,W;const T=(xe,be=Date.now())=>{E=be,N=null,W&&(clearTimeout(W),W=null),g.apply(null,xe)};return[(...xe)=>{const be=Date.now(),le=be-E;le>=C?T(xe,be):(N=xe,W||(W=setTimeout(()=>{W=null,T(N)},C-le)))},()=>N&&T(N)]}const cl=(g,w,E=3)=>{let C=0;const N=$f(50,250);return qf(W=>{const T=W.loaded,c=W.lengthComputable?W.total:void 0,ye=T-C,xe=N(ye),be=T<=c;C=T;const le={loaded:T,total:c,progress:c?T/c:void 0,bytes:ye,rate:xe||void 0,estimated:xe&&c&&be?(c-T)/xe:void 0,event:W,lengthComputable:c!=null,[w?"download":"upload"]:!0};g(le)},E)},_u=(g,w)=>{const E=g!=null;return[C=>w[0]({lengthComputable:E,total:g,loaded:C}),w[1]]},yu=g=>(...w)=>fe.asap(()=>g(...w)),Zf=Ir.hasStandardBrowserEnv?function(){const w=/(msie|trident)/i.test(navigator.userAgent),E=document.createElement("a");let C;function N(W){let T=W;return w&&(E.setAttribute("href",T),T=E.href),E.setAttribute("href",T),{href:E.href,protocol:E.protocol?E.protocol.replace(/:$/,""):"",host:E.host,search:E.search?E.search.replace(/^\?/,""):"",hash:E.hash?E.hash.replace(/^#/,""):"",hostname:E.hostname,port:E.port,pathname:E.pathname.charAt(0)==="/"?E.pathname:"/"+E.pathname}}return C=N(window.location.href),function(T){const c=fe.isString(T)?N(T):T;return c.protocol===C.protocol&&c.host===C.host}}():function(){return function(){return!0}}(),Gf=Ir.hasStandardBrowserEnv?{write(g,w,E,C,N,W){const T=[g+"="+encodeURIComponent(w)];fe.isNumber(E)&&T.push("expires="+new Date(E).toGMTString()),fe.isString(C)&&T.push("path="+C),fe.isString(N)&&T.push("domain="+N),W===!0&&T.push("secure"),document.cookie=T.join("; ")},read(g){const w=document.cookie.match(new RegExp("(^|;\\s*)("+g+")=([^;]*)"));return w?decodeURIComponent(w[3]):null},remove(g){this.write(g,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Hf(g){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(g)}function Xf(g,w){return w?g.replace(/\/?\/$/,"")+"/"+w.replace(/^\/+/,""):g}function xu(g,w){return g&&!Hf(w)?Xf(g,w):w}const vu=g=>g instanceof Gi?{...g}:g;function ts(g,w){w=w||{};const E={};function C(xe,be,le){return fe.isPlainObject(xe)&&fe.isPlainObject(be)?fe.merge.call({caseless:le},xe,be):fe.isPlainObject(be)?fe.merge({},be):fe.isArray(be)?be.slice():be}function N(xe,be,le){if(fe.isUndefined(be)){if(!fe.isUndefined(xe))return C(void 0,xe,le)}else return C(xe,be,le)}function W(xe,be){if(!fe.isUndefined(be))return C(void 0,be)}function T(xe,be){if(fe.isUndefined(be)){if(!fe.isUndefined(xe))return C(void 0,xe)}else return C(void 0,be)}function c(xe,be,le){if(le in w)return C(xe,be);if(le in g)return C(void 0,xe)}const ye={url:W,method:W,data:W,baseURL:T,transformRequest:T,transformResponse:T,paramsSerializer:T,timeout:T,timeoutMessage:T,withCredentials:T,withXSRFToken:T,adapter:T,responseType:T,xsrfCookieName:T,xsrfHeaderName:T,onUploadProgress:T,onDownloadProgress:T,decompress:T,maxContentLength:T,maxBodyLength:T,beforeRedirect:T,transport:T,httpAgent:T,httpsAgent:T,cancelToken:T,socketPath:T,responseEncoding:T,validateStatus:c,headers:(xe,be)=>N(vu(xe),vu(be),!0)};return fe.forEach(Object.keys(Object.assign({},g,w)),function(be){const le=ye[be]||N,ae=le(g[be],w[be],be);fe.isUndefined(ae)&&le!==c||(E[be]=ae)}),E}const bu=g=>{const w=ts({},g);let{data:E,withXSRFToken:C,xsrfHeaderName:N,xsrfCookieName:W,headers:T,auth:c}=w;w.headers=T=Gi.from(T),w.url=hu(xu(w.baseURL,w.url),g.params,g.paramsSerializer),c&&T.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let ye;if(fe.isFormData(E)){if(Ir.hasStandardBrowserEnv||Ir.hasStandardBrowserWebWorkerEnv)T.setContentType(void 0);else if((ye=T.getContentType())!==!1){const[xe,...be]=ye?ye.split(";").map(le=>le.trim()).filter(Boolean):[];T.setContentType([xe||"multipart/form-data",...be].join("; "))}}if(Ir.hasStandardBrowserEnv&&(C&&fe.isFunction(C)&&(C=C(w)),C||C!==!1&&Zf(w.url))){const xe=N&&W&&Gf.read(W);xe&&T.set(N,xe)}return w},Wf=typeof XMLHttpRequest<"u"&&function(g){return new Promise(function(E,C){const N=bu(g);let W=N.data;const T=Gi.from(N.headers).normalize();let{responseType:c,onUploadProgress:ye,onDownloadProgress:xe}=N,be,le,ae,dt,Ze;function tt(){dt&&dt(),Ze&&Ze(),N.cancelToken&&N.cancelToken.unsubscribe(be),N.signal&&N.signal.removeEventListener("abort",be)}let Ne=new XMLHttpRequest;Ne.open(N.method.toUpperCase(),N.url,!0),Ne.timeout=N.timeout;function ft(){if(!Ne)return;const He=Gi.from("getAllResponseHeaders"in Ne&&Ne.getAllResponseHeaders()),Pt={data:!c||c==="text"||c==="json"?Ne.responseText:Ne.response,status:Ne.status,statusText:Ne.statusText,headers:He,config:g,request:Ne};gu(function(jt){E(jt),tt()},function(jt){C(jt),tt()},Pt),Ne=null}"onloadend"in Ne?Ne.onloadend=ft:Ne.onreadystatechange=function(){!Ne||Ne.readyState!==4||Ne.status===0&&!(Ne.responseURL&&Ne.responseURL.indexOf("file:")===0)||setTimeout(ft)},Ne.onabort=function(){Ne&&(C(new lt("Request aborted",lt.ECONNABORTED,g,Ne)),Ne=null)},Ne.onerror=function(){C(new lt("Network Error",lt.ERR_NETWORK,g,Ne)),Ne=null},Ne.ontimeout=function(){let Ft=N.timeout?"timeout of "+N.timeout+"ms exceeded":"timeout exceeded";const Pt=N.transitional||du;N.timeoutErrorMessage&&(Ft=N.timeoutErrorMessage),C(new lt(Ft,Pt.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,g,Ne)),Ne=null},W===void 0&&T.setContentType(null),"setRequestHeader"in Ne&&fe.forEach(T.toJSON(),function(Ft,Pt){Ne.setRequestHeader(Pt,Ft)}),fe.isUndefined(N.withCredentials)||(Ne.withCredentials=!!N.withCredentials),c&&c!=="json"&&(Ne.responseType=N.responseType),xe&&([ae,Ze]=cl(xe,!0),Ne.addEventListener("progress",ae)),ye&&Ne.upload&&([le,dt]=cl(ye),Ne.upload.addEventListener("progress",le),Ne.upload.addEventListener("loadend",dt)),(N.cancelToken||N.signal)&&(be=He=>{Ne&&(C(!He||He.type?new Vs(null,g,Ne):He),Ne.abort(),Ne=null)},N.cancelToken&&N.cancelToken.subscribe(be),N.signal&&(N.signal.aborted?be():N.signal.addEventListener("abort",be)));const ct=jf(N.url);if(ct&&Ir.protocols.indexOf(ct)===-1){C(new lt("Unsupported protocol "+ct+":",lt.ERR_BAD_REQUEST,g));return}Ne.send(W||null)})},Jf=(g,w)=>{let E=new AbortController,C;const N=function(ye){if(!C){C=!0,T();const xe=ye instanceof Error?ye:this.reason;E.abort(xe instanceof lt?xe:new Vs(xe instanceof Error?xe.message:xe))}};let W=w&&setTimeout(()=>{N(new lt(`timeout ${w} of ms exceeded`,lt.ETIMEDOUT))},w);const T=()=>{g&&(W&&clearTimeout(W),W=null,g.forEach(ye=>{ye&&(ye.removeEventListener?ye.removeEventListener("abort",N):ye.unsubscribe(N))}),g=null)};g.forEach(ye=>ye&&ye.addEventListener&&ye.addEventListener("abort",N));const{signal:c}=E;return c.unsubscribe=T,[c,()=>{W&&clearTimeout(W),W=null}]},Kf=function*(g,w){let E=g.byteLength;if(!w||E<w){yield g;return}let C=0,N;for(;C<E;)N=C+w,yield g.slice(C,N),C=N},Yf=async function*(g,w,E){for await(const C of g)yield*Kf(ArrayBuffer.isView(C)?C:await E(String(C)),w)},wu=(g,w,E,C,N)=>{const W=Yf(g,w,N);let T=0,c,ye=xe=>{c||(c=!0,C&&C(xe))};return new ReadableStream({async pull(xe){try{const{done:be,value:le}=await W.next();if(be){ye(),xe.close();return}let ae=le.byteLength;if(E){let dt=T+=ae;E(dt)}xe.enqueue(new Uint8Array(le))}catch(be){throw ye(be),be}},cancel(xe){return ye(xe),W.return()}},{highWaterMark:2})},hl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Su=hl&&typeof ReadableStream=="function",kc=hl&&(typeof TextEncoder=="function"?(g=>w=>g.encode(w))(new TextEncoder):async g=>new Uint8Array(await new Response(g).arrayBuffer())),Tu=(g,...w)=>{try{return!!g(...w)}catch{return!1}},Qf=Su&&Tu(()=>{let g=!1;const w=new Request(Ir.origin,{body:new ReadableStream,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!w}),Iu=64*1024,Ec=Su&&Tu(()=>fe.isReadableStream(new Response("").body)),ul={stream:Ec&&(g=>g.body)};hl&&(g=>{["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!ul[w]&&(ul[w]=fe.isFunction(g[w])?E=>E[w]():(E,C)=>{throw new lt(`Response type '${w}' is not supported`,lt.ERR_NOT_SUPPORT,C)})})})(new Response);const em=async g=>{if(g==null)return 0;if(fe.isBlob(g))return g.size;if(fe.isSpecCompliantForm(g))return(await new Request(g).arrayBuffer()).byteLength;if(fe.isArrayBufferView(g)||fe.isArrayBuffer(g))return g.byteLength;if(fe.isURLSearchParams(g)&&(g=g+""),fe.isString(g))return(await kc(g)).byteLength},tm=async(g,w)=>{const E=fe.toFiniteNumber(g.getContentLength());return E??em(w)},Ac={http:Tf,xhr:Wf,fetch:hl&&(async g=>{let{url:w,method:E,data:C,signal:N,cancelToken:W,timeout:T,onDownloadProgress:c,onUploadProgress:ye,responseType:xe,headers:be,withCredentials:le="same-origin",fetchOptions:ae}=bu(g);xe=xe?(xe+"").toLowerCase():"text";let[dt,Ze]=N||W||T?Jf([N,W],T):[],tt,Ne;const ft=()=>{!tt&&setTimeout(()=>{dt&&dt.unsubscribe()}),tt=!0};let ct;try{if(ye&&Qf&&E!=="get"&&E!=="head"&&(ct=await tm(be,C))!==0){let Xt=new Request(w,{method:"POST",body:C,duplex:"half"}),jt;if(fe.isFormData(C)&&(jt=Xt.headers.get("content-type"))&&be.setContentType(jt),Xt.body){const[Vr,bi]=_u(ct,cl(yu(ye)));C=wu(Xt.body,Iu,Vr,bi,kc)}}fe.isString(le)||(le=le?"include":"omit"),Ne=new Request(w,{...ae,signal:dt,method:E.toUpperCase(),headers:be.normalize().toJSON(),body:C,duplex:"half",credentials:le});let He=await fetch(Ne);const Ft=Ec&&(xe==="stream"||xe==="response");if(Ec&&(c||Ft)){const Xt={};["status","statusText","headers"].forEach(Nr=>{Xt[Nr]=He[Nr]});const jt=fe.toFiniteNumber(He.headers.get("content-length")),[Vr,bi]=c&&_u(jt,cl(yu(c),!0))||[];He=new Response(wu(He.body,Iu,Vr,()=>{bi&&bi(),Ft&&ft()},kc),Xt)}xe=xe||"text";let Pt=await ul[fe.findKey(ul,xe)||"text"](He,g);return!Ft&&ft(),Ze&&Ze(),await new Promise((Xt,jt)=>{gu(Xt,jt,{data:Pt,headers:Gi.from(He.headers),status:He.status,statusText:He.statusText,config:g,request:Ne})})}catch(He){throw ft(),He&&He.name==="TypeError"&&/fetch/i.test(He.message)?Object.assign(new lt("Network Error",lt.ERR_NETWORK,g,Ne),{cause:He.cause||He}):lt.from(He,He&&He.code,g,Ne)}})};fe.forEach(Ac,(g,w)=>{if(g){try{Object.defineProperty(g,"name",{value:w})}catch{}Object.defineProperty(g,"adapterName",{value:w})}});const Pu=g=>`- ${g}`,im=g=>fe.isFunction(g)||g===null||g===!1,ku={getAdapter:g=>{g=fe.isArray(g)?g:[g];const{length:w}=g;let E,C;const N={};for(let W=0;W<w;W++){E=g[W];let T;if(C=E,!im(E)&&(C=Ac[(T=String(E)).toLowerCase()],C===void 0))throw new lt(`Unknown adapter '${T}'`);if(C)break;N[T||"#"+W]=C}if(!C){const W=Object.entries(N).map(([c,ye])=>`adapter ${c} `+(ye===!1?"is not supported by the environment":"is not available in the build"));let T=w?W.length>1?`since :
|
583
583
|
`+W.map(Pu).join(`
|
584
584
|
`):" "+Pu(W[0]):"as no adapter specified";throw new lt("There is no suitable adapter to dispatch the request "+T,"ERR_NOT_SUPPORT")}return C},adapters:Ac};function Cc(g){if(g.cancelToken&&g.cancelToken.throwIfRequested(),g.signal&&g.signal.aborted)throw new Vs(null,g)}function Eu(g){return Cc(g),g.headers=Gi.from(g.headers),g.data=Pc.call(g,g.transformRequest),["post","put","patch"].indexOf(g.method)!==-1&&g.headers.setContentType("application/x-www-form-urlencoded",!1),ku.getAdapter(g.adapter||Oo.adapter)(g).then(function(C){return Cc(g),C.data=Pc.call(g,g.transformResponse,C),C.headers=Gi.from(C.headers),C},function(C){return mu(C)||(Cc(g),C&&C.response&&(C.response.data=Pc.call(g,g.transformResponse,C.response),C.response.headers=Gi.from(C.response.headers))),Promise.reject(C)})}const Au="1.7.4",Mc={};["object","boolean","number","function","string","symbol"].forEach((g,w)=>{Mc[g]=function(C){return typeof C===g||"a"+(w<1?"n ":" ")+g}});const Cu={};Mc.transitional=function(w,E,C){function N(W,T){return"[Axios v"+Au+"] Transitional option '"+W+"'"+T+(C?". "+C:"")}return(W,T,c)=>{if(w===!1)throw new lt(N(T," has been removed"+(E?" in "+E:"")),lt.ERR_DEPRECATED);return E&&!Cu[T]&&(Cu[T]=!0,console.warn(N(T," has been deprecated since v"+E+" and will be removed in the near future"))),w?w(W,T,c):!0}};function rm(g,w,E){if(typeof g!="object")throw new lt("options must be an object",lt.ERR_BAD_OPTION_VALUE);const C=Object.keys(g);let N=C.length;for(;N-- >0;){const W=C[N],T=w[W];if(T){const c=g[W],ye=c===void 0||T(c,W,g);if(ye!==!0)throw new lt("option "+W+" must be "+ye,lt.ERR_BAD_OPTION_VALUE);continue}if(E!==!0)throw new lt("Unknown option "+W,lt.ERR_BAD_OPTION)}}const zc={assertOptions:rm,validators:Mc},Pn=zc.validators;class is{constructor(w){this.defaults=w,this.interceptors={request:new uu,response:new uu}}async request(w,E){try{return await this._request(w,E)}catch(C){if(C instanceof Error){let N;Error.captureStackTrace?Error.captureStackTrace(N={}):N=new Error;const W=N.stack?N.stack.replace(/^.+\n/,""):"";try{C.stack?W&&!String(C.stack).endsWith(W.replace(/^.+\n.+\n/,""))&&(C.stack+=`
|
585
|
-
`+W):C.stack=W}catch{}}throw C}}_request(w,E){typeof w=="string"?(E=E||{},E.url=w):E=w||{},E=ts(this.defaults,E);const{transitional:C,paramsSerializer:N,headers:W}=E;C!==void 0&&zc.assertOptions(C,{silentJSONParsing:Pn.transitional(Pn.boolean),forcedJSONParsing:Pn.transitional(Pn.boolean),clarifyTimeoutError:Pn.transitional(Pn.boolean)},!1),N!=null&&(fe.isFunction(N)?E.paramsSerializer={serialize:N}:zc.assertOptions(N,{encode:Pn.function,serialize:Pn.function},!0)),E.method=(E.method||this.defaults.method||"get").toLowerCase();let T=W&&fe.merge(W.common,W[E.method]);W&&fe.forEach(["delete","get","head","post","put","patch","common"],Ze=>{delete W[Ze]}),E.headers=Gi.concat(T,W);const c=[];let ye=!0;this.interceptors.request.forEach(function(tt){typeof tt.runWhen=="function"&&tt.runWhen(E)===!1||(ye=ye&&tt.synchronous,c.unshift(tt.fulfilled,tt.rejected))});const xe=[];this.interceptors.response.forEach(function(tt){xe.push(tt.fulfilled,tt.rejected)});let be,le=0,ae;if(!ye){const Ze=[Eu.bind(this),void 0];for(Ze.unshift.apply(Ze,c),Ze.push.apply(Ze,xe),ae=Ze.length,be=Promise.resolve(E);le<ae;)be=be.then(Ze[le++],Ze[le++]);return be}ae=c.length;let dt=E;for(le=0;le<ae;){const Ze=c[le++],tt=c[le++];try{dt=Ze(dt)}catch(Ne){tt.call(this,Ne);break}}try{be=Eu.call(this,dt)}catch(Ze){return Promise.reject(Ze)}for(le=0,ae=xe.length;le<ae;)be=be.then(xe[le++],xe[le++]);return be}getUri(w){w=ts(this.defaults,w);const E=xu(w.baseURL,w.url);return hu(E,w.params,w.paramsSerializer)}}fe.forEach(["delete","get","head","options"],function(w){is.prototype[w]=function(E,C){return this.request(ts(C||{},{method:w,url:E,data:(C||{}).data}))}}),fe.forEach(["post","put","patch"],function(w){function E(C){return function(W,T,c){return this.request(ts(c||{},{method:w,headers:C?{"Content-Type":"multipart/form-data"}:{},url:W,data:T}))}}is.prototype[w]=E(),is.prototype[w+"Form"]=E(!0)});class Dc{constructor(w){if(typeof w!="function")throw new TypeError("executor must be a function.");let E;this.promise=new Promise(function(W){E=W});const C=this;this.promise.then(N=>{if(!C._listeners)return;let W=C._listeners.length;for(;W-- >0;)C._listeners[W](N);C._listeners=null}),this.promise.then=N=>{let W;const T=new Promise(c=>{C.subscribe(c),W=c}).then(N);return T.cancel=function(){C.unsubscribe(W)},T},w(function(W,T,c){C.reason||(C.reason=new Vs(W,T,c),E(C.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(w){if(this.reason){w(this.reason);return}this._listeners?this._listeners.push(w):this._listeners=[w]}unsubscribe(w){if(!this._listeners)return;const E=this._listeners.indexOf(w);E!==-1&&this._listeners.splice(E,1)}static source(){let w;return{token:new Dc(function(N){w=N}),cancel:w}}}function nm(g){return function(E){return g.apply(null,E)}}function sm(g){return fe.isObject(g)&&g.isAxiosError===!0}const Lc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lc).forEach(([g,w])=>{Lc[w]=g});function Mu(g){const w=new is(g),E=Xh(is.prototype.request,w);return fe.extend(E,is.prototype,w,{allOwnKeys:!0}),fe.extend(E,w,null,{allOwnKeys:!0}),E.create=function(N){return Mu(ts(g,N))},E}const Nt=Mu(Oo);Nt.Axios=is,Nt.CanceledError=Vs,Nt.CancelToken=Dc,Nt.isCancel=mu,Nt.VERSION=Au,Nt.toFormData=al,Nt.AxiosError=lt,Nt.Cancel=Nt.CanceledError,Nt.all=function(w){return Promise.all(w)},Nt.spread=nm,Nt.isAxiosError=sm,Nt.mergeConfig=ts,Nt.AxiosHeaders=Gi,Nt.formToJSON=g=>pu(fe.isHTMLForm(g)?new FormData(g):g),Nt.getAdapter=ku.getAdapter,Nt.HttpStatusCode=Lc,Nt.default=Nt;const Rc=(g,w=300)=>{let E;return function(...N){clearTimeout(E),E=setTimeout(()=>{g.apply(this,N)},w)}};function dl(g,w,E={}){const C={type:"Feature"};return(E.id===0||E.id)&&(C.id=E.id),E.bbox&&(C.bbox=E.bbox),C.properties=w||{},C.geometry=g,C}function om(g,w,E={}){if(!g)throw new Error("coordinates is required");if(!Array.isArray(g))throw new Error("coordinates must be an Array");if(g.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ru(g[0])||!Ru(g[1]))throw new Error("coordinates must contain numbers");return dl({type:"Point",coordinates:g},w,E)}function zu(g,w,E={}){for(const N of g){if(N.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(N[N.length-1].length!==N[0].length)throw new Error("First and last Position are not equivalent.");for(let W=0;W<N[N.length-1].length;W++)if(N[N.length-1][W]!==N[0][W])throw new Error("First and last Position are not equivalent.")}return dl({type:"Polygon",coordinates:g},w,E)}function Du(g,w,E={}){return dl({type:"MultiPoint",coordinates:g},w,E)}function Lu(g,w,E={}){return dl({type:"MultiPolygon",coordinates:g},w,E)}function Ru(g){return!isNaN(g)&&g!==null&&!Array.isArray(g)}function Bu(g,w,E){if(g!==null)for(var C,N,W,T,c,ye,xe,be=0,le=0,ae,dt=g.type,Ze=dt==="FeatureCollection",tt=dt==="Feature",Ne=Ze?g.features.length:1,ft=0;ft<Ne;ft++){xe=Ze?g.features[ft].geometry:tt?g.geometry:g,ae=xe?xe.type==="GeometryCollection":!1,c=ae?xe.geometries.length:1;for(var ct=0;ct<c;ct++){var He=0,Ft=0;if(T=ae?xe.geometries[ct]:xe,T!==null){ye=T.coordinates;var Pt=T.type;switch(be=0,Pt){case null:break;case"Point":if(w(ye,le,ft,He,Ft)===!1)return!1;le++,He++;break;case"LineString":case"MultiPoint":for(C=0;C<ye.length;C++){if(w(ye[C],le,ft,He,Ft)===!1)return!1;le++,Pt==="MultiPoint"&&He++}Pt==="LineString"&&He++;break;case"Polygon":case"MultiLineString":for(C=0;C<ye.length;C++){for(N=0;N<ye[C].length-be;N++){if(w(ye[C][N],le,ft,He,Ft)===!1)return!1;le++}Pt==="MultiLineString"&&He++,Pt==="Polygon"&&Ft++}Pt==="Polygon"&&He++;break;case"MultiPolygon":for(C=0;C<ye.length;C++){for(Ft=0,N=0;N<ye[C].length;N++){for(W=0;W<ye[C][N].length-be;W++){if(w(ye[C][N][W],le,ft,He,Ft)===!1)return!1;le++}Ft++}He++}break;case"GeometryCollection":for(C=0;C<T.geometries.length;C++)if(Bu(T.geometries[C],w)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Fu(g,w={}){if(g.bbox!=null&&w.recompute!==!0)return g.bbox;const E=[1/0,1/0,-1/0,-1/0];return Bu(g,C=>{E[0]>C[0]&&(E[0]=C[0]),E[1]>C[1]&&(E[1]=C[1]),E[2]<C[0]&&(E[2]=C[0]),E[3]<C[1]&&(E[3]=C[1])}),E}function Ou(g,w={}){const E=Fu(g),C=(E[0]+E[2])/2,N=(E[1]+E[3])/2;return om([C,N],w.properties,w)}const am={mixins:[yc],props:{map:{type:Object},baseLayers:{type:Array,default:[{id:"orto10",name:"Ortophoto 1:10К",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",service:"TMS",category:"Національна інфраструктура геопросторових даних",scale:1e4,year:2020,bounds:"ua",maxzoom:18,owner:"НДІГК (Інститут геодезії та картографії)",image:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4954/2876.png",basemap:!0},{id:"graymap",name:"Сіра карта",url:"https://basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",service:"TMS",category:"Базові карти",attribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, © <a href='https://carto.com/attributions'>CARTO</a>",bounds1:"ua",image:"https://basemaps.cartocdn.com/light_all/10/601/348.png",position:0,owner:"OSM",basemap:!0},{id:"darkmap_carto",name:"Темна карта України",image:"https://basemaps.cartocdn.com/dark_all/13/4791/2762.png?ver=2023-04-14",url:"https://basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",service:"TMS",category:"Базові карти",active:!1}]}},data(){return{selectedLayer:null}},watch:{map(g){g&&g.on("load",this.handleMapLoad)}},methods:{handleMapLoad(){var g;this.baseLayers.forEach(w=>{this.layerList.push(w)}),this.toggleLayerVisibility((g=this.baseLayers[0])==null?void 0:g.id)},toggleLayerVisibility(g){this.selectedLayer=g,this.changeBaseLayer(this.selectedLayer)}}},lm={class:"vs-map-slot-layers"},cm=["onClick"],hm=["src"];function um(g,w,E,C,N,W){return ee.openBlock(),ee.createElementBlock("div",lm,[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(E.baseLayers,(T,c)=>(ee.openBlock(),ee.createElementBlock("div",{key:T.id,class:ee.normalizeClass(["vs-map-slot-layers__layer relative",{focused:T.id==N.selectedLayer}]),onClick:ye=>W.toggleLayerVisibility(T.id)},[ee.createElementVNode("img",{src:T.image,class:"vs-map-slot-layers__image"},null,8,hm),ee.createElementVNode("div",{class:ee.normalizeClass(["absolute py-2 px-4 text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg top-[-46px] text-nowrap p-2 hidden whitespace-nowrap",[c===0?"left-[-10px]":"left-[50%] translate-x-[-50%] "]])},ee.toDisplayString(T==null?void 0:T.name),3)],10,cm))),128))])}const dm=Or(am,[["render",um],["__scopeId","data-v-d4fbd7d5"]]),pm={props:["colors","strokes","title"],methods:{capitalizeFirstLetter(g){return g?g.charAt(0).toUpperCase()+g.slice(1):""}}},fm={class:"absolute left-[20px] bottom-[74px] bg-white max-w-[250px] p-[10px] rounded-lg"},mm={key:0,class:"mb-[10px] text-[1rem]"},gm={key:1},_m={class:"legend-item flex items-center gap-2"},ym={class:"ml-1 text-[0.875rem]"},xm={class:"legend-item"},vm={key:0,class:"flex justify-start items-center gap-2"},bm={class:"ml-1 text-[0.875rem]"};function wm(g,w,E,C,N,W){var T;return ee.openBlock(),ee.createElementBlock("div",fm,[E.title?(ee.openBlock(),ee.createElementBlock("div",mm,ee.toDisplayString(E.title),1)):ee.createCommentVNode("",!0),(T=E.strokes)!=null&&T.length?(ee.openBlock(),ee.createElementBlock("div",gm,[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(E.strokes,c=>(ee.openBlock(),ee.createElementBlock("div",_m,[ee.createElementVNode("div",{class:"w-[15px] h-[4px]",style:ee.normalizeStyle({background:`repeating-linear-gradient(to right, ${c.color}, ${c.color} 5px, transparent 5px, transparent 8px)`})},null,4),ee.createElementVNode("div",ym,ee.toDisplayString(W.capitalizeFirstLetter(c.text)),1)]))),256))])):ee.createCommentVNode("",!0),(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(E.colors,c=>(ee.openBlock(),ee.createElementBlock("div",xm,[c.id>0?(ee.openBlock(),ee.createElementBlock("div",vm,[ee.createElementVNode("div",{class:"w-[15px] h-[15px] rounded-[50%] min-w-[15px]",style:ee.normalizeStyle({backgroundColor:c.color})},null,4),ee.createElementVNode("div",bm,ee.toDisplayString(W.capitalizeFirstLetter(c.text)),1)])):ee.createCommentVNode("",!0)]))),256))])}const Sm={components:{MapSlotLayers:dm,MapLegend:Or(pm,[["render",wm]])},props:{colorAttr:null,strokeAttr:null,zoom:{type:Array,default:()=>8},defaultColor:{type:String,default:"blue"},legendname:{type:String,default:()=>""},height:{type:String,default:()=>"100vh"},width:{type:String,default:"100vw"},center:{type:Array,default:[32,49]},maxBounds:{type:Array,default:[[22,44],[40,52]]},table:{type:String,default:""},zoom:{type:[String,Number],default:13},minZoom:{type:[String,Number],default:1},basemap:Array,filtersParam:{type:String,default:""},row:{type:Object,default:{}},pointZoom:{type:String,default:"12"},legend:{type:Boolean,default:()=>!0}},mixins:[yc],data(){return{map:null,hoverObject:null,popup:null,colors:[]}},async mounted(){var g,w,E,C;try{if(await this.createMap(),(g=this.row)!=null&&g.geom){const{type:N,coordinates:W}=this.row.geom;let T;switch(N){case"Polygon":T=zu(W);break;case"MultiPolygon":T=Lu(W);break;case"MultiPoint":T=Du(W);break;default:(w=this.map)==null||w.fitBounds([W,W],{maxZoom:this.zoom,padding:30}),this.isSelectObj=!0;return}const c=Ou(T).geometry.coordinates;(E=this.map)==null||E.fitBounds([c,c],{maxZoom:this.zoom,padding:30})}(C=this.map)==null||C.fitBounds(this.center)}catch{}},watch:{filtersParam(g){this.setFilter(this.table,g)}},methods:{async getColorStyle(){var g=[["#69D2E7","#A7DBD8","#E0E4CC","#F38630","#FA6900"],["#FE4365","#FC9D9A","#F9CDAD","#C8C8A9","#83AF9B"],["#ECD078","#D95B43","#C02942","#542437","#53777A"]];if(!this.colorAttr)return this.defaultColor;try{const{data:{rows:w}}=await Nt.get(`/api/data/${this.table}/${this.colorAttr}`),E=w.reduce((C,N,W)=>N!=null&&N.id?[...C,N.id.toString(),N.color||g[0][W%5]]:C,["match",["get",this.colorAttr]]);return this.colors=[...w],E.push("gray"),E}catch(w){console.log(w)}},async getStrokeStyle(){if(!this.strokeAttr)return"transparent";try{const{data:{rows:g}}=await Nt.get(`/api/data/${this.table}/${this.strokeAttr}`),w=g.reduce((E,C,N)=>C!=null&&C.id?[...E,{id:C.id.toString(),color:C.color||"#000000",dash:C.dash||[2,2],text:C.text||C.id.toString()}]:E,[]);return this.strokes=[...w],["match",["get",this.strokeAttr],...w.flatMap(({id:E,color:C})=>[E,C]),"transparent"]}catch(g){return console.log(g),"transparent"}},async handleMapLoad(){var C,N;const g=await this.getStrokeStyle(),w=await this.getColorStyle(),E=((N=(C=location.search.split("&").find(W=>W.includes("filter=")))==null?void 0:C.split("filter="))==null?void 0:N[1])||"";await this.addLayer({id:this.table,service:"vector",url:`/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}&dt=${new Date().toISOString()}&filter=${E}`,layers:[{type:"fill","source-layer":this.table,paint:{"fill-color":w,"fill-opacity":.3,"fill-outline-color":["case",["==",["feature-state","hover"],!0],"red","#000000"]},filter:["all",["==",["geometry-type"],"Polygon"]]},{type:"circle","source-layer":this.table,filter:["all",["==",["geometry-type"],"Point"]],paint:{"circle-radius":{base:1.75,stops:[[10,5],[12,6],[18,12]]},"circle-stroke-color":["case",["==",["feature-state","hover"],!0],"red","#ccc"],"circle-stroke-width":["case",["==",["feature-state","hover"],!0],2,1],"circle-color":w}},{id:`${this.table}-stroke`,type:"line","source-layer":this.table,filter:["all",["==",["geometry-type"],"Polygon"]],paint:{"line-color":g,"line-width":2.5,"line-dasharray":[2,2]}}]})},async createMap(){const g={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new il.Map({container:"maplibre-map",style:g,zoom:this.zoom,center:this.center,minZoom:this.minZoom}),this.$parent.map=this.map,this.map.addControl(new il.NavigationControl({visualizePitch:!0})),this.map.on("load",this.handleMapLoad)}}},Tm={class:"vs-map-portal relative"};function Im(g,w,E,C,N,W){const T=ee.resolveComponent("MapLegend"),c=ee.resolveComponent("MapSlotLayers");return ee.openBlock(),ee.createElementBlock("div",Tm,[ee.createElementVNode("div",{id:"maplibre-map",ref:"maplibreMap",class:"w-full",style:ee.normalizeStyle({height:E.height})},null,4),ee.withDirectives(ee.createVNode(T,{colors:N.colors,strokes:g.strokes,title:E.legendname},null,8,["colors","strokes","title"]),[[ee.vShow,E.legend]]),ee.createVNode(c,{map:N.map,baseLayers:E.basemap},null,8,["map","baseLayers"])])}const Pm=Or(Sm,[["render",Im]]),km={},Em={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Am=[ee.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)];function Cm(g,w){return ee.openBlock(),ee.createElementBlock("svg",Em,Am)}const Mm=Or(km,[["render",Cm]]),zm={},Dm={xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-collapse"},Lm=[ee.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),ee.createElementVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null,-1),ee.createElementVNode("path",{d:"M15 4v16"},null,-1),ee.createElementVNode("path",{d:"M9 10l2 2l-2 2"},null,-1)];function Rm(g,w){return ee.openBlock(),ee.createElementBlock("svg",Dm,Lm)}const Bm=Or(zm,[["render",Rm]]),Fm={},Om={xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-expand"},Vm=[ee.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),ee.createElementVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null,-1),ee.createElementVNode("path",{d:"M15 4v16"},null,-1),ee.createElementVNode("path",{d:"M10 10l-2 2l2 2"},null,-1)];function Nm(g,w){return ee.openBlock(),ee.createElementBlock("svg",Om,Vm)}const Um=Or(Fm,[["render",Nm]]),jm={},$m={class:"shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},qm=[ee.createElementVNode("path",{d:"M18 6 6 18"},null,-1),ee.createElementVNode("path",{d:"m6 6 12 12"},null,-1)];function Zm(g,w){return ee.openBlock(),ee.createElementBlock("svg",$m,qm)}const Gm=Or(jm,[["render",Zm]]),Hm={props:{visible:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},size:{type:String,default:()=>""}},emits:["update:visible","onClose"],name:"vs-dialog",mounted(){window.addEventListener("keydown",this.checkKey)},unmounted(){window.removeEventListener("keydown",this.checkKey)},computed:{hasSlot(){var g;return!!((g=this.$slots)!=null&&g.footer)},checkSize(){return this.size==="small"?"w-5/12":this.size==="medium"?"w-6/12":"lg:w-7/12 w-11/12"}},methods:{checkKey({key:g}){g==="Escape"&&this.handleClose()},handleClose(){this.$emit("update:visible",!1),this.$emit("onClose")}}},Vu=g=>(ee.pushScopeId("data-v-37405773"),g=g(),ee.popScopeId(),g),Xm={class:"vsTailwind ui-dialog__wrapper"},Wm={class:"w-full h-full fixed top-0 start-0 z-[80] bg-black bg-opacity-50"},Jm={class:"py-2.5 px-4 flex justify-between items-center border-b"},Km={class:"font-medium text-gray-800"},Ym=[Vu(()=>ee.createElementVNode("span",{class:"sr-only"},"Close",-1)),Vu(()=>ee.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[ee.createElementVNode("path",{d:"M18 6 6 18"}),ee.createElementVNode("path",{d:"m6 6 12 12"})],-1))],Qm={class:"ui-dialog__content p-4"},eg={key:0,class:"flex justify-end gap-x-2"};function tg(g,w,E,C,N,W){return ee.openBlock(),ee.createBlock(ee.Teleport,{to:"#modal"},[ee.createVNode(ee.Transition,{name:"fade"},{default:ee.withCtx(()=>[ee.withDirectives(ee.createElementVNode("div",Xm,[ee.createElementVNode("div",Wm,[ee.createVNode(ee.Transition,{name:"content",appear:""},{default:ee.withCtx(()=>[ee.createElementVNode("div",{class:ee.normalizeClass(["ui-dialog__modal opacity-1 transition-all flex flex-col bg-white border pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",[W.checkSize]])},[ee.createElementVNode("div",Jm,[ee.createElementVNode("h3",Km,ee.toDisplayString(E.title),1),ee.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:w[0]||(w[0]=(...T)=>W.handleClose&&W.handleClose(...T))},Ym)]),ee.createElementVNode("div",Qm,[ee.renderSlot(g.$slots,"default",{},void 0,!0)]),W.hasSlot?(ee.openBlock(),ee.createElementBlock("div",eg,[ee.renderSlot(g.$slots,"footer",{},void 0,!0)])):ee.createCommentVNode("",!0)],2)]),_:3})])],512),[[ee.vShow,E.visible]])]),_:3})])}const ig=Or(Hm,[["render",tg],["__scopeId","data-v-37405773"]]),rg=ee.defineComponent({props:{title:{type:String,default:()=>""},table:{type:String,default:()=>""},rows:{type:Object,default:()=>null},initTotal:{type:[Number,String],default:()=>""},colorAttr:{type:String,default:()=>""},strokeAttr:{type:String,default:()=>""},legendname:{type:String,default:()=>""},center:{type:Array},maxBounds:{type:Array,default:()=>[[22,44.4],[40,52.5]]},id:{type:String,default:()=>""},isAutocomplete:{type:Boolean,default:()=>!1},isAddressAutocomplete:{type:Boolean,default:()=>!1},zoom:{type:[Number,String],default:()=>"13"},minZoom:{type:[Number,String],default:()=>"1"},maskForSearch:{type:String,default:()=>null},searchShow:{type:Boolean,default:()=>!0},basemap:{type:Array},pointZoom:{type:String,default:()=>"12"},legend:{type:Boolean,default:()=>!0},defaultColor:{type:String,default:()=>"blue"}},mixins:[yc],components:{MapPortal:Pm,NoData:Fp,FilterIcon:Mm,VisibleMapIcon:Bm,HiddenMapIcon:Um,CloseIcon:Gm,VsDialog:ig},data(){return{filters:"",search:"",limit:20,polyline:null,filtersParam:"",isSelectObj:!1,selectedId:"",searchRegion:"",searchAddress:"",marker:null,handleSearchRegionDebounced:Rc(g=>this.updateSearchRegionValue(g),500),handleSearchAddressDebounced:Rc(g=>this.updateSearchAddressValue(g),500),searchRegionResult:[],searchAddressResult:[],selectedRow:null,activeFilters:"",isMapVisible:!0,tabsIsVisible:!1,filterUrl:"",currentPage:1,regionOptionGeneral:null,isFilterVisible:!1,tableData:null,hoverData:null,atuData:[],map:null,legendName:null,total:null,filtered:null,filterValues:"",activeFiltersCount:"",visibleTrue:!0,regionSelectValue:null,addressSelectValue:null,currentBbox:null,mountedFilter:{},optionRowsCount:[{value:10,label:"10"},{value:20,label:"20"},{value:30,label:"30"}],handleDebouncedUpdateValue:Rc(g=>{this.handleSearchValue(g)},10)}},watch:{map(){this.map.on("mousemove",this.handleMapHover),this.map.on("click",this.handleMapClick)},activeFiltersCount(){var g,w;return(w=(g=this.$refs)==null?void 0:g.filter)==null?void 0:w.filteredActiveFiltersLength},activeFilters(){var g,w;return this.isSelectObj&&this.moveToDefaultPage(),(w=(g=this.$refs)==null?void 0:g.filter)==null?void 0:w.activeFilters},isFilterVisible(g){g||this.getData()},async regionSelectValue(g,w){var N,W;if(!this.regionSelectValue){this.map.removeSource("region-search-id");return}g&&this.selectedId&&this.closeObjCard(),this.polyline=this.regionSelectValue.encoded_geom,this.getData();const E=((N=this.regionSelectValue)==null?void 0:N.geom)||Sr.toGeoJSON(this.regionSelectValue.encoded_geom),C=this.map.getSource("region-search-id");if(this.currentBbox=Fu(E),C)C.setData({type:"Feature",geometry:E});else{this.map.addSource("region-search-id",{type:"geojson",data:{type:"Feature",geometry:E}});const T={id:"region-search-id",type:"line",source:"region-search-id",paint:{"line-color":"blue","line-opacity":1}};await this.map.addLayer(T)}this.moveLayer("site.prc.parcel_object.table"),(W=this.map)==null||W.fitBounds(this.currentBbox,{zoom:this.setAtuZoom,padding:20}),this.getData()},async addressSelectValue(g,w){this.addressSelectValue&&(g&&this.selectedId&&this.closeObjCard(),this.getData())}},created(){this.legendName,this.tableData=this.rows,this.total=this.initTotal,this.id&&(this.selectedRow=this.rows[0],this.selectedId=this.id,this.isSelectObj=!0)},mounted(){this.rows||this.getData();const w=new URLSearchParams(window.location.search).get("filter"),E=w==null?void 0:w.split("|");E==null||E.forEach(N=>{const[W,T]=N.split("=");T!=null&&T.includes(",")?this.mountedFilter[W]=T==null?void 0:T.split(","):this.mountedFilter[W]=T});const C=new URLSearchParams(window.location.search);this.currentPage=C.get("page")||1,this.getFilter()},updated(){this.checkFilterLength()},computed:{setAtuZoom(){var g,w,E;return((g=this.regionSelectValue)==null?void 0:g.id)==="UA80000000000093317"||((w=this.regionSelectValue)==null?void 0:w.id)==="UA85000000000065278"?10:((E=this.regionSelectValue)==null?void 0:E.region)===""?7.5:11}},methods:{async updateSearchRegionValue(g){this.searchRegion=g,await this.getReginOptions()},async updateSearchAddressValue(g){this.searchAddress=g,await this.getAddressOptions()},async getData(){try{const g={search:this.search||null,limit:this.limit,page:this.currentPage,polyline:this.polyline};g.filter=this.filtersParam;const{data:w}=await Nt.get(`/api/data/${this.table}`,{params:g});this.tableData=w==null?void 0:w.rows,this.total=w.filtered,this.filtered=w.filtered}catch(g){console.error(g.message)}},moveToDefaultPage(){var C;const g=new URLSearchParams(window.location.search);g.delete("id");const E=`${window.location.pathname}?${g.toString()}`;(C=this.map)==null||C.fitBounds(this.maxBounds,{}),window.history.pushState({},"",E),this.isSelectObj=!1},regionFullName(g){return g.region?`${g.text} / ${g.region}`:g.text},getLabelById(g){const w=this.filters.find(E=>E.id===g);return w?w.label:g},getOptionsLabelById(g,w){if(Array.isArray(w)){const E=this.filters.find(C=>C.id===g);return E!=null&&E.options?E==null?void 0:E.options.filter(C=>w.includes(C.id)).map(C=>C.text).join(", "):w==null?void 0:w.length}else return w},async clearFilter(g){var w,E;(E=(w=this.$refs)==null?void 0:w.filter)==null||E.clearFilter(g),await this.updateTableAndMap(),await this.getData()},async getReginOptions(){if(this.searchRegion===""&&this.regionOptionGeneral)this.searchRegionResult=this.regionOptionGeneral;else try{const{data:g}=await Nt.get(`https://data.softpro.ua/api-user/suggest/atu.codifier.type.polyline.select.region?key=${this.searchRegion}`);this.searchRegionResult=g,this.regionOptionGeneral||(this.regionOptionGeneral=g)}catch(g){console.error(g.message)}},async getAddressOptions(){if(this.searchAddress===""&&this.addressOptionGeneral)this.searchAddressResult=this.addressOptionGeneral;else try{const{data:g}=await Nt.get(`/api/suggest/itree.address_id?key=${this.searchAddress}`);this.searchAddressResult=g,this.addressOptionGeneral||(this.addressOptionGeneral=g)}catch(g){console.error(g.message)}},handlePageChange(g){this.currentPage=g;const w=new URL(window.location.href),E=new URLSearchParams(window.location.search);E.set("page",g),w.search=decodeURI(E.toString()),window.history.pushState({},"",w),this.getData()},async getFilter(){var g;try{const{data:w}=await Nt.get(`/api/filter/${this.table}`);this.filters=(g=w==null?void 0:w.list)==null?void 0:g.map(E=>({...E,label:(E==null?void 0:E.label)||(E==null?void 0:E.ua),id:(E==null?void 0:E.id)||(E==null?void 0:E.name)}))}catch(w){console.error(w.message)}},async handleSearchValue(g){this.search=g,await this.getData()},closeObjCard(){var C;const g=new URLSearchParams(window.location.search);g.delete("id"),this.deletePulsePoint(),this.deleteHighlighPolygon();const E=`${window.location.pathname}?${g.toString()}`;(this.currentBbox||this.center)&&((C=this.map)==null||C.fitBounds(this.currentBbox||[this.center,this.center],{maxZoom:this.zoom})),window.history.pushState({},"",E),this.isSelectObj=!1,this.selectedRow=null,this.getData()},async handleSearchRegionValue(g){var E;const w=this.map.getLayer("region-search-id");this.searchRegion=g,g===""&&w?((E=this.map)==null||E.fitBounds(this.maxBounds,{}),this.currentBbox=null,this.polyline=null,this.map.removeLayer("region-search-id"),this.getData()):g===""&&this.getData()},async handleSearchAddressValue(g){var E;const w=this.map.getLayer("address-search-id");this.searchAddress=g,g===""&&w?((E=this.map)==null||E.fitBounds(this.maxBounds,{}),this.currentBbox=null,this.polyline=null,this.map.removeLayer("address-search-id"),this.getData()):g===""&&this.getData()},handleFilterChange(g){this.currentPage=g.state.page||1,this.filterUrl=g.url==="no-url"?null:g.url.split("|").filter(w=>!w.includes("page=")).join("|")},async updateTableAndMap(){var g,w;this.selectedRow||(this.filtersParam=this.filterUrl,this.activeFilters=(w=(g=this.$refs)==null?void 0:g.filter)==null?void 0:w.activeFilters,this.isFilterVisible=!1,this.getData())},handleFilterSubmit(){var g;this.isSelectObj="",this.selectedId="",this.selectedId=!1,(g=this.map)==null||g.fitBounds(this.maxBounds,{}),this.isFilterVisible=!1},toggleMapVisible(){this.isMapVisible=!this.isMapVisible},checkUrl(g=!0){const w=new URLSearchParams(window.location.search);w.has("id")?(this.isSelectObj=!0,this.isMapVisible=g,this.selectedId=w.get("id")):(this.isSelectObj=!1,this.selectedId="")},changeLimit(g){this.limit=g,this.currentPage=1,this.getData()},filterModalClose(){this.isFilterVisible=!1},resetFilters(){this.$refs.filter&&(this.$refs.filter.clearAll(),this.search="",this.isFilterVisible=!1,this.filtersParam="",this.polyline=null,this.regionSelectValue=null,this.addressSelectValue=null,this.currentBbox=null,this.activeFilters=null,this.tabsIsVisible=!1,this.handleSearchRegionValue(""),this.handleSearchAddressValue(""))},checkFilterLength(){var w,E;const g=(E=(w=this.$refs)==null?void 0:w.filter)==null?void 0:E.filteredActiveFiltersLength;g!==this.previousLength&&(this.previousLength=g,this.activeFiltersCount=g)},async handleMapClick(g){var W,T,c,ye,xe,be,le,ae;const w=this.map.queryRenderedFeatures(g.point);if((w==null?void 0:w.length)<1)return;const E=window.location.pathname,C=new URLSearchParams(window.location.search);C.set("id",`${(W=w[0])==null?void 0:W.properties.id}`),this.getObjectData((c=(T=w[0])==null?void 0:T.properties)==null?void 0:c.id);const N=`${E}?${C.toString()}`;window.history.pushState({},"",N),this.isSelectObj=!0,g.lngLat&&((ae=this.map)==null||ae.fitBounds([[(ye=g.lngLat)==null?void 0:ye.lng,(xe=g.lngLat)==null?void 0:xe.lat],[(be=g.lngLat)==null?void 0:be.lng,(le=g.lngLat)==null?void 0:le.lat]],{padding:30})),this.checkUrl()},async getObjectData(g){var w,E;try{const{data:C}=await Nt.get(`/api/data/${this.table}/${g}`);this.selectRow((w=C==null?void 0:C.rows)==null?void 0:w[0]),((E=C==null?void 0:C.rows)==null?void 0:E.lenght)<1&&this.deletePulsePoint()}catch(C){console.error(C.message)}},async selectRow(g,w=!0){var c,ye,xe;this.isMapVisible=w;const C=await(await fetch(`/api/data/${this.table}/${g.id}`)).json();this.selectedRow=((c=C==null?void 0:C.rows)==null?void 0:c[0])||g;const N=window.location.pathname,W=new URLSearchParams(window.location.search);W.set("id",`${g.id}`);const T=`${N}?${W.toString()}`;if(window.history.pushState({},"",T),this.checkUrl(w),g!=null&&g.geom){const{type:be,coordinates:le}=g.geom;let ae;switch(be){case"Polygon":ae=zu(le);break;case"MultiPolygon":ae=Lu(le);break;case"MultiPoint":ae=Du(le);break;default:(ye=this.map)==null||ye.fitBounds([le,le],{maxZoom:15,padding:30}),this.isSelectObj=!0;return}const dt=Ou(ae).geometry.coordinates;(xe=this.map)==null||xe.fitBounds([dt,dt],{maxZoom:15,padding:30})}this.isSelectObj=!0},deletePulsePoint(){this.marker&&this.marker.remove()},addPulsePoint(g){this.deletePulsePoint();const w=document.createElement("div");w.className="gps-marker",w.style.width="10px",w.style.height="10px",w.style.position="relative";const E=document.createElement("div");E.className="gps-wave",w.appendChild(E),this.marker=new il.Marker({element:w,anchor:"center"}).setLngLat(g).addTo(this.map)},deleteHighlighPolygon(){var g,w,E;(g=this.map)!=null&&g.getLayer("highlighted-polygon")&&((w=this.map)==null||w.removeLayer("highlighted-polygon"),(E=this.map)==null||E.removeSource("highlighted-polygon"))},highlightPolygon(g){var w,E,C,N,W,T;this.deletePulsePoint(),this.deleteHighlighPolygon(),(N=this.map)==null||N.addSource("highlighted-polygon",{type:"geojson",data:{geometry:{type:(w=g==null?void 0:g.geom)==null?void 0:w.type,coordinates:(E=g==null?void 0:g.geom)==null?void 0:E.coordinates},type:"Feature",properties:{id:g==null?void 0:g.id,name:g==null?void 0:g.name,category:g==null?void 0:g.id},id:g==null?void 0:g.id,layer:{id:"site.rest_zone.table-0",type:"fill",source:"site.rest_zone.table",sourceLayer:"site.rest_zone.table",filter:["all",["==",["geometry-type"],(C=g==null?void 0:g.geom)==null?void 0:C.type]],paint:{"fill-color":"orange","fill-opacity":.5},layout:{}},source:"site.rest_zone.table",sourceLayer:"site.rest_zone.table",state:{hover:!0},table:"site.rest_zone.table"}}),(W=this.map)==null||W.addLayer({id:"highlighted-polygon",type:"fill",source:"highlighted-polygon",layout:{},minzoom:12,maxzoom:0,paint:{"fill-color":"orange","fill-opacity":.6}}),(T=this.map)==null||T.moveLayer("highlighted-polygon")},async handleMapHover(g){var N,W,T;this.hoverObject&&(this.map.setFeatureState(this.hoverObject,{hover:!1}),this.hoverObject=null),this.popup||(this.popup=new il.Popup({maxWidth:"400px",closeButton:!1,closeOnClick:!1}));const w=this.map.queryRenderedFeatures(g.point);if(this.map.getCanvas().style.cursor="pointer",!(w!=null&&w.length)||((N=w==null?void 0:w[0])==null?void 0:N.source)==="region-search-id"){this.map.getCanvas().style.cursor="",this.popup.remove();return}const E=w[0].geometry.coordinates.slice();w[0].source==="highlighted-polygon"&&w[1]?this.hoverData=(W=w[1])==null?void 0:W.properties:this.hoverData=(T=w[0])==null?void 0:T.properties;const C={source:w[0].source,sourceLayer:w[0].sourceLayer,id:w[0].id};if(C.source!=="region-search-id"){for(this.map.setFeatureState(C,{hover:!0}),this.hoverObject=C;Math.abs(g.lngLat.lng-E[0])>180;)E[0]+=g.lngLat.lng>E[0]?360:-360;this.popup.setLngLat(g.lngLat).setHTML(this.$refs.popup.innerHTML).addTo(this.map)}}}}),ng={class:"ml-3 pt-[20px]"},sg={class:"w-full gap-5 flex justify-between mb-[6px] pr-3"},og={class:"flex items-center gap-2 max-h-[38px] pt-[4px]"},ag={class:"custom-filter-list"},lg={key:0,class:"font-medium text-[10px] min-w-[16px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full"},cg=["title"],hg=ee.createElementVNode("span",{class:"sr-only"},"Відкрити мапу",-1),ug={class:"flex"},dg={class:"py-[15px] pb-[24px] pl-2"},pg={class:"font-bold text-2xl mr-[10px]"},fg={class:"text-sm text-stone-500 font-medium"},mg=ee.createElementVNode("span",{class:"text-sm text-stone-500 font-medium"}," об'єктів",-1),gg={class:"wrapperTable flex flex-col",style:{height:"calc(100vh - 302px)"}},_g={key:0,class:"flex gap-x-2 flex-wrap"},yg={class:"font-medium"},xg=ee.createElementVNode("span",{class:"h-3 mx-2 border-s border-gray-200"},null,-1),vg={class:"text-gray-500"},bg=["onClick"],wg={key:0,class:"mb-[10px] py-1 ps-3 pe-1 inline-flex items-center bg-white border border-gray-200 text-gray-800 text-xs rounded-full"},Sg=ee.createElementVNode("span",{class:"font-medium"}," Очистити ",-1),Tg={key:2,class:"text-center py-28"},Ig=ee.createElementVNode("h2",{class:"font-medium text-base text-gray-500 rounded-xl"}," За вашим запитом даних не знайдено! ",-1),Pg=ee.createElementVNode("p",{class:"font-normal text-sm text-gray-500 rounded-xl"}," Введіть, будь ласка, інші значення для пошуку. ",-1),kg={key:0},Eg={key:1,class:"my-5 pr-2"},Ag={class:"flex justify-between"},Cg={class:"w-2/4"},Mg={class:"map-section"},zg={ref:"popup",style:{display:"none"}};function Dg(g,w,E,C,N,W){var Ne,ft;const T=ee.resolveComponent("VsTextMask"),c=ee.resolveComponent("vs-text"),ye=ee.resolveComponent("FilterIcon"),xe=ee.resolveComponent("VsFilterList"),be=ee.resolveComponent("VisibleMapIcon"),le=ee.resolveComponent("HiddenMapIcon"),ae=ee.resolveComponent("CloseIcon"),dt=ee.resolveComponent("NoData"),Ze=ee.resolveComponent("VsPagination"),tt=ee.resolveComponent("MapPortal");return ee.openBlock(),ee.createElementBlock("section",ng,[ee.createElementVNode("div",null,[ee.createElementVNode("div",sg,[ee.createElementVNode("div",og,[g.maskForSearch?(ee.openBlock(),ee.createBlock(T,{key:0,"model-value":g.search,"onUpdate:modelValue":g.handleDebouncedUpdateValue,class:"w-full table-interface-search",placeholder:"Пошук",mask:g.maskForSearch,icon:"search",iconPosition:"left",clearable:"",style:{height:"38px","min-width":"300px","max-width":"300px"},ref:"searchInput"},null,8,["model-value","onUpdate:modelValue","mask"])):g.searchShow?(ee.openBlock(),ee.createBlock(c,{key:1,"model-value":g.search,"onUpdate:modelValue":g.handleDebouncedUpdateValue,class:"[&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:w-[220px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",placeholder:"Пошук",icon:"search","icon-position":"left",clearable:"",style:{height:"38px"},ref:"searchInput"},null,8,["model-value","onUpdate:modelValue"])):ee.createCommentVNode("",!0),ee.createElementVNode("div",ag,[g.filters?(ee.openBlock(),ee.createBlock(xe,{key:0,ref:"filter",modelValue:g.mountedFilter,"onUpdate:modelValue":w[0]||(w[0]=ct=>g.mountedFilter=ct),scheme:g.filters,isDialog:(Ne=g.filters)==null?void 0:Ne.some(ct=>!(ct!=null&&ct.inline)),"apply-vue-router":"",history:"",view:"plain",clearable:!1,name:"filter",onFilterChange:w[1]||(w[1]=async ct=>{await g.handleFilterChange(ct),await g.updateTableAndMap()})},{button:ee.withCtx(({visible:ct})=>[ee.createElementVNode("button",{type:"button",class:ee.normalizeClass(["py-2 px-2.5 h-[40px] inline-flex items-center gap-x-1.5 text-sm font-medium rounded-lg bg-white text-gray-800 hover:bg-gray-50 focus:outline-none focus:bg-gray-50",[ct?"border border-blue-600 border-2":"border border-gray-200"]])},[ee.createVNode(ye),ee.createTextVNode(" Фільтри "),g.activeFiltersCount>=1?(ee.openBlock(),ee.createElementBlock("span",lg,ee.toDisplayString(g.activeFiltersCount),1)):ee.createCommentVNode("",!0)],2)]),_:1},8,["modelValue","scheme","isDialog"])):ee.createCommentVNode("",!0)])]),ee.createElementVNode("button",{type:"button",class:"py-2 px-2 inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100",title:g.isMapVisible?"Приховати карту":"Показати карту",onClick:w[2]||(w[2]=(...ct)=>g.toggleMapVisible&&g.toggleMapVisible(...ct))},[g.isMapVisible?(ee.openBlock(),ee.createBlock(be,{key:0})):(ee.openBlock(),ee.createBlock(le,{key:1})),hg],8,cg)]),ee.createElementVNode("div",ug,[ee.createElementVNode("div",{class:ee.normalizeClass(["relative overflow-hidden",g.isMapVisible?"w-2/4 mr-0":"w-full mr-3",g.isSelectObj?"hidden":""])},[ee.createElementVNode("h1",dg,[ee.createElementVNode("span",pg,ee.toDisplayString(g.title),1),ee.createElementVNode("span",fg,ee.toDisplayString(g.total),1),mg]),ee.createElementVNode("div",gg,[g.activeFilters?(ee.openBlock(),ee.createElementBlock("div",_g,[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(g.activeFilters,(ct,He,Ft)=>(ee.openBlock(),ee.createElementBlock("span",{class:"mb-[10px] py-1 ps-3 pe-1 inline-flex items-center bg-white border border-gray-200 text-gray-800 text-xs rounded-full",key:Ft},[ee.createElementVNode("span",yg,ee.toDisplayString(g.getLabelById(He)),1),xg,ee.createElementVNode("span",vg,ee.toDisplayString(g.getOptionsLabelById(He,ct)),1),ee.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-5 ms-1 rounded-full text-gray-600 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 text-sm",onClick:Pt=>g.clearFilter(He)},[ee.createVNode(ae)],8,bg)]))),128)),((ft=Object.keys(g.activeFilters))==null?void 0:ft.length)>=2?(ee.openBlock(),ee.createElementBlock("span",wg,[Sg,ee.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-5 ms-1 rounded-full text-gray-600 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 text-sm",onClick:w[3]||(w[3]=ct=>g.mountedFilter={})},[ee.createVNode(ae)])])):ee.createCommentVNode("",!0)])):ee.createCommentVNode("",!0),g.total>=1?ee.renderSlot(g.$slots,"table",{key:1,rows:g.tableData,map:g.map,selectRow:g.selectRow,getData:g.getData,isMapVisible:g.isMapVisible}):(ee.openBlock(),ee.createElementBlock("div",Tg,[ee.createVNode(dt),Ig,Pg,ee.createElementVNode("button",{type:"button",class:"mt-[10px] py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs rounded-lg border border-stone-200 bg-white text-stone-800 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100",onClick:w[4]||(w[4]=(...ct)=>g.resetFilters&&g.resetFilters(...ct))}," Очистити дані пошуку ")]))]),g.total>=1?(ee.openBlock(),ee.createElementBlock("hr",kg)):ee.createCommentVNode("",!0),g.total>=1?(ee.openBlock(),ee.createElementBlock("div",Eg,[ee.createElementVNode("div",Ag,[ee.createVNode(Ze,{total:g.total,maxPages:7,defaultPage:g.currentPage,pageSize:g.limit,goTo:!1,size:"medium",onPageChange:g.handlePageChange,backgroundColor:"#e5e7eb",borderedCellSelected:!0,pageSizes:[10,20,30],onPageSizeChange:g.changeLimit},null,8,["total","defaultPage","pageSize","onPageChange","onPageSizeChange"])])])):ee.createCommentVNode("",!0)],2),g.isSelectObj?(ee.openBlock(),ee.createElementBlock("div",{key:0,class:ee.normalizeClass(g.isMapVisible?"w-2/4 mr-0 pb-5":"w-full pb-5 mr-3"),style:{height:"calc(100vh - 152px)"}},[ee.renderSlot(g.$slots,"details",{table:g.table,selectedId:g.selectedId,selectedRow:g.selectedRow,map:g.map,closeObjCard:g.closeObjCard,isMapVisible:g.isMapVisible})],2)):ee.createCommentVNode("",!0),ee.withDirectives(ee.createElementVNode("div",Cg,[ee.createElementVNode("section",Mg,[ee.createVNode(tt,{height:"calc(100vh - 152px)",width:"w-2/4",table:g.table,filtersParam:g.filtersParam,row:g.selectedRow,legendname:g.legendname,legend:g.legend,colorAttr:g.colorAttr,strokeAttr:g.strokeAttr,maxBounds:g.maxBounds,center:g.center,zoom:g.zoom,minZoom:g.minZoom,basemap:g.basemap,pointZoom:g.pointZoom,defaultColor:g.defaultColor},null,8,["table","filtersParam","row","legendname","legend","colorAttr","strokeAttr","maxBounds","center","zoom","minZoom","basemap","pointZoom","defaultColor"])])],512),[[ee.vShow,g.isMapVisible]])]),ee.createElementVNode("div",zg,[ee.renderSlot(g.$slots,"popup",{data:g.hoverData})],512)])])}const Nu=Or(rg,[["render",Dg]]),Uu={install:g=>{g.component("VsPartsMap",Nu)},components:{VsPartsMap:Nu}};return typeof window<"u"&&(window.PartsMap=Uu),Uu});
|
585
|
+
`+W):C.stack=W}catch{}}throw C}}_request(w,E){typeof w=="string"?(E=E||{},E.url=w):E=w||{},E=ts(this.defaults,E);const{transitional:C,paramsSerializer:N,headers:W}=E;C!==void 0&&zc.assertOptions(C,{silentJSONParsing:Pn.transitional(Pn.boolean),forcedJSONParsing:Pn.transitional(Pn.boolean),clarifyTimeoutError:Pn.transitional(Pn.boolean)},!1),N!=null&&(fe.isFunction(N)?E.paramsSerializer={serialize:N}:zc.assertOptions(N,{encode:Pn.function,serialize:Pn.function},!0)),E.method=(E.method||this.defaults.method||"get").toLowerCase();let T=W&&fe.merge(W.common,W[E.method]);W&&fe.forEach(["delete","get","head","post","put","patch","common"],Ze=>{delete W[Ze]}),E.headers=Gi.concat(T,W);const c=[];let ye=!0;this.interceptors.request.forEach(function(tt){typeof tt.runWhen=="function"&&tt.runWhen(E)===!1||(ye=ye&&tt.synchronous,c.unshift(tt.fulfilled,tt.rejected))});const xe=[];this.interceptors.response.forEach(function(tt){xe.push(tt.fulfilled,tt.rejected)});let be,le=0,ae;if(!ye){const Ze=[Eu.bind(this),void 0];for(Ze.unshift.apply(Ze,c),Ze.push.apply(Ze,xe),ae=Ze.length,be=Promise.resolve(E);le<ae;)be=be.then(Ze[le++],Ze[le++]);return be}ae=c.length;let dt=E;for(le=0;le<ae;){const Ze=c[le++],tt=c[le++];try{dt=Ze(dt)}catch(Ne){tt.call(this,Ne);break}}try{be=Eu.call(this,dt)}catch(Ze){return Promise.reject(Ze)}for(le=0,ae=xe.length;le<ae;)be=be.then(xe[le++],xe[le++]);return be}getUri(w){w=ts(this.defaults,w);const E=xu(w.baseURL,w.url);return hu(E,w.params,w.paramsSerializer)}}fe.forEach(["delete","get","head","options"],function(w){is.prototype[w]=function(E,C){return this.request(ts(C||{},{method:w,url:E,data:(C||{}).data}))}}),fe.forEach(["post","put","patch"],function(w){function E(C){return function(W,T,c){return this.request(ts(c||{},{method:w,headers:C?{"Content-Type":"multipart/form-data"}:{},url:W,data:T}))}}is.prototype[w]=E(),is.prototype[w+"Form"]=E(!0)});class Dc{constructor(w){if(typeof w!="function")throw new TypeError("executor must be a function.");let E;this.promise=new Promise(function(W){E=W});const C=this;this.promise.then(N=>{if(!C._listeners)return;let W=C._listeners.length;for(;W-- >0;)C._listeners[W](N);C._listeners=null}),this.promise.then=N=>{let W;const T=new Promise(c=>{C.subscribe(c),W=c}).then(N);return T.cancel=function(){C.unsubscribe(W)},T},w(function(W,T,c){C.reason||(C.reason=new Vs(W,T,c),E(C.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(w){if(this.reason){w(this.reason);return}this._listeners?this._listeners.push(w):this._listeners=[w]}unsubscribe(w){if(!this._listeners)return;const E=this._listeners.indexOf(w);E!==-1&&this._listeners.splice(E,1)}static source(){let w;return{token:new Dc(function(N){w=N}),cancel:w}}}function nm(g){return function(E){return g.apply(null,E)}}function sm(g){return fe.isObject(g)&&g.isAxiosError===!0}const Lc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lc).forEach(([g,w])=>{Lc[w]=g});function Mu(g){const w=new is(g),E=Xh(is.prototype.request,w);return fe.extend(E,is.prototype,w,{allOwnKeys:!0}),fe.extend(E,w,null,{allOwnKeys:!0}),E.create=function(N){return Mu(ts(g,N))},E}const Nt=Mu(Oo);Nt.Axios=is,Nt.CanceledError=Vs,Nt.CancelToken=Dc,Nt.isCancel=mu,Nt.VERSION=Au,Nt.toFormData=al,Nt.AxiosError=lt,Nt.Cancel=Nt.CanceledError,Nt.all=function(w){return Promise.all(w)},Nt.spread=nm,Nt.isAxiosError=sm,Nt.mergeConfig=ts,Nt.AxiosHeaders=Gi,Nt.formToJSON=g=>pu(fe.isHTMLForm(g)?new FormData(g):g),Nt.getAdapter=ku.getAdapter,Nt.HttpStatusCode=Lc,Nt.default=Nt;const Rc=(g,w=300)=>{let E;return function(...N){clearTimeout(E),E=setTimeout(()=>{g.apply(this,N)},w)}};function dl(g,w,E={}){const C={type:"Feature"};return(E.id===0||E.id)&&(C.id=E.id),E.bbox&&(C.bbox=E.bbox),C.properties=w||{},C.geometry=g,C}function om(g,w,E={}){if(!g)throw new Error("coordinates is required");if(!Array.isArray(g))throw new Error("coordinates must be an Array");if(g.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ru(g[0])||!Ru(g[1]))throw new Error("coordinates must contain numbers");return dl({type:"Point",coordinates:g},w,E)}function zu(g,w,E={}){for(const N of g){if(N.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(N[N.length-1].length!==N[0].length)throw new Error("First and last Position are not equivalent.");for(let W=0;W<N[N.length-1].length;W++)if(N[N.length-1][W]!==N[0][W])throw new Error("First and last Position are not equivalent.")}return dl({type:"Polygon",coordinates:g},w,E)}function Du(g,w,E={}){return dl({type:"MultiPoint",coordinates:g},w,E)}function Lu(g,w,E={}){return dl({type:"MultiPolygon",coordinates:g},w,E)}function Ru(g){return!isNaN(g)&&g!==null&&!Array.isArray(g)}function Bu(g,w,E){if(g!==null)for(var C,N,W,T,c,ye,xe,be=0,le=0,ae,dt=g.type,Ze=dt==="FeatureCollection",tt=dt==="Feature",Ne=Ze?g.features.length:1,ft=0;ft<Ne;ft++){xe=Ze?g.features[ft].geometry:tt?g.geometry:g,ae=xe?xe.type==="GeometryCollection":!1,c=ae?xe.geometries.length:1;for(var ct=0;ct<c;ct++){var He=0,Ft=0;if(T=ae?xe.geometries[ct]:xe,T!==null){ye=T.coordinates;var Pt=T.type;switch(be=0,Pt){case null:break;case"Point":if(w(ye,le,ft,He,Ft)===!1)return!1;le++,He++;break;case"LineString":case"MultiPoint":for(C=0;C<ye.length;C++){if(w(ye[C],le,ft,He,Ft)===!1)return!1;le++,Pt==="MultiPoint"&&He++}Pt==="LineString"&&He++;break;case"Polygon":case"MultiLineString":for(C=0;C<ye.length;C++){for(N=0;N<ye[C].length-be;N++){if(w(ye[C][N],le,ft,He,Ft)===!1)return!1;le++}Pt==="MultiLineString"&&He++,Pt==="Polygon"&&Ft++}Pt==="Polygon"&&He++;break;case"MultiPolygon":for(C=0;C<ye.length;C++){for(Ft=0,N=0;N<ye[C].length;N++){for(W=0;W<ye[C][N].length-be;W++){if(w(ye[C][N][W],le,ft,He,Ft)===!1)return!1;le++}Ft++}He++}break;case"GeometryCollection":for(C=0;C<T.geometries.length;C++)if(Bu(T.geometries[C],w)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Fu(g,w={}){if(g.bbox!=null&&w.recompute!==!0)return g.bbox;const E=[1/0,1/0,-1/0,-1/0];return Bu(g,C=>{E[0]>C[0]&&(E[0]=C[0]),E[1]>C[1]&&(E[1]=C[1]),E[2]<C[0]&&(E[2]=C[0]),E[3]<C[1]&&(E[3]=C[1])}),E}function Ou(g,w={}){const E=Fu(g),C=(E[0]+E[2])/2,N=(E[1]+E[3])/2;return om([C,N],w.properties,w)}const am={mixins:[yc],props:{map:{type:Object},baseLayers:{type:Array,default:[{id:"orto10",name:"Ortophoto 1:10К",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",service:"TMS",category:"Національна інфраструктура геопросторових даних",scale:1e4,year:2020,bounds:"ua",maxzoom:18,owner:"НДІГК (Інститут геодезії та картографії)",image:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4954/2876.png",basemap:!0},{id:"graymap",name:"Сіра карта",url:"https://basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",service:"TMS",category:"Базові карти",attribution:"© <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, © <a href='https://carto.com/attributions'>CARTO</a>",bounds1:"ua",image:"https://basemaps.cartocdn.com/light_all/10/601/348.png",position:0,owner:"OSM",basemap:!0},{id:"darkmap_carto",name:"Темна карта України",image:"https://basemaps.cartocdn.com/dark_all/13/4791/2762.png?ver=2023-04-14",url:"https://basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",service:"TMS",category:"Базові карти",active:!1}]}},data(){return{selectedLayer:null}},watch:{map(g){g&&g.on("load",this.handleMapLoad)}},methods:{handleMapLoad(){var g;this.baseLayers.forEach(w=>{this.layerList.push(w)}),this.toggleLayerVisibility((g=this.baseLayers[0])==null?void 0:g.id)},toggleLayerVisibility(g){this.selectedLayer=g,this.changeBaseLayer(this.selectedLayer)}}},lm={class:"vs-map-slot-layers"},cm=["onClick"],hm=["src"];function um(g,w,E,C,N,W){return ee.openBlock(),ee.createElementBlock("div",lm,[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(E.baseLayers,(T,c)=>(ee.openBlock(),ee.createElementBlock("div",{key:T.id,class:ee.normalizeClass(["vs-map-slot-layers__layer relative",{focused:T.id==N.selectedLayer}]),onClick:ye=>W.toggleLayerVisibility(T.id)},[ee.createElementVNode("img",{src:T.image,class:"vs-map-slot-layers__image"},null,8,hm),ee.createElementVNode("div",{class:ee.normalizeClass(["absolute py-2 px-4 text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg top-[-46px] text-nowrap p-2 hidden whitespace-nowrap",[c===0?"left-[-10px]":"left-[50%] translate-x-[-50%] "]])},ee.toDisplayString(T==null?void 0:T.name),3)],10,cm))),128))])}const dm=Or(am,[["render",um],["__scopeId","data-v-d4fbd7d5"]]),pm={props:["colors","strokes","title"],methods:{capitalizeFirstLetter(g){return g?g.charAt(0).toUpperCase()+g.slice(1):""}}},fm={class:"absolute left-[20px] bottom-[74px] bg-white max-w-[250px] p-[10px] rounded-lg"},mm={key:0,class:"mb-[10px] text-[1rem]"},gm={key:1},_m={class:"legend-item flex items-center gap-2"},ym={class:"ml-1 text-[0.875rem]"},xm={class:"legend-item"},vm={key:0,class:"flex justify-start items-center gap-2"},bm={class:"ml-1 text-[0.875rem]"};function wm(g,w,E,C,N,W){var T;return ee.openBlock(),ee.createElementBlock("div",fm,[E.title?(ee.openBlock(),ee.createElementBlock("div",mm,ee.toDisplayString(E.title),1)):ee.createCommentVNode("",!0),(T=E.strokes)!=null&&T.length?(ee.openBlock(),ee.createElementBlock("div",gm,[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(E.strokes,c=>(ee.openBlock(),ee.createElementBlock("div",_m,[ee.createElementVNode("div",{class:"w-[15px] h-[4px]",style:ee.normalizeStyle({background:`repeating-linear-gradient(to right, ${c.color}, ${c.color} 5px, transparent 5px, transparent 8px)`})},null,4),ee.createElementVNode("div",ym,ee.toDisplayString(W.capitalizeFirstLetter(c.text)),1)]))),256))])):ee.createCommentVNode("",!0),(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(E.colors,c=>(ee.openBlock(),ee.createElementBlock("div",xm,[c.id>0?(ee.openBlock(),ee.createElementBlock("div",vm,[ee.createElementVNode("div",{class:"w-[15px] h-[15px] rounded-[50%] min-w-[15px]",style:ee.normalizeStyle({backgroundColor:c.color})},null,4),ee.createElementVNode("div",bm,ee.toDisplayString(W.capitalizeFirstLetter(c.text)),1)])):ee.createCommentVNode("",!0)]))),256))])}const Sm={components:{MapSlotLayers:dm,MapLegend:Or(pm,[["render",wm]])},props:{colorAttr:null,strokeAttr:null,zoom:{type:Array,default:()=>8},defaultColor:{type:String,default:"blue"},legendname:{type:String,default:()=>""},height:{type:String,default:()=>"100vh"},width:{type:String,default:"100vw"},center:{type:Array,default:[32,49]},maxBounds:{type:Array,default:[[22,44],[40,52]]},table:{type:String,default:""},zoom:{type:[String,Number],default:13},minZoom:{type:[String,Number],default:1},basemap:Array,filtersParam:{type:String,default:""},row:{type:Object,default:{}},pointZoom:{type:String,default:"12"},legend:{type:Boolean,default:()=>!0}},mixins:[yc],data(){return{map:null,hoverObject:null,popup:null,colors:[]}},async mounted(){var g,w,E,C;try{if(await this.createMap(),(g=this.row)!=null&&g.geom){const{type:N,coordinates:W}=this.row.geom;let T;switch(N){case"Polygon":T=zu(W);break;case"MultiPolygon":T=Lu(W);break;case"MultiPoint":T=Du(W);break;default:(w=this.map)==null||w.fitBounds([W,W],{maxZoom:this.zoom,padding:30}),this.isSelectObj=!0;return}const c=Ou(T).geometry.coordinates;(E=this.map)==null||E.fitBounds([c,c],{maxZoom:this.zoom,padding:30})}(C=this.map)==null||C.fitBounds(this.center)}catch{}},watch:{filtersParam(g){this.setFilter(this.table,g)}},methods:{async getColorStyle(){var g=[["#69D2E7","#A7DBD8","#E0E4CC","#F38630","#FA6900"],["#FE4365","#FC9D9A","#F9CDAD","#C8C8A9","#83AF9B"],["#ECD078","#D95B43","#C02942","#542437","#53777A"]];if(!this.colorAttr)return this.defaultColor;try{const{data:{rows:w}}=await Nt.get(`/api/data/${this.table}/${this.colorAttr}`),E=w.reduce((C,N,W)=>N!=null&&N.id?[...C,N.id.toString(),N.color||g[0][W%5]]:C,["match",["get",this.colorAttr]]);return this.colors=[...w],E.push("gray"),E}catch(w){console.log(w)}},async getStrokeStyle(){if(!this.strokeAttr)return"transparent";try{const{data:{rows:g}}=await Nt.get(`/api/data/${this.table}/${this.strokeAttr}`),w=g.reduce((E,C,N)=>C!=null&&C.id?[...E,{id:C.id.toString(),color:C.color||"#000000",dash:C.dash||[2,2],text:C.text||C.id.toString()}]:E,[]);return this.strokes=[...w],["match",["get",this.strokeAttr],...w.flatMap(({id:E,color:C})=>[E,C]),"transparent"]}catch(g){return console.log(g),"transparent"}},async handleMapLoad(){var C,N;const g=await this.getStrokeStyle(),w=await this.getColorStyle(),E=((N=(C=location.search.split("&").find(W=>W.includes("filter=")))==null?void 0:C.split("filter="))==null?void 0:N[1])||"";await this.addLayer({id:this.table,service:"vector",url:`/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}&dt=${new Date().toISOString()}&filter=${E}`,layers:[{type:"fill","source-layer":this.table,paint:{"fill-color":w,"fill-opacity":.3,"fill-outline-color":["case",["==",["feature-state","hover"],!0],"red","#000000"]},filter:["all",["==",["geometry-type"],"Polygon"]]},{type:"circle","source-layer":this.table,filter:["all",["==",["geometry-type"],"Point"]],paint:{"circle-radius":{base:1.75,stops:[[10,5],[12,6],[18,12]]},"circle-stroke-color":["case",["==",["feature-state","hover"],!0],"red","#ccc"],"circle-stroke-width":["case",["==",["feature-state","hover"],!0],2,1],"circle-color":w}},{id:`${this.table}-stroke`,type:"line","source-layer":this.table,filter:["all",["==",["geometry-type"],"Polygon"]],paint:{"line-color":g,"line-width":2.5,"line-dasharray":[2,2]}}]})},async createMap(){const g={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new il.Map({container:"maplibre-map",style:g,zoom:this.zoom,center:this.center,minZoom:this.minZoom}),this.$parent.map=this.map,this.map.addControl(new il.NavigationControl({visualizePitch:!0})),this.map.on("load",this.handleMapLoad)}}},Tm={class:"vs-map-portal relative"};function Im(g,w,E,C,N,W){const T=ee.resolveComponent("MapLegend"),c=ee.resolveComponent("MapSlotLayers");return ee.openBlock(),ee.createElementBlock("div",Tm,[ee.createElementVNode("div",{id:"maplibre-map",ref:"maplibreMap",class:"w-full",style:ee.normalizeStyle({height:E.height})},null,4),ee.withDirectives(ee.createVNode(T,{colors:N.colors,strokes:g.strokes,title:E.legendname},null,8,["colors","strokes","title"]),[[ee.vShow,E.legend]]),ee.createVNode(c,{map:N.map,baseLayers:E.basemap},null,8,["map","baseLayers"])])}const Pm=Or(Sm,[["render",Im]]),km={},Em={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Am=[ee.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)];function Cm(g,w){return ee.openBlock(),ee.createElementBlock("svg",Em,Am)}const Mm=Or(km,[["render",Cm]]),zm={},Dm={xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-collapse"},Lm=[ee.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),ee.createElementVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null,-1),ee.createElementVNode("path",{d:"M15 4v16"},null,-1),ee.createElementVNode("path",{d:"M9 10l2 2l-2 2"},null,-1)];function Rm(g,w){return ee.openBlock(),ee.createElementBlock("svg",Dm,Lm)}const Bm=Or(zm,[["render",Rm]]),Fm={},Om={xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-expand"},Vm=[ee.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),ee.createElementVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null,-1),ee.createElementVNode("path",{d:"M15 4v16"},null,-1),ee.createElementVNode("path",{d:"M10 10l-2 2l2 2"},null,-1)];function Nm(g,w){return ee.openBlock(),ee.createElementBlock("svg",Om,Vm)}const Um=Or(Fm,[["render",Nm]]),jm={},$m={class:"shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},qm=[ee.createElementVNode("path",{d:"M18 6 6 18"},null,-1),ee.createElementVNode("path",{d:"m6 6 12 12"},null,-1)];function Zm(g,w){return ee.openBlock(),ee.createElementBlock("svg",$m,qm)}const Gm=Or(jm,[["render",Zm]]),Hm={props:{visible:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},size:{type:String,default:()=>""}},emits:["update:visible","onClose"],name:"vs-dialog",mounted(){window.addEventListener("keydown",this.checkKey)},unmounted(){window.removeEventListener("keydown",this.checkKey)},computed:{hasSlot(){var g;return!!((g=this.$slots)!=null&&g.footer)},checkSize(){return this.size==="small"?"w-5/12":this.size==="medium"?"w-6/12":"lg:w-7/12 w-11/12"}},methods:{checkKey({key:g}){g==="Escape"&&this.handleClose()},handleClose(){this.$emit("update:visible",!1),this.$emit("onClose")}}},Vu=g=>(ee.pushScopeId("data-v-37405773"),g=g(),ee.popScopeId(),g),Xm={class:"vsTailwind ui-dialog__wrapper"},Wm={class:"w-full h-full fixed top-0 start-0 z-[80] bg-black bg-opacity-50"},Jm={class:"py-2.5 px-4 flex justify-between items-center border-b"},Km={class:"font-medium text-gray-800"},Ym=[Vu(()=>ee.createElementVNode("span",{class:"sr-only"},"Close",-1)),Vu(()=>ee.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[ee.createElementVNode("path",{d:"M18 6 6 18"}),ee.createElementVNode("path",{d:"m6 6 12 12"})],-1))],Qm={class:"ui-dialog__content p-4"},eg={key:0,class:"flex justify-end gap-x-2"};function tg(g,w,E,C,N,W){return ee.openBlock(),ee.createBlock(ee.Teleport,{to:"#modal"},[ee.createVNode(ee.Transition,{name:"fade"},{default:ee.withCtx(()=>[ee.withDirectives(ee.createElementVNode("div",Xm,[ee.createElementVNode("div",Wm,[ee.createVNode(ee.Transition,{name:"content",appear:""},{default:ee.withCtx(()=>[ee.createElementVNode("div",{class:ee.normalizeClass(["ui-dialog__modal opacity-1 transition-all flex flex-col bg-white border pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",[W.checkSize]])},[ee.createElementVNode("div",Jm,[ee.createElementVNode("h3",Km,ee.toDisplayString(E.title),1),ee.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:w[0]||(w[0]=(...T)=>W.handleClose&&W.handleClose(...T))},Ym)]),ee.createElementVNode("div",Qm,[ee.renderSlot(g.$slots,"default",{},void 0,!0)]),W.hasSlot?(ee.openBlock(),ee.createElementBlock("div",eg,[ee.renderSlot(g.$slots,"footer",{},void 0,!0)])):ee.createCommentVNode("",!0)],2)]),_:3})])],512),[[ee.vShow,E.visible]])]),_:3})])}const ig=Or(Hm,[["render",tg],["__scopeId","data-v-37405773"]]),rg=ee.defineComponent({props:{title:{type:String,default:()=>""},table:{type:String,default:()=>""},rows:{type:Object,default:()=>null},initTotal:{type:[Number,String],default:()=>""},colorAttr:{type:String,default:()=>""},strokeAttr:{type:String,default:()=>""},legendname:{type:String,default:()=>""},center:{type:Array},maxBounds:{type:Array,default:()=>[[22,44.4],[40,52.5]]},id:{type:String,default:()=>""},isAutocomplete:{type:Boolean,default:()=>!1},isAddressAutocomplete:{type:Boolean,default:()=>!1},zoom:{type:[Number,String],default:()=>"13"},minZoom:{type:[Number,String],default:()=>"1"},maskForSearch:{type:String,default:()=>null},searchShow:{type:Boolean,default:()=>!0},basemap:{type:Array},pointZoom:{type:String,default:()=>"12"},legend:{type:Boolean,default:()=>!0},defaultColor:{type:String,default:()=>"blue"}},mixins:[yc],components:{MapPortal:Pm,NoData:Fp,FilterIcon:Mm,VisibleMapIcon:Bm,HiddenMapIcon:Um,CloseIcon:Gm,VsDialog:ig},data(){return{filters:"",search:"",limit:20,polyline:null,filtersParam:"",isSelectObj:!1,selectedId:"",searchRegion:"",searchAddress:"",marker:null,handleSearchRegionDebounced:Rc(g=>this.updateSearchRegionValue(g),500),handleSearchAddressDebounced:Rc(g=>this.updateSearchAddressValue(g),500),searchRegionResult:[],searchAddressResult:[],selectedRow:null,activeFilters:"",isMapVisible:!0,tabsIsVisible:!1,filterUrl:"",currentPage:1,regionOptionGeneral:null,isFilterVisible:!1,tableData:null,hoverData:null,atuData:[],map:null,legendName:null,total:null,filtered:null,filterValues:"",activeFiltersCount:"",visibleTrue:!0,regionSelectValue:null,addressSelectValue:null,currentBbox:null,mountedFilter:{},optionRowsCount:[{value:10,label:"10"},{value:20,label:"20"},{value:30,label:"30"}],handleDebouncedUpdateValue:Rc(g=>{this.handleSearchValue(g)},300)}},watch:{map(){this.map.on("mousemove",this.handleMapHover),this.map.on("click",this.handleMapClick)},activeFiltersCount(){var g,w;return(w=(g=this.$refs)==null?void 0:g.filter)==null?void 0:w.filteredActiveFiltersLength},activeFilters(){var g,w;return this.isSelectObj&&this.moveToDefaultPage(),(w=(g=this.$refs)==null?void 0:g.filter)==null?void 0:w.activeFilters},isFilterVisible(g){g||this.getData()},async regionSelectValue(g,w){var N,W;if(!this.regionSelectValue){this.map.removeSource("region-search-id");return}g&&this.selectedId&&this.closeObjCard(),this.polyline=this.regionSelectValue.encoded_geom,this.getData();const E=((N=this.regionSelectValue)==null?void 0:N.geom)||Sr.toGeoJSON(this.regionSelectValue.encoded_geom),C=this.map.getSource("region-search-id");if(this.currentBbox=Fu(E),C)C.setData({type:"Feature",geometry:E});else{this.map.addSource("region-search-id",{type:"geojson",data:{type:"Feature",geometry:E}});const T={id:"region-search-id",type:"line",source:"region-search-id",paint:{"line-color":"blue","line-opacity":1}};await this.map.addLayer(T)}this.moveLayer("site.prc.parcel_object.table"),(W=this.map)==null||W.fitBounds(this.currentBbox,{zoom:this.setAtuZoom,padding:20}),this.getData()},async addressSelectValue(g,w){this.addressSelectValue&&(g&&this.selectedId&&this.closeObjCard(),this.getData())}},created(){this.legendName,this.tableData=this.rows,this.total=this.initTotal,this.id&&(this.selectedRow=this.rows[0],this.selectedId=this.id,this.isSelectObj=!0)},mounted(){this.rows||this.getData();const w=new URLSearchParams(window.location.search).get("filter"),E=w==null?void 0:w.split("|");E==null||E.forEach(N=>{const[W,T]=N.split("=");T!=null&&T.includes(",")?this.mountedFilter[W]=T==null?void 0:T.split(","):this.mountedFilter[W]=T});const C=new URLSearchParams(window.location.search);this.currentPage=C.get("page")||1,this.getFilter()},updated(){this.checkFilterLength()},computed:{setAtuZoom(){var g,w,E;return((g=this.regionSelectValue)==null?void 0:g.id)==="UA80000000000093317"||((w=this.regionSelectValue)==null?void 0:w.id)==="UA85000000000065278"?10:((E=this.regionSelectValue)==null?void 0:E.region)===""?7.5:11}},methods:{async updateSearchRegionValue(g){this.searchRegion=g,await this.getReginOptions()},async updateSearchAddressValue(g){this.searchAddress=g,await this.getAddressOptions()},async getData(){try{const g={search:this.search||null,limit:this.limit,page:this.currentPage,polyline:this.polyline};g.filter=this.filtersParam;const{data:w}=await Nt.get(`/api/data/${this.table}`,{params:g});this.tableData=w==null?void 0:w.rows,this.total=w.filtered,this.filtered=w.filtered}catch(g){console.error(g.message)}},moveToDefaultPage(){var C;const g=new URLSearchParams(window.location.search);g.delete("id");const E=`${window.location.pathname}?${g.toString()}`;(C=this.map)==null||C.fitBounds(this.maxBounds,{}),window.history.pushState({},"",E),this.isSelectObj=!1},regionFullName(g){return g.region?`${g.text} / ${g.region}`:g.text},getLabelById(g){const w=this.filters.find(E=>E.id===g);return w?w.label:g},getOptionsLabelById(g,w){if(Array.isArray(w)){const E=this.filters.find(C=>C.id===g);return E!=null&&E.options?E==null?void 0:E.options.filter(C=>w.includes(C.id)).map(C=>C.text).join(", "):w==null?void 0:w.length}else return w},async clearFilter(g){var w,E;(E=(w=this.$refs)==null?void 0:w.filter)==null||E.clearFilter(g),await this.updateTableAndMap(),await this.getData()},async getReginOptions(){if(this.searchRegion===""&&this.regionOptionGeneral)this.searchRegionResult=this.regionOptionGeneral;else try{const{data:g}=await Nt.get(`https://data.softpro.ua/api-user/suggest/atu.codifier.type.polyline.select.region?key=${this.searchRegion}`);this.searchRegionResult=g,this.regionOptionGeneral||(this.regionOptionGeneral=g)}catch(g){console.error(g.message)}},async getAddressOptions(){if(this.searchAddress===""&&this.addressOptionGeneral)this.searchAddressResult=this.addressOptionGeneral;else try{const{data:g}=await Nt.get(`/api/suggest/itree.address_id?key=${this.searchAddress}`);this.searchAddressResult=g,this.addressOptionGeneral||(this.addressOptionGeneral=g)}catch(g){console.error(g.message)}},handlePageChange(g){this.currentPage=g;const w=new URL(window.location.href),E=new URLSearchParams(window.location.search);E.set("page",g),w.search=decodeURI(E.toString()),window.history.pushState({},"",w),this.getData()},async getFilter(){var g;try{const{data:w}=await Nt.get(`/api/filter/${this.table}`);this.filters=(g=w==null?void 0:w.list)==null?void 0:g.map(E=>({...E,label:(E==null?void 0:E.label)||(E==null?void 0:E.ua),id:(E==null?void 0:E.id)||(E==null?void 0:E.name)}))}catch(w){console.error(w.message)}},async handleSearchValue(g){this.search=g,await this.getData()},closeObjCard(){var C;const g=new URLSearchParams(window.location.search);g.delete("id"),this.deletePulsePoint(),this.deleteHighlighPolygon();const E=`${window.location.pathname}?${g.toString()}`;(this.currentBbox||this.center)&&((C=this.map)==null||C.fitBounds(this.currentBbox||[this.center,this.center],{maxZoom:this.zoom})),window.history.pushState({},"",E),this.isSelectObj=!1,this.selectedRow=null,this.getData()},async handleSearchRegionValue(g){var E;const w=this.map.getLayer("region-search-id");this.searchRegion=g,g===""&&w?((E=this.map)==null||E.fitBounds(this.maxBounds,{}),this.currentBbox=null,this.polyline=null,this.map.removeLayer("region-search-id"),this.getData()):g===""&&this.getData()},async handleSearchAddressValue(g){var E;const w=this.map.getLayer("address-search-id");this.searchAddress=g,g===""&&w?((E=this.map)==null||E.fitBounds(this.maxBounds,{}),this.currentBbox=null,this.polyline=null,this.map.removeLayer("address-search-id"),this.getData()):g===""&&this.getData()},handleFilterChange(g){this.currentPage=g.state.page||1,this.filterUrl=g.url==="no-url"?null:g.url.split("|").filter(w=>!w.includes("page=")).join("|")},async updateTableAndMap(){var g,w;this.selectedRow||(this.filtersParam=this.filterUrl,this.activeFilters=(w=(g=this.$refs)==null?void 0:g.filter)==null?void 0:w.activeFilters,this.isFilterVisible=!1,this.getData())},handleFilterSubmit(){var g;this.isSelectObj="",this.selectedId="",this.selectedId=!1,(g=this.map)==null||g.fitBounds(this.maxBounds,{}),this.isFilterVisible=!1},toggleMapVisible(){this.isMapVisible=!this.isMapVisible},checkUrl(g=!0){const w=new URLSearchParams(window.location.search);w.has("id")?(this.isSelectObj=!0,this.isMapVisible=g,this.selectedId=w.get("id")):(this.isSelectObj=!1,this.selectedId="")},changeLimit(g){this.limit=g,this.currentPage=1,this.getData()},filterModalClose(){this.isFilterVisible=!1},resetFilters(){this.$refs.filter&&(this.$refs.filter.clearAll(),this.search="",this.isFilterVisible=!1,this.filtersParam="",this.polyline=null,this.regionSelectValue=null,this.addressSelectValue=null,this.currentBbox=null,this.activeFilters=null,this.tabsIsVisible=!1,this.handleSearchRegionValue(""),this.handleSearchAddressValue(""))},checkFilterLength(){var w,E;const g=(E=(w=this.$refs)==null?void 0:w.filter)==null?void 0:E.filteredActiveFiltersLength;g!==this.previousLength&&(this.previousLength=g,this.activeFiltersCount=g)},async handleMapClick(g){var W,T,c,ye,xe,be,le,ae;const w=this.map.queryRenderedFeatures(g.point);if((w==null?void 0:w.length)<1)return;const E=window.location.pathname,C=new URLSearchParams(window.location.search);C.set("id",`${(W=w[0])==null?void 0:W.properties.id}`),this.getObjectData((c=(T=w[0])==null?void 0:T.properties)==null?void 0:c.id);const N=`${E}?${C.toString()}`;window.history.pushState({},"",N),this.isSelectObj=!0,g.lngLat&&((ae=this.map)==null||ae.fitBounds([[(ye=g.lngLat)==null?void 0:ye.lng,(xe=g.lngLat)==null?void 0:xe.lat],[(be=g.lngLat)==null?void 0:be.lng,(le=g.lngLat)==null?void 0:le.lat]],{padding:30})),this.checkUrl()},async getObjectData(g){var w,E;try{const{data:C}=await Nt.get(`/api/data/${this.table}/${g}`);this.selectRow((w=C==null?void 0:C.rows)==null?void 0:w[0]),((E=C==null?void 0:C.rows)==null?void 0:E.lenght)<1&&this.deletePulsePoint()}catch(C){console.error(C.message)}},async selectRow(g,w=!0){var c,ye,xe;this.isMapVisible=w;const C=await(await fetch(`/api/data/${this.table}/${g.id}`)).json();this.selectedRow=((c=C==null?void 0:C.rows)==null?void 0:c[0])||g;const N=window.location.pathname,W=new URLSearchParams(window.location.search);W.set("id",`${g.id}`);const T=`${N}?${W.toString()}`;if(window.history.pushState({},"",T),this.checkUrl(w),g!=null&&g.geom){const{type:be,coordinates:le}=g.geom;let ae;switch(be){case"Polygon":ae=zu(le);break;case"MultiPolygon":ae=Lu(le);break;case"MultiPoint":ae=Du(le);break;default:(ye=this.map)==null||ye.fitBounds([le,le],{maxZoom:15,padding:30}),this.isSelectObj=!0;return}const dt=Ou(ae).geometry.coordinates;(xe=this.map)==null||xe.fitBounds([dt,dt],{maxZoom:15,padding:30})}this.isSelectObj=!0},deletePulsePoint(){this.marker&&this.marker.remove()},addPulsePoint(g){this.deletePulsePoint();const w=document.createElement("div");w.className="gps-marker",w.style.width="10px",w.style.height="10px",w.style.position="relative";const E=document.createElement("div");E.className="gps-wave",w.appendChild(E),this.marker=new il.Marker({element:w,anchor:"center"}).setLngLat(g).addTo(this.map)},deleteHighlighPolygon(){var g,w,E;(g=this.map)!=null&&g.getLayer("highlighted-polygon")&&((w=this.map)==null||w.removeLayer("highlighted-polygon"),(E=this.map)==null||E.removeSource("highlighted-polygon"))},highlightPolygon(g){var w,E,C,N,W,T;this.deletePulsePoint(),this.deleteHighlighPolygon(),(N=this.map)==null||N.addSource("highlighted-polygon",{type:"geojson",data:{geometry:{type:(w=g==null?void 0:g.geom)==null?void 0:w.type,coordinates:(E=g==null?void 0:g.geom)==null?void 0:E.coordinates},type:"Feature",properties:{id:g==null?void 0:g.id,name:g==null?void 0:g.name,category:g==null?void 0:g.id},id:g==null?void 0:g.id,layer:{id:"site.rest_zone.table-0",type:"fill",source:"site.rest_zone.table",sourceLayer:"site.rest_zone.table",filter:["all",["==",["geometry-type"],(C=g==null?void 0:g.geom)==null?void 0:C.type]],paint:{"fill-color":"orange","fill-opacity":.5},layout:{}},source:"site.rest_zone.table",sourceLayer:"site.rest_zone.table",state:{hover:!0},table:"site.rest_zone.table"}}),(W=this.map)==null||W.addLayer({id:"highlighted-polygon",type:"fill",source:"highlighted-polygon",layout:{},minzoom:12,maxzoom:0,paint:{"fill-color":"orange","fill-opacity":.6}}),(T=this.map)==null||T.moveLayer("highlighted-polygon")},async handleMapHover(g){var N,W,T;this.hoverObject&&(this.map.setFeatureState(this.hoverObject,{hover:!1}),this.hoverObject=null),this.popup||(this.popup=new il.Popup({maxWidth:"400px",closeButton:!1,closeOnClick:!1}));const w=this.map.queryRenderedFeatures(g.point);if(this.map.getCanvas().style.cursor="pointer",!(w!=null&&w.length)||((N=w==null?void 0:w[0])==null?void 0:N.source)==="region-search-id"){this.map.getCanvas().style.cursor="",this.popup.remove();return}const E=w[0].geometry.coordinates.slice();w[0].source==="highlighted-polygon"&&w[1]?this.hoverData=(W=w[1])==null?void 0:W.properties:this.hoverData=(T=w[0])==null?void 0:T.properties;const C={source:w[0].source,sourceLayer:w[0].sourceLayer,id:w[0].id};if(C.source!=="region-search-id"){for(this.map.setFeatureState(C,{hover:!0}),this.hoverObject=C;Math.abs(g.lngLat.lng-E[0])>180;)E[0]+=g.lngLat.lng>E[0]?360:-360;this.popup.setLngLat(g.lngLat).setHTML(this.$refs.popup.innerHTML).addTo(this.map)}}}}),ng={class:"ml-3 pt-[20px]"},sg={class:"w-full gap-5 flex justify-between mb-[6px] pr-3"},og={class:"flex items-center gap-2 max-h-[38px] pt-[4px]"},ag={class:"custom-filter-list"},lg={key:0,class:"font-medium text-[10px] min-w-[16px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full"},cg=["title"],hg=ee.createElementVNode("span",{class:"sr-only"},"Відкрити мапу",-1),ug={class:"flex"},dg={class:"py-[15px] pb-[24px] pl-2"},pg={class:"font-bold text-2xl mr-[10px]"},fg={class:"text-sm text-stone-500 font-medium"},mg=ee.createElementVNode("span",{class:"text-sm text-stone-500 font-medium"}," об'єктів",-1),gg={class:"wrapperTable flex flex-col",style:{height:"calc(100vh - 302px)"}},_g={key:0,class:"flex gap-x-2 flex-wrap"},yg={class:"font-medium"},xg=ee.createElementVNode("span",{class:"h-3 mx-2 border-s border-gray-200"},null,-1),vg={class:"text-gray-500"},bg=["onClick"],wg={key:0,class:"mb-[10px] py-1 ps-3 pe-1 inline-flex items-center bg-white border border-gray-200 text-gray-800 text-xs rounded-full"},Sg=ee.createElementVNode("span",{class:"font-medium"}," Очистити ",-1),Tg={key:2,class:"text-center py-28"},Ig=ee.createElementVNode("h2",{class:"font-medium text-base text-gray-500 rounded-xl"}," За вашим запитом даних не знайдено! ",-1),Pg=ee.createElementVNode("p",{class:"font-normal text-sm text-gray-500 rounded-xl"}," Введіть, будь ласка, інші значення для пошуку. ",-1),kg={key:0},Eg={key:1,class:"my-5 pr-2"},Ag={class:"flex justify-between"},Cg={class:"w-2/4"},Mg={class:"map-section"},zg={ref:"popup",style:{display:"none"}};function Dg(g,w,E,C,N,W){var Ne,ft;const T=ee.resolveComponent("VsTextMask"),c=ee.resolveComponent("vs-text"),ye=ee.resolveComponent("FilterIcon"),xe=ee.resolveComponent("VsFilterList"),be=ee.resolveComponent("VisibleMapIcon"),le=ee.resolveComponent("HiddenMapIcon"),ae=ee.resolveComponent("CloseIcon"),dt=ee.resolveComponent("NoData"),Ze=ee.resolveComponent("VsPagination"),tt=ee.resolveComponent("MapPortal");return ee.openBlock(),ee.createElementBlock("section",ng,[ee.createElementVNode("div",null,[ee.createElementVNode("div",sg,[ee.createElementVNode("div",og,[g.maskForSearch?(ee.openBlock(),ee.createBlock(T,{key:0,"model-value":g.search,"onUpdate:modelValue":g.handleDebouncedUpdateValue,class:"w-full table-interface-search",placeholder:"Пошук",mask:g.maskForSearch,icon:"search",iconPosition:"left",clearable:"",style:{height:"38px","min-width":"300px","max-width":"300px"},ref:"searchInput"},null,8,["model-value","onUpdate:modelValue","mask"])):g.searchShow?(ee.openBlock(),ee.createBlock(c,{key:1,"model-value":g.search,"onUpdate:modelValue":g.handleDebouncedUpdateValue,class:"[&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:w-[220px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-lg [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",placeholder:"Пошук",icon:"search","icon-position":"left",clearable:"",style:{height:"38px"},ref:"searchInput"},null,8,["model-value","onUpdate:modelValue"])):ee.createCommentVNode("",!0),ee.createElementVNode("div",ag,[g.filters?(ee.openBlock(),ee.createBlock(xe,{key:0,ref:"filter",modelValue:g.mountedFilter,"onUpdate:modelValue":w[0]||(w[0]=ct=>g.mountedFilter=ct),scheme:g.filters,isDialog:(Ne=g.filters)==null?void 0:Ne.some(ct=>!(ct!=null&&ct.inline)),"apply-vue-router":"",history:"",view:"plain",clearable:!1,name:"filter",onFilterChange:w[1]||(w[1]=async ct=>{await g.handleFilterChange(ct),await g.updateTableAndMap()})},{button:ee.withCtx(({visible:ct})=>[ee.createElementVNode("button",{type:"button",class:ee.normalizeClass(["py-2 px-2.5 h-[40px] inline-flex items-center gap-x-1.5 text-sm font-medium rounded-lg bg-white text-gray-800 hover:bg-gray-50 focus:outline-none focus:bg-gray-50",[ct?"border border-blue-600 border-2":"border border-gray-200"]])},[ee.createVNode(ye),ee.createTextVNode(" Фільтри "),g.activeFiltersCount>=1?(ee.openBlock(),ee.createElementBlock("span",lg,ee.toDisplayString(g.activeFiltersCount),1)):ee.createCommentVNode("",!0)],2)]),_:1},8,["modelValue","scheme","isDialog"])):ee.createCommentVNode("",!0)])]),ee.createElementVNode("button",{type:"button",class:"py-2 px-2 inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100",title:g.isMapVisible?"Приховати карту":"Показати карту",onClick:w[2]||(w[2]=(...ct)=>g.toggleMapVisible&&g.toggleMapVisible(...ct))},[g.isMapVisible?(ee.openBlock(),ee.createBlock(be,{key:0})):(ee.openBlock(),ee.createBlock(le,{key:1})),hg],8,cg)]),ee.createElementVNode("div",ug,[ee.createElementVNode("div",{class:ee.normalizeClass(["relative overflow-hidden",g.isMapVisible?"w-2/4 mr-0":"w-full mr-3",g.isSelectObj?"hidden":""])},[ee.createElementVNode("h1",dg,[ee.createElementVNode("span",pg,ee.toDisplayString(g.title),1),ee.createElementVNode("span",fg,ee.toDisplayString(g.total),1),mg]),ee.createElementVNode("div",gg,[g.activeFilters?(ee.openBlock(),ee.createElementBlock("div",_g,[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(g.activeFilters,(ct,He,Ft)=>(ee.openBlock(),ee.createElementBlock("span",{class:"mb-[10px] py-1 ps-3 pe-1 inline-flex items-center bg-white border border-gray-200 text-gray-800 text-xs rounded-full",key:Ft},[ee.createElementVNode("span",yg,ee.toDisplayString(g.getLabelById(He)),1),xg,ee.createElementVNode("span",vg,ee.toDisplayString(g.getOptionsLabelById(He,ct)),1),ee.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-5 ms-1 rounded-full text-gray-600 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 text-sm",onClick:Pt=>g.clearFilter(He)},[ee.createVNode(ae)],8,bg)]))),128)),((ft=Object.keys(g.activeFilters))==null?void 0:ft.length)>=2?(ee.openBlock(),ee.createElementBlock("span",wg,[Sg,ee.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-5 ms-1 rounded-full text-gray-600 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 text-sm",onClick:w[3]||(w[3]=ct=>g.mountedFilter={})},[ee.createVNode(ae)])])):ee.createCommentVNode("",!0)])):ee.createCommentVNode("",!0),g.total>=1?ee.renderSlot(g.$slots,"table",{key:1,rows:g.tableData,map:g.map,selectRow:g.selectRow,getData:g.getData,isMapVisible:g.isMapVisible}):(ee.openBlock(),ee.createElementBlock("div",Tg,[ee.createVNode(dt),Ig,Pg,ee.createElementVNode("button",{type:"button",class:"mt-[10px] py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs rounded-lg border border-stone-200 bg-white text-stone-800 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100",onClick:w[4]||(w[4]=(...ct)=>g.resetFilters&&g.resetFilters(...ct))}," Очистити дані пошуку ")]))]),g.total>=1?(ee.openBlock(),ee.createElementBlock("hr",kg)):ee.createCommentVNode("",!0),g.total>=1?(ee.openBlock(),ee.createElementBlock("div",Eg,[ee.createElementVNode("div",Ag,[ee.createVNode(Ze,{total:g.total,maxPages:7,defaultPage:g.currentPage,pageSize:g.limit,goTo:!1,size:"medium",onPageChange:g.handlePageChange,backgroundColor:"#e5e7eb",borderedCellSelected:!0,pageSizes:[10,20,30],onPageSizeChange:g.changeLimit},null,8,["total","defaultPage","pageSize","onPageChange","onPageSizeChange"])])])):ee.createCommentVNode("",!0)],2),g.isSelectObj?(ee.openBlock(),ee.createElementBlock("div",{key:0,class:ee.normalizeClass(g.isMapVisible?"w-2/4 mr-0 pb-5":"w-full pb-5 mr-3"),style:{height:"calc(100vh - 152px)"}},[ee.renderSlot(g.$slots,"details",{table:g.table,selectedId:g.selectedId,selectedRow:g.selectedRow,map:g.map,closeObjCard:g.closeObjCard,isMapVisible:g.isMapVisible})],2)):ee.createCommentVNode("",!0),ee.withDirectives(ee.createElementVNode("div",Cg,[ee.createElementVNode("section",Mg,[ee.createVNode(tt,{height:"calc(100vh - 152px)",width:"w-2/4",table:g.table,filtersParam:g.filtersParam,row:g.selectedRow,legendname:g.legendname,legend:g.legend,colorAttr:g.colorAttr,strokeAttr:g.strokeAttr,maxBounds:g.maxBounds,center:g.center,zoom:g.zoom,minZoom:g.minZoom,basemap:g.basemap,pointZoom:g.pointZoom,defaultColor:g.defaultColor},null,8,["table","filtersParam","row","legendname","legend","colorAttr","strokeAttr","maxBounds","center","zoom","minZoom","basemap","pointZoom","defaultColor"])])],512),[[ee.vShow,g.isMapVisible]])]),ee.createElementVNode("div",zg,[ee.renderSlot(g.$slots,"popup",{data:g.hoverData})],512)])])}const Nu=Or(rg,[["render",Dg]]),Uu={install:g=>{g.component("VsPartsMap",Nu)},components:{VsPartsMap:Nu}};return typeof window<"u"&&(window.PartsMap=Uu),Uu});
|