1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d29107dc-383d-4501-97d9-24009373fcee",e._sentryDebugIdIdentifier="sentry-dbid-d29107dc-383d-4501-97d9-24009373fcee")}()}catch(e){}!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];if(null!=r)for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:sentry-js-hh-filter-key":!0})}catch(e){}}(),function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"42d45d1b0a4472a84fb6d0c91b046bd57964d69a"}}catch(e){}}(),(globalThis.__xhh_LOADABLE_LOADED_CHUNKS__=globalThis.__xhh_LOADABLE_LOADED_CHUNKS__||[]).push([["6069"],{243372:function(e,a,r){e.exports=r.p+"static/images/mobile-banner-qr-code__min_6a9af4dea43fcec9.svg"},424414:function(e,a,r){e.exports=r.p+"static/images/mobile-banner-qr-code_jtb__min_0876cc55564e9e60.svg"},785313:function(e,a,r){e.exports=r.p+"static/images/grey-belcart-internetparol__min_60959d5260fb4e02.svg"},108741:function(e,a,r){e.exports=r.p+"static/images/grey-belcart__min_be08fb9ae8eb60de.svg"},997007:function(e,a,r){e.exports=r.p+"static/images/grey-mastercard__min_0759a5b1b607a232.svg"},800728:function(e,a,r){e.exports=r.p+"static/images/grey-visa__min_6ba49ea3f2835414.svg"},926832:function(e,a,r){e.exports=r.p+"static/images/price-cart-empty__min_2a75c0a590e6ca45.webp"},225008:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-applicant-hhru__min_272f6eddf4921b71.webp"},930918:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-applicant-rabotaby__min_6f6170a9a23aa1eb.webp"},682589:function(e,a,r){e.exports=r.p+"static/images/qr-viber-applicant-hhru__min_3665c223b19115cb.webp"},477703:function(e,a,r){e.exports=r.p+"static/images/qr-viber-applicant-rabotaby__min_2edf6b864badb82a.webp"},8251:function(e,a,r){e.exports=r.p+"static/images/qr-vk-applicant-hhru__min_a9d502b34390634e.webp"},421447:function(e,a,r){e.exports=r.p+"static/images/qr-vk-applicant-rabotaby__min_e3832463b1b0e3b5.webp"},74984:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-anonymous-hhru__min_9bc6b25d8d010d99.webp"},783910:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-anonymous-rabotaby__min_57753facc78c6b9f.webp"},726420:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-anonymous-hhru__min_479400fc2bbc83fc.webp"},802673:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-anonymous-rabotaby__min_4c810a6e9006f585.webp"},93882:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-applicant-hhru__min_9fd7510daf8a84f7.webp"},73606:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-applicant-rabotaby__min_19803bff0f5f7753.webp"},823567:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-applicant-hhru__min_5ac7eb0c555ad668.webp"},874715:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-applicant-rabotaby__min_74b57fcde8754ae2.webp"},84922:function(e,a,r){e.exports=r.p+"static/images/qr-viber-applicant-hhru__min_97e09ae7180b700a.webp"},486383:function(e,a,r){e.exports=r.p+"static/images/qr-viber-applicant-rabotaby__min_c849b684b8c4a3a8.webp"},216260:function(e,a,r){e.exports=r.p+"static/images/qr-vk-applicant-hhru__min_c96b4b6809135e24.webp"},265338:function(e,a,r){e.exports=r.p+"static/images/qr-vk-applicant-rabotaby__min_f8e0818ae904f1cb.webp"},925037:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-anonymous-hhru__min_9bc6b25d8d010d99.webp"},29661:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-anonymous-rabotaby__min_880f5e6082ee19df.webp"},92839:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-applicant-hhru__min_1d14cff2bdfae368.webp"},961982:function(e,a,r){e.exports=r.p+"static/images/qr-telegram-applicant-rabotaby__min_6d7e122589c812de.webp"},622667:function(e,a,r){e.exports=r.p+"static/images/qr-viber-anonymous-hhru__min_0869716e5153b033.webp"},976509:function(e,a,r){e.exports=r.p+"static/images/qr-viber-anonymous-rabotaby__min_99960d4ab8e51579.webp"},86484:function(e,a,r){e.exports=r.p+"static/images/qr-viber-applicant-hhru__min_94f5f32136e68536.webp"},227758:function(e,a,r){e.exports=r.p+"static/images/qr-viber-applicant-rabotaby__min_e931e36cf4ea2218.webp"},364246:function(e,a,r){e.exports=r.p+"static/images/qr-vk-anonymous-hhru__min_c966ba515b6234de.webp"},303007:function(e,a,r){e.exports=r.p+"static/images/qr-vk-anonymous-rabotaby__min_dc2a1d356a3b03fd.webp"},605006:function(e,a,r){e.exports=r.p+"static/images/qr-vk-applicant-hhru__min_4bf38e54f13b6f4a.webp"},687468:function(e,a,r){e.exports=r.p+"static/images/qr-vk-applicant-rabotaby__min_29977b7b8e0a806b.webp"},933762:function(e,a,r){e.exports=r.p+"static/images/phone_negotiations__min_859505e163bbc92c.webp"},552777:function(e,a,r){e.exports=r.p+"static/images/salut__min_b82df4c5a2a96310.webp"},418614:function(e,a,r){e.exports=r.p+"static/images/qrCode__min_213d97e036df9128.webp"},61818:function(e,a,r){e.exports=r.p+"static/images/vorobey__min_baecee0231e7ecff.webp"},31743:function(e,a,r){e.exports=r.p+"static/images/bg-mobile__min_13e35374533058fa.webp"},298749:function(e,a,r){e.exports=r.p+"static/images/bg__min_cf80749c32180144.webp"},534153:function(e,a,r){e.exports=r.p+"static/images/mobile__min_49b31b73fd4f5f71.webp"},790929:function(e,a,r){e.exports=r.p+"static/images/desktop__min_fdcaa28486a0a046.webp"},310920:function(e,a,r){e.exports=r.p+"static/images/mobile__min_33314d8c36bf3132.webp"},633518:function(e,a,r){e.exports=r.p+"static/images/bird__min_fab890a84ad6055d.webp"},318914:function(e,a,r){e.exports=r.p+"static/images/header-image__min_58335c7d8b1ec6cf.webp"},133239:function(e,a,r){r.d(a,{H:()=>d});var t=r(560835),s=r.n(t),i=r(312585),n=r(781943);const o="full-height--oQIJcCMPHcUzlOOi",l="content-and-bottom--ba99Z64k7EfkuZBR";var c=r(612215);const d=({bottomContent:e,containerWithBottomContentRef:a,children:r,isShrinked:t,withoutTopPadding:d,isEmpty:u,fullHeight:m,...p})=>
1{const{sidebarContent:y,contentDataQA:v,showSidebarFrom:g,sidebarSide:h,sidebarDataQA:b}=p,x={sidebarContent:y,contentDataQA:v,showSidebarFrom:g,sidebarSide:h,sidebarDataQA:b},f=m?(0,c.jsx)("div",{className:o,children:r}):r,S=(0,c.jsx)(i.M,{...x,children:u||m?f:(0,c.jsx)(n.Z,{isShrinked:t,withoutTopPadding:d,children:f})});return e||a?(0,c.jsxs)("div",{className:s()(l,{[o]:!m}),ref:a,children:[S,!!e&&e]}):S};d.displayName="layouts/MagritteLayouts/DefaultLayout/DefaultLayout"},995322:function(e,a,r){r.d(a,{Z:()=>h});var t=r(651679),s=r(70013),i=r(977403),n=r(87014),o=r(678305),l=r(235938),c=r(273250),d=r(5462),u=r(328205),m=r(89396),p=r(594948),y=r(612215);const v={employerManagers:"mainmenu.menuitem.employerManagers",employerManagersShort:"mainmenu.menuitem.employerManagersShort",addressesEdit:"mainmenu.menuitem.addressesEdit",addressesEditShort:"mainmenu.menuitem.addressesEditShort",employerQuota:"mainmenu.menuitem.employerQuota",employerVerification:"mainmenu.menuitem.employerVerification",employerDocuments:"mainmenu.menuitem.employerDocuments",companyStructure:"mainmenu.menuitem.companyStructure",employerReviewsSettings:"mainmenu.menuitem.employerReviewsSettings",employerAutomationInfo:"mainmenu.menuitem.employerAutomationInfo",vacanciesAutoload:"mainmenu.menuitem.vacanciesAutoload",title:"employerCompanyMenu.title",description:"employerCompanyMenu.description"},g=({trls:e,activeTab:a,onTabsScroll:r,onTabsReady:i})=>{var g;const h=(0,p.v)(e=>e.employerCompanyMenu),b=null===(g=h.find(e=>e.active||e.name===a))||void 0===g?void 0:g.url,x=(0,t.useRef)(null),f=(0,m.i)(),{containerCorrections:S}=(0,u.Z)(x);return(0,y.jsxs)(d.C,{xs:"4",s:"8",m:"12",l:f?"12":"16",children:[(0,y.jsx)(n.D,{size:"large",description:e[v.description],Element:"h1",children:e[v.title]}),(0,y.jsx)(o.X,{default:24}),(0,y.jsx)("div",{ref:x,children:(0,y.jsx)(l.m,{activeItemId:b,containerCorrections:S,onScroll:r,onReady:i,children:h.map(({url:a,active:r,name:t})=>(0,y.jsx)(c.T,{id:a,focused:r,to:a,Element:s.u,"data-qa":`employer-company-tab_${t}`,"data-autoload-onboarding":t,children:e[v[t]]},a))})}),(0,y.jsx)(o.X,{default:24})]})};g.displayName="components/EmployerCompanyMenu/index/EmployerCompanyMenu";const h=(0,i.x)(g)},873:function(e,a,r){r.d(a,{Z:()=>o});var t=r(678305),s=r(409639),i=r(612215);const n=()=>{const e=(0,s.nD)();return(0,i.jsx)(t.X,{default:e?16:40})};n.displayName="components/EmployerProfilePagesTopSpacing/index/EmployerProfilePagesTopSpacing";const o=n},297106:function(e,a,r){r.d(a,{z:()=>l});var t=r(651679),s=r(942751),i=r(594948),n=r(710493),o=r(875588);const l=()=>{const e=(0,s.useDispatch)(),a=(0,t.useRef)(null),[r,l]=(0,t.useState)(!1),c=(0,i.v)(e=>!e.chatikFloatActivator.fixed),d=(0,o.k)();(0,t.useEffect)(()=>{null!==a.current?l(!0):l(!1)});const u=(0,t.useCallback)((a=80)=>{e((0,n.Cp)({shift:a}))},[e]),m=(0,t.useCallback)(()=>{e((0,n.m_)())},[e]);return(0,t.useEffect)(()=>{if(!a.current||!d||!c)return;const e=new IntersectionObserver(([e])=>{e.intersectionRatio<1&&e.intersectionRect.top>0?u(e.target.clientHeight):m()},{rootMargin:"0px 0px -1px 0px",threshold:[1]});return e.observe(a.current),()=>{e.disconnect()}},[c,d,r,m,u]),(0,t.useEffect)(()=>{if(r&&c)return m},[m,r,c]),{stickyTrackingRef:a,shiftChatik:u,resetChatikShift:m}}},5462:function(e,a,r){r.d(a,{C:()=>l});var t=r(694847),s=r(242069),i=r.n(s),n=r(89396),o=r(612215);const l=({children:e,container:a,...r})=>(0,n.i)()?(0,o.jsx)(t.C,{...r,children:e}):(0,o.jsx)(i(),{...r,container:a,children:e});l.displayName="components/MagritteRedesignComponents/GridColumn/GridColumn"},75278:function(e,a,r){r.d(a,{H:()=>o});var t=r(560835),s=r.n(t),i=r(89396),n=r(612215);const o=({isEnabled:e,children:a})=>(0,n.jsx)(i.B.Provider,{value:e,children:(0,n.jsx)("div",{className:s()({"magritte-redesign":e}),children:a})});o.displayName="src/components/MagritteWrapper/MagritteWrapper"},328205:function(e,a,r){r.d(a,{Z:()=>n});var t=r(651679),s=r(776205),i=r(359012);const n=e=>{const[a,r]=(0,t.useState)(),n=(0,t.useCallback)(()=>{var a,t;const s=Math.floor((document.body.clientWidth-(null!==(a=null==e||null===(t=e.current)||void 0===t?void 0:t.offsetWidth)&&void 0!==a?a:0))/2);r({correction:s})},[e]);return(0,t.useLayoutEffect)(()=>{n()},[n]),(0,i.a)((0,s.P)(n,100)),{containerCorrections:a}}},453390:function(e,a,r){r.r(a),r.d(a,{default:()=>Mt});var t=r(651679),s=r(252758),i=r(977403),n=r(606975),o=r.n(n),l=r(917003),c=r.n(l),d=r(881104),u=r.n(d),m=r(133239),p=r(390308),y=r(995322),v=r(873),g=r(5462),h=r(75278),b=r(594948),x=r(468444),f=r(678305),S=r(342253),j=r(835659),C=r(116590),I=r(70013),_=r(87014),M=r(192214),k=r(586761),N=r(520595),w=r(112687),E=r(617904),D=r(196579),q=r(319363),A=r(80177),T=r(597438),R=r.n(T),P=r(472344),O=r.n(P),Q=r(925029),z=r.n(Q),B=r(81438),L=r(740421),V=r.n(L),F=r(368514),U=r(986934),G=r.n(U),W=r(556767),X=r.n(W),Z=r(72061),H=r(903346),$=r.n(H),K=r(682288),Y=r.n(K),J=r(51662),ee=r(617223),ae=r.n(ee),re=r(103734),te=r.n(re),se=r(353189),ie=r(758192),ne=r.n(ie),oe=r(225147),le=r(625266),ce=r.n(le),de=r(206913),ue=r(995386),me=r.n(ue);const pe=()=>{const e=(0,b.v)(({router:e})=>e.location.query.employerId),a=(0,b.v)(e=>e.employerId),r=Number(null!=e?e:a);return(0,t.useMemo)(()=>({sendCreateDivisionClick:()=>R()({employerId:r}),sendDivisionSettingsClick:e=>me()({employerId:r,divisionId:e}),sendDivisionMenuOptionClick:(e,a)=>$()({employerId:r,divisionId:e,option:a}),sendDivisionManagerLinkClick:(e,a)=>G()({employerId:r,divisionId:e,managerId:a}),sendDivisionQuotaInfoClick:(e,a)=>ae()({employerId:r,divisionId:e,serviceId:a}),sendChangelogTabClick:(e,a)=>
1O()({employerId:r,divisionId:e,tab:a}),sendOnboardingModalShown:()=>(0,J.divisionOnboardingModalElementShownRaw)({employerId:r}),sendCreateModalShown:e=>(0,B.divisionCreateModalElementShownRaw)({employerId:r,createStep:e}),sendRenameModalShown:e=>(0,oe.divisionRenameModalElementShownRaw)({employerId:r,divisionId:e}),sendManagersModalShown:e=>(0,Z.divisionManagersModalElementShownRaw)({employerId:r,divisionId:e}),sendServicesModalShown:e=>(0,de.divisionServicesModalElementShownRaw)({employerId:r,divisionId:e}),sendQuotasModalShown:e=>(0,se.divisionQuotasModalElementShownRaw)({employerId:r,divisionId:e}),sendDeleteModalShown:e=>(0,F.divisionDeleteModalElementShownRaw)({employerId:r,divisionId:e}),sendOnboardingModalClick:e=>Y()({buttonName:e,employerId:r}),sendCreateModalClick:(e,a)=>z()({buttonName:e,employerId:r,createStep:a}),sendRenameModalClick:(e,a)=>ne()({buttonName:e,employerId:r,divisionId:a}),sendManagersModalClick:(e,a)=>X()({buttonName:e,employerId:r,divisionId:a}),sendServicesModalClick:(e,a)=>ce()({buttonName:e,employerId:r,divisionId:a}),sendQuotasModalClick:(e,a)=>te()({buttonName:e,employerId:r,divisionId:a}),sendDeleteModalClick:(e,a)=>V()({buttonName:e,employerId:r,divisionId:a})}),[r])};var ye=r(80046),ve=r(615081),ge=r(254111),he=r(430356),be=r(744120),xe=r(440119),fe=r(924135),Se=r(612215);const je=(0,t.createContext)(null),Ce=({children:e})=>{const[a,r]=(0,t.useState)(null),s=(0,t.useCallback)(e=>r(e),[]),i=(0,t.useCallback)(()=>r(null),[]),n=(0,t.useMemo)(()=>({activeModal:a,openModal:s,closeModal:i}),[a,i,s]);return(0,Se.jsx)(je.Provider,{value:n,children:e})};Ce.displayName="EmployerStructure/context/DivisionModalsContext/DivisionModalsProvider";const Ie=()=>{const e=(0,t.useContext)(je);if(null===e)throw new Error("Ðе Ñ
ваÑÐ°ÐµÑ Ð¿ÑовайдеÑа конÑекÑÑа DivisionModalsContext");return e},_e="employerStructure.settings",Me={managers:"employerStructure.edit.managers",rename:"employerStructure.edit.rename",remove:"employerStructure.edit.remove",services:"employerStructure.edit.services",quotas:"employerStructure.edit.quotas",changelog:"employerStructure.edit.changelog"},ke=["services","managers","quotas","changelog","rename","remove"],Ne=({trls:e,division:a})=>{const r=(0,ve.E)(),{openModal:s}=Ie(),i=(0,b.v)(({router:e})=>e.location.query.employerId),{sendDivisionSettingsClick:n,sendDivisionMenuOptionClick:o}=pe(),{divisionId:l}=a,[c,d,u]=(0,fe.m)(!1),m=(0,t.useRef)(null),p=(0,t.useCallback)(()=>{n(l),d()},[l,d,n]),y=(0,t.useCallback)(e=>{if(o(l,e),"changelog"===e){const e=i?`&employerId=${i}`:"";r(`employer/structure/changelog?divisionId=${a.divisionId}${e}`)}else s({type:e,data:{division:a}});u()},[u,a,l,i,s,r,o]);return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(D.r,{typography:"label-2-regular",iconLeft:(0,Se.jsx)(xe.CmT,{}),"data-qa":"employer-structure-division-item-settings",ref:m,onClick:p,children:e[_e]}),(0,Se.jsx)(ge.S,{visible:c,onClose:u,dropProps:{placement:"bottom-right",activatorRef:m},children:ke.map(r=>"quotas"!==r||a.servicesInfo.services.length?(0,Se.jsx)(he.b,{horPadding:!0,vertPadding:!0,borderRadius:12,"data-qa":`employer-structure-division-${r}`,onClick:()=>y(r),width:300,children:(0,Se.jsx)(be.j,{typography:"label-2-regular",children:e[Me[r]]})},r):null)})]})};Ne.displayName="EmployerStructure/components/DivisionMenu/DivisionMenuComponent";const we=(0,i.x)(Ne);var Ee=r(933276),De=r(484661);const qe={priceRegion:{one:"employer.structure.priceRegion.one",some:"employer.structure.priceRegion.some",many:"employer.structure.priceRegion.many"},profArea:{one:"employer.structure.profArea.one",some:"employer.structure.profArea.some",many:"employer.structure.profArea.many"}},Ae=({names:e,values:a,type:r,trls:s})=>{const i=(0,t.useRef)(null);return a?a.length>1?(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(D.r,{Element:"button",inline:!0,typography:"label-3-regular",style:"neutral",ref:i,children:(0,Se.jsx)(Ee.q,{value:a.length,one:s[qe[r].one],some:s[qe[r].some],many:s[qe[r].many]})}),(0,Se.jsx)(De.p,{placement:"top-center",activatorRef:i,children:(0,Se.jsx)(S.z,{default:4,children:a.map(a=>(0,Se.jsx)(w.x,{typography:"label-3-regular",children:e[a]},a))})})]}):e[a[0]]:null};Ae.displayName="EmployerStructure/components/ServiceAdditionalInfo/ServiceAdditionalInfoComponent";const Te=(0,i.x)(Ae),Re=({priceRegionIds:e,profRoleGroupIds:a,profAreaIds:r,priceRegionNames:t,profRoleGroupNames:s,profAreaNames:i})=>{if(!(e||r||a))return null;const n=a||r,o=a?s:i;return(0,Se.jsxs)(w.x,{style:"secondary",typography:"label-3-regular",children:[(0,Se.jsx)(Te,{type:"priceRegion",names:t,values:e}),e&&n?(0,Se.jsx)("span",{children:", "}):null,(0,Se.jsx)(Te,{type:"profArea",names:o,values:n})]})};Re.displayName="EmployerStructure/components/ServiceInfo/ServiceInfoComponent";const Pe=(0,t.memo)(Re),Oe="top-panel--F_lDsD_V0FS6BXbZ",Qe="bottom-panel--VqdVgbAsOosBA1Q4",ze="managers-container--h36wiYPArrMOGTCJ",Be="employerStructure.create.services.serviceId",Le="employerStructure.create.services.service",Ve="employerStructure.create.services.ending",Fe="employerStructure.create.services.available",Ue="employerStructure.create.services.payer",Ge="employerStructure.managers.label",We=({trls:e,division:a,hasPermission:r})=>{const{sendDivisionManagerLinkClick:t}=pe(),{divisionId:s,serviceAdditional:i}=a,{services:n}=a.servicesInfo,o=(0,Se.jsxs)("div",{className:Oe,children:[(0,Se.jsx)(_.D,{Element:"h2",size:"medium","data-qa":"employer-structure-division-item-title",children:a.divisionName}),r&&(0,Se.jsx)(we,{division:a})]}),l=(0,Se.jsx)(M.x,{children:(0,Se.jsxs)(k.S,{align:"left",children:[(0,Se.jsx)(N.p,{Element:"th",children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Be]})}),(0,Se.jsx)(N.p,{Element:"th",children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Le]})}),(0,Se.jsx)(N.p,{Element:"th",m:2,children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Ve]})}),(0,Se.jsx)(N.p,{Element:"th",m:1,children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Fe]})}),(0,Se.jsx)(N.p,{Element:"th",m:4,children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Ue]})})]})}),c=i&&(0,Se.jsx)(E.R,{children:n.map(({serviceCode:e,serviceId:a,expireDate:r,payer:t,totalCount:s,priceRegionIds:n,profRoleGroupIds:o,profAreaIds:l,quotaCount:c=null})=>(0,Se.jsxs)(k.S,{align:"left","data-qa":"employer-structure-service",children:[(0,Se.jsx)(N.p,{m:1,children:(0,Se.jsx)(w.x,{typography:"label-3-regular",children:a})}),(0,Se.jsx)(N.p,{m:4,"data-qa":"employer-structure-service-name",children:(0,Se.jsxs)(S.z,{default:4,children:[(0,Se.jsx)(w.x,{typography:"label-3-regular",children:i.serviceNames[e]}),(0,Se.jsx)(Pe,{profRoleGroupNames:i.profRoleGroupNames,profRoleGroupIds:o,profAreaNames:i.profAreaNames,profAreaIds:l,priceRegionNames:i.priceRegionNames,priceRegionIds:n})]})}),(0,Se.jsx)(N.p,{m:2,children:(0,Se.jsx)(w.x,{typography:"label-3-regular",children:(0,Se.jsx)("span",{suppressHydrationWarning:!0,children:r?(0,j.p6)(new Date(r),"dd.MM.y"):null})})}),(0,Se.jsx)(N.p,{m:1,"data-qa":"employer-structure-service-quota",children:(0,Se.jsx)(w.x,{typography:"label-3-regular",children:(0,C.uf)(null===c?s:c,{groupSeparator:ye.NON_BREAKING_SPACE})})}),(0,Se.jsx)(N.p,{m:4,children:(0,Se.jsx)(w.x,{typography:"label-3-regular",maxLines:1,children:null==t?void 0:t.name})})]},a))}),d=(0,Se.jsxs)("div",{className:Qe,children:[(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Ge]}),(0,Se.jsx)("div",{className:ze,children:a.managers.map(({managerFullName:e,managerId:a})=>(0,Se.jsx)(D.r,{Element:I.u,to:`/employer/settings?employerManagerId=${a}`,typography:"label-3-regular",onClick:()=>{t(s,a)},children:e},a))})]});return(0,Se.jsx)(q.Z,{borderWidth:"default",borderStyle:"neutral",borderRadius:24,stretched:!0,"data-qa":"employer-structure-division-item",children:(0,Se.jsx)(S.z,{default:12,children:(0,Se.jsxs)(A.x,{padding:24,divider:!0,topPanel:o,bottomPanel:d,stretched:!0,children:[l,c]})})})};We.displayName="EmployerStructure/components/Division/DivisionComponent";const Xe=(0,i.x)(We),Ze=({divisions:e,hasPermission:a})=>(0,Se.jsx)(S.z,{default:24,children:Object.values(e).map(e=>(0,Se.jsx)(Xe,{division:e,hasPermission:a},e.divisionId))});Ze.displayName="EmployerStructure/components/Divisions/DivisionsComponent";const He=(0,i.x)(Ze);var $e=r(942751),Ke=r(155462),Ye=r(239731),Je=r(840735),ea=r(139088),aa=r(373294),ra=r(756951),ta=r(776921),sa=r(255717);const ia=(e,a)=>sa._i.get("/shards/employer/divisions/services",{params:e,signal:a});var na=r(166122),oa=r(79385),la=r(740010),ca=r(829347),da=r(632633),ua=r(199714),ma=r(646692),pa=r(293161),ya=r(36887);const va="suggest.error.resetButton",ga="suggest.error.title",ha="suggest.error.description",ba="suggest.values.showAll",xa="suggest.values.hide",fa="suggest.values.hint",Sa=({managers:e,onRemove:a,trls:r})=>{const{hasVerticalScroll:s,verticalScrollbarProps:i,...n}=(0,la.u)({axis:"vertical"}),[o,l]=(0,t.useState)(!1),c=(0,t.useMemo)(()=>o?e:e.slice(0,15),[o,e]);return 0===c.length?null:(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("div",{className:n.hoverContainerCssClass,style:{position:"relative",height:"100%"},children:(0,Se.jsx)(ca.T,{"data-qa":"employer-structure-managers-chips",children:c.map(({managerId:e,managerFullName:r})=>(0,Se.jsx)(da.X,{size:"extra-small",Element:"button",onDelete:()=>a(e),deleteOnly:!0,children:r},e))})}),s&&(0,Se.jsx)(ua.L,{...i}),e.length>15&&(0,Se.jsx)(D.r,{onClick:()=>l(e=>!e),children:o?r[xa]:(0,Ke.WU)(r[ba],{"{0}":e.length-15})})]})};Sa.displayName="EmployerStructure/components/ManagersPicker/ManagersChips";const ja=(0,t.memo)(Sa),Ca=({placeholder:e,headerTitle:a,preselectedManagers:r=[],onChange:s,trls:i})=>{const n=(0,b.v)(({employerManagersList:e})=>e),o=(0,t.useMemo)(()=>n.map(({id:e,text:a})=>({value:String(e),text:a})),[n]),[l,c]=(0,t.useState)(""),[d,u]=(0,t.useState)(r),m=(0,t.useMemo)(()=>{const e=new Set(d.map(e=>String(e.managerId)));return o.filter(a=>!e.has(a.value))},[o,d]),p=(0,t.useMemo)(()=>(0,ma.Bn)(m),[m]),y=(0,t.useMemo)(()=>(0,ma.d8)({minCharsCount:2,fetcher:p}),[p]),v=(0,t.useCallback)(e=>{const a=d.filter(a=>a.managerId!==e);u(a),s(a)},[s,d]),g=(0,t.useCallback)((e,a)=>Boolean(a),[]),h=(0,t.useCallback)((e,a,r)=>{a&&r&&(u(e=>{var a;const t=[...e,{managerId:Number(r.value),managerFullName:null!==(a=r.text)&&void 0!==a?a:r.value}];return s(t),t}),c(""))},[s]);return(0,Se.jsxs)(S.z,{default:24,children:[(0,Se.jsx)(pa.U,{dataProvider:y,inputValue:l,onSelectValidator:g,onChange:h,headerTitle:a,maxHeight:200,trls:{resetButton:i[va]},errorPlaceholder:(0,Se.jsx)(ya.V,{title:i[ga],description:i[ha]}
1),input:{component:Je.I,props:{hint:i[fa],size:"large",placeholder:e,"data-qa":"employer-structure-modal-input",onChange:e=>c(e)}},renderItem:({item:e,data:a,isMobile:r})=>{var t;return"cells"!==e.type?null:(0,Se.jsx)(he.b,{horPadding:r,vertPadding:r,"data-qa":"employer-structure-manager-option",children:(0,Se.jsx)(be.j,{children:null!==(t=null==a?void 0:a.text)&&void 0!==t?t:e.value})})}}),(0,Se.jsx)(ja,{trls:i,managers:d,onRemove:v})]})};Ca.displayName="EmployerStructure/components/ManagersPicker/ManagersPickerComponent";const Ia=(0,i.x)(Ca);var _a=r(65516),Ma=r(495387),ka=r(405227),Na=r(842464);const wa="root--BbBTUkf4qfUw8dXf",Ea="employerStructure.edit.quotas.using.header",Da="employerStructure.edit.quotas.using.quota",qa="employerStructure.edit.quotas.using.unlimited",Aa=({trls:e,usedBy:a})=>(0,Se.jsxs)("div",{className:wa,"data-qa":"employer-structure-quota-tooltip",children:[(0,Se.jsx)(w.x,{typography:"paragraph-3-regular",children:e[Ea]}),(0,Se.jsx)(w.x,{typography:"paragraph-3-regular",children:e[Da]}),a.map(({divisionId:a,divisionName:r,quotaCount:s})=>(0,Se.jsxs)(t.Fragment,{children:[(0,Se.jsx)(w.x,{typography:"paragraph-3-regular",children:r}),(0,Se.jsx)(w.x,{typography:"paragraph-3-regular",children:s>=0?s:e[qa]})]},a))]});Aa.displayName="EmployerStructure/components/QuotaUseInfo/QuotaUseInfoComponent";const Ta=(0,i.x)(Aa),Ra="unlimited--JaO2GHZEyIcje3Yk",Pa="limited--qVJV3fs_VwknfVK2",Oa="actions--sBl37hDouU2F58Yz",Qa="input--EkbDcewMvpQDnKSX",za="employerStructure.create.quotas.overlimit",Ba="employerStructure.create.quotas.unlimited",La="employerStructure.create.quotas.from",Va="employerStructure.edit.quotas.using.notUsing",Fa=({quotaCount:e=null,serviceId:a,availableQuotasCount:r,handleChangeQuotas:s,usedBy:i,trls:n})=>{const[o,l]=(0,t.useState)(null===e),c=(0,t.useRef)(null),d=(0,t.useCallback)(()=>{s(a,r)},[r,s,a]),u=(0,t.useCallback)(e=>{const t=Number(e.replace(/[^0-9]/g,""));s(a,t>r?r:t)},[r,s,a]),m=(0,t.useCallback)(()=>{if(o)return s(a,0),void l(!1);s(a,null),l(!0)},[s,o,a]),p=(0,t.useCallback)(e=>{m()},[m]);if(o)return(0,Se.jsxs)("label",{className:Ra,children:[(0,Se.jsx)(ka.X,{checked:o,onChange:p}),(0,Se.jsx)(w.x,{typography:"label-3-regular",children:n[Ba]})]});const y=null!==e&&e>r,v=(0,C.uf)(r,{groupSeparator:ye.NON_BREAKING_SPACE});return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)("div",{className:Pa,children:[(0,Se.jsx)("div",{className:Qa,children:(0,Se.jsx)(Na.Y,{value:String(null!=e?e:0),onChange:u,invalid:y,allowNegative:!1,decimalLength:0,size:"small",autoFocus:!0,"data-qa":"employer-structure-service-quota-input"})}),(0,Se.jsxs)("div",{className:Oa,children:[(0,Se.jsxs)(D.r,{Element:"button",typography:"label-3-regular",style:"neutral",onClick:d,ref:c,"data-qa":"employer-structure-service-quota-limit",children:[n[La],ye.NON_BREAKING_SPACE,v]}),(0,Se.jsx)(De.p,{placement:"top-center",size:"small",activatorRef:c,maxWidth:600,children:i?(0,Se.jsx)(Ta,{usedBy:i}):n[Va]}),(0,Se.jsx)(xe.mTT,{initialColor:"secondary",onClick:m,"data-qa":"employer-structure-service-quota-reset"})]})]}),y&&(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(f.X,{default:8}),(0,Se.jsx)(ea.w,{invalid:!0,errorMessage:(0,Ke.WU)(n[za],{"{0}":r})})]})]})};Fa.displayName="EmployerStructure/components/QuotaCount/QuotaCountComponent";const Ua=(0,i.x)(Fa),Ga=({usedBy:e,isDivisionServices:a,totalCount:r,quotaCount:s,divisionId:i,serviceId:n})=>{const{sendDivisionQuotaInfoClick:o}=pe(),l=(0,t.useRef)(null),c=(0,C.uf)(null==s?r:s,{groupSeparator:ye.NON_BREAKING_SPACE}),d=(0,t.useCallback)(()=>{void 0!==i&&void 0!==n&&o(i,n)},[i,o,n]);return a&&e?(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(D.r,{Element:"button",typography:"label-3-regular",style:"neutral",ref:l,children:c}),(0,Se.jsx)(De.p,{placement:"top-center",size:"small",activatorRef:l,maxWidth:600,onAppear:d,children:(0,Se.jsx)(Ta,{usedBy:e})})]}):(0,Se.jsx)(w.x,{typography:"label-3-regular",children:c})};Ga.displayName="EmployerStructure/components/QuotaInfo/QuotaInfo";const Wa="employerStructure.create.services.serviceId",Xa="employerStructure.create.services.service",Za="employerStructure.create.services.ending",Ha="employerStructure.create.services.available",$a="employerStructure.create.services.quota",Ka="employerStructure.create.services.payer",Ya=({trls:e,isQuota:a,services:r,handleCheck:t,selectedServices:s=[],serviceQuotas:i,handleChangeQuotas:n,isDivisionServices:o,serviceAdditional:{serviceNames:l,priceRegionNames:c,profRoleGroupNames:d,profAreaNames:u},divisionId:m})=>
1{if(0===r.length)return null;const p=a?{serviceId:70,service:154,ending:90,count:188,payer:154}:{serviceId:70,service:221,ending:90,count:71,payer:204};return(0,Se.jsxs)(_a.i,{cellsGap:24,stickyHeader:!0,fixedSize:!0,divider:!0,children:[(0,Se.jsx)(M.x,{children:(0,Se.jsxs)(k.S,{align:"left",children:[(0,Se.jsx)(N.p,{Element:"th",width:p.serviceId,children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Wa]})}),(0,Se.jsx)(N.p,{Element:"th",width:p.service,children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Xa]})}),(0,Se.jsx)(N.p,{Element:"th",width:p.ending,children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Za]})}),(0,Se.jsx)(N.p,{Element:"th",width:p.count,children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:a?e[$a]:e[Ha]})}),(0,Se.jsx)(N.p,{Element:"th",width:p.payer,children:(0,Se.jsx)(w.x,{style:"secondary",typography:"label-3-regular",children:e[Ka]})})]})}),(0,Se.jsx)(E.R,{children:r.map(({serviceCode:e,serviceId:r,expireDate:y,payer:v,totalCount:g,priceRegionIds:h,profRoleGroupIds:b,profAreaIds:x,availableQuotasCount:f,quotaCount:C=null,usedBy:I})=>{const _=(0,Se.jsxs)(S.z,{default:4,children:[(0,Se.jsx)(w.x,{typography:"label-3-regular",children:l[e]}),(0,Se.jsx)(Pe,{profRoleGroupNames:d,profRoleGroupIds:b,profAreaNames:u,profAreaIds:x,priceRegionNames:c,priceRegionIds:h})]});return(0,Se.jsxs)(k.S,{align:"left","data-qa":"employer-structure-service",children:[(0,Se.jsx)(N.p,{width:p.serviceId,children:(0,Se.jsx)(w.x,{typography:"label-3-regular",children:r})}),(0,Se.jsx)(N.p,{width:p.service,"data-qa":"employer-structure-service-name",children:t?(0,Se.jsxs)(Ma.q,{default:12,children:[(0,Se.jsx)(ka.X,{value:r,checked:s.includes(r),onChange:t,"aria-label":l[e]}),_]}):_}),(0,Se.jsx)(N.p,{width:p.ending,children:(0,Se.jsx)(w.x,{typography:"label-3-regular",children:(0,Se.jsx)("span",{suppressHydrationWarning:!0,children:y?(0,j.p6)(new Date(y),"dd.MM.y"):null})})}),(0,Se.jsx)(N.p,{width:p.count,children:a&&n&&i?(0,Se.jsx)(Ua,{serviceId:r,quotaCount:i[r],handleChangeQuotas:n,availableQuotasCount:f,usedBy:I}):(0,Se.jsx)(Ga,{usedBy:I,isDivisionServices:o,totalCount:g,quotaCount:C,divisionId:m,serviceId:r})}),(0,Se.jsx)(N.p,{width:p.payer,children:(0,Se.jsx)(w.x,{typography:"label-3-regular",maxLines:3,children:null==v?void 0:v.name})})]},r)})})]})};Ya.displayName="EmployerStructure/components/Services/ServicesComponent";const Ja=(0,i.x)(Ya);var er=r(969067),ar=r(336301),rr=r(86880),tr=r(322815),sr=r(622694),ir=r(270966);const nr="body--grio19jPNpM2yxUz",or=({visible:e,title:a,subtitle:r,submitText:t,cancelText:s,isSubmitting:i,isContentLoading:n,isSubmitDisabled:o,progressBar:l,size:c="large",dataQa:d,onSubmit:u,onClose:m,onCancel:p,children:y})=>{const{isMobile:v}=(0,er.G)(),g=(0,Se.jsx)(ar.l,{children:(0,Se.jsx)(ar.l.Pane,{children:(0,Se.jsx)(ar.l.Stage,{children:(0,Se.jsx)(ar.l.TitleContainer,{size:"large",title:(0,Se.jsx)(w.x,{typography:"title-4-semibold",children:a}),subtitle:r&&(0,Se.jsx)(w.x,{typography:"paragraph-2-regular","data-qa":`${d}-division-name`,children:r})})})})}),h=(0,Se.jsx)(rr.o,{type:"horizontal",showProgress:l,primaryActions:(0,Se.jsx)(tr.z,{mode:"primary",style:"accent",loading:i,disabled:o,"data-qa":`${d}-submit`,onClick:u,children:t}),secondaryActions:(0,Se.jsx)(tr.z,{mode:"tertiary",style:"accent","data-qa":`${d}-cancel`,onClick:null!=p?p:m,children:s})}),b=(0,Se.jsx)("div",{className:nr,children:n?(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(f.X,{default:64}),(0,Se.jsx)(aa.k,{align:"center",justify:"center",children:(0,Se.jsx)(ra.a,{size:32,color:"accent"})}),(0,Se.jsx)(f.X,{default:64})]}):y});return v?(0,Se.jsx)(sr.R,{visible:e,height:"content",header:g,footer:h,"data-qa":d,onClose:m,children:b}):(0,Se.jsx)(ir.u,{visible:e,size:c,height:"content",header:g,footer:h,"data-qa":d,onClose:m,children:b})};or.displayName="components/Modals/DivisionModalLayout/DivisionModalLayout";const lr=["DIVISION_NAME_IS_EMPTY","DUPLICATE_DIVISION_NAME"],cr={nameTitle:"employerStructure.create.departmentName.title",nameExample:"employerStructure.create.departmentName.example",nameExampleName:"employerStructure.create.departmentName.exampleName",managersTitle:"employerStructure.modal.managers.title",managersLabel:"employerStructure.create.managers.label",managersPlaceholderOne:"employerStructure.create.managers.placeholderOne",managersPlaceholderMany:"employerStructure.create.managers.placeholderMany",servicesTitle:"employerStructure.modal.services.title",cancel:"Cancel",back:"employerStructure.create.back",proceed:"employerStructure.create.proceed",submit:"employerStructure.create.submit",DIVISION_NAME_IS_EMPTY:"employerStructure.create.error.DIVISION_NAME_IS_EMPTY",DUPLICATE_DIVISION_NAME:"employerStructure.create.error.DUPLICATE_DIVISION_NAME",defaultError:"employerStructure.create.error.default",success:"employerStructure.create.success"},dr=({visible:e,employerId:a,onClose:r,trls:s})=>{const i=(0,$e.useDispatch)(),{addNotification:n}=(0,na.lm)(),{sendCreateModalShown:o,sendCreateModalClick:l}=pe(),[c,d]=(0,t.useState)(1),[u,m]=(0,t.useState)(""),[p,y]=(0,t.useState)([]),[v,g]=(0,t.useState)(null),[h,b]=(0,t.useState)([]),[x,S]=(0,t.useState)(!1),[j,C]=(0,t.useState)(""),I=s[cr.defaultError],_=(0,t.useCallback)(()=>{d(1),m(""),y([]),g(null),b([]),S(!1),C("")},[]);(0,t.useEffect)(()=>{e||_()},[_,e]),(0,t.useEffect)(()=>{e&&o(c)},[o,c,e]),(0,t.useEffect)(()=>
1{if(!e||3!==c||v)return;const r=new AbortController;C("");return(async()=>{try{const e=await ia({employerId:a},r.signal);g(e)}catch(e){r.signal.aborted||C(I)}})(),()=>r.abort()},[I,a,v,c,e]);const M=(0,t.useCallback)(e=>{m(e),C("")},[]),k=(0,t.useCallback)(({target:e})=>{const a=Number(e.value);b(e=>e.includes(a)?e.filter(e=>e!==a):[...e,a])},[]),N=(0,t.useCallback)(()=>{if(1===c)return l("cancel",1),void r();l("back",c),C(""),d(e=>3===e?2:1)},[r,l,c]),w=(0,t.useCallback)(()=>{l("close",c),r()},[r,l,c]),E=(0,t.useCallback)(async()=>{if(!x){l("proceed",1),S(!0),C("");try{await(t={divisionName:u},i={employerId:a},sa._i.put("/shards/employer/divisions/validate_name",t,{params:i,signal:n})),d(2)}catch(a){var e;const t=(0,sa.o7)(a)?null===(e=a.response)||void 0===e||null===(e=e.data.error)||void 0===e?void 0:e.key:void 0;C(s[r=t,lr.some(e=>e===r)?cr[t]:cr.defaultError])}finally{S(!1)}var r,t,i,n}},[u,a,x,l,s]),D=(0,t.useCallback)(()=>{l("proceed",2),C(""),d(3)},[l]),q=(0,t.useCallback)(async()=>{if(!x&&v){l("submit",3),S(!0),C("");try{const l=await(e={divisionName:u,managers:p,servicesInfo:{services:h.map(e=>({serviceId:e}))}},t={employerId:a},sa._i.post("/shards/employer/divisions/create",e,{params:t,signal:o}).then(({data:e})=>e));i((0,oa.ND)(l)),n(Ye.A,{props:{addon:(0,Se.jsx)(xe.lot,{initialColor:"positive"}),children:(0,Ke.WU)(s[cr.success],{"{0}":u}),showClose:!0,"data-qa":"employer-division-create-success"}}),r()}catch(e){C(I)}finally{S(!1)}var e,t,o}},[n,I,i,u,a,x,p,r,h,l,v,s]),A=(0,t.useCallback)(()=>{1!==c?2!==c?q():D():E()},[D,E,q,c]),T=`${s[cr.nameExample]}«${s[cr.nameExampleName]}»`,R=(0,Se.jsx)(Je.I,{size:"large",value:u,invalid:Boolean(j),errorMessage:j,placeholder:T,maxLength:50,"data-qa":"employer-structure-modal-input",onChange:M}),P=(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(Ia,{placeholder:p.length>0?s[cr.managersPlaceholderMany]:s[cr.managersPlaceholderOne],headerTitle:s[cr.managersLabel],preselectedManagers:p,onChange:y}),(0,Se.jsx)(ea.w,{invalid:Boolean(j),errorMessage:j})]}),O=(0,Se.jsxs)(Se.Fragment,{children:[v&&(0,Se.jsx)(Ja,{services:v.services,serviceAdditional:v.serviceAdditional,selectedServices:h,handleCheck:k,isDivisionServices:!0}),!v&&!j&&(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(f.X,{default:64}),(0,Se.jsx)(aa.k,{align:"center",justify:"center",children:(0,Se.jsx)(ra.a,{size:32,color:"accent"})}),(0,Se.jsx)(f.X,{default:64})]}),(0,Se.jsx)(ea.w,{invalid:Boolean(j),errorMessage:j})]}),Q={1:s[cr.nameTitle],2:s[cr.managersTitle],3:s[cr.servicesTitle]}[c],z=3===c?s[cr.submit]:s[cr.proceed],B=1===c?s[cr.cancel]:s[cr.back];return(0,Se.jsxs)(or,{visible:e,title:Q,subtitle:1===c?void 0:u,submitText:z,cancelText:B,isSubmitting:x,isSubmitDisabled:3===c&&!v,progressBar:(0,Se.jsx)(ta.k,{progress:c,segments:3}),dataQa:"employer-structure-division-create-modal",onSubmit:A,onClose:w,onCancel:N,children:[1===c&&R,2===c&&P,3===c&&O,(0,Se.jsx)(f.X,{default:16})]})};dr.displayName="components/Modals/DivisionCreateModal/DivisionCreateModalComponent";const ur=(0,i.x)(dr),mr="employerStructure.modal.delete.cancel",pr="employerStructure.modal.delete.submit",yr="employerStructure.delete.title",vr="employerStructure.delete.description",gr="employerStructure.create.error.default",hr=({visible:e,division:a,employerId:r,onClose:s,trls:i})=>{const n=(0,$e.useDispatch)(),{sendDeleteModalShown:o,sendDeleteModalClick:l}=pe(),{divisionId:c}=a,[d,u]=(0,t.useState)(!1),[m,p]=(0,t.useState)(""),y=i[gr];(0,t.useEffect)(()=>{if(!e)return u(!1),void p("");o(c)},[c,o,e]);const v=(0,t.useCallback)(()=>{l("cancel",c),s()},[c,s,l]),g=(0,t.useCallback)(()=>{l("close",c),s()},[c,s,l]),h=(0,t.useCallback)(async()=>{if(!d){l("confirm",c),u(!0),p("");try{await(e={divisionId:a.divisionId,employerId:r},sa._i.delete("/shards/employer/divisions/delete",{params:e,signal:t})),n((0,oa.E6)(a.divisionId)),s()}catch(e){p(y)}finally{u(!1)}var e,t}},[y,n,a.divisionId,c,r,d,s,l]);return(0,Se.jsxs)(or,{visible:e,size:"large",title:(0,Ke.WU)(i[yr],{"{0}":a.divisionName}),submitText:i[pr],cancelText:i[mr],isSubmitting:d,dataQa:"employer-structure-division-delete-modal",onSubmit:h,onClose:g,onCancel:v,children:[(0,Se.jsx)(w.x,{typography:"paragraph-2-regular",children:i[vr]}),(0,Se.jsx)(ea.w,{invalid:Boolean(m),errorMessage:m})]})};
1hr.displayName="components/Modals/DivisionDeleteModal/DivisionDeleteModalComponent";const br=(0,i.x)(hr),xr=(e,a,r)=>sa._i.put("/shards/employer/divisions/edit",e,{params:a,signal:r}).then(({data:e})=>e),fr="employerStructure.modal.managers.title",Sr="common.save",jr="Cancel",Cr="employerStructure.create.managers.placeholderOne",Ir="employerStructure.create.managers.placeholderMany",_r="employerStructure.create.managers.label",Mr="employerStructure.create.error.default",kr=({visible:e,division:a,employerId:r,onClose:s,trls:i})=>{const n=(0,$e.useDispatch)(),{sendManagersModalShown:o,sendManagersModalClick:l}=pe(),{divisionId:c}=a,[d,u]=(0,t.useState)(a.managers),[m,p]=(0,t.useState)(!1),[y,v]=(0,t.useState)(""),g=i[Mr];(0,t.useEffect)(()=>{e&&(o(c),u(a.managers),v(""))},[a.managers,c,o,e]);const h=(0,t.useCallback)(()=>{l("cancel",c),s()},[c,s,l]),b=(0,t.useCallback)(()=>{l("close",c),s()},[c,s,l]),x=(0,t.useCallback)(async()=>{if(m)return;l("save",c),p(!0),v("");const{serviceAdditional:e,...t}=a;try{const e=await xr({...t,managers:d},{employerId:r});n((0,oa.ND)(e)),s()}catch(e){v(g)}finally{p(!1)}},[g,n,a,c,r,m,d,s,l]);return(0,Se.jsxs)(or,{visible:e,title:i[fr],subtitle:a.divisionName,submitText:i[Sr],cancelText:i[jr],isSubmitting:m,dataQa:"employer-structure-division-managers-modal",onSubmit:x,onClose:b,onCancel:h,children:[(0,Se.jsx)(Ia,{placeholder:d.length>0?i[Ir]:i[Cr],headerTitle:i[_r],preselectedManagers:a.managers,onChange:u}),(0,Se.jsx)(ea.w,{invalid:Boolean(y),errorMessage:y})]})};kr.displayName="components/Modals/DivisionManagersModal/DivisionManagersModalComponent";const Nr=(0,i.x)(kr),wr="step--JKwhbAL1eqgf76Fp",Er="tag--ts1rTNZF5UcnKOeR",Dr=[1,2,3,4],qr={title:"employerStructure.onboarding.title",description:"employerStructure.onboarding.description",stage1:"employerStructure.onboarding.stage.1",stage2:"employerStructure.onboarding.stage.2",stage3:"employerStructure.onboarding.stage.3",stage4:"employerStructure.onboarding.stage.4",submit:"employerStructure.onboarding.submit",cancel:"employerStructure.onboarding.cancel"},Ar=({visible:e,onClose:a,trls:r})=>{const{openModal:s}=Ie(),{sendOnboardingModalShown:i,sendOnboardingModalClick:n}=pe();(0,t.useEffect)(()=>{e&&i()},[i,e]);const o=(0,t.useCallback)(()=>{n("continue"),s({type:"create"})},[s,n]),l=(0,t.useCallback)(()=>{n("cancel"),a()},[a,n]),c=(0,t.useCallback)(()=>{n("close"),a()},[a,n]);return(0,Se.jsxs)(or,{visible:e,title:r[qr.title],subtitle:r[qr.description],submitText:r[qr.submit],cancelText:r[qr.cancel],size:"medium",dataQa:"employer-structure-division-onboarding-modal",onSubmit:o,onClose:c,onCancel:l,children:[(0,Se.jsx)(S.z,{default:24,children:Dr.map(e=>(0,Se.jsxs)("div",{className:wr,children:[(0,Se.jsx)("div",{className:Er,children:(0,Se.jsx)(w.x,{typography:"subtitle-1-semibold",children:e})}),(0,Se.jsx)(w.x,{typography:"paragraph-2-regular",children:r[qr[`stage${e}`]]})]},e))}),(0,Se.jsx)(f.X,{default:16})]})};Ar.displayName="components/Modals/DivisionOnboardingModal/DivisionOnboardingModalComponent";const Tr=(0,i.x)(Ar),Rr="employerStructure.modal.quotas.title",Pr="Save",Or="Cancel",Qr="employerStructure.create.error.default",zr="employerStructure.create.services.quota.negative",Br=({visible:e,division:a,employerId:r,onClose:s,trls:i})=>{const n=(0,$e.useDispatch)(),{sendQuotasModalShown:o,sendQuotasModalClick:l}=pe(),{divisionId:c,divisionName:d,serviceAdditional:u}=a,[m,p]=(0,t.useState)(null),[y,v]=(0,t.useState)({}),[g,h]=(0,t.useState)(!1),[b,x]=(0,t.useState)(""),f=i[Qr],S=i[zr];(0,t.useEffect)(()=>{if(!e)return;o(c);const a=new AbortController;p(null),x("");return(async()=>{try{var e;const i=await(t={divisionId:c,employerId:r},s=a.signal,sa._i.get("/shards/employer/divisions/selected_division",{params:t,signal:s})),o={...i,serviceAdditional:null!==(e=i.serviceAdditional)&&void 0!==e?e:u};p(o),v(Object.fromEntries(o.servicesInfo.services.map(({serviceId:e,quotaCount:a=null})=>[e,a]))),n((0,oa.IL)(o))}catch(e){a.signal.aborted||x(f)}var t,s})(),()=>a.abort()},[f,n,c,r,u,o,e]);const j=(0,t.useCallback)((e,a)=>{v(r=>({...r,[e]:a}))},[]),C=(0,t.useCallback)(()=>{l("cancel",c),s()},[c,s,l]),I=(0,t.useCallback)(()=>{l("close",c),s()},[c,s,l]),_=(0,t.useCallback)(async()=>
1{if(g||!m)return;l("save",c);const{divisionName:e,managers:a,servicesInfo:{services:t}}=m;h(!0),x("");try{const i=await xr({divisionId:c,divisionName:e,managers:a,servicesInfo:{services:t.map(({serviceId:e})=>({serviceId:e,quotaCount:y[e]}))}},{employerId:r});n((0,oa.ND)(i)),s()}catch(e){if((0,sa.o7)(e)){var i;const a=null===(i=e.response)||void 0===i?void 0:i.data.error;if("REQUESTED_QUOTA_MORE_THAN_AVAILABLE"===(null==a?void 0:a.key)&&a.availableQuotas){const e=Object.fromEntries(Object.entries(a.availableQuotas).map(([e,a])=>[e,Number(a)]));return n((0,oa.Id)({divisionId:c,availableQuotas:e})),void p(a=>a?{...a,servicesInfo:{...a.servicesInfo,services:a.servicesInfo.services.map(a=>{var r;return{...a,availableQuotasCount:null!==(r=e[a.serviceId])&&void 0!==r?r:a.availableQuotasCount}})}}:a)}if("NEGATIVE_VALUE_QUOTA"===(null==a?void 0:a.key))return void x(S)}x(f)}finally{h(!1)}},[f,n,m,c,r,g,S,s,l,y]);return(0,Se.jsxs)(or,{visible:e,title:i[Rr],subtitle:d,submitText:i[Pr],cancelText:i[Or],isSubmitting:g,isContentLoading:!m&&!b,isSubmitDisabled:!m,dataQa:"employer-structure-division-quotas-modal",onSubmit:_,onClose:I,onCancel:C,children:[(null==m?void 0:m.serviceAdditional)&&(0,Se.jsx)(Ja,{isQuota:!0,services:m.servicesInfo.services,serviceAdditional:m.serviceAdditional,serviceQuotas:y,handleChangeQuotas:j,divisionId:c}),(0,Se.jsx)(ea.w,{invalid:Boolean(b),errorMessage:b})]})};Br.displayName="components/Modals/DivisionQuotasModal/DivisionQuotasModalComponent";const Lr=(0,i.x)(Br),Vr=["DIVISION_NAME_IS_EMPTY","DUPLICATE_DIVISION_NAME"],Fr={title:"employerStructure.modal.rename.title",save:"common.save",cancel:"Cancel",placeholder:"employerStructure.create.departmentName.placeholder",DIVISION_NAME_IS_EMPTY:"employerStructure.create.error.DIVISION_NAME_IS_EMPTY",DUPLICATE_DIVISION_NAME:"employerStructure.create.error.DUPLICATE_DIVISION_NAME",defaultError:"employerStructure.create.error.default"},Ur=({visible:e,division:a,employerId:r,onClose:s,trls:i})=>{const n=(0,$e.useDispatch)(),{sendRenameModalShown:o,sendRenameModalClick:l}=pe(),{divisionId:c}=a,[d,u]=(0,t.useState)(a.divisionName),[m,p]=(0,t.useState)(!1),[y,v]=(0,t.useState)("");(0,t.useEffect)(()=>{e&&(o(c),u(a.divisionName),v(""),p(!1))},[a.divisionName,c,o,e]);const g=(0,t.useCallback)(e=>{u(e),v("")},[]),h=(0,t.useCallback)(()=>{l("cancel",c),s()},[c,s,l]),b=(0,t.useCallback)(()=>{l("close",c),s()},[c,s,l]),x=(0,t.useCallback)(async()=>{if(!m){l("save",c),p(!0),v("");try{const e=await xr({divisionId:a.divisionId,divisionName:d,managers:a.managers,servicesInfo:{services:a.servicesInfo.services.map(({serviceId:e,quotaCount:a})=>({serviceId:e,quotaCount:a}))}},{employerId:r});n((0,oa.ND)(e)),s()}catch(a){var e;const r=(0,sa.o7)(a)?null===(e=a.response)||void 0===e||null===(e=e.data.error)||void 0===e?void 0:e.key:void 0;v(i[t=r,Vr.some(e=>e===t)?Fr[r]:Fr.defaultError])}finally{p(!1)}var t}},[n,a.divisionId,a.managers,a.servicesInfo.services,c,d,r,m,s,l,i]);return(0,Se.jsx)(or,{visible:e,size:"large",title:i[Fr.title],submitText:i[Fr.save],cancelText:i[Fr.cancel],isSubmitting:m,dataQa:"employer-structure-division-rename-modal",onSubmit:x,onClose:b,onCancel:h,children:(0,Se.jsx)(Je.I,{size:"large",value:d,invalid:Boolean(y),errorMessage:y,placeholder:i[Fr.placeholder],maxLength:50,"data-qa":"employer-structure-modal-input",onChange:g})})};Ur.displayName="components/Modals/DivisionRenameModal/DivisionRenameModalComponent";const Gr=(0,i.x)(Ur),Wr="employerStructure.modal.services.title",Xr="employerStructure.edit.services.save",Zr="Cancel",Hr="employerStructure.create.error.default",$r=({visible:e,division:a,employerId:r,onClose:s,trls:i})=>{const n=(0,$e.useDispatch)(),{sendServicesModalShown:o,sendServicesModalClick:l}=pe(),{divisionId:c,divisionName:d,managers:u,servicesInfo:{services:m}}=a,[p,y]=(0,t.useState)(null),[v,g]=(0,t.useState)([]),[h,b]=(0,t.useState)(!1),[x,f]=(0,t.useState)(""),S=i[Hr];(0,t.useEffect)(()=>{if(!e)return;o(c);const a=new AbortController;y(null),g(m.map(({serviceId:e})=>e)),f("");return(async()=>{try{const e=await ia({employerId:r},a.signal);y(e)}catch(e){a.signal.aborted||f(S)}})(),()=>a.abort()},[S,c,m,r,o,e]);const j=(0,t.useCallback)(({target:e})=>{const a=Number(e.value);g(e=>e.includes(a)?e.filter(e=>e!==a):[...e,a])},[]),C=(0,t.useCallback)(()=>{l("cancel",c),s()},[c,s,l]),I=(0,t.useCallback)(()=>{l("close",c),s()},[c,s,l]),_=(0,t.useCallback)(async()=>
1{if(!h&&p){l("save",c),b(!0),f("");try{const e=await xr({divisionId:c,divisionName:d,managers:u,servicesInfo:{services:v.map(e=>{var a;return{serviceId:e,quotaCount:null===(a=m.find(a=>a.serviceId===e))||void 0===a?void 0:a.quotaCount}})}},{employerId:r});n((0,oa.ND)(e)),s()}catch(e){f(S)}finally{b(!1)}}},[S,n,c,d,m,r,h,u,s,v,l,p]);return(0,Se.jsxs)(or,{visible:e,title:i[Wr],subtitle:d,submitText:i[Xr],cancelText:i[Zr],isSubmitting:h,isContentLoading:!p&&!x,isSubmitDisabled:!p,dataQa:"employer-structure-division-services-modal",onSubmit:_,onClose:I,onCancel:C,children:[p&&(0,Se.jsx)(Ja,{services:p.services,serviceAdditional:p.serviceAdditional,selectedServices:v,handleCheck:j,isDivisionServices:!0,divisionId:c}),(0,Se.jsx)(ea.w,{invalid:Boolean(x),errorMessage:x})]})};$r.displayName="components/Modals/DivisionServicesModal/DivisionServicesModalComponent";const Kr=(0,i.x)($r),Yr="employerStructure.linkVacancies.cancel",Jr="employerStructure.linkVacancies.submit",et="employerStructure.linkVacancies.title",at="employerStructure.linkVacancies.description",rt="employerStructure.create.error.default",tt="employerStructure.linkVacancies.vacanciesUpdated",st="employerStructure.linkVacancies.managersWithoutOneToOneMapping",it=({visible:e,employerId:a,onClose:r,trls:s})=>{const[i,n]=(0,t.useState)(!1),[o,l]=(0,t.useState)(!1),[c,d]=(0,t.useState)(null),u=(0,t.useCallback)(async()=>{if(!i){n(!0),l(!1),d(null);try{const t=await(e={employerId:a},sa._i.post("/shards/employer/divisions/link_vacancies",{},{params:e,signal:r}).then(({data:e})=>e));d(t)}catch(e){l(!0)}finally{n(!1)}var e,r}},[a,i]);return(0,Se.jsx)(or,{visible:e,size:"medium",title:s[et],submitText:s[Jr],cancelText:s[Yr],isSubmitting:i,dataQa:"employer-structure-link-vacancies-modal",onSubmit:u,onClose:r,children:(0,Se.jsxs)(S.z,{default:16,children:[(0,Se.jsx)(w.x,{typography:"paragraph-2-regular","data-qa":"employer-structure-link-vacancies-modal-description",children:s[at]}),(0,Se.jsx)(ea.w,{invalid:o,errorMessage:s[rt]}),c&&(0,Se.jsxs)(S.z,{default:12,children:[(0,Se.jsxs)(w.x,{typography:"subtitle-2-semibold","data-qa":"employer-structure-link-vacancies-modal-updated",children:[s[tt]," ",c.vacancies.updated]}),c.managersWithoutOneToOneMapping.length>0&&(0,Se.jsxs)(S.z,{default:8,children:[(0,Se.jsx)(w.x,{typography:"paragraph-2-regular",children:s[st]}),(0,Se.jsx)(S.z,{default:4,"data-qa":"employer-structure-link-vacancies-modal-managers-list",children:c.managersWithoutOneToOneMapping.map(e=>(0,Se.jsxs)(w.x,{typography:"paragraph-2-regular","data-qa":`employer-structure-link-vacancies-modal-manager-${e.managerId}`,children:[e.managerFullName," (",e.managerId,")"]},e.managerId))})]})]})]})})};it.displayName="components/Modals/LinkVacanciesModal/LinkVacanciesModalComponent";const nt=(0,i.x)(it),ot=()=>{const{activeModal:e,closeModal:a}=Ie(),r=(0,b.v)(({router:e})=>e.location.query.employerId);if(!e)return null;const t={visible:!0,employerId:r,onClose:a};switch(e.type){case"onboarding":return(0,Se.jsx)(Tr,{...t});case"create":return(0,Se.jsx)(ur,{...t});case"linkVacancies":return(0,Se.jsx)(nt,{...t});case"rename":return(0,Se.jsx)(Gr,{...t,...e.data});case"remove":return(0,Se.jsx)(br,{...t,...e.data});case"managers":return(0,Se.jsx)(Nr,{...t,...e.data});case"services":return(0,Se.jsx)(Kr,{...t,...e.data});case"quotas":return(0,Se.jsx)(Lr,{...t,...e.data});default:return null}};ot.displayName="components/Modals/DivisionModals/DivisionModals";var lt=r(281430);const ct=r.p+"static/images/emptyStructure__min_1e4b7d54ea62a4e8.webp",dt="container--GAXe9sVyaT0k6MCv",ut="image--bRfQJmOZqqgtVMgJ",mt="employerStructure.zero.title",pt="employerStructure.zero.description",yt="employerStructure.create.department",vt=({trls:e,hasPermission:a})=>{const{openModal:r}=Ie(),{sendCreateDivisionClick:t}=pe();return(0,Se.jsxs)("div",{className:dt,"data-qa":"employer-structure-zero-page",children:[(0,Se.jsx)(lt.Z,{path:ct,className:ut,alt:""}),(0,Se.jsxs)(S.z,{default:8,children:[(0,Se.jsx)(w.x,{typography:"title-5-semibold",children:e[mt]}),(0,Se.jsx)(w.x,{typography:"paragraph-2-regular",style:"secondary",children:e[pt]})]}),a&&(0,Se.jsx)(tr.z,{mode:"primary",style:"accent",stretched:!1,"data-qa":"employer-structure-create-division",onClick:()=>{t(),r({type:"onboarding"})},children:e[yt]})]})};vt.displayName="EmployerStructure/components/ZeroPage/ZeroPageComponent";const gt=(0,i.x)(vt),ht=({hasPermission:e})=>{const a=(0,b.v)(e=>e.employerDivisions);return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(f.X,{default:16}),Object.keys(a).length>0?(0,Se.jsx)(He,{divisions:a,hasPermission:e}):(0,Se.jsx)(gt,{hasPermission:e}),(0,Se.jsx)(ot,{})]})};ht.displayName="src/pages/EmployerStructure/EmployerStructure";var bt=r(297106);const xt="employerStructure.create.department",ft="employerStructure.linkVacancies",St=({trls:e,hasPermission:a})=>{const{stickyTrackingRef:r}=(0,bt.z)(),{openModal:t}=Ie(),{sendCreateDivisionClick:s}=pe(),i=(0,b.v)(e=>e.userType===x.FW.BackOffice),n=(0,b.v)(e=>e.employerDivisions),o=(0,b.v)(e=>e.tapBarHeight);return 0===Object.keys(n).length||!a&&!i?null:(0,Se.jsx)(rr.o,{ref:r,isSticky:!0,bottom:o,showDivider:"with-scroll",primaryActions:a&&(0,Se.jsx)(tr.z,{mode:"primary",style:"accent","data-qa":"employer-structure-create-division",onClick:()=>{s(),t({type:"create"})},children:e[xt]}),secondaryActions:i&&(0,Se.jsx)(tr.z,{mode:"secondary",style:"accent","data-qa":"employer-structure-link-vacancies",onClick:()=>t({type:"linkVacancies"}),children:e[ft]})})};St.displayName="EmployerStructure/components/CreateDivisionActionBar/CreateDivisionActionBarComponent";const jt=(0,i.x)(St),Ct="employer.company.title",It="employer.employerPage",_t=({trls:e})=>{const a=(0,b.v)(e=>e.permissions.includes("EmployerDivisionWritePermission")),r=(0,b.v)(({router:e})=>e.location.query.employerId),i=(0,b.v)(({userType:e})=>e);return(0,Se.jsx)(t.StrictMode,{children:(0,Se.jsx)(h.H,{isEnabled:!0,children:(0,Se.jsx)(Ce,{children:(0,Se.jsxs)(p.Xg,{isEmpty:!0,title:e[Ct],layout:m.H,bottomContent:(0,Se.jsx)(jt,{hasPermission:a}),children:[i===x.FW.BackOffice&&(0,Se.jsxs)(c(),{children:[(0,Se.jsx)(o(),{base:4}),(0,Se.jsx)(u(),{Element:s.P,href:`/admin/employer.do?employerId=${r}`,kind:d.LinkKind.Secondary,children:e[It]})]}),(0,Se.jsx)(v.Z,{}),(0,Se.jsx)(y.Z,{}),(0,Se.jsx)(g.C,{xs:"4",s:"8",m:"12",l:"12",children:(0,Se.jsx)(ht,{hasPermission:a})})]})})})})};_t.displayName="pages/EmployerStructure/EmployerStructure.route/EmployerStructureRoute";const Mt=(0,i.x)(_t)}}]); 2//# sourceMappingURL=EmployerStructure-route.293a51e5432d0824.js.map 3//# debugId=d29107dc-383d-4501-97d9-24009373fcee
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.