@evergis/api 4.0.0-alpha.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__generated__/AccountPreviewService.d.ts +2 -2
- package/dist/__generated__/DataSourceService.d.ts +46 -2
- package/dist/__generated__/LayersService.d.ts +2 -2
- package/dist/__generated__/ProjectsService.d.ts +2 -2
- package/dist/__generated__/PythonService.d.ts +75 -0
- package/dist/__generated__/RemoteTaskManagerService.d.ts +14 -14
- package/dist/__generated__/ResourceCatalogService.d.ts +28 -6
- package/dist/__generated__/StatisticService.d.ts +2 -2
- package/dist/__generated__/TablesService.d.ts +2 -2
- package/dist/__generated__/data-contracts.d.ts +394 -28
- package/dist/api.cjs.development.js +164 -114
- 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 +215 -115
- package/dist/api.esm.js.map +1 -1
- package/dist/services/AccountPreview.d.ts +0 -11
- 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"),o=require("query-string"),i=require("nanoid");function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 l(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function c(){return(c=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 p(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 h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if(null==e)return{};var n,r,s={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(s[n]=e[n]);return s}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?f(e):t}function d(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=h(e);if(t){var s=h(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return v(this,n)}}function k(e,t,n){return(k="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=h(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 g=function(){function e(t){var n;void 0===t&&(t={}),u(this,e),this.ky=r.extend(t),this.prefixUrl=(null==(n=t.prefixUrl)?void 0:n.toString())||""}return l(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:b(t)})}},{key:"post",value:function(e,t,n){const r=m(n,t);return this.ky.post(this.stripSlashes(e),r)}},{key:"put",value:function(e,t,n){const r=m(n,t);return this.ky.put(this.stripSlashes(e),r)}},{key:"patch",value:function(e,t,n){const r=m(n,t);return this.ky.patch(this.stripSlashes(e),r)}},{key:"delete",value:function(e,t,n){const r=m(n,t);return this.ky.delete(this.stripSlashes(e),r)}},{key:"createUrl",value:function(e,t){const n=t?"?"+b(t):"";return this.prefixUrl+this.stripSlashes(e)+n}},{key:"stripSlashes",value:function(e){return this.prefixUrl?e.replace(/^\//g,""):e}}]),e}();function m(e,t){const n={searchParams:b(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 b(e){return void 0===e&&(e={}),o.stringify(e,{arrayFormat:"comma"})}function x(e){return e instanceof FormData?e:Object.keys(e).reduce((t,n)=>(t.append(n,e[n]),t),new FormData)}let S=l((function e(t){u(this,e),this.http=t})),j=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"createArcGisDataSource",value:function(e){return this.http.post("/ds/arcgis",e).then(()=>{})}},{key:"updateArcGisDataSource",value:function(e){return this.http.patch("/ds/arcgis",e).then(()=>{})}},{key:"getDataSourcesList",value:function(e){return this.http.get("/ds",e).json()}},{key:"createDataSource",value:function(e){return this.http.post("/ds",e).then(()=>{})}},{key:"updateDataSource",value:function(e){return this.http.patch("/ds",e).then(()=>{})}},{key:"getDataSource",value:function(e){return this.http.get("/ds/"+e).json()}},{key:"removeDataSource",value:function(e){return this.http.delete("/ds/"+e,null).then(()=>{})}},{key:"testConnection",value:function(e){return this.http.post("/ds/testConnection",e).json()}},{key:"createS3DataSource",value:function(e){return this.http.post("/ds/s3",e).then(()=>{})}},{key:"updateS3DataSource",value:function(e){return this.http.patch("/ds/s3",e).then(()=>{})}}]),n}(),w=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"createToken",value:function(e){return this.http.put("/accessToken/"+e,null).text()}},{key:"disableToken",value:function(e){return this.http.post("/accessToken/"+e+"/disable",null).then(()=>{})}},{key:"enableToken",value:function(e){return this.http.post("/accessToken/"+e+"/enable",null).then(()=>{})}},{key:"revokeToken",value:function(e){return this.http.delete("/accessToken/"+e,null).then(()=>{})}}]),n}(),T=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 P=["taskId","layerName"];let R=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"searchResultDcGetSearchResult",value:function(e){let{taskId:t,layerName:n}=e,r=y(e,P);return this.http.get("/search/"+t+"/"+n,r).json()}},{key:"getSearchResult",value:function(e){return this.http.get("/search/"+e).json()}}]),n}(),C=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getParents",value:function(e){return this.http.get("/resources/"+e+"/parents").json()}},{key:"getTags",value:function(e){return this.http.get("/resources/tags",e).json()}},{key:"putTags",value:function(e,t){return this.http.put("/resources/"+e+"/tags",t).json()}},{key:"postGetAll",value:function(e,t){return this.http.post("/resources",t,e).json()}},{key:"getResource",value:function(e){return this.http.get("/resources/"+e).json()}},{key:"patchResource",value:function(e,t){return this.http.patch("/resources/"+e,t).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/resources/"+e,null).then(()=>{})}},{key:"moveResource",value:function(e,t){return this.http.post("/resources/"+e+"/move",t).json()}},{key:"createDirectory",value:function(e){return this.http.post("/resources/directory",e).json()}},{key:"createFile",value:function(e){return this.http.post("/resources/file",x(e)).json()}},{key:"getPermissions",value:function(e){return this.http.get("/resources/"+e+"/permissions").json()}},{key:"setPermissions1",value:function(e,t){return this.http.put("/resources/"+e+"/permissions",t).then(()=>{})}},{key:"setPermissions",value:function(e){return this.http.put("/resources/permissions",e).then(()=>{})}},{key:"downloadFile",value:function(e){return this.http.get("/resources/"+e+"/download").blob()}},{key:"cleanResources",value:function(){return this.http.post("/resources/clean",null).then(()=>{})}}]),n}();var I;(I=exports.ApiEvent||(exports.ApiEvent={})).ConnectionLost="ConnectionLost",I.Unauthorized="Unauthorized",I.SessionClosed="SessionClosed";let L=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(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",x(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",x(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,t){return this.http.post("/account/login",t,e).json()}},{key:"refreshToken",value:function(e){return this.http.post("/account/refresh-token",e).json()}},{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).json()}},{key:"registerClient",value:function(e){return this.http.post("/account/oauth2/client",e).json()}},{key:"unbindClient",value:function(e){return this.http.delete("/account/oauth2/client/"+e,null).then(()=>{})}},{key:"token",value:function(e){return this.http.post("/account/oauth2/token",e).json()}},{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 E=()=>JSON.parse(localStorage.getItem("@evergis/user-info")||"null")||void 0,U=e=>{if(e){const t=E();localStorage.setItem("@evergis/user-info",JSON.stringify(c({},t,e)))}else localStorage.removeItem("@evergis/user-info")};let F=function(e){p(n,L);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"login",value:async function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),e){const s=await k(h(n.prototype),"authenticate",this).call(this,t,e);s&&r&&(window.localStorage.setItem("evergis-jwt-token",s.token),window.localStorage.setItem("evergis-refresh-token",s.refreshToken))}}},{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(){window.localStorage.getItem("evergis-jwt-token")&&(window.localStorage.removeItem("evergis-jwt-token"),window.localStorage.removeItem("evergis-refresh-token")),await this.revokeToken(),U(void 0),this.userInfo={}}},{key:"updateCurrentUser",value:async function(e){await k(h(n.prototype),"updateUser",this).call(this,c({username:this.username},e)),U(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=E();return e&&(this.userInfo=e),e}}]),n}();const A=["username"];let N=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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=y(e,A);return this.http.post("/account/user/preview/"+n,x(t),r).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/account/user/preview/"+e,null).then(()=>{})}}]),n}(),D=function(e){p(n,N);var t=d(n);function n(e,r){var s;return u(this,n),(s=t.call(this,e)).userInfo=r,s}return l(n,[{key:"user",get:function(){if(this.userInfo)return this.userInfo;const e=E();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(c({username:this.username},t),{file:e});U({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();U({profile_photo:r,has_profile_photo:!0})}},{key:"deleteCurrentUserPhoto",value:async function(){await this.deletePreview(this.username),U({profile_photo:"",has_profile_photo:!1})}}]),n}(),O=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"batchResourcesPermissionsSet",value:function(e){return this.http.put("/bulk/resources/permissions",e).json()}}]),n}(),B=function(e){p(n,O);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const _=["cameraId"],M=["cameraId"],q=["cameraId"],G=["cameraId"],H=["cameraId"],W=["cameraId"];let V=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getCameras",value:function(e){return this.http.get("/cameras",e).json()}},{key:"getArchiveFeed",value:function(e){let{cameraId:t}=e,n=y(e,_);return this.http.get("/cameras/"+t+"/archiveFeed",n).blob()}},{key:"getArchiveTimeline",value:function(e){let{cameraId:t}=e,n=y(e,M);return this.http.get("/cameras/"+t+"/archiveTimeline",n).json()}},{key:"getArchiveCalendar",value:function(e){let{cameraId:t}=e,n=y(e,q);return this.http.get("/cameras/"+t+"/archiveCalendar",n).json()}},{key:"getArchiveSnapshot",value:function(e){let{cameraId:t}=e,n=y(e,G);return this.http.get("/cameras/"+t+"/archiveSnapshot",n).blob()}},{key:"getLiveFeed",value:function(e){let{cameraId:t}=e,n=y(e,H);return this.http.get("/cameras/"+t+"/liveFeed",n).blob()}},{key:"getLiveSnapshot",value:function(e){return this.http.get("/cameras/"+e+"/liveSnapshot").blob()}},{key:"getLivePreviewStream",value:function(e){let{cameraId:t}=e,n=y(e,W);return this.http.get("/cameras/"+t+"/getLivePreviewsStream",n).json()}}]),n}(),z=function(e){p(n,V);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),Q=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),J=function(e){p(n,Q);var t=d(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).settings={modules:[],connection:{url:""}},e}return l(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}(),K=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getQueryResult",value:function(e){return this.http.post("/eql/query",e).json()}},{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(()=>{})}},{key:"getAvailiableLayerParameters",value:function(e){return this.http.get("/eql/getAvailiableParams",e).json()}}]),n}(),X=function(e){p(n,K);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),Y=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),Z=function(e){p(n,Y);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),$=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(t),e).json()}}]),n}(),ee=function(e){p(n,$);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"postFeedback",value:function(e,t){return this.feedback(e,t)}}]),n}(),te=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(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}(),ne=function(e){p(n,te);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"upload",value:function(e,t){return this.uploadFile({file:e,rewrite:!!t})}}]),n}(),re=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),se=function(e){p(n,re);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),oe=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getServerInfo",value:function(){return this.http.get("/").json()}},{key:"getFunctionsList",value:function(){return this.http.get("/functions").json()}}]),n}(),ie=function(e){p(n,oe);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const ue=["providerName"],ae=["providerName"],le=["providerName"];let ce=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"geocode",value:function(e){let{providerName:t}=e,n=y(e,ue);return this.http.get("/geocode/"+t,n).json()}},{key:"geocodeByPoint",value:function(e){let{providerName:t}=e,n=y(e,ae);return this.http.get("/geocode/"+t+"/geocodeByPoint",n).json()}},{key:"suggest",value:function(e){let{providerName:t}=e,n=y(e,le);return this.http.get("/geocode/"+t+"/suggest",n).json()}}]),n}(),pe=function(e){p(n,ce);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"geocode2Gis",value:function(e){return this.geocode(c({providerName:"geocode2gis"},e))}},{key:"suggest2Gis",value:function(e){return this.suggest(c({providerName:"geocode2gis"},e))}}]),n}(),he=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),ye=function(e){p(n,he);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),fe=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),ve=function(e){p(n,fe);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const de=["name"],ke=["name"],ge=["name"],me=["name","id"],be=["name","id"],xe=["name","id"],Se=["name","x","y","z"],je=["name"],we=["name"],Te=["name"],Pe=["name"],Re=["name"],Ce=["name"],Ie=["name"],Le=["name"],Ee=["name"],Ue=["name"],Fe=["name"],Ae=["layerName"],Ne=["name","id"];let De=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getBulkFeatures",value:function(e){return this.http.post("/bulk/layers/features/query",e).json()}},{key:"getBulkExtents",value:function(e,t){return this.http.post("/bulk/layers/extent",t,e).json()}},{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=y(e,de);return this.http.get("/layers/"+t+"/features",n).json()}},{key:"deleteFeature",value:function(e){let{name:t}=e,n=y(e,ke);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=y(e,ge);return this.http.get("/layers/"+t+"/features/contains",n).json()}},{key:"getById",value:function(e){let{name:t,id:n}=e,r=y(e,me);return this.http.get("/layers/"+t+"/features/"+n,r).json()}},{key:"unite",value:function(e,t){let{name:n,id:r}=e,s=y(e,be);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=y(e,xe);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,o=y(e,Se);return this.http.createUrl("/layers/"+t+"/tile/"+s+"/"+n+"/"+r,o)}},{key:"getLayerImage",value:function(e){let{name:t}=e,n=y(e,je);return this.http.createUrl("/layers/"+t+"/export",n)}},{key:"getLayerExtent",value:function(e){let{name:t}=e,n=y(e,we);return this.http.get("/layers/"+t+"/extent",n).json()}},{key:"getByGeometry",value:function(e){let{name:t}=e,n=y(e,Te);return this.http.get("/layers/"+t+"/features/getByGeometry",n).json()}},{key:"getByGeometryPost",value:function(e,t){let{name:n}=e,r=y(e,Pe);return this.http.post("/layers/"+n+"/features/getByGeometry",t,r).json()}},{key:"deleteFeatures",value:function(e){let{name:t}=e,n=y(e,Re);return this.http.delete("/layers/"+t+"/features/deleteByIds",null,n).json()}},{key:"deleteByCondition",value:function(e){let{name:t}=e,n=y(e,Ce);return this.http.delete("/layers/"+t+"/features/deleteByCondition",null,n).json()}},{key:"getByGeometryGet",value:function(e){let{name:t}=e,n=y(e,Ie);return this.http.get("/layers/"+t+"/features/getByGeometryByClick",n).json()}},{key:"classify",value:function(e){let{name:t}=e,n=y(e,Le);return this.http.get("/layers/"+t+"/classify",n).json()}},{key:"distincts",value:function(e){let{name:t}=e,n=y(e,Ee);return this.http.get("/layers/"+t+"/distincts",n).json()}},{key:"aggregateAttribute",value:function(e){let{name:t}=e,n=y(e,Ue);return this.http.get("/layers/"+t+"/aggregate-values",n).json()}},{key:"getFilteredFeaturesCount",value:function(e){let{name:t}=e,n=y(e,Fe);return this.http.get("/layers/"+t+"/features/count",n).json()}},{key:"getFilteredFeaturesCount1",value:function(e,t){return this.http.post("/layers/"+e+"/features/count",t).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=y(e,Ae);return this.http.get("/layers/"+t+"/validateExpression",n).json()}},{key:"getRasterMeta",value:function(e){let{name:t,id:n}=e,r=y(e,Ne);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:"applyStyle",value:function(e,t){return this.http.put("/layers/"+e+"/style",t).then(()=>{})}},{key:"getStyle",value:function(e){return this.http.get("/layers/"+e+"/style").json()}},{key:"getImageLayout",value:function(e){return this.http.get("/layers/"+e+"/style/sprite.png").blob()}},{key:"getDataLayout",value:function(e){return this.http.get("/layers/"+e+"/style/sprite.json").then(()=>{})}},{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",x(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 Oe(e){return(await Promise.all(e.map(e=>e.catch(e=>Be(e)?e:new Error(e))))).filter(_e)}function Be(e){return e instanceof Error}function _e(e){return!Be(e)}const Me=["remote"],qe=["remote"];let Ge=function(e){p(n,De);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getLayerInfos",value:function(e){return Oe(e.map(e=>this.getLayerInfo(e)))}},{key:"getLayersDeps",value:function(e){return Oe(e.map(e=>this.getResourceDependencies(e)))}},{key:"getBasemaps",value:function(e){return this.getLayersList(c({},e,{types:["LocalTileService","RemoteTileService"]}))}},{key:"createSubLayer",value:function(e){return this.publishStyledLayerService(e)}},{key:"createTileLayer",value:function(e){let{remote:t}=e,n=y(e,Me);return t?this.publishRemoteTileService(n):this.publishLocalTileService(n)}},{key:"updateTileLayer",value:function(e){let{remote:t}=e,n=y(e,qe);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:"findMany",value:function(e,t){return this.getLayersInfo({layerNames:e,projectNames:t})}},{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 He;(He=exports.ErrorReason||(exports.ErrorReason={})).HTTP_OTHER="other",He.HTTP_CLIENT="client",He.HTTP_SERVER="server",He.UNKNOWN="unknown";const We=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),Ve=e=>e&&e.type&&e.reason;function ze(e){return"string"==typeof e}const Qe=e=>e===exports.UrlPath.Presentation?exports.UrlPath.Base:e;function Je(e,t,n){return n.indexOf(e)===t}const Ke=i.customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789",12);(exports.ResourceSeparator||(exports.ResourceSeparator={})).Server=".";let Xe=function(){function e(t){let{account:n}=t;u(this,e),this.account=n}return l(e,[{key:"createId",value:function(){return Ke()}},{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(c({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}(),Ye=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),Ze=function(e){p(n,Ye);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),$e=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 et;(et=exports.ConnectionStatus||(exports.ConnectionStatus={})).Initialized="Initialized",et.Connected="Connected",et.Break="Break",et.Lost="Lost",et.SessionClosed="SessionClosed";let tt=function(e){p(r,$e);var n=d(r);function r(e,s,o){var i;return void 0===o&&(o=!1),u(this,r),(i=n.call(this,e)).api=s,i.MAX_WS_RECONNECT_TRIES=10,i.keepAlive=!1,i.reconnectTries=0,i.subscriptions=[],i._connectStatus=exports.ConnectionStatus.Initialized,i.onWsConnected=()=>{i.connectStatus=exports.ConnectionStatus.Connected,i.keepAlive&&(i.keepAliveTimeout=setInterval(()=>{i.ws&&i.ws.send(JSON.stringify({keepAlive:!0}))},5e3))},i.onWsClosed=e=>{4001===e.code||4002===e.code?i.connectStatus=exports.ConnectionStatus.SessionClosed:i.reconnectTries<i.MAX_WS_RECONNECT_TRIES?(i.connectStatus=exports.ConnectionStatus.Break,i.reconnectTries++,i.ws&&(i.ws.onopen=null,i.ws.onclose=null,i.ws.onmessage=null,i.ws=void 0),i.keepAliveTimeout&&clearInterval(i.keepAliveTimeout),setTimeout(()=>{i.connect()},0)):i.connectStatus=exports.ConnectionStatus.Lost},i.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&&i.emitter.emit(e,new nt(n))}},i.emitter=new t.EventEmitter,i.keepAlive=o,i}return l(r,[{key:"connectStatus",get:function(){return this._connectStatus},set:function(e){this.emitter.emit("ConnectionStatus",new nt(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.api.isPresentation||!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}(),nt=l((function e(t){u(this,e),this.data=t})),rt=function(e){p(n,Q);var t=d(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).config=null,e}return l(n,[{key:"fetchPortalSettings",value:async function(e){return this.config=JSON.parse(await this.getConfiguration(e)),this.config}}]),n}(),st=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(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}(),ot=function(e){p(n,st);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const it=["name"];let ut=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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:"getProjectEnvelope",value:function(e){let{name:t}=e,n=y(e,it);return this.http.get("/projects/"+t+"/extent",n).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",x(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}(),at=function(e){p(n,ut);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getProjectInfos",value:function(e){return Oe(e.map(e=>this.getProjectInfo(e)))}},{key:"getProjectsDeps",value:function(e){return Oe(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}();const lt=["id"];let ct=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"cancelTask",value:function(e){return this.http.post("/scheduler/tasks/"+e+"/cancel",null).then(()=>{})}},{key:"startCogCreateTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"cogService_create"}).then(()=>{})}},{key:"startRasterVrtTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"cogService_vrt"}).then(()=>{})}},{key:"startNetCdfTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"cogService_netcdf"}).then(()=>{})}},{key:"startBufferTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geoService_buffer"}).then(()=>{})}},{key:"startCopyTableTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geoService_copy"}).then(()=>{})}},{key:"startUnionTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geoService_union"}).then(()=>{})}},{key:"startOverlayTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geoService_overlay"}).then(()=>{})}},{key:"startCopyTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"copyTask"}).then(()=>{})}},{key:"startAvailableAreaTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"availabilityArea"}).then(()=>{})}},{key:"startGeocodeTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geocodeTask"}).then(()=>{})}},{key:"get",value:function(e){return this.http.get("/scheduler/task/"+e+"/subtasks").then(()=>{})}},{key:"stop",value:function(e){return this.http.post("/scheduler/task/"+e+"/stop",null).then(()=>{})}},{key:"createTaskPrototype",value:function(e){return this.http.post("/scheduler",e).then(()=>{})}},{key:"getTaskPrototypes",value:function(e){return this.http.get("/scheduler",e).then(()=>{})}},{key:"updateTaskPrototype",value:function(e,t){return this.http.put("/scheduler/"+e,t).then(()=>{})}},{key:"delete",value:function(e){return this.http.delete("/scheduler/"+e,null).then(()=>{})}},{key:"setEnable",value:function(e,t){return this.http.post("/scheduler/"+e+"/enable/"+t,null).then(()=>{})}},{key:"getTasksForPrototype",value:function(e){let{id:t}=e,n=y(e,lt);return this.http.get("/scheduler/"+t+"/tasks",n).then(()=>{})}},{key:"startTask",value:function(e,t){return this.http.post("/scheduler/"+e+"/start/"+t,null).then(()=>{})}},{key:"startTask1",value:function(e){return this.http.post("/scheduler/"+e+"/start",null).then(()=>{})}},{key:"get1",value:function(){return this.http.get("/scheduler/worker").then(()=>{})}},{key:"post",value:function(e){return this.http.post("/scheduler/worker",e).then(()=>{})}}]),n}(),pt=function(e){p(n,ct);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),ht=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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){p(n,ht);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();var ft;(ft=exports.DependencyType||(exports.DependencyType={})).Layer="Layer",ft.Table="Table",ft.Project="Project";let vt=function(){function e(t,n,r){u(this,e),this.projects=t,this.layers=n,this.tables=r}return l(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(Je)),layers:await this.layers.getLayerInfos(s.filter(Je))}}},{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(ze)}}]),e}(),dt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),kt=function(e){p(n,dt);var t=d(n);function n(e,r){var s;let{username:o,roles:i}=r;return u(this,n),(s=t.call(this,e)).ownerName="",s.ownerRoles=[],s.ownerName=o,s.ownerRoles=i,s}return l(n,[{key:"reset",value:function(){this.ownerName="",this.ownerRoles=[]}}]),n}(),gt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"statisticsDb",value:function(e){return this.http.get("/statistics",e).json()}},{key:"statisticsDb1",value:function(e){return this.http.post("/statistics",e).json()}},{key:"classify",value:function(e){return this.http.get("/statistics/classify",e).json()}},{key:"classify1",value:function(e){return this.http.post("/statistics/classify",e).json()}},{key:"sumOfProduct",value:function(e){return this.http.get("/statistics/sumOfProduct",e).json()}},{key:"sumOfProduct1",value:function(e){return this.http.post("/statistics/sumOfProduct",e).json()}}]),n}(),mt=function(e){p(n,gt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getStatistic",value:function(e){return this.statisticsDb(e)}},{key:"postStatistic",value:function(e){return this.statisticsDb1(e)}},{key:"getClassify",value:function(e){return this.classify(e)}},{key:"postClassify",value:function(e){return this.classify1(e)}}]),n}(),bt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(e)).then(()=>{})}},{key:"removeFont",value:function(e){return this.http.delete("/styles/fonts",null,e).then(()=>{})}}]),n}(),xt=function(e){p(n,bt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const St=["name"],jt=["name"],wt=["name"],Tt=["name"];let Pt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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=y(e,St);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=y(e,jt);return this.http.patch("/tables/"+n+"/data",t,r).then(()=>{})}},{key:"deleteTableData",value:function(e){let{name:t}=e,n=y(e,wt);return this.http.delete("/tables/"+t+"/data",null,n).then(()=>{})}},{key:"getUniqueDataRows",value:function(e){let{name:t}=e,n=y(e,Tt);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:"createViewFromQueryLayer",value:function(e){return this.http.post("/tables/fromLayer",e).json()}},{key:"createViewFromQuery",value:function(e){return this.http.post("/tables/fromQuery",e).json()}},{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",x(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){p(n,Pt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getTableInfos",value:function(e){return Oe(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){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),It=function(e){p(n,Ct);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const Lt=["name","z","x","y"];let Et=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getVectorTile",value:function(e){let{name:t,z:n,x:r,y:s}=e,o=y(e,Lt);return this.http.get("/vt/"+t+"/"+n+"/"+r+"/"+s+".pbf",o).then(()=>{})}}]),n}(),Ut=function(e){p(n,Et);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 Ft;(Ft=exports.UrlPath||(exports.UrlPath={})).Base="/map",Ft.Shared="/shared",Ft.Presentation="/presentation",Ft.Portal="/portal";const At={401:exports.ApiEvent.Unauthorized},Nt=Object.values(exports.UrlPath),Dt=Nt[0];let Ot=function(e){p(o,t.EventEmitter);var r=d(o);function o(e){var t,i;let{url:a,wsUrl:l,wsKeepAlive:p,snappingHubUrl:h,http:y,urlPath:v,httpOptions:d}=e;u(this,o),i=r.call(this);const{hooks:k}=d||{};return i.http=y||new g(c({prefixUrl:a,timeout:!1,retry:{methods:["get","post","delete"],limit:5,statusCodes:[401]}},d||{},{hooks:c({},k||{},{beforeRequest:[e=>{const t=window.localStorage.getItem("evergis-jwt-token");var n;t&&(null==(n=e.headers)||n.set("Authorization","Bearer "+(t||"")))},...null!=(t=null==k?void 0:k.beforeRequest)?t:[]],beforeRetry:[async e=>{let{request:t,error:r,retryCount:s}=e;if(r instanceof n.HTTPError&&401===r.response.status&&1===s)try{const e=window.localStorage.getItem("evergis-refresh-token");if(e){var o;const n=await i.account.refreshToken({refreshToken:e});n&&(window.localStorage.setItem("evergis-jwt-token",n.token),window.localStorage.setItem("evergis-refresh-token",n.refreshToken)),null==(o=t.headers)||o.set("Authorization","Bearer "+(n.token||""))}}catch(r){throw new Error("Failed to refresh token")}}],afterResponse:[(e,t,r)=>{const s=At[r.status];return s&&i.emit(s,We(new n.HTTPError(r,e,t))),r},...(null==k?void 0:k.afterResponse)||[]]})})),i.url=a,i.wsUrl=l||a,i.urlPath=v||i.defineUrlPath(),i.layers=new Ge(i.http),i.tables=new Rt(i.http),i.projects=new at(i.http),i.resources=new vt(i.projects,i.layers,i.tables),i.styles=new xt(i.http),i.account=new F(i.http),i.accountPreview=new D(i.http,i.account),i.bulk=new B(i.http),i.security=new kt(i.http,i.account),i.notification=new tt(i.http,f(i),p),i.file=new ne(i.http),i.filters=new se(i.http),i.import=new ve(i.http),i.geocode=new pe(i.http),i.cameras=new z(i.http),i.print=new ot(i.http),i.tools=new It(i.http),i.resourceCatalog=new yt(i.http),i.general=new ie(i.http),i.namespace=new Ze(i.http),i.external=new Z(i.http),i.clientSettings=new J(i.http),i.portalSettings=new rt(i.http),i.iceRouter=new ye(i.http),i.statistic=new mt(i.http),i.feedback=new ee(i.http),i.vectorTiles=new Ut(i.http),i.universalSearch=new R(i.http),i.spatialReference=new T(i.http),i.eql=new X(i.http),i.catalog=new C(i.http),i.queryToken=new w(i.http),i.dataSource=new j(i.http),i.remoteTaskManager=new pt(i.http),i.names=new Xe({account:i.account}),i.snappingHub=h?(new s.HubConnectionBuilder).withUrl(h,{withCredentials:!0,skipNegotiation:!0,transport:s.HttpTransportType.WebSockets}).withAutomaticReconnect().build():null,i}return l(o,[{key:"init",value:async function(e){let{authParams:t,authQueryParams:n,connectWs:r,fetchSettings:s,fetchUser:o,useJwt:i}=e;try{await this.account.login(t,n,i),o&&await this.account.fetchCurrentUser(),r&&await this.connectWs(),s&&await this.clientSettings.fetchClientSettings({urlPath:Qe(this.urlPath)}),await this.notification.subscribe("service_update")}catch(e){throw We(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 We(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:"defineUrlPath",value:function(){const e=(window.location.href.split(window.location.hostname)[1]||"").split("/").filter(Boolean)[0],t=e?"/"+e:void 0;return t&&Nt.includes(t)?t:Dt}},{key:"isShared",get:function(){return this.urlPath===exports.UrlPath.Shared}},{key:"isPresentation",get:function(){return this.urlPath===exports.UrlPath.Presentation||"8082"===window.location.port}}]),o}();var Bt,_t,Mt,qt,Gt,Ht,Wt,Vt,zt,Qt,Jt,Kt,Xt,Yt,Zt,$t,en,tn,nn,rn,sn,on,un,an,ln,cn,pn,hn,yn,fn,vn,dn,kn,gn,mn;(Bt=exports.AggregationFunction||(exports.AggregationFunction={})).None="None",Bt.Array="Array",Bt.Min="Min",Bt.Max="Max",Bt.Avg="Avg",Bt.Sum="Sum",Bt.Extent="Extent",Bt.H3="H3",Bt.Count="Count",Bt.TotalCount="TotalCount",Bt.DistinctCount="DistinctCount",Bt.First="First",Bt.Last="Last",Bt.Median="Median",Bt.Mod="Mod",Bt.StdDeviation="StdDeviation",Bt.SumOfProduct="SumOfProduct",Bt.OnlyValue="OnlyValue",Bt.WeightedAvg="WeightedAvg",Bt.DensityIndicators="DensityIndicators",Bt.DividedSum="DividedSum",(_t=exports.AttributeIconType||(exports.AttributeIconType={})).Unknown="Unknown",_t.Icon="Icon",_t.PNG="PNG",_t.SVG="SVG",(Mt=exports.AttributeSelectorType||(exports.AttributeSelectorType={})).None="None",Mt.SelectFromHandBook="SelectFromHandBook",Mt.SelectFromRange="SelectFromRange",Mt.ViewHandBook="ViewHandBook",(qt=exports.AttributeType||(exports.AttributeType={})).Unknown="Unknown",qt.String="String",qt.Int32="Int32",qt.Int64="Int64",qt.Double="Double",qt.DateTime="DateTime",qt.Boolean="Boolean",qt.Point="Point",qt.Polyline="Polyline",qt.MultiPolygon="MultiPolygon",qt.Multipoint="Multipoint",qt.H3Index="H3Index",qt.Json="Json",(Gt=exports.AuthorizationGrant||(exports.AuthorizationGrant={})).AuthorizationCode="authorization_code",Gt.RefreshToken="refresh_token",(Ht=exports.CatalogResourceType||(exports.CatalogResourceType={})).None="None",Ht.Map="Map",Ht.Layer="Layer",Ht.Table="Table",Ht.File="File",Ht.TaskPrototype="TaskPrototype",Ht.DataSource="DataSource",(Wt=exports.ClassificationType||(exports.ClassificationType={})).None="none",Wt.NaturalBreaks="naturalBreaks",Wt.EqualInterval="equalInterval",Wt.Quantile="quantile",Wt.Unique="unique",(Vt=exports.ClassifyAttributeType||(exports.ClassifyAttributeType={})).Decimal="decimal",Vt.DateTime="dateTime",Vt.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",(Qt=exports.DataSourceType||(exports.DataSourceType={})).Postgres="Postgres",Qt.Trino="Trino",Qt.S3="S3",Qt.GisServer="GisServer",(Jt=exports.ErrorDetailsType||(exports.ErrorDetailsType={})).ResourceLimitExceeded="ResourceLimitExceeded",Jt.ResourceNotFound="ResourceNotFound",Jt.InternalError="InternalError",Jt.BadRequest="BadRequest",Jt.DuplicateContent="DuplicateContent",(Kt=exports.ErrorType||(exports.ErrorType={})).NotSpecified="NotSpecified",Kt.LimitError="LimitError",Kt.ValidationError="ValidationError",Kt.JwtExpired="JwtExpired",Kt.TokenInvalid="TokenInvalid",Kt.RefreshTokenExpired="RefreshTokenExpired",Kt.RefreshTokenInvalid="RefreshTokenInvalid",Kt.CreateUserFailed="CreateUserFailed",Kt.SetUserPasswordFailed="SetUserPasswordFailed",Kt.SetUserRoleFailed="SetUserRoleFailed",Kt.UpdateUserFailed="UpdateUserFailed",Kt.RemoveUserFailed="RemoveUserFailed",Kt.CreateRoleFailed="CreateRoleFailed",Kt.UpdateRoleFailed="UpdateRoleFailed",Kt.RemoveUserRoleFailed="RemoveUserRoleFailed",Kt.ChangeActiveStateFailed="ChangeActiveStateFailed",Kt.RemoveRoleFailed="RemoveRoleFailed",Kt.UserNotFound="UserNotFound",Kt.RoleNotFound="RoleNotFound",Kt.EmailNotConfirmed="EmailNotConfirmed",Kt.DuplicateEmailError="DuplicateEmailError",Kt.InvalidPassword="InvalidPassword",Kt.RoleExists="RoleExists",Kt.UserExists="UserExists",Kt.UserLockedError="UserLockedError",Kt.InvalidEmail="InvalidEmail",Kt.InvalidUsername="InvalidUsername",Kt.Unauthorized="Unauthorized",Kt.EmailNotChanged="EmailNotChanged",Kt.EmailNotSet="EmailNotSet",(Xt=exports.FeatureType||(exports.FeatureType={})).Unknown="Unknown",Xt.GeometricFeature="GeometricFeature",(Yt=exports.FontStyle||(exports.FontStyle={})).Normal="normal",Yt.Oblique="oblique",Yt.Italic="italic",(Zt=exports.FontWeight||(exports.FontWeight={})).Thin="Thin",Zt.ExtraLight="ExtraLight",Zt.Light="Light",Zt.SemiLight="SemiLight",Zt.Normal="Normal",Zt.Medium="Medium",Zt.DemiBold="DemiBold",Zt.Bold="Bold",Zt.ExtraBold="ExtraBold",Zt.Black="Black",Zt.ExtraBlack="ExtraBlack",($t=exports.GeometryType||(exports.GeometryType={})).Unknown="unknown",$t.Point="point",$t.Polyline="polyline",$t.Polygon="multipolygon",$t.Envelope="envelope",$t.Multipoint="multipoint",(en=exports.Group||(exports.Group={})).My="my",en.Role="role",en.Public="public",en.All="all",(tn=exports.LineCapStyle||(exports.LineCapStyle={})).Flat="Flat",tn.Square="Square",tn.Round="Round",tn.Triangle="Triangle",(nn=exports.LineEndingType||(exports.LineEndingType={})).None="none",nn.Arrow="arrow",nn.FilledArrow="filledArrow",nn.Square="square",nn.FilledSquare="filledSquare",nn.Circle="circle",nn.FilledCircle="filledCircle",nn.Diamond="diamond",nn.FilledDiamond="filledDiamond",nn.RoundSquare="roundSquare",nn.FilledRoundSquare="filledRoundSquare",nn.Svg="svg",(rn=exports.LineJoinType||(exports.LineJoinType={})).Miter="Miter",rn.Bevel="Bevel",rn.Round="Round",(sn=exports.Operation||(exports.Operation={})).Unknown="Unknown",sn.Union="union",sn.Intersection="intersection",sn.Subtraction="subtraction",sn.SymDifference="symDifference",(on=exports.OwnerFilter||(exports.OwnerFilter={})).My="My",on.Shared="Shared",on.Public="Public",(un=exports.PbfSchema||(exports.PbfSchema={})).XYZ="xyz",un.TMS="tms",(an=exports.Permissions||(exports.Permissions={})).None="none",an.Configure="configure",an.Write="write",an.Read="read",an.ReadConfigure="read,configure",an.ReadWrite="read,write",an.All="read,write,configure",(ln=exports.PolicyType||(exports.PolicyType={})).Unknown="Unknown",ln.CreateTable="CreateTable",ln.CreateLayer="CreateLayer",ln.CreateProject="CreateProject",ln.MaxFeaturesInOneTable="MaxFeaturesInOneTable",ln.MaxObjectsToExport="MaxObjectsToExport",ln.MaxUploadContentSize="MaxUploadContentSize",ln.MaxEqlQueryParametersValues="MaxEqlQueryParametersValues",(cn=exports.Quality||(exports.Quality={})).Low="Low",cn.Medium="Medium",cn.High="High",(pn=exports.ResourceSubTypeFilter||(exports.ResourceSubTypeFilter={})).RemoteTileService="RemoteTileService",pn.ProxyService="ProxyService",pn.PostgresLayerService="PostgresLayerService",pn.QueryLayerService="QueryLayerService",pn.TileCatalogTable="TileCatalogTable",(hn=exports.ResourceType||(exports.ResourceType={})).Unknown="Unknown",hn.Table="table",hn.Layer="layer",hn.Project="project",hn.File="file",hn.Feature="feature",hn.Tag="tag",hn.DataSource="datasource",(yn=exports.ResourceTypeFilter||(exports.ResourceTypeFilter={})).Map="Map",yn.Layer="Layer",yn.Table="Table",yn.RasterCatalog="RasterCatalog",yn.ProxyService="ProxyService",yn.RemoteTileService="RemoteTileService",yn.File="File",yn.DataSource="DataSource",(fn=exports.ResourceTypeLink||(exports.ResourceTypeLink={})).Table="tables",fn.Layer="layers",fn.Project="projects",(vn=exports.ResponseType||(exports.ResponseType={})).Code="code",vn.Token="token",(dn=exports.SimplifyType||(exports.SimplifyType={})).Basic="Basic",dn.PreserveTopology="PreserveTopology",dn.VW="VW",(kn=exports.StringSubType||(exports.StringSubType={})).None="None",kn.Image="Image",kn.PkkCode="PkkCode",kn.Attachments="Attachments",(gn=exports.TextAlignment||(exports.TextAlignment={})).Right="right",gn.Left="left",gn.Center="center",gn.Justified="justified",(mn=exports.TextVerticalAlignment||(exports.TextVerticalAlignment={})).Top="top",mn.Bottom="bottom",mn.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=F,exports.AccountPreview=D,exports.Api=Ot,exports.BulkOperations=B,exports.Cameras=z,exports.ClientSettings=J,exports.Eql=X,exports.External=Z,exports.Feedback=ee,exports.FileUpload=ne,exports.Filters=se,exports.GEOCODE_PROVIDER="geocode2gis",exports.General=ie,exports.Geocode=pe,exports.HttpClient=g,exports.IceRouter=ye,exports.Import=ve,exports.Layers=Ge,exports.Names=Xe,exports.Namespace=Ze,exports.Notification=tt,exports.NotificationEvent=nt,exports.PortalSettings=rt,exports.Print=ot,exports.Projects=at,exports.RemoteTaskManager=pt,exports.ResourceCatalog=yt,exports.Resources=vt,exports.STORAGE_REFRESH_TOKEN_KEY="evergis-refresh-token",exports.STORAGE_TOKEN_KEY="evergis-jwt-token",exports.Security=kt,exports.Statistic=mt,exports.Styles=xt,exports.Tables=Rt,exports.Tools=It,exports.VectorTiles=Ut,exports.addSubDomainToLocation=e=>window.location.protocol+"//"+e+"."+window.location.host,exports.errorHandler=We,exports.formDataFromFile=function(e){const t=new FormData;return t.append("file",e),t},exports.generateId=Ke,exports.getFetchingUrlPath=Qe,exports.isHTTPError=e=>Ve(e)&&"http"===e.type,exports.isHandledError=Ve,exports.isProjectContentItems=function(e){return null!=e},exports.isString=ze,exports.isTileLayerService=function(e){return e.type&&/TileService/.test(e.type)},exports.parseJwt=e=>{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(t).split("").map(e=>"%"+"00".concat(e.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(n)},exports.promiseAllIgnoreErrors=Oe,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=x,exports.unique=Je;
|
|
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"),o=require("query-string"),i=require("nanoid");function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 l(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function c(){return(c=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 p(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 h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if(null==e)return{};var n,r,s={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(s[n]=e[n]);return s}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?f(e):t}function d(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=h(e);if(t){var s=h(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return v(this,n)}}function k(e,t,n){return(k="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=h(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 g=function(){function e(t){var n;void 0===t&&(t={}),u(this,e),this.ky=r.extend(t),this.prefixUrl=(null==(n=t.prefixUrl)?void 0:n.toString())||""}return l(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:b(t)})}},{key:"post",value:function(e,t,n){const r=m(n,t);return this.ky.post(this.stripSlashes(e),r)}},{key:"put",value:function(e,t,n){const r=m(n,t);return this.ky.put(this.stripSlashes(e),r)}},{key:"patch",value:function(e,t,n){const r=m(n,t);return this.ky.patch(this.stripSlashes(e),r)}},{key:"delete",value:function(e,t,n){const r=m(n,t);return this.ky.delete(this.stripSlashes(e),r)}},{key:"createUrl",value:function(e,t){const n=t?"?"+b(t):"";return this.prefixUrl+this.stripSlashes(e)+n}},{key:"stripSlashes",value:function(e){return this.prefixUrl?e.replace(/^\//g,""):e}}]),e}();function m(e,t){const n={searchParams:b(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 b(e){return void 0===e&&(e={}),o.stringify(e,{arrayFormat:"comma"})}function x(e){return e instanceof FormData?e:Object.keys(e).reduce((t,n)=>(t.append(n,e[n]),t),new FormData)}let S=l((function e(t){u(this,e),this.http=t})),j=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"createArcGisDataSource",value:function(e){return this.http.post("/ds/arcgis",e).then(()=>{})}},{key:"updateArcGisDataSource",value:function(e){return this.http.patch("/ds/arcgis",e).then(()=>{})}},{key:"getDataSourcesList",value:function(e){return this.http.get("/ds",e).json()}},{key:"createDataSource",value:function(e){return this.http.post("/ds",e).then(()=>{})}},{key:"updateDataSource",value:function(e){return this.http.patch("/ds",e).then(()=>{})}},{key:"getDataSource",value:function(e){return this.http.get("/ds/"+e).json()}},{key:"removeDataSource",value:function(e){return this.http.delete("/ds/"+e,null).then(()=>{})}},{key:"testConnection",value:function(e){return this.http.post("/ds/testConnection",e).json()}},{key:"createMosRuDataSource",value:function(e){return this.http.post("/ds/dataMosRu",e).then(()=>{})}},{key:"updateMosRuDataSource",value:function(e){return this.http.patch("/ds/dataMosRu",e).then(()=>{})}},{key:"createS3DataSource",value:function(e){return this.http.post("/ds/s3",e).then(()=>{})}},{key:"updateS3DataSource",value:function(e){return this.http.patch("/ds/s3",e).then(()=>{})}},{key:"createArcGisDataSource1",value:function(e){return this.http.post("/ds/wms",e).then(()=>{})}},{key:"updateArcGisDataSource1",value:function(e){return this.http.patch("/ds/wms",e).then(()=>{})}}]),n}(),T=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"createToken",value:function(e){return this.http.put("/accessToken/"+e,null).text()}},{key:"disableToken",value:function(e){return this.http.post("/accessToken/"+e+"/disable",null).then(()=>{})}},{key:"enableToken",value:function(e){return this.http.post("/accessToken/"+e+"/enable",null).then(()=>{})}},{key:"revokeToken",value:function(e){return this.http.delete("/accessToken/"+e,null).then(()=>{})}}]),n}(),w=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 P=["taskId","layerName"];let R=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"searchResultDcGetSearchResult",value:function(e){let{taskId:t,layerName:n}=e,r=y(e,P);return this.http.get("/search/"+t+"/"+n,r).json()}},{key:"getSearchResult",value:function(e){return this.http.get("/search/"+e).json()}}]),n}(),C=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getParents",value:function(e){return this.http.get("/resources/"+e+"/parents").json()}},{key:"getTags",value:function(e){return this.http.get("/resources/tags",e).json()}},{key:"putTags",value:function(e,t){return this.http.put("/resources/"+e+"/tags",t).json()}},{key:"postGetAll",value:function(e,t){return this.http.post("/resources",t,e).json()}},{key:"getResource",value:function(e){return this.http.get("/resources/"+e).json()}},{key:"patchResource",value:function(e,t){return this.http.patch("/resources/"+e,t).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/resources/"+e,null).then(()=>{})}},{key:"moveResource",value:function(e,t){return this.http.post("/resources/"+e+"/move",t).json()}},{key:"createDirectory",value:function(e){return this.http.post("/resources/directory",e).json()}},{key:"createFile",value:function(e){return this.http.post("/resources/file",x(e)).json()}},{key:"getPermissions",value:function(e){return this.http.get("/resources/"+e+"/permissions").json()}},{key:"setPermissions1",value:function(e,t){return this.http.put("/resources/"+e+"/permissions",t).then(()=>{})}},{key:"setPermissions",value:function(e){return this.http.put("/resources/permissions",e).then(()=>{})}},{key:"downloadFile",value:function(e){return this.http.get("/resources/"+e+"/download").blob()}},{key:"cleanResources",value:function(){return this.http.post("/resources/clean",null).then(()=>{})}}]),n}();var I;(I=exports.ApiEvent||(exports.ApiEvent={})).ConnectionLost="ConnectionLost",I.Unauthorized="Unauthorized",I.SessionClosed="SessionClosed";let L=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(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",x(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",x(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,t){return this.http.post("/account/login",t,e).json()}},{key:"refreshToken",value:function(e){return this.http.post("/account/refresh-token",e).json()}},{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).json()}},{key:"registerClient",value:function(e){return this.http.post("/account/oauth2/client",e).json()}},{key:"unbindClient",value:function(e){return this.http.delete("/account/oauth2/client/"+e,null).then(()=>{})}},{key:"token",value:function(e){return this.http.post("/account/oauth2/token",e).json()}},{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 E=()=>JSON.parse(localStorage.getItem("@evergis/user-info")||"null")||void 0,F=e=>{if(e){const t=E();localStorage.setItem("@evergis/user-info",JSON.stringify(c({},t,e)))}else localStorage.removeItem("@evergis/user-info")};let U=function(e){p(n,L);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"login",value:async function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),e){const s=await k(h(n.prototype),"authenticate",this).call(this,t,e);s&&r&&(window.localStorage.setItem("evergis-jwt-token",s.token),window.localStorage.setItem("evergis-refresh-token",s.refreshToken))}}},{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(){window.localStorage.getItem("evergis-jwt-token")&&(window.localStorage.removeItem("evergis-jwt-token"),window.localStorage.removeItem("evergis-refresh-token")),await this.revokeToken(),F(void 0),this.userInfo={}}},{key:"updateCurrentUser",value:async function(e){await k(h(n.prototype),"updateUser",this).call(this,c({username:this.username},e)),F(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=E();return e&&(this.userInfo=e),e}}]),n}(),A=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getPreview",value:function(e){return this.http.createUrl("/account/user/preview/"+e)}},{key:"uploadPreview",value:function(e,t){return this.http.post("/account/user/preview/"+e,x(t)).json()}},{key:"deletePreview",value:function(e){return this.http.delete("/account/user/preview/"+e,null).then(()=>{})}}]),n}(),D=function(e){p(n,A);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),N=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"batchResourcesPermissionsSet",value:function(e){return this.http.put("/bulk/resources/permissions",e).json()}}]),n}(),O=function(e){p(n,N);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const B=["cameraId"],M=["cameraId"],q=["cameraId"],G=["cameraId"],_=["cameraId"],W=["cameraId"];let H=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getCameras",value:function(e){return this.http.get("/cameras",e).json()}},{key:"getArchiveFeed",value:function(e){let{cameraId:t}=e,n=y(e,B);return this.http.get("/cameras/"+t+"/archiveFeed",n).blob()}},{key:"getArchiveTimeline",value:function(e){let{cameraId:t}=e,n=y(e,M);return this.http.get("/cameras/"+t+"/archiveTimeline",n).json()}},{key:"getArchiveCalendar",value:function(e){let{cameraId:t}=e,n=y(e,q);return this.http.get("/cameras/"+t+"/archiveCalendar",n).json()}},{key:"getArchiveSnapshot",value:function(e){let{cameraId:t}=e,n=y(e,G);return this.http.get("/cameras/"+t+"/archiveSnapshot",n).blob()}},{key:"getLiveFeed",value:function(e){let{cameraId:t}=e,n=y(e,_);return this.http.get("/cameras/"+t+"/liveFeed",n).blob()}},{key:"getLiveSnapshot",value:function(e){return this.http.get("/cameras/"+e+"/liveSnapshot").blob()}},{key:"getLivePreviewStream",value:function(e){let{cameraId:t}=e,n=y(e,W);return this.http.get("/cameras/"+t+"/getLivePreviewsStream",n).json()}}]),n}(),V=function(e){p(n,H);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),z=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),Q=function(e){p(n,z);var t=d(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).settings={modules:[],connection:{url:""}},e}return l(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}(),J=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getQueryResult",value:function(e){return this.http.post("/eql/query",e).json()}},{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(()=>{})}},{key:"getAvailiableLayerParameters",value:function(e){return this.http.get("/eql/getAvailiableParams",e).json()}}]),n}(),K=function(e){p(n,J);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),X=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),Y=function(e){p(n,X);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),Z=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(t),e).json()}}]),n}(),$=function(e){p(n,Z);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"postFeedback",value:function(e,t){return this.feedback(e,t)}}]),n}(),ee=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(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}(),te=function(e){p(n,ee);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"upload",value:function(e,t){return this.uploadFile({file:e,rewrite:!!t})}}]),n}(),ne=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),re=function(e){p(n,ne);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),se=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getServerInfo",value:function(){return this.http.get("/").json()}},{key:"getFunctionsList",value:function(){return this.http.get("/functions").json()}}]),n}(),oe=function(e){p(n,se);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const ie=["providerName"],ue=["providerName"],ae=["providerName"];let le=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"geocode",value:function(e){let{providerName:t}=e,n=y(e,ie);return this.http.get("/geocode/"+t,n).json()}},{key:"geocodeByPoint",value:function(e){let{providerName:t}=e,n=y(e,ue);return this.http.get("/geocode/"+t+"/geocodeByPoint",n).json()}},{key:"suggest",value:function(e){let{providerName:t}=e,n=y(e,ae);return this.http.get("/geocode/"+t+"/suggest",n).json()}}]),n}(),ce=function(e){p(n,le);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"geocode2Gis",value:function(e){return this.geocode(c({providerName:"geocode2gis"},e))}},{key:"suggest2Gis",value:function(e){return this.suggest(c({providerName:"geocode2gis"},e))}}]),n}(),pe=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),he=function(e){p(n,pe);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),ye=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),fe=function(e){p(n,ye);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const ve=["name"],de=["name"],ke=["name"],ge=["name","id"],me=["name","id"],be=["name","id"],xe=["name","x","y","z"],Se=["name"],je=["name"],Te=["name"],we=["name"],Pe=["name"],Re=["name"],Ce=["name"],Ie=["name"],Le=["name"],Ee=["name"],Fe=["name"],Ue=["layerName"],Ae=["name","id"];let De=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getBulkFeatures",value:function(e){return this.http.post("/bulk/layers/features/query",e).json()}},{key:"getBulkExtents",value:function(e,t){return this.http.post("/bulk/layers/extent",t,e).json()}},{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=y(e,ve);return this.http.get("/layers/"+t+"/features",n).json()}},{key:"deleteFeature",value:function(e){let{name:t}=e,n=y(e,de);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=y(e,ke);return this.http.get("/layers/"+t+"/features/contains",n).json()}},{key:"getById",value:function(e){let{name:t,id:n}=e,r=y(e,ge);return this.http.get("/layers/"+t+"/features/"+n,r).json()}},{key:"unite",value:function(e,t){let{name:n,id:r}=e,s=y(e,me);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=y(e,be);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,o=y(e,xe);return this.http.createUrl("/layers/"+t+"/tile/"+s+"/"+n+"/"+r,o)}},{key:"getLayerImage",value:function(e){let{name:t}=e,n=y(e,Se);return this.http.createUrl("/layers/"+t+"/export",n)}},{key:"getLayerExtent",value:function(e){let{name:t}=e,n=y(e,je);return this.http.get("/layers/"+t+"/extent",n).json()}},{key:"getByGeometry",value:function(e){let{name:t}=e,n=y(e,Te);return this.http.get("/layers/"+t+"/features/getByGeometry",n).json()}},{key:"getByGeometryPost",value:function(e,t){let{name:n}=e,r=y(e,we);return this.http.post("/layers/"+n+"/features/getByGeometry",t,r).json()}},{key:"deleteFeatures",value:function(e){let{name:t}=e,n=y(e,Pe);return this.http.delete("/layers/"+t+"/features/deleteByIds",null,n).json()}},{key:"deleteByCondition",value:function(e){let{name:t}=e,n=y(e,Re);return this.http.delete("/layers/"+t+"/features/deleteByCondition",null,n).json()}},{key:"getByGeometryGet",value:function(e){let{name:t}=e,n=y(e,Ce);return this.http.get("/layers/"+t+"/features/getByGeometryByClick",n).json()}},{key:"classify",value:function(e){let{name:t}=e,n=y(e,Ie);return this.http.get("/layers/"+t+"/classify",n).json()}},{key:"distincts",value:function(e){let{name:t}=e,n=y(e,Le);return this.http.get("/layers/"+t+"/distincts",n).json()}},{key:"aggregateAttribute",value:function(e){let{name:t}=e,n=y(e,Ee);return this.http.get("/layers/"+t+"/aggregate-values",n).json()}},{key:"getFilteredFeaturesCount",value:function(e){let{name:t}=e,n=y(e,Fe);return this.http.get("/layers/"+t+"/features/count",n).json()}},{key:"getFilteredFeaturesCount1",value:function(e,t){return this.http.post("/layers/"+e+"/features/count",t).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=y(e,Ue);return this.http.get("/layers/"+t+"/validateExpression",n).json()}},{key:"getRasterMeta",value:function(e){let{name:t,id:n}=e,r=y(e,Ae);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:"applyStyle",value:function(e,t){return this.http.put("/layers/"+e+"/style",t).then(()=>{})}},{key:"getStyle",value:function(e){return this.http.get("/layers/"+e+"/style").json()}},{key:"getImageLayout",value:function(e){return this.http.get("/layers/"+e+"/style/sprite.png").blob()}},{key:"getDataLayout",value:function(e){return this.http.get("/layers/"+e+"/style/sprite.json").then(()=>{})}},{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",x(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 Ne(e){return(await Promise.all(e.map(e=>e.catch(e=>Oe(e)?e:new Error(e))))).filter(Be)}function Oe(e){return e instanceof Error}function Be(e){return!Oe(e)}const Me=["remote"],qe=["remote"];let Ge=function(e){p(n,De);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getLayerInfos",value:function(e){return Ne(e.map(e=>this.getLayerInfo(e)))}},{key:"getLayersDeps",value:function(e){return Ne(e.map(e=>this.getResourceDependencies(e)))}},{key:"getBasemaps",value:function(e){return this.getLayersList(c({},e,{types:["LocalTileService","RemoteTileService"]}))}},{key:"createSubLayer",value:function(e){return this.publishStyledLayerService(e)}},{key:"createTileLayer",value:function(e){let{remote:t}=e,n=y(e,Me);return t?this.publishRemoteTileService(n):this.publishLocalTileService(n)}},{key:"updateTileLayer",value:function(e){let{remote:t}=e,n=y(e,qe);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:"findMany",value:function(e,t){return this.getLayersInfo({layerNames:e,projectNames:t})}},{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 _e;(_e=exports.ErrorReason||(exports.ErrorReason={})).HTTP_OTHER="other",_e.HTTP_CLIENT="client",_e.HTTP_SERVER="server",_e.UNKNOWN="unknown";const We=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),He=e=>e&&e.type&&e.reason;function Ve(e){return"string"==typeof e}const ze=e=>e===exports.UrlPath.Presentation?exports.UrlPath.Base:e;function Qe(e,t,n){return n.indexOf(e)===t}const Je=i.customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789",12);(exports.ResourceSeparator||(exports.ResourceSeparator={})).Server=".";let Ke=function(){function e(t){let{account:n}=t;u(this,e),this.account=n}return l(e,[{key:"createId",value:function(){return Je()}},{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(c({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}(),Xe=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),Ye=function(e){p(n,Xe);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),Ze=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 $e;($e=exports.ConnectionStatus||(exports.ConnectionStatus={})).Initialized="Initialized",$e.Connected="Connected",$e.Break="Break",$e.Lost="Lost",$e.SessionClosed="SessionClosed";let et=function(e){p(r,Ze);var n=d(r);function r(e,s,o){var i;return void 0===o&&(o=!1),u(this,r),(i=n.call(this,e)).api=s,i.MAX_WS_RECONNECT_TRIES=10,i.keepAlive=!1,i.reconnectTries=0,i.subscriptions=[],i._connectStatus=exports.ConnectionStatus.Initialized,i.onWsConnected=()=>{i.connectStatus=exports.ConnectionStatus.Connected,i.keepAlive&&(i.keepAliveTimeout=setInterval(()=>{i.ws&&i.ws.send(JSON.stringify({keepAlive:!0}))},5e3))},i.onWsClosed=e=>{4001===e.code||4002===e.code?i.connectStatus=exports.ConnectionStatus.SessionClosed:i.reconnectTries<i.MAX_WS_RECONNECT_TRIES?(i.connectStatus=exports.ConnectionStatus.Break,i.reconnectTries++,i.ws&&(i.ws.onopen=null,i.ws.onclose=null,i.ws.onmessage=null,i.ws=void 0),i.keepAliveTimeout&&clearInterval(i.keepAliveTimeout),setTimeout(()=>{i.connect()},0)):i.connectStatus=exports.ConnectionStatus.Lost},i.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&&i.emitter.emit(e,new tt(n))}},i.emitter=new t.EventEmitter,i.keepAlive=o,i}return l(r,[{key:"connectStatus",get:function(){return this._connectStatus},set:function(e){this.emitter.emit("ConnectionStatus",new tt(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.api.isPresentation||!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}(),tt=l((function e(t){u(this,e),this.data=t})),nt=function(e){p(n,z);var t=d(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).config=null,e}return l(n,[{key:"fetchPortalSettings",value:async function(e){return this.config=JSON.parse(await this.getConfiguration(e)),this.config}}]),n}(),rt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(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}(),st=function(e){p(n,rt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const ot=["name"];let it=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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:"getProjectEnvelope",value:function(e){let{name:t}=e,n=y(e,ot);return this.http.get("/projects/"+t+"/extent",n).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",x(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}(),ut=function(e){p(n,it);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getProjectInfos",value:function(e){return Ne(e.map(e=>this.getProjectInfo(e)))}},{key:"getProjectsDeps",value:function(e){return Ne(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}();const at=["id"];let lt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"cancelTask",value:function(e){return this.http.post("/scheduler/tasks/"+e+"/cancel",null).then(()=>{})}},{key:"startCogCreateTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"cogService_create"}).text()}},{key:"startRasterVrtTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"cogService_vrt"}).text()}},{key:"startNetCdfTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"cogService_netcdf"}).text()}},{key:"startBufferTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geoService_buffer"}).text()}},{key:"startCopyTableTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geoService_copy"}).text()}},{key:"startUnionTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geoService_union"}).text()}},{key:"startOverlayTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geoService_overlay"}).text()}},{key:"startCopyTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"copyTask"}).text()}},{key:"startAvailableAreaTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"availabilityArea"}).text()}},{key:"startGeocodeTask",value:function(e){return this.http.post("/scheduler/tasks",e,{type:"geocodeTask"}).text()}},{key:"get",value:function(e){return this.http.get("/scheduler/task/"+e+"/subtasks").then(()=>{})}},{key:"stop",value:function(e){return this.http.post("/scheduler/task/"+e+"/stop",null).then(()=>{})}},{key:"createTaskPrototype",value:function(e){return this.http.post("/scheduler",e).text()}},{key:"getTaskPrototypes",value:function(e){return this.http.get("/scheduler",e).then(()=>{})}},{key:"updateTaskPrototype",value:function(e,t){return this.http.put("/scheduler/"+e,t).then(()=>{})}},{key:"delete",value:function(e){return this.http.delete("/scheduler/"+e,null).then(()=>{})}},{key:"setEnable",value:function(e,t){return this.http.post("/scheduler/"+e+"/enable/"+t,null).then(()=>{})}},{key:"getTasksForPrototype",value:function(e){let{id:t}=e,n=y(e,at);return this.http.get("/scheduler/"+t+"/tasks",n).then(()=>{})}},{key:"startTask",value:function(e,t){return this.http.post("/scheduler/"+e+"/start/"+t,null).then(()=>{})}},{key:"startTask1",value:function(e){return this.http.post("/scheduler/"+e+"/start",null).then(()=>{})}},{key:"get1",value:function(){return this.http.get("/scheduler/worker").json()}},{key:"post",value:function(e){return this.http.post("/scheduler/worker",e).json()}}]),n}(),ct=function(e){p(n,lt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),pt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"checkLimitsForUser",value:function(e){return this.http.get("/resources/checkLimits/user/"+e).json()}},{key:"checkLimitsForRole",value:function(e){return this.http.get("/resources/checkLimits/role/"+e).json()}},{key:"getDefaultLimits",value:function(){return this.http.get("/resources/checkLimits/default").json()}},{key:"copyResources",value:function(e){return this.http.post("/resources/copy",e).json()}}]),n}(),ht=function(e){p(n,pt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();var yt;(yt=exports.DependencyType||(exports.DependencyType={})).Layer="Layer",yt.Table="Table",yt.Project="Project";let ft=function(){function e(t,n,r){u(this,e),this.projects=t,this.layers=n,this.tables=r}return l(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(Qe)),layers:await this.layers.getLayerInfos(s.filter(Qe))}}},{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(Ve)}}]),e}(),vt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),dt=function(e){p(n,vt);var t=d(n);function n(e,r){var s;let{username:o,roles:i}=r;return u(this,n),(s=t.call(this,e)).ownerName="",s.ownerRoles=[],s.ownerName=o,s.ownerRoles=i,s}return l(n,[{key:"reset",value:function(){this.ownerName="",this.ownerRoles=[]}}]),n}(),kt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"statisticsDb",value:function(e){return this.http.get("/statistics",e).json()}},{key:"statisticsDb1",value:function(e){return this.http.post("/statistics",e).json()}},{key:"classify",value:function(e){return this.http.get("/statistics/classify",e).json()}},{key:"classify1",value:function(e){return this.http.post("/statistics/classify",e).json()}},{key:"sumOfProduct",value:function(e){return this.http.get("/statistics/sumOfProduct",e).json()}},{key:"sumOfProduct1",value:function(e){return this.http.post("/statistics/sumOfProduct",e).json()}}]),n}(),gt=function(e){p(n,kt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getStatistic",value:function(e){return this.statisticsDb(e)}},{key:"postStatistic",value:function(e){return this.statisticsDb1(e)}},{key:"getClassify",value:function(e){return this.classify(e)}},{key:"postClassify",value:function(e){return this.classify1(e)}}]),n}(),mt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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",x(e)).then(()=>{})}},{key:"removeFont",value:function(e){return this.http.delete("/styles/fonts",null,e).then(()=>{})}}]),n}(),bt=function(e){p(n,mt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const xt=["name"],St=["name"],jt=["name"],Tt=["name"];let wt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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=y(e,xt);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=y(e,St);return this.http.patch("/tables/"+n+"/data",t,r).then(()=>{})}},{key:"deleteTableData",value:function(e){let{name:t}=e,n=y(e,jt);return this.http.delete("/tables/"+t+"/data",null,n).then(()=>{})}},{key:"getUniqueDataRows",value:function(e){let{name:t}=e,n=y(e,Tt);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:"createViewFromQueryLayer",value:function(e){return this.http.post("/tables/fromLayer",e).json()}},{key:"createViewFromQuery",value:function(e){return this.http.post("/tables/fromQuery",e).json()}},{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",x(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}(),Pt=function(e){p(n,wt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getTableInfos",value:function(e){return Ne(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){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),Ct=function(e){p(n,Rt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const It=["name","z","x","y"];let Lt=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getVectorTile",value:function(e){let{name:t,z:n,x:r,y:s}=e,o=y(e,It);return this.http.get("/vt/"+t+"/"+n+"/"+r+"/"+s+".pbf",o).then(()=>{})}}]),n}(),Et=function(e){p(n,Lt);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 Ft;(Ft=exports.UrlPath||(exports.UrlPath={})).Base="/map",Ft.Shared="/shared",Ft.Presentation="/presentation",Ft.Portal="/portal";const Ut={401:exports.ApiEvent.Unauthorized},At=Object.values(exports.UrlPath),Dt=At[0];let Nt=function(e){p(o,t.EventEmitter);var r=d(o);function o(e){var t,i;let{url:a,wsUrl:l,wsKeepAlive:p,snappingHubUrl:h,http:y,urlPath:v,httpOptions:d}=e;u(this,o),i=r.call(this);const{hooks:k}=d||{};return i.http=y||new g(c({prefixUrl:a,timeout:!1,retry:{methods:["get","post","delete"],limit:5,statusCodes:[401]}},d||{},{hooks:c({},k||{},{beforeRequest:[e=>{const t=window.localStorage.getItem("evergis-jwt-token");var n;t&&(null==(n=e.headers)||n.set("Authorization","Bearer "+(t||"")))},...null!=(t=null==k?void 0:k.beforeRequest)?t:[]],beforeRetry:[async e=>{let{request:t,error:r,retryCount:s}=e;if(r instanceof n.HTTPError&&401===r.response.status&&1===s)try{const e=window.localStorage.getItem("evergis-refresh-token");if(e){var o;const n=await i.account.refreshToken({refreshToken:e});n&&(window.localStorage.setItem("evergis-jwt-token",n.token),window.localStorage.setItem("evergis-refresh-token",n.refreshToken)),null==(o=t.headers)||o.set("Authorization","Bearer "+(n.token||""))}}catch(r){throw new Error("Failed to refresh token")}}],afterResponse:[(e,t,r)=>{const s=Ut[null==r?void 0:r.status];return s&&i.emit(s,We(new n.HTTPError(r,e,t))),r},...(null==k?void 0:k.afterResponse)||[]]})})),i.url=a,i.wsUrl=l||a,i.urlPath=v||i.defineUrlPath(),i.layers=new Ge(i.http),i.tables=new Pt(i.http),i.projects=new ut(i.http),i.resources=new ft(i.projects,i.layers,i.tables),i.styles=new bt(i.http),i.account=new U(i.http),i.accountPreview=new D(i.http),i.bulk=new O(i.http),i.security=new dt(i.http,i.account),i.notification=new et(i.http,f(i),p),i.file=new te(i.http),i.filters=new re(i.http),i.import=new fe(i.http),i.geocode=new ce(i.http),i.cameras=new V(i.http),i.print=new st(i.http),i.tools=new Ct(i.http),i.resourceCatalog=new ht(i.http),i.general=new oe(i.http),i.namespace=new Ye(i.http),i.external=new Y(i.http),i.clientSettings=new Q(i.http),i.portalSettings=new nt(i.http),i.iceRouter=new he(i.http),i.statistic=new gt(i.http),i.feedback=new $(i.http),i.vectorTiles=new Et(i.http),i.universalSearch=new R(i.http),i.spatialReference=new w(i.http),i.eql=new K(i.http),i.catalog=new C(i.http),i.queryToken=new T(i.http),i.dataSource=new j(i.http),i.remoteTaskManager=new ct(i.http),i.names=new Ke({account:i.account}),i.snappingHub=h?(new s.HubConnectionBuilder).withUrl(h,{withCredentials:!0,skipNegotiation:!0,transport:s.HttpTransportType.WebSockets}).withAutomaticReconnect().build():null,i}return l(o,[{key:"init",value:async function(e){let{authParams:t,authQueryParams:n,connectWs:r,fetchSettings:s,fetchUser:o,useJwt:i}=e;try{await this.account.login(t,n,i),o&&await this.account.fetchCurrentUser(),r&&await this.connectWs(),s&&await this.clientSettings.fetchClientSettings({urlPath:ze(this.urlPath)}),await this.notification.subscribe("service_update")}catch(e){throw We(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 We(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:"defineUrlPath",value:function(){const e=(window.location.href.split(window.location.hostname)[1]||"").split("/").filter(Boolean)[0],t=e?"/"+e:void 0;return t&&At.includes(t)?t:Dt}},{key:"isShared",get:function(){return this.urlPath===exports.UrlPath.Shared}},{key:"isPresentation",get:function(){return this.urlPath===exports.UrlPath.Presentation||"8082"===window.location.port}}]),o}();var Ot,Bt,Mt,qt,Gt,_t,Wt,Ht,Vt,zt,Qt,Jt,Kt,Xt,Yt,Zt,$t,en,tn,nn,rn,sn,on,un,an,ln,cn,pn,hn,yn,fn,vn,dn,kn,gn,mn,bn;(Ot=exports.AggregationFunction||(exports.AggregationFunction={})).None="None",Ot.Array="Array",Ot.Min="Min",Ot.Max="Max",Ot.Avg="Avg",Ot.Sum="Sum",Ot.Extent="Extent",Ot.H3="H3",Ot.Count="Count",Ot.TotalCount="TotalCount",Ot.DistinctCount="DistinctCount",Ot.First="First",Ot.Last="Last",Ot.Median="Median",Ot.Mod="Mod",Ot.StdDeviation="StdDeviation",Ot.SumOfProduct="SumOfProduct",Ot.OnlyValue="OnlyValue",Ot.WeightedAvg="WeightedAvg",Ot.DensityIndicators="DensityIndicators",Ot.DividedSum="DividedSum",(Bt=exports.AttributeIconType||(exports.AttributeIconType={})).Unknown="Unknown",Bt.Icon="Icon",Bt.PNG="PNG",Bt.SVG="SVG",(Mt=exports.AttributeSelectorType||(exports.AttributeSelectorType={})).None="None",Mt.SelectFromHandBook="SelectFromHandBook",Mt.SelectFromRange="SelectFromRange",Mt.ViewHandBook="ViewHandBook",(qt=exports.AttributeType||(exports.AttributeType={})).Unknown="Unknown",qt.String="String",qt.Int32="Int32",qt.Int64="Int64",qt.Double="Double",qt.DateTime="DateTime",qt.Boolean="Boolean",qt.Point="Point",qt.Polyline="Polyline",qt.MultiPolygon="MultiPolygon",qt.Multipoint="Multipoint",qt.H3Index="H3Index",qt.Json="Json",(Gt=exports.AuthorizationGrant||(exports.AuthorizationGrant={})).AuthorizationCode="authorization_code",Gt.RefreshToken="refresh_token",(_t=exports.CatalogResourceType||(exports.CatalogResourceType={})).None="None",_t.Map="Map",_t.Layer="Layer",_t.Table="Table",_t.File="File",_t.TaskPrototype="TaskPrototype",_t.DataSource="DataSource",(Wt=exports.ClassificationType||(exports.ClassificationType={})).None="none",Wt.NaturalBreaks="naturalBreaks",Wt.EqualInterval="equalInterval",Wt.Quantile="quantile",Wt.Unique="unique",(Ht=exports.ClassifyAttributeType||(exports.ClassifyAttributeType={})).Decimal="decimal",Ht.DateTime="dateTime",Ht.Text="text",(Vt=exports.ConfigurationErrorEnum||(exports.ConfigurationErrorEnum={})).Unknown="Unknown",Vt.SerializeError="SerializeError",Vt.InvalidDataService="InvalidDataService",Vt.InvalidConfiguration="InvalidConfiguration",Vt.InvalidDataServiceName="InvalidDataServiceName",Vt.InvalidTableName="InvalidTableName",Vt.InvalidLayerName="InvalidLayerName",Vt.ResourceNotFound="ResourceNotFound",Vt.InvalidCondition="InvalidCondition",Vt.InvalidAttributes="InvalidAttributes",Vt.InvalidIdAttribute="InvalidIdAttribute",Vt.InvalidGeometryAttribute="InvalidGeometryAttribute",Vt.InvalidGeometryAttributeType="InvalidGeometryAttributeType",Vt.InvalidColumnName="InvalidColumnName",Vt.InvalidIdColumnSettings="InvalidIdColumnSettings",Vt.ColumnNotExistsInTable="ColumnNotExistsInTable",Vt.InvalidStyle="InvalidStyle",Vt.InvalidLayerType="InvalidLayerType",Vt.ColumnLoadingError="ColumnLoadingError",Vt.InvalidAttributeFormat="InvalidAttributeFormat",Vt.DataSourceNotFound="DataSourceNotFound",Vt.DuplicateColumns="DuplicateColumns",Vt.DuplicateAttributes="DuplicateAttributes",Vt.TableWithoutColumns="TableWithoutColumns",Vt.InvalidTableReferenceConfiguration="InvalidTableReferenceConfiguration",(zt=exports.DataSourceType||(exports.DataSourceType={})).Postgres="Postgres",zt.Trino="Trino",zt.S3="S3",zt.GisServer="GisServer",(Qt=exports.ErrorDetailsType||(exports.ErrorDetailsType={})).ResourceLimitExceeded="ResourceLimitExceeded",Qt.ResourceNotFound="ResourceNotFound",Qt.InternalError="InternalError",Qt.BadRequest="BadRequest",Qt.DuplicateContent="DuplicateContent",(Jt=exports.ErrorType||(exports.ErrorType={})).NotSpecified="NotSpecified",Jt.LimitError="LimitError",Jt.ValidationError="ValidationError",Jt.JwtExpired="JwtExpired",Jt.TokenInvalid="TokenInvalid",Jt.RefreshTokenExpired="RefreshTokenExpired",Jt.RefreshTokenInvalid="RefreshTokenInvalid",Jt.CreateUserFailed="CreateUserFailed",Jt.SetUserPasswordFailed="SetUserPasswordFailed",Jt.SetUserRoleFailed="SetUserRoleFailed",Jt.UpdateUserFailed="UpdateUserFailed",Jt.RemoveUserFailed="RemoveUserFailed",Jt.CreateRoleFailed="CreateRoleFailed",Jt.UpdateRoleFailed="UpdateRoleFailed",Jt.RemoveUserRoleFailed="RemoveUserRoleFailed",Jt.ChangeActiveStateFailed="ChangeActiveStateFailed",Jt.RemoveRoleFailed="RemoveRoleFailed",Jt.UserNotFound="UserNotFound",Jt.RoleNotFound="RoleNotFound",Jt.EmailNotConfirmed="EmailNotConfirmed",Jt.DuplicateEmailError="DuplicateEmailError",Jt.InvalidPassword="InvalidPassword",Jt.RoleExists="RoleExists",Jt.UserExists="UserExists",Jt.UserLockedError="UserLockedError",Jt.InvalidEmail="InvalidEmail",Jt.InvalidUsername="InvalidUsername",Jt.Unauthorized="Unauthorized",Jt.EmailNotChanged="EmailNotChanged",Jt.EmailNotSet="EmailNotSet",(Kt=exports.FeatureType||(exports.FeatureType={})).Unknown="Unknown",Kt.GeometricFeature="GeometricFeature",(Xt=exports.FontStyle||(exports.FontStyle={})).Normal="normal",Xt.Oblique="oblique",Xt.Italic="italic",(Yt=exports.FontWeight||(exports.FontWeight={})).Thin="Thin",Yt.ExtraLight="ExtraLight",Yt.Light="Light",Yt.SemiLight="SemiLight",Yt.Normal="Normal",Yt.Medium="Medium",Yt.DemiBold="DemiBold",Yt.Bold="Bold",Yt.ExtraBold="ExtraBold",Yt.Black="Black",Yt.ExtraBlack="ExtraBlack",(Zt=exports.GeometryType||(exports.GeometryType={})).Unknown="unknown",Zt.Point="point",Zt.Polyline="polyline",Zt.Polygon="multipolygon",Zt.Envelope="envelope",Zt.Multipoint="multipoint",($t=exports.Group||(exports.Group={})).My="my",$t.Role="role",$t.Public="public",$t.All="all",(en=exports.LineCapStyle||(exports.LineCapStyle={})).Flat="Flat",en.Square="Square",en.Round="Round",en.Triangle="Triangle",(tn=exports.LineEndingType||(exports.LineEndingType={})).None="none",tn.Arrow="arrow",tn.FilledArrow="filledArrow",tn.Square="square",tn.FilledSquare="filledSquare",tn.Circle="circle",tn.FilledCircle="filledCircle",tn.Diamond="diamond",tn.FilledDiamond="filledDiamond",tn.RoundSquare="roundSquare",tn.FilledRoundSquare="filledRoundSquare",tn.Svg="svg",(nn=exports.LineJoinType||(exports.LineJoinType={})).Miter="Miter",nn.Bevel="Bevel",nn.Round="Round",(rn=exports.Operation||(exports.Operation={})).Unknown="Unknown",rn.Union="union",rn.Intersection="intersection",rn.Subtraction="subtraction",rn.SymDifference="symDifference",(sn=exports.OwnerFilter||(exports.OwnerFilter={})).My="My",sn.Shared="Shared",sn.Public="Public",(on=exports.PbfSchema||(exports.PbfSchema={})).XYZ="xyz",on.TMS="tms",(un=exports.Permissions||(exports.Permissions={})).None="none",un.Configure="configure",un.Write="write",un.Read="read",un.ReadConfigure="read,configure",un.ReadWrite="read,write",un.All="read,write,configure",(an=exports.PolicyType||(exports.PolicyType={})).Unknown="Unknown",an.CreateTable="CreateTable",an.CreateLayer="CreateLayer",an.CreateProject="CreateProject",an.MaxFeaturesInOneTable="MaxFeaturesInOneTable",an.MaxObjectsToExport="MaxObjectsToExport",an.MaxUploadContentSize="MaxUploadContentSize",an.MaxEqlQueryParametersValues="MaxEqlQueryParametersValues",(ln=exports.Quality||(exports.Quality={})).Low="Low",ln.Medium="Medium",ln.High="High",(cn=exports.ResourceSubTypeFilter||(exports.ResourceSubTypeFilter={})).RemoteTileService="RemoteTileService",cn.ProxyService="ProxyService",cn.PostgresLayerService="PostgresLayerService",cn.QueryLayerService="QueryLayerService",cn.TileCatalogTable="TileCatalogTable",(pn=exports.ResourceType||(exports.ResourceType={})).Unknown="Unknown",pn.Table="table",pn.Layer="layer",pn.Project="project",pn.File="file",pn.Feature="feature",pn.Tag="tag",pn.DataSource="datasource",(hn=exports.ResourceTypeFilter||(exports.ResourceTypeFilter={})).Map="Map",hn.Layer="Layer",hn.Table="Table",hn.RasterCatalog="RasterCatalog",hn.ProxyService="ProxyService",hn.RemoteTileService="RemoteTileService",hn.File="File",hn.DataSource="DataSource",(yn=exports.ResourceTypeLink||(exports.ResourceTypeLink={})).Table="tables",yn.Layer="layers",yn.Project="projects",(fn=exports.ResponseType||(exports.ResponseType={})).Code="code",fn.Token="token",(vn=exports.SimplifyType||(exports.SimplifyType={})).Basic="Basic",vn.PreserveTopology="PreserveTopology",vn.VW="VW",(dn=exports.StringSubType||(exports.StringSubType={})).None="None",dn.Image="Image",dn.PkkCode="PkkCode",dn.Attachments="Attachments",(kn=exports.TextAlignment||(exports.TextAlignment={})).Right="right",kn.Left="left",kn.Center="center",kn.Justified="justified",(gn=exports.TextVerticalAlignment||(exports.TextVerticalAlignment={})).Top="top",gn.Bottom="bottom",gn.Middle="middle",(mn=exports.WorkerMethodType||(exports.WorkerMethodType={})).Task="Task",mn.Rest="Rest",mn.Both="Both",(bn=exports.WorkerSettingsFieldType||(exports.WorkerSettingsFieldType={})).Integer="Integer",bn.Double="Double",bn.String="String",bn.Extent="Extent",bn.Geometry="Geometry",bn.IntergerArray="IntergerArray",bn.DoubleArray="DoubleArray",bn.StringArray="StringArray",bn.Boolean="Boolean",bn.SourceEql="SourceEql",bn.Layer="Layer",bn.Table="Table",bn.Folder="Folder",bn.Json="Json",bn.Expression="Expression",bn.Expressions="Expressions",Object.defineProperty(exports,"HTTPError",{enumerable:!0,get:function(){return n.HTTPError}}),Object.defineProperty(exports,"TimeoutError",{enumerable:!0,get:function(){return n.TimeoutError}}),exports.Account=U,exports.AccountPreview=D,exports.Api=Nt,exports.BulkOperations=O,exports.Cameras=V,exports.ClientSettings=Q,exports.Eql=K,exports.External=Y,exports.Feedback=$,exports.FileUpload=te,exports.Filters=re,exports.GEOCODE_PROVIDER="geocode2gis",exports.General=oe,exports.Geocode=ce,exports.HttpClient=g,exports.IceRouter=he,exports.Import=fe,exports.Layers=Ge,exports.Names=Ke,exports.Namespace=Ye,exports.Notification=et,exports.NotificationEvent=tt,exports.PortalSettings=nt,exports.Print=st,exports.Projects=ut,exports.RemoteTaskManager=ct,exports.ResourceCatalog=ht,exports.Resources=ft,exports.STORAGE_REFRESH_TOKEN_KEY="evergis-refresh-token",exports.STORAGE_TOKEN_KEY="evergis-jwt-token",exports.Security=dt,exports.Statistic=gt,exports.Styles=bt,exports.Tables=Pt,exports.Tools=Ct,exports.VectorTiles=Et,exports.addSubDomainToLocation=e=>window.location.protocol+"//"+e+"."+window.location.host,exports.errorHandler=We,exports.formDataFromFile=function(e){const t=new FormData;return t.append("file",e),t},exports.generateId=Je,exports.getFetchingUrlPath=ze,exports.isHTTPError=e=>He(e)&&"http"===e.type,exports.isHandledError=He,exports.isProjectContentItems=function(e){return null!=e},exports.isString=Ve,exports.isTileLayerService=function(e){return e.type&&/TileService/.test(e.type)},exports.parseJwt=e=>{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(t).split("").map(e=>"%"+"00".concat(e.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(n)},exports.promiseAllIgnoreErrors=Ne,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=x,exports.unique=Qe;
|
|
2
2
|
//# sourceMappingURL=api.cjs.production.min.js.map
|