????
Current Path : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/ |
Current File : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/commons-async-e55b6db2828bccc850ce.js |
/*! For license information please see ../license.txt */ "use strict";(self.webpackChunk_cloudbeaver_product_default=self.webpackChunk_cloudbeaver_product_default||[]).push([[95860],{38211:(e,t,i)=>{i.r(t),i.d(t,{AppLocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class AppLocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(28859)]).then(i.bind(i,91734))).default;case"it":return(await Promise.all([i.e(32756),i.e(43097)]).then(i.bind(i,50562))).default;case"zh":return(await Promise.all([i.e(52041),i.e(65478)]).then(i.bind(i,21177))).default;case"fr":return(await Promise.all([i.e(29671),i.e(87859)]).then(i.bind(i,77107))).default;default:return(await Promise.all([i.e(41114),i.e(10240)]).then(i.bind(i,18636))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},50550:(e,t,i)=>{i.r(t),i.d(t,{AppScreenBootstrap:()=>N});var s=i(1118),r=i(82103),n=i(5576),a=i(29606),o=i(71086),c=i(41773),l=i(15993),d=i(69519),u=i(42157),h=i(18699),g=i(21661),p=i(7838),v=i(64928),m=i(67590),S=i(34685),f=i(7167),_=i(51565),b=i(18662),x=i(16796),y=i(64676),j=i(7998),P=i(71740);const C={space:"space___Aq8db theme-typography--body2 theme-background-surface theme-text-on-surface",pane:"pane___Hcg1f theme-background-surface theme-text-on-surface",loader:"loader___a7D2q"};var w=i(59284),I=i(25909),D=i(93797),R=i(86411);const k={loader:"loader___F6er7",slideBox:"slideBox___eTh8U",pane:"pane___iSv_h theme-background-surface theme-text-on-surface"},E=(0,p.PA)((function RightArea({className:e}){const t=(0,v.d)(k),i=(0,h.h)(g.AppScreenService),s=(0,h.h)(R.OptionsPanelService),r=(0,m.s)("right-area"),n=s.getPanelComponent(),a=0===i.rightAreaBottom.getDisplayed({}).length;return(0,c.jsxs)(w.d,{open:s.active,className:(0,f.s)(t,{slideBox:!0},e),children:[(0,c.jsx)(I.m,{children:(0,c.jsx)(d.a,{className:(0,f.s)(t,{loader:!0}),suspense:!0,children:(0,c.jsx)(n,{})})}),(0,c.jsxs)(I.m,{children:[(0,c.jsxs)(_.B,{...r,sticky:30,split:"horizontal",mode:a?"minimize":r.mode,disable:a,keepRatio:!0,children:[(0,c.jsx)(b.Z,{className:(0,f.s)(t,{pane:!0}),children:(0,c.jsx)(d.a,{className:(0,f.s)(t,{loader:!0}),suspense:!0,children:(0,c.jsx)(u.O,{container:i.rightAreaTop})})}),(0,c.jsx)(x.$,{}),(0,c.jsx)(b.Z,{className:(0,f.s)(t,{pane:!0}),basis:"30%",main:!0,children:(0,c.jsx)(d.a,{className:(0,f.s)(t,{loader:!0}),suspense:!0,children:(0,c.jsx)(u.O,{container:i.rightAreaBottom})})})]}),(0,c.jsx)(D.I,{onClick:()=>s.close()})]})]})})),L=(0,p.PA)((function Main(){const e=(0,v.d)(C),t=(0,h.h)(y.SideBarPanelService),i=(0,h.h)(j.LeftBarPanelService),s=(0,m.s)("main"),r=(0,m.s)("main-right"),n=(0,S.u)((()=>0===t.tabsContainer.getDisplayed().length)),a=(0,S.u)((()=>0===i.tabsContainer.getDisplayed().length));return(0,c.jsx)(d.a,{className:(0,f.s)(e,{loader:!0}),suspense:!0,children:(0,c.jsx)("main",{className:(0,f.s)(e,{space:!0}),children:(0,c.jsxs)(_.B,{...s,sticky:30,mode:a?"minimize":s.mode,disable:a,children:[(0,c.jsx)(b.Z,{className:(0,f.s)(e,{pane:!0}),basis:"250px",main:!0,children:(0,c.jsx)(d.a,{suspense:!0,children:(0,c.jsx)(P.X,{container:i.tabsContainer})})}),(0,c.jsx)(x.$,{}),(0,c.jsx)(b.Z,{className:(0,f.s)(e,{pane:!0}),children:(0,c.jsxs)(_.B,{...r,mode:n?"minimize":r.mode,disable:n,sticky:30,children:[(0,c.jsx)(b.Z,{className:(0,f.s)(e,{pane:!0}),children:(0,c.jsx)(E,{})}),(0,c.jsx)(x.$,{}),(0,c.jsx)(b.Z,{className:(0,f.s)(e,{pane:!0}),basis:"250px",main:!0,children:(0,c.jsx)(d.a,{className:(0,f.s)(e,{loader:!0}),suspense:!0,children:(0,c.jsx)(P.X,{container:t.tabsContainer})})})]})})]})})})})),A=(0,l.memo)((function AppScreen(){const e=(0,h.h)(g.AppScreenService);return(0,c.jsxs)(d.a,{suspense:!0,children:[(0,c.jsx)(u.O,{container:e.placeholder}),(0,c.jsx)(d.a,{suspense:!0,children:(0,c.jsx)(L,{})})]})}));let N=class AppScreenBootstrap extends r.j{constructor(e){super(),this.screenService=e,this.activation=new a.Q}register(){this.screenService.create({name:g.AppScreenService.screenName,routes:[{name:g.AppScreenService.screenName,path:"/"}],component:A,root:!0,onActivate:async()=>{await this.activation.execute()}})}load(){}};N=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[o.ScreenService])],N)},21661:(e,t,i)=>{i.r(t),i.d(t,{AppScreenService:()=>a});var s=i(1118),r=i(46210),n=i(5576);let a=class AppScreenService{static{this.screenName="app"}constructor(){this.placeholder=new r.B,this.rightAreaTop=new r.B,this.rightAreaBottom=new r.B}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],a)},55491:(e,t,i)=>{i.r(t),i.d(t,{Body:()=>E});var s=i(41773),r=i(7838),n=i(15993),a=i(64928),o=i(84383),c=i(69519),l=i(7167),d=i(77729),u=i(18699),h=i(10842),g=i(14452);const p={notifications:"notifications___AC7ZP theme-typography"};var v=i(90447),m=i(20950),S=i(19395);const f=(0,r.PA)((function Notification({notification:e}){const t=(0,v.s)(e.details??null);if(e.customComponent){const t=e.customComponent();return(0,s.jsx)(t,{notification:e,...e.extraProps})}let i=0;return e.type===S.R.Error||e.persistent||!1===e.autoClose||(i=5e3),(0,s.jsx)(m.q,{title:e.title,message:e.message,persistent:e.persistent,type:e.type,time:e.timestamp,state:e.state,disableShowDetails:t.isOpen,closeDelay:i,onClose:e.close,onShowDetails:t.hasDetails?t.open:void 0})})),_=(0,r.PA)((function Notifications(){const e=(0,u.h)(g.NotificationService),t=(0,a.d)(p);return(0,s.jsx)(h.Z,{children:(0,s.jsx)("div",{className:(0,l.s)(t,{notifications:!0}),children:e.visibleNotifications.map((e=>(0,s.jsx)(f,{notification:e},e.id)))})})}));var b=i(10392),x=i(40813),y=i(19462),j=i(71086),P=i(72858),C=i(64083),w=i(46400);const I={bodyContent:"bodyContent___e2keU theme-background-surface theme-text-on-surface theme-typography",loader:"loader___ZmNsP"};var D=i(8385);const R=(0,D.n)((()=>{document.documentElement.style.setProperty("--app-height",`${window.innerHeight}px`)}),50);var k=i(4370);function useClientActivity(){const e=(0,u.h)(k.ClientActivityService),t=(0,D.n)((function updateActivity(){e.updateActivity()}),300);(0,n.useEffect)((()=>(function subscribeEvents(){document.addEventListener("mousemove",t),document.addEventListener("click",t),document.addEventListener("keydown",t),document.addEventListener("scroll",t),document.addEventListener("touchstart",t)}(),()=>{!function unsubscribeEvents(){document.removeEventListener("mousemove",t),document.removeEventListener("click",t),document.removeEventListener("keydown",t),document.removeEventListener("scroll",t),document.removeEventListener("touchstart",t)}()})),[])}const E=(0,r.PA)((function Body(){const e=(0,a.d)(I),t=(0,u.h)(P.ThemeService),i=(0,n.useRef)(null);(0,o.q)(Body,y.SessionPermissionsResource,void 0);const r=(0,u.h)(j.ScreenService),h=r.screen?.component,{backendVersion:g}=(0,w.h)();return(0,o.q)(Body,b.ProjectInfoResource,x.fZ,{silent:!0}),(0,n.useLayoutEffect)((()=>{i.current&&(document.body.className=i.current.className),document.documentElement.dataset.backendVersion=g})),function useAppHeight(){(0,n.useLayoutEffect)((()=>(R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)})))}(),useClientActivity(),(0,s.jsx)(C.c,{children:(0,s.jsx)(c.a,{className:(0,l.s)(e,{loader:!0}),suspense:!0,children:(0,s.jsxs)("div",{ref:i,className:(0,l.s)(e,{bodyContent:!0},`theme-${t.currentTheme.id}`),children:[(0,s.jsx)(c.a,{className:(0,l.s)(e,{loader:!0}),suspense:!0,children:h&&(0,s.jsx)(h,{...r.routerService.params})}),(0,s.jsx)(c.a,{suspense:!0,overlay:!0,children:(0,s.jsx)(d.S,{})}),(0,s.jsx)(c.a,{suspense:!0,overlay:!0,children:(0,s.jsx)(_,{})})]})})})}))},9243:(e,t,i)=>{i.d(t,{renderLayout:()=>renderLayout});var s=i(41773),r=i(15993),n=i(63025);const a=(0,i(50420).j)((()=>Promise.all([i.e(11502),i.e(7542),i.e(97493),i.e(67557),i.e(62570),i.e(95860),i.e(68031)]).then(i.bind(i,55491)).then((e=>e.Body))));var o=i(62540),c=i(69519),l=i(7167),d=i(45815);const u=(0,r.lazy)((()=>Promise.all([i.e(95860),i.e(90412)]).then(i.bind(i,63194)).then((e=>({default:e.HideAppLoadingScreen}))))),h=(0,r.lazy)((()=>Promise.resolve().then(i.bind(i,27079)).then((e=>({default:e.AppContext}))))),g={loader:"loader___oAwiB"};function renderLayout(e){let t;return{initRoot(){this.unmount();let e=document.body.querySelector("div#root");return e||(e=document.createElement("div"),e.id="root",document.body.prepend(e)),t=(0,n.H)(e),t},unmount(){t&&(t.unmount(),t=void 0)},renderApp(){this.initRoot().render((0,s.jsx)(o.t,{fallback:(0,s.jsx)(u,{}),simple:!0,children:(0,s.jsx)(h,{app:e,children:(0,s.jsx)(o.t,{fallback:(0,s.jsx)(u,{}),root:!0,children:(0,s.jsxs)(r.Suspense,{fallback:(0,s.jsx)(c.a,{className:(0,l.s)(g,{loader:!0})}),children:[(0,s.jsx)(a,{}),(0,s.jsx)(u,{})]})})})}))},renderError(t){t&&console.error(t),this.initRoot().render((0,s.jsx)(o.t,{fallback:(0,s.jsx)(u,{}),simple:!0,children:(0,s.jsxs)(h,{app:e,children:[(0,s.jsx)(d.$,{error:t,root:!0}),(0,s.jsx)(u,{})]})}))}}}},18500:(e,t,i)=>{i.r(t),i.d(t,{CookiesService:()=>a});var s=i(1118),r=i(85096),n=i(5576);let a=class CookiesService{get cookiesEnabled(){return!this.browserSettingsService.disabled}constructor(e){this.browserSettingsService=e}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[r.BrowserSettingsService])],a)},85096:(e,t,i)=>{i.r(t),i.d(t,{BrowserSettingsService:()=>p});var s=i(1118),r=i(63716),n=i(5576),a=i(76761),o=i(70446),c=i(83916),l=i(80625),d=i(82607),u=i(3065),h=i(31038);const g=u.Ik({"core.browser.cookies.disabled":h.W.stringedBoolean().default(!1)});let p=class BrowserSettingsService extends r.O{get disabled(){return this.settings.getValue("core.browser.cookies.disabled")}constructor(e,t,i){super(),this.settingsProviderService=e,this.settingsManagerService=t,this.settingsResolverService=i,this.settings=this.settingsProviderService.createSettings(g),this.settingsResolverService.addResolver(a.T,(0,o.q)(this.settingsResolverService,this.settings,{"core.browser.cookies.disabled":"core.cookies.disabled"})),this.registerSettings()}registerSettings(){this.settingsManagerService.registerSettings(this.settings,(()=>[]))}};p=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[c.SettingsProviderService,l.SettingsManagerService,d.SettingsResolverService])],p)},86351:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(84073)]).then(i.bind(i,72701))).default;case"it":return(await Promise.all([i.e(32756),i.e(6454)]).then(i.bind(i,69937))).default;case"zh":return(await Promise.all([i.e(52041),i.e(60263)]).then(i.bind(i,1378))).default;case"fr":return(await Promise.all([i.e(29671),i.e(82644)]).then(i.bind(i,90316))).default;default:return(await Promise.all([i.e(41114),i.e(33108)]).then(i.bind(i,95195))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},69090:(e,t,i)=>{i.r(t),i.d(t,{IndexedDBService:()=>n});var s=i(1118),r=i(5576);let n=class IndexedDBService{register(e){}};n=(0,s.Cg)([(0,r._)()],n)},65486:(e,t,i)=>{i.r(t),i.d(t,{LocalStorageSaveService:()=>l});var s=i(1118),r=i(94866),n=i(5576),a=i(44017),o=i(17314),c=i(69090);let l=class LocalStorageSaveService{get storage(){return this.storageType}constructor(e){this.indexedDBService=e,this.storageType="local",this.broadcastChannel=new BroadcastChannel("local-storage"),this.storages=new Map,this.onStorageChange=new a.H,this.indexedDBStore=new LocalStorageIndexedDB,this.indexedDBService.register(this.indexedDBStore)}withAutoSave(e,t,i,s,r,n){this.storages.has(e)||this.storages.set(e,new DataStorage(this.getStorage(n),e,t,i,s,r))}updateStorage(e){this.storageType!==e&&(this.storageType=e,"local"===this.storageType&&this.sendMessage({type:"respond"}),(0,r.h5)((()=>{for(const e of this.storages.values())e.setStorage(this.getStorage())})),this.onStorageChange.execute(this.storageType))}getStorage(e){switch(e??this.storageType){case"local":return localStorage;case"indexed":return this.indexedDBStore;default:return sessionStorage}}sendMessage(e){this.broadcastChannel.postMessage(e)}};l=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[c.IndexedDBService])],l);class LocalStorageIndexedDB extends o.Ay{constructor(){super("local-storage"),this.version(1).stores({values:"key"})}count(){return this.values.count()}async clear(){await this.values.clear()}async getItem(e){const t=await this.values.get(e);return t?.data??null}async removeItem(e){await this.values.delete(e)}async setItem(e,t){await this.values.put({key:e,data:t})}}class DataStorage{constructor(e,t,i,s,r,n){this.storage=e,this.storeId=t,this.store=i,this.defaultValue=s,this.remap=r,this.onUpdate=n,this.firstRun=!0,this.mobxSub=void 0,this.subscribe()}setStorage(e){this.storage=e,this.firstRun=!0,this.saveState((0,r.HO)(this.store),this.firstRun)}async readState(e){try{const t=await this.storage.getItem(this.storeId);let i;i=t&&!e?this.deserializeData(this.store,t,this.remap):(0,r.HO)(this.defaultValue());const s=(0,r.sH)(i,void 0,{deep:!0}),n=(0,r.HP)(this.store),a=(0,r.HP)(s);this.unsubscribe();try{(0,r.h5)((()=>{for(const e of n)a.includes(e)||(0,r.TF)(this.store,e);for(const[e,t]of(0,r.jO)(s))(0,r.hZ)(this.store,e,t)}))}finally{this.subscribe()}this.onUpdate?.()}catch(e){console.error("Error when parsing local storage value",e)}}async saveState(e,t){if(t)return await this.readState(!1),void(this.firstRun=!1);try{this.storage instanceof LocalStorageIndexedDB?await this.storage.setItem(this.storeId,this.serializeData(e)):this.storage.setItem(this.storeId,this.serializeData(e))}catch(e){console.error("Error when saving local storage value",e)}}subscribe(){this.unsubscribe(),this.mobxSub=(0,r.mJ)((()=>[(0,r.HO)(this.store),this.firstRun]),(([e,t])=>this.saveState(e,t)),{fireImmediately:!0,delay:500})}unsubscribe(){this.mobxSub?.(),this.mobxSub=void 0}deserializeData(e,t,i){return e instanceof r.Es?t=this.parseMap(t):"string"==typeof t&&(t=JSON.parse(t)),i&&(t=i(t)),e instanceof r.Es&&(t=Array.from(t.entries()).reduce(((e,[t,i])=>(e[t]=i,e)),{})),t}serializeData(e){return this.storage instanceof LocalStorageIndexedDB?e:e instanceof Map?this.stringifyMap(e):JSON.stringify(e)}stringifyMap(e){return JSON.stringify(Array.from(e.entries()))}parseMap(e){return"string"==typeof e?new Map(JSON.parse(e)):e}}},3253:(e,t,i)=>{i.r(t),i.d(t,{ServiceWorkerBootstrap:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(17340);let o=class ServiceWorkerBootstrap extends r.j{constructor(e){super(),this.serviceWorkerService=e}async register(){await this.serviceWorkerService.register()}async load(){await this.serviceWorkerService.load()}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.ServiceWorkerService])],o)},17340:(e,t,i)=>{i.r(t),i.d(t,{ServiceWorkerService:()=>l});var s=i(1118),r=i(15541),n=i(50131),a=i(5576),o=i(29606),c=i(56191);let l=class ServiceWorkerService extends n.j{constructor(){super(),this.onUpdate=new o.Q,this.workerURL=c.b.absoluteRootUrl("service-worker.js"),this.workbox=null,this.updateIntervalId=null,this.registration=null,this.isUpdating=!1,this.handleMessage=this.handleMessage.bind(this),this.handleControlling=this.handleControlling.bind(this)}async register(){if("serviceWorker"in navigator)try{this.workbox=new r.JK(this.workerURL),this.registration=await this.workbox.register()||null,this.registerEventListeners(),this.registration?.active&&(this.isUpdating=!0)}catch(e){console.error(e)}}async load(){try{(this.registration?.installing||this.registration?.waiting)&&this.onUpdate.execute({type:this.isUpdating?"updating":"installing"}),await(this.workbox?.update()),this.registration?.active&&(this.registration.installing||this.registration.waiting)&&await new Promise((()=>{})),this.updateIntervalId=setInterval((()=>this.workbox?.update()),864e5)}catch(e){console.error(e)}}dispose(){this.updateIntervalId&&clearInterval(this.updateIntervalId),this.workbox?.removeEventListener("message",this.handleMessage),this.workbox?.removeEventListener("controlling",this.handleControlling)}registerEventListeners(){this.workbox?.addEventListener("message",this.handleMessage),this.workbox?.addEventListener("controlling",this.handleControlling)}handleMessage({data:e}){switch(e.type){case"mode":this.onUpdate.execute({type:this.isUpdating||e.isUpdate?"updating":"installing"});break;case"progress":{const t=Math.min(1,Math.max(0,e.progress));this.onUpdate.execute({type:this.isUpdating||e.isUpdate?"updating":"installing",progress:t})}}}async handleControlling(e){this.isUpdating=!1,await this.onUpdate.execute({type:"finished"}),e.isUpdate&&window.location.reload()}};l=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[])],l)},34793:(e,t,i)=>{function selectFiles(e,t){let i=!1;const s=document.createElement("input");s.type="file",t&&(s.multiple=!0),s.onchange=()=>{e(s.files?.length?Array.from(s.files):[]),i=!0,s.remove()},s.style.position="fixed",s.style.top="-100px",s.style.left="-100px",s.style.opacity="0",s.style.pointerEvents="none",s.style.zIndex="-1",document.body.append(s),s.click(),setTimeout((()=>{i||s.remove()}),18e5)}i.d(t,{A:()=>selectFiles})},58471:(e,t,i)=>{i.r(t)},68127:(e,t,i)=>{i.r(t)},16359:(e,t,i)=>{i.d(t,{A:()=>s});const s={wrapper:"wrapper___VpHp8 theme-typography--body1",sqlCodeEditorLoader:"sqlCodeEditorLoader___PXj4l",menuBar:"menuBar___Egsn8"}},2050:()=>{},4370:(e,t,i)=>{i.r(t),i.d(t,{ClientActivityService:()=>o});var s=i(1118),r=i(94866),n=i(5576),a=i(29606);let o=class ClientActivityService{constructor(){this.setActivity=this.setActivity.bind(this),this.updateActivity=this.updateActivity.bind(this),this.resetActivity=this.resetActivity.bind(this),this.timer=null,this.isActive=!1,this.onActiveStateChange=new a.Q,(0,r.Gn)(this,{isActive:r.sH})}setActivity(e){this.isActive=e,this.onActiveStateChange.execute(e)}resetActivity(){this.setActivity(!1),this.timer&&(clearTimeout(this.timer),this.timer=null)}updateActivity(){this.setActivity(!0),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(this.resetActivity,6e4)}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],o)},35282:(e,t,i)=>{i.d(t,{j:()=>s});const s=(0,i(44745).M)("DI Provider")},81528:(e,t,i)=>{i.d(t,{T:()=>dataContextAddDIProvider});var s=i(35282);function dataContextAddDIProvider(e,t,i){return e.set(s.j,t.getServiceInjector(),i),e}},63194:(e,t,i)=>{i.r(t),i.d(t,{HideAppLoadingScreen:()=>HideAppLoadingScreen});var s=i(15993);function onTransitionEnd(){this.classList.add("app-loading-screen--hidden")}function HideAppLoadingScreen(){return function useAppLoadingScreen(){(0,s.useLayoutEffect)((()=>{const e=document.getElementById("app-loading-screen");if(e)return e.classList.contains("app-loading-screen--fade-out")&&(e.classList.remove("app-loading-screen--fade-out"),console.warn('#app-loading-screen already has "app-loading-screen--fade-out" class')),e.classList.contains("app-loading-screen--hidden")&&(e.classList.remove("app-loading-screen--hidden"),console.warn('#app-loading-screen already has "app-loading-screen--hidden" class')),e.addEventListener("transitionend",onTransitionEnd),e.classList.add("app-loading-screen--fade-out"),()=>{e.removeEventListener("transitionend",onTransitionEnd),e.classList.remove("app-loading-screen--fade-out","app-loading-screen--hidden")}}),[])}(),null}},56508:(e,t,i)=>{i.r(t),i.d(t,{DIService:()=>o});var s=i(1118),r=i(48138);const n=function dependencyInjectorContext(){throw new Error("Implementation not provided \n Use addContextCreator to add addDIContext implementation to context")};var a=i(5576);let o=class DIService{get serviceInjector(){return this.app.getServiceInjector()}constructor(e){this.app=e,this.dependencyInjectorContext=()=>this.serviceInjector.getServiceByClass.bind(this)}addDIContext(e){e.addContextCreator(n,this.dependencyInjectorContext)}};o=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[r.q])],o)},26962:(e,t,i)=>{i.d(t,{a:()=>useController});var s=i(15993),r=i(27079);function useController(e,...t){const i=(0,s.useContext)(r.appContext),n=(0,s.useRef)();return(0,s.useMemo)((()=>{n.current&&isDestructibleController(n.current)&&n.current.destruct();const s=i.resolveServiceByClass(e);(function isInitializableController(e){return e&&"function"==typeof e.init})(s)&&s.init(...t),n.current=s}),[...t,t.length]),(0,s.useEffect)((()=>()=>{isDestructibleController(n.current)&&n.current.destruct()}),[]),n.current}function isDestructibleController(e){return e&&"function"==typeof e.destruct}},71635:(e,t,i)=>{i.r(t),i.d(t,{CommonDialogService:()=>c,DialogueStateResult:()=>s});var s,r=i(1118),n=i(94866),a=i(5576),o=i(35721);!function(e){e[e.Resolved=0]="Resolved",e[e.Rejected=1]="Rejected"}(s||(s={}));let c=class CommonDialogService{constructor(){this.dialogs=(0,n.sH)([],{deep:!1})}open(e,t,i){let s,r;const n=new Promise(((e,t)=>{s=e,r=t})),a={id:(0,o.u)(),component:e,payload:t,resolve:s,options:i,promise:n};return this.dialogs.push(a),n}rejectDialog(e){const t=this.dialogs.find((t=>t.promise===e));t&&(t.resolve(s.Rejected),this.removeDialog(t))}rejectAll(){(0,n.h5)((()=>{for(const e of this.dialogs.slice())this.rejectDialog(e.promise)}))}resolveDialog(e,t){const i=this.dialogs.find((t=>t.promise===e));i&&(i.resolve(t??s.Resolved),this.removeDialog(i))}removeDialog(e){const t=this.dialogs.findIndex((t=>t===e));-1!==t&&this.dialogs.splice(t,1)}};c=(0,r.Cg)([(0,a._)()],c)},79163:(e,t,i)=>{i.r(t),i.d(t,{ContextMenuService:()=>d});var s=i(1118),r=i(5576),n=i(35721),a=i(24916),o=i(94866);class ComputedMenuItemModel{get title(){return this.options.title?this.options.title:this.options.titleGetter&&this.options.titleGetter()||""}get tooltip(){return this.options.tooltip?this.options.tooltip:this.options.tooltipGetter?this.options.tooltipGetter():void 0}get isDisabled(){return!!this.options.isDisabled&&this.options.isDisabled()}get icon(){return this.options.icon?this.options.icon:this.options.iconGetter?this.options.iconGetter():void 0}get isHidden(){return!!this.options.isHidden&&this.options.isHidden()}get isProcessing(){return!!this.options.isProcessing&&this.options.isProcessing()}get isPanelAvailable(){return this.options.isPanelAvailable?this.options.isPanelAvailable():void 0}get isChecked(){return!!this.options.isChecked&&this.options.isChecked()}constructor(e){this.options=e,(0,o.Gn)(this,{title:o.EW,tooltip:o.EW,isDisabled:o.EW,icon:o.EW,isHidden:o.EW,isProcessing:o.EW,isPanelAvailable:o.EW,isChecked:o.EW}),this.id=e.id,this.type=e.type,this.keepMenuOpen=e.keepMenuOpen,this.separator=e.separator,this.rtl=e.rtl,this.panel=e.panel,this.onClick=this.options.onClick,this.onMouseEnter=this.options.onMouseEnter}}var c=i(10752);class MenuOptionsStore{constructor(){this.panelsMap=new Map}addRootPanel(e){this.createPanelIfNotExists(e)}addMenuItem(e,t){const i=this.createPanelIfNotExists(e);if(i.menuItems.has(t.id))throw new Error(`Panel "${e}" already has item ${t.id}`);this.putItemInPanel(i,t),t.isPanel&&this.createPanelIfNotExists(t.id)}getPanel(e){const t=this.panelsMap.get(e);if(!t)throw new Error(`Menu panel "${e}" is missing`);return t}putItemInPanel(e,t){e.menuItems.addValue(t),e.menuItems.sort(((e,t)=>this.compare(e,t)))}createPanelIfNotExists(e){if(this.panelsMap.has(e))return this.panelsMap.get(e);const t=new MenuItemOptionsList(e);return this.panelsMap.set(e,t),t}compare(e,t){return(void 0!==e.order?e.order:100)-(void 0!==t.order?t.order:100)}}class MenuItemOptionsList{constructor(e){this.menuItems=new c.u((e=>e.id)),this.id=e}}class ContextMenu{constructor(){this.menuStore=new MenuOptionsStore}addRootPanel(e){this.menuStore.addRootPanel(e)}addMenuItem(e,t){this.menuStore.addMenuItem(e,t)}constructMenuWithContext(e,t){return this.constructMenuPanelWithContext(e,t)}constructMenuItemWithContext(e,t){const i=new ComputedMenuItemOptionsWithContext(e,t),s=new ComputedMenuItemModel(i);if(e.isPanel&&!e.panel)s.panel=this.constructMenuPanelWithContext(e.id,t);else if(e.panel instanceof a.Z){const i=e.panel;s.panel=new ContextMenuPanel(`${e.panel.id}-${t.contextId}-panel`,(()=>this.constructMenuItems(i.options.menuItemsGetter(t),t)))}return s}constructMenuPanelWithContext(e,t){const i=this.menuStore.getPanel(e),s=t.contextId||(0,n.u)();return new ContextMenuPanel(`${e}-${s}-panel`,(()=>this.constructMenuItems(i.menuItems.values,t)))}constructMenuItems(e,t){return e.filter((e=>e.isPresent(t))).map((e=>this.constructMenuItemWithContext(e,t)))}}class ComputedMenuItemOptionsWithContext{constructor(e,t){this.options=e,this.context=t,this.title=e.title,this.tooltip=e.tooltip,this.tooltipGetter=e.tooltipGetter,this.icon=e.icon,this.type=e.type,this.separator=e.separator,this.keepMenuOpen=e.keepMenuOpen,this.iconGetter=e.iconGetter,this.id=`${e.id}-${t.contextId}`,e.onClick&&(this.onClick=()=>e.onClick(this.context)),e.onMouseEnter&&(this.onMouseEnter=()=>e.onMouseEnter(this.context)),e.isDisabled&&(this.isDisabled=()=>e.isDisabled(this.context)),e.isHidden&&(this.isHidden=()=>e.isHidden(this.context)),e.isProcessing&&(this.isProcessing=()=>e.isProcessing(this.context)),e.isPanelAvailable&&(this.isPanelAvailable=()=>e.isPanelAvailable(this.context)),e.isChecked&&(this.isChecked=()=>e.isChecked(this.context)),e.titleGetter&&(this.titleGetter=()=>e.titleGetter(this.context))}}class ContextMenuPanel{get menuItems(){return this.items||(this.items=this.itemsGetter()),this.items}constructor(e,t){this.id=e,this.itemsGetter=t}}var l;let d=class ContextMenuService{static{l=this}static{this.rootPanelId="contextRoot"}constructor(){this.contextMenu=new ContextMenu,this.contextMenu.addRootPanel(l.rootPanelId)}getRootMenuToken(){return l.rootPanelId}addPanel(e){this.contextMenu.addRootPanel(e)}addMenuItem(e,t){this.contextMenu.addMenuItem(e,t)}createContextMenu(e,t){return this.contextMenu.constructMenuWithContext(t||l.rootPanelId,e)}};d=l=(0,s.Cg)([(0,r._)(),(0,s.Sn)("design:paramtypes",[])],d)},24916:(e,t,i)=>{i.d(t,{Z:()=>ComputedContextMenuModel});class ComputedContextMenuModel{get menuItems(){return[]}constructor(e){this.options=e,this.id=this.options.id}}},13676:(e,t,i)=>{i.d(t,{y:()=>r});const s=Symbol("event-context"),r=(Symbol("event-context-typeSaver"),{set(e,t,i){const r=(e=addContextToEvent(e))[s].find((e=>e.flag===t));return r?(r.context=i,this):(e[s].push({flag:t,context:i}),this)},has:(e,...t)=>(e=addContextToEvent(e),t.some((t=>e[s].some((e=>e.flag===t))))),get(e,t){const i=(e=addContextToEvent(e))[s].find((e=>e.flag===t));return i?.context},create:e=>({name:e})});function addContextToEvent(e){return e[s]||(e[s]=[]),e}},43995:(e,t,i)=>{i.d(t,{X:()=>s});const s=i(13676).y.create("stopPropagation")},11956:(e,t,i)=>{i.r(t),i.d(t,{EventsSettingsService:()=>g});var s=i(1118),r=i(63716),n=i(5576),a=i(76761),o=i(70446),c=i(83916),l=i(80625),d=i(82607),u=i(3065);const h=u.Ik({"plugin.notifications.notificationsPool":u.au.number().default(20),"plugin.notifications.maxPersistentAllow":u.au.number().default(5)});let g=class EventsSettingsService extends r.O{get maxPersistentAllow(){return this.settings.getValue("plugin.notifications.maxPersistentAllow")}get notificationsPool(){return this.settings.getValue("plugin.notifications.notificationsPool")}constructor(e,t,i){super(),this.settingsProviderService=e,this.settingsManagerService=t,this.settingsResolverService=i,this.settings=this.settingsProviderService.createSettings(h),this.settingsResolverService.addResolver(a.T,(0,o.q)(this.settingsResolverService,this.settings,{"plugin.notifications.maxPersistentAllow":"core_events.maxPersistentAllow","plugin.notifications.notificationsPool":"core_events.notificationsPool"})),this.registerSettings()}registerSettings(){this.settingsManagerService.registerSettings(this.settings,(()=>[]))}};g=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[c.SettingsProviderService,l.SettingsManagerService,d.SettingsResolverService])],g)},6282:(e,t,i)=>{i.r(t),i.d(t,{ExceptionsCatcherService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(14452);let o=class ExceptionsCatcherService extends r.j{constructor(e){super(),this.notificationService=e,this.baseCatcher=null,this.ignored=[],this.messageTitle="Uncatched exception",this.catcher=(e,t,i,s,r)=>{if(r)this.notificationService.logException(r,this.messageTitle);else{const t=String(e);this.notificationService.logError({title:this.messageTitle,message:t,isSilent:this.ignored.includes(t)})}return console.error(r),!this.baseCatcher||this.baseCatcher(e,t,i,s,r)}}register(){this.baseCatcher=window.onerror,window.onerror=this.catcher}load(){}unsubscribe(){window.onerror=this.baseCatcher}ignore(e){this.ignored.push(e)}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.NotificationService])],o)},19395:(e,t,i)=>{var s;i.d(t,{R:()=>s}),function(e){e.Info="Info",e.Error="Error",e.Success="Success",e.Loading="Loading",e.Custom=" Custom"}(s||(s={}))},14452:(e,t,i)=>{i.r(t),i.d(t,{DELAY_DELETING:()=>h,NotificationService:()=>g});var s=i(1118),r=i(94866),n=i(5576),a=i(29606),o=i(44512),c=i(10752),l=i(87518),d=i(11956),u=i(19395);class ProcessNotificationController{constructor(){this.error=null,this.title="",this.message=null,this.status=u.R.Info,(0,r.Gn)(this,{error:r.sH,title:r.sH,status:r.sH,message:r.sH.ref})}init(e,t=null){this.status=u.R.Loading,this.title=e,this.message=t}resolve(e,t=null){this.status=u.R.Success,this.title=e,this.message=t}reject(e,t,i=null){const s=(0,l.M)(e,o.d);this.status=u.R.Error,this.title=t||s?.name||e.name,this.message=i||s?.message||e.message,this.error=e}setMessage(e){this.message=e}}const h=1e3;let g=class NotificationService{get visibleNotifications(){return this.notificationList.values.filter((e=>!e.isSilent))}constructor(e){this.settings=e,this.notificationList=new c.u((({id:e})=>e)),this.closeTask=new a.Q,this.notificationNextId=0}notify(e,t){if(e.persistent){const e=this.notificationList.values.filter((e=>e.persistent)),t=this.settings.maxPersistentAllow;if(e.length>=t)throw new Error(`You cannot create more than ${t} persistent notification`)}if(void 0!==e.details){const t=e.timestamp||Date.now(),i=this.notificationList.values.reverse().find((t=>t.details===e.details));if(i&&t-i.timestamp<100)return i}if(void 0!==e.uuid){const t=this.notificationList.values.find((t=>t.uuid===e.uuid));if(t)return t}const i=this.notificationNextId++,s={id:i,uuid:e.uuid,title:e.title,message:e.message,details:e.details,isSilent:!!e.isSilent,customComponent:e.customComponent,extraProps:e.extraProps||{},autoClose:e.autoClose,persistent:e.persistent,state:(0,r.sH)({deleteDelay:0}),timestamp:e.timestamp||Date.now(),type:t,close:t=>{this.close(i,t),e.onClose?.(t)},showDetails:this.showDetails.bind(this,i)};this.notificationList.addValue(s);const n=this.notificationList.values.filter((e=>!e.persistent)),a=this.settings.notificationsPool;if(n.length>a){let e=0;for(;this.notificationList.get(this.notificationList.keys[e])?.persistent;)e++;this.notificationList.remove(this.notificationList.keys[e])}return s}customNotification(e,t,i){return this.notify({title:"",...i,customComponent:e,extraProps:t||{}},i?.type??u.R.Custom)}processNotification(e,t,i){const s=t?.state||new ProcessNotificationController,r=this.notify({title:"",...i,extraProps:{...t,state:s},customComponent:e},u.R.Custom);return s.init(r.title,r.message),{controller:s,notification:r}}logInfo(e){return this.notify(e,u.R.Info)}logSuccess(e){return this.notify(e,u.R.Success)}logError(e){return this.notify(e,u.R.Error)}logException(e,t,i,s){const r=(0,l.M)(e,o.d);if(!s){(r?.hasDetails()??!1)&&(t||(t=e?.name),i||(i=e?.message)),this.logError({title:t||"ui_unexpected_error",message:i||"core_blocks_exception_message_error_message",details:e,isSilent:s})}}throwSilently(e){throw this.logError({title:"",details:e,isSilent:!0}),e}close(e,t=!0){if(t){const t=this.notificationList.get(e);t&&(t.state.deleteDelay=h,setTimeout((()=>{this.notificationList.remove(e),this.closeTask.execute(e)}),h))}else this.notificationList.remove(e),this.closeTask.execute(e)}showDetails(e){}};g=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[d.EventsSettingsService])],g)},3366:(e,t,i)=>{function executorHandlerFilter(e,t){return(i,s)=>{if(e(i,s))return t(i,s)}}i.d(t,{G:()=>executorHandlerFilter})},64738:(e,t,i)=>{i.d(t,{R:()=>s});const s={from:e=>({on(t,i){for(const s of e)t(s)&&i(s);return this},has:t=>e.some(t)})}},88381:(e,t,i)=>{i.d(t,{w:()=>createExtension,o:()=>isExtension});const s=Symbol("@extension");Symbol("@extension/type");function createExtension(e,t){return Object.assign(e,{[s]:t})}function isExtension(e,t){return s in e&&(!t||e[s]===t)}},56246:(e,t,i)=>{i.r(t),i.d(t,{PRODUCT_SETTINGS_LAYER:()=>c,ProductSettingsService:()=>l});var s=i(1118),r=i(94866),n=i(5576),a=i(76761),o=i(42463);const c=(0,a.L)(a.T,"product");let l=class ProductSettingsService extends o.z{constructor(){super(),this.settings=new Map,(0,r.Gn)(this,{clear:r.XI,settings:r.sH.shallow})}has(e){return this.settings.has(e)||super.has(e)||!1}isReadOnly(){return!0}getValue(e){return this.settings.get(e)}setValue(e,t){this.update((()=>{this.settings.set(e,t)}))}setSettingsObject(e){this.update((()=>{if(e&&"object"==typeof e)for(const[t,i]of Object.entries(e))this.setValue(t,i)}))}clear(){this.update((()=>{super.clear(),this.settings.clear()}))}async save(){}getSnapshot(){return Object.fromEntries(this.settings.entries())}};l=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],l)},94375:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(10727)]).then(i.bind(i,11845))).default;case"it":return(await Promise.all([i.e(32756),i.e(88346)]).then(i.bind(i,51241))).default;case"zh":return(await Promise.all([i.e(52041),i.e(65965)]).then(i.bind(i,54922))).default;case"fr":return(await Promise.all([i.e(29671),i.e(22632)]).then(i.bind(i,72244))).default;case"de":return(await Promise.all([i.e(57698),i.e(251)]).then(i.bind(i,2407))).default;default:return(await Promise.all([i.e(41114),i.e(77870)]).then(i.bind(i,37011))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},97007:(e,t,i)=>{i.d(t,{O:()=>s});const s="project"},3838:(e,t,i)=>{function getProjectNodeId(e){return`resource://${e}`}i.d(t,{V:()=>getProjectNodeId})},87283:(e,t,i)=>{i.r(t),i.d(t,{ProjectInfoEventHandler:()=>l});var s=i(1118),r=i(5576),n=i(21335),a=i(43974),o=i(60018),c=i(38387);let l=class ProjectInfoEventHandler extends n._{constructor(e){super(a.nKA.CbProjects,e),this.lastActiveProjects=[],this.onInit.addHandler((()=>{this.lastActiveProjects=[]}))}setActiveProjects(e){(0,c.x)(this.lastActiveProjects,e)||(this.emit({id:a.I5p.CbClientProjectsActive,projectIds:e}),this.lastActiveProjects=e)}map(e){return e}};l=(0,s.Cg)([(0,r._)(),(0,s.Sn)("design:paramtypes",[o.SessionEventSource])],l)},10392:(e,t,i)=>{i.r(t),i.d(t,{ProjectInfoResource:()=>h,isGlobalProject:()=>isGlobalProject,isSharedProject:()=>isSharedProject,projectInfoSortByName:()=>projectInfoSortByName});var s=i(1118),r=i(11130),n=i(56078),a=i(5576),o=i(40813),c=i(7278),l=i(40601),d=i(83336),u=i(17069);let h=class ProjectInfoResource extends o.nG{constructor(e,t,i,s){super((()=>new Map),[]),this.graphQLService=e,this.userInfoResource=t,this.sync(this.userInfoResource,(()=>{}),(()=>o.fZ)),s.requireAuthentication(this),i.requirePublic(this),this.userInfoResource.onUserChange.addPostHandler((()=>{this.clear()}))}getNameWithoutExtension(e,t,i){const s=this.get(e);if(s){const e=this.getResourceType(s,t);for(let t of e?.fileExtensions||[])if(t=`.${t}`,i.toLowerCase().endsWith(t))return i.slice(0,i.length-t.length)}return i}getNameWithExtension(e,t,i){const s=this.get(e);if(s){const e=this.getResourceType(s,t);if(e?.fileExtensions.length)return function createResourceOfType(e,t){if((0,u.c)(e,t))return t;const i=e.fileExtensions[0];return`${t}${i?"."+i:""}`}(e,i)}return i}getUserProject(e){return this.get(`u_${e}`)}getResourceType(e,t){return e.resourceTypes.find((e=>e.id===t))}async loader(){const{projects:e}=await this.graphQLService.sdk.getProjectList();return this.replace((0,c.OU)(e.map((e=>e.id))),e),this.data}validateKey(e){return"string"==typeof e}};function projectInfoSortByName(e,t){return e.id===t.id?0:isGlobalProject(e)!==isGlobalProject(t)?+isGlobalProject(e)-+isGlobalProject(t):isSharedProject(e)!==isSharedProject(t)?+isSharedProject(e)-+isSharedProject(t):e.name.localeCompare(t.name)}function isGlobalProject(e){return!0===e?.global}function isSharedProject(e){return!0===e?.shared}h=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[d.GraphQLService,r.UserInfoResource,l.ServerConfigResource,n.AppAuthService])],h)},62151:(e,t,i)=>{i.r(t),i.d(t,{ProjectsService:()=>y});var s=i(1118),r=i(94866),n=i(11130),a=i(50966),o=i(63716),c=i(5576),l=i(44017),d=i(29606),u=i(86764),h=i(7278),g=i(85213),p=i(40813),v=i(43974),m=i(40601),S=i(912),f=i(57385),_=i(38387);function activeProjectsContext(){return{activeProjects:[],setActiveProjects(e){this.activeProjects=e}}}var b=i(87283),x=i(10392);let y=class ProjectsService extends o.O{get userProject(){let e;return e=this.userInfoResource.data?this.projectInfoResource.getUserProject(this.userInfoResource.data.userId):this.projectInfoResource.get(n.ANONYMOUS_USER_ID),e}get activeProjects(){let e=[];if(this.activeProjectIds.length>0&&(e=this.projectInfoResource.get((0,h.OU)(this.activeProjectIds)).filter(Boolean)),0===e.length){const t=this.getActiveProjectTask.execute().getContext(activeProjectsContext);t.activeProjects.length>0&&(e=t.activeProjects)}return 0===e.length&&(e=[...this.projectInfoResource.values]),e}get defaultProject(){let e=this.userProject;return(!e||this.activeProjectIds.length>0)&&this.activeProjects.length>0&&(e=this.activeProjects[0]),e}get activeProjectIds(){return this.serverConfigResource.distributed?this.userProjectsSettings.activeProjectIds:[]}get userProjectsSettings(){return this.userDataService.getUserData("projects-settings",(()=>({activeProjectIds:[]})),(e=>Array.isArray(e.activeProjectIds)))}constructor(e,t,i,s,n,a,o){super(),this.serverConfigResource=e,this.projectInfoResource=t,this.userInfoResource=i,this.userDataService=s,this.projectInfoEventHandler=n,this.dataSynchronizationService=a,this.getActiveProjectTask=new l.H,this.onActiveProjectChange=new d.Q,this.onActiveProjectChange.before(o.navigationTask),this.userInfoResource.onUserChange.addHandler((()=>{this.onActiveProjectChange.execute({type:"after",projects:this.activeProjectIds})})),this.projectInfoResource.onDataUpdate.addHandler((()=>{this.onActiveProjectChange.execute({type:"after",projects:this.activeProjectIds})})),this.onActiveProjectChange.addHandler((e=>{"after"===e.type&&this.projectInfoEventHandler.setActiveProjects(this.activeProjects.map((e=>e.id)))})),this.projectInfoEventHandler.onInit.addHandler((()=>{this.projectInfoEventHandler.setActiveProjects(this.activeProjects.map((e=>e.id)))})),this.projectInfoResource.onItemDelete.addHandler((async e=>{const t=g.F.toArray(e);t.some((e=>this.activeProjectIds.includes(e)))&&await this.setActiveProjects(this.activeProjects.filter((e=>!t.includes(e.id))))})),this.projectInfoEventHandler.onEvent(v.OYz.CbRmProjectAdded,(()=>{this.projectInfoResource.markOutdated()}),void 0,this.projectInfoResource),this.projectInfoEventHandler.onEvent(v.OYz.CbRmProjectRemoved,(e=>{if(this.activeProjectIds.includes(e.projectId)){const t=this.projectInfoResource.get(e.projectId);this.dataSynchronizationService.requestSynchronization("project",t?.name??"").then((t=>{t&&this.projectInfoResource.delete(e.projectId)}))}else this.projectInfoResource.delete(e.projectId)}),void 0,this.projectInfoResource),(0,r.Gn)(this,{userProject:r.EW,defaultProject:r.EW,activeProjects:(0,r.EW)({equals:_.x})})}async setActiveProjects(e){const t=e.map((e=>e.id));if((0,_.x)(t,this.userProjectsSettings.activeProjectIds))return!0;const i=await this.onActiveProjectChange.execute({type:"before",projects:t});return!u.a.isInterrupted(i)&&(this.userProjectsSettings.activeProjectIds=t,this.projectInfoResource.markOutdated((0,h.OU)(t)),await this.onActiveProjectChange.execute({type:"after",projects:t}),!0)}async load(){await this.projectInfoResource.load(p.fZ)}};y=(0,s.Cg)([(0,c._)(),(0,s.Sn)("design:paramtypes",[m.ServerConfigResource,x.ProjectInfoResource,n.UserInfoResource,a.UserDataService,b.ProjectInfoEventHandler,S.DataSynchronizationService,f.NavigationService])],y)},38396:(e,t,i)=>{i.d(t,{V:()=>isProjectProvider,r:()=>projectProvider});var s=i(88381);const r=Symbol("@extension/ProjectProvider");function projectProvider(e){return(0,s.w)(e,r)}function isProjectProvider(e){return(0,s.o)(e,r)}},80006:(e,t,i)=>{i.d(t,{F:()=>projectSetter,N:()=>isProjectSetter});var s=i(88381);const r=Symbol("@extension/ProjectSetter");function projectSetter(e){return(0,s.w)(e,r)}function isProjectSetter(e){return(0,s.o)(e,r)}},4257:(e,t,i)=>{i.d(t,{O:()=>projectSetterState,m:()=>isProjectSetterState});var s=i(88381);const r=Symbol("@extension/ProjectSetterState");function projectSetterState(e){return(0,s.w)(e,r)}function isProjectSetterState(e){return(0,s.o)(e,r)}},17069:(e,t,i)=>{function isResourceOfType(e,t){return e.fileExtensions.some((e=>t.toLowerCase().endsWith(`.${e.toLowerCase()}`)))}i.d(t,{c:()=>isResourceOfType})},45941:(e,t,i)=>{i.d(t,{x1:()=>y,FJ:()=>CachedTreeResource});var s=i(94866),r=i(44017),n=i(58158),a=i(43759),o=i(29816),c=i(7278),l=i(94652),d=i(85213),u=i(59811),h=i(57985),g=i(21524);var p=i(81374),v=i(45934);function getTreeValue(e,t,i){if(!t)return e;const s=(0,p.u)(t);let r=e,n="";for(let e=0;e<s.length;++e){const t=s[e];n=(0,v.A)(n,t);let a=r.children[t];if(void 0===a){if(!i)return;a=i(n),a.parent=r,r.children[t]=a,a=r.children[t]}r=a}return r}class CachedTreeMetadata extends g.k{constructor(e,t,i,s,r){super(e,t,i,s),this.getDefaultMetadata=t,this.getTree=r}values(){return(0,u.R)(this.metadata.values(),function*getAllMetadata(e){const t=[e];for(;t.length;){const e=t.shift();yield e.metadata,t.push(...Object.values(e.children).filter(Boolean))}}(this.getTree()))}has(e){return(0,h.l)(e)?super.has(e):(0,c._e)(e)?e.every((e=>this.dataHasMetadata(e))):this.dataHasMetadata(e)}get(e){return(0,h.l)(e)?super.get(e):(0,c._e)(e)?e.map((e=>this.dataGetMetadata(e))):this.dataGetMetadata(e)}delete(e){if((0,h.l)(e))return super.delete(e);d.F.forEach(e,(e=>{const t=getTreeValue(this.getTree(),e);t&&(t.metadata=this.getDefaultMetadata(e,this.metadata))}))}createNode(e){return function createTreeNode(e,t){return{key:e,children:{},metadata:t}}(e,this.getDefaultMetadata(e,this.metadata))}dataGetMetadata(e){return getTreeValue(this.getTree(),e,this.createNode.bind(this)).metadata}dataHasMetadata(e){return void 0!==getTreeValue(this.getTree(),e)}}var m=i(35721),S=i(99294),f=i(15589),_=i(58872);class CachedTreeUseTracker extends _.S{constructor(e,t,i){super(e,t,i),this.metadata=i}use(e,t=(0,m.u)()){const i=(0,c.OU)((0,S.C)(d.F.toList(this.aliases.transformToKey(e)).map(f.j)));return this.metadata.update(i,(e=>{e.dependencies.push(t)})),super.use(e,t)}free(e,t){const i=(0,c.OU)((0,S.C)(d.F.toList(this.aliases.transformToKey(e)).map(f.j)));this.metadata.update(i,(e=>{e.dependencies.length>0&&(e.dependencies=e.dependencies.filter((e=>e!==t)))})),super.free(e,t)}}const b=(0,o.sH)("@cached-tree-resource/root-value"),x=(0,l.El)("@cached-tree-resource/root-children"),y=(0,l.g_)("@cached-tree-resource/children",(e=>({path:e}))),j=(0,l.g_)("@cached-tree-resource/parents",(e=>({path:e})));class CachedTreeResource extends a.$S{constructor(e,t){super(x,e||(()=>({children:{},metadata:{dependencies:[],exception:null,includes:[],loaded:!1,loading:!1,outdated:!1}})),t),this.metadata=new CachedTreeMetadata(this.aliases,this.getDefaultMetadata.bind(this),this.isKeyEqual.bind(this),this.getKeyRef.bind(this),(()=>this.data)),this.useTracker=new CachedTreeUseTracker(this.logger,this.aliases,this.metadata),this.onMove=new r.H,this.onItemUpdate=new r.H(null),this.onItemDelete=new r.H(null),this.aliases.add(b,(()=>"")),this.aliases.add(x,(()=>(0,c.OU)(this.dataGetKeyChildren("")))),this.aliases.add(y,(e=>(0,c.OU)(this.dataGetKeyChildren(e.options.path)))),this.aliases.add(j,(e=>(0,c.OU)(this.dataGetKeyParents(e.options.path)))),(0,s.Gn)(this,{set:s.XI,delete:s.XI,dataSet:s.XI,dataDelete:s.XI})}deleteInResource(e,t){return this.onItemDelete.addHandler((i=>{try{this.logger.group(`outdate - ${e.logger.getName()}`),t&&(i=t(i)),e.delete(i)}finally{this.logger.groupEnd()}})),this}has(e){return!(this.aliases.isAlias(e)&&(!this.metadata.has(e)||this.isLoaded(e)))&&(e=this.aliases.transformToKey(e),d.F.every(e,(e=>this.dataHas(this.getKeyRef(e)))))}get(e){return e=this.aliases.transformToKey(e),d.F.map(e,(e=>this.dataGetValue(this.getKeyRef(e))))}getParentsId(e){return this.dataGetKeyParents(e)}set(e,t){if(this.aliases.isAlias(e,y)||this.aliases.isAlias(e,x))throw new Error("Children can't be set with alias");const i=this.aliases.transformToKey(e);if((0,c._e)(i)){if(0===i.length)return;for(let e=0;e<i.length;e++)this.dataSet(this.getKeyRef(i[e]),t[e])}else this.dataSet(this.getKeyRef(i),t);this.markUpdated(i),this.markLoaded(i),this.cleanError(i);const s=d.F.mapArray(i,n.U);this.onItemUpdate.execute(d.F.join(...s,i))}moveSync(e,t,i){return this.set(t,i),this.onMove.execute({from:e,to:t}),this.delete(e),this.get(t)}delete(e){const t=this.aliases.transformToKey(e);(0,c._e)(t)&&0===t.length||(this.onItemUpdate.execute(d.F.mapKey(t,n.U)),this.onItemDelete.execute(t),d.F.forEach(t,(e=>{this.dataDelete(this.getKeyRef(e))})),this.metadata.delete(e))}async refresh(e,t){return void 0===e&&(e=x),await this.loadData(e,!0,t),this.get(e)}async load(e,t){return void 0===e&&(e=x),await this.loadData(e,!1,t),this.get(e)}dataHas(e){return void 0!==getTreeValue(this.data,e)?.value}dataGet(e){return getTreeValue(this.data,e)}dataGetValueChildren(e){return Object.values(getTreeValue(this.data,e)?.children||{}).map((e=>e?.value)).filter((e=>void 0!==e))}dataGetKeyChildren(e){return Object.values(getTreeValue(this.data,e)?.children||{}).map((e=>e?.key)).filter((e=>void 0!==e))}dataGetKeyParents(e){return function getTreeParents(e,t,i){const s=[e];if(!t)return s;const r=(0,p.u)(t);let n="";for(let e=0;e<r.length;++e){const t=s[s.length-1];0===e&&s.shift();const a=r[e];n=(0,v.A)(n,a);let o=t.children[a];if(void 0===o){if(!i)return s;o=i(n),o.parent=t,t.children[a]=o,o=t.children[a]}s.push(o)}return s}(this.data,e).map((e=>e.key)).filter((e=>void 0!==e))}dataGetValue(e){return getTreeValue(this.data,e)?.value}dataSet(e,t){const i=getTreeValue(this.data,e,(e=>this.metadata.createNode(e)));i.key=e,i.value=t}dataDelete(e){!function deleteTreeValue(e,t){if(!t)return void(e.children={});const i=(0,p.u)(t);let s=e;for(let e=0;e<i.length-1;++e){const t=i[e],r=s.children[t];if(void 0===r)return;s=r}delete s.children[i[i.length-1]]}(this.data,e)}resetDataToDefault(){this.data=this.metadata.createNode("")}validateKey(e){return"string"==typeof e}}},45274:(e,t,i)=>{i.r(t),i.d(t,{WindowsService:()=>a});var s=i(1118),r=i(5576),n=i(26263);let a=class WindowsService{constructor(){this.windows=new Map}open(e,t,i){const s=this.windows.get(e);if(s)return s.window;const r=(0,n.F)(t);if(r){let t;return this.windows.set(e,{id:e,window:r,promise:new Promise((e=>{t=e})),onClose:()=>{t(),i?.()}}),this.track(),r}return null}close(e){const t=Array.from(this.windows.values()).find((t=>t.window===e));t?.window.close()}async waitWindowsClose(e){const t=Array.from(this.windows.values()).find((t=>t.window===e));await(t?.promise)}track(){this.windows.size>0&&(this.trackWindowClose||(this.trackWindowClose=setInterval((()=>{const e=Array.from(this.windows.values()).filter((e=>e.window.closed));for(const t of e)t.onClose?.(),this.windows.delete(t.id);0===this.windows.size&&(clearInterval(this.trackWindowClose),this.trackWindowClose=void 0)}),100)))}};a=(0,s.Cg)([(0,r._)(),(0,s.Sn)("design:paramtypes",[])],a)},45764:(e,t,i)=>{i.r(t),i.d(t,{AsyncTaskInfoService:()=>u});var s=i(1118),r=i(5576),n=i(98988),a=i(83336),o=i(94866),c=i(44017),l=i(35721),d=i(86718);class AsyncTask{get cancelled(){return this._cancelled}get info(){return this.taskInfo}get pending(){return this.taskInfo?.running||this.updatingAsync||!1}get promise(){return this.innerPromise}constructor(e,t){this.id=(0,l.u)(),this.init=e,this.cancel=t,this._cancelled=!1,this.updatingAsync=!1,this.taskInfo=null,this.initPromise=null,this.onStatusChange=new c.H,this.innerPromise=new Promise(((e,t)=>{this.reject=t,this.resolve=e})),(0,o.Gn)(this,{_cancelled:o.sH,pending:o.EW,taskInfo:o.sH,updatingAsync:o.sH})}async run(){if(this.initPromise)return this.initPromise;this.initPromise=this.updateInfoAsync(this.init),await this.initPromise}async updateInfoAsync(e){if(!this.updatingAsync){this.updatingAsync=!0;try{const t=null===this.info;if(this._cancelled&&t)throw new Error("Task was cancelled");const i=await e(this);this.updateInfo(i),t&&this._cancelled&&await this.cancelTask()}finally{this.updatingAsync=!1}}}async cancelAsync(){if(!this._cancelled){if(!this.pending)throw new Error("Can't cancel finished task");this._cancelled=!0;try{await this.cancelTask()}catch(e){throw this._cancelled=!1,e}}}updateInfo(e){this.taskInfo=e,e.running||(e.error?this.reject(new d.B(e.error)):this.resolve(e)),this.onStatusChange.execute(this.taskInfo)}async cancelTask(){this.info&&await this.cancel(this.info)}}let u=class AsyncTaskInfoService{constructor(e){this.graphQLService=e,this.tasks=new Map}create(e){const t=new AsyncTask(e,this.cancelTask.bind(this));return this.tasks.set(t.id,t),1===this.tasks.size&&setTimeout((()=>this.update()),1),t}async run(e){return null===e.info&&await e.run(),e.promise}async remove(e){const t=this.tasks.get(e);if(t){if(t.pending)throw new Error("Cant remove unfinished task");this.tasks.delete(e),null!==t.info&&await this.graphQLService.sdk.getAsyncTaskInfo({taskId:t.info.id,removeOnFinish:!0})}}async cancel(e){const t=this.tasks.get(e);await(t?.cancelAsync())}async update(){for(;this.tasks.size>0;){const e=Array.from(this.tasks.values());for(const t of e)this.updateTask(t);await(0,n.S)(250)}}async updateTask(e){try{e.pending&&e.info&&await e.updateInfoAsync((async e=>{const{taskInfo:t}=await this.graphQLService.sdk.getAsyncTaskInfo({taskId:e.info.id,removeOnFinish:!1});return t}))}catch(e){console.log("Failed to check async task status",e)}}async cancelTask(e){await this.graphQLService.sdk.asyncTaskCancel({taskId:e.id})}};u=(0,s.Cg)([(0,r._)(),(0,s.Sn)("design:paramtypes",[a.GraphQLService])],u)},18408:(e,t,i)=>{i.d(t,{R:()=>GQLErrorCatcher});var s=i(94866),r=i(87518),n=i(44512);class GQLErrorCatcher{constructor(){this.hasDetails=!1,this.responseMessage=null,this.exception=null,(0,s.Gn)(this,{hasDetails:s.sH,responseMessage:s.sH,exception:s.sH,catch:s.XI,clear:s.XI})}catch(e){const t=(0,r.M)(e,n.d);return t?(this.responseMessage=t.message,this.hasDetails=t.hasDetails(),this.exception=t,!0):(this.clear(),!1)}clear(){this.hasDetails=!1,this.responseMessage=null,this.exception=null}}},13804:(e,t,i)=>{function getObjectPropertyType(e){const t=e.dataType?.toLowerCase();return"boolean"===t?"checkbox":e.validValues&&e.validValues.length>0?"selector":e.features.includes("href")?"link":"string"===t&&"MULTILINE"===e.length?"textarea":e.features.includes("file")?"file":"input"}i.d(t,{b:()=>getObjectPropertyType})},12629:(e,t,i)=>{i.d(t,{I:()=>isObjectPropertyInfoStateEqual});var s=i(42891);function isObjectPropertyInfoStateEqual(e,t,i){if(null===t||null===i||"object"!=typeof t||"object"!=typeof i)return!1;const r=[...Object.keys(t),...Object.keys(i)].filter((t=>!e.some((e=>t===e.id))));for(const r of e)if(r.id&&!(0,s.V)(t[r.id],i[r.id],r.defaultValue))return!1;for(const e of r)if(t[e]!==i[e])return!1;return!0}},67850:(e,t,i)=>{i.r(t),i.d(t,{ServerLocalizationService:()=>c});var s=i(1118),r=i(63716),n=i(5576),a=i(34227),o=i(40601);let c=class ServerLocalizationService extends r.O{constructor(e,t){super(),this.serverConfigResource=e,this.localizationService=t,this.serverConfigResource.onDataUpdate.addHandler(this.updateSupportedLocalization.bind(this))}updateSupportedLocalization(){const e=this.serverConfigResource.data?.supportedLanguages;e&&this.localizationService.setSupportedLanguages(e.map((e=>({isoCode:e.isoCode,name:e.displayName??e.isoCode,nativeName:e.nativeName}))))}};c=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[o.ServerConfigResource,a.LocalizationService])],c)},28244:(e,t,i)=>{i.r(t),i.d(t,{SessionLocalizationService:()=>l});var s=i(1118),r=i(63716),n=i(5576),a=i(34227),o=i(77220),c=i(49478);let l=class SessionLocalizationService extends r.O{constructor(e,t,i){super(),this.sessionResource=e,this.localizationService=t,this.settingsLocalizationService=i,this.sessionResource.onDataUpdate.addHandler(this.syncLanguage.bind(this)),this.settingsLocalizationService.settingsProvider.onChange.addHandler((e=>{"core.localization.language"===e.key&&this.sessionResource.changeLanguage(e.value).catch((e=>{console.error(e)}))}))}async syncLanguage(){const e=this.sessionResource.data;e&&await this.localizationService.changeLocale(e.locale)}};l=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[o.SessionResource,a.LocalizationService,c.SettingsLocalizationService])],l)},41388:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(52537)]).then(i.bind(i,32160))).default;case"it":return(await Promise.all([i.e(32756),i.e(19680)]).then(i.bind(i,95216))).default;case"zh":return(await Promise.all([i.e(52041),i.e(97299)]).then(i.bind(i,51))).default;case"fr":return(await Promise.all([i.e(29671),i.e(85394)]).then(i.bind(i,80481))).default;case"de":return(await Promise.all([i.e(57698),i.e(63013)]).then(i.bind(i,14906))).default;default:return(await Promise.all([i.e(41114),i.e(30156)]).then(i.bind(i,48190))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},59295:(e,t,i)=>{i.r(t),i.d(t,{LocalizationSettingsManagerService:()=>u});var s=i(1118),r=i(82103),n=i(5576),a=i(34227),o=i(78207),c=i(83625),l=i(80625),d=i(49478);let u=class LocalizationSettingsManagerService extends r.j{constructor(e,t,i){super(),this.localizationService=e,this.settingsLocalizationService=t,this.settingsManagerService=i}register(){this.registerSettings()}registerSettings(){this.settingsManagerService.registerSettings(this.settingsLocalizationService.settingsProvider,(()=>[{group:o.c,key:"core.localization.language",access:{scope:["server","client"]},name:"core_settings_localization_settings_locale_label",description:"core_settings_localization_settings_locale_description",type:c.E.Select,options:this.localizationService.supportedLanguages.map((e=>({value:e.isoCode,name:e.nativeName??e.name})))}]))}};u=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService,d.SettingsLocalizationService,l.SettingsManagerService])],u)},26779:(e,t,i)=>{i.r(t),i.d(t,{SettingsLocalizationBootstrap:()=>l});var s=i(1118),r=i(94866),n=i(82103),a=i(5576),o=i(34227),c=i(49478);let l=class SettingsLocalizationBootstrap extends n.j{constructor(e,t){super(),this.settingsLocalizationService=e,this.localizationService=t,this.reactionDisposer=null,this.changeLanguage=this.changeLanguage.bind(this)}register(){this.localizationService.onChange.addHandler(this.changeLanguage),this.reactionDisposer=(0,r.mJ)((()=>this.settingsLocalizationService.language),(e=>{this.localizationService.setLanguage(e)}),{fireImmediately:!0})}dispose(){this.localizationService.onChange.removeHandler(this.changeLanguage),this.reactionDisposer&&this.reactionDisposer()}async changeLanguage(e){await this.settingsLocalizationService.changeLanguage(e)}};l=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[c.SettingsLocalizationService,o.LocalizationService])],l)},49478:(e,t,i)=>{i.r(t),i.d(t,{SettingsLocalizationService:()=>p});var s=i(1118),r=i(94866),n=i(63716),a=i(5576),o=i(51739),c=i(76761),l=i(70446),d=i(83916),u=i(82607),h=i(3065);const g=h.Ik({"core.localization.language":h.Yj().default(o.X.isoCode)});let p=class SettingsLocalizationService extends n.O{get language(){return this.settingsProvider.getValue("core.localization.language")}constructor(e,t){super(),this.settingsProviderService=e,this.settingsResolverService=t,this.settingsProvider=this.settingsProviderService.createSettings(g),this.settingsResolverService.addResolver(c.T,(0,l.q)(this.settingsResolverService,this.settingsProvider,{"core.localization.language":"core.user.defaultLanguage"}),(0,l.q)(this.settingsResolverService,this.settingsProvider,{"core.localization.language":"core.localization.defaultLanguage"}),(0,l.q)(this.settingsResolverService,this.settingsProvider,{"core.localization.language":"app.defaultLanguage"})),(0,r.Gn)(this,{language:r.EW})}async changeLanguage(e){this.settingsProvider.setValue("core.localization.language",e),await this.settingsProvider.save()}};p=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[d.SettingsProviderService,u.SettingsResolverService])],p)},31826:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(86430)]).then(i.bind(i,25590))).default;case"it":return(await Promise.all([i.e(32756),i.e(48334)]).then(i.bind(i,84418))).default;case"zh":return(await Promise.all([i.e(52041),i.e(25953)]).then(i.bind(i,55033))).default;case"fr":return(await Promise.all([i.e(29671),i.e(93096)]).then(i.bind(i,10963))).default;default:return(await Promise.all([i.e(41114),i.e(70715)]).then(i.bind(i,52492))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},74055:(e,t,i)=>{i.r(t),i.d(t,{SettingsUserBootstrap:()=>l});var s=i(1118),r=i(82103),n=i(5576),a=i(60676),o=i(82607),c=i(80054);let l=class SettingsUserBootstrap extends r.j{constructor(e,t){super(),this.settingsResolverService=e,this.userSettingsService=t}register(){this.settingsResolverService.addResolver(a.j,this.userSettingsService)}};l=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[o.SettingsResolverService,c.UserSettingsService])],l)},80054:(e,t,i)=>{i.r(t),i.d(t,{UserSettingsService:()=>d});var s=i(1118),r=i(94866),n=i(11130),a=i(5576),o=i(42463),c=i(1513),l=i(23448);let d=class UserSettingsService extends o.z{constructor(e,t){super(),this.userInfoResource=e,this.storageService=t,this.lastConfig=null,this.settings=new Map,this.localSettings=new Map,this.userInfoResource.onDataUpdate.addHandler(this.refreshConfig.bind(this)),this.userInfoResource.onUserChange.addHandler(this.refreshConfig.bind(this)),(0,r.Gn)(this,{settings:r.sH.shallow,localSettings:r.sH}),this.storageService.registerSettings("user_settings",this.localSettings,(()=>new Map),void 0,(()=>this.refreshConfig()))}has(e){return this.getSource().has(e)||super.has(e)}isReadOnly(e){return!1}getValue(e){return this.getSource().get(e)}clear(){this.update((()=>{super.clear(),this.settings.clear()}))}async save(){this.userInfoResource.data?await this.userInfoResource.updatePreferences(Object.fromEntries(this.changes)):this.update((()=>{this.changes.forEach(((e,t)=>{this.localSettings.set(t,e)})),this.changes.clear()}))}resetChanges(){super.clear()}restoreDefaults(){this.resetChanges();for(const e of this.getSource().keys())this.setValue(e,null)}getSnapshot(){return Object.fromEntries(this.getSource())}refreshConfig(){this.update((()=>{if(!this.userInfoResource.data)return this.clear(),void(this.lastConfig=null);if(this.userInfoResource.data.configurationParameters!==this.lastConfig&&(this.clear(),this.localSettings.clear(),this.lastConfig=this.userInfoResource.data.configurationParameters,this.lastConfig&&"object"==typeof this.lastConfig))for(const[e,t]of Object.entries(this.lastConfig))(0,l.kZ)(t)?console.warn(`User settings value is null for key: ${e}. Setting will be ignored.`):(this.settings.set(e,t),this.localSettings.set(e,t))}))}getSource(){return this.userInfoResource.data?this.settings:this.localSettings}};d=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[n.UserInfoResource,c.StorageService])],d)},5882:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(61692)]).then(i.bind(i,80910))).default;case"it":return(await Promise.all([i.e(32756),i.e(94549)]).then(i.bind(i,63850))).default;case"zh":return(await Promise.all([i.e(52041),i.e(16930)]).then(i.bind(i,29585))).default;case"fr":return(await Promise.all([i.e(29671),i.e(28835)]).then(i.bind(i,22443))).default;default:return(await Promise.all([i.e(41114),i.e(51216)]).then(i.bind(i,51732))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},83625:(e,t,i)=>{var s;i.d(t,{E:()=>s}),function(e){e[e.Checkbox=0]="Checkbox",e[e.Select=1]="Select",e[e.Textarea=2]="Textarea",e[e.Input=3]="Input"}(s||(s={}))},78207:(e,t,i)=>{i.d(t,{c:()=>s});const s=i(93424).P.createSubGroup("core_plugin_interface_settings_group")},93424:(e,t,i)=>{i.d(t,{P:()=>n});var s=i(94866),r=i(35721);class SettingsGroup{get level(){return(this.parent?.level??-1)+1}get subGroups(){return this.subGroupsData}constructor(e,t){this.name=e,this.parent=t,this.id=(0,r.u)(),this.subGroupsData=[],this.groups=t?.groups||new Map,this.groups.set(this.id,this),(0,s.Gn)(this,{subGroupsData:s.sH.shallow,groups:s.sH.shallow})}has(e){return this.groups.has(e)}get(e){return this.groups.get(e)}createSubGroup(e){const t=new SettingsGroup(e,this);return this.subGroupsData.push(t),t}deleteSubGroup(e){const t=this.subGroupsData.findIndex((t=>t.id===e));return-1!==t&&(this.subGroupsData.splice(t,1),this.groups.delete(e),!0)}}const n=new SettingsGroup("core_plugin_root_settings_group")},42463:(e,t,i)=>{i.d(t,{z:()=>SettingsSource});var s=i(94866),r=i(44017),n=i(9724);class SettingsSource{constructor(){this.onChange=new r.H,this.updating=!1,this.changes=new Map,(0,s.Gn)(this,{changes:s.sH.shallow,update:s.XI})}has(e){return this.changes.has(e)}isEdited(e){return(0,n.K)(e)?this.changes.has(e):this.changes.size>0}clear(){this.changes.clear()}getEditedValue(e){return this.changes.has(e)?this.changes.get(e):this.getValue(e)}setValue(e,t){const i=this.getValue(e);i===t||!(0,n.K)(i)&&null===t?this.changes.delete(e):this.changes.set(e,t)}update(e){if(this.updating)e();else{this.updating=!0;try{const t=this.getSnapshot();e();const i=this.getSnapshot();for(const[e,s]of Object.entries(i))t[e]!==s&&this.onChange.execute({key:e,value:s});for(const e of Object.keys(t))e in i||this.onChange.execute({key:e,value:void 0})}finally{this.updating=!1}}}}},1513:(e,t,i)=>{i.r(t),i.d(t,{StorageService:()=>a});var s=i(1118),r=i(65486),n=i(5576);let a=class StorageService{constructor(e){this.localStorageSaveService=e,this.onStorageChange=this.localStorageSaveService.onStorageChange}registerSettings(e,t,i,s,r,n){this.localStorageSaveService.withAutoSave(e,t,i,s,r,n)}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[r.LocalStorageSaveService])],a)},80713:(e,t,i)=>{i.r(t),i.d(t,{TaskManagerService:()=>c});var s=i(1118),r=i(94866),n=i(5576),a=i(44017),o=i(35721);let c=class TaskManagerService{get pendingTasks(){return this.queue.filter((e=>!e.fulfilled))}constructor(){this.queue=[],this.onDataUpdate=new a.H,(0,r.Gn)(this,{queue:r.sH})}register(e){const t=(0,r.sH)({id:(0,o.u)(),fulfilled:!1,exception:void 0,...e},{fulfilled:r.sH.ref,exception:r.sH.ref});t.task.finally((()=>{t.fulfilled=!0})).catch((e=>{t.exception=e})).then((()=>{this.remove(t)})),this.add(t)}add(e){this.queue.push(e),this.onDataUpdate.execute()}remove(e){const t=this.queue.indexOf(e);-1!==t&&(this.queue.splice(t,1),this.onDataUpdate.execute())}};c=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],c)},25353:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(45650)]).then(i.bind(i,58079))).default;case"it":return(await Promise.all([i.e(32756),i.e(23269)]).then(i.bind(i,47839))).default;case"zh":return(await Promise.all([i.e(52041),i.e(888)]).then(i.bind(i,10692))).default;case"fr":return(await Promise.all([i.e(29671),i.e(78507)]).then(i.bind(i,44954))).default;default:return(await Promise.all([i.e(41114),i.e(74918)]).then(i.bind(i,39461))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},72232:(e,t,i)=>{i.r(t),i.d(t,{ThemeSettingsManagementService:()=>u});var s=i(1118),r=i(63716),n=i(5576),a=i(83625),o=i(78207),c=i(80625),l=i(72858),d=i(29641);let u=class ThemeSettingsManagementService extends r.O{constructor(e,t,i){super(),i.registerSettings(e.settings,(()=>[{key:"core.theming.theme",access:{scope:["server","client"]},type:a.E.Select,name:"core_theming_settings_theme_name",description:"core_theming_settings_theme_description",options:t.themes.map((e=>({value:e.id,name:e.name}))),group:o.c}]))}};u=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[d.ThemeSettingsService,l.ThemeService,c.SettingsManagerService])],u)},42351:(e,t,i)=>{i.r(t),i.d(t,{VersionUpdateLocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class VersionUpdateLocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(67811)]).then(i.bind(i,39869))).default;case"it":return(await Promise.all([i.e(32756),i.e(76858)]).then(i.bind(i,37105))).default;case"zh":return(await Promise.all([i.e(52041),i.e(54477)]).then(i.bind(i,68546))).default;case"fr":return(await Promise.all([i.e(29671),i.e(68715)]).then(i.bind(i,57484))).default;default:return(await Promise.all([i.e(41114),i.e(91096)]).then(i.bind(i,62363))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},61056:(e,t,i)=>{i.r(t),i.d(t,{VersionUpdateService:()=>c});var s=i(1118),r=i(94866),n=i(5576),a=i(58675),o=i(13886);let c=class VersionUpdateService{get newVersionAvailable(){return!(!this.versionService.current||!this.versionResource.latest)&&1===this.versionService.compareVersions(this.versionResource.latest.number,this.versionService.current)}constructor(e,t){this.versionService=e,this.versionResource=t,this.generalInstructionsGetter=null,this.versionInstructionGetter=null,(0,r.Gn)(this,{newVersionAvailable:r.EW})}registerVersionInstruction(e){this.versionInstructionGetter=e}registerGeneralInstruction(e){this.generalInstructionsGetter=e}};c=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.VersionService,o.VersionResource])],c)},69109:(e,t,i)=>{i.r(t),i.d(t,{VersionLocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class VersionLocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(33525)]).then(i.bind(i,42289))).default;case"it":return(await Promise.all([i.e(32756),i.e(668)]).then(i.bind(i,67061))).default;case"zh":return(await Promise.all([i.e(52041),i.e(78287)]).then(i.bind(i,90798))).default;case"fr":return(await Promise.all([i.e(29671),i.e(45430)]).then(i.bind(i,27200))).default;case"de":return(await Promise.all([i.e(57698),i.e(23049)]).then(i.bind(i,9563))).default;default:return(await Promise.all([i.e(41114),i.e(90192)]).then(i.bind(i,62772))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},13886:(e,t,i)=>{i.r(t),i.d(t,{VersionResource:()=>l});var s=i(1118),r=i(94866),n=i(5576),a=i(40813),o=i(7278),c=i(40601);let l=class VersionResource extends a.nG{get latest(){return this.values.find((e=>e.number===this.latestVersionNumber))}constructor(e){super(),this.serverConfigResource=e,this.latestVersionNumber=null,this.preloadResource(this.serverConfigResource,(()=>{})),(0,r.Gn)(this,{latestVersionNumber:r.sH.ref,latest:r.EW})}async loader(){const e=this.serverConfigResource.data?.productInfo.latestVersionInfo;if(!e)return this.data;try{const t=await fetch(e,{cache:"no-cache"}),i=await t.json();if(i.latestVersion&&(this.latestVersionNumber=i.latestVersion),!i.versions)return this.data;this.replace((0,o.OU)(i.versions.map((e=>e.number))),i.versions)}catch(e){throw new Error("versions_load_fail",{cause:e})}return this.data}validateKey(e){return"string"==typeof e}};l=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[c.ServerConfigResource])],l)},19559:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(91953)]).then(i.bind(i,11346))).default;case"it":return(await Promise.all([i.e(32756),i.e(59096)]).then(i.bind(i,12009))).default;case"zh":return(await Promise.all([i.e(52041),i.e(36715)]).then(i.bind(i,32042))).default;case"fr":return(await Promise.all([i.e(29671),i.e(24810)]).then(i.bind(i,49364))).default;default:return(await Promise.all([i.e(41114),i.e(2429)]).then(i.bind(i,14131))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},65037:(e,t,i)=>{i.r(t),i.d(t,{PluginBrowserBootstrap:()=>l});var s=i(1118),r=i(17340),n=i(82103),a=i(5576),o=i(14452),c=i(34227);let l=class PluginBrowserBootstrap extends n.j{constructor(e,t,i){super(),this.serviceWorkerService=e,this.notificationService=t,this.localizationService=i,this.notification=null}register(){}};l=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[r.ServiceWorkerService,o.NotificationService,c.LocalizationService])],l)},4115:(e,t,i)=>{i.r(t),i.d(t,{PluginBrowserPreloadingBootstrap:()=>o});var s=i(1118),r=i(17340),n=i(82103);function displayUpdateStatus(e,t){if(void 0!==t){const e=document.querySelector("#app-loading-screen .app-loading-screen__status_message");e&&(e.textContent=t)}const i=document.querySelector("#app-loading-screen .app-loading-screen__status_percent");i&&(i.textContent=(100*e).toFixed(0)+"%")}var a=i(5576);let o=class PluginBrowserPreloadingBootstrap extends n.j{constructor(e){super(),this.serviceWorkerService=e}register(){this.serviceWorkerService.onUpdate.addHandler((({type:e,progress:t})=>{switch(t=t||0,e){case"installing":displayUpdateStatus(t,"Installing...");break;case"updating":displayUpdateStatus(t,"Updating...")}}))}};o=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[r.ServiceWorkerService])],o)},94034:(e,t,i)=>{i.r(t),i.d(t,{CustomConnectionPluginBootstrap:()=>S});var s=i(1118),r=i(50420),n=i(34906),a=i(82103),o=i(5576),c=i(71635),l=i(10392),d=i(40813),u=i(72877),h=i(79023),g=i(13429);const p=(0,i(19102).V)("connection-custom",{label:"plugin_connection_custom_action_custom_label"});var v=i(58287);const m=(0,r.j)((()=>Promise.all([i.e(11502),i.e(7542),i.e(97493),i.e(67557),i.e(70639),i.e(64435),i.e(88273),i.e(11450),i.e(23741),i.e(46355),i.e(95860),i.e(65449)]).then(i.bind(i,61583)).then((e=>e.DriverSelectorDialog))));let S=class CustomConnectionPluginBootstrap extends a.j{constructor(e,t,i,s,r,n){super(),this.commonDialogService=e,this.projectInfoResource=t,this.menuService=i,this.actionService=s,this.connectionsManagerService=r,this.customConnectionSettingsService=n}register(){this.menuService.addCreator({menus:[g.y],getItems:(e,t)=>[...t,p]}),this.actionService.addHandler({id:"connection-custom",actions:[p],isHidden:(e,t)=>0===this.connectionsManagerService.createConnectionProjects.length||t===p&&this.customConnectionSettingsService.disabled,getLoader:(e,t)=>(0,d.pd)(this.projectInfoResource,(()=>d.fZ)),handler:async(e,t)=>{if(t===p)await this.openConnectionsDialog()}})}async openConnectionsDialog(){await this.commonDialogService.open(m,null)}};S=(0,s.Cg)([(0,o._)(),(0,s.Sn)("design:paramtypes",[c.CommonDialogService,l.ProjectInfoResource,u.MenuService,h.ActionService,n.ConnectionsManagerService,v.CustomConnectionSettingsService])],S)},58287:(e,t,i)=>{i.r(t),i.d(t,{CustomConnectionSettingsService:()=>u});var s=i(1118),r=i(63716),n=i(5576),a=i(83916),o=i(80625),c=i(3065),l=i(31038);const d=c.Ik({"plugin.connection-custom.disabled":l.W.stringedBoolean().default(!1)});let u=class CustomConnectionSettingsService extends r.O{get disabled(){return this.settings.getValue("plugin.connection-custom.disabled")}constructor(e,t){super(),this.settingsProviderService=e,this.settingsManagerService=t,this.settings=this.settingsProviderService.createSettings(d),this.registerSettings()}registerSettings(){this.settingsManagerService.registerSettings(this.settings,(()=>[]))}};u=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.SettingsProviderService,o.SettingsManagerService])],u)},61583:(e,t,i)=>{i.r(t),i.d(t,{DriverSelectorDialog:()=>M});var s=i(41773),r=i(7838),n=i(17675),a=i(64928),o=i(84383),c=i(51477),l=i(62204),d=i(92659),u=i(7167),h=i(74749),g=i(10392),p=i(40813),v=i(15993),m=i(35025),S=i(16953),f=i(23089),_=i(10041),b=i(44880),x=i(7994),y=i(60233),j=i(66079);const P={staticImage:"staticImage___RsOb5"},C=(0,r.PA)((function Driver({driver:e,onSelect:t}){const i=(0,v.useCallback)((()=>t(e.id)),[e]),r=(0,a.d)(P);return(0,s.jsxs)(_.c,{onClick:i,children:[(0,s.jsx)(b.L,{children:(0,s.jsx)(x.i,{icon:e.icon,className:(0,u.s)(r,{staticImage:!0})})}),(0,s.jsx)(y.z,{children:e.name}),(0,s.jsx)(j.U,{title:e.description,children:e.description})]})})),w={wrapper:"wrapper___iLDIA"},I=(0,r.PA)((function DriverSelector({drivers:e,className:t,onSelect:i}){const r=(0,a.d)(w),o=(0,n.W)(),[c]=(0,m.i)({focusFirstChild:!0}),[l,d]=(0,v.useState)(""),h=(0,v.useMemo)((()=>l?e.filter((e=>e.name?.toUpperCase().includes(l.toUpperCase()))):e),[l,e]);return(0,s.jsxs)("div",{ref:c,className:(0,u.s)(r,{wrapper:!0}),children:[(0,s.jsx)(S.o,{placeholder:o("connections_driver_search_placeholder"),onChange:d}),(0,s.jsx)(f.k,{className:t,children:h.map((e=>(0,s.jsx)(C,{driver:e,onSelect:i},e.id)))})]})})),D={driverSelector:"driverSelector___bO2p0"};var R=i(94866),k=i(28347),E=i(34906),L=i(18699),A=i(14452),N=i(66291);const M=(0,r.PA)((function DriverSelectorDialog({rejectDialog:e}){const t=(0,n.W)(),i=(0,a.d)(D);(0,o.q)(DriverSelectorDialog,g.ProjectInfoResource,p.fZ,{forceSuspense:!0});const r=(0,o.q)(DriverSelectorDialog,h.DBDriverResource,p.fZ).resource.enabledDrivers,v=function useDriverSelectorDialog(e,t){const i=(0,L.h)(A.NotificationService),s=(0,L.h)(E.ConnectionsManagerService),r=(0,L.h)(N.PublicConnectionFormService);return(0,k.G)((()=>({async select(e){const i=this.connectionsManagerService.createConnectionProjects;0!==i.length?await this.publicConnectionFormService.open(i[0].id,{driverId:e},this.drivers)&&t?.():this.notificationService.logError({title:"core_projects_no_default_project"})}})),{select:R.XI.bound},{drivers:e,notificationService:i,connectionsManagerService:s,publicConnectionFormService:r})}(r.map((e=>e.id)),e);return(0,s.jsxs)(c.n,{size:"large",autofocus:!1,fixedSize:!0,children:[(0,s.jsx)(l.D,{title:t("basicConnection_connectionDialog_newConnection")}),(0,s.jsx)(d.a,{noBodyPadding:!0,noOverflow:!0,children:(0,s.jsx)(I,{className:(0,u.s)(i,{driverSelector:!0}),drivers:r,onSelect:v.select})})]})}))},15263:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(45401)]).then(i.bind(i,38765))).default;case"it":return(await Promise.all([i.e(32756),i.e(12544)]).then(i.bind(i,84961))).default;case"zh":return(await Promise.all([i.e(52041),i.e(90163)]).then(i.bind(i,98642))).default;case"fr":return(await Promise.all([i.e(29671),i.e(99210)]).then(i.bind(i,5884))).default;default:return(await Promise.all([i.e(41114),i.e(76829)]).then(i.bind(i,74251))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},94099:(e,t,i)=>{i.r(t),i.d(t,{ConnectionSearchSettingsService:()=>u});var s=i(1118),r=i(63716),n=i(5576),a=i(83916),o=i(80625),c=i(3065),l=i(31038);const d=c.Ik({"plugin.connection-search.disabled":l.W.stringedBoolean().default(!1)});let u=class ConnectionSearchSettingsService extends r.O{get disabled(){return this.settings.getValue("plugin.connection-search.disabled")}constructor(e,t){super(),this.settingsProviderService=e,this.settingsManagerService=t,this.settings=this.settingsProviderService.createSettings(d),this.registerSettings()}registerSettings(){this.settingsManagerService.registerSettings(this.settings,(()=>[]))}};u=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.SettingsProviderService,o.SettingsManagerService])],u)},95078:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(75925)]).then(i.bind(i,79050))).default;case"it":return(await Promise.all([i.e(32756),i.e(98306)]).then(i.bind(i,5110))).default;case"zh":return(await Promise.all([i.e(52041),i.e(20687)]).then(i.bind(i,40917))).default;case"fr":return(await Promise.all([i.e(29671),i.e(43068)]).then(i.bind(i,87703))).default;default:return(await Promise.all([i.e(41114),i.e(86401)]).then(i.bind(i,73896))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},22546:(e,t,i)=>{i.r(t),i.d(t,{ConnectionSearchService:()=>W});var s=i(1118),r=i(94866),n=i(26533),a=i(49690),o=i(34906),c=i(5576),l=i(71635),d=i(14452),u=i(86764),h=i(62151),g=i(10392),p=i(86411),v=i(77583),m=i(22799),S=i(41773),f=i(7838),_=i(64928),b=i(84383),x=i(69519),y=i(7167),j=i(74749),P=i(18699),C=i(40813),w=i(27411),I=i(15993),D=i(35025),R=i(17675),k=i(84972),E=i(16953),L=i(23089),A=i(14249),N=i(10041),M=i(44880),T=i(7994),z=i(60233);const B={listItemIcon:"listItemIcon___IEZnL",staticImage:"staticImage___ktUh1 theme-background-surface theme-border-color-surface"},G=(0,f.PA)((function Database({database:e,onSelect:t}){const i=(0,_.d)(B),s=(0,P.h)(j.DBDriverResource),r=(0,I.useCallback)((()=>t(e)),[e]),n=(0,I.useMemo)((()=>e.possibleDrivers.slice().sort(((t,i)=>t===e.defaultDriver?1:i===e.defaultDriver?-1:t.localeCompare(i)))),[e]),a=e.host+":"+e.port,o=e.displayName!==e.host?e.displayName+" ("+a+")":a;return(0,S.jsxs)(N.c,{onClick:r,children:[(0,S.jsx)(M.L,{className:(0,y.s)(i,{listItemIcon:!0}),children:n.map((e=>(0,S.jsx)(T.i,{className:(0,y.s)(i,{staticImage:!0}),icon:s.get(e)?.icon},e)))}),(0,S.jsx)(z.z,{children:o})]})})),H={form:"form___honrI theme-background-surface theme-text-on-surface"},V=(0,f.PA)((function DatabaseList({databases:e,hosts:t,disabled:i,className:s,onSelect:r,onChange:n,onSearch:a}){const o=(0,_.d)(H),[c]=(0,D.i)({focusFirstChild:!0}),l=(0,R.W)(),[d,u]=(0,I.useState)(!1),h=(0,I.useCallback)((()=>{a&&a().then((()=>{u(!0)}))}),[a]),g=d?"connections_not_found":"connections_administration_search_database_tip";return(0,S.jsxs)(k.l,{ref:c,className:(0,y.s)(o,{form:!0},s),onSubmit:a,children:[(0,S.jsx)(E.o,{value:t,placeholder:l("connections_administration_search_database_tip"),disabled:i,onChange:n,onSearch:h}),(0,S.jsx)(L.k,{children:e.map((e=>(0,S.jsx)(G,{database:e,onSelect:r},e.host+e.port)))}),!e.length&&(0,S.jsx)(A.x,{children:l(g)})]})})),U={loader:"loader___LpEmT"},O=(0,f.PA)((function SearchDatabase(){const e=(0,_.d)(U),t=(0,P.h)(W);return(0,b.q)(SearchDatabase,g.ProjectInfoResource,C.fZ),(0,b.q)(SearchDatabase,j.DBDriverResource,C.fZ),t.formState?(0,S.jsx)(x.a,{className:(0,y.s)(e,{loader:!0}),suspense:!0,children:(0,S.jsx)(w.Q,{state:t.formState,onSave:()=>t.saveConnection(),onCancel:()=>t.goBack()})}):(0,S.jsx)(V,{databases:t.databases,hosts:t.hosts,disabled:t.disabled,onSelect:function select(e){t.select(e)},onChange:t.change,onSearch:t.search})})),formGetter=()=>O;let W=class ConnectionSearchService{constructor(e,t,i,s,n,a,o,c){this.notificationService=e,this.connectionInfoResource=t,this.connectionFormService=i,this.optionsPanelService=s,this.commonDialogService=n,this.projectsService=a,this.projectInfoResource=o,this.connectionsManagerService=c,this.hosts="localhost",this.disabled=!1,this.formState=null,this.closeHandler=async(e,t)=>{await this.showUnsavedChangesDialog()?(this.clearFormState(),this.close()):u.a.interrupt(t)},this.optionsPanelService.closeTask.addHandler(this.closeHandler),this.databases=[],this.search=this.search.bind(this),this.change=this.change.bind(this),this.select=this.select.bind(this),(0,r.Gn)(this,{hosts:r.sH,databases:r.sH,disabled:r.sH,formState:r.sH.shallow})}open(){this.optionsPanelService.open(formGetter)}close(){this.hosts="localhost",this.databases=[]}async load(){0===this.databases.length&&await this.search()}async search(){if(!this.disabled&&this.hosts&&this.hosts.trim()){this.disabled=!0;try{const e=this.hosts.trim().replace(/[\s,|+-]+/gm," ").split(/[\s,|+-]/);this.databases=await this.connectionInfoResource.searchDatabases(e)}catch(e){this.notificationService.logException(e,"Databases search failed")}finally{this.disabled=!1}}}async showUnsavedChangesDialog(){if(!this.formState||!this.optionsPanelService.isOpen(formGetter)||this.formState.config.connectionId&&null!==this.formState.projectId&&!this.connectionInfoResource.has((0,a.createConnectionParam)(this.formState.projectId,this.formState.config.connectionId)))return!0;const e=await this.formState.checkFormState();if(!e?.edited)return!0;return await this.commonDialogService.open(n.K,{title:"connections_public_connection_edit_cancel_title",message:"connections_public_connection_edit_cancel_message",confirmActionText:"ui_processing_ok"})!==l.DialogueStateResult.Rejected}change(e){this.hosts=e}saveConnection(){this.goBack()}goBack(){this.clearFormState()}select(e){const t=this.connectionsManagerService.createConnectionProjects;0!==t.length?(this.formState||(this.formState=new v.C(this.projectsService,this.projectInfoResource,this.connectionFormService,this.connectionInfoResource),this.formState.closeTask.addHandler(this.goBack.bind(this))),this.formState.setOptions("create","public").setConfig(t[0].id,{...this.connectionInfoResource.getEmptyConfig(),driverId:e.defaultDriver,host:e.host,port:`${e.port}`}).setAvailableDrivers(e.possibleDrivers),this.formState.load()):this.notificationService.logError({title:"core_projects_no_default_project"})}clearFormState(){this.formState?.dispose(),this.formState=null}};W=(0,s.Cg)([(0,c._)(),(0,s.Sn)("design:paramtypes",[d.NotificationService,a.ConnectionInfoResource,m.ConnectionFormService,p.OptionsPanelService,l.CommonDialogService,h.ProjectsService,g.ProjectInfoResource,o.ConnectionsManagerService])],W)},9566:(e,t,i)=>{i.r(t),i.d(t,{SearchConnectionPluginBootstrap:()=>S});var s=i(1118),r=i(34906),n=i(82103),a=i(5576),o=i(10392),c=i(40813),l=i(72755),d=i(68061),u=i(72877),h=i(79023),g=i(13429);const p=(0,i(19102).V)("connection-search",{label:"plugin_connection_search_action_search_label"});var v=i(94099),m=i(22546);let S=class SearchConnectionPluginBootstrap extends n.j{constructor(e,t,i,s,r,n,a){super(),this.permissionsService=e,this.projectInfoResource=t,this.connectionSearchService=i,this.connectionsManagerService=s,this.menuService=r,this.actionService=n,this.connectionSearchSettingsService=a}register(){this.menuService.addCreator({menus:[g.y],getItems:(e,t)=>[...t,p]}),this.actionService.addHandler({id:"connection-search",actions:[p],isHidden:(e,t)=>0===this.connectionsManagerService.createConnectionProjects.length||!this.permissionsService.has(l.y.admin)||t===p&&this.connectionSearchSettingsService.disabled,getLoader:()=>(0,c.pd)(this.projectInfoResource,(()=>c.fZ)),handler:async(e,t)=>{if(t===p)this.connectionSearchService.open()}})}};S=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[d.PermissionsService,o.ProjectInfoResource,m.ConnectionSearchService,r.ConnectionsManagerService,u.MenuService,h.ActionService,v.ConnectionSearchSettingsService])],S)},5443:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(71905)]).then(i.bind(i,83185))).default;case"it":return(await Promise.all([i.e(32756),i.e(94286)]).then(i.bind(i,7957))).default;case"zh":return(await Promise.all([i.e(52041),i.e(6191)]).then(i.bind(i,31694))).default;case"fr":return(await Promise.all([i.e(29671),i.e(28572)]).then(i.bind(i,68096))).default;default:return(await Promise.all([i.e(41114),i.e(14334)]).then(i.bind(i,81287))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},16647:(e,t,i)=>{i.r(t),i.d(t,{TransactionManagerBootstrap:()=>w});var s=i(1118),r=i(26533),n=i(49690),a=i(13225),o=i(30606),c=i(34906),l=i(82103),d=i(5576),u=i(71635),h=i(14452),g=i(86764),p=i(34227),v=i(86411),m=i(9724),S=i(72877),f=i(79023),_=i(18292),b=i(76635),x=i(19102);const y=(0,x.V)("datasource-transaction-commit",{label:"plugin_datasource_transaction_manager_commit",tooltip:"plugin_datasource_transaction_manager_commit",icon:"/icons/commit_m.svg"}),j=(0,x.V)("datasource-transaction-commit-mode-toggle",{label:"plugin_datasource_transaction_manager_commit_mode_switch_to_manual",tooltip:"plugin_datasource_transaction_manager_commit_mode_switch_to_manual",icon:"/icons/commit_mode_auto_m.svg"}),P=(0,x.V)("datasource-transaction-rollback",{label:"plugin_datasource_transaction_manager_rollback",tooltip:"plugin_datasource_transaction_manager_rollback",icon:"/icons/rollback_m.svg"});var C=i(26967);let w=class TransactionManagerBootstrap extends l.j{constructor(e,t,i,s,r,n,a,o,c,l,d,u){super(),this.menuService=e,this.actionService=t,this.connectionSchemaManagerService=i,this.connectionExecutionContextService=s,this.connectionExecutionContextResource=r,this.connectionInfoResource=n,this.connectionsManagerService=a,this.optionsPanelService=o,this.notificationService=c,this.commonDialogService=l,this.localizationService=d,this.transactionManagerSettingsService=u}register(){this.connectionsManagerService.onDisconnect.addHandler(this.disconnectHandler.bind(this)),this.menuService.addCreator({menus:[b._],isApplicable:()=>{const e=this.getContextTransaction();return!this.transactionManagerSettingsService.disabled&&!this.optionsPanelService.active&&!0===this.connectionSchemaManagerService.currentConnection?.connected&&!!e?.context&&(0,m.K)(e.autoCommit)},getItems:(e,t)=>[...t,y,P,j]}),this.actionService.addHandler({id:"commit-mode-base",actions:[y,P,j],isLabelVisible:(e,t)=>t===y||t===P,getActionInfo:(e,t)=>{const i=this.getContextTransaction();if(!i)return t.info;if(t===j){const e=i.autoCommit,s=`/icons/commit_mode_${e?"auto":"manual"}_m.svg`,r="plugin_datasource_transaction_manager_commit_mode_switch_to_"+(e?"manual":"auto");return{...t.info,icon:s,label:r,tooltip:r}}return t.info},isDisabled:()=>{const e=this.getContextTransaction();return!0===e?.executing},isHidden:(e,t)=>{const i=this.getContextTransaction();return!i||(t===y||t===P)&&!0===i.autoCommit},handler:async(e,t)=>{const i=this.getContextTransaction();if(i)switch(t){case y:await this.commit(i);break;case P:try{const e=await i.rollback();this.showTransactionResult(i,e)}catch(e){this.notificationService.logException(e,"plugin_datasource_transaction_manager_rollback_fail")}break;case j:try{await i.setAutoCommit(!i.autoCommit),await this.connectionExecutionContextResource.refresh()}catch(e){this.notificationService.logException(e,"plugin_datasource_transaction_manager_commit_mode_fail")}}}})}showTransactionResult(e,t){if(!e.context)return;const i=(0,n.createConnectionParam)(e.context.projectId,e.context.connectionId),s=this.connectionInfoResource.get(i),r="string"==typeof t.result?t.result:"";this.notificationService.logInfo({title:s?.name??t.name??"",message:r})}getContextTransaction(){const e=this.connectionSchemaManagerService.activeExecutionContext;if(e)return this.connectionExecutionContextService.get(e.id)}async disconnectHandler(e,t){if("before"===e.state)for(const i of e.connections){const e=this.connectionExecutionContextResource.values.find((e=>(0,n.isConnectionInfoParamEqual)(e,i)));if(e){const s=this.connectionExecutionContextService.get(e.id);if(!1===s?.autoCommit){const n=this.connectionInfoResource.get(i),a=await this.commonDialogService.open(r.K,{title:`${this.localizationService.translate("plugin_datasource_transaction_manager_commit")} (${n?.name??e.id})`,message:"plugin_datasource_transaction_manager_commit_confirmation_message",confirmActionText:"plugin_datasource_transaction_manager_commit",extraStatus:"no"});a===u.DialogueStateResult.Resolved?await this.commit(s,(()=>g.a.interrupt(t))):a===u.DialogueStateResult.Rejected&&g.a.interrupt(t)}}}}async commit(e,t){try{const t=await e.commit();this.showTransactionResult(e,t)}catch(e){this.notificationService.logException(e,"plugin_datasource_transaction_manager_commit_fail"),t?.(e)}}};w=(0,s.Cg)([(0,d._)(),(0,s.Sn)("design:paramtypes",[S.MenuService,f.ActionService,_.ConnectionSchemaManagerService,a.ConnectionExecutionContextService,o.ConnectionExecutionContextResource,n.ConnectionInfoResource,c.ConnectionsManagerService,v.OptionsPanelService,h.NotificationService,u.CommonDialogService,p.LocalizationService,C.TransactionManagerSettingsService])],w)},26967:(e,t,i)=>{i.r(t),i.d(t,{TransactionManagerSettingsService:()=>d});var s=i(1118),r=i(63716),n=i(5576),a=i(83916),o=i(3065),c=i(31038);const l=o.Ik({"plugin.datasource-transaction-manager.disabled":c.W.stringedBoolean().default(!1)});let d=class TransactionManagerSettingsService extends r.O{get disabled(){return this.settings.getValue("plugin.datasource-transaction-manager.disabled")}constructor(e){super(),this.settingsProviderService=e,this.settings=this.settingsProviderService.createSettings(l)}};d=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.SettingsProviderService])],d)},89707:(e,t,i)=>{i.d(t,{A:()=>s});const s=(0,i(44745).M)("ddl-node")},51866:(e,t,i)=>{i.d(t,{R:()=>s});const s=(0,i(44745).M)("ddl-value")},60496:(e,t,i)=>{i.r(t),i.d(t,{DDLViewerFooterService:()=>f});var s=i(1118),r=i(49690),n=i(5576),a=i(64809),o=i(36221),c=i(19617),l=i(26160),d=i(79023),u=i(72877),h=i(90620),g=i(32561),p=i(41692),v=i(89707),m=i(51866),S=i(12423);let f=class DDLViewerFooterService{constructor(e,t,i,s,r){this.navNodeManagerService=e,this.actionsService=t,this.menuService=i,this.sqlEditorNavigatorService=s,this.connectionInfoResource=r}register(){this.actionsService.addHandler({id:"ddl-viewer-footer-base-handler",menus:[S.C],contexts:[v.A,m.R],actions:[l.t,g.X],handler:async(e,t)=>{switch(t){case l.t:{const t=e.get(m.R),i=e.get(v.A),s=new Blob([t],{type:"application/sql"}),r=i?this.navNodeManagerService.getNode(i):void 0,n=r?.name?`DDL_${r.nodeType?r.nodeType+"_":""}${r.name}`:"DDL";(0,o.R)(s,`${(0,c.h)(n)}.sql`);break}case g.X:{const t=e.get(m.R),i=e.get(v.A),s=this.connectionInfoResource.getConnectionForNode(i),n=this.navNodeManagerService.getNodeContainerInfo(i),a=this.navNodeManagerService.getNode(i),o=[];n.schemaId&&o.push(n.schemaId),a?.name&&a.name!==n.schemaId&&o.push(a.name);const c=`${s?.name?"<"+s.name+"> ":""}DDL${o.length?" of <"+o.join(".")+">":""}`;await this.sqlEditorNavigatorService.openNewEditor({name:c,dataSourceKey:h.w.key,connectionKey:s&&(0,r.createConnectionParam)(s),catalogId:n.catalogId,schemaId:n.schemaId,query:t});break}}},getActionInfo:(e,t)=>t===g.X?{...t.info,icon:"/icons/sql_script_m.svg"}:t.info}),this.menuService.addCreator({menus:[S.C],getItems:(e,t)=>[...t,l.t,g.X]})}};f=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.NavNodeManagerService,d.ActionService,u.MenuService,p.SqlEditorNavigatorService,r.ConnectionInfoResource])],f)},79669:(e,t,i)=>{i.r(t),i.d(t,{DDLViewerTab:()=>l});var s=i(41773),r=i(7838),n=i(43659),a=i(48522),o=i(19259),c=i(21712);const l=(0,r.PA)((function DDLViewerTab({folderId:e}){const t=e.startsWith(c.Q)?"DDL":"Body";return(0,s.jsxs)(n.o,{tabId:e,title:t,children:[(0,s.jsx)(a.$,{icon:"/icons/DDL.svg"}),(0,s.jsx)(o.I,{children:t})]})}))},48495:(e,t,i)=>{i.r(t),i.d(t,{DDLViewerTabPanel:()=>x});var s=i(41773),r=i(7838),n=i(64928),a=i(84383),o=i(7167),c=i(49690),l=i(927),d=i(90398),u=i(21252),h=i(12483),g=i(42453),p=i(49759),v=i(2293),m=i(89707),S=i(51866),f=i(41578),_=i(16359),b=i(12423);const x=(0,r.PA)((function DDLViewerTabPanel({nodeId:e,folderId:t}){const i=(0,n.d)(_.A),r=(0,h.b)({menu:b.C}),x=(0,a.q)(DDLViewerTabPanel,f.DdlResource,e),y=(0,a.q)(DDLViewerTabPanel,c.ConnectionInfoResource,c.ConnectionInfoActiveProjectKey).resource.getConnectionForNode(e),j=y?(0,c.createConnectionParam)(y):null,P=(0,a.q)(DDLViewerTabPanel,l.ConnectionDialectResource,j),C=(0,p.n)(P.data),w=(0,g.s)();w.set(...C);const I=x.data;return(0,d.Z)(r.context,((t,i)=>{t.set(m.A,e,i),t.set(S.R,I,i)})),(0,s.jsxs)("div",{className:(0,o.s)(i,{wrapper:!0}),children:[(0,s.jsx)(v.m,{className:(0,o.s)(i,{sqlCodeEditorLoader:!0}),value:x.data??"",extensions:w,readonly:!0}),(0,s.jsx)(u.R,{className:(0,o.s)(i,{menuBar:!0}),menu:r})]})}))},41578:(e,t,i)=>{i.r(t),i.d(t,{DdlResource:()=>d});var s=i(1118),r=i(5576),n=i(30819),a=i(40813),o=i(57985),c=i(85213),l=i(83336);let d=class DdlResource extends a.nG{constructor(e,t){super(),this.graphQLService=e,this.navNodeInfoResource=t,this.navNodeInfoResource.outdateResource(this),this.navNodeInfoResource.deleteInResource(this)}async loader(e){if((0,o.l)(e))throw new Error("Aliases not supported by this resource.");const t=[];return await c.F.forEachAsync(e,(async e=>{const{metadataGetNodeDDL:i}=await this.graphQLService.sdk.metadataGetNodeDDL({nodeId:e});i&&t.push(i)})),this.set(c.F.toList(e),t),this.data}validateKey(e){return"string"==typeof e}};d=(0,s.Cg)([(0,r._)(),(0,s.Sn)("design:paramtypes",[l.GraphQLService,n.NavNodeInfoResource])],d)},12423:(e,t,i)=>{i.d(t,{C:()=>s});const s=(0,i(85240).E)("ddl-viewer-footer","DDL viewer footer menu")},34479:(e,t,i)=>{i.r(t),i.d(t,{DdlViewerBootstrap:()=>m});var s=i(1118),r=i(50420),n=i(82103),a=i(5576),o=i(3942),c=i(30819),l=i(35778),d=i(60496),u=i(21712);const h="object-viewer://extended-ddl",g=(0,r.j)((()=>Promise.all([i.e(97493),i.e(95860),i.e(35412)]).then(i.bind(i,79669)).then((e=>e.DDLViewerTab)))),p=(0,r.j)((()=>Promise.all([i.e(11502),i.e(67557),i.e(89814),i.e(88761),i.e(46696),i.e(11116),i.e(62570),i.e(95860),i.e(57793)]).then(i.bind(i,48495)).then((e=>e.DDLViewerTabPanel)))),v=(0,r.j)((()=>Promise.all([i.e(11502),i.e(67557),i.e(89814),i.e(88761),i.e(46696),i.e(11116),i.e(62570),i.e(95860),i.e(80174)]).then(i.bind(i,89031)).then((e=>e.ExtendedDDLViewerTabPanel))));let m=class DdlViewerBootstrap extends n.j{constructor(e,t,i){super(),this.navNodeViewService=e,this.navNodeInfoResource=t,this.ddlViewerFooterService=i}register(){this.navNodeViewService.addTransform({tab:(e,t)=>{if(t.startsWith(u.Q)||t.startsWith(h))return g},panel:(e,t)=>t.startsWith(u.Q)?p:t.startsWith(h)?v:void 0,transformer:(e,t)=>{const i=this.navNodeInfoResource.get(e),s=[];return i?.objectFeatures.includes(o.v.script)&&s.push(u.Q),i?.objectFeatures.includes(o.v.scriptExtended)&&s.push(h),[...t||[],...s]}}),this.ddlViewerFooterService.register()}load(){}};m=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[l.NavNodeViewService,c.NavNodeInfoResource,d.DDLViewerFooterService])],m)},20226:(e,t,i)=>{i.r(t),i.d(t,{ExtendedDDLResource:()=>d});var s=i(1118),r=i(5576),n=i(30819),a=i(40813),o=i(57985),c=i(85213),l=i(83336);let d=class ExtendedDDLResource extends a.nG{constructor(e,t){super(),this.graphQLService=e,this.navNodeInfoResource=t,this.navNodeInfoResource.outdateResource(this),this.navNodeInfoResource.deleteInResource(this)}async loader(e){if((0,o.l)(e))throw new Error("Aliases not supported by this resource.");const t=[];return await c.F.forEachAsync(e,(async e=>{const{metadataGetNodeExtendedDDL:i}=await this.graphQLService.sdk.metadataGetNodeExtendedDDL({nodeId:e});i&&t.push(i)})),this.set(c.F.toList(e),t),this.data}validateKey(e){return"string"==typeof e}};d=(0,s.Cg)([(0,r._)(),(0,s.Sn)("design:paramtypes",[l.GraphQLService,n.NavNodeInfoResource])],d)},89031:(e,t,i)=>{i.r(t),i.d(t,{ExtendedDDLViewerTabPanel:()=>x});var s=i(41773),r=i(7838),n=i(64928),a=i(84383),o=i(7167),c=i(49690),l=i(927),d=i(90398),u=i(21252),h=i(12483),g=i(42453),p=i(49759),v=i(2293),m=i(89707),S=i(51866),f=i(16359),_=i(12423),b=i(20226);const x=(0,r.PA)((function ExtendedDDLViewerTabPanel({nodeId:e,folderId:t}){const i=(0,n.d)(f.A),r=(0,h.b)({menu:_.C}),x=(0,a.q)(ExtendedDDLViewerTabPanel,b.ExtendedDDLResource,e),y=(0,a.q)(ExtendedDDLViewerTabPanel,c.ConnectionInfoResource,c.ConnectionInfoActiveProjectKey).resource.getConnectionForNode(e),j=y?(0,c.createConnectionParam)(y):null,P=(0,a.q)(ExtendedDDLViewerTabPanel,l.ConnectionDialectResource,j),C=(0,p.n)(P.data),w=(0,g.s)();w.set(...C);const I=x.data;return(0,d.Z)(r.context,((t,i)=>{t.set(m.A,e,i),t.set(S.R,I,i)})),(0,s.jsxs)("div",{className:(0,o.s)(i,{wrapper:!0}),children:[(0,s.jsx)(v.m,{className:(0,o.s)(i,{sqlCodeEditorLoader:!0}),value:I??"",extensions:w,readonly:!0}),(0,s.jsx)(u.R,{className:(0,o.s)(i,{menuBar:!0}),menu:r})]})}))},21712:(e,t,i)=>{i.d(t,{Q:()=>s});const s="object-viewer://ddl"},22563:(e,t,i)=>{i.r(t),i.d(t,{DevToolsService:()=>c});var s=i(1118),r=i(94866),n=i(5576),a=i(40601),o=i(1513);let c=class DevToolsService{get isEnabled(){return this.settings.enabled}get isDistributed(){return this.settings.distributed}get isConfiguration(){return this.settings.configuration}constructor(e,t){this.serverConfigResource=e,this.storageService=t,this.settings={enabled:!1,distributed:!1,configuration:!1},(0,r.Gn)(this,{settings:r.sH}),this.storageService.registerSettings("devtools",this.settings,getDefaultDevToolsSettings),this.serverConfigResource.onDataUpdate.addHandler(this.syncSettingsOverride.bind(this))}switch(){this.settings.enabled=!this.settings.enabled,this.syncSettingsOverride()}setDistributedMode(e){this.settings.distributed=e,this.syncSettingsOverride()}setConfigurationMode(e){this.settings.configuration=e,this.syncSettingsOverride()}syncSettingsOverride(){this.isEnabled&&this.serverConfigResource.data&&(this.serverConfigResource.data.distributed=this.isDistributed,this.serverConfigResource.data.configurationMode=this.isConfiguration)}};function getDefaultDevToolsSettings(){return{enabled:!1,distributed:!1,configuration:!1}}c=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.ServerConfigResource,o.StorageService])],c)},21443:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>G});var s=i(1118),r=i(82103),n=i(5576),a=i(48138),o=i(56508),c=i(43759),l=i(72755),d=i(68061),u=i(86451),h=i(6767),g=i(72877),p=i(79023),v=i(38307),m=i(63747),S=i(19102);const f=(0,S.V)("devtools",{type:"checkbox",label:"DevTools",tooltip:"Show DevTools menu"}),_=(0,S.V)("devtools-mode-configuration",{type:"checkbox",label:"Easy config mode",tooltip:"Enable easy config mode"}),b=(0,S.V)("devtools-mode-distributed",{type:"checkbox",label:"Distributed mode",tooltip:"Enable distributed mode"});const x=(0,i(44745).M)("menu-search");var y=i(35493),j=i(41773),P=i(7838),C=i(15993),w=i(64928),I=i(7167),D=i(90398);const R={searchBox:"searchBox___o2SSG"},k=(0,P.PA)((function SearchResourceMenuItemComponent({item:e,onClick:t,menuData:i,className:s}){const r=(0,w.d)(R),n=i.context.get(x)??"",a=(0,C.useRef)(null);return(0,D.Z)(i.context,((e,t)=>{a.current=t})),(0,j.jsx)("div",{dir:"ltr",className:(0,I.s)(r,{searchBox:!0},s),children:(0,j.jsx)("input",{name:"search",type:"search",placeholder:"Search for resource...",value:n,autoComplete:"off",onChange:e=>function handleChange(e){a.current&&i.context.set(x,e,a.current)}(e.target.value)})})}));class SearchResourceMenuItem extends y.a{constructor(){super({id:"search-resource",getComponent:()=>k})}}var E=i(22563),L=i(85240);const A=(0,L.E)("devtools","DevTools"),N=(0,L.E)("plugin","Plugin"),M=(0,L.E)("plugins","Plugins"),T=(0,L.E)("resource","Resource",void 0,"Resource actions"),z=(0,L.E)("resources-list","Resources",void 0,"List of registered resources");var B=i(45695);class PluginSubMenuItem extends B.q{constructor(e){super({menu:N,label:e.info.name}),this.plugin=e,Object.assign(this,{id:e.info.name})}}class ResourceSubMenuItem extends B.q{constructor(e){super({menu:T,label:e.name}),this.resource=e,Object.assign(this,{id:e.name})}}let G=class PluginBootstrap extends r.j{constructor(e,t,i,s,r,n){super(),this.app=e,this.diService=t,this.menuService=i,this.actionService=s,this.devToolsService=r,this.permissionsService=n}register(){this.menuService.addCreator({menus:[v.u],isApplicable:()=>this.permissionsService.has(l.y.admin),getItems:(e,t)=>[f,...t]}),this.menuService.addCreator({menus:[m.C],isApplicable:()=>this.devToolsService.isEnabled,getItems:(e,t)=>[A,...t]}),this.menuService.addCreator({menus:[A],getItems:(e,t)=>{const i=e.get(x);return i?[new SearchResourceMenuItem,...this.getResources(this.app.getServices().filter((e=>e.name.toLocaleLowerCase().includes(i.toLocaleLowerCase()))))]:[new SearchResourceMenuItem,b,_,M,...t]}}),this.actionService.addHandler({id:"devtools-mode-configuration",actions:[_],isChecked:()=>this.devToolsService.isConfiguration,handler:()=>{this.devToolsService.setConfigurationMode(!this.devToolsService.isConfiguration)}}),this.actionService.addHandler({id:"devtools-mode-distributed",actions:[b],isChecked:()=>this.devToolsService.isDistributed,handler:()=>{this.devToolsService.setDistributedMode(!this.devToolsService.isDistributed)}}),this.menuService.addCreator({menus:[M],getItems:(e,t)=>[...this.app.getPlugins().sort(((e,t)=>e.info.name.localeCompare(t.info.name))).map((e=>new PluginSubMenuItem(e))),...t]}),this.menuService.addCreator({menus:[N],isApplicable:e=>{const t=e.get(u.x);return t instanceof PluginSubMenuItem&&this.app.getServices(t.plugin).some((e=>e.prototype instanceof c.$S))},getItems:(e,t)=>[z,...t]}),this.menuService.addCreator({menus:[z],contexts:[u.x],getItems:(e,t)=>{const i=e.find(u.x,(e=>e instanceof PluginSubMenuItem));if(!i)return t;const s=this.app.getPlugins().find((e=>e.info.name===i.id));return s?[...this.getResources(this.app.getServices(s)),...t]:t}}),this.menuService.addCreator({menus:[T],isApplicable:e=>e.get(u.x)instanceof ResourceSubMenuItem,getItems:(e,t)=>{const i=e.get(u.x);return[new h.y({id:"markOutdated",label:"Mark outdated",tooltip:"Outdate resource"},{onSelect:()=>{this.diService.serviceInjector.getServiceByClass(i.resource).markOutdated(void 0)}}),...t]}})}getResources(e){return e.filter((e=>e.prototype instanceof c.$S)).sort(((e,t)=>e.name.localeCompare(t.name))).map((e=>new ResourceSubMenuItem(e)))}};G=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.q,o.DIService,g.MenuService,p.ActionService,E.DevToolsService,d.PermissionsService])],G)},40532:(e,t,i)=>{i.d(t,{GISViewer:()=>z});var s=i(41773),r=i(7838),n=i(75961),a=i(15993),o=i(46513),c=i.n(o),l=i(17675),d=i(14249),u=i(27209),h=i(44044),g=i(26998),p=i(86795);const v="root___Z3qoW",m="combobox___Fyhuk",S=["Simple","EPSG:3395","EPSG:3857","EPSG:4326","EPSG:900913"];function CrsInput(e){return(0,s.jsx)("div",{className:v,children:(0,s.jsx)(p.G,{className:m,items:S,value:e.value,onSelect:e.onChange})})}const f="root___L8U5B",_="map___OoU7D",b="toolbar___jRPKa";var x=i(1030),y=i.n(x),j=i(11795),P=i(24587),C=i(62823),w=i(70141),I=i(90264),D=i(64928),R=i(7167);const k={mapContainer:"mapContainer___kyyvx"},E={street:{name:"gis_presentation_base_tile_street_name",checked:!0,attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",maxZoom:18,id:"osm.streets"},topography:{name:"gis_presentation_base_tile_topography_name",attribution:'© <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>, © <a href="http://viewfinderpanoramas.org" target="_blank">SRTM</a>, © <a href="https://opentopomap.org" target="_blank">OpenTopoMap</a>',url:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",maxZoom:17}},L={radius:4,weight:3},A={closeButton:!0,minWidth:260,maxWidth:800,maxHeight:500};function polyStyle(){return{weight:2,color:"blue"}}const N=function LeafletMap({geoJSON:e,crsKey:t,getAssociatedValues:i}){const r=(0,I.O)(),n=(0,l.W)(),[o,c]=(0,a.useState)(null),[d,u]=(0,a.useState)(null),h=function getCRS(e){switch(e){case"Simple":return y().CRS.Simple;case"EPSG:3857":default:return y().CRS.EPSG3857;case"EPSG:4326":return y().CRS.EPSG4326;case"EPSG:3395":return y().CRS.EPSG3395;case"EPSG:900913":return y().CRS.EPSG900913}}(t),g=(0,a.useCallback)(((e,t)=>{const s=i(e.properties.associatedCell);if(s.length>0){let e="";e+="<table>";for(let t=0;t<s.length;t++){const{key:i,value:r}=s[t];void 0!==r&&"object"!=typeof r&&(e+="<tr><td>"+i+"</td><td>"+r+"</td></tr>")}e+="</table>",t.bindPopup(e,A)}}),[i]);(0,a.useEffect)((()=>{if(d&&o){d.clearLayers();for(let t=0;t<e.length;t++)d.addData(e[t]);const t=d.getBounds();if(0===Object.keys(t).length)return;if(h===y().CRS.Simple){const e=Math.max(t.getNorth()-t.getSouth(),t.getEast()-t.getWest());o.setMinZoom(-5),e>0?o.fitBounds(t):o.setView(t.getCenter(),o.getZoom())}else o.fitBounds(t)}}),[e,d,h,o]),(0,a.useEffect)((()=>{o&&o.invalidateSize()}),[r.state.isResizing,r.state.mode,o]);const p=(0,D.d)(k);return(0,s.jsxs)(j.W,{ref:c,className:(0,R.s)(p,{mapContainer:!0}),crs:y().CRS.EPSG3857,zoom:12,children:[(0,s.jsx)(P.k,{ref:u,style:polyStyle,pointToLayer:(e,t)=>y().circleMarker(t,L),onEachFeature:g}),h!==y().CRS.Simple&&(0,s.jsxs)(C.In,{children:[(0,s.jsx)(C.In.BaseLayer,{name:n(E.street.name),checked:E.street.checked,children:(0,s.jsx)(w.e,{attribution:E.street.attribution,url:E.street.url,maxZoom:E.street.maxZoom,id:E.street.id})}),(0,s.jsx)(C.In.BaseLayer,{name:n(E.topography.name),checked:E.topography.checked,children:(0,s.jsx)(w.e,{attribution:E.topography.attribution,url:E.topography.url,maxZoom:E.topography.maxZoom,id:E.topography.id})})]})]})};var M=i(82942);function getCrsKey(e){switch(e){case 3857:return"EPSG:3857";case 4326:default:return"EPSG:4326";case 3395:return"EPSG:3395";case 900913:return"EPSG:900913"}}n.A.defs("EPSG:3395","+title=World Mercator +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs");function getTransformedGeometry(e,t,i){return"Point"===i.type?{...i,coordinates:(0,n.A)(e,t,i.coordinates)}:"MultiPoint"===i.type||"LineString"===i.type?{...i,coordinates:i.coordinates.map((i=>(0,n.A)(e,t,i)))}:"MultiLineString"===i.type||"Polygon"===i.type?{...i,coordinates:i.coordinates.map((i=>i.map((i=>(0,n.A)(e,t,i)))))}:"MultiPolygon"===i.type?{...i,coordinates:i.coordinates.map((i=>i.map((i=>i.map((i=>(0,n.A)(e,t,i)))))))}:"GeometryCollection"===i.type?{...i,geometries:i.geometries.map((i=>getTransformedGeometry(e,t,i)))}:i}const T=(0,r.PA)((function GISValuePresentation({model:e,resultIndex:t}){const i=(0,l.W)(),r=e.source.getAction(t,u.u),n=e.source.getAction(t,M.L),o=e.source.getAction(t,h.Z),p=[],v=r.getActiveElements(),m=v[0],S=m?n.getCellValue(m):null,x=S?.srid?getCrsKey(S.srid):"EPSG:3857",[y,j]=(0,a.useState)(null),P=y??x;for(const e of v){const t=n.getCellValue(e);if(!t)continue;const i=t.mapText||t.text;try{const s=c().parse(i);if(!s)continue;const r=0===t.srid?"EPSG:4326":getCrsKey(t.srid);p.push({type:"Feature",geometry:"Simple"===P?s:getTransformedGeometry(r,P,s),properties:{associatedCell:e,srid:t.srid}})}catch(e){console.error(`Failed to parse "${i}" value.`),console.error(e)}}const C=(0,a.useCallback)((e=>{const t=[];for(const i of o.columnKeys){if(g.D.isEqual(i,e.column))continue;const s=o.getCellValue({...e,column:i}),r=o.getColumn(i);s&&r?.name&&t.push({key:r.name,value:s})}return t}),[o]);return p.length?(0,s.jsxs)("div",{className:f,children:[(0,s.jsx)("div",{className:_,children:(0,s.jsx)(N,{geoJSON:p,crsKey:P,getAssociatedValues:C},P)}),(0,s.jsx)("div",{className:b,children:(0,s.jsx)(CrsInput,{value:P,onChange:j})})]}):(0,s.jsx)(d.x,{children:i("gis_presentation_placeholder")})})),z=function GISViewer({model:e,resultIndex:t}){return(0,s.jsx)(T,{model:e,resultIndex:t})}},94159:(e,t,i)=>{i.r(t),i.d(t,{GISViewerBootstrap:()=>h});var s=i(1118),r=i(15993),n=i(82103),a=i(5576),o=i(43974),c=i(27209),l=i(86928),d=i(82942);const u=(0,r.lazy)((async()=>{const{GISViewer:e}=await Promise.all([i.e(11502),i.e(67557),i.e(11116),i.e(62570),i.e(95860),i.e(47317)]).then(i.bind(i,40532));return{default:e}}));let h=class GISViewerBootstrap extends n.j{constructor(e){super(),this.dataValuePanelService=e}register(){this.dataValuePanelService.add({key:"gis-presentation",options:{dataFormat:[o.fev.Resultset]},name:"gis_presentation_title",order:10,panel:()=>u,isHidden:(e,t)=>{if(!t||!t.model.source.hasResult(t.resultIndex))return!0;const i=t.model.source.getAction(t.resultIndex,c.u),s=t.model.source.getAction(t.resultIndex,d.L),r=i.getActiveElements();return 0===r.length||!s.isGISFormat(r[0])}})}load(){}};h=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[l.DataValuePanelService])],h)},62487:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(69698)]).then(i.bind(i,71221))).default;case"it":return(await Promise.all([i.e(32756),i.e(3876)]).then(i.bind(i,44153))).default;case"zh":return(await Promise.all([i.e(52041),i.e(81495)]).then(i.bind(i,20250))).default;case"fr":return(await Promise.all([i.e(29671),i.e(59114)]).then(i.bind(i,45732))).default;default:return(await Promise.all([i.e(41114),i.e(36733)]).then(i.bind(i,3875))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},82942:(e,t,i)=>{i.d(t,{L:()=>l});var s=i(1118),r=i(43974),n=i(45477),a=i(43198),o=i(13080),c=i(44044);let l=class ResultSetGISAction extends n.o{static{this.dataFormat=[r.fev.Resultset]}constructor(e,t){super(e),this.view=t}isGISFormat(e){const t=this.view.getCellValue(e);return(0,a.h)(t)}getGISDataFor(e){return e.filter((e=>this.isGISFormat(e)))}getCellValue(e){const t=this.view.getCellValue(e);if((0,a.h)(t))return t}};l=(0,s.Cg)([(0,o.Y)(),(0,s.Sn)("design:paramtypes",[Object,c.Z])],l)},57552:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(71019)]).then(i.bind(i,87748))).default;case"it":return(await Promise.all([i.e(32756),i.e(48638)]).then(i.bind(i,59060))).default;case"zh":return(await Promise.all([i.e(52041),i.e(26257)]).then(i.bind(i,22079))).default;case"fr":return(await Promise.all([i.e(29671),i.e(82924)]).then(i.bind(i,95429))).default;default:return(await Promise.all([i.e(41114),i.e(60543)]).then(i.bind(i,31338))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},91496:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>b});var s=i(1118),r=i(21661),n=i(50420),a=i(56392),o=i(65486),c=i(82103),l=i(5576),d=i(71635),u=i(19395),h=i(14452),g=i(71086),p=i(77495),v=i(72877),m=i(79023),S=i(37178);const f=(0,i(19102).V)("app-help",{label:"shortcuts_title",tooltip:"shortcuts_title",icon:"/icons/plugin_help_m.svg"}),_=(0,n.j)((()=>Promise.all([i.e(11502),i.e(7542),i.e(67557),i.e(73676),i.e(36821),i.e(95218),i.e(95860),i.e(93400)]).then(i.bind(i,14457)).then((e=>e.ShortcutsDialog))));let b=class PluginBootstrap extends c.j{constructor(e,t,i,s,r,n){super(),this.menuService=e,this.screenService=t,this.actionService=i,this.commonDialogService=s,this.notificationService=r,this.localStorageSaveService=n,this.errorNotification=null}async load(){}register(){this.addTopAppMenuItems(),this.addMultiTabSupportNotification()}addMultiTabSupportNotification(){const displayErrorMessage=()=>{this.errorNotification||this.screenService.isActive(r.AppScreenService.screenName)&&"session"===this.localStorageSaveService.storage&&(this.errorNotification=this.notificationService.customNotification((()=>a.o),{actionText:"plugin_help_multi_tab_support_load_settings",onAction:()=>{this.localStorageSaveService.updateStorage("local"),this.errorNotification?.close(!1)}},{type:u.R.Error,title:"plugin_help_multi_tab_support_title",message:"plugin_help_multi_tab_support_description",onClose:()=>{this.errorNotification=null}}))};this.localStorageSaveService.onStorageChange.addHandler(displayErrorMessage),this.screenService.routeChange.addPostHandler(displayErrorMessage)}addTopAppMenuItems(){this.menuService.addCreator({menus:[S.w],getItems:(e,t)=>[...t,f],orderItems:(e,t)=>{const i=(0,p.H)(t,[f]);return t.splice(t.length-1,0,...i),t}}),this.actionService.addHandler({id:"app-help",actions:[f],handler:async(e,t)=>{if(t===f)await this.commonDialogService.open(_,null)}})}};b=(0,s.Cg)([(0,l._)(),(0,s.Sn)("design:paramtypes",[v.MenuService,g.ScreenService,m.ActionService,d.CommonDialogService,h.NotificationService,o.LocalStorageSaveService])],b)},14457:(e,t,i)=>{i.r(t),i.d(t,{ShortcutsDialog:()=>T});var s=i(41773),r=i(17675),n=i(64928),a=i(51477),o=i(62204),c=i(92659),l=i(76652),d=i(7167),u=i(16101),h=i(13821),g=i(27863),p=i(9428),v=i(89232),m=i(15993);const S={shortcutContainer:"shortcutContainer___WpUVA",shortcutLabel:"shortcutLabel___eew8C",shortcutContent:"shortcutContent___yViHu",shortcutCode:"shortcutCode___S2Adl theme-form-element-radius theme-background-secondary theme-text-on-secondary",span:"span___edvAS"},f=function Shortcut({shortcut:e}){const t=(0,r.W)(),i=(0,n.d)(S);return(0,s.jsxs)("div",{className:(0,d.s)(i,{shortcutContainer:!0}),children:[(0,s.jsx)("div",{className:(0,d.s)(i,{shortcutLabel:!0}),children:t(e.label)}),(0,s.jsx)("div",{className:(0,d.s)(i,{shortcutContent:!0}),children:e.code.map(((e,r)=>(0,s.jsxs)(m.Fragment,{children:[r>0&&(0,s.jsx)("span",{className:(0,d.s)(i,{span:!0}),children:t("ui_or")}),(0,s.jsx)("div",{className:(0,d.s)(i,{shortcutCode:!0}),children:e})]},e)))})]})};var _=i(40279),b=i(2280),x=i(59262),y=i(47074),j=i(95439),P=i(43631),C=i(60939),w=i(91740),I=i(47291),D=i(18174),R=i(65457),k=i(94798),E=i(27145);const L=[{label:"data_viewer_shortcut_start_inline_editing",code:["Enter","Backspace"]},{label:"data_viewer_shortcut_revert_inline_editor_changes",code:["Escape"]},{label:"data_viewer_shortcut_add_new_row",code:["Alt + Insert"]},{label:"data_viewer_shortcut_duplicate_row",code:["Ctrl + Alt + Insert"]},{label:"data_viewer_shortcut_delete_row",code:["Delete"]},{label:"data_viewer_shortcut_past_value",code:["Ctrl + V"]},{label:"data_viewer_shortcut_copy_value",code:["Ctrl + C"]}],A=[{label:"sql_editor_shortcut_execute_statement",code:transformKeys(I.$)},{label:"sql_editor_shortcut_execute_statement_new_tab",code:transformKeys(D.q)},{label:"sql_editor_shortcut_execute_script",code:transformKeys(R.d)},{label:"sql_editor_shortcut_show_execution_plan",code:transformKeys(k.Q)},{label:"sql_editor_shortcut_format",code:transformKeys(E.p)},{label:"sql_editor_shortcut_undo",code:transformKeys(b.t)},{label:"sql_editor_shortcut_redo",code:transformKeys(x.V)},{label:"sql_editor_shortcut_open_editor_in_new_tab",code:transformKeys(y.L)}],N=[{label:"navigation_tree_shortcut_enable_filter",code:transformKeys(P.t)},{label:"app_navigationTree_action_collapse_all",code:transformKeys(C.u)},{label:"app_navigationTree_action_link_with_editor",code:transformKeys(w.V)}];function transformKeys(e){return(0,j.L)(e).map((e=>function transformModToDisplayKey(e){const t=(0,_.R)();if(t===_.f.windowsOS||t===_.f.linuxOS)return e.replace("MOD","CTRL");if(t===_.f.macOS)return e.replace("MOD","CMD").replace("ALT","OPTION").replace("BACKSPACE","DELETE");return e}(e.toLocaleUpperCase().replace(/\+/gi," + "))))}const M={button:"button___K0khZ",container:"container___whhoE theme-typography--body2"},T=function ShortcutsDialog({rejectDialog:e}){const t=(0,r.W)(),i=(0,n.d)(M);return(0,s.jsxs)(a.n,{size:"large",children:[(0,s.jsx)(o.D,{title:t("shortcuts_title"),onReject:e}),(0,s.jsx)(c.a,{children:(0,s.jsxs)(l.m,{className:(0,d.s)(i,{container:!0}),gap:!0,wrap:!0,overflow:!0,children:[(0,s.jsxs)(u.Y,{box:!0,gap:!0,dense:!0,overflow:!0,children:[(0,s.jsx)(h.U,{header:!0,children:(0,s.jsx)(g.N,{href:"https://dbeaver.com/docs/cloudbeaver/Data-editor/",target:"_blank",wrapper:!0,indicator:!0,children:"Data Viewer"})}),L.map((e=>(0,s.jsx)(f,{shortcut:e},e.label)))]}),(0,s.jsxs)(u.Y,{box:!0,gap:!0,dense:!0,overflow:!0,children:[(0,s.jsx)(h.U,{header:!0,children:(0,s.jsx)(g.N,{href:"https://dbeaver.com/docs/cloudbeaver/SQL-Editor/",target:"_blank",wrapper:!0,indicator:!0,children:"SQL Editor"})}),A.map((e=>(0,s.jsx)(f,{shortcut:e},e.label)))]}),(0,s.jsxs)(u.Y,{box:!0,gap:!0,dense:!0,overflow:!0,children:[(0,s.jsx)(h.U,{header:!0,children:(0,s.jsx)(g.N,{href:"https://dbeaver.com/docs/cloudbeaver/Database-Navigator/",target:"_blank",wrapper:!0,indicator:!0,children:"Navigation Tree"})}),N.map((e=>(0,s.jsx)(f,{shortcut:e},e.label)))]})]})}),(0,s.jsx)(p.Z,{children:(0,s.jsx)(v.$,{className:(0,d.s)(i,{button:!0}),type:"button",mod:["outlined"],onClick:e,children:t("ui_close")})})]})}},98704:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>l});var s=i(1118),r=i(94866),n=i(82103),a=i(5576),o=i(34227),c=i(31038);let l=class PluginBootstrap extends n.j{constructor(e){super(),this.localizationService=e,this.reactionDisposer=null}register(){this.reactionDisposer=(0,r.fm)((()=>c.W.setLocale(this.localizationService.currentLanguage))),this.localizationService.addProvider((async e=>(await c.W.loadLocale(e),[])))}dispose(){this.reactionDisposer?.()}};l=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[o.LocalizationService])],l)},83986:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(46389)]).then(i.bind(i,98742))).default;case"it":return(await Promise.all([i.e(32756),i.e(68770)]).then(i.bind(i,57570))).default;case"zh":return(await Promise.all([i.e(52041),i.e(1627)]).then(i.bind(i,28185))).default;case"fr":return(await Promise.all([i.e(29671),i.e(24008)]).then(i.bind(i,84115))).default;default:return(await Promise.all([i.e(41114),i.e(90)]).then(i.bind(i,25644))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},66424:(e,t,i)=>{i.r(t),i.d(t,{NavigationTreeFiltersBootstrap:()=>f});var s=i(1118),r=i(50420),n=i(82103),a=i(5576),o=i(71635),c=i(14452),l=i(34227),d=i(14841),u=i(86888),h=i(6587),g=i(41273),p=i(6767),v=i(72877);const m=(0,i(85240).E)("navigation-tree-filters","plugin_navigation_tree_filters_title"),S=(0,r.j)((()=>Promise.all([i.e(11502),i.e(7542),i.e(67557),i.e(62570),i.e(95860),i.e(77709)]).then(i.bind(i,3344)).then((e=>e.NavigationTreeFiltersDialog))));let f=class NavigationTreeFiltersBootstrap extends n.j{constructor(e,t,i,s,r){super(),this.commonDialogService=e,this.menuService=t,this.localizationService=i,this.navTreeResource=s,this.notificationService=r}register(){this.menuService.addCreator({root:!0,contexts:[d.G],isApplicable:e=>{const t=e.get(d.G);return!(!t.folder||!u.n.isDatabaseObject(t.id))&&!e.hasValue(g.F,m)},getItems:(e,t)=>[...t,m]}),this.menuService.addCreator({menus:[m],contexts:[d.G],getItems:(e,t)=>{const i=e.get(d.G),s=[new p.y({id:"configure-filter",label:this.localizationService.translate("plugin_navigation_tree_filters_configuration",void 0,{name:i.name})+"..."},{onSelect:async()=>{await this.commonDialogService.open(S,{node:i})}})];return i.filtered&&s.push(new p.y({id:"reset-filter",label:"plugin_navigation_tree_filters_reset"},{onSelect:async()=>{try{await this.navTreeResource.setFilter(i.id,[],[])}catch(e){this.notificationService.logException(e,"plugin_navigation_tree_filters_reset_fail")}}})),[...t,...s]}})}};f=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[o.CommonDialogService,v.MenuService,l.LocalizationService,h.NavTreeResource,c.NotificationService])],f)},3344:(e,t,i)=>{i.r(t),i.d(t,{NavigationTreeFiltersDialog:()=>M});var s=i(41773),r=i(7838),n=i(17675),a=i(64928),o=i(15280),c=i(51477),l=i(62204),d=i(92659),u=i(69519),h=i(16101),g=i(7167),p=i(9428),v=i(89232),m=i(18699),S=i(14452),f=i(6587),_=i(15993),b=i(84972),x=i(39865),y=i(84349),j=i(85289);const P={table:"table___NDWV5 theme-background-surface theme-text-on-surface",header:"header___CgTHO theme-border-color-background theme-background-surface theme-text-on-surface",headerActions:"headerActions___c3WGy",group:"group___Q0bm9",container:"container___rR4qZ",tableContainer:"tableContainer___EAojR",inputField:"inputField___FbWux",submittingForm:"submittingForm___AGkBU",headerTitle:"headerTitle___i7cZP",button:"button___eyLA6"};var C=i(50453),w=i(15682),I=i(74508);const D={deleteColumnCell:"deleteColumnCell___Vy49Q",tableItem:"tableItem___tcKn_"},R=(0,r.PA)((function FiltersTableItem({id:e,name:t,disabled:i,className:r,onDelete:n}){const o=(0,a.d)(D);return(0,s.jsxs)(C.O,{className:(0,g.s)(o,{tableItem:!0},r),item:e,title:t,disabled:i,selectDisabled:i,children:[(0,s.jsx)(w.E,{children:t}),(0,s.jsx)(w.E,{className:(0,g.s)(o,{deleteColumnCell:!0}),flex:!0,children:(0,s.jsx)(I.G,{name:"cross-bold",onClick:()=>n(e)})})]})})),k=(0,r.PA)((function FiltersTable({title:e,filters:t,onAdd:i,onDelete:r}){const o=(0,n.W)(),c=(0,a.d)(P),[l,d]=(0,_.useState)("");function add(){const e=l.trim();e&&(i(e),d(""))}return(0,s.jsx)(h.Y,{className:P.group,box:!0,medium:!0,overflow:!0,children:(0,s.jsxs)("div",{className:(0,g.s)(c,{container:!0}),children:[(0,s.jsxs)("header",{className:(0,g.s)(c,{header:!0}),children:[(0,s.jsx)("h4",{className:(0,g.s)(c,{headerTitle:!0}),children:e}),(0,s.jsx)(b.l,{className:(0,g.s)(c,{submittingForm:!0}),onSubmit:add,children:(0,s.jsxs)("div",{className:(0,g.s)(c,{headerActions:!0}),children:[(0,s.jsx)(x.F,{className:(0,g.s)(c,{inputField:!0}),placeholder:o("plugin_navigation_tree_filters_info"),value:l,onChange:e=>d(String(e))}),(0,s.jsx)(v.$,{className:c.button,mod:["unelevated"],onClick:add,children:"+"})]})})]}),(0,s.jsx)("div",{className:(0,g.s)(c,{tableContainer:!0}),children:(0,s.jsx)(y.X,{className:(0,g.s)(c,{table:!0}),keys:t,children:(0,s.jsx)(j.B,{children:t.map((e=>(0,s.jsx)(R,{id:e,name:e,onDelete:r},e)))})})})]})})})),E={footerContainer:"footerContainer___BxGc3",tablesContainer:"tablesContainer___Hf3s5",tableContainer:"tableContainer___rBqgI"};var L=i(94866),A=i(28347),N=i(30819);const M=(0,r.PA)((function NavigationTreeFiltersDialog({rejectDialog:e,resolveDialog:t,payload:i}){const r=(0,n.W)(),_=(0,a.d)(E),b=(0,m.h)(S.NotificationService),x=(0,m.h)(f.NavTreeResource),y=function useFilters(e){const t=(0,m.h)(N.NavNodeInfoResource);return(0,A.G)((()=>({filters:{exclude:[],include:[]},loading:!1,loaded:!1,exception:null,isLoading(){return this.loading},isLoaded(){return this.loaded},isError(){return!!this.exception},async load(){if(!this.loaded&&!this.loading)try{this.loading=!0;const e=await this.navNodeInfoResource.loadNodeFilter(this.nodePath);e?.exclude&&this.exclude(e.exclude),e?.include&&this.include(e.include),this.loaded=!0}catch(e){this.exception=e}finally{this.loading=!1}},deleteInclude(e){this.filters.include=this.filters.include.filter((t=>t!==e))},deleteExclude(e){this.filters.exclude=this.filters.exclude.filter((t=>t!==e))},include(e){Array.isArray(e)?this.filters.include.push(...e):this.filters.include.includes(e)||this.filters.include.unshift(e)},exclude(e){Array.isArray(e)?this.filters.exclude.push(...e):this.filters.exclude.includes(e)||this.filters.exclude.unshift(e)}})),{loading:L.sH.ref,loaded:L.sH.ref,exception:L.sH.ref,filters:L.sH,load:L.XI.bound,include:L.XI.bound,exclude:L.XI.bound,deleteInclude:L.XI.bound,deleteExclude:L.XI.bound},{nodePath:e,navNodeInfoResource:t})}(i.node.id);return(0,o.X)(NavigationTreeFiltersDialog,y),(0,s.jsxs)(c.n,{size:"large",children:[(0,s.jsx)(l.D,{title:r("plugin_navigation_tree_filters_configuration",void 0,{name:i.node.name}),icon:"filter",onReject:e}),(0,s.jsx)(d.a,{noOverflow:!0,noBodyPadding:!0,children:(0,s.jsx)(u.a,{state:y,children:(0,s.jsx)(h.Y,{box:!0,children:(0,s.jsxs)("div",{className:(0,g.s)(_,{tablesContainer:!0}),children:[(0,s.jsx)("div",{className:(0,g.s)(_,{tableContainer:!0}),children:(0,s.jsx)(k,{title:r("plugin_navigation_tree_filters_include"),filters:y.filters.include,onAdd:y.include,onDelete:y.deleteInclude})}),(0,s.jsx)("div",{className:(0,g.s)(_,{tableContainer:!0}),children:(0,s.jsx)(k,{title:r("plugin_navigation_tree_filters_exclude"),filters:y.filters.exclude,onAdd:y.exclude,onDelete:y.deleteExclude})})]})})})}),(0,s.jsx)(p.Z,{children:(0,s.jsxs)("div",{className:(0,g.s)(_,{footerContainer:!0}),children:[(0,s.jsx)(v.$,{mod:["outlined"],onClick:e,children:r("ui_close")}),(0,s.jsx)(v.$,{mod:["unelevated"],onClick:async function submit(){try{await x.setFilter(i.node.id,y.filters.include,y.filters.exclude),t()}catch(e){b.logException(e,"plugin_navigation_tree_filters_submit_fail")}},children:r("ui_apply")})]})})]})}))},46366:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(22471)]).then(i.bind(i,55858))).default;case"it":return(await Promise.all([i.e(32756),i.e(89614)]).then(i.bind(i,14254))).default;case"zh":return(await Promise.all([i.e(52041),i.e(67233)]).then(i.bind(i,30685))).default;case"fr":return(await Promise.all([i.e(29671),i.e(34376)]).then(i.bind(i,7519))).default;default:return(await Promise.all([i.e(41114),i.e(11995)]).then(i.bind(i,39456))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},55004:(e,t,i)=>{i.r(t),i.d(t,{ProductBootstrap:()=>g});var s=i(1118),r=i(50420),n=i(82103),a=i(5576),o=i(71635),c=i(40601),l=i(6767),d=i(72877),u=i(38307);const h=(0,r.j)((()=>Promise.all([i.e(11502),i.e(7542),i.e(67557),i.e(62570),i.e(95860),i.e(44852)]).then(i.bind(i,99880)).then((e=>e.ProductInfoDialog))));let g=class ProductBootstrap extends n.j{constructor(e,t,i){super(),this.serverConfigResource=e,this.commonDialogService=t,this.menuService=i}register(){this.menuService.addCreator({menus:[u.u],isApplicable:()=>!!this.serverConfigResource.data?.productInfo,getItems:(e,t)=>[...t,new l.y({id:"productInfo",label:"app_product_info",tooltip:"app_product_info"},{onSelect:()=>this.commonDialogService.open(h,null)})]})}};g=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[c.ServerConfigResource,o.CommonDialogService,d.MenuService])],g)},99880:(e,t,i)=>{i.r(t),i.d(t,{ProductInfoDialog:()=>P});var s=i(41773),r=i(7838),n=i(17675),a=i(64928),o=i(51477),c=i(62204),l=i(92659),d=i(71120),u=i(16101),h=i(14249),g=i(39755),p=i(7167),v=i(61549),m=i(27863),S=i(9428),f=i(89232),_=i(18699),b=i(40601),x=i(72858),y=i(46400),j=i(3376);const P=(0,r.PA)((function ProductInfoDialog(e){const t=(0,n.W)(),i=(0,_.h)(b.ServerConfigResource),r=(0,_.h)(x.ThemeService),P=(0,y.h)(),C=i.data?.productInfo,w="light"===r.themeId?"/icons/product-logo_light.svg":"/icons/product-logo_dark.svg",I=(0,a.d)(j.A);return(0,s.jsxs)(o.n,{size:"large",children:[(0,s.jsx)(c.D,{title:"app_product_info",onReject:e.rejectDialog}),(0,s.jsx)(l.a,{children:(0,s.jsx)(d.U,{children:(0,s.jsx)(u.Y,{gap:!0,compact:!0,box:!0,children:C?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.O,{className:(0,p.s)(I,{iconOrImage:!0}),icon:w}),(0,s.jsx)(v.J,{className:(0,p.s)(I,{formFieldDescription:!0}),label:t("app_product_info_name"),children:C.name}),(0,s.jsx)(v.J,{className:(0,p.s)(I,{formFieldDescription:!0}),label:t("app_product_info_description"),children:C.description}),C.licenseInfo&&(0,s.jsx)(v.J,{className:(0,p.s)(I,{formFieldDescription:!0}),label:t("app_product_info_license_info"),children:C.licenseInfo}),(0,s.jsx)(v.J,{className:(0,p.s)(I,{formFieldDescription:!0}),label:t("app_product_info_build_time"),children:C.buildTime}),(0,s.jsx)(v.J,{className:(0,p.s)(I,{formFieldDescription:!0}),label:"Backend version",children:C.version}),(0,s.jsx)(v.J,{className:(0,p.s)(I,{formFieldDescription:!0}),label:"Frontend version",children:P.frontendVersion}),(0,s.jsx)(v.J,{className:(0,p.s)(I,{formFieldDescription:!0}),label:t("app_product_info_contacts"),children:(0,s.jsxs)("div",{className:(0,p.s)(I,{contactsInfo:!0}),children:["You can contact us via our",(0,s.jsxs)(m.N,{href:"https://dbeaver.com/company/contact/",target:"_blank",rel:"noopener noreferrer",children:[" ","Site"," "]}),"or",(0,s.jsxs)(m.N,{href:"https://github.com/dbeaver/cloudbeaver",target:"_blank",rel:"noopener noreferrer",children:[" ","Github"]})]})})]}):(0,s.jsx)(h.x,{children:t("app_product_info_placeholder")})})})}),(0,s.jsx)(S.Z,{className:(0,p.s)(I,{commonDialogFooter:!0}),children:(0,s.jsx)(f.$,{type:"button",mod:["outlined"],onClick:e.rejectDialog,children:t("ui_processing_ok")})})]})}))},93732:(e,t,i)=>{i.d(t,{L:()=>D});var s=i(41773),r=i(94866),n=i(7838),a=i(15993),o=i(64928),c=i(17675),l=i(35025),d=i(28347),u=i(84383),h=i(51477),g=i(62204),p=i(92659),v=i(84972),m=i(76652),S=i(39865),f=i(9428),_=i(7167),b=i(89232),x=i(70500),y=i(68426),j=i(10392),P=i(8385),C=i(45934);const w={footer:"footer___jZ07G"};var I=i(50083);const D=(0,n.PA)((function FolderDialog({payload:e,resolveDialog:t,rejectDialog:i,className:n}){const D=(0,o.d)(w),R=(0,c.W)(),[k]=(0,l.i)({focusFirstChild:!0}),{icon:E,folder:L,bigIcon:A,viewBox:N,value:M,projectId:T,selectProject:z,objectName:B,create:G,confirmActionText:H,filterProject:V}=e;let{title:U}=e;U||(U=G?"ui_create":"ui_rename"),U=R(U),B&&(U+=` ${R(B)}`);const O=(0,d.G)((()=>({value:M,projectId:T,folder:L,message:void 0,valid:!0,validationInProgress:!1,validate:(0,P.l)((async()=>{const{folder:e,value:t,projectId:i}=O;let s;O.message=void 0,O.validationInProgress=!0;try{s=await(O.payload.validation?.({folder:e,name:t,projectId:i},(s=>{O.folder===e&&O.value===t&&O.projectId===i&&O.setMessage(s)})))}catch(e){s=!1,O.setMessage(e.message)}O.folder===e&&O.value===t&&O.projectId===i&&(O.valid=s??!0,O.validationInProgress=!1)}),300),setMessage(e){this.message=e},setProjectId(e){this.projectId=e,this.folder=void 0}})),{value:r.sH.ref,projectId:r.sH.ref,validationInProgress:r.sH.ref,folder:r.sH.ref,valid:r.sH.ref,message:r.sH.ref},{payload:e}),W=(0,u.q)(FolderDialog,j.ProjectInfoResource,O.projectId);async function resolveHandler(){try{await O.validate(),O.valid&&t({folder:O.folder,name:O.value,projectId:O.projectId})}catch{}}(0,a.useEffect)((()=>{O.validate().catch((()=>{}))}),[O.value,O.projectId]);const q=O.valid?" ":R(O.message??"ui_rename_taken_or_invalid"),F=(0,C.A)(W.data?.name??O.projectId,O.folder);return(0,s.jsxs)(h.n,{size:"small",className:n,fixedWidth:!0,children:[(0,s.jsx)(g.D,{subTitle:F,title:U,icon:E,viewBox:N,bigIcon:A,onReject:i}),(0,s.jsx)(p.a,{children:(0,s.jsx)(v.l,{ref:k,onSubmit:resolveHandler,children:(0,s.jsxs)(m.m,{center:!0,gap:!0,children:[z&&(0,s.jsx)(I.g,{value:O.projectId,filter:V,onChange:e=>O.setProjectId(e)}),(0,s.jsx)(S.F,{name:"value",state:O,error:!O.valid,description:q,loading:O.validationInProgress,onChange:()=>O.validate().catch((()=>{})),children:R("ui_name")+":"})]})})}),(0,s.jsxs)(f.Z,{className:(0,_.s)(D,{footer:!0}),children:[(0,s.jsx)(b.$,{type:"button",mod:["outlined"],onClick:i,children:(0,s.jsx)(x.H,{token:"ui_processing_cancel"})}),(0,s.jsx)(y.S,{}),(0,s.jsx)(b.$,{type:"button",mod:["unelevated"],disabled:!O.valid,onClick:resolveHandler,children:(0,s.jsx)(x.H,{token:H||(G?"ui_create":"ui_rename")})})]})]})}))},10151:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(79138)]).then(i.bind(i,80773))).default;case"it":return(await Promise.all([i.e(32756),i.e(56757)]).then(i.bind(i,20169))).default;case"zh":return(await Promise.all([i.e(52041),i.e(23408)]).then(i.bind(i,23850))).default;case"fr":return(await Promise.all([i.e(29671),i.e(1027)]).then(i.bind(i,41172))).default;default:return(await Promise.all([i.e(41114),i.e(78646)]).then(i.bind(i,5939))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},99957:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>a});var s=i(1118),r=i(82103),n=i(5576);let a=class PluginBootstrap extends r.j{constructor(){super()}async load(){}register(){}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],a)},50083:(e,t,i)=>{i.d(t,{g:()=>h});var s=i(41773),r=i(7838),n=i(17675),a=i(84383),o=i(86795),c=i(18699),l=i(62151),d=i(10392),u=i(40813);const h=(0,r.PA)((function ProjectSelect({value:e,filter:t=(e=>e.canEditDataSources),autoHide:i,readOnly:r,disabled:h,inline:g,onChange:p,descriptionGetter:v}){const m=(0,n.W)(),S=(0,c.h)(l.ProjectsService).activeProjects.slice().sort(d.projectInfoSortByName),f=S.filter(t).map((e=>e.id)),_=(0,a.q)(ProjectSelect,d.ProjectInfoResource,u.fZ,{onData:()=>{(!e&&f.length>0||e&&!f.includes(e))&&p(f[0])}});if(i&&S.length<=1)return null;const b=v?.(S,f);return(0,s.jsx)(o.G,{name:"projectId",value:e??"",items:S,keySelector:e=>e.id,valueSelector:e=>e.name,titleSelector:e=>e.description,isDisabled:e=>!t(e),readOnly:r||f.length<=1,searchable:S.length>10,disabled:h,loading:_.isLoading(),inline:g,description:b,tiny:!0,fill:!0,onSelect:function handleProjectSelect(e){f.includes(e)&&p(e)},children:m("plugin_projects_project_select_label")})}))},69618:(e,t,i)=>{i.r(t),i.d(t,{DataGrid:()=>a});var s=i(41773),r=i(15993),n=i(10780);const a=(0,r.forwardRef)((function DataGrid(e,t){return(0,s.jsx)(n.Ay,{...e,ref:t,className:["react-data-grid-container",e.className].join(" ")})}))},36403:(e,t,i)=>{i.d(t,{Ay:()=>s});const s=(0,i(50420).j)((()=>Promise.all([i.e(11502),i.e(11116),i.e(95860),i.e(35539)]).then(i.bind(i,69618)).then((e=>e.DataGrid))))},23050:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(44360)]).then(i.bind(i,20158))).default;case"it":return(await Promise.all([i.e(32756),i.e(21979)]).then(i.bind(i,39002))).default;case"zh":return(await Promise.all([i.e(52041),i.e(36217)]).then(i.bind(i,79137))).default;case"fr":return(await Promise.all([i.e(29671),i.e(58598)]).then(i.bind(i,72891))).default;default:return(await Promise.all([i.e(41114),i.e(80979)]).then(i.bind(i,15140))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},58295:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>m});var s=i(1118),r=i(82103),n=i(5576),a=i(14452),o=i(86764),c=i(40601),l=i(59080),d=i(41773),u=i(7838),h=i(17675),g=i(13821),p=i(90760);const v=(0,u.PA)((function ResourceManagerSettings({state:e}){const t=(0,h.W)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.U,{children:t("plugin_resource_manager_title")}),(0,d.jsx)(p.d,{name:"resourceManagerEnabled",state:e.serverConfig,description:t("plugin_resource_manager_administration_settings_enable_description"),mod:["primary"],small:!0,autoHide:!0,children:t("plugin_resource_manager_administration_settings_enable")})]})}));let m=class PluginBootstrap extends r.j{constructor(e,t,i){super(),this.serverConfigurationService=e,this.serverConfigResource=t,this.notificationService=i,this.loadConfigHandler=this.loadConfigHandler.bind(this)}register(){this.serverConfigurationService.pluginsContainer.add(v,0),this.serverConfigurationService.loadConfigTask.addHandler(this.loadConfigHandler)}async load(){}async loadConfigHandler(e,t){if(e.reset)try{const t=await this.serverConfigResource.load();if(!t)return;e.state.serverConfig.resourceManagerEnabled=t.resourceManagerEnabled}catch(e){o.a.interrupt(t),this.notificationService.logException(e,"Can't load server configuration")}}};m=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[l.ServerConfigurationService,c.ServerConfigResource,a.NotificationService])],m)},72440:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(46693)]).then(i.bind(i,22012))).default;case"it":return(await Promise.all([i.e(32756),i.e(69074)]).then(i.bind(i,1084))).default;case"zh":return(await Promise.all([i.e(52041),i.e(91455)]).then(i.bind(i,51255))).default;case"fr":return(await Promise.all([i.e(29671),i.e(13836)]).then(i.bind(i,6301))).default;default:return(await Promise.all([i.e(41114),i.e(57169)]).then(i.bind(i,21138))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},34861:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>S});var s=i(1118),r=i(50420),n=i(82103),a=i(5576),o=i(20839),c=i(40601),l=i(64676),d=i(77495),u=i(72877),h=i(79023),g=i(51293);const p=(0,i(19102).V)("resource-manager-scripts-enable",{label:"plugin_resource_manager_scripts_action_enable_label",type:"checkbox"});var v=i(29281);const m=(0,r.j)((()=>Promise.all([i.e(11502),i.e(7542),i.e(67557),i.e(89814),i.e(73676),i.e(44134),i.e(95218),i.e(9801),i.e(12788),i.e(62570),i.e(95860),i.e(3360)]).then(i.bind(i,62040)).then((e=>e.ResourceManagerScripts))));let S=class PluginBootstrap extends n.j{constructor(e,t,i,s,r){super(),this.sideBarPanelService=e,this.resourceManagerScriptsService=t,this.menuService=i,this.actionService=s,this.serverConfigResource=r}register(){this.registerMenu(),this.sideBarPanelService.tabsContainer.add({key:"resource-manager-scripts-tab",order:0,name:"plugin_resource_manager_scripts_title",isHidden:()=>!this.resourceManagerScriptsService.active,onClose:this.resourceManagerScriptsService.togglePanel,panel:()=>m})}registerMenu(){this.menuService.addCreator({menus:[g.e],getItems:(e,t)=>[...t,p],orderItems:(e,t)=>[...(0,d.H)(t,[p]),...t]}),this.actionService.addHandler({id:"resource-manager-scripts-base",actions:[p],isHidden:()=>!this.resourceManagerScriptsService.enabled,isChecked:()=>this.resourceManagerScriptsService.active,getLoader:()=>(0,o.X)(this.serverConfigResource,(()=>{}),(()=>{})),handler:(e,t)=>{if(t===p)this.resourceManagerScriptsService.togglePanel()}})}};S=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[l.SideBarPanelService,v.ResourceManagerScriptsService,u.MenuService,h.ActionService,c.ServerConfigResource])],S)},62040:(e,t,i)=>{i.r(t),i.d(t,{ResourceManagerScripts:()=>l});var s=i(41773),r=i(7838),n=i(17675),a=i(76652),o=i(23669),c=i(99742);const l=(0,r.PA)((function ResourceManagerScripts(){const e=(0,n.W)();return(0,s.jsx)(a.m,{vertical:!0,overflow:!0,children:(0,s.jsx)(o.q,{resourceTypeId:c.G,children:e("plugin_resource_manager_scripts_no_resources_placeholder")})})}))},29281:(e,t,i)=>{i.r(t),i.d(t,{ResourceManagerScriptsService:()=>g});var s=i(1118),r=i(94866),n=i(50966),a=i(30606),o=i(5576),c=i(41825),l=i(40601),d=i(51206),u=i(11630),h=i(99742);let g=class ResourceManagerScriptsService{get active(){return this.enabled&&this.settings.active}get settings(){return this.userDataService.getUserData("resource-manager-scripts",getResourceManagerDefaultSettings)}get enabled(){return this.resourceManagerService.enabled&&!this.resourceManagerScriptsSettingsService.disabled}constructor(e,t,i,s,n){this.userDataService=e,this.serverConfigResource=t,this.resourceManagerService=i,this.resourceManagerResource=s,this.resourceManagerScriptsSettingsService=n,this.togglePanel=this.togglePanel.bind(this),(0,r.Gn)(this,{settings:r.EW,active:r.EW,enabled:r.EW})}togglePanel(){this.settings.active=!this.settings.active}getRootFolder(e){const t=e.resourceTypes.find((e=>e.id===h.G));return this.serverConfigResource.distributed?t?.rootFolder:void 0}async createScript(e,t,i=""){await this.resourceManagerResource.writeText(e,i,!1),await this.setExecutionContextInfo(e,t)}async setExecutionContextInfo(e,t){if(!this.enabled)return;const i=(0,c.getRmResourceKey)(e),s=await this.resourceManagerResource.setProperties(e,{"default-projectId":t?.projectId,"default-datasource":t?.connectionId,"default-catalog":t?.defaultCatalog,"default-schema":t?.defaultSchema});return s["default-datasource"]?{id:a.NOT_INITIALIZED_CONTEXT_ID,projectId:s["default-projectId"]??i.projectId,connectionId:s["default-datasource"],defaultCatalog:s["default-catalog"],defaultSchema:s["default-schema"]}:void 0}async getExecutionContextInfo(e){const t=(await this.resourceManagerResource.load(e,["includeProperties"])).properties,i=(0,c.getRmResourceKey)(e);if(t["default-datasource"])return{id:a.NOT_INITIALIZED_CONTEXT_ID,projectId:t["default-projectId"]??i.projectId,connectionId:t["default-datasource"],defaultCatalog:t["default-catalog"],defaultSchema:t["default-schema"]}}};function getResourceManagerDefaultSettings(){return{active:!1}}g=(0,s.Cg)([(0,o._)(),(0,s.Sn)("design:paramtypes",[n.UserDataService,l.ServerConfigResource,d.ResourceManagerService,c.ResourceManagerResource,u.ResourceManagerScriptsSettingsService])],g)},11630:(e,t,i)=>{i.r(t),i.d(t,{ResourceManagerScriptsSettingsService:()=>u});var s=i(1118),r=i(63716),n=i(5576),a=i(83916),o=i(80625),c=i(3065),l=i(31038);const d=c.Ik({"plugin.resource-manager-scripts.disabled":l.W.stringedBoolean().default(!1)});let u=class ResourceManagerScriptsSettingsService extends r.O{get disabled(){return this.settings.getValue("plugin.resource-manager-scripts.disabled")}constructor(e,t){super(),this.settingsProviderService=e,this.settingsManagerService=t,this.settings=this.settingsProviderService.createSettings(d),this.registerSettings()}registerSettings(){this.settingsManagerService.registerSettings(this.settings,(()=>[]))}};u=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.SettingsProviderService,o.SettingsManagerService])],u)},99742:(e,t,i)=>{i.d(t,{G:()=>s});const s="sql-script"},44683:(e,t,i)=>{i.d(t,{V:()=>b});var s=i(41773),r=i(94866),n=i(7838),a=i(17675),o=i(35025),c=i(28347),l=i(51477),d=i(62204),u=i(92659),h=i(84972),g=i(76652),p=i(39865),v=i(9428),m=i(89232),S=i(70500),f=i(68426),_=i(50083);const b=(0,n.PA)((function SaveScriptDialog({payload:e,resolveDialog:t,rejectDialog:i,className:n}){const b=(0,a.W)(),[x]=(0,o.i)({focusFirstChild:!0}),y=(0,c.G)((()=>({name:e.defaultScriptName??"",projectId:e.projectId??null,message:null,valid:!0,async validate(){let t;this.message=null;try{t=await(e.validation?.({name:this.name,projectId:this.projectId},(e=>{this.message=e})))}catch{}this.valid=t??!0},async submit(){await this.validate(),y.valid&&t(this)}})),{name:r.sH.ref,projectId:r.sH.ref,message:r.sH.ref,valid:r.sH.ref,submit:r.XI.bound,validate:r.XI.bound},!1),j=y.valid?" ":b(y.message??"ui_rename_taken_or_invalid");return(0,s.jsxs)(l.n,{size:"small",className:n,fixedWidth:!0,children:[(0,s.jsx)(d.D,{title:b("plugin_resource_manager_scripts_save_script"),icon:"/icons/sql_script_m.svg",onReject:i}),(0,s.jsx)(u.a,{children:(0,s.jsx)(h.l,{ref:x,onSubmit:y.submit,children:(0,s.jsxs)(g.m,{center:!0,gap:!0,children:[(0,s.jsx)(_.g,{value:y.projectId,filter:t=>t.canEditResources&&t.id===(e.projectId??t.id),descriptionGetter:(e,t)=>t.length<=1?b("plugin_resource_manager_scripts_save_script_project_restriction_descripion"):void 0,autoHide:!0,onChange:e=>{y.projectId=e,y.validate()}}),(0,s.jsx)(p.F,{name:"name",state:y,error:!y.valid,disabled:null===y.projectId,description:j,onChange:y.validate,children:b("ui_name")+":"})]})})}),(0,s.jsxs)(v.Z,{children:[(0,s.jsx)(m.$,{type:"button",mod:["outlined"],onClick:i,children:(0,s.jsx)(S.H,{token:"ui_processing_cancel"})}),(0,s.jsx)(f.S,{}),(0,s.jsx)(m.$,{type:"button",mod:["unelevated"],disabled:!y.valid,onClick:y.submit,children:(0,s.jsx)(S.H,{token:"ui_processing_save"})})]})]})}))},18667:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(56265)]).then(i.bind(i,71113))).default;case"it":return(await Promise.all([i.e(32756),i.e(33884)]).then(i.bind(i,27965))).default;case"zh":return(await Promise.all([i.e(52041),i.e(11503)]).then(i.bind(i,36038))).default;case"fr":return(await Promise.all([i.e(29671),i.e(89122)]).then(i.bind(i,6840))).default;default:return(await Promise.all([i.e(41114),i.e(66741)]).then(i.bind(i,10799))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},82497:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>a});var s=i(1118),r=i(82103),n=i(5576);let a=class PluginBootstrap extends r.j{constructor(){super()}register(){}async load(){}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],a)},84144:(e,t,i)=>{i.d(t,{F:()=>s});const s=/^(?!\.)[^\\/:\\"]+$/u},51206:(e,t,i)=>{i.r(t),i.d(t,{ResourceManagerService:()=>c});var s=i(1118),r=i(94866),n=i(90781),a=i(5576),o=i(40601);let c=class ResourceManagerService{get enabled(){return!!this.serverConfigResource.data?.resourceManagerEnabled&&!!this.authInfoService.userInfo}constructor(e,t){this.authInfoService=e,this.serverConfigResource=t,(0,r.Gn)(this,{enabled:r.EW})}getRootFolder(e,t){const i=e.resourceTypes.find((e=>e.id===t));return this.serverConfigResource.distributed?i?.rootFolder:void 0}};c=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[n.AuthInfoService,o.ServerConfigResource])],c)},67921:(e,t,i)=>{i.r(t),i.d(t,{ResourceManagerSettingsService:()=>p});var s=i(1118),r=i(63716),n=i(5576),a=i(76761),o=i(70446),c=i(83916),l=i(80625),d=i(82607),u=i(3065),h=i(31038);const g=u.Ik({"plugin.resource-manager.disabled":h.W.stringedBoolean().default(!1)});let p=class ResourceManagerSettingsService extends r.O{get disabled(){return this.settings.getValue("plugin.resource-manager.disabled")}constructor(e,t,i){super(),this.settingsProviderService=e,this.settingsManagerService=t,this.settingsResolverService=i,this.settings=this.settingsProviderService.createSettings(g),this.settingsResolverService.addResolver(a.T,(0,o.q)(this.settingsResolverService,this.settings,{"plugin.resource-manager.disabled":"plugin_resource_manager.disabled"})),this.registerSettings()}registerSettings(){this.settingsManagerService.registerSettings(this.settings,(()=>[]))}};p=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[c.SettingsProviderService,l.SettingsManagerService,d.SettingsResolverService])],p)},43901:(e,t,i)=>{i.r(t),i.d(t,{DataSynchronizationResolverBootstrap:()=>I});var s=i(1118),r=i(82103),n=i(5576),a=i(19395),o=i(14452),c=i(40601),l=i(912),d=i(41773),u=i(7838),h=i(17675),g=i(64928),p=i(80317),v=i(12827),m=i(82614),S=i(9083),f=i(7167),_=i(60738),b=i(89232),x=i(18699),y=i(23448);const j={message:"message___u_oJw theme-typography--caption"},P={messageContent:"messageContent___xVdIw"},C=(0,u.PA)((function DataSynchronizationNotificationMessages({messages:e}){const t=(0,h.W)(),i=(0,y.sb)(e.map((e=>t(e.message)))).join("\n"),s=(0,g.d)(P);return(0,d.jsx)("div",{className:(0,f.s)(s,{messageContent:!0}),children:i},e[0].label)})),w=(0,u.PA)((function DataSynchronizationNotification({notification:e}){const t=(0,x.h)(l.DataSynchronizationService),i=(0,h.W)(),s=(0,y.zu)((0,y.$z)(Array.from(t.queue.values()),(e=>e.label))),r=(0,g.d)(j);function ignoreChanges(){e.close(!1)}return(0,d.jsxs)(p.f,{onClose:ignoreChanges,children:[(0,d.jsx)(v.Q,{status:a.R.Info}),(0,d.jsxs)(m.Z,{children:[(0,d.jsxs)(S.Q,{title:i(e.title),children:[e.message&&i(e.message),(0,d.jsx)("div",{className:(0,f.s)(r,{message:!0}),children:s.map(((e,t)=>(0,d.jsx)(C,{messages:e},t)))})]}),(0,d.jsxs)(_.J,{timestamp:e.timestamp,children:[(0,d.jsx)(b.$,{type:"button",mod:["outlined"],onClick:ignoreChanges,children:i("ui_ignore")}),(0,d.jsx)(b.$,{type:"button",mod:["unelevated"],onClick:function applyChanges(){t.resolveAll(!0),e.close(!1)},children:i("ui_apply")})]})]})]})}));let I=class DataSynchronizationResolverBootstrap extends r.j{constructor(e,t,i){super(),this.notificationService=e,this.serverConfigResource=t,this.dataSynchronizationService=i,this.activeNotification=null}register(){this.dataSynchronizationService.onSynchronizationRequest.addHandler(this.handleNetworkStateChange.bind(this))}load(){}handleNetworkStateChange(){this.activeNotification||this.serverConfigResource.configurationMode||(this.activeNotification=this.notificationService.customNotification((()=>w),{},{title:"plugin_root_data_sync_title",message:"plugin_root_data_sync_message",type:a.R.Info,onClose:()=>{this.dataSynchronizationService.resolveAll(!1),this.activeNotification=null}}))}};I=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[o.NotificationService,c.ServerConfigResource,l.DataSynchronizationService])],I)},93833:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(79550)]).then(i.bind(i,79263))).default;case"it":return(await Promise.all([i.e(32756),i.e(610)]).then(i.bind(i,87871))).default;case"zh":return(await Promise.all([i.e(52041),i.e(78229)]).then(i.bind(i,76900))).default;case"fr":return(await Promise.all([i.e(29671),i.e(45372)]).then(i.bind(i,82490))).default;default:return(await Promise.all([i.e(41114),i.e(22991)]).then(i.bind(i,27909))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},30766:(e,t,i)=>{i.r(t),i.d(t,{NetworkStateNotificationService:()=>c});var s=i(1118),r=i(82103),n=i(5576),a=i(14452),o=i(57486);let c=class NetworkStateNotificationService extends r.j{constructor(e,t){super(),this.notificationService=e,this.networkStateService=t,this.activeNotification=null}register(){this.networkStateService.networkStateExecutor.addHandler(this.handleNetworkStateChange.bind(this))}load(){}handleNetworkStateChange(e){if(e)this.activeNotification?.close(!0),this.activeNotification=null;else{if(this.activeNotification)return;this.activeNotification=this.notificationService.logInfo({title:"plugin_root_network_state_title",message:"plugin_root_network_state_description",persistent:!0})}}};c=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.NotificationService,o.NetworkStateService])],c)},5947:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>a});var s=i(1118),r=i(82103),n=i(5576);let a=class PluginBootstrap extends r.j{constructor(){super()}register(){}load(){}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],a)},28652:(e,t,i)=>{i.r(t),i.d(t,{ServerNodeChangedDialogService:()=>C});var s=i(1118),r=i(56392),n=i(82103),a=i(5576),o=i(71635),c=i(19395),l=i(14452),d=i(86120),u=i(17396),h=i(41773),g=i(7838),p=i(64928),v=i(17675),m=i(51477),S=i(62204),f=i(92659),_=i(7167),b=i(9428),x=i(89232),y=i(18699),j=i(48281);const P=(0,g.PA)((function ServerNodeChangedDialog({rejectDialog:e}){const t=(0,p.d)(j.A),i=(0,y.h)(u.RouterService),s=(0,v.W)();return(0,h.jsxs)(m.n,{size:"small",fixedSize:!0,children:[(0,h.jsx)(S.D,{title:"app_root_server_node_changed_title",onReject:e}),(0,h.jsx)(f.a,{noOverflow:!0,children:(0,h.jsx)("p",{className:(0,_.s)(t,{text:!0}),children:s("app_root_server_node_changed_message")})}),(0,h.jsxs)(b.Z,{className:(0,_.s)(t,{footer:!0}),children:[(0,h.jsx)(x.$,{type:"button",mod:["outlined"],onClick:e,children:s("ui_processing_cancel")}),(0,h.jsx)(x.$,{type:"button",mod:["unelevated"],onClick:function reload(){i.reload()},children:s("ui_processing_reload")})]})]})}));let C=class ServerNodeChangedDialogService extends n.j{constructor(e,t,i,s){super(),this.routerService=e,this.notificationService=t,this.commonDialogService=i,this.serverNodeService=s}register(){this.serverNodeService.onApplicationRunIdChange.addPostHandler(this.handleServerNodeChanged.bind(this))}load(){}async handleServerNodeChanged(){await this.commonDialogService.open(P,null)===o.DialogueStateResult.Rejected&&this.notificationService.customNotification((()=>r.o),{actionText:"ui_processing_reload",onAction:()=>this.routerService.reload()},{title:"app_root_server_node_changed_title",message:"app_root_server_node_changed_message",persistent:!0,type:c.R.Error})}};C=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[u.RouterService,l.NotificationService,o.CommonDialogService,d.ServerNodeService])],C)},82979:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(49524)]).then(i.bind(i,16049))).default;case"it":return(await Promise.all([i.e(32756),i.e(82381)]).then(i.bind(i,65045))).default;case"zh":return(await Promise.all([i.e(52041),i.e(4762)]).then(i.bind(i,89678))).default;case"fr":return(await Promise.all([i.e(29671),i.e(16667)]).then(i.bind(i,35136))).default;default:return(await Promise.all([i.e(41114),i.e(39048)]).then(i.bind(i,60103))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},97801:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>a});var s=i(1118),r=i(82103),n=i(5576);let a=class PluginBootstrap extends r.j{constructor(){super()}register(){}load(){}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],a)},86021:(e,t,i)=>{i.r(t),i.d(t,{SessionExpiredDialogBootstrap:()=>C});var s=i(1118),r=i(56392),n=i(82103),a=i(5576),o=i(71635),c=i(19395),l=i(14452),d=i(47956),u=i(17396),h=i(41773),g=i(7838),p=i(64928),v=i(17675),m=i(51477),S=i(62204),f=i(92659),_=i(7167),b=i(9428),x=i(89232),y=i(18699),j=i(48281);const P=(0,g.PA)((function SessionExpiredDialog({rejectDialog:e}){const t=(0,p.d)(j.A),i=(0,y.h)(u.RouterService),s=(0,v.W)();return(0,h.jsxs)(m.n,{size:"small",fixedSize:!0,children:[(0,h.jsx)(S.D,{title:"app_root_session_expired_title",onReject:e}),(0,h.jsx)(f.a,{noOverflow:!0,children:(0,h.jsx)("p",{className:(0,_.s)(t,{text:!0}),children:s("app_root_session_expired_message")})}),(0,h.jsx)(b.Z,{className:(0,_.s)(t,{footer:!0}),children:(0,h.jsx)(x.$,{type:"button",mod:["unelevated"],onClick:function reload(){i.reload()},children:s("ui_processing_reload")})})]})}));let C=class SessionExpiredDialogBootstrap extends n.j{constructor(e,t,i,s){super(),this.routerService=e,this.notificationService=t,this.commonDialogService=i,this.sessionExpireService=s}register(){this.sessionExpireService.onSessionExpire.addPostHandler(this.handleSessionExpired.bind(this))}load(){}async handleSessionExpired(){await this.commonDialogService.open(P,null)===o.DialogueStateResult.Rejected&&this.notificationService.customNotification((()=>r.o),{actionText:"ui_processing_reload",onAction:()=>this.routerService.reload()},{title:"app_root_session_expired_title",persistent:!0,type:c.R.Error})}};C=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[u.RouterService,l.NotificationService,o.CommonDialogService,d.SessionExpireService])],C)},56449:(e,t,i)=>{i.r(t),i.d(t,{SessionExpireWarningDialog:()=>p});var s=i(41773),r=i(7838),n=i(17675),a=i(64928),o=i(51477),c=i(62204),l=i(92659),d=i(7167),u=i(9428),h=i(89232),g=i(48281);const p=(0,r.PA)((function SessionExpireWarningDialog({rejectDialog:e}){const t=(0,n.W)(),i=(0,a.d)(g.A);return(0,s.jsxs)(o.n,{size:"small",fixedSize:!0,children:[(0,s.jsx)(c.D,{title:"app_root_session_expire_warning_title",onReject:e}),(0,s.jsx)(l.a,{noOverflow:!0,children:(0,s.jsx)("p",{className:(0,d.s)(i,{text:!0}),children:t("app_root_session_expire_warning_message")})}),(0,s.jsx)(u.Z,{className:(0,d.s)(i,{footer:!0}),children:(0,s.jsx)(h.$,{type:"button",mod:["unelevated"],onClick:e,children:t("app_root_session_expire_warning_button")})})]})}))},35:(e,t,i)=>{i.r(t),i.d(t,{SessionExpireWarningDialogBootstrap:()=>p});var s=i(1118),r=i(11130),n=i(50420),a=i(82103),o=i(5576),c=i(71635),l=i(47956),d=i(40601),u=i(77220),h=i(83336);const g=(0,n.j)((()=>Promise.all([i.e(11502),i.e(7542),i.e(67557),i.e(62570),i.e(95860),i.e(27143)]).then(i.bind(i,56449)).then((e=>e.SessionExpireWarningDialog))));let p=class SessionExpireWarningDialogBootstrap extends a.j{constructor(e,t,i,s,r,n){super(),this.commonDialogService=e,this.sessionExpireService=t,this.serverConfigResource=i,this.sessionResource=s,this.userInfoResource=r,this.graphQLService=n,this.dialogInternalPromise=null}register(){this.sessionExpireService.onSessionExpire.addHandler(this.close.bind(this)),this.sessionResource.onDataUpdate.addHandler((()=>{const{valid:e,remainingTime:t}=this.sessionResource.data||{};this.handleSessionResourceDataUpdate(e,t)}))}load(){}handleSessionResourceDataUpdate(e,t){if(!this.serverConfigResource.anonymousAccessEnabled&&!this.userInfoResource.data&&!this.serverConfigResource.configurationMode)return;if(!e)return this.close(),void this.sessionExpireService.sessionExpired();const i=this.serverConfigResource.data?.sessionExpireTime;this.sessionExpireService.expired||!i||i<l.SESSION_EXPIRE_MIN_TIME?this.close():void 0!==t&&t<=l.SESSION_EXPIRE_MIN_TIME?this.open():this.close()}async open(){if(!this.dialogInternalPromise&&(this.dialogInternalPromise=this.commonDialogService.open(g,null),await this.dialogInternalPromise,this.dialogInternalPromise=null,!this.sessionExpireService.expired)){const{sessionState:e}=await this.graphQLService.sdk.sessionState();e.valid?this.sessionResource.pingSession():this.sessionExpireService.sessionExpired()}}close(){this.dialogInternalPromise&&this.commonDialogService.rejectDialog(this.dialogInternalPromise)}};p=(0,s.Cg)([(0,o._)(),(0,s.Sn)("design:paramtypes",[c.CommonDialogService,l.SessionExpireService,d.ServerConfigResource,u.SessionResource,r.UserInfoResource,h.GraphQLService])],p)},19341:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(59888)]).then(i.bind(i,89523))).default;case"it":return(await Promise.all([i.e(32756),i.e(3221)]).then(i.bind(i,98131))).default;case"zh":return(await Promise.all([i.e(52041),i.e(25602)]).then(i.bind(i,24448))).default;case"fr":return(await Promise.all([i.e(29671),i.e(47983)]).then(i.bind(i,36462))).default;default:return(await Promise.all([i.e(41114),i.e(70364)]).then(i.bind(i,89697))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},56927:(e,t,i)=>{i.r(t),i.d(t,{SettingsAdministration:()=>_});var s=i(41773),r=i(7838),n=i(17675),a=i(64928),o=i(37046),c=i(84972),l=i(71120),d=i(16101),u=i(37797),h=i(62697),g=i(18699),p=i(14452),v=i(99433),m=i(73845);const S={form:"form___UavSs"},f=["server"],_=(0,r.PA)((function SettingsAdministration(){const e=(0,n.W)(),t=(0,g.h)(v.ServerSettingsService),i=(0,g.h)(p.NotificationService),r=((0,a.d)(S),t.isEdited());const _=(0,o.m)({async onSubmit(){await async function handleSave(){if(r)try{await t.save(),i.logSuccess({title:e("plugin_settings_administration_settings_save_success")})}catch(e){i.logException(e,"plugin_settings_administration_settings_save_fail")}}()}});return(0,s.jsx)(c.l,{context:_,contents:!0,children:(0,s.jsxs)(l.U,{parent:!0,vertical:!0,wrap:!0,gap:!0,children:[(0,s.jsx)(d.Y,{box:!0,keepSize:!0,children:(0,s.jsxs)(u.i,{rounded:!0,children:[(0,s.jsx)(h.c,{icon:"admin-save",viewBox:"0 0 24 24",disabled:!r,onClick:()=>_.submit(),children:e("ui_processing_save")}),(0,s.jsx)(h.c,{icon:"admin-cancel",viewBox:"0 0 24 24",disabled:!r,onClick:function handleReset(){t.resetChanges()},children:e("ui_processing_cancel")})]})}),(0,s.jsx)(m.w,{source:t,accessor:f})]})})}))},71918:(e,t,i)=>{i.r(t),i.d(t,{SettingsAdministrationPluginBootstrap:()=>u});var s=i(1118),r=i(10220),n=i(62586),a=i(50420),o=i(82103),c=i(5576);const l=(0,a.j)((()=>Promise.all([i.e(11502),i.e(7542),i.e(67557),i.e(64435),i.e(62570),i.e(95860),i.e(15126)]).then(i.bind(i,56927)).then((e=>e.SettingsAdministration)))),d=(0,a.j)((()=>Promise.all([i.e(97493),i.e(67557),i.e(95860),i.e(37507)]).then(i.bind(i,75569)).then((e=>e.SettingsDrawerItem))));let u=class SettingsAdministrationPluginBootstrap extends o.j{constructor(e){super(),this.administrationItemService=e}register(){this.administrationItemService.create({name:"settings",type:r._.Administration,order:2.2,getContentComponent:()=>l,getDrawerComponent:()=>d})}load(){}};u=(0,s.Cg)([(0,c._)(),(0,s.Sn)("design:paramtypes",[n.AdministrationItemService])],u)},75569:(e,t,i)=>{i.r(t),i.d(t,{SettingsDrawerItem:()=>c});var s=i(41773),r=i(70500),n=i(43659),a=i(48522),o=i(19259);const c=function SettingsDrawerItem({item:e,onSelect:t,disabled:i}){return(0,s.jsxs)(n.o,{tabId:e.name,disabled:i,onOpen:()=>t(e.name),children:[(0,s.jsx)(a.$,{icon:"/icons/cog-outline.svg"}),(0,s.jsx)(o.I,{children:(0,s.jsx)(r.H,{token:"plugin_settings_administration_drawer_item_title"})})]})}},4983:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>a});var s=i(1118),r=i(82103),n=i(5576);let a=class PluginBootstrap extends r.j{constructor(){super()}register(){}load(){}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],a)},63956:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>d});var s=i(1118),r=i(82103),n=i(5576),a=i(77495),o=i(72877),c=i(37178),l=i(38307);let d=class PluginBootstrap extends r.j{constructor(e){super(),this.menuService=e}register(){this.addTopAppMenuItems()}addTopAppMenuItems(){this.menuService.addCreator({menus:[c.w],getItems:(e,t)=>[...t,l.u],orderItems:(e,t)=>{const i=(0,a.H)(t,[l.u]);return[...t,...i]}})}};d=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[o.MenuService])],d)},38307:(e,t,i)=>{i.d(t,{u:()=>s});const s=(0,i(85240).E)("top-nav-bar-settings","ui_settings","/icons/plugin_settings_menu_m.svg","ui_settings")},33287:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(90134)]).then(i.bind(i,86725))).default;case"it":return(await Promise.all([i.e(32756),i.e(67753)]).then(i.bind(i,60297))).default;case"zh":return(await Promise.all([i.e(52041),i.e(34896)]).then(i.bind(i,63978))).default;case"fr":return(await Promise.all([i.e(29671),i.e(12515)]).then(i.bind(i,4596))).default;default:return(await Promise.all([i.e(41114),i.e(21562)]).then(i.bind(i,88595))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},55880:(e,t,i)=>{i.r(t),i.d(t,{Settings:()=>$});var s=i(41773),r=i(7838),n=i(15993),a=i(17675),o=i(14249),c=i(76652),l=i(16101),d=i(93424),u=i(65549);const h="settings-group-";function getSettingGroupId(e){return`${h}${e}`}var g=i(22680),p=i(86336),v=i(36938),m=i(48816),S=i(53006),f=i(14098),_=i(31938);const b=(0,r.PA)((0,n.forwardRef)((function GroupNodeControl({nodeId:e},t){const i=(0,n.useContext)(f.o),r=(0,n.useContext)(_.U),a=i.getNode(e),o=r.getNodeHeight(e);return(0,s.jsxs)(v.a,{ref:t,style:{height:o},children:[(0,s.jsx)(m.t,{leaf:a.leaf}),(0,s.jsx)(S.I,{title:a.tooltip,children:a.name})]})}))),groupNodeRenderer=()=>x,x=function GroupNodeRenderer(e){return(0,s.jsx)(p.b,{...e,controlRenderer:b})},y=(0,r.PA)((function SettingsGroups({treeData:e,onClick:t}){return(0,s.jsx)(g.P,{data:e,getNodeHeight:function getNodeHeight(e){return 24},nodeRenderers:[groupNodeRenderer],onNodeClick:t})}));var j=i(13821),P=i(44832),C=i(15380),w=i(86795),I=i(76228),D=i(39865),R=i(18699),k=i(82607),E=i(83916),L=i(83625),A=i(9724),N=i(51449);const M=(0,r.PA)((function Setting({source:e,setting:t}){const i=(0,R.h)(k.SettingsResolverService),r=(0,R.h)(E.SettingsProviderService),n=(0,a.W)(),o=n(t.name),c=n(t.description),l=!1,d=i.isReadOnly(t.key)??!1;let u=e.getEditedValue(t.key);if(!d&&(0,A.K)(u)||(u=i.getEditedValue(t.key)),t.key in r.schema.shape){const e=r.schema.shape[t.key];if(!(0,A.K)(u)){const t=e.safeParse(void 0);u=t.success?t.data:""}const i=e.safeParse(u);u=i.success?i.data:u}u=u??"";const h=(0,P.S)((e=>{if(!(t.key in r.schema.shape))return null;const i=r.schema.shape[t.key].safeParse(e);return i.success?null:(0,N.yu)(i.error,{prefix:null}).toString()}));function handleChange(i){e.setValue(t.key,i)}if(t.type===L.E.Checkbox)return(0,s.jsx)(C.G,{id:String(t.key),checked:u,label:o,title:o,caption:c,disabled:l,readOnly:d,groupGap:!0,onChange:handleChange});if(t.type===L.E.Select){const e=t.options?.map((e=>({...e,name:n(e.name)})))||[];return(0,s.jsx)(w.G,{id:String(t.key),items:e,keySelector:e=>e.value,valueSelector:e=>e.name,value:u,title:o,disabled:l,readOnly:d,description:c,small:!0,onSelect:handleChange,children:o})}return t.type===L.E.Textarea?(0,s.jsx)(I.T,{id:String(t.key),title:u,labelTooltip:c,value:u,disabled:l,readOnly:d,onChange:handleChange,children:o}):(0,s.jsx)(D.F,{ref:h,id:String(t.key),type:"text",title:u,labelTooltip:c,value:u,description:c,disabled:l,readOnly:d,small:!0,onChange:handleChange,children:o})}));var T=i(64928),z=i(7167),B=i(84237);const G={icon:"icon___oNecg",box:"box___bLVBu"},H=(0,r.PA)((function SettingsGroupTitle({group:e}){const t=(0,a.W)(),i=(0,T.d)(G);return(0,s.jsxs)("div",{className:(0,z.s)(i,{box:!0}),children:[e.parent&&e.parent!==d.P&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(SettingsGroupTitle,{group:e.parent}),(0,s.jsx)(B.I,{name:"arrow",className:(0,z.s)(i,{icon:!0}),viewBox:"0 0 16 16"})]}),(0,s.jsx)("div",{children:t(e.name)})]})})),V=(0,r.PA)((function SettingsGroup({group:e,source:t,settings:i}){return(0,s.jsxs)(l.Y,{id:getSettingGroupId(e.id),hidden:0===i.length,vertical:!0,gap:!0,children:[(0,s.jsx)(j.U,{sticky:!0,children:(0,s.jsx)(H,{group:e})}),i.map(((e,i)=>(0,s.jsx)(M,{source:t,setting:e},i)))]})}));function useTreeScrollSync(e,t){const i=(0,n.useRef)(null);return(0,n.useEffect)((()=>{const s=i.current;if(s)return s.addEventListener("scroll",syncScroll),()=>{s.removeEventListener("scroll",syncScroll)};function syncScroll(i){const s=i.target,r=function querySettingsGroups(e){return Array.from(e.querySelectorAll(`[id^="${h}"]`))}(s);let n;for(const e of r)if(e.offsetTop+e.offsetHeight>s.scrollTop){n=e;break}if(n){const i=function getSettingGroupIdFromElementId(e){return e.replace(h,"")}(n.id);let s=d.P.get(i);for(e.updateAllState({selected:!1,expanded:!1}),e.updateState(i,{selected:!0});s.parent&&s.parent!==d.P;)e.updateState(s.parent.id,{expanded:!0}),s=s.parent;t?.(i)}}})),i}const U=(0,r.PA)((function SettingsList({treeData:e,source:t,settings:i,onSettingsOpen:r}){const n=[],a=[...e.getChildren(e.rootId)],o=useTreeScrollSync(e,r);for(;a.length;){const t=a[0];a.splice(0,1,...e.getChildren(t));const s=d.P.get(t),r=i.get(s);n.push({group:s,settings:r||[]})}return(0,s.jsxs)(c.m,{ref:o,style:{height:"100%"},gap:!0,overflow:!0,children:[n.map((({group:e,settings:i})=>(0,s.jsx)(V,{group:e,source:t,settings:i},e.id))),(0,s.jsx)("div",{style:{height:"calc(100% - 100px)"},hidden:!0})]})}));var O=i(94866),W=i(15280),q=i(28347),F=i(80625);function useSettings(e){const t=(0,R.h)(F.SettingsManagerService);return(0,W.X)(useSettings,t.loaders),(0,q.G)((()=>({get settings(){const t=new Map,i=this.settingsManagerService.activeSettings.filter((t=>e?.some((e=>t.access.scope.includes(e))))).sort(((e,t)=>e.name.localeCompare(t.name)));for(const e of i)t.set(e.group,[...t.get(e.group)||[],e]);return t},get groups(){const e=new Set(this.settings.keys());for(const t of e)t.parent&&e.add(t.parent);return e},groupChildren(e){return(d.P.get(e)?.subGroups||[]).filter((e=>this.groups.has(e))).sort(((e,t)=>e.name.localeCompare(t.name)))}})),{settings:O.EW,groups:O.EW,settingsManagerService:O.sH.ref},{settingsManagerService:t,accessor:e})}const $=(0,r.PA)((function Settings({source:e,accessor:t}){const i=(0,a.W)(),r=useSettings(t),n=(0,u.U)({rootId:d.P.id,getNode(e){const t=d.P.get(e);return{name:i(t.name),leaf:!t?.subGroups.length}},getChildren:e=>(d.P.get(e)?.subGroups||[]).filter((e=>r.groups.has(e))).sort(((e,t)=>e.name.localeCompare(t.name))).map((e=>e.id)),load:()=>Promise.resolve()});if(0===r.settings.size)return(0,s.jsx)(o.x,{children:i("plugin_settings_panel_empty")});return(0,s.jsxs)(c.m,{gap:!0,overflow:!0,noWrap:!0,children:[(0,s.jsx)(l.Y,{style:{height:"100%",minWidth:"240px"},box:!0,keepSize:!0,overflow:!0,hidden:!0,children:(0,s.jsx)(y,{treeData:n,onClick:function handleClick(e){document.querySelector("#"+getSettingGroupId(e))?.scrollIntoView()}})}),(0,s.jsx)(c.m,{style:{height:"100%"},fill:!0,children:(0,s.jsx)(U,{treeData:n,source:e,settings:r.settings})})]})}))},73845:(e,t,i)=>{i.d(t,{w:()=>s});const s=(0,i(50420).j)((()=>Promise.all([i.e(11502),i.e(67557),i.e(95218),i.e(62570),i.e(95860),i.e(13158)]).then(i.bind(i,55880)).then((e=>e.Settings))))},9844:(e,t,i)=>{i.r(t),i.d(t,{SettingsPanelPluginBootstrap:()=>a});var s=i(1118),r=i(82103),n=i(5576);let a=class SettingsPanelPluginBootstrap extends r.j{constructor(){super()}register(){}load(){}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],a)},9144:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(61418)]).then(i.bind(i,97404))).default;case"it":return(await Promise.all([i.e(32756),i.e(83799)]).then(i.bind(i,92828))).default;case"zh":return(await Promise.all([i.e(52041),i.e(6180)]).then(i.bind(i,63831))).default;case"fr":return(await Promise.all([i.e(29671),i.e(28561)]).then(i.bind(i,61405))).default;default:return(await Promise.all([i.e(41114),i.e(50942)]).then(i.bind(i,40498))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},76382:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>S});var s=i(1118),r=i(82103),n=i(5576),a=i(14452),o=i(69740),c=i(70027),l=i(47074),d=i(79023),u=i(81604),h=i(72877),g=i(27929),p=i(64486),v=i(67184),m=i(5615);let S=class PluginBootstrap extends r.j{constructor(e,t,i,s,r,n){super(),this.actionService=e,this.keyBindingService=t,this.sqlEditorScreenService=i,this.notificationService=s,this.menuService=r,this.sqlDataSourceService=n}register(){this.actionService.addHandler({id:"sql-editor-screen",actions:[c.A],contexts:[g.M],isDisabled:e=>{const t=e.get(g.M),i=this.sqlDataSourceService.get(t.editorId);return void 0===i?.executionContext},handler:this.openTab.bind(this)}),this.keyBindingService.addKeyBindingHandler({id:"sql-editor",binding:l.L,actions:[c.A],contexts:[g.M],handler:this.openTab.bind(this)}),this.menuService.addCreator({menus:[o.Y],contexts:[g.M,v.U],getItems:(e,t)=>[c.A,...t]})}openTab(e,t){const i=e.get(g.M),s=this.sqlDataSourceService.get(i.editorId);if(!s?.executionContext)return void this.notificationService.logError({title:"sql_editor_screen_no_context_title",message:"sql_editor_screen_no_context_message"});const r=this.sqlEditorScreenService.createURL({contextId:s.executionContext.id});window.open(r,"_blank")?.focus()}};S=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[d.ActionService,u.KeyBindingService,m.SqlEditorScreenService,a.NotificationService,h.MenuService,p.SqlDataSourceService])],S)},553:(e,t,i)=>{i.r(t),i.d(t,{SqlEditorScreenBootstrap:()=>c});var s=i(1118),r=i(82103),n=i(5576),a=i(71086),o=i(5615);let c=class SqlEditorScreenBootstrap extends r.j{constructor(e,t){super(),this.screenService=e,this.sqlEditorScreenService=t}register(){this.screenService.create(this.sqlEditorScreenService.screen)}load(){}};c=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.ScreenService,o.SqlEditorScreenService])],c)},5615:(e,t,i)=>{i.r(t),i.d(t,{SqlEditorScreenService:()=>P});var s=i(1118),r=i(5576),n=i(71086),a=i(41773),o=i(94866),c=i(7838),l=i(17675),d=i(84383),u=i(28347),h=i(69519),g=i(14249),p=i(30606),v=i(13225),m=i(18699),S=i(40813),f=i(35721),_=i(64486),b=i(20740),x=i(60088),y=i(16476);const j=(0,c.PA)((function SqlEditorScreen({contextId:e}){const t=(0,l.W)(),i=(0,d.q)(SqlEditorScreen,p.ConnectionExecutionContextResource,S.fZ),s=(0,m.h)(_.SqlDataSourceService),r=(0,m.h)(b.SqlEditorService),n=(0,m.h)(v.ConnectionExecutionContextService).get(e),c=(0,u.G)((()=>({get dataSource(){if(this.state)return s.get(this.state.editorId)},state:null,setState(e){if(e){const t=(0,f.u)();this.state=r.getState(t,x.N.key,0,void 0),s.create(this.state,x.N.key,{script:"",executionContext:e})}else this.state=null}})),{state:o.sH},!1);return n?.context?.id!==c.dataSource?.executionContext?.id&&c.setState(n?.context),(0,a.jsx)(h.a,{state:[i],children:c.state?(0,a.jsx)(y.m,{state:c.state}):(0,a.jsx)(g.x,{children:t("sql_editor_screen_context_not_found")})})}));let P=class SqlEditorScreenService{constructor(e){this.screenService=e,this.screen={name:"sql-editor",routes:[{name:"sql-editor",path:"/sql-editor/:contextId"}],component:j}}createURL(e){return this.screenService.buildUrl(this.screen.name,e)}navigate(e){this.screenService.navigate(this.screen.name,e)}};P=(0,s.Cg)([(0,r._)(),(0,s.Sn)("design:paramtypes",[n.ScreenService])],P)},58940:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(69572)]).then(i.bind(i,55088))).default;case"it":return(await Promise.all([i.e(32756),i.e(47191)]).then(i.bind(i,79264))).default;case"zh":return(await Promise.all([i.e(52041),i.e(77030)]).then(i.bind(i,54947))).default;case"fr":return(await Promise.all([i.e(29671),i.e(54649)]).then(i.bind(i,51857))).default;default:return(await Promise.all([i.e(41114),i.e(92745)]).then(i.bind(i,54062))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},16686:(e,t,i)=>{i.r(t),i.d(t,{TaskManagerPluginBootstrap:()=>l});var s=i(1118),r=i(16851),n=i(82103),a=i(5576),o=i(14452),c=i(80713);let l=class TaskManagerPluginBootstrap extends n.j{constructor(e,t){super(),this.taskManagerService=e,this.notificationService=t,this.notification=null}register(){this.taskManagerService.onDataUpdate.addHandler(this.updateNotification.bind(this))}updateNotification(){if(0===this.taskManagerService.pendingTasks.length)return this.notification?.notification.close(),void(this.notification=null);this.notification||(this.notification=this.notificationService.processNotification((()=>r.N),{},{title:"plugin_task_manager_notification_title"})),this.notification.controller.setMessage(this.taskManagerService.pendingTasks.map(getMessage).join("\n"))}};function getMessage(e){if(e.exception)return e.exception.message;let t=e.getMessage();return e.getProgress&&(t+=` (${Math.floor(100*e.getProgress())}%)`),t}l=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[c.TaskManagerService,o.NotificationService])],l)},76258:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>a});var s=i(1118),r=i(82103),n=i(5576);let a=class PluginBootstrap extends r.j{constructor(){super()}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],a)},90475:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(95704)]).then(i.bind(i,22934))).default;case"it":return(await Promise.all([i.e(32756),i.e(18085)]).then(i.bind(i,87485))).default;case"zh":return(await Promise.all([i.e(52041),i.e(40466)]).then(i.bind(i,38758))).default;case"fr":return(await Promise.all([i.e(29671),i.e(19622)]).then(i.bind(i,43064))).default;default:return(await Promise.all([i.e(41114),i.e(97241)]).then(i.bind(i,56591))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},51293:(e,t,i)=>{i.d(t,{e:()=>s});const s=(0,i(85240).E)("tools","plugin_tools_panel_menu_title","/icons/plugin_tools_panel_m.svg","plugin_tools_panel_menu_title")},14337:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>g});var s=i(1118),r=i(15993),n=i(21661),a=i(82103),o=i(5576),c=i(72877),l=i(76635),d=i(51293),u=i(25466);const h=r.lazy((async()=>{const{ToolsPanel:e}=await Promise.all([i.e(11502),i.e(97493),i.e(67557),i.e(70639),i.e(62570),i.e(95860),i.e(73323)]).then(i.bind(i,85379));return{default:e}}));let g=class PluginBootstrap extends a.j{constructor(e,t,i){super(),this.appScreenService=e,this.menuService=t,this.toolsPanelService=i}register(){this.appScreenService.rightAreaBottom.add(h,void 0,(()=>this.toolsPanelService.disabled||0===this.toolsPanelService.tabsContainer.getDisplayed().length)),this.menuService.addCreator({menus:[l._],getItems:(e,t)=>[...t,d.e]}),this.menuService.setHandler({id:"tools-menu-base",menus:[d.e],isLabelVisible:()=>!1,isHidden:()=>this.toolsPanelService.disabled})}};g=(0,s.Cg)([(0,o._)(),(0,s.Sn)("design:paramtypes",[n.AppScreenService,c.MenuService,u.ToolsPanelService])],g)},85379:(e,t,i)=>{i.d(t,{ToolsPanel:()=>S});var s=i(41773),r=i(94866),n=i(7838),a=i(15993),o=i(64928),c=i(92230),l=i(7167),d=i(18699),u=i(22321),h=i(44451),g=i(52843),p=i(38387);const v={tabList:"tabList___Z2kAx",box:"box___p9MBV theme-background-secondary theme-text-on-surface",contentBox:"contentBox___sz8dx theme-border-color-background"};var m=i(25466);const S=(0,n.PA)((function ToolsPanel(){const e=(0,d.h)(m.ToolsPanelService),t=(0,o.d)(v),i=(0,c.P)("tools",(()=>({selectedTabId:void 0}))),n=e.tabsContainer.getIdList(),S=(0,a.useRef)(n),f=(0,p.x)(S.current,n);return(0,r.O8)((0,r.XI)((()=>{if(!f){for(const e of n)if(!S.current.includes(e)){i.selectedTabId=e;break}S.current=n}i.selectedTabId&&(n.includes(i.selectedTabId)||(n.length>0?i.selectedTabId=n[0]:i.selectedTabId=void 0))}))),(0,s.jsx)(u._,{currentTabId:i.selectedTabId,container:e.tabsContainer,lazy:!0,onChange:function handleTabChange(e){i.selectedTabId=e.tabId},children:(0,s.jsxs)("div",{className:(0,l.s)(t,{box:!0}),children:[(0,s.jsx)(h.w,{className:(0,l.s)(t,{tabList:!0}),underline:!0}),(0,s.jsx)("div",{className:(0,l.s)(t,{contentBox:!0}),children:(0,s.jsx)(g.A,{})})]})})}))},25466:(e,t,i)=>{i.r(t),i.d(t,{ToolsPanelService:()=>c});var s=i(1118),r=i(94866),n=i(5576),a=i(68356),o=i(72902);let c=class ToolsPanelService{get disabled(){return this.toolsPanelSettingsService.disabled}constructor(e){this.toolsPanelSettingsService=e,this.tabsContainer=new a.a("Tools"),(0,r.Gn)(this,{disabled:r.EW})}};c=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[o.ToolsPanelSettingsService])],c)},72902:(e,t,i)=>{i.r(t),i.d(t,{ToolsPanelSettingsService:()=>g});var s=i(1118),r=i(63716),n=i(5576),a=i(83625),o=i(83916),c=i(80625),l=i(3065),d=i(31038);const u=i(93424).P.createSubGroup("plugin_tools_panel_tools_settings_group"),h=l.Ik({"plugin.tools-panel.disabled":d.W.stringedBoolean().default(!1)});let g=class ToolsPanelSettingsService extends r.O{get disabled(){return this.settings.getValue("plugin.tools-panel.disabled")}constructor(e,t){super(),this.settingsProviderService=e,this.settingsManagerService=t,this.settings=this.settingsProviderService.createSettings(h),this.registerSettings()}registerSettings(){this.settingsManagerService.registerSettings(this.settings,(()=>[{key:"plugin.tools-panel.disabled",access:{scope:["server"]},group:u,type:a.E.Checkbox,name:"plugin_tools_panel_settings_disable_label",description:"plugin_tools_panel_settings_disable_description"}]))}};g=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[o.SettingsProviderService,c.SettingsManagerService])],g)},95749:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>u});var s=i(1118),r=i(82103),n=i(5576),a=i(74887),o=i(41773),c=i(18699),l=i(87335);const d=function PublicTopNavBar({className:e}){const t=(0,c.h)(a.AdministrationTopAppBarService);return(0,o.jsx)(l.A,{className:e,container:t.placeholder})};let u=class PluginBootstrap extends r.j{constructor(e){super(),this.administrationTopAppBarService=e}register(){this.administrationTopAppBarService.navBarPlaceholder.add(d)}load(){}};u=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.AdministrationTopAppBarService])],u)},23295:(e,t,i)=>{i.r(t),i.d(t,{AdministrationTopAppBarBootstrap:()=>l});var s=i(1118),r=i(82103),n=i(5576),a=i(74887),o=i(6780),c=i(30135);let l=class AdministrationTopAppBarBootstrap extends r.j{constructor(e,t){super(),this.administrationTopAppBarService=e,this.wizardTopAppBarService=t}register(){this.administrationTopAppBarService.placeholder.add(c.g,0),this.wizardTopAppBarService.placeholder.add(c.g,0)}load(){}};l=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.AdministrationTopAppBarService,o.WizardTopAppBarService])],l)},90742:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>h});var s=i(1118),r=i(21661),n=i(82103),a=i(5576),o=i(41773),c=i(18699),l=i(87335),d=i(11677);const u=function PublicTopNavBar({className:e}){const t=(0,c.h)(d.TopNavService);return(0,o.jsx)(l.A,{className:e,container:t.placeholder})};let h=class PluginBootstrap extends n.j{constructor(e){super(),this.appScreenService=e}register(){this.appScreenService.placeholder.add(u)}load(){}};h=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[r.AppScreenService])],h)},6937:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>c});var s=i(1118),r=i(82103),n=i(5576),a=i(74887),o=i(1510);let c=class PluginBootstrap extends r.j{constructor(e){super(),this.administrationTopAppBarService=e}register(){this.administrationTopAppBarService.placeholder.add(o.B,4)}load(){}};c=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.AdministrationTopAppBarService])],c)},61686:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(30049)]).then(i.bind(i,92058))).default;case"it":return(await Promise.all([i.e(32756),i.e(36078)]).then(i.bind(i,63270))).default;case"zh":return(await Promise.all([i.e(52041),i.e(79936)]).then(i.bind(i,80453))).default;case"fr":return(await Promise.all([i.e(29671),i.e(57555)]).then(i.bind(i,29255))).default;default:return(await Promise.all([i.e(41114),i.e(35174)]).then(i.bind(i,54072))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},80038:(e,t,i)=>{i.r(t),i.d(t,{UserProfileSettings:()=>S});var s=i(41773),r=i(7838),n=i(17675),a=i(37046),o=i(84972),c=i(71120),l=i(16101),d=i(37797),u=i(62697),h=i(18699),g=i(14452),p=i(80054),v=i(73845);const m=["client"],S=(0,r.PA)((function UserProfileSettings(){const e=(0,n.W)(),t=(0,h.h)(p.UserSettingsService),i=(0,h.h)(g.NotificationService),r=t.isEdited();const S=(0,a.m)({async onSubmit(){await async function handleSave(){if(r)try{await t.save(),i.logSuccess({title:"plugin_user_profile_settings_save_success"})}catch(e){i.logException(e,"plugin_user_profile_settings_save_fail")}}()}});return(0,s.jsx)(o.l,{context:S,contents:!0,children:(0,s.jsxs)(c.U,{parent:!0,compact:!0,vertical:!0,wrap:!0,gap:!0,children:[(0,s.jsx)(l.Y,{box:!0,keepSize:!0,children:(0,s.jsxs)(d.i,{rounded:!0,minHeight:!0,children:[(0,s.jsx)(u.c,{icon:"admin-save",viewBox:"0 0 24 24",disabled:!r,onClick:()=>S.submit(),children:e("ui_processing_save")}),(0,s.jsx)(u.c,{icon:"admin-cancel",viewBox:"0 0 24 24",disabled:!r,onClick:function handleReset(){t.resetChanges()},children:e("ui_processing_cancel")}),(0,s.jsx)(u.c,{icon:"/icons/settings_restore_defaults2_m.svg#root",viewBox:"0 0 24 24",svg:!0,onClick:function handleRestoreDefaults(){t.restoreDefaults()},children:e("plugin_user_profile_settings_restore_defaults")})]})}),(0,s.jsx)(v.w,{source:t,accessor:m})]})})}))},88039:(e,t,i)=>{i.r(t),i.d(t,{UserProfileSettingsPluginBootstrap:()=>_});var s=i(1118),r=i(50420),n=i(26533),a=i(82103),o=i(5576),c=i(71635),l=i(86764),d=i(80054),u=i(90376),h=i(72877),g=i(79023),p=i(38307),v=i(63582),m=i(97706);const S=(0,r.j)((()=>Promise.all([i.e(11502),i.e(67557),i.e(95860),i.e(12793)]).then(i.bind(i,80038)).then((e=>e.UserProfileSettings)))),f="settings";let _=class UserProfileSettingsPluginBootstrap extends a.j{constructor(e,t,i,s,r,n){super(),this.userProfileTabsService=e,this.menuService=t,this.actionService=i,this.userProfileOptionsPanelService=s,this.userSettingsService=r,this.commonDialogService=n}register(){this.userProfileOptionsPanelService.onClose.addHandler((async(e,t)=>{if(!this.userSettingsService.isEdited())return;await this.commonDialogService.open(n.K,{title:"ui_save_reminder",message:"ui_are_you_sure"})!==c.DialogueStateResult.Rejected?this.userSettingsService.resetChanges():l.a.interrupt(t)})),this.userProfileTabsService.tabContainer.add({key:f,name:"plugin_user_profile_settings_tab_label",order:2,panel:()=>S}),this.menuService.addCreator({menus:[p.u],getItems:(e,t)=>[...t,u.$]}),this.actionService.addHandler({id:"settings",actions:[u.$],getActionInfo:(e,t)=>({...t,icon:void 0,label:"plugin_user_profile_settings_tab_label",tooltip:"plugin_user_profile_settings_action_description"}),handler:()=>{this.userProfileOptionsPanelService.open(f)}})}};_=(0,s.Cg)([(0,o._)(),(0,s.Sn)("design:paramtypes",[v.UserProfileTabsService,h.MenuService,g.ActionService,m.UserProfileOptionsPanelService,d.UserSettingsService,c.CommonDialogService])],_)},55131:(e,t,i)=>{i.r(t),i.d(t,{DockerUpdateInstructions:()=>h});var s=i(41773),r=i(7838),n=i(17675),a=i(64928),o=i(16101),c=i(13821),l=i(84836),d=i(7167);const u={groupItem:"groupItem___C_7Ck",h4:"h4___jJcZ5",ol:"ol___Jvu3B"},h=(0,r.PA)((function DockerUpdateInstructions(){const e=(0,n.W)(),t=(0,a.d)(u);return(0,s.jsxs)(o.Y,{gap:!0,large:!0,children:[(0,s.jsx)(c.U,{children:e("version_update_how_to_update")}),(0,s.jsxs)(l.N,{className:(0,d.s)(t,{groupItem:!0}),children:[(0,s.jsx)("h4",{className:(0,d.s)(t,{h4:!0}),children:"The following instructions apply only when you run CloudBeaver in a Docker container."}),(0,s.jsxs)("ol",{className:(0,d.s)(t,{ol:!0}),children:[(0,s.jsxs)("li",{children:["Stop the existing container by running the ",(0,s.jsx)("strong",{children:"docker stop"})," command."]}),(0,s.jsxs)("li",{children:["Use the ",(0,s.jsx)("strong",{children:"docker rm"})," command to remove it."]}),(0,s.jsxs)("li",{children:["Use the ",(0,s.jsx)("strong",{children:"docker pull"})," command to download the image from the Docker Hub."," "]}),(0,s.jsxs)("li",{children:["Re-create the container by executing the ",(0,s.jsx)("strong",{children:"docker run"})," command."," "]})]})]})]})}))},95366:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(44336)]).then(i.bind(i,61738))).default;case"it":return(await Promise.all([i.e(32756),i.e(77193)]).then(i.bind(i,30870))).default;case"zh":return(await Promise.all([i.e(52041),i.e(99574)]).then(i.bind(i,81077))).default;case"fr":return(await Promise.all([i.e(29671),i.e(53383)]).then(i.bind(i,47095))).default;default:return(await Promise.all([i.e(41114),i.e(75764)]).then(i.bind(i,56584))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},76568:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>g});var s=i(1118),r=i(10220),n=i(62586),a=i(50420),o=i(82103),c=i(5576),l=i(61056);const d=(0,a.j)((()=>Promise.all([i.e(11502),i.e(67557),i.e(95860),i.e(87669)]).then(i.bind(i,55131)).then((e=>e.DockerUpdateInstructions)))),u=(0,a.j)((()=>Promise.all([i.e(11502),i.e(67557),i.e(11116),i.e(62570),i.e(95860),i.e(10050)]).then(i.bind(i,5922)).then((e=>e.VersionUpdate)))),h=(0,a.j)((()=>Promise.all([i.e(11502),i.e(97493),i.e(67557),i.e(95860),i.e(21955)]).then(i.bind(i,10622)).then((e=>e.VersionUpdateDrawerItem))));let g=class PluginBootstrap extends o.j{constructor(e,t){super(),this.administrationItemService=e,this.versionUpdateService=t}register(){this.administrationItemService.create({name:"version-update",type:r._.Administration,getContentComponent:()=>u,getDrawerComponent:()=>h}),this.versionUpdateService.registerGeneralInstruction((()=>d))}};g=(0,s.Cg)([(0,c._)(),(0,s.Sn)("design:paramtypes",[n.AdministrationItemService,l.VersionUpdateService])],g)},5922:(e,t,i)=>{i.r(t),i.d(t,{VersionUpdate:()=>N});var s=i(41773),r=i(7838),n=i(64928),a=i(84383),o=i(71120),c=i(7167),l=i(18699),d=i(40813),u=i(58675),h=i(13886),g=i(61056),p=i(49158),v=i(17675),m=i(13720),S=i(90748),f=i(39755);const _=[[p.A,{mode:"append",styles:[{before:"before___P7oXB"}]}]],b=(0,r.PA)((function VersionChecker(){const e=(0,v.W)(),t=(0,l.h)(g.VersionUpdateService),i=(0,l.h)(u.VersionService),r=(0,l.h)(h.VersionResource),n=t.newVersionAvailable?"/icons/info_icon.svg":"/icons/success_icon.svg",a=t.newVersionAvailable?"version_update_new_version_available":"version_update_version_is_up_to_date",o=i.current&&r.latest?`${e("version_current")}: ${i.current}, ${e("version_latest")}: ${r.latest.number}`:"";return(0,s.jsx)(m.Z,{registry:_,children:(0,s.jsx)(S.f,{before:(0,s.jsx)(f.O,{icon:n,width:32}),description:t.newVersionAvailable?o:void 0,ripple:!1,big:!0,children:e(a)})})}));var x=i(15993),y=i(76652),j=i(16101),P=i(86795),C=i(84836),w=i(13821),I=i(40601),D=i(28978);const R={group:"group___ZFrWJ",reactMarkdown:"reactMarkdown___CA0CR"},k=(0,r.PA)((function VersionInfo({item:e}){const t=(0,v.W)(),i=(0,n.d)(R),r=(0,a.q)(VersionInfo,h.VersionResource,e).tryGetData;return(0,s.jsx)(y.m,{wrap:!0,gap:!0,overflow:!0,large:!0,children:(0,s.jsxs)(j.Y,{className:(0,c.s)(i,{group:!0}),gap:!0,overflow:!0,children:[(0,s.jsx)(w.U,{children:r?`Release notes ${r.number} - ${r.date}`:t("version_update_version_no_info")}),r&&(0,s.jsx)(C.N,{children:(0,s.jsx)(D.o,{className:(0,c.s)(i,{reactMarkdown:!0}),children:r.releaseNotes})})]})})})),E={group:"group___Y1XWr",instruction:"instruction___eqftJ",h4:"h4___Tv5ev"},L=(0,r.PA)((function VersionSelector({versions:e}){const t=(0,l.h)(g.VersionUpdateService),i=(0,l.h)(h.VersionResource),r=(0,l.h)(I.ServerConfigResource),a=(0,v.W)(),o=(0,n.d)(E),[d,u]=(0,x.useState)("");(0,x.useEffect)((()=>{i.latest?.number&&u(i.latest.number)}),[i.latest?.number]);const p=e.find((e=>e.number===d)),m=t.versionInstructionGetter?.();return(0,s.jsxs)(y.m,{gap:!0,children:[(0,s.jsxs)(j.Y,{className:(0,c.s)(o,{group:!0}),gap:!0,large:!0,children:[(0,s.jsx)(P.G,{items:e,keySelector:e=>e.number,valueSelector:e=>e.number,value:d,tiny:!0,onSelect:e=>u(e),children:a("plugin_version_update_administration_version_selector_label")}),p&&m&&(0,s.jsx)(C.N,{children:(0,s.jsx)(m,{className:(0,c.s)(o,{instruction:!0}),version:p,containerId:r.data?.containerId})}),(0,s.jsx)(w.U,{children:a("plugin_version_update_administration_recommendations_label")}),(0,s.jsx)(C.N,{children:(0,s.jsx)("h4",{className:(0,c.s)(o,{h4:!0}),children:a("plugin_version_update_administration_recommendations")})})]}),p&&(0,s.jsx)(k,{item:p.number})]})})),A={coloredContainer:"coloredContainer___NXBP4 theme-typography--body2"},N=(0,r.PA)((function VersionUpdate(){const e=(0,n.d)(A),t=(0,l.h)(u.VersionService),i=(0,l.h)(g.VersionUpdateService),r=(0,a.q)(VersionUpdate,h.VersionResource,d.fZ,{silent:!0}),p=i.generalInstructionsGetter?.(),v=r.resource.values.filter((e=>t.greaterOrEqual(e.number,t.current)));return(0,s.jsxs)(o.U,{className:(0,c.s)(e,{coloredContainer:!0}),wrap:!0,gap:!0,overflow:!0,parent:!0,children:[(0,s.jsx)(b,{}),v.length>0&&(0,s.jsxs)(s.Fragment,{children:[p&&(0,s.jsx)(p,{}),(0,s.jsx)(L,{versions:v})]})]})}))},10622:(e,t,i)=>{i.r(t),i.d(t,{VersionUpdateDrawerItem:()=>f});var s=i(41773),r=i(7838),n=i(17675),a=i(64928),o=i(84383),c=i(7167),l=i(70500),d=i(18699),u=i(40813),h=i(43659),g=i(48522),p=i(19259),v=i(13886),m=i(61056);const S={tabTitle:"tabTitle___hPo_C",icon:"icon___sEBS7 theme-background-primary",iconOrImage:"iconOrImage___rvJQ7"},f=(0,r.PA)((function VersionUpdateDrawerItem({item:e,onSelect:t,disabled:i}){const r=(0,n.W)(),f=(0,d.h)(m.VersionUpdateService),_=(0,a.d)(S);return(0,o.q)(VersionUpdateDrawerItem,v.VersionResource,u.fZ,{silent:!0}),(0,s.jsxs)(h.o,{tabId:e.name,disabled:i,title:"version_update",onOpen:()=>t(e.name),children:[(0,s.jsx)(g.$,{className:(0,c.s)(_,{iconOrImage:!0}),icon:"/icons/version_update.svg"}),(0,s.jsx)(p.I,{className:(0,c.s)(_,{tabTitle:!0}),children:(0,s.jsx)(l.H,{token:"version_update"})}),f.newVersionAvailable&&(0,s.jsx)("div",{className:(0,c.s)(_,{icon:!0}),title:r("version_update_new_version_available")})]})}))},16233:(e,t,i)=>{i.r(t),i.d(t,{PluginBootstrap:()=>a});var s=i(1118),r=i(82103),n=i(5576);let a=class PluginBootstrap extends r.j{constructor(){super()}register(){}load(){}};a=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],a)},70246:(e,t,i)=>{i.r(t),i.d(t,{LocaleService:()=>o});var s=i(1118),r=i(82103),n=i(5576),a=i(34227);let o=class LocaleService extends r.j{constructor(e){super(),this.localizationService=e}register(){this.localizationService.addProvider(this.provider.bind(this))}load(){}async provider(e){switch(e){case"ru":return(await Promise.all([i.e(92436),i.e(22859)]).then(i.bind(i,19498))).default;case"it":return(await Promise.all([i.e(32756),i.e(478)]).then(i.bind(i,88630))).default;case"zh":return(await Promise.all([i.e(52041),i.e(78097)]).then(i.bind(i,55189))).default;case"fr":return(await Promise.all([i.e(29671),i.e(55716)]).then(i.bind(i,4855))).default;default:return(await Promise.all([i.e(41114),i.e(33335)]).then(i.bind(i,14344))).default}}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[a.LocalizationService])],o)},42660:(e,t,i)=>{i.r(t),i.d(t,{ProductBootstrap:()=>l});var s=i(1118),r=i(50420),n=i(82103),a=i(5576),o=i(61056);const c=(0,r.j)((()=>Promise.all([i.e(11502),i.e(67557),i.e(95860),i.e(45240)]).then(i.bind(i,87556)).then((e=>e.UpdateInstruction))));let l=class ProductBootstrap extends n.j{constructor(e){super(),this.versionUpdateService=e}register(){this.versionUpdateService.registerVersionInstruction((()=>c))}};l=(0,s.Cg)([(0,a._)(),(0,s.Sn)("design:paramtypes",[o.VersionUpdateService])],l)},87556:(e,t,i)=>{i.r(t),i.d(t,{UpdateInstruction:()=>n});var s=i(41773),r=i(52017);const n=function UpdateInstruction({version:e,containerId:t,className:i}){const n="{your container id}";return(0,s.jsx)("div",{className:i,children:(0,s.jsx)(r.C,{children:`sudo docker stop ${n}\n sudo docker rm ${n}\n sudo docker pull dbeaver/cloudbeaver:${e.number}\n sudo docker run -d --restart unless-stopped -p 8978:8978 -v /var/cloudbeaver/workspace:/opt/cloudbeaver/workspace dbeaver/cloudbeaver:${e.number}`})})}}}]);