????
Current Path : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/ |
Current File : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/core-root-9440a7bc684550bff8b0.js |
/*! For license information please see ../license.txt */ "use strict";(self.webpackChunk_cloudbeaver_product_default=self.webpackChunk_cloudbeaver_product_default||[]).push([[64435],{43409:(e,s,t)=>{t.r(s),t.d(s,{FeaturesResource:()=>h});var i=t(1118),r=t(94866),n=t(5576),o=t(20839),a=t(83336),c=t(72755),u=t(19462);let h=class FeaturesResource extends o.V{constructor(e,s){super((()=>[])),this.graphQLService=e,this.baseFeatures=[],s.require(this,c.y.admin).outdateResource(this),(0,r.Gn)(this,{baseFeatures:r.sH})}isBase(e){return this.baseFeatures.includes(e)}setBaseFeatures(e){this.baseFeatures=e}async loader(){const{features:e}=await this.graphQLService.sdk.listFeatureSets();return e}};h=(0,i.Cg)([(0,n._)(),(0,i.Sn)("design:paramtypes",[a.GraphQLService,u.SessionPermissionsResource])],h)},68061:(e,s,t)=>{t.r(s),t.d(s,{EPermission:()=>i,PermissionsService:()=>a});var i,r=t(1118),n=t(5576),o=t(19462);i||(i={});let a=class PermissionsService{constructor(e){this.permissions=e}has(e){return this.permissions.has(e)}async hasAsync(e){return this.permissions.hasAsync(e)}async update(){await this.permissions.refresh()}};a=(0,r.Cg)([(0,n._)(),(0,r.Sn)("design:paramtypes",[o.SessionPermissionsResource])],a)},28444:(e,s,t)=>{t.r(s),t.d(s,{QuotasService:()=>a});var i=t(1118),r=t(5576),n=t(40601);const o={dataExportFileSizeLimit:1e7,sqlMaxRunningQueries:100,sqlResultSetRowsLimit:1e5,sqlResultSetMemoryLimit:2e6,sqlTextPreviewMaxLength:4096,sqlBinaryPreviewMaxLength:261120};let a=class QuotasService{get quotas(){return{dataExportFileSizeLimit:this.getQuota("dataExportFileSizeLimit"),sqlMaxRunningQueries:this.getQuota("sqlMaxRunningQueries"),sqlResultSetRowsLimit:this.getQuota("sqlResultSetRowsLimit"),sqlResultSetMemoryLimit:this.getQuota("sqlResultSetMemoryLimit"),sqlTextPreviewMaxLength:this.getQuota("sqlTextPreviewMaxLength"),sqlBinaryPreviewMaxLength:this.getQuota("sqlBinaryPreviewMaxLength")}}constructor(e){this.serverConfigResource=e}getQuota(e){const s=this.serverConfigResource.data?.resourceQuotas[e];return function isNumber(e){return"number"==typeof e}(s)?s:o[e]}};a=(0,i.Cg)([(0,r._)(),(0,i.Sn)("design:paramtypes",[n.ServerConfigResource])],a)},7294:(e,s,t)=>{t.r(s),t.d(s,{RootBootstrap:()=>h});var i=t(1118),r=t(82103),n=t(5576),o=t(82607),a=t(80625),c=t(8674),u=t(99433);let h=class RootBootstrap extends r.j{constructor(e,s,t,i){super(),this.settingsResolverService=e,this.serverSettingsService=s,this.settingsManagerService=t,this.serverSettingsManagerService=i}register(){this.settingsManagerService.registerSettings(this.serverSettingsManagerService.settingsProvider,this.serverSettingsManagerService.getSettingsGetter(),this.serverSettingsManagerService.loaders),this.settingsResolverService.addResolver(u.SERVER_SETTINGS_LAYER,this.serverSettingsService)}};h=(0,i.Cg)([(0,n._)(),(0,i.Sn)("design:paramtypes",[o.SettingsResolverService,u.ServerSettingsService,a.SettingsManagerService,c.ServerSettingsManagerService])],h)},86120:(e,s,t)=>{t.r(s),t.d(s,{ServerNodeService:()=>h});var i=t(1118),r=t(63716),n=t(5576),o=t(29606),a=t(83336);class ServerNodeError extends Error{constructor(e,s){super(e,s),this.name="Server Node Error"}}var c=t(43974),u=t(60018);let h=class ServerNodeService extends r.O{constructor(e,s){super(),this.graphQLService=e,this.sessionEventSource=s,this.onApplicationRunIdChange=new o.Q,this.applicationRunId=null,this.sessionEventSource.onEvent(c.OYz.CbSessionWebsocketConnected,(e=>{this.applicationRunIdChanged(e.applicationRunId)}))}applicationRunIdChanged(e){null!==this.applicationRunId?this.applicationRunId!==e&&(this.applicationRunId=e,this.graphQLService.blockRequests(new ServerNodeError("Server node changed")),this.sessionEventSource.disconnect(),this.onApplicationRunIdChange.execute()):this.applicationRunId=e}};h=(0,i.Cg)([(0,n._)(),(0,i.Sn)("design:paramtypes",[a.GraphQLService,u.SessionEventSource])],h)},30719:(e,s,t)=>{t.r(s),t.d(s,{SessionActionService:()=>a,sessionActionContext:()=>c});var i=t(1118),r=t(5576),n=t(29606),o=t(77220);let a=class SessionActionService{constructor(e){this.session=e,this.actionToProcess=e.processAction(),this.onAction=new n.Q(void 0,((e,s)=>e===s)),this.onAction.setInitialDataGetter((()=>this.actionToProcess)).addPostHandler(((e,s)=>{s.getContext(c).processed&&(this.actionToProcess=null)})),this.session.onDataUpdate.addHandler((()=>{const e=this.session.processAction();e&&(this.actionToProcess=e),this.onAction.execute(e)}))}};a=(0,i.Cg)([(0,r._)(),(0,i.Sn)("design:paramtypes",[o.SessionResource])],a);const c=function sessionActionContext(e,s){return{processed:!1,process(){this.processed=!0}}}},78922:(e,s,t)=>{t.r(s),t.d(s,{SESSION_TOUCH_TIME_PERIOD:()=>c,SessionActivityService:()=>u});var i=t(1118),r=t(4370),n=t(63716),o=t(5576),a=t(77220);const c=6e4;let u=class SessionActivityService extends n.O{constructor(e,s){super(),this.clientActivityService=e,this.sessionResource=s,this.touchSessionTimer=null,this.notifyClientActivity=this.notifyClientActivity.bind(this),this.clientActivityService.onActiveStateChange.addHandler(this.notifyClientActivity)}notifyClientActivity(){!this.touchSessionTimer&&this.clientActivityService.isActive&&(this.sessionResource.pingSession(),this.touchSessionTimer=setTimeout((()=>{this.touchSessionTimer&&(clearTimeout(this.touchSessionTimer),this.touchSessionTimer=null)}),c))}};u=(0,i.Cg)([(0,o._)(),(0,i.Sn)("design:paramtypes",[r.ClientActivityService,a.SessionResource])],u)},1516:(e,s,t)=>{t.r(s),t.d(s,{SessionExpireEventService:()=>u});var i=t(1118),r=t(63716),n=t(5576),o=t(43974),a=t(60018),c=t(47956);let u=class SessionExpireEventService extends r.O{constructor(e,s){super(),this.sessionEventSource=e,this.sessionExpireService=s,this.sessionEventSource.onEvent(o.OYz.CbSessionExpired,(()=>{this.onSessionExpireEvent()}))}onSessionExpireEvent(){this.sessionExpireService.sessionExpired()}};u=(0,i.Cg)([(0,n._)(),(0,i.Sn)("design:paramtypes",[a.SessionEventSource,c.SessionExpireService])],u)},60676:(e,s,t)=>{t.d(s,{j:()=>n});var i=t(76761),r=t(99433);const n=(0,i.L)(r.SERVER_SETTINGS_LAYER,"session")},8674:(e,s,t)=>{t.r(s),t.d(s,{ServerSettingsManagerService:()=>l});var i=t(1118),r=t(94866),n=t(5576),o=t(20839),a=t(13804),c=t(32307),u=t(93424),h=t(82607),S=t(83625),g=t(3065),v=t(58158),d=t(75652);let l=class ServerSettingsManagerService{get providedSettings(){return new Set(this.settings.map((e=>e.key)))}get settings(){return(this.serverSettingsResource.data?.settings||[]).map(this.mapSetting.bind(this)).filter(Boolean)}constructor(e,s){this.serverSettingsResource=e,this.settingsResolverService=s,this.serverGroups=new Map,this.overrideGroups=new Map,this.settingTransformers=new Map,this.settingsProvider=new c.Z(this.settingsResolverService,g.Ik({})),this.loaders=[(0,o.X)(this.serverSettingsResource,(()=>{}))],e.onDataUpdate.addHandler(this.loadSettings.bind(this)),(0,r.Gn)(this,{settings:r.EW,providedSettings:r.EW,serverGroups:r.sH.shallow,overrideGroups:r.sH.shallow,settingTransformers:r.sH.shallow,loadSettings:r.XI})}getSettingsGetter(){return()=>this.settings}setGroupOverride(e,s){this.overrideGroups.set(e,s)}setSettingTransformer(e,s){if(this.settingTransformers.has(e))throw new Error("Setting transformer already exists");this.settingTransformers.set(e,s)}mapSetting(e){const s=e.id,t=this.settingTransformers.get(s),i={key:s,access:{scope:this.mapSettingScope(e.scopes||[])},group:this.getSettingGroup(e.category),type:convertObjectPropertyInfoType(e),name:e.displayName,description:e.description,options:e.validValues?.map((e=>({value:e,name:e})))||[]};return t?t(i):i}loadSettings(){this.serverGroups.forEach((e=>e.parent?.deleteSubGroup(e.id))),this.serverGroups.clear();const e=[...this.serverSettingsResource.data?.groups||[]].sort(((e,s)=>e.id.localeCompare(s.id)));for(const s of e){let e=u.P;const t=(0,v.U)(s.id),i=this.serverGroups.get(t);t&&i&&u.P.has(i.id)&&(e=u.P.get(i.id)),this.serverGroups.set(s.id,e.createSubGroup(s.displayName))}}getSettingGroup(e){if(!e)return u.P;const s=this.overrideGroups.get(e);return s||(this.serverGroups.get(e)||u.P)}mapSettingScope(e){return 0===e.length?["server"]:e.map((e=>{switch(e){case"global":return"server";case"user":return"client";default:return e}}))}};function convertObjectPropertyInfoType(e){switch((0,a.b)(e)){case"selector":return S.E.Select;case"checkbox":return S.E.Checkbox;case"textarea":return S.E.Textarea;default:return S.E.Input}}l=(0,i.Cg)([(0,n._)(),(0,i.Sn)("design:paramtypes",[d.ServerSettingsResource,h.SettingsResolverService])],l)},75652:(e,s,t)=>{t.r(s),t.d(s,{ServerSettingsResource:()=>c});var i=t(1118),r=t(5576),n=t(20839),o=t(83336),a=t(40601);let c=class ServerSettingsResource extends n.V{constructor(e,s){super((()=>null),void 0,[]),this.graphQLService=e,this.sync(s)}async loader(){const{settings:e}=await this.graphQLService.sdk.getProductSettings();return e}};c=(0,i.Cg)([(0,r._)(),(0,i.Sn)("design:paramtypes",[o.GraphQLService,a.ServerConfigResource])],c)},99433:(e,s,t)=>{t.r(s),t.d(s,{SERVER_SETTINGS_LAYER:()=>g,ServerSettingsService:()=>v});var i=t(1118),r=t(94866),n=t(5576),o=t(56246),a=t(76761),c=t(42463),u=t(72755),h=t(40601),S=t(19462);const g=(0,a.L)(o.PRODUCT_SETTINGS_LAYER,"server");let v=class ServerSettingsService extends c.z{constructor(e,s){super(),this.serverConfigResource=e,this.sessionPermissionsResource=s,this.lastConfig=null,this.settings=new Map,this.serverConfigResource.onDataUpdate.addHandler(this.refreshConfig.bind(this)),(0,r.Gn)(this,{refreshConfig:r.XI,settings:r.sH.shallow,clear:r.XI})}has(e){return this.settings.has(e)||super.has(e)}isReadOnly(e){return!this.sessionPermissionsResource.has(u.y.admin)}getValue(e){return this.settings.get(e)}clear(){this.update((()=>{super.clear(),this.settings.clear()}))}resetChanges(){super.clear()}async save(){await this.serverConfigResource.updateProductConfiguration(Object.fromEntries(this.changes))}getSnapshot(){return Object.fromEntries(this.settings)}refreshConfig(){this.update((()=>{if(this.clear(),this.serverConfigResource.data){if(this.serverConfigResource.data.productConfiguration!==this.lastConfig&&(this.lastConfig=this.serverConfigResource.data.productConfiguration,this.lastConfig&&"object"==typeof this.lastConfig))for(const[e,s]of Object.entries(this.lastConfig))this.settings.set(e,s)}else this.lastConfig=null}))}};v=(0,i.Cg)([(0,n._)(),(0,i.Sn)("design:paramtypes",[h.ServerConfigResource,S.SessionPermissionsResource])],v)},77480:(e,s,t)=>{t.r(s),t.d(s,{WindowEventsService:()=>a});var i=t(1118),r=t(82103),n=t(5576),o=t(29606);let a=class WindowEventsService extends r.j{constructor(){super(),this.onFocusChange=new o.Q}register(){window.addEventListener("focus",(()=>this.onFocusChange.execute(!0))),window.addEventListener("blur",(()=>this.onFocusChange.execute(!1)))}load(){}};a=(0,i.Cg)([(0,n._)(),(0,i.Sn)("design:paramtypes",[])],a)}}]);