@evergis/api 3.0.178 → 3.0.180
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/LICENSE +20 -20
- package/README.md +21 -21
- package/dist/__generated__/data-contracts.d.ts +180 -180
- package/dist/api.cjs.development.js +16 -8
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +195 -187
- package/dist/api.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@evergis/event-emitter"),n=require("ky"),r=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,s=require("@microsoft/signalr"),i=require("query-string"),o=require("nanoid"),a=require("@evergis/sgis/es/painters/DomPainter/DomPainter"),u=require("@evergis/sgis/es/Map"),l=require("@evergis/sgis/es/layers/TileLayer"),c=require("@evergis/sgis/es/Crs"),p=require("@evergis/sgis/es/layers/DynamicLayer"),h=require("@evergis/sgis");function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){if(null==e)return{};var n,r,s={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(s[n]=e[n]);return s}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?b(e):t}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var s=g(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return x(this,n)}}function T(e,t,n){return(T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var s=Object.getOwnPropertyDescriptor(r,t);return s.get?s.get.call(n):s.value}})(e,t,n||e)}let S=function(){function e(t){var n;void 0===t&&(t={}),y(this,e),this.ky=r.extend(t),this.prefixUrl=(null==(n=t.prefixUrl)?void 0:n.toString())||""}return v(e,[{key:"extend",value:function(e){var t;this.ky=r.extend(e),this.prefixUrl=(null==(t=e.prefixUrl)?void 0:t.toString())||""}},{key:"get",value:function(e,t){return this.ky.get(this.stripSlashes(e),{searchParams:P(t)})}},{key:"post",value:function(e,t,n){const r=j(n,t);return this.ky.post(this.stripSlashes(e),r)}},{key:"put",value:function(e,t,n){const r=j(n,t);return this.ky.put(this.stripSlashes(e),r)}},{key:"patch",value:function(e,t,n){const r=j(n,t);return this.ky.patch(this.stripSlashes(e),r)}},{key:"delete",value:function(e,t,n){const r=j(n,t);return this.ky.delete(this.stripSlashes(e),r)}},{key:"createUrl",value:function(e,t){const n=t?"?"+P(t):"";return this.prefixUrl+this.stripSlashes(e)+n}},{key:"stripSlashes",value:function(e){return this.prefixUrl?e.replace(/^\//g,""):e}}]),e}();function j(e,t){const n={searchParams:P(e)};var r;return void 0!==(r=t)&&"object"==typeof r&&null!==r&&r.constructor===Object||Array.isArray(t)?n.json=t:n.body=t,n}function P(e){return void 0===e&&(e={}),i.stringify(e,{arrayFormat:"comma"})}function I(e){return e instanceof FormData?e:Object.keys(e).reduce((t,n)=>(t.append(n,e[n]),t),new FormData)}let L=v((function e(t){y(this,e),this.http=t})),R=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getAvailiableCs",value:function(){return this.http.get("/srs/list").json()}},{key:"getProj4Representation",value:function(e){return this.http.get("/srs/"+e+"/proj4").text()}},{key:"getWktRepresentation",value:function(e){return this.http.get("/srs/"+e+"/wkt").text()}}]),n}();const C=["taskId","layerName"];let E=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getSearchResult",value:function(e){let{taskId:t,layerName:n}=e,r=m(e,C);return this.http.get("/search/"+t+"/"+n,r).json()}},{key:"getSearchResult1",value:function(e){return this.http.get("/search/"+e).json()}}]),n}();var U;(U=exports.ApiEvent||(exports.ApiEvent={})).ConnectionLost="ConnectionLost",U.Unauthorized="Unauthorized",U.SessionClosed="SessionClosed";let F=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getUsers",value:function(e){return this.http.get("/account/user/list",e).json()}},{key:"getExtendedUsers",value:function(e){return this.http.get("/account/user/extendedlist",e).json()}},{key:"getUserInfo",value:function(e){return this.http.get("/account/"+e).json()}},{key:"getExtendedUserInfo",value:function(e){return this.http.get("/account/extended/"+e).json()}},{key:"isUsernameExists",value:function(e){return this.http.get("/account/user/exists",e).json()}},{key:"isEmailExists",value:function(e){return this.http.get("/account/user/email/exists",e).json()}},{key:"registerUser",value:function(e){return this.http.post("/account/register",e).text()}},{key:"createUser",value:function(e,t){return this.http.post("/account/user",t,e).then(()=>{})}},{key:"updateUser",value:function(e){return this.http.patch("/account/user",e).then(()=>{})}},{key:"confirmEmail",value:function(e){return this.http.post("/account/user/"+e+"/email/confirm",null).then(()=>{})}},{key:"verifyEmail",value:function(e){return this.http.post("/account/user/"+e+"/email/verify",null).then(()=>{})}},{key:"setEmail",value:function(e){return this.http.post("/account/setEmail",I(e)).then(()=>{})}},{key:"confirmEmail1",value:function(e){return this.http.post("/account/user/email/confirm",null,e).then(()=>{})}},{key:"changeEmail",value:function(e){return this.http.post("/account/user/email/change",null,e).then(()=>{})}},{key:"confirmChangeEmail",value:function(e){return this.http.post("/account/user/email/change/confirm",null,e).then(()=>{})}},{key:"setUserPassword",value:function(e){return this.http.patch("/account/password/set",e).then(()=>{})}},{key:"changePassword",value:function(e){return this.http.patch("/account/password/change",I(e)).then(()=>{})}},{key:"resetPassword",value:function(e){return this.http.post("/account/password/reset",null,e).then(()=>{})}},{key:"resetPasswordCallback",value:function(e){return this.http.post("/account/password/reset/confirm",I(e)).then(()=>{})}},{key:"removeUser",value:function(e){return this.http.delete("/account/user/"+e,null).then(()=>{})}},{key:"activateUser",value:function(e){return this.http.post("/account/user/"+e+"/activate",null).then(()=>{})}},{key:"deactivateUser",value:function(e){return this.http.post("/account/user/"+e+"/deactivate",null).then(()=>{})}},{key:"authenticate",value:function(e){return this.http.post("/account/login",e).text()}},{key:"refreshToken",value:function(){return this.http.post("/account/refresh-token",null).text()}},{key:"revokeToken",value:function(){return this.http.delete("/account/revoke-token",null).then(()=>{})}},{key:"ldapLogin",value:function(e){return this.http.post("/account/external/login/ldap",e).then(()=>{})}},{key:"getRoles",value:function(e){return this.http.get("/account/role/list",e).json()}},{key:"createRole",value:function(e){return this.http.post("/account/role",e).then(()=>{})}},{key:"updateRole",value:function(e){return this.http.patch("/account/role",e).then(()=>{})}},{key:"removeRole",value:function(e){return this.http.delete("/account/role/"+e,null).then(()=>{})}},{key:"addToRole",value:function(e,t){return this.http.post("/account/user/"+e+"/role/"+t,null).then(()=>{})}},{key:"removeFromRole",value:function(e,t){return this.http.delete("/account/user/"+e+"/role/"+t,null).then(()=>{})}},{key:"postUsedProjects",value:function(e){return this.http.post("/account/latest_projects",e).json()}},{key:"getUsedProjects",value:function(){return this.http.get("/account/latest_projects").json()}},{key:"truncateUsedProjects",value:function(){return this.http.delete("/account/latest_projects",null).then(()=>{})}}]),n}();const N=()=>JSON.parse(localStorage.getItem("@evergis/user-info")||"null")||void 0,A=e=>{if(e){const t=N();localStorage.setItem("@evergis/user-info",JSON.stringify(d({},t,e)))}else localStorage.removeItem("@evergis/user-info")};let D=function(e){k(n,F);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"login",value:async function(e){e&&await T(g(n.prototype),"authenticate",this).call(this,e)}},{key:"fetchCurrentUser",value:async function(){return this.userInfo=await this.getUserInfo(""),this.userInfo}},{key:"username",get:function(){var e;return(null==(e=this.userInfo)?void 0:e.username)||""}},{key:"logout",value:async function(){await this.revokeToken(),A(void 0),this.userInfo={}}},{key:"updateCurrentUser",value:async function(e){await T(g(n.prototype),"updateUser",this).call(this,d({username:this.username},e)),A(e)}},{key:"setPassword",value:function(e){return this.setUserPassword({username:this.username,password:e})}},{key:"isAuth",get:function(){var e;return!(null==(e=this.userInfo)||!e.username)&&"public"!==this.userInfo.username}},{key:"user",get:function(){if(this.userInfo)return this.userInfo;const e=N();return e&&(this.userInfo=e),e}}]),n}();const O=["username"];let B=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getPreview",value:function(e){return this.http.createUrl("/account/user/preview/"+e)}},{key:"uploadPreview",value:function(e,t){let{username:n}=e,r=m(e,O);return this.http.post("/account/user/preview/"+n,I(t),r).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/account/user/preview/"+e,null).then(()=>{})}}]),n}(),M=function(e){k(n,B);var t=w(n);function n(e,r){var s;return y(this,n),(s=t.call(this,e)).userInfo=r,s}return v(n,[{key:"user",get:function(){if(this.userInfo)return this.userInfo;const e=N();return e&&(this.userInfo=e),e}},{key:"username",get:function(){var e;return(null==(e=this.userInfo)?void 0:e.username)||""}},{key:"updateCurrentUserPhoto",value:async function(e,t){const{fileId:n}=await this.uploadPreview(d({username:this.username},t),{file:e});A({profile_photo:n,has_profile_photo:!0})}},{key:"fetchPreview1",value:async function(){var e;const t=this.getPreview(""),n=await fetch(t),r=null!=(e=n.headers.get("content-type"))&&e.includes("text/plain")?await n.text():t+"?r="+Math.random();A({profile_photo:r,has_profile_photo:!0})}},{key:"deleteCurrentUserPhoto",value:async function(){await this.deletePreview(this.username),A({profile_photo:"",has_profile_photo:!1})}}]),n}(),q=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"batchResourcesPermissionsSet",value:function(e){return this.http.put("/bulk/resources/permissions",e).json()}}]),n}(),_=function(e){k(n,q);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const W=["cameraId"],H=["cameraId"],G=["cameraId"],V=["cameraId"],z=["cameraId"];let J=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getCameras",value:function(e){return this.http.get("/cameras",e).json()}},{key:"getArchiveFeed",value:function(e){let{cameraId:t}=e,n=m(e,W);return this.http.get("/cameras/"+t+"/archiveFeed",n).blob()}},{key:"getArchiveTimeline",value:function(e){let{cameraId:t}=e,n=m(e,H);return this.http.get("/cameras/"+t+"/archiveTimeline",n).json()}},{key:"getArchiveCalendar",value:function(e){let{cameraId:t}=e,n=m(e,G);return this.http.get("/cameras/"+t+"/archiveCalendar",n).json()}},{key:"getArchiveSnapshot",value:function(e){let{cameraId:t}=e,n=m(e,V);return this.http.get("/cameras/"+t+"/archiveSnapshot",n).blob()}},{key:"getLiveFeed",value:function(e){let{cameraId:t}=e,n=m(e,z);return this.http.get("/cameras/"+t+"/liveFeed",n).blob()}},{key:"getLiveSnapshot",value:function(e){return this.http.get("/cameras/"+e+"/liveSnapshot").blob()}}]),n}(),Q=function(e){k(n,J);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),K=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getConfigurationsList",value:function(e){return this.http.get("/settings/config",e).json()}},{key:"getConfiguration",value:function(e){return this.http.get("/settings",e).text()}},{key:"setConfiguration",value:function(e,t){return this.http.post("/settings",t,e).then(()=>{})}},{key:"removeConfiguration",value:function(e){return this.http.delete("/settings",null,e).then(()=>{})}}]),n}(),X=function(e){k(n,K);var t=w(n);function n(){var e;return y(this,n),(e=t.apply(this,arguments)).settings={modules:[],connection:{url:""}},e}return v(n,[{key:"fetchClientSettings",value:async function(e){const t=JSON.parse(await this.getConfiguration(e));return this.updateClientSettings(t),t}},{key:"updateClientSettings",value:function(e){Object.assign(this.settings,e)}}]),n}(),Y=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getQueryResult",value:function(e){return this.http.post("/eql/query",e).then(()=>{})}},{key:"getQueryDescription",value:function(e){return this.http.post("/eql/description",e).json()}},{key:"setLayerParameterValue",value:function(e){return this.http.post("/eql/setParam",null,e).then(()=>{})}},{key:"setLayerParameters",value:function(e,t){return this.http.post("/eql/setParams",t,e).then(()=>{})}},{key:"getLayerParameters",value:function(e){return this.http.get("/eql/getParam",e).text()}},{key:"getLayerParameters1",value:function(e){return this.http.get("/eql/getParams",e).json()}},{key:"removeLayerParameterValue",value:function(e){return this.http.delete("/eql/removeParam",null,e).then(()=>{})}}]),n}(),Z=function(e){k(n,Y);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),$=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"vkLogin",value:function(){return this.http.createUrl("/account/external/login/vk")}},{key:"googleLogin",value:function(){return this.http.createUrl("/account/external/login/google")}},{key:"facebookLogin",value:function(){return this.http.createUrl("/account/external/login/facebook")}},{key:"loginCallback",value:function(){return this.http.get("/account/external/login/callback").then(()=>{})}},{key:"unbindVk",value:function(){return this.http.delete("/account/external/unbind/vk",null).then(()=>{})}},{key:"unbindGoogle",value:function(){return this.http.delete("/account/external/unbind/google",null).then(()=>{})}},{key:"unbindFacebook",value:function(){return this.http.delete("/account/external/unbind/facebook",null).then(()=>{})}},{key:"bindVk",value:function(){return this.http.createUrl("/account/external/bind/vk")}},{key:"bindGoogle",value:function(){return this.http.createUrl("/account/external/bind/google")}},{key:"bindFacebook",value:function(){return this.http.createUrl("/account/external/bind/facebook")}},{key:"bindCallback",value:function(){return this.http.get("/account/external/bind/callback").then(()=>{})}}]),n}(),ee=function(e){k(n,$);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"login",value:function(e){switch(e){case"vk":return this.vkLogin();case"google":return this.googleLogin();case"facebook":return this.facebookLogin();default:return""}}},{key:"bind",value:function(e){switch(e){case"vk":return this.bindVk();case"google":return this.bindGoogle();case"facebook":return this.bindFacebook();default:return""}}},{key:"unbind",value:function(e){switch(e){case"vk":return this.unbindVk();case"google":return this.unbindGoogle();case"facebook":return this.unbindFacebook();default:return""}}}]),n}(),te=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"increaseResourcesLimit",value:function(e){return this.http.post("/feedback/limits",null,e).json()}},{key:"moreSymbols",value:function(e){return this.http.post("/feedback/symbol",null,e).json()}},{key:"feedback",value:function(e,t){return this.http.post("/feedback",I(t),e).json()}}]),n}(),ne=function(e){k(n,te);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"postFeedback",value:function(e,t){return this.feedback(e,t)}}]),n}(),re=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"downloadFile",value:function(e){return this.http.get("/upload/file",e).blob()}},{key:"uploadFile",value:function(e){return this.http.post("/upload/file",I(e)).json()}},{key:"deleteFile",value:function(e){return this.http.delete("/upload/file",null,e).then(()=>{})}},{key:"getFileInfo",value:function(e){return this.http.get("/upload/fileInfo",e).json()}}]),n}(),se=function(e){k(n,re);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"upload",value:function(e,t){return this.uploadFile({file:e,rewrite:!!t})}}]),n}(),ie=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"get",value:function(e){return this.http.get("/filters/"+e).text()}},{key:"update",value:function(e,t){return this.http.post("/filters/"+e,t).json()}},{key:"create",value:function(e){return this.http.post("/filters",e).json()}}]),n}(),oe=function(e){k(n,ie);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),ae=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getServerInfo",value:function(){return this.http.get("/").json()}},{key:"getFunctionsList",value:function(){return this.http.get("/functions").json()}}]),n}(),ue=function(e){k(n,ae);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const le=["providerName"],ce=["providerName"],pe=["providerName"];let he=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"geocode",value:function(e){let{providerName:t}=e,n=m(e,le);return this.http.get("/geocode/"+t,n).json()}},{key:"geocodeByPoint",value:function(e){let{providerName:t}=e,n=m(e,ce);return this.http.get("/geocode/"+t+"/geocodeByPoint",n).json()}},{key:"suggest",value:function(e){let{providerName:t}=e,n=m(e,pe);return this.http.get("/geocode/"+t+"/suggest",n).json()}}]),n}(),ye=function(e){k(n,he);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"geocode2Gis",value:function(e){return this.geocode(d({providerName:"geocode2gis"},e))}},{key:"suggest2Gis",value:function(e){return this.suggest(d({providerName:"geocode2gis"},e))}}]),n}(),fe=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"startTask",value:function(e){return this.http.post("/ice-router/tasks",e).text()}},{key:"getResult",value:function(e){return this.http.get("/ice-router/tasks/"+e).json()}}]),n}(),ve=function(e){k(n,fe);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),de=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getDataSchema",value:function(e){return this.http.get("/import/dataSchema",e).json()}},{key:"getFeaturesCount",value:function(e){return this.http.post("/import/count",e).json()}},{key:"readPart",value:function(e){return this.http.get("/import/read",e).then(()=>{})}},{key:"getExternalWmsLayers",value:function(e){return this.http.get("/import/wms",e).json()}},{key:"getExternalPbfLayers",value:function(e){return this.http.get("/import/pbf",e).json()}},{key:"getExternalPbfFeatures",value:function(e){return this.http.get("/import/pbf/features",e).json()}},{key:"getExternalArcgisFsLayers",value:function(e){return this.http.get("/import/arcgisfeatureservice",e).json()}},{key:"getExternalArcGisLayers",value:function(e){return this.http.get("/import/arcgismapservice",e).json()}},{key:"getRasterAttributes",value:function(e){return this.http.get("/import/rasterAttributes",e).json()}},{key:"getRasterMeta",value:function(e){return this.http.get("/import/rasterMeta",e).json()}}]),n}(),ke=function(e){k(n,de);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const ge=["name"],me=["name"],be=["name"],xe=["name","id"],we=["name","id"],Te=["name","id"],Se=["name","x","y","z"],je=["name"],Pe=["name"],Ie=["name"],Le=["name"],Re=["name"],Ce=["name"],Ee=["name"],Ue=["name"],Fe=["name"],Ne=["name"],Ae=["name"],De=["layerName"],Oe=["name","id"];let Be=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getLayersList",value:function(e){return this.http.get("/layers",e).json()}},{key:"setPermissionsBatch",value:function(e){return this.http.put("/layers",e).then(()=>{})}},{key:"deleteResources",value:function(e){return this.http.delete("/layers",null,e).json()}},{key:"getLayerInfo",value:function(e){return this.http.get("/layers/"+e).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/layers/"+e,null).then(()=>{})}},{key:"getLayersInfo",value:function(e){return this.http.get("/layers/batchInfo",e).json()}},{key:"publishMapboxService",value:function(e){return this.http.post("/layers",e,{type:"Mapbox"}).json()}},{key:"publishProxyService",value:function(e){return this.http.post("/layers",e,{type:"ProxyService"}).json()}},{key:"publishRouteService",value:function(e){return this.http.post("/layers",e,{type:"RouteService"}).then(()=>{})}},{key:"publishLinearService",value:function(e){return this.http.post("/layers",e,{type:"LinearService"}).then(()=>{})}},{key:"publishRemoteTileService",value:function(e){return this.http.post("/layers",e,{type:"RemoteTileService"}).json()}},{key:"publishLocalTileService",value:function(e){return this.http.post("/layers",e,{type:"LocalTileService"}).json()}},{key:"publishPostgresLayerService",value:function(e){return this.http.post("/layers",e,{type:"PostgresLayerService"}).json()}},{key:"publishQueryLayerService",value:function(e){return this.http.post("/layers",e,{type:"QueryLayerService"}).json()}},{key:"publishPostgresTileCatalogService",value:function(e){return this.http.post("/layers",e,{type:"PostgresTileLayerService"}).json()}},{key:"publishStyledLayerService",value:function(e){return this.http.post("/layers",e,{type:"StyledFeatureLayer"}).json()}},{key:"updateMapboxService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"Mapbox"}).json()}},{key:"updateProxyService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"ProxyService"}).json()}},{key:"updateTileCatalogService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"PostgresTileLayerService"}).json()}},{key:"publishCompositeService",value:function(e){return this.http.post("/layers",e,{type:"CompositeService"}).json()}},{key:"updateRemoteTileService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"RemoteTileService"}).json()}},{key:"updateLocalTileService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"LocalTileService"}).json()}},{key:"updatePostgresLayerService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"PostgresLayerService"}).json()}},{key:"updateQueryLayerService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"QueryLayerService"}).json()}},{key:"updateCompositeService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"CompositeService"}).json()}},{key:"reloadService",value:function(e){return this.http.get("/layers/"+e+"/reload").json()}},{key:"getFeatures",value:function(e,t){return this.http.post("/layers/"+e+"/features/query",t).json()}},{key:"getFeatures1",value:function(e){let{name:t}=e,n=m(e,ge);return this.http.get("/layers/"+t+"/features",n).json()}},{key:"deleteFeature",value:function(e){let{name:t}=e,n=m(e,me);return this.http.delete("/layers/"+t+"/features",null,n).json()}},{key:"createFeatures",value:function(e,t){return this.http.post("/layers/"+e+"/features",t).json()}},{key:"updateFeature",value:function(e,t){return this.http.patch("/layers/"+e+"/features",t).json()}},{key:"featuresContains",value:function(e){let{name:t}=e,n=m(e,be);return this.http.get("/layers/"+t+"/features/contains",n).json()}},{key:"getById",value:function(e){let{name:t,id:n}=e,r=m(e,xe);return this.http.get("/layers/"+t+"/features/"+n,r).json()}},{key:"unite",value:function(e,t){let{name:n,id:r}=e,s=m(e,we);return this.http.post("/layers/"+n+"/features/"+r+"/unite",t,s).json()}},{key:"subtract",value:function(e,t){let{name:n,id:r}=e,s=m(e,Te);return this.http.post("/layers/"+n+"/features/"+r+"/subtract",t,s).json()}},{key:"getTilesLayerImage",value:function(e){let{name:t,x:n,y:r,z:s}=e,i=m(e,Se);return this.http.createUrl("/layers/"+t+"/tile/"+s+"/"+n+"/"+r,i)}},{key:"getLayerImage",value:function(e){let{name:t}=e,n=m(e,je);return this.http.createUrl("/layers/"+t+"/export",n)}},{key:"getLayerExtent",value:function(e){let{name:t}=e,n=m(e,Pe);return this.http.get("/layers/"+t+"/extent",n).json()}},{key:"getByGeometry",value:function(e){let{name:t}=e,n=m(e,Ie);return this.http.get("/layers/"+t+"/features/getByGeometry",n).json()}},{key:"getByGeometryPost",value:function(e,t){let{name:n}=e,r=m(e,Le);return this.http.post("/layers/"+n+"/features/getByGeometry",t,r).json()}},{key:"deleteFeatures",value:function(e){let{name:t}=e,n=m(e,Re);return this.http.delete("/layers/"+t+"/features/deleteByIds",null,n).json()}},{key:"deleteByCondition",value:function(e){let{name:t}=e,n=m(e,Ce);return this.http.delete("/layers/"+t+"/features/deleteByCondition",null,n).json()}},{key:"getByGeometryGet",value:function(e){let{name:t}=e,n=m(e,Ee);return this.http.get("/layers/"+t+"/features/getByGeometryByClick",n).json()}},{key:"classify",value:function(e){let{name:t}=e,n=m(e,Ue);return this.http.get("/layers/"+t+"/classify",n).json()}},{key:"distincts",value:function(e){let{name:t}=e,n=m(e,Fe);return this.http.get("/layers/"+t+"/distincts",n).json()}},{key:"aggregateAttribute",value:function(e){let{name:t}=e,n=m(e,Ne);return this.http.get("/layers/"+t+"/aggregate-values",n).json()}},{key:"getFilteredFeaturesCount",value:function(e){let{name:t}=e,n=m(e,Ae);return this.http.get("/layers/"+t+"/features/count",n).json()}},{key:"editAttributes",value:function(e,t){return this.http.post("/layers/"+e+"/features/edit-attributes",t).json()}},{key:"selectFeatures",value:function(e){return this.http.get("/layers/features/select",e).json()}},{key:"validateExpression",value:function(e){let{layerName:t}=e,n=m(e,De);return this.http.get("/layers/"+t+"/validateExpression",n).json()}},{key:"getRasterMeta",value:function(e){let{name:t,id:n}=e,r=m(e,Oe);return this.http.get("/layers/"+t+"/"+n+"/metadata",r).json()}},{key:"createRoute",value:function(e,t){return this.http.post("/layers/"+e+"/createRoute",t).json()}},{key:"getPreview",value:function(e){return this.http.createUrl("/layers/"+e+"/preview")}},{key:"setPreview",value:function(e,t){return this.http.post("/layers/"+e+"/preview",I(t)).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/layers/"+e+"/preview",null).then(()=>{})}},{key:"isExists",value:function(e){return this.http.get("/layers/"+e+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(e){return this.http.get("/layers/"+e+"/dependencies").json()}},{key:"getResourceReferences",value:function(e){return this.http.get("/layers/"+e+"/references").json()}},{key:"getPermissions",value:function(e){return this.http.get("/layers/"+e+"/permissions").json()}},{key:"addPermissions",value:function(e,t){return this.http.post("/layers/"+e+"/permissions",t).json()}},{key:"setPermissions",value:function(e,t){return this.http.put("/layers/"+e+"/permissions",t).json()}},{key:"removePermissions",value:function(e,t){return this.http.delete("/layers/"+e+"/permissions/"+t,null).json()}}]),n}();async function Me(e){return(await Promise.all(e.map(e=>e.catch(e=>qe(e)?e:new Error(e))))).filter(_e)}function qe(e){return e instanceof Error}function _e(e){return!qe(e)}const We=["remote"],He=["remote"];let Ge=function(e){k(n,Be);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getLayerInfos",value:function(e){return Me(e.map(e=>this.getLayerInfo(e)))}},{key:"getLayersDeps",value:function(e){return Me(e.map(e=>this.getResourceDependencies(e)))}},{key:"getBasemaps",value:function(e){return this.getLayersList(d({},e,{types:["LocalTileService","RemoteTileService"]}))}},{key:"createSubLayer",value:function(e){return this.publishStyledLayerService(e)}},{key:"createTileLayer",value:function(e){let{remote:t}=e,n=m(e,We);return t?this.publishRemoteTileService(n):this.publishLocalTileService(n)}},{key:"updateTileLayer",value:function(e){let{remote:t}=e,n=m(e,He);return t?this.updateRemoteTileService(n.name,n):this.updateLocalTileService(n.name,n)}},{key:"uploadPreview",value:function(e,t){return this.setPreview(e,{file:t})}},{key:"findOne",value:function(e){return this.getLayerInfo(e)}},{key:"findAll",value:function(e){return this.getLayersList(e)}},{key:"create",value:function(e){return this.publishPostgresLayerService(e)}},{key:"update",value:function(e){return this.updatePostgresLayerService(e.name,e)}},{key:"createQueryLayer",value:function(e){return this.publishQueryLayerService(e)}},{key:"updateQueryLayer",value:function(e){return this.updateQueryLayerService(e.name,e)}},{key:"createProxyLayer",value:function(e){return this.publishProxyService(e)}},{key:"updateProxyLayer",value:function(e){return this.updateProxyService(e.name,e)}},{key:"remove",value:async function(e){return await this.deleteResource(e),e}}]),n}();var Ve;(Ve=exports.ErrorReason||(exports.ErrorReason={})).HTTP_OTHER="other",Ve.HTTP_CLIENT="client",Ve.HTTP_SERVER="server",Ve.UNKNOWN="unknown";const ze=e=>e instanceof n.HTTPError?(e=>{const t=e.response.status;let n=exports.ErrorReason.HTTP_OTHER;return t>=400&&t<500&&(n=exports.ErrorReason.HTTP_CLIENT),t>=500&&(n=exports.ErrorReason.HTTP_SERVER),{type:"http",reason:n,status:t,origin:e}})(e):(e=>({type:"base",reason:exports.ErrorReason.UNKNOWN,origin:e}))(e),Je=e=>e&&e.type&&e.reason;function Qe(e){return function(t){return!!t.type&&e.includes(t.type)}}const Ke=Qe(["PostgresLayerService","PostgresTileLayerService","QueryLayerService"]);function Xe(e){return"string"==typeof e}function Ye(e,t,n){return n.indexOf(e)===t}const Ze=o.customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789",12);(exports.ResourceSeparator||(exports.ResourceSeparator={})).Server=".";let $e=function(){function e(t){let{account:n}=t;y(this,e),this.account=n}return v(e,[{key:"createId",value:function(){return Ze()}},{key:"createResourceName",value:function(e){void 0===e&&(e={});const t=e.workspace||this.account.user&&this.account.user.namespace||"",n=e.name||this.createId(),r=e.separator||exports.ResourceSeparator.Server;return t||console.warn("Resource should have workspace. Check account api"),""+t+r+n}},{key:"createTempResourceName",value:function(e){return void 0===e&&(e={}),this.createResourceName(d({workspace:"temp"},e))}},{key:"extractResource",value:function(e){if(e&&e.includes(exports.ResourceSeparator.Server)){const t=e.split(exports.ResourceSeparator.Server),n=t.pop();return{workspace:t.join(exports.ResourceSeparator.Server),name:n}}return{name:"",workspace:""}}},{key:"extractResourceName",value:function(e){return this.extractResource(e).name||e||""}},{key:"extractResourceWorkspace",value:function(e){return this.extractResource(e).workspace||""}}]),e}(),et=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getNamespaces",value:function(e){return this.http.get("/namespaces",e).json()}},{key:"createNamespace",value:function(e){return this.http.post("/namespaces",null,e).json()}},{key:"getNamespace",value:function(e){return this.http.get("/namespaces/"+e).json()}},{key:"removeNamespace",value:function(e){return this.http.delete("/namespaces/"+e,null).then(()=>{})}}]),n}(),tt=function(e){k(n,et);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),nt=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getSubscriptionList",value:function(){return this.http.get("/notifications/subscribes").json()}},{key:"subscribeOperation",value:function(e){return this.http.post("/notifications/subscribes",null,e).then(()=>{})}},{key:"unsubscribeOperation",value:function(e){return this.http.delete("/notifications/subscribes",null,e).then(()=>{})}},{key:"subscribeListOperation",value:function(e){return this.http.post("/notifications/subscribe-list",e).then(()=>{})}},{key:"unsubscribeListOperation",value:function(e){return this.http.post("/notifications/unsubscribe-list",e).then(()=>{})}}]),n}();var rt;(rt=exports.ConnectionStatus||(exports.ConnectionStatus={})).Initialized="Initialized",rt.Connected="Connected",rt.Break="Break",rt.Lost="Lost",rt.SessionClosed="SessionClosed";let st=function(e){k(r,nt);var n=w(r);function r(e,s,i){var o;return void 0===i&&(i=!1),y(this,r),(o=n.call(this,e)).api=s,o.MAX_WS_RECONNECT_TRIES=10,o.keepAlive=!1,o.reconnectTries=0,o.subscriptions=[],o._connectStatus=exports.ConnectionStatus.Initialized,o.onWsConnected=()=>{o.connectStatus=exports.ConnectionStatus.Connected,o.keepAlive&&(o.keepAliveTimeout=setInterval(()=>{o.ws&&o.ws.send(JSON.stringify({keepAlive:!0}))},5e3))},o.onWsClosed=e=>{4001===e.code||4002===e.code?o.connectStatus=exports.ConnectionStatus.SessionClosed:o.reconnectTries<o.MAX_WS_RECONNECT_TRIES?(o.connectStatus=exports.ConnectionStatus.Break,o.reconnectTries++,o.ws&&(o.ws.onopen=null,o.ws.onclose=null,o.ws.onmessage=null,o.ws=void 0),o.keepAliveTimeout&&clearInterval(o.keepAliveTimeout),setTimeout(()=>{o.connect()},0)):o.connectStatus=exports.ConnectionStatus.Lost},o.onWsMessage=e=>{let t={};try{t=JSON.parse(e.data)}catch(e){console.debug("Failed to parse ws message from sp.")}if("notification"===t.type&&t.data){const{tag:e,data:n}=t.data;e&&o.emitter.emit(e,new it(n))}},o.emitter=new t.EventEmitter,o.keepAlive=i,o}return v(r,[{key:"connectStatus",get:function(){return this._connectStatus},set:function(e){this.emitter.emit("ConnectionStatus",new it(e)),this._connectStatus=e}},{key:"currentWs",get:function(){return this.ws}},{key:"on",value:function(e,t){this.emitter.on(e,t)}},{key:"off",value:function(e,t){this.emitter.off(e,t)}},{key:"subscribe",value:async function(e){this.subscriptions.push(e),setTimeout(()=>{!this.api.isShared&&this.subscriptions.length&&this.subscribeListOperation(this.subscriptions),this.subscriptions=[]},500)}},{key:"unsubscribe",value:async function(e){if((await this.getSubscriptionList()).includes(e))return this.unsubscribeOperation({tag:e})}},{key:"connectWs",value:function(e){const t=e.replace("http://","ws://").replace("https://","wss://");this.wsUrl=t,this.connect()}},{key:"connect",value:function(){this.wsUrl?(this.ws=new WebSocket(this.wsUrl),this.ws.onopen=this.onWsConnected,this.ws.onclose=this.onWsClosed,this.ws.onmessage=this.onWsMessage):console.warn("Connection to WebSocket not allowed. wsUrl not provided")}}]),r}(),it=v((function e(t){y(this,e),this.data=t})),ot=function(e){k(n,K);var t=w(n);function n(){var e;return y(this,n),(e=t.apply(this,arguments)).config=null,e}return v(n,[{key:"fetchPortalSettings",value:async function(e){return this.config=JSON.parse(await this.getConfiguration(e)),this.config}}]),n}(),at=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"print",value:function(e){return this.http.post("/print/print",e).blob()}},{key:"printToHtml",value:function(e){return this.http.post("/print/printHtml",e).text()}},{key:"uploadTemplate",value:function(e,t){return this.http.post("/print/templates",I(t),e).then(()=>{})}},{key:"getTemplates",value:function(){return this.http.get("/print/templates").json()}},{key:"deleteTemplate",value:function(e){return this.http.delete("/print/templates/"+e,null).then(()=>{})}},{key:"getTemplate",value:function(e){return this.http.get("/print/templates/"+e).text()}}]),n}(),ut=function(e){k(n,at);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),lt=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getProjectsList",value:function(e){return this.http.get("/projects",e).json()}},{key:"createProject",value:function(e){return this.http.post("/projects",e).json()}},{key:"setPermissionsBatch",value:function(e){return this.http.put("/projects",e).then(()=>{})}},{key:"deleteResources",value:function(e){return this.http.delete("/projects",null,e).json()}},{key:"updateProject",value:function(e,t){return this.http.patch("/projects/"+e,t).json()}},{key:"getProjectInfo",value:function(e){return this.http.get("/projects/"+e).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/projects/"+e,null).then(()=>{})}},{key:"getProjectsInfo",value:function(e){return this.http.get("/projects/batchInfo",e).json()}},{key:"getProjectLayersExtendedInfo",value:function(e){return this.http.get("/projects/"+e+"/extended-info").json()}},{key:"getTilesLayerImage",value:function(e,t,n,r){return this.http.createUrl("/projects/"+e+"/tile/"+r+"/"+t+"/"+n)}},{key:"getPreview",value:function(e){return this.http.createUrl("/projects/"+e+"/preview")}},{key:"setPreview",value:function(e,t){return this.http.post("/projects/"+e+"/preview",I(t)).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/projects/"+e+"/preview",null).then(()=>{})}},{key:"isExists",value:function(e){return this.http.get("/projects/"+e+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(e){return this.http.get("/projects/"+e+"/dependencies").json()}},{key:"getResourceReferences",value:function(e){return this.http.get("/projects/"+e+"/references").json()}},{key:"getPermissions",value:function(e){return this.http.get("/projects/"+e+"/permissions").json()}},{key:"addPermissions",value:function(e,t){return this.http.post("/projects/"+e+"/permissions",t).json()}},{key:"setPermissions",value:function(e,t){return this.http.put("/projects/"+e+"/permissions",t).json()}},{key:"removePermissions",value:function(e,t){return this.http.delete("/projects/"+e+"/permissions/"+t,null).json()}}]),n}(),ct=function(e){k(n,lt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getProjectInfos",value:function(e){return Me(e.map(e=>this.getProjectInfo(e)))}},{key:"getProjectsDeps",value:function(e){return Me(e.map(e=>this.getResourceDependencies(e)))}},{key:"uploadPreview",value:function(e,t){return this.setPreview(e,{file:t})}},{key:"findOne",value:function(e){return this.getProjectInfo(e)}},{key:"findAll",value:function(e){return this.getProjectsList(e)}},{key:"create",value:function(e){return this.createProject(e)}},{key:"update",value:function(e){return this.updateProject(e.name,e)}},{key:"remove",value:async function(e){return await this.deleteResource(e),e}}]),n}(),pt=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"checkLimits",value:function(e){return this.http.get("/resources/checkLimits",e).json()}},{key:"copyResources",value:function(e){return this.http.post("/resources/copy",e).json()}}]),n}(),ht=function(e){k(n,pt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();var yt;(yt=exports.DependencyType||(exports.DependencyType={})).Layer="Layer",yt.Table="Table",yt.Project="Project";let ft=function(){function e(t,n,r){y(this,e),this.projects=t,this.layers=n,this.tables=r}return v(e,[{key:"getProjectInfosWithDeps",value:async function(e){const t=await this.projects.getProjectInfos(e),n=await this.projects.getProjectsDeps(e),{layers:r,tables:s}=await this.getDependencies(n,!0,!0);return{projects:t,deps:{layers:r,tables:s}}}},{key:"getLayerInfosWithDeps",value:async function(e){const t=await this.layers.getLayerInfos(e),n=await this.layers.getLayersDeps(e),{tables:r}=await this.getDependencies(n,!1,!0);return{layers:t,deps:{tables:r}}}},{key:"getDependencies",value:async function(e,t,n){const{tables:r,layers:s}=e.reduce((e,r)=>{const s=r.dependencies||[];if(t){const t=this.getDependentNames(s,exports.DependencyType.Layer);e.layers.push(...t)}if(n){const t=this.getDependentNames(s,exports.DependencyType.Table);e.tables.push(...t)}return e},{tables:[],layers:[]});return{tables:await this.tables.getTableInfos(r.filter(Ye)),layers:await this.layers.getLayerInfos(s.filter(Ye))}}},{key:"getDependentNames",value:function(e,t){return e.filter(e=>{let{type:n}=e;return n===t}).map(e=>{let{name:t}=e;return t}).filter(Xe)}}]),e}(),vt=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getTaskList",value:function(e){return this.http.get("/scheduler/tasks",e).json()}},{key:"getTaskInfo",value:function(e){return this.http.get("/scheduler/tasks/"+e).json()}},{key:"getTaskProgress",value:function(e){return this.http.get("/scheduler/tasks/"+e+"/progress").json()}},{key:"cancelTask",value:function(e){return this.http.post("/scheduler/tasks/"+e+"/cancel",null).json()}},{key:"startCopyTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"copy"}).json()}},{key:"startAggregateTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"aggregate"}).json()}},{key:"startBufferTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"buffer"}).json()}},{key:"startPrintTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"print"}).json()}},{key:"startTilingTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"tiling"}).json()}},{key:"startTilingTask1",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"rasterVrt"}).json()}},{key:"startNetCdfTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"netcdf"}).json()}},{key:"startRouteTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"route"}).json()}},{key:"startUnionTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"union"}).json()}},{key:"startOverlayTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"overlay"}).json()}},{key:"startFilterCopyTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"filterCopy"}).json()}},{key:"startPipelineTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"pipeline"}).json()}},{key:"startEditAttributesBatch",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"editAttributes"}).json()}},{key:"universalSearchTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"universalSearch"}).json()}}]),n}(),dt=function(e){k(n,vt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"init",value:function(e){return this.notification=e,this.notification.subscribe("server_task")}},{key:"runCopyTask",value:async function(e){const{taskId:t}=await this.startCopyTask(e);return this.processTaskId(t)}},{key:"runBufferTask",value:async function(e){const{taskId:t}=await this.startBufferTask(e);return this.processTaskId(t)}},{key:"runUnionTask",value:async function(e){const{taskId:t}=await this.startUnionTask(e);return this.processTaskId(t)}},{key:"runPrintTask",value:async function(e){const{taskId:t}=await this.startPrintTask(e);return this.processTaskId(t)}},{key:"runTilingTask",value:async function(e){const{taskId:t}=await this.startTilingTask(e);return this.processTaskId(t)}},{key:"runRouteTask",value:async function(e){const{taskId:t}=await this.startRouteTask(e);return this.processTaskId(t)}},{key:"runOverlayTask",value:async function(e){const{taskId:t}=await this.startOverlayTask(e);return this.processTaskId(t)}},{key:"runFilterCopyTask",value:async function(e){const{taskId:t}=await this.startFilterCopyTask(e);return this.processTaskId(t)}},{key:"runPipelineTask",value:async function(e){const{taskId:t}=await this.startPipelineTask(e);return this.processTaskId(t)}},{key:"runEditAttributesTask",value:async function(e){const{taskId:t}=await this.startEditAttributesBatch(e);return this.processTaskId(t)}},{key:"waitTaskCompleted",value:async function(e){return new Promise(async(t,n)=>{const r=await this.getTaskProgress(e);this.resolveTaskStatus(r,t,n);const s=async r=>{let{data:i}=r;if(i.taskId===e&&i.status&&["Completed","Failed","Canceled"].includes(i.status)){const r=await this.getTaskProgress(e);this.notification&&this.notification.off("server_task",s),this.resolveTaskStatus(r,t,n)}};this.notification&&this.notification.on("server_task",s)})}},{key:"resolveTaskStatus",value:function(e,t,n){"Completed"===e.status?t(e):"Failed"!==e.status&&"Canceled"!==e.status||n(e.status)}},{key:"processTaskId",value:function(e){if(e)return this.waitTaskCompleted(e);throw new Error("Task was started with no testId")}}]),n}(),kt=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"findUserByNameByRoles",value:function(e){return this.http.get("/security/findUsersWithRoles",e).json()}},{key:"getUsersAndRoles",value:function(e){return this.http.get("/security/usersandroles",e).json()}},{key:"findUserByName",value:function(e){return this.http.get("/security/users",e).json()}},{key:"getPolicyList",value:function(e){return this.http.get("/security/policies",e).json()}},{key:"removePolicy",value:function(e){return this.http.delete("/security/policies",null,e).then(()=>{})}},{key:"setPolicy",value:function(e){return this.http.post("/security/policies",e).then(()=>{})}}]),n}(),gt=function(e){k(n,kt);var t=w(n);function n(e,r){var s;let{username:i,roles:o}=r;return y(this,n),(s=t.call(this,e)).ownerName="",s.ownerRoles=[],s.ownerName=i,s.ownerRoles=o,s}return v(n,[{key:"reset",value:function(){this.ownerName="",this.ownerRoles=[]}}]),n}(),mt=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"statisticsDb",value:function(e){return this.http.get("/statistics",e).json()}},{key:"classify",value:function(e){return this.http.get("/statistics/classify",e).json()}},{key:"sumOfProduct",value:function(e){return this.http.get("/statistics/sumOfProduct",e).json()}}]),n}(),bt=function(e){k(n,mt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getStatistic",value:function(e){return this.statisticsDb(e)}},{key:"getClassify",value:function(e){return this.classify(e)}}]),n}(),xt=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getStyle",value:function(e){return this.http.get("/styles/"+e).json()}},{key:"updateStyle",value:function(e,t){return this.http.post("/styles/"+e,t).json()}},{key:"createStyle",value:function(e){return this.http.post("/styles",e).json()}},{key:"getAllFonts",value:function(){return this.http.get("/styles/fonts").json()}},{key:"addFont",value:function(e){return this.http.post("/styles/fonts",I(e)).then(()=>{})}},{key:"removeFont",value:function(e){return this.http.delete("/styles/fonts",null,e).then(()=>{})}}]),n}(),wt=function(e){k(n,xt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const Tt=["name"],St=["name"],jt=["name"],Pt=["name"];let It=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getTableList",value:function(e){return this.http.get("/tables",e).json()}},{key:"createTable",value:function(e){return this.http.post("/tables",e).json()}},{key:"setPermissionsBatch",value:function(e){return this.http.put("/tables",e).then(()=>{})}},{key:"deleteResources",value:function(e){return this.http.delete("/tables",null,e).json()}},{key:"updateTable",value:function(e,t){return this.http.patch("/tables/"+e,t).json()}},{key:"putTable",value:function(e,t){return this.http.put("/tables/"+e,t).json()}},{key:"getTableInfo",value:function(e){return this.http.get("/tables/"+e).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/tables/"+e,null).then(()=>{})}},{key:"getTablesInfo",value:function(e){return this.http.get("/tables/batchInfo",e).json()}},{key:"getTableData",value:function(e){let{name:t}=e,n=m(e,Tt);return this.http.get("/tables/"+t+"/data",n).json()}},{key:"writeTableData",value:function(e,t){return this.http.post("/tables/"+e+"/data",t).then(()=>{})}},{key:"updateTableData",value:function(e,t){let{name:n}=e,r=m(e,St);return this.http.patch("/tables/"+n+"/data",t,r).then(()=>{})}},{key:"deleteTableData",value:function(e){let{name:t}=e,n=m(e,jt);return this.http.delete("/tables/"+t+"/data",null,n).then(()=>{})}},{key:"getUniqueDataRows",value:function(e){let{name:t}=e,n=m(e,Pt);return this.http.get("/tables/"+t+"/data/unique-values",n).json()}},{key:"mapTable",value:function(e,t){return this.http.post("/tables/map-table",t,e).json()}},{key:"unmapTable",value:function(e){return this.http.delete("/tables/map-table/"+e,null).then(()=>{})}},{key:"getPreview",value:function(e){return this.http.createUrl("/tables/"+e+"/preview")}},{key:"setPreview",value:function(e,t){return this.http.post("/tables/"+e+"/preview",I(t)).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/tables/"+e+"/preview",null).then(()=>{})}},{key:"isExists",value:function(e){return this.http.get("/tables/"+e+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(e){return this.http.get("/tables/"+e+"/dependencies").json()}},{key:"getResourceReferences",value:function(e){return this.http.get("/tables/"+e+"/references").json()}},{key:"getPermissions",value:function(e){return this.http.get("/tables/"+e+"/permissions").json()}},{key:"addPermissions",value:function(e,t){return this.http.post("/tables/"+e+"/permissions",t).json()}},{key:"setPermissions",value:function(e,t){return this.http.put("/tables/"+e+"/permissions",t).json()}},{key:"removePermissions",value:function(e,t){return this.http.delete("/tables/"+e+"/permissions/"+t,null).json()}}]),n}(),Lt=function(e){k(n,It);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getTableInfos",value:function(e){return Me(e.map(e=>this.getTableInfo(e)))}},{key:"uploadPreview",value:function(e,t){return this.setPreview(e,{file:t})}},{key:"findOne",value:function(e){return this.getTableInfo(e)}},{key:"findAll",value:function(e){return this.getTableList(e)}},{key:"create",value:function(e){return this.createTable(e)}},{key:"update",value:function(e){return this.updateTable(e.name,e)}},{key:"remove",value:async function(e){return await this.deleteResource(e),e}}]),n}(),Rt=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),Ct=function(e){k(n,Rt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const Et=["name","z","x","y"];let Ut=function(e){k(n,L);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getVectorTile",value:function(e){let{name:t,z:n,x:r,y:s}=e,i=m(e,Et);return this.http.get("/vt/"+t+"/"+n+"/"+r+"/"+s+".pbf",i).then(()=>{})}}]),n}(),Ft=function(e){k(n,Ut);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getVt",value:function(e,t,n,r,s){return this.getVectorTile({name:e,z:t,x:n,y:r,isProject:s})}}]),n}();var Nt;(Nt=exports.UrlPath||(exports.UrlPath={})).Base="/map",Nt.Shared="/shared",Nt.Portal="/portal";const At={401:exports.ApiEvent.Unauthorized},Dt=Object.values(exports.UrlPath),Ot=Dt[0];let Bt=function(e){k(i,t.EventEmitter);var r=w(i);function i(e){var t;let{url:o,wsUrl:a,wsKeepAlive:u,snappingHubUrl:l,http:c,urlPath:p,httpOptions:h}=e;y(this,i),t=r.call(this);const{hooks:f}=h||{};return t.http=c||new S(d({prefixUrl:o,timeout:!1},h||{},{hooks:d({},f||{},{beforeRequest:[...f&&f.beforeRequest||[]],afterResponse:[e=>{const r=At[e.status];return r&&t.emit(r,ze(new n.HTTPError(e))),e},...f&&f.afterResponse||[]]})})),t.url=o,t.wsUrl=a||o,t.urlPath=p||t.defineUrlPath(),t.layers=new Ge(t.http),t.tables=new Lt(t.http),t.projects=new ct(t.http),t.resources=new ft(t.projects,t.layers,t.tables),t.styles=new wt(t.http),t.account=new D(t.http),t.accountPreview=new M(t.http,t.account),t.bulk=new _(t.http),t.security=new gt(t.http,t.account),t.notification=new st(t.http,b(t),u),t.scheduler=new dt(t.http),t.file=new se(t.http),t.filters=new oe(t.http),t.import=new ke(t.http),t.geocode=new ye(t.http),t.cameras=new Q(t.http),t.print=new ut(t.http),t.tools=new Ct(t.http),t.resourceCatalog=new ht(t.http),t.general=new ue(t.http),t.namespace=new tt(t.http),t.external=new ee(t.http),t.clientSettings=new X(t.http),t.portalSettings=new ot(t.http),t.iceRouter=new ve(t.http),t.statistic=new bt(t.http),t.feedback=new ne(t.http),t.vectorTiles=new Ft(t.http),t.universalSearch=new E(t.http),t.spatialReference=new R(t.http),t.eqlTest=new Z(t.http),t.names=new $e({account:t.account}),t.snappingHub=l?(new s.HubConnectionBuilder).withUrl(l,{withCredentials:!0,skipNegotiation:!0,transport:s.HttpTransportType.WebSockets}).withAutomaticReconnect().build():null,t}return v(i,[{key:"init",value:async function(e){let{authParams:t,connectWs:n,initScheduler:r,fetchSettings:s,fetchUser:i}=e;try{await this.account.login(t),i&&await this.account.fetchCurrentUser(),n&&await this.connectWs(),r&&await this.initScheduler(),s&&await this.clientSettings.fetchClientSettings({urlPath:this.urlPath}),await this.notification.subscribe("service_update")}catch(e){throw ze(e)}}},{key:"isAcceptedNetwork",value:function(e){return["vk","google","facebook"].includes(e)}},{key:"socAuthLogin",value:async function(e){if(this.isAcceptedNetwork(e))try{await this.clientSettings.fetchClientSettings({urlPath:exports.UrlPath.Base})}catch(e){throw ze(e)}}},{key:"connectWs",value:async function(){this.account.isAuth&&(this.notification.connectWs(this.wsUrl),this.notification.on("ConnectionStatus",e=>{e.data===exports.ConnectionStatus.Lost?this.emit(exports.ApiEvent.ConnectionLost,e.data):e.data===exports.ConnectionStatus.SessionClosed&&this.emit(exports.ApiEvent.SessionClosed,e.data)}))}},{key:"connectSignalR",value:async function(){this.account.isAuth&&this.snappingHub&&this.snappingHub.state!==s.HubConnectionState.Connected&&await this.snappingHub.start()}},{key:"logout",value:async function(){await this.account.logout(),await this.security.reset(),this.emit(exports.ApiEvent.Unauthorized,null)}},{key:"initScheduler",value:function(){return this.scheduler.init(this.notification)}},{key:"defineUrlPath",value:function(){const e=(window.location.href.split(window.location.hostname)[1]||"").split("/").filter(Boolean)[0],t=e?"/"+e:void 0;return t&&Dt.includes(t)?t:Ot}},{key:"isShared",get:function(){return this.urlPath===exports.UrlPath.Shared}}]),i}(),Mt=function(e){k(n,l.TileLayer);var t=w(n);function n(e,r){var s;return y(this,n),(s=t.call(this,"",{crs:e.crs,opacity:e.opacity})).api=r,s.name=e.name,s.sourceUrl=e.sourceUrl,s.subDomains=e.subDomains,s}return v(n,[{key:"getTileUrl",value:function(e,t,n){var r;const s=this.name,i=this.subDomains?function(e,t){void 0===e&&(e=0),void 0===t&&(t=100);let n=t-e,r=Math.random();return r=Math.floor(r*n),r+=e,r}(0,(null==(r=this.subDomains)?void 0:r.length)-1):void 0;return this.sourceUrl?(this.subDomains&&void 0!==i?this.sourceUrl.replace("{0}",this.subDomains[i]):this.sourceUrl).replace("{1}",""+n).replace("{2}",""+e).replace("{3}",""+t):this.api.layers.getTilesLayerImage({x:e,y:t,z:n,name:s})}}]),n}();const qt=["name","style","condition","dataFilterId","crs"];let _t=function(e){k(n,p.DynamicLayer);var t=w(n);function n(e,r){var s;let{name:i,style:o,condition:a,dataFilterId:u,crs:l=c.webMercator}=e,p=m(e,qt);return y(this,n),(s=t.call(this,p)).api=r,s.name=i,s.styleId=o,s.conditionQuery=a,s.filterId=u,s.crs=l,s.subscribeRedraw(),s}return v(n,[{key:"style",get:function(){return this.styleId},set:function(e){this.styleId=e,this.forceUpdate()}},{key:"condition",get:function(){return this.conditionQuery},set:function(e){this.conditionQuery=e,this.forceUpdate()}},{key:"dataFilterId",get:function(){return this.filterId},set:function(e){this.filterId=e,this.forceUpdate()}},{key:"getUrl",value:function(e,t){return this.api.layers.getLayerImage({name:this.name,extent:e.coordinates,size:[t.width,t.height],extentSr:e.crs.wkid,styleId:this.styleId,condition:this.conditionQuery,dataFilterId:this.filterId})}},{key:"subscribeRedraw",value:function(){this.api.notification.on("service_update",e=>{(null==e?void 0:e.data.layerName)===this.name&&(this.forceUpdate(),this.redraw())})}}]),n}();const Wt={RemoteTileService:Mt,LocalTileService:Mt,PostgresLayerService:_t,StyledFeatureLayer:_t,CompositeService:null};let Ht=function(){function e(t,n){y(this,e),this.layers=t,this.http=n}return v(e,[{key:"getLayerService",value:async function(e){let t=await this.getLayerInfo(e);const n=t.type;if(!(e=>Boolean(e&&Object.keys(Wt).includes(e)))(n))return;const r=Wt[n];if(r)return new r((e=>d({},e,{name:"services/"+e.name}))(t),this.http);throw new Error('Constructor for service type: "'+t.type+'" not implemented')}},{key:"getLayerInfo",value:async function(e){try{return await this.layers.getLayerInfo(e)}catch(t){throw new Error('Service with name: "'+e+'" not exists')}}}]),e}();var Gt;!function(e){e[e.BaseMaps=0]="BaseMaps",e[e.Layers=1]="Layers"}(Gt||(Gt={}));let Vt=function(e){k(n,Bt);var t=w(n);function n(e,r,s){var i;return y(this,n),(i=t.call(this,r)).map=new u.Map,i.painter=new a.DomPainter(i.map),i.mapProps=e,i.auth=s,i.layersManager=new Ht(i.layers,i.http),i}return v(n,[{key:"init",value:async function(){await T(g(n.prototype),"init",this).call(this,{authParams:this.auth,connectWs:!0,fetchSettings:!0,initScheduler:!0});const{baseService:e,services:t,projectName:r}=this.mapProps;e&&await this.setBaseMap(e),t&&await Promise.all(t.map(e=>this.addLayer(e))),r&&await this.loadProject(r),this.setMapProps()}},{key:"reset",value:async function(){await this.account.logout(),this.painter.wrapper=null}},{key:"addLayer",value:async function(e){await this.insertLayer(e,Gt.Layers)}},{key:"setBaseMap",value:async function(e){await this.insertLayer(e,Gt.BaseMaps)}},{key:"loadProject",value:async function(e){const t=await this.projects.getProjectInfo(e);if(!t||!t.content)return;const{baseMapName:n,items:r}=t.content;if(n&&await this.setBaseMap(n),r){const e=r.map(e=>e.name).filter(zt);await Promise.all(e.map(e=>this.addLayer(e)))}}},{key:"insertLayer",value:async function(e,t){const n=await this.layersManager.getLayerService(e);n&&this.map.insertLayer(n.layer,t)}},{key:"setMapProps",value:function(){const{position:e,centerPoint:t,mapWrapper:n,resolution:r}=this.mapProps;e?this.map.position=e:t&&(this.map.centerPoint=t),r&&(this.map.resolution=r),n&&(this.painter.wrapper=n)}}]),n}();const zt=e=>void 0!==e;var Jt,Qt,Kt,Xt,Yt,Zt,$t,en,tn,nn,rn,sn,on,an,un,ln,cn,pn,hn,yn,fn,vn,dn,kn,gn,mn,bn,xn,wn;(Jt=exports.AggregationFunction||(exports.AggregationFunction={})).None="None",Jt.Array="Array",Jt.Min="Min",Jt.Max="Max",Jt.Avg="Avg",Jt.Sum="Sum",Jt.Extent="Extent",Jt.H3="H3",Jt.Count="Count",Jt.TotalCount="TotalCount",Jt.DistinctCount="DistinctCount",Jt.First="First",Jt.Last="Last",Jt.Median="Median",Jt.Mod="Mod",Jt.StdDeviation="StdDeviation",Jt.SumOfProduct="SumOfProduct",Jt.OnlyValue="OnlyValue",Jt.WeightedAvg="WeightedAvg",Jt.DensityIndicators="DensityIndicators",Jt.DividedSum="DividedSum",(Qt=exports.AttributeSelectorType||(exports.AttributeSelectorType={})).None="None",Qt.SelectFromHandBook="SelectFromHandBook",Qt.SelectFromRange="SelectFromRange",Qt.ViewHandBook="ViewHandBook",(Kt=exports.AttributeType||(exports.AttributeType={})).Unknown="Unknown",Kt.String="String",Kt.Int32="Int32",Kt.Int64="Int64",Kt.Double="Double",Kt.DateTime="DateTime",Kt.Boolean="Boolean",Kt.Point="Point",Kt.Polyline="Polyline",Kt.MultiPolygon="MultiPolygon",Kt.Multipoint="Multipoint",Kt.H3Index="H3Index",Kt.Json="Json",(Xt=exports.ClassificationType||(exports.ClassificationType={})).None="none",Xt.NaturalBreaks="naturalBreaks",Xt.EqualInterval="equalInterval",Xt.Quantile="quantile",Xt.Unique="unique",(Yt=exports.ClassifyAttributeType||(exports.ClassifyAttributeType={})).Decimal="decimal",Yt.DateTime="dateTime",Yt.Text="text",(Zt=exports.ConfigurationErrorEnum||(exports.ConfigurationErrorEnum={})).Unknown="Unknown",Zt.SerializeError="SerializeError",Zt.InvalidDataService="InvalidDataService",Zt.InvalidConfiguration="InvalidConfiguration",Zt.InvalidDataServiceName="InvalidDataServiceName",Zt.InvalidTableName="InvalidTableName",Zt.InvalidLayerName="InvalidLayerName",Zt.ResourceNotFound="ResourceNotFound",Zt.InvalidCondition="InvalidCondition",Zt.InvalidAttributes="InvalidAttributes",Zt.InvalidIdAttribute="InvalidIdAttribute",Zt.InvalidGeometryAttribute="InvalidGeometryAttribute",Zt.InvalidGeometryAttributeType="InvalidGeometryAttributeType",Zt.InvalidColumnName="InvalidColumnName",Zt.InvalidIdColumnSettings="InvalidIdColumnSettings",Zt.ColumnNotExistsInTable="ColumnNotExistsInTable",Zt.InvalidStyle="InvalidStyle",Zt.InvalidLayerType="InvalidLayerType",Zt.ColumnLoadingError="ColumnLoadingError",Zt.InvalidAttributeFormat="InvalidAttributeFormat",Zt.DataSourceNotFound="DataSourceNotFound",Zt.DuplicateColumns="DuplicateColumns",Zt.DuplicateAttributes="DuplicateAttributes",Zt.TableWithoutColumns="TableWithoutColumns",Zt.InvalidTableReferenceConfiguration="InvalidTableReferenceConfiguration",($t=exports.ErrorDetailsType||(exports.ErrorDetailsType={})).ResourceLimitExceeded="ResourceLimitExceeded",$t.ResourceNotFound="ResourceNotFound",$t.InternalError="InternalError",$t.BadRequest="BadRequest",$t.DuplicateContent="DuplicateContent",(en=exports.ErrorType||(exports.ErrorType={})).NotSpecified="NotSpecified",en.LimitError="LimitError",en.ValidationError="ValidationError",en.JwtExpired="JwtExpired",en.TokenInvalid="TokenInvalid",en.RefreshTokenExpired="RefreshTokenExpired",en.RefreshTokenInvalid="RefreshTokenInvalid",en.CreateUserFailed="CreateUserFailed",en.SetUserPasswordFailed="SetUserPasswordFailed",en.SetUserRoleFailed="SetUserRoleFailed",en.UpdateUserFailed="UpdateUserFailed",en.RemoveUserFailed="RemoveUserFailed",en.CreateRoleFailed="CreateRoleFailed",en.UpdateRoleFailed="UpdateRoleFailed",en.RemoveUserRoleFailed="RemoveUserRoleFailed",en.ChangeActiveStateFailed="ChangeActiveStateFailed",en.RemoveRoleFailed="RemoveRoleFailed",en.UserNotFound="UserNotFound",en.RoleNotFound="RoleNotFound",en.EmailNotConfirmed="EmailNotConfirmed",en.DuplicateEmailError="DuplicateEmailError",en.InvalidPassword="InvalidPassword",en.RoleExists="RoleExists",en.UserExists="UserExists",en.UserLockedError="UserLockedError",en.InvalidEmail="InvalidEmail",en.InvalidUsername="InvalidUsername",en.Unauthorized="Unauthorized",en.EmailNotChanged="EmailNotChanged",en.EmailNotSet="EmailNotSet",(tn=exports.FeatureType||(exports.FeatureType={})).Unknown="Unknown",tn.GeometricFeature="GeometricFeature",(nn=exports.FontStyle||(exports.FontStyle={})).Normal="normal",nn.Oblique="oblique",nn.Italic="italic",(rn=exports.FontWeight||(exports.FontWeight={})).Thin="Thin",rn.ExtraLight="ExtraLight",rn.Light="Light",rn.SemiLight="SemiLight",rn.Normal="Normal",rn.Medium="Medium",rn.DemiBold="DemiBold",rn.Bold="Bold",rn.ExtraBold="ExtraBold",rn.Black="Black",rn.ExtraBlack="ExtraBlack",(sn=exports.GeometryType||(exports.GeometryType={})).Unknown="unknown",sn.Point="point",sn.Polyline="polyline",sn.Polygon="multipolygon",sn.Envelope="envelope",sn.Multipoint="multipoint",(on=exports.Group||(exports.Group={})).My="my",on.Role="role",on.Public="public",on.All="all",(an=exports.LineCapStyle||(exports.LineCapStyle={})).Flat="Flat",an.Square="Square",an.Round="Round",an.Triangle="Triangle",(un=exports.LineEndingType||(exports.LineEndingType={})).None="none",un.Arrow="arrow",un.FilledArrow="filledArrow",un.Square="square",un.FilledSquare="filledSquare",un.Circle="circle",un.FilledCircle="filledCircle",un.Diamond="diamond",un.FilledDiamond="filledDiamond",un.RoundSquare="roundSquare",un.FilledRoundSquare="filledRoundSquare",un.Svg="svg",(ln=exports.LineJoinType||(exports.LineJoinType={})).Miter="Miter",ln.Bevel="Bevel",ln.Round="Round",(cn=exports.Operation||(exports.Operation={})).Unknown="Unknown",cn.Union="union",cn.Intersection="intersection",cn.Subtraction="subtraction",cn.SymDifference="symDifference",(pn=exports.PbfSchema||(exports.PbfSchema={})).XYZ="xyz",pn.TMS="tms",(hn=exports.Permissions||(exports.Permissions={})).None="none",hn.Configure="configure",hn.Write="write",hn.Read="read",hn.ReadConfigure="read,configure",hn.ReadWrite="read,write",hn.All="read,write,configure",(yn=exports.PolicyType||(exports.PolicyType={})).Unknown="Unknown",yn.CreateTable="CreateTable",yn.CreateLayer="CreateLayer",yn.CreateProject="CreateProject",yn.MaxFeaturesInOneTable="MaxFeaturesInOneTable",yn.MaxObjectsToExport="MaxObjectsToExport",yn.MaxUploadContentSize="MaxUploadContentSize",(fn=exports.ReferenceJoinType||(exports.ReferenceJoinType={})).OneToMany="OneToMany",fn.OneToOne="OneToOne",fn.Intersect="Intersect",fn.RightJoin="RightJoin",fn.FullJoin="FullJoin",fn.CrossJoin="CrossJoin",(vn=exports.ResourceType||(exports.ResourceType={})).Unknown="Unknown",vn.Table="table",vn.Layer="layer",vn.Project="project",vn.File="file",vn.Feature="feature",vn.Tag="tag",(dn=exports.ResourceTypeLink||(exports.ResourceTypeLink={})).Table="tables",dn.Layer="layers",dn.Project="projects",(kn=exports.ServerTaskStatus||(exports.ServerTaskStatus={})).None="None",kn.Scheduled="Scheduled",kn.Planning="Planning",kn.Executing="Executing",kn.Completed="Completed",kn.Failed="Failed",kn.Canceled="Canceled",kn.Timeout="Timeout",(gn=exports.SimplifyType||(exports.SimplifyType={})).Basic="Basic",gn.PreserveTopology="PreserveTopology",gn.VW="VW",(mn=exports.StringSubType||(exports.StringSubType={})).None="None",mn.Image="Image",mn.PkkCode="PkkCode",mn.Attachments="Attachments",(bn=exports.TaskGroup||(exports.TaskGroup={})).My="my",bn.All="all",(xn=exports.TextAlignment||(exports.TextAlignment={})).Right="right",xn.Left="left",xn.Center="center",xn.Justified="justified",(wn=exports.TextVerticalAlignment||(exports.TextVerticalAlignment={})).Top="top",wn.Bottom="bottom",wn.Middle="middle",Object.defineProperty(exports,"HTTPError",{enumerable:!0,get:function(){return n.HTTPError}}),Object.defineProperty(exports,"TimeoutError",{enumerable:!0,get:function(){return n.TimeoutError}}),exports.Account=D,exports.AccountPreview=M,exports.Api=Bt,exports.BulkOperations=_,exports.Cameras=Q,exports.ClientSettings=X,exports.EqlTest=Z,exports.EvergisDynamicLayer=_t,exports.EvergisTileLayer=Mt,exports.External=ee,exports.Feedback=ne,exports.FileUpload=se,exports.Filters=oe,exports.GEOCODE_PROVIDER="geocode2gis",exports.General=ue,exports.Geocode=ye,exports.HttpClient=S,exports.IceRouter=ve,exports.Import=ke,exports.Layers=Ge,exports.LayersManager=Ht,exports.Names=$e,exports.Namespace=tt,exports.Notification=st,exports.NotificationEvent=it,exports.PortalSettings=ot,exports.Print=ut,exports.Projects=ct,exports.ResourceCatalog=ht,exports.Resources=ft,exports.Scheduler=dt,exports.Security=gt,exports.SpatialProcessor=Vt,exports.Statistic=bt,exports.Styles=wt,exports.Tables=Lt,exports.Tools=Ct,exports.VectorTiles=Ft,exports.addSubDomainToLocation=e=>window.location.protocol+"//"+e+"."+window.location.host,exports.errorHandler=ze,exports.formDataFromFile=function(e){const t=new FormData;return t.append("file",e),t},exports.generateId=Ze,exports.isEvergisDynamicLayer=function(e){return e instanceof _t},exports.isEvergisTileLayer=function(e){return e instanceof Mt},exports.isFeatureLayer=function(e){return e instanceof h.FeatureLayer},exports.isHTTPError=e=>Je(e)&&"http"===e.type,exports.isHandledError=Je,exports.isLayer=Ke,exports.isProjectContentItems=function(e){return null!=e},exports.isString=Xe,exports.isTileLayerService=function(e){return e.type&&/TileService/.test(e.type)},exports.promiseAllIgnoreErrors=Me,exports.stripUselessSlashes=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.join("/").split("/").filter(Boolean).join("/")},exports.toFormData=I,exports.unique=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@evergis/event-emitter"),n=require("ky"),r=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,s=require("@microsoft/signalr"),i=require("query-string"),o=require("nanoid"),a=require("@evergis/sgis/es/painters/DomPainter/DomPainter"),u=require("@evergis/sgis/es/Map"),l=require("@evergis/sgis/es/layers/TileLayer"),c=require("@evergis/sgis/es/Crs"),p=require("@evergis/sgis/es/layers/DynamicLayer"),h=require("@evergis/sgis");function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){if(null==e)return{};var n,r,s={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(s[n]=e[n]);return s}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var s=g(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return x(this,n)}}function T(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}function j(){return(j="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=T(e,t);if(r){var s=Object.getOwnPropertyDescriptor(r,t);return s.get?s.get.call(arguments.length<3?e:n):s.value}}).apply(this,arguments)}let S=function(){function e(t){var n;void 0===t&&(t={}),y(this,e),this.ky=r.extend(t),this.prefixUrl=(null==(n=t.prefixUrl)?void 0:n.toString())||""}return v(e,[{key:"extend",value:function(e){var t;this.ky=r.extend(e),this.prefixUrl=(null==(t=e.prefixUrl)?void 0:t.toString())||""}},{key:"get",value:function(e,t){return this.ky.get(this.stripSlashes(e),{searchParams:I(t)})}},{key:"post",value:function(e,t,n){const r=P(n,t);return this.ky.post(this.stripSlashes(e),r)}},{key:"put",value:function(e,t,n){const r=P(n,t);return this.ky.put(this.stripSlashes(e),r)}},{key:"patch",value:function(e,t,n){const r=P(n,t);return this.ky.patch(this.stripSlashes(e),r)}},{key:"delete",value:function(e,t,n){const r=P(n,t);return this.ky.delete(this.stripSlashes(e),r)}},{key:"createUrl",value:function(e,t){const n=t?"?"+I(t):"";return this.prefixUrl+this.stripSlashes(e)+n}},{key:"stripSlashes",value:function(e){return this.prefixUrl?e.replace(/^\//g,""):e}}]),e}();function P(e,t){const n={searchParams:I(e)};var r;return void 0!==(r=t)&&"object"==typeof r&&null!==r&&r.constructor===Object||Array.isArray(t)?n.json=t:n.body=t,n}function I(e){return void 0===e&&(e={}),i.stringify(e,{arrayFormat:"comma"})}function L(e){return e instanceof FormData?e:Object.keys(e).reduce((t,n)=>(t.append(n,e[n]),t),new FormData)}let R=v((function e(t){y(this,e),this.http=t})),C=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getAvailiableCs",value:function(){return this.http.get("/srs/list").json()}},{key:"getProj4Representation",value:function(e){return this.http.get("/srs/"+e+"/proj4").text()}},{key:"getWktRepresentation",value:function(e){return this.http.get("/srs/"+e+"/wkt").text()}}]),n}();const E=["taskId","layerName"];let U=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getSearchResult",value:function(e){let{taskId:t,layerName:n}=e,r=m(e,E);return this.http.get("/search/"+t+"/"+n,r).json()}},{key:"getSearchResult1",value:function(e){return this.http.get("/search/"+e).json()}}]),n}();var F;(F=exports.ApiEvent||(exports.ApiEvent={})).ConnectionLost="ConnectionLost",F.Unauthorized="Unauthorized",F.SessionClosed="SessionClosed";let N=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getUsers",value:function(e){return this.http.get("/account/user/list",e).json()}},{key:"getExtendedUsers",value:function(e){return this.http.get("/account/user/extendedlist",e).json()}},{key:"getUserInfo",value:function(e){return this.http.get("/account/"+e).json()}},{key:"getExtendedUserInfo",value:function(e){return this.http.get("/account/extended/"+e).json()}},{key:"isUsernameExists",value:function(e){return this.http.get("/account/user/exists",e).json()}},{key:"isEmailExists",value:function(e){return this.http.get("/account/user/email/exists",e).json()}},{key:"registerUser",value:function(e){return this.http.post("/account/register",e).text()}},{key:"createUser",value:function(e,t){return this.http.post("/account/user",t,e).then(()=>{})}},{key:"updateUser",value:function(e){return this.http.patch("/account/user",e).then(()=>{})}},{key:"confirmEmail",value:function(e){return this.http.post("/account/user/"+e+"/email/confirm",null).then(()=>{})}},{key:"verifyEmail",value:function(e){return this.http.post("/account/user/"+e+"/email/verify",null).then(()=>{})}},{key:"setEmail",value:function(e){return this.http.post("/account/setEmail",L(e)).then(()=>{})}},{key:"confirmEmail1",value:function(e){return this.http.post("/account/user/email/confirm",null,e).then(()=>{})}},{key:"changeEmail",value:function(e){return this.http.post("/account/user/email/change",null,e).then(()=>{})}},{key:"confirmChangeEmail",value:function(e){return this.http.post("/account/user/email/change/confirm",null,e).then(()=>{})}},{key:"setUserPassword",value:function(e){return this.http.patch("/account/password/set",e).then(()=>{})}},{key:"changePassword",value:function(e){return this.http.patch("/account/password/change",L(e)).then(()=>{})}},{key:"resetPassword",value:function(e){return this.http.post("/account/password/reset",null,e).then(()=>{})}},{key:"resetPasswordCallback",value:function(e){return this.http.post("/account/password/reset/confirm",L(e)).then(()=>{})}},{key:"removeUser",value:function(e){return this.http.delete("/account/user/"+e,null).then(()=>{})}},{key:"activateUser",value:function(e){return this.http.post("/account/user/"+e+"/activate",null).then(()=>{})}},{key:"deactivateUser",value:function(e){return this.http.post("/account/user/"+e+"/deactivate",null).then(()=>{})}},{key:"authenticate",value:function(e){return this.http.post("/account/login",e).text()}},{key:"refreshToken",value:function(){return this.http.post("/account/refresh-token",null).text()}},{key:"revokeToken",value:function(){return this.http.delete("/account/revoke-token",null).then(()=>{})}},{key:"ldapLogin",value:function(e){return this.http.post("/account/external/login/ldap",e).then(()=>{})}},{key:"getRoles",value:function(e){return this.http.get("/account/role/list",e).json()}},{key:"createRole",value:function(e){return this.http.post("/account/role",e).then(()=>{})}},{key:"updateRole",value:function(e){return this.http.patch("/account/role",e).then(()=>{})}},{key:"removeRole",value:function(e){return this.http.delete("/account/role/"+e,null).then(()=>{})}},{key:"addToRole",value:function(e,t){return this.http.post("/account/user/"+e+"/role/"+t,null).then(()=>{})}},{key:"removeFromRole",value:function(e,t){return this.http.delete("/account/user/"+e+"/role/"+t,null).then(()=>{})}},{key:"postUsedProjects",value:function(e){return this.http.post("/account/latest_projects",e).json()}},{key:"getUsedProjects",value:function(){return this.http.get("/account/latest_projects").json()}},{key:"truncateUsedProjects",value:function(){return this.http.delete("/account/latest_projects",null).then(()=>{})}}]),n}();const A=()=>JSON.parse(localStorage.getItem("@evergis/user-info")||"null")||void 0,D=e=>{if(e){const t=A();localStorage.setItem("@evergis/user-info",JSON.stringify(d({},t,e)))}else localStorage.removeItem("@evergis/user-info")};let O=function(e){k(n,N);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"login",value:async function(e){e&&await j(g(n.prototype),"authenticate",this).call(this,e)}},{key:"fetchCurrentUser",value:async function(){return this.userInfo=await this.getUserInfo(""),this.userInfo}},{key:"username",get:function(){var e;return(null==(e=this.userInfo)?void 0:e.username)||""}},{key:"logout",value:async function(){await this.revokeToken(),D(void 0),this.userInfo={}}},{key:"updateCurrentUser",value:async function(e){await j(g(n.prototype),"updateUser",this).call(this,d({username:this.username},e)),D(e)}},{key:"setPassword",value:function(e){return this.setUserPassword({username:this.username,password:e})}},{key:"isAuth",get:function(){var e;return!(null==(e=this.userInfo)||!e.username)&&"public"!==this.userInfo.username}},{key:"user",get:function(){if(this.userInfo)return this.userInfo;const e=A();return e&&(this.userInfo=e),e}}]),n}();const B=["username"];let M=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getPreview",value:function(e){return this.http.createUrl("/account/user/preview/"+e)}},{key:"uploadPreview",value:function(e,t){let{username:n}=e,r=m(e,B);return this.http.post("/account/user/preview/"+n,L(t),r).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/account/user/preview/"+e,null).then(()=>{})}}]),n}(),q=function(e){k(n,M);var t=w(n);function n(e,r){var s;return y(this,n),(s=t.call(this,e)).userInfo=r,s}return v(n,[{key:"user",get:function(){if(this.userInfo)return this.userInfo;const e=A();return e&&(this.userInfo=e),e}},{key:"username",get:function(){var e;return(null==(e=this.userInfo)?void 0:e.username)||""}},{key:"updateCurrentUserPhoto",value:async function(e,t){const{fileId:n}=await this.uploadPreview(d({username:this.username},t),{file:e});D({profile_photo:n,has_profile_photo:!0})}},{key:"fetchPreview1",value:async function(){var e;const t=this.getPreview(""),n=await fetch(t),r=null!=(e=n.headers.get("content-type"))&&e.includes("text/plain")?await n.text():t+"?r="+Math.random();D({profile_photo:r,has_profile_photo:!0})}},{key:"deleteCurrentUserPhoto",value:async function(){await this.deletePreview(this.username),D({profile_photo:"",has_profile_photo:!1})}}]),n}(),_=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"batchResourcesPermissionsSet",value:function(e){return this.http.put("/bulk/resources/permissions",e).json()}}]),n}(),W=function(e){k(n,_);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const H=["cameraId"],G=["cameraId"],V=["cameraId"],z=["cameraId"],J=["cameraId"];let Q=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getCameras",value:function(e){return this.http.get("/cameras",e).json()}},{key:"getArchiveFeed",value:function(e){let{cameraId:t}=e,n=m(e,H);return this.http.get("/cameras/"+t+"/archiveFeed",n).blob()}},{key:"getArchiveTimeline",value:function(e){let{cameraId:t}=e,n=m(e,G);return this.http.get("/cameras/"+t+"/archiveTimeline",n).json()}},{key:"getArchiveCalendar",value:function(e){let{cameraId:t}=e,n=m(e,V);return this.http.get("/cameras/"+t+"/archiveCalendar",n).json()}},{key:"getArchiveSnapshot",value:function(e){let{cameraId:t}=e,n=m(e,z);return this.http.get("/cameras/"+t+"/archiveSnapshot",n).blob()}},{key:"getLiveFeed",value:function(e){let{cameraId:t}=e,n=m(e,J);return this.http.get("/cameras/"+t+"/liveFeed",n).blob()}},{key:"getLiveSnapshot",value:function(e){return this.http.get("/cameras/"+e+"/liveSnapshot").blob()}}]),n}(),K=function(e){k(n,Q);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),X=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getConfigurationsList",value:function(e){return this.http.get("/settings/config",e).json()}},{key:"getConfiguration",value:function(e){return this.http.get("/settings",e).text()}},{key:"setConfiguration",value:function(e,t){return this.http.post("/settings",t,e).then(()=>{})}},{key:"removeConfiguration",value:function(e){return this.http.delete("/settings",null,e).then(()=>{})}}]),n}(),Y=function(e){k(n,X);var t=w(n);function n(){var e;return y(this,n),(e=t.apply(this,arguments)).settings={modules:[],connection:{url:""}},e}return v(n,[{key:"fetchClientSettings",value:async function(e){const t=JSON.parse(await this.getConfiguration(e));return this.updateClientSettings(t),t}},{key:"updateClientSettings",value:function(e){Object.assign(this.settings,e)}}]),n}(),Z=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getQueryResult",value:function(e){return this.http.post("/eql/query",e).then(()=>{})}},{key:"getQueryDescription",value:function(e){return this.http.post("/eql/description",e).json()}},{key:"setLayerParameterValue",value:function(e){return this.http.post("/eql/setParam",null,e).then(()=>{})}},{key:"setLayerParameters",value:function(e,t){return this.http.post("/eql/setParams",t,e).then(()=>{})}},{key:"getLayerParameters",value:function(e){return this.http.get("/eql/getParam",e).text()}},{key:"getLayerParameters1",value:function(e){return this.http.get("/eql/getParams",e).json()}},{key:"removeLayerParameterValue",value:function(e){return this.http.delete("/eql/removeParam",null,e).then(()=>{})}}]),n}(),$=function(e){k(n,Z);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),ee=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"vkLogin",value:function(){return this.http.createUrl("/account/external/login/vk")}},{key:"googleLogin",value:function(){return this.http.createUrl("/account/external/login/google")}},{key:"facebookLogin",value:function(){return this.http.createUrl("/account/external/login/facebook")}},{key:"loginCallback",value:function(){return this.http.get("/account/external/login/callback").then(()=>{})}},{key:"unbindVk",value:function(){return this.http.delete("/account/external/unbind/vk",null).then(()=>{})}},{key:"unbindGoogle",value:function(){return this.http.delete("/account/external/unbind/google",null).then(()=>{})}},{key:"unbindFacebook",value:function(){return this.http.delete("/account/external/unbind/facebook",null).then(()=>{})}},{key:"bindVk",value:function(){return this.http.createUrl("/account/external/bind/vk")}},{key:"bindGoogle",value:function(){return this.http.createUrl("/account/external/bind/google")}},{key:"bindFacebook",value:function(){return this.http.createUrl("/account/external/bind/facebook")}},{key:"bindCallback",value:function(){return this.http.get("/account/external/bind/callback").then(()=>{})}}]),n}(),te=function(e){k(n,ee);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"login",value:function(e){switch(e){case"vk":return this.vkLogin();case"google":return this.googleLogin();case"facebook":return this.facebookLogin();default:return""}}},{key:"bind",value:function(e){switch(e){case"vk":return this.bindVk();case"google":return this.bindGoogle();case"facebook":return this.bindFacebook();default:return""}}},{key:"unbind",value:function(e){switch(e){case"vk":return this.unbindVk();case"google":return this.unbindGoogle();case"facebook":return this.unbindFacebook();default:return""}}}]),n}(),ne=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"increaseResourcesLimit",value:function(e){return this.http.post("/feedback/limits",null,e).json()}},{key:"moreSymbols",value:function(e){return this.http.post("/feedback/symbol",null,e).json()}},{key:"feedback",value:function(e,t){return this.http.post("/feedback",L(t),e).json()}}]),n}(),re=function(e){k(n,ne);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"postFeedback",value:function(e,t){return this.feedback(e,t)}}]),n}(),se=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"downloadFile",value:function(e){return this.http.get("/upload/file",e).blob()}},{key:"uploadFile",value:function(e){return this.http.post("/upload/file",L(e)).json()}},{key:"deleteFile",value:function(e){return this.http.delete("/upload/file",null,e).then(()=>{})}},{key:"getFileInfo",value:function(e){return this.http.get("/upload/fileInfo",e).json()}}]),n}(),ie=function(e){k(n,se);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"upload",value:function(e,t){return this.uploadFile({file:e,rewrite:!!t})}}]),n}(),oe=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"get",value:function(e){return this.http.get("/filters/"+e).text()}},{key:"update",value:function(e,t){return this.http.post("/filters/"+e,t).json()}},{key:"create",value:function(e){return this.http.post("/filters",e).json()}}]),n}(),ae=function(e){k(n,oe);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),ue=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getServerInfo",value:function(){return this.http.get("/").json()}},{key:"getFunctionsList",value:function(){return this.http.get("/functions").json()}}]),n}(),le=function(e){k(n,ue);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const ce=["providerName"],pe=["providerName"],he=["providerName"];let ye=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"geocode",value:function(e){let{providerName:t}=e,n=m(e,ce);return this.http.get("/geocode/"+t,n).json()}},{key:"geocodeByPoint",value:function(e){let{providerName:t}=e,n=m(e,pe);return this.http.get("/geocode/"+t+"/geocodeByPoint",n).json()}},{key:"suggest",value:function(e){let{providerName:t}=e,n=m(e,he);return this.http.get("/geocode/"+t+"/suggest",n).json()}}]),n}(),fe=function(e){k(n,ye);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"geocode2Gis",value:function(e){return this.geocode(d({providerName:"geocode2gis"},e))}},{key:"suggest2Gis",value:function(e){return this.suggest(d({providerName:"geocode2gis"},e))}}]),n}(),ve=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"startTask",value:function(e){return this.http.post("/ice-router/tasks",e).text()}},{key:"getResult",value:function(e){return this.http.get("/ice-router/tasks/"+e).json()}}]),n}(),de=function(e){k(n,ve);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),ke=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getDataSchema",value:function(e){return this.http.get("/import/dataSchema",e).json()}},{key:"getFeaturesCount",value:function(e){return this.http.post("/import/count",e).json()}},{key:"readPart",value:function(e){return this.http.get("/import/read",e).then(()=>{})}},{key:"getExternalWmsLayers",value:function(e){return this.http.get("/import/wms",e).json()}},{key:"getExternalPbfLayers",value:function(e){return this.http.get("/import/pbf",e).json()}},{key:"getExternalPbfFeatures",value:function(e){return this.http.get("/import/pbf/features",e).json()}},{key:"getExternalArcgisFsLayers",value:function(e){return this.http.get("/import/arcgisfeatureservice",e).json()}},{key:"getExternalArcGisLayers",value:function(e){return this.http.get("/import/arcgismapservice",e).json()}},{key:"getRasterAttributes",value:function(e){return this.http.get("/import/rasterAttributes",e).json()}},{key:"getRasterMeta",value:function(e){return this.http.get("/import/rasterMeta",e).json()}}]),n}(),ge=function(e){k(n,ke);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const me=["name"],be=["name"],xe=["name"],we=["name","id"],Te=["name","id"],je=["name","id"],Se=["name","x","y","z"],Pe=["name"],Ie=["name"],Le=["name"],Re=["name"],Ce=["name"],Ee=["name"],Ue=["name"],Fe=["name"],Ne=["name"],Ae=["name"],De=["name"],Oe=["layerName"],Be=["name","id"];let Me=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getLayersList",value:function(e){return this.http.get("/layers",e).json()}},{key:"setPermissionsBatch",value:function(e){return this.http.put("/layers",e).then(()=>{})}},{key:"deleteResources",value:function(e){return this.http.delete("/layers",null,e).json()}},{key:"getLayerInfo",value:function(e){return this.http.get("/layers/"+e).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/layers/"+e,null).then(()=>{})}},{key:"getLayersInfo",value:function(e){return this.http.get("/layers/batchInfo",e).json()}},{key:"publishMapboxService",value:function(e){return this.http.post("/layers",e,{type:"Mapbox"}).json()}},{key:"publishProxyService",value:function(e){return this.http.post("/layers",e,{type:"ProxyService"}).json()}},{key:"publishRouteService",value:function(e){return this.http.post("/layers",e,{type:"RouteService"}).then(()=>{})}},{key:"publishLinearService",value:function(e){return this.http.post("/layers",e,{type:"LinearService"}).then(()=>{})}},{key:"publishRemoteTileService",value:function(e){return this.http.post("/layers",e,{type:"RemoteTileService"}).json()}},{key:"publishLocalTileService",value:function(e){return this.http.post("/layers",e,{type:"LocalTileService"}).json()}},{key:"publishPostgresLayerService",value:function(e){return this.http.post("/layers",e,{type:"PostgresLayerService"}).json()}},{key:"publishQueryLayerService",value:function(e){return this.http.post("/layers",e,{type:"QueryLayerService"}).json()}},{key:"publishPostgresTileCatalogService",value:function(e){return this.http.post("/layers",e,{type:"PostgresTileLayerService"}).json()}},{key:"publishStyledLayerService",value:function(e){return this.http.post("/layers",e,{type:"StyledFeatureLayer"}).json()}},{key:"updateMapboxService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"Mapbox"}).json()}},{key:"updateProxyService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"ProxyService"}).json()}},{key:"updateTileCatalogService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"PostgresTileLayerService"}).json()}},{key:"publishCompositeService",value:function(e){return this.http.post("/layers",e,{type:"CompositeService"}).json()}},{key:"updateRemoteTileService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"RemoteTileService"}).json()}},{key:"updateLocalTileService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"LocalTileService"}).json()}},{key:"updatePostgresLayerService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"PostgresLayerService"}).json()}},{key:"updateQueryLayerService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"QueryLayerService"}).json()}},{key:"updateCompositeService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"CompositeService"}).json()}},{key:"reloadService",value:function(e){return this.http.get("/layers/"+e+"/reload").json()}},{key:"getFeatures",value:function(e,t){return this.http.post("/layers/"+e+"/features/query",t).json()}},{key:"getFeatures1",value:function(e){let{name:t}=e,n=m(e,me);return this.http.get("/layers/"+t+"/features",n).json()}},{key:"deleteFeature",value:function(e){let{name:t}=e,n=m(e,be);return this.http.delete("/layers/"+t+"/features",null,n).json()}},{key:"createFeatures",value:function(e,t){return this.http.post("/layers/"+e+"/features",t).json()}},{key:"updateFeature",value:function(e,t){return this.http.patch("/layers/"+e+"/features",t).json()}},{key:"featuresContains",value:function(e){let{name:t}=e,n=m(e,xe);return this.http.get("/layers/"+t+"/features/contains",n).json()}},{key:"getById",value:function(e){let{name:t,id:n}=e,r=m(e,we);return this.http.get("/layers/"+t+"/features/"+n,r).json()}},{key:"unite",value:function(e,t){let{name:n,id:r}=e,s=m(e,Te);return this.http.post("/layers/"+n+"/features/"+r+"/unite",t,s).json()}},{key:"subtract",value:function(e,t){let{name:n,id:r}=e,s=m(e,je);return this.http.post("/layers/"+n+"/features/"+r+"/subtract",t,s).json()}},{key:"getTilesLayerImage",value:function(e){let{name:t,x:n,y:r,z:s}=e,i=m(e,Se);return this.http.createUrl("/layers/"+t+"/tile/"+s+"/"+n+"/"+r,i)}},{key:"getLayerImage",value:function(e){let{name:t}=e,n=m(e,Pe);return this.http.createUrl("/layers/"+t+"/export",n)}},{key:"getLayerExtent",value:function(e){let{name:t}=e,n=m(e,Ie);return this.http.get("/layers/"+t+"/extent",n).json()}},{key:"getByGeometry",value:function(e){let{name:t}=e,n=m(e,Le);return this.http.get("/layers/"+t+"/features/getByGeometry",n).json()}},{key:"getByGeometryPost",value:function(e,t){let{name:n}=e,r=m(e,Re);return this.http.post("/layers/"+n+"/features/getByGeometry",t,r).json()}},{key:"deleteFeatures",value:function(e){let{name:t}=e,n=m(e,Ce);return this.http.delete("/layers/"+t+"/features/deleteByIds",null,n).json()}},{key:"deleteByCondition",value:function(e){let{name:t}=e,n=m(e,Ee);return this.http.delete("/layers/"+t+"/features/deleteByCondition",null,n).json()}},{key:"getByGeometryGet",value:function(e){let{name:t}=e,n=m(e,Ue);return this.http.get("/layers/"+t+"/features/getByGeometryByClick",n).json()}},{key:"classify",value:function(e){let{name:t}=e,n=m(e,Fe);return this.http.get("/layers/"+t+"/classify",n).json()}},{key:"distincts",value:function(e){let{name:t}=e,n=m(e,Ne);return this.http.get("/layers/"+t+"/distincts",n).json()}},{key:"aggregateAttribute",value:function(e){let{name:t}=e,n=m(e,Ae);return this.http.get("/layers/"+t+"/aggregate-values",n).json()}},{key:"getFilteredFeaturesCount",value:function(e){let{name:t}=e,n=m(e,De);return this.http.get("/layers/"+t+"/features/count",n).json()}},{key:"editAttributes",value:function(e,t){return this.http.post("/layers/"+e+"/features/edit-attributes",t).json()}},{key:"selectFeatures",value:function(e){return this.http.get("/layers/features/select",e).json()}},{key:"validateExpression",value:function(e){let{layerName:t}=e,n=m(e,Oe);return this.http.get("/layers/"+t+"/validateExpression",n).json()}},{key:"getRasterMeta",value:function(e){let{name:t,id:n}=e,r=m(e,Be);return this.http.get("/layers/"+t+"/"+n+"/metadata",r).json()}},{key:"createRoute",value:function(e,t){return this.http.post("/layers/"+e+"/createRoute",t).json()}},{key:"getPreview",value:function(e){return this.http.createUrl("/layers/"+e+"/preview")}},{key:"setPreview",value:function(e,t){return this.http.post("/layers/"+e+"/preview",L(t)).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/layers/"+e+"/preview",null).then(()=>{})}},{key:"isExists",value:function(e){return this.http.get("/layers/"+e+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(e){return this.http.get("/layers/"+e+"/dependencies").json()}},{key:"getResourceReferences",value:function(e){return this.http.get("/layers/"+e+"/references").json()}},{key:"getPermissions",value:function(e){return this.http.get("/layers/"+e+"/permissions").json()}},{key:"addPermissions",value:function(e,t){return this.http.post("/layers/"+e+"/permissions",t).json()}},{key:"setPermissions",value:function(e,t){return this.http.put("/layers/"+e+"/permissions",t).json()}},{key:"removePermissions",value:function(e,t){return this.http.delete("/layers/"+e+"/permissions/"+t,null).json()}}]),n}();async function qe(e){return(await Promise.all(e.map(e=>e.catch(e=>_e(e)?e:new Error(e))))).filter(We)}function _e(e){return e instanceof Error}function We(e){return!_e(e)}const He=["remote"],Ge=["remote"];let Ve=function(e){k(n,Me);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getLayerInfos",value:function(e){return qe(e.map(e=>this.getLayerInfo(e)))}},{key:"getLayersDeps",value:function(e){return qe(e.map(e=>this.getResourceDependencies(e)))}},{key:"getBasemaps",value:function(e){return this.getLayersList(d({},e,{types:["LocalTileService","RemoteTileService"]}))}},{key:"createSubLayer",value:function(e){return this.publishStyledLayerService(e)}},{key:"createTileLayer",value:function(e){let{remote:t}=e,n=m(e,He);return t?this.publishRemoteTileService(n):this.publishLocalTileService(n)}},{key:"updateTileLayer",value:function(e){let{remote:t}=e,n=m(e,Ge);return t?this.updateRemoteTileService(n.name,n):this.updateLocalTileService(n.name,n)}},{key:"uploadPreview",value:function(e,t){return this.setPreview(e,{file:t})}},{key:"findOne",value:function(e){return this.getLayerInfo(e)}},{key:"findAll",value:function(e){return this.getLayersList(e)}},{key:"create",value:function(e){return this.publishPostgresLayerService(e)}},{key:"update",value:function(e){return this.updatePostgresLayerService(e.name,e)}},{key:"createQueryLayer",value:function(e){return this.publishQueryLayerService(e)}},{key:"updateQueryLayer",value:function(e){return this.updateQueryLayerService(e.name,e)}},{key:"createProxyLayer",value:function(e){return this.publishProxyService(e)}},{key:"updateProxyLayer",value:function(e){return this.updateProxyService(e.name,e)}},{key:"remove",value:async function(e){return await this.deleteResource(e),e}}]),n}();var ze;(ze=exports.ErrorReason||(exports.ErrorReason={})).HTTP_OTHER="other",ze.HTTP_CLIENT="client",ze.HTTP_SERVER="server",ze.UNKNOWN="unknown";const Je=e=>e instanceof n.HTTPError?(e=>{const t=e.response.status;let n=exports.ErrorReason.HTTP_OTHER;return t>=400&&t<500&&(n=exports.ErrorReason.HTTP_CLIENT),t>=500&&(n=exports.ErrorReason.HTTP_SERVER),{type:"http",reason:n,status:t,origin:e}})(e):(e=>({type:"base",reason:exports.ErrorReason.UNKNOWN,origin:e}))(e),Qe=e=>e&&e.type&&e.reason;function Ke(e){return function(t){return!!t.type&&e.includes(t.type)}}const Xe=Ke(["PostgresLayerService","PostgresTileLayerService","QueryLayerService"]);function Ye(e){return"string"==typeof e}function Ze(e,t,n){return n.indexOf(e)===t}const $e=o.customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789",12);(exports.ResourceSeparator||(exports.ResourceSeparator={})).Server=".";let et=function(){function e(t){let{account:n}=t;y(this,e),this.account=n}return v(e,[{key:"createId",value:function(){return $e()}},{key:"createResourceName",value:function(e){void 0===e&&(e={});const t=e.workspace||this.account.user&&this.account.user.namespace||"",n=e.name||this.createId(),r=e.separator||exports.ResourceSeparator.Server;return t||console.warn("Resource should have workspace. Check account api"),""+t+r+n}},{key:"createTempResourceName",value:function(e){return void 0===e&&(e={}),this.createResourceName(d({workspace:"temp"},e))}},{key:"extractResource",value:function(e){if(e&&e.includes(exports.ResourceSeparator.Server)){const t=e.split(exports.ResourceSeparator.Server),n=t.pop();return{workspace:t.join(exports.ResourceSeparator.Server),name:n}}return{name:"",workspace:""}}},{key:"extractResourceName",value:function(e){return this.extractResource(e).name||e||""}},{key:"extractResourceWorkspace",value:function(e){return this.extractResource(e).workspace||""}}]),e}(),tt=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getNamespaces",value:function(e){return this.http.get("/namespaces",e).json()}},{key:"createNamespace",value:function(e){return this.http.post("/namespaces",null,e).json()}},{key:"getNamespace",value:function(e){return this.http.get("/namespaces/"+e).json()}},{key:"removeNamespace",value:function(e){return this.http.delete("/namespaces/"+e,null).then(()=>{})}}]),n}(),nt=function(e){k(n,tt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),rt=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getSubscriptionList",value:function(){return this.http.get("/notifications/subscribes").json()}},{key:"subscribeOperation",value:function(e){return this.http.post("/notifications/subscribes",null,e).then(()=>{})}},{key:"unsubscribeOperation",value:function(e){return this.http.delete("/notifications/subscribes",null,e).then(()=>{})}},{key:"subscribeListOperation",value:function(e){return this.http.post("/notifications/subscribe-list",e).then(()=>{})}},{key:"unsubscribeListOperation",value:function(e){return this.http.post("/notifications/unsubscribe-list",e).then(()=>{})}}]),n}();var st;(st=exports.ConnectionStatus||(exports.ConnectionStatus={})).Initialized="Initialized",st.Connected="Connected",st.Break="Break",st.Lost="Lost",st.SessionClosed="SessionClosed";let it=function(e){k(r,rt);var n=w(r);function r(e,s,i){var o;return void 0===i&&(i=!1),y(this,r),(o=n.call(this,e)).api=s,o.MAX_WS_RECONNECT_TRIES=10,o.keepAlive=!1,o.reconnectTries=0,o.subscriptions=[],o._connectStatus=exports.ConnectionStatus.Initialized,o.onWsConnected=()=>{o.connectStatus=exports.ConnectionStatus.Connected,o.keepAlive&&(o.keepAliveTimeout=setInterval(()=>{o.ws&&o.ws.send(JSON.stringify({keepAlive:!0}))},5e3))},o.onWsClosed=e=>{4001===e.code||4002===e.code?o.connectStatus=exports.ConnectionStatus.SessionClosed:o.reconnectTries<o.MAX_WS_RECONNECT_TRIES?(o.connectStatus=exports.ConnectionStatus.Break,o.reconnectTries++,o.ws&&(o.ws.onopen=null,o.ws.onclose=null,o.ws.onmessage=null,o.ws=void 0),o.keepAliveTimeout&&clearInterval(o.keepAliveTimeout),setTimeout(()=>{o.connect()},0)):o.connectStatus=exports.ConnectionStatus.Lost},o.onWsMessage=e=>{let t={};try{t=JSON.parse(e.data)}catch(e){console.debug("Failed to parse ws message from sp.")}if("notification"===t.type&&t.data){const{tag:e,data:n}=t.data;e&&o.emitter.emit(e,new ot(n))}},o.emitter=new t.EventEmitter,o.keepAlive=i,o}return v(r,[{key:"connectStatus",get:function(){return this._connectStatus},set:function(e){this.emitter.emit("ConnectionStatus",new ot(e)),this._connectStatus=e}},{key:"currentWs",get:function(){return this.ws}},{key:"on",value:function(e,t){this.emitter.on(e,t)}},{key:"off",value:function(e,t){this.emitter.off(e,t)}},{key:"subscribe",value:async function(e){this.subscriptions.push(e),setTimeout(()=>{!this.api.isShared&&this.subscriptions.length&&this.subscribeListOperation(this.subscriptions),this.subscriptions=[]},500)}},{key:"unsubscribe",value:async function(e){if((await this.getSubscriptionList()).includes(e))return this.unsubscribeOperation({tag:e})}},{key:"connectWs",value:function(e){const t=e.replace("http://","ws://").replace("https://","wss://");this.wsUrl=t,this.connect()}},{key:"connect",value:function(){this.wsUrl?(this.ws=new WebSocket(this.wsUrl),this.ws.onopen=this.onWsConnected,this.ws.onclose=this.onWsClosed,this.ws.onmessage=this.onWsMessage):console.warn("Connection to WebSocket not allowed. wsUrl not provided")}}]),r}(),ot=v((function e(t){y(this,e),this.data=t})),at=function(e){k(n,X);var t=w(n);function n(){var e;return y(this,n),(e=t.apply(this,arguments)).config=null,e}return v(n,[{key:"fetchPortalSettings",value:async function(e){return this.config=JSON.parse(await this.getConfiguration(e)),this.config}}]),n}(),ut=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"print",value:function(e){return this.http.post("/print/print",e).blob()}},{key:"printToHtml",value:function(e){return this.http.post("/print/printHtml",e).text()}},{key:"uploadTemplate",value:function(e,t){return this.http.post("/print/templates",L(t),e).then(()=>{})}},{key:"getTemplates",value:function(){return this.http.get("/print/templates").json()}},{key:"deleteTemplate",value:function(e){return this.http.delete("/print/templates/"+e,null).then(()=>{})}},{key:"getTemplate",value:function(e){return this.http.get("/print/templates/"+e).text()}}]),n}(),lt=function(e){k(n,ut);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),ct=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getProjectsList",value:function(e){return this.http.get("/projects",e).json()}},{key:"createProject",value:function(e){return this.http.post("/projects",e).json()}},{key:"setPermissionsBatch",value:function(e){return this.http.put("/projects",e).then(()=>{})}},{key:"deleteResources",value:function(e){return this.http.delete("/projects",null,e).json()}},{key:"updateProject",value:function(e,t){return this.http.patch("/projects/"+e,t).json()}},{key:"getProjectInfo",value:function(e){return this.http.get("/projects/"+e).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/projects/"+e,null).then(()=>{})}},{key:"getProjectsInfo",value:function(e){return this.http.get("/projects/batchInfo",e).json()}},{key:"getProjectLayersExtendedInfo",value:function(e){return this.http.get("/projects/"+e+"/extended-info").json()}},{key:"getTilesLayerImage",value:function(e,t,n,r){return this.http.createUrl("/projects/"+e+"/tile/"+r+"/"+t+"/"+n)}},{key:"getPreview",value:function(e){return this.http.createUrl("/projects/"+e+"/preview")}},{key:"setPreview",value:function(e,t){return this.http.post("/projects/"+e+"/preview",L(t)).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/projects/"+e+"/preview",null).then(()=>{})}},{key:"isExists",value:function(e){return this.http.get("/projects/"+e+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(e){return this.http.get("/projects/"+e+"/dependencies").json()}},{key:"getResourceReferences",value:function(e){return this.http.get("/projects/"+e+"/references").json()}},{key:"getPermissions",value:function(e){return this.http.get("/projects/"+e+"/permissions").json()}},{key:"addPermissions",value:function(e,t){return this.http.post("/projects/"+e+"/permissions",t).json()}},{key:"setPermissions",value:function(e,t){return this.http.put("/projects/"+e+"/permissions",t).json()}},{key:"removePermissions",value:function(e,t){return this.http.delete("/projects/"+e+"/permissions/"+t,null).json()}}]),n}(),pt=function(e){k(n,ct);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getProjectInfos",value:function(e){return qe(e.map(e=>this.getProjectInfo(e)))}},{key:"getProjectsDeps",value:function(e){return qe(e.map(e=>this.getResourceDependencies(e)))}},{key:"uploadPreview",value:function(e,t){return this.setPreview(e,{file:t})}},{key:"findOne",value:function(e){return this.getProjectInfo(e)}},{key:"findAll",value:function(e){return this.getProjectsList(e)}},{key:"create",value:function(e){return this.createProject(e)}},{key:"update",value:function(e){return this.updateProject(e.name,e)}},{key:"remove",value:async function(e){return await this.deleteResource(e),e}}]),n}(),ht=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"checkLimits",value:function(e){return this.http.get("/resources/checkLimits",e).json()}},{key:"copyResources",value:function(e){return this.http.post("/resources/copy",e).json()}}]),n}(),yt=function(e){k(n,ht);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();var ft;(ft=exports.DependencyType||(exports.DependencyType={})).Layer="Layer",ft.Table="Table",ft.Project="Project";let vt=function(){function e(t,n,r){y(this,e),this.projects=t,this.layers=n,this.tables=r}return v(e,[{key:"getProjectInfosWithDeps",value:async function(e){const t=await this.projects.getProjectInfos(e),n=await this.projects.getProjectsDeps(e),{layers:r,tables:s}=await this.getDependencies(n,!0,!0);return{projects:t,deps:{layers:r,tables:s}}}},{key:"getLayerInfosWithDeps",value:async function(e){const t=await this.layers.getLayerInfos(e),n=await this.layers.getLayersDeps(e),{tables:r}=await this.getDependencies(n,!1,!0);return{layers:t,deps:{tables:r}}}},{key:"getDependencies",value:async function(e,t,n){const{tables:r,layers:s}=e.reduce((e,r)=>{const s=r.dependencies||[];if(t){const t=this.getDependentNames(s,exports.DependencyType.Layer);e.layers.push(...t)}if(n){const t=this.getDependentNames(s,exports.DependencyType.Table);e.tables.push(...t)}return e},{tables:[],layers:[]});return{tables:await this.tables.getTableInfos(r.filter(Ze)),layers:await this.layers.getLayerInfos(s.filter(Ze))}}},{key:"getDependentNames",value:function(e,t){return e.filter(e=>{let{type:n}=e;return n===t}).map(e=>{let{name:t}=e;return t}).filter(Ye)}}]),e}(),dt=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getTaskList",value:function(e){return this.http.get("/scheduler/tasks",e).json()}},{key:"getTaskInfo",value:function(e){return this.http.get("/scheduler/tasks/"+e).json()}},{key:"getTaskProgress",value:function(e){return this.http.get("/scheduler/tasks/"+e+"/progress").json()}},{key:"cancelTask",value:function(e){return this.http.post("/scheduler/tasks/"+e+"/cancel",null).json()}},{key:"startCopyTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"copy"}).json()}},{key:"startAggregateTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"aggregate"}).json()}},{key:"startBufferTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"buffer"}).json()}},{key:"startPrintTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"print"}).json()}},{key:"startTilingTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"tiling"}).json()}},{key:"startTilingTask1",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"rasterVrt"}).json()}},{key:"startNetCdfTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"netcdf"}).json()}},{key:"startRouteTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"route"}).json()}},{key:"startUnionTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"union"}).json()}},{key:"startOverlayTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"overlay"}).json()}},{key:"startFilterCopyTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"filterCopy"}).json()}},{key:"startPipelineTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"pipeline"}).json()}},{key:"startEditAttributesBatch",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"editAttributes"}).json()}},{key:"universalSearchTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"universalSearch"}).json()}}]),n}(),kt=function(e){k(n,dt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"init",value:function(e){return this.notification=e,this.notification.subscribe("server_task")}},{key:"runCopyTask",value:async function(e){const{taskId:t}=await this.startCopyTask(e);return this.processTaskId(t)}},{key:"runBufferTask",value:async function(e){const{taskId:t}=await this.startBufferTask(e);return this.processTaskId(t)}},{key:"runUnionTask",value:async function(e){const{taskId:t}=await this.startUnionTask(e);return this.processTaskId(t)}},{key:"runPrintTask",value:async function(e){const{taskId:t}=await this.startPrintTask(e);return this.processTaskId(t)}},{key:"runTilingTask",value:async function(e){const{taskId:t}=await this.startTilingTask(e);return this.processTaskId(t)}},{key:"runRouteTask",value:async function(e){const{taskId:t}=await this.startRouteTask(e);return this.processTaskId(t)}},{key:"runOverlayTask",value:async function(e){const{taskId:t}=await this.startOverlayTask(e);return this.processTaskId(t)}},{key:"runFilterCopyTask",value:async function(e){const{taskId:t}=await this.startFilterCopyTask(e);return this.processTaskId(t)}},{key:"runPipelineTask",value:async function(e){const{taskId:t}=await this.startPipelineTask(e);return this.processTaskId(t)}},{key:"runEditAttributesTask",value:async function(e){const{taskId:t}=await this.startEditAttributesBatch(e);return this.processTaskId(t)}},{key:"waitTaskCompleted",value:async function(e){return new Promise(async(t,n)=>{const r=await this.getTaskProgress(e);this.resolveTaskStatus(r,t,n);const s=async r=>{let{data:i}=r;if(i.taskId===e&&i.status&&["Completed","Failed","Canceled"].includes(i.status)){const r=await this.getTaskProgress(e);this.notification&&this.notification.off("server_task",s),this.resolveTaskStatus(r,t,n)}};this.notification&&this.notification.on("server_task",s)})}},{key:"resolveTaskStatus",value:function(e,t,n){"Completed"===e.status?t(e):"Failed"!==e.status&&"Canceled"!==e.status||n(e.status)}},{key:"processTaskId",value:function(e){if(e)return this.waitTaskCompleted(e);throw new Error("Task was started with no testId")}}]),n}(),gt=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"findUserByNameByRoles",value:function(e){return this.http.get("/security/findUsersWithRoles",e).json()}},{key:"getUsersAndRoles",value:function(e){return this.http.get("/security/usersandroles",e).json()}},{key:"findUserByName",value:function(e){return this.http.get("/security/users",e).json()}},{key:"getPolicyList",value:function(e){return this.http.get("/security/policies",e).json()}},{key:"removePolicy",value:function(e){return this.http.delete("/security/policies",null,e).then(()=>{})}},{key:"setPolicy",value:function(e){return this.http.post("/security/policies",e).then(()=>{})}}]),n}(),mt=function(e){k(n,gt);var t=w(n);function n(e,r){var s;let{username:i,roles:o}=r;return y(this,n),(s=t.call(this,e)).ownerName="",s.ownerRoles=[],s.ownerName=i,s.ownerRoles=o,s}return v(n,[{key:"reset",value:function(){this.ownerName="",this.ownerRoles=[]}}]),n}(),bt=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"statisticsDb",value:function(e){return this.http.get("/statistics",e).json()}},{key:"classify",value:function(e){return this.http.get("/statistics/classify",e).json()}},{key:"sumOfProduct",value:function(e){return this.http.get("/statistics/sumOfProduct",e).json()}}]),n}(),xt=function(e){k(n,bt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getStatistic",value:function(e){return this.statisticsDb(e)}},{key:"getClassify",value:function(e){return this.classify(e)}}]),n}(),wt=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getStyle",value:function(e){return this.http.get("/styles/"+e).json()}},{key:"updateStyle",value:function(e,t){return this.http.post("/styles/"+e,t).json()}},{key:"createStyle",value:function(e){return this.http.post("/styles",e).json()}},{key:"getAllFonts",value:function(){return this.http.get("/styles/fonts").json()}},{key:"addFont",value:function(e){return this.http.post("/styles/fonts",L(e)).then(()=>{})}},{key:"removeFont",value:function(e){return this.http.delete("/styles/fonts",null,e).then(()=>{})}}]),n}(),Tt=function(e){k(n,wt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const jt=["name"],St=["name"],Pt=["name"],It=["name"];let Lt=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getTableList",value:function(e){return this.http.get("/tables",e).json()}},{key:"createTable",value:function(e){return this.http.post("/tables",e).json()}},{key:"setPermissionsBatch",value:function(e){return this.http.put("/tables",e).then(()=>{})}},{key:"deleteResources",value:function(e){return this.http.delete("/tables",null,e).json()}},{key:"updateTable",value:function(e,t){return this.http.patch("/tables/"+e,t).json()}},{key:"putTable",value:function(e,t){return this.http.put("/tables/"+e,t).json()}},{key:"getTableInfo",value:function(e){return this.http.get("/tables/"+e).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/tables/"+e,null).then(()=>{})}},{key:"getTablesInfo",value:function(e){return this.http.get("/tables/batchInfo",e).json()}},{key:"getTableData",value:function(e){let{name:t}=e,n=m(e,jt);return this.http.get("/tables/"+t+"/data",n).json()}},{key:"writeTableData",value:function(e,t){return this.http.post("/tables/"+e+"/data",t).then(()=>{})}},{key:"updateTableData",value:function(e,t){let{name:n}=e,r=m(e,St);return this.http.patch("/tables/"+n+"/data",t,r).then(()=>{})}},{key:"deleteTableData",value:function(e){let{name:t}=e,n=m(e,Pt);return this.http.delete("/tables/"+t+"/data",null,n).then(()=>{})}},{key:"getUniqueDataRows",value:function(e){let{name:t}=e,n=m(e,It);return this.http.get("/tables/"+t+"/data/unique-values",n).json()}},{key:"mapTable",value:function(e,t){return this.http.post("/tables/map-table",t,e).json()}},{key:"unmapTable",value:function(e){return this.http.delete("/tables/map-table/"+e,null).then(()=>{})}},{key:"getPreview",value:function(e){return this.http.createUrl("/tables/"+e+"/preview")}},{key:"setPreview",value:function(e,t){return this.http.post("/tables/"+e+"/preview",L(t)).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/tables/"+e+"/preview",null).then(()=>{})}},{key:"isExists",value:function(e){return this.http.get("/tables/"+e+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(e){return this.http.get("/tables/"+e+"/dependencies").json()}},{key:"getResourceReferences",value:function(e){return this.http.get("/tables/"+e+"/references").json()}},{key:"getPermissions",value:function(e){return this.http.get("/tables/"+e+"/permissions").json()}},{key:"addPermissions",value:function(e,t){return this.http.post("/tables/"+e+"/permissions",t).json()}},{key:"setPermissions",value:function(e,t){return this.http.put("/tables/"+e+"/permissions",t).json()}},{key:"removePermissions",value:function(e,t){return this.http.delete("/tables/"+e+"/permissions/"+t,null).json()}}]),n}(),Rt=function(e){k(n,Lt);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getTableInfos",value:function(e){return qe(e.map(e=>this.getTableInfo(e)))}},{key:"uploadPreview",value:function(e,t){return this.setPreview(e,{file:t})}},{key:"findOne",value:function(e){return this.getTableInfo(e)}},{key:"findAll",value:function(e){return this.getTableList(e)}},{key:"create",value:function(e){return this.createTable(e)}},{key:"update",value:function(e){return this.updateTable(e.name,e)}},{key:"remove",value:async function(e){return await this.deleteResource(e),e}}]),n}(),Ct=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}(),Et=function(e){k(n,Ct);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n)}();const Ut=["name","z","x","y"];let Ft=function(e){k(n,R);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getVectorTile",value:function(e){let{name:t,z:n,x:r,y:s}=e,i=m(e,Ut);return this.http.get("/vt/"+t+"/"+n+"/"+r+"/"+s+".pbf",i).then(()=>{})}}]),n}(),Nt=function(e){k(n,Ft);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return v(n,[{key:"getVt",value:function(e,t,n,r,s){return this.getVectorTile({name:e,z:t,x:n,y:r,isProject:s})}}]),n}();var At;(At=exports.UrlPath||(exports.UrlPath={})).Base="/map",At.Shared="/shared",At.Portal="/portal";const Dt={401:exports.ApiEvent.Unauthorized},Ot=Object.values(exports.UrlPath),Bt=Ot[0];let Mt=function(e){k(i,t.EventEmitter);var r=w(i);function i(e){var t;let{url:o,wsUrl:a,wsKeepAlive:u,snappingHubUrl:l,http:c,urlPath:p,httpOptions:h}=e;y(this,i),t=r.call(this);const{hooks:f}=h||{};return t.http=c||new S(d({prefixUrl:o,timeout:!1},h||{},{hooks:d({},f||{},{beforeRequest:[...f&&f.beforeRequest||[]],afterResponse:[e=>{const r=Dt[e.status];return r&&t.emit(r,Je(new n.HTTPError(e))),e},...f&&f.afterResponse||[]]})})),t.url=o,t.wsUrl=a||o,t.urlPath=p||t.defineUrlPath(),t.layers=new Ve(t.http),t.tables=new Rt(t.http),t.projects=new pt(t.http),t.resources=new vt(t.projects,t.layers,t.tables),t.styles=new Tt(t.http),t.account=new O(t.http),t.accountPreview=new q(t.http,t.account),t.bulk=new W(t.http),t.security=new mt(t.http,t.account),t.notification=new it(t.http,b(t),u),t.scheduler=new kt(t.http),t.file=new ie(t.http),t.filters=new ae(t.http),t.import=new ge(t.http),t.geocode=new fe(t.http),t.cameras=new K(t.http),t.print=new lt(t.http),t.tools=new Et(t.http),t.resourceCatalog=new yt(t.http),t.general=new le(t.http),t.namespace=new nt(t.http),t.external=new te(t.http),t.clientSettings=new Y(t.http),t.portalSettings=new at(t.http),t.iceRouter=new de(t.http),t.statistic=new xt(t.http),t.feedback=new re(t.http),t.vectorTiles=new Nt(t.http),t.universalSearch=new U(t.http),t.spatialReference=new C(t.http),t.eqlTest=new $(t.http),t.names=new et({account:t.account}),t.snappingHub=l?(new s.HubConnectionBuilder).withUrl(l,{withCredentials:!0,skipNegotiation:!0,transport:s.HttpTransportType.WebSockets}).withAutomaticReconnect().build():null,t}return v(i,[{key:"init",value:async function(e){let{authParams:t,connectWs:n,initScheduler:r,fetchSettings:s,fetchUser:i}=e;try{await this.account.login(t),i&&await this.account.fetchCurrentUser(),n&&await this.connectWs(),r&&await this.initScheduler(),s&&await this.clientSettings.fetchClientSettings({urlPath:this.urlPath}),await this.notification.subscribe("service_update")}catch(e){throw Je(e)}}},{key:"isAcceptedNetwork",value:function(e){return["vk","google","facebook"].includes(e)}},{key:"socAuthLogin",value:async function(e){if(this.isAcceptedNetwork(e))try{await this.clientSettings.fetchClientSettings({urlPath:exports.UrlPath.Base})}catch(e){throw Je(e)}}},{key:"connectWs",value:async function(){this.account.isAuth&&(this.notification.connectWs(this.wsUrl),this.notification.on("ConnectionStatus",e=>{e.data===exports.ConnectionStatus.Lost?this.emit(exports.ApiEvent.ConnectionLost,e.data):e.data===exports.ConnectionStatus.SessionClosed&&this.emit(exports.ApiEvent.SessionClosed,e.data)}))}},{key:"connectSignalR",value:async function(){this.account.isAuth&&this.snappingHub&&this.snappingHub.state!==s.HubConnectionState.Connected&&await this.snappingHub.start()}},{key:"logout",value:async function(){await this.account.logout(),await this.security.reset(),this.emit(exports.ApiEvent.Unauthorized,null)}},{key:"initScheduler",value:function(){return this.scheduler.init(this.notification)}},{key:"defineUrlPath",value:function(){const e=(window.location.href.split(window.location.hostname)[1]||"").split("/").filter(Boolean)[0],t=e?"/"+e:void 0;return t&&Ot.includes(t)?t:Bt}},{key:"isShared",get:function(){return this.urlPath===exports.UrlPath.Shared}}]),i}(),qt=function(e){k(n,l.TileLayer);var t=w(n);function n(e,r){var s;return y(this,n),(s=t.call(this,"",{crs:e.crs,opacity:e.opacity})).api=r,s.name=e.name,s.sourceUrl=e.sourceUrl,s.subDomains=e.subDomains,s}return v(n,[{key:"getTileUrl",value:function(e,t,n){var r;const s=this.name,i=this.subDomains?function(e,t){void 0===e&&(e=0),void 0===t&&(t=100);let n=t-e,r=Math.random();return r=Math.floor(r*n),r+=e,r}(0,(null==(r=this.subDomains)?void 0:r.length)-1):void 0;return this.sourceUrl?(this.subDomains&&void 0!==i?this.sourceUrl.replace("{0}",this.subDomains[i]):this.sourceUrl).replace("{1}",""+n).replace("{2}",""+e).replace("{3}",""+t):this.api.layers.getTilesLayerImage({x:e,y:t,z:n,name:s})}}]),n}();const _t=["name","style","condition","dataFilterId","crs"];let Wt=function(e){k(n,p.DynamicLayer);var t=w(n);function n(e,r){var s;let{name:i,style:o,condition:a,dataFilterId:u,crs:l=c.webMercator}=e,p=m(e,_t);return y(this,n),(s=t.call(this,p)).api=r,s.name=i,s.styleId=o,s.conditionQuery=a,s.filterId=u,s.crs=l,s.subscribeRedraw(),s}return v(n,[{key:"style",get:function(){return this.styleId},set:function(e){this.styleId=e,this.forceUpdate()}},{key:"condition",get:function(){return this.conditionQuery},set:function(e){this.conditionQuery=e,this.forceUpdate()}},{key:"dataFilterId",get:function(){return this.filterId},set:function(e){this.filterId=e,this.forceUpdate()}},{key:"getUrl",value:function(e,t){return this.api.layers.getLayerImage({name:this.name,extent:e.coordinates,size:[t.width,t.height],extentSr:e.crs.wkid,styleId:this.styleId,condition:this.conditionQuery,dataFilterId:this.filterId})}},{key:"subscribeRedraw",value:function(){this.api.notification.on("service_update",e=>{(null==e?void 0:e.data.layerName)===this.name&&(this.forceUpdate(),this.redraw())})}}]),n}();const Ht={RemoteTileService:qt,LocalTileService:qt,PostgresLayerService:Wt,StyledFeatureLayer:Wt,CompositeService:null};let Gt=function(){function e(t,n){y(this,e),this.layers=t,this.http=n}return v(e,[{key:"getLayerService",value:async function(e){let t=await this.getLayerInfo(e);const n=t.type;if(!(e=>Boolean(e&&Object.keys(Ht).includes(e)))(n))return;const r=Ht[n];if(r)return new r((e=>d({},e,{name:"services/"+e.name}))(t),this.http);throw new Error('Constructor for service type: "'+t.type+'" not implemented')}},{key:"getLayerInfo",value:async function(e){try{return await this.layers.getLayerInfo(e)}catch(t){throw new Error('Service with name: "'+e+'" not exists')}}}]),e}();var Vt;!function(e){e[e.BaseMaps=0]="BaseMaps",e[e.Layers=1]="Layers"}(Vt||(Vt={}));let zt=function(e){k(n,Mt);var t=w(n);function n(e,r,s){var i;return y(this,n),(i=t.call(this,r)).map=new u.Map,i.painter=new a.DomPainter(i.map),i.mapProps=e,i.auth=s,i.layersManager=new Gt(i.layers,i.http),i}return v(n,[{key:"init",value:async function(){await j(g(n.prototype),"init",this).call(this,{authParams:this.auth,connectWs:!0,fetchSettings:!0,initScheduler:!0});const{baseService:e,services:t,projectName:r}=this.mapProps;e&&await this.setBaseMap(e),t&&await Promise.all(t.map(e=>this.addLayer(e))),r&&await this.loadProject(r),this.setMapProps()}},{key:"reset",value:async function(){await this.account.logout(),this.painter.wrapper=null}},{key:"addLayer",value:async function(e){await this.insertLayer(e,Vt.Layers)}},{key:"setBaseMap",value:async function(e){await this.insertLayer(e,Vt.BaseMaps)}},{key:"loadProject",value:async function(e){const t=await this.projects.getProjectInfo(e);if(!t||!t.content)return;const{baseMapName:n,items:r}=t.content;if(n&&await this.setBaseMap(n),r){const e=r.map(e=>e.name).filter(Jt);await Promise.all(e.map(e=>this.addLayer(e)))}}},{key:"insertLayer",value:async function(e,t){const n=await this.layersManager.getLayerService(e);n&&this.map.insertLayer(n.layer,t)}},{key:"setMapProps",value:function(){const{position:e,centerPoint:t,mapWrapper:n,resolution:r}=this.mapProps;e?this.map.position=e:t&&(this.map.centerPoint=t),r&&(this.map.resolution=r),n&&(this.painter.wrapper=n)}}]),n}();const Jt=e=>void 0!==e;var Qt,Kt,Xt,Yt,Zt,$t,en,tn,nn,rn,sn,on,an,un,ln,cn,pn,hn,yn,fn,vn,dn,kn,gn,mn,bn,xn,wn,Tn;(Qt=exports.AggregationFunction||(exports.AggregationFunction={})).None="None",Qt.Array="Array",Qt.Min="Min",Qt.Max="Max",Qt.Avg="Avg",Qt.Sum="Sum",Qt.Extent="Extent",Qt.H3="H3",Qt.Count="Count",Qt.TotalCount="TotalCount",Qt.DistinctCount="DistinctCount",Qt.First="First",Qt.Last="Last",Qt.Median="Median",Qt.Mod="Mod",Qt.StdDeviation="StdDeviation",Qt.SumOfProduct="SumOfProduct",Qt.OnlyValue="OnlyValue",Qt.WeightedAvg="WeightedAvg",Qt.DensityIndicators="DensityIndicators",Qt.DividedSum="DividedSum",(Kt=exports.AttributeSelectorType||(exports.AttributeSelectorType={})).None="None",Kt.SelectFromHandBook="SelectFromHandBook",Kt.SelectFromRange="SelectFromRange",Kt.ViewHandBook="ViewHandBook",(Xt=exports.AttributeType||(exports.AttributeType={})).Unknown="Unknown",Xt.String="String",Xt.Int32="Int32",Xt.Int64="Int64",Xt.Double="Double",Xt.DateTime="DateTime",Xt.Boolean="Boolean",Xt.Point="Point",Xt.Polyline="Polyline",Xt.MultiPolygon="MultiPolygon",Xt.Multipoint="Multipoint",Xt.H3Index="H3Index",Xt.Json="Json",(Yt=exports.ClassificationType||(exports.ClassificationType={})).None="none",Yt.NaturalBreaks="naturalBreaks",Yt.EqualInterval="equalInterval",Yt.Quantile="quantile",Yt.Unique="unique",(Zt=exports.ClassifyAttributeType||(exports.ClassifyAttributeType={})).Decimal="decimal",Zt.DateTime="dateTime",Zt.Text="text",($t=exports.ConfigurationErrorEnum||(exports.ConfigurationErrorEnum={})).Unknown="Unknown",$t.SerializeError="SerializeError",$t.InvalidDataService="InvalidDataService",$t.InvalidConfiguration="InvalidConfiguration",$t.InvalidDataServiceName="InvalidDataServiceName",$t.InvalidTableName="InvalidTableName",$t.InvalidLayerName="InvalidLayerName",$t.ResourceNotFound="ResourceNotFound",$t.InvalidCondition="InvalidCondition",$t.InvalidAttributes="InvalidAttributes",$t.InvalidIdAttribute="InvalidIdAttribute",$t.InvalidGeometryAttribute="InvalidGeometryAttribute",$t.InvalidGeometryAttributeType="InvalidGeometryAttributeType",$t.InvalidColumnName="InvalidColumnName",$t.InvalidIdColumnSettings="InvalidIdColumnSettings",$t.ColumnNotExistsInTable="ColumnNotExistsInTable",$t.InvalidStyle="InvalidStyle",$t.InvalidLayerType="InvalidLayerType",$t.ColumnLoadingError="ColumnLoadingError",$t.InvalidAttributeFormat="InvalidAttributeFormat",$t.DataSourceNotFound="DataSourceNotFound",$t.DuplicateColumns="DuplicateColumns",$t.DuplicateAttributes="DuplicateAttributes",$t.TableWithoutColumns="TableWithoutColumns",$t.InvalidTableReferenceConfiguration="InvalidTableReferenceConfiguration",(en=exports.ErrorDetailsType||(exports.ErrorDetailsType={})).ResourceLimitExceeded="ResourceLimitExceeded",en.ResourceNotFound="ResourceNotFound",en.InternalError="InternalError",en.BadRequest="BadRequest",en.DuplicateContent="DuplicateContent",(tn=exports.ErrorType||(exports.ErrorType={})).NotSpecified="NotSpecified",tn.LimitError="LimitError",tn.ValidationError="ValidationError",tn.JwtExpired="JwtExpired",tn.TokenInvalid="TokenInvalid",tn.RefreshTokenExpired="RefreshTokenExpired",tn.RefreshTokenInvalid="RefreshTokenInvalid",tn.CreateUserFailed="CreateUserFailed",tn.SetUserPasswordFailed="SetUserPasswordFailed",tn.SetUserRoleFailed="SetUserRoleFailed",tn.UpdateUserFailed="UpdateUserFailed",tn.RemoveUserFailed="RemoveUserFailed",tn.CreateRoleFailed="CreateRoleFailed",tn.UpdateRoleFailed="UpdateRoleFailed",tn.RemoveUserRoleFailed="RemoveUserRoleFailed",tn.ChangeActiveStateFailed="ChangeActiveStateFailed",tn.RemoveRoleFailed="RemoveRoleFailed",tn.UserNotFound="UserNotFound",tn.RoleNotFound="RoleNotFound",tn.EmailNotConfirmed="EmailNotConfirmed",tn.DuplicateEmailError="DuplicateEmailError",tn.InvalidPassword="InvalidPassword",tn.RoleExists="RoleExists",tn.UserExists="UserExists",tn.UserLockedError="UserLockedError",tn.InvalidEmail="InvalidEmail",tn.InvalidUsername="InvalidUsername",tn.Unauthorized="Unauthorized",tn.EmailNotChanged="EmailNotChanged",tn.EmailNotSet="EmailNotSet",(nn=exports.FeatureType||(exports.FeatureType={})).Unknown="Unknown",nn.GeometricFeature="GeometricFeature",(rn=exports.FontStyle||(exports.FontStyle={})).Normal="normal",rn.Oblique="oblique",rn.Italic="italic",(sn=exports.FontWeight||(exports.FontWeight={})).Thin="Thin",sn.ExtraLight="ExtraLight",sn.Light="Light",sn.SemiLight="SemiLight",sn.Normal="Normal",sn.Medium="Medium",sn.DemiBold="DemiBold",sn.Bold="Bold",sn.ExtraBold="ExtraBold",sn.Black="Black",sn.ExtraBlack="ExtraBlack",(on=exports.GeometryType||(exports.GeometryType={})).Unknown="unknown",on.Point="point",on.Polyline="polyline",on.Polygon="multipolygon",on.Envelope="envelope",on.Multipoint="multipoint",(an=exports.Group||(exports.Group={})).My="my",an.Role="role",an.Public="public",an.All="all",(un=exports.LineCapStyle||(exports.LineCapStyle={})).Flat="Flat",un.Square="Square",un.Round="Round",un.Triangle="Triangle",(ln=exports.LineEndingType||(exports.LineEndingType={})).None="none",ln.Arrow="arrow",ln.FilledArrow="filledArrow",ln.Square="square",ln.FilledSquare="filledSquare",ln.Circle="circle",ln.FilledCircle="filledCircle",ln.Diamond="diamond",ln.FilledDiamond="filledDiamond",ln.RoundSquare="roundSquare",ln.FilledRoundSquare="filledRoundSquare",ln.Svg="svg",(cn=exports.LineJoinType||(exports.LineJoinType={})).Miter="Miter",cn.Bevel="Bevel",cn.Round="Round",(pn=exports.Operation||(exports.Operation={})).Unknown="Unknown",pn.Union="union",pn.Intersection="intersection",pn.Subtraction="subtraction",pn.SymDifference="symDifference",(hn=exports.PbfSchema||(exports.PbfSchema={})).XYZ="xyz",hn.TMS="tms",(yn=exports.Permissions||(exports.Permissions={})).None="none",yn.Configure="configure",yn.Write="write",yn.Read="read",yn.ReadConfigure="read,configure",yn.ReadWrite="read,write",yn.All="read,write,configure",(fn=exports.PolicyType||(exports.PolicyType={})).Unknown="Unknown",fn.CreateTable="CreateTable",fn.CreateLayer="CreateLayer",fn.CreateProject="CreateProject",fn.MaxFeaturesInOneTable="MaxFeaturesInOneTable",fn.MaxObjectsToExport="MaxObjectsToExport",fn.MaxUploadContentSize="MaxUploadContentSize",(vn=exports.ReferenceJoinType||(exports.ReferenceJoinType={})).OneToMany="OneToMany",vn.OneToOne="OneToOne",vn.Intersect="Intersect",vn.RightJoin="RightJoin",vn.FullJoin="FullJoin",vn.CrossJoin="CrossJoin",(dn=exports.ResourceType||(exports.ResourceType={})).Unknown="Unknown",dn.Table="table",dn.Layer="layer",dn.Project="project",dn.File="file",dn.Feature="feature",dn.Tag="tag",(kn=exports.ResourceTypeLink||(exports.ResourceTypeLink={})).Table="tables",kn.Layer="layers",kn.Project="projects",(gn=exports.ServerTaskStatus||(exports.ServerTaskStatus={})).None="None",gn.Scheduled="Scheduled",gn.Planning="Planning",gn.Executing="Executing",gn.Completed="Completed",gn.Failed="Failed",gn.Canceled="Canceled",gn.Timeout="Timeout",(mn=exports.SimplifyType||(exports.SimplifyType={})).Basic="Basic",mn.PreserveTopology="PreserveTopology",mn.VW="VW",(bn=exports.StringSubType||(exports.StringSubType={})).None="None",bn.Image="Image",bn.PkkCode="PkkCode",bn.Attachments="Attachments",(xn=exports.TaskGroup||(exports.TaskGroup={})).My="my",xn.All="all",(wn=exports.TextAlignment||(exports.TextAlignment={})).Right="right",wn.Left="left",wn.Center="center",wn.Justified="justified",(Tn=exports.TextVerticalAlignment||(exports.TextVerticalAlignment={})).Top="top",Tn.Bottom="bottom",Tn.Middle="middle",Object.defineProperty(exports,"HTTPError",{enumerable:!0,get:function(){return n.HTTPError}}),Object.defineProperty(exports,"TimeoutError",{enumerable:!0,get:function(){return n.TimeoutError}}),exports.Account=O,exports.AccountPreview=q,exports.Api=Mt,exports.BulkOperations=W,exports.Cameras=K,exports.ClientSettings=Y,exports.EqlTest=$,exports.EvergisDynamicLayer=Wt,exports.EvergisTileLayer=qt,exports.External=te,exports.Feedback=re,exports.FileUpload=ie,exports.Filters=ae,exports.GEOCODE_PROVIDER="geocode2gis",exports.General=le,exports.Geocode=fe,exports.HttpClient=S,exports.IceRouter=de,exports.Import=ge,exports.Layers=Ve,exports.LayersManager=Gt,exports.Names=et,exports.Namespace=nt,exports.Notification=it,exports.NotificationEvent=ot,exports.PortalSettings=at,exports.Print=lt,exports.Projects=pt,exports.ResourceCatalog=yt,exports.Resources=vt,exports.Scheduler=kt,exports.Security=mt,exports.SpatialProcessor=zt,exports.Statistic=xt,exports.Styles=Tt,exports.Tables=Rt,exports.Tools=Et,exports.VectorTiles=Nt,exports.addSubDomainToLocation=e=>window.location.protocol+"//"+e+"."+window.location.host,exports.errorHandler=Je,exports.formDataFromFile=function(e){const t=new FormData;return t.append("file",e),t},exports.generateId=$e,exports.isEvergisDynamicLayer=function(e){return e instanceof Wt},exports.isEvergisTileLayer=function(e){return e instanceof qt},exports.isFeatureLayer=function(e){return e instanceof h.FeatureLayer},exports.isHTTPError=e=>Qe(e)&&"http"===e.type,exports.isHandledError=Qe,exports.isLayer=Xe,exports.isProjectContentItems=function(e){return null!=e},exports.isString=Ye,exports.isTileLayerService=function(e){return e.type&&/TileService/.test(e.type)},exports.promiseAllIgnoreErrors=qe,exports.stripUselessSlashes=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.join("/").split("/").filter(Boolean).join("/")},exports.toFormData=L,exports.unique=Ze;
|
|
2
2
|
//# sourceMappingURL=api.cjs.production.min.js.map
|