????

Your IP : 18.216.130.198


Current Path : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/
Upload File :
Current File : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/core-ui-a8bf1b578cd188258ceb.js

/*! For license information please see ../license.txt */
"use strict";(self.webpackChunk_cloudbeaver_product_default=self.webpackChunk_cloudbeaver_product_default||[]).push([[97493],{20458:(e,t,a)=>{a.d(t,{A:()=>s});const s={placeholder:"placeholder___iDJB5 placeholder",tab:"tab___e9Wdy",actions:"actions___jnhEN",tabInner:"tabInner___rzYzv theme-typography--body2 tab",tabInnerSelected:"tabInnerSelected___ZbjYo",portal:"portal___wnMEB",tabAction:"tabAction___hJy9m",tabContainer:"tabContainer___XH9uq",tabOuter:"tabOuter___mIUct"}},66891:(e,t,a)=>{a.d(t,{A:()=>s});const s={tabIcon:"tabIcon___H3Urn",staticImage:"staticImage___PRLw1",iconOrImage:"iconOrImage___r9U7B",placeholder:"placeholder___Liz2o"}},28626:(e,t,a)=>{a.d(t,{A:()=>s});const s={tabTitle:"tabTitle___S8g5f",placeholder:"placeholder___zb8Te"}},98098:(e,t,a)=>{a.d(t,{A:()=>s});const s={tabList:"tabList___YGN0s",underline:"underline___mqpqQ underline___bZ0R1 underline___ZYbO7 underline___s4xNH",big:"big___QaDaR big___YoknT big___Pk3t_",vertical:"vertical___QLpFM vertical___gsVHC vertical___xWETa vertical___FVDNb vertical___vcFR3 vertical___TaUBR",rotated:"rotated___PcK50 rotated___zY6Hy rotated___GXWTp rotated___W8WeV"}},35090:(e,t,a)=>{a.d(t,{A:()=>s});const s={tabPanel:"tabPanel___rZV7J",contents:"contents___d44Ga"}},16835:(e,t,a)=>{a.r(t),a.d(t,{ClipboardBootstrap:()=>r});var s=a(1118),n=a(82103),i=a(5576),o=a(97950);let r=class ClipboardBootstrap extends n.j{constructor(e){super(),this.clipboardService=e}register(){}async load(){await this.clipboardService.tryActivateClipboard()}};r=(0,s.Cg)([(0,i._)(),(0,s.Sn)("design:paramtypes",[o.ClipboardService])],r)},97950:(e,t,a)=>{a.r(t),a.d(t,{ClipboardService:()=>d});var s=a(1118),n=a(94866),i=a(5576),o=a(19395),r=a(14452),l=a(6019);let d=class ClipboardService{get state(){return this.permissionUpdate>0&&this.readPermission?this.readPermission.state:"prompt"}constructor(e){this.notificationService=e,this.permissionUpdate=1,this.readPermission=null,this.clipboardValue=null,this.clipboardAvailable=!1,(0,n.Gn)(this,{clipboardValue:n.sH,permissionUpdate:n.sH})}async read(){if(!this.clipboardAvailable||"denied"===this.state)return null;try{const e=await navigator.clipboard.readText();this.clipboardValue=e}catch(e){this.clipboardAvailable=!1,this.clipboardValue=null,this.notificationService.logException(e,"Failed to read from clipboard","",!0),this.notificationService.logInfo({title:"ui_clipboard_access_denied_title",message:"ui_clipboard_access_denied_message"})}return this.clipboardValue}write(e,t){try{(0,l.l)(e),t&&this.notificationService.notify({title:"ui_copy_to_clipboard_copied"},o.R.Info)}catch(e){this.notificationService.logException(e,"ui_copy_to_clipboard_failed_to_copy")}}async tryActivateClipboard(){navigator.clipboard?(this.clipboardAvailable=!0,await this.updatePermissionStatus(),this.readPermission&&this.readPermission.addEventListener("change",(()=>{this.permissionUpdate++}))):this.clipboardAvailable=!1}async updatePermissionStatus(){try{this.readPermission=await navigator.permissions.query({name:"clipboard-read"})}catch(e){this.notificationService.logException(e,"Failed to get permission status","",!0),this.readPermission=null}}};d=(0,s.Cg)([(0,i._)(),(0,s.Sn)("design:paramtypes",[r.NotificationService])],d)},74091:(e,t,a)=>{a.r(t),a.d(t,{ContextMenu:()=>D});var s=a(41773),n=a(7838),i=a(15993),o=a(17675),r=a(34685),l=a(15280),d=a(77337),c=a(19780),h=a(18804),u=a(25334),b=a(33770),m=a(28103),p=a(75924),f=a(86162),_=a(45695),g=a(35493),x=a(85153),v=a(55511),C=a(6767),S=a(24483),I=a(47434),T=a(78570);const y=(0,n.PA)((function MenuActionElement({item:e,onClick:t}){const a=(0,o.W)(),n=e.action.actionInfo,i=e.action.isLoading();let r;function handleClick(){t(),e.action.activate()}null!==e.action.binding&&(r=(0,T.i)(e.action.binding.binding));const l=a(n.label);if("select"===n.type){const t=e.action.isChecked();return(0,s.jsx)(S.s,{hidden:e.hidden,id:e.id,"aria-label":l,disabled:e.disabled,name:e.id,value:l,checked:t,onClick:handleClick,children:(0,s.jsx)(p.B,{label:n.label,icon:(0,s.jsx)(I.s,{checked:t,mod:["primary","menu"],ripple:!1}),tooltip:n.tooltip,loading:i})})}if("checkbox"===n.type){const t=e.action.isChecked();return(0,s.jsx)(m.K,{hidden:e.hidden,id:e.id,"aria-label":l,disabled:e.disabled,name:e.id,value:l,checked:t,onClick:handleClick,children:(0,s.jsx)(p.B,{label:n.label,icon:(0,s.jsx)(f.S,{checked:t,mod:["primary","small"],ripple:!1}),tooltip:n.tooltip,loading:i})})}return(0,s.jsx)(u.D,{hidden:e.hidden,id:e.id,"aria-label":l,disabled:e.disabled,onClick:handleClick,children:(0,s.jsx)(p.B,{label:n.label,icon:n.icon,binding:r,tooltip:n.tooltip,loading:i})})}));var w=a(90398),j=a(12483),k=a(92687),P=a(86451);const A=(0,n.PA)((0,i.forwardRef)((function SubMenuElement({menuData:e,subMenu:t,itemRenderer:a,menuModal:n,menuRtl:o,onItemClose:u,...b},m){const f=(0,i.useRef)(),_=(0,j.b)({menu:t.menu,context:e.context}),[g,x]=(0,i.useState)(!1);(0,w.Z)(_.context,((e,a)=>{e.set(k.t,!0,a),e.set(P.x,t,a)}));const v=_.handler,C=(0,r.u)((()=>v?.isHidden?.(_.context)));(0,l.X)(SubMenuElement,_.loaders,!C,g);const S=(0,d.U)((()=>({handleItemClose(){f.current?.hide(),this.onItemClose?.()},hasBindings(){return this.subMenuData.items.some((e=>e instanceof h.n&&null!==e.action.binding))},handleVisibleSwitch(e){x(e),e&&(this.subMenu.events?.onOpen?.(),this.handler?.handler?.(this.subMenuData.context))}})),{subMenuData:_,menuData:e,handler:v,subMenu:t,onItemClose:u},["handleItemClose","hasBindings","handleVisibleSwitch"]);if(C)return null;const I=v?.iconComponent?.()??t.iconComponent?.(),T=v?.getExtraProps?.()??t.getExtraProps?.(),y=(0,r.u)((()=>v?.isLoading?.(_.context)||_.loaders.some((e=>e.isLoading()))||!1)),A=(0,r.u)((()=>v?.isLabelVisible?.(_.context,_.menu)??!0)),N=(0,r.u)((()=>v?.isDisabled?.(_.context))),D=(0,r.u)((()=>!_.loaders.some((e=>!e.isLoaded())))),L=v?.getInfo?.(_.context,_.menu),H=L?.label??t.label??t.menu.label,B=L?.icon??t.icon??t.menu.icon,E=L?.tooltip??t.tooltip??t.menu.tooltip,M=a,O=_.available||!D;return(0,s.jsx)(c.W,{...b,ref:m,menuRef:f,label:_.menu.label,items:()=>_.items.map((e=>f.current&&(0,s.jsx)(M,{item:e,menuData:_,rtl:o,modal:n,onItemClose:S.handleItemClose},e.id))),rtl:o,modal:n,placement:o?"left-start":"right-start",panelAvailable:O,disabled:N,getHasBindings:S.hasBindings,submenu:!0,onVisibleSwitch:S.handleVisibleSwitch,children:(0,s.jsx)(p.B,{label:H,displayLabel:A,icon:I?(0,s.jsx)(I,{item:t,...T}):B,tooltip:E,panelAvailable:O,loading:y,menu:!0})})}))),N=(0,n.PA)((function MenuItemRenderer({item:e,modal:t,rtl:a,menuData:n,onItemClose:r}){const l=(0,o.W)(),d=(0,i.useCallback)(((t=!0)=>{e.events?.onSelect?.(),e instanceof _.q||!t||r?.()}),[e,r]);if(e instanceof g.a){const t=e.getComponent();return(0,s.jsx)(t,{item:e,menuData:n,onClick:d})}if(e instanceof _.q)return(0,s.jsx)(u.D,{as:A,id:e.id,"aria-label":l(e.menu.label),hidden:e.hidden,itemRenderer:MenuItemRenderer,menuRtl:a,menuData:n,menuModal:t,subMenu:e,onItemClose:r,onClick:()=>d()});if(e instanceof x.w)return(0,s.jsx)(b.b,{});if(e instanceof h.n)return(0,s.jsx)(y,{item:e,menuData:n,onClick:d});if(e instanceof v.s)return(0,s.jsx)(m.K,{hidden:e.hidden,id:e.id,"aria-label":l(e.label),disabled:e.disabled,name:e.id,value:e.label,checked:e.checked,onClick:()=>d(!1),children:(0,s.jsx)(p.B,{label:e.label,icon:(0,s.jsx)(f.S,{checked:e.checked,mod:["primary","small"],ripple:!1}),tooltip:e.tooltip})});if(e instanceof C.y){const t=e.iconComponent?.(),a=e.getExtraProps?.();return(0,s.jsx)(u.D,{id:e.id,"aria-label":l(e.label),hidden:e.hidden,disabled:e.disabled,onClick:()=>d(),children:(0,s.jsx)(p.B,{label:e.label,icon:t?(0,s.jsx)(t,{item:e,...a}):e.icon,tooltip:e.tooltip})})}return null})),D=(0,n.PA)((0,i.forwardRef)((function ContextMenu({mouseContextMenu:e,menu:t,disclosure:a,children:n,placement:u,visible:b,onVisibleSwitch:m,modal:p,rtl:f,..._},g){const x=(0,o.W)(),[v,C]=(0,i.useState)(!1),S=t.handler,I=(0,r.u)((()=>S?.isHidden?.(t.context)||!1)),T=(0,r.u)((()=>S?.isLoading?.(t.context)||t.loaders.some((e=>e.isLoading()))||!1)),y=(0,r.u)((()=>T||S?.isDisabled?.(t.context)||!1)),w=(0,r.u)((()=>!t.available||I)),j=(0,i.useRef)();(0,l.X)({name:`${ContextMenu.name}(${t.menu.id})`},t.loaders,!w,v);const k=(0,d.U)((()=>({handleItemClose(){j.current?.hide()},hasBindings(){return this.menuData.items.some((e=>e instanceof h.n&&null!==e.action.binding))},handleVisibleSwitch(e){C(e),this.onVisibleSwitch?.(e),e&&this.handler?.handler?.(this.menuData.context)}})),{menuData:t,handler:S,onVisibleSwitch:m},["handleItemClose","hasBindings","handleVisibleSwitch"]);if(w)return null;const P="function"==typeof n?n({loading:T,disabled:y}):n;return(0,s.jsx)(c.W,{..._,ref:g,label:x(t.menu.label),title:x(t.menu.tooltip),items:()=>t.items.map((e=>j.current&&(0,s.jsx)(N,{item:e,menuData:t,rtl:f,modal:p,onItemClose:k.handleItemClose},e.id))),rtl:f,menuRef:j,modal:p,visible:b,mouseContextMenu:e,placement:u,disabled:y,disclosure:a,getHasBindings:k.hasBindings,onVisibleSwitch:k.handleVisibleSwitch,children:P})})))},23439:(e,t,a)=>{a.d(t,{t:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(7542),a.e(97493),a.e(67557),a.e(73676),a.e(11116),a.e(62570),a.e(95860),a.e(28286)]).then(a.bind(a,74091)).then((e=>e.ContextMenu))))},9666:(e,t,a)=>{a.r(t),a.d(t,{MenuBar:()=>N});var s=a(41773),n=a(7838),i=a(15993),o=a(98744),r=a(64928),l=a(15280),d=a(13720),c=a(7167),h=a(33770),u=a(34685),b=a(90398),m=a(45695),p=a(85153),f=a(18804),_=a(6767),g=a(12483),x=a(92687),v=a(86451),C=a(74091),S=a(68768),I=a(17675),T=a(84833),y=a(69519),w=a(39755),j=a(84237),k=a(26339);const P=(0,n.PA)((0,i.forwardRef)((function MenuBarItem({label:e,displayLabel:t=!0,loading:a=!1,hidden:n,icon:i,displaySubmenuMark:o,viewBox:l="0 0 24 24",className:d,...h},u){const b=(0,r.d)(k.A),m=(0,I.W)();a=(0,T.O)(a,100);const p=m(h.title);return(0,s.jsx)("button",{ref:u,className:(0,c.s)(b,{menuBarItem:!0,hidden:n},d),...h,title:p,"aria-label":p,children:(0,s.jsxs)("div",{className:(0,c.s)(b,{menuBarItemBox:!0}),children:[a?(0,s.jsx)("div",{className:(0,c.s)(b,{menuBarItemIcon:!0}),children:(0,s.jsx)(y.a,{className:(0,c.s)(b,{loader:!0}),small:!0,fullSize:!0})}):i&&(0,s.jsx)("div",{className:(0,c.s)(b,{menuBarItemIcon:!0}),children:(0,s.jsx)(y.a,{className:(0,c.s)(b,{loader:!0}),suspense:!0,small:!0,fullSize:!0,children:"string"==typeof i?(0,s.jsx)(w.O,{className:(0,c.s)(b,{iconOrImage:!0}),icon:i,viewBox:l}):i})}),e&&t&&(0,s.jsx)("div",{className:(0,c.s)(b,{menuBarItemLabel:!0}),children:m(e)}),o&&(0,s.jsx)("div",{className:(0,c.s)(b,{menuBarItemMark:!0}),children:(0,s.jsx)(j.I,{className:(0,c.s)(b,{icon:!0},d),name:"angle",viewBox:"0 0 15 8"})})]})})}))),A=[[o.A,{mode:"append",styles:[S.A]}]],N=(0,n.PA)((0,i.forwardRef)((function MenuBar({menu:e,nestedMenuSettings:t,rtl:a,className:n,...i},o){const h=(0,r.d)(S.A),u=e.items;return(0,l.X)(MenuBar,e.loaders),u.length?(0,s.jsx)(d.Z,{registry:A,children:(0,s.jsx)("div",{ref:o,className:(0,c.s)(h,{menuBar:!0},n),...i,children:u.map((n=>(0,s.jsx)(D,{item:n,menuData:e,nestedMenuSettings:t,rtl:a},n.id)))})}):null}))),D=(0,n.PA)((function MenuBarElement({item:e,menuData:t,nestedMenuSettings:a,className:n,rtl:o}){const r=(0,i.useCallback)((()=>{e.events?.onSelect?.()}),[e]);return e.hidden?null:e instanceof m.q?(0,s.jsx)(H,{item:e,menuData:t,className:n,rtl:o,nestedMenuSettings:a}):e instanceof p.w?(0,s.jsx)(h.b,{className:n}):e instanceof f.n?(0,s.jsx)(L,{item:e,className:n,onClick:r}):e instanceof _.y?(0,s.jsx)(P,{id:e.id,hidden:e.hidden,"aria-label":e.label,label:e.label,icon:e.icon,title:e.tooltip,disabled:e.disabled,className:n,onClick:r}):null})),L=(0,n.PA)((function MenuBarAction({item:e,className:t,onClick:a}){const n=e.action.actionInfo,i=e.action.isLoading(),o=e.action.isLabelVisible();return(0,s.jsx)(P,{id:e.id,hidden:e.hidden,"aria-label":n.label,label:n.label,displayLabel:o,icon:n.icon,title:n.tooltip,disabled:e.disabled,loading:i,className:t,onClick:function handleClick(){a(),e.action.activate()}})})),H=(0,n.PA)((function SubMenuItem({item:e,menuData:t,nestedMenuSettings:a,className:n,rtl:i}){const o=(0,g.b)({menu:e.menu,context:t.context});(0,b.Z)(o.context,((t,a)=>{o.context.set(x.t,!0,a),o.context.set(v.x,e,a)}));const r=o.handler,l=r?.hideIfEmpty?.(o.context)??!0,d=(0,u.u)((()=>o.items.every((e=>e.hidden))));if(l&&d)return null;const c=r?.iconComponent?.()??e.iconComponent?.(),h=r?.getExtraProps?.()??e.getExtraProps?.(),m=(0,u.u)((()=>r?.isLabelVisible?.(o.context,o.menu)??!0)),p=r?.getInfo?.(o.context,o.menu),f=p?.label??e.label??e.menu.label,_=p?.icon??e.icon??e.menu.icon,S=p?.tooltip??e.tooltip??e.menu.tooltip,I=o.itemCreators.length>0;return(0,s.jsx)(C.ContextMenu,{menu:o,className:n,rtl:i,disclosure:!0,...a,children:({loading:t,disabled:a})=>(0,s.jsx)(P,{id:e.id,hidden:e.hidden,"aria-label":e.menu.label,label:f,displayLabel:m,icon:c?(0,s.jsx)(c,{item:e,...h}):_,title:S,loading:t,disabled:a,displaySubmenuMark:I})})}))},93148:(e,t,a)=>{a.r(t),a.d(t,{DNDProvider:()=>o});var s=a(41773),n=a(13917),i=a(11522);const o=function DNDProvider({children:e}){return(0,s.jsx)(n.Q,{backend:i.t2,children:e})}},64083:(e,t,a)=>{a.d(t,{c:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(97493),a.e(11116),a.e(62570),a.e(66967)]).then(a.bind(a,93148)).then((e=>e.DNDProvider))))},88005:(e,t,a)=>{a.d(t,{H:()=>s});const s="@dnd"},94819:(e,t,a)=>{a.d(t,{p:()=>useDNDBox});var s=a(94866),n=a(15993),i=a(88011),o=a(77337),r=a(28347),l=a(88005);function useDNDBox(e){e=(0,o.U)({type:l.H,...e});const t=(0,n.useRef)(null),a=(0,r.G)((()=>({isOver:!1,isOverCurrent:!1,canDrop:!1,context:null})),{isOver:s.sH.ref,isOverCurrent:s.sH.ref,canDrop:s.sH.ref,context:s.sH.ref},!1),[,d]=(0,i.H)((()=>({accept:e.type,drop:(t,a)=>{!a.didDrop()&&a.isOver({shallow:!0})&&e.onDrop?.(t,a.getClientOffset())},hover:(t,a)=>{a.canDrop()&&e.onHover?.(t,a.getClientOffset())},canDrop:(t,a)=>e.canDrop?.(t,a.isOver({shallow:!0}))??!0,collect:e=>{(0,s.h5)((()=>{a.isOver=e.isOver(),a.isOverCurrent=e.isOver({shallow:!0}),a.canDrop=e.canDrop(),a.context=e.getItem()}))}})),[e]);return(0,o.U)((()=>({ref:t,state:a,setRef(e){this.setTargetRef(e),t.current=e}})),{setTargetRef:d},["setRef"])}},6472:(e,t,a)=>{a.d(t,{o:()=>useDNDData});var s=a(94866),n=a(10945),i=a(28347),o=a(77337),r=a(88005);function useDNDData(e,t={}){const a=(0,i.G)((()=>({isDragging:!1})),{isDragging:s.sH.ref},!1);t=(0,o.U)(t);const[,l,d]=(0,n.i)((()=>({type:r.H,item:e,canDrag:()=>!t.canDrag||t.canDrag(),collect:e=>{const s=e.isDragging();s!==a.isDragging&&(s?t.onDragStart?.():t.onDragEnd?.()),a.isDragging=s}})));return(0,i.G)((()=>({state:a,context:e,setTargetRef(e){this.setTarget(e)},setPreviewRef(e){this.setPreview(e)}})),{context:s.sH.ref},{context:e,setTarget:l,setPreview:d},["setTargetRef","setPreviewRef"])}},90035:(e,t,a)=>{a.r(t),a.d(t,{BaseForm:()=>v});var s=a(41773),n=a(7838),i=a(64928),o=a(17675),r=a(37046),l=a(15280),d=a(84972),c=a(76652),h=a(7167),u=a(6899),b=a(89232),m=a(86233),p=a(84645),f=a(54452),_=a(13707),g=a(76480);const x={bar:"bar___to8Du theme-border-color-background theme-background-secondary theme-text-on-secondary",tabList:"tabList___xMOil",contentBox:"contentBox___jxwrv theme-background-secondary theme-text-on-secondary theme-border-color-background"},v=(0,n.PA)((function BaseForm({service:e,state:t,onClose:a,onSubmit:n}){const v=(0,i.d)(x),C=(0,o.W)(),S=t.mode===g.c.Edit,I=t.isChanged(),T=(0,r.m)({async onSubmit(){const e=t.mode,a=await t.save();n?.({success:a,creating:e===g.c.Create})}});return(0,l.X)(BaseForm,t),(0,s.jsx)(d.l,{context:T,disabled:t.isDisabled,contents:!0,focusFirstChild:!0,children:(0,s.jsx)(_.TabsState,{container:e.parts,localState:t.parts,formState:t,children:(0,s.jsxs)(c.m,{compact:!0,parent:!0,noWrap:!0,vertical:!0,children:[(0,s.jsxs)(c.m,{className:(0,h.s)(v,{bar:!0}),gap:!0,keepSize:!0,noWrap:!0,children:[(0,s.jsxs)(c.m,{fill:!0,children:[(0,s.jsx)(u.M,{exception:(0,m.Wg)(t.exception),type:t.statusType,message:t.statusMessage}),(0,s.jsx)(p.TabList,{className:(0,h.s)(v,{tabList:!0}),underline:!0,big:!0})]}),(0,s.jsxs)(c.m,{keepSize:!0,noWrap:!0,center:!0,gap:!0,compact:!0,children:[a&&(0,s.jsx)(b.$,{type:"button",disabled:t.isDisabled,mod:["outlined"],onClick:a,children:C("ui_processing_cancel")}),(0,s.jsx)(b.$,{type:"button",disabled:t.isDisabled||!I,mod:["unelevated"],onClick:()=>T.submit(),children:C(S?"ui_processing_save":"ui_processing_create")})]})]}),(0,s.jsx)(c.m,{vertical:!0,overflow:!0,children:(0,s.jsx)(f.TabPanelList,{contents:!0})})]})})})}))},61041:(e,t,a)=>{a.d(t,{I:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(7542),a.e(97493),a.e(67557),a.e(73676),a.e(11116),a.e(62570),a.e(95860),a.e(40191)]).then(a.bind(a,90035)).then((e=>e.BaseForm))))},67098:(e,t,a)=>{a.d(t,{l:()=>FormBaseService});var s=a(46210),n=a(19395),i=a(86764),o=a(55803),r=a(68356);function formStatusContext(){return{saved:!0,messages:[],exception:null,info(e){this.messages.push(e)},error(e,t=null){this.messages.push(e),this.saved=!1,this.exception=t}}}var l=a(33845);class FormBaseService{constructor(e,t,a){this.localizationService=e,this.notificationService=t,this.handleSubmittingStatus=(e,t)=>{const a=t.getContext(formStatusContext);a.saved||i.a.interrupt(t),a.messages.length},this.handleValidation=(e,t)=>{const a=t.getContext(l.V);if(a.valid||i.a.interrupt(t),a.messages.length>0){const e=a.messages.map((e=>this.localizationService.translate(e)));this.notificationService.notify({title:"core_ui_form_save_error",message:e.join("\n")},a.valid?n.R.Info:n.R.Error)}},this.parts=new r.a(a),this.actionsContainer=new s.B,this.onConfigure=new o.t,this.onFillDefaultConfig=new o.t,this.onPrepareConfig=new o.t,this.onFormat=new o.t,this.onValidate=new o.t,this.onSubmit=new o.t,this.onState=new o.t,this.onSubmit.before(this.onPrepareConfig),this.onState.before(this.onPrepareConfig),this.onSubmit.addPostHandler(this.handleSubmittingStatus),this.onValidate.addPostHandler(this.handleValidation)}}},76480:(e,t,a)=>{var s;a.d(t,{c:()=>s}),function(e){e.Edit="edit",e.Create="create"}(s||(s={}))},15414:(e,t,a)=>{a.d(t,{o:()=>FormPart});var s=a(94866),n=a(3366),i=a(86764),o=a(17057);class FormPart{constructor(e,t){this.formState=e,this.initialState=t,this.state=(0,s.HO)(this.initialState),this.exception=null,this.promise=null,this.loaded=!1,this.loading=!1,this.formState.submitTask.addHandler((0,n.G)((()=>this.isLoaded()),this.save.bind(this))),this.formState.configureTask.addHandler((0,n.G)((()=>this.isLoaded()),this.configure.bind(this))),this.formState.formatTask.addHandler((0,n.G)((()=>this.isLoaded()),this.format.bind(this))),this.formState.validationTask.addHandler((0,n.G)((()=>this.isLoaded()),this.validate.bind(this))),(0,s.Gn)(this,{initialState:s.sH,state:s.sH,exception:s.sH.ref,promise:s.sH.ref,loaded:s.sH,loading:s.sH,setInitialState:s.XI})}isLoading(){return this.loading}isOutdated(){return!1}isLoaded(){return this.loaded}isError(){return null!==this.exception}isChanged(){return!(!this.loaded||this.initialState===this.state)&&!(0,o.X)(this.initialState,this.state)}async save(e,t){if(!this.loading){this.loading=!0;try{if(await this.loader(),!this.isChanged())return;if(await this.saveChanges(e,t),i.a.isInterrupted(t))return;this.loaded=!1,this.exception=null}catch(e){throw this.exception=e,e}finally{this.loading=!1}}}async load(){if(this.loading)return this.promise;try{this.loading=!0,this.promise=this.loader(),await this.promise,this.loaded=!0,this.exception=null}catch(e){this.exception=e}finally{this.promise=null,this.loading=!1}}async reload(){this.loaded=!1,await this.load()}reset(){this.setState((0,s.HO)(this.initialState))}setInitialState(e){this.initialState=e,this.isChanged()||this.setState((0,s.HO)(this.initialState))}setState(e){this.state=e}configure(e,t){}format(e,t){}validate(e,t){}}},54658:(e,t,a)=>{a.d(t,{a:()=>FormState});var s=a(94866),n=a(63801),i=a(81528),o=a(29606),r=a(86764),l=a(35721),d=a(31324),c=a(86233),h=a(88203);const u=(0,a(44745).M)("Form State");var b=a(76480),m=a(48619);class FormState{get isDisabled(){return this.isSaving||this.isLoading()}constructor(e,t,a){this.id=(0,l.u)(),this.service=t,this.dataContext=new n.y,this.mode=b.c.Create,this.parts=new d.C,this.state=a,this.isSaving=!1,this.statusMessage=null,this.statusType=null,this.exception=null,this.promise=null,this.configureTask=new o.Q(this,(()=>!0)),this.configureTask.addCollection(t.onConfigure),this.formStateTask=new o.Q(a,(()=>!0)),this.formStateTask.addCollection(t.onState).addPostHandler(this.updateFormState.bind(this)),this.fillDefaultConfigTask=new o.Q(this,(()=>!0)),this.fillDefaultConfigTask.addCollection(t.onFillDefaultConfig).next(this.formStateTask,(e=>e.state)),this.formatTask=new o.Q(this,(()=>!0)),this.formatTask.addCollection(t.onFormat),this.validationTask=new o.Q(this,(()=>!0)),this.validationTask.addCollection(t.onValidate).before(this.formatTask),this.submitTask=new o.Q(this,(()=>!0)),this.submitTask.addCollection(t.onSubmit).before(this.validationTask),this.dataContext.set(h.q,(0,h.J)(),this.id),this.dataContext.set(u,this,this.id),(0,i.T)(this.dataContext,e,this.id),(0,s.Gn)(this,{mode:s.sH,parts:s.sH.ref,promise:s.sH.ref,exception:s.sH.ref,isSaving:s.sH.ref,state:s.sH,isDisabled:s.EW,setMode:s.XI,setPartsState:s.XI,setException:s.XI,setState:s.XI})}isLoading(){return null!==this.promise||this.dataContext.get(h.q).loaders.some((e=>e.isLoading()))}isLoaded(){return!this.promise&&this.dataContext.get(h.q).loaders.every((e=>e.isLoaded()))}isError(){return this.dataContext.get(h.q).loaders.some((e=>e.isError()))}isOutdated(){return this.dataContext.get(h.q).loaders.some((e=>!0===e.isOutdated?.()))}isCancelled(){return this.dataContext.get(h.q).loaders.some((e=>!0===e.isCancelled?.()))}isChanged(){return Array.from(this.parts.values()).some((e=>e.isChanged()))}getPart(e,t){return this.parts.get(e.id,(()=>{if(this.dataContext.has(e))return this.dataContext.get(e);const a=t(this.dataContext,this.id);return this.dataContext.set(e,a,this.id),a}))}async load(e){if(null!==this.promise)return this.promise;(!this.isLoaded()||this.isOutdated()||e)&&(this.promise=(async()=>{try{await this.configureTask.execute(this);const e=this.dataContext.get(h.q).loaders;for(const t of e)if(!((0,c.B5)(t)||t.isLoaded()&&!0!==t.isOutdated?.()))try{await t.load()}catch{return}await this.fillDefaultConfigTask.execute(this),this.exception=null}catch(e){throw this.exception=e,e}finally{this.promise=null}})())}async reload(){await this.load(!0)}cancel(){const e=this.dataContext.get(h.q).loaders;for(const t of e)!0!==t.isCancelled?.()&&t.cancel?.()}reset(){for(const e of this.parts.values())e.reset()}setMode(e){return this.mode=e,this}setPartsState(e){return this.parts=e,this}setException(e){return this.exception=e,this}setState(e){return this.state=e,this}async save(){try{this.isSaving=!0;const e=await this.submitTask.execute(this);return!r.a.isInterrupted(e)&&(this.exception=null,!0)}catch(e){this.exception=e}finally{this.isSaving=!1}return!1}updateFormState(e,t){const a=t.getContext(m.D);this.mode===b.c.Create&&a.markEdited(),this.statusMessage=a.statusMessage,this.statusType=a.statusType}}},48619:(e,t,a)=>{a.d(t,{D:()=>formStateContext});var s=a(19395);function formStateContext(){return{edited:!1,disabled:!1,readonly:!1,statusMessage:null,statusType:null,markEdited(){this.edited=!0},setInfo(e){this.setMessage(e,s.R.Info)},setError(e){this.setMessage(e,s.R.Error)},setSuccess(e){this.setMessage(e,s.R.Success)},setLoading(e){this.setMessage(e,s.R.Loading)},setMessage(e,t){"string"==typeof this.statusMessage&&(this.statusMessage=[this.statusMessage]),null===this.statusMessage?this.statusMessage=e:this.statusMessage.push(e),this.statusType=t}}}},33845:(e,t,a)=>{function formValidationContext(){return{valid:!0,messages:[],info(e){this.messages.push(e)},error(e){this.messages.push(e),this.valid=!1}}}a.d(t,{V:()=>formValidationContext})},74528:(e,t,a)=>{a.r(t),a.d(t,{InlineEditor:()=>I});var s=a(41773),n=a(7838),i=a(15993),o=a(77337),r=a(64928),l=a(7167),d=a(69519),c=a(84237),h=a(39755),u=a(18699),b=a(71635),m=a(17675),p=a(51477),f=a(62204),_=a(92659),g=a(9428),x=a(89232);const v={textarea:"textarea___YY12g",footer:"footer___jIZk1"},C=(0,n.PA)((function EditorDialog({payload:e,resolveDialog:t,rejectDialog:a}){const n=(0,r.d)(v),o=(0,i.useRef)(null),[d,c]=(0,i.useState)(e),h=(0,i.useCallback)((e=>c(e.target.value)),[]),u=(0,i.useCallback)((()=>t(d)),[d,t]),b=(0,m.W)();return(0,i.useEffect)((()=>{setTimeout((()=>o.current?.focus()),100)}),[]),(0,s.jsxs)(p.n,{children:[(0,s.jsx)(f.D,{title:"app_shared_inlineEditor_dialog_title",onReject:a}),(0,s.jsx)(_.a,{children:(0,s.jsx)("textarea",{ref:o,className:(0,l.s)(n,{textarea:!0}),value:d,onChange:h})}),(0,s.jsxs)(g.Z,{className:(0,l.s)(n,{footer:!0}),children:[(0,s.jsx)(x.$,{type:"button",mod:["outlined"],onClick:a,children:b("app_shared_inlineEditor_dialog_cancel")}),(0,s.jsx)(x.$,{type:"button",mod:["unelevated"],onClick:u,children:b("app_shared_inlineEditor_dialog_apply")})]})]})})),S={input:"input___RrswX theme-typography--body2 theme-text-text-primary-on-light",editor:"editor___Q7c_R theme-border-color-background",editorActive:"editorActive___ofv_H",editorContainer:"editorContainer___C3u6x",editorActions:"editorActions___rcg9k theme-background-surface theme-text-on-surface theme-border-color-background",editorAction:"editorAction___TiPcE theme-ripple",loader:"loader___RFbIe",iconOrImage:"iconOrImage___Cf7Ky",icon:"icon___MrqPL"},I=(0,n.PA)((0,i.forwardRef)((function InlineEditor({value:e,controlsPosition:t="right",simple:a,hideSave:n,hideCancel:m,disableSave:p,edited:f=!1,autofocus:_,active:g,loading:x,disabled:v,onChange:I,onSave:y,onUndo:w,onReject:j,onClick:k,onDoubleClick:P,className:A,...N},D){const L=(0,o.U)({onChange:I,onReject:j,onSave:y,value:e,disableSave:p}),H=(0,r.d)(S),B=(0,u.h)(b.CommonDialogService),E=(0,i.useCallback)((e=>{L.onChange(e.target.value)}),[]),M=(0,i.useCallback)((async()=>{const e=await B.open(C,L.value);e===b.DialogueStateResult.Rejected||e===b.DialogueStateResult.Resolved?L.onReject?.():(L.onChange(e),L.onSave?.())}),[]),O=(0,i.useCallback)((e=>{switch(e.key){case"Enter":!L.disableSave&&L.onSave&&L.onSave();break;case"Escape":L.onReject?.()}}),[]),R=(0,i.useRef)(null);return(0,i.useEffect)((()=>{_&&!v&&setTimeout((()=>R.current?.focus()),100)}),[v]),(0,i.useImperativeHandle)(D,(()=>R.current)),(0,s.jsxs)("div",{className:(0,l.s)(H,{editor:!0,editorActive:g},A),onClick:k,onDoubleClick:P,children:[(0,s.jsx)("div",{className:(0,l.s)(H,{editorContainer:!0}),children:(0,s.jsx)("input",{ref:R,className:(0,l.s)(H,{input:!0}),lang:"en",value:e,autoComplete:"off",disabled:v,onChange:E,onKeyDown:O,...N})}),(0,s.jsxs)("div",{className:(0,l.s)(H,{editorActions:!0}),"data-s-position":t,onMouseDown:e=>e.preventDefault(),children:[!n&&(0,s.jsx)(T,{disabled:v||p,onClick:y,children:x?(0,s.jsx)(d.a,{className:(0,l.s)(H,{loader:!0}),small:!0,fullSize:!0}):(0,s.jsx)(c.I,{className:(0,l.s)(H,{icon:!0}),name:"apply",viewBox:"0 0 12 10"})}),!m&&j&&(0,s.jsx)(T,{disabled:v,onClick:j,children:(0,s.jsx)(c.I,{className:(0,l.s)(H,{icon:!0}),name:"reject",viewBox:"0 0 11 11"})}),w&&(0,s.jsx)(T,{disabled:!f||v,onClick:f?w:void 0,children:(0,s.jsx)(h.O,{className:(0,l.s)(H,{iconOrImage:!0}),icon:"/icons/data_revert.svg"})}),!a&&(0,s.jsx)(T,{disabled:v,onClick:M,children:(0,s.jsx)(c.I,{className:(0,l.s)(H,{icon:!0}),name:"edit",viewBox:"0 0 13 13"})})]})]})}))),T=(0,n.PA)((function EditorAction({children:e,...t}){const a=(0,r.d)(S);return(0,s.jsx)("button",{className:(0,l.s)(a,{editorAction:!0}),...t,children:e})}))},47768:(e,t,a)=>{a.d(t,{h:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(7542),a.e(97493),a.e(67557),a.e(62570),a.e(95860),a.e(1253)]).then(a.bind(a,74528)).then((e=>e.InlineEditor))))},71807:(e,t,a)=>{a.r(t),a.d(t,{LocaleService:()=>r});var s=a(1118),n=a(82103),i=a(5576),o=a(34227);let r=class LocaleService extends n.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([a.e(92436),a.e(90679)]).then(a.bind(a,62925))).default;case"it":return(await Promise.all([a.e(32756),a.e(13060)]).then(a.bind(a,9121))).default;case"fr":return(await Promise.all([a.e(29671),a.e(35441)]).then(a.bind(a,13692))).default;default:return(await Promise.all([a.e(41114),a.e(57822)]).then(a.bind(a,82059))).default}}};r=(0,s.Cg)([(0,i._)(),(0,s.Sn)("design:paramtypes",[o.LocalizationService])],r)},57385:(e,t,a)=>{a.r(t),a.d(t,{NavigationService:()=>r});var s=a(1118),n=a(5576),i=a(29606),o=a(17396);let r=class NavigationService{constructor(e){this.navigationTask=new i.Q,e.transitionTask.before(this.navigationTask)}};r=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[o.RouterService])],r)},86411:(e,t,a)=>{a.r(t),a.d(t,{OptionsPanelService:()=>d});var s=a(1118),n=a(94866),i=a(5576),o=a(86764),r=a(29606),l=a(57385);let d=class OptionsPanelService{constructor(e){this.navigationService=e,this.navigationHandler=async(e,t)=>{await this.close()||o.a.interrupt(t)},this.active=!1,this.panelComponent=null,this.basePanelComponent=null,this.closeTask=new r.Q,this.navigationService.navigationTask.addHandler(this.navigationHandler),(0,n.Gn)(this,{active:n.sH,panelComponent:n.sH})}isOpen(e){return this.basePanelComponent===e}getPanelComponent(){return null===this.panelComponent?()=>null:this.panelComponent()}async open(e){return!!await this.close()&&(this.panelComponent=e,this.basePanelComponent=e,this.active=!0,!0)}async close(e){if(null===this.panelComponent)return!0;return!(await this.closeTask.execute(void 0,e)).getContext(o.a.interruptContext).interrupted&&(this.panelComponent=null,this.basePanelComponent=null,this.active=!1,!0)}};d=(0,s.Cg)([(0,i._)(),(0,s.Sn)("design:paramtypes",[l.NavigationService])],d)},7998:(e,t,a)=>{a.r(t),a.d(t,{LeftBarPanelService:()=>o});var s=a(1118),n=a(5576),i=a(68356);let o=class LeftBarPanelService{constructor(){this.tabsContainer=new i.a("Left Side Bar")}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],o)},57389:(e,t,a)=>{a.r(t),a.d(t,{SideBarPanel:()=>p});var s=a(41773),n=a(7838),i=a(64928),o=a(13720),r=a(7167),l=a(20458),d=a(84645),c=a(35090),h=a(54452),u=a(13707);const b={tabList:"tabList___qGynh",box:"box___xqNNx theme-background-surface theme-text-on-surface",contentBox:"contentBox___nXlwl theme-border-color-background"},m=[[l.A,{mode:"append",styles:[{tabOuter:"tabOuter___Y3WyQ"}]}],[c.A,{mode:"append",styles:[{tabPanel:"tabPanel___z8DHy"}]}]],p=(0,n.PA)((function SideBarPanel({container:e}){const t=(0,i.d)(b);return(0,s.jsx)(o.Z,{registry:m,children:(0,s.jsx)(u.TabsState,{container:e,lazy:!0,children:(0,s.jsxs)("div",{className:(0,r.s)(t,{box:!0}),children:[(0,s.jsx)(d.TabList,{className:(0,r.s)(t,{tabList:!0}),underline:!0}),(0,s.jsx)("div",{className:(0,r.s)(t,{contentBox:!0}),children:(0,s.jsx)(h.TabPanelList,{})})]})})})}))},71740:(e,t,a)=>{a.d(t,{X:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(7542),a.e(97493),a.e(67557),a.e(73676),a.e(11116),a.e(62570),a.e(95860),a.e(51240)]).then(a.bind(a,57389)).then((e=>e.SideBarPanel))))},64676:(e,t,a)=>{a.r(t),a.d(t,{SideBarPanelService:()=>o});var s=a(1118),n=a(5576),i=a(68356);let o=class SideBarPanelService{constructor(){this.tabsContainer=new i.a("Right Side Bar")}};o=(0,s.Cg)([(0,n._)(),(0,s.Sn)("design:paramtypes",[])],o)},90590:(e,t,a)=>{a.d(t,{m:()=>s});const s=(0,a(44745).M)("tabs-context")},4055:(e,t,a)=>{a.d(t,{N:()=>s});const s=(0,a(44745).M)("tab-id")},69740:(e,t,a)=>{a.d(t,{Y:()=>s});const s=(0,a(85240).E)("tab","Tab menu")},81130:(e,t,a)=>{a.r(t),a.d(t,{Tab:()=>w});var s=a(41773),n=a(7838),i=a(15993),o=a(95876),r=a(17675),l=a(64928),d=a(34685),c=a(7167),h=a(85497),u=a(20458),b=a(84237);const m={tabActions:"tabActions___rI6au",tabAction:"tabAction___MQVsQ",icon:"icon___wT4fD"};var p=a(90398),f=a(12483),_=a(74091),g=a(4055),x=a(90590),v=a(69740);const C={portal:"portal___Yjw2m"},S=(0,n.PA)((function TabMenu({children:e,tabId:t,state:a,menuContext:n}){const i=(0,l.d)(C),o=(0,f.b)({menu:v.Y,context:n});(0,p.Z)(o.context,((e,s)=>{e.set(x.m,a,s),e.set(g.N,t,s)}));return(0,d.u)((()=>!o.items.length||o.items.every((e=>e.hidden))))?null:(0,s.jsx)("div",{className:(0,c.s)(i,{portal:!0}),children:(0,s.jsx)(_.ContextMenu,{menu:o,placement:"bottom-start",modal:!0,disclosure:!0,children:e})})})),I=(0,n.PA)((function TabActions({tabId:e,canClose:t,state:a,className:n,menuContext:i,handleClose:o}){const r=(0,l.d)(u.A,m);return(0,s.jsxs)("div",{className:(0,c.s)(r,{tabActions:!0},n),children:[t&&(0,s.jsx)(T,{iconName:"cross-bold",title:"ui_close",onClick:o}),(0,s.jsx)(S,{tabId:e,state:a,menuContext:i,children:(0,s.jsx)("div",{className:(0,c.s)(r,{tabAction:!0}),children:(0,s.jsx)(b.I,{className:(0,c.s)(r,{icon:!0}),name:"dots",viewBox:"0 0 32 32"})})})]})})),T=(0,n.PA)((function TabAction({iconName:e,title:t,onClick:a}){const n=(0,l.d)(u.A,m),i=(0,r.W)();return(0,s.jsx)("div",{className:(0,c.s)(n,{tabAction:!0}),title:i(t),onClick:a,children:(0,s.jsx)(b.I,{className:(0,c.s)(n,{icon:!0}),name:e,viewBox:"0 0 7 8"})})}));var y=a(26909);const w=(0,n.PA)((function Tab(e){const t=(0,r.W)(),{tabId:a,title:n,disabled:b,className:m,children:p,onOpen:f,onClose:_,onClick:g}=e,x=(0,i.useRef)(null),v=(0,i.useMemo)((()=>({tabId:a})),[a]),C=(0,y.V)(a,f,_,g),S=C.getInfo(),T=(0,l.d)(u.A),w=(0,d.u)((()=>!!_||C.closable&&C.state.closable));return(0,s.jsx)(h.H.Provider,{value:v,children:(0,s.jsx)("div",{className:(0,c.s)(T,{tabOuter:!0}),children:(0,s.jsxs)("div",{className:(0,c.s)(T,{tabInner:!0,tabInnerSelected:C.selected}),children:[(0,s.jsx)(I,{className:(0,c.s)(T,{actions:!0}),state:C.state,menuContext:e.menuContext,canClose:w,tabId:a,handleClose:C.handleClose}),(0,s.jsx)(o.o,{ref:x,...C.state.state,type:"button",title:t(n??S?.title),id:a,className:(0,c.s)(T,{tab:!0},m),disabled:b,onClick:C.handleOpen,children:(0,s.jsx)("div",{className:(0,c.s)(T,{tabContainer:!0}),children:p})})]})})})}))},44929:(e,t,a)=>{a.r(t),a.d(t,{TabIcon:()=>l});var s=a(41773),n=a(64928),i=a(7167),o=a(39755),r=a(66891);const l=function TabIcon({icon:e,viewBox:t,className:a}){const l=(0,n.d)(r.A);return(0,s.jsx)("div",{className:(0,i.s)(l,{tabIcon:!0},a),children:e?(0,s.jsx)(o.O,{className:(0,i.s)(l,{iconOrImage:!0}),icon:e,viewBox:t}):(0,s.jsx)("div",{className:(0,i.s)(l,{placeholder:!0})})})}},48522:(e,t,a)=>{a.d(t,{$:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(97493),a.e(74696)]).then(a.bind(a,44929)).then((e=>e.TabIcon))))},43659:(e,t,a)=>{a.d(t,{o:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(7542),a.e(97493),a.e(67557),a.e(73676),a.e(11116),a.e(62570),a.e(95860),a.e(7553)]).then(a.bind(a,81130)).then((e=>e.Tab))))},72036:(e,t,a)=>{a.r(t),a.d(t,{TabTitle:()=>r});var s=a(41773),n=a(64928),i=a(7167),o=a(28626);const r=function TabTitle({children:e,className:t}){const a=(0,n.d)(o.A);return(0,s.jsx)("div",{className:(0,i.s)(a,{tabTitle:!0},t),children:e||(0,s.jsx)("div",{className:(0,i.s)(a,{placeholder:!0})})})}},19259:(e,t,a)=>{a.d(t,{I:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(97493),a.e(52315)]).then(a.bind(a,72036)).then((e=>e.TabTitle))))},26909:(e,t,a)=>{a.d(t,{V:()=>useTab});var s=a(94866),n=a(15993),i=a(77337),o=a(91184),r=a(28347),l=a(13676),d=a(43995),c=a(85497),h=a(43524);function useTab(e,t,a,u){const b=(0,n.useContext)(h.w),m=(0,n.useContext)(c.H),p=(0,i.U)({onClick:u});if(void 0===(e=e||m?.tabId))throw new Error("Tab id not provided");if(!b)throw new Error("TabsContext not provided");return(0,o.H)({executor:b.openExecutor,handlers:[async function openHandler(a){e===a.tabId&&await(t?.(a))}]}),(0,o.H)({executor:b.closeExecutor,handlers:[async function closeHandler(t){e===t.tabId&&await(a?.(t))}]}),(0,r.G)((()=>({get selected(){return this.state.state.selectedId===this.tabId},get closable(){return this.state.canClose(this.tabId)},getInfo(){return this.state.getTabInfo(this.tabId)},handleOpen(e){l.y.has(e,d.X)||(p.onClick?.(this.tabId),this.state.open(this.tabId))},handleClose(e){l.y.set(e,d.X),this.state.close(this.tabId)}})),{selected:s.EW,closable:s.EW,state:s.sH.ref,tabId:s.sH.ref},{state:b,tabId:e},["getInfo","handleOpen","handleClose"])}},85497:(e,t,a)=>{a.d(t,{H:()=>s});const s=(0,a(15993).createContext)(void 0)},84645:(e,t,a)=>{a.r(t),a.d(t,{TabList:()=>k});var s=a(41773),n=a(7838),i=a(15993),o=a(93708),r=a(17675),l=a(64928),d=a(7167),c=a(13720),h=a(22385),u=a(70500),b=a(85497),m=a(43524),p=a(81130),f=a(44929),_=a(72036);function TabDefault({tabId:e,icon:t,name:a,component:n,className:o,disabled:r,onOpen:l,onClose:d,...c}){const h=(0,i.useContext)(m.w),g=(0,i.useMemo)((()=>({tabId:e})),[e]),x=h?.state.selectedId===e;if(n){const t=n;return(0,s.jsx)(b.H.Provider,{value:g,children:(0,s.jsx)(t,{tabId:e,className:o,...c,selected:x,disabled:r,onOpen:l,onClose:d})})}return(0,s.jsxs)(p.Tab,{tabId:e,className:o,selected:x,disabled:r,onOpen:l,onClose:d,children:[t&&(0,s.jsx)(f.TabIcon,{icon:t}),a&&(0,s.jsx)(_.TabTitle,{children:(0,s.jsx)(u.H,{token:a})})]})}var g=a(20458);var x=a(28626);const v=[[g.A,{mode:"append",styles:[{tab:"tab___aWWw8 theme-typography--caption",underline:"underline___bZ0R1"}]}]],C=[[g.A,{mode:"append",styles:[{underline:"underline___ZYbO7",big:"big___YoknT",tab:"tab___ij9OJ"}]}],[x.A,{mode:"append",styles:[{underline:"underline___s4xNH",big:"big___Pk3t_",tabTitle:"tabTitle___XFe56"}]}]];var S=a(98098),I=a(66891);const T={vertical:"vertical___LNCa_",tabList:"tabList___Tx0ch"},y={vertical:"vertical___TaUBR",rotated:"rotated___pdiHs",tabList:"tabList___dIpNF"},w=[[S.A,{mode:"append",styles:[T]}],[g.A,{mode:"append",styles:[{vertical:"vertical___gsVHC",tab:"tab___DHzw3"}]}]],j=[[S.A,{mode:"append",styles:[y]}],[g.A,{mode:"append",styles:[{vertical:"vertical___vcFR3",rotated:"rotated___W8WeV",tabOuter:"tabOuter___fJOgo",tabInner:"tabInner___r4VnV",tab:"tab___VhrN7"}]}],[I.A,{mode:"append",styles:[{vertical:"vertical___xWETa",rotated:"rotated___zY6Hy",tabIcon:"tabIcon___POrsn"}]}],[x.A,{mode:"append",styles:[{vertical:"vertical___FVDNb",rotated:"rotated___GXWTp",tabTitle:"tabTitle___ej2gu"}]}]],k=(0,n.PA)((function TabList({className:e,children:t,vertical:a,rotated:n,underline:u,big:b,childrenFirst:p,...f}){const _=(0,i.useContext)(m.w),g=(0,r.W)(),x=(0,l.d)(S.A,!n&&T,y);if(!_)throw new Error("Tabs context was not provided");const I=(0,i.useMemo)((()=>[...a&&!n?w:[],...a&&n?j:[],...u?v:[],...u&&b?C:[]]),[a,n,u,b]);if(e=(0,d.s)(x,{tabList:!0,vertical:a,rotated:n,underline:u,big:b},e),_.container){const a=_.container.getDisplayed(_.props);return(0,s.jsx)(c.Z,{registry:I,children:(0,s.jsxs)(o.w,{...f,className:e,..._.state,"aria-label":g(f["aria-label"]??_.container.areaLabel),children:[p&&t,a.map((0,h.X)(((e,t)=>(0,s.jsx)(TabDefault,{tabId:t,name:e.name,icon:e.icon,component:e.tab?.(),..._.props,"aria-label":e.name,disabled:f.disabled||e.isDisabled?.(e.key,_.props),onOpen:e.onOpen,onClose:e.onClose},t)),_.props)).flat(),!p&&t]})})}return(0,s.jsx)(c.Z,{registry:I,children:(0,s.jsx)(o.w,{...f,className:e,..._.state,"aria-label":g(f["aria-label"]),children:t})})}))},44451:(e,t,a)=>{a.d(t,{w:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(7542),a.e(97493),a.e(67557),a.e(73676),a.e(11116),a.e(62570),a.e(95860),a.e(24649)]).then(a.bind(a,84645)).then((e=>e.TabList))))},69569:(e,t,a)=>{a.r(t),a.d(t,{TabPanel:()=>x});var s=a(41773),n=a(7838),i=a(15993),o=a(79244),r=a(64928),l=a(34685),d=a(7167),c=a(69519),h=a(85497),u=a(35090),b=a(43524),m=a(14294),p=a(77337),f=a(91184),_=a(55803),g=a(23481);const x=(0,n.PA)((function TabPanel({tabId:e,children:t,contents:a,className:n,lazy:x}){const v=(0,i.useContext)(b.w),C=(0,r.d)(u.A);if(!v)throw new Error("Tabs context was not provided");const S=function useTabsValidation(e){const t=(0,i.useContext)(b.w),a=(0,i.useContext)(m.c);if(!t)throw new Error("Tabs context was not provided");const s=(0,i.useRef)(null),n=(0,i.useContext)(g.d),o=(0,l.u)((()=>t.state.selectedId===e)),r=(0,p.U)({tabId:e,tabsValidationContext:n}),d=(0,p.U)((()=>({beforeValidationCollection:new _.t,invalidElement:null,invalidate(e){r.tabsValidationContext?.invalidate(r.tabId),null===this.invalidElement&&(this.invalidElement=e.target)},reportValidity(){this.invalidElement&&(this.invalidElement.reportValidity(),this.reset())},reset(){this.invalidElement=null}})),!1,["invalidate"]);return(0,i.useEffect)((()=>{const e=s.current;if(e)return e.addEventListener("invalid",d.invalidate,!0),()=>{e.removeEventListener("invalid",d.invalidate,!0)}})),(0,i.useEffect)((()=>{o&&d.reportValidity()}),[o]),(0,f.H)({executor:a?.onValidate,before:d.beforeValidationCollection}),(0,f.H)({executor:d.beforeValidationCollection,handlers:[()=>{d.reset()}]}),s}(e),I=(0,i.useMemo)((()=>({tabId:e})),[e]),T=(0,l.u)((()=>v.state.selectedId===e));if((0,l.u)((()=>(x||v.lazy)&&!T)))return null;return(0,s.jsx)(h.H.Provider,{value:I,children:(0,s.jsx)(o.K,{ref:S,...v.state,tabId:e,className:(0,d.s)(C,{tabPanel:!0,contents:a},n),children:(0,s.jsx)(c.a,{suspense:!0,children:function renderChildren(){return"function"==typeof t?t(v.state):t}()})})})}))},54452:(e,t,a)=>{a.r(t),a.d(t,{TabPanelList:()=>d});var s=a(41773),n=a(7838),i=a(15993),o=a(22385),r=a(69569),l=a(43524);const d=(0,n.PA)((function TabPanelList({contents:e,children:t}){const a=(0,i.useContext)(l.w);if(!a)throw new Error("Tabs context was not provided");if(!a.container)throw new Error("Tabs container should be provided for TabPanelList");function renderPanel(e,t){const n=e.panel();return(0,s.jsx)(n,{tabId:t,...a?.props})}const n=a.container.getDisplayed(a.props);return(0,s.jsxs)(s.Fragment,{children:[n.map((0,o.X)(((t,a)=>(0,s.jsx)(r.TabPanel,{tabId:a,contents:e,children:renderPanel(t,a)},a)),a.props)).flat(),t]})}))},52843:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(7542),a.e(97493),a.e(67557),a.e(62570),a.e(95860),a.e(58810)]).then(a.bind(a,54452)).then((e=>e.TabPanelList))))},12195:(e,t,a)=>{a.d(t,{K:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(97493),a.e(62570),a.e(97077)]).then(a.bind(a,69569)).then((e=>e.TabPanel))))},71274:(e,t,a)=>{a.r(t),a.d(t,{TabsBootstrap:()=>v});var s=a(1118),n=a(82103),i=a(5576),o=a(41273),r=a(77495),l=a(85153),d=a(79023),c=a(72877),h=a(19102);const u=(0,h.V)("tab-close",{label:"ui_close",tooltip:"ui_close"}),b=(0,h.V)("tab-close-all",{label:"ui_close_all",tooltip:"ui_close_all"}),m=(0,h.V)("tab-close-all-to-the-left",{label:"ui_close_all_to_the_left",tooltip:"ui_close_all_to_the_left"}),p=(0,h.V)("tab-close-all-to-the-right",{label:"ui_close_all_to_the_right",tooltip:"ui_close_all_to_the_right"}),f=(0,h.V)("tab-close-others",{label:"ui_close_others",tooltip:"ui_close_others"});var _=a(4055),g=a(90590),x=a(69740);let v=class TabsBootstrap extends n.j{constructor(e,t){super(),this.actionService=e,this.menuService=t}register(){this.actionService.addHandler({id:"tabs-base-handler",contexts:[_.N,g.m],isActionApplicable:(e,t)=>{const a=e.hasValue(o.F,x.Y),s=e.get(g.m),n=e.get(_.N);if(!a||!s?.tabList)return!1;if(t===f||t===b)return s.tabList.length>1;if(t===m||t===p){const e=s.tabList.indexOf(n);return-1!==e&&(t===m?e>0:e<s.tabList.length-1)}return[u].includes(t)},handler:async(e,t)=>{const a=e.get(g.m),s=e.get(_.N);switch(t){case u:a.close(s);break;case f:a.closeOthers(s);break;case b:a.closeAll();break;case m:a.closeAllToTheDirection(s,"left");break;case p:a.closeAllToTheDirection(s,"right")}}}),this.menuService.addCreator({menus:[x.Y],isApplicable:e=>{const t=e.get(_.N),a=e.get(g.m);return!!t&&!!a?.enabledBaseActions&&a.canClose(t)},getItems:(e,t)=>[...t,u,b,f,m,p],orderItems:(e,t)=>{const a=(0,r.H)(t,[u,b,f,m,p]);return a.length>0&&(t.length>0&&t.push(new l.w),t.push(...a)),t}})}};v=(0,s.Cg)([(0,i._)(),(0,s.Sn)("design:paramtypes",[d.ActionService,c.MenuService])],v)},43482:(e,t,a)=>{a.r(t),a.d(t,{TabsBox:()=>u});var s=a(41773),n=a(15993),i=a(64928),o=a(13720),r=a(7167),l=a(35090),d=a(13707);const c={tabsBox:"tabsBox___bpB_h",tabs:"tabs___oX_L2",tabPanels:"tabPanels___y6yl4"},h=[[l.A,{mode:"append",styles:[{tabPanel:"tabPanel___IUcxJ"}]}]],u=(0,n.forwardRef)((function TabsBox({currentTabId:e,tabs:t,tabIndex:a,localState:n,tabsClassName:l,tabList:u,enabledBaseActions:b,autoSelect:m,children:p,className:f,onChange:_},g){const x=(0,i.d)(c);return(0,s.jsx)(o.Z,{registry:h,children:(0,s.jsx)(d.TabsState,{currentTabId:e,localState:n,tabList:u,autoSelect:m,enabledBaseActions:b,onChange:_,children:(0,s.jsxs)("div",{ref:g,className:(0,r.s)(x,{tabsBox:!0},f),tabIndex:a,children:[t&&(0,s.jsx)("div",{className:(0,r.s)(x,{tabs:!0},l),children:t}),(0,s.jsx)("div",{className:(0,r.s)(x,{tabPanels:!0}),children:p})]})})})}))},68347:(e,t,a)=>{a.d(t,{W:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(11502),a.e(97493),a.e(62570),a.e(68396)]).then(a.bind(a,43482)).then((e=>e.TabsBox))))},68356:(e,t,a)=>{a.d(t,{a:()=>TabsContainer});var s=a(94866);class TabsContainer{get tabInfoList(){return Array.from(this.tabInfoMap.values()).sort(((e,t)=>e.order-t.order))}get selectedId(){return this.currentTabId}constructor(e){this.tabInfoMap=new Map,this.currentTabId=null,this.areaLabel=e,(0,s.Gn)(this,{tabInfoMap:s.sH.shallow,currentTabId:s.sH})}has(e){return this.tabInfoMap.has(e)}select(e,t){if(null===e)return void(this.currentTabId=e);const a=this.getDisplayedTabInfo(e,t);a&&(a.onOpen?.({tabId:e,props:t}),this.currentTabId=e)}getTabInfo(e){return this.tabInfoMap.get(e)}getTabState(e,t,a,s,n){const i=this.getDisplayedTabInfo(t,a);return e.get(t,s||i?.stateGetter?.(a),n)}getDisplayed(e){return this.tabInfoList.filter((t=>!t.isHidden?.(t.key,e)))}getDisplayedTabInfo(e,t){if(this.tabInfoMap.has(e))return this.getTabInfo(e);const a=this.getDisplayed(t);for(const s of a)if(s.generator){if(s.generator(s.key,t).includes(e))return s}else if(s.key===e)return s}getIdList(e){return this.getDisplayed(e).map((t=>t.generator?t.generator(t.key,e):t.key)).flat()}add(e){if(this.tabInfoMap.has(e.key))throw new Error("Tab with same key already exists");this.tabInfoMap.set(e.key,{...e,order:e.order??Number.MAX_SAFE_INTEGER})}}},43524:(e,t,a)=>{a.d(t,{w:()=>s});const s=(0,a(15993).createContext)(void 0)},13707:(e,t,a)=>{a.r(t),a.d(t,{TabsState:()=>I});var s=a(41773),n=a(94866),i=a(7838),o=a(15993),r=a(96436),l=a(77337),d=a(91184),c=a(28347),h=a(15280),u=a(92674),b=a(29606),m=a(86764),p=a(31324),f=a(9724),_=a(82636),g=a(43524),x=a(18699),v=a(14452),C=a(23481);const S=(0,i.PA)((function TabsValidation({children:e}){const t=(0,o.useContext)(g.w),a=(0,x.h)(v.NotificationService);if(!t)throw new Error("TabsState should be defined");const n=(0,l.U)((()=>({invalidTabs:new Set,scheduledTabSwitch:-1,invalidate(e){this.invalidTabs.add(e),this.scheduleTabSwitch()},selectNextInvalidTab(){const e=Array.from(this.invalidTabs)[0];!(0,_.O)(e)||(0,f.K)(this.tabsContext.state.selectedId)&&this.invalidTabs.has(this.tabsContext.state.selectedId)||this.tabsContext.open(e).catch((()=>{this.notificationService.logError({title:"core_ui_form_save_error",message:"core_ui_switch_tab_error"})}))},reset(){this.invalidTabs.clear()},scheduleTabSwitch(){this.clearScheduledTabSwitch(),this.scheduledTabSwitch=setTimeout((()=>{this.scheduledTabSwitch=-1,this.selectNextInvalidTab(),this.reset()}),0)},clearScheduledTabSwitch(){-1!==this.scheduledTabSwitch&&(clearTimeout(this.scheduledTabSwitch),this.scheduledTabSwitch=-1)}})),{tabsContext:t,notificationService:a},["invalidate"]);return(0,s.jsx)(C.d.Provider,{value:n,children:e})})),I=(0,i.PA)((function TabsState({selectedId:e,orientation:t,currentTabId:a,container:i,localState:x,children:v,lazy:C=!1,autoSelect:I=!0,manual:T,tabList:y,enabledBaseActions:w,onChange:j,onClose:k,canClose:P,...A}){const N=(0,u.f)(),D=(0,o.useMemo)((()=>A),[...Object.values(A)]);let L=[];i?L=i.getIdList(D):y&&(L=y);const H=!!k,[B]=(0,o.useState)((()=>new p.C)),E=x||B,[M]=(0,o.useState)((()=>new b.Q)),[O]=(0,o.useState)((()=>new b.Q)),R=(0,r.i)({selectedId:e||a||i?.selectedId||null,orientation:t,manual:T}),V=(0,l.U)((()=>({selectedId:R.selectedId})),{canClose:P,open:j,close:k,props:D,tabsState:E,container:i,state:R,tabList:y});if((0,f.K)(a)&&(R.selectedId=a),L.length>0&&I){(0,f.K)(R.selectedId)&&L.includes(R.selectedId)||(R.selectedId=L[0])}(0,f.K)(a)&&(V.selectedId=R.selectedId),(0,d.H)({executor:O,handlers:[function openHandler(e,t){V.open?.(e),V.selectedId!==e.tabId?(V.selectedId=e.tabId,V.state.selectedId!==e.tabId&&(V.state.setCurrentId(e.tabId),V.state.setSelectedId(e.tabId))):m.a.interrupt(t)}]}),(0,d.H)({executor:M,handlers:[function closeHandler(e){V.close?.(e)}]});const X=R.selectedId;(0,o.useEffect)((()=>{(0,f.K)(X)&&V.selectedId!==X&&O.execute({tabId:X,props:D})}),[X]);const F=(0,c.G)((()=>({context:N,canClose:e=>V.canClose?.({tabId:e,props:V.props})??!0,getTabInfo:e=>V.container?.getDisplayedTabInfo(e,V.props),getTabState:(e,t,a)=>V.container?.getTabState(V.tabsState,e,V.props,t,a),getLocalState:(e,t,a)=>V.tabsState.get(e,t,a),async open(e){await O.execute({tabId:e,props:V.props})},async close(e){this.canClose(e)&&await M.execute({tabId:e,props:V.props})},async closeAll(){if(V.tabList)for(const e of V.tabList.slice())await this.close(e)},async closeAllToTheDirection(e,t){if(V.tabList){const a=V.tabList.indexOf(e);if(-1===a)return;const s="left"===t?V.tabList.slice(0,a):V.tabList.slice(a+1);for(const e of s)await this.close(e)}},async closeOthers(e){if(V.tabList){const t=V.tabList.filter((t=>t!==e));for(const e of t)await this.close(e)}}})),{state:n.sH.ref,tabsState:n.sH.ref,props:n.sH.ref,container:n.sH.ref,openExecutor:n.sH.ref,closeExecutor:n.sH.ref,lazy:n.sH.ref,closable:n.sH.ref,tabList:n.sH.ref,enabledBaseActions:n.sH.ref,getTabInfo:n.XI.bound,getTabState:n.XI.bound,getLocalState:n.XI.bound,open:n.XI.bound,close:n.XI.bound,closeAll:n.XI.bound,closeAllToTheDirection:n.XI.bound,closeOthers:n.XI.bound},{state:R,tabsState:E,props:D,container:i,openExecutor:O,closeExecutor:M,lazy:C,closable:H,tabList:y,enabledBaseActions:w});if(i){let e;R.selectedId&&(e=F.getTabInfo(R.selectedId)),(0,h.X)(TabsState,i.getDisplayed(D).map((e=>e.getLoader?.(N,D))).filter(_.O).flat()),(0,h.X)(TabsState,[e?.getLoader?.(N,D)||[]].flat().filter((e=>e.lazy)),!0,!0)}return(0,s.jsx)(g.w.Provider,{value:F,children:(0,s.jsx)(S,{children:v})})}))},22321:(e,t,a)=>{a.d(t,{_:()=>s});const s=(0,a(50420).j)((()=>Promise.all([a.e(7542),a.e(97493),a.e(62570),a.e(95860),a.e(91792)]).then(a.bind(a,13707)).then((e=>e.TabsState))))},23481:(e,t,a)=>{a.d(t,{d:()=>s});const s=(0,a(15993).createContext)(null)},22385:(e,t,a)=>{function generateTabElement(e,t){return a=>a.generator?a.generator(a.key,t).map((t=>e(a,t))):[e(a,a.key)]}a.d(t,{X:()=>generateTabElement})},46133:(e,t,a)=>{a.d(t,{n:()=>useTabLocalState});var s=a(15993),n=a(85497),i=a(43524);function useTabLocalState(e,t){const a=(0,s.useContext)(i.w),o=(0,s.useContext)(n.H);if(!a||!o)throw new Error("Tabs context was not provided");return a.getLocalState(o.tabId,e,t)}},60300:(e,t,a)=>{a.d(t,{i:()=>useTabState});var s=a(15993),n=a(85497),i=a(43524);function useTabState(e){const t=(0,s.useContext)(i.w),a=(0,s.useContext)(n.H);if(!t||!a)throw new Error("Tabs context was not provided");return t.getTabState(a.tabId,e)}},58855:(e,t,a)=>{a.d(t,{s:()=>useAuthenticationAction});var s=a(94866),n=a(56826),i=a(11130),o=a(28347),r=a(18699);function useAuthenticationAction(e){const t=(0,r.h)(n.AuthProviderService),a=(0,r.h)(i.UserInfoResource);return(0,o.G)((()=>({authenticating:!1,get authorized(){return!this.authenticating&&a.hasToken(this.providerId)},async auth(){this.authenticating=!0;try{await t.requireProvider(this.providerId)?await(this.onAuthenticate?.()):await(this.onClose?.())}finally{this.authenticating=!1}}})),{authorized:s.EW,authenticating:s.sH.ref,providerId:s.sH.ref},{providerId:e.providerId,onAuthenticate:e.onAuthenticate,onClose:e.onClose},["auth"])}}}]);