@realtek/core-theme 0.0.69 → 0.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,5 +5,5 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
5
5
  `).replace(/<[^>]+>/g,` `),t=t.replace(/&nbsp;/gi,` `).replace(/&amp;/gi,`&`).replace(/&lt;/gi,`<`).replace(/&gt;/gi,`>`).replace(/&#39;|&apos;/gi,`'`).replace(/&quot;/gi,`"`),t.replace(/[ \t\f\v]+/g,` `).replace(/\n{2,}/g,`
6
6
  `).trim()}function tf(e){return e.replace(/•/g,`
7
7
  `).split(/\n+/).map(e=>e.trim().replace(/^[-–—•]\s*/,``).trim()).filter(Boolean)}function nf(e){return tf(e.replace(/(?:^|\s)[-–—]\s+/g,`
8
- `))}function rf(e){let t=e.match(/^([A-Za-z][A-Za-z&/ ]{1,28}?)\s*:\s*(\S.+)$/);if(!t)return null;let n=t[1].trim(),r=t[2].trim();return n.split(/\s+/).length>3||r.length>60?null:{fieldKey:n.toLowerCase().replace(/\s+/g,`-`),fieldLabel:Qd(n),value:r}}function af(e){let t=e.toLowerCase().replace(/[\s:.\-–—]+$/,``).trim();return Jd.has(t)?Yd.test(t)?`education`:Xd.test(t)?`keySkills`:`overview`:null}function of(e){let t=[],n={overview:[],keySkills:[],education:[]},r=`overview`;return e.forEach(e=>{let i=af(e);if(i){r=i;return}if(r===`overview`){let n=rf(e);if(n){t.push(n);return}}n[r].push(e)}),{meta:t,overview:$d(n.overview),keySkills:$d(n.keySkills),education:$d(n.education)}}function sf(e){let t=[...qd].sort((e,t)=>t.length-e.length),n=RegExp(`\\b(${t.map(Zd).join(`|`)})\\b\\s*:?`,`gi`),r=[...e.matchAll(n)];if(!r.length)return{meta:[],overview:$d(nf(e)),keySkills:[],education:[]};let i={overview:[],keySkills:[],education:[]},a=e.slice(0,r[0].index).trim();return a&&i.overview.push(...nf(a)),r.forEach((t,n)=>{let a=t[1].trim().toLowerCase(),o=t.index+t[0].length,s=n+1<r.length?r[n+1].index:e.length,c=nf(e.slice(o,s).trim());c.length&&i[Yd.test(a)?`education`:Xd.test(a)?`keySkills`:`overview`].push(...c)}),{meta:[],overview:$d(i.overview),keySkills:$d(i.keySkills),education:$d(i.education)}}function cf(e){let t=ef(e);if(!t)return{meta:[],overview:[],keySkills:[],education:[]};let n=tf(t);return n.length>=4?of(n):sf(t)}function lf({items:e}){return(0,f.jsx)(`ul`,{className:`jdv-ats-bullets`,children:e.map((e,t)=>(0,f.jsx)(`li`,{className:`jdv-ats-bullet-item`,children:e},t))})}function uf({raw:e=``,meta:t=[]}){let[n,r]=(0,l.useState)(!1),i=(0,l.useMemo)(()=>cf(e),[e]),a=t.length?t:i.meta,o=[];if(i.overview.length&&o.push({key:`overview`,title:`Overview`,items:i.overview}),i.keySkills.length&&o.push({key:`keySkills`,title:`Key Skills`,items:i.keySkills,card:!0,icon:`🛠️`}),i.education.length&&o.push({key:`education`,title:`Education`,items:i.education,card:!0,icon:`🎓`}),!a.length&&!o.length)return(0,f.jsx)(Gd,{type:`secondary`,children:`No description available.`});let s=n?o:o.slice(0,Kd),c=o.length-Kd;return(0,f.jsxs)(`div`,{className:`jdv-ats-desc`,children:[a.length>0&&(0,f.jsx)(`div`,{className:`jdv-ats-meta-grid`,children:a.map(({fieldKey:e,fieldLabel:t,value:n})=>(0,f.jsxs)(`div`,{className:`jdv-ats-meta-row`,children:[(0,f.jsx)(`span`,{className:`jdv-ats-meta-key`,children:t}),(0,f.jsx)(`span`,{className:`jdv-ats-meta-val`,children:n})]},e??t))}),(0,f.jsx)(`div`,{className:`jdv-ats-sections`,children:s.map(e=>e.card?(0,f.jsxs)(`div`,{className:`education-block`,children:[(0,f.jsxs)(`div`,{className:`education-header`,children:[(0,f.jsx)(`span`,{children:e.icon}),(0,f.jsx)(`span`,{children:e.title})]}),(0,f.jsx)(`ul`,{className:`education-list`,children:e.items.map((e,t)=>(0,f.jsx)(`li`,{className:`education-list-item`,children:e},t))})]},e.key):(0,f.jsxs)(`div`,{className:`jdv-ats-section`,children:[(0,f.jsx)(`div`,{className:`jdv-ats-section-hd`,children:(0,f.jsx)(`span`,{children:e.title})}),(0,f.jsx)(lf,{items:e.items})]},e.key))}),c>0&&(0,f.jsx)(`span`,{className:`jdv-desc-toggle`,onClick:()=>r(e=>!e),children:n?`Show less`:`Show more (${c} more section${c>1?`s`:``})`})]})}var{Text:df}=u.Typography;function ff(e){return e.label??e.fieldLabel??e.name??e.fieldName??e.value}function pf(e){return e.value??e.fieldName??e.name??e.label}function mf(e,t){let n=e?.[t];return n==null?`-`:Array.isArray(n)?n.join(`, `):typeof n==`object`?Object.values(n).join(` `):n}function hf(e,t){return(0,f.jsxs)(u.Space,{size:6,children:[(0,f.jsx)(`span`,{children:e}),(0,f.jsx)(u.Badge,{count:t,overflowCount:9999})]})}function gf({listName:e=`List`,fields:t=[],actions:n=[],dataSource:r=[],loading:i=!1,total:a,current:o,pageSize:s,onPageChange:c,onPageSizeChange:m,onSearch:h,rowSelection:g=!0,className:_=``,tableClassName:v=`job-list-table`,activeView:y=`list`,onViewChange:b}){let x=(0,p.useNavigate)(),S=(0,p.useLocation)(),[C,w]=(0,l.useState)(`all`),[T,E]=(0,l.useState)(``),[D,O]=(0,l.useState)([]),[k,A]=(0,l.useState)([]),[j,M]=(0,l.useState)({current:1,pageSize:10}),[N,P]=(0,l.useState)([]),[F,I]=(0,l.useState)(!1),L=(0,l.useRef)(null),R=n.filter(e=>!e.maxSelect||D.length<=e.maxSelect).map(e=>({key:e.key??e.name,label:e.label??e.name,danger:e.danger??!1,disabled:D.length===0,onClick:()=>{!e.route||D.length===0||x(e.route,{state:{background:S,selectedIds:D,selectedRecords:k,...e.popupState??{}}})}})),z=typeof o==`number`&&typeof s==`number`,B=z?{current:o,pageSize:s}:j,V=(0,l.useMemo)(()=>t.map(e=>({...e,key:pf(e),label:ff(e)})).filter(e=>e.key&&e.label&&!e.tableHidden),[t]),H=N.length?N:V.map(e=>e.key),U=(0,l.useMemo)(()=>{if(h)return r;let e=T.toLowerCase();return!e||e.length<3?r:r.filter(t=>V.some(n=>String(mf(t,n.key)).toLowerCase().includes(e)))},[r,V,h,T]),W=typeof a==`number`?a:T.trim()?U.length:r.length,G=(0,l.useMemo)(()=>{if(z)return U;let e=(B.current-1)*B.pageSize;return U.slice(e,e+B.pageSize)},[B.current,B.pageSize,U,z]),K=(0,l.useMemo)(()=>V.filter(e=>H.includes(e.key)).map(e=>({title:e.label,dataIndex:e.key,key:e.key,sorter:e.sorter===!1?!1:e.sorter??((t,n)=>String(mf(t,e.key)).localeCompare(String(mf(n,e.key)))),width:e.width??180,fixed:e.fixed,ellipsis:e.ellipsis??!0,className:e.className,render:(t,n,r)=>e.render?e.render(t,n,r):(0,f.jsx)(df,{className:`job-cell-primary`,children:mf(n,e.key)})})),[V,H]),q=H.length===V.length,ee=H.length>0&&!q,te=(e,t)=>{P(n=>{let r=n.length?n:V.map(e=>e.key);return t?r.includes(e)?r:[...r,e]:r.filter(t=>t!==e)})},ne=(0,f.jsxs)(`div`,{className:`column-visibility-menu`,onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(u.Checkbox,{checked:q,indeterminate:ee,onChange:e=>{P(e.target.checked?V.map(e=>e.key):[])},children:`Select All`}),V.map(e=>(0,f.jsx)(u.Checkbox,{checked:H.includes(e.key),onChange:t=>te(e.key,t.target.checked),children:e.label},e.key))]});return(0,f.jsxs)(`div`,{className:`antd dynamic-list-view ${_}`.trim(),children:[(0,f.jsx)(u.Card,{children:(0,f.jsxs)(u.Flex,{align:`center`,justify:`space-between`,children:[(0,f.jsx)(u.Tabs,{activeKey:C,items:[{key:`all`,label:hf(e,W)}],onChange:e=>{w(e),M({...j,current:1})}}),(0,f.jsxs)(u.Flex,{align:`center`,gap:8,children:[(0,f.jsx)(u.Input,{prefix:(0,f.jsx)(d.SearchOutlined,{className:`job-search-icon`}),placeholder:`Min 3 Chars to search`,value:T,onChange:e=>{let t=e.target.value;E(t),h?(clearTimeout(L.current),L.current=setTimeout(()=>{h(t),c?.(1)},350)):z?c?.(1):M({...j,current:1})},allowClear:!0,className:`job-search-input`}),(0,f.jsx)(u.Tooltip,{title:`Filter`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button`,icon:(0,f.jsx)(d.FilterOutlined,{})})}),(0,f.jsx)(u.Tooltip,{title:`Card view`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button param-view-toggle-btn${y===`card`?` param-view-toggle-btn--active`:``}`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),onClick:()=>b?.(`card`)})}),(0,f.jsx)(u.Tooltip,{title:`List view`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button param-view-toggle-btn${y===`list`?` param-view-toggle-btn--active`:``}`,icon:(0,f.jsx)(d.UnorderedListOutlined,{}),onClick:()=>b?.(`list`)})})]})]})}),(0,f.jsx)(u.Card,{children:(0,f.jsxs)(u.Flex,{align:`center`,gap:3,children:[(0,f.jsx)(u.Dropdown,{open:F,onOpenChange:I,trigger:[`click`],dropdownRender:()=>ne,placement:`bottomLeft`,overlayClassName:`column-visibility-dropdown`,children:(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(`img`,{src:Oc,alt:``,className:`job-action-list-icon`}),size:`small`,className:`job-actions-button`})}),D.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Dropdown,{menu:{items:R},trigger:[`click`],children:(0,f.jsxs)(u.Button,{type:`text`,size:`small`,className:`job-actions-button job-actions-menu-button`,children:[(0,f.jsx)(`img`,{src:`data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6279%206.78121C12.6857%206.88148%2012.7014%207.00057%2012.6715%207.11239C12.6417%207.22422%2012.5688%207.31967%2012.4688%207.37785L7.21875%2010.4403C7.15185%2010.4794%207.0758%2010.4999%206.99836%2010.4999C6.92092%2010.4999%206.84487%2010.4794%206.77797%2010.4403L1.52797%207.37785C1.42936%207.31859%201.35806%207.22289%201.32951%207.11145C1.30095%207.00001%201.31744%206.88181%201.37539%206.78244C1.43335%206.68306%201.52811%206.61052%201.63916%206.5805C1.75022%206.55048%201.86863%206.56542%201.96875%206.62207L7%209.55605L12.0312%206.62207C12.1315%206.56428%2012.2506%206.54858%2012.3624%206.57841C12.4743%206.60824%2012.5697%206.68116%2012.6279%206.78121ZM1.3125%204.37496C1.31267%204.29833%201.33297%204.22309%201.37136%204.15677C1.40975%204.09045%201.46489%204.03538%201.53125%203.99707L6.78125%200.934566C6.84815%200.895555%206.9242%200.875%207.00164%200.875C7.07908%200.875%207.15513%200.895555%207.22203%200.934566L12.472%203.99707C12.5381%204.0356%2012.5929%204.09076%2012.6309%204.15707C12.669%204.22337%2012.6891%204.2985%2012.6891%204.37496C12.6891%204.45142%2012.669%204.52654%2012.6309%204.59285C12.5929%204.65915%2012.5381%204.71432%2012.472%204.75285L7.22203%207.81535C7.15513%207.85436%207.07908%207.87491%207.00164%207.87491C6.9242%207.87491%206.84815%207.85436%206.78125%207.81535L1.53125%204.75285C1.46489%204.71453%201.40975%204.65946%201.37136%204.59314C1.33297%204.52682%201.31267%204.45159%201.3125%204.37496ZM2.61844%204.37496L7%206.93105L11.3816%204.37496L7%201.81886L2.61844%204.37496ZM7.65625%2011.7993L7%2012.1821L1.96875%209.24707C1.86913%209.19747%201.75436%209.18769%201.64779%209.21973C1.54122%209.25177%201.45087%209.32322%201.39512%209.41953C1.33937%209.51583%201.32241%209.62977%201.3477%209.73814C1.37299%209.84651%201.43863%209.94117%201.53125%2010.0028L6.78125%2013.0653C6.84815%2013.1044%206.9242%2013.1249%207.00164%2013.1249C7.07908%2013.1249%207.15513%2013.1044%207.22203%2013.0653L8.09703%2012.5551C8.14746%2012.5266%208.19171%2012.4883%208.22723%2012.4426C8.26275%2012.3968%208.28882%2012.3444%208.30394%2012.2885C8.31906%2012.2326%208.32291%2012.1742%208.31529%2012.1167C8.30766%2012.0593%208.28871%2012.004%208.25952%2011.9539C8.23033%2011.9039%208.19149%2011.8601%208.14526%2011.8252C8.09903%2011.7903%208.04632%2011.7649%207.9902%2011.7505C7.93408%2011.7361%207.87566%2011.7331%207.81833%2011.7414C7.761%2011.7498%207.70591%2011.7695%207.65625%2011.7993Z'%20fill='%236B7280'/%3e%3cpath%20d='M10.6036%2011.3825L13.4607%209.4477C13.5813%209.36599%2013.614%209.20256%2013.5341%209.08069L13.0105%208.282C12.9303%208.15966%2012.7665%208.12478%2012.6434%208.20383L9.54053%2010.1964L8.94939%2011.4054C8.84904%2011.6106%209.03632%2011.8387%209.25715%2011.7803L10.4338%2011.469C10.4561%2011.4631%2010.4776%2011.4543%2010.4977%2011.4429L10.6036%2011.3825ZM9.54053%2010.1964L10.6036%2011.3825'%20stroke='%236B7280'%20stroke-width='0.6'/%3e%3c/svg%3e`,alt:``,className:`job-actions-frame-icon`}),`Actions `,(0,f.jsx)(d.DownOutlined,{className:`job-actions-caret`})]})}),(0,f.jsxs)(df,{className:`job-selected-count`,children:[`Selected (`,D.length,`)`]})]})]})}),(0,f.jsx)(u.Spin,{spinning:i,children:(0,f.jsx)(u.Table,{rowSelection:g?{type:`checkbox`,selectedRowKeys:D,onChange:(e,t)=>{O(e),A(t)}}:void 0,columns:K,dataSource:G,size:`middle`,scroll:{x:`max-content`},showSorterTooltip:!1,tableLayout:`auto`,pagination:!1,className:v,rowKey:e=>e.id??e.key})}),(0,f.jsx)(Rs,{current:B.current,pageSize:B.pageSize,total:W,onChange:e=>{z?c?.(e):M(t=>({...t,current:e}))},onPageSizeChange:e=>{z?m?.(e):M({current:1,pageSize:e})}})]})}var{Text:_f}=u.Typography;function vf(e){return e.label??e.fieldLabel??e.name??e.fieldName??e.value}function yf(e){return e.value??e.fieldName??e.name??e.label}function bf(e,t){let n=e?.[t];return n==null?`-`:Array.isArray(n)?n.join(`, `):typeof n==`object`?Object.values(n).join(` `):n}var xf=[{key:`name`,label:`Name`},{key:`designation`,label:`Designation`},{key:`locationExp`,label:`Location / Exp`},{key:`skills`,label:`Skills`},{key:`createdOn`,label:`Created On`}];function Sf({record:e,fields:t,selected:n,onSelect:r}){let i=(0,p.useNavigate)(),a=(0,p.useLocation)(),o=t.find(e=>e.cardRole===`name`),s=t.find(e=>e.cardRole===`subtitle`),c=t.find(e=>e.cardRole===`location`),l=t.find(e=>e.cardRole===`skills`),m=t.find(e=>e.cardRole===`exp`),h=t.find(e=>e.cardRole===`date`),g=t.find(e=>e.cardRole===`action`),_=o?bf(e,o.key):`-`,v=s?bf(e,s.key):``,y=c?bf(e,c.key):``,b=m?bf(e,m.key):``,x=h?bf(e,h.key):``,S=l?e[l.key]:[],C=Array.isArray(S)?S:[],w=C.slice(0,3),T=C.slice(3),E=g?.render?g.render(bf(e,g.key),e):null;function D(){i(`/popup/preview`,{state:{background:a,moduleName:`candidate`,record:e,fields:xf}})}function O(){i(`/popup/mail`,{state:{background:a}})}return(0,f.jsxs)(`div`,{className:`param-card${n?` param-card--selected`:``}`,children:[(0,f.jsxs)(`div`,{className:`param-card__header`,children:[(0,f.jsxs)(`div`,{className:`param-card__header-left`,children:[(0,f.jsxs)(`div`,{className:`param-card__name-row`,children:[(0,f.jsx)(u.Checkbox,{checked:n,onChange:r,onClick:e=>e.stopPropagation(),className:`param-card__checkbox`}),(0,f.jsx)(d.EyeOutlined,{className:`param-card__eye-icon`,onClick:D}),(0,f.jsxs)(`span`,{className:`param-card__name-block`,children:[(0,f.jsx)(_f,{className:`param-card__name`,children:_}),v&&v!==`-`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{className:`param-card__sep`,children:`·`}),(0,f.jsx)(_f,{className:`param-card__subtitle`,children:v})]})]})]}),y&&y!==`-`&&(0,f.jsxs)(`div`,{className:`param-card__location`,children:[(0,f.jsx)(d.EnvironmentOutlined,{className:`param-card__location-icon`}),(0,f.jsx)(_f,{className:`param-card__location-text`,children:y})]})]}),(0,f.jsx)(`div`,{className:`param-card__header-right`,children:(0,f.jsxs)(`span`,{className:`param-card__exp-badge`,children:[`Exp: `,b&&b!==`-`?b:`-`]})})]}),(0,f.jsxs)(`div`,{className:`param-card__body`,children:[(0,f.jsxs)(`div`,{className:`param-card__body-left`,children:[(0,f.jsx)(_f,{className:`param-card__section-label`,children:`Skills`}),(0,f.jsxs)(`div`,{className:`param-card__skills-row`,children:[w.length>0?w.map(e=>(0,f.jsx)(u.Tag,{className:`sourcing-skill-tag`,children:e},e)):(0,f.jsx)(_f,{className:`param-card__empty`,children:`-`}),T.length>0&&(0,f.jsx)(u.Popover,{trigger:`click`,placement:`bottomLeft`,overlayClassName:`sourcing-skills-popover`,content:(0,f.jsx)(`div`,{className:`sourcing-skills-popup`,children:T.map(e=>(0,f.jsx)(u.Tag,{className:`sourcing-skill-tag`,children:e},e))}),children:(0,f.jsxs)(`span`,{className:`sourcing-more-skills`,children:[`+`,T.length]})})]})]}),x&&x!==`-`&&(0,f.jsxs)(`div`,{className:`param-card__body-right`,children:[(0,f.jsx)(_f,{className:`param-card__section-label param-card__section-label--right`,children:`Created on`}),(0,f.jsx)(_f,{className:`param-card__date-value`,children:x})]})]}),(0,f.jsx)(`div`,{className:`param-card__divider`}),(0,f.jsxs)(`div`,{className:`param-card__footer`,children:[(0,f.jsxs)(`div`,{className:`param-card__footer-left`,children:[(0,f.jsx)(u.Tooltip,{title:`Resume`,children:(0,f.jsx)(`button`,{type:`button`,className:`param-card__icon-btn`,"aria-label":`Resume`,children:(0,f.jsx)(d.FileTextOutlined,{})})}),(0,f.jsx)(u.Tooltip,{title:`Call`,children:(0,f.jsx)(`button`,{type:`button`,className:`param-card__icon-btn`,"aria-label":`Call`,children:(0,f.jsx)(d.PhoneOutlined,{})})}),(0,f.jsx)(u.Tooltip,{title:`Email`,children:(0,f.jsx)(`button`,{type:`button`,className:`param-card__icon-btn`,"aria-label":`Email`,onClick:O,children:(0,f.jsx)(d.MailOutlined,{})})})]}),(0,f.jsx)(`div`,{className:`param-card__footer-right`,children:E})]})]})}function Cf({listName:e=`List`,moduleName:t=``,actions:n=[],fields:r=[],dataSource:i=[],loading:a=!1,total:o,current:s,pageSize:c,onPageChange:m,onPageSizeChange:h,className:g=``,activeView:_=`card`,onViewChange:v}){let y=(0,p.useNavigate)(),b=(0,p.useLocation)(),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)({current:1,pageSize:12}),[T,E]=(0,l.useState)([]),[D,O]=(0,l.useState)([]),k=typeof s==`number`&&typeof c==`number`,A=k?{current:s,pageSize:c}:C,j=e=>{let t=e.id??e._id;E(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t]),O(n=>n.some(e=>(e.id??e._id)===t)?n.filter(e=>(e.id??e._id)!==t):[...n,e])},M=n.filter(e=>!e.maxSelect||T.length<=e.maxSelect).map(e=>({key:e.key??e.name,label:e.label??e.name,danger:e.danger??!1,disabled:T.length===0,onClick:()=>{!e.route||T.length===0||y(e.route,{state:{background:b,selectedIds:T,selectedRecords:D,moduleName:t,...e.popupState??{}}})}})),N=(0,l.useMemo)(()=>r.map(e=>({...e,key:yf(e),label:vf(e)})).filter(e=>e.key&&e.label),[r]),P=typeof o==`number`?o:i.length,F=(0,l.useMemo)(()=>{let e=x.toLowerCase();return!e||e.length<3?i:i.filter(t=>N.some(n=>String(bf(t,n.key)).toLowerCase().includes(e)))},[i,N,x]),I=(0,l.useMemo)(()=>{if(k)return F;let e=(A.current-1)*A.pageSize;return F.slice(e,e+A.pageSize)},[A.current,A.pageSize,F,k]);return(0,f.jsxs)(`div`,{className:`antd param-card-view ${g}`.trim(),children:[(0,f.jsx)(u.Card,{children:(0,f.jsxs)(u.Flex,{align:`center`,justify:`space-between`,children:[(0,f.jsxs)(u.Flex,{align:`center`,gap:6,children:[(0,f.jsx)(_f,{className:`param-card-view__tab-label`,children:e}),(0,f.jsx)(`span`,{className:`param-card-view__count`,children:P}),T.length>0&&n.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Dropdown,{menu:{items:M},trigger:[`click`],children:(0,f.jsxs)(u.Button,{type:`text`,size:`small`,className:`job-actions-button job-actions-menu-button`,children:[`Actions `,(0,f.jsx)(d.DownOutlined,{className:`job-actions-caret`})]})}),(0,f.jsxs)(_f,{className:`job-selected-count`,children:[`Selected (`,T.length,`)`]})]})]}),(0,f.jsxs)(u.Flex,{align:`center`,gap:8,children:[(0,f.jsx)(u.Input,{prefix:(0,f.jsx)(d.SearchOutlined,{className:`job-search-icon`}),placeholder:`Search by name, location, skills`,value:x,onChange:e=>{S(e.target.value),k?m?.(1):w(e=>({...e,current:1}))},allowClear:!0,className:`job-search-input`}),(0,f.jsx)(u.Tooltip,{title:`Filter`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button`,icon:(0,f.jsx)(d.FilterOutlined,{})})}),(0,f.jsx)(u.Tooltip,{title:`Card view`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button param-view-toggle-btn${_===`card`?` param-view-toggle-btn--active`:``}`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),onClick:()=>v?.(`card`)})}),(0,f.jsx)(u.Tooltip,{title:`List view`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button param-view-toggle-btn${_===`list`?` param-view-toggle-btn--active`:``}`,icon:(0,f.jsx)(d.UnorderedListOutlined,{}),onClick:()=>v?.(`list`)})})]})]})}),(0,f.jsx)(u.Spin,{spinning:a,children:I.length>0?(0,f.jsx)(`div`,{className:`param-card-view__grid`,children:I.map((e,t)=>(0,f.jsx)(Sf,{record:e,fields:N,selected:T.includes(e.id??e._id),onSelect:()=>j(e)},e.id??e.key??t))}):!a&&(0,f.jsx)(`div`,{className:`param-card-view__empty`,children:`No results found`})}),(0,f.jsx)(Rs,{current:A.current,pageSize:A.pageSize,total:P,onChange:e=>{k?m?.(e):w(t=>({...t,current:e}))},onPageSizeChange:e=>{k?h?.(e):w({current:1,pageSize:e})}})]})}var{Text:wf}=u.Typography,Tf=[{key:`quick-submit`,name:`Quick Submit`,label:`Quick Submit`,route:`/popup/quick-submit`,maxSelect:1},{key:`shortlist`,name:`Shortlist`,label:`Shortlist`,route:`/popup/quick-submit`,popupState:{defaultStage:`Shortlisted`}},{key:`mail`,name:`Send Email`,label:`Send Email`,route:`/popup/mail`},{key:`tag-to-job`,name:`Tag to Jobs`,label:`Tag to Jobs`,route:`/popup/tag-to-job`},{key:`add-notes`,name:`Add Notes`,label:`Add Notes`,route:`/popup/add-notes`,maxSelect:1}],Ef=[{label:`Today`,value:`today`},{label:`Yesterday`,value:`yesterday`},{label:`Last 7 Days`,value:`7days`},{label:`Last 30 Days`,value:`30days`},{label:`This Month`,value:`months`},{label:`Last Month`,value:`lastmonth`}],Df=[`All`,`Internal`,`Dice`,`Network`],Of={0:`0`,15:`15`,30:`30+`},kf=({onMigrate:e,migratingDiceId:t,migratedDiceIds:n})=>[{label:`Name`,value:`name`,width:190,cardRole:`name`,render:e=>(0,f.jsx)(wf,{className:`job-cell-primary sourcing-candidate-name`,children:e||`-`})},{label:`Designation`,value:`designation`,width:200,cardRole:`subtitle`},{label:`Location/Exp`,value:`locationExp`,width:160},{label:`Location`,value:`location`,cardRole:`location`,tableHidden:!0},{label:`Exp`,value:`exp`,cardRole:`exp`,tableHidden:!0},{label:`Skills`,value:`skills`,width:220,cardRole:`skills`,render:e=>(0,f.jsxs)(u.Space,{size:[4,4],wrap:!0,children:[(Array.isArray(e)?e:[]).slice(0,3).map(e=>(0,f.jsx)(u.Tag,{className:`sourcing-skill-tag`,children:e},e)),Array.isArray(e)&&e.length>3&&(0,f.jsx)(u.Popover,{trigger:`click`,placement:`bottomLeft`,overlayClassName:`sourcing-skills-popover`,content:(0,f.jsx)(`div`,{className:`sourcing-skills-popup`,children:e.slice(3).map(e=>(0,f.jsx)(u.Tag,{className:`sourcing-skill-tag`,children:e},e))}),children:(0,f.jsxs)(`span`,{className:`sourcing-more-skills`,children:[`+`,e.length-3]})}),(!Array.isArray(e)||e.length===0)&&`-`]})},{label:`Created on`,value:`createdOn`,width:150,cardRole:`date`},{label:`Action`,value:`action`,width:120,sorter:!1,cardRole:`action`,render:(r,i)=>{if(!([i?.sourceType,i?.profileSource,i?.selectedSource,i?.customFields?.sourceType,i?.customFields?.profileSource].flat().some(e=>String(e??``).trim().toLowerCase()===`dice`)||i?.customFields?.diceProfileData))return(0,f.jsx)(mc,{size:`small`,variant:`soft`,icon:(0,f.jsx)(d.LikeOutlined,{}),className:`sourcing-shortlist-btn`,children:`Shortlist`});let a=Jt(i),o=!a,s=String(t)===String(a),c=n.has(String(a)),l=o||c;return process.env.NODE_ENV===`development`&&(console.log(`[DiceMigration] Candidate before render:`,{id:i?.id,diceId:a,candidateId:i?.candidateId,nestedDiceProfileData:i?.customFields?.diceProfileData}),a||console.warn(`[DiceMigration] Migrate disabled: no Dice profile id found on row`,i),console.log(`[DiceMigration] disabled check:`,{diceId:a,migratingDiceId:t,noDiceId:o,disabled:l,isMigrated:c,loading:s})),(0,f.jsx)(mc,{size:`small`,variant:`soft`,loading:s,disabled:l,onClick:()=>e(i,a),className:`sourcing-shortlist-btn`,children:c?`Migrated`:`Migrate`})}}];function Af(e){return[e.firstName,e.middleName,e.lastName].filter(Boolean).join(` `)||e.name||e.fullName||`-`}function jf(e){let t=e.skills??e.skill??e.primarySkills??e.technicalSkills??[];process.env.NODE_ENV===`development`&&console.log(`Raw API Skills:`,t);let n=[];return Array.isArray(t)?n=t.map(e=>typeof e==`string`?e:e?.skill??e?.name??e?.skillName??e?.value).filter(Boolean):typeof t==`string`&&(n=t.split(`,`).map(e=>e.trim()).filter(Boolean)),process.env.NODE_ENV===`development`&&console.log(`Mapped Skills:`,n),n}function Mf(e,t){let n=e.currentLocation??e.location??e.city??`-`,r=e.totalExperience??e.experience??e.exp??e.yearsOfExperience,i=e.createdOn??e.createdAt??e.createdDate??e.updatedAt,a=jf(e),o=[e?.sourceType,e?.profileSource,e?.selectedSource,e?.customFields?.sourceType,e?.customFields?.profileSource].flat().some(e=>String(e??``).trim().toLowerCase()===`dice`)||!!e?.customFields?.diceProfileData,s=o?Jt(e):void 0,c={...e,id:e.id??e._id??e.candidateId??`candidate-${t}`,...o&&{diceId:s,candidateId:e.candidateId??e.customFields?.diceProfileData?.candidateId??``},name:Af(e),designation:e.designation??e.currentDesignation??e.jobTitle??`-`,location:n===`-`?``:n,exp:r!=null&&r!==``?`${r} yrs`:``,locationExp:`${n} / ${r||`-`} yrs`,skills:a,createdOn:i?String(i):`-`,action:`shortlist`};return process.env.NODE_ENV===`development`&&(console.log(`Table Row Skills:`,c.skills),o&&console.log(`[DiceSourcingRow] IDs after mapping:`,{id:c.id,diceId:c.diceId,candidateId:c.candidateId})),c}function Nf({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(wf,{strong:!0,className:`v1-section-label`,children:t})]})}function Pf({jobId:e,onActionComplete:t,onDescriptionSaved:n}){let[r]=u.Form.useForm(),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)(0),[m,h]=(0,l.useState)(1),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(!1),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)([0,30]),[w,T]=(0,l.useState)([`All`,`Internal`]),[E,D]=(0,l.useState)(`list`),[O,k]=(0,l.useState)(10),[A,j]=(0,l.useState)(null),[M,N]=(0,l.useState)(()=>new Set),[P,F]=(0,l.useState)(`internal`),I=kf({onMigrate:async(e,n)=>{console.log(`Dice Profile ID:`,n),console.log(`Candidate Object:`,e),j(n);try{let e=await $l(n);u.message.success(e?.message??e?.data?.message??`Candidate migrated successfully.`),N(e=>new Set(e).add(String(n))),t?.(e)}catch(e){u.message.error(e?.message||`Failed to migrate candidate.`)}finally{j(null)}},migratingDiceId:A,migratedDiceIds:M});(0,l.useEffect)(()=>{w.some(e=>e.toLowerCase()===`dice`)&&E!==`card`&&D(`card`)},[w,E]);let[L,R]=(0,l.useState)(!1),[z,B]=(0,l.useState)(!1),[V,H]=(0,l.useState)(``),[U,W]=(0,l.useState)(!1),[G,K]=(0,l.useState)(``),[q,ee]=(0,l.useState)(!1);(0,l.useEffect)(()=>{H(``)},[e]);let te=[`jobDescription`,`description`,`rawDescription`,`jobDescriptionText`],ne=async()=>{if(R(!0),!V){B(!0);try{let t=await Vo({module:`job`,id:e}),n=Array.isArray(t)?t:[],r=``;for(let e of n){for(let t of e.fields??[]){let e=te.includes(t.field),n=/description/i.test(t.label??``);if((e||n)&&typeof t.value==`string`&&t.value.trim()){r=t.value;break}}if(r)break}H(r)}finally{B(!1)}}},re=()=>{K(V),W(!0)},ie=()=>{W(!1),K(``)},ae=async()=>{if(!G.trim()){u.message.warning(`Please enter a job description`);return}ee(!0);try{await xd(e,G.trim()),H(``),W(!1),K(``),B(!0);let t=await Vo({module:`job`,id:e}),r=Array.isArray(t)?t:[],i=``;for(let e of r){for(let t of e.fields??[]){let e=te.includes(t.field),n=/description/i.test(t.label??``);if((e||n)&&typeof t.value==`string`&&t.value.trim()){i=t.value;break}}if(i)break}H(i),u.message.success(`Description updated and parsed successfully`),n?.()}catch{u.message.error(`Failed to update description`)}finally{ee(!1),B(!1)}},oe=()=>{let e=w.filter(e=>e!==`All`);return e.length?e.map(e=>e.toLowerCase()):[`internal`]},se=(t,n=0,r=O)=>{let i=oe(),a=i.includes(`dice`)?`dice`:`internal`;return{tenantId:localStorage.getItem(`tenantId`)||``,businessId:localStorage.getItem(`businessId`)||``,businessUnitId:localStorage.getItem(`businessUnitId`)||``,jobId:e,filter:{skills:t.skills?[t.skills]:[],location:t.location?[t.location]:[],jobTitle:t.jobTitle?[t.jobTitle]:[],experienceFrom:String(S[0]),experienceTo:S[1]>=30?``:String(S[1])},hiringStage:``,hiringStageType:``,sortBy:`relevance`,sortType:`asc`,booleanQuery:t.booleanQuery||``,searchFilter:{},diceFilter:{},searchQuery:``,postedDate:t.createdDate||``,sourceType:i.includes(`internal`)?`internal`:i[0]||`internal`,selectedSource:i,scope:a,userId:Number(localStorage.getItem(`userId`))||0,offset:n,limit:r}},ce=async(e,t=1,n=O)=>{let r=(t-1)*n;a(!0);try{let i=await Wo(se(e,r,n),r,n),a=i?.data?.data??i?.data?.applicant??[],o=i?.data?.count?.searchCount??i?.data?.count?.total??i?.count?.searchCount??i?.count?.total??0;a.some(e=>{let t=e?.sourceType??e?.profileSource??``;return String(t).toLowerCase()===`dice`})&&E!==`card`&&D(`card`),s(a.map(Mf)),p(o),h(t),_(e),y(!0),x(!0)}catch(e){console.error(`Candidate search failed:`,e),u.message.error(`Failed to search candidates. Please try again.`),s([]),p(0),y(!0)}finally{a(!1)}},le=e=>ce(e,1),ue=(e,t)=>{g&&(t&&t!==O&&k(t),ce(g,e,t??O))},de=()=>{r.resetFields(),s([]),p(0),h(1),_(null),y(!1),x(!1),C([0,30]),T([`All`,`Internal`])},J=(e,t)=>{if(e===`All`){T(t?Df:[]);return}T(n=>{let r=t?[...n.filter(e=>e!==`All`),e]:n.filter(t=>t!==e);return Df.filter(e=>e!==`All`).every(e=>r.includes(e))?[`All`,...r]:r.filter(e=>e!==`All`)})};return(0,f.jsxs)(`div`,{className:`sourcing-tab`,children:[(0,f.jsx)(`div`,{className:`sourcing-v1-scope v1-edit-page`,children:(0,f.jsx)(`div`,{className:`v1-page-inner`,children:(0,f.jsx)(u.Card,{className:`v1-card v1-edit-card`,title:(0,f.jsx)(Nf,{icon:(0,f.jsx)(d.FilterOutlined,{}),title:`Build Your Search Query`}),extra:(0,f.jsxs)(u.Space,{size:8,children:[(0,f.jsx)(mc,{size:`small`,onClick:de,children:`Reset filters`}),(0,f.jsx)(mc,{variant:`primary`,size:`small`,icon:(0,f.jsx)(d.SearchOutlined,{}),loading:i,onClick:()=>r.submit(),children:`Search`}),(0,f.jsx)(mc,{size:`small`,variant:`soft`,icon:(0,f.jsx)(d.RobotOutlined,{}),children:`AI Search`}),(0,f.jsx)(mc,{size:`small`,variant:`soft`,icon:(0,f.jsx)(d.FileTextOutlined,{}),onClick:ne,children:`Job Description`}),(0,f.jsx)(mc,{type:`text`,size:`small`,icon:b?(0,f.jsx)(d.DownOutlined,{}):(0,f.jsx)(d.UpOutlined,{}),onClick:()=>x(e=>!e)})]}),children:!b&&(0,f.jsxs)(u.Form,{form:r,layout:`vertical`,onFinish:le,className:`v1-form`,colon:!1,children:[(0,f.jsx)(u.Row,{gutter:[24,0],children:(0,f.jsx)(u.Col,{xs:24,children:(0,f.jsx)(u.Form.Item,{name:`booleanQuery`,label:`Keyword / Boolean Query`,children:(0,f.jsx)(u.Input,{placeholder:`Enter keyword, e.g., Java OR (J2EE AND "Apache Kafka")`,prefix:(0,f.jsx)(d.SearchOutlined,{style:{color:`#bbb`}})})})})}),(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{name:`createdDate`,label:`Created Date`,children:(0,f.jsx)(u.Select,{placeholder:`Select created date`,allowClear:!0,options:Ef,suffixIcon:(0,f.jsx)(d.DownOutlined,{})})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{name:`location`,label:`Location`,children:(0,f.jsx)(u.Input,{placeholder:`Enter location`})})})]}),(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{name:`jobTitle`,label:`Job Title`,children:(0,f.jsx)(u.Input,{placeholder:`Enter job title`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{name:`skills`,label:`Skills`,children:(0,f.jsx)(u.Input,{placeholder:`Enter skills`})})})]}),(0,f.jsxs)(`div`,{className:`sourcing-exp-section`,children:[(0,f.jsx)(wf,{className:`sourcing-exp-title`,children:`Experience in Years`}),(0,f.jsx)(u.Slider,{range:!0,min:0,max:30,marks:Of,value:S,onChange:C,tooltip:{formatter:e=>e>=30?`30+`:String(e)},className:`sourcing-exp-slider`}),(0,f.jsxs)(u.Space,{size:8,className:`sourcing-exp-inputs`,wrap:!1,children:[(0,f.jsx)(wf,{className:`sourcing-exp-input-label`,children:`From`}),(0,f.jsx)(u.Input,{size:`small`,className:`sourcing-exp-num-input`,value:S[0],onChange:e=>{let t=parseInt(e.target.value,10)||0;C([Math.min(t,S[1]),S[1]])}}),(0,f.jsx)(wf,{className:`sourcing-exp-input-label`,children:`To`}),(0,f.jsx)(u.Input,{size:`small`,className:`sourcing-exp-num-input`,value:S[1]>=30?`30+`:S[1],onChange:e=>{let t=parseInt(e.target.value,10)||0;C([S[0],Math.min(t,30)])}}),(0,f.jsx)(wf,{className:`sourcing-exp-input-label`,children:`Years`})]})]}),(0,f.jsxs)(`div`,{className:`sourcing-pref-section`,children:[(0,f.jsx)(wf,{className:`sourcing-pref-label`,children:`Search Preference`}),(0,f.jsx)(`span`,{className:`sourcing-pref-sep`,children:`—`}),(0,f.jsx)(u.Space,{size:12,wrap:!0,children:Df.map(e=>(0,f.jsx)(u.Checkbox,{checked:w.includes(e),onChange:t=>J(e,t.target.checked),children:e},e))})]})]})})})}),(0,f.jsxs)(u.Spin,{spinning:i,children:[!v&&!i&&(0,f.jsx)(u.Empty,{style:{marginTop:24},description:`Use the search above to find candidates`}),v&&o.length===0&&!i&&(0,f.jsx)(u.Empty,{style:{marginTop:24},description:`No candidates found for this query`}),v&&o.length>0&&E===`list`&&(0,f.jsx)(gf,{listName:`Internal`,moduleName:`candidate`,actions:Tf,fields:I,dataSource:o,loading:i,total:c,current:m,pageSize:O,onPageChange:ue,onPageSizeChange:e=>ue(1,e),className:`sourcing-results-list`,activeView:E,onViewChange:D}),v&&o.length>0&&E===`card`&&(0,f.jsx)(Cf,{listName:`Internal`,moduleName:`candidate`,actions:Tf,fields:I,dataSource:o,loading:i,total:c,current:m,pageSize:O,onPageChange:ue,onPageSizeChange:e=>ue(1,e),className:`sourcing-results-list`,activeView:E,onViewChange:D}),!1,!1]}),(0,f.jsx)(u.Drawer,{title:(0,f.jsx)(Nf,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`Job Description`}),placement:`right`,width:Math.min(860,window.innerWidth*.85),open:L,onClose:()=>{R(!1),W(!1),K(``)},destroyOnHidden:!0,rootClassName:`v1-edit-page`,styles:{header:{background:`linear-gradient(120deg, rgba(0, 83, 165, 0.07) 0%, #ffffff 65%)`,borderBottom:`1px solid #d6e4f0`,minHeight:56,padding:`0 20px`,alignItems:`center`},body:{padding:`20px 24px`,background:`#f7fafd`}},extra:!z&&!U&&(0,f.jsx)(mc,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:re,children:`Edit`}),children:(0,f.jsx)(u.Spin,{spinning:z,children:U?(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,f.jsx)(`div`,{style:{background:`#ffffff`,border:`1px solid #d6e4f0`,borderRadius:8,padding:`4px`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:(0,f.jsx)(u.Input.TextArea,{rows:14,value:G,onChange:e=>K(e.target.value),placeholder:`Paste raw job description here...`,style:{fontSize:13,lineHeight:1.65,border:`none`,boxShadow:`none`,resize:`vertical`,padding:`12px 14px`}})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,f.jsx)(mc,{variant:`primary`,size:`small`,loading:q,onClick:ae,children:`Save & Parse`}),(0,f.jsx)(mc,{size:`small`,onClick:ie,children:`Cancel`})]})]}):(0,f.jsx)(`div`,{style:{background:`#ffffff`,border:`1px solid #d6e4f0`,borderRadius:8,padding:`18px 20px`,boxShadow:`0 2px 12px rgba(0,0,0,0.06)`},children:(0,f.jsx)(uf,{raw:V})})})})]})}function Ff(e){return e.referenceId||e.applicantRefrenceId||e._id}function If(e){let t=Hd(e);return{rows:t,total:e?.count??t.length,tabs:[],fields:xs(t),tabField:``}}function Lf({workflowId:e,stageName:t,actions:n=[],onCountChange:r}){return(0,f.jsx)(Zl,{moduleName:`candidate`,rowKey:Ff,actions:n,fetchData:(0,l.useCallback)(()=>e?Wd(e,t).then(e=>(r?.(e?.count??Hd(e).length),e)).catch(n=>{throw console.error(`[WorkflowStageTab] getWorkflowStage failed:`,e,t,n),n}):Promise.resolve({data:[],count:0}),[e,t,r]),responseMapper:If})}var Rf=[{key:`quick-submit`,label:`Quick Submit`,route:`/popup/quick-submit`,maxSelect:1},{key:`shortlist`,label:`Shortlist`,route:`/popup/quick-submit`,popupState:{defaultStage:`Shortlisted`}},{key:`tag-to-job`,label:`Tag to Jobs`,route:`/popup/tag-to-job`},{key:`mail`,label:`Send Email`,route:`/popup/mail`}],zf=[{key:`quick-submit`,label:`Quick Submit`,route:`/popup/quick-submit`,maxSelect:1},{key:`tag-to-job`,label:`Tag to Jobs`,route:`/popup/tag-to-job`},{key:`mail`,label:`Send Email`,route:`/popup/mail`},{key:`remove-from-shortlist`,label:`Remove from Shortlist`,route:`/popup/remove-from-shortlist`,danger:!0}],Bf=[{key:`mail`,label:`Send Email`,route:`/popup/mail`}];function Vf(e){return e?.workflowId??e?._id??e?.id??null}function Hf({jobId:e,onDescriptionSaved:t}){let[n,r]=(0,p.useSearchParams)(),i=n.get(`subTab`)||`source`,a=e=>{let t=new URLSearchParams(n);t.set(`subTab`,e),r(t,{replace:!0})},[o,s]=(0,l.useState)(null),[c,u]=(0,l.useState)(null),[d,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(null),_=()=>{e&&(Go({jobId:e}).then(s).catch(()=>{}),Ko({jobId:e}).then(u).catch(()=>{}),qo(e).then(e=>m(Array.isArray(e)?e.length:0)).catch(()=>{}))};return(0,l.useEffect)(()=>{_()},[e]),(0,l.useEffect)(()=>{if(!e)return;let t=!1;return Ud(e).then(e=>{t||g(Vf(e))}).catch(n=>{t||(console.error(`[CandidatesTab] getWorkflowByEntity failed:`,e,n),g(null))}),()=>{t=!0}},[e]),(0,f.jsxs)(`div`,{className:`candidates-tab-wrapper`,children:[(0,f.jsx)(Z,{children:(0,f.jsx)(zd,{tabs:[{key:`source`,label:`Source`},{key:`pipeline`,label:`Pipeline`,count:o},{key:`shortlisted`,label:`Shortlisted`,count:c},{key:`submitted`,label:`Submitted`,count:d}],activeKey:i,onChange:a})}),i===`source`&&(0,f.jsx)(Pf,{jobId:e,onActionComplete:_,onDescriptionSaved:t}),i===`pipeline`&&(0,f.jsx)(Lf,{workflowId:h,stageName:`Pipeline`,actions:Rf,onCountChange:s}),i===`shortlisted`&&(0,f.jsx)(Lf,{workflowId:h,stageName:`Shortlisted`,actions:zf,onCountChange:u}),i===`submitted`&&(0,f.jsx)(Lf,{workflowId:h,stageName:`Submitted`,actions:Bf,onCountChange:m})]})}var{Text:Uf}=u.Typography,Wf=e=>e==null||e===``,Gf=/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}|$)/;function Kf(e){return String(e).replace(/\w\S*/g,e=>e.length>1&&e===e.toUpperCase()?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase())}function qf(e){return!(typeof e!=`string`||!e.trim()||!/[a-z]/i.test(e)||e.includes(`@`)||/^https?:\/\//i.test(e)||/^[a-f0-9]{24}$/i.test(e)||/<[a-z][\s\S]*>/i.test(e))}function Jf(e,t){if(Wf(e))return``;let n=String(e);return t===!1?n:qf(n)?Kf(n):n}function Yf(e,t,n){return Object.values(e).filter(e=>!Wf(e)&&typeof e!=`object`).map(e=>Jf(e,t)).join(n)}function Xf(e,t){if(!e)return e;switch(t){case`upper`:return String(e).toUpperCase();case`lower`:return String(e).toLowerCase();case`title`:return Kf(e);default:return e}}var Zf=e=>e&&typeof e==`object`&&!Array.isArray(e)&&`value`in e&&`id`in e;function Qf(e,t,n){return Wf(e)?``:Zf(e)?Jf(e.value??e.id,t):Array.isArray(e)?e.map(e=>Zf(e)?Jf(e.value??e.id,t):e&&typeof e==`object`?Yf(e,t,n):Jf(e,t)).filter(Boolean).join(n):typeof e==`boolean`?e?`Yes`:`No`:typeof e==`object`?Yf(e,t,n):Jf(e,t)}function $f(e,t,n){if(Array.isArray(e))return e.map(e=>Zf(e)?Jf(e.value??e.id,t):e&&typeof e==`object`?Yf(e,t,n):Jf(e,t)).filter(e=>e!==``);if(typeof e==`string`)return e.split(`,`).map(e=>Jf(e.trim(),t)).filter(Boolean);let r=Qf(e,t,n);return r?[r]:[]}function ep({name:e}){let t=String(e||``).split(`.`).pop().toLowerCase();return t===`pdf`?(0,f.jsx)(d.FilePdfOutlined,{className:`v1-file-chip__icon`}):t===`doc`||t===`docx`?(0,f.jsx)(d.FileWordOutlined,{className:`v1-file-chip__icon`}):[`png`,`jpg`,`jpeg`,`gif`,`webp`,`bmp`,`svg`].includes(t)?(0,f.jsx)(d.FileImageOutlined,{className:`v1-file-chip__icon`}):[`txt`,`csv`,`json`,`md`].includes(t)?(0,f.jsx)(d.FileTextOutlined,{className:`v1-file-chip__icon`}):(0,f.jsx)(d.FileOutlined,{className:`v1-file-chip__icon`})}ep.propTypes={name:y.default.string};function tp(e){return e?.renderType&&e.renderType!==`auto`?e.renderType:e?.documentPreview===!0?`document`:e?.displayAs===`tag`?`tag`:e?.displayAs===`text`?`text`:`auto`}function np({value:e,mode:t,empty:n,style:r}){let[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(0),c=ya(e);if(!c.length)return(0,f.jsx)(Uf,{strong:!0,className:`v1-detail-value`,style:r,children:n});let p=c.filter(e=>e.url);return t===`text`?(0,f.jsx)(Uf,{strong:!0,className:`v1-detail-value`,style:r,children:c.map(e=>e.name).join(`, `)}):t===`tag`?(0,f.jsx)(`span`,{className:`v1-detail-value v1-detail-tags`,children:c.map((e,t)=>(0,f.jsx)(u.Tag,{icon:(0,f.jsx)(d.PaperClipOutlined,{}),children:e.name},t))}):t===`link`||t===`download`?(0,f.jsx)(`span`,{className:`v1-detail-value v1-doc-list`,children:(0,f.jsx)(`span`,{className:`v1-file-list`,children:c.map((e,n)=>e.url?(0,f.jsxs)(`a`,{className:`v1-file-chip`,href:e.url,target:`_blank`,rel:`noopener noreferrer`,download:t===`download`?e.name||``:void 0,title:e.name,children:[(0,f.jsx)(ep,{name:e.name}),(0,f.jsx)(`span`,{className:`v1-file-chip__name`,children:e.name}),t===`download`?(0,f.jsx)(d.DownloadOutlined,{className:`v1-file-chip__action`}):(0,f.jsx)(d.LinkOutlined,{className:`v1-file-chip__action`})]},n):(0,f.jsxs)(`span`,{className:`v1-file-chip v1-file-chip--disabled`,title:`No file location`,children:[(0,f.jsx)(ep,{name:e.name}),(0,f.jsx)(`span`,{className:`v1-file-chip__name`,children:e.name})]},n))})}):(0,f.jsxs)(`div`,{className:`v1-detail-value v1-doc-list`,children:[(0,f.jsx)(`div`,{className:`v1-file-list`,children:c.map((e,t)=>e.url?(0,f.jsxs)(`button`,{type:`button`,className:`v1-file-chip`,onClick:()=>{s(p.indexOf(e)),a(!0)},title:`Preview ${e.name}`,children:[(0,f.jsx)(ep,{name:e.name}),(0,f.jsx)(`span`,{className:`v1-file-chip__name`,children:e.name}),(0,f.jsx)(d.EyeOutlined,{className:`v1-file-chip__action`})]},t):(0,f.jsxs)(`span`,{className:`v1-file-chip v1-file-chip--disabled`,title:`No preview available for this file`,children:[(0,f.jsx)(ep,{name:e.name}),(0,f.jsx)(`span`,{className:`v1-file-chip__name`,children:e.name})]},t))}),(0,f.jsx)(Bt,{documents:p,open:i,onClose:()=>a(!1),initialIndex:o})]})}np.propTypes={value:y.default.any,mode:y.default.string,empty:y.default.string,style:y.default.object};function rp(e,t){let n=Number(String(e).replace(/[^0-9.-]/g,``));return Number.isNaN(n)?String(e):`${t.currencySymbol??``}${n.toLocaleString(void 0,{maximumFractionDigits:2})}`}function ip({field:e}){let{value:t,type:n,prefix:r=``,suffix:i=``,color:a=``,capitalize:o}=e??{},s=e?.renderOptions??{},c=ea(),l=c.emptyPlaceholder,p=c.separator||`, `,h=a?{color:a}:void 0,g=s.tagColor||a||void 0,_=s.textTransform&&s.textTransform!==`none`?s.textTransform:null,v=e=>`${r?`${r} `:``}${e}${i?` ${i}`:``}`,y=e=>_?Xf(e,_):e,b=e=>(0,f.jsx)(Uf,{strong:!0,className:`v1-detail-value`,style:h,children:y(e)}),x=e=>(0,f.jsx)(`span`,{className:`v1-detail-value v1-detail-tags`,children:(0,f.jsx)(u.Tag,{color:g,children:y(e)})}),S=tp(e);if(S!==`document`&&Wf(t)&&!s.showEmpty)return b(l);switch(S){case`document`:return(0,f.jsx)(np,{value:t,mode:s.documentMode||`preview`,empty:l,style:h});case`text`:return b(v(Qf(t,o,p)));case`tag`:case`chip`:return x(v(Qf(t,o,p)));case`badge`:{let e=y(Qf(t,o,p));return(0,f.jsx)(`span`,{className:`v1-detail-value`,children:(0,f.jsx)(u.Badge,{color:g||`blue`,text:e})})}case`tags`:case`multitag`:case`skills`:{let e=$f(t,o,p);return e.length?(0,f.jsx)(`span`,{className:`v1-detail-value v1-detail-tags`,children:e.map((e,t)=>(0,f.jsx)(u.Tag,{color:g,children:y(e)},t))}):b(l)}case`link`:{let e=Qf(t,!1,p);return(0,f.jsx)(`a`,{className:`v1-detail-value v1-doc-link`,href:/^https?:\/\//i.test(e)?e:ga(e)||e,target:`_blank`,rel:`noopener noreferrer`,children:y(v(e))})}case`email`:{let e=Qf(t,!1,p);return(0,f.jsxs)(`a`,{className:`v1-detail-value`,href:`mailto:${e}`,children:[(0,f.jsx)(d.MailOutlined,{}),` `,e]})}case`phone`:{let e=Qf(t,!1,p);return(0,f.jsxs)(`a`,{className:`v1-detail-value`,href:`tel:${e.replace(/[^0-9+]/g,``)}`,children:[(0,f.jsx)(d.PhoneOutlined,{}),` `,e]})}case`date`:{let e=(0,m.default)(t),n=s.dateFormat||c.dateFormat;return b(v(e.isValid()?e.format(n):Qf(t,o,p)))}case`currency`:return b(v(rp(t,s)));case`budget`:{let e=rp(t,s),n=s.unit?String(s.unit):``,r=n&&s.budgetUnitMap?s.budgetUnitMap[n]??n:n;return b(`${e}${r?`/${r}`:``}`)}case`html`:return(0,f.jsx)(`span`,{className:`v1-detail-value`,style:h,dangerouslySetInnerHTML:{__html:String(t??``)}});default:break}if(Wf(t))return b(l);let C=n===`date`,w=typeof t==`string`&&Gf.test(t.trim());if(C||w){let e=(0,m.default)(t);if(e.isValid())return b(v(e.format(c.dateFormat)))}if(Zf(t))return b(v(Jf(t.value??t.id,o)));if(Array.isArray(t)){let e=$f(t,o,p);return e.length?(0,f.jsx)(`span`,{className:`v1-detail-value v1-detail-tags`,children:e.map((e,t)=>(0,f.jsx)(u.Tag,{color:g,children:e},t))}):b(l)}return b(typeof t==`boolean`?t?c.booleanTrueLabel:c.booleanFalseLabel:typeof t==`object`?Yf(t,o,p)||l:v(Jf(t,o)))}ip.propTypes={field:y.default.object};var{Text:ap}=u.Typography,op=[(0,f.jsx)(d.UserOutlined,{}),(0,f.jsx)(d.EnvironmentOutlined,{}),(0,f.jsx)(d.SolutionOutlined,{}),(0,f.jsx)(d.InfoCircleOutlined,{}),(0,f.jsx)(d.FileTextOutlined,{})],sp=e=>e===!0||e===1||e===`1`,cp=[`jobDescription`,`description`,`rawDescription`,`jobDescriptionText`];function lp(e=[]){for(let t of e)for(let e of t.fields??[]){let t=cp.includes(e.field),n=/description/i.test(e.label??``);if((t||n)&&typeof e.value==`string`&&e.value.trim())return{...e,key:e.field,value:e.value}}return null}function up(e=[]){return[...e].sort((e,t)=>Number(e.order??0)-Number(t.order??0)).map(e=>({...e,fields:[...e.fields??[]].filter(e=>e.show===void 0||sp(e.show)).sort((e,t)=>Number(e.order??0)-Number(t.order??0))})).filter(e=>e.fields.length)}function dp({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(ap,{strong:!0,className:`v1-section-label`,children:t})]})}function fp({value:e}){let t=String(e??``);return/<[a-z][\s\S]*>/i.test(t)?(0,f.jsx)(`div`,{className:`v1-detail-value`,style:{whiteSpace:`normal`,lineHeight:1.7},dangerouslySetInnerHTML:{__html:t}}):(0,f.jsx)(`div`,{className:`v1-detail-value`,style:{whiteSpace:`pre-wrap`,lineHeight:1.7},children:t})}function pp({moduleName:e,id:t,refreshKey:n=0,onDescriptionSaved:r}){let[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(!!e),[c,p]=(0,l.useState)(``),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(``),[v,y]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(!e)return;let n=!1;async function r(){try{s(!0),p(``);let[r]=await Promise.all([Vo({module:e,id:t,view:`detail`}),ra()]);n||a(Array.isArray(r)?r:[])}catch(t){console.error(`Failed to fetch ${e} detail fields:`,t),n||p(t?.message||`Failed to fetch detail fields`)}finally{n||s(!1)}}return r(),()=>{n=!0}},[e,t,n]);let b=(0,l.useMemo)(()=>up(i),[i]),x=e===`job`,S=(0,l.useMemo)(()=>x?lp(i):null,[x,i]),C=()=>{h(!1),_(``)},w=async()=>{if(!g.trim()){u.message.warning(`Please enter a job description`);return}y(!0);try{await xd(t,g.trim()),h(!1),_(``),s(!0);let n=await Vo({module:e,id:t,view:`detail`});a(Array.isArray(n)?n:[]),u.message.success(`Description updated and parsed successfully`),r?.()}catch{u.message.error(`Failed to update description`)}finally{y(!1),s(!1)}},T=(e,t=``)=>(0,f.jsx)(u.Col,{xs:24,sm:12,lg:e.detailCol??e.col??8,children:(0,f.jsxs)(`div`,{className:`v1-detail-field`,children:[(0,f.jsx)(ap,{type:`secondary`,className:`v1-detail-label`,children:e.label??e.field}),(0,f.jsx)(ip,{field:e})]})},`${e.field}${t}`),E=(e,t)=>e.type===`file`||e.type===`document`?{...e,renderType:`document`,value:t}:{...e,value:wi(t,e.field)},D=(e,t,n)=>{let r=e.name??e.id??String(t),i=Array.isArray(e.rows)?e.rows:[];return(0,f.jsx)(u.Card,{size:`small`,className:`v1-card v1-detail-card`,title:(0,f.jsx)(dp,{icon:op[t%op.length],title:e.label??e.name??`Details`}),children:i.length===0?(0,f.jsx)(u.Empty,{image:u.Empty.PRESENTED_IMAGE_SIMPLE,description:`No ${e.label??`records`} added`}):i.map((t,r)=>(0,f.jsxs)(`div`,{className:`v1-detail-addrow-item`,children:[i.length>1&&(0,f.jsxs)(ap,{strong:!0,className:`v1-detail-addrow-index`,children:[e.label??`Record`,` `,r+1]}),(0,f.jsx)(u.Row,{gutter:[20,18],children:n.map(e=>T(E(e,t),`-${r}`))})]},r))},r)};return(0,f.jsx)(u.Spin,{spinning:o,tip:`Loading detail fields...`,children:(0,f.jsxs)(`div`,{className:`v1-detail-left`,children:[c&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:`Unable to load detail fields`,description:c,className:`v1-detail-alert`}),!o&&!c&&b.length===0&&(0,f.jsx)(u.Empty,{description:`No detail fields are configured.`}),b.map((e,t)=>{let n=e.name??e.id??String(t),r=S?e.fields.filter(e=>e.field!==S.key):e.fields;return r.length?e.addRow?D(e,t,r):(0,f.jsx)(u.Card,{size:`small`,className:`v1-card v1-detail-card`,title:(0,f.jsx)(dp,{icon:op[t%op.length],title:e.label??e.name??`Details`}),children:(0,f.jsx)(u.Row,{gutter:[20,18],children:r.map(e=>T(e))})},n):null}),x&&S?.value&&(0,f.jsx)(u.Card,{size:`small`,className:`v1-card v1-detail-card`,title:(0,f.jsx)(dp,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`Description`}),children:m?(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,f.jsx)(`div`,{style:{background:`#ffffff`,border:`1px solid #d6e4f0`,borderRadius:8,padding:`4px`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:(0,f.jsx)(u.Input.TextArea,{rows:10,value:g,onChange:e=>_(e.target.value),placeholder:S.hidePlaceholder?void 0:S.placeholder,style:{fontSize:13,lineHeight:1.65,border:`none`,boxShadow:`none`,resize:`vertical`,padding:`12px 14px`}})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,f.jsx)(mc,{variant:`primary`,size:`small`,loading:v,onClick:w,children:`Save & Parse`}),(0,f.jsx)(mc,{size:`small`,onClick:C,children:`Cancel`})]})]}):(0,f.jsx)(fp,{value:S.value})})]})})}function mp(e){let t=e?.user_name??e?.userName??e?.username,n=`${e?.first_name??e?.firstName??``} ${e?.last_name??e?.lastName??``}`.trim(),r=e?.email??``,i=t??n.replace(/\s+/g,``)??r??String(e?.user_id??e?.id??``),a=[t,n,r].filter(Boolean).join(` - `)||String(i);return{value:String(i),label:a}}var hp=[{id:`n1`,createdAt:new Date().toISOString(),author:`You`,notes:`Shortlisted 3 candidates, sharing profiles with @Hiring Manager today.`}];function gp(e=``){return e.split(/(\s+)/).map((e,t)=>e.startsWith(`@`)&&e.length>1?(0,f.jsx)(u.Tag,{color:`blue`,children:e},t):(0,f.jsx)(`span`,{children:e},t))}function _p({notes:e,users:t=[],onAddNote:n}){let[r]=u.Form.useForm(),[i,a]=(0,l.useState)(()=>Array.isArray(e)?e:hp),[o,s]=(0,l.useState)(!1),[c,d]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),h=(0,l.useRef)(null),g=Array.isArray(e)?e:i,_=(0,l.useMemo)(()=>t.map(e=>({value:e.display??e.value,label:e.display??e.label})),[t]),v=c??_;return(0,f.jsxs)(`div`,{className:`znx-an-body`,children:[(0,f.jsxs)(u.Form,{form:r,onFinish:async({note:e})=>{let t=(e??``).trim();if(t){s(!0);try{n?await n(t):a(e=>[{id:`local-${Date.now()}`,createdAt:new Date().toISOString(),author:`You`,notes:t},...e]),r.resetFields(),u.message.success(`Notes added successfully`)}catch{u.message.error(`Something went wrong, please try again.`)}finally{s(!1)}}},className:`znx-an-composer`,children:[(0,f.jsx)(u.Form.Item,{name:`note`,rules:[{required:!0,message:`Notes is required`}],style:{marginBottom:0},children:(0,f.jsx)(u.Mentions,{rows:3,prefix:`@`,options:v,loading:p,filterOption:!1,onSearch:e=>{clearTimeout(h.current),m(!0),h.current=setTimeout(()=>{Uo(e).then(e=>{d((Array.isArray(e)?e:e?.items??e?.list??e?.data??[]).map(mp))}).catch(()=>d([])).finally(()=>m(!1))},300)},placeholder:`Add your notes on the job, use '@' to mention`})}),(0,f.jsx)(`div`,{className:`znx-an-composer-actions`,children:(0,f.jsx)(u.Button,{type:`primary`,size:`small`,htmlType:`submit`,loading:o,children:`Post`})})]}),(0,f.jsx)(`div`,{className:`znx-an-scroll`,children:(0,f.jsx)(ld,{rows:g,getTime:e=>e.createdAt??e.activityTime,getKey:(e,t)=>e.id??e._id??t,emptyText:`No notes here.`,renderBody:e=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`znx-an-comment`,children:gp(e.notes)}),e.author&&(0,f.jsxs)(`div`,{className:`znx-an-author`,children:[`— `,e.author]})]})})})]})}function vp({moduleName:e,id:t,users:n=[],showActivity:r=!0,showNotes:i=!0,defaultActiveKey:a=`activity`}){let[o,s]=(0,l.useState)(null),[c,d]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!e||!t)return;let n=!1;async function a(){let[a,o]=await Promise.all([r?Qr(e,t).catch(()=>[]):Promise.resolve(null),i?$r(t).catch(()=>[]):Promise.resolve(null)]);n||(s(a),d(o))}return a(),()=>{n=!0}},[e,t,r,i]);let p=(0,l.useCallback)(async n=>{if(!t)return;await ei({relatedId:t,notes:n,notesFor:e});let[i,a]=await Promise.all([$r(t).catch(()=>[]),r?Qr(e,t).catch(()=>[]):Promise.resolve(o)]);d(i),r&&s(a)},[t,e,r,o]),m=[r&&{key:`activity`,title:`Activity`,count:Array.isArray(o)?o.length:void 0,children:(0,f.jsx)(fd,{activity:o})},i&&{key:`notes`,title:`Notes`,count:Array.isArray(c)?c.length:void 0,children:(0,f.jsx)(_p,{notes:c,users:n,onAddNote:t?p:void 0})}].filter(Boolean),[h,g]=(0,l.useState)(m.some(e=>e.key===a)?a:m[0]?.key);return(0,f.jsx)(u.Card,{className:`znx-an-card`,styles:{body:{padding:0}},children:(0,f.jsx)(Hs,{className:`znx-an-tabs`,tabs:m,activeKey:h,onChange:g})})}vp.propTypes={moduleName:y.default.string,id:y.default.string,users:y.default.array,showActivity:y.default.bool,showNotes:y.default.bool,defaultActiveKey:y.default.string};var yp=o({buildJobHeaderData:()=>Dp,default:()=>bp,jobConfig:()=>bp}),bp={module:`job`,tabs:[{key:`details`,label:`Details`},{key:`candidates`,label:`Candidates`}],tabContent:{details:{render:({id:e,refreshKey:t,onDescriptionSaved:n})=>l.default.createElement(u.Row,{gutter:[16,16],align:`stretch`},l.default.createElement(u.Col,{key:`main`,xs:24,lg:16},l.default.createElement(pp,{moduleName:`job`,id:e,refreshKey:t,onDescriptionSaved:n})),l.default.createElement(u.Col,{key:`side`,xs:24,lg:8},l.default.createElement(vp,{moduleName:`job`,id:e})))},candidates:{render:({id:e,onDescriptionSaved:t})=>l.default.createElement(Hf,{jobId:e,onDescriptionSaved:t})}},header:{title:`jobTitle`,eyebrow:({val:e})=>{let t=[];return Dd(Sp(e))&&t.push(kd(Sp(e))),Dd(Cp(e))&&t.push(`MSP Id ${kd(Cp(e))}`),t.length?t.join(` - `):Dd(e(`jobReferenceId`))?String(e(`jobReferenceId`)):``},clientName:({val:e})=>Sp(e),titleIds:[{label:`Client Req ID`,field:[`clientJobReferenceId`,`clientReqId`,`clientRequirementId`,`clientReferenceId`]}],status:{field:`jobStatus`},ids:[{label:`Zinnext Job ID`,field:`jobReferenceId`},{label:`Client Rate`,compute:Tp}],meta:[{icon:`location`,field:`jobLocation`},{icon:`experience`,compute:wp},{icon:`employment`,fields:[`employmentType`,`jobRemoteStatus`],join:` · `}],stats:[{label:`Target submissions`,field:[`targetSubmission`,`targetSubmissions`]},{label:`In Pipeline`,compute:Ep,always:!0}],timestamp:{label:`Created Date`,field:[`createdAt`,`jobCreatedDateTime`,`createdDate`]}}},xp=(e,...t)=>t.map(t=>e(t)).find(Dd),Sp=e=>xp(e,`clientName`,`client.name`,`client`,`accountName`),Cp=e=>xp(e,`mspReqId`,`mspreqId`,`msReqId`,`mspId`,`mspRequirementId`);function wp({val:e}){let t=e(`experience.experienceRequiredFrom`);if(!Dd(t))return``;let n=e(`experience.experienceRequiredTo`);return`${t}${Dd(n)?` - ${n}`:``} years`}function Tp({val:e}){let t=e(`jobPayDetails`)??{},n=t.clientBudgetStart??xp(e,`clientBudgetStart`,`clientRateStart`);return Dd(n)?Md({start:n,end:t.clientBudgetEnd??xp(e,`clientBudgetEnd`,`clientRateEnd`),sym:t.clientBudgetCurrencySymbol??Ad(t.clientBudgetCurrency)??``,unit:t.clientBudgetUnit??xp(e,`clientBudgetUnit`)}):``}function Ep({val:e}){let t=e(`submissions`),n=xp(e,`pipelineCount`,`PipelineCount`,`inPipeline`,`inPipelineCount`)??(Array.isArray(t)?t.length:void 0);return Dd(n)?n:0}function Dp({val:e,has:t}){let n,r=[];t(e(`jobReferenceId`))&&(n=String(e(`jobReferenceId`)));let i=[e(`jobTitle`)].filter(t).map(kd).join(` `)||`-`,a=null;if(t(e(`jobSource`))&&(a={label:Od(e(`jobSource`)),color:`#10b981`,textColor:`#ffffff`}),t(e(`jobLocation`))&&r.push({icon:`location`,text:kd(e(`jobLocation`))}),t(e(`experience.experienceRequiredFrom`))){let n=e(`experience.experienceRequiredFrom`),i=e(`experience.experienceRequiredTo`);r.push({icon:`experience`,text:`${n}${t(i)?` - ${i}`:``} years`})}let o=[e(`employmentType`),kd(e(`jobRemoteStatus`))].filter(t).join(` - `);return o&&r.push({icon:`employment`,text:o}),{eyebrow:n,title:i,status:a,meta:r}}var Op=o({default:()=>kp,submissionConfig:()=>kp}),kp={module:`submission`,tabs:[],header:{title:[`firstName`,`lastName`],eyebrow:({val:e,has:t})=>[Ap(e),e(`jobTitle`)].filter(t).map(kd).join(` - `),clientName:({val:e})=>Ap(e),status:({val:e,has:t})=>{let n=e(`internalSubmissionStatus`)??{},r=n.internalSubmissionStatusText;return t(r)?{label:Od(r),color:{positive:`success`,negative:`error`,neutral:`default`}[n.internalSubmissionStatusType]??Nd(r)}:null},ids:[{label:`Submission ID`,field:[`submissionId`,`clientSubmissionId`]},{label:`MS Req ID`,field:[`mspReqId`,`mspreqId`]},{label:`Client Req ID`,field:[`jobClientRefrenceId`,`jobClientReferenceId`,`clientJobReferenceId`]},{label:`Job ID`,field:[`jobRefrenceId`,`jobReferenceId`]}],meta:[{icon:`location`,field:`jobLocation`},{icon:`experience`,field:[`relevantExperienceYears`,`workExperienceYears`],suffix:` yrs`},{icon:`employment`,field:`workAuthorisation`},{icon:`rate`,prefix:`Client rate: `,compute:jp},{icon:`rate`,prefix:`Candidate rate: `,compute:Mp}],timestamp:{label:`Created Date`,field:[`submittedAt`,`createdAt`,`createdDate`]}}},Ap=e=>e(`clientName`)??e(`client.name`);function jp({val:e}){let t=e(`clientBudget`)??e(`candidateBudget`)??{};return Md({start:t.clientBudgetStart??t.candidateBudgetStart,end:t.clientBudgetEnd??t.candidateBudgetEnd,sym:t.clientBudgetCurrencySymbol??t.candidateBudgetCurrencySymbol??Ad(t.clientBudgetCurrency??t.candidateBudgetCurrency),unit:t.clientBudgetUnit??t.candidateBudgetUnit??`Hour`})}function Mp({val:e}){let t=e(`candidateRate`)??{},n=e(`proposedRate`)??{};return Md({start:t.candidateAcceptedRate,sym:t.candidateAcceptedCurrencySymbol??Ad(t.candidateAcceptedCurrency),unit:t.candidateAcceptedPayUnit??`Hour`})||Md({start:n.candidateProposedRate,sym:n.candidateProposedRateCurrencySymbol??Ad(n.candidateProposedRateCurrency),unit:n.candidateProposedRateUnit??`Hour`})}var Np=o({default:()=>Pp,submissionJobConfig:()=>Pp}),Pp={module:`submissionJob`,tabs:[],buildData:Dp};function Fp(e,t){let n=Array.isArray(t)?t:[t];for(let t of n)if(Dd(e(t)))return e(t)}function Ip(e,t,n=` `){return t.map(t=>e(t)).filter(Dd).map(kd).join(n)}function Lp(e,t){let{val:n}=e,r;if(typeof t.compute==`function`)r=t.compute(e);else if(t.join)r=Ip(n,t.fields??[],t.join);else{let e=Fp(n,t.field);r=Dd(e)?kd(e):``}return Dd(r)?`${t.prefix??``}${r}${t.suffix??``}`:``}function Rp(e){return typeof e==`function`?{compute:e}:typeof e==`string`||Array.isArray(e)?{field:e}:e}function zp(e={},t){let{val:n}=t,r={};if(e.title!==void 0&&(r.title=Ip(n,Array.isArray(e.title)?e.title:[e.title])||`-`),e.eyebrow!==void 0&&(r.eyebrow=Lp(t,Rp(e.eyebrow))||void 0),e.clientName!==void 0&&(r.clientName=Lp(t,Rp(e.clientName))||void 0),e.status!==void 0)if(typeof e.status==`function`)r.status=e.status(t)??null;else{let t=Fp(n,e.status.field);r.status=Dd(t)?{label:Od(t),color:Nd(t)}:null}let i=(e=[])=>e.map(e=>{let r=typeof e.compute==`function`?e.compute(t):kd(Fp(n,e.field)??``);return{label:e.label,value:r}}).filter(e=>Dd(e.value));if(e.ids!==void 0&&(r.ids=i(e.ids)),e.titleIds!==void 0&&(r.titleIds=i(e.titleIds)),e.meta!==void 0&&(r.meta=e.meta.map(e=>({icon:e.icon,text:Lp(t,e)})).filter(e=>Dd(e.text))),e.stats!==void 0&&(r.stats=e.stats.map(e=>{let r=typeof e.compute==`function`?e.compute(t):Fp(n,e.field),i=Dd(r)?kd(r):e.always?kd(e.fallback??0):void 0;return{label:e.label,value:i}}).filter(e=>e.value!==void 0)),e.timestamp!==void 0){let t=jd(Fp(n,e.timestamp.field));r.timestamp=Dd(t)?{label:e.timestamp.label,value:t}:null}return r}var Bp=Object.assign({"./modules/candidateConfig.js":Pd,"./modules/jobConfig.js":yp,"./modules/submissionConfig.js":Op,"./modules/submissionJobConfig.js":Np}),Vp={};Object.values(Bp).forEach(e=>{let t=e.default??Object.values(e)[0];t?.module&&(Vp[t.module]=t)});var Hp={job:`job`,jobs:`job`,candidate:`candidate`,candidates:`candidate`,applicant:`candidate`,applicants:`candidate`,submission:`submission`,submissions:`submission`,vendor:`vendor`,vendors:`vendor`,onboarding:`onboarding`};function Up(){let e=(typeof window<`u`&&window.__CORE_THEME_CONFIG__?.detailConfig)??{};return Object.keys(e).length?{...Vp,...e}:Vp}function Wp(e=``,t=Vp){let n=String(e).trim();if(t[n])return n;let r=n.toLowerCase();if(t[r])return r;let i=Hp[r];if(i&&t[i])return i;let a=r.endsWith(`s`)?r.slice(0,-1):`${r}s`;return t[a]?a:i??r}function Gp(e=[]){let t=new Map;return e.forEach(e=>{(e.fields??[]).forEach(e=>{t.has(e.field)||t.set(e.field,e)})}),t}function Kp(e,t){for(let n of t)if(n.includes(`+`)){let t=n.split(`+`).map(t=>e(t)).filter(Dd).map(kd).join(` `);if(t)return t}else if(Dd(e(n)))return e(n)}function qp({val:e}){let t=Kp(e,[`jobTitle`,`firstName+lastName`,`name`,`fullName`,`title`,`clientName`,`vendorCompanyName`,`companyName`])||`-`,n=Kp(e,[`clientName`,`source`,`designation`,`jobReferenceId`,`applicantRefrenceId`]),r=Dd(n)?kd(n):void 0,i=Kp(e,[`status`,`jobStatus`,`submissionStatus`,`stage`]),a=Dd(i)?{label:Od(i),color:Nd(i)}:null,o=[];[[`Reference ID`,[`jobReferenceId`,`applicantRefrenceId`,`submissionId`,`referenceId`,`refId`]],[`Client Req ID`,[`clientJobReferenceId`,`jobClientRefrenceId`,`clientReqId`]],[`MS Req ID`,[`mspreqId`,`mspReqId`]]].forEach(([t,n])=>{let r=Kp(e,n);Dd(r)&&o.push({label:t,value:kd(r)})});let s=[],c=Kp(e,[`jobLocation`,`currentLocation`,`location`]);Dd(c)&&s.push({icon:`location`,text:kd(c)});let l=Kp(e,[`designation`]);Dd(l)&&s.push({icon:`designation`,text:kd(l)});let u=jd(Kp(e,[`createdAt`,`submittedAt`,`createdDate`]));return{eyebrow:r,title:t,status:a,ids:o,meta:s,timestamp:Dd(u)?{label:`Created Date`,value:u}:null}}function Jp(e,t=[]){if(!t.length)return null;let n=Up(),r=n[Wp(e,n)],i=Gp(t),a=e=>i.get(e)?.value,o=qp({val:a,has:Dd}),s=r?.buildData?r.buildData({val:a,has:Dd})??{}:r?.header?zp(r.header,{val:a,has:Dd}):{},c=(e,t)=>Array.isArray(e)&&e.length?e:t??[];return{eyebrow:s.eyebrow??o.eyebrow,title:s.title??o.title??`-`,clientName:s.clientName??null,status:s.status??o.status??null,titleIds:c(s.titleIds,o.titleIds),meta:c(s.meta,o.meta),ids:c(s.ids,o.ids),stats:s.stats??[],timestamp:s.timestamp??o.timestamp??null,tabs:r?.tabs??[]}}var Yp={location:(0,f.jsx)(d.EnvironmentOutlined,{}),designation:(0,f.jsx)(d.SolutionOutlined,{}),experience:(0,f.jsx)(d.ClockCircleOutlined,{}),employment:(0,f.jsx)(d.LaptopOutlined,{}),rate:(0,f.jsx)(d.DollarOutlined,{}),source:(0,f.jsx)(d.AimOutlined,{}),resume:(0,f.jsx)(d.FileTextOutlined,{}),edit:(0,f.jsx)(d.EditOutlined,{}),approve:(0,f.jsx)(d.CheckCircleOutlined,{}),reject:(0,f.jsx)(d.CloseCircleOutlined,{})};function Xp(e,t){let n={_id:t,id:t};for(let t of e??[])for(let e of t.fields??[])e?.field!=null&&e.value!==void 0&&(n[e.field]=e.value);return n}function Zp(e){return e==null?``:Array.isArray(e)?e.join(`,`):String(typeof e==`object`?e.id??e.value??``:e)}function Qp(e,t){return String(e).replace(/\{([^}]+)\}/g,(e,n)=>encodeURIComponent(Zp(t?.[n]))).replace(/:([A-Za-z_][\w]*)/g,(e,n)=>encodeURIComponent(Zp(t?.[n])))}function $p(e,t){return String(t||``).split(`.`).reduce((e,t)=>e?.[t],e)}function em(e){return String(e??``).trim().toLowerCase()}function tm(e,t){let n=$p(t,e?.field);switch(e?.operator){case`eq`:return em(n)===em(e.value);case`ne`:return em(n)!==em(e.value);case`isEmpty`:return n==null||n===``||Array.isArray(n)&&!n.length;case`notEmpty`:return!(n==null||n===``||Array.isArray(n)&&!n.length);case`fieldEq`:return em(n)===em($p(t,e.compareField));case`contains`:return em(n).includes(em(e.value));case`scope`:return em(e.value)===`detail`;default:return!1}}function nm(e,t,n){return n.some(n=>n?.isActive!==!1&&(n?.blockedActions??[]).map(String).includes(String(e.key))&&(n?.conditions??[]).every(e=>tm(e,t)))}function rm(e){let t=String(e.key??``);return{...e,key:t,label:e.label||t,route:e.route||e.routeTemplate||(e.actionType===`modal`&&(e.popupKey||t)?`/popup/${e.popupKey||t}`:``)}}function im(e,t){if(!e)return!0;try{let n=JSON.parse(localStorage.getItem(`menuPermission`)||`{}`),[r,i]=String(e).split(`.`),a=(n[r||String(t||``).replace(/s$/i,``)]??n[String(t||``)]??n[String(t||``).replace(/s$/i,``)]??{})[i];return a==null||a!==!1&&a!==0&&a!==`0`}catch{return!0}}function am(e,t){let n=(e??[]).flatMap(e=>e.fields??[]),r=n.find(e=>e.field===t)??n.find(e=>/resume|cv/i.test(`${e.field??``} ${e.label??``}`));return r?ya(r.value):[]}function om({moduleName:e,id:t,customConfigName:n,onAction:r,onTabChange:i,onHeaderData:a,hideActions:o=!1,defaultTab:s}){let c=(0,p.useNavigate)(),m=(0,p.useLocation)(),[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)([]),T=n||e;(0,l.useEffect)(()=>{if(!e)return;let n=!1;async function r(){try{let[r,i]=await Promise.all([mn({module:e,id:t}),Jr(e).catch(()=>({actions:[],actionRules:[]})),ra()]);n||(g(Array.isArray(r)?r:[]),v(i.actions??[]),b(i.actionRules??[]))}catch(t){console.error(`Failed to fetch ${e} header fields:`,t),n||(g([]),v([]),b([]))}}return r(),()=>{n=!0}},[e,t]);let D=(0,l.useMemo)(()=>Jp(T,h),[T,h]);(0,l.useEffect)(()=>{D&&a&&a(D)},[D]);let{eyebrow:O,title:k=`-`,status:A,titleIds:j=[],meta:M=[],ids:N=[],tabs:P=[],stats:F=[]}=D??{},{canAdd:I,canEdit:L,canDelete:R}=ts(e),z=(0,l.useMemo)(()=>Xp(h,t),[h,t]),B=(0,l.useMemo)(()=>_.filter(e=>e.showInDetail??e.showInList).map(rm).filter(e=>!nm(e,z,y)),[y,_,z]);function V(t){let n=t.permissionKey??(t.danger?`delete`:null);if(n===`add`&&!I||n===`edit`&&!L||n===`delete`&&!R||!im(t.permission,e))return!1;if(t.permissionKey){let e=$p(z,`actionPermission.${t.permissionKey}`);if(e===!1||e===0||e===`0`)return!1}return!0}let[H,U]=(0,l.useState)(s);(0,l.useEffect)(()=>{U(s)},[s]);let W=P.some(e=>e.key===H)?H:P[0]?.key,G=e=>!e.allowedTabs?.length||e.allowedTabs.some(e=>em(e)===em(W)),K=B.filter(e=>e.detailPlacement===`primary`&&V(e)&&G(e)),q=B.filter(e=>e.detailPlacement!==`primary`&&V(e)&&G(e));if(!D)return null;let ee=n=>{let i=[...K,...q].find(e=>e.key===n);if(i?.actionType===`document`&&i.documentField){let e=am(h,i.documentField);e.length?(w(e),S(!0)):u.message.warning(`No ${(i.label||`document`).toLowerCase()} available`);return}if(i?.actionType===`copy`){let e=$p(z,i.copyField||`id`);navigator.clipboard.writeText(Zp(e)).then(()=>u.message.success(`Copied to clipboard`)).catch(()=>u.message.error(`Could not copy to clipboard`));return}if(i?.actionType===`api`&&i.apiPath){let e=Qp(i.apiPath,z),n=String(i.apiMethod||`POST`).toUpperCase();J(E,e.startsWith(`/`)?e:`/${e}`,{method:n,body:[`GET`,`DELETE`].includes(n)?void 0:JSON.stringify({ids:[t],record:z})}).then(()=>u.message.success(`${i.label} completed`)).catch(e=>u.message.error(e.message||`${i.label} failed`));return}if(i?.route){let n=typeof i.route==`function`?i.route(t):Qp(i.route,Xp(h,t));n.startsWith(`/popup/`)?c(n,{state:{background:m,moduleName:e,selectedIds:[t],selectedRecords:[z],popupContext:i.popupState??{},popupAction:{key:i.key,apiMethod:i.apiMethod,apiPath:i.apiPath,defaultTemplateId:i.defaultTemplateId},...i.popupState}}):c(n);return}r?.(n,{moduleName:e,id:t,action:i})},te=n=>{U(n),i?.(n,{moduleName:e,id:t})},ne=q.map(e=>({key:e.key,label:e.label,danger:e.danger,onClick:()=>ee(e.key)}));return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(u.Card,{className:`znx-dh-card`,children:[(0,f.jsxs)(`div`,{className:`znx-dh-top`,children:[(0,f.jsxs)(`div`,{className:`znx-dh-left`,children:[O&&(0,f.jsx)(`div`,{className:`znx-dh-eyebrow`,children:O}),(0,f.jsxs)(`div`,{className:`znx-dh-titlerow`,children:[(0,f.jsx)(`span`,{className:`znx-dh-title`,children:k}),j.map(e=>(0,f.jsxs)(`span`,{className:`znx-dh-titleid`,children:[(0,f.jsxs)(`span`,{className:`znx-dh-id-label`,children:[e.label,`:`]}),` `,e.value]},e.label)),A&&(0,f.jsx)(u.Tag,{color:A.color,className:`znx-dh-status`,style:{backgroundColor:A.backgroundColor??A.color,borderColor:A.backgroundColor??A.color,color:A.textColor},children:A.label})]}),N.length>0&&(0,f.jsx)(`div`,{className:`znx-dh-ids`,children:N.map(e=>(0,f.jsxs)(`span`,{className:`znx-dh-id`,children:[(0,f.jsxs)(`span`,{className:`znx-dh-id-label`,children:[e.label,`:`]}),` `,e.value]},e.label))}),M.length>0&&(0,f.jsx)(`div`,{className:`znx-dh-meta`,children:M.map((e,t)=>(0,f.jsxs)(`span`,{className:`znx-dh-meta-item`,children:[e.icon&&Yp[e.icon]&&(0,f.jsx)(`span`,{className:`znx-dh-meta-icon`,children:Yp[e.icon]}),(0,f.jsx)(`span`,{children:e.text})]},t))})]}),!o&&(0,f.jsxs)(`div`,{className:`znx-dh-actions-col`,children:[(0,f.jsxs)(`div`,{className:`znx-dh-actions`,children:[K.map(e=>(0,f.jsx)(u.Button,{type:`text`,className:`znx-dh-btn znx-dh-btn--${e.tone??`primary`}`,icon:e.icon?Yp[e.icon]:void 0,onClick:()=>ee(e.key),children:e.label},e.key)),q.length>0&&(0,f.jsx)(u.Dropdown,{trigger:[`click`],placement:`bottomRight`,menu:{items:ne},children:(0,f.jsx)(u.Button,{type:`text`,className:`znx-dh-more`,icon:(0,f.jsx)(d.MoreOutlined,{})})})]}),F.length>0&&(0,f.jsx)(`div`,{className:`znx-dh-stats`,children:F.map(e=>(0,f.jsxs)(`div`,{className:`znx-dh-stat`,children:[(0,f.jsx)(`span`,{className:`znx-dh-stat-value`,children:e.value}),(0,f.jsx)(`span`,{className:`znx-dh-stat-label`,children:e.label})]},e.label))})]})]}),P.length>0&&(0,f.jsx)(`div`,{className:`znx-dh-tabs`,children:P.map(e=>(0,f.jsx)(`button`,{type:`button`,className:`znx-dh-tab${W===e.key?` is-active`:``}`,onClick:()=>te(e.key),children:e.label},e.key))})]}),(0,f.jsx)(Bt,{documents:C,open:x,onClose:()=>S(!1)})]})}var sm={job:{candidates:({id:e,onDescriptionSaved:t})=>(0,f.jsx)(Hf,{jobId:e,onDescriptionSaved:t})}};function cm(){let e=(typeof window<`u`&&window.__CORE_THEME_CONFIG__?.tabContentRegistry)??{};if(!Object.keys(e).length)return sm;let t={...sm};return Object.entries(e).forEach(([e,n])=>{t[e]={...t[e]??{},...n}}),t}function lm(e,t){return!t||t===`details`?null:cm()[e]?.[t]??null}function um({component:e,id:t,moduleName:n,onDescriptionSaved:r}){return e?(0,f.jsx)(e,{id:t,moduleName:n,onDescriptionSaved:r}):null}var{Text:dm}=u.Typography;function fm({moduleName:e,id:t,backPath:n=``,showFooter:r=!0,users:i=[],showActivity:a=!0,showNotes:o=!0,onHeaderAction:s,onHeaderTabChange:c,onHeaderData:d}){let m=(0,p.useNavigate)(),h=(0,p.useParams)(),[g,_]=(0,p.useSearchParams)(),v=(0,p.useLocation)(),y=t||h.id||g.get(`jobId`)||g.get(`id`)||v.state?.record?._id||v.state?.record?.id,b=g.get(`tab`)||`details`,[x,S]=(0,l.useState)(0),C=(e,t)=>{let n=new URLSearchParams(g);n.set(`tab`,e),_(n,{replace:!0}),c?.(e,t)},w=()=>S(e=>e+1),T=(e,t)=>{s?.(e,t)},E=(0,l.useMemo)(()=>lm(e,b),[e,b]);return(0,f.jsxs)(`div`,{className:`v1-page v1-detail-page`,children:[(0,f.jsxs)(`div`,{className:`v1-page-inner`,children:[(0,f.jsx)(om,{moduleName:e,id:y,defaultTab:b,onAction:T,onTabChange:C,onHeaderData:d}),E?(0,f.jsx)(um,{component:E,id:y,moduleName:e,onDescriptionSaved:w}):(0,f.jsxs)(u.Row,{gutter:[16,16],align:`stretch`,children:[(0,f.jsx)(u.Col,{xs:24,lg:16,children:(0,f.jsx)(pp,{moduleName:e,id:y,refreshKey:x,onDescriptionSaved:w})}),(0,f.jsx)(u.Col,{xs:24,lg:8,children:(0,f.jsx)(vp,{moduleName:e,id:y,users:i,showActivity:a,showNotes:o})})]})]}),n&&r&&(0,f.jsxs)(`div`,{className:`v1-footer`,children:[(0,f.jsx)(dm,{type:`secondary`,children:y?`Record ID: ${y}`:`Detail view`}),(0,f.jsx)(u.Button,{onClick:()=>m(n),children:`Back`})]})]})}fm.propTypes={moduleName:y.default.string,id:y.default.string,backPath:y.default.string,showFooter:y.default.bool,users:y.default.array,showActivity:y.default.bool,showNotes:y.default.bool,onHeaderAction:y.default.func,onHeaderTabChange:y.default.func,onHeaderData:y.default.func};var pm={jobRemoteStatus:[`On-Site`,`Remote`,`Hybrid`],jobRecruitmentStatus:[`unread`,`partially fulfilled`,`fulfilled`],"experience.experienceRequiredUnit":[`Years`,`Months`],"contractDuration.unit":[`Days`,`Weeks`,`Months`,`Years`],noticePeriodUnit:[`Days`,`Weeks`,`Months`],"jobPayDetails.clientBudgetCurrency":[`$`,`USD`,`INR`],"jobPayDetails.clientBudgetUnit":[`Hour`,`Daily`,`Monthly`,`Yearly`],workAuthorisation:[`US Citizen`,`Green Card`,`H1B`,`OPT`,`CPT`,`L2 EAD`,`H4 EAD`,`Other`],relocation:[`Yes`,`No`],source:[`LinkedIn`,`Referral`,`Dice`,`Indeed`,`Monster`,`Vendor`,`Other`]};function mm(e={}){return pm[e.field]??[]}var{Text:hm}=u.Typography,{TextArea:gm}=u.Input,_m=[(0,f.jsx)(d.UserOutlined,{}),(0,f.jsx)(d.EnvironmentOutlined,{}),(0,f.jsx)(d.SolutionOutlined,{}),(0,f.jsx)(d.InfoCircleOutlined,{}),(0,f.jsx)(d.FileTextOutlined,{})],vm={email:(0,f.jsx)(d.MailOutlined,{className:`v1-input-icon`}),contactNumber:(0,f.jsx)(d.PhoneOutlined,{className:`v1-input-icon`}),phone:(0,f.jsx)(d.PhoneOutlined,{className:`v1-input-icon`}),currentLocation:(0,f.jsx)(d.EnvironmentOutlined,{className:`v1-input-icon`}),preferredLocation:(0,f.jsx)(d.EnvironmentOutlined,{className:`v1-input-icon`}),designation:(0,f.jsx)(d.SolutionOutlined,{className:`v1-input-icon`}),skills:(0,f.jsx)(d.TagsOutlined,{className:`v1-input-icon`}),firstName:(0,f.jsx)(d.UserOutlined,{className:`v1-input-icon`}),lastName:(0,f.jsx)(d.UserOutlined,{className:`v1-input-icon`}),jobTitle:(0,f.jsx)(d.SolutionOutlined,{className:`v1-input-icon`}),jobLocation:(0,f.jsx)(d.EnvironmentOutlined,{className:`v1-input-icon`}),vendorEmail:(0,f.jsx)(d.MailOutlined,{className:`v1-input-icon`})},ym=e=>e===!0||e===1||e===`1`,bm=e=>e?.edit===void 0||ym(e.edit),xm=e=>e==null||e===``;function Sm(e){return e==null||e===``?!1:Array.isArray(e)?e.length>0&&e.some(Sm):typeof e==`object`?Object.values(e).some(Sm):!0}function Cm(e=``){let t=String(e).toLowerCase();return t===`job`?`jobs`:t===`candidate`?`candidates`:t===`submissions`?`submission`:t}function wm(e=[]){return e.map(e=>typeof e==`string`?{label:e,value:e}:{label:e.label??e.name??e.value??e.userName??e.email,value:e.value??e.id??e.userId??e._id??e.name??e.label})}function Tm(e,t){return String(t??``).split(`.`).reduce((e,t)=>e?.[t],e)}function Em({field:e,label:t}){return!t||!ym(e?.infoEnabled)||xm(e?.infoText)?t:(0,f.jsxs)(`span`,{className:`v1-field-label-with-info`,children:[(0,f.jsx)(`span`,{children:t}),(0,f.jsx)(u.Tooltip,{title:e.infoText,children:(0,f.jsx)(d.InfoCircleOutlined,{className:`v1-field-info-icon`})})]})}function Dm({group:e}){return!ym(e?.infoEnabled)||xm(e?.infoText)?null:(0,f.jsx)(hm,{type:`secondary`,className:`v1-group-info-message`,children:e.infoText})}function Om({group:e}){return!ym(e?.toggleEnabled)||xm(e?.toggleField)?null:(0,f.jsxs)(u.Space,{size:6,align:`center`,onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(hm,{type:`secondary`,className:`v1-combine-toggle-label`,children:e.toggleLabel||`Toggle`}),(0,f.jsx)(u.Form.Item,{name:e.toggleField,valuePropName:`checked`,initialValue:!!e.toggleValue,noStyle:!0,children:(0,f.jsx)(u.Switch,{size:`small`})})]})}function km(e=[]){return[...e].sort((e,t)=>Number(e.order??0)-Number(t.order??0)).map(e=>({...e,fields:[...e.fields??[]].filter(e=>e.show===void 0||ym(e.show)).sort((e,t)=>Number(e.order??0)-Number(t.order??0))})).filter(e=>e.fields.length)}function Am(e){return String(e??``).replace(/<[^>]*>/g,``).replace(/&nbsp;/g,` `).replace(/&amp;/g,`&`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).trim()}function jm(e,t){let n=(e.validations??e.validation??e.rules??[]).find(e=>(typeof e==`string`?e:e?.type)===t);if(!(!n||typeof n==`string`))return n.value??n.length??n[t]}var Mm=({label:e,message:t,value:n,compare:r,text:i})=>({validator:(a,o)=>xm(o)||r(Number(o),Number(n))?Promise.resolve():Promise.reject(Error(t??`${e} ${i} ${n}`))});function Nm(e,t){let n=String(t).split(`.`).filter(Boolean);if(!Array.isArray(e))return n.length>1?n:t;if(n.length>1){if(e.length>=3&&typeof e[1]==`number`){let t=e.slice(0,2),r=n[0]===String(e[0])?n.slice(1):n;return[...t,...r]}return n}let r=[...e];return r[r.length-1]=n[0],r}function Pm(e){if(!e)return null;if(typeof e.valueOf==`function`){let t=e.valueOf();return Number.isNaN(t)?null:t}let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function Fm(e){if(!e)return null;let t=(0,m.default)(e);return t.isValid()?t.startOf(`day`).valueOf():null}function Im(e){if(!e)return null;let t=(0,m.default)(e);return t.isValid()?t.hour()*60+t.minute():null}var Lm=({label:e,message:t,value:n,rule:r,form:i,name:a,compare:o,text:s})=>({validator:async(c,l)=>{let u=n??r.compareField??r.field;if(!u||xm(l))return Promise.resolve();let d=i.getFieldValue(Nm(a,u));if(xm(d))return Promise.resolve();let f=Number(l),p=Number(d);return Number.isNaN(f)||Number.isNaN(p)||o(f,p)?Promise.resolve():Promise.reject(Error(t??`${e} ${s} ${u}`))}}),Rm={noPastDate:({label:e,message:t})=>({validator:(n,r)=>{if(xm(r))return Promise.resolve();let i=new Date;return i.setHours(0,0,0,0),Pm(r)<i.getTime()?Promise.reject(Error(t??`${e} cannot be a past date`)):Promise.resolve()}}),noFutureDate:({label:e,message:t})=>({validator:(n,r)=>{if(xm(r))return Promise.resolve();let i=new Date;return i.setHours(23,59,59,999),Pm(r)>i.getTime()?Promise.reject(Error(t??`${e} cannot be a future date`)):Promise.resolve()}}),minAge:({message:e,value:t})=>({validator:(n,r)=>{if(xm(r))return Promise.resolve();let i=Number(t??18),a=new Date;return a.setFullYear(a.getFullYear()-i),a.setHours(23,59,59,999),Pm(r)>a.getTime()?Promise.reject(Error(e??`Must be at least ${i} years old`)):Promise.resolve()}}),dateAfterField:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{let c=n??r.compareField??r.field;if(!c||xm(s))return Promise.resolve();let l=i.getFieldValue(Nm(a,c));if(xm(l))return Promise.resolve();let u=Fm(s),d=Fm(l);return u===null||d===null||u>=d?Promise.resolve():Promise.reject(Error(t??`${e} must be on or after ${c}`))}}),dateBeforeField:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{let c=n??r.compareField??r.field;if(!c||xm(s))return Promise.resolve();let l=i.getFieldValue(Nm(a,c));if(xm(l))return Promise.resolve();let u=Fm(s),d=Fm(l);return u===null||d===null||u<=d?Promise.resolve():Promise.reject(Error(t??`${e} must be on or before ${c}`))}}),timeAfterField:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{let c=n??r.compareField??r.field;if(!c||xm(s))return Promise.resolve();let l=i.getFieldValue(Nm(a,c));if(xm(l))return Promise.resolve();let u=Im(s),d=Im(l);return u===null||d===null||u>d?Promise.resolve():Promise.reject(Error(t??`${e} must be after ${c}`))}}),timeBeforeField:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{let c=n??r.compareField??r.field;if(!c||xm(s))return Promise.resolve();let l=i.getFieldValue(Nm(a,c));if(xm(l))return Promise.resolve();let u=Im(s),d=Im(l);return u===null||d===null||u<d?Promise.resolve():Promise.reject(Error(t??`${e} must be before ${c}`))}}),greaterThanField:e=>Lm({...e,compare:(e,t)=>e>=t,text:`must be greater than or equal to`}),strictGreaterThanField:e=>Lm({...e,compare:(e,t)=>e>t,text:`must be greater than`}),strictLessThanField:e=>Lm({...e,compare:(e,t)=>e<t,text:`must be less than`}),lessThanOrEqualField:e=>Lm({...e,compare:(e,t)=>e<=t,text:`must be less than or equal to`}),maxFieldWithFallback:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{if(xm(s))return Promise.resolve();let c=String(n??r.compareFields??``).split(`,`).map(e=>e.trim()).filter(Boolean).find(e=>!xm(i.getFieldValue(Nm(a,e))));if(!c)return Promise.resolve();let l=Number(i.getFieldValue(Nm(a,c))),u=Number(s);return Number.isNaN(l)||Number.isNaN(u)||u<=l?Promise.resolve():Promise.reject(Error(t??`${e} must not exceed ${c}`))}}),required:({field:e,message:t,form:n,name:r})=>({validator:(i,a)=>{if(e?.disabledByField&&n&&r&&ym(n.getFieldValue(Bm(r,e.disabledByField))))return Promise.resolve();let o=a==null||a===``||Array.isArray(a)&&a.length===0;return!o&&e?.type===`text-editor`&&(o=Am(a)===``),o?Promise.reject(Error(t??`Mandatory Field`)):Promise.resolve()}}),email:({label:e,message:t})=>Va(e,t),url:({label:e,message:t})=>({type:`url`,message:t??`Enter valid ${e}`}),number:({label:e,message:t})=>({pattern:/^[0-9]+$/,message:t??`${e} must be a number`}),phone:({message:e})=>({pattern:/^[0-9]{10}$/,message:e??`Phone number must contain exactly 10 digits`}),len:({label:e,message:t,value:n})=>({len:Number(n),message:t??`${e} must be ${n} characters`}),pattern:({label:e,message:t,rule:n})=>({pattern:new RegExp(n.pattern??n.value,n.flags),message:t??`Enter valid ${e}`}),min:({field:e,label:t,message:n,value:r})=>e.type===`number`?Mm({label:t,message:n,value:r,compare:(e,t)=>e>=t,text:`must be at least`}):{validator:(i,a)=>{if(a==null||a===``)return Promise.resolve();let o=e.type===`text-editor`?Am(a):String(a);return o===``||o.length>=Number(r)?Promise.resolve():Promise.reject(Error(n??`${t} must be at least ${r} characters`))}},max:({field:e,label:t,message:n,value:r})=>e.type===`number`?Mm({label:t,message:n,value:r,compare:(e,t)=>e<=t,text:`must not exceed`}):{validator:(i,a)=>{if(a==null||a===``)return Promise.resolve();let o=e.type===`text-editor`?Am(a):String(a);return o===``||o.length<=Number(r)?Promise.resolve():Promise.reject(Error(n??`${t} must not exceed ${r} characters`))}}};function zm(e,t,n,r){let i=typeof e==`string`?{type:e}:e,a=i.type??i.rule??i.name,o=i.value??i.length??i.min??i.max,s=t.label??t.field??`Field`,c=Rm[a];return c?c({field:t,label:s,message:i.message,rule:i,value:o,form:n,name:r}):i}function Bm(e,t){return Array.isArray(e)&&e.length>1?[...e.slice(0,-1),t]:[t]}function Vm(e,t,n){let r=e.label??e.field??`Field`,i=e.validations??e.validation??e.rules??[],a=i.some(e=>(typeof e==`string`?e:e?.type)===`required`),o=i.some(e=>(typeof e==`string`?e:e?.type)===`email`),s=[];return ym(e.req)&&!a&&s.push(Rm.required({field:e,message:`Mandatory Field`,form:t,name:n})),(e.type===`email`||e.formatter===`email`)&&!o&&s.push(Va(r)),e.type===`number`&&s.push({pattern:/^[0-9]+$/,message:`${r} must be a number`}),[...s,...i.map(r=>zm(r,e,t,n)),gi(e)]}function Hm(e,t){let n=new Set([`greaterThanField`,`strictGreaterThanField`,`strictLessThanField`,`lessThanOrEqualField`,`maxFieldWithFallback`,`dateAfterField`,`dateBeforeField`,`timeAfterField`,`timeBeforeField`]);return(e.validations??e.validation??e.rules??[]).filter(e=>n.has(typeof e==`string`?e:e?.type)).flatMap(e=>String(e.value??e.compareField??e.field??``).split(`,`).map(e=>e.trim()).filter(Boolean).map(e=>Nm(t,e)))}function Um(e){let t=e.len??jm(e,`len`),n=e.min??jm(e,`min`),r=e.max??jm(e,`max`);return e.type===`number`?{min:n??void 0,max:r??void 0}:{minLength:n??void 0,maxLength:e.maxLength??t??r??void 0}}function Wm(e,t,n){let r=e.validations??e.validation??e.rules??[],i=[];for(let e of r){let r=typeof e==`string`?e:e?.type;if(r===`noPastDate`&&i.push(e=>{if(!e)return!1;let t=new Date;return t.setHours(0,0,0,0),Pm(e)<t.getTime()}),r===`noFutureDate`&&i.push(e=>{if(!e)return!1;let t=new Date;return t.setHours(23,59,59,999),Pm(e)>t.getTime()}),r===`minAge`){let t=Number(e?.value??18);i.push(e=>{if(!e)return!1;let n=new Date;return n.setFullYear(n.getFullYear()-t),n.setHours(23,59,59,999),Pm(e)>n.getTime()})}if(r===`dateAfterField`||r===`dateBeforeField`){let a=e?.value??e?.compareField??e?.field;if(!a)continue;i.push(e=>{if(!e)return!1;let i=t.getFieldValue(Nm(n,a));if(xm(i))return!1;let o=Fm(e),s=Fm(i);return o===null||s===null?!1:r===`dateAfterField`?o<s:o>s})}}return i.length?e=>i.some(t=>t(e)):void 0}function Gm(e){let t=e.validations??e.validation??e.rules??[];for(let e of t){let t=typeof e==`string`?e:e?.type;if(t===`minAge`)return(0,m.default)().subtract(Number(e?.value??18),`year`);if(t===`noFutureDate`||t===`noPastDate`)return(0,m.default)()}}function Km(e,t){return t?t===`phone`||t===`digits`?e.replace(/\D/g,``).slice(0,10):t===`email`||t===`noSpaces`?e.replace(/\s/g,``):t===`name`?e.replace(/\s+/g,` `).trimStart().replace(/\b\w/g,e=>e.toUpperCase()):e:e}function qm({field:e,form:t,name:n,value:r,checked:i,fileList:a,moduleName:o,initialValue:s,scopeValues:c={},onAiUpload:p,formDisabled:m}){let h=e.type??`text`,g=!bm(e),[_,v]=(0,l.useState)(null),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)(``),[T,D]=(0,l.useState)(``),[O,k]=(0,l.useState)({open:!1,docs:[],index:0}),[A,j]=(0,l.useState)(null),M=(0,l.useRef)([]),N=e.lookupFilterValueFrom?xa(e.lookupFilterValueFrom):[`__lookup_filter_${e.field}`],P=u.Form.useWatch(N,t),F=e.lookupFilterValueFrom?c[e.lookupFilterValueFrom]:void 0,I=xm(F)?P:F,L=e.disabledByField?Array.isArray(n)&&n.length>1?[...n.slice(0,-1),e.disabledByField]:[e.disabledByField]:[`__noop_disabled_watch__`],R=u.Form.useWatch(L,t),z=g||(e.disabledByField?ym(R):!1)||!!m;(0,l.useEffect)(()=>{if(h===`location`){let t=!1;async function n(){try{b(!0);let n=await J(E,`/admin/location-dropdown-values?${new URLSearchParams({search:x,limit:String(e.limit??50),offset:`0`})}`),r=n?.data??n??[];t||v(wm(Array.isArray(r)?r:[]))}catch(n){console.error(`[EditFormV1] Failed to fetch locations for "${e.field}":`,n),t||v([])}finally{t||b(!1)}}return n(),()=>{t=!0}}let t=e.dataSource;if(![`select`,`radio`,`checkbox`].includes(h)||!t||t===`static`)return;if(t===`lookup`&&e.lookupFilterField&&xm(I)){v([]),b(!1);return}let n=!1;async function r(){try{b(!0);let r=[];if(t===`master`||t===`module`)r=await cn(o,e.field,t===`master`?T:``,e.limit??50,0,{dataSource:t,masterName:e.masterName,groupName:e.groupName});else if(t===`lookup`){let t=new URLSearchParams({collection:e.lookupCollection??``,displayField:e.displayField??``,valueField:e.valueField??`_id`});e.displayField2&&t.set(`displayField2`,e.displayField2),C&&t.set(`search`,C),e.lookupFilterField&&!xm(I)&&(t.set(`filterField`,e.lookupFilterField),t.set(`filterValue`,String(I))),e.extraFields?.length&&t.set(`extraFields`,e.extraFields.join(`,`));let n=await J(E,`/admin/lookup-dropdown-values?${t}`);r=n?.data??n??[]}else if(t===`group`){let t=String(e.groupName??``).toLowerCase().trim();if(t===`users`||t===`user`){let e=await J(E,`/get-all-users?limit=500&offset=0`),t=e?.data?.users??e?.users??e?.data??[];r=Array.isArray(t)?t.map(e=>({label:[e.firstName,e.lastName].filter(Boolean).join(` `).trim()||e.userName||e.email||String(e.userId??e.id),value:e.userId??e.id})):[]}}n||(M.current=Array.isArray(r)?r:[],v(wm(M.current)))}catch(t){console.error(`[EditFormV1] Failed to fetch options for "${e.field}":`,t),n||v([])}finally{n||b(!1)}}return r(),()=>{n=!0}},[h,e.dataSource,e.field,e.lookupCollection,e.displayField,e.displayField2,e.valueField,e.lookupFilterField,I,e.groupName,e.masterName,e.limit,x,C,T,o,e.extraFields]);let B=wm([e.options,e.values].find(e=>Array.isArray(e)&&e.length>0)??mm(e)),V=_??B,H=(e.multiSelect?`multiple`:e.mode??(ym(e.multiple)?`multiple`:void 0))??(ji(e)===`array`?`multiple`:void 0),U=[`select`,`location`].includes(h),W=e.hidePlaceholder?void 0:e.placeholder??`${U?`Select`:`Enter`} ${String(e.label??``).toLowerCase()}`,G=Um(e),K=()=>{setTimeout(()=>{t.validateFields([n]).catch(()=>{})})},q=e=>{t.setFieldValue(n,e),K()},ee=e.validator?.type?{...e.validator,title:e.validator.title||e.label||`Field`}:null,te={...G,value:r,disabled:z,placeholder:W,prefix:e.icon?null:vm[e.field],onChange:t=>{let n=e.formatter?Km(t.target.value,e.formatter):t.target.value;if(ee){let{cleaned:e,error:t}=Ga(n,ee,`change`);j(t),n=e}q(n)},...ee&&{onBlur:e=>{let{cleaned:t,error:n}=Ga(e.target.value,ee,`blur`);j(n),t!==e.target.value&&q(t)},onKeyPress:e=>{let t=Wa(ee.type);if(!t||e.which===0||e.keyCode===8||e.keyCode===13)return;let n=String.fromCharCode(e.which??e.keyCode);if(!t.test(n)){e.preventDefault();let t=`${ee.title} — invalid character.`;j(t),setTimeout(()=>j(e=>e===t?null:e),1800)}},maxLength:ee.maxLength??G.maxLength}};if(h===`tagify`)return(0,f.jsx)(u.Select,{value:r,allowClear:!0,disabled:z,mode:`tags`,placeholder:W,onChange:q});if(h===`location`)return(0,f.jsx)(u.Select,{value:r,allowClear:!0,showSearch:!0,filterOption:!1,disabled:z,loading:y,options:V,placeholder:W,notFoundContent:y?(0,f.jsx)(u.Spin,{size:`small`}):void 0,onSearch:S,onFocus:()=>S(e=>e),onChange:q});if(h===`select`){let i=e.dataSource===`lookup`,a=e.dataSource===`master`,o=i||a,s=e.dataSource===`group`,c=Vi(e),l=Hi(e,r,V);return(0,f.jsx)(u.Select,{value:l,allowClear:!0,disabled:z,loading:y,labelInValue:c||void 0,showSearch:o||s||void 0,optionFilterProp:`label`,filterOption:o?!1:void 0,mode:H,options:V,placeholder:W,notFoundContent:y?(0,f.jsx)(u.Spin,{size:`small`}):void 0,onSearch:i?w:a?D:void 0,onChange:r=>{if(q(r),e.autofillFrom?.length){let i=r&&!Array.isArray(r)&&typeof r==`object`?r.value:r,a=Array.isArray(n)&&n.length>=3&&typeof n[1]==`number`;if(r==null)e.autofillFrom.forEach(({targetField:e})=>{let r=a?[...n.slice(0,2),...xa(e)]:xa(e);t.setFieldValue(r,null)});else if(M.current.length>0){let r=e.valueField??`_id`,o=M.current.find(e=>Tm(e,r)===i||e._id===i||e.id===i||e.value===i);o&&e.autofillFrom.forEach(({optionKey:e,targetField:r})=>{let i=Tm(o,e)??o.extraData?.[e]??null,s=a?[...n.slice(0,2),...xa(r)]:xa(r);t.setFieldValue(s,i)})}}}})}if(h===`radio`)return(0,f.jsx)(u.Radio.Group,{value:r,disabled:z,options:V,onChange:e=>q(e.target.value)});if(h===`checkbox`)return V.length>0?(0,f.jsx)(u.Checkbox.Group,{value:r,disabled:z,options:V,onChange:q}):(0,f.jsx)(u.Checkbox,{checked:i,disabled:z,onChange:r=>{let i=r.target.checked;if(q(i),e.linkedClearField&&i){let r=Array.isArray(n)&&n.length>1?[...n.slice(0,-1),e.linkedClearField]:[e.linkedClearField];t.setFieldValue(r,null)}},children:e.checkboxLabel??e.label});if(h===`text-editor`)return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(wt,{value:r??s??``,disabled:z,placeholder:W,onChange:e=>{if(ee){let{error:t}=Ga(e,ee,`change`);j(t)}q(e)}}),A&&(0,f.jsx)(`div`,{className:`v1-input-validator-hint`,children:A})]});if(h===`textarea`)return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(gm,{...te,rows:e.rows??3,className:`v1-scroll-textarea`}),A&&(0,f.jsx)(`div`,{className:`v1-input-validator-hint`,children:A})]});if(h===`date`)return(0,f.jsx)(u.DatePicker,{value:r,disabled:z,placeholder:W,style:{width:`100%`},suffixIcon:(0,f.jsx)(d.CalendarOutlined,{}),disabledDate:Wm(e,t,n),defaultPickerValue:Gm(e),onChange:e=>q(e)});if(h===`time`)return(0,f.jsx)(u.TimePicker,{value:r,disabled:z,placeholder:W,style:{width:`100%`},onChange:e=>q(e)});if(h===`file`){let t=e.validations??e.validation??e.rules??[],n=t.find(e=>(typeof e==`string`?e:e?.type)===`fileType`),i=t.find(e=>(typeof e==`string`?e:e?.type)===`fileSize`),a=t.find(e=>(typeof e==`string`?e:e?.type)===`maxFiles`),o=n?.value?n.value.split(`,`).map(e=>`.${e.trim().replace(/^\./,``)}`).join(`,`):void 0,s=i?Number(i?.value??5):void 0,c=a?Number(a?.value??1):ym(e.multiple)?e.maxCount??5:1,l=Array.isArray(r)?r:[],m=l.length<c,h=e=>e?e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(2)} MB`:``,g=e=>{let t=(e??``).split(`.`).pop()?.toLowerCase();return t===`pdf`?(0,f.jsx)(d.FilePdfOutlined,{className:`v1-file-type-icon v1-file-icon-pdf`}):[`doc`,`docx`].includes(t)?(0,f.jsx)(d.FileWordOutlined,{className:`v1-file-type-icon v1-file-icon-word`}):[`xls`,`xlsx`,`csv`].includes(t)?(0,f.jsx)(d.FileExcelOutlined,{className:`v1-file-type-icon v1-file-icon-excel`}):[`jpg`,`jpeg`,`png`,`gif`,`svg`,`webp`].includes(t)?(0,f.jsx)(d.FileImageOutlined,{className:`v1-file-type-icon v1-file-icon-image`}):(0,f.jsx)(d.FileOutlined,{className:`v1-file-type-icon v1-file-icon-default`})},_=e=>{q(l.filter((t,n)=>n!==e))},v=(e,t)=>{k({open:!0,docs:l.map(e=>{let t=e.url??e.thumbUrl??``;return!t&&e.originFileObj instanceof File&&(t=URL.createObjectURL(e.originFileObj)),t&&!t.startsWith(`http`)&&!t.startsWith(`blob:`)&&(t=ga(t)),{url:t,name:e.name??`file`}}).filter(e=>e.url),index:t??0})},y=c>1,b=c-l.length,x=[o?o.split(`,`).map(e=>e.replace(`.`,``).toUpperCase()).join(`, `):null,s?`up to ${s} MB`:null].filter(Boolean).join(` `),S=y&&l.length>0?[x,`${b} of ${c} remaining`].filter(Boolean).join(` • `):x,C=l.length>0?`Add ${y?`more files`:`file`}`:e.buttonLabel??`Upload ${e.label??`File`}`,w=e=>{if(l.length>=c)return u.Upload.LIST_IGNORE;if(o){let t=(e.name.split(`.`).pop()??``).toLowerCase();if(!o.split(`,`).map(e=>e.replace(/^\./,``).toLowerCase()).includes(t))return u.message.error(n?.message??`Only ${n.value} files are allowed`),u.Upload.LIST_IGNORE}return s!==void 0&&e.size/1024/1024>s?(u.message.error(i?.message??`File must be smaller than ${s} MB`),u.Upload.LIST_IGNORE):!1},T=({fileList:e})=>{let t=e.slice(0,c);if(q(t),p&&t.length>l.length){let e=t[t.length-1];e?.originFileObj&&p(e.originFileObj)}},E={accept:o,fileList:l,showUploadList:!1,multiple:!0,maxCount:c,beforeUpload:w,onChange:T,disabled:z},D=l.map((e,t)=>(0,f.jsxs)(`div`,{className:`v1-file-item`,children:[(0,f.jsx)(`div`,{className:`v1-file-item-icon`,children:g(e.name)}),(0,f.jsxs)(`div`,{className:`v1-file-item-info`,children:[(0,f.jsx)(`span`,{className:`v1-file-item-name`,children:e.name}),(0,f.jsx)(`span`,{className:`v1-file-item-meta`,children:e.existing?`Previously uploaded`:`${h(e.size)}${e.size?` • `:``}Uploaded just now`})]}),(0,f.jsxs)(u.Space,{size:6,className:`v1-file-item-actions`,children:[(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.EyeOutlined,{}),onClick:()=>v(e,t),className:`v1-file-view-btn`,children:`View`}),(0,f.jsx)(u.Button,{size:`small`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),onClick:()=>_(t),className:`v1-file-delete-btn`})]})]},e.uid??t)),A=(0,f.jsx)(Bt,{documents:O.docs,open:O.open,onClose:()=>k(e=>({...e,open:!1})),initialIndex:O.index});if(y){let t=l.length>0?`Upload more ${e.label??`files`}`:e.buttonLabel??`Upload ${e.label??`File`}`;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`v1-file-upload-wrapper`,children:[m&&(0,f.jsx)(u.Upload,{...E,style:{width:`100%`,display:`block`},children:(0,f.jsxs)(`div`,{className:`v1-upload-dropzone v1-upload-dropzone-center${z?` v1-upload-dropzone-disabled`:``}`,children:[(0,f.jsxs)(`div`,{className:`v1-upload-dropzone-title-row`,children:[(0,f.jsx)(d.CloudUploadOutlined,{className:`v1-upload-cloud-icon v1-upload-cloud-icon-sm`}),(0,f.jsx)(`span`,{className:`v1-upload-dropzone-title v1-upload-dropzone-title-blue`,children:t})]}),(0,f.jsx)(`span`,{className:`v1-upload-dropzone-sub`,children:`Drag & drop or click to upload`}),x&&(0,f.jsx)(`span`,{className:`v1-upload-dropzone-sub`,children:x})]})}),l.length>0&&(0,f.jsx)(`div`,{className:`v1-file-grid`,children:D}),m&&l.length>0&&(0,f.jsx)(u.Upload,{...E,style:{display:`inline-block`},children:(0,f.jsx)(u.Button,{type:`link`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),className:`v1-add-more-files-btn`,children:`Add more files`})})]}),A]})}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`v1-file-upload-wrapper`,children:[l.length>0&&(0,f.jsx)(`div`,{className:`v1-file-rows-single`,children:D}),m&&(0,f.jsx)(u.Upload,{accept:o,fileList:l,showUploadList:!1,multiple:!1,maxCount:1,beforeUpload:w,onChange:T,disabled:z,style:{width:`100%`,display:`block`},children:(0,f.jsxs)(`div`,{className:`v1-upload-dropzone v1-upload-dropzone-single${z?` v1-upload-dropzone-disabled`:``}`,children:[(0,f.jsx)(d.CloudUploadOutlined,{className:`v1-upload-cloud-icon`}),(0,f.jsx)(`span`,{className:`v1-upload-dropzone-title`,children:C}),S&&(0,f.jsxs)(`span`,{className:`v1-upload-dropzone-sub`,children:[`— `,S]})]})})]}),A]})}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Input,{...te,type:h===`number`?`number`:h}),A&&(0,f.jsx)(`div`,{className:`v1-input-validator-hint`,children:A})]})}function Jm({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(hm,{strong:!0,className:`v1-section-label`,children:t})]})}function Ym({moduleName:e,recordId:t,clientId:n,region:r,breadcrumbItems:i=[],submitText:a=`Save Changes`,cancelPath:o,onSuccess:s,fieldNameMap:c={},onFileUpload:m=null}){let h=(0,p.useNavigate)(),[g]=u.Form.useForm(),[_,v]=(0,l.useState)({}),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(``),[T,E]=(0,l.useState)(!1),[D,O]=(0,l.useState)(``),k=(0,l.useMemo)(()=>km(y),[y]),A=Ra({form:g,groups:k,module:e}),j=(0,l.useMemo)(()=>{let e={};return k.forEach(t=>{t.addRow&&(e[t.name]=Da(t))}),e},[k]),M={jobs:{list:`Jobs`,path:`/jobs`,edit:`Edit Job`},candidates:{list:`Candidates`,path:`/candidates`,edit:`Edit Candidate`},submissions:{list:`Submissions`,path:`/submissions`,edit:`Edit Submission`}},N=i.length>0?i:(()=>{let t=M[Cm(e)];return t?[{label:`Home`,href:`/`},{label:t.list,href:t.path},{label:t.edit}]:[]})();(0,l.useEffect)(()=>{if(!e||!t)return;let i=!1;async function a(){try{S(!0),w(``),O(``);let a=await mn({module:e,id:t,clientId:n,region:r});if(i)return;b(Array.isArray(a)?a:[])}catch(t){console.error(`Failed to fetch ${e} edit data:`,t),i||w(t?.message||`Failed to load record`)}finally{i||S(!1)}}return a(),()=>{i=!0}},[e,t,n,r]),(0,l.useEffect)(()=>{x||k.length===0||Oa(g,k)},[x,k,g]);let P=e=>{v(t=>({...t,[e]:!t[e]}))};function F(e){let t=Ki(e,k);return Object.entries(c).forEach(([e,n])=>{t[e]!==void 0&&(t[n]=t[e],delete t[e])}),t}async function I(n){try{E(!0),O(``);let r=Gi(n,k,{indexed:!0});if(m&&m.useLegacyUpload){let e=k.flatMap(e=>e.fields??[]).filter(e=>e.type===`file`);for(let r of e){let e=n[r.field];if(!Array.isArray(e))continue;let i=e.filter(e=>e.originFileObj instanceof File);try{await Promise.all(i.map(e=>m(r.field,e.originFileObj,t)))}catch(e){console.warn(`File upload failed — continuing with save:`,e)}}}await Xr(e,t,F(n),m?.useLegacyUpload?[]:r),u.message.success(`${e} updated successfully`),s?s():h(o||-1)}catch(t){console.error(`Failed to update ${e}:`,t),O(t?.message||`Failed to save changes`),u.message.error(t?.message||`Failed to save changes`)}finally{E(!1)}}let L=({errorFields:e})=>{if(!e?.length)return;let t=document.querySelector(`.ant-form-item-has-error`);if(!t)return;let n=t.querySelector(`input, textarea, select, .ProseMirror`);n&&(n.scrollIntoView({behavior:`smooth`,block:`center`}),setTimeout(()=>{n.focus?.(),n.style.boxShadow=`0 0 0 3px rgba(255, 77, 79, 0.3)`,setTimeout(()=>{n.style.boxShadow=``},1e3)},300))},[R,z]=(0,l.useState)({}),B=e=>String(e?.field??``),V=(e,t,n)=>{if(!e?.field)return!0;let r=t(n==null?[e.field]:[...Array.isArray(n)?n:[n],e.field]);switch(e.operator){case`eq`:return String(r??``)===String(e.value??``);case`neq`:return String(r??``)!==String(e.value??``);case`truthy`:return r!=null&&r!==``&&r!==!1;case`falsy`:return r==null||r===``||r===!1;default:return!0}},H=(t,r,i,a={})=>{let o=typeof t.field==`string`&&t.field.includes(`.`)?t.field.split(`.`):null,s=o??t.field,c=r===void 0?s:[r,...o??[t.field]],l=i!==void 0&&r!==void 0?[i,...Array.isArray(c)?c:[c]]:c,d=t.type===`checkbox`&&(t.options&&t.options.length>0||t.dataSource&&t.dataSource!==`static`),p=!d&&t.type===`checkbox`?`checked`:`value`,m=a.inline||a.hideLabel||!d&&t.type===`checkbox`?``:(0,f.jsx)(Em,{field:t,label:t.label}),h=a.inline||t.type===`text-editor`||t.type===`file`&&ym(t.multiple)?24:t.col??12,_=i!==void 0&&r!==void 0?[i,r]:null,v=Hm(t,l),y=a.inline?{flex:`${Number(t.combineWidth)>0?Number(t.combineWidth):1} 1 0`,maxWidth:`none`}:void 0,b=(t.aiActions||[]).filter(e=>e.trigger===`click`),x=(t.aiActions||[]).find(e=>e.trigger===`upload`),S=(0,f.jsx)(u.Form.Item,{label:m,name:c,extra:t.helpText?(0,f.jsx)(hm,{type:`secondary`,className:`v1-field-help-text`,children:t.helpText}):void 0,required:ym(t.req),rules:Vm(t,g,l),dependencies:v,valuePropName:p,getValueFromEvent:t.type===`file`?e=>Array.isArray(e)?e:e?.fileList:void 0,validateTrigger:[`onBlur`,`onChange`],children:(0,f.jsx)(qm,{field:t,form:g,name:l,moduleName:e,initialValue:t.value,scopeValues:{clientId:n},onAiUpload:x?e=>A.runAction(a.groupNameForActions,t,x,e):void 0,formDisabled:A.busy})}),C=b.length>0?(()=>{let e=La(b),n=n=>(0,f.jsx)(za,{position:n,actions:e[n],aiActions:A,groupName:a.groupNameForActions,field:t},n);return(0,f.jsxs)(`div`,{className:`v1-ai-action-wrap`,children:[n(`top-left`),n(`top-center`),n(`top-right`),S,n(`bottom-left`),n(`bottom-center`),n(`bottom-right`)]})})():S;return t.showIf?.field?(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,noStyle:!0,children:({getFieldValue:e})=>V(t.showIf,e,_)?(0,f.jsx)(u.Col,{xs:24,md:h,style:y,className:a.inline?`v1-combine-cell`:void 0,children:C}):null},t.field):(0,f.jsx)(u.Col,{xs:24,md:h,style:y,className:a.inline?`v1-combine-cell`:void 0,children:C},t.field)},U=(e,t,n,r=!1,i)=>{let a=new Set,o=[];return e.forEach(s=>{let c=s.combineKey?.trim?.();if(!c){o.push(H(s,t,n,{hideLabel:r,groupNameForActions:i}));return}let l=`${n??`root`}:${t??`root`}:${c}`;if(a.has(l))return;let d=e.filter(e=>e.combineKey===c);d.forEach(e=>a.add(`${n??`root`}:${t??`root`}:${e.combineKey}`));let p=d.find(e=>e.combineLabel)?.combineLabel??s.combineLabel??s.label,m=d.find(e=>e.combineToggleTarget)?.combineToggleTarget,h=d.find(e=>e.combineToggleLabel)?.combineToggleLabel??`Show range`,_=d.some(e=>ym(e.combineWrap)),v=Number(d.find(e=>[12,24].includes(Number(e.combineSpan)))?.combineSpan),y=m?d.find(e=>B(e)===m):null,b=y?.field?.includes?.(`.`)?y.field.split(`.`):[y?.field].filter(Boolean),x=y?n!==void 0&&t!==void 0?[n,t,...b]:b.length>1?b:y.field:null,S=d.some(e=>ym(e.req)),C=[12,24].includes(v)?v:d.length>=3?24:12;o.push((0,f.jsx)(u.Col,{xs:24,md:C,children:(0,f.jsx)(u.Form.Item,{label:p,required:S,colon:!1,className:`v1-combine-field`,children:(0,f.jsx)(u.Form.Item,{noStyle:!0,shouldUpdate:!0,children:({getFieldValue:e})=>{let r=x?!xm(e(x)):!1,i=R[l]??r,a=m&&!i?d.filter(e=>B(e)!==m):d;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Row,{gutter:[8,0],align:`top`,wrap:_,className:`v1-combine-row${_?` v1-combine-row-wrap`:``}`,children:a.map(e=>H(e,t,n,{inline:!0}))}),m&&(0,f.jsxs)(`div`,{className:`v1-combine-range`,children:[(0,f.jsx)(u.Switch,{size:`small`,checked:i,onChange:e=>{!e&&x&&(g.setFieldValue(x,void 0),g.validateFields([x]).catch(()=>{})),z(t=>({...t,[l]:e}))}}),(0,f.jsx)(hm,{type:`secondary`,className:`v1-combine-toggle-label`,children:h})]})]})}})})},l))}),o};return(0,f.jsxs)(`main`,{children:[N.length>0&&(0,f.jsx)(so,{items:N}),(0,f.jsxs)(`div`,{className:`v1-edit-page`,children:[(0,f.jsx)(`div`,{className:`v1-page-inner`,children:(0,f.jsxs)(u.Spin,{spinning:x||A.busy,tip:A.busy?`Running AI action…`:`Loading form fields...`,children:[C&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:C,style:{marginBottom:16}}),D&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:D,style:{marginBottom:16}}),(0,f.jsxs)(u.Form,{form:g,layout:`vertical`,colon:!1,className:`v1-form`,disabled:A.busy,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),onFinish:I,onFinishFailed:L,children:[k.map((e,t)=>{let n=e.name??e.id??String(t),r=e.name??n,i=Math.max(0,Number(e.minRows??0)||0),a=e.addRow?(0,f.jsx)(u.Form.List,{name:r,initialValue:j[e.name]??[],rules:[{validator:async(t,n=[])=>{if(!(ym(e.toggleEnabled)&&e.toggleField&&g.getFieldValue(e.toggleField))){if(i>0&&n.length<i)throw Error(`Keep at least ${i} row${i>1?`s`:``}.`);if(ym(e.requireOne)&&n.some(e=>!Sm(e)))throw Error(`Fill at least one field in each added row.`)}}}],children:(t,{add:n,remove:a},{errors:o})=>(0,f.jsxs)(`div`,{className:`v1-addrow-wrapper`,children:[(0,f.jsx)(`div`,{className:`v1-addrow-topbar`,children:(0,f.jsx)(u.Button,{type:`link`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>n(),className:`v1-addrow-add-btn`,children:e.addLabel??`Add ${e.label??`Row`}`})}),ym(e.sharedRowLabels)&&t.length>0&&(0,f.jsx)(u.Row,{gutter:[24,0],className:`v1-addrow-header`,children:e.fields.map(e=>(0,f.jsx)(u.Col,{md:e.col??12,className:`v1-addrow-header-label`,children:e.label},B(e)))}),t.map(({key:n,name:o})=>(0,f.jsxs)(`div`,{className:`v1-addrow-item`,children:[(0,f.jsx)(u.Button,{type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),disabled:t.length<=i,onClick:()=>a(o),className:`v1-addrow-delete-btn`}),(0,f.jsx)(u.Row,{gutter:[24,0],align:`top`,children:U(e.fields,o,r,ym(e.sharedRowLabels),r)})]},n)),(0,f.jsx)(u.Form.ErrorList,{errors:o})]})}):(0,f.jsx)(u.Row,{gutter:[24,0],children:U(e.fields,void 0,void 0,!1,r)});return(0,f.jsx)(u.Card,{className:`v1-card v1-edit-card`,title:(0,f.jsx)(Jm,{icon:_m[t%_m.length],title:e.label??e.name??`Details`}),extra:(0,f.jsxs)(u.Space,{size:8,align:`center`,className:`v1-group-actions`,children:[(0,f.jsx)(Dm,{group:e}),(0,f.jsx)(Om,{group:e}),(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:_[n]?(0,f.jsx)(d.DownOutlined,{}):(0,f.jsx)(d.UpOutlined,{}),onClick:e=>{e.stopPropagation(),P(n)}})]}),children:(0,f.jsx)(u.Form.Item,{noStyle:!0,shouldUpdate:!0,children:({getFieldValue:t})=>{let r=ym(e.toggleEnabled)&&e.toggleField&&!!t(e.toggleField);return(0,f.jsx)(`div`,{style:{display:_[n]||r?`none`:`block`},children:a})}})},n)}),!x&&!C&&k.length===0&&(0,f.jsx)(u.Alert,{type:`info`,showIcon:!0,message:`No form fields are configured.`})]})]})}),(0,f.jsxs)(`div`,{className:`v1-footer`,children:[(0,f.jsx)(hm,{type:`secondary`,children:`All unsaved changes will be lost if you cancel and reload.`}),(0,f.jsxs)(u.Space,{size:12,children:[(0,f.jsx)(u.Button,{onClick:()=>h(o||-1),children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,onClick:()=>g.submit(),disabled:x||T,loading:T,children:a})]})]})]})]})}var Xm=/(\{\{[\w.]+\}\})/g;function Zm(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function Qm(e,t){return e?e.split(Xm).map(e=>/^\{\{[\w.]+\}\}$/.test(e)?`<span style="color:var(--color-brand);font-weight:600;background:var(--color-brand-softer);border-radius:3px;padding:0 3px">${Zm(e)}</span>`:`<span style="color:var(--color-text-primary)">${Zm(e).replace(/\n/g,`<br>`)}</span>`).join(``):`<span style="color:#bbb;pointer-events:none">${Zm(t)}</span>`}var $m={fontFamily:`"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace`,fontSize:12,lineHeight:`1.7`,padding:`5px 10px`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,overflowWrap:`break-word`,boxSizing:`border-box`};function eh({value:e=``,onChange:t,placeholder:n="e.g. ${{clientRate}} /{{rateType}}",disabled:r=!1,textareaRef:i}){let a=(0,l.useRef)(null),o=i??a,[s,c]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=o.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[e]);let u=r?`var(--color-border-input)`:s?`var(--color-brand)`:`var(--color-border-input)`,d=s&&!r?`0 0 0 2px rgba(0,83,165,0.12)`:`none`;return(0,f.jsxs)(`div`,{style:{position:`relative`,border:`1px solid ${u}`,borderRadius:6,background:r?`var(--color-surface-soft)`:`#fff`,transition:`border-color 0.2s, box-shadow 0.2s`,boxShadow:d,minHeight:34,cursor:r?`not-allowed`:`text`},onClick:()=>!r&&o.current?.focus(),children:[(0,f.jsx)(`div`,{"aria-hidden":!0,style:{...$m,visibility:`hidden`,minHeight:22,pointerEvents:`none`,userSelect:`none`},dangerouslySetInnerHTML:{__html:Qm(e,n)+`​`}}),(0,f.jsx)(`div`,{"aria-hidden":!0,style:{...$m,position:`absolute`,inset:0,pointerEvents:`none`,userSelect:`none`,overflow:`hidden`},dangerouslySetInnerHTML:{__html:Qm(e,n)+`​`}}),(0,f.jsx)(`textarea`,{ref:o,value:e,rows:1,spellCheck:!1,autoCorrect:`off`,autoCapitalize:`off`,disabled:r,onChange:e=>t?.(e.target.value),onFocus:()=>c(!0),onBlur:()=>c(!1),style:{...$m,position:`absolute`,inset:0,width:`100%`,height:`100%`,background:`transparent`,color:`transparent`,caretColor:`#333`,border:`none`,outline:`none`,resize:`none`,overflow:`hidden`,cursor:r?`not-allowed`:`text`}})]})}function th({moduleName:e,recordId:t,cancelPath:n,onSuccess:r,fieldNameMap:i={},onFileUpload:a=null}){let o=(0,p.useNavigate)(),[s,c]=(0,l.useState)([]),[d,f]=(0,l.useState)({}),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(``),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(``);(0,l.useEffect)(()=>{if(!e||!t)return;let n=!1;async function r(){try{g(!0),v(``);let[r,i]=await Promise.all([mn({module:e,id:t}),Yr(e,t)]);if(n)return;c(Array.isArray(r)?r:[]),f(i??{})}catch(e){n||v(e?.message||`Failed to load record`)}finally{n||g(!1)}}return r(),()=>{n=!0}},[e,t]);function C(e,t){let n={...d},r=t.flatMap(e=>e.fields??[]);return Object.entries(e).forEach(([e,t])=>{if(t!==void 0&&r.find(t=>t.field===e)?.type!==`file`){if(m.default.isDayjs(t)){applyDotValue(n,e,t.format(`MM-DD-YYYY`));return}applyDotValue(n,e,t)}}),Object.keys(n).forEach(e=>{e.includes(`.`)&&delete n[e]}),Object.entries(i).forEach(([e,t])=>{n[e]!==void 0&&(n[t]=n[e],delete n[e])}),Object.keys(n).forEach(e=>{let t=n[e];if(typeof t==`string`&&t!==``){let r=/(date|time|Date|Time|At|at)$/.test(e),i=/ago|month|year|day|week|hour|minute/i.test(t),a=/^\d{4}-\d{2}-\d{2}/.test(t);r&&(i||!a)&&delete n[e]}}),Object.keys(n).forEach(e=>{let t=n[e];Array.isArray(t)&&t[0]?.originFileObj&&delete n[e]}),n}async function w(i,s){try{if(b(!0),S(``),a){let e=s.flatMap(e=>e.fields??[]).filter(e=>e.type===`file`);for(let n of e){let e=i[n.field];if(!Array.isArray(e))continue;let r=e.filter(e=>e.originFileObj instanceof File);await Promise.all(r.map(e=>a(n.field,e.originFileObj,t)))}}await Xr(e,t,C(i,s)),u.message.success(`${e} updated successfully`),r?r():o(n||-1)}catch(e){S(e?.message||`Failed to save changes`),u.message.error(e?.message||`Failed to save changes`)}finally{b(!1)}}return{formGroups:s,rawRecord:d,loading:h,error:_,submitting:y,submitError:x,submit:w}}var nh=`data:image/svg+xml,%3csvg%20width='380'%20height='130'%20viewBox='0%200%20380%20130'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_30_1933)'%20filter='url(%23filter0_d_30_1933)'%3e%3cpath%20d='M13.5623%2060V34.296H19.2143V44.16H29.6183V34.296H35.2703V60H29.6183V48.912H19.2143V60H13.5623ZM39.8859%2060V34.296H45.5379V60H39.8859ZM50.1431%2060V34.296H64.0031C66.2591%2034.296%2068.0951%2034.992%2069.5111%2036.384C70.8551%2037.728%2071.5271%2039.396%2071.5271%2041.388C71.5271%2044.58%2070.1711%2046.728%2067.4591%2047.832V47.904C69.7151%2048.48%2070.9631%2050.484%2071.2031%2053.916C71.2751%2054.948%2071.3471%2055.98%2071.4191%2057.012C71.5631%2058.404%2071.8511%2059.4%2072.2831%2060H66.6311C66.3671%2059.352%2066.1631%2058.38%2066.0191%2057.084C65.9231%2056.004%2065.8271%2054.924%2065.7311%2053.844C65.5391%2052.452%2065.1191%2051.456%2064.4711%2050.856C63.8471%2050.256%2062.8391%2049.956%2061.4471%2049.956H55.7951V60H50.1431ZM55.7951%2038.688V45.924H61.9871C64.5791%2045.924%2065.8751%2044.7%2065.8751%2042.252C65.8751%2039.876%2064.5791%2038.688%2061.9871%2038.688H55.7951ZM75.7635%2060V34.296H94.9875V39.048H81.4155V44.556H93.8715V48.948H81.4155V55.248H95.2755V60H75.7635ZM118.336%2060V10.02H125.336L142.626%2053.84L159.846%2010.02H166.846V60H162.086V16.81H161.946L144.866%2060H140.386L123.236%2016.81H123.096V60H118.336ZM190.506%2022.83C195.826%2022.83%20200.05%2024.72%20203.176%2028.5C206.116%2032.0467%20207.586%2036.5267%20207.586%2041.94C207.586%2047.3533%20206.116%2051.8333%20203.176%2055.38C200.05%2059.16%20195.826%2061.05%20190.506%2061.05C185.186%2061.05%20180.963%2059.16%20177.836%2055.38C174.896%2051.8333%20173.426%2047.3533%20173.426%2041.94C173.426%2036.5267%20174.896%2032.0467%20177.836%2028.5C180.963%2024.72%20185.186%2022.83%20190.506%2022.83ZM190.506%2026.54C186.493%2026.54%20183.32%2028.15%20180.986%2031.37C178.886%2034.2633%20177.836%2037.7867%20177.836%2041.94C177.836%2046.0933%20178.886%2049.6167%20180.986%2052.51C183.32%2055.73%20186.493%2057.34%20190.506%2057.34C194.52%2057.34%20197.693%2055.73%20200.026%2052.51C202.126%2049.6167%20203.176%2046.0933%20203.176%2041.94C203.176%2037.7867%20202.126%2034.2633%20200.026%2031.37C197.693%2028.15%20194.52%2026.54%20190.506%2026.54ZM213.443%2060V23.88H217.503V32.35H217.643C218.763%2029.41%20220.513%2027.1467%20222.893%2025.56C225.273%2023.9733%20228.073%2023.25%20231.293%2023.39V27.8C227.373%2027.6133%20224.153%2028.78%20221.633%2031.3C219.113%2033.7733%20217.853%2036.9233%20217.853%2040.75V60H213.443ZM265.203%2043.13H237.413C237.46%2046.8633%20238.393%2050.0367%20240.213%2052.65C242.406%2055.7767%20245.44%2057.34%20249.313%2057.34C255.286%2057.34%20259.066%2054.26%20260.653%2048.1H265.063C263.056%2056.7333%20257.806%2061.05%20249.313%2061.05C243.9%2061.05%20239.746%2059.16%20236.853%2055.38C234.286%2051.9733%20233.003%2047.4933%20233.003%2041.94C233.003%2036.6667%20234.286%2032.28%20236.853%2028.78C239.793%2024.8133%20243.946%2022.83%20249.313%2022.83C254.773%2022.83%20258.926%2024.9533%20261.773%2029.2C264.246%2032.8867%20265.39%2037.53%20265.203%2043.13ZM237.413%2039.42H260.793C260.7%2035.8733%20259.65%2032.8867%20257.643%2030.46C255.496%2027.8467%20252.72%2026.54%20249.313%2026.54C245.906%2026.54%20243.106%2027.87%20240.913%2030.53C238.953%2032.8633%20237.786%2035.8267%20237.413%2039.42Z'%20fill='white'/%3e%3cpath%20d='M124.417%20111V90.048H116.713V85.296H137.773V90.048H130.069V111H124.417ZM141.637%20111V85.296H147.289V111H141.637ZM153.154%20111V85.296H167.014C169.27%2085.296%20171.106%2085.992%20172.522%2087.384C173.866%2088.728%20174.538%2090.396%20174.538%2092.388C174.538%2095.58%20173.182%2097.728%20170.47%2098.832V98.904C172.726%2099.48%20173.974%20101.484%20174.214%20104.916C174.286%20105.948%20174.358%20106.98%20174.43%20108.012C174.574%20109.404%20174.862%20110.4%20175.294%20111H169.642C169.378%20110.352%20169.174%20109.38%20169.03%20108.084C168.934%20107.004%20168.838%20105.924%20168.742%20104.844C168.55%20103.452%20168.13%20102.456%20167.482%20101.856C166.858%20101.256%20165.85%20100.956%20164.458%20100.956H158.806V111H153.154ZM158.806%2089.688V96.924H164.998C167.59%2096.924%20168.886%2095.7%20168.886%2093.252C168.886%2090.876%20167.59%2089.688%20164.998%2089.688H158.806ZM180.034%20111V85.296H199.258V90.048H185.686V95.556H198.142V99.948H185.686V106.248H199.546V111H180.034ZM226.246%20111V61.02H231.006V106.94H259.006V111H226.246ZM295.134%2094.13H267.344C267.391%2097.863%20268.324%20101.037%20270.144%20103.65C272.337%20106.777%20275.371%20108.34%20279.244%20108.34C285.217%20108.34%20288.997%20105.26%20290.584%2099.1H294.994C292.987%20107.733%20287.737%20112.05%20279.244%20112.05C273.831%20112.05%20269.677%20110.16%20266.784%20106.38C264.217%20102.973%20262.934%2098.493%20262.934%2092.94C262.934%2087.667%20264.217%2083.28%20266.784%2079.78C269.724%2075.813%20273.877%2073.83%20279.244%2073.83C284.704%2073.83%20288.857%2075.953%20291.704%2080.2C294.177%2083.887%20295.321%2088.53%20295.134%2094.13ZM267.344%2090.42H290.724C290.631%2086.873%20289.581%2083.887%20287.574%2081.46C285.427%2078.847%20282.651%2077.54%20279.244%2077.54C275.837%2077.54%20273.037%2078.87%20270.844%2081.53C268.884%2083.863%20267.717%2086.827%20267.344%2090.42ZM328.843%2085.45H324.433C324.34%2082.837%20323.36%2080.83%20321.493%2079.43C319.813%2078.17%20317.643%2077.54%20314.983%2077.54C312.696%2077.54%20310.783%2077.983%20309.243%2078.87C307.376%2079.99%20306.443%2081.623%20306.443%2083.77C306.443%2086.71%20308.94%2088.74%20313.933%2089.86L319.813%2091.19C326.673%2092.73%20330.103%2096.067%20330.103%20101.2C330.103%20104.793%20328.54%20107.57%20325.413%20109.53C322.706%20111.21%20319.44%20112.05%20315.613%20112.05C306.373%20112.05%20301.426%20107.803%20300.773%2099.31H305.183C305.37%20102.203%20306.42%20104.443%20308.333%20106.03C310.293%20107.57%20312.79%20108.34%20315.823%20108.34C318.296%20108.34%20320.466%20107.827%20322.333%20106.8C324.573%20105.54%20325.693%20103.767%20325.693%20101.48C325.693%2098.26%20323.056%2096.067%20317.783%2094.9L312.113%2093.64C308.846%2092.893%20306.443%2091.89%20304.903%2090.63C302.99%2089.043%20302.033%2086.827%20302.033%2083.98C302.033%2080.573%20303.503%2077.96%20306.443%2076.14C308.916%2074.6%20311.973%2073.83%20315.613%2073.83C319.393%2073.83%20322.473%2074.787%20324.853%2076.7C327.373%2078.753%20328.703%2081.67%20328.843%2085.45ZM364.294%2085.45H359.884C359.791%2082.837%20358.811%2080.83%20356.944%2079.43C355.264%2078.17%20353.094%2077.54%20350.434%2077.54C348.147%2077.54%20346.234%2077.983%20344.694%2078.87C342.827%2079.99%20341.894%2081.623%20341.894%2083.77C341.894%2086.71%20344.391%2088.74%20349.384%2089.86L355.264%2091.19C362.124%2092.73%20365.554%2096.067%20365.554%20101.2C365.554%20104.793%20363.991%20107.57%20360.864%20109.53C358.157%20111.21%20354.891%20112.05%20351.064%20112.05C341.824%20112.05%20336.877%20107.803%20336.224%2099.31H340.634C340.821%20102.203%20341.871%20104.443%20343.784%20106.03C345.744%20107.57%20348.241%20108.34%20351.274%20108.34C353.747%20108.34%20355.917%20107.827%20357.784%20106.8C360.024%20105.54%20361.144%20103.767%20361.144%20101.48C361.144%2098.26%20358.507%2096.067%20353.234%2094.9L347.564%2093.64C344.297%2092.893%20341.894%2091.89%20340.354%2090.63C338.441%2089.043%20337.484%2086.827%20337.484%2083.98C337.484%2080.573%20338.954%2077.96%20341.894%2076.14C344.367%2074.6%20347.424%2073.83%20351.064%2073.83C354.844%2073.83%20357.924%2074.787%20360.304%2076.7C362.824%2078.753%20364.154%2081.67%20364.294%2085.45Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_30_1933'%20x='0'%20y='0'%20width='380'%20height='130'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='4'/%3e%3cfeGaussianBlur%20stdDeviation='7'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_30_1933'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_30_1933'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_30_1933'%3e%3crect%20width='352'%20height='102'%20fill='white'%20transform='translate(14%2010)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,rh=`data:image/svg+xml,%3csvg%20width='738'%20height='346'%20viewBox='0%200%20738%20346'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M166.531%20110.373V111.304L158.082%20116.188L158.071%20115.256L166.531%20110.373Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M162.346%20110.647V111.578L158.071%20114.043V113.123L162.346%20110.647Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M159.716%20109.501L159.727%20110.433L158.06%20111.387V110.455L159.716%20109.501Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M158.648%20121.324C158.485%20121.68%20158.4%20122.067%20158.399%20122.459V134.554C158.399%20135.508%20159.079%20135.894%20159.907%20135.406L177.916%20124.992C178.352%20124.709%20178.714%20124.326%20178.974%20123.877C179.234%20123.427%20179.385%20122.922%20179.413%20122.403V110.319C179.423%20110.026%20179.335%20109.739%20179.164%20109.501L168.957%20122.437L158.648%20121.324Z'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M159.894%20119.821C159.346%20120.197%20158.911%20120.715%20158.635%20121.32L168.921%20122.387L179.128%20109.452C179.006%20109.325%20178.848%20109.238%20178.675%20109.206C178.502%20109.173%20178.323%20109.196%20178.164%20109.271L159.894%20119.821Z'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M182.85%20117.448L217.621%2097.3806V115.551'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M368.923%20155.802C382.01%20163.366%20382.078%20175.642%20369.07%20183.206L307.977%20218.741C294.969%20226.315%20273.818%20226.315%20260.72%20218.741L199.264%20183.206C186.176%20175.642%20186.108%20163.366%20199.116%20155.802L260.175%20120.268C273.183%20112.693%20294.334%20112.693%20307.421%20120.268L368.923%20155.802Z'%20fill='%2379AEF5'/%3e%3cpath%20d='M369.066%20150.158L307.973%20185.693C294.965%20193.268%20273.814%20193.268%20260.715%20185.693L199.259%20150.158C192.67%20146.354%20189.381%20141.357%20189.393%20136.36V143.435C189.393%20148.421%20192.67%20153.429%20199.259%20157.234L260.738%20192.78C273.825%20200.343%20294.987%20200.343%20307.995%20192.78L369.054%20157.245C375.507%20153.486%20378.751%20148.568%20378.762%20143.617V136.542C378.762%20141.482%20375.53%20146.399%20369.066%20150.158Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M368.923%20122.754C382.01%20130.317%20382.078%20142.594%20369.07%20150.157L307.977%20185.692C294.969%20193.267%20273.818%20193.267%20260.72%20185.692L199.264%20150.157C186.176%20142.594%20186.108%20130.317%20199.116%20122.754L260.175%2087.2192C273.183%2079.6444%20294.334%2079.6444%20307.421%2087.2192L368.923%20122.754Z'%20fill='white'/%3e%3cpath%20d='M179.53%20276.419C192.617%20283.983%20192.685%20296.259%20179.677%20303.834L118.584%20339.358C105.576%20346.932%2084.4257%20346.932%2071.3384%20339.358L9.87097%20303.834C-3.21637%20296.259%20-3.28442%20283.994%209.72354%20276.419L70.7827%20240.885C83.7906%20233.321%20104.941%20233.321%20118.04%20240.885L179.53%20276.419Z'%20fill='%2379AEF5'/%3e%3cpath%20d='M179.673%20270.775L118.58%20306.344C105.572%20313.919%2084.4213%20313.919%2071.334%20306.344L9.86657%20270.821C3.27754%20267.005%20-0.0113116%20262.008%202.9229e-05%20257.011V264.086C2.9229e-05%20269.083%203.27754%20274.08%209.85523%20277.884L71.3226%20313.419C84.41%20320.994%20105.572%20320.994%20118.58%20313.419L179.639%20277.884C186.092%20274.125%20189.336%20269.208%20189.347%20264.256V257.181C189.381%20262.053%20186.137%20267.016%20179.673%20270.775Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M179.525%20243.37C192.613%20250.933%20192.681%20263.21%20179.673%20270.773L118.58%20306.342C105.572%20313.917%2084.4209%20313.917%2071.3336%20306.342L9.86621%20270.819C-3.18711%20263.187%20-3.25515%20250.933%209.70744%20243.37L70.7666%20207.835C83.7745%20200.26%20104.925%20200.26%20118.024%20207.835L179.525%20243.37Z'%20fill='white'/%3e%3cpath%20d='M561.71%20254.942C574.798%20262.506%20574.866%20274.782%20561.858%20282.357L500.765%20317.881C487.757%20325.456%20466.606%20325.456%20453.519%20317.881L392.051%20282.357C378.964%20274.782%20378.896%20262.517%20391.904%20254.942L452.963%20219.408C465.971%20211.844%20487.122%20211.844%20500.22%20219.408L561.71%20254.942Z'%20fill='%2379AEF5'/%3e%3cpath%20d='M561.861%20249.299L500.768%20284.834C487.76%20292.409%20466.609%20292.409%20453.522%20284.834L392.054%20249.311C385.465%20245.495%20382.176%20240.498%20382.188%20235.501V242.576C382.188%20247.573%20385.465%20252.57%20392.043%20256.375L453.51%20291.909C466.598%20299.484%20487.76%20299.484%20500.768%20291.909L561.849%20256.375C568.302%20252.616%20571.546%20247.698%20571.557%20242.747V235.672C571.557%20240.623%20568.325%20245.54%20561.861%20249.299Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M561.71%20221.895C574.798%20229.459%20574.866%20241.735%20561.858%20249.299L500.765%20284.833C487.757%20292.408%20466.606%20292.408%20453.519%20284.833L392.051%20249.31C378.964%20241.735%20378.896%20229.459%20391.904%20221.895L452.963%20186.36C465.971%20178.785%20487.122%20178.785%20500.22%20186.36L561.71%20221.895Z'%20fill='white'/%3e%3cpath%20opacity='0.43'%20d='M499.163%20269.382L514.995%20269.268L547.963%20250.666L529.681%20241.66L499.163%20269.382Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M727.582%20144.647C740.669%20152.21%20740.749%20164.487%20727.741%20172.05L666.636%20207.539C653.628%20215.114%20632.478%20215.114%20619.39%20207.539L557.923%20172.005C544.836%20164.441%20544.768%20152.165%20557.775%20144.601L618.835%20109.066C631.843%20101.492%20652.993%20101.492%20666.092%20109.066L727.582%20144.647Z'%20fill='%2379AEF5'/%3e%3cpath%20d='M727.709%20139.004L666.639%20174.538C653.631%20182.113%20632.48%20182.113%20619.393%20174.538L557.925%20139.004C551.336%20135.199%20548.048%20130.202%20548.059%20125.205V132.28C548.059%20137.266%20551.336%20142.263%20557.925%20146.079L619.382%20181.614C632.469%20189.177%20653.631%20189.177%20666.639%20181.614L727.698%20146.079C734.162%20142.32%20737.394%20137.391%20737.406%20132.451V125.387C737.406%20130.316%20734.162%20135.245%20727.709%20139.004Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M727.585%20111.591C740.673%20119.166%20740.752%20131.443%20727.744%20139.006L666.674%20174.541C653.666%20182.116%20632.515%20182.116%20619.428%20174.541L557.96%20139.006C544.873%20131.443%20544.805%20119.166%20557.813%20111.603L618.872%2076.0681C631.88%2068.4933%20653.031%2068.4933%20666.129%2076.0681L727.585%20111.591Z'%20fill='white'/%3e%3cpath%20d='M188.892%20167.791L116.878%20126.158C114.281%20124.659%20111.922%20124.511%20110.209%20125.511L106.002%20128.043C107.703%20127.055%20110.062%20127.191%20112.67%20128.702L184.673%20170.335C189.845%20173.322%20194.018%20180.556%20194.007%20186.507L193.882%20228.924C193.882%20231.876%20192.839%20233.955%20191.149%20234.931L195.379%20232.467C197.058%20231.49%20198.101%20229.412%20198.112%20226.459L198.226%20184.042C198.248%20178.069%20194.075%20170.823%20188.892%20167.791Z'%20fill='%23C8F3FF'/%3e%3cpath%20d='M184.677%20170.305C189.848%20173.292%20194.022%20180.526%20194.01%20186.477L193.886%20228.894C193.886%20234.833%20189.667%20237.229%20184.495%20234.242L112.492%20192.609C107.321%20189.622%20103.136%20182.388%20103.159%20176.437L103.272%20134.021C103.272%20128.07%20107.502%20125.685%20112.674%20128.672L184.677%20170.305Z'%20fill='%235C6BC0'/%3e%3cpath%20d='M114.142%20165.041L121.426%20150.951L123.13%20151.834L119.886%20158.109L127.389%20161.998L130.632%20155.723L132.336%20156.606L125.053%20170.697L123.349%20169.813L126.607%20163.511L119.104%20159.622L115.846%20165.925L114.142%20165.041Z'%20fill='white'/%3e%3cpath%20d='M137.451%20159.257L130.168%20173.348L128.464%20172.465L135.747%20158.374L137.451%20159.257Z'%20fill='white'/%3e%3cpath%20d='M133.585%20175.119L140.868%20161.028L145.622%20163.493C146.722%20164.062%20147.527%20164.718%20148.038%20165.46C148.551%20166.197%20148.809%20166.979%20148.811%20167.806C148.813%20168.633%20148.6%20169.462%20148.171%20170.292C147.742%20171.122%20147.192%20171.77%20146.521%20172.237C145.85%20172.703%20145.069%20172.938%20144.179%20172.942C143.291%20172.941%20142.302%20172.658%20141.212%20172.093L137.364%20170.099L138.161%20168.558L141.953%20170.524C142.704%20170.913%20143.366%20171.116%20143.938%20171.134C144.514%20171.153%20145.01%20171.015%20145.424%20170.718C145.846%20170.419%20146.203%20169.987%20146.494%20169.423C146.786%20168.859%20146.936%20168.311%20146.943%20167.78C146.95%20167.249%20146.782%20166.749%20146.438%20166.279C146.096%20165.806%20145.545%20165.372%20144.785%20164.978L141.789%20163.425L135.288%20176.002L133.585%20175.119ZM143.48%20172.222L143.671%20180.347L141.692%20179.321L141.556%20171.225L143.48%20172.222Z'%20fill='white'/%3e%3cpath%20d='M154.947%20168.326L147.664%20182.417L145.96%20181.533L153.243%20167.443L154.947%20168.326Z'%20fill='white'/%3e%3cpath%20d='M169.522%20175.88L162.238%20189.971L160.589%20189.116L158.64%20174.079L158.503%20174.007L152.784%20185.071L151.081%20184.187L158.364%20170.097L160.013%20170.952L161.975%20186.031L162.113%20186.102L167.845%20175.011L169.522%20175.88Z'%20fill='white'/%3e%3cpath%20d='M180.274%20187.036C180.362%20186.495%20180.378%20185.977%20180.32%20185.481C180.269%20184.984%20180.142%20184.517%20179.938%20184.08C179.739%20183.645%20179.462%20183.248%20179.107%20182.89C178.752%20182.531%20178.321%20182.221%20177.812%20181.957C176.978%20181.525%20176.109%20181.348%20175.204%20181.425C174.298%20181.502%20173.427%20181.856%20172.59%20182.487C171.753%20183.117%20171.02%20184.042%20170.389%20185.263C169.758%20186.483%20169.43%20187.618%20169.404%20188.669C169.377%20189.719%20169.601%20190.641%20170.074%20191.433C170.548%20192.225%20171.219%20192.846%20172.09%20193.297C172.896%20193.715%20173.695%20193.911%20174.486%20193.885C175.285%20193.857%20176.02%20193.616%20176.69%20193.161C177.368%20192.704%20177.93%20192.044%20178.375%20191.182L178.841%20191.562L174.608%20189.369L175.391%20187.855L180.75%20190.633L179.967%20192.146C179.368%20193.307%20178.599%20194.188%20177.661%20194.789C176.727%20195.393%20175.705%20195.707%20174.596%20195.73C173.493%20195.752%20172.382%20195.473%20171.265%20194.894C170.019%20194.248%20169.076%20193.387%20168.436%20192.311C167.8%20191.237%20167.499%20190.022%20167.532%20188.667C167.569%20187.314%20167.972%20185.894%20168.74%20184.408C169.316%20183.293%20169.983%20182.368%20170.741%20181.633C171.505%20180.895%20172.325%20180.354%20173.199%20180.011C174.074%20179.667%20174.973%20179.523%20175.897%20179.577C176.822%20179.632%20177.735%20179.893%20178.637%20180.361C179.379%20180.745%20180.013%20181.216%20180.538%20181.773C181.07%20182.328%20181.482%20182.94%20181.775%20183.61C182.075%20184.277%20182.249%20184.981%20182.296%20185.72C182.346%20186.456%20182.258%20187.198%20182.033%20187.948L180.274%20187.036Z'%20fill='white'/%3e%3cpath%20d='M291.119%20297.896C292.922%20298.941%20292.934%20300.633%20291.119%20301.678L279.619%20308.39C278.614%20308.905%20277.5%20309.174%20276.37%20309.174C275.24%20309.174%20274.127%20308.905%20273.121%20308.39L261.474%20301.678C259.671%20300.633%20259.659%20298.941%20261.474%20297.896L273.019%20291.184C274.025%20290.669%20275.138%20290.4%20276.268%20290.4C277.398%20290.4%20278.512%20290.669%20279.517%20291.184L291.119%20297.896Z'%20fill='white'/%3e%3cg%20opacity='0.29'%3e%3cpath%20d='M266.168%20283.475C267.971%20284.519%20267.982%20286.2%20266.168%20287.245L254.668%20293.968C253.662%20294.483%20252.549%20294.752%20251.419%20294.752C250.289%20294.752%20249.176%20294.483%20248.17%20293.968L236.523%20287.245C234.72%20286.2%20234.708%20284.519%20236.523%20283.475L248.045%20276.82C249.051%20276.304%20250.165%20276.036%20251.294%20276.036C252.424%20276.036%20253.538%20276.304%20254.543%20276.82L266.168%20283.475Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M265.479%20260.52C267.282%20261.565%20267.282%20263.257%20265.479%20264.29L253.934%20271.013C252.926%20271.529%20251.811%20271.797%20250.679%20271.797C249.548%20271.797%20248.432%20271.529%20247.424%20271.013L235.834%20264.324C234.031%20263.291%20234.019%20261.599%20235.834%20260.554L247.379%20253.842C248.385%20253.327%20249.498%20253.058%20250.628%20253.058C251.758%20253.058%20252.871%20253.327%20253.877%20253.842L265.479%20260.52Z'%20fill='%2358AFFB'/%3e%3cpath%20d='M330.119%20297.896C331.922%20298.94%20331.933%20300.633%20330.119%20301.677L318.574%20308.389C317.568%20308.904%20316.454%20309.173%20315.325%20309.173C314.195%20309.173%20313.081%20308.904%20312.075%20308.389L300.451%20301.666C298.648%20300.632%20298.637%20298.94%20300.451%20297.896L311.996%20291.172C313.003%20290.662%20314.116%20290.397%20315.245%20290.397C316.374%20290.397%20317.487%20290.662%20318.494%20291.172L330.119%20297.896Z'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M266.328%20312.022C268.131%20313.067%20268.142%20314.747%20266.328%20315.792L254.783%20322.504C253.777%20323.019%20252.663%20323.288%20251.534%20323.288C250.404%20323.288%20249.29%20323.019%20248.284%20322.504L236.66%20315.792C234.857%20314.747%20234.857%20313.055%20236.66%20312.022L248.205%20305.299C249.212%20304.789%20250.325%20304.523%20251.454%20304.523C252.583%20304.523%20253.696%20304.789%20254.703%20305.299L266.328%20312.022Z'%20fill='%2358AFFB'/%3e%3cpath%20d='M473.363%20111.794C475.177%20112.839%20475.177%20114.52%20473.363%20115.565L461.818%20122.288C460.811%20122.8%20459.698%20123.068%20458.569%20123.068C457.439%20123.068%20456.326%20122.8%20455.319%20122.288L443.718%20115.553C441.926%20114.508%20441.915%20112.828%20443.718%20111.783L455.263%20105.06C456.271%20104.547%20457.386%20104.28%20458.518%20104.28C459.649%20104.28%20460.764%20104.547%20461.772%20105.06L473.363%20111.794Z'%20fill='white'/%3e%3cg%20opacity='0.29'%3e%3cpath%20d='M448.416%2097.3849C450.219%2098.4184%20450.23%20100.111%20448.416%20101.155L436.871%20107.878C435.863%20108.388%20434.751%20108.654%20433.622%20108.654C432.493%20108.654%20431.38%20108.388%20430.373%20107.878L418.748%20101.155C416.945%20100.111%20416.945%2098.4184%20418.748%2097.3849L430.293%2090.6618C431.301%2090.1464%20432.416%2089.8777%20433.548%2089.8777C434.68%2089.8777%20435.795%2090.1464%20436.803%2090.6618L448.416%2097.3849Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M447.727%2074.4206C449.53%2075.4654%20449.542%2077.1462%20447.727%2078.191L436.205%2084.8913C435.199%2085.4067%20434.085%2085.6754%20432.956%2085.6754C431.826%2085.6754%20430.712%2085.4067%20429.706%2084.8913L418.082%2078.1796C416.279%2077.1348%20416.268%2075.454%20418.082%2074.4092L429.627%2067.6861C430.634%2067.1761%20431.747%2066.9104%20432.876%2066.9104C434.005%2066.9104%20435.118%2067.1761%20436.125%2067.6861L447.727%2074.4206Z'%20fill='%2358AFFB'/%3e%3cg%20opacity='0.26'%3e%3cpath%20d='M512.378%20111.797C514.17%20112.842%20514.182%20114.522%20512.378%20115.567L500.833%20122.29C499.825%20122.803%20498.71%20123.07%20497.579%20123.07C496.448%20123.07%20495.332%20122.803%20494.324%20122.29L482.722%20115.556C480.919%20114.511%20480.908%20112.83%20482.722%20111.785L494.267%20105.062C495.273%20104.547%20496.386%20104.278%20497.516%20104.278C498.646%20104.278%20499.76%20104.547%20500.765%20105.062L512.378%20111.797Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M448.598%20125.885C450.413%20126.929%20450.413%20128.622%20448.598%20129.655L437.053%20136.378C436.048%20136.893%20434.934%20137.162%20433.804%20137.162C432.674%20137.162%20431.561%20136.893%20430.555%20136.378L418.931%20129.655C417.139%20128.622%20417.128%20126.929%20418.931%20125.885L430.453%20119.173C431.459%20118.658%20432.572%20118.389%20433.702%20118.389C434.832%20118.389%20435.946%20118.658%20436.951%20119.173L448.598%20125.885Z'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M659.707%20269.092C661.511%20270.137%20661.522%20271.817%20659.707%20272.862L648.196%20279.574C647.189%20280.089%20646.073%20280.358%20644.942%20280.358C643.81%20280.358%20642.695%20280.089%20641.687%20279.574L630.051%20272.862C628.248%20271.817%20628.237%20270.125%20630.051%20269.092L641.596%20262.369C642.602%20261.853%20643.715%20261.585%20644.845%20261.585C645.975%20261.585%20647.089%20261.853%20648.094%20262.369L659.707%20269.092Z'%20fill='white'/%3e%3cg%20opacity='0.29'%3e%3cpath%20d='M634.761%20254.66C636.564%20255.705%20636.576%20257.397%20634.761%20258.442L623.25%20265.154C622.244%20265.669%20621.131%20265.938%20620.001%20265.938C618.871%20265.938%20617.758%20265.669%20616.752%20265.154L605.105%20258.442C603.302%20257.397%20603.29%20255.705%20605.105%20254.66L616.65%20247.949C617.655%20247.433%20618.769%20247.165%20619.899%20247.165C621.029%20247.165%20622.142%20247.433%20623.148%20247.949L634.761%20254.66Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M634.071%20231.709C635.874%20232.754%20635.874%20234.446%20634.071%20235.48L622.526%20242.203C621.518%20242.718%20620.403%20242.987%20619.271%20242.987C618.139%20242.987%20617.024%20242.718%20616.016%20242.203L604.426%20235.48C602.623%20234.446%20602.611%20232.754%20604.426%20231.709L615.971%20224.997C616.977%20224.482%20618.09%20224.213%20619.22%20224.213C620.35%20224.213%20621.463%20224.482%20622.469%20224.997L634.071%20231.709Z'%20fill='%2358AFFB'/%3e%3cg%20opacity='0.26'%3e%3cpath%20d='M698.708%20269.094C700.511%20270.127%20700.523%20271.819%20698.708%20272.864L687.163%20279.576C686.157%20280.091%20685.044%20280.36%20683.914%20280.36C682.784%20280.36%20681.671%20280.091%20680.665%20279.576L669.041%20272.853C667.237%20271.819%20667.215%20270.127%20669.041%20269.082L680.586%20262.371C681.591%20261.855%20682.705%20261.587%20683.835%20261.587C684.964%20261.587%20686.078%20261.855%20687.084%20262.371L698.708%20269.094Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M634.916%20283.189C636.72%20284.234%20636.731%20285.914%20634.916%20286.959L623.371%20293.682C622.364%20294.192%20621.251%20294.458%20620.122%20294.458C618.993%20294.458%20617.881%20294.192%20616.873%20293.682L605.249%20286.959C603.446%20285.914%20603.446%20284.222%20605.249%20283.189L616.794%20276.466C617.801%20275.956%20618.914%20275.69%20620.043%20275.69C621.172%20275.69%20622.285%20275.956%20623.292%20276.466L634.916%20283.189Z'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M561.176%2037.9307L561.232%2058.3498L558.919%2059.6899L558.885%2050.1163L550.311%2055.0791L550.334%2064.6527L548.043%2065.9814L547.986%2045.5623L550.277%2044.2336L550.3%2052.7737L558.885%2047.8109L558.862%2039.2708L561.176%2037.9307Z'%20fill='white'/%3e%3cpath%20d='M567.436%2034.321L567.493%2054.7288L565.213%2056.0462L565.145%2035.6384L567.436%2034.321Z'%20fill='white'/%3e%3cpath%20d='M581.673%2040.9289C581.954%2042.5768%20582.418%2044.1881%20583.057%2045.7328L580.686%2047.1069C580.127%2045.7614%20579.728%2044.355%20579.496%2042.9163C578.951%2040.4065%20577.999%2039.8955%20575.923%2040.9971L573.769%2042.2463V51.0931L571.5%2052.4104V32.2752C572.892%2031.1793%20574.362%2030.1885%20575.901%2029.3111C578.35%2027.8916%20579.927%2027.4941%20581.027%2028.0051C581.934%2028.4026%20582.433%2029.5042%20582.433%2031.0714C582.362%2032.4286%20582.024%2033.7584%20581.438%2034.9843C580.852%2036.2102%20580.03%2037.308%20579.019%2038.2147V38.3283C580.426%2038.0671%20581.288%2039.0437%20581.673%2040.9289ZM576.105%2038.8961C577.26%2038.2922%20578.239%2037.3999%20578.948%2036.3056C579.658%2035.2113%20580.073%2033.9521%20580.153%2032.65C580.153%2030.0152%20578.486%2029.8335%20576.059%2031.1963C575.256%2031.6417%20574.496%2032.1626%20573.791%2032.7522V40.2021L576.139%2038.8507'%20fill='white'/%3e%3cpath%20d='M595.179%2018.2722L595.19%2020.4868L587.898%2024.7001L587.92%2031.1506L594.816%2027.1644V29.3449L587.932%2033.3311L587.943%2040.6901L595.632%2036.2497V38.4642L585.664%2044.222L585.596%2023.8142L595.179%2018.2722Z'%20fill='white'/%3e%3cpath%20d='M610.61%2011.7433C612.198%2012.5042%20613.128%2014.3326%20613.128%2017.6374C613.14%2020.9419%20612.266%2024.1891%20610.599%2027.0406C608.677%2030.172%20605.977%2032.7507%20602.762%2034.5246C601.141%2035.4559%20599.768%2036.16%20598.612%2036.6824V16.6039C600.166%2015.4264%20601.79%2014.3455%20603.477%2013.3673C606.709%2011.4594%20609.057%2010.9824%20610.61%2011.7433ZM603.205%2032.1852C605.54%2030.9088%20607.48%2029.0148%20608.814%2026.7098C610.148%2024.4048%20610.824%2021.7773%20610.769%2019.1137C610.769%2014.2758%20608.41%2012.5951%20603.568%2015.3888C602.626%2015.9243%20601.728%2016.5318%20600.88%2017.2058V33.3208C601.663%2032.9985%20602.421%2032.6189%20603.148%2032.1852'%20fill='white'/%3e%3cpath%20d='M58.2918%20176.574V178.152C58.2937%20178.364%2058.3509%20178.572%2058.4576%20178.755C58.5644%20178.938%2058.717%20179.09%2058.9004%20179.195C59.0838%20179.301%2059.2915%20179.357%2059.5031%20179.357C59.7146%20179.357%2059.9226%20179.302%2060.1064%20179.197L67.5573%20174.905C67.7404%20174.799%2067.8924%20174.646%2067.9979%20174.463C68.1034%20174.279%2068.1588%20174.071%2068.1584%20173.86V172.338C68.166%20172.128%2068.1192%20171.92%2068.0225%20171.733C67.9258%20171.547%2067.7825%20171.389%2067.6066%20171.274C67.4307%20171.16%2067.2281%20171.093%2067.0187%20171.081C66.8094%20171.068%2066.6003%20171.11%2066.4119%20171.202L58.961%20175.506C58.7626%20175.606%2058.5954%20175.758%2058.4774%20175.947C58.3594%20176.135%2058.2952%20176.352%2058.2918%20176.574Z'%20fill='%23F2F9FF'/%3e%3cpath%20d='M34.6559%20197.957V199.592C34.6569%20199.803%2034.7128%20200.01%2034.8182%20200.193C34.9235%20200.376%2035.0746%20200.528%2035.2566%20200.635C35.4387%20200.742%2035.6453%20200.799%2035.8561%20200.801C36.067%20200.804%2036.2748%20200.751%2036.459%20200.648L67.5443%20182.762C67.7274%20182.656%2067.8794%20182.503%2067.9849%20182.32C68.0904%20182.136%2068.1458%20181.928%2068.1454%20181.717V180.138C68.1478%20179.926%2068.094%20179.716%2067.9895%20179.531C67.8849%20179.347%2067.7334%20179.193%2067.5503%20179.085C67.3671%20178.978%2067.1589%20178.921%2066.9467%20178.921C66.7345%20178.92%2066.5259%20178.976%2066.3422%20179.082L35.2909%20196.912C35.1015%20197.013%2034.9427%20197.164%2034.831%20197.347C34.7193%20197.531%2034.6588%20197.742%2034.6559%20197.957Z'%20fill='%23F2F9FF'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M47.4966%20206.339V207.917C47.4962%20208.129%2047.5515%20208.336%2047.6568%20208.52C47.7622%20208.703%2047.9139%20208.855%2048.0967%20208.961C48.2795%20209.067%2048.487%20209.123%2048.6982%20209.123C48.9094%20209.123%2049.1169%20209.068%2049.2998%20208.962L67.5472%20198.457C67.7374%20198.359%2067.8958%20198.208%2068.0042%20198.023C68.1126%20197.838%2068.1665%20197.626%2068.1597%20197.412V195.822C68.1601%20195.611%2068.1048%20195.403%2067.9995%20195.22C67.8941%20195.036%2067.7424%20194.884%2067.5596%20194.778C67.3768%20194.672%2067.1693%20194.616%2066.9581%20194.616C66.7469%20194.616%2066.5394%20194.672%2066.3565%20194.778L48.0977%20205.271C47.9112%20205.379%2047.7571%20205.535%2047.6513%20205.722C47.5456%20205.91%2047.4922%20206.123%2047.4966%20206.339Z'%20fill='%23F2F9FF'/%3e%3c/g%3e%3cpath%20d='M39.5103%20203.054V204.633C39.5113%20204.844%2039.5672%20205.051%2039.6726%20205.234C39.7779%20205.417%2039.929%20205.569%2040.1111%20205.676C40.2931%20205.782%2040.4997%20205.84%2040.7105%20205.842C40.9214%20205.844%2041.1292%20205.791%2041.3135%20205.689L67.5448%20190.63C67.7288%20190.522%2067.8812%20190.368%2067.9867%20190.183C68.0923%20189.997%2068.1471%20189.787%2068.1459%20189.574V187.995C68.1449%20187.784%2068.089%20187.577%2067.9836%20187.394C67.8783%20187.211%2067.7271%20187.059%2067.5451%20186.952C67.3631%20186.846%2067.1565%20186.788%2066.9456%20186.786C66.7348%20186.784%2066.527%20186.836%2066.3427%20186.939L40.1113%20202.009C39.9282%20202.115%2039.7763%20202.267%2039.6707%20202.451C39.5652%20202.634%2039.5099%20202.842%2039.5103%20203.054Z'%20fill='%23F2F9FF'/%3e%3cpath%20d='M8.80978%20208.234V229.448L24.8004%20239.851'%20stroke='white'%20stroke-width='0.53'%20stroke-miterlimit='10'/%3e%3cpath%20d='M8.71457%20208.631C9.76055%20208.631%2010.6085%20207.782%2010.6085%20206.735C10.6085%20205.687%209.76055%20204.838%208.71457%20204.838C7.66858%20204.838%206.82065%20205.687%206.82065%20206.735C6.82065%20207.782%207.66858%20208.631%208.71457%20208.631Z'%20stroke='white'%20stroke-width='1.06'%20stroke-miterlimit='10'/%3e%3cpath%20d='M386.505%20197.436V218.638L402.484%20229.052'%20stroke='white'%20stroke-width='0.53'%20stroke-miterlimit='10'/%3e%3cpath%20d='M386.406%20197.821C387.452%20197.821%20388.3%20196.972%20388.3%20195.925C388.3%20194.877%20387.452%20194.028%20386.406%20194.028C385.36%20194.028%20384.512%20194.877%20384.512%20195.925C384.512%20196.972%20385.36%20197.821%20386.406%20197.821Z'%20stroke='white'%20stroke-width='1.06'%20stroke-miterlimit='10'/%3e%3cpath%20opacity='0.35'%20d='M249.201%20154.586C259.943%20154.586%20268.651%20149.044%20268.651%20142.208C268.651%20135.371%20259.943%20129.829%20249.201%20129.829C238.46%20129.829%20229.752%20135.371%20229.752%20142.208C229.752%20149.044%20238.46%20154.586%20249.201%20154.586Z'%20fill='%23A6D0F4'/%3e%3cpath%20opacity='0.35'%20d='M258.559%20155.143C258.559%20158.959%20263.424%20162.048%20269.412%20162.048C275.4%20162.048%20280.265%20158.959%20280.265%20155.143C280.265%20151.327%20275.411%20148.238%20269.412%20148.238C263.413%20148.238%20258.559%20151.327%20258.559%20155.143Z'%20fill='%23A6D0F4'/%3e%3cpath%20opacity='0.35'%20d='M302.642%20131.248C302.642%20135.064%20307.507%20138.153%20313.495%20138.153C319.483%20138.153%20324.348%20135.064%20324.348%20131.248C324.348%20127.432%20319.494%20124.332%20313.495%20124.332C307.496%20124.332%20302.642%20127.432%20302.642%20131.248Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M260.79%20140.663C260.564%20143.218%20258.171%20144.944%20256.005%20145.875C253.633%20146.854%20251.084%20147.329%20248.52%20147.272C245.889%20147.278%20243.29%20146.7%20240.91%20145.58C238.857%20144.569%20236.691%20142.741%20236.691%20140.242C236.594%20141.088%20236.671%20141.944%20236.916%20142.758C237.162%20143.573%20237.572%20144.328%20238.12%20144.978C239.93%20146.723%20242.229%20147.872%20244.709%20148.272C249.359%20149.225%20255.676%20148.771%20259.203%20145.183C259.806%20144.534%20260.263%20143.764%20260.543%20142.923C260.823%20142.083%20260.919%20141.192%20260.824%20140.311L260.79%20140.663Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M257.252%20135.994C261.981%20138.731%20262.015%20143.16%20257.32%20145.897C254.682%20147.231%20251.769%20147.926%20248.814%20147.926C245.859%20147.926%20242.946%20147.231%20240.308%20145.897C235.579%20143.16%20235.557%20138.731%20240.308%20135.994C242.936%20134.667%20245.837%20133.976%20248.78%20133.976C251.723%20133.976%20254.624%20134.667%20257.252%20135.994Z'%20fill='white'/%3e%3cpath%20d='M250.044%20132.339L250.021%20142.401L248.762%20143.139L248.774%20133.077L250.044%20132.339Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M248.775%20133.077L248.764%20143.139L247.493%20142.401L247.505%20132.339L248.775%20133.077Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M250.634%20130.51L248.786%20131.577L246.926%20130.51L248.774%20129.431L250.634%20130.51Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M236.786%2096.247C236.786%2096.247%20232.987%2098.5183%20231.978%20100.79C230.968%20103.061%20231.24%20118.96%20236.514%20126.069C241.787%20133.179%20251.631%20134.144%20253.911%20133.133C256.19%20132.122%20269.278%20125.558%20270.287%20122.276C271.296%20118.994%20266.261%20116.473%20263.483%20115.212C260.704%20113.952%20258.946%20112.18%20257.438%20107.638C255.93%20103.095%20255.17%2095.2703%20253.401%2094.0097C251.631%2092.7491%20247.379%2090.7163%20236.786%2096.247Z'%20fill='%2325437F'/%3e%3cpath%20d='M255.614%20130.875C257.462%20130.057%20266.512%20125.537%20270.357%20122.119C271.162%20118.916%20266.252%20116.44%20263.552%20115.203C260.853%20113.965%20259.016%20112.17%20257.508%20107.628C255.999%20103.085%20255.24%2095.2604%20253.47%2093.9998C251.701%2092.7392%20247.426%2090.7177%20236.833%2096.2711C235.702%2096.9583%20234.642%2097.7572%20233.669%2098.656C232.717%20101.302%20233.057%20116.827%20238.262%20123.811C243.468%20130.795%20253.346%20131.885%20255.614%20130.875Z'%20fill='%23254DA1'/%3e%3cpath%20d='M245.804%2084.3226C245.594%2085.0765%20245.562%2085.8687%20245.71%2086.6372C245.857%2087.4056%20246.181%2088.1294%20246.654%2088.7517C248.129%2090.512%20247.845%2091.023%20247.562%2091.6363C247.278%2092.2495%20245.532%2094.2369%20245.736%2096.9739C245.94%2099.7108%20253.595%2098.4502%20254.298%2096.5537C255.001%2094.6571%20252.2%2091.5%20252.03%2089.1038C251.86%2086.7075%20253.504%2083.6185%20251.474%2082.8463C249.444%2082.074%20246.791%2081.4835%20245.804%2084.3226Z'%20fill='%23BB543E'/%3e%3cpath%20d='M267.259%20149.509C267.259%20149.509%20266.556%20151.428%20266.987%20151.996C267.317%20152.802%20267.505%20153.659%20267.542%20154.529L268.245%20154.949L268.529%20153.541C268.678%20154.157%20268.965%20154.732%20269.368%20155.221C270.774%20156.172%20272.348%20156.842%20274.007%20157.197C275.821%20157.618%20276.388%20157.481%20276.524%20156.777C276.66%20156.073%20274.562%20153.541%20273.303%20152.7C272.045%20151.86%20267.259%20149.509%20267.259%20149.509Z'%20fill='%23254DA1'/%3e%3cpath%20d='M271.375%20149.326C271.766%20150.155%20272.221%20150.952%20272.736%20151.711C273.303%20152.415%20274.845%20153.675%20274.698%20154.38C274.55%20155.084%20273.155%20154.947%20271.477%20154.38C269.798%20153.812%20269.367%20152.279%20268.528%20151.847C268.063%20151.686%20267.675%20151.357%20267.441%20150.924C267.206%20150.491%20267.14%20149.986%20267.258%20149.508C267.405%20148.054%20271.375%20149.326%20271.375%20149.326Z'%20fill='%23FF9554'/%3e%3cpath%20d='M263.743%20126.295C263.373%20125.609%20263.284%20124.805%20263.496%20124.054C263.708%20123.304%20264.203%20122.665%20264.877%20122.275C267.327%20120.901%20269.119%20123.036%20269.55%20124.035C270.549%20126.061%20271.157%20128.257%20271.342%20130.508C271.342%20133.166%20271.557%20149.701%20271.557%20149.701C271.268%20149.956%20270.93%20150.149%20270.563%20150.269C270.197%20150.389%20269.81%20150.434%20269.427%20150.4C269.043%20150.366%20268.67%20150.254%20268.33%20150.071C267.991%20149.889%20267.692%20149.639%20267.452%20149.337C267.452%20149.337%20265.047%20129.486%20264.991%20128.532C264.768%20127.694%20264.339%20126.925%20263.743%20126.295Z'%20fill='%23FF9554'/%3e%3cpath%20d='M263.141%20151.574C263.141%20151.574%20262.438%20153.493%20262.857%20154.05C263.195%20154.854%20263.387%20155.711%20263.424%20156.582L264.127%20157.003L264.411%20155.594C264.559%20156.215%20264.846%20156.793%20265.25%20157.287C266.651%20158.235%20268.223%20158.902%20269.877%20159.251C271.703%20159.671%20272.27%20159.535%20272.406%20158.831C272.542%20158.127%20270.444%20155.594%20269.174%20154.754C267.904%20153.914%20263.141%20151.574%20263.141%20151.574Z'%20fill='%23254DA1'/%3e%3cpath%20d='M256.94%20131.145C256.94%20131.145%20255.25%20128.703%20257.496%20127.011C259.741%20125.319%20261.805%20127.204%20262.361%20128.147C263.62%20130.024%20264.509%20132.125%20264.981%20134.336C265.355%20136.959%20267.249%20151.371%20267.249%20151.371C266.997%20151.662%20266.688%20151.9%20266.341%20152.068C265.994%20152.236%20265.617%20152.332%20265.232%20152.351C264.847%20152.369%20264.462%20152.308%20264.102%20152.173C263.741%20152.038%20263.411%20151.831%20263.132%20151.564C263.132%20151.564%20258.596%20134.132%20258.46%20133.189C258.13%20132.393%20257.608%20131.69%20256.94%20131.145Z'%20fill='%23FF9554'/%3e%3cpath%20d='M267.256%20151.383C267.642%20152.219%20268.097%20153.02%20268.617%20153.779C269.173%20154.472%20270.727%20155.744%20270.579%20156.448C270.432%20157.152%20269.037%20157.005%20267.358%20156.448C265.68%20155.892%20265.249%20154.336%20264.41%20153.916C263.945%20153.754%20263.557%20153.425%20263.322%20152.992C263.087%20152.56%20263.022%20152.055%20263.14%20151.576C263.287%20150.123%20267.256%20151.383%20267.256%20151.383Z'%20fill='%23FF9554'/%3e%3cpath%20d='M267.077%20120.46C266.397%20119.813%20258.47%20113.055%20258.47%20113.055L245.36%20115.111C245.36%20115.111%20245.553%20121.119%20248.762%20125.048C250.535%20127.298%20252.616%20129.286%20254.943%20130.953C255.65%20131.527%20256.487%20131.917%20257.381%20132.089C257.822%20131.055%20258.63%20130.221%20259.649%20129.75C261.611%20128.614%20268.212%20124.071%20269.051%20124.264C269.89%20124.457%20270.037%20124.821%20270.037%20124.821C269.41%20123.153%20268.395%20121.658%20267.077%20120.46Z'%20fill='%2362759A'/%3e%3cpath%20d='M257.026%2092.5215C257.026%2092.5215%20258.942%2092.6237%20260.054%2095.2471C261.165%2097.8704%20262.583%20104.548%20262.98%20105.161C263.377%20105.775%20262.889%20107.58%20260.462%20108.091C259.046%20106.268%20257.825%20104.3%20256.822%20102.22C255.313%2098.9947%20254.667%2093.9751%20257.026%2092.5215Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M249.241%2091.1594C249.241%2091.1594%20243.979%2094.9298%20243.458%2096.179C242.831%2098.5159%20242.991%20100.994%20243.911%20103.231C245.045%20105.503%20244.603%20114.088%20244.989%20115.724C245.374%20117.359%20249.876%20117.927%20252.666%20117.393C255.456%20116.859%20258.813%20114.827%20258.711%20111.579C258.609%20108.331%20258.144%20106.536%20259.845%2098.8592C260.163%2097.4169%20258.813%2095.668%20258.133%2093.1809C257.985%2092.6698%20256.239%2092.1247%20256.239%2092.1247C256.239%2092.1247%20254.413%2090.9436%20249.241%2091.1594Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M247.341%2094.2955C247.341%2094.2955%20242.805%2093.3869%20240.865%20100.383C239.663%20105.198%20238.518%20109.298%20239.187%20110.183C239.856%20111.069%20241.829%20111.875%20243.088%20110.853C244.347%20109.831%20248.101%2098.2589%20248.01%2097.1119C247.919%2095.9649%20248.305%2095.1131%20247.341%2094.2955Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M259.453%20100.109C259.453%20100.109%20257.537%20104.754%20248.351%20102.937C246.536%20102.835%20244.812%20106.98%20245.924%20109.206C247.119%20111.81%20247.866%20114.597%20248.135%20117.451C249.637%20117.696%20251.169%20117.696%20252.672%20117.451C255.45%20116.906%20258.818%20114.884%20258.716%20111.636C258.363%20107.83%20258.65%20103.991%20259.567%20100.279L259.453%20100.109Z'%20fill='%23A9C9E6'/%3e%3cpath%20d='M249.114%2090.9548C248.966%2091.0754%20248.852%2091.2312%20248.781%2091.4078C248.709%2091.5845%20248.683%2091.7762%20248.705%2091.9655C249.335%2093.4506%20250.325%2094.7545%20251.586%2095.7586C252.391%2096.1561%20253.242%2093.7825%20253.242%2093.7825C253.242%2093.7825%20254.966%2094.498%20255.567%2093.987C256.168%2093.4759%20254.512%2091.5567%20254.058%2091.2046C252.449%2090.7577%20250.76%2090.6724%20249.114%2090.9548Z'%20fill='white'/%3e%3cpath%20d='M253.811%2090.4542C253.797%2090.5101%20253.797%2090.5687%20253.811%2090.6246C253.868%2091.0107%20254.061%2091.9987%20254.095%2092.4076C254.129%2092.8164%20253.675%2093.4865%20252.62%2093.4637C251.566%2093.441%20249.74%2092.9981%20249.139%2091.7262C249.165%2090.4746%20249.109%2089.2225%20248.969%2087.9785L253.811%2090.4542Z'%20fill='%23FF8654'/%3e%3cpath%20d='M255.328%2084.0166C254.829%2081.3592%20252.731%2079.8488%20250.349%2080.4052C249.573%2080.5081%20248.832%2080.7905%20248.185%2081.2301C247.537%2081.6697%20247.001%2082.2544%20246.618%2082.9378C245.484%2085.2091%20247.162%2087.117%20248.24%2088.3208C248.693%2088.8091%20249.033%2089.1952%20249.249%2089.4564L249.487%2089.729C250.104%2090.3499%20250.863%2090.81%20251.699%2091.0691C252.194%2091.2405%20252.726%2091.2773%20253.24%2091.1755C253.754%2091.0737%20254.232%2090.8371%20254.624%2090.4899C255.305%2089.7858%20255.804%2086.6854%20255.328%2084.0166Z'%20fill='%23FF9554'/%3e%3cpath%20d='M248.186%2087.036C248.186%2087.036%20247.403%2085.9685%20246.825%2086.2524C246.246%2086.5363%20247.607%2088.8985%20248.481%2088.853C249.354%2088.8076%20248.186%2087.036%20248.186%2087.036Z'%20fill='%23FF9554'/%3e%3cpath%20d='M257.244%20114.688L266.657%20123.683L259.353%20127.76L249.952%20118.765L257.244%20114.688Z'%20fill='white'/%3e%3cpath%20d='M258.933%20116.767C258.6%20117.311%20258.312%20117.881%20258.071%20118.471C257.912%20118.993%20257.425%20119.981%20257.629%20120.254C257.833%20120.526%20258.525%20120.083%20258.661%20119.765C258.759%20119.577%20258.908%20119.419%20259.092%20119.311L259.183%20120.254C259.183%20120.833%20259.455%20122.071%20259.92%20122.298C260.385%20122.525%20261.054%20121.628%20261.383%20121.094C261.678%20120.306%20261.725%20119.446%20261.519%20118.63C261.337%20118.266%20260.85%20117.437%20260.85%20117.437L258.933%20116.767Z'%20fill='%23FF9554'/%3e%3cpath%20d='M259.208%20105.559C259.255%20105.191%20259.413%20104.845%20259.661%20104.569C259.908%20104.292%20260.234%20104.098%20260.595%20104.012C260.956%20103.925%20261.335%20103.951%20261.68%20104.086C262.026%20104.22%20262.323%20104.457%20262.531%20104.764C262.966%20105.401%20263.277%20106.114%20263.45%20106.865C263.949%20109.137%20261.646%20117.086%20261.42%20117.79C261.193%20118.495%20259.809%20118.824%20258.732%20117.927C257.654%20117.03%20259.174%20108.047%20259.174%20106.945C259.159%20106.483%20259.17%20106.02%20259.208%20105.559Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M252.571%20117.199C253.201%20117.287%20253.823%20117.424%20254.431%20117.608C254.93%20117.812%20256.008%20118.062%20256.087%20118.392C256.166%20118.721%20255.384%20118.982%20255.055%20118.891C254.851%20118.833%20254.635%20118.833%20254.431%20118.891L255.1%20119.55C255.509%20119.97%20256.336%20120.924%20256.234%20121.413C256.132%20121.901%20254.998%20121.867%20254.374%20121.787C253.582%20121.52%20252.89%20121.016%20252.39%20120.345C252.22%20119.97%20251.891%20119.05%20251.891%20119.05L252.571%20117.199Z'%20fill='%23FF9554'/%3e%3cpath%20d='M241.843%20108.207C241.53%20108.011%20241.165%20107.915%20240.796%20107.93C240.427%20107.945%20240.071%20108.071%20239.775%20108.292C239.479%20108.512%20239.256%20108.817%20239.135%20109.167C239.015%20109.516%20239.002%20109.894%20239.099%20110.251C239.306%20110.995%20239.652%20111.692%20240.12%20112.306C241.526%20114.135%20250.927%20119.336%20251.63%20119.609C252.334%20119.881%20253.456%20119.052%20253.456%20117.644C253.456%20116.236%20243.771%20109.774%20242.932%20109.07C242.585%20108.763%20242.221%20108.475%20241.843%20108.207Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M252.752%2082.6185C252.752%2082.6185%20252.049%2082.3345%20251.698%2083.3226C251.346%2084.3106%20251.142%2085.5939%20249.872%2086.1276C248.602%2086.6614%20248.261%2086.8999%20247.354%2086.8318C246.869%2086.7941%20246.416%2086.572%20246.089%2086.2109C245.763%2085.8498%20245.586%2085.3771%20245.596%2084.8898C245.655%2083.7529%20246.063%2082.6621%20246.766%2081.7673C247.468%2080.8725%20248.431%2080.2176%20249.52%2079.8929C250.153%2079.6834%20250.823%2079.6063%20251.487%2079.6662C252.151%2079.726%20252.796%2079.9217%20253.382%2080.241C253.967%2080.5603%20254.481%2080.9965%20254.892%2081.5226C255.303%2082.0487%20255.601%2082.6536%20255.769%2083.2999C256.189%2085.0488%20255.497%2085.1964%20255.497%2085.1964C255.497%2085.1964%20255.417%2082.2891%20252.752%2082.6185Z'%20fill='%23BB543E'/%3e%3cpath%20opacity='0.35'%20d='M292.625%20129.105C303.367%20129.105%20312.075%20123.563%20312.075%20116.726C312.075%20109.89%20303.367%20104.347%20292.625%20104.347C281.884%20104.347%20273.176%20109.89%20273.176%20116.726C273.176%20123.563%20281.884%20129.105%20292.625%20129.105Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M304.215%20115.181C303.988%20117.725%20301.595%20119.451%20299.441%20120.382C297.068%20121.37%20294.513%20121.846%20291.944%20121.779C289.314%20121.784%20286.716%20121.206%20284.335%20120.087C282.293%20119.076%20280.116%20117.248%20280.116%20114.761C280.02%20115.604%20280.097%20116.458%20280.343%20117.271C280.588%20118.083%20280.998%20118.837%20281.545%20119.485C283.355%20121.23%20285.654%20122.379%20288.134%20122.778C292.784%20123.744%20299.1%20123.278%20302.627%20119.701C303.23%20119.052%20303.686%20118.281%20303.966%20117.441C304.245%20116.601%20304.342%20115.71%20304.249%20114.829C304.238%20114.942%20304.238%20115.056%20304.215%20115.181Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M300.688%20110.535C305.406%20113.272%20305.44%20117.701%20300.745%20120.438C298.102%20121.787%20295.177%20122.49%20292.211%20122.49C289.244%20122.49%20286.32%20121.787%20283.677%20120.438C278.947%20117.701%20278.936%20113.271%20283.677%20110.546C286.312%20109.205%20289.225%20108.506%20292.181%20108.504C295.137%20108.502%20298.051%20109.197%20300.688%20110.535Z'%20fill='white'/%3e%3cpath%20d='M293.463%20106.859L293.44%20116.909L292.181%20117.648L292.204%20107.586L293.463%20106.859Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M292.205%20107.586L292.183%20117.648L290.912%20116.909L290.935%20106.859L292.205%20107.586Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M294.053%20105.018L292.205%20106.097L290.345%20105.018L292.193%20103.951L294.053%20105.018Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M280.209%2070.7737C280.209%2070.7737%20276.41%2073.045%20275.401%2075.3163C274.392%2077.5876%20274.664%2093.4869%20279.937%20100.596C285.211%20107.705%20295.066%20108.671%20297.334%20107.66C299.602%20106.649%20312.712%20100.096%20313.722%2096.8143C314.731%2093.5323%20309.684%2090.9998%20306.917%2089.7392C304.15%2088.4786%20302.381%2086.7183%20300.872%2082.1643C299.364%2077.6103%20298.604%2069.797%20296.835%2068.5364C295.066%2067.2758%20290.802%2065.2203%20280.209%2070.7737Z'%20fill='%2325437F'/%3e%3cpath%20d='M299.036%20105.333C300.885%20104.515%20309.946%2099.9953%20313.78%2096.5769C314.596%2093.3744%20309.674%2090.8987%20306.975%2089.6608C304.276%2088.4229%20302.439%2086.6399%20300.93%2082.0859C299.422%2077.532%20298.662%2069.7186%20296.893%2068.458C295.124%2067.1975%20290.848%2065.176%20280.256%2070.7294C279.124%2071.4166%20278.064%2072.2155%20277.092%2073.1142C276.139%2075.7603%20276.479%2091.2848%20281.696%2098.2691C286.913%20105.253%20296.768%20106.389%20299.036%20105.333Z'%20fill='%23254DA1'/%3e%3cpath%20d='M303.153%2071.151C303.153%2071.151%20304.287%2071.5371%20305.115%2074.3422C305.943%2077.1473%20308.347%2082.2237%20307.508%2084.4723C306.669%2086.7209%20304.106%2085.4489%20303.437%2083.7682C302.768%2082.0874%20299.932%2074.2627%20300.488%2073.1157C301.044%2071.9687%20302.03%2070.7649%20303.153%2071.151Z'%20fill='%23113569'/%3e%3cpath%20d='M310.014%20128.657C310.183%20129.275%20310.419%20129.873%20310.717%20130.44C311.586%20131.532%20312.606%20132.496%20313.745%20133.302C314.505%20133.949%20315.435%20135.153%20315.344%20135.721C315.253%20136.288%20313.428%20136.425%20311.999%20136.118C310.57%20135.811%20309.311%20134.21%20308.891%20134.244C308.472%20134.278%20306.907%20133.972%20306.623%20133.427C306.339%20132.881%20306.838%20130.735%20306.838%20130.735V129.179L310.014%20128.657Z'%20fill='%23232839'/%3e%3cpath%20d='M317.044%20124.16C317.213%20124.775%20317.449%20125.369%20317.748%20125.932C318.613%20127.031%20319.633%20127.998%20320.776%20128.805C321.535%20129.452%20322.465%20130.645%20322.375%20131.224C322.284%20131.803%20320.458%20131.928%20319.029%20131.621C317.6%20131.315%20316.341%20129.714%20315.922%20129.748C315.502%20129.782%20313.937%20129.475%20313.654%20128.93C313.37%20128.385%20313.869%20126.238%20313.869%20126.238V124.683L317.044%20124.16Z'%20fill='%23232839'/%3e%3cpath%20d='M290.43%2093.2273C290.37%2095.1503%20290.892%2097.0465%20291.927%2098.6671C293.606%20101.109%20300.535%20107.287%20301.283%20107.855C302.032%20108.422%20302.225%20112.534%20302.973%20114.407C303.722%20116.281%20305.967%20128.467%20306.375%20129.409C306.375%20129.409%20306.75%20130.341%20309.369%20129.784C310.866%20129.591%20311.048%20129.035%20311.048%20129.035C311.048%20129.035%20310.118%20115.35%20309.369%20112.159C308.621%20108.968%20308.428%20105.413%20307.101%20104.107C305.774%20102.801%20299.423%2094.5447%20299.423%2094.5447L297.927%2092.103L290.43%2093.2273Z'%20fill='%23113C7A'/%3e%3cpath%20d='M302.03%2090.2268C302.03%2090.2268%20312.135%2095.9051%20313.541%2097.1203C314.897%2098.3056%20315.832%2099.8997%20316.206%20101.663C316.32%20102.276%20317.34%20124.013%20317.76%20125.001C317.896%20125.841%20315.231%20126.409%20313.961%20125.989C313.466%20125.646%20313.039%20125.215%20312.702%20124.717C312.702%20124.717%20310.173%20111.645%20310.173%20109.817C309.937%20107.359%20309.558%20104.917%20309.039%20102.503L297.392%2095.8938L296.541%2092.941L302.03%2090.2268Z'%20fill='%23113C7A'/%3e%3cpath%20d='M290.807%2095.1093C290.807%2095.1093%20291.782%2097.9144%20295.853%2097.4942L297.26%2097.2103L297.543%2094.939C298.96%2094.7497%20300.31%2094.2198%20301.479%2093.3945C302.034%2093.6784%20302.182%2095.0866%20302.737%2095.2229C303.293%2095.3592%20304.28%2093.3945%20303.996%2091.9863C303.713%2090.5781%20303.021%2091.1459%20303.021%2091.1459C303.021%2091.1459%20291.51%2094.0305%20290.807%2095.1093Z'%20fill='%23112C5C'/%3e%3cpath%20d='M295.1%2069.6954C295.1%2069.6954%20290.292%2073.1024%20289.815%2074.2381C289.244%2076.376%20289.391%2078.643%20290.235%2080.6886C291.222%2082.801%20290.859%2090.6143%20291.222%2092.1361C291.584%2093.6579%20295.69%2094.1462%20298.23%2093.6579C300.771%2093.1695%20303.901%2091.3184%20303.753%2088.343C303.606%2085.3675%20303.753%2079.8369%20303.889%2078.4968C304.024%2076.1613%20303.81%2073.8188%20303.254%2071.5466C303.118%2071.0696%20301.519%2070.5699%20301.519%2070.5699C301.519%2070.5699%20299.829%2069.491%20295.1%2069.6954Z'%20fill='white'/%3e%3cpath%20d='M299.272%2069.0491C299.265%2069.0981%20299.265%2069.1478%20299.272%2069.1968C299.329%2069.5488%20299.51%2070.4573%20299.533%2070.8321C299.556%2071.2069%20299.159%2071.8201%20298.183%2071.7974C297.564%2071.8184%20296.949%2071.684%20296.394%2071.4063C295.839%2071.1286%20295.363%2070.7165%20295.008%2070.2075C295.027%2069.0696%20294.974%2067.9317%20294.849%2066.8005L299.272%2069.0491Z'%20fill='%23E16B40'/%3e%3cpath%20d='M294.976%2069.4673C295.233%2070.1558%20295.7%2070.7458%20296.31%2071.1536C296.921%2071.5613%20297.645%2071.766%20298.378%2071.7386H298.56L297.233%2073.8736C296.292%2073.3206%20295.403%2072.6819%20294.579%2071.9657C294.19%2071.4984%20293.984%2070.9048%20294.001%2070.2963L294.976%2069.4673Z'%20fill='white'/%3e%3cpath%20d='M298.55%2071.7878L299.933%2073.1165C300.275%2072.7255%20300.494%2072.2428%20300.565%2071.7281C300.635%2071.2134%20300.554%2070.6893%20300.33%2070.2206L299.468%2069.8799C299.481%2070.2487%20299.405%2070.6152%20299.245%2070.9476C299.084%2071.2801%20298.846%2071.5684%20298.55%2071.7878Z'%20fill='white'/%3e%3cpath%20d='M301.33%2062.379C300.809%2059.6421%20298.642%2058.0862%20296.193%2058.6541C295.393%2058.7607%20294.63%2059.0523%20293.963%2059.5057C293.295%2059.959%20292.743%2060.5617%20292.348%2061.2661C291.214%2063.6055%20292.904%2065.5702%20294.015%2066.8195C294.48%2067.3191%20294.832%2067.7166%20295.059%2067.9551C295.136%2068.0513%20295.219%2068.1424%20295.308%2068.2277C295.945%2068.8588%20296.723%2069.3297%20297.576%2069.6018C298.089%2069.777%20298.638%2069.8147%20299.169%2069.7111C299.7%2069.6075%20300.195%2069.3662%20300.604%2069.0113C301.308%2068.3299%20301.841%2065.1273%20301.33%2062.379Z'%20fill='%23FF8654'/%3e%3cpath%20d='M293.988%2070.3425C293.988%2070.3425%20293.274%2071.0353%20294.215%2072.7615C295.501%2075.2189%20296.211%2077.9377%20296.291%2080.7111C296.381%2083.9932%20296.812%2094.339%20296.381%2096.5535C295.519%2097.3258%20291.369%2096.633%20290.155%2094.5548C289.634%2091.5339%20289.894%2082.3464%20289.293%2080.4499C288.788%2078.3751%20288.757%2076.2128%20289.203%2074.1243C290.498%2072.5233%20292.132%2071.2314%20293.988%2070.3425Z'%20fill='%23113C7A'/%3e%3cpath%20d='M300.676%2070.2751C301.189%2072.3546%20301.421%2074.4935%20301.368%2076.6348C301.368%2080.0418%20302.343%2094.1807%20302.502%2094.4647C302.661%2094.7486%20304.702%2092.9656%20304.77%2090.8873C304.838%2088.8091%20304.078%2076.0557%20303.965%2074.7837C303.894%2073.5356%20303.618%2072.3077%20303.148%2071.1496C302.356%2070.7742%20301.528%2070.4812%20300.676%2070.2751Z'%20fill='%23113C7A'/%3e%3cpath%20d='M299.67%2072.4777L299.046%2073.795L297.742%2072.7616L298.547%2071.7849L299.67%2072.4777Z'%20fill='%23113C7A'/%3e%3cpath%20d='M299.333%2072.9654C299.333%2072.9654%20300.569%2088.7851%20300.569%2089.4778L299.741%2090.9315L298.607%2089.7958L298.199%2072.8745L299.333%2072.9654Z'%20fill='%23113C7A'/%3e%3cpath%20d='M289.442%2073.5905C288.618%2074.4566%20288.039%2075.5266%20287.764%2076.6908C287.015%2079.0303%20286.539%2087.1843%20286.539%2088.3995C286.539%2089.6146%20286.539%2091.0228%20287.571%2091.6815C287.794%2091.8623%20288.054%2091.9901%20288.333%2092.0553C288.613%2092.1206%20288.903%2092.1215%20289.182%2092.0581C289.462%2091.9947%20289.723%2091.8685%20289.947%2091.6892C290.171%2091.5099%20290.351%2091.282%20290.474%2091.0228C291.132%2089.8077%20291.608%2082.8688%20292.062%2080.7224C292.516%2078.576%20293.287%2076.4069%20292.345%2075.0441C292.079%2074.5241%20291.654%2074.1028%20291.131%2073.8414C290.609%2073.58%20290.018%2073.4921%20289.442%2073.5905Z'%20fill='%23113C7A'/%3e%3cpath%20d='M292.814%2059.0649C293.137%2058.5521%20293.577%2058.1231%20294.097%2057.8132C294.617%2057.5033%20295.204%2057.3212%20295.808%2057.282C297.963%2057.1002%20298.53%2057.8498%20299.46%2057.9406C300.39%2058.0315%20301.24%2057.5659%20301.898%2058.5993C302.556%2059.6328%20301.15%2061.5975%20301.15%2061.5975C301.15%2061.5975%20300.401%2061.4157%20299.653%2063.2896C298.904%2065.1634%20296.182%2064.6864%20295.626%2064.5047L295.162%2065.436V66.2877L294.504%2066.1855C294.504%2066.1855%20294.787%2065.1634%20294.13%2064.7887C293.472%2064.4139%20293.29%2065.1634%20293.381%2065.7199C293.705%2066.6813%20294.371%2067.4898%20295.252%2067.9912L294.969%2068.559L294.787%2068.9338C294.254%2068.5023%20293.754%2068.0316%20293.29%2067.5256C292.814%2066.9691%20292.156%2067.4347%20291.226%2065.3678C290.296%2063.3009%20290.569%2061.711%20291.408%2060.8252L292.258%2059.8826L292.814%2059.0649Z'%20fill='%2396432A'/%3e%3cpath%20d='M302.164%2090.5122L311.577%2099.5066L304.274%20103.584L294.872%2094.5892L302.164%2090.5122Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M300.032%2097.3015C300.032%2097.3015%20300.497%2097.6309%20300.735%2097.7785L302.277%2098.7552C302.687%2099.1897%20303.034%2099.6789%20303.309%20100.209C303.571%20100.636%20303.73%20101.118%20303.774%20101.617C303.684%20101.856%20303.4%20101.708%20303.4%20101.708C303.124%20102.018%20302.737%20102.206%20302.323%20102.23C301.767%20102.174%20301.291%20101.481%20301.291%20101.481L300.497%20100.777C300.174%20100.417%20299.92%20100.002%20299.748%2099.5501L299.193%2099.1754C299.193%2099.1754%20298.796%2098.7552%20300.032%2097.3015Z'%20fill='%23FF8654'/%3e%3cpath%20d='M298.31%2098.8821C298.31%2098.8821%20298.899%2097.2127%20299.603%2096.7925L300.396%2097.349C299.896%2097.9305%20299.542%2098.6237%20299.364%2099.3704L298.31%2098.8821Z'%20fill='white'/%3e%3cpath%20d='M298.311%2098.8837C297.811%2098.837%20297.33%2098.6736%20296.904%2098.4068C295.66%2097.4896%20294.357%2096.655%20293.003%2095.9083C291.184%2095.0735%20289.483%2094.0004%20287.945%2092.7171C287.077%2091.8788%20286.572%2090.733%20286.539%2089.5259C286.914%2089.0409%20287.44%2088.695%20288.034%2088.5428C288.627%2088.3906%20289.255%2088.4408%20289.816%2088.6855C291.66%2089.5661%20293.365%2090.7141%20294.875%2092.0925C296.553%2093.5007%20299.411%2096.2944%20299.411%2096.2944L299.898%2096.8736C299.51%2097.0812%20299.168%2097.3668%20298.895%2097.7127C298.622%2098.0586%20298.423%2098.4573%20298.311%2098.8837Z'%20fill='%23113C7A'/%3e%3cpath%20d='M304.84%2085.0278C304.766%2085.9753%20304.858%2086.9285%20305.113%2087.8442C305.543%2089.2524%20304.557%2094.0335%20304.976%2094.4537C305.302%2094.7787%20305.706%2095.0143%20306.149%2095.1376C306.592%2095.2609%20307.059%2095.2679%20307.505%2095.1578L308.345%2094.59C308.345%2094.59%20308.764%2089.8089%20308.764%2088.4007C308.764%2086.9925%20308.345%2083.0631%20307.369%2082.2227C306.394%2081.3823%20303.99%2082.0751%20304.84%2085.0278Z'%20fill='%23113569'/%3e%3cpath%20d='M305.328%2094.3081C305.687%2093.9832%20306.157%2093.809%20306.64%2093.8217C307.124%2093.8344%20307.584%2094.033%20307.925%2094.3762L307.993%2095.3643C307.993%2095.3643%20307.71%2096.2841%20305.396%2095.4324L305.328%2094.3081Z'%20fill='white'/%3e%3cpath%20d='M305.545%2095.1786C305.895%2094.9846%20306.292%2094.8905%20306.691%2094.9065C307.091%2094.9226%20307.479%2095.0481%20307.813%2095.2694L307.904%2095.6442C307.904%2095.6442%20308.21%2096.4846%20308.323%2096.8593C308.376%2097.182%20308.353%2097.5126%20308.255%2097.8247C308.236%2098.1817%20308.179%2098.5357%20308.085%2098.8808C307.994%2099.0398%20307.813%2098.9944%20307.643%2098.9717C307.141%2098.8111%20306.648%2098.6215%20306.168%2098.4038C305.794%2098.2448%20305.681%2097.4272%20305.613%2097.1432C305.567%2096.7129%20305.567%2096.2789%20305.613%2095.8486C305.62%2095.6232%20305.597%2095.3979%20305.545%2095.1786Z'%20fill='%23FF8654'/%3e%3cpath%20d='M329.925%2063.9153V65.4938C329.926%2065.7053%20329.871%2065.9132%20329.765%2066.0965C329.66%2066.2798%20329.508%2066.4321%20329.325%2066.5381C329.143%2066.644%20328.935%2066.6998%20328.724%2066.6999C328.513%2066.7%20328.305%2066.6444%20328.122%2066.5386L320.671%2062.2345C320.487%2062.1292%20320.333%2061.9773%20320.226%2061.794C320.118%2061.6106%20320.061%2061.4023%20320.059%2061.1897V59.6111C320.061%2059.3993%20320.118%2059.1916%20320.225%2059.0087C320.331%2058.8258%20320.484%2058.6741%20320.667%2058.5685C320.851%2058.4629%20321.059%2058.4071%20321.27%2058.4067C321.482%2058.4064%20321.69%2058.4614%20321.874%2058.5663L329.324%2062.8591C329.509%2062.9659%20329.662%2063.12%20329.768%2063.3056C329.873%2063.4912%20329.928%2063.7016%20329.925%2063.9153Z'%20fill='%23F9FBFC'/%3e%3cpath%20d='M353.526%2085.2874V86.8773C353.526%2087.0888%20353.471%2087.2967%20353.366%2087.48C353.26%2087.6633%20353.109%2087.8156%20352.926%2087.9215C352.743%2088.0274%20352.535%2088.0833%20352.324%2088.0834C352.113%2088.0835%20351.906%2088.0278%20351.723%2087.9221L320.671%2070.1263C320.486%2070.0192%20320.332%2069.8653%20320.225%2069.68C320.117%2069.4947%20320.06%2069.2844%20320.059%2069.0702V67.4916C320.059%2067.2788%20320.115%2067.0697%20320.221%2066.8852C320.326%2066.7008%20320.479%2066.5474%20320.663%2066.4405C320.846%2066.3335%20321.055%2066.2768%20321.267%2066.2759C321.48%2066.275%20321.689%2066.33%20321.874%2066.4354L352.925%2084.2653C353.105%2084.3692%20353.254%2084.5179%20353.36%2084.697C353.465%2084.8761%20353.522%2085.0795%20353.526%2085.2874Z'%20fill='%23F9FBFC'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M340.735%2093.6676V95.2462C340.735%2095.459%20340.679%2095.6681%20340.573%2095.8525C340.467%2096.037%20340.315%2096.1904%20340.131%2096.2973C339.948%2096.4043%20339.739%2096.461%20339.527%2096.4619C339.314%2096.4628%20339.105%2096.4078%20338.92%2096.3024L320.673%2085.8202C320.49%2085.7144%20320.338%2085.5621%20320.232%2085.3786C320.127%2085.1952%20320.072%2084.9871%20320.072%2084.7754V83.1969C320.073%2082.9857%20320.129%2082.7785%20320.234%2082.5956C320.34%2082.4127%20320.491%2082.2604%20320.673%2082.1538C320.855%2082.0472%20321.061%2081.9899%20321.272%2081.9876C321.483%2081.9853%20321.691%2082.0381%20321.875%2082.1407L340.123%2092.6228C340.307%2092.7281%20340.461%2092.88%20340.568%2093.0634C340.676%2093.2467%20340.733%2093.4551%20340.735%2093.6676Z'%20fill='%23F9FBFC'/%3e%3c/g%3e%3cpath%20d='M348.722%2090.3889V91.9789C348.72%2092.1907%20348.663%2092.3984%20348.556%2092.5813C348.449%2092.7641%20348.296%2092.9159%20348.113%2093.0215C347.93%2093.1271%20347.722%2093.1829%20347.51%2093.1832C347.299%2093.1836%20347.091%2093.1286%20346.907%2093.0237L320.676%2077.9648C320.493%2077.859%20320.341%2077.7067%20320.235%2077.5232C320.13%2077.3398%20320.074%2077.1317%20320.075%2076.92V75.3301C320.074%2075.1186%20320.129%2074.9107%20320.235%2074.7274C320.34%2074.5441%20320.492%2074.3918%20320.675%2074.2859C320.857%2074.1799%20321.065%2074.1241%20321.276%2074.124C321.487%2074.1239%20321.695%2074.1795%20321.878%2074.2853L348.109%2089.3441C348.294%2089.4494%20348.447%2089.6013%20348.555%2089.7847C348.662%2089.968%20348.72%2090.1764%20348.722%2090.3889Z'%20fill='%23F9FBFC'/%3e%3cpath%20d='M365.824%2091.1697V112.384L350.729%20121.287'%20stroke='white'%20stroke-width='0.53'%20stroke-miterlimit='10'/%3e%3cpath%20d='M367.61%2089.6723C367.607%2090.0469%20367.494%2090.4125%20367.285%2090.7229C367.076%2091.0332%20366.779%2091.2746%20366.433%2091.4164C366.086%2091.5582%20365.706%2091.5941%20365.339%2091.5197C364.973%2091.4452%20364.636%2091.2637%20364.373%2090.998C364.109%2090.7323%20363.93%2090.3944%20363.857%2090.0268C363.785%2089.6592%20363.823%2089.2785%20363.967%2088.9326C364.111%2088.5867%20364.354%2088.2912%20364.665%2088.0833C364.976%2087.8754%20365.342%2087.7644%20365.716%2087.7644C365.965%2087.7644%20366.213%2087.8138%20366.443%2087.9098C366.674%2088.0059%20366.883%2088.1466%20367.059%2088.3239C367.235%2088.5012%20367.374%2088.7116%20367.469%2088.943C367.563%2089.1745%20367.611%2089.4223%20367.61%2089.6723V89.6723Z'%20stroke='white'%20stroke-width='1.06'%20stroke-miterlimit='10'/%3e%3cpath%20d='M715.132%2070.3542V91.5684L700.048%20100.472'%20stroke='white'%20stroke-width='0.53'%20stroke-miterlimit='10'/%3e%3cpath%20d='M715.031%2070.7535C716.077%2070.7535%20716.925%2069.9044%20716.925%2068.857C716.925%2067.8096%20716.077%2066.9604%20715.031%2066.9604C713.985%2066.9604%20713.137%2067.8096%20713.137%2068.857C713.137%2069.9044%20713.985%2070.7535%20715.031%2070.7535Z'%20stroke='white'%20stroke-width='1.06'%20stroke-miterlimit='10'/%3e%3cpath%20opacity='0.35'%20d='M501.346%20238.069C501.346%20242.305%20495.959%20245.723%20489.313%20245.723C482.668%20245.723%20477.281%20242.316%20477.281%20238.069C477.281%20233.822%20482.668%20230.415%20489.313%20230.415C495.959%20230.415%20501.346%20233.844%20501.346%20238.069Z'%20fill='%23A6D0F4'/%3e%3cpath%20opacity='0.35'%20d='M512.446%20235.683C524.353%20235.683%20534.005%20229.541%20534.005%20221.964C534.005%20214.387%20524.353%20208.245%20512.446%20208.245C500.539%20208.245%20490.887%20214.387%20490.887%20221.964C490.887%20229.541%20500.539%20235.683%20512.446%20235.683Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M496.12%20218.762C496.369%20221.59%20499.023%20223.509%20501.416%20224.531C504.044%20225.625%20506.872%20226.151%20509.717%20226.076C512.634%20226.086%20515.516%20225.446%20518.155%20224.202C520.423%20223.066%20522.839%20221.056%20522.827%20218.297C522.827%20220.307%20522.691%20221.965%20521.251%20223.532C519.245%20225.467%20516.697%20226.743%20513.947%20227.189C508.799%20228.256%20501.79%20227.745%20497.877%20223.782C496.301%20222.192%20496.086%20220.511%20496.086%20218.387C496.087%20218.513%20496.098%20218.638%20496.12%20218.762Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M500.033%20213.627C494.793%20216.648%20494.759%20221.576%20499.965%20224.597C505.17%20227.618%20513.653%20227.618%20518.892%20224.597C524.132%20221.576%20524.143%20216.648%20518.892%20213.627C513.642%20210.606%20505.306%20210.595%20500.033%20213.627Z'%20fill='white'/%3e%3cpath%20d='M508.03%20209.526L508.053%20220.678L509.459%20221.495L509.425%20210.343L508.03%20209.526Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M509.424%20210.343L509.458%20221.495L510.864%20220.678L510.842%20209.526L509.424%20210.343Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M507.375%20207.494L509.428%20208.687L511.48%20207.494L509.439%20206.313L507.375%20207.494Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M522.735%20169.54C522.735%20169.54%20526.942%20172.016%20528.065%20174.537C529.188%20177.058%20528.881%20194.729%20523.007%20202.565C517.132%20210.401%20506.245%20211.514%20503.727%20210.401C501.21%20209.288%20486.716%20201.997%20485.582%20198.363C484.448%20194.729%20490.118%20191.924%20493.135%20190.527C496.152%20189.13%20498.159%20187.177%20499.837%20182.135C501.516%20177.092%20502.355%20168.427%20504.306%20167.019C506.256%20165.611%20510.974%20163.385%20522.735%20169.54Z'%20fill='black'/%3e%3cpath%20d='M501.9%20207.903C499.859%20206.994%20489.822%20201.986%20485.581%20198.204C484.673%20194.638%20490.117%20191.913%20493.156%20190.527C496.196%20189.142%20498.18%20187.177%20499.859%20182.135C501.537%20177.092%20502.376%20168.427%20504.327%20167.019C506.278%20165.611%20511.041%20163.385%20522.779%20169.54C524.031%20170.305%20525.204%20171.191%20526.283%20172.186C527.349%20175.116%20526.963%20192.356%20521.191%20200.067C515.418%20207.778%20504.372%20209.027%20501.9%20207.903Z'%20fill='%23232839'/%3e%3cpath%20d='M500.764%20171.451C500.764%20171.451%20499.517%20171.883%20498.587%20174.995C497.657%20178.106%20495.003%20183.728%20495.944%20186.215C496.885%20188.702%20499.675%20187.35%20500.48%20185.431C501.286%20183.512%20504.359%20174.904%20503.735%20173.62C503.112%20172.337%20502.012%20171.02%20500.764%20171.451Z'%20fill='%23113569'/%3e%3cpath%20d='M493.169%20235.204C492.983%20235.885%20492.725%20236.544%20492.398%20237.169C491.854%20238.225%20489.869%20239.633%20488.996%20240.349C488.123%20241.064%20487.125%20242.393%20487.238%20243.029C487.352%20243.665%20489.359%20243.824%20490.947%20243.472C492.534%20243.12%20493.918%20241.36%20494.349%20241.394C494.78%20241.428%20496.617%20241.098%20496.912%20240.497C497.207%20239.895%20496.674%20237.51%20496.674%20237.51V235.784L493.169%20235.204Z'%20fill='%23232839'/%3e%3cpath%20d='M485.391%20230.256C485.205%20230.937%20484.946%20231.596%20484.619%20232.221C484.075%20233.277%20482.09%20234.685%20481.217%20235.401C480.344%20236.116%20479.346%20237.445%20479.448%20238.081C479.55%20238.717%20481.58%20238.865%20483.168%20238.524C484.756%20238.183%20486.139%20236.412%20486.57%20236.446C487.001%20236.48%20488.782%20236.139%20489.133%20235.549C489.485%20234.958%20488.895%20232.562%20488.895%20232.562V230.836L485.391%20230.256Z'%20fill='%23232839'/%3e%3cpath%20d='M514.883%20195.924C514.944%20198.055%20514.368%20200.155%20513.227%20201.955C511.356%20204.658%20503.678%20211.517%20502.85%20212.176C502.022%20212.834%20501.807%20217.366%20500.979%20219.444C500.151%20221.522%20497.667%20235.025%20497.248%20236.07C497.248%20236.07%20496.828%20237.104%20493.925%20236.479C492.269%20236.274%20492.065%20235.65%20492.065%20235.65C492.065%20235.65%20493.097%20220.489%20493.925%20216.946C494.753%20213.402%20494.968%20209.473%20496.42%20208.019C497.871%20206.566%20504.925%20197.424%20504.925%20197.424L506.581%20194.721L514.883%20195.924Z'%20fill='%23113C7A'/%3e%3cpath%20d='M502.023%20192.609C502.023%20192.609%20490.818%20198.844%20489.253%20200.241C487.765%20201.546%20486.732%20203.292%20486.304%20205.226C486.179%20205.919%20485.057%20230.006%20484.592%20231.097C484.433%20232.039%20487.393%20232.652%20488.788%20232.232C489.34%20231.859%20489.817%20231.385%20490.194%20230.835C490.194%20230.835%20492.995%20216.344%20492.995%20214.312C493.253%20211.59%20493.67%20208.887%20494.243%20206.214L507.16%20198.889L508.09%20195.607L502.023%20192.609Z'%20fill='%23113C7A'/%3e%3cpath%20d='M514.479%20198.058C514.479%20198.058%20513.345%20201.181%20508.876%20200.704L507.311%20200.397L507.005%20197.899C505.435%20197.694%20503.939%20197.105%20502.65%20196.184C502.027%20196.502%20501.868%20198.058%20501.244%20198.217C500.62%20198.376%20499.532%20196.184%20499.849%20194.628C500.167%20193.073%20500.983%20193.697%20500.983%20193.697C500.983%20193.697%20513.696%20196.809%20514.479%20198.058Z'%20fill='%23112C5C'/%3e%3cpath%20d='M509.703%20169.839C509.703%20169.839%20515.033%20173.644%20515.555%20174.916C516.198%20177.281%20516.039%20179.794%20515.101%20182.059C513.967%20184.41%20514.409%20193.064%20513.967%20194.756C513.525%20196.448%20509.011%20197.027%20506.187%20196.436C503.363%20195.846%20499.961%20193.847%20500.063%20190.554C500.165%20187.26%20500.063%20181.116%20499.927%20179.64C499.769%20177.049%20500.006%20174.449%20500.63%20171.929C500.766%20171.407%20502.547%20170.85%20502.547%20170.85C502.547%20170.85%20504.452%20169.612%20509.703%20169.839Z'%20fill='%23C7BFCE'/%3e%3cpath%20d='M505.075%20169.122C505.082%20169.179%20505.082%20169.236%20505.075%20169.293C505.018%20169.679%20504.825%20170.678%20504.78%20171.098C504.734%20171.518%20505.199%20172.234%20506.277%20172.166C507.354%20172.098%20509.191%20171.689%20509.804%20170.406C509.776%20169.135%20509.837%20167.864%20509.985%20166.601L505.075%20169.122Z'%20fill='%23E16B40'/%3e%3cpath%20d='M509.84%20169.586C509.561%20170.356%20509.048%20171.018%20508.372%20171.479C507.696%20171.94%20506.892%20172.175%20506.075%20172.153H505.882L507.345%20174.515C508.388%20173.904%20509.371%20173.197%20510.282%20172.402C510.714%20171.884%20510.944%20171.226%20510.929%20170.551L509.84%20169.586Z'%20fill='white'/%3e%3cpath%20d='M505.891%20172.155L504.348%20173.62C504.348%20173.62%20503.214%20172.666%20503.906%20170.429L504.859%20170.043C504.842%20170.453%20504.928%20170.861%20505.108%20171.23C505.288%20171.598%20505.557%20171.916%20505.891%20172.155Z'%20fill='white'/%3e%3cpath%20d='M502.807%20161.739C503.374%20158.696%20505.778%20156.97%20508.478%20157.606C509.364%20157.723%20510.211%20158.046%20510.952%20158.549C511.692%20159.051%20512.305%20159.72%20512.742%20160.502C514.046%20163.091%20512.129%20165.271%20510.893%20166.646C510.372%20167.213%20509.975%20167.645%20509.759%20167.929L509.487%20168.235C508.783%20168.942%20507.919%20169.467%20506.969%20169.769C506.403%20169.963%20505.796%20170.005%20505.208%20169.889C504.621%20169.774%20504.074%20169.505%20503.624%20169.11C502.83%20168.326%20502.24%20164.772%20502.807%20161.739Z'%20fill='%23FF8654'/%3e%3cpath%20d='M510.973%20170.552C510.973%20170.552%20511.767%20171.313%20510.712%20173.244C509.301%20175.976%20508.525%20178.992%20508.444%20182.068C508.353%20185.713%20507.877%20197.138%20508.354%20199.636C509.306%20200.499%20513.911%20199.727%20515.249%20197.433C515.827%20194.026%20515.544%20183.896%20516.213%20181.784C516.77%20179.485%20516.801%20177.089%20516.303%20174.777C515.759%20173.72%20512.107%20170.836%20510.973%20170.552Z'%20fill='%23113C7A'/%3e%3cpath%20d='M503.521%20170.486C502.951%20172.788%20502.691%20175.156%20502.75%20177.527C502.75%20181.309%20501.673%20196.981%20501.48%20197.299C501.287%20197.617%20499.053%20195.641%20498.985%20193.336C498.917%20191.03%20499.756%20176.891%20499.881%20175.483C499.954%20174.099%20500.257%20172.736%20500.777%20171.452C501.655%20171.034%20502.575%20170.711%20503.521%20170.486Z'%20fill='%23113C7A'/%3e%3cpath%20d='M504.631%20172.927L505.323%20174.38L506.775%20173.233L505.89%20172.154L504.631%20172.927Z'%20fill='%23113C7A'/%3e%3cpath%20d='M505.02%20173.472C505.02%20173.472%20503.648%20191.018%20503.648%20191.779L504.566%20193.392L505.791%20192.086L506.245%20173.325L505.02%20173.472Z'%20fill='%23113C7A'/%3e%3cpath%20d='M429.925%20232.455L427.396%20230.979L427.327%20201.997L429.856%20203.473L429.925%20232.455Z'%20fill='%238750CA'/%3e%3cpath%20d='M429.857%20203.473L427.327%20201.997L461.77%20182.078L464.31%20183.554L429.857%20203.473Z'%20fill='%23DBDBDB'/%3e%3cpath%20d='M464.311%20183.557L464.379%20212.539L429.925%20232.458L429.857%20203.476L464.311%20183.557Z'%20fill='%239966D7'/%3e%3cpath%20d='M432.321%20197.968L432.253%20226.95L501.296%20266.562L501.364%20237.58L432.321%20197.968Z'%20fill='%23A478D9'/%3e%3cpath%20d='M432.28%20214.174L501.334%20253.785L501.368%20237.58L432.325%20197.968L432.28%20214.174Z'%20fill='%238750CA'/%3e%3cpath%20d='M499.169%20269.379L496.629%20267.903L496.561%20238.921L499.101%20240.397L499.169%20269.379Z'%20fill='%238750CA'/%3e%3cpath%20d='M499.101%20240.396L496.561%20238.92L531.014%20219L533.543%20220.477L499.101%20240.396Z'%20fill='%23DBDBDB'/%3e%3cpath%20d='M533.54%20220.477L533.62%20249.459L499.166%20269.379L499.098%20240.397L533.54%20220.477Z'%20fill='%23976EC9'/%3e%3cpath%20d='M538.269%20219.725L538.258%20222.45L499.2%20245.175L499.211%20242.449L538.269%20219.725Z'%20fill='%238C57CC'/%3e%3cpath%20d='M499.209%20242.452L499.198%20245.178L421.558%20200.296L421.57%20197.571L499.209%20242.452Z'%20fill='%238750CA'/%3e%3cpath%20d='M538.271%20219.725L499.213%20242.45L421.573%20197.569L460.631%20174.833L538.271%20219.725Z'%20fill='%23B59AD7'/%3e%3cpath%20d='M515.975%20174.164C516.891%20175.111%20517.537%20176.288%20517.846%20177.571C518.674%20180.171%20519.195%20189.2%20519.195%20190.551C519.195%20191.903%20519.195%20193.47%20518.061%20194.197C517.814%20194.394%20517.526%20194.533%20517.218%20194.603C516.91%20194.674%20516.591%20194.674%20516.283%20194.604C515.974%20194.534%20515.686%20194.396%20515.438%20194.2C515.191%20194.004%20514.99%20193.754%20514.852%20193.47C514.126%20192.118%20513.604%20184.385%20513.083%20182.034C512.561%20179.683%20511.733%20177.253%20512.777%20175.697C513.081%20175.137%20513.554%20174.688%20514.128%20174.412C514.702%20174.137%20515.348%20174.05%20515.975%20174.164Z'%20fill='%23113C7A'/%3e%3cpath%20d='M504.164%20200.444C504.164%20200.444%20503.643%20200.807%20503.382%20200.966L501.669%20202.102C501.213%20202.58%20500.831%20203.123%20500.535%20203.714C500.238%20204.183%20500.058%20204.717%20500.014%20205.27C500.116%20205.531%20500.433%20205.372%20500.433%20205.372C500.74%20205.713%20501.167%20205.921%20501.624%20205.952C502.248%20205.895%20502.758%20205.123%20502.758%20205.123L503.643%20204.339C503.999%20203.943%20504.279%20203.485%20504.471%20202.987L505.094%20202.567C505.094%20202.567%20505.593%20202.056%20504.164%20200.444Z'%20fill='%23FF8654'/%3e%3cpath%20d='M506.141%20202.194C506.141%20202.194%20505.495%20200.343%20504.723%20199.923L503.839%20200.548C504.394%20201.202%20504.783%20201.981%20504.973%20202.819L506.141%20202.194Z'%20fill='white'/%3e%3cpath%20d='M506.146%20202.194C506.701%20202.144%20507.236%20201.965%20507.711%20201.672C509.092%20200.65%20510.539%20199.72%20512.043%20198.89C514.059%20197.967%20515.943%20196.779%20517.645%20195.358C518.603%20194.428%20519.161%20193.161%20519.199%20191.826C518.785%20191.287%20518.202%20190.902%20517.545%20190.734C516.887%20190.565%20516.192%20190.622%20515.57%20190.895C513.527%20191.854%20511.639%20193.113%20509.967%20194.631C508.096%20196.187%20504.909%20199.287%20504.909%20199.287L504.365%20199.934C504.805%20200.164%20505.19%20200.484%20505.497%20200.873C505.804%20201.263%20506.025%20201.713%20506.146%20202.194Z'%20fill='%23113C7A'/%3e%3cpath%20d='M502.908%20161.207C502.625%20160.774%20502.43%20160.289%20502.337%20159.78C502.243%20159.271%20502.252%20158.748%20502.364%20158.243C502.794%20156.71%20504.768%20157.368%20505.868%20157.255C506.968%20157.141%20511.232%20157.255%20512.672%20159.117C514.113%20160.98%20513.444%20161.865%20513.444%20161.865C513.557%20162.754%20513.444%20163.656%20513.115%20164.489C512.559%20165.693%20509.78%20167.896%20509.78%20167.896C510.514%20167.003%20511.086%20165.988%20511.47%20164.898C511.584%20163.91%20511.028%20163.365%20510.699%20163.58C510.37%20163.796%20510.155%20165.659%20510.155%20165.659L510.007%20166.567C509.281%20166.317%20509.497%20164.784%20509.497%20164.784C509.153%20164.282%20508.896%20163.725%20508.737%20163.137C508.51%20162.263%20508.408%20161.831%20507.524%20161.389C506.859%20160.904%20506.065%20160.628%20505.243%20160.595C504.422%20160.563%20503.609%20160.776%20502.908%20161.207Z'%20fill='%23505E83'/%3e%3cpath%20d='M484.475%20177.56C484.475%20177.56%20483.92%20177.265%20483.659%20177.094C483.398%20176.924%20482.4%20176.333%20481.912%20176.061C481.282%20175.859%20480.624%20175.756%20479.962%20175.754C479.41%20175.706%20478.855%20175.788%20478.34%20175.993C478.158%20176.209%20478.442%20176.413%20478.442%20176.413C478.266%20176.838%20478.266%20177.316%20478.442%20177.742C478.763%20178.105%20479.208%20178.336%20479.689%20178.389L480.824%20178.821C481.335%20178.967%20481.871%20179.013%20482.4%20178.957L483.046%20179.332C483.046%20179.332%20483.659%20179.536%20484.475%20177.56Z'%20fill='%23FF8654'/%3e%3cpath%20d='M483.761%20180.083C483.761%20180.083%20485.111%20178.675%20485.179%20177.812L484.226%20177.301C483.899%20178.084%20483.394%20178.78%20482.752%20179.334L483.761%20180.083Z'%20fill='white'/%3e%3cpath%20d='M483.754%20180.082C484.039%20180.544%20484.427%20180.932%20484.888%20181.217C486.42%20181.998%20487.901%20182.875%20489.323%20183.841C491.051%20185.227%20492.958%20186.373%20494.993%20187.248C496.254%20187.688%20497.637%20187.619%20498.849%20187.055C499.143%20186.442%20499.225%20185.749%20499.081%20185.084C498.937%20184.42%20498.576%20183.822%20498.055%20183.387C496.274%20181.992%20494.299%20180.867%20492.192%20180.048C489.924%20179.082%20485.773%20177.617%20485.773%20177.617L484.956%20177.424C484.955%20177.927%20484.847%20178.424%20484.64%20178.882C484.433%20179.34%20484.131%20179.749%20483.754%20180.082Z'%20fill='%23113569'/%3e%3cpath%20d='M501.324%20223.795L509.206%20228.383L521.964%20221.002L514.082%20216.414L501.324%20223.795Z'%20fill='%238C57CC'/%3e%3cpath%20d='M499.872%20221.066V223.02L507.765%20227.608L507.754%20225.654L499.872%20221.066Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M507.752%20225.656L507.763%20227.609L520.521%20220.228V218.274L507.752%20225.656Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M499.872%20221.065L507.754%20225.653L520.523%20218.271L512.63%20213.683L499.872%20221.065Z'%20fill='white'/%3e%3cpath%20d='M447.361%20200.377L455.254%20204.965L468.013%20197.594L460.12%20192.995L447.361%20200.377Z'%20fill='%238C57CC'/%3e%3cpath%20d='M445.913%20197.652L445.924%20199.605L453.806%20204.193V202.24L445.913%20197.652Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M453.801%20202.236V204.189L466.571%20196.818L466.559%20194.854L453.801%20202.236Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M445.913%20197.654L453.806%20202.242L466.564%20194.86L458.682%20190.272L445.913%20197.654Z'%20fill='white'/%3e%3cpath%20d='M490.068%20214.659L497.961%20219.247L510.719%20211.865L502.837%20207.277L490.068%20214.659Z'%20fill='white'/%3e%3cpath%20d='M496.942%20205.938C498.746%20206.983%20498.746%20208.663%20496.942%20209.708L485.397%20216.42C484.39%20216.935%20483.274%20217.204%20482.142%20217.204C481.011%20217.204%20479.895%20216.935%20478.888%20216.42L467.275%20209.708C465.471%20208.663%20465.46%20206.971%20467.275%20205.938L478.82%20199.215C479.825%20198.699%20480.939%20198.431%20482.069%20198.431C483.199%20198.431%20484.312%20198.699%20485.318%20199.215L496.942%20205.938Z'%20fill='%238C57CC'/%3e%3cpath%20d='M486.649%20207.686C486.634%20207.719%20486.615%20207.749%20486.592%20207.777L486.512%20207.856H486.456L486.376%20207.913L481.591%20210.571L476.419%20207.584V207.947L481.591%20210.934L486.376%20208.265H486.433H486.49L486.547%20208.208C486.547%20208.208%20486.547%20208.208%20486.547%20208.152V208.061V207.538C486.594%20207.577%20486.629%20207.628%20486.649%20207.686Z'%20fill='%23BAC0D2'/%3e%3cpath%20d='M486.392%20207.21C486.767%20207.426%20486.755%20207.766%20486.392%20207.982L481.606%20210.64L476.435%20207.653L480.484%20204.575C480.69%20204.466%20480.92%20204.409%20481.153%20204.409C481.386%20204.409%20481.616%20204.466%20481.822%20204.575L486.392%20207.21Z'%20fill='white'/%3e%3cpath%20d='M493.476%20195.894C493.905%20196.175%20494.21%20196.61%20494.327%20197.109L496.799%20213.78C496.867%20214.212%20496.584%20214.382%20496.187%20214.144L470.931%20199.585C470.499%20199.307%20470.193%20198.871%20470.08%20198.37L467.608%20181.698C467.54%20181.267%20467.812%20181.096%20468.22%20181.335L493.476%20195.894Z'%20fill='%23C7C9D7'/%3e%3cpath%20d='M497.204%20213.625V213.5L494.72%20196.829V196.658V196.522V196.374L494.641%20196.272L469.385%20181.656H468.976H468.908L468.511%20181.952H468.591C468.628%20181.946%20468.667%20181.946%20468.704%20181.952H468.84C468.897%20181.964%20468.951%20181.987%20468.999%20182.02L494.255%20196.636L494.403%20196.738L494.55%20196.863L494.686%20197.01L494.8%20197.169L494.902%20197.34L494.992%20197.51C494.997%20197.571%20494.997%20197.631%20494.992%20197.692C494.997%20197.745%20494.997%20197.798%20494.992%20197.851L497.465%20214.522C497.47%20214.568%20497.47%20214.613%20497.465%20214.658C497.47%20214.696%20497.47%20214.734%20497.465%20214.772C497.47%20214.795%20497.47%20214.818%20497.465%20214.84C497.444%20214.875%20497.417%20214.906%20497.385%20214.931L497.794%20214.636C497.825%20214.614%20497.849%20214.582%20497.862%20214.545V214.454L497.204%20213.625Z'%20fill='white'/%3e%3cpath%20opacity='0.2'%20d='M479.477%20205.318L476.415%20207.658L481.587%20210.645L485.204%20208.634L479.477%20205.318Z'%20fill='%23777DB2'/%3e%3cpath%20d='M482.675%20200.386L481.586%20211.028L476.404%20208.029L478.422%20198.058L482.675%20200.386Z'%20fill='%23BAC0D2'/%3e%3cpath%20d='M497.444%20233.936L500.313%20232.346L496.264%20230.245L497.444%20233.936Z'%20fill='%238C57CC'/%3e%3cpath%20d='M498.329%20229.19L499.123%20228.906L498.238%20233.653L497.445%20233.937L498.329%20229.19Z'%20fill='%23656874'/%3e%3cpath%20d='M485.4%20221.944L486.182%20221.66L499.122%20228.905L498.328%20229.189L485.4%20221.944Z'%20fill='%239C9EA6'/%3e%3cpath%20d='M498.329%20229.189L497.444%20233.936L484.516%20226.69L485.4%20221.943L498.329%20229.189Z'%20fill='%23232839'/%3e%3cpath%20d='M452.76%20189.871C453.894%20190.507%20453.894%20191.529%20452.76%20192.143C452.147%20192.456%20451.469%20192.619%20450.781%20192.619C450.093%20192.619%20449.415%20192.456%20448.802%20192.143C448.572%20192.055%20448.374%20191.9%20448.235%20191.697C448.095%20191.494%20448.02%20191.253%20448.02%20191.007C448.02%20190.761%20448.095%20190.52%20448.235%20190.317C448.374%20190.115%20448.572%20189.959%20448.802%20189.871C449.414%20189.556%20450.093%20189.391%20450.781%20189.391C451.47%20189.391%20452.148%20189.556%20452.76%20189.871Z'%20fill='%238C57CC'/%3e%3cpath%20d='M453.137%20184.219V190.442C453.116%20190.67%20453.034%20190.888%20452.9%20191.074C452.767%20191.26%20452.586%20191.406%20452.377%20191.498C451.806%20191.789%20451.175%20191.941%20450.534%20191.941C449.893%20191.941%20449.262%20191.789%20448.691%20191.498C448.48%20191.405%20448.297%20191.257%20448.161%20191.069C448.026%20190.882%20447.942%20190.661%20447.92%20190.431V184.196C447.938%20184.429%20448.02%20184.653%20448.156%20184.843C448.291%20185.033%20448.477%20185.183%20448.691%20185.275C449.262%20185.566%20449.893%20185.718%20450.534%20185.718C451.175%20185.718%20451.806%20185.566%20452.377%20185.275C452.586%20185.183%20452.767%20185.036%20452.9%20184.85C453.034%20184.665%20453.116%20184.447%20453.137%20184.219Z'%20fill='white'/%3e%3cpath%20d='M452.321%20183.137C453.342%20183.727%20453.353%20184.681%20452.321%20185.272C451.751%20185.563%20451.119%20185.715%20450.479%20185.715C449.838%20185.715%20449.206%20185.563%20448.636%20185.272C447.615%20184.681%20447.604%20183.727%20448.636%20183.137C449.206%20182.846%20449.838%20182.694%20450.479%20182.694C451.119%20182.694%20451.751%20182.846%20452.321%20183.137Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M451.925%20183.375C452.098%20183.434%20452.249%20183.545%20452.356%20183.694C452.463%20183.842%20452.52%20184.021%20452.52%20184.204C452.52%20184.387%20452.463%20184.566%20452.356%20184.715C452.249%20184.864%20452.098%20184.975%20451.925%20185.033C451.479%20185.262%20450.986%20185.382%20450.485%20185.382C449.984%20185.382%20449.49%20185.262%20449.044%20185.033C448.871%20184.975%20448.72%20184.864%20448.613%20184.715C448.506%20184.566%20448.449%20184.387%20448.449%20184.204C448.449%20184.021%20448.506%20183.842%20448.613%20183.694C448.72%20183.545%20448.871%20183.434%20449.044%20183.375C449.489%20183.144%20449.983%20183.024%20450.485%20183.024C450.986%20183.024%20451.48%20183.144%20451.925%20183.375Z'%20fill='%238C57CC'/%3e%3cpath%20d='M448.471%20184.387C447.988%20182.685%20447.397%20181.016%20446.701%20179.39C446.701%20178.811%20447.904%20179.503%20448.357%20180.582C448.747%20181.722%20449.043%20182.892%20449.242%20184.08C449.242%20184.08%20449.162%20178.504%20450.126%20177.266C450.739%20177.425%20450.365%20183.546%20450.285%20184.012C450.285%20184.012%20452.202%20179.924%20453.472%20179.083C454.05%20179.151%20451.623%20184.194%20451.623%20184.194C451.917%20183.646%20452.317%20183.163%20452.8%20182.773C453.283%20182.383%20453.839%20182.094%20454.436%20181.922C453.824%20182.822%20453.158%20183.683%20452.44%20184.5C452.151%20184.839%20451.776%20185.092%20451.355%20185.234C450.933%20185.376%20450.481%20185.401%20450.047%20185.307C449.73%20185.292%20449.421%20185.2%20449.146%20185.04C448.872%20184.88%20448.64%20184.656%20448.471%20184.387Z'%20fill='%234CA15C'/%3e%3cpath%20d='M562.062%20231.844C564.762%20233.411%20564.773%20235.933%20562.062%20237.523C560.558%20238.292%20558.892%20238.693%20557.203%20238.693C555.513%20238.693%20553.848%20238.292%20552.343%20237.523C549.644%20235.978%20549.633%20233.446%20552.343%20231.844C553.848%20231.076%20555.514%20230.675%20557.203%20230.675C558.892%20230.675%20560.558%20231.076%20562.062%20231.844Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M562.872%20217.955V233.241C562.822%20233.8%20562.625%20234.335%20562.3%20234.792C561.975%20235.249%20561.534%20235.612%20561.023%20235.841C559.619%20236.56%20558.064%20236.935%20556.487%20236.935C554.91%20236.935%20553.355%20236.56%20551.95%20235.841C551.43%20235.609%20550.98%20235.241%20550.649%20234.775C550.318%20234.31%20550.117%20233.764%20550.068%20233.195V217.909C550.119%20218.478%20550.32%20219.023%20550.651%20219.488C550.982%20219.953%20551.43%20220.322%20551.95%20220.555C553.354%20221.276%20554.909%20221.652%20556.487%20221.652C558.064%20221.652%20559.619%20221.276%20561.023%20220.555C561.534%20220.325%20561.974%20219.962%20562.298%20219.505C562.623%20219.048%20562.821%20218.513%20562.872%20217.955Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M560.975%20215.31C563.493%20216.764%20563.504%20219.114%20560.975%20220.557C559.571%20221.277%20558.016%20221.653%20556.439%20221.653C554.861%20221.653%20553.306%20221.277%20551.902%20220.557C549.396%20219.103%20549.385%20216.752%20551.902%20215.31C553.306%20214.588%20554.861%20214.211%20556.439%20214.211C558.016%20214.211%20559.572%20214.588%20560.975%20215.31Z'%20fill='white'/%3e%3cpath%20d='M559.976%20215.889C561.938%20217.024%20561.949%20218.853%20559.976%20219.977C558.883%20220.532%20557.674%20220.821%20556.449%20220.821C555.223%20220.821%20554.015%20220.532%20552.922%20219.977C550.971%20218.841%20550.96%20217.013%20552.922%20215.889C554.015%20215.332%20555.223%20215.042%20556.449%20215.042C557.675%20215.042%20558.883%20215.332%20559.976%20215.889Z'%20fill='%23713336'/%3e%3cpath%20d='M551.538%20218.388C551.538%20218.388%20548.328%20207.701%20547.194%20206.1C547.194%20204.68%20550.12%20206.384%20551.254%20209.03C552.211%20211.836%20552.939%20214.715%20553.432%20217.638C553.432%20217.638%20553.239%20203.92%20555.598%20200.899C557.106%20201.273%20556.165%20216.31%20555.983%20217.445C555.983%20217.445%20560.701%20207.417%20563.82%20205.339C565.226%20205.532%20559.284%20217.911%20559.284%20217.911C559.284%20217.911%20561.733%20213.289%20566.179%20212.437C564.671%20214.643%20563.031%20216.755%20561.268%20218.763C561.268%20218.763%20559.658%20221.227%20555.416%20220.75C555.416%20220.75%20552.479%20220.568%20551.538%20218.388Z'%20fill='%234CA15C'/%3e%3cpath%20opacity='0.35'%20d='M428.648%20256.795C428.648%20263.609%20437.358%20269.173%20448.097%20269.173C458.837%20269.173%20467.547%20263.631%20467.547%20256.795C467.547%20249.958%20458.837%20244.427%20448.097%20244.427C437.358%20244.427%20428.648%20249.958%20428.648%20256.795Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M456.241%20259.475C456.241%20259.475%20455.47%20262.564%20455.935%20263.189C456.315%20263.558%20456.784%20263.824%20457.297%20263.959C457.809%20264.094%20458.348%20264.095%20458.861%20263.961C459.652%20263.615%20460.306%20263.016%20460.721%20262.258C461.912%20261.589%20463.004%20260.755%20463.964%20259.782C464.143%20259.534%20464.239%20259.236%20464.239%20258.93C464.239%20258.624%20464.143%20258.326%20463.964%20258.078C463.084%20257.992%20462.196%20258.046%20461.333%20258.237C460.284%20258.536%20459.254%20258.896%20458.248%20259.316L456.241%20259.475Z'%20fill='%23232839'/%3e%3cpath%20d='M448.361%20255.136C448.361%20255.136%20447.59%20258.237%20448.055%20258.85C448.433%20259.223%20448.902%20259.491%20449.415%20259.627C449.929%20259.762%20450.469%20259.761%20450.981%20259.622C451.772%20259.276%20452.426%20258.677%20452.841%20257.919C454.033%20257.25%20455.125%20256.417%20456.085%20255.443C456.264%20255.195%20456.36%20254.897%20456.36%20254.591C456.36%20254.285%20456.264%20253.987%20456.085%20253.74C455.205%20253.66%20454.318%20253.714%20453.453%20253.899C452.403%20254.213%20451.373%20254.592%20450.369%20255.034L448.361%20255.136Z'%20fill='%23232839'/%3e%3cpath%20d='M472.03%20209.904L462.31%20219.841L452.864%20217.388L462.583%20207.451L472.03%20209.904Z'%20fill='white'/%3e%3cpath%20d='M461.593%20210.515L462.523%20210.867C462.912%20210.584%20463.363%20210.398%20463.838%20210.323C464.313%20210.248%20464.799%20210.286%20465.256%20210.435L466.027%20209.799C465.284%20209.561%20464.495%20209.501%20463.725%20209.625C462.954%20209.75%20462.224%20210.054%20461.593%20210.515Z'%20fill='%23E2EDFF'/%3e%3cpath%20d='M461.47%20210.605C460.563%20211.412%20460.62%20212.365%20461.538%20212.933L462.332%20212.275C461.913%20211.923%20461.924%20211.412%20462.4%20210.957L461.47%20210.605Z'%20fill='%23E2EDFF'/%3e%3cpath%20d='M461.661%20213.004L461.967%20213.141C462.702%20213.372%20463.48%20213.431%20464.241%20213.313C465.002%20213.195%20465.726%20212.903%20466.356%20212.459L465.426%20212.107C465.037%20212.373%20464.593%20212.547%20464.128%20212.616C463.662%20212.685%20463.187%20212.647%20462.738%20212.505L462.443%20212.357L461.661%20213.004Z'%20fill='%233EABFF'/%3e%3cpath%20d='M465.441%20210.516C466.099%20210.857%20466.156%20211.493%20465.555%20212.015L466.485%20212.367C467.505%20211.493%20467.381%20210.414%20466.224%20209.869L465.441%20210.516Z'%20fill='%233EABFF'/%3e%3cpath%20d='M454.053%20241.784C453.679%20244.838%20452.148%20252.856%20451.898%20255.65C451.898%20255.65%20451.263%20256.672%20449.358%20256.422L448.451%20256.036C448.273%20255.966%20448.124%20255.839%20448.027%20255.674C447.93%20255.509%20447.892%20255.317%20447.918%20255.128C448.277%20252.562%20448.417%20249.971%20448.337%20247.382C448.152%20245.793%20448.326%20244.182%20448.848%20242.669C448.779%20241.715%20448.655%20238.411%20450.56%20237.525C450.56%20237.525%20455.232%20236.662%20454.053%20241.784Z'%20fill='%23113569'/%3e%3cpath%20d='M450.171%20238.92L450.681%20239.93C450.681%20239.93%20458.495%20240.316%20460.593%20242.611C461.338%20242.936%20461.951%20243.506%20462.33%20244.226C462.709%20244.946%20462.833%20245.774%20462.68%20246.574C462.294%20249.629%20459.709%20256.988%20459.448%20259.793C459.448%20259.793%20458.813%20260.804%20456.907%20260.554L456.011%20260.179C455.833%20260.106%20455.683%20259.977%20455.585%20259.811C455.487%20259.645%20455.445%20259.451%20455.467%20259.259C455.825%20256.694%20455.969%20254.103%20455.898%20251.514C455.707%20249.928%20455.881%20248.32%20456.408%20246.812C453.973%20247.309%20451.588%20248.032%20449.286%20248.97C445.601%20250.503%20442.425%20248.72%20441.03%20247.948C440.34%20247.607%20439.696%20247.18%20439.114%20246.676C437.859%20246.591%20436.665%20246.101%20435.711%20245.279C434.056%20243.882%20433.806%20240.192%20435.587%20238.022C437.367%20235.853%20450.171%20238.92%20450.171%20238.92Z'%20fill='%23113C7A'/%3e%3cpath%20d='M447.385%20219.567C447.385%20219.567%20447.147%20219.567%20447.226%20217.898C447.333%20217.17%20447.575%20216.469%20447.941%20215.831C447.941%20215.831%20445.287%20214.003%20443.155%20214.514C442.456%20215.949%20441.503%20217.246%20440.342%20218.341C440.342%20218.341%20441.533%20221.487%20447.385%20219.567Z'%20fill='%23FF8654'/%3e%3cpath%20d='M444.618%20220.518C444.618%20220.518%20439.946%20216.611%20438.948%20216.52C438.305%20216.397%20437.64%20216.527%20437.091%20216.882C436.542%20217.238%20436.151%20217.791%20435.999%20218.428C435.83%20219.054%20435.868%20219.717%20436.107%20220.319C436.347%20220.921%20436.774%20221.429%20437.326%20221.767C438.188%20222.244%20445.718%20225.867%20447.056%20225.867C447.366%20225.894%20447.676%20225.828%20447.948%20225.678C448.22%20225.528%20448.441%20225.3%20448.583%20225.024C448.725%20224.747%20448.782%20224.435%20448.747%20224.126C448.711%20223.817%20448.585%20223.526%20448.383%20223.289C447.578%20221.858%20444.618%20220.518%20444.618%20220.518Z'%20fill='%23113569'/%3e%3cpath%20d='M443.189%20217.922C443.189%20217.922%20448.144%20219.569%20449.539%20221.863C450.934%20224.157%20450.673%20226.701%20449.675%20230.267C448.677%20233.832%20450.685%20237.012%20450.174%20238.92C449.664%20240.828%20446.114%20242.611%20440.898%20241.714C435.681%20240.817%20435.307%20238.795%20434.932%20237.648C434.558%20236.501%20435.942%20231.027%20434.672%20226.576C434.209%20225.124%20434.176%20223.569%20434.579%20222.099C434.982%20220.63%20435.802%20219.309%20436.94%20218.297C437.983%20217.536%20440.013%20216.525%20443.189%20217.922Z'%20fill='%23113C7A'/%3e%3cpath%20d='M447.931%20220.036C447.931%20220.036%20446.593%20220.899%20443.259%20220.422C439.924%20219.945%20439.732%20217.561%20440.015%20217.368C440.333%20217.079%20440.622%20216.759%20440.877%20216.414C440.877%20216.414%20444.404%20218.038%20445.64%20218.515C446.876%20218.992%20447.546%20219.275%20447.546%20219.275L447.931%20220.036Z'%20fill='white'/%3e%3cpath%20d='M433.505%20262.056C433.675%20263.975%20435.489%20265.292%20437.122%20265.997C438.92%20266.735%20440.851%20267.091%20442.793%20267.041C444.784%20267.049%20446.751%20266.615%20448.554%20265.769C450.108%20265.008%20451.752%20263.623%20451.741%20261.738C451.815%20262.376%20451.758%20263.023%20451.572%20263.638C451.387%20264.254%20451.078%20264.824%20450.663%20265.315C449.293%20266.629%20447.557%20267.497%20445.685%20267.802C442.169%20268.529%20437.383%20268.177%20434.718%20265.531C434.262%20265.04%20433.916%20264.456%20433.705%20263.819C433.493%20263.182%20433.421%20262.507%20433.493%20261.84C433.493%20261.84%20433.493%20261.931%20433.505%20262.056Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M436.181%20257.981C432.609%20260.048%20432.586%20263.398%20436.181%20265.465C438.18%20266.484%20440.391%20267.015%20442.634%20267.015C444.877%20267.015%20447.088%20266.484%20449.087%20265.465C452.659%20263.398%20452.671%20260.048%20449.087%20257.981C447.089%20256.96%20444.877%20256.427%20442.634%20256.427C440.391%20256.427%20438.179%20256.96%20436.181%20257.981Z'%20fill='white'/%3e%3cpath%20d='M440.983%20253.808L441.005%20261.791L442.4%20262.598L442.378%20254.614L440.983%20253.808Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M442.377%20254.614L442.4%20262.598L443.806%20261.791L443.784%20253.808L442.377%20254.614Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M440.983%20253.808L442.378%20254.614L443.784%20253.808L442.389%20252.99L440.983%20253.808Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M424.542%20224.136C424.549%20223.878%20424.616%20223.626%20424.739%20223.399C424.862%20223.172%20425.037%20222.977%20425.249%20222.831C425.462%20222.685%20425.706%20222.591%20425.961%20222.557C426.217%20222.524%20426.477%20222.551%20426.719%20222.637C431.256%20224.238%20441.905%20230.439%20442.597%20231.722C443.288%20233.006%20445.307%20240.16%20446.316%20243.749C446.386%20243.991%20446.509%20244.213%20446.677%20244.4C446.846%20244.586%20447.055%20244.732%20447.288%20244.825C447.521%20244.918%20447.772%20244.957%20448.023%20244.938C448.273%20244.918%20448.516%20244.842%20448.732%20244.714L455.049%20240.989C455.317%20240.828%20455.626%20240.748%20455.938%20240.757C456.251%20240.766%20456.554%20240.866%20456.812%20241.043C457.07%20241.22%20457.272%20241.467%20457.394%20241.756C457.516%20242.044%20457.552%20242.362%20457.499%20242.67L456.489%20248.769C456.448%20249.006%20456.354%20249.231%20456.214%20249.427C456.075%20249.624%20455.894%20249.787%20455.684%20249.904L448.88%20253.8C447.018%20254.868%20444.922%20255.459%20442.777%20255.521C440.632%20255.582%20438.505%20255.112%20436.586%20254.152L431.381%20251.54C426.844%20249.268%20424.02%20243.056%20424.202%20237.912L424.542%20224.136Z'%20fill='%233278CC'/%3e%3cpath%20d='M442.574%20231.776C443.209%20233.06%20445.285%20240.214%20446.294%20243.803C446.363%20244.045%20446.487%20244.267%20446.655%20244.454C446.824%20244.64%20447.032%20244.786%20447.266%20244.879C447.499%20244.972%20447.75%20245.011%20448%20244.991C448.251%20244.972%20448.493%20244.896%20448.71%20244.768L455.027%20241.043C455.295%20240.882%20455.604%20240.801%20455.916%20240.811C456.229%20240.82%20456.532%20240.919%20456.79%20241.096C457.048%20241.273%20457.25%20241.521%20457.372%20241.809C457.493%20242.098%20457.53%20242.415%20457.476%20242.724L456.467%20248.822C456.443%20248.96%20456.401%20249.093%20456.342%20249.22L456.093%20249.606C455.971%20249.751%20455.825%20249.874%20455.662%20249.969L448.857%20253.865C447.456%20254.668%20445.918%20255.203%20444.321%20255.443C438.843%20251.185%20439.535%20233.412%20441.52%20231.913C441.758%20231.731%20442.022%20231.586%20442.302%20231.481C442.407%20231.565%20442.499%20231.665%20442.574%20231.776Z'%20fill='%233AAEEF'/%3e%3cpath%20d='M455.052%20225.713C455.052%20225.713%20449.619%20221.068%20448.667%20220.966C447.533%20220.875%20446.591%20222.635%20446.206%20224.259C446.038%20224.886%20446.078%20225.55%20446.319%20226.152C446.56%20226.754%20446.99%20227.261%20447.544%20227.598C448.406%20228.075%20455.936%20231.709%20457.263%20231.709C457.625%20231.697%20457.978%20231.596%20458.29%20231.415C458.603%20231.233%20458.867%20230.977%20459.056%20230.669C459.246%20230.361%20459.357%20230.01%20459.378%20229.648C459.4%20229.287%20459.332%20228.926%20459.18%20228.597C458.318%20227.189%20455.052%20225.713%20455.052%20225.713Z'%20fill='%23113C7A'/%3e%3cpath%20d='M461.368%20220.179C461.498%20219.92%20461.593%20219.645%20461.652%20219.362C461.581%20218.857%20461.581%20218.345%20461.652%20217.84C461.844%20217.079%20462.173%20216.409%20462.321%20215.875C462.695%20215.398%20463.035%20216.261%20462.752%20217.011C462.468%20217.76%20462.559%20218.146%20462.842%20218.203C463.523%20218.007%20464.145%20217.648%20464.657%20217.158C464.986%20216.772%20466.925%20214.887%20467.084%20215.148C467.243%20215.409%20467.277%20215.625%20466.608%20216.341C466.21%20216.689%20465.886%20217.114%20465.655%20217.59C465.625%20217.918%20465.545%20218.24%20465.417%20218.544C465.179%20219.112%20465.417%20219.498%20464.94%20220.02C464.464%20220.543%20463.704%20220.633%20463.319%20220.974L462.933%20221.304L461.368%20220.179Z'%20fill='%23FFAA83'/%3e%3cpath%20d='M457.265%20231.727C457.911%20231.803%20458.564%20231.662%20459.122%20231.327C459.68%20230.992%20460.111%20230.482%20460.35%20229.876C461.427%20227.605%20463.276%20221.665%20463.525%20221.097C463.317%20220.678%20462.992%20220.329%20462.59%20220.091C462.187%20219.853%20461.724%20219.737%20461.257%20219.757C461.257%20219.757%20459.477%20223.255%20458.456%20224.857C457.435%20226.458%20453.863%20231.091%20457.265%20231.727Z'%20fill='%23113C7A'/%3e%3cpath%20d='M450.551%20210.085C450.551%20211.163%20450.232%20212.217%20449.634%20213.113C449.036%20214.01%20448.186%20214.709%20447.191%20215.121C446.196%20215.534%20445.102%20215.642%20444.046%20215.431C442.99%20215.221%20442.02%20214.702%20441.259%20213.94C440.497%20213.177%20439.979%20212.206%20439.769%20211.148C439.559%20210.091%20439.667%20208.995%20440.079%20207.999C440.491%20207.003%20441.188%20206.151%20442.083%20205.552C442.979%20204.953%20444.031%20204.634%20445.108%20204.634C445.823%20204.632%20446.532%20204.772%20447.193%20205.046C447.854%20205.319%20448.455%20205.721%20448.96%20206.227C449.466%20206.734%20449.867%20207.335%20450.14%20207.997C450.413%20208.659%20450.553%20209.369%20450.551%20210.085Z'%20fill='%23FF8654'/%3e%3cpath%20d='M450.553%20210.449C450.553%20210.449%20450.621%20215.911%20449.419%20217.013C448.217%20218.114%20446.402%20215.979%20443.488%20215.298C440.573%20214.617%20445.847%20208.87%20445.847%20208.87L450.553%20210.449Z'%20fill='%23FF8654'/%3e%3cpath%20d='M440.533%20205.61C440.533%20205.61%20446.351%20202.203%20449.605%20205.031C452.86%20207.859%20449.14%20208.983%20448.562%20209.801C447.984%20210.619%20448.562%20211.277%20448.256%20211.868C447.95%20212.458%20447.859%20212.561%20447.859%20212.561L448.063%20213.265L447.711%20213.571C447.711%20213.571%20447.246%20212.254%20446.815%20212.288C446.385%20212.322%20446.044%20213.185%20446.192%20213.685C446.339%20214.185%20446.781%20214.741%20446.702%20215.093C446.623%20215.445%20446.158%20216.41%20445.727%20216.444C444.688%20216.361%20443.67%20216.112%20442.71%20215.706C441.201%20214.78%20439.998%20213.429%20439.251%20211.822C439.028%20211.25%20438.94%20210.633%20438.993%20210.021C439.046%20209.408%20439.239%20208.816%20439.557%20208.29C439.413%20207.798%20439.43%20207.272%20439.606%20206.79C439.781%20206.308%20440.106%20205.895%20440.533%20205.61Z'%20fill='%2396432A'/%3e%3cpath%20opacity='0.43'%20d='M668.681%20149.759L684.513%20149.656L717.481%20131.043L699.2%20122.037L668.681%20149.759Z'%20fill='%23A6D0F4'/%3e%3cpath%20opacity='0.35'%20d='M688.581%20112.949C698.196%20112.949%20705.99%20107.991%20705.99%20101.876C705.99%2095.7606%20698.196%2090.8032%20688.581%2090.8032C678.967%2090.8032%20671.173%2095.7606%20671.173%20101.876C671.173%20107.991%20678.967%20112.949%20688.581%20112.949Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M675.418%2099.2895C675.623%20101.561%20677.766%20103.117%20679.694%20103.957C681.817%20104.836%20684.1%20105.258%20686.396%20105.195C688.748%20105.202%20691.072%20104.686%20693.201%20103.685C695.027%20102.787%20696.977%20101.141%20696.977%2098.9148C697.064%2099.6711%20696.995%20100.437%20696.774%20101.166C696.554%20101.894%20696.187%20102.57%20695.696%20103.151C694.076%20104.711%20692.018%20105.737%20689.799%20106.092C685.637%20106.955%20679.977%20106.535%20676.825%20103.333C676.293%20102.748%20675.893%20102.057%20675.65%20101.304C675.408%20100.552%20675.329%2099.7568%20675.418%2098.9716V99.2895Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M678.556%2095.1075C674.326%2097.5491%20674.292%20101.513%20678.556%20103.966C680.923%20105.17%20683.54%20105.797%20686.194%20105.797C688.849%20105.797%20691.466%20105.17%20693.832%20103.966C698.063%20101.513%20698.074%2097.5491%20693.832%2095.1075C691.468%2093.8964%20688.85%2093.2649%20686.194%2093.2649C683.539%2093.2649%20680.921%2093.8964%20678.556%2095.1075Z'%20fill='white'/%3e%3cpath%20d='M685.004%2091.8394L685.026%20100.845L686.16%20101.504L686.138%2092.498L685.004%2091.8394Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M686.144%2092.498L686.166%20101.504L687.3%20100.845L687.278%2091.8394L686.144%2092.498Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M684.482%2090.2053L686.138%2091.1593L687.793%2090.2053L686.149%2089.24L684.482%2090.2053Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M696.881%2059.5533C696.881%2059.5533%20700.283%2061.5521%20701.179%2063.5849C702.075%2065.6177%20701.837%2079.893%20697.096%2086.2186C692.356%2092.5442%20683.567%2093.4414%20681.537%2092.5442C679.507%2091.647%20667.769%2085.7302%20666.873%2082.823C665.977%2079.9157%20670.479%2077.633%20672.963%2076.4974C675.447%2075.3617%20677.023%2073.7831%20678.373%2069.6834C679.722%2065.5837%20680.403%2058.6107%20681.99%2057.4864C683.578%2056.3621%20687.4%2054.5791%20696.881%2059.5533Z'%20fill='%2325437F'/%3e%3cpath%20d='M680.029%2090.57C678.374%2089.8318%20670.265%2085.8002%20666.84%2082.734C666.114%2079.8608%20670.514%2077.6576%20672.964%2076.5446C675.414%2075.4317%20677.024%2073.8304%20678.374%2069.7307C679.723%2065.6309%20680.404%2058.658%20681.991%2057.5337C683.579%2056.4094%20687.401%2054.5923%20696.882%2059.5665C697.895%2060.1825%20698.845%2060.8977%20699.717%2061.7016C700.568%2064.0751%20700.261%2077.9869%20695.589%2084.2103C690.917%2090.4337%20682.059%2091.4331%20680.029%2090.57Z'%20fill='%23254DA1'/%3e%3cpath%20d='M609.514%20118.378L606.985%20116.902L606.917%2087.9197L609.446%2089.396L609.514%20118.378Z'%20fill='%23CB6A50'/%3e%3cpath%20d='M609.446%2089.395L606.917%2087.9186L641.359%2068.0105L643.899%2069.4869L609.446%2089.395Z'%20fill='%23DBDBDB'/%3e%3cpath%20d='M643.9%2069.4895L643.968%2098.4715L609.515%20118.38L609.447%2089.3976L643.9%2069.4895Z'%20fill='%239966D7'/%3e%3cpath%20d='M611.92%2083.8906L611.852%20112.873L670.768%20146.886L670.836%20117.904L611.92%2083.8906Z'%20fill='%23A478D9'/%3e%3cpath%20d='M611.887%20100.108L670.791%20134.121L670.837%20117.904L611.921%2083.8906L611.887%20100.108Z'%20fill='%238C57CC'/%3e%3cpath%20d='M668.621%20149.703L666.092%20148.238L666.024%20119.256L668.553%20120.732L668.621%20149.703Z'%20fill='%238C57CC'/%3e%3cpath%20d='M668.553%20120.731L666.024%20119.254L700.466%2099.335L703.007%20100.811L668.553%20120.731Z'%20fill='%23DBDBDB'/%3e%3cpath%20d='M703.008%20100.814L703.076%20129.796L668.622%20149.704L668.554%20120.733L703.008%20100.814Z'%20fill='%23976EC9'/%3e%3cpath%20d='M707.733%20100.052L707.722%20102.778L668.664%20125.513V122.788L707.733%20100.052Z'%20fill='%238C57CC'/%3e%3cpath%20d='M668.663%20122.79V125.515L601.151%2086.2214L601.163%2083.4958L668.663%20122.79Z'%20fill='%238C57CC'/%3e%3cpath%20d='M707.738%20100.054L668.669%20122.79L601.168%2083.496L640.226%2060.7715L707.738%20100.054Z'%20fill='%23B195D2'/%3e%3cpath%20d='M670.777%20104.115L678.67%20108.703L691.429%20101.332L683.535%2096.7441L670.777%20104.115Z'%20fill='%238C57CC'/%3e%3cpath%20d='M669.325%20101.393L669.336%20103.358L677.229%20107.946L677.218%20105.981L669.325%20101.393Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M677.216%20105.977L677.227%20107.942L689.985%20100.56L689.974%2098.6069L677.216%20105.977Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M669.325%20101.392L677.218%20105.98L689.976%2098.6096L682.094%2094.0215L669.325%20101.392Z'%20fill='white'/%3e%3cpath%20d='M659.536%2094.9864L667.429%2099.5858L680.188%2092.204L672.294%2087.616L659.536%2094.9864Z'%20fill='white'/%3e%3cpath%20d='M666.398%2086.2649C668.212%2087.3097%20668.212%2089.0018%20666.398%2090.0353L654.853%2096.7584C653.847%2097.2737%20652.733%2097.5424%20651.604%2097.5424C650.474%2097.5424%20649.36%2097.2737%20648.355%2096.7584L636.73%2090.0353C634.938%2089.0018%20634.927%2087.3097%20636.73%2086.2649L648.275%2079.5532C649.283%2079.0378%20650.398%2078.769%20651.53%2078.769C652.662%2078.769%20653.777%2079.0378%20654.785%2079.5532L666.398%2086.2649Z'%20fill='%238C57CC'/%3e%3cpath%20d='M656.133%2088.0245C656.135%2088.0548%20656.135%2088.0852%20656.133%2088.1154L656.065%2088.1949H655.997H655.929L651.131%2090.8637L645.926%2087.9905V88.2971L651.086%2091.2839L655.883%2088.6264H655.94L656.008%2088.5583C656.01%2088.5243%20656.01%2088.4902%20656.008%2088.4561V88.0927C656.044%2088.0612%20656.087%2088.0379%20656.133%2088.0245Z'%20fill='%23BAC0D2'/%3e%3cpath%20d='M655.849%2087.5369C655.929%2087.5648%20655.999%2087.617%20656.048%2087.6861C656.097%2087.7553%20656.123%2087.8381%20656.123%2087.923C656.123%2088.0079%20656.097%2088.0907%20656.048%2088.1599C655.999%2088.2291%20655.929%2088.2812%20655.849%2088.3091L651.052%2090.9779L645.926%2087.9912L649.963%2084.9022C650.169%2084.7928%20650.399%2084.7356%20650.632%2084.7356C650.866%2084.7356%20651.095%2084.7928%20651.302%2084.9022L655.849%2087.5369Z'%20fill='white'/%3e%3cpath%20d='M662.942%2076.2336C663.158%2076.369%20663.344%2076.5463%20663.49%2076.755C663.636%2076.9637%20663.739%2077.1996%20663.793%2077.4488L666.276%2094.1202C666.333%2094.5518%20666.061%2094.7108%20665.653%2094.4836L640.396%2079.8564C640.183%2079.7221%20639.999%2079.5464%20639.855%2079.3396C639.711%2079.1329%20639.61%2078.8992%20639.557%2078.6526L637.074%2061.9811C637.006%2061.5382%20637.289%2061.3792%20637.686%2061.6177L662.942%2076.2336Z'%20fill='%23C7C9D7'/%3e%3cpath%20d='M666.672%2093.9753V93.8504L664.2%2077.1789V76.9404V76.8382V76.736L664.12%2076.6338L638.864%2062.0179H637.991H637.64C637.631%2062.0129%20637.621%2062.0103%20637.611%2062.0103C637.601%2062.0103%20637.592%2062.0129%20637.583%2062.0179L637.175%2062.3131C637.205%2062.307%20637.235%2062.307%20637.265%2062.3131H637.39H637.526L637.674%2062.3926L662.941%2076.2363L663.1%2076.3385L663.236%2076.4634L663.372%2076.6111C663.42%2076.659%20663.462%2076.7124%20663.497%2076.7701C663.535%2076.8243%20663.569%2076.8812%20663.599%2076.9404L663.678%2077.1108L663.746%2077.2811C663.752%2077.3378%20663.752%2077.3948%20663.746%2077.4515L666.23%2094.1229C666.236%2094.1682%20666.236%2094.214%20666.23%2094.2592C666.236%2094.2968%20666.236%2094.3352%20666.23%2094.3728V94.4409C666.218%2094.4777%20666.194%2094.5096%20666.162%2094.5318L666.559%2094.2365C666.594%2094.21%20666.621%2094.1748%20666.638%2094.1343V93.9753H666.672Z'%20fill='white'/%3e%3cpath%20opacity='0.2'%20d='M648.944%2085.6511L645.882%2087.9906L651.042%2090.9774L654.671%2088.9559L648.944%2085.6511Z'%20fill='%23777DB2'/%3e%3cpath%20d='M652.132%2080.7118L651.044%2091.3642L645.861%2088.3548L647.891%2078.395L652.132%2080.7118Z'%20fill='%23BAC0D2'/%3e%3cpath%20d='M606.644%20113.464C606.644%20113.464%20607.846%20115.349%20607.676%20116.031C607.506%20116.712%20606.644%20115.69%20606.644%20115.69C606.644%20115.69%20606.905%20117.961%20606.304%20118.438C605.703%20118.915%20605.442%20117.496%20605.442%20117.496C605.2%20117.659%20604.905%20117.723%20604.618%20117.674C604.331%20117.625%20604.074%20117.468%20603.899%20117.234C603.593%20116.631%20603.448%20115.958%20603.478%20115.281C603.507%20114.605%20603.711%20113.948%20604.07%20113.373C604.761%20112.26%20606.644%20113.464%20606.644%20113.464Z'%20fill='%23FF9554'/%3e%3cpath%20d='M610.772%2081.4148C610.772%2081.4148%20607.574%2081.3013%20606.089%2085.7644C604.603%2090.2275%20604.036%2097.2118%20603.82%2099.2674C603.605%20101.323%20603.503%20112.804%20603.616%20113.372C603.787%20113.662%20604.025%20113.906%20604.311%20114.083C604.597%20114.259%20604.922%20114.363%20605.257%20114.386C605.593%20114.408%20605.928%20114.348%20606.235%20114.211C606.542%20114.074%20606.811%20113.864%20607.019%20113.599C607.937%20111.544%20607.914%20102.583%20608.935%2099.1538C609.956%2095.7241%20612.485%2087.025%20612.598%2084.6174C612.652%2083.9614%20612.507%2083.3043%20612.181%2082.7326C611.855%2082.161%20611.364%2081.7016%20610.772%2081.4148Z'%20fill='%23113569'/%3e%3cpath%20d='M631.99%2074.4519C632%2073.9354%20632.084%2073.4229%20632.239%2072.9302C632.5%2072.2033%20631.729%2071.0563%20631.525%2070.3977C631.321%2069.739%20631.525%2069.5005%20631.979%2069.5459C632.432%2069.5913%20633.305%2071.5333%20633.498%2071.8172C633.691%2072.1011%20634.984%2070.2273%20635.381%2070.1592C635.778%2070.091%20636.152%2070.7043%20636.118%2071.1926C636.084%2071.6809%20637.105%2072.862%20636.628%2074.0318C636.152%2075.2015%20634.882%2076.1214%20634.36%2075.8715C633.838%2075.6217%20631.99%2074.4519%20631.99%2074.4519Z'%20fill='%23FF9554'/%3e%3cpath%20opacity='0.35'%20d='M595.057%20146.604C595.057%20153.895%20604.345%20159.812%20615.822%20159.812C627.299%20159.812%20636.575%20153.895%20636.575%20146.604C636.575%20139.313%20627.287%20133.396%20615.822%20133.396C604.356%20133.396%20595.057%20139.302%20595.057%20146.604Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M609.731%20143.59C609.312%20143.793%20608.966%20144.119%20608.738%20144.525C608.511%20144.932%20608.414%20145.398%20608.461%20145.861C608.471%20146.284%20608.551%20146.703%20608.699%20147.099C609.058%20147.392%20609.5%20147.564%20609.962%20147.59C610.424%20147.617%20610.883%20147.497%20611.273%20147.247C612.257%20146.565%20613.04%20145.632%20613.541%20144.544C614.141%20143.727%20614.657%20142.852%20615.084%20141.932C615.197%20141.285%20614.471%20140.796%20613.802%20140.887C612.512%20141.591%20611.29%20142.412%20610.15%20143.34C610.031%20143.434%20609.902%20143.514%20609.765%20143.579L609.731%20143.59Z'%20fill='%23232839'/%3e%3cpath%20d='M608.507%20106.594C608.507%20106.594%20608.235%20115.679%20608.575%20121.187C608.881%20126.093%20608.45%20140.3%20608.348%20143.457C608.321%20143.895%20608.429%20144.331%20608.655%20144.706C608.882%20145.082%20609.218%20145.379%20609.618%20145.558C609.952%20145.679%20610.31%20145.719%20610.663%20145.675C611.016%20145.632%20611.353%20145.506%20611.648%20145.308C611.902%20145.155%20612.121%20144.949%20612.289%20144.704C612.457%20144.459%20612.571%20144.181%20612.624%20143.889C613.236%20140.936%20615.277%20130.874%20615.572%20125.775C615.912%20119.767%20616.219%20112.261%20616.559%20109.876C616.899%20107.491%20608.507%20106.594%20608.507%20106.594Z'%20fill='%23113569'/%3e%3cpath%20d='M621.192%20146.817C620.742%20146.924%20620.336%20147.167%20620.028%20147.512C619.72%20147.857%20619.525%20148.288%20619.468%20148.747C619.399%20149.165%20619.399%20149.591%20619.468%20150.008C619.764%20150.36%20620.16%20150.614%20620.604%20150.736C621.047%20150.858%20621.517%20150.841%20621.952%20150.689C623.07%20150.245%20624.047%20149.502%20624.775%20148.543C625.538%20147.857%20626.23%20147.096%20626.839%20146.272C626.881%20146.117%20626.885%20145.954%20626.851%20145.797C626.818%20145.64%20626.748%20145.493%20626.648%20145.368C626.547%20145.243%20626.419%20145.144%20626.273%20145.078C626.127%20145.012%20625.968%20144.981%20625.807%20144.988C624.401%20145.401%20623.034%20145.941%20621.725%20146.601C621.586%20146.666%20621.442%20146.719%20621.294%20146.76L621.192%20146.817Z'%20fill='%23232839'/%3e%3cpath%20d='M623.76%20108.367C623.76%20108.367%20624.225%20136.213%20623.216%20146.298C623.212%20146.63%20623.135%20146.958%20622.991%20147.258C622.847%20147.557%20622.638%20147.821%20622.381%20148.032C622.123%20148.242%20621.823%20148.393%20621.501%20148.474C621.179%20148.555%20620.843%20148.564%20620.517%20148.501C620.347%20148.501%20619.201%20148.785%20619.008%20148.705C618.101%20148.365%20617.137%20121.449%20616.332%20118.326C615.527%20115.203%20613.134%20112.943%20613.361%20108.367C613.588%20103.79%20620.449%20106.084%20623.76%20108.367Z'%20fill='%23113C7A'/%3e%3cpath%20d='M624.303%20110.578C623.906%20112.599%20618.077%20113.121%20614.72%20112.576C611.363%20112.031%20607.405%20111.27%20607.518%20107.375C607.518%20107.375%20607.836%2089.92%20607.836%2086.8537C607.882%2084.9035%20608.554%2083.0201%20609.752%2081.482C609.752%2081.482%20611.635%2079.3356%20617.544%2080.5394C617.544%2080.5394%20622.352%2081.5842%20624.575%2085.1502C624.575%2085.1502%20626.423%2088.5572%20625.913%2096.6885C625.647%20101.346%20625.11%20105.983%20624.303%20110.578Z'%20fill='%23113C7A'/%3e%3cpath%20d='M612.926%2076.2691C613.196%2077.7025%20613.196%2079.1739%20612.926%2080.6073C612.846%2081.2887%20615.817%2083.5827%20618.448%2082.9808C619.98%2082.6401%20619.9%2081.8452%20619.9%2081.8452C619.153%2080.5839%20618.761%2079.1436%20618.766%2077.6773C618.959%2075.6672%20614.717%2075.8035%20612.926%2076.2691Z'%20fill='%23FF7C40'/%3e%3cpath%20d='M621.268%2082.0607L619.442%2081.0273C619.442%2081.0273%20614.758%2080.5957%20613.08%2079.4941L612.207%2080.7434C612.646%2081.4711%20613.254%2082.0829%20613.978%2082.5274C614.702%2082.972%20615.522%2083.2364%20616.369%2083.2986C617.889%2083.572%20619.457%2083.2596%20620.758%2082.4241L621.268%2082.0607Z'%20fill='%23E1E8F2'/%3e%3cpath%20d='M622.655%2084.6527C622.293%2084.6577%20621.937%2084.7455%20621.614%2084.9091C621.291%2085.0728%20621.009%2085.3081%20620.79%2085.5972C620.572%2085.8863%20620.422%2086.2215%20620.352%2086.5774C620.282%2086.9332%20620.294%2087.3003%20620.387%2087.6508C620.61%2088.525%20621.1%2089.3074%20621.79%2089.888C622.48%2090.4685%20623.334%2090.8181%20624.232%2090.8874C629.029%2091.6029%20638.362%2087.4805%20639.451%2085.3795C640.54%2083.2785%20637.036%2075.4766%20635.425%2074.2841C634.064%2073.4324%20631.807%2074.7384%20632.023%2075.8627C632.238%2076.987%20634.2%2082.5631%20634.291%2082.8583C634.382%2083.1536%20634.11%2083.165%20634.11%2083.165L624.504%2084.5164C623.89%2084.593%20623.273%2084.6385%20622.655%2084.6527Z'%20fill='%23113C7A'/%3e%3cpath%20d='M621.512%2071.262C621.525%2072.4014%20621.2%2073.519%20620.578%2074.4729C619.955%2075.4269%20619.064%2076.174%20618.017%2076.6194C616.969%2077.0648%20615.814%2077.1884%20614.696%2076.9744C613.578%2076.7604%20612.55%2076.2186%20611.74%2075.4177C610.931%2074.6168%20610.377%2073.5931%20610.15%2072.4765C609.923%2071.36%20610.033%2070.2011%20610.465%2069.1471C610.898%2068.0931%20611.633%2067.1916%20612.578%2066.5571C613.523%2065.9226%20614.635%2065.5838%20615.773%2065.5837C617.282%2065.5866%20618.73%2066.1836%20619.804%2067.2459C620.877%2068.3083%20621.491%2069.7508%20621.512%2071.262Z'%20fill='%23FF8654'/%3e%3cpath%20d='M621.513%2071.6276C621.513%2071.6276%20621.581%2077.374%20620.379%2078.5437C619.177%2079.7134%20617.204%2077.4081%20614.13%2076.738C611.057%2076.068%20616.625%2069.9241%20616.625%2069.9241L621.513%2071.6276Z'%20fill='%23FF8654'/%3e%3cpath%20d='M610.956%2066.5292C610.956%2066.5292%20617.091%2062.9746%20620.516%2065.916C623.941%2068.8573%20620.028%2070.0952%20619.382%2070.947C618.735%2071.7987%20619.382%2072.5028%20619.053%2073.1161C618.724%2073.7293%20618.645%2073.8542%20618.645%2073.8542L618.849%2074.5924L618.486%2074.9218C618.486%2074.9218%20618.021%2073.5363%20617.579%2073.5363C617.136%2073.5363%20616.762%2074.4789%20616.921%2075.0126C617.08%2075.5464%20617.533%2076.1483%20617.454%2076.4776C617.375%2076.8069%20616.887%2077.8745%20616.433%2077.9199C615.337%2077.8264%20614.261%2077.562%20613.246%2077.1363C611.663%2076.1551%20610.399%2074.7349%20609.606%2073.0479C609.371%2072.4436%20609.278%2071.793%20609.335%2071.1469C609.392%2070.5008%20609.597%2069.8766%20609.935%2069.323C609.789%2068.809%20609.809%2068.262%20609.992%2067.7602C610.176%2067.2584%20610.513%2066.8275%20610.956%2066.5292Z'%20fill='%2396432A'/%3e%3cpath%20d='M236.658%20220.478L247.715%20223.442L236.703%20239.171L236.692%20235.049L213.886%20248.234L213.863%20238.444L236.669%20225.259L236.658%20220.478Z'%20fill='white'/%3e%3cpath%20d='M607.506%20199.468L618.564%20202.432L607.552%20218.161L607.54%20214.039L584.734%20227.223L584.711%20217.434L607.518%20204.249L607.506%20199.468Z'%20fill='white'/%3e%3cpath%20d='M361.999%20210.934L372.898%20226.061L361.954%20228.559L361.965%20224.596L337.537%20210.48L337.56%20200.781L361.988%20214.898L361.999%20210.934Z'%20fill='white'/%3e%3cpath%20d='M84.669%20223.126C84.669%20223.126%2085.8712%20225.011%2085.7011%20225.704C85.5309%20226.396%2084.669%20225.352%2084.669%20225.352C84.669%20225.352%2084.9299%20227.623%2084.3288%20228.1C83.7277%20228.577%2083.4783%20227.157%2083.4783%20227.157C83.2359%20227.324%2082.9385%20227.39%2082.6487%20227.341C82.3589%20227.292%2082.0993%20227.133%2081.9246%20226.896C81.6177%20226.292%2081.4731%20225.618%2081.505%20224.941C81.5368%20224.264%2081.7439%20223.607%2082.106%20223.035C82.7865%20221.922%2084.669%20223.126%2084.669%20223.126Z'%20fill='%23FF9554'/%3e%3cpath%20d='M88.7642%20191.074C88.7642%20191.074%2085.5547%20190.961%2084.0691%20195.424C82.5834%20199.887%2082.0164%20206.872%2081.8009%20208.927C81.5854%20210.983%2081.4834%20222.464%2081.5968%20223.032C81.7673%20223.322%2082.0059%20223.566%2082.292%20223.742C82.578%20223.919%2082.9027%20224.023%2083.238%20224.045C83.5733%20224.068%2083.9089%20224.008%2084.2158%20223.871C84.5227%20223.734%2084.7916%20223.524%2084.999%20223.259C85.9063%20221.204%2085.8836%20212.255%2086.9043%20208.813C87.925%20205.372%2090.454%20196.685%2090.5674%20194.277C90.6235%20193.624%2090.4815%20192.968%2090.1598%20192.397C89.8381%20191.826%2089.3517%20191.365%2088.7642%20191.074Z'%20fill='%23113569'/%3e%3cpath%20opacity='0.35'%20d='M93.849%20269.47C105.317%20269.47%20114.614%20263.556%20114.614%20256.262C114.614%20248.967%20105.317%20243.054%2093.849%20243.054C82.3808%20243.054%2073.0839%20248.967%2073.0839%20256.262C73.0839%20263.556%2082.3808%20269.47%2093.849%20269.47Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M87.7696%20253.262C87.3488%20253.462%2087%20253.788%2086.7707%20254.195C86.5414%20254.601%2086.4427%20255.068%2086.4881%20255.533C86.501%20255.956%2086.5814%20256.374%2086.7262%20256.771C87.0908%20257.053%2087.5323%20257.216%2087.9922%20257.241C88.452%20257.265%2088.9084%20257.149%2089.3006%20256.907C90.2813%20256.227%2091.064%20255.298%2091.5688%20254.216C92.1687%20253.395%2092.6854%20252.516%2093.1111%20251.592C93.2359%20250.956%2092.4987%20250.457%2091.8296%20250.559C90.5388%20251.261%2089.3163%20252.082%2088.1778%20253.012C88.0587%20253.102%2087.9292%20253.179%2087.7923%20253.239L87.7696%20253.262Z'%20fill='%23232839'/%3e%3cpath%20d='M86.4744%20216.253C86.4744%20216.253%2086.2022%20225.339%2086.5424%20230.847C86.8486%20235.753%2086.4177%20249.96%2086.327%20253.117C86.2944%20253.554%2086.3979%20253.991%2086.6233%20254.367C86.8487%20254.744%2087.1849%20255.041%2087.5858%20255.218C87.9192%20255.34%2088.2766%20255.382%2088.6291%20255.341C88.9817%20255.299%2089.3197%20255.175%2089.6158%20254.979C89.8692%20254.822%2090.0869%20254.614%2090.2549%20254.367C90.4229%20254.121%2090.5374%20253.842%2090.5911%20253.548C91.2035%20250.607%2093.2562%20240.534%2093.5397%20235.435C93.88%20229.427%2094.1862%20221.92%2094.5264%20219.535C94.8666%20217.151%2086.4744%20216.253%2086.4744%20216.253Z'%20fill='%23113569'/%3e%3cpath%20d='M99.222%20256.476C98.7745%20256.585%2098.371%20256.829%2098.0651%20257.173C97.7592%20257.518%2097.5654%20257.948%2097.5095%20258.406C97.4369%20258.823%2097.4369%20259.25%2097.5095%20259.667C97.8043%20260.021%2098.1998%20260.277%2098.6435%20260.401C99.0871%20260.525%2099.5579%20260.51%2099.9931%20260.359C101.11%20259.911%20102.085%20259.169%20102.817%20258.213C103.58%20257.528%20104.271%20256.767%20104.881%20255.942C105.142%20255.34%20104.541%20254.658%20103.849%20254.658C102.44%20255.071%20101.073%20255.614%2099.7663%20256.282C99.627%20256.344%2099.4828%20256.393%2099.3354%20256.43L99.222%20256.476Z'%20fill='%23232839'/%3e%3cpath%20d='M101.785%20218.026C101.785%20218.026%20102.25%20245.873%20101.24%20255.969C101.235%20256.3%20101.157%20256.627%20101.012%20256.925C100.867%20257.223%20100.658%20257.486%20100.401%20257.695C100.144%20257.904%2099.8439%20258.054%2099.5226%20258.134C99.2013%20258.215%2098.8663%20258.224%2098.5411%20258.161C98.371%20258.161%2097.2256%20258.444%2097.0441%20258.365C96.1255%20258.024%2095.1616%20231.109%2094.3564%20227.986C93.5512%20224.863%2091.1582%20222.603%2091.3851%20218.026C91.6119%20213.45%2098.4731%20215.744%20101.785%20218.026Z'%20fill='%23113C7A'/%3e%3cpath%20d='M102.342%20220.236C101.934%20222.258%2096.1044%20222.78%2092.7475%20222.246C89.3906%20221.713%2085.4326%20220.94%2085.546%20217.034C85.546%20217.034%2085.8636%20199.579%2085.8636%20196.524C85.9205%20194.584%2086.5961%20192.714%2087.7915%20191.186C87.7915%20191.186%2089.6628%20189.04%2095.5713%20190.244C95.5713%20190.244%20100.391%20191.3%20102.603%20194.854C102.603%20194.854%20104.451%20198.261%20103.941%20206.393C103.673%20211.034%20103.139%20215.656%20102.342%20220.236Z'%20fill='%23113C7A'/%3e%3cpath%20d='M90.952%20185.964C91.2221%20187.397%2091.2221%20188.868%2090.952%20190.302C90.8726%20190.983%2093.8439%20193.277%2096.475%20192.687C98.006%20192.346%2097.9266%20191.551%2097.9266%20191.551C97.1797%20190.29%2096.7878%20188.849%2096.7925%20187.383C97.0307%20185.328%2092.7438%20185.498%2090.952%20185.964Z'%20fill='%23FF7C40'/%3e%3cpath%20d='M99.2954%20191.722L97.4695%20190.7C97.4695%20190.7%2092.7858%20190.257%2091.1073%20189.156L90.2341%20190.405C90.6738%20191.134%2091.2808%20191.747%2092.0047%20192.193C92.7287%20192.639%2093.5485%20192.906%2094.3962%20192.972C95.9183%20193.242%2097.4862%20192.925%2098.7851%20192.086L99.2954%20191.722Z'%20fill='%23E1E8F2'/%3e%3cpath%20d='M99.5354%20180.913C99.5354%20182.049%2099.1988%20183.16%2098.5683%20184.105C97.9377%20185.05%2097.0415%20185.787%2095.9929%20186.222C94.9444%20186.657%2093.7905%20186.77%2092.6774%20186.549C91.5642%20186.327%2090.5417%20185.78%2089.7392%20184.976C88.9367%20184.172%2088.3901%20183.148%2088.1687%20182.034C87.9473%20180.919%2088.0609%20179.764%2088.4953%20178.714C88.9296%20177.664%2089.6651%20176.766%2090.6088%20176.135C91.5525%20175.503%2092.6619%20175.166%2093.7969%20175.166C95.3188%20175.166%2096.7785%20175.772%2097.8546%20176.849C98.9308%20177.927%2099.5354%20179.389%2099.5354%20180.913Z'%20fill='%23FF8654'/%3e%3cpath%20d='M99.5445%20181.286C99.5445%20181.286%2099.6125%20187.043%2098.4104%20188.202C97.2083%20189.36%2095.2349%20187.066%2092.1616%20186.396C89.0882%20185.726%2094.6566%20179.582%2094.6566%20179.582L99.5445%20181.286Z'%20fill='%23FF8654'/%3e%3cpath%20d='M88.9823%20176.191C88.9823%20176.191%2095.1177%20172.636%2098.5426%20175.578C101.968%20178.519%2098.055%20179.757%2097.4086%20180.62C96.7621%20181.483%2097.4085%20182.176%2097.0797%20182.789C96.7508%20183.402%2096.6714%20183.516%2096.6714%20183.516L96.8755%20184.254L96.5126%20184.583C96.5126%20184.583%2096.025%20183.198%2095.5713%20183.232C95.1177%20183.266%2094.7548%20184.175%2094.9136%20184.708C95.0723%20185.242%2095.526%20185.844%2095.4466%20186.185C95.3672%20186.525%2094.8795%20187.57%2094.4259%20187.616C93.3294%20187.522%2092.2542%20187.258%2091.2391%20186.832C89.6561%20185.851%2088.3914%20184.431%2087.5987%20182.744C87.3635%20182.139%2087.2708%20181.489%2087.3279%20180.843C87.3849%20180.196%2087.5902%20179.572%2087.9276%20179.019C87.7789%20178.496%2087.8011%20177.94%2087.9908%20177.431C88.1806%20176.922%2088.5281%20176.488%2088.9823%20176.191Z'%20fill='%2396432A'/%3e%3cpath%20d='M109.698%20224.2L104.028%20227.607L104.776%20237.635L117.161%20229.969L116.684%20220.407L109.698%20224.2Z'%20fill='%2394C3FF'/%3e%3cpath%20d='M110.776%20221.454C110.776%20221.454%20112.126%20222.873%20112.409%20223.305C112.693%20223.737%20112.84%20225.928%20112.477%20226.212C111.69%20226.714%20110.789%20227.007%20109.858%20227.064C109.291%20226.916%20108.939%20226.632%20108.939%20226.417C108.939%20226.201%20108.803%20224.793%20108.803%20224.793C108.803%20224.793%20107.805%20224.077%20107.737%20223.657C107.707%20223.3%20107.73%20222.94%20107.805%20222.59L110.776%20221.454Z'%20fill='%23FF9554'/%3e%3cpath%20d='M100.629%20192.584C101.648%20193.135%20102.542%20193.89%20103.257%20194.802C103.971%20195.715%20104.489%20196.765%20104.78%20197.888C105.539%20201.488%20107.048%20210.755%20107.048%20210.755L111.21%20221.237C111.111%20221.644%20110.917%20222.022%20110.645%20222.34C110.372%20222.658%20110.028%20222.907%20109.641%20223.067C109.254%20223.226%20108.835%20223.292%20108.418%20223.258C108%20223.224%20107.597%20223.092%20107.241%20222.872C107.241%20222.872%20102.704%20214.162%20101.57%20211.709C100.436%20209.256%2099.302%20197.888%2099.1092%20195.616C99.0222%20195.016%2099.1212%20194.403%2099.393%20193.861C99.6647%20193.319%20100.096%20192.873%20100.629%20192.584Z'%20fill='%23113C7A'/%3e%3cpath%20d='M364.359%20134.939C367.058%20136.495%20367.069%20139.016%20364.359%20140.617C362.853%20141.384%20361.188%20141.784%20359.499%20141.784C357.81%20141.784%20356.145%20141.384%20354.639%20140.617C351.952%20139.062%20351.94%20136.54%20354.639%20134.939C356.145%20134.172%20357.81%20133.772%20359.499%20133.772C361.188%20133.772%20362.853%20134.172%20364.359%20134.939Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M365.159%20121.041V136.338C365.107%20136.898%20364.908%20137.434%20364.581%20137.891C364.254%20138.348%20363.812%20138.709%20363.299%20138.939C361.894%20139.654%20360.34%20140.027%20358.763%20140.027C357.186%20140.027%20355.632%20139.654%20354.227%20138.939C353.706%20138.706%20353.256%20138.338%20352.925%20137.872C352.594%20137.407%20352.394%20136.862%20352.344%20136.293V121.007C352.393%20121.574%20352.594%20122.119%20352.925%20122.582C353.256%20123.046%20353.706%20123.411%20354.227%20123.641C355.631%20124.359%20357.186%20124.733%20358.763%20124.733C360.34%20124.733%20361.895%20124.359%20363.299%20123.641C363.811%20123.411%20364.253%20123.049%20364.58%20122.592C364.906%20122.135%20365.106%20121.6%20365.159%20121.041Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M363.266%20118.394C365.773%20119.848%20365.795%20122.199%20363.266%20123.652C361.862%20124.37%20360.307%20124.744%20358.73%20124.744C357.153%20124.744%20355.598%20124.37%20354.194%20123.652C351.687%20122.21%20351.676%20119.859%20354.194%20118.406C355.598%20117.689%20357.152%20117.314%20358.728%20117.312C360.305%20117.31%20361.86%20117.681%20363.266%20118.394Z'%20fill='white'/%3e%3cpath%20d='M362.267%20118.962C364.229%20120.097%20364.229%20121.914%20362.267%20123.05C361.175%20123.607%20359.966%20123.898%20358.74%20123.898C357.514%20123.898%20356.306%20123.607%20355.213%20123.05C353.263%20121.914%20353.251%20120.097%20355.213%20118.973C356.303%20118.409%20357.512%20118.114%20358.739%20118.112C359.966%20118.11%20361.175%20118.402%20362.267%20118.962Z'%20fill='%23713336'/%3e%3cpath%20d='M353.838%20121.482C353.838%20121.482%20350.629%20110.795%20349.495%20109.183C349.495%20107.774%20352.421%20109.467%20353.555%20112.124C354.509%20114.926%20355.233%20117.801%20355.721%20120.721C355.721%20120.721%20355.539%20107.014%20357.898%20103.993C359.406%20104.367%20358.465%20119.404%20358.272%20120.539C358.272%20120.539%20362.99%20110.511%20366.109%20108.433C367.527%20108.626%20361.573%20121.005%20361.573%20121.005C361.573%20121.005%20364.022%20116.371%20368.456%20115.52C366.949%20117.729%20365.309%20119.846%20363.546%20121.857C363.546%20121.857%20361.947%20124.321%20357.694%20123.844C357.705%20123.844%20354.779%20123.651%20353.838%20121.482Z'%20fill='%234CA15C'/%3e%3cpath%20d='M231.058%2046.2549L231.069%2048.4808L225.864%2051.4903L225.875%2056.2941L223.732%2057.532L223.721%2050.5023L231.058%2046.2549Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M231.075%2048.4773L251.965%2036.4053V49.6471V55.632L248.2%2057.8125L225.881%2070.7135V56.2907V51.4868L231.075%2048.4773ZM251.398%2055.2913L251.341%2037.4614L226.482%2051.8389V69.6687L251.353%2055.2913'%20fill='%23E6F4FF'/%3e%3cpath%20d='M254.342%2048.2988L254.364%2056.7481L248.24%2060.28V57.8157L252.006%2055.6352L251.994%2049.6503L254.342%2048.2988Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M252.028%2045.9031L273.95%2033.4109V54.9884L291.336%2066.7198'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M243.33%2056.6934H243.398H243.466L243.545%2056.6366H243.613H243.67L243.738%2056.5798V56.523H243.806L243.874%2056.4662L244.01%2056.33L244.067%2056.2732L244.124%2056.205H244.192V56.1369L244.248%2056.0687C244.319%2056.0064%20244.383%2055.938%20244.441%2055.8643L244.498%2055.7962V55.7281L244.555%2055.6599L244.611%2055.5918L244.679%2055.5236L244.906%2055.2284V55.1602L244.963%2055.0807V55.0126L245.224%2054.6265V54.547L245.28%2054.4788L245.564%2054.0019V53.9224V53.8315C245.643%2053.6952%20245.711%2053.5589%20245.779%2053.4227C244.948%2053.3118%20244.111%2053.2511%20243.273%2053.241C243.251%2053.2815%20243.224%2053.3195%20243.194%2053.3545C242.873%2053.8563%20242.447%2054.2825%20241.946%2054.6038C241.758%2054.7243%20241.547%2054.8047%20241.327%2054.8399C241.106%2054.8751%20240.881%2054.8643%20240.665%2054.8082H240.585C240.517%2054.899%20239.043%2056.6366%20238.215%2057.7268L238.295%2057.8063L238.431%2057.8972H238.487L238.646%2057.9653H238.703H238.873H239.882H240.018H240.268H240.415H240.472H240.744H240.824H240.88H240.971H241.062H241.152H241.22L243.33%2056.6934Z'%20fill='%234B5CC0'/%3e%3cpath%20d='M242.196%2053.4647C242.141%2053.5833%20242.076%2053.6972%20242.003%2053.8054C242.219%2053.8615%20242.445%2053.8723%20242.665%2053.8371C242.886%2053.802%20243.096%2053.7216%20243.284%2053.601C243.786%2053.2798%20244.211%2052.8536%20244.532%2052.3518C244.45%2052.3375%20244.375%2052.2977%20244.317%2052.2382C244.215%2051.9725%20244.154%2051.6931%20244.135%2051.4092L243.602%2052.1587C243.52%2052.2863%20243.412%2052.3948%20243.284%2052.4767C243.179%2052.5179%20243.061%2052.5179%20242.956%2052.4767L242.411%2052.3291C242.375%2052.7136%20242.303%2053.0938%20242.196%2053.4647Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M242.081%2050.0277C242.009%2050.0798%20241.928%2050.1183%20241.843%2050.1413L241.718%2051.0839V51.4019C241.712%2051.4623%20241.712%2051.5232%20241.718%2051.5836C241.737%2051.7642%20241.807%2051.9357%20241.919%2052.0783C242.032%2052.221%20242.182%2052.3289%20242.353%2052.3899L242.897%2052.5375C243.003%2052.5787%20243.12%2052.5787%20243.226%2052.5375C243.354%2052.4556%20243.462%2052.3471%20243.544%2052.2195L244.077%2051.47C244.405%2051.009%20244.63%2050.482%20244.734%2049.9255V49.6757V49.051L244.292%2047.6655C244.292%2047.6655%20244.224%2047.5633%20244.065%2047.6655C243.922%2047.7614%20243.798%2047.8849%20243.702%2048.0289C243.283%2048.6308%20243.238%2049.1646%20242.512%2049.6984C242.373%2049.8145%20242.229%2049.9244%20242.081%2050.0277Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M242.723%2046.82C242.015%2047.47%20241.55%2048.344%20241.408%2049.2958C241.369%2049.7306%20241.407%2050.169%20241.521%2050.5904C241.567%2050.784%20241.628%2050.9738%20241.703%2051.1582V51.0787L241.828%2050.1361C241.913%2050.1132%20241.994%2050.0747%20242.066%2050.0226C242.278%2049.8989%20242.482%2049.7623%20242.678%2049.6137C243.404%2049.0913%20243.449%2048.5462%20243.869%2047.9443C243.965%2047.8003%20244.088%2047.6768%20244.232%2047.5809C244.391%2047.4787%20244.459%2047.5809%20244.459%2047.5809L244.901%2048.9664C244.901%2048.9664%20244.901%2048.7847%20245.003%2048.5462C245.105%2048.3077%20245.128%2047.9784%20245.162%2047.7626C245.21%2047.2124%20245.057%2046.6633%20244.731%2046.2181C244.493%2045.991%20243.858%2046.0478%20243.222%2046.4112C243.043%2046.5301%20242.875%2046.6671%20242.723%2046.82Z'%20fill='%2396432A'/%3e%3cpath%20d='M244.567%2052.3549C244.597%2052.3199%20244.624%2052.2818%20244.647%2052.2413C245.489%2052.2518%20246.329%2052.3124%20247.164%2052.4231C247.842%2051.1363%20248.21%2049.7094%20248.242%2048.2552C248.242%2045.1776%20246.064%2043.9283%20243.376%2045.4842C241.967%2046.3993%20240.794%2047.6361%20239.954%2049.093C239.114%2050.5499%20238.632%2052.1854%20238.545%2053.8653C238.506%2054.4056%20238.587%2054.948%20238.783%2055.4528C238.979%2055.9577%20239.285%2056.4124%20239.679%2056.784L239.6%2056.7045C240.428%2055.5688%20241.868%2053.8767%20241.97%2053.7858H242.049C242.123%2053.6777%20242.187%2053.5637%20242.242%2053.4451C242.338%2053.0731%20242.399%2052.6929%20242.424%2052.3095C242.253%2052.2485%20242.103%2052.1405%20241.99%2051.9979C241.878%2051.8553%20241.808%2051.6838%20241.789%2051.5032C241.771%2051.5374%20241.743%2051.5652%20241.709%2051.5827C241.301%2051.7303%20241.085%2050.9581%20241.346%2050.6514L241.46%2050.5492H241.539C241.425%2050.1278%20241.387%2049.6894%20241.426%2049.2546C241.568%2048.3028%20242.033%2047.4289%20242.741%2046.7788C242.902%2046.6365%20243.077%2046.5109%20243.263%2046.4041C243.898%2046.0406%20244.533%2045.9839%20244.771%2046.211C245.098%2046.6562%20245.251%2047.2053%20245.202%2047.7555C245.202%2047.9713%20245.1%2048.2893%20245.043%2048.5391C245.068%2048.5068%20245.099%2048.4798%20245.134%2048.4596C245.171%2048.4482%20245.211%2048.4482%20245.248%2048.4596C245.508%2048.4596%20245.304%2049.493%20244.919%2049.7883H244.851C244.746%2050.3448%20244.521%2050.8718%20244.193%2051.3328C244.2%2051.6244%20244.258%2051.9126%20244.363%2052.1846C244.409%2052.2631%20244.482%2052.3233%20244.567%2052.3549Z'%20fill='%2358AFFB'/%3e%3cpath%20d='M237.782%2056.8159V57.7358L229.333%2062.6191V61.6993L237.782%2056.8159Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M233.597%2057.0879V58.0078L229.322%2060.4835V59.5523L233.597%2057.0879Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M230.977%2055.9329V56.8641L229.322%2057.8294V56.8868L230.977%2055.9329Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M237.782%2071.5825V72.5024L229.333%2077.3857V76.4659L237.782%2071.5825Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M233.597%2071.8525V72.7724L229.322%2075.2481V74.3169L233.597%2071.8525Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M230.977%2070.6956V71.6268L229.322%2072.5921V71.6495L230.977%2070.6956Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M237.782%2080.6665V81.5864L229.333%2086.4697V85.5498L237.782%2080.6665Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M233.597%2080.9365V81.8564L229.322%2084.3321V83.4009L233.597%2080.9365Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M230.977%2079.7815V80.7127L229.322%2081.678V80.7354L230.977%2079.7815Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M310.242%2026.2321L310.162%2053.4197L294.694%2044.4821L294.773%2017.2944L310.242%2026.2321Z'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M308.224%2027.3716L308.757%2027.0649L308.677%2054.2526L308.144%2054.5592L308.224%2027.3716Z'%20fill='%23BDC5CB'/%3e%3cpath%20d='M292.754%2018.4301L293.287%2018.1121L308.756%2027.0611L308.223%2027.3677L292.754%2018.4301Z'%20fill='white'/%3e%3cpath%20d='M308.222%2027.3698L308.143%2054.5574L292.674%2045.6198L292.753%2018.4321L308.222%2027.3698Z'%20fill='%23EAF1F7'/%3e%3cpath%20d='M297.045%2028.5267V28.7653C297.045%2028.7974%20297.037%2028.829%20297.021%2028.8568C297.005%2028.8847%20296.983%2028.9079%20296.955%2028.924C296.927%2028.9402%20296.896%2028.9487%20296.864%2028.9488C296.832%2028.9489%20296.8%2028.9405%20296.773%2028.9244L295.638%2028.2767C295.611%2028.2598%20295.588%2028.2364%20295.572%2028.2086C295.557%2028.1809%20295.548%2028.1496%20295.547%2028.1176V27.879C295.547%2027.847%20295.555%2027.8154%20295.571%2027.7875C295.587%2027.7597%20295.61%2027.7365%20295.637%2027.7203C295.665%2027.7042%20295.696%2027.6956%20295.728%2027.6956C295.76%2027.6955%20295.792%2027.7039%20295.819%2027.7199L296.954%2028.3676C296.982%2028.3837%20297.005%2028.4069%20297.021%2028.4349C297.037%2028.4628%20297.045%2028.4945%20297.045%2028.5267Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M300.612%2031.7523V31.9908C300.612%2032.0228%20300.604%2032.0544%20300.588%2032.0822C300.573%2032.1101%20300.55%2032.1332%20300.522%2032.1494C300.494%2032.1655%20300.463%2032.174%20300.431%2032.1741C300.399%2032.1742%20300.368%2032.1658%20300.34%2032.1498L295.645%2029.4583C295.617%2029.4422%20295.594%2029.419%20295.578%2029.391C295.562%2029.3631%20295.554%2029.3314%20295.554%2029.2993V29.0608C295.554%2029.0287%20295.562%2028.9972%20295.578%2028.9694C295.594%2028.9415%20295.616%2028.9183%20295.644%2028.9022C295.672%2028.8861%20295.703%2028.8775%20295.735%2028.8774C295.767%2028.8774%20295.799%2028.8858%20295.826%2028.9018L300.521%2031.5933C300.548%2031.6102%20300.571%2031.6336%20300.587%2031.6613C300.603%2031.6891%20300.611%2031.7204%20300.612%2031.7523Z'%20fill='%2394A3C0'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M298.667%2033.0225V33.261C298.667%2033.293%20298.659%2033.3246%20298.643%2033.3524C298.627%2033.3803%20298.604%2033.4035%20298.576%2033.4196C298.549%2033.4357%20298.517%2033.4443%20298.485%2033.4444C298.453%2033.4444%20298.422%2033.436%20298.394%2033.42L295.639%2031.8301C295.61%2031.815%20295.586%2031.792%20295.57%2031.7638C295.554%2031.7357%20295.546%2031.7035%20295.548%2031.6711V31.4326C295.547%2031.4006%20295.556%2031.369%20295.571%2031.3412C295.587%2031.3133%20295.61%2031.2902%20295.638%2031.274C295.665%2031.2579%20295.697%2031.2493%20295.729%2031.2493C295.761%2031.2492%20295.792%2031.2576%20295.82%2031.2736L298.576%2032.8635C298.604%2032.8796%20298.627%2032.9028%20298.643%2032.9308C298.659%2032.9587%20298.667%2032.9904%20298.667%2033.0225Z'%20fill='%2394A3C0'/%3e%3c/g%3e%3cpath%20d='M299.875%2032.5257V32.7642C299.875%2032.7962%20299.867%2032.8278%20299.851%2032.8556C299.835%2032.8835%20299.813%2032.9066%20299.785%2032.9228C299.757%2032.9389%20299.726%2032.9475%20299.694%2032.9475C299.662%2032.9476%20299.63%2032.9392%20299.603%2032.9232L295.645%2030.6519C295.617%2030.6358%20295.594%2030.6126%20295.578%2030.5847C295.562%2030.5567%20295.554%2030.525%20295.554%2030.4929V30.2544C295.554%2030.2223%20295.562%2030.1908%20295.578%2030.163C295.594%2030.1351%20295.616%2030.1119%20295.644%2030.0958C295.672%2030.0797%20295.703%2030.0711%20295.735%2030.071C295.767%2030.071%20295.799%2030.0794%20295.826%2030.0954L299.784%2032.3667C299.812%2032.3828%20299.835%2032.406%20299.851%2032.4339C299.867%2032.4619%20299.875%2032.4935%20299.875%2032.5257Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M297.045%2034.4908V34.7295C297.045%2034.7615%20297.037%2034.7931%20297.021%2034.8209C297.005%2034.8488%20296.983%2034.872%20296.955%2034.8881C296.927%2034.9043%20296.896%2034.9128%20296.864%2034.9129C296.832%2034.913%20296.8%2034.9046%20296.773%2034.8885L295.638%2034.2408C295.611%2034.2239%20295.588%2034.2005%20295.572%2034.1727C295.557%2034.145%20295.548%2034.1137%20295.547%2034.0817V33.8431C295.547%2033.8111%20295.555%2033.7795%20295.571%2033.7516C295.587%2033.7238%20295.61%2033.7006%20295.637%2033.6844C295.665%2033.6683%20295.696%2033.6597%20295.728%2033.6597C295.76%2033.6596%20295.792%2033.668%20295.819%2033.684L296.954%2034.3317C296.982%2034.3478%20297.005%2034.371%20297.021%2034.399C297.037%2034.4269%20297.045%2034.4586%20297.045%2034.4908Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M300.612%2037.7145V37.9529C300.612%2037.985%20300.604%2038.0165%20300.588%2038.0444C300.573%2038.0722%20300.55%2038.0954%20300.522%2038.1115C300.494%2038.1277%20300.463%2038.1362%20300.431%2038.1363C300.399%2038.1363%20300.368%2038.128%20300.34%2038.1119L295.645%2035.4204C295.617%2035.4043%20295.594%2035.3811%20295.578%2035.3532C295.562%2035.3253%20295.554%2035.2936%20295.554%2035.2614V35.0229C295.554%2034.9909%20295.562%2034.9594%20295.578%2034.9315C295.594%2034.9037%20295.616%2034.8805%20295.644%2034.8644C295.672%2034.8482%20295.703%2034.8397%20295.735%2034.8396C295.767%2034.8395%20295.799%2034.8479%20295.826%2034.8639L300.521%2037.5555C300.548%2037.5724%20300.571%2037.5958%20300.587%2037.6235C300.603%2037.6513%20300.611%2037.6825%20300.612%2037.7145Z'%20fill='%2394A3C0'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M298.667%2038.9906V39.229C298.667%2039.2611%20298.659%2039.2926%20298.643%2039.3205C298.627%2039.3483%20298.604%2039.3715%20298.576%2039.3876C298.549%2039.4038%20298.517%2039.4123%20298.485%2039.4124C298.453%2039.4125%20298.422%2039.404%20298.394%2039.388L295.639%2037.7981C295.61%2037.783%20295.586%2037.76%20295.57%2037.7319C295.554%2037.7037%20295.546%2037.6715%20295.548%2037.6391V37.4006C295.547%2037.3686%20295.556%2037.3371%20295.571%2037.3092C295.587%2037.2814%20295.61%2037.2582%20295.638%2037.242C295.665%2037.2259%20295.697%2037.2174%20295.729%2037.2173C295.761%2037.2172%20295.792%2037.2256%20295.82%2037.2416L298.576%2038.8316C298.604%2038.8477%20298.627%2038.8708%20298.643%2038.8988C298.659%2038.9267%20298.667%2038.9584%20298.667%2038.9906Z'%20fill='%2394A3C0'/%3e%3c/g%3e%3cpath%20d='M299.875%2038.4879V38.7264C299.875%2038.7584%20299.867%2038.7899%20299.851%2038.8178C299.835%2038.8456%20299.813%2038.8688%20299.785%2038.8849C299.757%2038.9011%20299.726%2038.9096%20299.694%2038.9097C299.662%2038.9098%20299.63%2038.9014%20299.603%2038.8853L295.645%2036.614C295.617%2036.5979%20295.594%2036.5747%20295.578%2036.5468C295.562%2036.5189%20295.554%2036.4872%20295.554%2036.455V36.2165C295.554%2036.1845%20295.562%2036.153%20295.578%2036.1251C295.594%2036.0973%20295.616%2036.0741%20295.644%2036.0579C295.672%2036.0418%20295.703%2036.0333%20295.735%2036.0332C295.767%2036.0331%20295.799%2036.0415%20295.826%2036.0576L299.784%2038.3289C299.812%2038.345%20299.835%2038.3682%20299.851%2038.3961C299.867%2038.424%20299.875%2038.4557%20299.875%2038.4879Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M316.193%2026.9705H314.492V28.6739H316.193V26.9705Z'%20fill='white'/%3e%3cpath%20d='M321.292%2029.8127H317.323V33.7876H321.292V29.8127Z'%20fill='white'/%3e%3cpath%20d='M525.999%20135.142H524.298V136.845H525.999V135.142Z'%20fill='white'/%3e%3cpath%20d='M531.102%20137.982H527.133V141.957H531.102V137.982Z'%20fill='white'/%3e%3cpath%20d='M625.797%200H624.096V1.70349H625.797V0Z'%20fill='white'/%3e%3cpath%20d='M630.903%202.83838H626.934V6.81319H630.903V2.83838Z'%20fill='white'/%3e%3cpath%20d='M541.221%20108.171H539.52V109.875H541.221V108.171Z'%20fill='white'/%3e%3cpath%20d='M546.324%20111.01H542.354V114.984H546.324V111.01Z'%20fill='white'/%3e%3cpath%20d='M394.448%20207.254H392.747V208.958H394.448V207.254Z'%20fill='white'/%3e%3cpath%20d='M399.547%20210.095H395.578V214.07H399.547V210.095Z'%20fill='white'/%3e%3cpath%20d='M81.4377%20163.34H79.7366V165.044H81.4377V163.34Z'%20fill='white'/%3e%3cpath%20d='M86.5408%20166.177H82.5715V170.152H86.5408V166.177Z'%20fill='white'/%3e%3cpath%20d='M195.978%20272.556H194.277V274.26H195.978V272.556Z'%20fill='white'/%3e%3cpath%20d='M201.082%20275.397H197.112V279.372H201.082V275.397Z'%20fill='white'/%3e%3cpath%20d='M609.762%20152.212V153.132L601.313%20158.016V157.096L609.762%20152.212Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M605.581%20152.484V153.404L601.306%20155.88V154.949L605.581%20152.484Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M602.957%20151.329V152.26L601.301%20153.226L601.29%20152.283L602.957%20151.329Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M401.858%20174.723V175.654L393.409%20180.537V179.606L401.858%20174.723Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M397.677%20174.997V175.928L393.401%20178.392V177.472L397.677%20174.997Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M395.057%20173.847V174.779L393.402%20175.733L393.39%20174.801L395.057%20173.847Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M518.674%20137.212C520.036%20138.1%20521.17%20139.297%20521.984%20140.706C522.797%20142.115%20523.268%20143.696%20523.358%20145.321V152.35C523.358%20155.326%20521.237%20156.53%20518.651%20155.031L512.255%20151.34L509.431%20153.679V149.716L504.804%20147.036C503.443%20146.148%20502.31%20144.95%20501.498%20143.541C500.687%20142.132%20500.218%20140.551%20500.132%20138.927V131.897C500.132%20128.922%20502.252%20127.718%20504.838%20129.217L518.674%20137.212ZM522.904%20152.101V145.082C522.828%20143.603%20522.402%20142.163%20521.663%20140.88C520.924%20139.597%20519.892%20138.507%20518.651%20137.7L504.815%20129.751C502.468%20128.388%20500.551%20129.49%20500.54%20132.192V139.222C500.623%20140.698%20501.051%20142.135%20501.789%20143.415C502.528%20144.695%20503.557%20145.784%20504.793%20146.593L509.851%20149.511V152.589L512.051%20150.783L518.64%20154.588C520.999%20155.95%20522.915%20154.86%20522.915%20152.146'%20fill='white'/%3e%3cpath%20d='M509.963%20136.258V136.86C509.962%20136.94%20509.939%20137.019%20509.898%20137.088C509.857%20137.157%20509.799%20137.215%20509.73%20137.255C509.66%20137.295%20509.581%20137.316%20509.501%20137.316C509.421%20137.317%20509.341%20137.296%20509.271%20137.257L506.436%20135.622C506.367%20135.582%20506.309%20135.524%20506.269%20135.454C506.229%20135.384%20506.209%20135.305%20506.209%20135.224V134.622C506.211%20134.542%20506.233%20134.463%20506.274%20134.394C506.315%20134.325%20506.373%20134.268%20506.443%20134.228C506.513%20134.187%20506.591%20134.166%20506.672%20134.166C506.752%20134.165%20506.831%20134.186%20506.901%20134.225L509.725%20135.86C509.797%20135.899%20509.857%20135.956%20509.899%20136.026C509.94%20136.096%20509.963%20136.176%20509.963%20136.258Z'%20fill='%23F9FBFC'/%3e%3cpath%20d='M518.915%20144.377V144.979C518.914%20145.059%20518.891%20145.138%20518.85%20145.207C518.809%20145.276%20518.751%20145.334%20518.682%20145.374C518.612%20145.414%20518.533%20145.435%20518.453%20145.436C518.373%20145.436%20518.293%20145.416%20518.223%20145.376L506.44%20138.563C506.368%20138.525%20506.307%20138.468%20506.265%20138.397C506.223%20138.327%20506.201%20138.247%20506.202%20138.165V137.563C506.204%20137.483%20506.226%20137.404%20506.267%20137.335C506.308%20137.266%20506.366%20137.208%20506.436%20137.168C506.505%20137.128%20506.584%20137.107%20506.664%20137.106C506.745%20137.106%20506.824%20137.126%20506.894%20137.166L518.688%20143.98C518.756%20144.021%20518.813%20144.08%20518.852%20144.149C518.892%20144.219%20518.914%20144.297%20518.915%20144.377Z'%20fill='%23F9FBFC'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M514.066%20147.566V148.168C514.066%20148.248%20514.046%20148.327%20514.006%20148.396C513.967%20148.466%20513.91%20148.524%20513.841%20148.564C513.772%20148.605%20513.693%20148.626%20513.613%20148.626C513.533%20148.626%20513.454%20148.605%20513.385%20148.565L506.445%20144.579C506.372%20144.541%20506.312%20144.484%20506.269%20144.414C506.227%20144.344%20506.206%20144.263%20506.206%20144.182V143.58C506.208%20143.499%20506.23%20143.421%20506.271%20143.351C506.312%20143.282%20506.37%20143.225%20506.44%20143.185C506.51%20143.145%20506.588%20143.124%20506.669%20143.123C506.749%20143.123%20506.828%20143.143%20506.898%20143.182L513.828%20147.157C513.9%20147.198%20513.96%20147.257%20514.002%20147.329C514.044%20147.401%20514.066%20147.483%20514.066%20147.566Z'%20fill='%23F9FBFC'/%3e%3c/g%3e%3cpath%20d='M517.097%20146.319V146.921C517.095%20147.001%20517.073%20147.08%20517.032%20147.149C516.991%20147.218%20516.933%20147.276%20516.863%20147.316C516.793%20147.356%20516.715%20147.377%20516.634%20147.377C516.554%20147.378%20516.475%20147.357%20516.405%20147.318L506.448%20141.64C506.375%20141.602%20506.314%20141.545%20506.272%20141.475C506.23%20141.405%20506.209%20141.324%20506.209%20141.242V140.641C506.211%20140.56%20506.233%20140.481%20506.274%20140.412C506.315%20140.343%20506.373%20140.286%20506.443%20140.246C506.513%20140.206%20506.591%20140.184%20506.672%20140.184C506.752%20140.183%20506.831%20140.204%20506.901%20140.243L516.87%20145.921C516.939%20145.962%20516.997%20146.02%20517.037%20146.089C517.077%20146.159%20517.097%20146.238%20517.097%20146.319Z'%20fill='%23F9FBFC'/%3e%3cpath%20d='M284.927%2030.6317C286.323%2031.5387%20287.484%2032.7638%20288.316%2034.2068C289.148%2035.6497%20289.627%2037.2695%20289.713%2038.9333C289.713%2041.9883%20287.558%2043.2148%20284.904%2041.6816C283.508%2040.7745%20282.345%2039.5496%20281.512%2038.1069C280.678%2036.6641%20280.197%2035.0444%20280.107%2033.38C280.119%2030.3818%20282.273%2029.0872%20284.927%2030.6317Z'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M286.657%2034.6392L287.689%2036.4222L283.754%2038.6708L281.837%2035.3546L282.869%2034.7641L283.754%2036.2972L286.657%2034.6392Z'%20fill='white'/%3e%3cpath%20d='M605.057%2054.7488L606.134%2057.6788L609.071%2058.769L606.134%2059.8592L605.057%2062.7892L603.968%2059.8592L601.031%2058.769L603.968%2057.6788L605.057%2054.7488Z'%20fill='white'/%3e%3cpath%20d='M618.664%2045.6648L619.742%2048.5948L622.679%2049.685L619.742%2050.7753L618.664%2053.7052L617.575%2050.7753L614.638%2049.685L617.575%2048.5948L618.664%2045.6648Z'%20fill='white'/%3e%3cpath%20d='M628.591%2059.0103L629.362%2061.1112L631.472%2061.8948L629.362%2062.6784L628.591%2064.7794L627.809%2062.6784L625.699%2061.8948L627.809%2061.1112L628.591%2059.0103Z'%20fill='white'/%3e%3cpath%20d='M384.006%20161.057L391.899%20156.435'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M352.2%20179.716L380.563%20163.078'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M352.575%20180.809C352.575%20181.261%20352.44%20181.702%20352.189%20182.076C351.937%20182.451%20351.579%20182.742%20351.161%20182.912C350.744%20183.082%20350.285%20183.124%20349.843%20183.032C349.402%20182.939%20348.998%20182.717%20348.683%20182.394C348.368%20182.07%20348.157%20181.66%20348.076%20181.216C347.995%20180.772%20348.048%20180.314%20348.228%20179.9C348.409%20179.486%20348.708%20179.135%20349.088%20178.892C349.469%20178.65%20349.913%20178.526%20350.364%20178.538C350.955%20178.552%20351.518%20178.798%20351.931%20179.223C352.344%20179.647%20352.575%20180.216%20352.575%20180.809Z'%20stroke='%23E6F4FF'%20stroke-miterlimit='10'/%3e%3cpath%20d='M559.788%2027.6204L567.681%2022.9983'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M527.982%2046.2785L556.346%2029.6411'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M528.358%2047.4156C528.358%2047.8648%20528.224%2048.304%20527.975%2048.6775C527.726%2049.051%20527.372%2049.3421%20526.957%2049.514C526.543%2049.6859%20526.087%2049.7309%20525.647%2049.6433C525.207%2049.5556%20524.803%2049.3393%20524.486%2049.0217C524.168%2048.704%20523.952%2048.2993%20523.865%2047.8587C523.777%2047.4181%20523.822%2046.9614%20523.994%2046.5464C524.166%2046.1314%20524.456%2045.7767%20524.829%2045.5271C525.202%2045.2775%20525.641%2045.1443%20526.089%2045.1443C526.691%2045.1443%20527.268%2045.3836%20527.693%2045.8095C528.119%2046.2355%20528.358%2046.8132%20528.358%2047.4156Z'%20stroke='%23E6F4FF'%20stroke-miterlimit='10'/%3e%3cpath%20d='M641.44%2021.9437L649.333%2017.3215'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M609.635%2040.5979L637.999%2023.9604'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M610.014%2041.733C610.014%2042.1822%20609.881%2042.6214%20609.632%2042.9949C609.383%2043.3684%20609.028%2043.6595%20608.614%2043.8314C608.199%2044.0033%20607.743%2044.0483%20607.303%2043.9607C606.863%2043.873%20606.459%2043.6567%20606.142%2043.3391C605.825%2043.0214%20605.609%2042.6167%20605.521%2042.1761C605.434%2041.7355%20605.479%2041.2788%20605.65%2040.8638C605.822%2040.4488%20606.113%2040.094%20606.486%2039.8445C606.859%2039.5949%20607.297%2039.4617%20607.746%2039.4617C608.347%2039.4617%20608.924%2039.701%20609.35%2040.1269C609.775%2040.5529%20610.014%2041.1306%20610.014%2041.733Z'%20stroke='%23E6F4FF'%20stroke-miterlimit='10'/%3e%3cpath%20d='M10.4121%20314.616L2.53021%20309.993'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M42.2219%20333.27L13.8471%20316.633'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M41.8344%20334.359C41.8344%20334.808%2041.9675%20335.247%2042.2167%20335.621C42.4659%20335.994%2042.8202%20336.285%2043.2346%20336.457C43.6491%20336.629%2044.1051%20336.674%2044.5451%20336.586C44.9851%20336.499%2045.3892%20336.282%2045.7065%20335.965C46.0237%20335.647%2046.2397%20335.242%2046.3272%20334.802C46.4147%20334.361%2046.3698%20333.905%2046.1981%20333.49C46.0265%20333.074%2045.7357%20332.72%2045.3627%20332.47C44.9897%20332.221%2044.5512%20332.087%2044.1026%20332.087C43.5011%20332.087%2042.9241%20332.327%2042.4988%20332.753C42.0734%20333.179%2041.8344%20333.756%2041.8344%20334.359Z'%20stroke='%23E6F4FF'%20stroke-miterlimit='10'/%3e%3cpath%20d='M537.046%20165.261V166.181L545.495%20171.075V170.144L537.046%20165.261Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M541.227%20165.537V166.457L545.502%20168.932V168.012L541.227%20165.537Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M543.852%20164.374V165.305L545.507%20166.27L545.519%20165.339L543.852%20164.374Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M544.63%20195.469C544.85%20195.797%20545.136%20196.075%20545.47%20196.287L545.663%20196.389C545.322%20196.264%20544.982%20196.105%20544.63%20195.935V195.469Z'%20fill='%23747878'/%3e%3cpath%20d='M544.5%20177.641L544%20177.322L544.114%20177.39L544.432%20177.595L544.5%20177.641Z'%20fill='%236C7070'/%3e%3cpath%20d='M544.209%20192.554L544.437%20192.668L544.209%20192.554Z'%20fill='%23747878'/%3e%3cpath%20d='M545.176%20193C545.002%20192.949%20544.817%20192.949%20544.642%20193V192.783C544.816%20192.865%20544.995%20192.937%20545.176%20193Z'%20fill='%23747878'/%3e%3cpath%20d='M545.292%20178.223L545.655%20178.53C545.299%20178.218%20544.919%20177.933%20544.521%20177.677L544.657%20177.768V177.564C544.834%20177.814%20545.048%20178.037%20545.292%20178.223Z'%20fill='%23747878'/%3e%3cpath%20d='M544.046%20174.202C544.273%20174.327%20544.488%20174.463%20544.693%20174.599V175.065C544.513%20175.142%20544.364%20175.276%20544.268%20175.447C544.172%20175.617%20544.134%20175.814%20544.16%20176.008C544.185%20176.567%20544.37%20177.107%20544.693%20177.563V177.768C544.486%20177.618%20544.27%20177.482%20544.046%20177.359C540.44%20175.269%20537.491%20176.95%20537.48%20181.118C537.595%20183.393%20538.247%20185.609%20539.382%20187.583C540.518%20189.557%20542.104%20191.233%20544.012%20192.475L544.216%20192.588L544.454%20192.713L544.659%20192.804V193.02C544.479%20193.095%20544.329%20193.226%20544.231%20193.394C544.133%20193.562%20544.092%20193.758%20544.114%20193.951C544.137%20194.51%20544.323%20195.051%20544.647%20195.507V195.972L544.466%20195.882L544.001%20195.632C538.863%20192.656%20534.724%20185.411%20534.735%20179.562C534.747%20173.713%20538.92%20171.204%20544.046%20174.202Z'%20stroke='%23E6F4FF'%20stroke-width='0.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M545.544%20175.222L545.725%20175.347H545.805C549.516%20178.466%20552.069%20182.747%20553.051%20187.498C553.056%20187.54%20553.056%20187.582%20553.051%20187.623V187.759C553.055%20187.805%20553.055%20187.85%20553.051%20187.896C553.054%20187.941%20553.054%20187.987%20553.051%20188.032V188.168C553.049%20188.214%20553.049%20188.259%20553.051%20188.305C553.051%20188.373%20553.051%20188.407%20553.051%20188.452C553.056%20188.547%20553.056%20188.642%20553.051%20188.736V188.861V190.837C553.048%20190.879%20553.048%20190.92%20553.051%20190.962C553.054%20191.004%20553.054%20191.045%20553.051%20191.087C553.06%20191.128%20553.06%20191.171%20553.051%20191.212C553.059%20191.253%20553.059%20191.295%20553.051%20191.337C553.051%20191.405%20553.051%20191.428%20553.051%20191.462C553.051%20191.496%20553.051%20191.553%20553.051%20191.575C553.051%20191.598%20553.051%20191.757%20553.051%20191.836C553.051%20191.916%20553.051%20191.916%20553.051%20191.95V192.064V192.177V192.279C553.049%20192.317%20553.049%20192.355%20553.051%20192.393V192.507C553.048%20192.544%20553.048%20192.582%20553.051%20192.62C553.047%20192.658%20553.047%20192.696%20553.051%20192.734C552.144%20196.141%20549.309%20197.628%20545.77%20196.356H545.702L545.51%20196.254C545.111%20195.994%20544.779%20195.644%20544.54%20195.232C544.302%20194.819%20544.164%20194.356%20544.137%20193.881C544.115%20193.687%20544.156%20193.492%20544.254%20193.324C544.352%20193.156%20544.502%20193.024%20544.682%20192.949C544.856%20192.899%20545.041%20192.899%20545.215%20192.949H545.283C546.17%20193.309%20547.152%20193.361%20548.073%20193.097H548.186H548.288H548.402L548.492%20193.04H548.594H548.685L548.787%20192.983L548.878%20192.927L548.98%20192.859L549.059%20192.79L549.15%20192.722L549.229%20192.643L549.32%20192.563L549.4%20192.484L549.479%20192.393L549.558%20192.302V192.245V192.177L549.626%20192.075L549.694%20191.973C549.721%20191.937%20549.743%20191.899%20549.762%20191.859L549.831%20191.746V191.643C549.854%20191.608%20549.873%20191.57%20549.887%20191.53C549.892%20191.488%20549.892%20191.446%20549.887%20191.405V191.28V191.155V191.019V190.894C549.884%20190.848%20549.884%20190.803%20549.887%20190.758V190.621C549.884%20190.576%20549.884%20190.53%20549.887%20190.485C549.89%20190.436%20549.89%20190.387%20549.887%20190.337C549.89%20190.284%20549.89%20190.231%20549.887%20190.178C549.892%20190.129%20549.892%20190.08%20549.887%20190.031C549.887%20190.031%20549.887%20189.929%20549.887%20189.883C549.887%20189.838%20549.887%20189.781%20549.887%20189.736C549.887%20189.69%20549.887%20189.622%20549.887%20189.565C549.887%20189.508%20549.887%20189.452%20549.887%20189.406C549.887%20189.361%20549.887%20189.293%20549.887%20189.236V189.065C549.887%20188.997%20549.887%20188.941%20549.887%20188.895C549.893%20188.838%20549.893%20188.781%20549.887%20188.725V188.554C549.894%20188.498%20549.894%20188.441%20549.887%20188.384C549.894%20188.324%20549.894%20188.263%20549.887%20188.202C549.894%20188.146%20549.894%20188.089%20549.887%20188.032C549.887%20187.953%20549.887%20187.896%20549.887%20187.839C549.887%20187.669%20549.887%20187.669%20549.887%20187.498C549.882%20187.438%20549.882%20187.377%20549.887%20187.317C549.883%20187.256%20549.883%20187.195%20549.887%20187.135V186.953C549.887%20186.76%20549.808%20186.59%20549.774%20186.408C549.767%20186.348%20549.767%20186.287%20549.774%20186.226L549.672%20185.863C548.932%20183.323%20547.554%20181.016%20545.668%20179.163L545.555%20179.049L545.419%20178.924L545.351%20178.856L545.271%20178.788L544.897%20178.47C544.665%20178.281%20544.463%20178.059%20544.296%20177.811C543.973%20177.354%20543.788%20176.814%20543.763%20176.255C543.737%20176.061%20543.775%20175.864%20543.872%20175.694C543.968%20175.524%20544.117%20175.39%20544.296%20175.313C544.472%20175.177%20544.684%20175.096%20544.906%20175.079C545.128%20175.063%20545.35%20175.113%20545.544%20175.222Z'%20fill='%2358AFFB'/%3e%3cpath%20d='M545.724%20175.349L545.543%20175.224C545.291%20175.06%20544.985%20175.003%20544.692%20175.065V174.61C544.998%20174.837%20545.395%20175.087%20545.724%20175.349Z'%20fill='%23747878'/%3e%3cpath%20d='M579.805%2062.4946V63.4145L571.356%2068.2978V67.378L579.805%2062.4946Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M575.616%2062.7666V63.6865L571.341%2066.1622V65.231L575.616%2062.7666Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M573%2061.6077V62.5389L571.344%2063.5042L571.333%2062.573L573%2061.6077Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M548.123%2073.3742L548.214%20102.413L564.726%2092.8622L564.646%2063.8347L548.123%2073.3742Z'%20stroke='%23E6F4FF'%20stroke-width='0.8'%20stroke-miterlimit='10'/%3e%3cpath%20d='M550.291%2074.5995L549.713%2074.2588L549.803%20103.298L550.37%20103.627L550.291%2074.5995Z'%20fill='%23BDC5CB'/%3e%3cpath%20d='M566.803%2065.049L566.236%2064.7083L549.713%2074.2591L550.291%2074.5998L566.803%2065.049Z'%20fill='white'/%3e%3cpath%20d='M550.291%2074.5985L550.371%20103.626L566.883%2094.075L566.803%2065.0476L550.291%2074.5985Z'%20fill='%23EAF1F7'/%3e%3cpath%20d='M561.945%2078.3853L561.957%2079.3051L553.496%2084.1998V83.2686L561.945%2078.3853Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M557.76%2078.6553L557.772%2079.5752L553.496%2082.0509V81.131L557.76%2078.6553Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M555.148%2077.4963L555.16%2078.4276L553.492%2079.3929V78.4616L555.148%2077.4963Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M561.945%2087.6621L561.957%2088.582L553.496%2093.4653V92.5454L561.945%2087.6621Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M557.76%2087.9321L557.772%2088.852L553.496%2091.3278V90.3965L557.76%2087.9321Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M555.148%2086.7771L555.16%2087.7083L553.492%2088.6736V87.731L555.148%2086.7771Z'%20fill='%2394A3C0'/%3e%3c/svg%3e`,ih=`data:image/svg+xml,%3csvg%20width='22'%20height='32'%20viewBox='0%200%2022%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.1593%2014.3814C17.2069%2015.0272%205.56056%2018.3882%205.56056%2018.3882C4.03868%2021.4659%2011.1005%2023.4995%2011.1005%2023.4995C6.62739%2019.7609%2013.9819%2017.901%2018.4833%2016.4868C23.7193%2014.8403%2020.7473%2012.4385%2020.7473%2012.4385C21.0173%2013.2089%2020.6906%2013.8716%2019.1574%2014.3776'%20fill='white'/%3e%3cpath%20d='M19.9428%2015.3237C18.6683%2015.7448%2014.2688%2016.9796%2010.7945%2018.3807C6.36106%2020.1763%2011.1004%2023.5014%2011.1004%2023.5014C6.62729%2019.7628%2013.9818%2017.903%2018.4832%2016.4887C23.7211%2014.8403%2020.7491%2012.4404%2020.7491%2012.4404C21.4477%2013.36%2021.476%2014.8177%2019.9428%2015.3237Z'%20fill='white'/%3e%3cpath%20d='M5.56915%2023.6885C8.14464%2026.9022%2013.0124%2030.0007%2015.7314%2031.5887C16.8794%2032.259%2018.3295%2032.0966%2019.3001%2031.1903C20.1007%2030.4425%2020.1422%2029.1869%2019.3945%2028.3863C19.2472%2028.2277%2019.0754%2028.0955%2018.8847%2027.9936C16.1657%2026.5321%2011.7624%2024.0756%208.74509%2021.923C4.09636%2018.6111%207.66693%2017.7822%207.66693%2017.7822C3.3392%2018.7414%202.58392%2019.9688%205.56915%2023.6828'%20fill='white'/%3e%3cpath%20d='M3.38919%2016.1084C-1.84676%2017.753%201.12525%2020.1567%201.12525%2020.1567C0.853355%2019.3844%201.1819%2018.7235%202.71511%2018.2175C4.67505%2017.5698%2016.312%2014.207%2016.312%2014.207C17.8357%2011.1292%2010.7739%209.09375%2010.7739%209.09375C15.2433%2012.8324%207.88875%2014.6941%203.38919%2016.1084Z'%20fill='white'/%3e%3cpath%20d='M3.38919%2016.1084C-1.84676%2017.753%201.12525%2020.1567%201.12525%2020.1567C0.426624%2019.2371%200.38886%2017.7794%201.92962%2017.2734C3.20604%2016.8523%207.60552%2015.6174%2011.0798%2014.2164C15.5114%2012.4207%2010.7739%209.09375%2010.7739%209.09375C15.2433%2012.8324%207.88875%2014.6941%203.38919%2016.1084Z'%20fill='white'/%3e%3cpath%20d='M2.57331%201.40596C1.77272%202.15368%201.72929%203.40933%202.47701%204.20992C2.62429%204.36853%202.79612%204.5007%202.98682%204.60266C5.70771%206.06412%2010.111%208.51877%2013.1283%2010.6732C17.777%2013.9851%2014.2065%2014.814%2014.2065%2014.814C18.5323%2013.8529%2019.2895%2012.6275%2016.3042%208.9134C13.7287%205.6997%208.86098%202.59929%206.1401%201.01321C4.99397%200.342905%203.54195%200.50529%202.57331%201.41162'%20fill='white'/%3e%3cg%20opacity='0.3'%3e%3cpath%20d='M15.6146%2014.4409C15.8714%2014.3635%2016.1093%2014.2823%2016.3264%2014.1973C16.4284%2014.0293%2016.4945%2013.8404%2016.519%2013.646C16.5473%2013.391%2016.5152%2013.1324%2016.4227%2012.8907C16.3377%2012.6622%2016.2207%2012.447%2016.0791%2012.2487C15.9431%2012.0523%2015.7921%2011.8692%2015.6278%2011.6973C15.303%2011.365%2014.9518%2011.0572%2014.5798%2010.7778C13.8434%2010.2264%2013.0655%209.72607%2012.2895%209.23325C11.5134%208.74232%2010.7223%208.27405%209.92923%207.81333C8.34315%206.89378%206.73441%206.00633%205.13134%205.12077L3.93045%204.45235C3.52826%204.24087%203.17328%203.95009%202.88817%203.597C2.75033%203.41951%202.65026%203.2137%202.5955%202.99467C2.54263%202.77564%202.55396%202.54528%202.6276%202.33191C2.70312%202.11855%202.82019%201.92218%202.97125%201.75413C3.04677%201.66916%203.12797%201.58797%203.21294%201.51055L3.34133%201.40103L3.40931%201.34817L3.44518%201.32173L3.46218%201.30851C3.46218%201.30851%203.47351%201.31795%203.46218%201.29152C3.45085%201.26509%203.46218%201.29152%203.44707%201.28019H3.43763L3.42064%201.29341L3.38476%201.31984L3.31679%201.37082L3.18272%201.48034C3.09587%201.55587%203.01279%201.63706%202.93537%201.72392C2.77488%201.89385%202.65026%202.094%202.56717%202.31303C2.48787%202.53584%202.47276%202.77564%202.52375%203.006C2.5785%203.23447%202.67858%203.44783%202.82019%203.63476C3.1072%204.00107%203.46595%204.30507%203.8738%204.52977L5.06525%205.21707C6.657%206.13662%208.24874%207.03728%209.81783%207.9776C10.6014%208.44965%2011.3794%208.93303%2012.1479%209.43151C12.9145%209.92999%2013.6754%2010.4455%2014.3929%2010.9968C14.7498%2011.2725%2015.0821%2011.5765%2015.3918%2011.905C15.6977%2012.2166%2015.9375%2012.5867%2016.0998%2012.9926C16.1678%2013.1833%2016.1924%2013.3892%2016.1678%2013.5912C16.1376%2013.7876%2016.0564%2013.9745%2015.9299%2014.1293C15.8355%2014.2445%2015.7279%2014.3484%2015.607%2014.4371'%20fill='white'/%3e%3c/g%3e%3c/svg%3e`,ah=`data:image/svg+xml,%3csvg%20width='89'%20height='21'%20viewBox='0%200%2089%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.4537%209.65056L5.6297%2017.2781H12.9309C13.4136%2017.243%2013.8916%2017.3924%2014.2685%2017.696C14.4166%2017.8312%2014.5335%2017.997%2014.6112%2018.1818C14.6889%2018.3667%2014.7255%2018.5662%2014.7185%2018.7666C14.7242%2018.9592%2014.6875%2019.1507%2014.6111%2019.3276C14.5346%2019.5045%2014.4202%2019.6624%2014.2759%2019.7902C13.9792%2020.0539%2013.5309%2020.1858%2012.9309%2020.1858H2.83086C2.12127%2020.1858%201.59463%2020.0325%201.24107%2019.7209C1.0652%2019.5615%200.926946%2019.3651%200.836296%2019.1457C0.745646%2018.9264%200.704869%2018.6896%200.716905%2018.4526C0.728826%2018.0998%200.858518%2017.7612%201.0853%2017.4908C1.3309%2017.1611%201.84023%2016.5677%202.61329%2015.7106C3.43744%2014.8007%204.17918%2013.9766%204.83851%2013.2381C5.50608%2012.4964%206.12667%2011.8115%206.70028%2011.1687C7.27389%2010.5258%207.74861%209.98434%208.1269%209.5393C8.50519%209.09426%208.80683%208.71103%209.03429%208.39208H3.5009C2.9168%208.41478%202.33277%208.34553%201.77017%208.18686C1.37787%208.0517%201.18173%207.69237%201.18173%207.10887C1.17386%206.91572%201.2098%206.7233%201.28688%206.54603C1.36395%206.36876%201.48015%206.21123%201.62677%206.08526C1.98683%205.80907%202.43488%205.6729%202.88773%205.70203H11.4425C12.0692%205.66774%2012.6949%205.78744%2013.2647%206.05065C13.6867%206.28306%2013.8985%206.69926%2013.9001%207.29924C13.8974%207.51195%2013.8555%207.72233%2013.7765%207.91984C13.7093%208.10655%2013.6179%208.28361%2013.5045%208.44647C13.4032%208.58246%2013.2573%208.74811%2013.0941%208.94097C12.9309%209.13382%2012.7084%209.37118%2012.4537%209.64562'%20fill='white'/%3e%3cpath%20d='M17.2637%203.64451C16.7764%203.65633%2016.3022%203.4862%2015.9335%203.16732C15.7567%202.99393%2015.6165%202.78678%2015.5212%202.55816C15.4259%202.32955%2015.3776%202.08413%2015.3789%201.83647C15.3803%201.58881%2015.4314%201.34394%2015.5292%201.11641C15.6271%200.888871%2015.7696%200.683299%2015.9483%200.511889C16.3048%200.178623%2016.7758%20-0.00464918%2017.2637%208.96584e-05C17.7334%20-0.00408682%2018.1889%200.160906%2018.5469%200.464912C18.7373%200.632%2018.8868%200.84066%2018.9837%201.07475C19.0806%201.30884%2019.1223%201.56208%2019.1057%201.81488C19.1194%202.06527%2019.0778%202.31562%2018.9838%202.5481C18.8898%202.78058%2018.7457%202.98947%2018.5617%203.15991C18.2073%203.48319%2017.7434%203.65992%2017.2637%203.6544M19.1057%207.50404V18.2716C19.1057%2019.0134%2018.9301%2019.5821%2018.5741%2019.9628C18.4037%2020.15%2018.1948%2020.2981%2017.9618%2020.3972C17.7288%2020.4962%2017.4772%2020.5437%2017.2241%2020.5364C16.9723%2020.5445%2016.7219%2020.4961%2016.4913%2020.3947C16.2607%2020.2933%2016.0557%2020.1415%2015.8915%2019.9505C15.5503%2019.5598%2015.3797%2018.9986%2015.3797%2018.2716V7.60294C15.3797%206.86614%2015.5503%206.31066%2015.8915%205.93649C16.0602%205.75283%2016.2667%205.6078%2016.4967%205.51136C16.7267%205.41491%2016.9749%205.36933%2017.2241%205.37771C17.4758%205.37068%2017.7261%205.41681%2017.9587%205.5131C18.1913%205.60938%2018.401%205.75366%2018.5741%205.93649C18.9496%206.3654%2019.1406%206.92517%2019.1057%207.49415'%20fill='white'/%3e%3cpath%20d='M24.8301%207.43997V7.88996C25.3957%207.10255%2026.1308%206.45199%2026.9811%205.98616C27.8125%205.56827%2028.7334%205.3595%2029.6637%205.37793C30.5817%205.36311%2031.4882%205.58356%2032.2969%206.0183C33.0505%206.42702%2033.6562%207.06291%2034.0276%207.83557C34.2757%208.29687%2034.4375%208.79962%2034.5048%209.31905C34.5864%209.98918%2034.6227%2010.664%2034.6136%2011.3391V18.262C34.6136%2019.0087%2034.443%2019.5724%2034.1018%2019.9531C33.9362%2020.141%2033.731%2020.2899%2033.501%2020.3891C33.271%2020.4883%2033.0219%2020.5353%2032.7716%2020.5268C32.5172%2020.5353%2032.2641%2020.4872%2032.0306%2020.3858C31.7971%2020.2845%2031.5891%2020.1325%2031.4217%2019.9408C31.0755%2019.5501%2030.9024%2018.9889%2030.9024%2018.262V12.0511C30.9024%2010.8149%2030.7318%209.88524%2030.3906%209.23251C30.0494%208.57978%2029.3695%208.25836%2028.3508%208.25836C27.6969%208.25479%2027.0594%208.46296%2026.5336%208.85175C25.9783%209.26214%2025.5602%209.83104%2025.3344%2010.4836C25.1515%2011.0374%2025.06%2012.0742%2025.06%2013.594V18.262C25.06%2019.0169%2024.8853%2019.5831%2024.5358%2019.9606C24.3635%2020.1468%2024.153%2020.2938%2023.9188%2020.3915C23.6846%2020.4892%2023.4321%2020.5353%2023.1784%2020.5268C22.9279%2020.5335%2022.679%2020.4845%2022.4498%2020.3831C22.2206%2020.2818%2022.0168%2020.1307%2021.8532%2019.9408C21.5071%2019.5501%2021.334%2018.9889%2021.334%2018.262V7.49436C21.334%206.78477%2021.4897%206.25813%2021.7988%205.90457C21.958%205.72826%2022.1543%205.58954%2022.3737%205.49845C22.5931%205.40737%2022.8299%205.3662%2023.0672%205.37793C23.3787%205.37314%2023.6856%205.4535%2023.9548%205.61034C24.2293%205.77571%2024.45%206.01702%2024.5902%206.30511C24.7616%206.6584%2024.8463%207.04742%2024.8375%207.43997'%20fill='white'/%3e%3cpath%20d='M40.2031%207.43997V7.88996C40.7688%207.10255%2041.5038%206.45199%2042.3542%205.98616C43.1847%205.56829%2044.1047%205.3595%2045.0343%205.37793C45.9531%205.36279%2046.8605%205.58325%2047.67%206.0183C48.4231%206.4277%2049.0285%207.06339%2049.4007%207.83557C49.6477%208.29734%2049.8093%208.79988%2049.8779%209.31905C49.9582%209.98929%2049.9945%2010.6641%2049.9867%2011.3391V18.262C49.9867%2019.0087%2049.8161%2019.5724%2049.4749%2019.9531C49.3093%2020.141%2049.1041%2020.2899%2048.8741%2020.3891C48.6441%2020.4883%2048.395%2020.5353%2048.1447%2020.5268C47.89%2020.5347%2047.6367%2020.4862%2047.403%2020.3849C47.1692%2020.2836%2046.9606%2020.132%2046.7922%2019.9408C46.4461%2019.5501%2046.2755%2018.9889%2046.2755%2018.262V12.0511C46.2755%2010.8149%2046.1049%209.88524%2045.7637%209.23251C45.4225%208.57978%2044.7401%208.25836%2043.7214%208.25836C43.0683%208.25514%2042.4317%208.4633%2041.9066%208.85175C41.3499%209.26122%2040.9308%209.83035%2040.705%2010.4836C40.5237%2011.0374%2040.433%2012.0742%2040.433%2013.594V18.262C40.433%2019.0169%2040.2575%2019.5831%2039.9064%2019.9606C39.7344%2020.1472%2039.524%2020.2945%2039.2897%2020.3922C39.0554%2020.4899%2038.8027%2020.5358%2038.549%2020.5268C38.2989%2020.5332%2038.0505%2020.4839%2037.8217%2020.3826C37.5929%2020.2813%2037.3896%2020.1303%2037.2263%2019.9408C36.8801%2019.5501%2036.707%2018.9889%2036.707%2018.262V7.49436C36.707%206.78477%2036.8628%206.25813%2037.1719%205.90457C37.331%205.72826%2037.5274%205.58954%2037.7468%205.49845C37.9661%205.40737%2038.203%205.3662%2038.4402%205.37793C38.7517%205.37314%2039.0587%205.4535%2039.3279%205.61034C39.6023%205.77571%2039.823%206.01702%2039.9633%206.30511C40.1346%206.6584%2040.2194%207.04742%2040.2105%207.43997'%20fill='white'/%3e%3cpath%20d='M62.5909%2013.8682H55.3045C55.2961%2014.6445%2055.4706%2015.4119%2055.8138%2016.1083C56.0972%2016.7002%2056.5443%2017.1985%2057.1021%2017.5442C57.6599%2017.8899%2058.3051%2018.0686%2058.9613%2018.059C59.3736%2018.0634%2059.7846%2018.0109%2060.1827%2017.9033C60.5618%2017.7916%2060.9225%2017.625%2061.2533%2017.4088C61.5893%2017.1934%2061.9091%2016.9538%2062.2101%2016.6918C62.5002%2016.4363%2062.8777%2016.091%2063.3425%2015.6558C63.5761%2015.4765%2063.8671%2015.3885%2064.1609%2015.4086C64.4983%2015.3935%2064.8292%2015.5056%2065.0881%2015.7226C65.2092%2015.835%2065.304%2015.973%2065.3656%2016.1264C65.4271%2016.2799%2065.454%2016.4451%2065.4441%2016.6102C65.4164%2017.0309%2065.2801%2017.4372%2065.0485%2017.7895C64.736%2018.2937%2064.3308%2018.7342%2063.8543%2019.0876C63.2467%2019.5398%2062.5682%2019.8882%2061.8467%2020.1186C60.9495%2020.4048%2060.0116%2020.5426%2059.0701%2020.5266C56.6767%2020.5266%2054.8158%2019.8442%2053.4872%2018.4794C52.1587%2017.1146%2051.4944%2015.2635%2051.4944%2012.9262C51.4863%2011.8837%2051.6534%2010.8473%2051.9889%209.86033C52.2925%208.96156%2052.7819%208.1368%2053.4254%207.43978C54.0703%206.75306%2054.8635%206.22281%2055.7446%205.88954C56.7214%205.5203%2057.7588%205.33747%2058.803%205.35054C60.1121%205.31362%2061.4066%205.63234%2062.5488%206.27277C63.5369%206.83149%2064.3482%207.65648%2064.8903%208.65376C65.3902%209.56343%2065.6569%2010.5828%2065.6666%2011.6207C65.6666%2012.5586%2065.3988%2013.166%2064.8631%2013.4429C64.3241%2013.7199%2063.57%2013.8583%2062.5958%2013.8583M55.3094%2011.7443H62.0642C61.9736%2010.4718%2061.6299%209.5183%2061.0332%208.8837C60.7303%208.56817%2060.3638%208.32058%2059.9581%208.15733C59.5523%207.99408%2059.1164%207.91889%2058.6794%207.93674C58.2515%207.92332%2057.8257%208.00227%2057.431%208.16824C57.0364%208.33422%2056.6821%208.5833%2056.3924%208.89853C55.7957%209.53808%2055.4347%2010.4867%2055.3094%2011.7443Z'%20fill='white'/%3e%3cpath%20d='M75.0025%2018.9842L72.3001%2015.0135L69.5309%2018.9842C69.2359%2019.4182%2068.8925%2019.8172%2068.5073%2020.1735C68.21%2020.4156%2067.8347%2020.5412%2067.4516%2020.5271C67.0071%2020.5377%2066.5751%2020.3796%2066.2425%2020.0845C66.0908%2019.9616%2065.9679%2019.8069%2065.8825%2019.6313C65.797%2019.4557%2065.7511%2019.2635%2065.748%2019.0683C65.748%2018.676%2066.0027%2018.1164%2066.512%2017.3895L69.882%2012.5583L66.8928%208.53063C66.3736%207.86801%2066.1164%207.2944%2066.1164%206.7999C66.1177%206.61148%2066.1597%206.42556%2066.2395%206.25486C66.3193%206.08417%2066.435%205.93273%2066.5788%205.81092C66.9148%205.51876%2067.3505%205.36733%2067.7952%205.38813C68.1892%205.37419%2068.5745%205.50527%2068.8782%205.75652C69.2554%206.10401%2069.5921%206.49301%2069.882%206.91611L72.2976%2010.2193L74.6465%206.91611C74.9393%206.48057%2075.2857%206.08351%2075.6775%205.73427C75.9802%205.4913%2076.3601%205.36497%2076.7481%205.37823C77.1925%205.36149%2077.6274%205.5094%2077.9695%205.79361C78.1225%205.9126%2078.2465%206.06477%2078.3321%206.23866C78.4178%206.41254%2078.4629%206.6036%2078.464%206.79743C78.4633%207.08041%2078.3955%207.3592%2078.2661%207.61087C78.0919%207.93536%2077.8883%208.24322%2077.6579%208.53063L74.6489%2012.5583L78.0189%2017.3895C78.5447%2018.1444%2078.8084%2018.7131%2078.8101%2019.0955C78.8094%2019.2901%2078.7645%2019.482%2078.6789%2019.6568C78.5932%2019.8315%2078.469%2019.9845%2078.3156%2020.1043C77.9771%2020.3904%2077.5446%2020.5411%2077.1016%2020.5271C76.7074%2020.538%2076.3223%2020.4073%2076.0162%2020.1587C75.6305%2019.8104%2075.2892%2019.416%2075%2018.9842'%20fill='white'/%3e%3cpath%20d='M80.1811%205.70949H80.5915V3.46944C80.5915%202.86863%2080.6064%202.39886%2080.6385%202.05766C80.6608%201.74802%2080.752%201.44728%2080.9055%201.17746C81.0552%200.917818%2081.2721%200.703405%2081.5335%200.556866C81.8103%200.392732%2082.1266%200.307244%2082.4484%200.309618C82.9289%200.31336%2083.3891%200.504012%2083.7316%200.841198C83.9854%201.06984%2084.1588%201.37415%2084.2261%201.70904C84.3039%202.18956%2084.3378%202.67618%2084.3274%203.16285V5.70949H85.6922C86.1277%205.67931%2086.5587%205.81242%2086.9013%206.08284C87.037%206.20323%2087.1446%206.35203%2087.2164%206.51868C87.2882%206.68533%2087.3224%206.86574%2087.3167%207.0471C87.3338%207.26146%2087.2865%207.47606%2087.1808%207.66332C87.075%207.85057%2086.9157%208.00192%2086.7233%208.0979C86.187%208.32481%2085.6062%208.4271%2085.0247%208.39707H84.3274V15.2483C84.3202%2015.6975%2084.3409%2016.1467%2084.3892%2016.5933C84.4163%2016.8756%2084.5304%2017.1426%2084.7156%2017.3573C84.8317%2017.4641%2084.969%2017.5452%2085.1185%2017.5955C85.268%2017.6457%2085.4264%2017.664%2085.5835%2017.6491C85.8823%2017.6397%2086.1795%2017.6016%2086.4711%2017.5353C86.7574%2017.4677%2087.0498%2017.4288%2087.3439%2017.4191C87.4965%2017.4205%2087.6473%2017.4533%2087.7868%2017.5154C87.9263%2017.5775%2088.0516%2017.6676%2088.1548%2017.7801C88.2737%2017.8963%2088.3673%2018.0357%2088.4298%2018.1897C88.4924%2018.3437%2088.5225%2018.509%2088.5183%2018.6751C88.5183%2019.2735%2088.1886%2019.7325%2087.5293%2020.0523C86.87%2020.3721%2085.9288%2020.5311%2084.7057%2020.5295C83.5387%2020.5295%2082.6585%2020.3342%2082.0577%2019.9435C81.469%2019.5736%2081.0444%2018.9924%2080.8709%2018.3191C80.6615%2017.4107%2080.5677%2016.4794%2080.5915%2015.5475V8.39459H80.097C79.6515%208.42648%2079.2102%208.28969%2078.8608%208.01136C78.7234%207.8914%2078.6142%207.74251%2078.5411%207.57537C78.468%207.40823%2078.4328%207.22698%2078.438%207.04463C78.4337%206.8606%2078.4716%206.67803%2078.5487%206.5109C78.6259%206.34376%2078.7402%206.19649%2078.8831%206.08036C79.2545%205.807%2079.7111%205.67466%2080.1712%205.70702'%20fill='white'/%3e%3c/svg%3e`,oh=`data:image/svg+xml,%3csvg%20width='7'%20height='13'%20viewBox='0%200%207%2013'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.04492%206.50535L0.757579%2010.7927C0.457835%2011.0924%200.457835%2011.5784%200.757579%2011.8782C1.05732%2012.1779%201.54331%2012.1779%201.84305%2011.8782L6.67312%207.04809C6.97287%206.74835%206.97287%206.26236%206.67312%205.96262L1.84305%201.13255C1.54331%200.832802%201.05732%200.832802%200.757579%201.13255C0.457835%201.43229%200.457835%201.91827%200.757579%202.21802L5.04492%206.50535Z'%20fill='white'/%3e%3c/svg%3e`,sh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%2019C5.5544%2017.9895%202%2013.6998%202%209.18182V4.27273L10%201L18%204.27273V9.18182C18%2013.7015%2014.4456%2017.9895%2010%2019ZM3.6%205.09091V9.18182C3.64572%2011.0736%204.29629%2012.8979%205.45214%2014.3755C6.608%2015.8532%208.20545%2016.9028%2010%2017.3636C11.7946%2016.9028%2013.392%2015.8532%2014.5479%2014.3755C15.7037%2012.8979%2016.3543%2011.0736%2016.4%209.18182V5.09091L10%202.63636L3.6%205.09091Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M10%209.18185C11.1046%209.18185%2012%208.26607%2012%207.1364C12%206.00672%2011.1046%205.09094%2010%205.09094C8.89543%205.09094%208%206.00672%208%207.1364C8%208.26607%208.89543%209.18185%2010%209.18185Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M6%2012.4545C6.39431%2013.1894%206.97247%2013.804%207.67531%2014.2353C8.37815%2014.6666%209.18042%2014.8991%2010%2014.9091C10.8196%2014.8991%2011.6219%2014.6666%2012.3247%2014.2353C13.0275%2013.804%2013.6057%2013.1894%2014%2012.4545C13.98%2010.9033%2011.3264%2010%2010%2010C8.6664%2010%206.02%2010.9033%206%2012.4545Z'%20fill='%23C9C9E8'/%3e%3c/svg%3e`,ch=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17%205.3335H3.66667C2.74619%205.3335%202%206.07969%202%207.00016V15.3335C2%2016.254%202.74619%2017.0002%203.66667%2017.0002H17C17.9205%2017.0002%2018.6667%2016.254%2018.6667%2015.3335V7.00016C18.6667%206.07969%2017.9205%205.3335%2017%205.3335Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.6667%2017V3.66667C13.6667%203.22464%2013.4911%202.80072%2013.1785%202.48816C12.866%202.17559%2012.442%202%2012%202H8.66667C8.22464%202%207.80072%202.17559%207.48816%202.48816C7.1756%202.80072%207%203.22464%207%203.66667V17'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,lh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.1667%2017.5V15.8333C19.1661%2015.0948%2018.9203%2014.3773%2018.4678%2013.7936C18.0153%2013.2099%2017.3818%2012.793%2016.6667%2012.6083'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.1667%2017.5V15.8333C14.1667%2014.9493%2013.8155%2014.1014%2013.1904%2013.4763C12.5652%2012.8512%2011.7174%2012.5%2010.8333%2012.5H4.16668C3.28262%2012.5%202.43478%2012.8512%201.80965%2013.4763C1.18453%2014.1014%200.833344%2014.9493%200.833344%2015.8333V17.5'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.3333%202.60834C14.0504%202.79192%2014.6859%203.20892%2015.1397%203.7936C15.5935%204.37827%2015.8399%205.09736%2015.8399%205.8375C15.8399%206.57765%2015.5935%207.29674%2015.1397%207.88141C14.6859%208.46609%2014.0504%208.88309%2013.3333%209.06667'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.49999%209.16667C9.34094%209.16667%2010.8333%207.67428%2010.8333%205.83333C10.8333%203.99238%209.34094%202.5%207.49999%202.5C5.65904%202.5%204.16666%203.99238%204.16666%205.83333C4.16666%207.67428%205.65904%209.16667%207.49999%209.16667Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,uh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.5%2011.6667H11.6667V17.5001H17.5V11.6667Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.33333%2011.6667H2.5V17.5001H8.33333V11.6667Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.5%202.5H11.6667V8.33333H17.5V2.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.33333%202.5H2.5V8.33333H8.33333V2.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,dh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%201C5.02991%201%201%205.02991%201%2010C1%2014.9701%205.02991%2019%2010%2019C14.9701%2019%2019%2014.9701%2019%2010C19%205.02991%2014.9701%201%2010%201ZM10%2017.4732C5.87366%2017.4732%202.52679%2014.1263%202.52679%2010C2.52679%205.87366%205.87366%202.52679%2010%202.52679C14.1263%202.52679%2017.4732%205.87366%2017.4732%2010C17.4732%2014.1263%2014.1263%2017.4732%2010%2017.4732Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M12.242%206.07661C11.6393%205.54826%2010.8437%205.25897%209.99999%205.25897C9.15624%205.25897%208.36071%205.55027%207.75803%206.07661C7.13124%206.62504%206.78571%207.36232%206.78571%208.15183V8.30451C6.78571%208.3929%206.85803%208.46522%206.94642%208.46522H7.91071C7.9991%208.46522%208.07142%208.3929%208.07142%208.30451V8.15183C8.07142%207.26589%208.93727%206.54469%209.99999%206.54469C11.0627%206.54469%2011.9286%207.26589%2011.9286%208.15183C11.9286%208.77661%2011.4866%209.34915%2010.8016%209.61232C10.3757%209.77504%2010.0141%2010.0603%209.7549%2010.434C9.49173%2010.8157%209.35512%2011.2737%209.35512%2011.7378V12.1697C9.35512%2012.2581%209.42745%2012.3304%209.51584%2012.3304H10.4801C10.5685%2012.3304%2010.6408%2012.2581%2010.6408%2012.1697V11.7137C10.6419%2011.5186%2010.7017%2011.3285%2010.8124%2011.1679C10.9231%2011.0074%2011.0797%2010.8839%2011.2616%2010.8137C12.4469%2010.3576%2013.2123%209.31299%2013.2123%208.15183C13.2143%207.36232%2012.8687%206.62504%2012.242%206.07661ZM9.19642%2014.4197C9.19642%2014.6328%209.28108%2014.8372%209.43178%2014.9879C9.58248%2015.1386%209.78687%2015.2233%209.99999%2015.2233C10.2131%2015.2233%2010.4175%2015.1386%2010.5682%2014.9879C10.7189%2014.8372%2010.8036%2014.6328%2010.8036%2014.4197C10.8036%2014.2066%2010.7189%2014.0022%2010.5682%2013.8515C10.4175%2013.7008%2010.2131%2013.6161%209.99999%2013.6161C9.78687%2013.6161%209.58248%2013.7008%209.43178%2013.8515C9.28108%2014.0022%209.19642%2014.2066%209.19642%2014.4197Z'%20fill='%23C9C9E8'/%3e%3c/svg%3e`,fh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%2018.3333C16.3807%2018.3333%2017.5%2017.214%2017.5%2015.8333C17.5%2014.4526%2016.3807%2013.3333%2015%2013.3333C13.6193%2013.3333%2012.5%2014.4526%2012.5%2015.8333C12.5%2017.214%2013.6193%2018.3333%2015%2018.3333Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5%2012.5C6.38071%2012.5%207.5%2011.3807%207.5%2010C7.5%208.61929%206.38071%207.5%205%207.5C3.61929%207.5%202.5%208.61929%202.5%2010C2.5%2011.3807%203.61929%2012.5%205%2012.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.15833%2011.2584L12.85%2014.575'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15%206.66669C16.3807%206.66669%2017.5%205.5474%2017.5%204.16669C17.5%202.78598%2016.3807%201.66669%2015%201.66669C13.6193%201.66669%2012.5%202.78598%2012.5%204.16669C12.5%205.5474%2013.6193%206.66669%2015%206.66669Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8417%205.42499L7.15833%208.74165'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,ph=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.6667%201.66669H5.00001C4.55798%201.66669%204.13406%201.84228%203.8215%202.15484C3.50894%202.4674%203.33334%202.89133%203.33334%203.33335V16.6667C3.33334%2017.1087%203.50894%2017.5326%203.8215%2017.8452C4.13406%2018.1578%204.55798%2018.3334%205.00001%2018.3334H15C15.442%2018.3334%2015.866%2018.1578%2016.1785%2017.8452C16.4911%2017.5326%2016.6667%2017.1087%2016.6667%2016.6667V6.66669L11.6667%201.66669Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.3333%2014.1667H6.66666'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.3333%2010.8333H6.66666'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.33332%207.5H7.49999H6.66666'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.6667%201.66669V6.66669H16.6667'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,mh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_530_15536)'%3e%3cpath%20d='M10%2012.5C11.3807%2012.5%2012.5%2011.3807%2012.5%2010C12.5%208.61929%2011.3807%207.5%2010%207.5C8.61929%207.5%207.5%208.61929%207.5%2010C7.5%2011.3807%208.61929%2012.5%2010%2012.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.1667%2012.5C16.0557%2012.7513%2016.0227%2013.0301%2016.0717%2013.3005C16.1207%2013.5708%2016.2496%2013.8202%2016.4417%2014.0166L16.4917%2014.0666C16.6466%2014.2214%2016.7696%2014.4052%2016.8534%2014.6076C16.9373%2014.8099%2016.9805%2015.0268%2016.9805%2015.2458C16.9805%2015.4648%2016.9373%2015.6817%2016.8534%2015.884C16.7696%2016.0864%2016.6466%2016.2702%2016.4917%2016.425C16.3369%2016.5799%2016.1531%2016.7029%2015.9507%2016.7867C15.7484%2016.8706%2015.5315%2016.9138%2015.3125%2016.9138C15.0935%2016.9138%2014.8766%2016.8706%2014.6743%2016.7867C14.4719%2016.7029%2014.2881%2016.5799%2014.1333%2016.425L14.0833%2016.375C13.8869%2016.1829%2013.6375%2016.054%2013.3672%2016.005C13.0968%2015.956%2012.818%2015.989%2012.5667%2016.1C12.3202%2016.2056%2012.11%2016.381%2011.9619%2016.6046C11.8139%2016.8282%2011.7344%2017.0902%2011.7333%2017.3583V17.5C11.7333%2017.942%2011.5577%2018.3659%2011.2452%2018.6785C10.9326%2018.991%2010.5087%2019.1666%2010.0667%2019.1666C9.62465%2019.1666%209.20073%2018.991%208.88817%2018.6785C8.5756%2018.3659%208.40001%2017.942%208.40001%2017.5V17.425C8.39356%2017.1491%208.30427%2016.8816%208.14377%2016.6572C7.98326%2016.4328%207.75896%2016.2619%207.50001%2016.1666C7.24866%2016.0557%206.96985%2016.0226%206.69952%2016.0716C6.42919%2016.1207%206.17974%2016.2495%205.98334%2016.4416L5.93334%2016.4916C5.77855%2016.6466%205.59474%2016.7695%205.39241%2016.8534C5.19008%2016.9373%204.9732%2016.9805%204.75418%2016.9805C4.53515%2016.9805%204.31827%2016.9373%204.11594%2016.8534C3.91361%2016.7695%203.7298%2016.6466%203.57501%2016.4916C3.42005%2016.3369%203.29712%2016.153%203.21324%2015.9507C3.12937%2015.7484%203.0862%2015.5315%203.0862%2015.3125C3.0862%2015.0935%203.12937%2014.8766%203.21324%2014.6742C3.29712%2014.4719%203.42005%2014.2881%203.57501%2014.1333L3.62501%2014.0833C3.81712%2013.8869%203.946%2013.6375%203.99501%2013.3671C4.04403%2013.0968%204.01094%2012.818%203.90001%2012.5666C3.79437%2012.3202%203.61897%2012.11%203.3954%2011.9619C3.17182%2011.8138%202.90983%2011.7344%202.64168%2011.7333H2.50001C2.05798%2011.7333%201.63406%2011.5577%201.3215%2011.2452C1.00894%2010.9326%200.833344%2010.5087%200.833344%2010.0666C0.833344%209.62462%201.00894%209.2007%201.3215%208.88813C1.63406%208.57557%202.05798%208.39998%202.50001%208.39998H2.57501C2.85084%208.39353%203.11835%208.30424%203.34276%208.14374C3.56717%207.98323%203.73811%207.75893%203.83334%207.49998C3.94427%207.24863%203.97736%206.96982%203.92835%206.69949C3.87933%206.42916%203.75046%206.17971%203.55834%205.98331L3.50834%205.93331C3.35338%205.77852%203.23045%205.59471%203.14658%205.39238C3.0627%205.19005%203.01953%204.97317%203.01953%204.75415C3.01953%204.53512%203.0627%204.31824%203.14658%204.11591C3.23045%203.91358%203.35338%203.72977%203.50834%203.57498C3.66313%203.42002%203.84695%203.29709%204.04928%203.21321C4.25161%203.12934%204.46848%203.08617%204.68751%203.08617C4.90654%203.08617%205.12341%203.12934%205.32574%203.21321C5.52807%203.29709%205.71189%203.42002%205.86668%203.57498L5.91668%203.62498C6.11308%203.81709%206.36252%203.94597%206.63285%203.99498C6.90318%204.044%207.182%204.01091%207.43334%203.89998H7.50001C7.74648%203.79434%207.95669%203.61894%208.10475%203.39537C8.25282%203.17179%208.33227%202.9098%208.33334%202.64165V2.49998C8.33334%202.05795%208.50894%201.63403%208.8215%201.32147C9.13406%201.00891%209.55798%200.833313%2010%200.833313C10.442%200.833313%2010.866%201.00891%2011.1785%201.32147C11.4911%201.63403%2011.6667%202.05795%2011.6667%202.49998V2.57498C11.6677%202.84313%2011.7472%203.10513%2011.8953%203.3287C12.0433%203.55228%2012.2535%203.72768%2012.5%203.83331C12.7514%203.94424%2013.0302%203.97733%2013.3005%203.92832C13.5708%203.8793%2013.8203%203.75043%2014.0167%203.55831L14.0667%203.50831C14.2215%203.35335%2014.4053%203.23042%2014.6076%203.14655C14.8099%203.06267%2015.0268%203.0195%2015.2458%203.0195C15.4649%203.0195%2015.6817%203.06267%2015.8841%203.14655C16.0864%203.23042%2016.2702%203.35335%2016.425%203.50831C16.58%203.6631%2016.7029%203.84692%2016.7868%204.04925C16.8706%204.25158%2016.9138%204.46845%2016.9138%204.68748C16.9138%204.90651%2016.8706%205.12338%2016.7868%205.32571C16.7029%205.52804%2016.58%205.71186%2016.425%205.86665L16.375%205.91665C16.1829%206.11305%2016.054%206.36249%2016.005%206.63282C15.956%206.90315%2015.9891%207.18197%2016.1%207.43331V7.49998C16.2056%207.74645%2016.381%207.95666%2016.6046%208.10472C16.8282%208.25279%2017.0902%208.33224%2017.3583%208.33331H17.5C17.942%208.33331%2018.366%208.50891%2018.6785%208.82147C18.9911%209.13403%2019.1667%209.55795%2019.1667%209.99998C19.1667%2010.442%2018.9911%2010.8659%2018.6785%2011.1785C18.366%2011.4911%2017.942%2011.6666%2017.5%2011.6666H17.425C17.1569%2011.6677%2016.8949%2011.7472%2016.6713%2011.8952C16.4477%2012.0433%2016.2723%2012.2535%2016.1667%2012.5V12.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_530_15536'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,hh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%204.33333C1%203.18274%201.93274%202.25%203.08333%202.25H16.4167C17.5673%202.25%2018.5%203.18274%2018.5%204.33333V16C18.5%2017.1506%2017.5673%2018.0833%2016.4167%2018.0833H3.08333C1.93274%2018.0833%201%2017.1506%201%2016V4.33333ZM3.08333%203.08333C2.39298%203.08333%201.83333%203.64298%201.83333%204.33333V16C1.83333%2016.6904%202.39298%2017.25%203.08333%2017.25H16.4167C17.107%2017.25%2017.6667%2016.6904%2017.6667%2016V4.33333C17.6667%203.64298%2017.107%203.08333%2016.4167%203.08333H3.08333Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'%20stroke-linejoin='round'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%204.33333C1%203.18274%201.93274%202.25%203.08333%202.25H16.4167C17.5673%202.25%2018.5%203.18274%2018.5%204.33333V6.83333C18.5%207.06345%2018.3135%207.25%2018.0833%207.25H1.41667C1.18655%207.25%201%207.06345%201%206.83333V4.33333ZM3.08333%203.08333C2.39298%203.08333%201.83333%203.64298%201.83333%204.33333V6.41667H17.6667V4.33333C17.6667%203.64298%2017.107%203.08333%2016.4167%203.08333H3.08333Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'%20stroke-linejoin='round'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.33333%201V3.91667H3.5V1H4.33333Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.1667%201V3.91667H9.33334V1H10.1667Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%201V3.91667H15.1667V1H16Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.53453%2015.2573C6.43104%2015.1538%206.38944%2015.0036%206.42493%2014.8616L7.01419%2012.5046C7.03251%2012.4313%207.07039%2012.3644%207.12379%2012.311L10.0701%209.36472C10.5582%208.87657%2011.3497%208.87657%2011.8378%209.36472L12.4271%209.95398C12.9152%2010.4421%2012.9152%2011.2336%2012.4271%2011.7217L9.48081%2014.668C9.42741%2014.7214%209.3605%2014.7593%209.28724%2014.7776L6.93022%2015.3669C6.78823%2015.4024%206.63802%2015.3608%206.53453%2015.2573ZM8.97316%2013.9972L11.8378%2011.1325C12.0006%2010.9698%2012.0006%2010.706%2011.8378%2010.5432L11.2486%209.95398C11.0859%209.79126%2010.822%209.79126%2010.6593%209.95398L7.79465%2012.8186L7.40181%2014.39L8.97316%2013.9972Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,gh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_530_15505)'%3e%3cpath%20d='M18.3333%201.66669L9.16666%2010.8334'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.3333%201.66669L12.5%2018.3334L9.16666%2010.8334L1.66666%207.50002L18.3333%201.66669Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_530_15505'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,_h=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7154_21562)'%3e%3cpath%20d='M4.10156%208.64844H8.24219V9.82031H4.10156V8.64844Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M4.10156%2010.9922H8.24219V12.1641H4.10156V10.9922Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M4.10156%2013.3359H8.24219V14.5078H4.10156V13.3359Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M18.2422%2011.3516H20V0.804688H9.41406V3.96074H4.10156C2.80922%203.96074%201.75781%205.01215%201.75781%206.30449V14.5076C1.75781%2014.9344%201.87301%2015.3345%202.07312%2015.6795H0V16.2654C0%2017.8809%201.31426%2019.1951%202.92969%2019.1951H17.0703C18.6857%2019.1951%2020%2017.8809%2020%2016.2654V15.6795H17.9269C18.127%2015.3345%2018.2422%2014.9344%2018.2422%2014.5076V11.3516ZM10.5859%201.97656H18.8281V10.1797H12.1429L10.5859%2011.7112V1.97656ZM1.27227%2016.8513H7.07031V18.0232H2.92969C2.16578%2018.0232%201.5141%2017.5334%201.27227%2016.8513ZM11.7578%2016.8513V18.0232H8.24219V16.8513H11.7578ZM17.0703%2018.0232H12.9297V16.8513H18.7277C18.4859%2017.5334%2017.8342%2018.0232%2017.0703%2018.0232ZM4.10156%2015.6795C3.45539%2015.6795%202.92969%2015.1538%202.92969%2014.5076V6.30445C2.92969%205.65828%203.45539%205.13258%204.10156%205.13258H9.41406V14.5075L12.6227%2011.3515H17.0703V14.5076C17.0703%2015.1538%2016.5446%2015.6795%2015.8984%2015.6795H4.10156Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M17.6367%208.42184C17.6367%207.64664%2017.3213%206.88887%2016.7714%206.34258L16.4648%206.0368V4.90625C16.4648%203.93699%2015.6763%203.14844%2014.707%203.14844C13.7378%203.14844%2012.9492%203.93699%2012.9492%204.90625V6.03691L12.6437%206.34152C12.0931%206.88793%2011.7773%207.64617%2011.7773%208.42188V9.00781H17.6367V8.42184ZM13.0507%207.8359C13.1386%207.58801%2013.2814%207.35973%2013.4702%207.17234L14.1211%206.52328V4.90625C14.1211%204.58316%2014.3839%204.32031%2014.707%204.32031C15.0301%204.32031%2015.293%204.58316%2015.293%204.90625V6.52313L15.9448%207.17336C16.1331%207.36016%2016.2756%207.5882%2016.3634%207.83594H13.0507V7.8359Z'%20fill='%23C9C9E8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7154_21562'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,vh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6415_8719)'%3e%3cpath%20d='M10.0391%208.88672H11.0156C11.3392%208.88672%2011.6016%208.62438%2011.6016%208.30078C11.6016%207.97719%2011.3392%207.71484%2011.0156%207.71484H10.0391C9.71547%207.71484%209.45312%207.97719%209.45312%208.30078C9.45312%208.62438%209.71547%208.88672%2010.0391%208.88672Z'%20fill='white'/%3e%3cpath%20d='M7.53906%207.71484H6.5625C6.23891%207.71484%205.97656%207.97719%205.97656%208.30078C5.97656%208.62438%206.23891%208.88672%206.5625%208.88672H7.53906C7.86266%208.88672%208.125%208.62438%208.125%208.30078C8.125%207.97719%207.86266%207.71484%207.53906%207.71484Z'%20fill='white'/%3e%3cpath%20d='M13.5156%208.88672H14.4922C14.8158%208.88672%2015.0781%208.62438%2015.0781%208.30078C15.0781%207.97719%2014.8158%207.71484%2014.4922%207.71484H13.5156C13.192%207.71484%2012.9297%207.97719%2012.9297%208.30078C12.9297%208.62438%2013.192%208.88672%2013.5156%208.88672Z'%20fill='white'/%3e%3cpath%20d='M4.0625%2010.3516H3.08594C2.76234%2010.3516%202.5%2010.6139%202.5%2010.9375C2.5%2011.2611%202.76234%2011.5234%203.08594%2011.5234H4.0625C4.38609%2011.5234%204.64844%2011.2611%204.64844%2010.9375C4.64844%2010.6139%204.38609%2010.3516%204.0625%2010.3516Z'%20fill='white'/%3e%3cpath%20d='M7.53906%2010.3516H6.5625C6.23891%2010.3516%205.97656%2010.6139%205.97656%2010.9375C5.97656%2011.2611%206.23891%2011.5234%206.5625%2011.5234H7.53906C7.86266%2011.5234%208.125%2011.2611%208.125%2010.9375C8.125%2010.6139%207.86266%2010.3516%207.53906%2010.3516Z'%20fill='white'/%3e%3cpath%20d='M11.6016%2010.9375C11.6016%2010.6139%2011.3392%2010.3516%2011.0156%2010.3516H10.0391C9.71547%2010.3516%209.45312%2010.6139%209.45312%2010.9375C9.45312%2011.2611%209.71547%2011.5234%2010.0391%2011.5234H11.0156C11.3392%2011.5234%2011.6016%2011.2611%2011.6016%2010.9375Z'%20fill='white'/%3e%3cpath%20d='M4.0625%2012.9883H3.08594C2.76234%2012.9883%202.5%2013.2506%202.5%2013.5742C2.5%2013.8978%202.76234%2014.1602%203.08594%2014.1602H4.0625C4.38609%2014.1602%204.64844%2013.8978%204.64844%2013.5742C4.64844%2013.2506%204.38609%2012.9883%204.0625%2012.9883Z'%20fill='white'/%3e%3cpath%20d='M7.53906%2012.9883H6.5625C6.23891%2012.9883%205.97656%2013.2506%205.97656%2013.5742C5.97656%2013.8978%206.23891%2014.1602%206.5625%2014.1602H7.53906C7.86266%2014.1602%208.125%2013.8978%208.125%2013.5742C8.125%2013.2506%207.86266%2012.9883%207.53906%2012.9883Z'%20fill='white'/%3e%3cpath%20d='M17.5781%2010.9014V3.32031C17.5781%202.13566%2016.6143%201.17188%2015.4297%201.17188H14.2969V0.585938C14.2969%200.262344%2014.0345%200%2013.7109%200C13.3873%200%2013.125%200.262344%2013.125%200.585938V1.17188H11.0156V0.585938C11.0156%200.262344%2010.7533%200%2010.4297%200C10.1061%200%209.84375%200.262344%209.84375%200.585938V1.17188H7.73438V0.585938C7.73438%200.262344%207.47203%200%207.14844%200C6.82484%200%206.5625%200.262344%206.5625%200.585938V1.17188H4.45312V0.585938C4.45312%200.262344%204.19078%200%203.86719%200C3.54359%200%203.28125%200.262344%203.28125%200.585938V1.17188H2.14844C0.963789%201.17188%200%202.13566%200%203.32031V15.0391C0%2016.0083%200.788555%2016.7969%201.75781%2016.7969H10.5321C11.2184%2018.6643%2013.0147%2020%2015.1172%2020C17.8096%2020%2020%2017.8096%2020%2015.1172C20%2013.3217%2019.0257%2011.7496%2017.5781%2010.9014ZM1.17188%203.32031C1.17188%202.78184%201.60996%202.34375%202.14844%202.34375H3.28125V2.92969C3.28125%203.25328%203.54359%203.51562%203.86719%203.51562C4.19078%203.51562%204.45312%203.25328%204.45312%202.92969V2.34375H6.5625V2.92969C6.5625%203.25328%206.82484%203.51562%207.14844%203.51562C7.47203%203.51562%207.73438%203.25328%207.73438%202.92969V2.34375H9.84375V2.92969C9.84375%203.25328%2010.1061%203.51562%2010.4297%203.51562C10.7533%203.51562%2011.0156%203.25328%2011.0156%202.92969V2.34375H13.125V2.92969C13.125%203.25328%2013.3873%203.51562%2013.7109%203.51562C14.0345%203.51562%2014.2969%203.25328%2014.2969%202.92969V2.34375H15.4297C15.9682%202.34375%2016.4062%202.78184%2016.4062%203.32031V5.07812H1.17188V3.32031ZM1.75781%2015.625C1.43473%2015.625%201.17188%2015.3621%201.17188%2015.0391V6.25H16.4062V10.4074C15.9954%2010.2948%2015.5632%2010.2344%2015.1172%2010.2344C12.4248%2010.2344%2010.2344%2012.4248%2010.2344%2015.1172C10.2344%2015.2886%2010.2434%2015.458%2010.2607%2015.625H1.75781ZM15.1172%2018.8281C13.071%2018.8281%2011.4062%2017.1634%2011.4062%2015.1172C11.4062%2013.071%2013.071%2011.4062%2015.1172%2011.4062C17.1634%2011.4062%2018.8281%2013.071%2018.8281%2015.1172C18.8281%2017.1634%2017.1634%2018.8281%2015.1172%2018.8281Z'%20fill='white'/%3e%3cpath%20d='M17.0703%2014.5312H15.7031V13.1641C15.7031%2012.8405%2015.4408%2012.5781%2015.1172%2012.5781C14.7936%2012.5781%2014.5312%2012.8405%2014.5312%2013.1641V15.1172C14.5312%2015.4408%2014.7936%2015.7031%2015.1172%2015.7031H17.0703C17.3939%2015.7031%2017.6562%2015.4408%2017.6562%2015.1172C17.6562%2014.7936%2017.3939%2014.5312%2017.0703%2014.5312Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6415_8719'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,yh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18.415%208.82125C18.21%208.71313%2017.9606%208.72938%2017.7694%208.86063L11.8056%2012.9894L10.3562%2011.9856C10.1419%2011.8375%209.85875%2011.8375%209.64437%2011.9856L8.19438%2012.9894L3.0275%209.4125L5.32188%208.03563C5.61813%207.85813%205.71375%207.47438%205.53625%207.17813C5.35875%206.88188%204.97438%206.78625%204.67875%206.96375L1.55375%208.83875C1.37%208.94875%201.25%209.17563%201.25%209.375V16.875C1.25%2017.9088%202.09125%2018.75%203.125%2018.75H16.875C17.9088%2018.75%2018.75%2017.9088%2018.75%2016.875V9.375C18.75%209.1425%2018.6206%208.92938%2018.415%208.82125ZM2.51%2016.925C2.50875%2016.9075%202.5%2016.8925%202.5%2016.875V10.5681L7.09625%2013.75L2.51%2016.925ZM3.87625%2017.5L10%2013.26L16.1244%2017.5H3.87625ZM17.5%2016.875C17.5%2016.8925%2017.4912%2016.9075%2017.49%2016.925L12.9037%2013.75L17.5%2010.5681V16.875Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M13.3644%208.7025C13.5975%208.60562%2013.75%208.3775%2013.75%208.125V2.5C13.75%202.2475%2013.5975%202.01937%2013.3644%201.9225C13.13%201.825%2012.8619%201.87937%2012.6831%202.05812C11.6162%203.125%209.95937%203.125%208.75%203.125H7.8125C6.60625%203.125%205.625%204.10625%205.625%205.3125C5.625%206.44875%206.49937%207.37437%207.60875%207.47937L8.1375%2010.1225C8.20438%2010.4587%208.53187%2010.6806%208.87312%2010.6125C9.21187%2010.545%209.43125%2010.2156%209.36312%209.87687L8.8875%207.5C10.0831%207.50125%2011.655%207.53812%2012.6831%208.56625C12.8619%208.74562%2013.13%208.79937%2013.3644%208.7025ZM8.125%206.25H7.8125C7.29562%206.25%206.875%205.82937%206.875%205.3125C6.875%204.79562%207.29562%204.375%207.8125%204.375H8.125V6.25ZM12.5%206.905C11.4719%206.3725%2010.3263%206.27437%209.375%206.25562V4.36937C10.3263%204.35062%2011.4719%204.2525%2012.5%203.72V6.905Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M16.25%204.6875H17.5C17.845%204.6875%2018.125%204.9675%2018.125%205.3125C18.125%205.6575%2017.845%205.9375%2017.5%205.9375H16.25C15.905%205.9375%2015.625%205.6575%2015.625%205.3125C15.625%204.9675%2015.905%204.6875%2016.25%204.6875Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M17.2488%202.1875C17.4213%202.48625%2017.3188%202.86875%2017.02%203.04125L15.9375%203.66625C15.6413%203.8375%2015.2575%203.73875%2015.0838%203.4375C14.9113%203.13875%2015.0138%202.75625%2015.3125%202.58375L16.395%201.95875C16.6931%201.78562%2017.0763%201.88812%2017.2488%202.1875Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M15.0838%207.1875C15.2563%206.88813%2015.6388%206.78562%2015.9375%206.95875L17.02%207.58375C17.3194%207.75625%2017.4213%208.13875%2017.2488%208.4375C17.075%208.73813%2016.6913%208.8375%2016.395%208.66625L15.3125%208.04125C15.0132%207.86875%2014.9113%207.48625%2015.0838%207.1875Z'%20fill='%23C9C9E8'/%3e%3c/svg%3e`,bh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%204.35092C20%203.33607%2019.1743%202.51041%2018.1595%202.51041H1.84052C0.825863%202.51045%200.000351564%203.33572%200%204.35123V4.35155V15.6484C0%2016.676%200.834066%2017.4896%201.84114%2017.4896H18.1588C19.1863%2017.4896%2020%2016.6555%2020%2015.6484V4.35155C20%204.35147%2020%204.35139%2020%204.35131C20%204.35119%2020%204.35108%2020%204.35092ZM1.84052%203.68233H18.1595C18.5282%203.68233%2018.8281%203.98229%2018.8281%204.3519C18.8281%204.54831%2018.7305%204.73061%2018.5668%204.83967L10.3713%2010.3036C10.1458%2010.454%209.8543%2010.454%209.62875%2010.3036C9.62875%2010.3036%201.43301%204.83956%201.43317%204.83967C1.43321%204.83971%201.43305%204.8396%201.43301%204.83956C1.2695%204.73061%201.17188%204.54831%201.17188%204.35092C1.17188%203.98225%201.47184%203.68233%201.84052%203.68233ZM18.1589%2016.3177H1.84114C1.47633%2016.3177%201.17188%2016.0227%201.17188%2015.6484V6.07394L8.97867%2011.2786C9.2889%2011.4854%209.64445%2011.5888%2010%2011.5888C10.3556%2011.5888%2010.7112%2011.4854%2011.0214%2011.2786L18.8281%206.07394V15.6485C18.8281%2016.0132%2018.5332%2016.3177%2018.1589%2016.3177Z'%20fill='%23586888'/%3e%3c/svg%3e`;function xh(e){return!e||typeof e!=`string`?`User`:e.split(` `).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Sh(e){let t=(e||`User`).split(` `).filter(Boolean);return`${t[0]?.charAt(0)||`U`}${t.length>1?t.at(-1)?.charAt(0):``}`.toUpperCase()}function Ch(e){let t=(e||`User`).charAt(0).toUpperCase(),n=JSON.parse(localStorage.getItem(`colorMap`)||`{}`);if(n[t])return n[t];let r=[`#0053a5`,`#1677ff`,`#15803d`,`#f97316`,`#6366f1`,`#8b5cf6`],i=r[t.charCodeAt(0)%r.length];return localStorage.setItem(`colorMap`,JSON.stringify({...n,[t]:i})),i}function wh({leftOffset:e}){let t=(0,p.useNavigate)(),n=(0,p.useLocation)(),r=localStorage.getItem(`companyName`)||`Zinnext`,i=localStorage.getItem(`userName`)||localStorage.getItem(`preferred_Username`)||`User`,a=localStorage.getItem(`preferred_Username`)||i,o=localStorage.getItem(`roleId`)||``,s=xh(i),c=Sh(s);function l(){ne(),t(`/login`,{replace:!0})}let m=[{key:`profile-name`,label:(0,f.jsxs)(`div`,{className:`app-layout-profile-summary`,children:[(0,f.jsx)(u.Avatar,{size:42,style:{backgroundColor:Ch(s)},children:c}),(0,f.jsxs)(`div`,{className:`app-layout-profile-copy`,children:[(0,f.jsx)(X,{variant:`body-strong`,truncate:!0,className:`app-layout-profile-name`,children:s}),o&&(0,f.jsx)(X,{variant:`caption`,color:`secondary`,className:`app-layout-profile-role`,children:o})]})]}),disabled:!0},{type:`divider`},{key:`dashboard`,label:(0,f.jsxs)(p.Link,{to:`/dashboard`,className:`app-layout-menu-link`,children:[(0,f.jsx)(d.AppstoreOutlined,{}),`Dashboard`]})},{key:`my-profile`,label:(0,f.jsxs)(p.Link,{to:`/my-profile`,className:`app-layout-menu-link`,children:[(0,f.jsx)(d.UserOutlined,{}),`My Profile`]})},{type:`divider`},{key:`logout`,label:(0,f.jsxs)(`span`,{className:`app-layout-menu-link app-layout-menu-danger`,children:[(0,f.jsx)(d.LogoutOutlined,{}),`Logout`]}),onClick:l}];return(0,f.jsxs)(`header`,{className:`app-layout-header`,style:{left:e},children:[(0,f.jsx)(`div`,{className:`app-layout-company`,children:(0,f.jsx)(X,{variant:`body-strong`,truncate:!0,className:`app-layout-company-name`,children:r})}),(0,f.jsxs)(`div`,{className:`app-layout-header-actions`,children:[(0,f.jsx)(u.Tooltip,{title:`Inbox`,children:(0,f.jsx)(p.Link,{to:`/inbox`,className:n.pathname===`/inbox`?`app-layout-icon-btn is-active`:`app-layout-icon-btn`,"aria-label":`Inbox`,children:(0,f.jsx)(`img`,{src:bh,alt:``,"aria-hidden":`true`,className:`app-layout-icon-img`})})}),(0,f.jsx)(`div`,{className:`app-layout-header-divider`}),(0,f.jsxs)(`div`,{className:`app-layout-user`,children:[(0,f.jsx)(u.Avatar,{size:30,style:{backgroundColor:Ch(s)},children:c}),(0,f.jsx)(X,{variant:`label`,truncate:!0,className:`app-layout-user-name`,children:a}),(0,f.jsx)(u.Dropdown,{menu:{items:m},trigger:[`click`],placement:`bottomRight`,overlayClassName:`app-layout-user-dropdown`,children:(0,f.jsx)(`button`,{type:`button`,className:`app-layout-dropdown-btn`,"aria-label":`Open user menu`,children:(0,f.jsx)(d.DownOutlined,{})})})]})]})]})}var{Sider:Th}=u.Layout,Eh={Dashboard:uh,Jobs:ch,Candidates:lh,Submissions:gh,Network:fh,Scheduler:hh,Admin:sh,Reports:ph,Settings:mh,Help:dh,onboarding:_h,Onboarding:_h,timesheet:vh,Timesheet:vh,campaign:yh,Campaign:yh,addTestCase:ph,viewTestCase:hh,manageModules:mh,bulkUpload:d.UploadOutlined,"bulk-upload":d.UploadOutlined};function Dh(e){let t=localStorage.getItem(e);if(!t||t===`undefined`||t===`null`||t.trim()===``)return[];try{let e=JSON.parse(t);return Array.isArray(e)?e:Array.isArray(e?.menu)?e.menu:Array.isArray(e?.menus?.menu)?e.menus.menu:[]}catch(t){return console.error(`Error parsing ${e}:`,t),[]}}function Oh(e){let t=e.replace(/^\/+/,``);if(!t)return[`dashboard`];let n=t.split(`/`);return[t,n[0],n.at(-1)].filter(Boolean)}function kh({icon:e,itemKey:t}){let n=t===`bulk-upload`?d.UploadOutlined:Eh[e];return n?typeof n==`string`?(0,f.jsx)(`img`,{src:n,alt:``,className:`app-sidebar-menu-icon`,"aria-hidden":`true`}):(0,f.jsx)(n,{className:`app-sidebar-menu-icon`,"aria-hidden":`true`}):null}function Ah(e){return e.map(e=>({key:e.key,icon:(0,f.jsx)(kh,{icon:e.icon,itemKey:e.key}),label:e.label,disabled:e.status===`inactive`,children:Array.isArray(e.children)?Ah(e.children):void 0}))}function jh(e){let t=e.some(e=>e.key===`addTestCase`),n=e.some(e=>e.key===`bulk-upload`);if(!t||n)return e;let r=[...e],i=r.findIndex(e=>e.key===`manageModules`);return r.splice(i>=0?i+1:r.length,0,{key:`bulk-upload`,icon:`bulk-upload`,label:`Bulk upload`,status:`active`}),r}function Mh({collapsed:e,onToggle:t}){let n=(0,p.useNavigate)(),r=(0,p.useLocation)(),[i,a]=(0,l.useState)([]),o=(0,l.useMemo)(()=>Oh(r.pathname),[r.pathname]);(0,l.useEffect)(()=>{o.length>0&&localStorage.setItem(`activeKey`,o[0])},[o]);let s=(0,l.useMemo)(()=>Ah(jh(Dh(`menu`))),[]);function c(){e||a([]),t()}function d({key:e}){n(`/${e}`)}return(0,f.jsx)(Th,{trigger:null,collapsible:!0,collapsed:e,width:200,collapsedWidth:60,className:`app-sidebar`,children:(0,f.jsxs)(`div`,{className:`app-sidebar-panel`,children:[(0,f.jsx)(`div`,{className:`app-sidebar-brand`,children:(0,f.jsxs)(`div`,{className:`app-sidebar-logo`,children:[(0,f.jsx)(`img`,{src:ih,alt:``,className:`app-sidebar-logo-icon`}),(0,f.jsx)(`img`,{src:ah,alt:`Zinnext`,className:`app-sidebar-logo-text`})]})}),(0,f.jsx)(`button`,{type:`button`,className:`app-sidebar-toggle`,onClick:c,"aria-label":e?`Expand sidebar`:`Collapse sidebar`,children:(0,f.jsx)(`img`,{src:oh,alt:``,"aria-hidden":`true`})}),(0,f.jsx)(`div`,{className:`app-sidebar-body`,children:(0,f.jsx)(u.Menu,{mode:`inline`,theme:`dark`,selectedKeys:o,openKeys:e?[]:i,items:s,onClick:d,onOpenChange:a,className:`app-sidebar-menu`})})]})})}var Nh=`You're not logged in`,Ph=`You haven't logged into this session. Please login to access the data.`;function Fh(){try{return!!ee()}catch{return!1}}function Ih({children:e,title:t=Nh,message:n=Ph,loginPath:r=`/login`,loginLabel:i=`Go to Login`,onLogin:a,fallback:o}){let[s,c]=(0,l.useState)(Fh);return(0,l.useEffect)(()=>{let e=()=>c(Fh());return window.addEventListener(`auth:login`,e),window.addEventListener(`auth:logout`,e),window.addEventListener(`storage`,e),window.addEventListener(`focus`,e),()=>{window.removeEventListener(`auth:login`,e),window.removeEventListener(`auth:logout`,e),window.removeEventListener(`storage`,e),window.removeEventListener(`focus`,e)}},[]),s?e:o===void 0?(0,f.jsx)(`div`,{className:`ct-auth-guard`,children:(0,f.jsx)(`div`,{className:`ct-auth-guard__card`,children:(0,f.jsx)(u.Result,{status:`403`,icon:(0,f.jsx)(d.LockOutlined,{className:`ct-auth-guard__icon`}),title:t,subTitle:n,extra:(0,f.jsx)(u.Button,{type:`primary`,size:`large`,onClick:()=>{if(typeof a==`function`){a();return}typeof window<`u`&&window.location.assign(r)},children:i})})})}):o}Ih.propTypes={children:y.default.node,title:y.default.node,message:y.default.node,loginPath:y.default.string,loginLabel:y.default.node,onLogin:y.default.func,fallback:y.default.node};var Lh=60;function Rh(){let[e,t]=(0,l.useState)(!0);return(0,f.jsxs)(`div`,{className:`app-layout-shell`,children:[(0,f.jsx)(Mh,{collapsed:e,onToggle:()=>t(e=>!e)}),(0,f.jsx)(wh,{leftOffset:60}),(0,f.jsx)(`main`,{className:`app-layout-main`,style:{marginLeft:60,paddingTop:Lh},children:(0,f.jsx)(`div`,{className:`app-layout-content`,children:(0,f.jsx)(Ih,{children:(0,f.jsx)(p.Outlet,{})})})})]})}function zh({onLogin:e,defaultRedirectPath:t=`/`}){let[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(``),o=(0,p.useNavigate)(),s=(0,p.useLocation)(),c=s.state?.from?.pathname||t,m=new URLSearchParams(s.search).get(`session_expired`)===`1`;async function h(t){a(``),r(!0);try{let n=await le({email:t.email,user_pwd:t.user_pwd});if(e?.(n),ae()){o(`/select-project`,{replace:!0});return}o(c,{replace:!0})}catch(e){a(e.message||`Unable to login. Please check your credentials.`)}finally{r(!1)}}return(0,f.jsxs)(`div`,{className:`auth-login-page`,children:[(0,f.jsx)(`section`,{className:`auth-login-bg`,style:{background:Ka.brand},children:(0,f.jsxs)(`div`,{className:`auth-login-static-section`,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(`img`,{src:nh,alt:``,className:`auth-login-img-one`})}),(0,f.jsx)(`div`,{className:`auth-login-hero-wrap`,children:(0,f.jsx)(`img`,{src:rh,alt:``,className:`auth-login-img-two`})}),(0,f.jsx)(X,{as:`p`,variant:`body`,color:`inverse`,size:`2xl`,weight:`regular`,align:`right`,className:`auth-login-tagline`,children:`Best in class processes in a box.`})]})}),(0,f.jsx)(`section`,{className:`auth-login-form-layout`,children:(0,f.jsx)(`div`,{className:`auth-login-form-container`,children:(0,f.jsxs)(`div`,{className:`auth-login-form-shell`,children:[m&&(0,f.jsx)(`div`,{className:`auth-login-session-expired-container`,children:(0,f.jsx)(`div`,{className:`auth-login-slide-in`,children:(0,f.jsx)(u.Alert,{type:`warning`,showIcon:!0,icon:(0,f.jsx)(d.ExclamationCircleFilled,{style:{fontSize:30,color:`#FFC107`}}),message:(0,f.jsxs)(`div`,{className:`auth-login-alert-message-container`,children:[(0,f.jsx)(u.Divider,{className:`auth-login-alert-divider`,type:`vertical`}),(0,f.jsx)(`div`,{className:`auth-login-alert-text`,children:`Session expired. Please log in again.`})]}),className:`auth-login-session-expired-alert`})})}),(0,f.jsxs)(`div`,{className:`auth-login-brand`,children:[(0,f.jsx)(`img`,{src:`/favicon.ico`,alt:``,className:`auth-login-logo`}),(0,f.jsx)(X,{variant:`h3`,color:`primary`,weight:`bold`,className:`auth-login-brand-text`,children:`Zinnext`})]}),(0,f.jsx)(`div`,{className:`auth-login-body`,children:(0,f.jsxs)(`div`,{className:`auth-login-sign-body`,children:[(0,f.jsx)(X,{variant:`h2`,color:`primary`,weight:`bold`,align:`center`,className:`auth-login-title`,children:`Sign in`}),(0,f.jsx)(`div`,{className:`auth-login-form-con`,children:(0,f.jsxs)(u.Form,{className:`v1-form auth-login-form`,layout:`vertical`,requiredMark:!1,onFinish:h,autoComplete:`off`,children:[(0,f.jsx)(u.Form.Item,{label:`Email`,name:`email`,rules:[{type:`email`,required:!0,message:`Enter valid email.`}],children:(0,f.jsx)(u.Input,{size:`large`,placeholder:`Your work email`,autoComplete:`email`})}),(0,f.jsx)(u.Form.Item,{label:`Password`,name:`user_pwd`,rules:[{required:!0,message:`Mandatory field.`}],children:(0,f.jsx)(u.Input.Password,{size:`large`,placeholder:`Enter password`,autoComplete:`current-password`})}),(0,f.jsx)(u.Form.Item,{className:`auth-login-forgot-row`,children:(0,f.jsx)(u.Button,{type:`link`,className:`auth-login-forgot`,htmlType:`button`,children:`Forgot Password?`})}),i&&(0,f.jsx)(u.Form.Item,{children:(0,f.jsx)(X,{color:`danger`,variant:`body`,children:i})}),(0,f.jsx)(u.Button,{className:`auth-login-submit`,block:!0,size:`large`,type:`primary`,htmlType:`submit`,loading:n,id:`znxt-signin`,children:`Sign in`}),(0,f.jsx)(u.Form.Item,{className:`auth-login-divider-row`,children:(0,f.jsx)(u.Divider,{children:`Or`})}),(0,f.jsxs)(X,{as:`p`,variant:`body`,color:`secondary`,align:`center`,className:`auth-login-signup-text`,children:[`Not registered yet?`,` `,(0,f.jsx)(u.Button,{type:`link`,htmlType:`button`,className:`auth-login-signup`,id:`znxt-signup`,children:`Sign up`})]})]})})]})})]})})})]})}async function Bh(e){return fe(E,e)}async function Vh(e,t){let n=await J(E,e,{method:`POST`,body:JSON.stringify(t)});return n.data??n}async function Hh(e,t){let n=await J(E,e,{method:`PUT`,body:JSON.stringify(t)});return n.data??n}async function Uh(e){let t=await J(E,e,{method:`DELETE`});return t.data??t}async function Wh(e){return Bh(`/testing-modules?type=${encodeURIComponent(e)}`)}async function Gh({name:e,type:t}){return Vh(`/testing-modules`,{name:e,type:t})}async function Kh(){return Bh(`/test-action-field-rules`)}async function qh(e){return Vh(`/test-flows`,e)}async function Jh({limit:e=10,offset:t=0,search:n=``,module:r=``,keyword:i=``,tags:a=``,active:o}={}){let s=new URLSearchParams({limit:String(e),offset:String(t)});return n&&s.append(`search`,n),r&&s.append(`module`,r),i&&s.append(`keyword`,i),a&&s.append(`tags`,a),o!=null&&o!==``&&s.append(`active`,String(o)),Bh(`/test-flows?${s.toString()}`)}async function Yh(e){return Vh(`/test-steps/validate`,e)}async function Xh(e){return Vh(`/test-steps/bulk-insert`,e)}async function Zh(e){return Vh(`/lms-flows`,e)}async function Qh({limit:e=10,offset:t=0,search:n=``,module:r=``,keyword:i=``,tags:a=``,active:o}={}){let s=new URLSearchParams({limit:String(e),offset:String(t)});return n&&s.append(`search`,n),r&&s.append(`module`,r),i&&s.append(`keyword`,i),a&&s.append(`tags`,a),o!=null&&o!==``&&s.append(`active`,String(o)),Bh(`/lms-flows?${s.toString()}`)}async function $h({activeOnly:e=!1}={}){let t=new URLSearchParams;e&&t.append(`active`,`1`);let n=t.toString();return Bh(`/ct/projects${n?`?${n}`:``}`)}async function eg({project:e=``,activeOnly:t=!1}={}){let n=new URLSearchParams;e&&n.append(`project`,e),t&&n.append(`active`,`1`);let r=n.toString();return Bh(`/ct/modules${r?`?${r}`:``}`)}async function tg({project:e,modulename:t}){return Vh(`/ct/modules`,{project:e,modulename:t})}async function ng(e,t){return Hh(`/ct/modules/status`,{id:e,active:t})}async function rg({project:e=``,module:t=``,activeOnly:n=!1}={}){let r=new URLSearchParams;e&&r.append(`project`,e),t&&r.append(`module`,t),n&&r.append(`active`,`1`);let i=r.toString();return Bh(`/ct/submodules${i?`?${i}`:``}`)}async function ig({project:e,modulename:t,submodulename:n}){return Vh(`/ct/submodules`,{project:e,modulename:t,submodulename:n})}async function ag(e,t){return Hh(`/ct/submodules/status`,{id:e,active:t})}async function og({project:e=``,module:t=``,submodule:n=``,product_parent_ID:r=``,module_parent_ID:i=``,submodule_parent_ID:a=``,actions:o=``,search:s=``,active:c,limit:l=1e3,offset:u=0}={}){let d=new URLSearchParams({limit:String(l),offset:String(u)}),f=r||e,p=i||t,m=a||n;return f&&d.append(`product_parent_ID`,f),p&&d.append(`module_parent_ID`,p),m&&d.append(`submodule_parent_ID`,m),o&&d.append(`actions`,o),s&&d.append(`search`,s),c!=null&&c!==``&&d.append(`active`,String(c)),Bh(`/ct/flows?${d.toString()}`)}async function sg(e){return Vh(`/ct/flows`,e)}async function cg(e){return Bh(`/ct/flows/${encodeURIComponent(e)}`)}async function lg({project:e,module:t,submodule:n,product_parent_ID:r,module_parent_ID:i,submodule_parent_ID:a}){return Bh(`/ct/flows/next-step?${new URLSearchParams({product_parent_ID:String(r||e),module_parent_ID:String(i||t),submodule_parent_ID:String(a||n)}).toString()}`)}async function ug(e,t){return Hh(`/ct/flows/${encodeURIComponent(e)}`,t)}async function dg(e){return Uh(`/ct/flows/${encodeURIComponent(e)}`)}var fg=`zinnext`;function pg(){let[e]=u.Form.useForm(),t=(0,p.useNavigate)(),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(``);(0,l.useEffect)(()=>{let t=!0;return Promise.resolve().then(()=>$h({activeOnly:!0})).then(n=>{if(!t)return;let i=n?.items??[];r(i);let a=se(),o=i.find(e=>e.id===a?.id)||i.find(e=>e.projectname?.toLowerCase()===fg)||i[0];o&&e.setFieldsValue({project:o.id})}).catch(e=>{console.error(`Unable to load projects:`,e),t&&s(`Unable to load projects. Please try again.`)}),()=>{t=!1}},[e]);function c(e){let r=n.find(t=>t.id===e.project);if(!r){s(`Please select a project.`);return}a(!0),oe({id:r.id,name:r.projectname}),t(`/addTestCase`,{replace:!0})}return(0,f.jsxs)(`div`,{className:`auth-login-page`,children:[(0,f.jsx)(`section`,{className:`auth-login-bg`,style:{background:Ka.brand},children:(0,f.jsxs)(`div`,{className:`auth-login-static-section`,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(`img`,{src:nh,alt:``,className:`auth-login-img-one`})}),(0,f.jsx)(`div`,{className:`auth-login-hero-wrap`,children:(0,f.jsx)(`img`,{src:rh,alt:``,className:`auth-login-img-two`})}),(0,f.jsx)(X,{as:`p`,variant:`body`,color:`inverse`,size:`2xl`,weight:`regular`,align:`right`,className:`auth-login-tagline`,children:`Best in class processes in a box.`})]})}),(0,f.jsx)(`section`,{className:`auth-login-form-layout`,children:(0,f.jsx)(`div`,{className:`auth-login-form-container`,children:(0,f.jsxs)(`div`,{className:`auth-login-form-shell`,children:[(0,f.jsxs)(`div`,{className:`auth-login-brand`,children:[(0,f.jsx)(`img`,{src:`/favicon.ico`,alt:``,className:`auth-login-logo`}),(0,f.jsx)(X,{variant:`h3`,color:`primary`,weight:`bold`,className:`auth-login-brand-text`,children:`Zinnext`})]}),(0,f.jsx)(`div`,{className:`auth-login-body`,children:(0,f.jsxs)(`div`,{className:`auth-login-sign-body`,children:[(0,f.jsx)(X,{variant:`h2`,color:`primary`,weight:`bold`,align:`center`,className:`auth-login-title`,children:`Select Project`}),(0,f.jsx)(`div`,{className:`auth-login-form-con`,children:(0,f.jsxs)(u.Form,{form:e,className:`v1-form auth-login-form`,layout:`vertical`,requiredMark:!1,onFinish:c,autoComplete:`off`,children:[(0,f.jsx)(u.Form.Item,{label:`Project`,name:`project`,rules:[{required:!0,message:`Select a project.`}],children:(0,f.jsx)(u.Select,{size:`large`,showSearch:!0,optionFilterProp:`label`,placeholder:`Select project`,prefix:(0,f.jsx)(d.ProjectOutlined,{}),options:n.map(e=>({value:e.id,label:e.projectname}))})}),o&&(0,f.jsx)(u.Form.Item,{children:(0,f.jsx)(X,{color:`danger`,variant:`body`,children:o})}),(0,f.jsx)(u.Button,{className:`auth-login-submit`,block:!0,size:`large`,type:`primary`,htmlType:`submit`,loading:i,id:`znxt-select-project`,children:`Continue`})]})})]})})]})})})]})}function mg(e,t){function n(n){return(0,f.jsx)(Ih,{...t,children:(0,f.jsx)(e,{...n})})}return n.displayName=`withAuthGuard(${e.displayName||e.name||`Component`})`,n}var hg=`${D}`;async function gg(e,t={}){let n=ee(),r=t.body instanceof FormData,i=await fetch(`${hg}${e}`,{...t,headers:{...r?{}:{"Content-Type":`application/json`},"X-App-Id":O,...n?{Authorization:`Bearer ${n}`}:{},...t.headers??{}}}),a=await i.json().catch(()=>({}));if(!i.ok)throw Error(a?.error??a?.message??`Request failed: ${i.status}`);return a?.data??a}function _g(e,t=[]){if(Array.isArray(e))return e;for(let n of[...t,`data`,`result`,`rows`,`items`])if(Array.isArray(e?.[n]))return e[n];for(let n of t){if(Array.isArray(e?.data?.[n]))return e.data[n];if(Array.isArray(e?.result?.[n]))return e.result[n]}return[]}function vg(e){let t=e.user_id??e.userId??e.UserId,n=e.user_type_id??e.roleId??e.role_id??e.RoleId,r=e.first_name??e.firstName??``,i=e.last_name??e.lastName??``;return{...e,user_id:t,username:e.username??e.userName??e.user_name??`${r}${i}`.trim(),first_name:r,last_name:i,email:e.email,mobile:e.mobile??e.phoneNumber??e.phone_number??e.mobile_number,user_type_id:n,role_id:n,profile_image:e.profile_image??e.photoLocation??e.photo_location,status:bg(e.status??e.active_status)}}function yg(e){let t=e.user_type_id??e.role_id??e.roleId??e.id;return{...e,user_type_id:t,user_type_name:e.user_type_name??e.role_name??e.roleName??e.name,description:e.description??e.role_description??e.roleDescription??``,status:bg(e.status??e.active_status??`ACTIVE`)}}function bg(e){if(e===!0||e===1||e===`1`)return`ACTIVE`;let t=String(e??`ACTIVE`).trim().toUpperCase();return t===`ACTIVE`||t===`ENABLED`?`ACTIVE`:`INACTIVE`}function xg(e){return{...e,user_name:e.username??e.user_name,first_name:e.first_name,last_name:e.last_name,email:e.email,user_pwd:e.password??e.user_pwd,phone_number:e.mobile??e.phone_number,mobile_number:e.mobile??e.mobile_number,role_id:e.user_type_id??e.role_id,status:e.status}}function Sg(e){let t=new FormData;return t.append(`json`,JSON.stringify(e)),t}function Cg(e){return(Array.isArray(e)?e:Object.entries(e??{}).map(([e,t])=>({...t,menu_name:e}))).map(e=>{let t=e.menu_id??e.menuId,n=e.menu_name??e.menuName??e.name??String(t??``),r=Object.entries(e.permissions??{}).reduce((e,[t,n])=>(e[t]={...n,permission_id:n?.permission_id??n?.permissionId??n?.id,permission_key:n?.permission_key??n?.permissionKey??t,value:n?.value??n?.access_value??n},e),{});return{...e,menu_id:t,menu_name:n,menu_key:e.menu_key??e.menuKey??n,permissions:r}})}function wg(e,t){return{roleId:e,menus:t.reduce((e,t)=>{let n=t.menu_name??t.menuName??t.menu_key??String(t.menu_id),r=t.permission_key??t.permissionKey;return r?(e[n]||(e[n]={menuId:t.menu_id??t.menuId,permissions:{}}),e[n].permissions[r]={id:t.permission_id??t.permissionId,value:String(+(Number(t.access_value??t.accessValue)===1))},e):e},{})}}function Tg(){return gg(`/get-all-users?limit=500&offset=0`).then(e=>_g(e,[`users`]).map(vg))}function Eg(e){return gg(`/create-user`,{method:`POST`,body:Sg(xg(e))})}function Dg(e,t){return gg(`/update-user?userId=${encodeURIComponent(e)}`,{method:`PUT`,body:Sg(xg(t))})}function Og(e){return gg(`/delete-user?userId=${encodeURIComponent(e)}`,{method:`PUT`})}function kg(){return gg(`/roles-list`).then(e=>_g(e).map(yg))}function Ag(e){return gg(`/get-role-details?roleid=${encodeURIComponent(e)}`).then(Cg)}function jg(e,t){return gg(`/edit-role-details`,{method:`PUT`,body:JSON.stringify(wg(e,t))})}var{Text:Mg}=u.Typography,{Option:Ng}=u.Select,Pg=[{key:`job`,label:`Jobs`},{key:`candidate`,label:`Candidates`},{key:`submissions`,label:`Submissions`}],Fg=[{key:`listView`,label:`List View`},{key:`filter`,label:`Filter`},{key:`form`,label:`Form`},{key:`permissions`,label:`Permissions`}],Ig=[{key:``,label:`Text`,icon:(0,f.jsx)(`span`,{style:{fontSize:14,fontWeight:700},children:`Aa`})},{key:`badge`,label:`Badge`,icon:(0,f.jsx)(d.TagsOutlined,{style:{fontSize:16}})},{key:`avatar`,label:`Avatar`,icon:(0,f.jsx)(d.UserOutlined,{style:{fontSize:16}})},{key:`link`,label:`Link`,icon:(0,f.jsx)(d.LinkOutlined,{style:{fontSize:16}})}];function Lg(e){return e?.USER_NAME??e?.user_name??e?.username??e?.name??e?.full_name??e?.fullName??e?.email??`User ${e?.USER_ID??e?.user_id??`?`}`}function Rg(e){return{...e,key:e.USER_ID??e.user_id??e.userId??e.id??e._id,_name:Lg(e),_email:e.email??e.EMAIL??e.user_email??``,_role:e.role_name??e.roleName??e.ROLE_NAME??``,_rawRef:e}}var zg=[{color:`#52c41a`,bg:`#f6ffed`},{color:`#1677ff`,bg:`#e6f7ff`},{color:`#fa8c16`,bg:`#fff7e6`},{color:`#ff4d4f`,bg:`#fff2f0`},{color:`#722ed1`,bg:`#f9f0ff`},{color:`#13c2c2`,bg:`#e6fffb`},{color:`#eb2f96`,bg:`#fff0f6`},{color:`#faad14`,bg:`#fffbe6`}],Bg={job:`jobs`,candidate:`candidates`,submissions:`submissions`};function Vg(e){let t=e?.raw?.ROLE_ID??e?.raw?.role_id??e?.raw?.roleId??e?.raw?.ROLEID??e?.ROLE_ID??e?.role_id??e?.roleId??e?.ROLEID??0,n=Number(t);return Number.isFinite(n)&&n>0?n:0}function Hg(e){let t=e?.data??e;return Array.isArray(t)?t:Array.isArray(t?.visibleFields)?t.visibleFields:Array.isArray(e?.visibleFields)?e.visibleFields:[]}async function Ug(e,t,n){let r=e?ur(e):0,i=e?Vg(e):0;return(await Promise.all(n.map(async({key:e,apiModule:n})=>{let a=n??Bg[e]??e,o=new URLSearchParams({module:a,userId:String(r??``),roleId:String(i??``),configType:t});try{return Hg(await J(E,`/admin/field-config?${o}`)).length>0}catch{return!1}}))).some(Boolean)}function Wg(e){return J(E,`/admin/field-config/seed`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({collections:e})})}function Gg(e){return String(e||``).replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}function Kg(e){if(typeof e==`string`)return{key:e,apiModule:e,label:Gg(e)};let t=e?.key??e?.moduleKey??e?.value??e?.module??e?.apiModule??e?.name??e?.modulename??e?.menuName;return t?{key:t,apiModule:e?.apiModule??e?.api_module??e?.module??e?.value??e?.key??e?.name??e?.modulename??e?.menuName??t,label:e?.label??e?.moduleLabel??e?.moduleName??e?.name??e?.modulename??e?.menuName??Gg(t)}:null}function qg(e){let t=Array.isArray(e)&&e.length?e:Pg,n=new Set,r=t.map(Kg).filter(Boolean).filter(e=>n.has(e.key)?!1:(n.add(e.key),!0));return r.length?r:Pg}function Jg({field:e,collections:t,collFields:n,subfields:r,onCollectionChange:i,onLookupFieldChange:a,addSecondaryField:o,removeSecondaryField:s,addActionButton:c,updateActionButton:p,removeActionButton:m,moduleKey:h,fieldKey:g,update:_}){let[v,y]=(0,l.useState)(``),[b,x]=(0,l.useState)({}),[S,C]=(0,l.useState)(!1);function w(e){_(e===`common`?{commonStyle:{color:`#1677ff`,bg:`#e6f7ff`,variant:`badge`},valueStyles:[]}:{commonStyle:null})}function T(t){_({commonStyle:{...e.commonStyle??{color:`#595959`,bg:`#f5f5f5`,variant:`badge`},...t}})}function E(){_({valueStyles:[...e.valueStyles??[],{value:``,label:``,color:`#595959`,bg:`#f5f5f5`,variant:`badge`}]})}function D(t,n){let r=[...e.valueStyles??[]];r[t]={...r[t],...n},_({valueStyles:r})}function O(t){_({valueStyles:(e.valueStyles??[]).filter((e,n)=>n!==t)})}async function k(){C(!0);try{let t=await zo(e.apiModule??Bg[h]??h,g,``,50,0),n=(Array.isArray(t)?t:t?.data??[]).map((e,t)=>{let n=typeof e==`object`?e.value??e.label??``:String(e),r=typeof e==`object`?e.label??e.value??``:String(e);return{value:String(n),label:String(r),variant:`badge`,...zg[t%zg.length]}});if(n.length===0){u.message.info(`No values found for this field`);return}_({valueStyles:n})}catch{u.message.error(`Could not detect values`)}finally{C(!1)}}async function A(e,t){x(t=>({...t,[e]:!0}));try{let n=await gr(t);p(e,{iconUrl:n?.iconUrl??n?.url??``,iconPath:n?.iconPath??n?.path??``})}catch{u.message.error(`Icon upload failed`)}finally{x(t=>({...t,[e]:!1}))}return!1}let j=e.renderType??``,M=!!e.commonStyle,N=e.commonStyle??{},P=e.valueStyles??[],F=e.renderConfig??{};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsx)(`div`,{className:`uss-detail-label`,children:`Display Style`}),(0,f.jsx)(`div`,{className:`uss-detail-row`,children:Ig.map(e=>(0,f.jsxs)(`button`,{className:`uss-render-type-btn${j===e.key?` active`:``}`,onClick:()=>_({renderType:e.key,commonStyle:null,valueStyles:[],renderConfig:null}),children:[e.icon,(0,f.jsx)(`span`,{children:e.label})]},e.key))}),j===`badge`&&(0,f.jsxs)(`div`,{className:`uss-badge-config`,children:[(0,f.jsxs)(u.Radio.Group,{size:`small`,value:M?`common`:`perValue`,onChange:e=>w(e.target.value),style:{marginBottom:8},children:[(0,f.jsx)(u.Radio,{value:`perValue`,children:`Per value`}),(0,f.jsx)(u.Radio,{value:`common`,children:`Same for all`})]}),M&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,flexWrap:`wrap`},children:[(0,f.jsx)(u.Tooltip,{title:`Text color`,children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,f.jsx)(`input`,{type:`color`,value:N.color||`#595959`,style:{width:28,height:24,border:`none`,cursor:`pointer`,padding:0},onChange:e=>T({color:e.target.value})}),(0,f.jsx)(Mg,{style:{fontSize:10},children:`Text`})]})}),(0,f.jsx)(u.Tooltip,{title:`Background color`,children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,f.jsx)(`input`,{type:`color`,value:N.bg||`#f5f5f5`,style:{width:28,height:24,border:`none`,cursor:`pointer`,padding:0},onChange:e=>T({bg:e.target.value})}),(0,f.jsx)(Mg,{style:{fontSize:10},children:`BG`})]})}),(0,f.jsx)(u.Select,{size:`small`,style:{width:80},value:N.variant||`badge`,options:[{value:`badge`,label:`Badge`},{value:`dot`,label:`Dot`},{value:`tag`,label:`Tag`}],onChange:e=>T({variant:e})}),(0,f.jsx)(`span`,{style:{padding:`1px 12px`,borderRadius:20,fontSize:11,fontWeight:500,color:N.color||`#595959`,background:N.bg||`#f5f5f5`},children:`Preview`})]}),!M&&(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#555`,fontWeight:600},children:`Value → Style mapping`}),(0,f.jsxs)(u.Space,{size:6,children:[(0,f.jsx)(u.Button,{size:`small`,loading:S,onClick:k,children:`Auto-detect values`}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:E,children:`Add`})]})]}),P.length===0&&(0,f.jsx)(Mg,{type:`secondary`,style:{fontSize:12},children:`Click "Auto-detect values" to populate from live data, or "Add" to map manually.`}),P.map((e,t)=>(0,f.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 62px 62px 54px 26px`,gap:5,alignItems:`center`,marginBottom:6},children:[(0,f.jsx)(u.Input,{size:`small`,placeholder:`raw value`,value:e.value??``,onChange:e=>D(t,{value:e.target.value})}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`display label`,value:e.label??``,onChange:e=>D(t,{label:e.target.value})}),(0,f.jsx)(u.Tooltip,{title:`Text color`,children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:3},children:[(0,f.jsx)(`input`,{type:`color`,value:e.color||`#595959`,style:{width:28,height:24,border:`none`,cursor:`pointer`,padding:0},onChange:e=>D(t,{color:e.target.value})}),(0,f.jsx)(Mg,{style:{fontSize:10},children:`Text`})]})}),(0,f.jsx)(u.Tooltip,{title:`Background color`,children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:3},children:[(0,f.jsx)(`input`,{type:`color`,value:e.bg||`#f5f5f5`,style:{width:28,height:24,border:`none`,cursor:`pointer`,padding:0},onChange:e=>D(t,{bg:e.target.value})}),(0,f.jsx)(Mg,{style:{fontSize:10},children:`BG`})]})}),(0,f.jsx)(`span`,{style:{padding:`1px 6px`,borderRadius:20,fontSize:11,fontWeight:500,textAlign:`center`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:e.color||`#595959`,background:e.bg||`#f5f5f5`},children:e.label||e.value||`…`}),(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.CloseOutlined,{}),onClick:()=>O(t)})]},t))]})]}),j===`avatar`&&(0,f.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 80px`,gap:8,marginTop:8},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#555`,display:`block`,marginBottom:3},children:`Name field`}),(0,f.jsx)(u.Select,{size:`small`,showSearch:!0,allowClear:!0,style:{width:`100%`},placeholder:`e.g. recruiterName`,value:F.labelField||void 0,options:r.length>0?r.map(e=>({value:e,label:e})):[],onChange:e=>_({renderConfig:{...F,labelField:e??``}})})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#555`,display:`block`,marginBottom:3},children:`Color field (opt.)`}),(0,f.jsx)(u.Select,{size:`small`,showSearch:!0,allowClear:!0,style:{width:`100%`},placeholder:`color`,value:F.colorField||void 0,options:r.length>0?r.map(e=>({value:e,label:e})):[],onChange:e=>_({renderConfig:{...F,colorField:e??``}})})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#555`,display:`block`,marginBottom:3},children:`Max visible`}),(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:1,max:10,value:F.maxVisible||3,onChange:e=>_({renderConfig:{...F,maxVisible:Number(e.target.value)||3}})})]})]})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsx)(`div`,{className:`uss-detail-label`,children:`Display Template`}),(0,f.jsx)(eh,{value:e.displayTemplate??``,onChange:e=>_({displayTemplate:e}),placeholder:`e.g. {{firstName}} {{lastName}}`})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsxs)(`div`,{className:`uss-detail-label`,children:[`Link`,(0,f.jsx)(u.Switch,{size:`small`,style:{marginLeft:8},checked:!!e.isLink,onChange:e=>_({isLink:e})})]}),e.isLink&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,paddingTop:4},children:[(0,f.jsx)(eh,{value:e.linkTemplate??``,onChange:e=>_({linkTemplate:e}),placeholder:`e.g. /jobs/{{jobId}}`}),(0,f.jsxs)(`div`,{className:`uss-detail-row`,children:[(0,f.jsxs)(u.Select,{size:`small`,value:e.linkType??`internal`,onChange:e=>_({linkType:e}),style:{width:120},children:[(0,f.jsx)(Ng,{value:`internal`,children:`internal`}),(0,f.jsx)(Ng,{value:`external`,children:`external`})]}),(0,f.jsxs)(u.Select,{size:`small`,value:e.linkTarget??`_self`,onChange:e=>_({linkTarget:e}),style:{width:100},children:[(0,f.jsx)(Ng,{value:`_self`,children:`_self`}),(0,f.jsx)(Ng,{value:`_blank`,children:`_blank`})]})]})]})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsx)(`div`,{className:`uss-detail-label`,children:`Secondary Fields`}),(0,f.jsx)(`div`,{className:`uss-detail-row`,style:{flexWrap:`wrap`},children:(e.secondaryFields??[]).map(e=>(0,f.jsxs)(`span`,{className:`uss-secondary-tag`,children:[e,(0,f.jsx)(`button`,{onClick:()=>s(e),children:`×`})]},e))}),(0,f.jsxs)(`div`,{className:`uss-detail-row`,children:[(0,f.jsx)(u.Input,{size:`small`,placeholder:`Add field key`,value:v,onChange:e=>y(e.target.value),onPressEnter:()=>{o(v),y(``)},style:{width:160}}),(0,f.jsx)(u.Button,{size:`small`,type:`link`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{o(v),y(``)},children:`Add`})]}),e.secondaryFields?.length>0&&(0,f.jsxs)(`div`,{style:{marginTop:4,display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`var(--color-text-muted)`},children:`Separator:`}),(0,f.jsx)(u.Input,{size:`small`,value:e.secondarySeparator??``,placeholder:`·`,style:{width:64},onChange:e=>_({secondarySeparator:e.target.value})})]})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsxs)(`div`,{className:`uss-detail-label`,children:[`Lookup (FK resolve)`,(0,f.jsx)(u.Switch,{size:`small`,style:{marginLeft:8},checked:!!e.lookup,onChange:e=>_({lookup:e?{collection:``,displayField:``,valueField:``,projectFields:[]}:null})})]}),e.lookup&&(0,f.jsxs)(`div`,{className:`uss-lookup-grid`,children:[(0,f.jsxs)(`div`,{className:`uss-lookup-row`,children:[(0,f.jsx)(`span`,{className:`uss-lookup-label`,children:`Collection`}),(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.collection??``,onChange:i,showSearch:!0,placeholder:`Select collection`,style:{flex:1},children:t.map(e=>(0,f.jsx)(Ng,{value:e,children:e},e))})]}),n.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`uss-lookup-row`,children:[(0,f.jsx)(`span`,{className:`uss-lookup-label`,children:`Value Field`}),(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.valueField??``,onChange:t=>a(e.fieldKey,{valueField:t}),placeholder:`ID field`,style:{flex:1},children:n.map(e=>(0,f.jsx)(Ng,{value:e,children:e},e))})]}),(0,f.jsxs)(`div`,{className:`uss-lookup-row`,children:[(0,f.jsx)(`span`,{className:`uss-lookup-label`,children:`Display Field`}),(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.displayField??``,onChange:t=>a(e.fieldKey,{displayField:t}),placeholder:`Label field`,style:{flex:1},children:[...n,...r].map(e=>(0,f.jsx)(Ng,{value:e,children:e},e))})]})]})]})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsxs)(`div`,{className:`uss-detail-label`,style:{display:`flex`,justifyContent:`space-between`},children:[(0,f.jsxs)(`span`,{children:[`Action Buttons `,(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:400,color:`var(--color-text-muted)`},children:`(max 3)`})]}),(e.actionButtons??[]).length<3&&(0,f.jsx)(u.Button,{type:`link`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:c,children:`Add Icon`})]}),(e.actionButtons??[]).map((e,t)=>(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{className:`uss-action-btn-row`,children:[(0,f.jsx)(u.Upload,{showUploadList:!1,beforeUpload:e=>(A(t,e),!1),accept:`image/*`,children:(0,f.jsx)(u.Tooltip,{title:`Click to upload icon`,children:(0,f.jsx)(`div`,{className:`uss-action-btn-icon-slot`,children:b[t]?(0,f.jsx)(u.Spin,{size:`small`}):e.iconUrl?(0,f.jsx)(`img`,{src:e.iconUrl,alt:`action-${t}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,f.jsx)(d.UploadOutlined,{style:{color:`#aaa`,fontSize:14}})})})}),(0,f.jsx)(u.Input,{size:`small`,value:e.name??``,onChange:e=>p(t,{name:e.target.value}),placeholder:`Tooltip (e.g. Edit)`,style:{width:110}}),(0,f.jsxs)(u.Radio.Group,{size:`small`,value:e.type??`page`,onChange:e=>p(t,{type:e.target.value}),children:[(0,f.jsx)(u.Radio,{value:`page`,children:`Page`}),(0,f.jsx)(u.Radio,{value:`popup`,children:`Popup`})]}),(0,f.jsx)(u.Input,{size:`small`,value:e.routeUrl??``,onChange:e=>p(t,{routeUrl:e.target.value}),placeholder:`Route URL (e.g. /jobs/:_id)`,prefix:(0,f.jsx)(d.LinkOutlined,{style:{color:`#bbb`}}),style:{flex:1}}),(0,f.jsx)(u.Button,{size:`small`,danger:!0,type:`text`,onClick:()=>m(t),children:`✕`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,paddingLeft:36},children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#999`,whiteSpace:`nowrap`},children:`Permission:`}),(0,f.jsx)(u.Select,{size:`small`,allowClear:!0,value:e.permissionKey||void 0,onChange:e=>p(t,{permissionKey:e??``}),placeholder:`Always visible`,style:{width:180},options:[{value:`edit`},{value:`delete`},{value:`add`},{value:`view`}]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,paddingLeft:36,marginTop:4},children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#999`,whiteSpace:`nowrap`},children:`Show only if:`}),(0,f.jsx)(u.Input,{size:`small`,value:e.showIfField??``,onChange:e=>p(t,{showIfField:e.target.value}),placeholder:`field (e.g. internalSubmissionStatus)`,style:{width:210}}),(0,f.jsx)(Mg,{style:{fontSize:11,color:`#999`},children:`=`}),(0,f.jsx)(u.Input,{size:`small`,value:e.showIfValue??``,onChange:e=>p(t,{showIfValue:e.target.value}),placeholder:`value (e.g. Resubmitted)`,style:{width:150}}),e.showIfField&&(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.CloseOutlined,{}),onClick:()=>p(t,{showIfField:``,showIfValue:``})})]})]},t))]})]})}var Yg=[{label:`Module data (distinct)`,value:`module`},{label:`Masters collection`,value:`master`},{label:`Group value`,value:`group`}],Xg=[`select`,`radio`,`checkbox`],Zg=[{label:`Dropdown`,value:`dropdown`},{label:`Checkbox`,value:`checkbox`},{label:`Radio`,value:`radio`},{label:`Date Range`,value:`datepicker`},{label:`Number Range`,value:`number-range`}];function Qg({field:e,update:t,configType:n,collections:r,collFields:i,onCollectionChange:a,onLookupFieldChange:o}){let s=Xg.includes(e.type),c=!!e.lookup;function l(e){t({lookup:e?{collection:``,displayField:``,valueField:``,projectFields:[]}:null})}return(0,f.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Editable`}),(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.isEditable,onChange:e=>t({isEditable:e})})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Mandatory`}),(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.ismandatory,onChange:e=>t({ismandatory:e})})]}),n===`filter`&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Value Input`}),(0,f.jsx)(u.Select,{size:`small`,value:e.filterInputType??`dropdown`,onChange:e=>t({filterInputType:e}),options:Zg,style:{width:140}})]}),n===`filter`&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Default`}),(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.isDefaultFilter,onChange:e=>t({isDefaultFilter:e})})]}),n===`filter`&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Lookup`}),(0,f.jsx)(u.Switch,{size:`small`,checked:c,onChange:l})]}),n===`filter`&&c&&(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:[(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.collection||void 0,onChange:a,showSearch:!0,placeholder:`Collection`,style:{width:160},options:(r??[]).map(e=>({label:e,value:e}))}),(i??[]).length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.valueField||void 0,onChange:t=>o(e.fieldKey,{valueField:t}),showSearch:!0,placeholder:`Value field (ID)`,style:{width:160},options:(i??[]).map(e=>({label:e,value:e}))}),(0,f.jsx)(u.Input,{size:`small`,value:e.lookup?.displayField??``,onChange:t=>o(e.fieldKey,{displayField:t.target.value}),placeholder:`Display field (e.g. name)`,style:{width:180}})]})]}),s&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Source`}),(0,f.jsx)(u.Select,{size:`small`,value:e.dataSource??`module`,onChange:e=>t({dataSource:e,groupName:``}),options:Yg,style:{width:170}})]}),(e.dataSource??`module`)===`group`&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Group Name`}),(0,f.jsx)(u.Input,{size:`small`,value:e.groupName??``,onChange:e=>t({groupName:e.target.value}),placeholder:`e.g. skills`,style:{width:120}})]})]})]})}function $g({field:e,index:t,configType:n,moduleKey:r,onUpdate:i,onReorder:a,collections:o,onFetchCollFields:s,dragFromRef:c}){let[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(e.fieldName),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)([]),[C,w]=(0,l.useState)(!1),[T,E]=(0,l.useState)(!1);(0,l.useEffect)(()=>{queueMicrotask(()=>{v(e.fieldName)})},[e.fieldName]);function D(e){c.current=t,e.dataTransfer.effectAllowed=`move`,E(!0)}function O(){E(!1),w(!1)}function k(e){e.preventDefault(),w(!0)}function A(){w(!1)}function j(e){e.preventDefault(),w(!1),c.current!==null&&c.current!==t&&a(c.current,t),c.current=null}function M(e){i(t,e)}function N(){g(!1);let t=_.trim();t&&t!==e.fieldName?M({fieldName:t}):v(e.fieldName)}async function P(t){M({lookup:{...e.lookup,collection:t,displayField:``,valueField:``,projectFields:[]}}),b(await s(t))}async function F(t,n){if(M({lookup:{...e.lookup,...n}}),n.valueField)try{S(await yr(r,t))}catch{S([])}}function I(t){let n=e.secondaryFields??[];!t||n.includes(t)||M({secondaryFields:[...n,t]})}function L(t){M({secondaryFields:(e.secondaryFields??[]).filter(e=>e!==t)})}function R(){let t=e.actionButtons??[];t.length>=3||M({actionButtons:[...t,{name:``,iconUrl:``,iconPath:``,type:`page`,routeUrl:``,permissionKey:``}]})}function z(t,n){let r=[...e.actionButtons??[]];r[t]={...r[t],...n},M({actionButtons:r})}function B(t){let n=[...e.actionButtons??[]];n.splice(t,1),M({actionButtons:n})}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{draggable:!0,onDragStart:D,onDragEnd:O,onDragOver:k,onDragLeave:A,onDrop:j,className:`uss-field-row${C?` drag-over`:``}${T?` dragging`:``}`,style:{gridTemplateColumns:`24px 1fr 80px 56px`},children:[(0,f.jsx)(`span`,{className:`uss-drag-handle`,children:(0,f.jsx)(d.HolderOutlined,{})}),(0,f.jsxs)(`span`,{className:`uss-field-name`,children:[e.isVirtual&&(0,f.jsx)(`span`,{className:`uss-virtual-tag`,children:`virtual`}),h?(0,f.jsx)(`input`,{autoFocus:!0,value:_,onChange:e=>v(e.target.value),onBlur:N,onKeyDown:t=>{t.key===`Enter`&&N(),t.key===`Escape`&&(g(!1),v(e.fieldName))},onClick:e=>e.stopPropagation()}):(0,f.jsx)(u.Tooltip,{title:`Double-click to rename`,children:(0,f.jsx)(`span`,{style:{cursor:`text`,borderBottom:`1px dashed var(--color-border-muted)`},onDoubleClick:e=>{e.stopPropagation(),g(!0)},children:e.fieldName})}),(0,f.jsx)(`span`,{className:`uss-field-key`,children:e.fieldKey})]}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:e.isVisible,onChange:e=>M({isVisible:e})})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:p?(0,f.jsx)(d.DownOutlined,{}):(0,f.jsx)(d.RightOutlined,{}),onClick:()=>m(e=>!e),style:{color:`var(--color-text-muted)`}})})]}),p&&(0,f.jsx)(`div`,{className:`uss-detail-panel`,children:n===`listView`?(0,f.jsx)(Jg,{field:e,collections:o,collFields:y,subfields:x,onCollectionChange:P,onLookupFieldChange:F,addSecondaryField:I,removeSecondaryField:L,addActionButton:R,updateActionButton:z,removeActionButton:B,moduleKey:r,fieldKey:e.fieldKey,update:M}):(0,f.jsx)(Qg,{field:e,update:M,configType:n,collections:o,collFields:y,onCollectionChange:P,onLookupFieldChange:F})})]})}var e_={jobs:{title:`Jobs`,description:`Manage and configure job postings.`,Icon:d.SolutionOutlined,order:[`view`,`my_jobs`,`all_jobs`,`add`,`edit`,`delete`,`sourcing`,`assign`,`share`]},job:{title:`Job`,description:`Individual job management.`,Icon:d.SolutionOutlined,order:[`view`,`my_jobs`,`all_jobs`,`add`,`edit`,`delete`,`sourcing`,`assign`,`share`]},candidates:{title:`Candidates`,description:`Manage candidate profiles and data.`,Icon:d.UserOutlined,order:[`view`,`candidate_self`,`candidate_all`,`add`,`edit`,`delete`,`share`]},submissions:{title:`Submissions`,description:`Review and manage submissions.`,Icon:d.FileTextOutlined,order:[`view`,`approve`,`share`,`edit`,`change_status`,`move_onboard`]},vendors:{title:`Vendors`,description:`Manage vendor records and details.`,Icon:d.BankOutlined,order:[`view`,`add`,`edit`,`delete`]},hotlist:{title:`Hotlist`,description:`Manage hotlist candidates.`,Icon:d.StarOutlined,order:[`view`,`add`,`edit`,`delete`]},campaingns:{title:`Campaigns`,description:`Manage campaigns.`,Icon:d.NotificationOutlined,order:[`view`,`add`,`edit`,`delete`]},network:{title:`Network`,description:`Manage your network.`,Icon:d.GlobalOutlined,order:[`view`,`add`,`edit`,`delete`]},scheduler:{title:`Scheduler`,description:`Manage scheduling.`,Icon:d.CalendarOutlined,order:[`view`,`add`,`edit`,`delete`]},reports:{title:`Reports`,description:`View and manage reports.`,Icon:d.BarChartOutlined,order:[`view`,`add`,`edit`,`delete`]},onboarding:{title:`Onboarding`,description:`Manage onboarding.`,Icon:d.TeamOutlined,order:[`view`,`add`,`edit`,`delete`]}},t_={view:`View`,add:`Add`,edit:`Edit`,delete:`Delete`,sourcing:`Source`,assign:`Assign`,share:`Share`,approve:`Approve`,change_status:`Change Status`,move_onboard:`Move to Onboard`,candidate_self:`Self`,candidate_all:`All Candidates`,my_jobs:`My Jobs`,all_jobs:`All Jobs`},n_={candidates:{title:`Candidate View Access`,keys:[`candidate_self`,`candidate_all`],control:`radio`},jobs:{title:`Job View Access`,keys:[`my_jobs`,`all_jobs`],control:`mixed`},job:{title:`Job View Access`,keys:[`my_jobs`,`all_jobs`],control:`mixed`}};function r_(e){return String(e||``).replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}function i_(e){return e_[e]??{title:r_(e),description:`Manage ${r_(e).toLowerCase()} permissions.`,Icon:d.AppstoreOutlined,order:[`view`,`add`,`edit`,`delete`]}}function a_(e,t){let n=Object.keys(t?.permissions??{}),r=i_(e).order;return[...r.filter(e=>n.includes(e)),...n.filter(e=>!r.includes(e))]}function o_(e,t){let n=n_[e];return n?n.keys.filter(e=>!!t?.permissions?.[e]):[]}function s_(e,t){let n=o_(e,t);return a_(e,t).filter(e=>!n.includes(e))}function c_(e,t){let n=a_(e,t);return e===`candidates`?n.filter(e=>e!==`candidate_self`):e===`jobs`||e===`job`?n.filter(e=>e!==`my_jobs`):n}function l_({user:e}){let[t,n]=(0,l.useState)({}),[r,i]=(0,l.useState)(!1),[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(!1),p=ur(e);(0,l.useEffect)(()=>{if(!p){console.warn(`[UserPermPanel] Could not resolve userId from user object:`,e);return}queueMicrotask(()=>{i(!0),c(!1),Ar(p).then(e=>n(e??{})).catch(e=>{console.error(`[UserPermPanel] getUserPermissions error:`,e),u.message.error(`Failed to load permissions`)}).finally(()=>i(!1))})},[e,p]);let m=(0,l.useMemo)(()=>Object.entries(t).filter(([,e])=>e&&typeof e.permissions==`object`&&Object.keys(e.permissions).length>0),[t]);function h(e,t,r){c(!0),n(n=>{let i=n[e]??{},a={...i.permissions??{}};a[t]={...a[t],value:r?`1`:`0`};let o=o_(e,i);return t===`view`&&(e===`jobs`||e===`job`)&&r&&o.forEach(e=>{a[e]={...a[e],value:`1`}}),t===`view`&&!r&&o.forEach(e=>{a[e]={...a[e],value:`0`}}),o.includes(t)&&r&&a.view&&(a.view={...a.view,value:`1`}),{...n,[e]:{...i,permissions:a}}})}function g(e,t,r){c(!0),n(n=>{let i=n[e]??{},a={...i.permissions??{}},o=o_(e,i);if(e===`candidates`)o.forEach(e=>{a[e]={...a[e],value:e===t?`1`:`0`}});else{if(t===`my_jobs`)return n;a[t]={...a[t],value:r?`1`:`0`}}return a.view&&={...a.view,value:`1`},{...n,[e]:{...i,permissions:a}}})}function _(e,t){c(!0),n(n=>{let r=n[e]??{},i=Object.fromEntries(Object.entries(r.permissions??{}).map(([n,r])=>{if(e===`candidates`&&t){if(n===`candidate_self`)return[n,{...r,value:`0`}];if(n===`candidate_all`)return[n,{...r,value:`1`}]}return(e===`jobs`||e===`job`)&&t&&(n===`my_jobs`||n===`all_jobs`)?[n,{...r,value:`1`}]:[n,{...r,value:t?`1`:`0`}]}));return{...n,[e]:{...r,permissions:i}}})}async function v(){o(!0);try{await jr(p,t),c(!1),u.message.success(`Permissions saved`)}catch{u.message.error(`Save failed`)}finally{o(!1)}}return(0,f.jsxs)(u.Spin,{spinning:r,children:[(0,f.jsxs)(`div`,{className:`uss-perm-header`,children:[(0,f.jsxs)(`span`,{style:{fontSize:13,color:`var(--color-text-muted)`},children:[(0,f.jsx)(d.LockOutlined,{style:{color:`var(--color-brand)`,marginRight:6}}),`Configure module-level permissions for this user.`]}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.UnlockOutlined,{}),loading:a,disabled:!s,onClick:v,children:`Save Changes`})]}),m.length===0&&!r?(0,f.jsx)(`div`,{className:`uss-empty`,children:`No permission entries found for this user.`}):(0,f.jsx)(`div`,{className:`uperm-list`,children:m.map(([e,t])=>{let n=i_(e),{Icon:r}=n,i=s_(e,t),a=c_(e,t),o=o_(e,t),s=n_[e],c=t.permissions?.view?.value===`1`,l=o.find(e=>t.permissions[e]?.value===`1`),d=a.every(e=>t.permissions[e]?.value===`1`);return(0,f.jsxs)(`section`,{className:`uperm-card`,children:[(0,f.jsxs)(`div`,{className:`uperm-card-info`,children:[(0,f.jsx)(`div`,{className:`uperm-module-icon`,children:(0,f.jsx)(r,{style:{fontSize:22}})}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`uperm-module-title`,children:n.title}),(0,f.jsx)(`div`,{className:`uperm-module-desc`,children:n.description})]})]}),(0,f.jsxs)(`div`,{className:`uperm-permissions`,children:[(0,f.jsx)(u.Checkbox,{className:`uperm-select-all`,checked:d,onChange:t=>_(e,t.target.checked),children:`Select all`}),(0,f.jsx)(`div`,{className:`uperm-chip-row`,children:i.map(n=>(0,f.jsxs)(`label`,{className:`uperm-chip`,children:[(0,f.jsx)(u.Checkbox,{checked:t.permissions[n]?.value===`1`,onChange:t=>h(e,n,t.target.checked)}),(0,f.jsx)(`span`,{children:t_[n]??r_(n)})]},n))}),o.length>0&&(0,f.jsxs)(`div`,{className:`uperm-view-scope${c?``:` is-disabled`}`,children:[(0,f.jsx)(`div`,{className:`uperm-scope-title`,children:s.title}),s.control===`radio`?(0,f.jsx)(u.Radio.Group,{className:`uperm-scope-row`,value:l,disabled:!c,onChange:t=>g(e,t.target.value,!0),children:o.map(e=>(0,f.jsx)(u.Radio,{className:`uperm-scope-option`,value:e,children:t_[e]??r_(e)},e))}):(0,f.jsx)(`div`,{className:`uperm-scope-row`,children:o.map(n=>(0,f.jsxs)(`label`,{className:`uperm-scope-option`,children:[(0,f.jsx)(u.Checkbox,{checked:t.permissions[n]?.value===`1`,disabled:!c||n===`my_jobs`,onChange:t=>g(e,n,t.target.checked)}),(0,f.jsx)(`span`,{children:t_[n]??r_(n)})]},n))})]})]})]},e)})})]})}function u_({user:e,configType:t}){let[n,r]=(0,l.useState)({}),[i,a]=(0,l.useState)(Pg),[o,s]=(0,l.useState)(!1),[c,d]=(0,l.useState)({}),[p,m]=(0,l.useState)(`job`),[h,g]=(0,l.useState)([]),_=(0,l.useRef)({}),v=(0,l.useRef)(null),y=(0,l.useCallback)(async(n=e,r=t)=>{let[i,a]=await Promise.all([Tn().catch(()=>[]),_r()]),o=qg(i);return{tabs:o,colls:a,fields:await mr(n,r,o)}},[t,e]);(0,l.useEffect)(()=>{if(!e)return;let t=!1;return queueMicrotask(()=>{s(!0),(async()=>{try{let{tabs:e,colls:n,fields:i}=await y();if(t)return;a(e),g(n),m(t=>e.some(e=>e.key===t)?t:e[0]?.key??``),r(i)}catch{t||u.message.error(`Failed to load field config`)}finally{t||s(!1)}})()}),()=>{t=!0}},[y,e]);let b=n[p]??[];function x(e,t){r(n=>({...n,[e]:typeof t==`function`?t(n[e]??[]):t}))}function S(e,t){x(p,n=>n.map((n,r)=>r===e?{...n,...t}:n))}function C(e,t){x(p,n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r.map((e,t)=>({...e,order:t}))})}async function w(e){if(_.current[e])return _.current[e];try{let t=await vr(e);return _.current[e]=t,t}catch{return[]}}async function T(){let n=p;d(e=>({...e,[n]:!0}));try{await hr(e,n,b,t,i),u.message.success(`Saved`)}catch{u.message.error(`Save failed`)}finally{d(e=>({...e,[n]:!1}))}}return(0,f.jsxs)(u.Spin,{spinning:o,children:[(0,f.jsx)(u.Tabs,{size:`small`,activeKey:p,onChange:m,items:i.map(e=>({key:e.key,label:e.label}))}),(0,f.jsxs)(`div`,{className:`uss-field-header`,style:{gridTemplateColumns:`24px 1fr 80px 56px`},children:[(0,f.jsx)(`span`,{}),(0,f.jsx)(`span`,{children:`Field`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Visible`}),(0,f.jsx)(`span`,{})]}),(0,f.jsxs)(`div`,{className:`uss-field-list`,children:[b.length===0&&!o&&(0,f.jsx)(`div`,{className:`uss-empty`,children:`No fields found.`}),b.map((e,n)=>(0,f.jsx)($g,{field:e,index:n,configType:t,moduleKey:p,onUpdate:S,onReorder:C,collections:h,onFetchCollFields:w,dragFromRef:v},`${e.fieldKey??n}-${p}`))]}),(0,f.jsx)(`div`,{className:`uss-modal-footer`,children:(0,f.jsxs)(u.Button,{type:`primary`,size:`small`,loading:c[p],onClick:T,children:[`Save `,i.find(e=>e.key===p)?.label]})})]})}function d_(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(`listView`),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)(0),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(1),[v,y]=(0,l.useState)(10),[b,x]=(0,l.useState)(``),[S,C]=(0,l.useState)([]),[w,T]=(0,l.useState)([]),[E,D]=(0,l.useState)(!1),[O,k]=(0,l.useState)(!1),[A,j]=(0,l.useState)(!1),M=(0,l.useCallback)(async()=>{k(!0);try{let[e,t]=await Promise.all([Tn().catch(()=>[]),_r()]),n=qg(e),r=await Promise.all([`listView`,`filter`,`form`].map(e=>Ug(null,e,n)));C(t),D(r.some(Boolean))}catch{u.message.error(`Failed to load seed status`)}finally{k(!1)}},[]),N=(0,l.useCallback)(async({offset:e,limit:t,searchQuery:n}={})=>{h(!0);try{let r=await lr({offset:e,limit:t,searchQuery:n??``}),i=(r.users??[]).map(Rg);s(i),p(r.total??i.length)}catch{u.message.error(`Failed to load users`)}finally{h(!1)}},[]);(0,l.useEffect)(()=>{queueMicrotask(()=>{N({offset:(g-1)*v,limit:v,searchQuery:b})})},[N,g,v,b]),(0,l.useEffect)(()=>{queueMicrotask(()=>{M()})},[M]);async function P(){if(E){u.message.info(`Field config already exists. Seed is not allowed.`);return}if(w.length===0){u.message.warning(`Select at least one collection to seed.`);return}j(!0);try{await Wg(w),u.message.success(`Field config seeded`),T([]),await M()}catch(e){u.message.error(e?.message||`Seed failed`)}finally{j(!1)}}function F(e,n=`listView`){t({...e._rawRef,key:e.key}),a(n),r(!0)}let I=[{label:`Name`,value:`_name`,width:220,render:(e,t)=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Mg,{strong:!0,style:{fontSize:13},children:e}),t._email&&(0,f.jsx)(`div`,{style:{fontSize:11,color:`var(--color-text-muted)`},children:t._email})]})},{label:`Role`,value:`_role`,width:180},{label:`Actions`,value:`_configure`,width:200,sorter:!1,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Button,{size:`small`,type:`link`,onClick:()=>F(t),children:`Configure`}),(0,f.jsx)(u.Button,{size:`small`,type:`link`,icon:(0,f.jsx)(d.LockOutlined,{}),onClick:()=>F(t,`permissions`),children:`Permissions`})]})}],L=e?Lg(e):``;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.AppstoreOutlined,{}),title:`Field Config Seed`,style:{marginBottom:12},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,f.jsx)(`div`,{style:{minWidth:320,flex:1},children:(0,f.jsx)(u.Select,{mode:`multiple`,allowClear:!0,showSearch:!0,value:w,options:S.map(e=>({label:e,value:e})),placeholder:E?`Field config already exists`:`Select collections to seed`,disabled:E||O||A,loading:O,onChange:T,style:{width:`100%`}})}),(0,f.jsx)(u.Button,{type:`primary`,loading:A,disabled:E||O||w.length===0,onClick:P,children:`Seed Field Config`})]}),(0,f.jsx)(Mg,{type:`secondary`,style:{display:`block`,marginTop:8,fontSize:12},children:E?`Seed is disabled because field config data already exists.`:`Select collections and seed default field configuration for this project.`})]}),(0,f.jsx)(Z,{icon:(0,f.jsx)(d.TeamOutlined,{}),title:`Users`,style:{marginBottom:0},bodyStyle:{padding:0},children:(0,f.jsx)(gf,{listName:`Users`,dataSource:o,fields:I,loading:m,total:c,current:g,pageSize:v,onPageChange:e=>_(e),onPageSizeChange:e=>{y(e),_(1)},onSearch:e=>{x(e),_(1)}})}),(0,f.jsxs)(u.Modal,{className:`uss-modal`,open:n,onCancel:()=>r(!1),title:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(d.UserOutlined,{style:{color:`var(--color-brand)`}}),(0,f.jsxs)(`span`,{children:[`Configure: `,L]})]}),width:i===`permissions`?860:780,footer:null,destroyOnClose:!0,children:[(0,f.jsx)(`div`,{style:{marginBottom:12},children:(0,f.jsx)(`div`,{className:`uss-config-toggle`,children:Fg.map(e=>(0,f.jsx)(`button`,{className:`uss-config-btn${i===e.key?` active`:``}`,onClick:()=>a(e.key),children:e.label},e.key))})}),e&&i===`permissions`?(0,f.jsx)(l_,{user:e},String(ur(e)??``)):e&&(0,f.jsx)(u_,{user:e,configType:i},`${String(ur(e)??``)}-${i}`)]})]})}var f_=[{key:`job`,label:`Jobs`},{key:`candidate`,label:`Candidates`},{key:`submissions`,label:`Submissions`}],p_=[{key:`listView`,label:`List View`},{key:`filter`,label:`Filter`},{key:`form`,label:`Form`}];function m_({field:e,index:t,onToggle:n,onReorder:r}){let i=useRef(null),[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(!1);function p(e){i.current=t,e.dataTransfer.effectAllowed=`move`,c(!0)}function m(){c(!1),o(!1)}function h(e){e.preventDefault(),o(!0)}function g(){o(!1)}function _(e){e.preventDefault(),o(!1),i.current!==null&&i.current!==t&&r(i.current,t),i.current=null}return(0,f.jsxs)(`div`,{draggable:!0,onDragStart:p,onDragEnd:m,onDragOver:h,onDragLeave:g,onDrop:_,className:`uss-field-row with-edit${a?` drag-over`:``}${s?` dragging`:``}`,children:[(0,f.jsx)(`span`,{className:`uss-drag-handle`,children:(0,f.jsx)(d.HolderOutlined,{})}),(0,f.jsxs)(`span`,{className:`uss-field-name`,children:[e.fieldName,(0,f.jsx)(`span`,{className:`uss-field-key`,children:e.fieldKey})]}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:e.isVisible,onChange:e=>n(t,`isVisible`,e)})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.isEditable,onChange:e=>n(t,`isEditable`,e)})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.ismandatory,onChange:e=>n(t,`ismandatory`,e)})})]})}function h_({role:e,configType:t}){let[n,r]=(0,l.useState)({}),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)({}),[c,d]=(0,l.useState)(`job`);(0,l.useEffect)(()=>{e&&(a(!0),ir(e,t).then(r).catch(()=>u.message.error(`Failed to load field config`)).finally(()=>a(!1)))},[e,t]);let p=n[c]??[];function m(e,t){r(n=>({...n,[e]:typeof t==`function`?t(n[e]??[]):t}))}function h(e,t,n){m(c,r=>r.map((r,i)=>i===e?{...r,[t]:n}:r))}function g(e,t){m(c,n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r.map((e,t)=>({...e,order:t}))})}async function _(){let n=c;s(e=>({...e,[n]:!0}));try{await sr(e,n,p,t),u.message.success(`Saved`)}catch{u.message.error(`Save failed`)}finally{s(e=>({...e,[n]:!1}))}}return(0,f.jsxs)(u.Spin,{spinning:i,children:[(0,f.jsx)(u.Tabs,{size:`small`,activeKey:c,onChange:d,items:f_.map(e=>({key:e.key,label:e.label}))}),(0,f.jsxs)(`div`,{className:`uss-field-header with-edit`,children:[(0,f.jsx)(`span`,{}),(0,f.jsx)(`span`,{children:`Field`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Visible`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Editable`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Mandatory`})]}),(0,f.jsxs)(`div`,{className:`uss-field-list`,children:[p.length===0&&!i&&(0,f.jsx)(`div`,{className:`uss-empty`,children:`No fields found for this module.`}),p.map((e,t)=>(0,f.jsx)(m_,{field:e,index:t,onToggle:h,onReorder:g},e.fieldKey??t))]}),(0,f.jsx)(`div`,{className:`uss-modal-footer`,children:(0,f.jsxs)(u.Button,{type:`primary`,size:`small`,loading:o[c],onClick:_,children:[`Save `,f_.find(e=>e.key===c)?.label]})})]})}function g_(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(`listView`),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)(0),[m,h]=(0,l.useState)(!1),g=(0,l.useCallback)(async()=>{h(!0);try{let e=await Qn();s(e.roles),p(e.total)}catch{u.message.error(`Failed to load roles`)}finally{h(!1)}},[]);(0,l.useEffect)(()=>{g()},[g]);function _(e,n=`listView`){t(e),a(n),r(!0)}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Z,{icon:(0,f.jsx)(d.SafetyOutlined,{}),title:`Roles`,style:{marginBottom:0},bodyStyle:{padding:0},children:(0,f.jsx)(gf,{listName:`Roles`,dataSource:o,fields:[{label:`Role Name`,value:`roleName`,width:200},{label:`Description`,value:`description`,width:240},{label:`Users`,value:`userCount`,width:70,sorter:!1},{label:`Actions`,value:`_configure`,width:200,sorter:!1,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Button,{size:`small`,type:`link`,onClick:()=>_(t),children:`Configure`}),(0,f.jsx)(u.Button,{size:`small`,type:`link`,icon:(0,f.jsx)(d.LockOutlined,{}),onClick:()=>_(t,`permissions`),children:`Permissions`})]})}],loading:m,total:c})}),(0,f.jsxs)(u.Modal,{className:`uss-modal`,open:n,onCancel:()=>r(!1),title:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(d.SafetyOutlined,{style:{color:`var(--color-brand)`}}),(0,f.jsxs)(`span`,{children:[`Configure: `,e?.roleName]})]}),width:720,footer:null,destroyOnClose:!0,children:[(0,f.jsx)(`div`,{style:{marginBottom:12},children:(0,f.jsx)(`div`,{className:`uss-config-toggle`,children:p_.map(e=>(0,f.jsx)(`button`,{className:`uss-config-btn${i===e.key?` active`:``}`,onClick:()=>a(e.key),children:e.label},e.key))})}),e&&(0,f.jsx)(h_,{role:e,configType:i},`${e?.roleId}-${i}`)]})]})}var{Text:__}=u.Typography,v_={key:``,label:``,collectionName:``,baseModule:``,order:0,isActive:!0};function y_({open:e,initial:t,existingModules:n,onClose:r,onSave:i}){let[a]=u.Form.useForm(),o=!!t?.key;(0,l.useEffect)(()=>{e&&a.setFieldsValue({...v_,...t})},[e,t,a]);let s=(0,l.useMemo)(()=>n.filter(e=>e.key!==t?.key).map(e=>({value:e.key,label:`${e.label||e.key} (${e.key})`})),[n,t]);return(0,f.jsx)(u.Modal,{title:o?`Edit Module`:`New Module`,open:e,onCancel:r,onOk:async()=>{i(await a.validateFields())},okText:`Save Module`,className:`fg-editor-modal`,children:(0,f.jsxs)(u.Form,{form:a,layout:`vertical`,initialValues:v_,children:[(0,f.jsx)(u.Form.Item,{name:`key`,label:`Key`,tooltip:`Lowercase identifier used everywhere this module is referenced (moduleName, admin config lookups). Cannot be changed after creation.`,rules:[{required:!0,message:`Key is required`},{pattern:/^[a-z][a-z0-9]*$/,message:`Lowercase letters and numbers only, starting with a letter`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. sourceCandidates`,disabled:o})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Label`,rules:[{required:!0,message:`Label is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. Source Candidates`})}),(0,f.jsx)(u.Form.Item,{name:`collectionName`,label:`Collection Name`,tooltip:`The MongoDB collection that stores this module's records. Point it at an existing module's collection (e.g. "candidates") to reuse the same data without duplicating it.`,rules:[{required:!0,message:`Collection name is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. candidates`})}),(0,f.jsx)(u.Form.Item,{name:`baseModule`,label:`Extends (Base Module)`,tooltip:`When set, this module inherits every form/column/tab/filter/action config it hasn't configured itself from the base module - e.g. "Source Candidates" extending "Candidates" only needs its own List Actions configured.`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,placeholder:`None — standalone module`,options:s})}),(0,f.jsx)(u.Form.Item,{name:`order`,label:`Order`,children:(0,f.jsx)(u.InputNumber,{min:0,style:{width:`100%`}})}),o&&(0,f.jsx)(u.Form.Item,{name:`isActive`,label:`Active`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})})]})})}function b_(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(!1),[c,p]=(0,l.useState)(null),m=async()=>{r(!0);try{let e=await Tn();t(Array.isArray(e)?e:[])}catch(e){u.message.error(e.message||`Failed to load modules`)}finally{r(!1)}};(0,l.useEffect)(()=>{m()},[]);let h=()=>{p(null),s(!0)},g=e=>{p(e),s(!0)};return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.AppstoreOutlined,{}),title:`Modules`,extra:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:m,loading:n,children:`Reload`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:h,children:`New Module`})]}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(__,{type:`secondary`,children:`Define workflow modules that reuse another module's collection and config. A module set to "Extends" a base module inherits every form, column, tab, filter, and action config it hasn't configured for itself — override only what's different (e.g. just its List Actions).`})]}),(0,f.jsx)(Z,{children:(0,f.jsx)(u.Table,{dataSource:e,rowKey:`key`,columns:[{title:`Key`,dataIndex:`key`,key:`key`,render:e=>(0,f.jsx)(__,{code:!0,children:e})},{title:`Label`,dataIndex:`label`,key:`label`},{title:`Collection`,dataIndex:`collectionName`,key:`collectionName`,render:e=>(0,f.jsx)(__,{type:`secondary`,children:e})},{title:`Extends`,dataIndex:`baseModule`,key:`baseModule`,render:e=>e?(0,f.jsx)(u.Tag,{color:`blue`,children:e}):(0,f.jsx)(__,{type:`secondary`,children:`—`})},{title:`Order`,dataIndex:`order`,key:`order`,width:80},{title:`Active`,dataIndex:`isActive`,key:`isActive`,width:90,render:e=>e?(0,f.jsx)(u.Tag,{color:`green`,children:`Active`}):(0,f.jsx)(u.Tag,{children:`Inactive`})},{title:``,key:`actions`,width:60,fixed:`right`,render:(e,t)=>(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>g(t)})})}],pagination:!1,size:`small`,loading:n,className:`fg-table admin-config-table`,locale:{emptyText:`No modules yet.`}})}),(0,f.jsx)(y_,{open:o,initial:c,existingModules:e,onClose:()=>s(!1),onSave:async e=>{a(!0);try{c?.key?(await Dn(c.key,e),u.message.success(`Module updated`)):(await En(e),u.message.success(`Module created`)),s(!1),await m()}catch(e){u.message.error(e.message||`Failed to save module`)}finally{a(!1)}}})]})}var{Paragraph:x_,Text:S_}=u.Typography;function C_({open:e,scope:t,action:n,title:r,description:i,confirmLabel:a=`Confirm`,danger:o=!1,onCancel:s,onVerified:c}){let[p,m]=(0,l.useState)(``),[h,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(``),C=(0,l.useRef)(!1);async function w(){if(!(!t||!n)){v(!0),S(``);try{let e=await Ln(t,n);g(e?.data?.email||e?.email||`the registered approver`),u.message.success(`OTP sent`)}catch(e){S(e?.message||`Could not send the OTP`)}finally{v(!1)}}}(0,l.useEffect)(()=>{e&&!C.current&&(C.current=!0,m(``),S(``),g(``),w()),e||(C.current=!1)},[e]);async function T(){if(!p.trim()){S(`Enter the OTP sent to your email`);return}b(!0),S(``);try{let e=await Rn(t,n,p.trim());u.message.success(e?.data?.message||e?.message||`Done`),c?.(e)}catch(e){S(e?.message||`Verification failed — check the code and try again`)}finally{b(!1)}}return(0,f.jsxs)(u.Modal,{open:e,onCancel:s,title:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.SafetyCertificateOutlined,{}),` `,r]}),destroyOnClose:!0,maskClosable:!y,footer:[(0,f.jsx)(u.Button,{onClick:s,disabled:y,children:`Cancel`},`cancel`),(0,f.jsx)(u.Button,{type:`primary`,danger:o,loading:y,onClick:T,children:a},`ok`)],children:[i&&(0,f.jsx)(x_,{type:`secondary`,style:{fontSize:13,marginBottom:8},children:i}),(0,f.jsxs)(x_,{type:`secondary`,style:{fontSize:13},children:[`This is a protected action. A one-time code has been emailed to`,` `,(0,f.jsx)(S_,{strong:!0,children:h||`…`}),`. Enter it below to continue.`]}),(0,f.jsx)(u.Input,{size:`large`,inputMode:`numeric`,placeholder:`Enter OTP`,value:p,maxLength:6,onChange:e=>m(e.target.value.replace(/\D/g,``)),onPressEnter:T,autoFocus:!0}),x&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:x,style:{marginTop:12}}),(0,f.jsx)(`div`,{style:{marginTop:12},children:(0,f.jsx)(u.Button,{type:`link`,size:`small`,loading:_,onClick:w,style:{padding:0},children:`Resend code`})})]})}var{Text:w_}=u.Typography,T_={reset:{action:`reset`,title:`Reset all form groups`,confirmLabel:`Reset All`,danger:!0,description:`This reseeds every module in this workspace back to the built-in default groups, discarding current customizations.`},save:{action:`save`,title:`Save current as default`,confirmLabel:`Save Default`,danger:!1,description:`Snapshots the current form groups for all modules as the saved default you can restore to later.`},restore:{action:`restore`,title:`Restore saved default`,confirmLabel:`Restore Default`,danger:!0,description:`Replaces the current form groups for all modules with the last saved default.`}},E_=[`#0053a5`,`#52c41a`,`#722ed1`,`#fa8c16`,`#eb2f96`,`#13c2c2`],D_=[{label:`Text`,value:`text`},{label:`Number`,value:`number`},{label:`Email`,value:`email`},{label:`Date`,value:`date`},{label:`Time Picker`,value:`time`},{label:`Location`,value:`location`},{label:`Select`,value:`select`},{label:`Radio`,value:`radio`},{label:`Checkbox`,value:`checkbox`},{label:`Tagify`,value:`tagify`},{label:`Textarea`,value:`textarea`},{label:`Text Editor`,value:`text-editor`},{label:`File`,value:`file`}],O_=[{label:`Static (define options here)`,value:`static`},{label:`Masters collection`,value:`master`},{label:`Module data (distinct)`,value:`module`},{label:`Collection lookup (FK)`,value:`lookup`},{label:`Group value`,value:`group`}],k_=[{label:`Required`,value:`required`,hasValue:!1},{label:`Min length/value`,value:`min`,hasValue:!0,valueType:`number`,placeholder:`e.g. 2`},{label:`Max length/value`,value:`max`,hasValue:!0,valueType:`number`,placeholder:`e.g. 100`},{label:`Pattern (regex)`,value:`pattern`,hasValue:!0,valueType:`text`,placeholder:`^[A-Za-z]+$`},{label:`Email (reject numeric-only address)`,value:`email`,hasValue:!1},{label:`Phone format`,value:`phone`,hasValue:!1},{label:`On or after another date field`,value:`dateAfterField`,hasValue:!0,valueType:`text`,placeholder:`startDate`,dateOnly:!0,messageOptional:!0},{label:`On or before another date field`,value:`dateBeforeField`,hasValue:!0,valueType:`text`,placeholder:`endDate`,dateOnly:!0,messageOptional:!0},{label:`File types allowed`,value:`fileType`,hasValue:!0,valueType:`text`,placeholder:`pdf,doc,jpg`,messageOptional:!0},{label:`Max file size (MB)`,value:`fileSize`,hasValue:!0,valueType:`number`,placeholder:`e.g. 5`,messageOptional:!0},{label:`Max files count`,value:`maxFiles`,hasValue:!0,valueType:`number`,placeholder:`e.g. 3`,messageOptional:!0},{label:`Greater than or equal to field`,value:`greaterThanField`,hasValue:!0,valueType:`text`,placeholder:`experienceRequiredFrom`},{label:`Greater than field (strict)`,value:`strictGreaterThanField`,hasValue:!0,valueType:`text`,placeholder:`numberOfPosition`},{label:`Less than field (strict)`,value:`strictLessThanField`,hasValue:!0,valueType:`text`,placeholder:`experienceRequiredTo`},{label:`Less than or equal to field`,value:`lessThanOrEqualField`,hasValue:!0,valueType:`text`,placeholder:`experienceRequiredTo`},{label:`Max field with fallback`,value:`maxFieldWithFallback`,hasValue:!0,valueType:`text`,placeholder:`preferredToField,fallbackFromField`},{label:`Disable previous dates`,value:`noPastDate`,hasValue:!1,messageOptional:!0,dateOnly:!0},{label:`Disable future dates`,value:`noFutureDate`,hasValue:!1,messageOptional:!0,dateOnly:!0},{label:`Min age (years)`,value:`minAge`,hasValue:!0,valueType:`number`,placeholder:`e.g. 18`,messageOptional:!0,dateOnly:!0}],A_=[{label:`Equals (=)`,value:`eq`},{label:`Not equals (≠)`,value:`neq`},{label:`Has any value`,value:`truthy`},{label:`Is empty`,value:`falsy`}],j_=[{label:`Auto (infer from field)`,value:`auto`},{label:`String`,value:`string`},{label:`Number`,value:`number`},{label:`Boolean`,value:`boolean`},{label:`Array`,value:`array`},{label:`Object`,value:`object`},{label:`Date (ISO)`,value:`date`}],M_=[{label:`(none)`,value:``},{label:`String`,value:`string`},{label:`Number`,value:`number`},{label:`Boolean`,value:`boolean`}],N_=[{label:`Auto (value as-is)`,value:`auto`},{label:`Value only — { key: id }`,value:`value`},{label:`Label only — { key: "India" }`,value:`label`},{label:`Full object — { id, name }`,value:`object`},{label:`Custom template`,value:`custom`},{label:`Skip (never send)`,value:`skip`}],P_={required:`red`,min:`orange`,max:`gold`,pattern:`purple`,email:`blue`,phone:`cyan`,dateAfterField:`volcano`,dateBeforeField:`orange`,fileType:`cyan`,fileSize:`blue`,maxFiles:`geekblue`,greaterThanField:`lime`,strictGreaterThanField:`green`,strictLessThanField:`cyan`,lessThanOrEqualField:`blue`,maxFieldWithFallback:`purple`,noPastDate:`geekblue`,noFutureDate:`magenta`,minAge:`green`};function F_(e){return k_.find(t=>t.value===e)??{hasValue:!1}}function I_(e){return[{key:`all`,label:`All`,color:`#8c8c8c`},...e.map((e,t)=>({key:e.key,label:e.label,color:E_[t%E_.length]}))]}function L_(e){return Object.fromEntries(e.map(({key:e})=>[e,{groups:[],loading:!1,loaded:!1,error:``}]))}function R_(e){if(e==null)return;if(typeof e==`object`)return e;let t=String(e).trim();if(t)try{let e=JSON.parse(t);return e&&typeof e==`object`?e:void 0}catch{return}}function z_(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return``}}function B_(e,t){t.payloadKey&&(e.payloadKey=t.payloadKey),t.prefillFrom&&(e.prefillFrom=t.prefillFrom),t.dataType&&t.dataType!==`auto`&&(e.dataType=t.dataType),t.elementType&&(e.elementType=t.elementType),t.payloadMode&&t.payloadMode!==`auto`&&(e.payloadMode=t.payloadMode),t.valueKey&&(e.valueKey=t.valueKey),t.displayKey&&(e.displayKey=t.displayKey),t.defaultValue!==void 0&&t.defaultValue!==``&&(e.defaultValue=t.defaultValue),t.richValue&&(e.richValue=!0),t.omitEmpty&&(e.omitEmpty=!0);let n=R_(t.payloadTemplate);n&&(e.payloadTemplate=n);let r=R_(t.transformRule);return r&&(e.transformRule=r),e}function V_(e=[]){return e.map(e=>{let t=(e.validations??[]).filter(e=>e?.type).map(e=>{let t=F_(e.type),n={type:e.type,message:e.message??``};return t.hasValue&&e.value!==``&&e.value!==void 0&&e.value!==null&&(n.value=t.valueType===`number`?Number(e.value):e.value),n}),n={label:e.label,field:e.field,type:e.type??`text`,show:+!!e.show,req:+!!e.req,edit:+!!e.edit,formatter:e.formatter??``,validations:t};if(e.showOnAdd===!1&&(n.showOnAdd=!1),e.placeholder&&(n.placeholder=e.placeholder),e.hidePlaceholder&&(n.hidePlaceholder=!0),e.combineKey&&(n.combineKey=e.combineKey),e.combineLabel&&(n.combineLabel=e.combineLabel),e.combineRole&&(n.combineRole=e.combineRole),e.combineToggleLabel&&(n.combineToggleLabel=e.combineToggleLabel),e.combineToggleTarget&&(n.combineToggleTarget=e.combineToggleTarget),e.combineWidth!==void 0&&e.combineWidth!==``&&Number(e.combineWidth)>0&&(n.combineWidth=Number(e.combineWidth)),e.combineWrap&&(n.combineWrap=!0),e.combineSpan!==void 0&&e.combineSpan!==``&&[12,24].includes(Number(e.combineSpan))&&(n.combineSpan=Number(e.combineSpan)),e.defaultOnEdit&&(n.defaultOnEdit=!0),e.emptyValues!==void 0&&e.emptyValues!==``&&(n.emptyValues=String(e.emptyValues).split(`,`).map(e=>e.trim()).filter(e=>e!==``)),e.valuePaths!==void 0&&e.valuePaths!==``&&(n.valuePaths=String(e.valuePaths).split(`,`).map(e=>e.trim()).filter(e=>e!==``)),e.clientScope&&(n.clientScope=!0,e.clientGateMessage&&(n.clientGateMessage=e.clientGateMessage),e.clientGateResetOnChange&&(n.clientGateResetOnChange=!0)),e.infoEnabled&&e.infoText&&(n.infoEnabled=!0,n.infoText=e.infoText),e.helpText&&(n.helpText=e.helpText),B_(n,e),e.type===`file`&&(n.multiple=e.multiple??!1,n.maxCount=n.multiple?Number(e.maxCount??5):1,e.fileKey&&(n.fileKey=e.fileKey),e.fileNameKey&&(n.fileNameKey=e.fileNameKey),e.fileUrlKey&&(n.fileUrlKey=e.fileUrlKey)),e.showIf?.field){n.showIf={field:e.showIf.field,operator:e.showIf.operator??`eq`};let t=n.showIf.operator;(t===`eq`||t===`neq`)&&e.showIf.value!=null&&e.showIf.value!==``&&(n.showIf.value=e.showIf.value)}if(e.disabledByField&&(n.disabledByField=String(e.disabledByField).trim()),e.linkedClearField&&(n.linkedClearField=String(e.linkedClearField).trim()),e.autofillFrom)try{let t=typeof e.autofillFrom==`string`?JSON.parse(e.autofillFrom):e.autofillFrom;Array.isArray(t)&&t.length>0&&(n.autofillFrom=t)}catch{}Array.isArray(e.aiActions)&&e.aiActions.length>0&&(n.aiActions=e.aiActions.filter(e=>e?.key&&e?.label&&e?.serviceKey&&e?.endpointPath).map(e=>({key:e.key,label:e.label,trigger:e.trigger||`click`,serviceKey:e.serviceKey,endpointPath:e.endpointPath,bodyType:e.bodyType||`json`,inputs:(e.inputs||[]).filter(e=>e?.param&&e?.sourceField).map(e=>({param:e.param,sourceField:e.sourceField,kind:e.kind||`text`,...e.transform?{transform:e.transform}:{},...e.group?{group:e.group}:{},...e.required?{required:!0}:{},...Number(e.minWords)>0?{minWords:Number(e.minWords)}:{}})),...String(e.responseDataPath||``).trim()?{responseDataPath:String(e.responseDataPath).trim()}:{},...String(e.position||``).trim()?{position:String(e.position).trim()}:{}})));let r=e.validator?.type;if(r){n.validator={type:r},e.validator.title&&(n.validator.title=e.validator.title);let t=Number(e.validator.maxLength);!isNaN(t)&&t>0&&(n.validator.maxLength=t);let i=Number(e.validator.maxChars);!isNaN(i)&&i>0&&(n.validator.maxChars=i)}if([`select`,`radio`,`checkbox`].includes(e.type)){let t=e.dataSource??`static`;n.dataSource=t,e.type===`select`&&(n.multiSelect=e.multiSelect??!1),t===`master`&&(n.masterName=e.masterName??``),t===`group`&&(n.groupName=e.groupName??``),t===`static`&&(n.options=(e.options??[]).filter(e=>e?.label||e?.value)),t===`lookup`&&(n.lookupCollection=e.lookupCollection??``,n.displayField=e.displayField??``,e.displayField2&&(n.displayField2=e.displayField2),n.valueField=e.valueField??`_id`,e.lookupFilterField&&e.lookupFilterValueFrom&&(n.lookupFilterField=e.lookupFilterField,n.lookupFilterValueFrom=e.lookupFilterValueFrom))}return n})}function H_(e){return{...e,show:e.show===1,req:e.req===1,edit:e.edit===1,showOnAdd:e.showOnAdd!==!1,placeholder:e.placeholder??``,hidePlaceholder:e.hidePlaceholder??!1,clientScope:e.clientScope??!1,clientGateMessage:e.clientGateMessage??``,clientGateResetOnChange:e.clientGateResetOnChange??!1,infoEnabled:e.infoEnabled??!1,infoText:e.infoText??``,helpText:e.helpText??``,formatter:e.formatter??``,combineKey:e.combineKey??``,combineLabel:e.combineLabel??``,combineRole:e.combineRole??``,combineToggleLabel:e.combineToggleLabel??``,combineToggleTarget:e.combineToggleTarget??``,combineWidth:e.combineWidth??``,combineWrap:e.combineWrap??!1,combineSpan:e.combineSpan??``,defaultOnEdit:e.defaultOnEdit??!1,emptyValues:Array.isArray(e.emptyValues)?e.emptyValues.join(`, `):e.emptyValues??``,valuePaths:Array.isArray(e.valuePaths)?e.valuePaths.join(`, `):e.valuePaths??``,dataSource:e.dataSource??`static`,masterName:e.masterName??``,groupName:e.groupName??``,options:e.options??[],lookupCollection:e.lookupCollection??``,displayField:e.displayField??``,displayField2:e.displayField2??``,valueField:e.valueField??`_id`,lookupFilterField:e.lookupFilterField??``,lookupFilterValueFrom:e.lookupFilterValueFrom??``,multiSelect:e.multiSelect??!1,multiple:e.multiple??!1,maxCount:e.maxCount??5,fileKey:e.fileKey??``,fileNameKey:e.fileNameKey??``,fileUrlKey:e.fileUrlKey??``,payloadKey:e.payloadKey??``,prefillFrom:e.prefillFrom??``,dataType:e.dataType??`auto`,elementType:e.elementType??``,payloadMode:e.payloadMode??`auto`,valueKey:e.valueKey??``,displayKey:e.displayKey??``,defaultValue:e.defaultValue??``,richValue:e.richValue??!1,omitEmpty:e.omitEmpty??!1,payloadTemplate:z_(e.payloadTemplate),transformRule:z_(e.transformRule),showIf:e.showIf?.field?{field:e.showIf.field,operator:e.showIf.operator??`eq`,value:e.showIf.value??``}:{field:``,operator:`eq`,value:``},validations:(e.validations??[]).map(e=>({type:e.type,value:e.value??``,message:e.message??``})),validator:{type:e.validator?.type??``,title:e.validator?.title??``,maxLength:e.validator?.maxLength??``,maxChars:e.validator?.maxChars??``},disabledByField:e.disabledByField??``,linkedClearField:e.linkedClearField??``,autofillFrom:Array.isArray(e.autofillFrom)?JSON.stringify(e.autofillFrom,null,2):e.autofillFrom??``,aiActions:Array.isArray(e.aiActions)?e.aiActions.map(e=>({...e,inputs:(e.inputs??[]).map(e=>({...e,minWords:e.minWords??``})),responseDataPath:e.responseDataPath??``,position:e.position??``})):[]}}function U_({form:e,fieldItems:t,add:n,remove:r,move:i,absBase:a,moduleFieldOptions:o,dragIndexRef:s,dragOverIndex:c,setDragOverIndex:l,onFieldKeySelect:p,expandedFieldKeys:m,onToggleField:h}){let g=[...a,`fields`];return(0,f.jsxs)(f.Fragment,{children:[t.map(({key:t,name:n,...a},_)=>{let v=[...g,n],y=e.getFieldValue(v)??{},b=m&&!m.has(_);return(0,f.jsx)(`div`,{draggable:!0,onDragStart:()=>{s.current=_},onDragEnd:()=>{s.current=null,l(null)},onDragOver:e=>{e.preventDefault(),l(_)},onDragLeave:()=>l(null),onDrop:e=>{e.preventDefault();let t=s.current;t!==null&&t!==_&&i(t,_),s.current=null,l(null)},className:`fg-field-card${c===_?` fg-drag-over`:``}`,children:(0,f.jsxs)(`div`,{className:`fg-field-card-inner`,children:[(0,f.jsx)(`span`,{className:`fg-drag-handle`,children:(0,f.jsx)(d.HolderOutlined,{})}),b?(0,f.jsxs)(`div`,{className:`fg-field-summary`,children:[(0,f.jsxs)(`button`,{type:`button`,className:`fg-field-summary-main`,onClick:()=>h(_),children:[(0,f.jsx)(d.RightOutlined,{className:`fg-field-summary-chevron`}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`strong`,{children:y.label||y.field||`Field ${_+1}`}),(0,f.jsxs)(`small`,{children:[y.field||`Field key not set`,` · `,y.type||`text`]})]})]}),(0,f.jsxs)(u.Space,{size:4,children:[y.req&&(0,f.jsx)(u.Tag,{color:`red`,children:`Required`}),y.show===!1&&(0,f.jsx)(u.Tag,{children:`Hidden`}),(0,f.jsx)(u.Tooltip,{title:`Edit field settings`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>h(_)})}),(0,f.jsx)(u.Tooltip,{title:`Remove field`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.MinusCircleOutlined,{}),onClick:()=>r(n)})})]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`fg-field-body`,children:[m&&(0,f.jsxs)(`button`,{type:`button`,className:`fg-field-collapse-btn`,onClick:()=>h(_),children:[(0,f.jsx)(d.DownOutlined,{}),` Collapse field`]}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`field`],label:`Field`,style:{marginBottom:10},rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.AutoComplete,{options:o,placeholder:`Search or type field key…`,filterOption:(e,t)=>(t?.searchLabel??``).includes(e.toLowerCase()),onSelect:e=>p(e,n),className:`fg-mono-input`})}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsx)(u.Form.Item,{...a,name:[n,`label`],label:`Label`,style:{marginBottom:8,flex:2},rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Display label`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`type`],label:`Type`,style:{marginBottom:8,flex:2},initialValue:`text`,children:(0,f.jsx)(u.Select,{size:`small`,options:D_})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`formatter`],label:`Formatter`,style:{marginBottom:8,flex:2},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`name / phone…`})})]}),(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Layout / Combine`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,style:{flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{name:[n,`combineKey`],label:`Combine Key`,style:{marginBottom:0},tooltip:`Fields with the same key render together as one visual block. Payload stays unchanged.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. client_rate`,style:{width:150},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineLabel`],label:`Combined Label`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. Client Rate`,style:{width:160}})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineRole`],label:`Role`,style:{marginBottom:0},children:(0,f.jsx)(u.Select,{size:`small`,style:{width:120},allowClear:!0,options:[{label:`Primary`,value:`primary`},{label:`From`,value:`from`},{label:`To`,value:`to`},{label:`Currency`,value:`currency`},{label:`Unit`,value:`unit`}]})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineToggleLabel`],label:`Toggle Label`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. Range`,style:{width:130}})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineToggleTarget`],label:`Toggle Target`,style:{marginBottom:0},tooltip:`Field key hidden until the combined-field slider is enabled. Example: clientRateTo.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`target field key`,style:{width:150},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineWidth`],label:`Width`,style:{marginBottom:0},tooltip:`Width weight of this box inside the combined block. Set the same key's fields to e.g. 2 & 1 for 2:1, or 1/2/3 for 1:2:3. Blank/0 = equal share.`,children:(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:0,step:.5,placeholder:`1`,style:{width:80}})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineWrap`],label:`Wrap`,valuePropName:`checked`,style:{marginBottom:0},tooltip:`Allow this combined block to wrap to another line. Useful for wider controls such as document upload rows.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineSpan`],label:`Block Span`,style:{marginBottom:0},tooltip:`How much row width this combined block uses. Blank keeps the existing automatic layout.`,children:(0,f.jsx)(u.Select,{size:`small`,allowClear:!0,placeholder:`Auto`,style:{width:110},options:[{label:`Half`,value:12},{label:`Full`,value:24}]})})]})]}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{if(e([...v,`type`])!==`file`)return null;let t=e([...v,`multiple`]);return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`File Options`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,children:[(0,f.jsx)(u.Form.Item,{name:[n,`multiple`],label:`Upload Mode`,valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Multiple`,unCheckedChildren:`Single`})}),t&&(0,f.jsx)(u.Form.Item,{name:[n,`maxCount`],label:`Max files`,style:{marginBottom:0},initialValue:5,rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:2,placeholder:`e.g. 5`,style:{width:80}})}),(0,f.jsx)(u.Form.Item,{name:[n,`fileKey`],label:`File Key`,style:{marginBottom:0},tooltip:`Multipart field name sent to the server. Leave blank to use the field key. Set to 'file' for the jobs service.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. file`,style:{width:120},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`fileNameKey`],label:`Name Key`,style:{marginBottom:0},tooltip:`Stored object key that contains the uploaded file name. Leave blank for automatic detection.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. passportUploadName`,style:{width:180},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`fileUrlKey`],label:`URL Key`,style:{marginBottom:0},tooltip:`Stored object key that contains the file location/path. Leave blank for automatic detection.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. passportCopyLocation`,style:{width:190},className:`fg-mono-input`})})]})]})}}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`type`]);if(![`select`,`radio`,`checkbox`].includes(t))return null;let r=e([...v,`dataSource`])??`static`;return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Options / Values`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,children:[(0,f.jsx)(u.Form.Item,{name:[n,`dataSource`],label:`Source`,style:{marginBottom:0},initialValue:`static`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:190},options:O_})}),t===`select`&&(0,f.jsx)(u.Form.Item,{name:[n,`multiSelect`],label:`Multi Select`,valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Multi`,unCheckedChildren:`Single`})}),r===`master`&&(0,f.jsx)(u.Form.Item,{name:[n,`masterName`],label:`Master Name`,style:{marginBottom:0},rules:[{required:!0,message:`Enter master name`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. tracker`,style:{width:140}})}),r===`group`&&(0,f.jsx)(u.Form.Item,{name:[n,`groupName`],label:`Group Name`,style:{marginBottom:0},rules:[{required:!0,message:`Enter group name`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. users`,style:{width:140}})})]}),r===`static`&&(0,f.jsxs)(`div`,{className:`fg-static-options`,children:[(0,f.jsx)(`span`,{className:`fg-static-options-hint`,children:`Label / Value pairs`}),(0,f.jsx)(u.Form.List,{name:[n,`options`],children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsxs)(`div`,{className:`fg-option-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`label`],style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Label`})}),(0,f.jsx)(u.Form.Item,{name:[t,`value`],style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Value`,className:`fg-mono-input`})}),(0,f.jsx)(d.MinusCircleOutlined,{onClick:()=>n(t),className:`fg-remove-icon`})]},e)),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>t({label:``,value:``}),className:`fg-add-option-btn`,children:`Add Option`})]})})]}),r===`module`&&(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`Options fetched from the module's distinct field values at runtime.`}),r===`group`&&(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`Use "users" to load all users from the system (MySQL).`}),r===`lookup`&&(0,f.jsxs)(`div`,{className:`fg-lookup-block`,children:[(0,f.jsx)(`p`,{className:`fg-source-hint`,style:{marginBottom:8},children:`Cross-collection lookup — shows label, stores FK value.`}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsx)(u.Form.Item,{name:[n,`lookupCollection`],label:`Collection`,style:{marginBottom:0,flex:1},rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. vendors`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`displayField`],label:`Display Field`,style:{marginBottom:0,flex:1},rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. vendorContact.firstName`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`displayField2`],label:`Display Field 2`,style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. vendorContact.lastName`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`valueField`],label:`Value Field (FK)`,style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`_id`,className:`fg-mono-input`})})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:8},children:[(0,f.jsx)(u.Form.Item,{name:[n,`lookupFilterField`],label:`Filter Field`,style:{marginBottom:0,flex:1},tooltip:`Optional DB field to filter lookup rows by. Example: _id or clientId.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. _id`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`lookupFilterValueFrom`],label:`Filter Value From`,style:{marginBottom:0,flex:1},tooltip:`Optional form/scope field that provides the filter value. Example: clientId.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. clientId`,className:`fg-mono-input`})})]})]})]})}}),(0,f.jsxs)(`div`,{className:`fg-toggles-row`,children:[(0,f.jsx)(u.Form.Item,{...a,name:[n,`show`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!0,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Show`,unCheckedChildren:`Hide`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`req`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Req`,unCheckedChildren:`Opt`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`showOnAdd`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!0,tooltip:`Show this field on Add. Turn off for edit-only fields.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Add`,unCheckedChildren:`No Add`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`edit`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!0,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Edit`,unCheckedChildren:`Read`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`clientScope`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,tooltip:`Use this field as the client-selector gate. It shows as the top 'Select Client' picker and is hidden from the form body (no duplicate client card).`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Client Gate`,unCheckedChildren:`Client Gate`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`infoEnabled`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,tooltip:`Show an info icon next to this field label in add/edit forms.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Info`,unCheckedChildren:`Info`})})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:8},children:[(0,f.jsx)(u.Form.Item,{name:[n,`placeholder`],label:`Placeholder`,style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Admin-controlled placeholder`})}),(0,f.jsx)(u.Form.Item,{name:[n,`hidePlaceholder`],label:`Hide Placeholder`,valuePropName:`checked`,style:{marginBottom:0},children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Hidden`,unCheckedChildren:`Shown`})})]}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>e([...v,`clientScope`])?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Client Gate Message`}),(0,f.jsx)(u.Form.Item,{name:[n,`clientGateMessage`],style:{marginBottom:0},children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Message shown below 'Select Client' in the add form (leave blank for default)`})}),(0,f.jsx)(u.Form.Item,{name:[n,`clientGateResetOnChange`],valuePropName:`checked`,style:{margin:`10px 0 0`},tooltip:`When the selected client changes or is cleared, remove every value already entered in the form before loading the new client configuration.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Reset form on client change`,unCheckedChildren:`Keep form values`})})]}):null}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>e([...v,`infoEnabled`])?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsxs)(`span`,{className:`fg-options-label`,children:[(0,f.jsx)(d.InfoCircleOutlined,{}),` Field Info`]}),(0,f.jsx)(u.Form.Item,{name:[n,`infoText`],style:{marginBottom:0},rules:[{required:!0,message:`Enter info message`}],children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Message shown when users hover the info icon`})})]}):null}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`helpText`],label:`Extra Text`,tooltip:`Small gray helper text rendered below this field in add/edit forms. Example: date format.`,children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Shown below the field`})}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`showIf`,`field`]),r=e([...v,`showIf`,`operator`])??`eq`,i=r===`eq`||r===`neq`;return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Show Condition`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,style:{flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{name:[n,`showIf`,`field`],label:`Show only when field`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`field key — blank = always show`,style:{width:210},className:`fg-mono-input`})}),t&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Form.Item,{name:[n,`showIf`,`operator`],label:`Operator`,style:{marginBottom:0},initialValue:`eq`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:130},options:A_,getPopupContainer:()=>document.body})}),i&&(0,f.jsx)(u.Form.Item,{name:[n,`showIf`,`value`],label:`Value`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. yes`,style:{width:100},className:`fg-mono-input`})})]})]}),t&&(0,f.jsxs)(`p`,{className:`fg-source-hint`,style:{marginTop:4},children:[`Hidden until “`,t,`”`,i?` ${r===`eq`?`equals`:`does not equal`} the value above.`:` ${r===`truthy`?`has any value.`:`is empty.`}`]})]})}}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`type`]),r=e([...v,`dataType`])??`auto`,i=e([...v,`payloadMode`])??`auto`,a=[`select`,`radio`,`checkbox`].includes(t),o=[`label`,`object`,`custom`].includes(i);return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Payload Mapping`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,style:{flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{name:[n,`payloadKey`],label:`Payload Key`,style:{marginBottom:8},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`defaults to field key`,style:{width:180},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`prefillFrom`],label:`Prefill From`,tooltip:`Source path to inherit this field's value from when the record is created by prefilling another module (e.g. submission ← candidate). Dotted paths allowed, e.g. passport.passportNumber.`,style:{marginBottom:8},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`source key (cross-module prefill)`,style:{width:200},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`dataType`],label:`Data Type`,style:{marginBottom:8},initialValue:`auto`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:170},options:j_,getPopupContainer:()=>document.body})}),r===`array`&&(0,f.jsx)(u.Form.Item,{name:[n,`elementType`],label:`Array Element Type`,style:{marginBottom:8},children:(0,f.jsx)(u.Select,{size:`small`,style:{width:130},options:M_,getPopupContainer:()=>document.body})}),(0,f.jsx)(u.Form.Item,{name:[n,`payloadMode`],label:`Payload Mode`,style:{marginBottom:8},initialValue:`auto`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:210},options:N_,getPopupContainer:()=>document.body})}),(0,f.jsx)(u.Form.Item,{name:[n,`defaultValue`],label:`Default Value`,style:{marginBottom:8},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`optional`,style:{width:130}})}),(0,f.jsx)(u.Form.Item,{name:[n,`defaultOnEdit`],label:`Default on Edit`,valuePropName:`checked`,style:{marginBottom:8},tooltip:`When the stored value is empty, show Default Value in edit form. Keep off for fields that should remain blank on edit.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:[n,`emptyValues`],label:`Empty Values`,style:{marginBottom:8},tooltip:`Comma separated stored values that should render as blank in edit form. Example: 0, candidate`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. 0, candidate`,style:{width:170}})}),(0,f.jsx)(u.Form.Item,{name:[n,`valuePaths`],label:`Value Paths`,style:{marginBottom:8},tooltip:`Comma separated read paths for edit/detail prefill. Supports array filters like socialProfiles[type=linkedin].value.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`linkedIn, socialProfiles[type=linkedin].value`,style:{width:300},className:`fg-mono-input`})})]}),(o||a)&&(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsx)(u.Form.Item,{name:[n,`valueKey`],label:`Value Key (id)`,style:{marginBottom:8,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. id`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`displayKey`],label:`Display Key (label)`,style:{marginBottom:8,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. name`,className:`fg-mono-input`})}),a&&(0,f.jsx)(u.Form.Item,{name:[n,`richValue`],label:`Keep label`,valuePropName:`checked`,style:{marginBottom:8},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})})]}),i===`custom`&&(0,f.jsxs)(`div`,{style:{marginBottom:8},children:[(0,f.jsxs)(`span`,{className:`fg-static-options-hint`,children:[`Payload Template (JSON) — tokens: `,`{{value}} {{label}} {{raw.field}}`]}),(0,f.jsx)(u.Form.Item,{name:[n,`payloadTemplate`],style:{marginBottom:0},children:(0,f.jsx)(u.Input.TextArea,{rows:2,className:`fg-mono-input`,placeholder:`{ "countryId": "{{value}}", "countryName": "{{label}}" }`})})]}),(0,f.jsxs)(`details`,{style:{marginTop:4},children:[(0,f.jsx)(`summary`,{className:`fg-source-hint`,style:{cursor:`pointer`},children:`Advanced: transform rule / omit empty`}),(0,f.jsxs)(`div`,{style:{marginTop:6},children:[(0,f.jsxs)(`span`,{className:`fg-static-options-hint`,children:[`Transform Rule (JSON) — e.g. `,`{ "map": { "true": "high", "false": "medium" } }`]}),(0,f.jsx)(u.Form.Item,{name:[n,`transformRule`],style:{marginBottom:6},children:(0,f.jsx)(u.Input.TextArea,{rows:2,className:`fg-mono-input`,placeholder:`{ "map": { "true": "high" }, "default": "medium" }`})}),(0,f.jsx)(u.Form.Item,{name:[n,`omitEmpty`],label:`Omit when empty`,valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Omit`,unCheckedChildren:`Send`})})]})]})]})}}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`type`]);if([`select`,`radio`,`checkbox`,`date`,`time`,`file`,`location`].includes(t))return null;let r=e([...v,`validator`,`type`]),i=r&&![`email`,`websiteUrl`,`jobDescription`].includes(r),a=r===`jobDescription`;return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Input Validator`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,style:{flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{name:[n,`validator`,`type`],label:`Type`,style:{marginBottom:0},children:(0,f.jsx)(u.Select,{size:`small`,allowClear:!0,placeholder:`None — no char restriction`,style:{width:260},options:Ha})}),i&&(0,f.jsx)(u.Form.Item,{name:[n,`validator`,`maxLength`],label:`Max Length`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:1,placeholder:`e.g. 55`,style:{width:90}})}),a&&(0,f.jsx)(u.Form.Item,{name:[n,`validator`,`maxChars`],label:`Max Chars`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:1,placeholder:`1500`,style:{width:90}})}),r&&(0,f.jsx)(u.Form.Item,{name:[n,`validator`,`title`],label:`Error Title`,style:{marginBottom:0},tooltip:`Used in error messages. Defaults to the field label when blank.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:e([...v,`label`])||`Field`,style:{width:180}})})]})]})}}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`type`]),r=t===`checkbox`,i=t===`select`&&e([...v,`dataSource`])===`lookup`;return!r&&!i?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Disable When Field Is Checked`}),(0,f.jsx)(u.Form.Item,{name:[n,`disabledByField`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`sibling field key (e.g. currentlyPursuing)`,className:`fg-mono-input`,style:{width:260}})}),(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`This field becomes disabled (and read-only) when the specified sibling checkbox is checked.`})]}):r?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Clear Field When Checked`}),(0,f.jsx)(u.Form.Item,{name:[n,`linkedClearField`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`sibling field key to clear (e.g. endDate)`,className:`fg-mono-input`,style:{width:260}})}),(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`When this checkbox is checked the specified sibling field is cleared and disabled.`})]}):i?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Autofill Fields (JSON)`}),(0,f.jsx)(u.Form.Item,{name:[n,`autofillFrom`],style:{marginBottom:0},children:(0,f.jsx)(u.Input.TextArea,{rows:3,className:`fg-mono-input`,placeholder:`[{"optionKey":"vendorContact.email","targetField":"vendorEmail"}]`})}),(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`When a value is selected, copy raw lookup object fields into sibling fields. Each entry: optionKey (dotted path into the raw record) + targetField (sibling key).`})]}):null}}),(0,f.jsxs)(`div`,{className:`fg-validations-section`,children:[(0,f.jsxs)(`div`,{className:`fg-validations-header`,children:[(0,f.jsx)(d.SafetyCertificateOutlined,{className:`fg-val-icon`}),(0,f.jsx)(`span`,{className:`fg-val-title`,children:`Validations`})]}),(0,f.jsx)(u.Form.List,{name:[n,`validations`],children:(e,{add:t,remove:r})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:6},children:({getFieldValue:e})=>{let i=e([...g,n,`validations`,t,`type`]),a=F_(i),o=e([...g,n,`type`]),s=i===`dateAfterField`||i===`dateBeforeField`,c=(e(g)??[]).map((e,t)=>({candidate:e,index:t})).filter(({candidate:e,index:t})=>t!==n&&e?.type===`date`&&e?.field).map(({candidate:e})=>({value:e.field,label:`${e.label||e.field} (${e.field})`})),l=k_.filter(e=>o===`date`?e.dateOnly||e.value===`required`:!e.dateOnly).map(e=>({label:e.label,value:e.value}));return(0,f.jsxs)(`div`,{className:`fg-val-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`type`],style:{marginBottom:0},rules:[{required:!0,message:`Pick type`}],children:(0,f.jsx)(u.Select,{size:`small`,placeholder:o===`date`?`Date condition`:`Type`,style:{width:210},listHeight:400,getPopupContainer:()=>document.body,options:l})}),a.hasValue&&(0,f.jsx)(u.Form.Item,{name:[t,`value`],style:{marginBottom:0},children:s?(0,f.jsx)(u.Select,{size:`small`,showSearch:!0,allowClear:!0,placeholder:`Related date field`,style:{width:210},options:c,optionFilterProp:`label`,getPopupContainer:()=>document.body}):(0,f.jsx)(u.Input,{size:`small`,type:a.valueType===`number`?`number`:`text`,placeholder:a.placeholder,style:{width:90}})}),(0,f.jsx)(u.Form.Item,{name:[t,`message`],style:{marginBottom:0,flex:1},rules:a.messageOptional?[]:[{required:!0,message:`Message required`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:a.messageOptional?`Optional — uses default`:`Error message shown to user`})}),(0,f.jsx)(d.MinusCircleOutlined,{className:`fg-remove-icon`,style:{marginTop:4},onClick:()=>r(t)})]})}},e)),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>t({type:``,value:``,message:``}),className:`fg-add-val-btn`,children:`Add Validation`})]})})]}),(0,f.jsxs)(`div`,{className:`fg-validations-section`,children:[(0,f.jsxs)(`div`,{className:`fg-validations-header`,children:[(0,f.jsx)(d.ThunderboltOutlined,{className:`fg-val-icon`}),(0,f.jsx)(`span`,{className:`fg-val-title`,children:`AI Actions`})]}),(0,f.jsx)(u.Form.List,{name:[n,`aiActions`],children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsxs)(`div`,{className:`fg-ai-action-card`,children:[(0,f.jsxs)(`div`,{className:`fg-val-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`key`],style:{marginBottom:0},rules:[{required:!0,message:`Key`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`key (e.g. generateJD)`,style:{width:150}})}),(0,f.jsx)(u.Form.Item,{name:[t,`label`],style:{marginBottom:0},rules:[{required:!0,message:`Label`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Button label`,style:{width:170}})}),(0,f.jsx)(u.Form.Item,{name:[t,`trigger`],style:{marginBottom:0},initialValue:`click`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:100},options:[{label:`Click`,value:`click`},{label:`Upload`,value:`upload`}]})}),(0,f.jsx)(u.Form.Item,{name:[t,`bodyType`],style:{marginBottom:0},initialValue:`json`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:110},options:[{label:`JSON`,value:`json`},{label:`Multipart`,value:`multipart`}]})}),(0,f.jsx)(u.Form.Item,{name:[t,`position`],style:{marginBottom:0},children:(0,f.jsx)(u.Select,{size:`small`,style:{width:150},placeholder:`Button position`,allowClear:!0,options:[{label:`Top Left`,value:`top-left`},{label:`Top Center`,value:`top-center`},{label:`Top Right`,value:`top-right`},{label:`Bottom Left`,value:`bottom-left`},{label:`Bottom Center`,value:`bottom-center`},{label:`Bottom Right`,value:`bottom-right`}]})}),(0,f.jsx)(d.MinusCircleOutlined,{className:`fg-remove-icon`,style:{marginTop:4},onClick:()=>n(t)})]}),(0,f.jsxs)(`div`,{className:`fg-val-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`serviceKey`],style:{marginBottom:0},rules:[{required:!0,message:`Service key`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Service key (e.g. pyOps)`,style:{width:170}})}),(0,f.jsx)(u.Form.Item,{name:[t,`endpointPath`],style:{marginBottom:0,flex:1},rules:[{required:!0,message:`Endpoint path`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`/v1/promtJD`,className:`fg-mono-input`})})]}),(0,f.jsxs)(`div`,{className:`fg-ai-subsection`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Inputs (form field → request param) — mark an input "Required", or give it a Min Words count, to make the button stay disabled until that field has a value (or enough words). Inputs sharing the same "group" gate as one unit: either one satisfies it (e.g. a JD file OR JD text).`}),(0,f.jsx)(u.Form.List,{name:[t,`inputs`],children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsxs)(`div`,{className:`fg-val-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`param`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`param`,style:{width:100}})}),(0,f.jsx)(u.Form.Item,{name:[t,`sourceField`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`source field`,className:`fg-mono-input`,style:{width:150}})}),(0,f.jsx)(u.Form.Item,{name:[t,`kind`],style:{marginBottom:0},initialValue:`text`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:90},options:[{label:`Text`,value:`text`},{label:`File`,value:`file`}]})}),(0,f.jsx)(u.Form.Item,{name:[t,`transform`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`transform`,style:{width:120}})}),(0,f.jsx)(u.Form.Item,{name:[t,`group`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`group (either/or)`,style:{width:130}})}),(0,f.jsx)(u.Form.Item,{name:[t,`minWords`],style:{marginBottom:0},children:(0,f.jsx)(u.InputNumber,{size:`small`,min:0,placeholder:`min words`,style:{width:100}})}),(0,f.jsx)(u.Form.Item,{name:[t,`required`],valuePropName:`checked`,style:{marginBottom:0},children:(0,f.jsx)(u.Checkbox,{children:`Required`})}),(0,f.jsx)(d.MinusCircleOutlined,{className:`fg-remove-icon`,onClick:()=>n(t)})]},e)),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>t({kind:`text`}),children:`Add Input`})]})})]}),(0,f.jsxs)(`div`,{className:`fg-ai-subsection`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Response Data Path (optional — where the record lives in the service's response envelope, e.g. "data"; the response is then resolved onto this module's fields the exact same way Edit prefill resolves getFormGroups — by field name, ValuePaths, and each addRow group's payloadKey)`}),(0,f.jsx)(u.Form.Item,{name:[t,`responseDataPath`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. data`,className:`fg-mono-input`,style:{width:200}})})]})]},e)),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>t({trigger:`click`,bodyType:`json`,inputs:[]}),className:`fg-add-val-btn`,children:`Add AI Action`})]})})]})]}),(0,f.jsx)(u.Tooltip,{title:`Remove field`,children:(0,f.jsx)(`button`,{type:`button`,className:`fg-field-remove-btn`,onClick:()=>r(n),"aria-label":`Remove field`,children:(0,f.jsx)(d.MinusCircleOutlined,{})})})]})]})},t)}),(0,f.jsx)(u.Button,{type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{n({type:`text`,show:!0,req:!1,edit:!0,dataSource:`static`,masterName:``,options:[]}),h?.(t.length,!0)},block:!0,className:`fg-add-field-btn`,children:`Add Field`})]})}function W_({open:e,editingGroup:t,defaultModule:n,moduleOptions:r,allGroupsByModule:i,onClose:a,onSaved:o,onSaveGroup:s}){let[c]=u.Form.useForm(),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(n),[_,v]=(0,l.useState)({}),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(null),[C,w]=(0,l.useState)(()=>new Set),[T,E]=(0,l.useState)(`settings`),[D,O]=(0,l.useState)(!1),k=(0,l.useRef)({}),A=(0,l.useRef)(null);async function j(e){if(!(!e||k.current[e])){k.current[e]=`loading`,b(!0);try{let t=await Nn(e);v(n=>({...n,[e]:t})),k.current[e]=`loaded`}catch{delete k.current[e]}finally{b(!1)}}}(0,l.useEffect)(()=>{if(!e)return;let r=t?.module??n;g(r),t?c.setFieldsValue({module:t.module,name:t.name,label:t.label,addRow:t.addRow??!1,minRows:t.minRows??``,initialRows:t.initialRows??``,requireOne:t.requireOne??!1,infoEnabled:t.infoEnabled??!1,infoText:t.infoText??``,toggleEnabled:t.toggleEnabled??!1,toggleLabel:t.toggleLabel??``,toggleField:t.toggleField??``,order:t.order??0,fields:(t.fields??[]).map(H_)}):(c.resetFields(),c.setFieldsValue({module:r,addRow:!1,minRows:``,requireOne:!1,infoEnabled:!1,toggleEnabled:!1,order:0,fields:[]})),j(r)},[e,t,n,c]);function M(e){g(e),j(e)}function N(){w(new Set),E(`settings`),O(!1),a()}function P(e){E(e),e===`fields`&&O(!0)}function F(e,t=!1){w(n=>{let r=new Set(n);return t?r.add(e):r.has(e)?r.delete(e):r.add(e),r})}function I(e){let n=i[e]??[],r=new Set;return n.forEach(e=>{t&&e.id===t.id||(e.fields??[]).forEach(e=>{e.field&&r.add(e.field)})}),r}function L(e,t){let n=(_[h]??[]).find(t=>t.value===e);if(!n)return;let r=c.getFieldValue([`fields`,t])??{};c.setFieldValue([`fields`,t],{...r,field:n.value,label:n.label,type:n.type??`text`})}function R(e){let t=I(e);return(_[e]??[]).map(e=>({value:e.value,disabled:t.has(e.value),label:(0,f.jsxs)(`span`,{style:{opacity:t.has(e.value)?.4:1},children:[e.label,(0,f.jsx)(`span`,{className:`fg-field-key-hint`,children:e.value}),t.has(e.value)&&(0,f.jsx)(`span`,{className:`fg-field-taken-hint`,children:`(in another group)`})]}),searchLabel:`${e.label} ${e.value}`.toLowerCase()}))}async function z(){try{let e=await c.validateFields(),n={...c.getFieldsValue(!0),...e,fields:c.getFieldValue(`fields`)??[]};m(!0);let r={module:n.module,name:n.name,label:n.label,addRow:n.addRow??!1,order:Number(n.order??0),fields:V_(n.fields??[])};n.addRow&&n.minRows!==void 0&&n.minRows!==``&&(r.minRows=Number(n.minRows)),n.addRow&&n.initialRows!==void 0&&n.initialRows!==``&&(r.initialRows=Number(n.initialRows)),n.addRow&&n.requireOne&&(r.requireOne=!0),n.infoEnabled&&n.infoText&&(r.infoEnabled=!0,r.infoText=n.infoText),n.toggleEnabled&&n.toggleField&&(r.toggleEnabled=!0,r.toggleLabel=n.toggleLabel||`Toggle`,r.toggleField=n.toggleField),s?(await s(r,t),u.message.success(t?`Group updated`:`Group created`)):t?(await Fn(t.id,r),u.message.success(`Group updated`)):(await Pn(r),u.message.success(`Group created`)),w(new Set),E(`settings`),O(!1),o()}catch(e){if(e?.errorFields)return;u.message.error(e.message||`Could not save group`)}finally{m(!1)}}let B=(0,l.useMemo)(()=>R(h||n),[i,n,t,h,_]);return(0,f.jsx)(u.Modal,{open:e,onCancel:N,width:1080,centered:!0,destroyOnClose:!0,maskClosable:!1,className:`fg-editor-modal fg-group-editor-modal`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[t?(0,f.jsx)(d.EditOutlined,{}):(0,f.jsx)(d.PlusOutlined,{}),t?` Edit Form Group`:` New Form Group`]}),footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:N,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:p,onClick:z,icon:t?(0,f.jsx)(d.EditOutlined,{}):(0,f.jsx)(d.PlusOutlined,{}),children:t?`Update Group`:`Create Group`})]}),children:(0,f.jsxs)(u.Form,{form:c,layout:`vertical`,className:`fg-form fg-editor-form fg-group-editor-form`,children:[(0,f.jsxs)(`div`,{className:`fg-group-editor-tabs`,role:`tablist`,"aria-label":`Form group editor sections`,children:[(0,f.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":T===`settings`,className:T===`settings`?`is-active`:``,onClick:()=>P(`settings`),children:[(0,f.jsx)(`span`,{className:`fg-editor-tab-number`,children:`1`}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`strong`,{children:`Group settings`}),(0,f.jsx)(`small`,{children:`Name, behaviour and display options`})]})]}),(0,f.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":T===`fields`,className:T===`fields`?`is-active`:``,onClick:()=>P(`fields`),children:[(0,f.jsx)(`span`,{className:`fg-editor-tab-number`,children:`2`}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`strong`,{children:`Fields`}),(0,f.jsxs)(`small`,{children:[t?.fields?.length??0,` configured fields`]})]})]})]}),(0,f.jsxs)(`div`,{className:`fg-group-editor-panel${T===`settings`?` is-active`:``}`,children:[(0,f.jsxs)(`div`,{className:`fg-form-section fg-group-settings-card`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Group Info`}),(0,f.jsx)(u.Form.Item,{name:`module`,label:`Module`,rules:[{required:!0,message:`Select a module`}],children:(0,f.jsx)(u.Select,{options:r,placeholder:`Select module`,onChange:M})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Group Label`,rules:[{required:!0,message:`Label is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. Work Experience`})}),(0,f.jsx)(u.Form.Item,{name:`name`,label:`Group Name (key)`,rules:[{required:!0,message:`Name is required`},{pattern:/^[a-z0-9_]+$/,message:`Lowercase letters, numbers, underscores only`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. work_experience`,className:`fg-mono-input`})}),(0,f.jsxs)(`div`,{className:`fg-inline-row`,children:[(0,f.jsx)(u.Form.Item,{name:`order`,label:`Display Order`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:100}})}),(0,f.jsx)(u.Form.Item,{name:`addRow`,label:`Allow Add Row`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:`minRows`,label:`Min Rows`,tooltip:`Minimum rows users must keep. Delete is disabled at this count.`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:90}})}),(0,f.jsx)(u.Form.Item,{name:`initialRows`,label:`Initial Rows`,tooltip:`How many empty rows to show on load (0 = show only the + button).`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:90}})}),(0,f.jsx)(u.Form.Item,{name:`requireOne`,label:`Row Required`,valuePropName:`checked`,tooltip:`When users add a row, at least one field in that row must be filled.`,children:(0,f.jsx)(u.Switch,{checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:`infoEnabled`,label:`Group Info`,valuePropName:`checked`,initialValue:!1,children:(0,f.jsx)(u.Switch,{checkedChildren:`Info`,unCheckedChildren:`Info`})}),(0,f.jsx)(u.Form.Item,{name:`toggleEnabled`,label:`Group Switch`,valuePropName:`checked`,initialValue:!1,children:(0,f.jsx)(u.Switch,{checkedChildren:`On`,unCheckedChildren:`Off`})})]}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:0},className:`fg-group-conditional`,children:({getFieldValue:e})=>e(`infoEnabled`)?(0,f.jsx)(u.Form.Item,{name:`infoText`,label:`Group Info Message`,rules:[{required:!0,message:`Enter group info message`}],children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Message shown when users hover the group info icon`})}):null}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:0},className:`fg-group-conditional`,children:({getFieldValue:e})=>e(`toggleEnabled`)?(0,f.jsxs)(`div`,{className:`fg-inline-row`,children:[(0,f.jsx)(u.Form.Item,{name:`toggleLabel`,label:`Switch Label`,rules:[{required:!0,message:`Enter switch label`}],style:{flex:1},children:(0,f.jsx)(u.Input,{placeholder:`e.g. Fresher`})}),(0,f.jsx)(u.Form.Item,{name:`toggleField`,label:`Payload Field`,rules:[{required:!0,message:`Enter payload field`},{pattern:/^[A-Za-z_][\w.]*$/,message:`Use a valid key, dot path allowed`}],style:{flex:1},children:(0,f.jsx)(u.Input,{placeholder:`e.g. isFresher`,className:`fg-mono-input`})})]}):null})]}),(0,f.jsxs)(`div`,{className:`fg-editor-next-row`,children:[(0,f.jsx)(w_,{type:`secondary`,children:`Next, review the fields included in this group.`}),(0,f.jsx)(u.Button,{type:`primary`,onClick:()=>P(`fields`),children:`Continue to Fields`})]})]}),D&&(0,f.jsxs)(`div`,{className:`fg-group-editor-panel${T===`fields`?` is-active`:``}`,children:[(0,f.jsxs)(`div`,{className:`fg-fields-header`,children:[(0,f.jsx)(`span`,{className:`fg-fields-title`,children:`Fields`}),(0,f.jsx)(`span`,{className:`fg-fields-hint`,children:`Open only the field you want to change`}),y&&(0,f.jsx)(u.Spin,{size:`small`}),!y&&B.length>0&&(0,f.jsxs)(`span`,{className:`fg-fields-hint`,children:[B.length,` fields available`]})]}),(0,f.jsx)(u.Form.List,{name:`fields`,children:(e,{add:t,remove:n,move:r})=>U_({form:c,fieldItems:e,add:t,remove:n,move:r,absBase:[],moduleFieldOptions:B,fieldsLoading:y,dragIndexRef:A,dragOverIndex:x,setDragOverIndex:S,onFieldKeySelect:(e,t)=>L(e,t),expandedFieldKeys:C,onToggleField:F})})]})]})})}function G_({groups:e,onEdit:t,onDelete:n,onCopy:r,onPaste:i,canPaste:a}){let o=[{title:`Label`,dataIndex:`label`,key:`label`,render:e=>(0,f.jsx)(w_,{strong:!0,style:{color:`var(--color-text-heading)`},children:e})},{title:`Key`,dataIndex:`name`,key:`name`,render:e=>(0,f.jsx)(`code`,{className:`fg-table-code`,children:e})},{title:`Add Row`,dataIndex:`addRow`,key:`addRow`,align:`center`,width:90,render:e=>e?(0,f.jsx)(u.Tag,{color:`blue`,style:{margin:0},children:`Yes`}):(0,f.jsx)(u.Tag,{color:`default`,style:{margin:0},children:`No`})},{title:`Order`,dataIndex:`order`,key:`order`,align:`center`,width:72,render:e=>(0,f.jsx)(`span`,{className:`fg-order-cell`,children:e??0})},{title:`Fields`,dataIndex:`fields`,key:`fields`,align:`center`,width:76,render:e=>(0,f.jsx)(u.Badge,{count:e?.length??0,showZero:!0,color:`var(--color-brand)`})},{title:``,key:`actions`,align:`right`,width:132,render:(e,o)=>(0,f.jsxs)(u.Space,{size:4,children:[(0,f.jsx)(u.Tooltip,{title:`Copy settings`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.CopyOutlined,{}),onClick:()=>r(o),className:`fg-action-btn`})}),(0,f.jsx)(u.Tooltip,{title:`Paste copied settings into this group`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.SnippetsOutlined,{}),disabled:!a,onClick:()=>i(o),className:`fg-action-btn`})}),(0,f.jsx)(u.Tooltip,{title:`Edit group`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>t(o),className:`fg-action-btn`})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this group?`,description:`All field mappings inside will be removed.`,onConfirm:()=>n(o.id),okText:`Delete`,okButtonProps:{danger:!0},children:(0,f.jsx)(u.Tooltip,{title:`Delete group`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),className:`fg-action-btn`})})})]})}];return(0,f.jsx)(u.Table,{rowKey:e=>e.id??e.name,dataSource:[...e].sort((e,t)=>(e.order??0)-(t.order??0)),columns:o,pagination:!1,className:`fg-table`,locale:{emptyText:(0,f.jsx)(u.Empty,{description:`No groups configured for this module yet.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE,style:{padding:`24px 0`}})},expandable:{expandedRowRender:e=>(e.fields??[]).length===0?(0,f.jsx)(w_,{type:`secondary`,style:{fontSize:12},children:`No fields in this group.`}):(0,f.jsx)(`div`,{className:`fg-expanded-fields`,children:(e.fields??[]).map(e=>{let t={master:`geekblue`,module:`cyan`,lookup:`volcano`,static:`default`},n={master:`master: ${e.masterName||`?`}`,module:`module`,lookup:`lookup: ${e.lookupCollection||`?`} → ${e.displayField||`?`}`,static:`static (${(e.options??[]).length})`};return(0,f.jsxs)(`div`,{className:`fg-field-row`,children:[(0,f.jsxs)(`div`,{className:`fg-field-row-info`,children:[(0,f.jsx)(`span`,{className:`fg-field-row-label`,children:e.label}),(0,f.jsx)(`span`,{className:`fg-field-row-key`,children:e.field}),(0,f.jsxs)(`span`,{className:`fg-field-row-type`,children:[`(`,e.type,`)`]}),[`select`,`radio`,`checkbox`].includes(e.type)&&e.dataSource&&(0,f.jsx)(u.Tag,{color:t[e.dataSource]??`default`,style:{fontSize:10,marginLeft:6},children:n[e.dataSource]??e.dataSource})]}),(0,f.jsxs)(`div`,{className:`fg-field-row-flags`,children:[e.show===1&&(0,f.jsx)(u.Tag,{color:`blue`,style:{marginRight:4},children:`Show`}),e.showOnAdd===!1&&(0,f.jsx)(u.Tag,{color:`orange`,style:{marginRight:4},children:`Edit only`}),e.req===1&&(0,f.jsx)(u.Tag,{color:`red`,style:{marginRight:4},children:`Required`}),e.edit===1&&(0,f.jsx)(u.Tag,{color:`green`,style:{marginRight:4},children:`Editable`}),e.formatter&&(0,f.jsxs)(u.Tag,{color:`purple`,style:{marginRight:4},children:[`fmt: `,e.formatter]})]}),(e.validations??[]).length>0&&(0,f.jsxs)(`div`,{className:`fg-field-row-validations`,children:[(0,f.jsx)(d.CheckCircleOutlined,{style:{color:`var(--color-brand)`,fontSize:11,marginRight:4}}),(e.validations??[]).map((e,t)=>(0,f.jsx)(u.Tooltip,{title:`${e.value!==void 0&&e.value!==``?`Value: ${e.value} — `:``}${e.message}`,children:(0,f.jsxs)(u.Tag,{color:P_[e.type]??`default`,style:{cursor:`default`,fontFamily:`monospace`,fontSize:10},children:[e.type,e.value!==void 0&&e.value!==``?`(${e.value})`:``]})},t))]})]},e.field)})}),rowExpandable:()=>!0}})}function K_({open:e,editingForm:t,moduleOptions:n,onClose:r,onSaved:i}){let[a]=u.Form.useForm(),[o,s]=(0,l.useState)(!1),[c,p]=(0,l.useState)(``),[m,h]=(0,l.useState)({}),[g,_]=(0,l.useState)(!1),[v,y]=(0,l.useState)(null),b=(0,l.useRef)({}),x=(0,l.useRef)(null);async function S(e){if(!(!e||b.current[e])){_(!0);try{let t=await Nn(e);h(n=>({...n,[e]:t})),b.current[e]=!0}catch{}finally{_(!1)}}}(0,l.useEffect)(()=>{if(!e){b.current={},h({});return}if(t){let e=t.module;p(e),a.setFieldsValue({module:e,formType:t.formType||`popup`,action:t.action,label:t.label,groups:(t.groups??[]).map(e=>({...e,infoEnabled:e.infoEnabled??!1,infoText:e.infoText??``,minRows:e.minRows??``,initialRows:e.initialRows??``,requireOne:e.requireOne??!1,toggleEnabled:e.toggleEnabled??!1,toggleLabel:e.toggleLabel??``,toggleField:e.toggleField??``,fields:(e.fields??[]).map(H_)}))}),S(e)}else a.resetFields(),a.setFieldsValue({groups:[],formType:`popup`}),p(``)},[e,t,a]);function C(e){p(e),S(e)}function w(){return(m[c]??[]).map(e=>({value:e.value,label:(0,f.jsxs)(`span`,{children:[e.label,(0,f.jsx)(`span`,{className:`fg-field-key-hint`,children:e.value})]}),searchLabel:`${e.label} ${e.value}`.toLowerCase()}))}async function T(){try{let e=await a.validateFields();s(!0);let n={module:e.module,formType:e.formType,action:e.action.trim(),label:e.label,groups:(e.groups??[]).map(e=>({label:e.label,name:e.name,addRow:e.addRow??!1,...e.addRow&&e.minRows!==void 0&&e.minRows!==``?{minRows:Number(e.minRows)}:{},...e.addRow&&e.initialRows!==void 0&&e.initialRows!==``?{initialRows:Number(e.initialRows)}:{},...e.addRow&&e.requireOne?{requireOne:!0}:{},order:Number(e.order??0),fields:V_(e.fields??[]),...e.infoEnabled&&e.infoText?{infoEnabled:!0,infoText:e.infoText}:{}}))};t?(await Fr(t.id,{...t,...n}),u.message.success(`Custom form updated`)):(await Pr(n),u.message.success(`Custom form created`)),i()}catch(e){if(e?.errorFields)return;u.message.error(e.message||`Could not save custom form`)}finally{s(!1)}}let E=w();return(0,f.jsx)(u.Modal,{open:e,onCancel:r,width:1120,centered:!0,destroyOnClose:!0,maskClosable:!1,className:`fg-editor-modal`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[t?(0,f.jsx)(d.EditOutlined,{}):(0,f.jsx)(d.PlusOutlined,{}),t?` Edit Custom Form`:` New Custom Form`]}),footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:r,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:o,onClick:T,icon:t?(0,f.jsx)(d.EditOutlined,{}):(0,f.jsx)(d.PlusOutlined,{}),children:t?`Update`:`Create`})]}),children:(0,f.jsxs)(u.Form,{form:a,layout:`vertical`,className:`fg-form fg-editor-form`,children:[(0,f.jsxs)(`div`,{className:`fg-form-section fg-editor-sticky-section`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Form Identity`}),(0,f.jsx)(u.Form.Item,{name:`module`,label:`Module`,rules:[{required:!0,message:`Select a module`}],children:(0,f.jsx)(u.Select,{options:n,placeholder:`Select module`,onChange:C})}),(0,f.jsx)(u.Form.Item,{name:`formType`,label:`Form Type`,rules:[{required:!0,message:`Form Type is required`}],initialValue:`popup`,children:(0,f.jsx)(u.Select,{placeholder:`Select form type`,options:[{label:`Search`,value:`search`},{label:`Popup`,value:`popup`}]})}),(0,f.jsx)(u.Form.Item,{name:`action`,label:`Action Key`,extra:`Unique identifier used as ?action= in the URL (e.g. quickAdd, popup)`,rules:[{required:!0,message:`Action is required`},{pattern:/^[a-zA-Z0-9_-]+$/,message:`Letters, numbers, hyphens, underscores only`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. quickAdd`,className:`fg-mono-input`,disabled:!!t})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Display Label`,rules:[{required:!0,message:`Label is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. Quick Add Job`})})]}),(0,f.jsxs)(`div`,{className:`fg-fields-header`,children:[(0,f.jsx)(`span`,{className:`fg-fields-title`,children:`Groups`}),(0,f.jsx)(`span`,{className:`fg-fields-hint`,children:`Each group holds a set of form fields`}),g&&(0,f.jsx)(u.Spin,{size:`small`})]}),(0,f.jsx)(u.Form.List,{name:`groups`,children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsxs)(`div`,{className:`fg-form-section`,style:{marginBottom:16},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:10},children:[(0,f.jsxs)(`span`,{className:`fg-form-section-label`,style:{marginBottom:0},children:[`Group `,t+1]}),(0,f.jsx)(u.Tooltip,{title:`Remove group`,children:(0,f.jsx)(`button`,{type:`button`,className:`fg-field-remove-btn`,onClick:()=>n(t),"aria-label":`Remove group`,children:(0,f.jsx)(d.MinusCircleOutlined,{})})})]}),(0,f.jsxs)(`div`,{className:`fg-inline-row`,style:{flexWrap:`wrap`,marginBottom:8},children:[(0,f.jsx)(u.Form.Item,{name:[t,`label`],label:`Group Label`,rules:[{required:!0,message:`Required`}],style:{flex:2,marginBottom:8},children:(0,f.jsx)(u.Input,{placeholder:`e.g. Basic Info`})}),(0,f.jsx)(u.Form.Item,{name:[t,`name`],label:`Group Key`,rules:[{required:!0,message:`Required`},{pattern:/^[a-z0-9_]+$/,message:`Lowercase, numbers, underscores`}],style:{flex:2,marginBottom:8},children:(0,f.jsx)(u.Input,{placeholder:`e.g. basicInfo`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[t,`addRow`],label:`Add Row`,valuePropName:`checked`,initialValue:!1,style:{marginBottom:8},children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:[t,`minRows`],label:`Min Rows`,style:{marginBottom:8},tooltip:`Minimum rows users must keep. Delete is disabled at this count.`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:80}})}),(0,f.jsx)(u.Form.Item,{name:[t,`initialRows`],label:`Initial Rows`,style:{marginBottom:8},tooltip:`How many empty rows to show on load (0 = show only the + button).`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:80}})}),(0,f.jsx)(u.Form.Item,{name:[t,`requireOne`],label:`Row Required`,valuePropName:`checked`,initialValue:!1,style:{marginBottom:8},tooltip:`When users add a row, at least one field in that row must be filled.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:[t,`infoEnabled`],label:`Group Info`,valuePropName:`checked`,initialValue:!1,style:{marginBottom:8},children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Info`,unCheckedChildren:`Info`})}),(0,f.jsx)(u.Form.Item,{name:[t,`toggleEnabled`],label:`Group Switch`,valuePropName:`checked`,initialValue:!1,style:{marginBottom:8},children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`On`,unCheckedChildren:`Off`})}),(0,f.jsx)(u.Form.Item,{name:[t,`order`],label:`Order`,initialValue:0,style:{marginBottom:8},children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:70}})})]}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>e([`groups`,t,`infoEnabled`])?(0,f.jsx)(u.Form.Item,{name:[t,`infoText`],label:`Group Info Message`,rules:[{required:!0,message:`Enter group info message`}],children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Message shown when users hover the group info icon`})}):null}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>e([`groups`,t,`toggleEnabled`])?(0,f.jsxs)(`div`,{className:`fg-inline-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`toggleLabel`],label:`Switch Label`,rules:[{required:!0,message:`Enter switch label`}],style:{flex:1,marginBottom:0},children:(0,f.jsx)(u.Input,{placeholder:`e.g. Fresher`})}),(0,f.jsx)(u.Form.Item,{name:[t,`toggleField`],label:`Payload Field`,rules:[{required:!0,message:`Enter payload field`},{pattern:/^[A-Za-z_][\w.]*$/,message:`Use a valid key, dot path allowed`}],style:{flex:1,marginBottom:0},children:(0,f.jsx)(u.Input,{placeholder:`e.g. isFresher`,className:`fg-mono-input`})})]}):null}),(0,f.jsx)(`div`,{className:`fg-fields-header`,style:{marginTop:4,marginBottom:8},children:(0,f.jsx)(`span`,{className:`fg-fields-title`,style:{fontSize:12},children:`Fields`})}),(0,f.jsx)(u.Form.List,{name:[t,`fields`],children:(e,{add:n,remove:r,move:i})=>U_({form:a,fieldItems:e,add:n,remove:r,move:i,absBase:[`groups`,t],moduleFieldOptions:E,fieldsLoading:g,dragIndexRef:x,dragOverIndex:v,setDragOverIndex:y,onFieldKeySelect:(e,n)=>{let r=(m[c]??[]).find(t=>t.value===e);if(!r)return;let i=a.getFieldValue([`groups`,t,`fields`,n])??{};a.setFieldValue([`groups`,t,`fields`,n],{...i,field:r.value,label:r.label,type:r.type??`text`})}})})]},e)),(0,f.jsx)(u.Button,{type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),block:!0,style:{marginBottom:16},onClick:()=>t({label:``,name:``,addRow:!1,order:e.length,fields:[]}),children:`Add Group`})]})})]})})}function q_({moduleOptions:e}){let[t,n]=(0,l.useState)([]),[r,i]=(0,l.useState)(!1),[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(null);function p(){i(!0),Nr().then(e=>n(e)).catch(e=>u.message.error(e.message||`Could not load custom forms`)).finally(()=>i(!1))}(0,l.useEffect)(()=>{p()},[]);async function m(e){try{await Ir(e.id),u.message.success(`Custom form deleted`),p()}catch(e){u.message.error(e.message||`Could not delete custom form`)}}return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`fg-tab-toolbar`,style:{marginBottom:12},children:(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{c(null),o(!0)},children:`New Custom Form`})}),(0,f.jsx)(u.Spin,{spinning:r,children:(0,f.jsx)(u.Table,{rowKey:e=>e.id??e.action,dataSource:t,columns:[{title:`Module`,dataIndex:`module`,key:`module`,render:e=>(0,f.jsx)(u.Tag,{color:`blue`,children:e})},{title:`Action Key`,dataIndex:`action`,key:`action`,render:e=>(0,f.jsx)(`code`,{className:`fg-table-code`,children:e})},{title:`Label`,dataIndex:`label`,key:`label`,render:e=>(0,f.jsx)(w_,{strong:!0,style:{color:`var(--color-text-heading)`},children:e})},{title:`Groups`,dataIndex:`groups`,key:`groups`,align:`center`,width:76,render:e=>(0,f.jsx)(u.Badge,{count:e?.length??0,showZero:!0,color:`var(--color-brand)`})},{title:``,key:`actions`,align:`right`,width:100,render:(e,t)=>(0,f.jsxs)(u.Space,{size:4,children:[(0,f.jsx)(u.Tooltip,{title:`Edit form`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{c(t),o(!0)},className:`fg-action-btn`})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this custom form?`,description:`All configured groups will be lost.`,onConfirm:()=>m(t),okText:`Delete`,okButtonProps:{danger:!0},children:(0,f.jsx)(u.Tooltip,{title:`Delete form`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),className:`fg-action-btn`})})})]})}],pagination:!1,className:`fg-table`,locale:{emptyText:(0,f.jsx)(u.Empty,{description:`No custom forms yet. Click 'New Custom Form' to create one.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE,style:{padding:`24px 0`}})}})}),(0,f.jsx)(K_,{open:a,editingForm:s,moduleOptions:e,onClose:()=>{o(!1),c(null)},onSaved:()=>{o(!1),c(null),p()}})]})}function J_(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[i,a]=(0,l.useState)({}),[o,s]=(0,l.useState)(`all`),[c,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(`module`),[b,x]=(0,l.useState)([]),[S,C]=(0,l.useState)({clientId:``,region:``}),[w,T]=(0,l.useState)(!1),[E,D]=(0,l.useState)(null),O=I_(e),k=e.map(e=>({value:e.key,label:e.label}));(0,l.useEffect)(()=>{Tn().then(e=>{t(e);let n=I_(e);a(L_(n)),j(`all`,n)}).catch(()=>t([])).finally(()=>r(!1))},[]),(0,l.useEffect)(()=>{Mn({limit:200}).then(x).catch(()=>x([]))},[]);function A(e,t){a(n=>({...n,[e]:{...n[e],...t}}))}function j(e,t){(t??O).find(t=>t.key===e)&&(A(e,{loading:!0,error:``}),jn(e===`all`?``:e,e===`jobs`?S:{}).then(t=>A(e,{groups:t,loading:!1,loaded:!0})).catch(t=>A(e,{error:t.message||`Could not load groups`,loading:!1})))}function M(e){j(e,null)}function N(e){s(e),i[e]?.loaded||M(e)}function P(){h(null),p(!0)}function F(e){h(e),p(!0)}function I(){p(!1),h(null)}async function L(){I(),M(o),o!==`all`&&M(`all`)}async function R(e){try{await In(e),u.message.success(`Group deleted`),M(o),o!==`all`&&M(`all`)}catch(e){u.message.error(e.message||`Could not delete group`)}}function z(e){_(T_[e])}function B(e){let t={...S,...e};C(t),o===`jobs`&&(A(`jobs`,{loading:!0,error:``}),jn(`jobs`,t).then(e=>A(`jobs`,{groups:e,loading:!1})).catch(e=>A(`jobs`,{error:e.message||`Could not load scoped groups`,loading:!1})))}function V(e=o){return e===`jobs`?S:{}}function H(e){D(JSON.parse(JSON.stringify(e))),u.message.success(`Copied settings from ${e.label||e.name}`)}async function U(e){if(E)try{let t={...e,addRow:E.addRow??e.addRow,payloadKey:E.payloadKey??e.payloadKey,fields:JSON.parse(JSON.stringify(E.fields??[]))};await Fn(e.id,t,V(e.module||o)),u.message.success(`Pasted settings into ${e.label||e.name}`),M(o),o!==`all`&&M(`all`)}catch(e){u.message.error(e.message||`Could not paste settings`)}}function W(){_(null),a(L_(O)),M(o),o!==`all`&&M(`all`)}let G=O.map(({key:e,label:t,color:n})=>{let r=i[e]??{groups:[],loading:!1,loaded:!1,error:``},a=[...r.groups].sort((e,t)=>(e.order??0)-(t.order??0));return{key:e,label:(0,f.jsxs)(`span`,{className:`fg-tab-label`,children:[(0,f.jsx)(`span`,{className:`fg-tab-dot`,style:{background:n}}),t,(0,f.jsx)(u.Badge,{count:r.groups.length,showZero:!0,color:n,size:`small`})]}),children:(0,f.jsxs)(`div`,{className:`fg-tab-content`,children:[r.error&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:r.error,style:{marginBottom:12}}),(0,f.jsx)(`div`,{className:`fg-tab-toolbar`,children:(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),disabled:e===`all`,onClick:()=>{s(e),P()},children:`Add Group`})}),(0,f.jsx)(u.Spin,{spinning:r.loading,children:(0,f.jsx)(G_,{groups:a,onEdit:F,onDelete:R,onCopy:H,onPaste:U,canPaste:!!E})})]})}}),K=[{key:`module`,label:`Module Form`,children:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Z,{children:(0,f.jsxs)(`div`,{className:`fg-scope-toolbar`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(w_,{strong:!0,children:`Jobs Client Scope`}),(0,f.jsx)(`div`,{children:(0,f.jsx)(w_,{type:`secondary`,style:{fontSize:12},children:`Select a client to edit a scoped Jobs field list. Leave blank for the default module config.`})})]}),(0,f.jsxs)(u.Space,{wrap:!0,size:8,children:[(0,f.jsx)(u.Select,{size:`small`,allowClear:!0,showSearch:!0,placeholder:`Client`,style:{width:240},value:S.clientId||void 0,optionFilterProp:`label`,options:b.map(e=>({value:e._id??e.id,label:e.clientName??e.name??e.clientRefrenceId??e._id})).filter(e=>e.value),onChange:e=>B({clientId:e??``})}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:()=>M(o),children:`Reload`}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.EyeOutlined,{}),disabled:o!==`jobs`,onClick:()=>T(!0),children:`Preview`})]})]})}),(0,f.jsx)(Z,{children:(0,f.jsx)(u.Spin,{spinning:n,children:(0,f.jsx)(u.Tabs,{activeKey:o,onChange:N,items:G,size:`middle`,className:`fg-tabs`})})}),(0,f.jsx)(W_,{open:c,editingGroup:m,defaultModule:o===`all`?k[0]?.value??``:o,moduleOptions:k,allGroupsByModule:Object.fromEntries(Object.entries(i).filter(([e])=>e!==`all`).map(([e,t])=>[e,t.groups??[]])),onClose:I,onSaved:L,onSaveGroup:(e,t)=>t?Fn(t.id,e,V(e.module)):Pn(e,V(e.module))}),(0,f.jsx)(u.Drawer,{open:w,onClose:()=>T(!1),width:`92vw`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.EyeOutlined,{}),` Jobs Add Form Preview`]}),classNames:{body:`fg-preview-body`},children:(0,f.jsx)(rd,{moduleName:`jobs`,clientId:S.clientId,region:S.region,cancelPath:`/jobs`,onSubmit:async()=>u.message.info(`Preview only. No record was created.`),breadcrumbItems:[{label:`Admin`},{label:`Form Groups`},{label:`Jobs Preview`}]})})]})},{key:`custom`,label:`Custom Form`,children:(0,f.jsx)(Z,{children:(0,f.jsx)(q_,{moduleOptions:k})})}];return(0,f.jsxs)(`div`,{className:`fg-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.AppstoreAddOutlined,{}),title:`Form Groups`,extra:v===`module`?(0,f.jsxs)(u.Space,{size:8,wrap:!0,children:[(0,f.jsx)(u.Dropdown,{trigger:[`click`],menu:{items:[{key:`save`,label:`Save current as default`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>z(`save`)},{key:`restore`,label:`Restore saved default`,icon:(0,f.jsx)(d.CloudDownloadOutlined,{}),onClick:()=>z(`restore`)},{type:`divider`},{key:`reset`,label:`Reset all form groups`,icon:(0,f.jsx)(d.ReloadOutlined,{}),danger:!0,onClick:()=>z(`reset`)}]},children:(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.MoreOutlined,{}),children:`Workspace defaults`})}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.AppstoreAddOutlined,{}),onClick:P,children:`New Group`})]}):null,children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsxs)(w_,{type:`secondary`,style:{fontSize:13},children:[(0,f.jsx)(`strong`,{children:`Module Form`}),` — configure the default add/edit form for each module.`,` `,(0,f.jsx)(`strong`,{children:`Custom Form`}),` — create standalone named forms (module + action) for context-specific flows such as quick-add or popup forms.`]})]}),(0,f.jsx)(Z,{styles:{body:{padding:`0 0`}},children:(0,f.jsx)(u.Tabs,{activeKey:v,onChange:y,items:K,size:`middle`,className:`fg-top-tabs`,tabBarStyle:{padding:`0 16px`,margin:0},destroyInactiveTabPane:!1})}),(0,f.jsx)(C_,{open:!!g,scope:`formGroups`,action:g?.action,title:g?.title,description:g?.description,confirmLabel:g?.confirmLabel,danger:g?.danger,onCancel:()=>_(null),onVerified:W})]})}var{Text:Q}=u.Typography,Y_,X_=new Map;function Z_(){return Y_||=_r().catch(e=>{throw Y_=void 0,e}),Y_}function Q_(e){return X_.has(e)||X_.set(e,vr(e).catch(t=>{throw X_.delete(e),t})),X_.get(e)}var $_={reset:{action:`reset`,title:`Reset all detail config`,confirmLabel:`Reset All`,danger:!0,description:`Clears every detail-view override for all modules in this workspace, so the detail view falls back to the plain form-group fields.`},save:{action:`save`,title:`Save current as default`,confirmLabel:`Save Default`,danger:!1,description:`Snapshots the current detail config for all modules as the saved default you can restore to later.`},restore:{action:`restore`,title:`Restore saved default`,confirmLabel:`Restore Default`,danger:!0,description:`Replaces the current detail config for all modules with the last saved default.`}},ev=[{label:`Default`,value:`default`},{label:`Title Case On`,value:`on`},{label:`Off (raw text)`,value:`off`}],tv=e=>e===!0?`on`:e===!1?`off`:`default`,nv=e=>e===`on`?!0:e===`off`?!1:void 0;function rv(e){let t=new Set,n=[];for(let r of e??[])for(let e of r.fields??[])!e.field||t.has(e.field)||(t.add(e.field),n.push({key:e.field,label:e.label??e.field,type:e.type??`text`,group:r.label??r.name,lookupDefaults:e.lookupCollection?{lookupCollection:e.lookupCollection,displayField:e.displayField??``,displayField2:e.displayField2??``,valueField:e.valueField||`_id`}:{}}));return n}function iv(e,t){if(!t)return null;let n={field:e};t.label&&(n.label=t.label),t.prefix&&(n.prefix=t.prefix),t.suffix&&(n.suffix=t.suffix),t.color&&(n.color=t.color),(t.capitalize===!0||t.capitalize===!1)&&(n.capitalize=t.capitalize),(t.hidden===!0||t.hidden===!1)&&(n.hidden=t.hidden);let r=t.renderType||(t.documentPreview?`document`:t.displayAs===`tag`?`tag`:t.displayAs===`text`?`text`:``);r&&r!==`auto`&&(n.renderType=r);let i={};for(let[e,n]of Object.entries(t.renderOptions??{}))n!==void 0&&n!==``&&n!==!1&&(i[e]=n);return Object.keys(i).length&&(n.renderOptions=i),t.lookupCollection&&(n.lookupCollection=t.lookupCollection,n.displayField=t.displayField||``,t.displayField2&&(n.displayField2=t.displayField2),n.valueField=t.valueField||`_id`),Object.keys(n).length>1?n:null}function av(e){return(e??[]).filter(e=>e.key&&(e.fields??[]).length).map(e=>{let t={key:e.key,label:e.label||e.key,fields:e.fields};return e.template&&(t.template=e.template),e.valueMaps&&Object.keys(e.valueMaps).length&&(t.valueMaps=e.valueMaps),e.separator&&(t.separator=e.separator),e.prefix&&(t.prefix=e.prefix),e.suffix&&(t.suffix=e.suffix),e.color&&(t.color=e.color),(e.capitalize===!0||e.capitalize===!1)&&(t.capitalize=e.capitalize),e.group&&(t.group=e.group),e.hideSources===!1&&(t.hideSources=!1),t})}function ov(e){return Number(e?.show??1)===0}function sv(e,t){let n=[];return{nextGroups:(e??[]).map(e=>{let r=!1,i=(e.fields??[]).map(e=>{let n=t[e.field];if(!n||n.hidden===void 0)return e;let i=+!n.hidden;return Number(e.show??1)===i?e:(r=!0,{...e,show:i})}),a=r?{...e,fields:i}:e;return r&&n.push(a),a}),changed:n}}function cv({value:e,onChange:t}){return(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`},children:[(0,f.jsx)(u.Input,{size:`small`,placeholder:`#0053a5`,value:e??``,onChange:e=>t(e.target.value),className:`fg-mono-input`,prefix:(0,f.jsx)(d.BgColorsOutlined,{style:{color:e||`#bbb`}})}),(0,f.jsx)(`input`,{type:`color`,value:/^#[0-9a-f]{6}$/i.test(e??``)?e:`#0053a5`,onChange:e=>t(e.target.value),style:{width:32,border:`1px solid #d9d9d9`,borderLeft:0,cursor:`pointer`,padding:0},"aria-label":`Pick colour`})]})}function lv({open:e,fieldMeta:t,value:n,onClose:r,onSave:i}){let[a,o]=(0,l.useState)(()=>({...n??{}})),[s,c]=(0,l.useState)([]),[p,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(`display`);(0,l.useEffect)(()=>{if(!e||h!==`lookup`)return;let t=!1;return Z_().then(e=>{t||c(e.map(e=>typeof e==`string`?e:e.name??e.value??``).filter(Boolean))}).catch(()=>{}),()=>{t=!0}},[h,e]),(0,l.useEffect)(()=>{if(!e||h!==`lookup`||!a.lookupCollection)return;let t=!1;return Q_(a.lookupCollection).then(e=>{t||m(e.map(e=>typeof e==`string`?e:e.value??e.field??e.label??``).filter(Boolean))}).catch(()=>{}),()=>{t=!0}},[h,e,a.lookupCollection]);let _=(e,t)=>o(n=>({...n,[e]:t})),v=e=>{m([]),o(t=>({...t,lookupCollection:e}))},y=s.map(e=>({value:e})),b=p.map(e=>({value:e})),x=a.renderOptions??{},S=(e,t)=>_(`renderOptions`,{...x,[e]:t||void 0}),C=a.renderType||(a.documentPreview?`document`:a.displayAs===`tag`?`tag`:a.displayAs===`text`?`text`:`auto`),w=[`tag`,`tags`,`chip`,`badge`].includes(C),T=[`text`,`tag`,`tags`,`chip`,`badge`,`link`,`email`,`phone`].includes(C);return(0,f.jsxs)(u.Modal,{open:e,onCancel:r,width:760,centered:!0,destroyOnClose:!0,maskClosable:!1,className:`fg-editor-modal detail-field-editor-modal`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.EditOutlined,{}),` `,t?.label,(0,f.jsx)(`code`,{className:`fg-field-key-hint`,style:{marginLeft:8},children:t?.key})]}),footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:r,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>i(a),children:`Apply`})]}),children:[(0,f.jsxs)(`div`,{className:`detail-editor-nav`,role:`tablist`,"aria-label":`Field settings`,children:[(0,f.jsx)(u.Button,{type:h===`display`?`primary`:`text`,onClick:()=>g(`display`),children:`Display`}),(0,f.jsx)(u.Button,{type:h===`lookup`?`primary`:`text`,onClick:()=>g(`lookup`),children:`Reference lookup`})]}),h===`display`&&(0,f.jsxs)(`div`,{className:`fg-form-section detail-editor-panel`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Display`}),(0,f.jsxs)(`div`,{style:{marginBottom:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Label override`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:t?.label,value:a.label??``,onChange:e=>_(`label`,e.target.value)})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Prefix`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. $`,value:a.prefix??``,onChange:e=>_(`prefix`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Suffix`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. yrs`,value:a.suffix??``,onChange:e=>_(`suffix`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Colour`}),(0,f.jsx)(cv,{value:a.color,onChange:e=>_(`color`,e)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Capitalize`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},options:ev,value:tv(a.capitalize),onChange:e=>_(`capitalize`,nv(e))})]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:14},children:[(0,f.jsx)(u.Switch,{size:`small`,checked:!!a.hidden,onChange:e=>_(`hidden`,e)}),(0,f.jsx)(Q,{style:{fontSize:13},children:`Hide this field in the detail view`})]}),(0,f.jsxs)(`div`,{style:{marginTop:14},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Render Type`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},value:C,onChange:e=>_(`renderType`,e),options:ia}),(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12,display:`block`,marginTop:4},children:`How this field is displayed in the detail view — entirely config-driven.`})]}),C===`document`&&(0,f.jsxs)(`div`,{style:{marginTop:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Document mode`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},value:x.documentMode||`preview`,onChange:e=>S(`documentMode`,e),options:aa})]}),T&&(0,f.jsxs)(`div`,{style:{marginTop:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Text transform`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},value:x.textTransform||`none`,onChange:e=>S(`textTransform`,e===`none`?void 0:e),options:oa})]}),w&&(0,f.jsxs)(`div`,{style:{marginTop:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Tag colour`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`geekblue / #0053a5`,value:x.tagColor??``,onChange:e=>S(`tagColor`,e.target.value),className:`fg-mono-input`})]}),C===`date`&&(0,f.jsxs)(`div`,{style:{marginTop:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Date format (dayjs tokens)`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`DD/MM/YYYY`,value:x.dateFormat??``,onChange:e=>S(`dateFormat`,e.target.value),className:`fg-mono-input`})]}),(C===`currency`||C===`budget`)&&(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Currency symbol`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`$ / ₹ / £`,value:x.currencySymbol??``,onChange:e=>S(`currencySymbol`,e.target.value)})]}),C===`budget`&&(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Unit (e.g. Monthly)`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`Monthly`,value:x.unit??``,onChange:e=>S(`unit`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:14},children:[(0,f.jsx)(u.Switch,{size:`small`,checked:!!x.showEmpty,onChange:e=>S(`showEmpty`,e)}),(0,f.jsx)(Q,{style:{fontSize:13},children:`Show empty values`})]})]}),h===`lookup`&&(0,f.jsxs)(`div`,{className:`fg-form-section detail-editor-panel`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Reference Lookup (id → name)`}),(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:12,display:`block`,marginBottom:8},children:[`For fields that store a foreign-key id. The detail API resolves the name from the target collection and returns `,(0,f.jsx)(`code`,{children:`{ id, value }`}),`.`]}),(0,f.jsxs)(`div`,{style:{marginBottom:10},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Collection`}),(0,f.jsx)(u.AutoComplete,{size:`small`,style:{width:`100%`},options:y,placeholder:`e.g. vendors`,value:a.lookupCollection??``,onChange:v,filterOption:(e,t)=>(t?.value??``).toLowerCase().includes(e.toLowerCase()),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Display Field`}),(0,f.jsx)(u.AutoComplete,{size:`small`,style:{width:`100%`},options:b,placeholder:`e.g. vendorCompanyName`,value:a.displayField??``,onChange:e=>_(`displayField`,e),filterOption:(e,t)=>(t?.value??``).toLowerCase().includes(e.toLowerCase()),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Display Field 2`}),(0,f.jsx)(u.AutoComplete,{size:`small`,style:{width:`100%`},options:b,placeholder:`e.g. lastName`,value:a.displayField2??``,onChange:e=>_(`displayField2`,e),filterOption:(e,t)=>(t?.value??``).toLowerCase().includes(e.toLowerCase()),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Value Field (FK)`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`_id`,value:a.valueField??``,onChange:e=>_(`valueField`,e.target.value),className:`fg-mono-input`})]})]})]})]})}function uv(e){let t=[];return Object.entries(e??{}).forEach(([e,n])=>{Object.entries(n??{}).forEach(([n,r])=>t.push({field:e,from:n,to:r}))}),t}function dv(e){let t={};for(let n of e??[])!n.field||!n.from||(t[n.field]={...t[n.field]??{},[n.from]:n.to??``});return t}function fv({open:e,merge:t,fieldOptions:n,groupOptions:r,onClose:i,onSave:a}){let[o,s]=(0,l.useState)(()=>({key:``,label:``,fields:[],separator:` - `,template:``,prefix:``,suffix:``,color:``,capitalize:void 0,group:``,hideSources:!0,...t??{},mapRows:uv(t?.valueMaps)})),c=(e,t)=>s(n=>({...n,[e]:t})),p=(e,t)=>s(n=>{let r=[...n.mapRows??[]];return r[e]={...r[e],...t},{...n,mapRows:r}}),m=e=>s(t=>({...t,mapRows:(t.mapRows??[]).filter((t,n)=>n!==e)}));return(0,f.jsx)(u.Modal,{open:e,onCancel:i,width:820,centered:!0,destroyOnClose:!0,maskClosable:!1,className:`fg-editor-modal`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.MergeCellsOutlined,{}),` `,t?`Edit Merged Field`:`New Merged Field`]}),footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:i,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>{if(!o.key?.trim())return u.message.error(`A merge key is required`);if(!/^[a-z0-9_]+$/.test(o.key))return u.message.error(`Key: lowercase letters, numbers, underscores only`);if(!(o.fields??[]).length)return u.message.error(`Pick at least one source field`);let{mapRows:e,...t}=o;a({...t,valueMaps:dv(e)})},children:`Apply`})]}),children:(0,f.jsxs)(`div`,{className:`fg-form-section`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Merged Field`}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Key`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`experience_range`,value:o.key??``,onChange:e=>c(`key`,e.target.value),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Label`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`Experience`,value:o.label??``,onChange:e=>c(`label`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{style:{margin:`12px 0`},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Source fields (combined in order)`}),(0,f.jsx)(u.Select,{mode:`multiple`,size:`small`,style:{width:`100%`},placeholder:`Pick fields to combine`,options:n,value:o.fields??[],onChange:e=>c(`fields`,e),optionFilterProp:`label`})]}),(0,f.jsxs)(`div`,{style:{margin:`12px 0`},children:[(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:12},children:[`Template `,(0,f.jsx)(`span`,{style:{color:`#94a3b8`},children:`(optional — overrides separator)`})]}),(0,f.jsx)(u.Input.TextArea,{rows:2,value:o.template??``,onChange:e=>c(`template`,e.target.value),placeholder:`{clientBudgetStart} - {clientBudgetEnd} {clientBudgetCurrency}/{clientBudgetUnit}`,className:`fg-mono-input`}),(o.fields??[]).length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4,marginTop:6},children:(o.fields??[]).map(e=>(0,f.jsxs)(u.Tag,{color:`blue`,style:{cursor:`pointer`,margin:0},onClick:()=>c(`template`,`${o.template??``}{${e}}`),children:[`+ `,`{${e}}`]},e))}),(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:11,display:`block`,marginTop:4},children:[`Click a chip to insert a field. Everything else (spaces, “/”, “-”) is kept literally. Result e.g. `,(0,f.jsx)(`code`,{children:`60 - 80 $/Monthly`}),`.`]})]}),(0,f.jsxs)(`div`,{style:{margin:`12px 0`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Value mappings (raw → display)`}),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),disabled:!(o.fields??[]).length,onClick:()=>s(e=>({...e,mapRows:[...e.mapRows??[],{field:e.fields?.[0]??``,from:``,to:``}]})),children:`Add`})]}),(o.mapRows??[]).map((e,t)=>(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,marginTop:6,alignItems:`center`},children:[(0,f.jsx)(u.Select,{size:`small`,style:{flex:1.4},placeholder:`field`,value:e.field||void 0,options:(o.fields??[]).map(e=>({value:e,label:e})),onChange:e=>p(t,{field:e})}),(0,f.jsx)(u.Input,{size:`small`,style:{flex:1},placeholder:`Monthly`,value:e.from,onChange:e=>p(t,{from:e.target.value})}),(0,f.jsx)(`span`,{style:{color:`#94a3b8`},children:`→`}),(0,f.jsx)(u.Input,{size:`small`,style:{flex:1},placeholder:`mon`,value:e.to,onChange:e=>p(t,{to:e.target.value})}),(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),onClick:()=>m(t)})]},t)),!(o.mapRows??[]).length&&(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:11,display:`block`,marginTop:4},children:`e.g. Monthly → mon, Daily → day, Yearly → yr. Unmapped values stay as-is.`})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:12},children:[`Separator `,(0,f.jsx)(`span`,{style:{color:`#94a3b8`},children:`(used when no template)`})]}),(0,f.jsx)(u.Input,{size:`small`,placeholder:` - `,value:o.separator??``,onChange:e=>c(`separator`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Place in group`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},allowClear:!0,placeholder:`(first source's group)`,options:r,value:o.group||void 0,onChange:e=>c(`group`,e??``)})]})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Prefix`}),(0,f.jsx)(u.Input,{size:`small`,value:o.prefix??``,onChange:e=>c(`prefix`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Suffix`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`yrs`,value:o.suffix??``,onChange:e=>c(`suffix`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Colour`}),(0,f.jsx)(cv,{value:o.color,onChange:e=>c(`color`,e)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Capitalize`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},options:ev,value:tv(o.capitalize),onChange:e=>c(`capitalize`,nv(e))})]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:14},children:[(0,f.jsx)(u.Switch,{size:`small`,checked:o.hideSources!==!1,onChange:e=>c(`hideSources`,e)}),(0,f.jsx)(Q,{style:{fontSize:13},children:`Hide the source fields after merging`})]})]})})}function pv({open:e,module:t,onClose:n}){let[r,i]=(0,l.useState)(``),[a,o]=(0,l.useState)([]),[s,c]=(0,l.useState)(!1),[p,m]=(0,l.useState)(``),h=async()=>{if(!r.trim())return u.message.warning(`Enter a record _id to preview`);c(!0),m(``);try{let[e]=await Promise.all([Yn(t,r.trim()),ra()]);o(e),e.length||m(`No groups returned — check the id and module.`)}catch(e){m(e?.message||`Failed to load preview`)}finally{c(!1)}};return(0,f.jsxs)(u.Drawer,{open:e,onClose:n,width:520,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.EyeOutlined,{}),` Detail Preview — `,t]}),classNames:{header:`fg-drawer-header`,body:`fg-drawer-body`},children:[(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`,marginBottom:14},children:[(0,f.jsx)(u.Input,{placeholder:`Paste a record _id (24-char ObjectId)`,value:r,onChange:e=>i(e.target.value),onPressEnter:h,className:`fg-mono-input`}),(0,f.jsx)(u.Button,{type:`primary`,loading:s,onClick:h,children:`Load`})]}),p&&(0,f.jsx)(u.Alert,{type:`warning`,showIcon:!0,message:p,style:{marginBottom:12}}),(0,f.jsxs)(u.Spin,{spinning:s,children:[a.map(e=>(0,f.jsxs)(`div`,{style:{marginBottom:18},children:[(0,f.jsx)(Q,{strong:!0,style:{display:`block`,marginBottom:8},children:e.label??e.name}),(e.fields??[]).filter(e=>e.show===void 0||e.show===1).map(e=>(0,f.jsxs)(`div`,{style:{display:`flex`,gap:10,padding:`4px 0`,borderBottom:`1px dashed #eee`},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12,width:150,flexShrink:0},children:e.label}),(0,f.jsx)(ip,{field:e})]},e.field))]},e.id??e.name)),!s&&!a.length&&!p&&(0,f.jsx)(u.Empty,{description:`Load a record to preview its detail view.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE})]})]})}function mv(e){let t={};return[`s3BaseUrl`,`dateFormat`,`booleanTrueLabel`,`booleanFalseLabel`,`emptyPlaceholder`,`separator`].forEach(n=>{e?.[n]!==void 0&&e?.[n]!==``&&(t[n]=e[n])}),Array.isArray(e?.documentNameOrder)&&e.documentNameOrder.length&&(t.documentNameOrder=e.documentNameOrder),t}function hv({open:e,onClose:t}){let[n,r]=(0,l.useState)(()=>({...ea()})),[i,a]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(!e)return;let t=!1;return Un().then(e=>{t||r(t=>({...t,...mv(e)}))}).catch(()=>{}),()=>{t=!0}},[e]);let o=(e,t)=>r(n=>({...n,[e]:t})),s=async()=>{a(!0);try{let e={s3BaseUrl:(n.s3BaseUrl??``).trim(),dateFormat:(n.dateFormat??``).trim(),booleanTrueLabel:n.booleanTrueLabel??``,booleanFalseLabel:n.booleanFalseLabel??``,emptyPlaceholder:n.emptyPlaceholder??``,separator:n.separator??``,documentNameOrder:Array.isArray(n.documentNameOrder)?n.documentNameOrder:[]};await Wn(e),na(e),u.message.success(`Display defaults saved`),t()}catch(e){u.message.error(e?.message||`Could not save defaults`)}finally{a(!1)}},c={fontSize:12,display:`block`,marginBottom:4};return(0,f.jsxs)(u.Drawer,{open:e,onClose:t,width:460,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.SettingOutlined,{}),` Display Defaults`]}),classNames:{header:`fg-drawer-header`,body:`fg-drawer-body`},footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:()=>r({...Zi}),children:`Reset to built-in`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:i,onClick:s,children:`Save Defaults`})]}),children:[(0,f.jsxs)(`div`,{className:`fg-form-section`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Documents / Files`}),(0,f.jsxs)(`div`,{style:{marginBottom:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`S3 Base URL`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:Zi.s3BaseUrl,value:n.s3BaseUrl??``,onChange:e=>o(`s3BaseUrl`,e.target.value),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Document name priority (first match wins)`}),(0,f.jsx)(u.Select,{mode:`tags`,size:`small`,style:{width:`100%`},placeholder:`name, documentName, uploadedFileName…`,value:n.documentNameOrder??[],onChange:e=>o(`documentNameOrder`,e)})]})]}),(0,f.jsxs)(`div`,{className:`fg-form-section`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Value Formatting`}),(0,f.jsxs)(`div`,{style:{marginBottom:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Date format (dayjs tokens)`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`DD MMM YYYY`,value:n.dateFormat??``,onChange:e=>o(`dateFormat`,e.target.value),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Boolean — true`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`Yes`,value:n.booleanTrueLabel??``,onChange:e=>o(`booleanTrueLabel`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Boolean — false`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`No`,value:n.booleanFalseLabel??``,onChange:e=>o(`booleanFalseLabel`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Empty placeholder`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`-`,value:n.emptyPlaceholder??``,onChange:e=>o(`emptyPlaceholder`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Object / array separator`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:` - `,value:n.separator??``,onChange:e=>o(`separator`,e.target.value)})]})]})]})]})}function gv(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)([]),[m,h]=(0,l.useState)([]),[g,_]=(0,l.useState)({}),[v,y]=(0,l.useState)([]),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)(``),[w,T]=(0,l.useState)(!1),[E,D]=(0,l.useState)(null),[O,k]=(0,l.useState)(null),[A,j]=(0,l.useState)(!1),[M,N]=(0,l.useState)(!1),[P,F]=(0,l.useState)(null),[I,L]=(0,l.useState)(0),[R,z]=(0,l.useState)(``);function B(e){F($_[e])}function V(){F(null),L(e=>e+1)}(0,l.useEffect)(()=>{Tn().then(e=>{t(e),e.length&&a(e[0].key)}).catch(()=>t([])).finally(()=>r(!1))},[]),(0,l.useEffect)(()=>{if(!i)return;let e=!1;return(async()=>{x(!0),C(``);try{let[t,n]=await Promise.all([jn(i),Bn(i)]);if(e)return;s(t??[]),p(rv(t)),h((t??[]).map(e=>({value:e.name,label:e.label??e.name})));let r={};(n.fields??[]).forEach(e=>{r[e.field]=e}),_(r),y(n.merges??[])}catch(t){e||C(t?.message||`Failed to load configuration`)}finally{e||x(!1)}})(),()=>{e=!0}},[i,I]);let H=(0,l.useMemo)(()=>c.map(e=>({value:e.key,label:`${e.label} (${e.key})`})),[c]);async function U(){T(!0);try{let e=Object.entries(g).map(([e,t])=>iv(e,t)).filter(Boolean),{nextGroups:t,changed:n}=sv(o,g);await Vn({module:i,fields:e,merges:av(v)}),n.length&&(s(t),p(rv(t)),h(t.map(e=>({value:e.name,label:e.label??e.name})))),u.message.success(`Detail view configuration saved`)}catch(e){u.message.error(e?.message||`Could not save configuration`)}finally{T(!1)}}function W(e){_(t=>({...t,[E.key]:{...e,field:E.key}})),D(null)}function G(e){_(t=>{let n={...t};return delete n[e],n})}function K(e){y(t=>{let n=[...t];return O.index===null?n.push(e):n[O.index]=e,n}),k(null)}function q(e,t){_(n=>{let r=n[e]??{field:e};return{...n,[e]:{...r,hidden:t}}})}let ee=e=>{if(!e)return null;let t=[];e.label&&t.push((0,f.jsx)(u.Tag,{color:`blue`,children:`label`},`l`)),(e.prefix||e.suffix)&&t.push((0,f.jsx)(u.Tag,{color:`geekblue`,children:`±fix`},`ps`)),e.color&&t.push((0,f.jsx)(u.Tag,{color:e.color,children:`colour`},`c`)),e.capitalize===!0&&t.push((0,f.jsx)(u.Tag,{color:`purple`,children:`Title`},`cap`)),e.capitalize===!1&&t.push((0,f.jsx)(u.Tag,{color:`default`,children:`raw`},`cap`)),e.lookupCollection&&t.push((0,f.jsxs)(u.Tag,{color:`volcano`,children:[`lookup: `,e.lookupCollection]},`lk`));let n=e.renderType||(e.documentPreview?`document`:e.displayAs);return n&&n!==`auto`&&t.push((0,f.jsx)(u.Tag,{color:`cyan`,children:n},`rt`)),t.length?t:(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`—`})},te=[{title:`Group`,dataIndex:`label`,key:`label`,render:(e,t)=>(0,f.jsx)(Q,{strong:!0,style:{color:`var(--color-text-heading)`},children:e??t.name})},{title:`Key`,dataIndex:`name`,key:`name`,render:e=>(0,f.jsx)(`code`,{className:`fg-table-code`,children:e})},{title:`Order`,dataIndex:`order`,key:`order`,width:72,align:`center`,render:e=>(0,f.jsx)(`span`,{className:`fg-order-cell`,children:e??0})},{title:`Fields`,dataIndex:`fields`,key:`fields`,width:76,align:`center`,render:e=>(0,f.jsx)(u.Badge,{count:e?.length??0,showZero:!0,color:`var(--color-brand)`})},{title:`Customized`,key:`cust`,width:100,align:`center`,render:(e,t)=>{let n=(t.fields??[]).filter(e=>g[e.field]).length;return n?(0,f.jsx)(u.Tag,{color:`blue`,style:{margin:0},children:n}):(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`—`})}}],ne=e=>{let t=e.fields??[];return t.length?(0,f.jsx)(`div`,{className:`fg-expanded-fields`,children:t.map(t=>{let n=g[t.field],r=n?.hidden??ov(t),i={key:t.field,label:t.label??t.field,type:t.type??`text`,group:e.label??e.name,lookupDefaults:t.lookupCollection?{lookupCollection:t.lookupCollection,displayField:t.displayField??``,displayField2:t.displayField2??``,valueField:t.valueField||`_id`}:{}};return(0,f.jsxs)(`div`,{className:`fg-field-row`,children:[(0,f.jsxs)(`div`,{className:`fg-field-row-info`,children:[(0,f.jsx)(`span`,{className:`fg-field-row-label`,children:n?.label||t.label}),(0,f.jsx)(`span`,{className:`fg-field-row-key`,children:t.field}),(0,f.jsxs)(`span`,{className:`fg-field-row-type`,children:[`(`,t.type,`)`]})]}),(0,f.jsx)(`div`,{className:`fg-field-row-flags`,children:ee(n)}),(0,f.jsxs)(u.Space,{size:4,style:{marginLeft:`auto`},children:[(0,f.jsx)(u.Tooltip,{title:r?`Hidden in form and detail view`:`Visible`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Hide`,unCheckedChildren:`Show`,checked:r,onChange:e=>q(t.field,e)})}),(0,f.jsx)(u.Tooltip,{title:`Customize field`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>D(i)})}),n&&(0,f.jsx)(u.Tooltip,{title:`Reset to default`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:()=>G(t.field)})})]})]},t.field)})}):(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`No fields in this group.`})},re=(0,l.useMemo)(()=>{let e=R.trim().toLowerCase();return[...o].filter(t=>!e||[t.label,t.name,...(t.fields??[]).flatMap(e=>[e.label,e.field,e.type])].some(t=>String(t??``).toLowerCase().includes(e))).sort((e,t)=>(e.order??0)-(t.order??0))},[o,R]),ie=[{title:`Label`,dataIndex:`label`,key:`label`,render:(e,t)=>(0,f.jsxs)(`span`,{children:[(0,f.jsx)(Q,{strong:!0,children:e||t.key}),(0,f.jsx)(`span`,{className:`fg-field-key-hint`,children:t.key})]})},{title:`Fields`,dataIndex:`fields`,key:`fields`,render:e=>(0,f.jsx)(u.Space,{size:4,wrap:!0,children:(e??[]).map(e=>(0,f.jsx)(u.Tag,{children:e},e))})},{title:`Format`,key:`sep`,width:220,render:(e,t)=>(0,f.jsx)(`code`,{className:`fg-table-code`,children:t.template?.trim()?t.template:`join: ${t.separator||` - `}`})},{title:``,key:`actions`,width:90,align:`right`,render:(e,t,n)=>(0,f.jsxs)(u.Space,{size:4,children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>k({index:n,merge:t})})}),(0,f.jsx)(u.Tooltip,{title:`Delete`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),onClick:()=>y(e=>e.filter((e,t)=>t!==n))})})]})}],ae=e.map(e=>({key:e.key,label:e.label}));return(0,f.jsxs)(`div`,{className:`fg-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.BgColorsOutlined,{}),title:`Detail Groups`,extra:(0,f.jsxs)(u.Space,{size:8,wrap:!0,children:[(0,f.jsx)(u.Dropdown,{trigger:[`click`],menu:{items:[{key:`save`,label:`Save current as default`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>B(`save`)},{key:`restore`,label:`Restore saved default`,icon:(0,f.jsx)(d.CloudDownloadOutlined,{}),onClick:()=>B(`restore`)},{type:`divider`},{key:`reset`,label:`Reset all detail settings`,icon:(0,f.jsx)(d.ReloadOutlined,{}),danger:!0,onClick:()=>B(`reset`)}]},children:(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.MoreOutlined,{}),children:`Workspace defaults`})}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.SettingOutlined,{}),onClick:()=>N(!0),children:`Display Defaults`}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.EyeOutlined,{}),disabled:!i,onClick:()=>j(!0),children:`Preview`}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:w,disabled:!i,onClick:U,children:`Save Configuration`})]}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:13},children:`Customize how each module's detail view renders: per-field label, prefix/suffix, colour, capitalization, hide, reference lookups (id → name), and merged display fields. Applied on top of Form Groups — the add/edit forms are unaffected.`})]}),(0,f.jsx)(Z,{styles:{body:{paddingTop:8}},children:(0,f.jsxs)(u.Spin,{spinning:n,children:[(0,f.jsx)(u.Tabs,{activeKey:i,onChange:a,items:ae.map(e=>({...e,children:null})),className:`admin-module-tabs`}),S&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:S,style:{marginBottom:12}}),(0,f.jsxs)(u.Spin,{spinning:b,children:[(0,f.jsxs)(`div`,{className:`admin-config-table-tools`,children:[(0,f.jsx)(u.Input,{allowClear:!0,prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search groups or fields`,value:R,onChange:e=>z(e.target.value)}),(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:12},children:[o.length,` groups · `,c.length,` fields`]})]}),(0,f.jsx)(u.Table,{rowKey:e=>e.id??e.name,dataSource:re,columns:te,pagination:!1,size:`small`,className:`fg-table`,expandable:{expandedRowRender:ne,rowExpandable:()=>!0},locale:{emptyText:(0,f.jsx)(u.Empty,{description:`Select a module to see its groups and fields.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE})}}),(0,f.jsxs)(`div`,{style:{margin:`20px 0 8px`,display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,f.jsxs)(Q,{strong:!0,children:[(0,f.jsx)(d.MergeCellsOutlined,{}),` Merged Fields`]}),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),disabled:!i,onClick:()=>k({index:null,merge:null}),children:`Add Merge`})]}),(0,f.jsx)(u.Table,{rowKey:`key`,dataSource:v,columns:ie,pagination:!1,size:`small`,className:`fg-table`,locale:{emptyText:(0,f.jsx)(u.Empty,{description:`No merged fields. Combine e.g. 'from' + 'to' into one.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE})}})]})]})}),(0,f.jsx)(lv,{open:!!E,fieldMeta:E,value:E?{...E.lookupDefaults,...g[E.key]??{}}:null,onClose:()=>D(null),onSave:W},E?.key??`field-closed`),(0,f.jsx)(fv,{open:!!O,merge:O?.merge,fieldOptions:H,groupOptions:m,onClose:()=>k(null),onSave:K},O?`merge-${O.index??`new`}`:`merge-closed`),(0,f.jsx)(hv,{open:M,onClose:()=>N(!1)}),(0,f.jsx)(pv,{open:A,module:i,onClose:()=>j(!1)}),(0,f.jsx)(C_,{open:!!P,scope:`detailConfig`,action:P?.action,title:P?.title,description:P?.description,confirmLabel:P?.confirmLabel,danger:P?.danger,onCancel:()=>F(null),onVerified:V})]})}var _v=`/admin/email-templates`,vv=`/email-templates`;function yv(e){return e?.data??e}async function bv({offset:e=0,limit:t=20,search:n=``,module:r=``,action:i=``,active:a}={}){let o=new URLSearchParams({offset:String(e),limit:String(t)});n&&o.set(`search`,n),r&&o.set(`module`,r),i&&o.set(`action`,i),a!==void 0&&o.set(`active`,String(a));let s=yv(await J(E,`${_v}?${o}`))??{};return{items:Array.isArray(s.items)?s.items:[],totalCount:Number(s.totalCount??0)}}async function xv(e){return yv(await J(E,`${_v}/${encodeURIComponent(e)}`))}async function Sv(e){return J(E,_v,{method:`POST`,body:JSON.stringify(e)})}async function Cv(e,t){return J(E,`${_v}/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)})}async function wv(e){return J(E,`${_v}/${encodeURIComponent(e)}`,{method:`DELETE`})}async function Tv({module:e=``,action:t=``}={}){let n=new URLSearchParams;e&&n.set(`module`,e),t&&n.set(`action`,t);let r=yv(await J(E,`${vv}${n.toString()?`?${n}`:``}`));return Array.isArray(r)?r:[]}async function Ev(e){return yv(await J(E,`${vv}/${encodeURIComponent(e)}`))}async function Dv({offset:e=0,limit:t=20,search:n=``}={}){let r=yv(await J(E,`/signature/homePage?${new URLSearchParams({offset:String(e),limit:String(t),sortBy:`new`,searchValue:n})}`))??{},i=Array.isArray(r.data)?r.data.map(e=>({...e,isActive:e.isActive??e.status??!1})):[];return{items:i,totalCount:Number(r.totalCount??i.length)}}async function Ov(e){return yv(await J(E,`/signature/editPreview?signatureId=${encodeURIComponent(e)}`))}async function kv(e){return J(E,`/signature/add`,{method:`POST`,body:JSON.stringify(e)})}async function Av(e){return J(E,`/signature/edit`,{method:`PUT`,body:JSON.stringify(e)})}async function jv(e){return J(E,`/signature/delete?signatureId=${encodeURIComponent(e)}`,{method:`DELETE`})}async function Mv(e,t){return J(E,`/signature/statusUpdate?signatureId=${encodeURIComponent(e)}&status=${t}`,{method:`PUT`})}var Nv={reset:{action:`reset`,title:`Reset all row actions`,confirmLabel:`Reset All`,danger:!0,description:`This clears every configured row action for every module in this workspace. Actions have no built-in defaults, so this leaves every module with no actions until reconfigured.`},save:{action:`save`,title:`Save current as default`,confirmLabel:`Save Default`,danger:!1,description:`Snapshots the current row actions for all modules and roles as the saved default you can restore to later.`},restore:{action:`restore`,title:`Restore saved default`,confirmLabel:`Restore Default`,danger:!0,description:`Replaces the current row actions for all modules and roles with the last saved default.`}},{Text:Pv}=u.Typography,Fv=[{value:`delete`,label:`delete (trash)`},{value:`edit`,label:`edit (pencil)`},{value:`mail`,label:`mail (envelope)`},{value:`shareAlt`,label:`shareAlt (share)`},{value:`swap`,label:`swap (arrows)`},{value:`thunderbolt`,label:`thunderbolt (lightning)`},{value:`userAdd`,label:`userAdd (add user)`},{value:`userSwitch`,label:`userSwitch (switch user)`}],Iv=[{value:`navigate`,label:`Navigate (open page)`},{value:`modal`,label:`Modal (open popup)`},{value:`api`,label:`API (call endpoint)`},{value:`copy`,label:`Copy (clipboard)`},{value:`document`,label:`Document (open viewer)`},{value:`group`,label:`Group (submenu of child actions)`}],Lv=[`GET`,`POST`,`PUT`,`DELETE`],Rv=[`quick-submit`,`add-notes`,`mail`,`change-status`,`tag-to-job`,`add-to-groups`,`self-assign`,`others-assign`,`delete`,`vendor-share`,`sticky-notes`,`move-to-onboarding`,`approve-rate`,`reject`],zv={key:``,label:``,icon:``,actionType:`navigate`,routeTemplate:``,apiMethod:`POST`,apiPath:``,popupKey:``,popupStateText:``,copyField:``,documentField:``,allowedTabs:[],permission:``,permissionKey:``,allowMultiple:!1,danger:!1,showInList:!0,showInDetail:!1,detailPlacement:`more`};function Bv(){return`action_${Date.now()}`}function Vv({open:e,initial:t,isChild:n,popupForms:r,templateOptions:i,onClose:a,onSave:o}){let[s]=u.Form.useForm(),c=u.Form.useWatch(`actionType`,s)??`navigate`,p=u.Form.useWatch(`showInDetail`,s)??!1,m=u.Form.useWatch(`popupKey`,s)??``;(0,l.useEffect)(()=>{e&&s.setFieldsValue({...zv,...t,popupStateText:t?.popupState?JSON.stringify(t.popupState,null,2):``})},[e,t,s]);let h=async()=>{let e=await s.validateFields(),t;if(e.popupStateText?.trim())try{t=JSON.parse(e.popupStateText)}catch{s.setFields([{name:`popupStateText`,errors:[`Enter valid JSON`]}]);return}let n={...e};delete n.popupStateText,(n.actionType!==`modal`||![`mail`,`vendor-share`].includes(n.popupKey))&&delete n.defaultTemplateId,o({...n,...t?{popupState:t}:{popupState:void 0}})},g=[...Rv.map(e=>({value:e,label:`${e} (built-in)`})),...r.map(e=>({value:e.action,label:`${e.label} (${e.action})`}))].filter((e,t,n)=>n.findIndex(t=>t.value===e.value)===t);return(0,f.jsx)(u.Modal,{title:`${t?.key?`Edit`:`Add`}${n?` Child`:``} Action`,width:720,open:e,onCancel:a,onOk:h,okText:`Save Action`,okButtonProps:{icon:(0,f.jsx)(d.SaveOutlined,{})},className:`fg-editor-modal action-editor-modal`,children:(0,f.jsxs)(u.Form,{form:s,layout:`vertical`,initialValues:zv,className:`action-editor-form`,children:[(0,f.jsx)(`div`,{className:`action-editor-intro`,children:`Choose what the action does, then decide where it appears and who can use it.`}),(0,f.jsxs)(`div`,{className:`action-editor-grid`,children:[(0,f.jsx)(u.Form.Item,{name:`key`,label:`Key`,rules:[{required:!0,message:`Key is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. sourceCandidates`})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Label`,rules:[{required:!0,message:`Label is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. Source Candidates`})}),(0,f.jsx)(u.Form.Item,{name:`icon`,label:`Icon`,rules:[{required:!1,message:`Icon is required`}],children:(0,f.jsx)(u.Select,{options:Fv,placeholder:`Select icon`,allowClear:!0})}),(0,f.jsx)(u.Form.Item,{name:`actionType`,label:`Action Type`,rules:[{required:!0}],children:(0,f.jsx)(u.Select,{options:Iv})})]}),c===`group`&&(0,f.jsx)(u.Alert,{type:`info`,showIcon:!0,message:`Group actions don't run anything themselves.`,description:`This action renders as a submenu. Save it, then use "Add Child Action" on its row to configure what appears inside (e.g. Tag To Job, Send Mail, Add Notes).`,style:{marginBottom:16}}),c!==`group`&&(0,f.jsx)(`div`,{className:`action-editor-section-title`,children:`Behaviour`}),c===`navigate`&&(0,f.jsx)(u.Form.Item,{name:`routeTemplate`,label:`Route Template`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. /app/jobs/edit/:_id`})}),c===`modal`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Form.Item,{name:`popupKey`,label:`Popup`,rules:[{required:!0,message:`Select a popup`}],tooltip:`Admin popup forms and built-in popup integrations are listed together.`,children:(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,options:g,placeholder:`Select popup form`})}),(0,f.jsx)(u.Form.Item,{name:`popupStateText`,label:`Popup Context (JSON, optional)`,tooltip:`Static context passed to the popup, for example {"notesfor":"candidate"}`,children:(0,f.jsx)(u.Input.TextArea,{rows:4,placeholder:`{"notesfor":"candidate"}`})}),(0,f.jsxs)(u.Space.Compact,{block:!0,children:[(0,f.jsx)(u.Form.Item,{name:`apiMethod`,label:`Submit Method`,style:{width:150},children:(0,f.jsx)(u.Select,{options:Lv.map(e=>({value:e,label:e}))})}),(0,f.jsx)(u.Form.Item,{name:`apiPath`,label:`Submit API (optional)`,style:{flex:1},tooltip:`Leave empty to use the built-in handler for the selected popup key.`,children:(0,f.jsx)(u.Input,{placeholder:`e.g. /module-data-update`})})]})]}),c===`modal`&&[`mail`,`vendor-share`].includes(m)&&(0,f.jsx)(u.Form.Item,{name:`defaultTemplateId`,label:`Default Email Template`,tooltip:`This template is selected and loaded automatically whenever this action opens the mail composer.`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,options:i,placeholder:`No default — user selects in composer`})}),c===`api`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Form.Item,{name:`apiMethod`,label:`API Method`,children:(0,f.jsx)(u.Select,{options:Lv.map(e=>({value:e,label:e}))})}),(0,f.jsx)(u.Form.Item,{name:`apiPath`,label:`API Path`,children:(0,f.jsx)(u.Input,{placeholder:`e.g. /jobs/:_id`})})]}),c===`copy`&&(0,f.jsx)(u.Form.Item,{name:`copyField`,label:`Record Field to Copy`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. email or applicantRefrenceId`})}),c===`document`&&(0,f.jsx)(u.Form.Item,{name:`documentField`,label:`Document Field`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. resume or attachment`})}),(0,f.jsx)(`div`,{className:`action-editor-section-title`,children:`Availability and access`}),(0,f.jsx)(u.Form.Item,{name:`allowedTabs`,label:`Allowed Tabs (optional)`,tooltip:`Leave empty to show on every tab.`,children:(0,f.jsx)(u.Select,{mode:`tags`,tokenSeparators:[`,`],placeholder:`e.g. allJobs`})}),(0,f.jsx)(u.Form.Item,{name:`permission`,label:`Role Permission (optional)`,children:(0,f.jsx)(u.Input,{placeholder:`e.g. job.edit`})}),(0,f.jsx)(u.Form.Item,{name:`permissionKey`,label:`Permission Key (row-level gate)`,tooltip:`Maps to record.actionPermission.<key>. Leave blank to always show.`,children:(0,f.jsx)(u.Input,{placeholder:`e.g. edit, sourceCandidates, sharePermission`})}),(0,f.jsxs)(`div`,{className:`action-toggle-grid`,children:[(0,f.jsx)(u.Form.Item,{name:`allowMultiple`,label:`Multiple Records`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})}),(0,f.jsx)(u.Form.Item,{name:`danger`,label:`Danger`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})}),(0,f.jsx)(u.Form.Item,{name:`showInList`,label:`Show in List`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})}),(0,f.jsx)(u.Form.Item,{name:`showInDetail`,label:`Show in Detail`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})})]}),p&&(0,f.jsx)(u.Form.Item,{name:`detailPlacement`,label:`Detail Placement`,children:(0,f.jsx)(u.Select,{options:[{value:`primary`,label:`Primary button`},{value:`more`,label:`More actions menu`}]})})]})})}function Hv(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)(0),[c,p]=(0,l.useState)([]),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)(!1),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)(!1),[w,T]=(0,l.useState)(null),[E,D]=(0,l.useState)(!1),[O,k]=(0,l.useState)(null),[A,j]=(0,l.useState)([]),[M,N]=(0,l.useState)([]),[P,F]=(0,l.useState)(null),[I,L]=(0,l.useState)(``);(0,l.useEffect)(()=>{Promise.all([Tn(),Qn()]).then(([e,{roles:n}])=>{let i=Array.isArray(e)?e.map(e=>e.module??e.key??e.value??e):[],o=[...new Set(i.filter(Boolean))];t(o),a(e=>e||o[0]||``),r(n??[])}).catch(()=>{t([])})},[]);let R=(0,l.useCallback)(async()=>{if(i){x(!0),T(null),p([]);try{p(await Rr(i))}catch(e){T(e.message)}finally{x(!1)}}},[i]);(0,l.useEffect)(()=>{R()},[R]),(0,l.useEffect)(()=>{Promise.all([Nr(i,`popup`).catch(()=>[]),Tv({module:i}).catch(()=>[])]).then(([e,t])=>{j(e),N(t.map(e=>({value:e._id??e.id,label:`${e.name} · ${e.action}`})))})},[i]),(0,l.useEffect)(()=>{let e=c.find(e=>e.roleId===o);h(e??null),_(e?e.rowActions??[]:[]),y(!1)},[o,c]);let z=async()=>{C(!0);try{if(m)await Br(m.id??m._id,g),p(e=>e.map(e=>(e.id??e._id)===(m.id??m._id)?{...e,rowActions:g}:e)),u.message.success(`Config saved`);else{let e=await zr({module:i,roleId:o,rowActions:g}),t=e?.data??e;h(t),p(e=>[...e,t]),u.message.success(`Config created`)}y(!1)}catch(e){u.message.error(e.message)}finally{C(!1)}},B=async()=>{if(m)try{await Vr(m.id??m._id),u.message.success(`Config deleted`),await R()}catch(e){u.message.error(e.message)}},[V,H]=(0,l.useState)(null),U=(e=null)=>{H(e),k(null),D(!0)},W=(e,t=null)=>{H(t),k(e),D(!0)},G=e=>{_(V?t=>t.map(t=>{if(t.key!==V)return t;let n=t.children??[],r=O?n.map(t=>t.key===O.key?{...t,...e}:t):[...n,{...zv,...e,_localKey:Bv()}];return{...t,children:r}}):O?t=>t.map(t=>t.key===O.key?{...t,...e}:t):t=>[...t,{...zv,...e,_localKey:Bv()}]),y(!0),D(!1)},K=(e,t=null)=>{_(t?n=>n.map(n=>n.key===t?{...n,children:(n.children??[]).filter(t=>t.key!==e)}:n):t=>t.filter(t=>t.key!==e)),y(!0)},q=(e,t)=>{_(n=>{let r=[...n],i=e+t;return i<0||i>=r.length?n:([r[e],r[i]]=[r[i],r[e]],r)}),y(!0)};function ee(e){F(Nv[e])}function te(){F(null),R()}let ne=(0,l.useMemo)(()=>[{value:0,label:`All Roles (default)`},...n.map(e=>({value:e.roleId,label:e.roleName}))],[n]),re=(0,l.useMemo)(()=>{let e=I.trim().toLowerCase();return e?g.filter(t=>[t.label,t.key,t.actionType,t.popupKey,t.routeTemplate,t.apiPath,t.permissionKey].some(t=>String(t??``).toLowerCase().includes(e))):g},[g,I]),ie=[{title:`Order`,key:`order`,width:76,render:(e,t)=>(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{size:`small`,type:`text`,disabled:t._actionIndex===0,onClick:()=>q(t._actionIndex,-1),children:`↑`}),(0,f.jsx)(u.Button,{size:`small`,type:`text`,disabled:t._actionIndex===g.length-1,onClick:()=>q(t._actionIndex,1),children:`↓`})]})},{title:`Action`,key:`identity`,width:210,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(Pv,{strong:!0,children:t.label||t.key}),(0,f.jsx)(Pv,{type:`secondary`,code:!0,children:t.key})]})},{title:`Behaviour`,key:`destination`,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(u.Tag,{color:`blue`,children:t.actionType}),(0,f.jsx)(Pv,{type:`secondary`,ellipsis:{tooltip:!0},children:t.actionType===`group`?`${(t.children??[]).length} child action${(t.children??[]).length===1?``:`s`}`:t.popupKey||t.routeTemplate||t.apiPath||t.copyField||t.documentField||`No destination`})]})},{title:`Visible in`,key:`visibility`,width:210,render:(e,t)=>(0,f.jsxs)(u.Space,{size:[4,4],wrap:!0,children:[t.showInList&&(0,f.jsx)(u.Tag,{color:`green`,children:`List`}),(t.showInDetail??t.showInList)&&(0,f.jsxs)(u.Tag,{color:`purple`,children:[`Detail · `,t.detailPlacement||`more`]}),t.allowMultiple&&(0,f.jsx)(u.Tag,{children:`Multi-select`}),t.danger&&(0,f.jsx)(u.Tag,{color:`red`,children:`Destructive`}),!t.showInList&&!(t.showInDetail??t.showInList)&&(0,f.jsx)(Pv,{type:`secondary`,children:`Nowhere`})]})},{title:`Access`,key:`access`,width:170,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(Pv,{type:`secondary`,children:t.permission||`All permitted roles`}),t.permissionKey&&(0,f.jsx)(Pv,{type:`secondary`,code:!0,children:t.permissionKey})]})},{title:``,key:`actions`,width:110,fixed:`right`,render:(e,t)=>(0,f.jsxs)(u.Space,{children:[t.actionType===`group`&&(0,f.jsx)(u.Tooltip,{title:`Add child action`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>U(t.key)})}),(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>W(t)})}),(0,f.jsx)(u.Popconfirm,{title:`Remove this action?`,onConfirm:()=>K(t.key),okText:`Remove`,okType:`danger`,children:(0,f.jsx)(u.Tooltip,{title:`Remove`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})})]})}],ae=e=>[{title:`Action`,key:`identity`,width:210,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(Pv,{strong:!0,children:t.label||t.key}),(0,f.jsx)(Pv,{type:`secondary`,code:!0,children:t.key})]})},{title:`Behaviour`,key:`destination`,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(u.Tag,{color:`blue`,children:t.actionType}),(0,f.jsx)(Pv,{type:`secondary`,ellipsis:{tooltip:!0},children:t.popupKey||t.routeTemplate||t.apiPath||t.copyField||t.documentField||`No destination`})]})},{title:`Access`,key:`access`,width:170,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(Pv,{type:`secondary`,children:t.permission||`All permitted roles`}),t.permissionKey&&(0,f.jsx)(Pv,{type:`secondary`,code:!0,children:t.permissionKey})]})},{title:``,key:`actions`,width:80,fixed:`right`,render:(t,n)=>(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>W(n,e)})}),(0,f.jsx)(u.Popconfirm,{title:`Remove this child action?`,onConfirm:()=>K(n.key,e),okText:`Remove`,okType:`danger`,children:(0,f.jsx)(u.Tooltip,{title:`Remove`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})})]})}];return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.ToolOutlined,{}),title:`Actions`,extra:(0,f.jsx)(u.Dropdown,{trigger:[`click`],menu:{items:[{key:`save`,label:`Save current as default`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>ee(`save`)},{key:`restore`,label:`Restore saved default`,icon:(0,f.jsx)(d.CloudDownloadOutlined,{}),onClick:()=>ee(`restore`)},{type:`divider`},{key:`reset`,label:`Reset all actions`,icon:(0,f.jsx)(d.ReloadOutlined,{}),danger:!0,onClick:()=>ee(`reset`)}]},children:(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.MoreOutlined,{}),children:`Workspace defaults`})}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(Pv,{type:`secondary`,children:`Build one action once, then control its List and Detail placement, permissions, tabs, and multi-select behaviour.`})]}),(0,f.jsx)(Z,{styles:{body:{padding:`14px 18px`}},children:(0,f.jsxs)(`div`,{className:`admin-config-context`,children:[(0,f.jsxs)(`div`,{className:`admin-config-context-copy`,children:[(0,f.jsx)(Pv,{strong:!0,children:`Configuration context`}),(0,f.jsx)(Pv,{type:`secondary`,children:`Choose a module and role. “All Roles” is the fallback configuration.`})]}),(0,f.jsxs)(`div`,{className:`admin-config-context-controls`,children:[(0,f.jsxs)(`label`,{className:`admin-config-control`,children:[(0,f.jsx)(Pv,{type:`secondary`,style:{display:`block`,marginBottom:4,fontSize:12},children:`Module`}),(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,style:{width:200},value:i,onChange:e=>a(e),options:e.map(e=>({value:e,label:e}))})]}),(0,f.jsxs)(`label`,{className:`admin-config-control`,children:[(0,f.jsx)(Pv,{type:`secondary`,style:{display:`block`,marginBottom:4,fontSize:12},children:`Role`}),(0,f.jsx)(u.Select,{style:{width:220},value:o,onChange:e=>s(e),options:ne})]}),(0,f.jsx)(`div`,{className:`admin-config-reload`,children:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:R,loading:b,children:`Reload`})})]})]})}),w&&(0,f.jsx)(u.Alert,{type:`error`,message:w,showIcon:!0}),(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.ToolOutlined,{}),title:(0,f.jsxs)(u.Space,{wrap:!0,children:[(0,f.jsxs)(`span`,{children:[g.length,` configured action`,g.length===1?``:`s`]}),m?(0,f.jsxs)(u.Tag,{color:`green`,children:[`Config loaded (roleId: `,o,`)`]}):(0,f.jsx)(u.Tag,{color:`orange`,children:`No config — will create on Save`})]}),extra:(0,f.jsxs)(u.Space,{wrap:!0,children:[m&&(0,f.jsx)(u.Popconfirm,{title:`Delete this entire config?`,onConfirm:B,okText:`Delete`,okType:`danger`,children:(0,f.jsx)(u.Button,{danger:!0,size:`small`,icon:(0,f.jsx)(d.DeleteOutlined,{}),children:`Delete Config`})}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:U,children:`New action`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:S,disabled:!v,onClick:z,children:`Save Config`})]}),children:[(0,f.jsxs)(`div`,{className:`admin-config-table-tools`,children:[(0,f.jsx)(u.Input,{allowClear:!0,prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search actions`,value:I,onChange:e=>L(e.target.value)}),v&&(0,f.jsx)(Pv,{type:`warning`,children:`Unsaved changes`})]}),(0,f.jsx)(u.Spin,{spinning:b,children:(0,f.jsx)(u.Table,{dataSource:re.map((e,t)=>({...e,_actionIndex:g.indexOf(e),_rowKey:e.key||e._localKey||t})),rowKey:`_rowKey`,columns:ie,pagination:!1,size:`small`,className:`fg-table admin-config-table`,scroll:{x:820},locale:{emptyText:`No actions configured. Click "Add Action" to start.`},expandable:{rowExpandable:e=>e.actionType===`group`,expandedRowRender:e=>(0,f.jsx)(u.Table,{dataSource:(e.children??[]).map((e,t)=>({...e,_rowKey:e.key||e._localKey||t})),rowKey:`_rowKey`,columns:ae(e.key),pagination:!1,size:`small`,className:`fg-table admin-config-table`,locale:{emptyText:`No child actions yet. Use the + button on this row to add one (e.g. Tag To Job, Send Mail, Add Notes).`}})}})})]}),(0,f.jsx)(Vv,{open:E,initial:O,isChild:!!V,popupForms:A,templateOptions:M,onClose:()=>D(!1),onSave:G}),(0,f.jsx)(C_,{open:!!P,scope:`rowActions`,action:P?.action,title:P?.title,description:P?.description,confirmLabel:P?.confirmLabel,danger:P?.danger,onCancel:()=>F(null),onVerified:te})]})}var{Text:Uv,Title:Wv}=u.Typography,Gv=[{value:`eq`,label:`equals`},{value:`ne`,label:`not equals`},{value:`isEmpty`,label:`is empty`},{value:`notEmpty`,label:`is not empty`},{value:`contains`,label:`contains`},{value:`fieldEq`,label:`field = field`},{value:`scope`,label:`view scope`}],Kv=[{value:`myJobs`,label:`My Jobs`},{value:`allJobs`,label:`All Jobs`}],qv=[`eq`,`ne`,`contains`],Jv=`scope`,Yv=`fieldEq`,Xv=[{name:`Fulfilled jobs — block sourcing`,description:`When a job status is fulfilled and has no recruiters, hide source & quick-submit buttons.`,conditions:[{field:`jobRecruitmentStatus`,operator:`eq`,value:`fulfilled`,compareField:``},{field:`recruiters`,operator:`isEmpty`,value:``,compareField:``}],blockedActions:[`sourceCandidates`,`quickSubmit`],isActive:!0},{name:`All Jobs scope — restrict actions`,description:`When viewing All Jobs, hide sourcing, quick-submit, change-status, notes and share.`,conditions:[{field:``,operator:`scope`,value:`allJobs`,compareField:``}],blockedActions:[`sourceCandidates`,`quickSubmit`,`changeStatus`,`addNotes`,`share`],isActive:!0},{name:`Target submission reached — block sourcing`,description:`When targetSubmission equals submissionCount, no more sourcing is needed.`,conditions:[{field:`targetSubmission`,operator:`fieldEq`,value:``,compareField:`submissionCount`}],blockedActions:[`sourceCandidates`,`quickSubmit`],isActive:!0}],Zv=()=>({field:``,operator:`eq`,value:``,compareField:``}),Qv=()=>({name:``,description:``,conditions:[Zv()],blockedActions:[],isActive:!0});function $v(e){return Gv.find(t=>t.value===e)?.label??e}function ey(e){return e.operator===Jv?`scope = ${e.value}`:e.operator===Yv?`${e.field} = field:${e.compareField}`:[`isEmpty`,`notEmpty`].includes(e.operator)?`${e.field} ${$v(e.operator)}`:`${e.field} ${$v(e.operator)} "${e.value}"`}function ty(e){return String(e||``).replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}function ny(e){if(typeof e==`string`)return{value:e,label:ty(e)};let t=e?.module??e?.key??e?.moduleKey??e?.value??e?.apiModule??e?.name??e?.modulename??e?.menuName;return t?{value:t,label:e?.label??e?.moduleLabel??e?.moduleName??e?.name??e?.modulename??e?.menuName??ty(t)}:null}function ry(e){let t=new Set;return(Array.isArray(e)?e:[]).map(ny).filter(Boolean).filter(e=>t.has(e.value)?!1:(t.add(e.value),!0))}function iy(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(Qv()),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)(!1),[w,T]=(0,l.useState)([]),[E,D]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!1;return queueMicrotask(()=>{r(!0),Tn().then(n=>{if(e)return;let r=ry(n);t(r),a(e=>r.some(t=>t.value===e)?e:r[0]?.value??``)}).catch(()=>{e||(t([]),a(``))}).finally(()=>{e||r(!1)})}),()=>{e=!0}},[]);function O(e){p(!0),Ur(e).then(e=>s(Array.isArray(e)?e:[])).catch(()=>s([])).finally(()=>p(!1))}function k(e){Nn(e).then(e=>{T((Array.isArray(e)?e:[]).map(e=>({value:e.field??e.fieldKey??e.key??e.name,label:`${e.label??e.fieldName??e.name} (${e.field??e.fieldKey??e.key??e.name})`})).filter(e=>e.value))}).catch(()=>T([]))}function A(e){Rr(e).then(e=>{let t=new Set;(Array.isArray(e)?e:[]).forEach(e=>{(e.rowActions??[]).forEach(e=>{e.key&&t.add(e.key)})}),D([...t].map(e=>({value:e,label:e})))}).catch(()=>D([]))}(0,l.useEffect)(()=>{queueMicrotask(()=>{if(!i){s([]),T([]),D([]);return}O(i),k(i),A(i)})},[i]);function j(){_(null),y(Qv()),h(!0)}function M(e){_(e),y({name:e.name??``,description:e.description??``,conditions:e.conditions?.length?e.conditions.map(e=>({...e})):[Zv()],blockedActions:e.blockedActions??[],isActive:e.isActive??!0}),h(!0)}async function N(){if(v.name.trim()){x(!0);try{g?await Gr(g.id,v):await Wr({...v,module:i}),h(!1),O(i)}finally{x(!1)}}}async function P(e){await Kr(e.id),O(i)}async function F(){C(!0);try{for(let e of Xv)await Wr({...e,module:i});O(i)}finally{C(!1)}}function I(e,t){y(n=>({...n,conditions:n.conditions.map((n,r)=>r===e?{...n,...t}:n)}))}function L(){y(e=>({...e,conditions:[...e.conditions,Zv()]}))}function R(e){y(t=>({...t,conditions:t.conditions.filter((t,n)=>n!==e)}))}return(0,f.jsxs)(`div`,{style:{padding:`24px 0`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:8,flexWrap:`wrap`},children:[(0,f.jsx)(Wv,{level:5,style:{margin:0},children:`Action Rules`}),(0,f.jsx)(u.Select,{options:e,value:i,loading:n,placeholder:`Select module`,onChange:a,style:{width:200}}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.PlusOutlined,{}),type:`primary`,disabled:!i,onClick:j,children:`Add Rule`}),(i===`job`||i===`jobs`)&&(0,f.jsx)(u.Tooltip,{title:`Create the 3 standard job rules that replace the hardcoded backend logic`,children:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ThunderboltOutlined,{}),loading:S,onClick:F,children:`Seed Job Defaults`})})]}),(0,f.jsx)(u.Alert,{type:`info`,showIcon:!0,style:{marginBottom:16,fontSize:12},message:(0,f.jsxs)(`span`,{children:[`Rules are evaluated `,(0,f.jsx)(`b`,{children:`per row`}),` in the list view using the record's own field values. When `,(0,f.jsx)(`b`,{children:`all conditions`}),` of a rule match, the listed action buttons are hidden for that row. The `,(0,f.jsx)(`b`,{children:`key`}),` of each blocked action must match what is set in `,(0,f.jsx)(`b`,{children:`Row Actions`}),` config.`]})}),(0,f.jsx)(u.Table,{columns:[{title:`Rule Name`,dataIndex:`name`,key:`name`,width:200,render:(e,t)=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Uv,{strong:!0,children:e}),t.description?(0,f.jsx)(`div`,{children:(0,f.jsx)(Uv,{type:`secondary`,style:{fontSize:11},children:t.description})}):null]})},{title:`Conditions (ALL must match)`,key:`conditions`,render:(e,t)=>(0,f.jsx)(u.Space,{size:4,direction:`vertical`,children:(t.conditions??[]).map((e,t)=>(0,f.jsx)(u.Tag,{style:{fontFamily:`monospace`,fontSize:11,margin:0},children:ey(e)},t))})},{title:`Blocked Row Actions`,key:`blockedActions`,render:(e,t)=>(0,f.jsx)(u.Space,{size:4,wrap:!0,children:(t.blockedActions??[]).map(e=>(0,f.jsx)(u.Tag,{color:`volcano`,children:e},e))})},{title:`Active`,dataIndex:`isActive`,key:`isActive`,width:70,render:e=>(0,f.jsx)(u.Tag,{color:e?`green`:`default`,children:e?`On`:`Off`})},{title:``,key:`act`,width:80,render:(e,t)=>(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.EditOutlined,{}),size:`small`,type:`text`,onClick:()=>M(t)})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this rule?`,onConfirm:()=>P(t),children:(0,f.jsx)(u.Tooltip,{title:`Delete`,children:(0,f.jsx)(u.Button,{danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),size:`small`,type:`text`})})})]})}],dataSource:o,loading:c,rowKey:`id`,size:`small`,pagination:!1,locale:{emptyText:i?`No rules yet. Click "Add Rule" to get started.`:`No modules found. Configure modules first.`}}),(0,f.jsx)(u.Drawer,{open:m,title:g?`Edit: ${g.name}`:`Add Action Rule`,width:620,onClose:()=>h(!1),footer:(0,f.jsxs)(u.Space,{style:{float:`right`},children:[(0,f.jsx)(u.Button,{onClick:()=>h(!1),children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:b,onClick:N,children:`Save Rule`})]}),children:(0,f.jsxs)(u.Form,{layout:`vertical`,children:[(0,f.jsx)(u.Form.Item,{label:`Rule Name`,required:!0,children:(0,f.jsx)(u.Input,{value:v.name,placeholder:`e.g. Fulfilled jobs — block sourcing`,onChange:e=>y(t=>({...t,name:e.target.value}))})}),(0,f.jsx)(u.Form.Item,{label:`Description`,children:(0,f.jsx)(u.Input.TextArea,{rows:2,value:v.description,placeholder:`Explain when this rule applies`,onChange:e=>y(t=>({...t,description:e.target.value}))})}),(0,f.jsx)(u.Form.Item,{label:`Active`,children:(0,f.jsx)(u.Switch,{checked:v.isActive,onChange:e=>y(t=>({...t,isActive:e}))})}),(0,f.jsxs)(u.Divider,{orientation:`left`,orientationMargin:0,style:{fontSize:13},children:[`Conditions `,(0,f.jsx)(Uv,{type:`secondary`,style:{fontSize:12},children:`(ALL must match for the rule to fire)`})]}),v.conditions.map((e,t)=>(0,f.jsxs)(`div`,{style:{background:`#fafafa`,border:`1px solid #f0f0f0`,borderRadius:6,padding:`10px 12px`,marginBottom:8},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{label:`Operator`,style:{marginBottom:0,minWidth:140},children:(0,f.jsx)(u.Select,{options:Gv,value:e.operator,style:{width:140},onChange:e=>I(t,{operator:e,value:``,compareField:``})})}),e.operator!==Jv&&(0,f.jsxs)(u.Form.Item,{label:`Record Field`,style:{marginBottom:0,flex:1,minWidth:180},children:[(0,f.jsx)(u.Select,{showSearch:!0,allowClear:!0,mode:`tags`,maxCount:1,value:e.field?[e.field]:[],options:w,style:{width:`100%`},placeholder:`Select or type field name`,onChange:e=>I(t,{field:e[e.length-1]??``}),filterOption:(e,t)=>(t?.label??t?.value??``).toLowerCase().includes(e.toLowerCase())}),(0,f.jsxs)(Uv,{type:`secondary`,style:{fontSize:11},children:[`Field from the record (e.g. `,(0,f.jsx)(`code`,{children:`jobRecruitmentStatus`}),`, `,(0,f.jsx)(`code`,{children:`recruiters`}),`)`]})]}),qv.includes(e.operator)&&(0,f.jsx)(u.Form.Item,{label:`Value`,style:{marginBottom:0,minWidth:140},children:(0,f.jsx)(u.Input,{value:e.value,placeholder:`e.g. "fulfilled"`,style:{width:150},onChange:e=>I(t,{value:e.target.value})})}),e.operator===Jv&&(0,f.jsxs)(u.Form.Item,{label:`Scope Value`,style:{marginBottom:0,minWidth:140},children:[(0,f.jsx)(u.Select,{options:Kv,value:e.value||void 0,style:{width:150},placeholder:`Select scope`,onChange:e=>I(t,{value:e})}),(0,f.jsx)(Uv,{type:`secondary`,style:{fontSize:11},children:`Current view tab (myJobs / allJobs)`})]}),e.operator===Yv&&(0,f.jsxs)(u.Form.Item,{label:`Compare To Field`,style:{marginBottom:0,minWidth:160},children:[(0,f.jsx)(u.Select,{showSearch:!0,allowClear:!0,mode:`tags`,maxCount:1,value:e.compareField?[e.compareField]:[],options:w,style:{width:170},placeholder:`Select or type field`,onChange:e=>I(t,{compareField:e[e.length-1]??``}),filterOption:(e,t)=>(t?.label??t?.value??``).toLowerCase().includes(e.toLowerCase())}),(0,f.jsxs)(Uv,{type:`secondary`,style:{fontSize:11},children:[`e.g. `,(0,f.jsx)(`code`,{children:`submissionCount`})]})]}),(0,f.jsx)(`div`,{style:{paddingTop:22},children:(0,f.jsx)(u.Button,{danger:!0,disabled:v.conditions.length<=1,icon:(0,f.jsx)(d.DeleteOutlined,{}),size:`small`,type:`text`,onClick:()=>R(t)})})]}),(0,f.jsx)(`div`,{style:{marginTop:6},children:(0,f.jsxs)(Uv,{type:`secondary`,style:{fontSize:11},children:[`Preview: `,(0,f.jsx)(`code`,{style:{color:`#1677ff`},children:ey(e)})]})})]},t)),(0,f.jsx)(u.Button,{size:`small`,style:{marginBottom:16},onClick:L,children:`+ Add Condition`}),(0,f.jsxs)(u.Divider,{orientation:`left`,orientationMargin:0,style:{fontSize:13},children:[`Blocked Row Actions`,(0,f.jsx)(Uv,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:`(hidden when this rule fires)`})]}),(0,f.jsxs)(u.Form.Item,{children:[(0,f.jsx)(u.Select,{mode:`tags`,style:{width:`100%`},value:v.blockedActions,options:E,placeholder:`Select or type action key (e.g. sourceCandidates, quickSubmit)`,onChange:e=>y(t=>({...t,blockedActions:e})),filterOption:(e,t)=>(t?.value??``).toLowerCase().includes(e.toLowerCase())}),(0,f.jsxs)(Uv,{type:`secondary`,style:{fontSize:11},children:[`Must match the `,(0,f.jsx)(`b`,{children:`key`}),` of a Row Action (configured in Admin → Row Actions). Common job keys: `,(0,f.jsx)(`code`,{children:`sourceCandidates`}),`, `,(0,f.jsx)(`code`,{children:`quickSubmit`}),`,`,` `,(0,f.jsx)(`code`,{children:`changeStatus`}),`, `,(0,f.jsx)(`code`,{children:`share`}),`, `,(0,f.jsx)(`code`,{children:`addNotes`}),`, `,(0,f.jsx)(`code`,{children:`assign`}),`.`]})]})]})})]})}function ay(){return(0,f.jsx)(u.Tabs,{defaultActiveKey:`actions`,className:`admin-config-tabs`,destroyOnHidden:!1,items:[{key:`actions`,label:`Action library`,icon:(0,f.jsx)(d.ThunderboltOutlined,{}),children:(0,f.jsx)(Hv,{})},{key:`rules`,label:`Visibility rules`,icon:(0,f.jsx)(d.ApartmentOutlined,{}),children:(0,f.jsx)(iy,{})}]})}var{Text:oy}=u.Typography,sy={name:``,module:``,action:``,clientId:``,description:``,toMail:[],ccMail:[],bccMail:[],subject:``,body:``,isActive:!0},cy=e=>e?._id??e?.id;function ly(...e){let t=new Set;return e.forEach(e=>{let n=/{{\.([\w.]+)}}/g,r;for(;(r=n.exec(String(e??``)))!==null;)t.add(r[1])}),t}function uy({open:e,templateId:t,modules:n,clients:r,onClose:i,onSaved:a}){let[o]=u.Form.useForm(),[s,c]=(0,l.useState)(``),[d,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)([]);async function b(e){if(!e){_([]),y([]);return}let[t,n]=await Promise.all([Rr(e).catch(()=>[]),Nn(e).catch(()=>[])]),r=new Map;t.forEach(e=>(e.rowActions??[]).forEach(e=>{e.key&&r.set(e.key,e.label||e.key)})),_([...r].map(([e,t])=>({value:e,label:t}))),y(n.map(e=>({key:e.value??e.field??e.fieldKey??e.key??e.name,value:e.path??e.value??e.field??e.fieldKey??e.key??e.name,label:e.label??e.fieldName??e.name??e.value})).filter(e=>e.key))}(0,l.useEffect)(()=>{if(!e)return;let n=!1;return queueMicrotask(()=>{h(!0),(t?xv(t):Promise.resolve(sy)).then(e=>{if(n)return;let t={...sy,...e,clientId:e?.clientIdStr||(typeof e?.clientId==`string`?e.clientId:``)};o.setFieldsValue(t),c(t.body||``),b(t.module)}).catch(e=>u.message.error(e?.message||`Could not load template`)).finally(()=>{n||h(!1)})}),()=>{n=!0}},[o,e,t]);function x(e){let t=`{{.${e.key}}}`;c(e=>`${e}${e?` `:``}${t}`),u.message.success(`Inserted ${t}`)}async function S(){try{let e=await o.validateFields();if(!s.trim()){u.message.error(`Message body is required`);return}p(!0);let n=ly(e.subject,s),r=v.filter(e=>n.has(e.key)).map(e=>({key:e.key,value:e.value})),i={...e,action:Array.isArray(e.action)?e.action.at(-1):e.action,body:s,placeholders:r.length?[{moduleName:e.module,holders:r}]:[]};i.clientId||delete i.clientId,t?await Cv(t,i):await Sv(i),u.message.success(t?`Template updated`:`Template created`),a()}catch(e){e?.errorFields||u.message.error(e?.message||`Could not save template`)}finally{p(!1)}}return(0,f.jsx)(u.Drawer,{open:e,onClose:i,width:`min(920px, 96vw)`,title:t?`Edit email template`:`New email template`,destroyOnClose:!0,extra:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{onClick:i,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:d,onClick:S,children:t?`Update`:`Create`})]}),children:(0,f.jsxs)(u.Form,{form:o,layout:`vertical`,initialValues:sy,disabled:m,className:`template-editor-form`,children:[(0,f.jsxs)(`div`,{className:`template-editor-grid`,children:[(0,f.jsx)(u.Form.Item,{name:`name`,label:`Template name`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`Candidate introduction`})}),(0,f.jsx)(u.Form.Item,{name:`module`,label:`Module`,rules:[{required:!0}],children:(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,options:n,onChange:e=>{o.setFieldValue(`action`,``),b(e)}})}),(0,f.jsx)(u.Form.Item,{name:`action`,label:`Action`,rules:[{required:!0}],tooltip:`Actions come from this module's DB-configured Row Actions.`,children:(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,options:g,placeholder:`Select configured action`})}),(0,f.jsx)(u.Form.Item,{name:`clientId`,label:`Client scope (optional)`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,options:r,placeholder:`Available to every client`})})]}),(0,f.jsx)(u.Form.Item,{name:`description`,label:`Description`,children:(0,f.jsx)(u.Input.TextArea,{rows:2})}),(0,f.jsxs)(`div`,{className:`template-editor-grid template-editor-grid--three`,children:[(0,f.jsx)(u.Form.Item,{name:`toMail`,label:`Default To`,children:(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`]})}),(0,f.jsx)(u.Form.Item,{name:`ccMail`,label:`Default Cc`,children:(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`]})}),(0,f.jsx)(u.Form.Item,{name:`bccMail`,label:`Default Bcc`,children:(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`]})})]}),(0,f.jsx)(u.Form.Item,{name:`subject`,label:`Subject`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`Email subject`})}),(0,f.jsx)(u.Form.Item,{label:`Message`,required:!0,children:(0,f.jsx)(wt,{value:s,onChange:c,placeholder:`Write the reusable email body…`})}),(0,f.jsxs)(`div`,{className:`template-placeholder-panel`,children:[(0,f.jsx)(oy,{strong:!0,children:`Module placeholders`}),(0,f.jsx)(oy,{type:`secondary`,children:`Click to append a DB field token to the message.`}),(0,f.jsxs)(`div`,{className:`template-placeholder-list`,children:[v.map(e=>(0,f.jsx)(u.Tag,{color:`blue`,onClick:()=>x(e),children:`{{.${e.key}}}`},e.key)),!v.length&&(0,f.jsx)(u.Empty,{image:u.Empty.PRESENTED_IMAGE_SIMPLE,description:`No module fields available`})]})]}),(0,f.jsx)(u.Form.Item,{name:`isActive`,label:`Available in mail composer`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})})]})})}function dy(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(0),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(``),[c,p]=(0,l.useState)(1),[m,h]=(0,l.useState)(20),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)([]),[b,x]=(0,l.useState)(null),[S,C]=(0,l.useState)(!1),w=(0,l.useMemo)(()=>g.map(e=>({value:e.key??e.module??e.value,label:e.label??e.name??e.key??e.module??e.value})).filter(e=>e.value),[g]);function T(e=c,n=m,i=o){a(!0),bv({offset:(e-1)*n,limit:n,search:i}).then(({items:e,totalCount:n})=>{t(e),r(n)}).catch(e=>u.message.error(e?.message||`Could not load templates`)).finally(()=>a(!1))}(0,l.useEffect)(()=>{queueMicrotask(()=>{T(1,m,``)})},[]),(0,l.useEffect)(()=>{Promise.all([Tn(),Mn({limit:200})]).then(([e,t])=>{_(e),y(t)}).catch(()=>{})},[]);async function E(e,n){let r=cy(e);try{await Cv(r,{...e,isActive:n}),t(e=>e.map(e=>cy(e)===r?{...e,isActive:n}:e))}catch(e){u.message.error(e?.message||`Could not update status`)}}async function D(e){try{await wv(e),u.message.success(`Template deleted`),T(1),p(1)}catch(e){u.message.error(e?.message||`Could not delete template`)}}let O=[{title:`Template`,key:`template`,width:300,ellipsis:!0,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell templates-primary-cell`,children:[(0,f.jsx)(oy,{strong:!0,ellipsis:{tooltip:t.name},children:t.name}),(0,f.jsx)(oy,{type:`secondary`,ellipsis:{tooltip:t.description||t.subject},children:t.description||t.subject||`No description`})]})},{title:`Module`,dataIndex:`module`,key:`module`,width:140,ellipsis:!0,responsive:[`sm`],render:e=>e?(0,f.jsx)(u.Tag,{color:`blue`,children:e}):`—`},{title:`Action`,dataIndex:`action`,key:`action`,width:180,ellipsis:!0,responsive:[`md`],render:e=>e?(0,f.jsx)(oy,{code:!0,ellipsis:{tooltip:e},children:e}):`—`},{title:`Recipients`,key:`recipients`,width:130,responsive:[`lg`],render:(e,t)=>`${(t.toMail?.length??0)+(t.ccMail?.length??0)+(t.bccMail?.length??0)} defaults`},{title:`Active`,dataIndex:`isActive`,key:`active`,width:80,render:(e,t)=>(0,f.jsx)(u.Switch,{size:`small`,checked:e,onChange:e=>E(t,e)})},{title:``,key:`actions`,width:84,fixed:`right`,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{x(cy(t)),C(!0)}})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this template?`,onConfirm:()=>D(cy(t)),children:(0,f.jsx)(u.Button,{type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})]})}],k=v.map(e=>({value:e._id??e.id,label:e.clientName??e.name??e._id})).filter(e=>e.value);return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.MailOutlined,{}),title:`Email templates`,extra:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{x(null),C(!0)},children:`New template`}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(oy,{type:`secondary`,children:`Create reusable, module-aware email content. Modules, actions and placeholders are read from DB configuration.`})]}),(0,f.jsxs)(Z,{title:`${n} template${n===1?``:`s`}`,extra:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:()=>T(),children:`Reload`}),children:[(0,f.jsx)(`div`,{className:`admin-config-table-tools`,children:(0,f.jsx)(u.Input,{allowClear:!0,prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search templates`,value:o,onChange:e=>{let t=e.target.value;s(t),p(1),T(1,m,t)}})}),(0,f.jsx)(`div`,{className:`templates-table-viewport`,children:(0,f.jsx)(u.Table,{rowKey:cy,columns:O,dataSource:e,loading:i,className:`fg-table`,size:`small`,tableLayout:`fixed`,sticky:!0,scroll:{x:914,y:`calc(100vh - 410px)`},pagination:{current:c,pageSize:m,total:n,showSizeChanger:!0,responsive:!0,onChange:(e,t)=>{p(e),h(t),T(e,t)}}})})]}),(0,f.jsx)(uy,{open:S,templateId:b,modules:w,clients:k,onClose:()=>C(!1),onSaved:()=>{C(!1),T()}})]})}function fy({open:e,signatureId:t,onClose:n,onSaved:r}){let[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)(``),[c,d]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&queueMicrotask(()=>{if(!t){a(``),s(``);return}Ov(t).then(e=>{a(e?.signatureName??``),s(e?.signature??``)}).catch(()=>u.message.error(`Could not load signature`))})},[e,t]);async function p(){if(!i.trim())return u.message.error(`Signature name is required`);if(!o.trim())return u.message.error(`Signature content is required`);d(!0);try{let e={signatureId:t,signatureName:i,signature:o,signatureLogoPath:``,placeHolder:[]};t?await Av(e):await kv(e),u.message.success(t?`Signature updated`:`Signature created`),r()}catch(e){u.message.error(e?.message||`Could not save signature`)}finally{d(!1)}}return(0,f.jsx)(u.Drawer,{open:e,onClose:n,width:`min(760px, 96vw)`,title:t?`Edit signature`:`New signature`,destroyOnClose:!0,extra:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{onClick:n,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:c,onClick:p,children:t?`Update`:`Create`})]}),children:(0,f.jsxs)(u.Form,{layout:`vertical`,children:[(0,f.jsx)(u.Form.Item,{label:`Signature name`,required:!0,children:(0,f.jsx)(u.Input,{value:i,onChange:e=>a(e.target.value)})}),(0,f.jsx)(u.Form.Item,{label:`Signature content`,required:!0,children:(0,f.jsx)(wt,{value:o,onChange:s,placeholder:`Create the reusable signature…`})})]})})}function py(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(0),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(``),[c,p]=(0,l.useState)(1),[m,h]=(0,l.useState)(20),[g,_]=(0,l.useState)(!1),[v,y]=(0,l.useState)(null);function b(e=c,n=m,i=o){a(!0),Dv({offset:(e-1)*n,limit:n,search:i}).then(({items:e,totalCount:n})=>{t(e),r(n)}).catch(()=>u.message.error(`Could not load signatures`)).finally(()=>a(!1))}(0,l.useEffect)(()=>{queueMicrotask(()=>{b(1,m,``)})},[]);async function x(e,n){try{await Mv(e.signatureId,n),t(t=>t.map(t=>t.signatureId===e.signatureId?{...t,isActive:n}:t))}catch{u.message.error(`Could not update status`)}}async function S(e){try{await jv(e),u.message.success(`Signature deleted`),p(1),b(1)}catch{u.message.error(`Could not delete signature`)}}return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsx)(Z,{icon:(0,f.jsx)(d.MailOutlined,{}),title:`Signature templates`,extra:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{y(null),_(!0)},children:`New signature`}),children:(0,f.jsx)(oy,{type:`secondary`,children:`Existing company and user signatures from the shared DB.`})}),(0,f.jsxs)(Z,{title:`${n} signature${n===1?``:`s`}`,children:[(0,f.jsx)(`div`,{className:`admin-config-table-tools`,children:(0,f.jsx)(u.Input,{allowClear:!0,prefix:(0,f.jsx)(d.SearchOutlined,{}),value:o,placeholder:`Search signatures`,onChange:e=>{s(e.target.value),p(1),b(1,m,e.target.value)}})}),(0,f.jsx)(`div`,{className:`templates-table-viewport`,children:(0,f.jsx)(u.Table,{rowKey:`signatureId`,dataSource:e,columns:[{title:`Signature`,dataIndex:`templateName`,key:`name`,width:300,ellipsis:!0,render:e=>(0,f.jsx)(oy,{strong:!0,ellipsis:{tooltip:e},children:e||`Untitled signature`})},{title:`Created`,dataIndex:`createdDt`,key:`created`,width:150,responsive:[`md`],render:e=>e?new Date(e).toLocaleDateString():`—`},{title:`Active`,dataIndex:`isActive`,key:`active`,width:80,render:(e,t)=>(0,f.jsx)(u.Switch,{size:`small`,checked:e,onChange:e=>x(t,e)})},{title:``,key:`actions`,width:84,fixed:`right`,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{y(t.signatureId),_(!0)}}),(0,f.jsx)(u.Popconfirm,{title:`Delete this signature?`,onConfirm:()=>S(t.signatureId),children:(0,f.jsx)(u.Button,{type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})]})}],loading:i,className:`fg-table`,size:`small`,tableLayout:`fixed`,sticky:!0,scroll:{x:614,y:`calc(100vh - 410px)`},pagination:{current:c,pageSize:m,total:n,responsive:!0,onChange:(e,t)=>{p(e),h(t),b(e,t)}}})})]}),(0,f.jsx)(fy,{open:g,signatureId:v,onClose:()=>_(!1),onSaved:()=>{_(!1),b()}})]})}function my(){return(0,f.jsx)(u.Tabs,{defaultActiveKey:`email`,className:`admin-config-tabs`,items:[{key:`email`,label:`Email templates`,children:(0,f.jsx)(dy,{})},{key:`signature`,label:`Signatures`,children:(0,f.jsx)(py,{})}]})}var{Text:hy}=u.Typography,gy={serviceKey:``,label:``,baseUrl:``,authHeader:``,authValue:``,enabled:!0};function _y({open:e,service:t,onClose:n,onSaved:r}){let[i]=u.Form.useForm(),[a,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&i.setFieldsValue({...gy,...t,authValue:``})},[e,t,i]);async function s(){try{let e=await i.validateFields();o(!0),await qn(e),u.message.success(`AI service saved`),r()}catch(e){e?.errorFields||u.message.error(e?.message||`Could not save AI service`)}finally{o(!1)}}return(0,f.jsx)(u.Drawer,{open:e,onClose:n,width:`min(560px, 96vw)`,title:t?`Edit AI service`:`New AI service`,destroyOnClose:!0,extra:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{onClick:n,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:a,onClick:s,children:`Save`})]}),children:(0,f.jsxs)(u.Form,{form:i,layout:`vertical`,initialValues:gy,children:[(0,f.jsx)(u.Form.Item,{name:`serviceKey`,label:`Service Key`,rules:[{required:!0,message:`Service key is required`}],tooltip:`Referenced by an AI Action's Service Key on any form field (e.g. pyOps).`,children:(0,f.jsx)(u.Input,{placeholder:`pyOps`,disabled:!!t,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Label`,children:(0,f.jsx)(u.Input,{placeholder:`Resume/JD Parsing Service`})}),(0,f.jsx)(u.Form.Item,{name:`baseUrl`,label:`Base URL`,rules:[{required:!0,message:`Base URL is required`}],children:(0,f.jsx)(u.Input,{placeholder:`https://ai.example.com`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:`authHeader`,label:`Auth Header (optional)`,children:(0,f.jsx)(u.Input,{placeholder:`x-api-key`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:`authValue`,label:`Auth Value`,tooltip:`Write-only — leave blank to keep the currently saved value.`,children:(0,f.jsx)(u.Input.Password,{placeholder:t?`Unchanged`:``})}),(0,f.jsx)(u.Form.Item,{name:`enabled`,label:`Enabled`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})})]})})}function vy(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(null);function c(){r(!0),Kn().then(e=>t(Array.isArray(e)?e:[])).catch(e=>u.message.error(e?.message||`Could not load AI services`)).finally(()=>r(!1))}(0,l.useEffect)(()=>{queueMicrotask(()=>{c()})},[]);async function p(e,n){try{await qn({...e,enabled:n}),t(t=>t.map(t=>t.serviceKey===e.serviceKey?{...t,enabled:n}:t))}catch(e){u.message.error(e?.message||`Could not update AI service`)}}async function m(e){try{await Jn(e),u.message.success(`AI service deleted`),c()}catch(e){u.message.error(e?.message||`Could not delete AI service`)}}return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.ThunderboltOutlined,{}),title:`AI Services`,extra:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{s(null),a(!0)},children:`New service`}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(hy,{type:`secondary`,children:`Register the AI/automation backends that admin-configured "AI Actions" (Generate/Parse-style buttons on any form field) call. A field's AI Action names a Service Key here — no URL is ever hardcoded in the app.`})]}),(0,f.jsx)(Z,{title:`${e.length} service${e.length===1?``:`s`}`,extra:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:c,children:`Reload`}),children:(0,f.jsx)(u.Table,{rowKey:`serviceKey`,columns:[{title:`Service`,key:`service`,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(hy,{strong:!0,children:t.label||t.serviceKey}),(0,f.jsx)(hy,{type:`secondary`,code:!0,children:t.serviceKey})]})},{title:`Base URL`,dataIndex:`baseUrl`,key:`baseUrl`,ellipsis:!0,render:e=>(0,f.jsx)(hy,{code:!0,ellipsis:{tooltip:e},children:e})},{title:`Auth Header`,dataIndex:`authHeader`,key:`authHeader`,width:140,render:e=>e||`—`},{title:`Enabled`,dataIndex:`enabled`,key:`enabled`,width:90,render:(e,t)=>(0,f.jsx)(u.Switch,{size:`small`,checked:e,onChange:e=>p(t,e)})},{title:``,key:`actions`,width:84,fixed:`right`,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{s(t),a(!0)}})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this AI service?`,onConfirm:()=>m(t.serviceKey),children:(0,f.jsx)(u.Button,{type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})]})}],dataSource:e,loading:n,className:`fg-table`,size:`small`})}),(0,f.jsx)(_y,{open:i,service:o,onClose:()=>a(!1),onSaved:()=>{a(!1),c()}})]})}var{Content:yy,Header:by,Sider:xy}=u.Layout,{Text:Sy,Title:Cy}=u.Typography;function wy(e){return String(e??``).trim().replace(/[\s_-]+/g,` `).toUpperCase()}function Ty(e){let t=e?.user_type_id??e?.userTypeId??e?.id,n=e?.user_type_name??e?.userTypeName??e?.name;return Number(t)===1||wy(n)===`SUPER ADMIN`}function Ey(e){return e.flatMap(e=>{let t=e.menu_id??e.menuId??e.MenuID,n=e.menu_name??e.menuName??e.MenuName??`Menu ${t??``}`,r=e.menu_key??e.menuKey??e.MenuKey??``,i=e.permissions??e.Permissions??{};return Object.entries(i).map(([e,i])=>{let a=i.permission_id??i.permissionId??i.PermissionID,o=i.permission_key??i.permissionKey??i.PermissionKey??e,s=i.value??i.Value??i.access_value??i.accessValue??i;return{key:`${t}-${a??o}`,menuId:t,menuName:n,menuKey:r,permissionId:a,permissionKey:o,accessValue:+(Number(s)===1)}})})}function Dy({title:e,description:t,selectedName:n,loading:r,saving:i,rows:a,onChange:o,onSave:s}){return(0,f.jsxs)(`section`,{className:`admin-editor`,children:[(0,f.jsxs)(`div`,{className:`admin-section-head`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:e}),(0,f.jsx)(Sy,{type:`secondary`,children:n||t})]}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:i,disabled:!n||a.length===0,onClick:s,children:`Save`})]}),r?(0,f.jsx)(`div`,{className:`admin-loading`,children:(0,f.jsx)(u.Spin,{})}):a.length?(0,f.jsx)(u.Table,{size:`small`,rowKey:`key`,columns:[{title:`Menu`,dataIndex:`menuName`,width:220,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-menu-cell`,children:[(0,f.jsx)(`span`,{children:e}),(0,f.jsx)(Sy,{type:`secondary`,children:t.menuKey})]})},{title:`Permission`,dataIndex:`permissionKey`,width:160,render:e=>(0,f.jsx)(u.Tag,{children:e})},{title:`Access`,dataIndex:`accessValue`,width:140,render:(e,t)=>(0,f.jsx)(u.Segmented,{size:`small`,value:e,options:[{label:`Off`,value:0},{label:`On`,value:1}],onChange:e=>o(t.key,e)})}],dataSource:a,pagination:!1,scroll:{y:420}}):(0,f.jsx)(u.Empty,{description:`Select a record to customize permissions`})]})}function Oy({onLogout:e}){let[t]=u.Form.useForm(),[n,r]=(0,l.useState)(`users`),[i,a]=(0,l.useState)(!0),[o,s]=(0,l.useState)(!1),[c,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)([]),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)(null),[b,x]=(0,l.useState)([]),[S,C]=(0,l.useState)(!1),[w,T]=(0,l.useState)(null),[E,D]=(0,l.useState)(!1),[O,k]=(0,l.useState)(null),A=te();async function j(){a(!0);try{let[e,t]=await Promise.allSettled([Tg(),kg()]),n=e.status===`fulfilled`?e.value:[],r=t.status===`fulfilled`?t.value:[];e.status===`rejected`&&u.message.error(e.reason?.message||`Unable to load users`),t.status===`rejected`&&u.message.error(t.reason?.message||`Unable to load user types`),h(n??[]),_(r??[]),y((r??[])[0]?.user_type_id??null)}catch(e){u.message.error(e.message||`Unable to load admin data`)}finally{a(!1)}}(0,l.useEffect)(()=>{queueMicrotask(()=>{j()})},[]),(0,l.useEffect)(()=>{queueMicrotask(()=>{if(!v){x([]);return}s(!0),Ag(v).then(e=>x(Ey(e??[]))).catch(e=>u.message.error(e.message||`Unable to load role permissions`)).finally(()=>s(!1))})},[v]);let M=(0,l.useMemo)(()=>g.find(e=>e.user_type_id===v),[v,g]),N=(0,l.useMemo)(()=>g.reduce((e,t)=>({...e,[t.user_type_id]:t.user_type_name}),{}),[g]),P=(0,l.useMemo)(()=>g.filter(e=>!Ty(e)),[g]),F=(0,l.useMemo)(()=>m.filter(e=>!Ty({user_type_id:e.user_type_id,user_type_name:N[e.user_type_id]})),[N,m]),I=[{label:`Users`,value:F.length},{label:`User Types`,value:g.length},{label:`Config Modules`,value:8}],L=[{key:`user-config`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.UserOutlined,{}),` User Config`]}),title:`User Config`,description:`Configure user-level list, filter, form, and permission settings from CORE-THEME.`,component:(0,f.jsx)(d_,{})},{key:`role-config`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.SafetyCertificateOutlined,{}),` Role Config`]}),title:`Role Config`,description:`Configure role-level field visibility, editability, and mandatory rules.`,component:(0,f.jsx)(g_,{})},{key:`modules`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.AppstoreOutlined,{}),` Modules`]}),title:`Modules`,description:`Define workflow modules and set which module they extend to inherit its config.`,component:(0,f.jsx)(b_,{})},{key:`form-groups`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.AppstoreAddOutlined,{}),` Form Groups`]}),title:`Form Groups`,description:`Build module add and edit form groups with validations, dropdowns, and custom forms.`,component:(0,f.jsx)(J_,{})},{key:`detail-groups`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.BgColorsOutlined,{}),` Detail Groups`]}),title:`Detail Groups`,description:`Control detail-view labels, rendering, lookups, merged fields, and display defaults.`,component:(0,f.jsx)(gv,{})},{key:`actions`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.ThunderboltOutlined,{}),` Actions`]}),title:`Actions`,description:`Manage row action buttons and their visibility rules from one workspace.`,component:(0,f.jsx)(ay,{})},{key:`templates`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.MailOutlined,{}),` Templates`]}),title:`Templates`,description:`Manage reusable email templates and signatures.`,component:(0,f.jsx)(my,{})},{key:`ai-services`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.ThunderboltOutlined,{}),` AI Services`]}),title:`AI Services`,description:`Register the AI and automation services used by admin-configured AI actions.`,component:(0,f.jsx)(vy,{})}],R=[{key:`users`,icon:(0,f.jsx)(d.UserOutlined,{}),label:`Users`},{key:`roles`,icon:(0,f.jsx)(d.TeamOutlined,{}),label:`User Types`},{key:`configurations`,icon:(0,f.jsx)(d.AppstoreAddOutlined,{}),label:`Configurations`}];function z(e,t){x(n=>n.map(n=>n.key===e?{...n,accessValue:t}:n))}async function B(){p(!0);try{await jg(v,b.map(e=>({menu_id:e.menuId,menu_name:e.menuName,menu_key:e.menuKey,permission_id:e.permissionId,permission_key:e.permissionKey,access_value:e.accessValue,updated_by:A?.userId??null}))),u.message.success(`Role permissions updated`)}catch(e){u.message.error(e.message||`Unable to save role permissions`)}finally{p(!1)}}function V(){ne(),e?.()}function H(){T(null),t.resetFields(),t.setFieldsValue({status:`ACTIVE`,user_type_id:P[0]?.user_type_id}),C(!0)}function U(e){T(e),t.setFieldsValue({first_name:e.first_name,last_name:e.last_name,username:e.username,email:e.email,mobile:e.mobile,user_type_id:e.user_type_id,profile_image:e.profile_image,status:e.status}),C(!0)}async function W(e){D(!0);try{let t={...e,updated_by:A?.userId??null,created_by:A?.userId??null};t.password||delete t.password,w?(await Dg(w.user_id,t),u.message.success(`User updated`)):(await Eg(t),u.message.success(`User created`)),C(!1),T(null),await j()}catch(e){u.message.error(e.message||`Unable to save user`)}finally{D(!1)}}async function G(e){k(e);try{await Og(e),u.message.success(`User deleted`),await j()}catch(e){u.message.error(e.message||`Unable to delete user`)}finally{k(null)}}function K(e){y(e.user_type_id)}return(0,f.jsxs)(u.Layout,{className:`admin-shell`,children:[(0,f.jsxs)(xy,{width:248,className:`admin-sider`,children:[(0,f.jsxs)(`div`,{className:`admin-brand`,children:[(0,f.jsx)(`img`,{src:`/favicon.svg`,alt:``}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`strong`,{children:`Zinnext`}),(0,f.jsx)(`span`,{children:`Admin Core`})]})]}),(0,f.jsxs)(`div`,{className:`admin-profile`,children:[(0,f.jsx)(Sy,{children:A?.username||`Admin`}),(0,f.jsx)(`span`,{children:A?.email})]}),(0,f.jsxs)(`div`,{className:`admin-sidebar-nav`,children:[(0,f.jsx)(Sy,{className:`admin-sidebar-title`,children:`Admin Menu`}),(0,f.jsx)(u.Menu,{theme:`dark`,mode:`inline`,selectedKeys:[n],onClick:({key:e})=>r(e),items:R})]})]}),(0,f.jsxs)(u.Layout,{children:[(0,f.jsxs)(by,{className:`admin-header`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:3,children:`Admin`}),(0,f.jsx)(Sy,{type:`secondary`,children:`Manage access and CORE-THEME configuration.`})]}),(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:j,children:`Refresh`}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.LogoutOutlined,{}),onClick:V,children:`Logout`})]})]}),(0,f.jsxs)(yy,{className:`admin-content`,children:[(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`admin-metrics`,children:I.map(e=>(0,f.jsxs)(`div`,{className:`admin-metric`,children:[(0,f.jsx)(`span`,{children:e.label}),(0,f.jsx)(`strong`,{children:e.value})]},e.label))}),(0,f.jsx)(u.Tabs,{activeKey:n,onChange:r,tabBarStyle:{display:`none`},items:[{key:`users`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.UserOutlined,{}),` Users`]}),children:(0,f.jsx)(`div`,{className:`admin-stack`,children:(0,f.jsxs)(`section`,{className:`admin-section`,children:[(0,f.jsxs)(`div`,{className:`admin-section-head`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:`Users`}),(0,f.jsx)(Sy,{type:`secondary`,children:`Create and manage users with non-super-admin user types.`})]}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:H,children:`Add`})]}),(0,f.jsx)(u.Table,{loading:i,rowKey:`user_id`,size:`small`,columns:[{title:`Name`,dataIndex:`first_name`,render:(e,t)=>`${e??``} ${t.last_name??``}`.trim()||t.username},{title:`Email`,dataIndex:`email`},{title:`User Type`,dataIndex:`user_type_id`,width:160,render:e=>N[e]||`Type ${e}`},{title:`Status`,dataIndex:`status`,width:110,render:e=>(0,f.jsx)(u.Tag,{color:e===`ACTIVE`?`green`:`default`,children:e})},{title:``,key:`actions`,width:104,render:(e,t)=>(0,f.jsxs)(u.Space,{size:4,children:[(0,f.jsx)(u.Button,{"aria-label":`Edit user`,icon:(0,f.jsx)(d.EditOutlined,{}),size:`small`,onClick:()=>U(t)}),(0,f.jsx)(u.Popconfirm,{title:`Delete user?`,description:`This removes the user from the auth database.`,okText:`Delete`,okButtonProps:{danger:!0},onConfirm:()=>G(t.user_id),children:(0,f.jsx)(u.Button,{danger:!0,"aria-label":`Delete user`,icon:(0,f.jsx)(d.DeleteOutlined,{}),loading:O===t.user_id,size:`small`})})]})}],dataSource:F,pagination:{pageSize:8}})]})})},{key:`roles`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.TeamOutlined,{}),` User Types`]}),children:(0,f.jsxs)(`div`,{className:`admin-stack`,children:[(0,f.jsxs)(`section`,{className:`admin-section`,children:[(0,f.jsx)(`div`,{className:`admin-section-head`,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:`User Types`}),(0,f.jsx)(Sy,{type:`secondary`,children:`Role level permissions are inherited by users.`})]})}),(0,f.jsx)(u.Table,{loading:i,rowKey:`user_type_id`,size:`small`,columns:[{title:`User Type`,dataIndex:`user_type_name`},{title:`Description`,dataIndex:`description`},{title:`Status`,dataIndex:`status`,width:110,render:e=>(0,f.jsx)(u.Tag,{color:e===`ACTIVE`?`green`:`default`,children:e})},{title:``,key:`actions`,width:96,render:(e,t)=>(0,f.jsx)(u.Button,{"aria-label":`Edit role permissions`,icon:(0,f.jsx)(d.SafetyCertificateOutlined,{}),size:`small`,onClick:()=>K(t),children:`Permission`})}],dataSource:g,pagination:!1,rowClassName:e=>e.user_type_id===v?`admin-selected-row`:``})]}),(0,f.jsx)(Dy,{title:`Role Permissions`,description:`Pick a user type from the table`,selectedName:M?.user_type_name,loading:o,saving:c,rows:b,onChange:z,onSave:B})]})},{key:`configurations`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.AppstoreAddOutlined,{}),` Configurations`]}),children:(0,f.jsxs)(`section`,{className:`admin-section admin-config-workspace`,children:[(0,f.jsxs)(`div`,{className:`admin-section-head`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:`Configuration Center`}),(0,f.jsx)(Sy,{type:`secondary`,children:`CORE-THEME admin modules embedded into the admin dashboard.`})]}),(0,f.jsx)(u.Tag,{color:`blue`,children:`7 modules`})]}),(0,f.jsx)(u.Tabs,{className:`admin-config-tabs`,defaultActiveKey:`user-config`,tabPosition:`left`,items:L.map(e=>({key:e.key,label:e.label,children:(0,f.jsxs)(`div`,{className:`admin-config-panel`,children:[(0,f.jsx)(`div`,{className:`admin-config-panel-head`,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:e.title}),(0,f.jsx)(Sy,{type:`secondary`,children:e.description})]})}),(0,f.jsx)(`div`,{className:`admin-config-panel-body`,children:e.component})]})}))})]})}]})]}),(0,f.jsx)(u.Modal,{title:w?`Edit User`:`Add User`,open:S,onCancel:()=>C(!1),onOk:()=>t.submit(),confirmLoading:E,destroyOnHidden:!0,children:(0,f.jsxs)(u.Form,{form:t,layout:`vertical`,requiredMark:!1,onFinish:W,children:[(0,f.jsxs)(`div`,{className:`admin-form-row`,children:[(0,f.jsx)(u.Form.Item,{label:`First Name`,name:`first_name`,rules:[{required:!0,message:`First name is required`}],children:(0,f.jsx)(u.Input,{placeholder:`John`})}),(0,f.jsx)(u.Form.Item,{label:`Last Name`,name:`last_name`,children:(0,f.jsx)(u.Input,{placeholder:`Doe`})})]}),(0,f.jsx)(u.Form.Item,{label:`Username`,name:`username`,rules:[{required:!0,message:`Username is required`}],children:(0,f.jsx)(u.Input,{placeholder:`john.doe`})}),(0,f.jsx)(u.Form.Item,{label:`Email`,name:`email`,rules:[{required:!0,message:`Email is required`},{type:`email`,message:`Enter a valid email`}],children:(0,f.jsx)(u.Input,{placeholder:`john@example.com`})}),(0,f.jsx)(u.Form.Item,{label:`Password`,name:`password`,rules:w?[]:[{required:!0,message:`Password is required`}],children:(0,f.jsx)(u.Input.Password,{placeholder:w?`Leave empty to keep current password`:`Password`})}),(0,f.jsxs)(`div`,{className:`admin-form-row`,children:[(0,f.jsx)(u.Form.Item,{label:`Mobile`,name:`mobile`,children:(0,f.jsx)(u.Input,{placeholder:`9999999999`})}),(0,f.jsx)(u.Form.Item,{label:`User Type`,name:`user_type_id`,rules:[{required:!0,message:`User type is required`}],children:(0,f.jsx)(u.Select,{placeholder:`Select user type`,options:P.map(e=>({label:e.user_type_name,value:e.user_type_id}))})})]}),(0,f.jsx)(u.Form.Item,{label:`Profile Image`,name:`profile_image`,children:(0,f.jsx)(u.Input,{placeholder:`https://...`})}),(0,f.jsx)(u.Form.Item,{label:`Status`,name:`status`,children:(0,f.jsx)(u.Select,{options:[{label:`ACTIVE`,value:`ACTIVE`},{label:`INACTIVE`,value:`INACTIVE`}]})})]})})]})]})]})}var ky=Oy;function Ay(e,t){return String(e||t).replace(/\/\*$/,``).replace(/\/+$/,``)||t}function jy({loginPath:e=`/login`,adminPath:t=`/admin`,fallbackPath:n=`/`}){let r=(0,p.useNavigate)(),i=Ay(e,`/login`),a=Ay(t,`/admin`),o=`${a}/*`;return(0,f.jsxs)(p.Routes,{children:[(0,f.jsx)(p.Route,{path:i,element:(0,f.jsx)(zh,{defaultRedirectPath:a,onLogin:()=>r(a,{replace:!0})})}),(0,f.jsx)(p.Route,{path:o,element:(0,f.jsx)(Ih,{loginPath:i,children:(0,f.jsx)(ky,{onLogout:()=>r(i,{replace:!0})})})}),(0,f.jsx)(p.Route,{path:n,element:(0,f.jsx)(p.Navigate,{to:a,replace:!0})}),(0,f.jsx)(p.Route,{path:`*`,element:(0,f.jsx)(p.Navigate,{to:a,replace:!0})})]})}function My(e){return(0,f.jsx)(p.BrowserRouter,{children:(0,f.jsx)(jy,{...e})})}function Ny(e){return Array.isArray(e)?e.map(String).map(e=>e.trim()).filter(Boolean):String(e??``).split(`,`).map(e=>e.trim()).filter(Boolean)}function Py(e){return Ny(e).every(e=>/^[^,\s@]+@[^,\s@]+\.[^\s@]{2,}$/.test(e))}var{Text:Fy}=u.Typography;function Iy(e,t){return[...new Set([...Ny(e),...Ny(t)])].join(`, `)}function Ly(e,t){return String(t??``).split(`.`).reduce((e,t)=>e?.[t],e)}function Ry(e,t,n){if(!n)return String(e??``);let r=new Map;return(t??[]).forEach(e=>(e.holders??[]).forEach(e=>{r.set(e.key,Ly(n,e.value))})),String(e??``).replace(/{{\.([\w.]+)}}/g,(e,t)=>{let n=r.get(t);return n==null?e:String(n)})}function zy({value:e,onChange:t,moduleName:n=``,defaultTemplateId:r=``,ready:i=!0,title:a=`Mail`,hint:o,bccHint:s,afterBcc:c,className:p=``,contextRecords:m=[]}){let[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)(n),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)(!0),T=(0,l.useRef)(``),E=n=>t?.({...e,...n});(0,l.useEffect)(()=>{Tn().then(e=>g(e.map(e=>({value:e.key??e.module??e.value,label:e.label??e.name??e.key??e.module??e.value})).filter(e=>e.value))).catch(()=>g([]))},[]),(0,l.useEffect)(()=>{let e=!1;return Tv({module:_}).then(t=>{e||b(t)}).catch(()=>{e||b([])}).finally(()=>{e||w(!1)}),()=>{e=!0}},[_]);async function D(t,n=!1){if(!t){S(``);return}try{let r=await Ev(t),i=m[0];S(t),E({to:Iy(e.to,(r?.toMail??[]).map(e=>Ry(e,r?.placeholders,i))),cc:Iy(e.cc,(r?.ccMail??[]).map(e=>Ry(e,r?.placeholders,i))),bcc:Iy(e.bcc,(r?.bccMail??[]).map(e=>Ry(e,r?.placeholders,i))),subject:Ry(r?.subject,r?.placeholders,i),contents:Ry(r?.body,r?.placeholders,i)}),n||u.message.success(`Loaded ${r?.name||`email template`}`)}catch(e){n||u.message.error(e?.message||`Could not load email template`)}}(0,l.useEffect)(()=>{!i||!r||T.current===r||(T.current=r,D(r,!0))},[r,i]);let O=(0,l.useMemo)(()=>!_||h.some(e=>e.value===_)?h:[{value:_,label:_},...h],[h,_]);return(0,f.jsxs)(`div`,{className:`common-mail-composer ${p}`.trim(),children:[(0,f.jsxs)(`div`,{className:`mail-popup__header`,children:[(0,f.jsxs)(`div`,{className:`mail-popup__header-brand`,children:[(0,f.jsx)(`span`,{className:`dynamic-popup__header-icon-box`,children:(0,f.jsx)(d.MailOutlined,{})}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{className:`dynamic-popup__header-label`,children:a}),o&&(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__header-hint`,children:o})]})]}),(0,f.jsxs)(`div`,{className:`mail-popup__header-controls`,children:[(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,placeholder:`Module`,value:_||void 0,options:O,onChange:e=>{w(!0),v(e),S(``),E({cc:``,bcc:``,subject:``,contents:``,showCc:!1,showBcc:!1})},className:`mail-popup__module-select`}),(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,allowClear:!0,placeholder:`Template`,value:x||void 0,loading:C,notFoundContent:C?(0,f.jsx)(u.Spin,{size:`small`}):`No templates`,options:y.map(e=>({value:e._id??e.id,label:e.name||e.action||`Template`})),onChange:e=>D(e),className:`mail-popup__template-select`})]})]}),(0,f.jsxs)(`div`,{className:`mail-popup__body`,children:[(0,f.jsxs)(`div`,{className:`mail-popup__field-row`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__field-label`,children:`To`}),(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`],value:Ny(e.to),onChange:e=>E({to:e.join(`, `)}),variant:`borderless`,className:`mail-popup__recipient-select`,placeholder:`Add email addresses`}),(0,f.jsxs)(`div`,{className:`mail-popup__cc-bcc-actions`,children:[!e.showCc&&(0,f.jsx)(`span`,{className:`mail-popup__cc-bcc-link`,onClick:()=>E({showCc:!0}),children:`Cc`}),!e.showBcc&&(0,f.jsx)(`span`,{className:`mail-popup__cc-bcc-link`,onClick:()=>E({showBcc:!0}),children:`Bcc`})]})]}),(0,f.jsx)(u.Divider,{}),e.showCc&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`mail-popup__field-row`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__field-label`,children:`Cc`}),(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`],value:Ny(e.cc),onChange:e=>E({cc:e.join(`, `)}),variant:`borderless`,className:`mail-popup__recipient-select`})]}),(0,f.jsx)(u.Divider,{})]}),e.showBcc&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`mail-popup__field-row`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__field-label`,children:`Bcc`}),(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`],value:Ny(e.bcc),onChange:e=>E({bcc:e.join(`, `)}),variant:`borderless`,className:`mail-popup__recipient-select`,placeholder:s})]}),c,(0,f.jsx)(u.Divider,{})]}),(0,f.jsxs)(`div`,{className:`mail-popup__field-row`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__field-label`,children:`Subject`}),(0,f.jsx)(u.Input,{variant:`borderless`,value:e.subject,onChange:e=>E({subject:e.target.value}),placeholder:`Enter subject`,className:`mail-popup__field-input`})]}),(0,f.jsx)(u.Divider,{}),(0,f.jsxs)(`div`,{className:`mail-popup__message-section`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__message-label`,children:`Message`}),(0,f.jsx)(wt,{value:e.contents,onChange:e=>E({contents:e})})]})]})]})}function By(){let e=(0,p.useNavigate)(),{state:t={}}=(0,p.useLocation)(),{selectedIds:n=[],selectedRecords:r=[],recipients:i=[],subject:a=``,onSend:o,moduleName:s=``,popupAction:c={}}=t,d=n[0]??r[0]?._id??r[0]?.id,[m,h]=(0,l.useState)({to:i.join(`, `),cc:``,bcc:``,subject:a,contents:``,showCc:!1,showBcc:!1}),[g,_]=(0,l.useState)(!d),[v,y]=(0,l.useState)(!1);(0,l.useEffect)(()=>{d&&yo(d).then(e=>h(t=>({...t,subject:e.subject||t.subject,to:e.toMail?.length?Array.isArray(e.toMail)?e.toMail.join(`, `):String(e.toMail):t.to,cc:e.ccMail?.length?Array.isArray(e.ccMail)?e.ccMail.join(`, `):String(e.ccMail):t.cc,bcc:e.bccMail?.length?Array.isArray(e.bccMail)?e.bccMail.join(`, `):String(e.bccMail):t.bcc,contents:e.contents||t.contents,showCc:t.showCc||!!e.ccMail?.length,showBcc:t.showBcc||!!e.bccMail?.length}))).catch(()=>{}).finally(()=>_(!0))},[d]);let b=Ny(m.to).length+Ny(m.cc).length+Ny(m.bcc).length>0&&Py(m.to)&&Py(m.cc)&&Py(m.bcc)&&m.subject.trim();async function x(){if(!(!b||v)){y(!0);try{await bo({jobId:d,toMail:Ny(m.to),ccMail:Ny(m.cc),bccMail:Ny(m.bcc),subject:m.subject,contents:m.contents}),u.message.success(`Mail sent successfully`),typeof o==`function`&&o({...m,message:m.contents,selectedIds:n}),e(-1)}catch(e){u.message.error(e?.message||`Failed to send mail`)}finally{y(!1)}}}return(0,f.jsx)(u.Drawer,{open:!0,placement:`right`,onClose:()=>e(-1),closable:!1,rootClassName:`mail-popup`,width:620,maskClosable:!1,footer:(0,f.jsxs)(`div`,{className:`mail-popup__footer`,children:[(0,f.jsx)(u.Button,{onClick:()=>e(-1),children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:v,disabled:!b,onClick:x,children:`Send`})]}),children:(0,f.jsx)(zy,{value:m,onChange:h,moduleName:s,defaultTemplateId:c.defaultTemplateId??t.defaultTemplateId??``,ready:g,contextRecords:r})})}var{Text:Vy}=u.Typography;function Hy(e){return e?e.trim().split(/\s+/).slice(0,2).map(e=>e[0].toUpperCase()).join(``):`?`}function Uy(e){return e?e.name?e.name:e.fullName?e.fullName:e.firstName||e.lastName?[e.firstName,e.lastName].filter(Boolean).join(` `):e.candidateName??e.clientName??e.jobTitle??``:``}function Wy(e){return e?e.email??e.emailId??e.emailAddress??``:``}function Gy(e){return e?e.status?e.status:e.stage?e.stage:typeof e.isActive==`boolean`?e.isActive?`Active`:`Inactive`:``:``}function Ky(e){return e==null||e===``?`-`:typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):Array.isArray(e)?e.join(`, `):typeof e==`object`?e.label??e.name??Object.values(e).join(` `):String(e)}var qy=[`jobDescription`,`description`,`rawDescription`,`jobDescriptionText`];function Jy(e){return String(e??``).toLowerCase()===`job`}function Yy(e){let t=qy.includes(e.field),n=/description/i.test(e.label??``);return t||n}function Xy({steps:e,current:t,onStepClick:n}){return(0,f.jsx)(`div`,{className:`preview-stepper`,children:e.map((r,i)=>{let a=i<t,o=i===t,s=i===e.length-1;return(0,f.jsxs)(l.Fragment,{children:[(0,f.jsxs)(`button`,{type:`button`,className:`preview-stepper__item${o?` preview-stepper__item--active`:``}`,onClick:()=>n(i),"aria-label":`Go to step ${i+1}: ${r.title}`,"aria-current":o?`step`:void 0,children:[(0,f.jsx)(`div`,{className:[`preview-stepper__circle`,a?`preview-stepper__circle--done`:``,o?`preview-stepper__circle--active`:``].filter(Boolean).join(` `),children:a?(0,f.jsx)(d.CheckOutlined,{}):i+1}),(0,f.jsx)(`span`,{className:`preview-stepper__label${o?` preview-stepper__label--active`:``}`,children:r.title})]}),!s&&(0,f.jsx)(`div`,{className:`preview-stepper__line${a?` preview-stepper__line--done`:``}`})]},r.title??i)})})}function Zy({record:e}){let t=Uy(e),n=Wy(e),r=Gy(e);return!t&&!n?null:(0,f.jsxs)(`div`,{className:`preview-profile-card`,children:[(0,f.jsxs)(`div`,{className:`preview-profile-card__info`,children:[(0,f.jsx)(u.Avatar,{className:`preview-profile-card__avatar`,children:Hy(t)}),(0,f.jsxs)(`div`,{className:`preview-profile-card__text`,children:[t&&(0,f.jsx)(`span`,{className:`preview-profile-card__name`,children:t}),n&&(0,f.jsx)(`span`,{className:`preview-profile-card__email`,children:n})]})]}),r&&(0,f.jsx)(u.Tag,{className:`preview-profile-card__status`,children:r})]})}function Qy({fields:e,moduleName:t}){return e?.length?(0,f.jsx)(`div`,{className:`preview-field-grid`,children:e.map(e=>{let n=e.value,r=Array.isArray(n)&&n.length>0,i=Jy(t)&&Yy(e)&&typeof n==`string`&&n.trim();return r?n.map((t,r)=>(0,f.jsxs)(`div`,{className:`preview-field-card`,children:[(0,f.jsxs)(`span`,{className:`preview-field-card__label`,children:[e.label,n.length>1?` (${r+1})`:``]}),(0,f.jsx)(`span`,{className:`preview-field-card__value`,children:Ky(t)})]},`${e.field??e.label}-${r}`)):i?(0,f.jsxs)(`div`,{className:`preview-field-card preview-field-card--description`,children:[(0,f.jsx)(`span`,{className:`preview-field-card__label`,children:e.label}),(0,f.jsx)(`div`,{className:`preview-field-card__description`,children:(0,f.jsx)(uf,{raw:n})})]},e.field??e.label):(0,f.jsxs)(`div`,{className:`preview-field-card`,children:[(0,f.jsx)(`span`,{className:`preview-field-card__label`,children:e.label}),(0,f.jsx)(`span`,{className:`preview-field-card__value`,children:Ky(n)})]},e.field??e.label)})}):null}function $y(){let e=(0,p.useNavigate)(),{moduleName:t=``,record:n=null}=(0,p.useLocation)().state??{},r=n?.id??n?._id,[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(!!(t&&r)),[c,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(0);(0,l.useEffect)(()=>{if(!t||!r)return;let e=!1;return mn({module:t,id:r}).then(t=>{e||(a(Array.isArray(t)?t:[]),s(!1))}).catch(t=>{e||(m(t.message||`Failed to load preview`),s(!1))}),()=>{e=!0}},[t,r]);function _(){e(-1)}let v=i.length,y=v>1,b=i[h],x=v>4?`min(${v*105+80}px, min(95vw, 1200px))`:`min(680px, calc(100vw - 32px))`,S=i.map((e,t)=>({title:e.label??e.name??`Step ${t+1}`})),C=(0,f.jsxs)(`div`,{className:`preview-modal-header`,children:[(0,f.jsx)(`span`,{className:`preview-modal-module`,children:t.toUpperCase()}),(0,f.jsx)(`span`,{className:`preview-modal-title`,children:b?.label??(t?`Preview - ${t}`:`Preview`)})]}),w=(0,f.jsxs)(`div`,{className:`wizard-footer`,children:[y&&(0,f.jsxs)(Vy,{className:`preview-footer-step-count`,children:[`Step `,h+1,` of `,v]}),(0,f.jsxs)(`div`,{className:`wizard-footer-nav`,children:[(0,f.jsx)(u.Button,{onClick:_,children:`Close`}),y&&h>0&&(0,f.jsx)(u.Button,{onClick:()=>g(e=>e-1),children:`Back`}),y&&(h<v-1?(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.RightOutlined,{}),iconPosition:`end`,onClick:()=>g(e=>e+1),children:`Next`}):(0,f.jsx)(u.Button,{type:`primary`,onClick:_,children:`Done`}))]})]});function T(){return!t||!r?(0,f.jsx)(`div`,{className:`job-preview-content job-preview-status`,children:`Preview id is missing.`}):o?(0,f.jsx)(`div`,{className:`job-preview-content job-preview-status`,children:(0,f.jsx)(u.Spin,{size:`small`})}):c?(0,f.jsx)(`div`,{className:`job-preview-content job-preview-status job-preview-error`,children:c}):i.length?i.map((e,n)=>(0,f.jsx)(`div`,{style:{display:n===h?`block`:`none`},children:e.fields?.length>0?(0,f.jsx)(Qy,{fields:e.fields,moduleName:t}):(0,f.jsx)(Vy,{type:`secondary`,children:`No fields in this group.`})},e.name??e.id??n)):(0,f.jsx)(`div`,{className:`job-preview-content job-preview-status`,children:`No form groups found.`})}return(0,f.jsxs)(u.Modal,{centered:!0,className:`wizard-modal preview-modal`,footer:w,open:!0,title:C,width:x,onCancel:_,maskClosable:!1,children:[y&&(0,f.jsx)(`div`,{className:`wizard-steps-container`,children:(0,f.jsx)(Xy,{steps:S,current:h,onStepClick:g})}),(0,f.jsxs)(`div`,{className:`wizard-body`,children:[n&&(0,f.jsx)(Zy,{record:n}),T()]})]})}var{Text:eb}=u.Typography,{TextArea:tb}=u.Input,nb=[{key:`basic`,title:`Basic Info`,description:`General details`,fields:[{name:`firstName`,label:`First Name`,type:`input`,required:!0,placeholder:`Enter first name`,span:12},{name:`lastName`,label:`Last Name`,type:`input`,required:!0,placeholder:`Enter last name`,span:12},{name:`email`,label:`Email Address`,type:`input`,required:!0,placeholder:`Enter email address`,rules:[{type:`email`,message:`Please enter a valid email`}]},{name:`phone`,label:`Phone`,type:`input`,placeholder:`Enter phone number`}]},{key:`details`,title:`Details`,description:`Additional info`,fields:[{name:`role`,label:`Role`,type:`select`,required:!0,placeholder:`Select a role`,span:12,options:[{label:`Developer`,value:`developer`},{label:`Designer`,value:`designer`},{label:`Manager`,value:`manager`},{label:`Analyst`,value:`analyst`}]},{name:`department`,label:`Department`,type:`select`,placeholder:`Select department`,span:12,options:[{label:`Engineering`,value:`engineering`},{label:`Product`,value:`product`},{label:`Operations`,value:`operations`},{label:`Finance`,value:`finance`}]},{name:`notes`,label:`Notes`,type:`textarea`,placeholder:`Any additional notes...`}]},{key:`confirm`,title:`Confirm`,description:`Review & submit`,isReview:!0}];function rb(e){switch(e.type){case`select`:return(0,f.jsx)(u.Select,{placeholder:e.placeholder,options:e.options,style:{width:`100%`}});case`textarea`:return(0,f.jsx)(tb,{rows:3,placeholder:e.placeholder});case`number`:return(0,f.jsx)(u.InputNumber,{placeholder:e.placeholder,style:{width:`100%`}});default:return(0,f.jsx)(u.Input,{type:e.inputType||`text`,placeholder:e.placeholder})}}function ib({steps:e,form:t}){let n=t.getFieldsValue(),r=e.filter(e=>!e.isReview);return r.some(e=>(e.fields||[]).some(e=>n[e.name]!==void 0&&n[e.name]!==``))?(0,f.jsxs)(`div`,{className:`wizard-review-content`,children:[r.map(e=>(0,f.jsxs)(`div`,{className:`wizard-review-section`,children:[(0,f.jsx)(eb,{className:`wizard-review-section-title`,children:e.title}),(0,f.jsx)(`div`,{className:`wizard-review-grid`,children:(e.fields||[]).map(e=>{let t=n[e.name],r=t===void 0||t===``||t===null?`—`:String(t);return(0,f.jsxs)(`div`,{className:`wizard-review-row`,children:[(0,f.jsx)(`span`,{className:`wizard-review-label`,children:e.label}),(0,f.jsx)(`span`,{className:`wizard-review-separator`,children:`:`}),(0,f.jsx)(`span`,{className:`wizard-review-value`,children:r})]},e.name)})})]},e.key)),(0,f.jsxs)(`div`,{className:`wizard-review-confirm-note`,children:[(0,f.jsx)(d.CheckCircleOutlined,{className:`wizard-review-confirm-icon`}),(0,f.jsx)(eb,{type:`secondary`,children:`Please review the information above before submitting.`})]})]}):(0,f.jsx)(`div`,{className:`wizard-review-empty`,children:(0,f.jsx)(eb,{type:`secondary`,children:`No data entered yet.`})})}function ab(){let[e]=u.Form.useForm(),t=(0,p.useNavigate)(),{title:n=`Wizard`,moduleName:r=``,steps:i=nb,onSubmit:a}=(0,p.useLocation)().state??{},[o,s]=(0,l.useState)(0),c=i[o],d=o===i.length-1,m=o===0;function h(){t(-1)}function g(){let t=(c.fields||[]).map(e=>e.name);e.validateFields(t.length>0?t:void 0).then(()=>{s(e=>e+1)})}function _(){s(e=>e-1)}function v(){let n=e.getFieldsValue();typeof a==`function`&&a(n),t(-1)}let y=i.map((e,t)=>({title:e.title,description:e.description,status:t<o?`finish`:t===o?`process`:`wait`}));return(0,f.jsxs)(u.Modal,{open:!0,title:r?`${n} — ${r}`:n,footer:(0,f.jsxs)(`div`,{className:`wizard-footer`,children:[(0,f.jsx)(u.Button,{onClick:h,children:`Cancel`}),(0,f.jsxs)(`div`,{className:`wizard-footer-nav`,children:[!m&&(0,f.jsx)(u.Button,{onClick:_,children:`Back`}),d?(0,f.jsx)(u.Button,{type:`primary`,onClick:v,children:`Submit`}):(0,f.jsx)(u.Button,{type:`primary`,onClick:g,children:`Next`})]})]}),onCancel:h,width:`min(680px, calc(100vw - 32px))`,centered:!0,className:`wizard-modal`,children:[(0,f.jsx)(`div`,{className:`wizard-steps-container`,children:(0,f.jsx)(u.Steps,{current:o,items:y,size:`small`,className:`wizard-steps`})}),(0,f.jsx)(`div`,{className:`wizard-body`,children:(0,f.jsxs)(u.Form,{form:e,layout:`vertical`,children:[i.filter(e=>!e.isReview).map((e,t)=>(0,f.jsx)(`div`,{style:{display:t===o?`block`:`none`},children:(0,f.jsx)(u.Row,{gutter:16,children:(e.fields||[]).map(e=>(0,f.jsx)(u.Col,{span:e.span||24,children:(0,f.jsx)(u.Form.Item,{name:e.name,label:e.label,rules:[...e.required?[{required:!0,message:`${e.label} is required`}]:[],...e.rules||[]],children:rb(e)})},e.name))})},e.key)),c.isReview&&(0,f.jsx)(ib,{steps:i,form:e})]})})]})}function ob({titleText:e,titleIcon:t}){let n=t===`delete`;return(0,f.jsxs)(`span`,{className:`dynamic-popup__header`,children:[(0,f.jsx)(`span`,{className:`dynamic-popup__header-icon-box${n?` dynamic-popup__header-icon-box--danger`:``}`,children:n?(0,f.jsx)(d.DeleteOutlined,{}):(0,f.jsx)(d.AppstoreOutlined,{})}),(0,f.jsx)(`span`,{className:`dynamic-popup__header-label`,children:e})]})}function sb({note:e,description:t,showSelectedCount:n,count:r,itemLabel:i,bodyText:a,deleteError:o}){return(0,f.jsxs)(f.Fragment,{children:[e&&(0,f.jsx)(X,{variant:`body`,color:`secondary`,className:`dynamic-popup__note`,children:e}),t&&(0,f.jsx)(X,{variant:`body`,className:`dynamic-popup__description`,children:t}),n&&r>0&&(0,f.jsxs)(X,{variant:`body`,className:`dynamic-popup__selected-count`,children:[`Changing status for `,(0,f.jsx)(`strong`,{children:r}),` selected `,i,`.`]}),a&&(0,f.jsx)(X,{variant:`body`,children:a}),o&&(0,f.jsx)(X,{variant:`caption`,color:`danger`,className:`dynamic-popup__error`,children:o})]})}function cb({footerNote:e}){return e?(0,f.jsx)(X,{variant:`caption`,color:`secondary`,className:`dynamic-popup__footer-note`,children:e}):null}var{TextArea:lb}=u.Input,ub=[{label:`$`,value:`$`},{label:`EUR`,value:`EUR`},{label:`GBP`,value:`GBP`},{label:`INR`,value:`INR`}],db=[{label:`Hourly`,value:`Hourly`},{label:`Daily`,value:`Daily`},{label:`Weekly`,value:`Weekly`},{label:`Monthly`,value:`Monthly`},{label:`Yearly`,value:`Yearly`}];function fb({field:e,value:t,onChange:n}){return(0,f.jsx)(u.Input,{value:t,onChange:n,placeholder:e.placeholder,maxLength:e.maxLength,prefix:(0,f.jsx)(d.CrownOutlined,{})})}function pb({field:e,value:t,onChange:n}){return(0,f.jsx)(lb,{value:t,onChange:n,rows:e.rows??5,placeholder:e.placeholder})}function mb({field:e,options:t,value:n,onChange:r}){return(0,f.jsx)(u.Select,{value:n,onChange:r,options:t,placeholder:e.placeholder,className:`dynamic-popup__field-select`,prefix:(0,f.jsx)(d.CrownOutlined,{})})}function hb({field:e,options:t,value:n,onChange:r}){return(0,f.jsx)(u.Select,{mode:`multiple`,value:n,onChange:r,options:t,placeholder:e.placeholder,className:`dynamic-popup__field-select`,prefix:(0,f.jsx)(d.CrownOutlined,{})})}function gb({field:e,options:t,onSearch:n,value:r,onChange:i}){return(0,f.jsx)(u.Select,{showSearch:!0,filterOption:!1,notFoundContent:null,value:r,onChange:i,options:t,placeholder:e.placeholder,onSearch:n,className:`dynamic-popup__field-select`,prefix:(0,f.jsx)(d.CrownOutlined,{})})}function _b({field:e,mentionOpts:t,onMentionSearch:n,value:r,onChange:i}){return(0,f.jsx)(u.Mentions,{value:r,onChange:i,rows:e.rows??5,placeholder:e.placeholder,prefix:`@`,options:t,onSearch:n,className:`dynamic-popup__mention-textarea`})}function vb({value:e={},onChange:t}){let n=e.period??`Hourly`,r=e.isRange??!1;function i(n){t?.({...e,...n})}return(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`},children:[r?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.InputNumber,{controls:!1,placeholder:`From`,value:e.minAmount,onChange:e=>i({minAmount:e}),style:{flex:1}}),(0,f.jsx)(u.InputNumber,{controls:!1,placeholder:`To`,value:e.maxAmount,onChange:e=>i({maxAmount:e}),style:{flex:1}})]}):(0,f.jsx)(u.InputNumber,{controls:!1,placeholder:`0`,value:e.amount,onChange:e=>i({amount:e}),style:{flex:2}}),(0,f.jsx)(u.Select,{value:e.currency??void 0,options:ub,onChange:e=>i({currency:e}),style:{width:80}}),(0,f.jsx)(u.Select,{value:n,options:db,onChange:e=>i({period:e}),style:{width:110}})]}),(0,f.jsxs)(u.Space,{size:`small`,style:{marginTop:8},children:[(0,f.jsx)(u.Switch,{checked:r,onChange:e=>i({isRange:e})}),(0,f.jsx)(`span`,{children:`Range`})]})]})}function yb({field:e,value:t,onChange:n}){return(0,f.jsx)(u.DatePicker,{value:t,onChange:n,placeholder:e.placeholder??`Select date`,style:{width:`100%`},format:`YYYY-MM-DD`})}function bb({field:e,checked:t,onChange:n}){return(0,f.jsx)(u.Checkbox,{checked:t,onChange:n,children:e.checkboxLabel})}function xb({field:e,value:t,onChange:n}){return(0,f.jsx)(u.InputNumber,{value:t,onChange:n,min:e.min,max:e.max,placeholder:e.placeholder,style:{width:`100%`}})}function Sb({options:e,value:t,onChange:n}){return(0,f.jsx)(u.Radio.Group,{value:t,onChange:n,options:e})}var Cb={input:fb,text:fb,textarea:pb,select:mb,"multi-select":hb,"search-select":gb,"mention-textarea":_b,"candidate-rate":vb,"priority-checkbox":bb,"date-picker":yb,number:xb,radio:Sb};function wb(e){return e===`priority-checkbox`?{valuePropName:`checked`}:{}}function Tb(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>t?.[n]??``).trim()}function Eb(e,t){if(typeof e==`string`)return{label:e,value:e};if(e?.label!==void 0&&e?.value!==void 0&&!t?.labelTemplate&&!t?.valueKey)return e;let{labelKey:n,valueKey:r,labelTemplate:i}=t??{},a=(i?Tb(i,e):null)||(n?e?.[n]:null)||e?.name||e?.fullName||e?.candidateName||e?.title||e?.displayName||e?.text||e?.applicantReferenceId||e?.applicantRefrenceId||String(Object.values(e||{})[0]??``),o=(r?e?.[r]:null)??e?.id??e?._id??e?.applicantReferenceId??e?.applicantRefrenceId??String(Object.values(e||{})[0]??``);return{label:String(a),value:String(o),_raw:e}}function Db(e,t){return(t?.[e.optionsKey]??e.defaultOptions??[]).map(t=>Eb(t,e))}function Ob(e={}){return{selectedIds:[],selectedRecords:[],moduleName:``,removedIds:[],...e}}function kb({form:e,fields:t,initialValues:n,dynamicOptions:r,popupContext:i,extraData:a,removedIds:o,setRemovedIds:s,showAlreadyAssigned:c,onValuesChange:l,getSearchHandler:d,getMentionSearchHandler:p,mentionOptions:m}){let h=c&&a;return!t.length&&!h?null:(0,f.jsxs)(f.Fragment,{children:[h&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`dynamic-popup__already-assigned`,children:[(0,f.jsx)(X,{variant:`caption`,color:`secondary`,children:`Already Assigned People`}),(0,f.jsx)(`div`,{style:{marginTop:6,display:`flex`,flexWrap:`wrap`,gap:6},children:(a?.recruitersData??[]).filter(e=>{let t=String(e?.user_id??e?.id??e?.userId??``);return t&&!o.includes(t)}).map(e=>{let t=String(e?.user_id??e?.id??e?.userId??``),n=e?.name??e?.user_name??e?.userName??e?.email??t;return(0,f.jsx)(u.Tag,{closable:!0,onClose:()=>{t&&s(e=>Array.from(new Set([...e,t])))},children:n},t||n)})})]}),(0,f.jsx)(u.Divider,{style:{margin:`12px 0`}})]}),t.length>0&&(0,f.jsx)(u.Form,{form:e,layout:`vertical`,initialValues:n,onValuesChange:(e,t)=>l(t),children:t.map(e=>{let t=r[e.name]??Db(e,i),n=d(e),a=p(e),o=m[e.name]??[],s=wb(e.type),c=Cb[e.type],l=[];return e.required&&l.push({required:!0,message:`${e.label||`This field`} is required`}),typeof e.validator==`function`&&l.push({validator:(t,n)=>{let r=e.validator(n,i);return r?Promise.reject(Error(r)):Promise.resolve()}}),(0,f.jsx)(u.Form.Item,{name:e.name,label:e.label,rules:l,...s,children:c?(0,f.jsx)(c,{field:e,options:t,onSearch:n,mentionOpts:o,onMentionSearch:a}):null},e.name)})})]})}function Ab({open:e,config:t,api:n,fields:r,popupContext:i,formValues:a}){let[o,s]=(0,l.useState)({}),[c,u]=(0,l.useState)(null);return(0,l.useEffect)(()=>{e||(s({}),u(null))},[e]),(0,l.useEffect)(()=>{if(!e||!t||!n.getOptions)return;let a=new AbortController;return r.forEach(e=>{!e.fetchOptionsKey||e.fetchOptionsParamKey||Promise.resolve(n.getOptions(e,void 0,i)).then(t=>{a.signal.aborted||s(n=>({...n,[e.name]:t}))}).catch(t=>{a.signal.aborted||console.error(`[DynamicPopup] Failed to load options for field "${e.name}":`,t)})}),()=>a.abort()},[e,n,t,r,i]),(0,l.useEffect)(()=>{if(!e||!t||!n.getOptions)return;let o=r.filter(e=>e.fetchOptionsKey&&e.fetchOptionsParamKey);if(!o.length)return;let c=new AbortController;return o.forEach(e=>{let t=a[e.fetchOptionsParamKey]??i[e.fetchOptionsParamKey],r={[e.fetchOptionsParamKey]:t};Promise.resolve(n.getOptions(e,r,i)).then(t=>{c.signal.aborted||s(n=>({...n,[e.name]:t}))}).catch(t=>{c.signal.aborted||console.error(`[DynamicPopup] Failed to load param-dependent options for "${e.name}":`,t)})}),()=>c.abort()},[e,n,t,r,a,i]),(0,l.useEffect)(()=>{if(!e||!t||!n.loadExtraData)return;let r=new AbortController;return Promise.resolve(n.loadExtraData(i)).then(e=>{r.signal.aborted||u(e)}).catch(e=>{r.signal.aborted||(console.error(`[DynamicPopup] Failed to load extra data:`,e),u(null))}),()=>r.abort()},[e,n,t,i]),{dynamicOptions:o,setDynamicOptions:s,extraData:c}}var jb=500,Mb=3;function Nb({api:e,popupContext:t,setDynamicOptions:n}){let[r,i]=(0,l.useState)({}),a=(0,l.useRef)({}),o=(0,l.useRef)({}),s=(0,l.useRef)({});function c(r){if(!r.searchFetchKey&&!r.searchFetcher)return;let i=e.searchOptions??e.searchFetcher;if(typeof i==`function`)return e=>{if(clearTimeout(a.current[r.name]),e.length<Mb){n(e=>({...e,[r.name]:[]}));return}a.current[r.name]=setTimeout(()=>{o.current[r.name]?.abort();let a=new AbortController;o.current[r.name]=a,Promise.resolve(i(r,e,t)).then(e=>{if(a.signal.aborted)return;let t=Array.isArray(e)?e:e?.items??e?.list??[];n(e=>({...e,[r.name]:t.map(e=>Eb(e,r))}))}).catch(e=>{a.signal.aborted||console.error(`[DynamicPopup] Search failed for field "${r.name}":`,e)})},jb)}}function u(n){let r=e.getMentionOptions??e.mentionFetcher;if(typeof r==`function`)return e=>{s.current[n.name]?.abort();let a=new AbortController;s.current[n.name]=a,Promise.resolve(r(n,e,t)).then(e=>{if(a.signal.aborted)return;let t=Array.isArray(e)?e:e?.items??e?.list??[];i(e=>({...e,[n.name]:t.map(e=>({value:e.user_name??e.userName??e.username??String(e),label:e.user_name??e.userName??e.username??String(e)}))}))}).catch(e=>{a.signal.aborted||console.error(`[DynamicPopup] Mention search failed for field "${n.name}":`,e)})}}return{mentionOptions:r,getSearchHandler:c,getMentionSearchHandler:u}}function Pb({form:e,config:t,api:n,popupContext:r,resolvedIds:i,dynamicOptions:a,extraData:o,removedIds:s,fields:c,onClose:d,onSubmit:f}){let[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(null);async function _(e){let t={resolvedIds:i,dynamicOptions:a,extraData:o,removedIds:s};if(typeof n.submit==`function`)return n.submit(e,r,t);if(typeof f==`function`)return f(e,r,t)}function v(){if(t){if(!c.length){if(t.mode===`delete`&&typeof n.deleteItems==`function`){m(!0),g(null),Promise.resolve(n.deleteItems(i,r)).then(()=>d()).catch(e=>{let t=e?.message||`Delete failed. Please try again.`;g(t),m(!1),u.message.error(t)});return}if(typeof n.onOk==`function`){m(!0),Promise.resolve(n.onOk(r)).then(()=>d()).catch(e=>{let t=e?.message||`Failed. Please try again.`;u.message.error(t),m(!1)});return}d();return}e.validateFields().then(async e=>{m(!0);try{if((await _(e))?.navigated)return;u.message.success(t.successMessage||`Saved successfully`),d()}catch(e){u.message.error(e?.message||`Failed. Please try again.`)}finally{m(!1)}}).catch(()=>{})}}function y(){m(!1),g(null)}return{handleOk:v,confirming:p,deleteError:h,resetSubmitState:y}}function Fb({open:e=!0,config:t,context:n={},onClose:r,onSubmit:i,api:a={}}){let[o]=u.Form.useForm(),[s,c]=(0,l.useState)({}),[d,p]=(0,l.useState)([]),m=(0,l.useMemo)(()=>Ob(n),[n]),{selectedIds:h=[],selectedRecords:g=[],moduleName:_=``}=m,v=(0,l.useMemo)(()=>h.map((e,t)=>{let n=g[t];return n?.id??n?._id??e}),[h,g]),y=(0,l.useMemo)(()=>t?typeof t.getFields==`function`?t.getFields(m):t.fields??[]:[],[t,m]),b=(0,l.useMemo)(()=>{let e={};return y.forEach(t=>{t.initialValueKey&&m[t.initialValueKey]!==void 0&&(e[t.name]=m[t.initialValueKey])}),e},[y,m]),{dynamicOptions:x,setDynamicOptions:S,extraData:C}=Ab({open:e,config:t,api:a,fields:y,popupContext:m,formValues:s}),{mentionOptions:w,getSearchHandler:T,getMentionSearchHandler:E}=Nb({api:a,popupContext:m,setDynamicOptions:S});function D(){typeof r==`function`&&r()}let{handleOk:O,confirming:k,deleteError:A,resetSubmitState:j}=Pb({form:o,config:t,api:a,popupContext:m,resolvedIds:v,dynamicOptions:x,extraData:C,removedIds:d,fields:y,onClose:D,onSubmit:i});(0,l.useEffect)(()=>{e&&(o.resetFields(),c({}),p(m.removedIds??[]),j())},[e]);let M=h.length,N=String(_).replace(/s$/i,``),P=M===1?N:_,F=g[0]??{},I=t?.getTitleText?t.getTitleText(M,P,F,m):t?.title,L=M===1?F.jobTitle??F.title??F.name??F.fullName??F.candidateName??null:null,R=t?.getBodyText?t.getBodyText(M,N,P,L,m):t?.bodyText??null,z=typeof t?.getNote==`function`?t.getNote(m):t?.note,B=y.filter(e=>e.required).every(e=>{let t=s[e.name];return!(t==null||t===``||Array.isArray(t)&&t.length===0||typeof t==`object`&&!Array.isArray(t)&&Object.keys(t).length===0)}),V=t?.disabledUntilFilled&&!B;return!t||!e?null:(0,f.jsxs)(u.Modal,{open:e,title:(0,f.jsx)(ob,{titleText:I,titleIcon:t.titleIcon}),okText:t.okText||`OK`,cancelText:t.cancelText??`Cancel`,onOk:O,onCancel:D,okButtonProps:{danger:t.okButtonDanger,disabled:V,loading:k},cancelButtonProps:{disabled:k},closable:!k,maskClosable:!1,width:t.width??480,centered:!0,className:`dynamic-popup${t.className?` ${t.className}`:``}`,children:[(0,f.jsx)(sb,{note:z,description:t.description,showSelectedCount:t.showSelectedCount,count:M,itemLabel:P,bodyText:R,deleteError:A}),(0,f.jsx)(cb,{footerNote:t.footerNote}),(0,f.jsx)(kb,{form:o,fields:y,initialValues:b,dynamicOptions:x,popupContext:m,extraData:C,removedIds:d,setRemovedIds:p,showAlreadyAssigned:t.showAlreadyAssigned,onValuesChange:c,getSearchHandler:T,getMentionSearchHandler:E,mentionOptions:w})]})}var Ib={mode:`delete`,getTitleText:(e,t)=>`Delete ${e>0?`${e} `:``}${t}`,titleIcon:`delete`,okText:`Delete`,okButtonDanger:!0,width:420,getBodyText:(e,t,n,r)=>r?`Are you sure you want to delete the ${r} ${t}?`:e>1?`Are you sure you want to delete ${e} selected ${n}?`:`Are you sure you want to delete this ${t}?`,footerNote:`This action cannot be undone.`,fields:[]};function Lb(){return{tenantId:localStorage.getItem(`tenantId`)||``,businessId:localStorage.getItem(`businessId`)||``,businessUnitId:localStorage.getItem(`businessUnitId`)||``}}function Rb(){return Number(localStorage.getItem(`userId`))||0}var zb=e=>e?.data??e;async function Bb(e,t,n){return zb(await J(E,`/module-data-update`,{method:`PUT`,body:JSON.stringify({module:e,ids:t,updates:{status:n}})}))}async function Vb(e){return J(A,`/delete`,{method:`POST`,body:JSON.stringify({schemaVersion:1,...Lb(),jobId:e})})}async function Hb(e){let t=await Promise.all(e.map(e=>J(j,`/delete?_id=${encodeURIComponent(e)}`,{method:`PUT`})));return t[t.length-1]??{}}async function Ub(e,t){return J(E,`/module-data-delete`,{method:`POST`,body:JSON.stringify({module:e,ids:t})})}function Wb(e,t){return e===`job`?Vb(t):e===`candidate`||e===`candidates`?Hb(t):Ub(e,t)}async function Gb(e){return zb(await J(A,`/joblist`,{method:`POST`,body:JSON.stringify({...Lb(),searchQuery:e,userId:Rb()})}))}async function Kb(e=``){return fe(A,`/users/any${e?`?search=${encodeURIComponent(e)}`:``}`)}async function qb({relatedIds:e,module:t,title:n,targetDate:r,notes:i,mentionedUsers:a=[]}){return J(A,`/notes`,{method:`POST`,body:JSON.stringify({schemaVersion:1,...Lb(),title:n,notes:i,notesFor:t||`general`,notesRelatedId:Array.isArray(e)&&e.length?e:null,receiver:a,reminder:r?{type:`single`,time:r,interval:``}:null,targetDate:r||null})})}async function Jb({jobId:e,candidateIds:t,hiringStage:n}){return J(A,`/source/hiringStgUpdate`,{method:`PUT`,body:JSON.stringify({...Lb(),multiJobId:Array.isArray(e)?e:[e],applicantId:Array.isArray(t)?t:[t],updateStatus:String(n??``).toLowerCase(),updateStatusType:`call`,responseType:`responded`,hiriringStatusChangeType:`tagToJobs`,comments:``,userId:Rb()})})}async function Yb(){return zb(await J(E,`/masters/dropdown?masterName=candidateGroups&offset=0&limit=50`))}async function Xb({candidateIds:e,groupId:t,groupName:n}){return zb(await J(j,`/actions/update-group`,{method:`PUT`,body:JSON.stringify({candidateIds:e,groupId:t,groupName:n})}))}async function Zb({jobIds:e,rate:t,priority:n}){return J(A,`/assign?type=self`,{method:`PUT`,body:JSON.stringify({multiJobId:Array.isArray(e)?e:[e],userId:Rb(),schemaVersion:1,...Lb(),jobPayDetails:t??{},priority:n??!1,priorityFrom:null,recruitersData:[]})})}async function Qb(){let e=await fe(A,`/users/manager`);return(Array.isArray(e)?e:e?[e]:[]).map(e=>({...e,label:e.name??e.userName??e.email??String(e.userId??``),value:String(e.userId??e.id??e._id??``)}))}async function $b(e){return e?fe(A,`/self-assign?jobId=${encodeURIComponent(e)}`):null}async function ex({jobIds:e,userId:t,rate:n,priority:r,removedIds:i,existingRecruiters:a}){let o=(a??[]).filter(e=>{let t=String(e?.user_id??e?.id??e?.userId??``);return t&&!(i??[]).includes(t)});return J(A,`/assign?type=other`,{method:`PUT`,body:JSON.stringify({multiJobId:Array.isArray(e)?e:[e],userId:t,schemaVersion:1,...Lb(),jobPayDetails:n??{},priority:r??!1,priorityFrom:null,recruitersData:o})})}async function tx({submissionId:e,isMail:t=!1}){return zb(await J(E,`/submissions/move-to-onboarding`,{method:`POST`,body:JSON.stringify({submissionId:e,isMail:!!t})}))}async function nx(e,t){return zb(await J(E,`/submissions/approve`,{method:`POST`,body:JSON.stringify({submissionId:e,...t})}))}async function rx(e){return zb(await J(E,`/submissions/vms-approve?submissionId=${encodeURIComponent(e)}`))}async function ix({submissionId:e,rejectReasonId:t,rejectReason:n,rejectReasonComments:r}){return zb(await J(E,`/submissions/reject`,{method:`POST`,body:JSON.stringify({submissionId:e,rejectReasonId:t,rejectReason:n,rejectReasonComments:r})}))}async function ax({jobId:e,candidateIds:t}){return J(A,`/source/hiringStgUpdate`,{method:`PUT`,body:JSON.stringify({...Lb(),multiJobId:Array.isArray(e)?e:[e],applicantId:Array.isArray(t)?t:[t],updateStatus:`pipeline`,updateStatusType:`call`,responseType:`responded`,hiriringStatusChangeType:`tagToJobs`,comments:``,userId:Rb()})})}var ox={deleteItems:async(e,t)=>{await Wb(t.moduleName,e)}},sx={title:`Quick Submit`,okText:`Submit`,width:480,disabledUntilFilled:!0,getNote:e=>e.moduleName===`candidate`?`Note: Select a job to submit this candidate`:`Note: Select a candidate to submit for this job`,getFields:e=>e.moduleName===`candidate`?[{name:`jobId`,label:`Job list`,type:`search-select`,required:!0,placeholder:`Search Job ID/Job name (minimum 3 characters)`,searchFetchKey:`quickSubmitJobList`}]:[{name:`candidate`,label:`Candidate`,type:`search-select`,required:!0,placeholder:`Search candidate name (minimum 3 character)`,optionsKey:`candidateOptions`,searchFetchKey:`quickSubmitCandidates`,labelTemplate:`{applicantRefrenceId} - {firstName} {lastName}`,valueKey:`_id`}]},cx={searchOptions:async(e,t,n)=>{if(e.searchFetchKey===`quickSubmitJobList`){let e=n.selectedRecords?.[0]??{},r=await Ho({searchQuery:t,candidateId:e.id??e._id??n.selectedIds?.[0]});return(Array.isArray(r?.data)?r.data:[]).map(e=>({label:[e.jobReferenceId,e.jobTitle].filter(Boolean).join(` - `)||String(e._id??``),value:e._id??``}))}if(e.searchFetchKey===`quickSubmitCandidates`){let e=n.selectedRecords?.[0]??{},r=n.jobId??e.jobId??e.id??e._id??n.selectedIds?.[0];return Ql({isFromSubmission:n.isFromSubmission,jobId:r,submissionId:n.submissionId,search:t})}return[]},submit:async(e,t)=>{let{navigate:n,selectedRecords:r=[],selectedIds:i=[],moduleName:a,isFromSubmission:o=!1}=t,s=r[0]??{};return n(a===`candidate`?`/submission-create/${e.jobId??``}?candidateId=${s.id??s._id??i[0]??``}&isFromSubmission=${o}`:`/submission-create/${t.jobId??s.jobId??s.id??s._id??i[0]??``}?candidateId=${e.candidate??``}&isFromSubmission=${o}`),{navigated:!0}}},lx={title:`Add Notes & Share`,okText:`Save & Share`,width:480,fields:[{name:`notes`,type:`mention-textarea`,required:!0,rows:5,placeholder:`Add your notes on the job. Use '@' to mention someone.`,mentionFetchKey:`mentionUsers`}]},ux=e=>e?.data??e;async function dx({relatedId:e,notes:t,title:n,notesFor:r}){return ux(await wo(E,`/notes`,{method:`POST`,body:JSON.stringify({relatedId:e,notes:t,title:n,notesFor:r})}))}var fx={getMentionOptions:async(e,t)=>Kb(t),submit:async(e,t)=>{let n=Array.isArray(t.selectedIds)?t.selectedIds[0]:t.selectedIds;if(!n)throw Error(`Please select a record before adding a note.`);await dx({relatedId:String(n),notes:e.notes,notesFor:t.moduleName})}},px={title:`Tag to Job`,okText:`Tag`,width:480,disabledUntilFilled:!0,fields:[{name:`jobId`,label:`Job Title / ID`,type:`search-select`,required:!0,placeholder:`Minimum 3 characters`,searchFetchKey:`tagToJobJobList`,valueKey:`_id`,labelTemplate:`{jobReferenceId} - {jobTitle}`},{name:`hiringStage`,label:`Hiring stage`,type:`select`,required:!0,defaultOptions:[{label:`Shortlisted`,value:`Shortlisted`},{label:`Pipeline`,value:`Pipeline`}]}]},mx={searchOptions:async(e,t)=>e.searchFetchKey===`tagToJobJobList`?Gb(t):[],submit:async(e,t)=>{await Jb({jobId:e.jobId,candidateIds:t.selectedIds,hiringStage:e.hiringStage})}},hx={title:`Change Status`,okText:`Apply`,width:420,showSelectedCount:!0,fields:[{name:`status`,label:`New Status`,type:`select`,required:!0,placeholder:`Select a status`,optionsKey:`statusOptions`,initialValueKey:`currentStatus`,defaultOptions:[{label:`Active`,value:`active`},{label:`Inactive`,value:`inactive`},{label:`Pending`,value:`pending`},{label:`Closed`,value:`closed`}]}]},gx={submit:async(e,t)=>{await Bb(t.moduleName,t.selectedIds,e.status)}},_x={getTitleText:e=>`Remove ${e>1?`${e} Candidates`:`Candidate`} from Shortlist`,titleIcon:`delete`,okText:`Remove`,okButtonDanger:!0,width:420,getBodyText:e=>e>1?`Are you sure you want to remove ${e} selected candidates from the shortlist?`:`Are you sure you want to remove this candidate from the shortlist?`,footerNote:`The candidate will be moved back to the pipeline.`,fields:[]},vx={onOk:async e=>{await ax({jobId:e.jobId??e.selectedIds[0],candidateIds:e.selectedIds})}},yx={title:`Add to Groups`,description:`Select a group to add the selected candidate(s) to`,okText:`Add to Group`,width:480,disabledUntilFilled:!0,fields:[{name:`groupId`,label:`Group`,type:`select`,required:!0,placeholder:`Select a group`,fetchOptionsKey:`candidateGroups`}]},bx={getOptions:async e=>e.fetchOptionsKey===`candidateGroups`?Yb():[],submit:async(e,t,{dynamicOptions:n})=>{let r=(n.groupId??[]).find(t=>String(t.value)===String(e.groupId));await Xb({candidateIds:t.selectedIds,groupId:e.groupId,groupName:r?.label??``})}},xx={title:`Self Assign`,okText:`Yes`,cancelText:`No`,width:420,bodyText:`Are you sure you want to assign this job?`,fields:[]},Sx={onOk:async e=>{await Zb({jobIds:e.selectedIds})}},Cx={getTitleText:(e,t,n)=>{let r=n?.jobTitle||n?.title||``;return r?`Assign - ${r}`:`Assign`},okText:`Assign`,width:520,disabledUntilFilled:!0,showAlreadyAssigned:!0,fields:[{name:`assignToUserId`,label:`Assign to`,type:`select`,required:!0,placeholder:`Select a user`,fetchOptionsKey:`assignToUsers`},{name:`candidateRate`,label:`Candidate Rate`,type:`candidate-rate`},{name:`priority`,label:`Priority`,type:`priority-checkbox`,checkboxLabel:`Mark as High`}]},wx={getOptions:async e=>e.fetchOptionsKey===`assignToUsers`?Qb():[],loadExtraData:async e=>$b(e.selectedIds[0]),submit:async(e,t,{removedIds:n,extraData:r})=>{await ex({jobIds:t.selectedIds,userId:e.assignToUserId,rate:e.candidateRate,priority:e.priority,removedIds:n,existingRecruiters:r?.recruitersData})}},Tx={title:`Add Sticky Notes`,okText:`Save`,width:480,fields:[{name:`heading`,label:`Heading`,type:`input`,required:!0,placeholder:`Enter heading`},{name:`targetDate`,label:`Target Date`,type:`date-picker`,required:!1},{name:`comments`,label:`Comments`,type:`mention-textarea`,required:!0,rows:5,placeholder:`Enter your note here... Use '@' to mention someone.`,mentionFetchKey:`mentionUsers`}]},Ex={getMentionOptions:async(e,t)=>Kb(t),submit:async(e,t)=>{let n=(e.comments?.match(/@([\w.]+)/g)??[]).map(e=>e.slice(1));await qb({relatedIds:t.selectedIds,module:t.moduleName,title:e.heading,targetDate:e.targetDate?e.targetDate.toISOString():``,notes:e.comments,mentionedUsers:n}),window.dispatchEvent(new Event(`sticky-notes:refresh`))}},Dx={title:`Move to Onboarding`,bodyText:`Are you sure you want to move this candidate to onboarding?`,okText:`Yes`,cancelText:`No`,width:420,successMessage:`Moved to onboarding successfully`,fields:[{name:`sendOnboardingEmail`,type:`priority-checkbox`,checkboxLabel:`Send Onboarding Email`}]},Ox={submit:async(e,t)=>{await tx({submissionId:t.selectedIds[0],isMail:e.sendOnboardingEmail})}};function kx(e){let t=(e.selectedRecords?.[0]??{}).candidateRate??{};return t.candidateAcceptedRate?{amount:t.candidateAcceptedRate,symbol:t.candidateAcceptedCurrencySymbol||`$`,unit:t.candidateAcceptedPayUnit}:null}var Ax={title:`Approve Rate`,okText:`Approve`,width:480,className:`medium-modal`,successMessage:`Rate approved`,getBodyText:(e,t,n,r,i)=>{let a=kx(i);return`Candidate Rate: ${a?`${a.symbol}${a.amount}/${a.unit}`:`-`}`},fields:[{name:`candidateProposedRate`,label:`Proposed Rate`,type:`number`,required:!0,placeholder:`Amount`,min:0,validator:(e,t)=>{if(e==null||e===``)return;let n=kx(t);if(n&&Number(e)<=Number(n.amount))return`Proposed rate must be greater than Candidate Rate`}},{name:`candidateProposedRateCurrency`,label:`Currency`,type:`select`,required:!0,defaultOptions:[{label:`$ USD`,value:`$`},{label:`₹ INR`,value:`₹`},{label:`€ EUR`,value:`€`}]},{name:`candidateProposedRateUnit`,label:`Unit`,type:`select`,required:!0,defaultOptions:[{label:`Year`,value:`yr`},{label:`Month`,value:`mo`},{label:`Week`,value:`wk`},{label:`Hour`,value:`hr`},{label:`Daily`,value:`day`}]},{name:`submitVia`,label:`Submit Via`,type:`radio`,required:!0,defaultOptions:[{label:`Mail`,value:`Mail`},{label:`VMS`,value:`VMS`}]}]},jx={submit:async(e,t)=>{let n=t.selectedIds[0];await nx(n,{candidateProposedRate:e.candidateProposedRate,candidateProposedRateCurrency:e.candidateProposedRateCurrency,candidateProposedRateUnit:e.candidateProposedRateUnit,submitVia:e.submitVia}),e.submitVia===`VMS`?await rx(n):u.message.info(`Approved — use Send Mail to notify the client.`)}},Mx=[{id:1,name:`Re-Submission`},{id:2,name:`Candidate doesn't fit into the profile`},{id:3,name:`Incomplete candidate details - (Re-Submission)`}],Nx={title:`Reject`,okText:`Reject`,okButtonDanger:!0,width:480,successMessage:`Submission rejected successfully`,fields:[{name:`rejectReason`,label:`Rejection Reasons`,type:`select`,required:!0,placeholder:`Select rejection reasons`,defaultOptions:Mx.map(e=>({label:e.name,value:e.id}))},{name:`rejectReasonComments`,label:`Comments`,type:`textarea`,required:!0,rows:4}]},Px={submit:async(e,t)=>{let n=Mx.find(t=>t.id===e.rejectReason);await ix({submissionId:t.selectedIds[0],rejectReasonId:e.rejectReason,rejectReason:n?.name??``,rejectReasonComments:e.rejectReasonComments})}},Fx={delete:Ib,"quick-submit":sx,"add-notes":lx,"tag-to-job":px,"change-status":hx,"remove-from-shortlist":_x,"add-to-groups":yx,"self-assign":xx,"others-assign":Cx,"sticky-notes":Tx,"move-to-onboarding":Dx,"approve-rate":Ax,reject:Nx},Ix={delete:ox,"quick-submit":cx,"add-notes":fx,"tag-to-job":mx,"change-status":gx,"remove-from-shortlist":vx,"add-to-groups":bx,"self-assign":Sx,"others-assign":wx,"sticky-notes":Ex,"move-to-onboarding":Ox,"approve-rate":jx,reject:Px},Lx={text:`input`,string:`input`,textarea:`textarea`,date:`date-picker`,datepicker:`date-picker`,multiselect:`multi-select`,lookup:`search-select`};function Rx(e){if(!e)return null;let t=[...e.groups??[]].sort((e,t)=>Number(e.order??0)-Number(t.order??0)).flatMap(e=>[...e.fields??[]].filter(e=>e.show!==0&&e.show!==!1).sort((e,t)=>Number(e.order??0)-Number(t.order??0)).map(e=>({...e,name:e.name??e.field,label:e.label??e.field,type:Lx[String(e.type??`text`).toLowerCase()]??e.type??`input`,required:e.required??e.req===1,options:(e.options??[]).map(e=>({label:e.label??e.name??e.value,value:e.value??e.id??e.label}))})));return{title:e.label,fields:t}}function zx({apiMap:e={},extraConfigs:t={}}){let n=(0,l.useMemo)(()=>({...Ix,...e}),[e]),r=(0,l.useMemo)(()=>({...Fx,...t}),[t]),{popupKey:i}=(0,p.useParams)(),a=(0,p.useNavigate)(),{state:o={}}=(0,p.useLocation)(),[s,c]=(0,l.useState)({key:``,config:null});(0,l.useEffect)(()=>{let e=!1;if(!i||!o.moduleName)return;let t=`${o.moduleName}:${i}`;return Nr(o.moduleName,`popup`,i).then(n=>{e||c({key:t,config:Rx(n[0])})}).catch(()=>{e||c({key:t,config:null})}),()=>{e=!0}},[i,o.moduleName]);let u=(0,l.useMemo)(()=>{let e=r[i],t=`${o.moduleName}:${i}`,n=s.key===t?s.config:null;return n?{...e,...n}:e},[s,r,i,o.moduleName]),d=(0,l.useMemo)(()=>({selectedIds:o.selectedIds??[],selectedRecords:o.selectedRecords??[],moduleName:o.moduleName??``,navigate:a,...o.popupContext??{}}),[a,o.selectedIds,o.selectedRecords,o.moduleName,o.popupContext]),m=(0,l.useMemo)(()=>{let e=o.popupAction;return e?.apiPath?{submit:(t,n)=>{let r=String(e.apiMethod||`POST`).toUpperCase();return J(E,e.apiPath.startsWith(`/`)?e.apiPath:`/${e.apiPath}`,{method:r,body:[`GET`,`DELETE`].includes(r)?void 0:JSON.stringify({...t,selectedIds:n.selectedIds,selectedRecords:n.selectedRecords,moduleName:n.moduleName})})}}:{}},[o.popupAction]);return(0,f.jsx)(Fb,{open:!0,config:u,context:d,onClose:()=>a(-1),api:{...n[i]??{},...m}})}var Bx={title:`Vendor Share`,maxVendorSelect:1e3,defaultTab:`myVendor`,defaultPageSize:10,vendorTabs:[{key:`myVendor`,label:`My Vendors`},{key:`allVendor`,label:`All Vendors`}],vendorColumns:[{title:`Vendor Name`,dataIndex:`vendorName`,key:`vendorName`},{title:`Email`,dataIndex:`vendorEmail`,key:`vendorEmail`},{title:`Location`,dataIndex:`vendorLocation`,key:`vendorLocation`},{title:`Updated On`,dataIndex:`updatedOn`,key:`updatedOn`}]},Vx={getVendorList:({jobId:e,limit:t,offset:n,type:r})=>vo({jobId:e,limit:t,offset:n,sortBy:`new`,type:r}),getMailDetails:e=>yo(e),submit:({jobId:e,toMail:t,ccMail:n,bccMail:r,subject:i,contents:a})=>bo({jobId:e,toMail:t,ccMail:n,bccMail:r,subject:i,contents:a})},Hx=Bx.vendorColumns.map(e=>({...e,render:e=>e||`-`}));function Ux(){let e=(0,p.useNavigate)(),t=(0,p.useLocation)(),{selectedIds:n=[],selectedRecords:r=[],recipients:i=[],subject:a=``,onSend:o,moduleName:s=``,popupAction:c={}}=t.state??{},m=n[0]??r[0]?._id??r[0]?.id,[h,g]=(0,l.useState)({to:i.join(`, `),cc:``,bcc:``,subject:a,contents:``,showCc:!1,showBcc:!1}),[_,v]=(0,l.useState)(!m),[y,b]=(0,l.useState)(Bx.defaultTab),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)([]),[T,E]=(0,l.useState)(0),[D,O]=(0,l.useState)(0),[k,A]=(0,l.useState)(0),[j,M]=(0,l.useState)(1),[N,P]=(0,l.useState)(Bx.defaultPageSize),[F,I]=(0,l.useState)(!1),[L,R]=(0,l.useState)([]);(0,l.useEffect)(()=>{if(!m)return;let e=!1;I(!0);let t=x?100:N,n=x?0:(j-1)*N;return Vx.getVendorList({jobId:m,limit:t,offset:n,type:y}).then(t=>{if(e)return;let n=t?.data?.vendorList??t?.data??[],r=t?.data?.myVendorCount??0,i=t?.data?.allVendorCount??0;w(Array.isArray(n)?n:[]),E(r),O(i),A(y===`myVendor`?r:i)}).catch(()=>{e||(w([]),A(0))}).finally(()=>{e||I(!1)}),()=>{e=!0}},[m,y,j,N,x]),(0,l.useEffect)(()=>{m&&Vx.getMailDetails(m).then(e=>g(t=>({...t,subject:e.subject||t.subject,contents:e.contents||t.contents,to:e.toMail?.length?Array.isArray(e.toMail)?e.toMail.join(`, `):String(e.toMail):t.to,cc:e.ccMail?.length?Array.isArray(e.ccMail)?e.ccMail.join(`, `):String(e.ccMail):t.cc}))).catch(()=>{}).finally(()=>v(!0))},[m]);let z=(0,l.useMemo)(()=>L.map(e=>C.find(t=>t.vendorId===e)?.vendorEmail??``).filter(Boolean),[L,C]),B=(0,l.useMemo)(()=>({...h,bcc:[...new Set([...Ny(h.bcc),...z])].join(`, `),showBcc:h.showBcc||z.length>0}),[h,z]);function V(e){let t=new Set(z);g({...e,bcc:Ny(e.bcc).filter(e=>!t.has(e)).join(`, `)})}let H=(Ny(B.to).length||Ny(B.bcc).length)&&Py(B.to)&&Py(B.cc)&&Py(B.bcc)&&B.subject.trim(),U=e=>e===`myVendor`?T:D;function W(){e(-1)}function G(){H&&Vx.submit({jobId:m,toMail:Ny(B.to),ccMail:Ny(B.cc),bccMail:Ny(B.bcc),subject:B.subject,contents:B.contents}).then(t=>{t?.status===!0?(u.message.success(t?.data||`Mail sent successfully.`),typeof o==`function`&&o({...B,message:B.contents,selectedIds:n}),e(-1)):u.message.error(t?.message||t?.data||`Failed to send mail. Please try again.`)}).catch(e=>{u.message.error(e?.message||`Failed to send mail. Please try again.`)})}let K=(0,l.useMemo)(()=>{if(!x)return C;let e=x.toLowerCase();return C.filter(t=>(t.vendorName??``).toLowerCase().includes(e)||(t.vendorEmail??``).toLowerCase().includes(e)||(t.vendorLocation??``).toLowerCase().includes(e))},[C,x]);return(0,f.jsx)(u.Drawer,{open:!0,placement:`right`,onClose:W,closable:!1,rootClassName:`vendor-share`,width:`95%`,footer:(0,f.jsxs)(`div`,{className:`vendor-share__footer`,children:[(0,f.jsx)(u.Button,{onClick:W,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,disabled:!H,onClick:G,children:`Send`})]}),children:(0,f.jsxs)(`div`,{className:`vendor-share__body`,children:[(0,f.jsxs)(`div`,{className:`vendor-share__left`,children:[(0,f.jsxs)(`div`,{className:`vendor-share__vendor-header`,children:[(0,f.jsxs)(`div`,{className:`vendor-share__vendor-header-row`,children:[(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.CloseOutlined,{}),onClick:W,size:`small`,style:{marginRight:8}}),(0,f.jsx)(`span`,{className:`dynamic-popup__header-icon-box`,children:(0,f.jsx)(d.TeamOutlined,{})}),(0,f.jsx)(`span`,{className:`dynamic-popup__header-label`,children:`Vendor List`}),(0,f.jsxs)(`div`,{className:`vendor-share__vendor-search`,children:[(0,f.jsx)(d.SearchOutlined,{className:`vendor-share__search-icon`}),(0,f.jsx)(u.Input,{variant:`borderless`,placeholder:`Search vendor`,value:x,onChange:e=>{S(e.target.value),M(1)},className:`vendor-share__search-input`})]})]}),(0,f.jsx)(`div`,{className:`vendor-share__vendor-tabs`,children:Bx.vendorTabs.map(e=>(0,f.jsxs)(`span`,{className:`vendor-share__vendor-tab${y===e.key?` vendor-share__vendor-tab--active`:``}`,onClick:()=>{b(e.key),M(1),R([])},children:[e.label,` (`,U(e.key),`)`]},e.key))})]}),(0,f.jsx)(`div`,{className:`vendor-share__vendor-table-wrapper`,children:(0,f.jsx)(u.Table,{rowKey:e=>e.vendorId,columns:Hx,dataSource:K,loading:F,pagination:!1,size:`small`,rowSelection:{selectedRowKeys:L,onChange:e=>{e.length>Bx.maxVendorSelect||R(e)}},scroll:{y:`calc(100vh - 340px)`}})}),(0,f.jsx)(`div`,{className:`vendor-share__vendor-footer`,children:(0,f.jsx)(Rs,{current:j,pageSize:N,total:k,onChange:e=>M(e),onPageSizeChange:e=>P(e)})})]}),(0,f.jsx)(`div`,{className:`vendor-share__right`,children:(0,f.jsx)(zy,{value:B,onChange:V,moduleName:s,defaultTemplateId:c.defaultTemplateId??t.state?.defaultTemplateId??``,ready:_,contextRecords:r,title:`Share`,hint:`Select vendors or add email addresses`,bccHint:`Vendor emails are added automatically`,afterBcc:L.length>0?(0,f.jsxs)(`div`,{className:`vendor-share__selected-count`,children:[L.length,` / `,Bx.maxVendorSelect,` Vendors selected`]}):null})})]})})}var Wx={EMAIL:/^[a-zA-Z0-9._%+-]+@[a-zA-Z][a-zA-Z-]*\.[a-zA-Z]{2,}$/,PHONE:/^[0-9]{10}$/,PASSWORD:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,ALPHABETS:/^[A-Za-z ]+$/,ALPHANUMERIC:/^(?!\s)[A-Za-z0-9 ]+$/,NUMBER:/^[0-9]+$/,URL:/^(https?:\/\/)?(www\.)?([a-zA-Z0-9-]+\.)+(com|org|net|in|co|io|gov|edu)(\/[^\s]*)?$/i,CANDIDATE_ID:/^[A-Za-z0-9-]+$/,REMARKS:/^[A-Za-z0-9\s.,'"\-()!?/@#$%&]*$/,DESIGNATION:/^[a-zA-Z0-9\s,.\-&()]{2,100}$/,DOB:/^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/\d{4}$/,COMPANY_NAME:/^[A-Za-z0-9\s&.,'()-]+$/,FIRST_NAME:/^[A-Z][a-zA-Z]*$/,FULL_NAME:/^[A-Z][a-zA-Z]*(?: [A-Z][a-zA-Z]*)*$/,NO_SPACES:/^\S+$/,STARTS_WITH_CAPITAL:/^[A-Z].*$/},Gx={SINGLE_FILE_COUNT:1,MULTI_FILE_COUNT:5,MAX_FILE_SIZE:2,ALLOWED_FILE_TYPES:[`image/jpeg`,`image/png`,`application/pdf`]},$={REQUIRED:e=>`Mandatory Field`,INVALID_EMAIL:`Please enter a valid email address.`,INVALID_PHONE:`Phone number must contain exactly 10 digits.`,INVALID_PASSWORD:`Password must contain uppercase, lowercase, number, special character and minimum 8 characters.`,INVALID_ALPHABETS:`Only alphabets and spaces are allowed.`,INVALID_ALPHANUMERIC:`Only letters, numbers and spaces are allowed.`,INVALID_NUMBER:`Only numbers are allowed.`,INVALID_URL:`Please enter a valid URL.`,INVALID_CANDIDATE_ID:e=>`${e} can contain only letters, numbers and hyphens.`,INVALID_REMARKS:`Remarks contain invalid characters.`,INVALID_DESIGNATION:`Designation contains invalid characters.`,INVALID_DOB:`DOB must be in MM/DD/YYYY format.`,INVALID_LINKEDIN:`Please enter a valid LinkedIn URL.`,INVALID_COMPANY_NAME:`Company name contains invalid characters.`,INVALID_FIRST_NAME:`First letter must be capital and spaces are not allowed.`,INVALID_FULL_NAME:`Each word must start with a capital letter.`,NO_SPACES_ALLOWED:`Spaces are not allowed.`,MUST_START_WITH_CAPITAL:`First letter must be capital.`,INVALID_FILE_TYPE:`Only JPG, PNG and PDF files are allowed.`,INVALID_FILE_SIZE:`File upload must be ${Gx.MAX_FILE_SIZE} MB below.`,INVALID_FILE_TYPE:`Only JPG, PNG and PDF files are allowed.`,SINGLE_FILE_ONLY:`Only one file can be uploaded.`},Kx={FIRST_NAME_MIN:3,FIRST_NAME_MAX:30},qx={REMARKS_MIN:10,REMARKS_MAX:250},Jx={removeSpaces:(e=``)=>e.replace(/\s/g,``),capitalizeFirstLetter:(e=``)=>e.charAt(0).toUpperCase()+e.slice(1),capitalizeWords:(e=``)=>e.replace(/\b\w/g,e=>e.toUpperCase()),removeExtraSpaces:(e=``)=>e.replace(/\s+/g,` `).trim(),firstNameFormatter:(e=``)=>e.replace(/\s+/g,` `).trimStart().replace(/\b\w/g,e=>e.toUpperCase()),fullNameFormatter:(e=``)=>e.replace(/\s+/g,` `).trimStart().replace(/\b\w/g,e=>e.toUpperCase()),phoneFormatter:(e=``)=>e.replace(/\D/g,``).slice(0,10),dobFormatter:(e=``)=>{let t=e.replace(/\D/g,``);return t.length<=2?t:t.length<=4?`${t.slice(0,2)}/${t.slice(2)}`:`${t.slice(0,2)}/${t.slice(2,4)}/${t.slice(4,8)}`}},Yx={required:(e=`Field`)=>({required:!0,message:$.REQUIRED(e)}),email:()=>({pattern:Wx.EMAIL,message:$.INVALID_EMAIL}),phone:()=>({pattern:Wx.PHONE,message:$.INVALID_PHONE}),password:()=>({pattern:Wx.PASSWORD,message:$.INVALID_PASSWORD}),alphabets:()=>({pattern:Wx.ALPHABETS,message:$.INVALID_ALPHABETS}),alphanumeric:()=>({pattern:Wx.ALPHANUMERIC,message:$.INVALID_ALPHANUMERIC}),number:()=>({pattern:Wx.NUMBER,message:$.INVALID_NUMBER}),url:()=>({pattern:Wx.URL,message:$.INVALID_URL}),candidateId:(e=`ID`)=>({pattern:Wx.CANDIDATE_ID,message:$.INVALID_CANDIDATE_ID(e)}),remarks:()=>({pattern:Wx.REMARKS,message:$.INVALID_REMARKS,REMARKS_MIN:`Remarks must be at least ${qx.REMARKS_MIN} characters.`,REMARKS_MAX:`Remarks must not exceed ${qx.REMARKS_MAX} characters.`}),designation:()=>({pattern:Wx.DESIGNATION,message:$.INVALID_DESIGNATION}),dob:(e=!0)=>({validator:(t,n)=>{if(!n)return e?Promise.reject(Error(`Date of Birth is required.`)):Promise.resolve();if(!Wx.DOB.test(n))return Promise.reject(Error($.INVALID_DOB));let r=(0,m.default)(n,`MM/DD/YYYY`,!0);if(!r.isValid())return Promise.reject(Error($.INVALID_DOB));let i=(0,m.default)().endOf(`day`);return r.isAfter(i)?Promise.reject(Error(`Date of Birth cannot be a future date.`)):i.diff(r,`year`)<21?Promise.reject(Error(`Age must be at least 21 years.`)):Promise.resolve()}}),linkedin:()=>({pattern:Wx.LINKEDIN,message:$.INVALID_LINKEDIN}),companyName:()=>({pattern:Wx.COMPANY_NAME,message:$.INVALID_COMPANY_NAME}),firstName:()=>({pattern:Wx.FIRST_NAME,message:$.INVALID_FIRST_NAME,FIRST_NAME_MIN:`First Name must be at least ${Kx.FIRST_NAME_MIN} characters.`,FIRST_NAME_MAX:`First Name must not exceed ${Kx.FIRST_NAME_MAX} characters.`}),firstNameMinLength:()=>({min:Kx.FIRST_NAME_MIN,message:$.FIRST_NAME_MIN}),firstNameMaxLength:()=>({max:Kx.FIRST_NAME_MAX,message:$.FIRST_NAME_MAX}),remarksMinLength:()=>({min:qx.REMARKS_MIN,message:$.REMARKS_MIN}),remarksMaxLength:()=>({max:qx.REMARKS_MAX,message:$.REMARKS_MAX}),fullName:()=>({pattern:Wx.FULL_NAME,message:$.INVALID_FULL_NAME}),noSpaces:()=>({pattern:Wx.NO_SPACES,message:$.NO_SPACES_ALLOWED}),startsWithCapital:()=>({pattern:Wx.STARTS_WITH_CAPITAL,message:$.MUST_START_WITH_CAPITAL}),fileUpload:()=>({validator:(e,t)=>{if(!t||t.length===0)return Promise.resolve();for(let e of t){let t=e.originFileObj||e;if(!(t.size/1024/1024<=Gx.MAX_FILE_SIZE))return u.message.error($.INVALID_FILE_SIZE),Promise.reject(Error($.INVALID_FILE_SIZE));if(!Gx.ALLOWED_FILE_TYPES.includes(t.type))return Promise.reject(Error($.INVALID_FILE_TYPE))}return Promise.resolve()}}),singleFileUpload:()=>({validator:(e,t)=>{if(!t||t.length===0)return Promise.resolve();if(t.length>Gx.SINGLE_FILE_COUNT)return Promise.reject(Error($.SINGLE_FILE_ONLY));let n=t[0];return n.size/1024/1024<Gx.MAX_FILE_SIZE?Gx.ALLOWED_FILE_TYPES.includes(n.type)?Promise.resolve():Promise.reject(Error($.INVALID_FILE_TYPE)):Promise.reject(Error($.INVALID_FILE_SIZE))}}),multiFileUpload:()=>({validator:(e,t)=>{if(!t||t.length===0)return Promise.resolve();if(t.length>Gx.MULTI_FILE_COUNT)return Promise.reject(Error($.INVALID_FILE_COUNT));for(let e of t){if(!(e.size/1024/1024<Gx.MAX_FILE_SIZE))return Promise.reject(Error($.INVALID_FILE_SIZE));if(!Gx.ALLOWED_FILE_TYPES.includes(e.type))return Promise.reject(Error($.INVALID_FILE_TYPE))}return Promise.resolve()}})},Xx={beforeUpload:e=>[`image/jpeg`,`image/png`,`application/pdf`].includes(e.type)?e.size/1024/1024<=2?!1:(u.message.error(`File upload must be 2 MB below.`),u.Upload.LIST_IGNORE):(u.message.error(`Only JPG, PNG and PDF files are allowed.`),u.Upload.LIST_IGNORE)},Zx=()=>{let[e]=u.Form.useForm();return(0,f.jsx)(`div`,{style:{padding:24},children:(0,f.jsxs)(u.Form,{form:e,layout:`vertical`,onFinish:e=>{console.log(`Form Values:`,e)},autoComplete:`off`,children:[(0,f.jsxs)(u.Row,{gutter:16,children:[(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Email`,name:`email`,rules:[Yx.required(`Email`),Yx.email()],children:(0,f.jsx)(u.Input,{})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Phone Number`,name:`phone`,rules:[Yx.required(`Phone Number`),Yx.phone()],validateTrigger:[`onBlur`,`onChange`],children:(0,f.jsx)(u.Input,{maxLength:10,onChange:t=>{e.setFieldsValue({phone:Jx.phoneFormatter(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Password`,name:`password`,rules:[Yx.required(`Password`),Yx.password()],children:(0,f.jsx)(u.Input.Password,{})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Full Name`,name:`fullName`,rules:[Yx.required(`Full Name`),Yx.alphabets(),Yx.firstNameMinLength(),Yx.firstNameMaxLength()],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({fullName:Jx.firstNameFormatter(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Username`,name:`username`,rules:[Yx.required(`Username`),Yx.alphanumeric()],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({username:Jx.removeExtraSpaces(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Website URL`,name:`website`,rules:[Yx.required(`Website URL`),Yx.url()],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({website:Jx.removeExtraSpaces(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`MSP Req ID`,name:`mspreqID`,rules:[Yx.required(`MSP Req ID`),Yx.candidateId(`MSP Req ID`)],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({mspreqID:Jx.removeExtraSpaces(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Candidate ID`,name:`candidateId`,rules:[Yx.required(`Candidate ID`),Yx.candidateId(`Candidate ID`)],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({candidateId:Jx.removeExtraSpaces(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:24,children:(0,f.jsx)(u.Form.Item,{label:`Remarks`,name:`remarks`,rules:[Yx.required(`Remarks`),Yx.remarks(),Yx.remarksMinLength(),Yx.remarksMaxLength()],children:(0,f.jsx)(u.Input.TextArea,{rows:4})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Designation`,name:`designation`,rules:[Yx.required(`Designation`),Yx.designation()],children:(0,f.jsx)(u.Input,{})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Date of Birth`,name:`dob`,rules:[Yx.dob()],children:(0,f.jsx)(u.Input,{placeholder:`MM/DD/YYYY`,maxLength:10,onChange:t=>{e.setFieldsValue({dob:Jx.dobFormatter(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Company Name`,name:`companyName`,rules:[Yx.required(`Company Name`),Yx.companyName()],children:(0,f.jsx)(u.Input,{})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{name:`contractType`,label:`Contract Type`,children:(0,f.jsxs)(u.Select,{showSearch:!0,allowClear:!0,filterOption:(e,t)=>(t?.label??``).toLowerCase().includes(e.toLowerCase()),children:[(0,f.jsx)(u.Select.Option,{value:`C2C`,label:`C2C`,children:`C2C`}),(0,f.jsx)(u.Select.Option,{value:`W2-Contract`,label:`W2-Contract`,children:`W2-Contract`}),(0,f.jsx)(u.Select.Option,{value:`W2-Fulltime`,label:`W2-Fulltime`,children:`W2-Fulltime`}),(0,f.jsx)(u.Select.Option,{value:`1099`,label:`1099`,children:`1099`})]})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{name:`candidateProposedRateCurrency`,label:`Currency`,children:(0,f.jsxs)(u.Select,{showSearch:!0,allowClear:!0,children:[(0,f.jsx)(u.Select.Option,{value:`$`,children:`$`}),(0,f.jsx)(u.Select.Option,{value:`₹`,children:`₹`}),(0,f.jsx)(u.Select.Option,{value:`€`,children:`€`}),(0,f.jsx)(u.Select.Option,{value:`zł`,children:`zł`}),(0,f.jsx)(u.Select.Option,{value:`£`,children:`£`}),(0,f.jsx)(u.Select.Option,{value:`kr`,children:`kr`}),(0,f.jsx)(u.Select.Option,{value:`Fr`,children:`Fr`}),(0,f.jsx)(u.Select.Option,{value:`kr`,children:`kr`})]})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Resume new`,name:`resume`,children:(0,f.jsx)(u.Upload,{beforeUpload:Xx.beforeUpload,maxCount:1,children:(0,f.jsx)(u.Button,{children:`Upload Resume`})})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Documents`,name:`documents`,valuePropName:`fileList`,getValueFromEvent:e=>e?.fileList,rules:[Yx.multiFileUpload()],children:(0,f.jsx)(u.Upload,{multiple:!0,beforeUpload:Xx.beforeUpload,children:(0,f.jsx)(u.Button,{children:`Upload Documents`})})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Upload File`,name:`file`,valuePropName:`fileList`,getValueFromEvent:e=>e?.fileList,rules:[Yx.fileUpload()],children:(0,f.jsx)(u.Upload,{beforeUpload:Xx.beforeUpload,maxCount:1,children:(0,f.jsx)(u.Button,{children:`Upload`})})})})]}),(0,f.jsx)(u.Row,{children:(0,f.jsx)(u.Form.List,{name:`users`,children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t,...r})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{required:!0,...r,rules:[{required:!0,message:`First name is requried`}],name:[t,`first`],children:(0,f.jsx)(u.Input,{placeholder:`First Name`})})}),(0,f.jsx)(u.Col,{span:11,children:(0,f.jsx)(u.Form.Item,{...r,required:!0,name:[t,`last`],children:(0,f.jsx)(u.Input,{placeholder:`Last Name`})})}),(0,f.jsx)(u.Col,{span:1,children:(0,f.jsx)(d.MinusCircleOutlined,{onClick:()=>n(t)})})]})),(0,f.jsx)(u.Form.Item,{children:(0,f.jsx)(u.Button,{type:`dashed`,onClick:()=>t(),block:!0,icon:(0,f.jsx)(d.PlusOutlined,{}),children:`Add field`})})]})})}),(0,f.jsxs)(u.Form.Item,{children:[(0,f.jsx)(u.Button,{type:`primary`,htmlType:`submit`,children:`Submit`}),(0,f.jsx)(u.Button,{style:{marginLeft:10},onClick:()=>e.resetFields(),children:`Reset`})]})]})})},{Text:Qx}=u.Typography,$x=[{label:`Total Jobs`,value:1697,icon:`fileText`},{label:`Active Jobs`,value:1685,icon:`checkCircle`},{label:`My Jobs`,value:600,icon:`user`}],eS={fileText:(0,f.jsx)(d.FileTextOutlined,{}),checkCircle:(0,f.jsx)(d.CheckCircleOutlined,{}),user:(0,f.jsx)(d.UserOutlined,{}),filter:(0,f.jsx)(d.FilterOutlined,{})};function tS({stats:e=$x}){return(0,f.jsx)(u.Card,{children:(0,f.jsx)(u.Row,{gutter:[12,12],children:e.map(e=>(0,f.jsx)(u.Col,{xs:24,sm:24,md:8,lg:8,xl:8,children:(0,f.jsxs)(u.Card,{className:`stats-inner-card`,children:[(0,f.jsxs)(u.Space,{align:`center`,children:[eS[e.icon]??eS.fileText,(0,f.jsx)(Qx,{children:e.label})]}),(0,f.jsx)(u.Statistic,{value:e.value})]})},e.label))})})}var{Text:nS}=u.Typography,rS=[{key:`job`,label:`Jobs`},{key:`candidate`,label:`Candidates`},{key:`submissions`,label:`Submissions`}],iS=[{key:`listView`,label:`List View`},{key:`filter`,label:`Filter`},{key:`form`,label:`Form`}];function aS({field:e,index:t,onToggle:n,onReorder:r}){let i=(0,l.useRef)(null),[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(!1);function p(e){i.current=t,e.dataTransfer.effectAllowed=`move`,c(!0)}function m(){c(!1),o(!1)}function h(e){e.preventDefault(),o(!0)}function g(){o(!1)}function _(e){e.preventDefault(),o(!1),i.current!==null&&i.current!==t&&r(i.current,t),i.current=null}return(0,f.jsxs)(`div`,{draggable:!0,onDragStart:p,onDragEnd:m,onDragOver:h,onDragLeave:g,onDrop:_,className:`uss-field-row with-edit${a?` drag-over`:``}${s?` dragging`:``}`,children:[(0,f.jsx)(`span`,{className:`uss-drag-handle`,children:(0,f.jsx)(d.HolderOutlined,{})}),(0,f.jsxs)(`span`,{className:`uss-field-name`,children:[e.fieldName,(0,f.jsx)(`span`,{className:`uss-field-key`,children:e.fieldKey})]}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:e.isVisible,onChange:e=>n(t,`isVisible`,e)})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.isEditable,onChange:e=>n(t,`isEditable`,e)})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.ismandatory,onChange:e=>n(t,`ismandatory`,e)})})]})}function oS({team:e,configType:t}){let[n,r]=(0,l.useState)({}),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)({}),[c,d]=(0,l.useState)(`job`);(0,l.useEffect)(()=>{e&&(a(!0),ar(e,t).then(r).catch(()=>u.message.error(`Failed to load field config`)).finally(()=>a(!1)))},[e,t]);let p=n[c]??[];function m(e,t){r(n=>({...n,[e]:typeof t==`function`?t(n[e]??[]):t}))}function h(e,t,n){m(c,r=>r.map((r,i)=>i===e?{...r,[t]:n}:r))}function g(e,t){m(c,n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r.map((e,t)=>({...e,order:t}))})}async function _(){let n=c;s(e=>({...e,[n]:!0}));try{await cr(e,n,p,t),u.message.success(`Saved`)}catch{u.message.error(`Save failed`)}finally{s(e=>({...e,[n]:!1}))}}return(0,f.jsxs)(u.Spin,{spinning:i,children:[(0,f.jsx)(u.Tabs,{size:`small`,activeKey:c,onChange:d,items:rS.map(e=>({key:e.key,label:e.label}))}),(0,f.jsxs)(`div`,{className:`uss-field-header with-edit`,children:[(0,f.jsx)(`span`,{}),(0,f.jsx)(`span`,{children:`Field`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Visible`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Editable`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Mandatory`})]}),(0,f.jsxs)(`div`,{className:`uss-field-list`,children:[p.length===0&&!i&&(0,f.jsx)(`div`,{className:`uss-empty`,children:`No fields found.`}),p.map((e,t)=>(0,f.jsx)(aS,{field:e,index:t,onToggle:h,onReorder:g},e.fieldKey??t))]}),(0,f.jsx)(`div`,{className:`uss-modal-footer`,children:(0,f.jsxs)(u.Button,{type:`primary`,size:`small`,loading:o[c],onClick:_,children:[`Save `,rS.find(e=>e.key===c)?.label]})})]})}function sS(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(`listView`),[c,p]=(0,l.useState)([]),[m,h]=(0,l.useState)(0),[g,_]=(0,l.useState)(!1),[v,y]=(0,l.useState)(``),[b,x]=(0,l.useState)(!1),S=(0,l.useCallback)(async()=>{_(!0);try{let e=await tr();p(e.teams),h(e.total)}catch{u.message.error(`Failed to load teams`)}finally{_(!1)}},[]);(0,l.useEffect)(()=>{S()},[S]);function C(e){t(e),s(`listView`),r(!0)}function w(e){t(e),y(e.teamName??``),a(!0)}async function T(){if(!v.trim()){u.message.warning(`Team name is required`);return}x(!0);try{await nr(e,{teamName:v.trim(),managerId:e.managerId,memberIds:e.memberIds}),u.message.success(`Team updated`),a(!1),S()}catch{u.message.error(`Failed to update team`)}finally{x(!1)}}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Z,{icon:(0,f.jsx)(d.TeamOutlined,{}),title:`Teams`,style:{marginBottom:0},bodyStyle:{padding:0},children:(0,f.jsx)(gf,{listName:`Teams`,dataSource:c,fields:[{label:`Team Name`,value:`teamName`,width:200},{label:`Manager`,value:`manager`,width:200},{label:`Members`,value:`memberCount`,width:90,sorter:!1},{label:`Actions`,value:`_actions`,width:160,sorter:!1,render:(e,t)=>(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,f.jsx)(u.Button,{size:`small`,type:`link`,onClick:()=>w(t),children:`Edit`}),(0,f.jsx)(u.Button,{size:`small`,type:`link`,onClick:()=>C(t),children:`Configure`})]})}],loading:g,total:m})}),(0,f.jsx)(u.Modal,{open:i,onCancel:()=>a(!1),title:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.TeamOutlined,{style:{color:`var(--color-brand)`,marginRight:6}}),`Edit Team`]}),width:420,footer:null,destroyOnClose:!0,children:(0,f.jsxs)(`div`,{className:`uss-edit-team-body`,style:{paddingTop:12},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`uss-edit-team-label`,children:`Team Name`}),(0,f.jsx)(u.Input,{value:v,onChange:e=>y(e.target.value),onPressEnter:T,placeholder:`Enter team name`})]}),(0,f.jsxs)(`div`,{className:`uss-modal-footer`,children:[(0,f.jsx)(u.Button,{onClick:()=>a(!1),children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:b,onClick:T,children:`Save`})]})]})}),(0,f.jsxs)(u.Modal,{className:`uss-modal`,open:n,onCancel:()=>r(!1),title:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(d.TeamOutlined,{style:{color:`var(--color-brand)`}}),(0,f.jsxs)(`span`,{children:[`Configure: `,e?.teamName]})]}),width:720,footer:null,destroyOnClose:!0,children:[(0,f.jsx)(`div`,{style:{marginBottom:12},children:(0,f.jsx)(`div`,{className:`uss-config-toggle`,children:iS.map(e=>(0,f.jsx)(`button`,{className:`uss-config-btn${o===e.key?` active`:``}`,onClick:()=>s(e.key),children:e.label},e.key))})}),e&&(0,f.jsx)(oS,{team:e,configType:o},`${e?.teamId}-${o}`)]})]})}var cS=[`view`,`add`,`edit`,`delete`],lS={view:`View`,add:`Add`,edit:`Edit`,delete:`Delete`,sourcing:`Sourcing`,assign:`Assign`,share:`Share`,change_status:`Status`,my_jobs:`My Jobs`,all_jobs:`All Jobs`};function uS(e){return lS[e]??e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function dS(e){let t=cS.filter(t=>e.includes(t)),n=e.filter(e=>!cS.includes(e)).sort();return[...t,...n]}function fS(e){let t=new Set;return Object.values(e).forEach(({permissions:e})=>Object.keys(e??{}).forEach(e=>t.add(e))),dS([...t])}function pS(e){let t=0,n=0;return Object.values(e).forEach(({permissions:e})=>{Object.values(e??{}).forEach(({value:e})=>{n++,e===`1`&&t++})}),{enabled:t,total:n}}var mS=`perm-module-labels`,hS=`perm-action-labels`;function gS(e){try{return JSON.parse(localStorage.getItem(e)??`{}`)}catch{return{}}}function _S(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function vS({value:e,onSave:t,className:n}){let[r,i]=(0,l.useState)(!1),[a,o]=(0,l.useState)(e);(0,l.useEffect)(()=>{o(e)},[e]);function s(){i(!1);let n=a.trim();n&&n!==e?t(n):o(e)}return r?(0,f.jsx)(`input`,{autoFocus:!0,className:`perm-inline-input${n?` ${n}`:``}`,value:a,style:{width:Math.max(48,a.length*8)},onChange:e=>o(e.target.value),onBlur:s,onKeyDown:t=>{t.key===`Enter`&&s(),t.key===`Escape`&&(i(!1),o(e)),t.stopPropagation()},onClick:e=>e.stopPropagation()}):(0,f.jsxs)(`span`,{className:`perm-editable-name${n?` ${n}`:``}`,onDoubleClick:e=>{e.stopPropagation(),i(!0)},children:[e,(0,f.jsx)(d.EditOutlined,{className:`perm-name-edit-icon`})]})}function yS({permKey:e,entry:t,label:n,onToggle:r,onLabelSave:i}){let[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(n),p=t?.value===`1`,m=!!t;(0,l.useEffect)(()=>{c(n)},[n]);function h(){o(!1);let e=s.trim();e&&e!==n?i(e):c(n)}return(0,f.jsx)(u.Tooltip,{title:m?p?`Click to disable`:`Click to enable`:`Not applicable for this module`,children:(0,f.jsxs)(`div`,{className:`perm-action-pill${p?` on`:``}${m?``:` na`}`,onClick:()=>{!a&&m&&r()},children:[(0,f.jsx)(`span`,{className:`perm-action-pill-dot${p?` on`:``}`}),a?(0,f.jsx)(`input`,{autoFocus:!0,className:`perm-pill-input`,value:s,style:{width:Math.max(36,s.length*7)},onChange:e=>c(e.target.value),onBlur:h,onKeyDown:e=>{e.key===`Enter`&&h(),e.key===`Escape`&&(o(!1),c(n)),e.stopPropagation()},onClick:e=>e.stopPropagation()}):(0,f.jsx)(`span`,{className:`perm-action-pill-label`,onDoubleClick:e=>{e.stopPropagation(),o(!0)},children:n}),p&&!a&&(0,f.jsx)(d.CheckOutlined,{className:`perm-action-pill-check`})]})})}function bS({menuName:e,menuData:t,permKeys:n,onChange:r,displayName:i,actionLabels:a,onModuleLabelSave:o,onActionLabelSave:s}){let c=t?.permissions??{},l=Object.values(c).filter(e=>e?.value===`1`).length,u=Object.keys(c).length,d=u>0&&l===u;return(0,f.jsxs)(`div`,{className:`perm-module-card${d?` all-on`:l>0&&!d?` some-on`:``}`,children:[(0,f.jsxs)(`div`,{className:`perm-module-card-header`,children:[(0,f.jsx)(vS,{value:i,onSave:t=>o(e,t),className:`perm-module-card-name`}),u>0&&(0,f.jsxs)(`span`,{className:`perm-module-card-badge${l>0?` active`:``}`,children:[l,`/`,u]})]}),(0,f.jsx)(`div`,{className:`perm-module-card-body`,children:n.map(t=>(0,f.jsx)(yS,{permKey:t,entry:c[t],label:a[t]??uS(t),onToggle:()=>r(e,t),onLabelSave:e=>s(t,e)},t))})]})}function xS({label:e,onSave:t,onDelete:n,loading:r}){let[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(e);function c(){a(!1);let n=o.trim();n&&n!==e?t(n):s(e)}return(0,f.jsxs)(`div`,{className:`perm-manage-row`,children:[i?(0,f.jsx)(`input`,{autoFocus:!0,className:`perm-inline-input`,value:o,style:{flex:1,minWidth:0},onChange:e=>s(e.target.value),onBlur:c,onKeyDown:t=>{t.key===`Enter`&&c(),t.key===`Escape`&&(a(!1),s(e))}}):(0,f.jsx)(`span`,{className:`perm-manage-row-label`,children:e}),(0,f.jsxs)(`div`,{className:`perm-manage-row-actions`,children:[(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{s(e),a(!0)},loading:r}),(0,f.jsx)(u.Popconfirm,{title:`Delete this item?`,onConfirm:n,okText:`Delete`,cancelText:`Cancel`,okType:`danger`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.DeleteOutlined,{}),danger:!0})})]})]})}function SS({open:e,onClose:t}){let[n,r]=(0,l.useState)(`modules`),[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(!1),[c,p]=(0,l.useState)(``),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)(!1),[b,x]=(0,l.useState)(``),[S,C]=(0,l.useState)(``),[w,T]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&(E(),D())},[e]);async function E(){s(!0);try{a(await br())}catch{u.message.error(`Failed to load modules`)}finally{s(!1)}}async function D(){y(!0);try{_(await wr())}catch{u.message.error(`Failed to load actions`)}finally{y(!1)}}async function O(){let e=c.trim();if(!e){u.message.warning(`Enter a module name`);return}h(!0);try{let t=await xr({menuName:e});a(e=>[...e,t]),p(``),u.message.success(`Module added`)}catch{u.message.error(`Failed to add module`)}finally{h(!1)}}async function k(e,t){try{await Sr(e,{menuName:t}),a(n=>n.map(n=>n.MENUID===e?{...n,MENUNAME:t}:n))}catch{u.message.error(`Failed to update module`)}}async function A(e){try{await Cr(e),a(t=>t.filter(t=>t.MENUID!==e)),u.message.success(`Module deleted`)}catch{u.message.error(`Failed to delete module`)}}async function j(){let e=b.trim(),t=S.trim().toLowerCase().replace(/\s+/g,`_`);if(!e||!t){u.message.warning(`Enter both name and key`);return}T(!0);try{let n=await Tr({permissionName:e,permissionKey:t});_(e=>[...e,n]),x(``),C(``),u.message.success(`Action added`)}catch(e){u.message.error(e?.message?.includes(`409`)||e?.status===409?`Permission key already exists`:`Failed to add action`)}finally{T(!1)}}async function M(e,t){try{await Er(e,{permissionName:t}),_(n=>n.map(n=>n.permissionId===e?{...n,permissionName:t}:n))}catch{u.message.error(`Failed to update action`)}}async function N(e){try{await Dr(e),_(t=>t.filter(t=>t.permissionId!==e)),u.message.success(`Action deleted`)}catch{u.message.error(`Failed to delete action`)}}let P=[{key:`modules`,label:`Modules`,children:(0,f.jsxs)(u.Spin,{spinning:o,children:[(0,f.jsxs)(`div`,{className:`perm-manage-add-row`,children:[(0,f.jsx)(u.Input,{placeholder:`Module name`,value:c,onChange:e=>p(e.target.value),onPressEnter:O,style:{flex:1},size:`small`}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),loading:m,onClick:O,children:`Add`})]}),(0,f.jsxs)(`div`,{className:`perm-manage-list`,children:[i.length===0&&!o&&(0,f.jsx)(`div`,{className:`perm-empty`,style:{paddingTop:24},children:`No modules found`}),i.map(e=>(0,f.jsx)(xS,{label:e.MENUNAME,onSave:t=>k(e.MENUID,t),onDelete:()=>A(e.MENUID)},e.MENUID))]})]})},{key:`actions`,label:`Actions`,children:(0,f.jsxs)(u.Spin,{spinning:v,children:[(0,f.jsxs)(`div`,{className:`perm-manage-add-row`,children:[(0,f.jsx)(u.Input,{placeholder:`Action name (e.g. Approve)`,value:b,onChange:e=>x(e.target.value),style:{flex:1},size:`small`}),(0,f.jsx)(u.Input,{placeholder:`Key (e.g. approve)`,value:S,onChange:e=>C(e.target.value),onPressEnter:j,style:{width:140},size:`small`}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),loading:w,onClick:j,children:`Add`})]}),(0,f.jsxs)(`div`,{className:`perm-manage-list`,children:[g.length===0&&!v&&(0,f.jsx)(`div`,{className:`perm-empty`,style:{paddingTop:24},children:`No actions found`}),g.map(e=>(0,f.jsx)(xS,{label:`${e.permissionName} (${e.permissionKey})`,onSave:t=>M(e.permissionId,t),onDelete:()=>N(e.permissionId)},e.permissionId))]})]})}];return(0,f.jsx)(u.Modal,{open:e,onCancel:t,title:(0,f.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(d.SettingOutlined,{style:{color:`var(--color-brand)`}}),`Manage Modules & Actions`]}),width:520,footer:null,destroyOnClose:!0,children:(0,f.jsx)(u.Tabs,{activeKey:n,onChange:r,size:`small`,items:P})})}function CS({role:e,moduleLabels:t,actionLabels:n,onModuleLabelSave:r,onActionLabelSave:i}){let[a,o]=(0,l.useState)({}),[s,c]=(0,l.useState)({}),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(!1),y=Zn(e);(0,l.useEffect)(()=>{y&&(m(!0),v(!1),Or(y).then(e=>{o(e),c(e)}).catch(()=>u.message.error(`Failed to load permissions`)).finally(()=>m(!1)))},[y]);function b(e,t){v(!0),c(n=>{let r=n[e]??{menuId:a[e]?.menuId??0,permissions:{}},i=r.permissions?.[t]??{id:0,value:`0`};return{...n,[e]:{...r,permissions:{...r.permissions,[t]:{...i,value:i.value===`1`?`0`:`1`}}}}})}async function x(){g(!0);try{await kr(y,s),o(s),v(!1),u.message.success(`Permissions saved`)}catch{u.message.error(`Save failed`)}finally{g(!1)}}let S=(0,l.useMemo)(()=>Object.keys(s).sort(),[s]),C=(0,l.useMemo)(()=>fS(s),[s]),{enabled:w,total:T}=(0,l.useMemo)(()=>pS(s),[s]);return(0,f.jsxs)(u.Spin,{spinning:p,children:[(0,f.jsxs)(`div`,{className:`perm-panel-header`,children:[(0,f.jsxs)(`div`,{className:`perm-panel-title`,children:[(0,f.jsx)(d.LockOutlined,{style:{color:`var(--color-brand)`,marginRight:6}}),(0,f.jsx)(`span`,{children:e?.roleName}),!p&&T>0&&(0,f.jsxs)(u.Tag,{color:`blue`,style:{marginLeft:8,fontSize:11},children:[w,`/`,T,` enabled`]})]}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.UnlockOutlined,{}),loading:h,disabled:!_,onClick:x,children:`Save Changes`})]}),(0,f.jsxs)(`div`,{className:`perm-hint`,children:[(0,f.jsx)(d.InfoCircleOutlined,{className:`perm-hint-icon`}),(0,f.jsxs)(`span`,{children:[`Click a pill to toggle. `,(0,f.jsx)(`strong`,{children:`Double-click`}),` a module name or action label to rename it — labels are saved locally.`]})]}),S.length===0&&!p?(0,f.jsx)(`div`,{className:`perm-empty`,children:`No permission entries found for this role.`}):(0,f.jsx)(`div`,{className:`perm-cards-grid`,children:S.map(e=>(0,f.jsx)(bS,{menuName:e,menuData:s[e],permKeys:C,onChange:b,displayName:t[e]??e,actionLabels:n,onModuleLabelSave:r,onActionLabelSave:i},e))})]})}function wS(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(null),[o,s]=(0,l.useState)(``),[c,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(()=>gS(mS)),[g,_]=(0,l.useState)(()=>gS(hS)),v=(0,l.useCallback)((e,t)=>{h(n=>{let r={...n,[e]:t};return _S(mS,r),r})},[]),y=(0,l.useCallback)((e,t)=>{_(n=>{let r={...n,[e]:t};return _S(hS,r),r})},[]);function b(){h({}),_({}),_S(mS,{}),_S(hS,{}),u.message.success(`Labels reset to defaults`)}let x=(0,l.useCallback)(async()=>{r(!0);try{let{roles:e}=await Qn();t(e),e.length>0&&a(e[0])}catch{u.message.error(`Failed to load roles`)}finally{r(!1)}},[]);(0,l.useEffect)(()=>{x()},[x]);let S=(0,l.useMemo)(()=>{let t=o.trim().toLowerCase();return t?e.filter(e=>e.roleName.toLowerCase().includes(t)):e},[e,o]),C=Object.keys(m).length>0||Object.keys(g).length>0;return(0,f.jsxs)(`div`,{className:`perm-page`,children:[(0,f.jsxs)(Z,{className:`perm-left-card`,icon:(0,f.jsx)(d.SafetyOutlined,{}),title:`Roles`,bodyStyle:{padding:0},children:[(0,f.jsx)(`div`,{className:`perm-role-search`,children:(0,f.jsx)(u.Input,{prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search roles…`,allowClear:!0,size:`small`,value:o,onChange:e=>s(e.target.value)})}),(0,f.jsx)(u.Spin,{spinning:n,children:(0,f.jsxs)(`div`,{className:`perm-role-list`,children:[S.length===0&&!n&&(0,f.jsx)(`div`,{className:`perm-role-empty`,children:`No roles found`}),S.map(e=>{let t=i?.roleId===e.roleId,n=e.description&&e.description!==`N/A`?e.description:e.roleType===0?`Default role`:`Custom role`;return(0,f.jsxs)(`div`,{className:`perm-role-item${t?` active`:``}`,onClick:()=>a(e),children:[(0,f.jsx)(`div`,{className:`perm-role-item-name`,children:e.roleName}),(0,f.jsx)(`div`,{className:`perm-role-item-desc`,children:n})]},e.roleId)})]})})]}),(0,f.jsx)(Z,{className:`perm-right-card`,icon:(0,f.jsx)(d.LockOutlined,{}),title:`Module Permissions`,extra:(0,f.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[C&&(0,f.jsx)(`button`,{className:`perm-reset-btn`,onClick:b,children:`Reset labels`}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.SettingOutlined,{}),onClick:()=>p(!0),children:`Manage`})]}),bodyStyle:{padding:`12px 16px`},children:i?(0,f.jsx)(CS,{role:i,moduleLabels:m,actionLabels:g,onModuleLabelSave:v,onActionLabelSave:y},i.roleId):(0,f.jsx)(`div`,{className:`perm-empty`,children:`Select a role from the left to manage its permissions.`})}),(0,f.jsx)(SS,{open:c,onClose:()=>p(!1)})]})}var{Title:TS,Text:ES}=u.Typography,DS=[{label:`In Progress`,value:107,sub:`Under review`,color:`blue`},{label:`Hired`,value:2,sub:`Onboarded`,color:`green`},{label:`Project Completed`,value:2,sub:`Project cycle closed`,color:`purple`},{label:`Archive`,value:2,sub:`No longer active`,color:`peach`}];function OS({items:e=DS}){return(0,f.jsx)(u.Card,{className:`onboarding-card`,title:(0,f.jsx)(TS,{level:5,children:`Onboarding`}),extra:(0,f.jsx)(u.Button,{type:`link`,children:`View all`}),children:(0,f.jsx)(u.Row,{gutter:[12,12],children:e.map(e=>(0,f.jsx)(u.Col,{xs:12,sm:6,md:6,lg:12,xl:12,children:(0,f.jsxs)(`div`,{className:`onboarding-item ${e.color}`,children:[(0,f.jsx)(ES,{className:`onboarding-item-label`,children:e.label}),(0,f.jsx)(u.Statistic,{value:e.value,className:`onboarding-stat`}),(0,f.jsx)(`div`,{className:`onboarding-item-footer`,children:(0,f.jsx)(ES,{className:`onboarding-item-sub`,children:e.sub})})]})},e.label))})})}var{Text:kS,Title:AS}=u.Typography,jS=[{group:`Dashboard`,items:[{id:`dashboard`,label:`Admin Dashboard`,icon:(0,f.jsx)(d.DashboardOutlined,{})}]},{group:`Settings`,items:[{id:`org`,label:`Organization`,icon:(0,f.jsx)(d.BankOutlined,{}),heading:`Organization Settings`,desc:`Manage your company profile and location details`,cards:[{label:`Company Information`,icon:(0,f.jsx)(d.BankOutlined,{}),desc:`Manage company profile, address and business details.`},{label:`Location`,icon:(0,f.jsx)(d.BuildOutlined,{}),desc:`Manage office locations, branches and regions.`}]},{id:`users`,label:`Users`,icon:(0,f.jsx)(d.UserOutlined,{}),heading:`Users`,desc:`Manage platform users and configure their field views.`,component:`users`},{id:`teams`,label:`Teams`,icon:(0,f.jsx)(d.TeamOutlined,{}),heading:`Teams`,desc:`Organize users into teams and configure field visibility per team.`,component:`teams`},{id:`roles`,label:`Roles`,icon:(0,f.jsx)(d.SafetyOutlined,{}),heading:`Roles`,desc:`Control permissions and configure field visibility per role.`,component:`roles`},{id:`permissions`,label:`Permissions`,icon:(0,f.jsx)(d.LockOutlined,{}),heading:`Permissions`,desc:`Manage module-wise action permissions (view, add, edit, delete, and more) per role.`,component:`permissions`},{id:`templates`,label:`Templates`,icon:(0,f.jsx)(d.FileTextOutlined,{}),heading:`Templates`,desc:`Email and signature templates for communications`,component:`templates`},{id:`ai-services`,label:`AI Services`,icon:(0,f.jsx)(d.ThunderboltOutlined,{}),heading:`AI Services`,desc:`Register the AI/automation backends (base URL + auth) that admin-configured AI Actions call.`,component:`ai-services`}]},{group:`Clients`,items:[{id:`clients`,label:`Clients`,icon:(0,f.jsx)(d.BankOutlined,{}),heading:`Clients`,desc:`Manage client accounts and settings`,cards:[{label:`Clients`,icon:(0,f.jsx)(d.BankOutlined,{}),desc:`Manage client companies and account details.`}]}]},{group:`Forms`,items:[{id:`form-groups`,label:`Form Groups`,icon:(0,f.jsx)(d.AppstoreAddOutlined,{}),heading:`Form Groups`,desc:`Define field groups for module add/edit forms with validations and dropdown sources.`,component:`form-groups`},{id:`detail-groups`,label:`Detail Groups`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),heading:`Detail Groups`,desc:`Customize the detail view per module: labels, prefix/suffix, colour, capitalization, reference lookups and merged fields.`,component:`detail-groups`},{id:`row-actions`,label:`Actions`,icon:(0,f.jsx)(d.ToolOutlined,{}),heading:`Actions`,desc:`Configure which action buttons appear per row in each module's list view, scoped per role.`,component:`row-actions`}]},{group:`Master`,items:[{id:`jobs`,label:`Jobs`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),heading:`Jobs Master`,desc:`Configure job sources and status types`,cards:[{label:`Sources`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),desc:`Manage job source master values.`},{label:`Job Status`,icon:(0,f.jsx)(d.CheckCircleOutlined,{}),desc:`Configure job workflow status.`}]},{id:`candidates`,label:`Candidates`,icon:(0,f.jsx)(d.UserOutlined,{}),heading:`Candidates Master`,desc:`Skills, sources and work authorization settings`,cards:[{label:`Sources`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),desc:`Manage candidate source values.`},{label:`Skills`,icon:(0,f.jsx)(d.SettingOutlined,{}),desc:`Manage skill master data.`},{label:`Work Authorization`,icon:(0,f.jsx)(d.SafetyOutlined,{}),desc:`Manage visa and authorization types.`}]},{id:`submissions`,label:`Submissions`,icon:(0,f.jsx)(d.FileTextOutlined,{}),heading:`Submissions Master`,desc:`Rejection reasons and submission status configuration`,cards:[{label:`Rejection Reasons`,icon:(0,f.jsx)(d.FileTextOutlined,{}),desc:`Manage common rejection reasons.`},{label:`Client Submission Status`,icon:(0,f.jsx)(d.CheckCircleOutlined,{}),desc:`Manage client submission statuses.`}]},{id:`clientmaster`,label:`Client Master`,icon:(0,f.jsx)(d.BankOutlined,{}),heading:`Client Master`,desc:`Payment terms, client types and contact types`,cards:[{label:`Payment Terms`,icon:(0,f.jsx)(d.FileTextOutlined,{}),desc:`Manage billing and payment terms.`},{label:`Client Type`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),desc:`Classify client business types.`},{label:`Client Contact Type`,icon:(0,f.jsx)(d.TeamOutlined,{}),desc:`Manage client contact categories.`}]}]}],MS=[{label:`Sourced`,count:312,color:`#378ADD`,pct:35},{label:`Screened`,count:223,color:`#7F77DD`,pct:25},{label:`Interview`,count:161,color:`#1D9E75`,pct:18},{label:`Offered`,count:107,color:`#EF9F27`,pct:12},{label:`Rejected`,count:89,color:`#E24B4A`,pct:10}],NS=[{name:`Tcs`,jobs:14,candidates:86},{name:`Empasis`,jobs:9,candidates:64},{name:`NovaSystems`,jobs:7,candidates:51},{name:`Brightwave`,jobs:5,candidates:38}],PS=[{text:`New candidate Ravi Kumar added to Java Developer role`,time:`2 min ago`,color:`#378ADD`},{text:`Submission approved by Acme Corp for Sr. React Dev`,time:`18 min ago`,color:`#1D9E75`},{text:`User Priya S. added to Recruiters team`,time:`1 hr ago`,color:`#7F77DD`},{text:`Job Data Analyst — TechFlow moved to archived`,time:`3 hr ago`,color:`#EF9F27`},{text:`Candidate rejected — work authorization mismatch`,time:`5 hr ago`,color:`#E24B4A`}];function FS(){return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16},children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.DashboardOutlined,{}),title:`Admin Dashboard`,children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(AS,{level:5,children:`Admin Dashboard`}),(0,f.jsx)(kS,{type:`secondary`,children:`Overview of jobs, candidates, onboarding and recent activity`})]}),(0,f.jsx)(`div`,{className:`admin-dashboard-stats`,children:(0,f.jsx)(tS,{stats:[{label:`Total Jobs`,value:1697,icon:`fileText`},{label:`Active Jobs`,value:1685,icon:`checkCircle`},{label:`My Jobs`,value:600,icon:`user`},{label:`Total Candidates`,value:4320,icon:`team`},{label:`Submissions`,value:892,icon:`fileText`}]})}),(0,f.jsxs)(`div`,{className:`admin-dashboard-mid-row`,children:[(0,f.jsx)(OS,{}),(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.AppstoreOutlined,{}),title:`Candidate Pipeline`,children:[(0,f.jsx)(kS,{type:`secondary`,style:{fontSize:12},children:`By stage (892 total)`}),(0,f.jsx)(`div`,{className:`admin-pipeline-bar`,children:MS.map(e=>(0,f.jsx)(`div`,{className:`admin-pipeline-seg`,style:{width:`${e.pct}%`,background:e.color}},e.label))}),(0,f.jsx)(`div`,{className:`admin-pipeline-legend`,children:MS.map(e=>(0,f.jsxs)(`div`,{className:`admin-pipeline-legend-item`,children:[(0,f.jsx)(`span`,{className:`admin-pipeline-dot`,style:{background:e.color}}),e.label,` `,e.count]},e.label))}),(0,f.jsx)(`div`,{className:`admin-divider`}),(0,f.jsx)(kS,{strong:!0,style:{fontSize:12},children:`Submission status`}),(0,f.jsxs)(`div`,{className:`admin-sub-status-list`,style:{marginTop:6},children:[(0,f.jsxs)(`div`,{className:`admin-sub-status-item`,children:[(0,f.jsx)(kS,{style:{fontSize:13},children:`Pending client review`}),(0,f.jsx)(`span`,{className:`admin-badge warn`,children:`312`})]}),(0,f.jsxs)(`div`,{className:`admin-sub-status-item`,children:[(0,f.jsx)(kS,{style:{fontSize:13},children:`Client approved`}),(0,f.jsx)(`span`,{className:`admin-badge success`,children:`248`})]}),(0,f.jsxs)(`div`,{className:`admin-sub-status-item`,children:[(0,f.jsx)(kS,{style:{fontSize:13},children:`Rejected`}),(0,f.jsx)(`span`,{className:`admin-badge danger`,children:`89`})]})]})]})]}),(0,f.jsxs)(`div`,{className:`admin-dashboard-bottom-row`,children:[(0,f.jsx)(Z,{icon:(0,f.jsx)(d.BankOutlined,{}),title:`Top Clients`,extra:(0,f.jsx)(u.Button,{type:`link`,size:`small`,children:`View all`}),children:NS.map(e=>(0,f.jsxs)(`div`,{className:`admin-client-row`,children:[(0,f.jsxs)(`div`,{className:`admin-client-left`,children:[(0,f.jsx)(`div`,{className:`admin-client-icon`,children:(0,f.jsx)(d.BankOutlined,{})}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`admin-client-name`,children:e.name}),(0,f.jsxs)(`div`,{className:`admin-client-sub`,children:[e.jobs,` open jobs`]})]})]}),(0,f.jsxs)(`div`,{className:`admin-client-right`,children:[(0,f.jsx)(`div`,{className:`admin-client-val`,children:e.candidates}),(0,f.jsx)(`div`,{className:`admin-client-sub`,children:`candidates`})]})]},e.name))}),(0,f.jsx)(Z,{icon:(0,f.jsx)(d.BellOutlined,{}),title:`Recent Activity`,children:PS.map((e,t)=>(0,f.jsxs)(`div`,{className:`admin-activity-row`,children:[(0,f.jsx)(`div`,{className:`admin-activity-dot`,style:{background:e.color}}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`admin-activity-text`,children:e.text}),(0,f.jsx)(`div`,{className:`admin-activity-time`,children:e.time})]})]},t))})]}),(0,f.jsx)(Z,{icon:(0,f.jsx)(d.SettingOutlined,{}),title:`Admin Configuration Overview`,extra:(0,f.jsx)(u.Button,{type:`link`,size:`small`,children:`Manage`}),children:(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsxs)(u.Col,{span:8,children:[(0,f.jsx)(kS,{type:`secondary`,style:{fontSize:12,fontWeight:500},children:`Settings`}),[[`Organization`,2],[`User Settings`,4],[`Templates`,2]].map(([e,t])=>(0,f.jsxs)(`div`,{className:`admin-cfg-overview-row`,children:[(0,f.jsx)(kS,{style:{fontSize:12},children:e}),(0,f.jsxs)(`span`,{className:`admin-badge info`,children:[t,` items`]})]},e))]}),(0,f.jsxs)(u.Col,{span:8,children:[(0,f.jsx)(kS,{type:`secondary`,style:{fontSize:12,fontWeight:500},children:`Master`}),[[`Jobs`,2],[`Candidates`,3],[`Submissions`,2]].map(([e,t])=>(0,f.jsxs)(`div`,{className:`admin-cfg-overview-row`,children:[(0,f.jsx)(kS,{style:{fontSize:12},children:e}),(0,f.jsxs)(`span`,{className:`admin-badge info`,children:[t,` items`]})]},e))]}),(0,f.jsxs)(u.Col,{span:8,children:[(0,f.jsx)(kS,{type:`secondary`,style:{fontSize:12,fontWeight:500},children:`System`}),[[`Total Groups`,4],[`Total Modules`,9],[`Config Items`,19]].map(([e,t])=>(0,f.jsxs)(`div`,{className:`admin-cfg-overview-row`,children:[(0,f.jsx)(kS,{style:{fontSize:12},children:e}),(0,f.jsx)(kS,{strong:!0,style:{fontSize:12},children:t})]},e))]})]})})]})}function IS({activeSection:e,activeGroup:t,filteredCards:n,searchText:r,setSearchText:i,allItems:a,handleNav:o}){return(0,f.jsxs)(u.Row,{gutter:[16,16],children:[(0,f.jsx)(u.Col,{span:24,children:(0,f.jsxs)(Z,{icon:e?.icon,title:e?.heading,extra:(0,f.jsx)(u.Input,{className:`admin-search`,prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search settings…`,allowClear:!0,value:r,onChange:e=>i(e.target.value)}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(AS,{level:5,children:e?.heading}),(0,f.jsx)(kS,{type:`secondary`,children:e?.desc})]})}),(0,f.jsx)(u.Col,{xs:24,xl:16,style:{alignSelf:`flex-start`},children:(0,f.jsx)(Z,{icon:(0,f.jsx)(d.AppstoreOutlined,{}),title:`Configuration Items`,extra:(0,f.jsxs)(kS,{type:`secondary`,children:[n.length,` item`,n.length===1?``:`s`]}),children:(0,f.jsx)(u.Row,{gutter:[14,14],children:n.length>0?n.map(e=>(0,f.jsx)(u.Col,{xs:24,sm:12,xl:8,children:(0,f.jsxs)(`div`,{className:`admin-config-item`,children:[(0,f.jsx)(`div`,{className:`admin-config-top-bar`}),(0,f.jsxs)(`div`,{className:`admin-config-body`,children:[(0,f.jsx)(`div`,{className:`admin-config-icon`,children:e.icon}),(0,f.jsxs)(`div`,{className:`admin-config-text`,children:[(0,f.jsx)(`span`,{className:`admin-config-label`,children:e.label}),(0,f.jsx)(`span`,{className:`admin-config-desc`,children:e.desc})]})]}),(0,f.jsx)(`div`,{className:`admin-config-divider`}),(0,f.jsx)(u.Button,{type:`link`,size:`small`,className:`admin-config-manage`,icon:(0,f.jsx)(d.RightOutlined,{}),iconPosition:`end`,children:`Manage`})]})},e.label)):(0,f.jsx)(u.Col,{span:24,children:(0,f.jsx)(`div`,{className:`admin-config-empty`,children:(0,f.jsx)(u.Empty,{description:`No settings found`,image:u.Empty.PRESENTED_IMAGE_SIMPLE})})})})})}),(0,f.jsx)(u.Col,{xs:24,xl:8,style:{alignSelf:`flex-start`},children:(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`Section Overview`,children:[(0,f.jsx)(`div`,{className:`admin-overview-list`,children:jS.filter(e=>e.group!==`Dashboard`).map(e=>{let n=e.group===t?.group;return(0,f.jsxs)(`div`,{className:`admin-overview-item${n?` active`:``}`,onClick:()=>{let t=e.items[0];t&&o(t.id)},children:[(0,f.jsxs)(`div`,{className:`admin-overview-left`,children:[(0,f.jsx)(`div`,{className:`admin-overview-icon`,children:e.items[0]?.icon}),(0,f.jsxs)(`div`,{className:`admin-overview-text`,children:[(0,f.jsx)(`span`,{className:`admin-overview-name`,children:e.group}),(0,f.jsxs)(`span`,{className:`admin-overview-sub`,children:[e.items.length,` module`,e.items.length===1?``:`s`]})]})]}),(0,f.jsx)(`span`,{className:`admin-overview-count${n?` active`:``}`,children:e.items.length})]},e.group)})}),(0,f.jsxs)(`div`,{className:`admin-overview-footer`,children:[(0,f.jsx)(`span`,{className:`admin-overview-footer-label`,children:`Total configuration items`}),(0,f.jsx)(`span`,{className:`admin-overview-footer-value`,children:a.filter(e=>e.cards).reduce((e,t)=>e+t.cards.length,0)})]})]})})]})}function LS(){let[e,t]=(0,l.useState)(`dashboard`),[n,r]=(0,l.useState)(``),i=(0,l.useMemo)(()=>jS.flatMap(e=>e.items),[]),a=(0,l.useMemo)(()=>i.find(t=>t.id===e),[i,e]),o=(0,l.useMemo)(()=>jS.find(t=>t.items.some(t=>t.id===e)),[e]),s=(0,l.useMemo)(()=>{if(!a?.cards)return[];let e=n.trim().toLowerCase();return e?a.cards.filter(t=>t.label.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e)):a.cards},[a,n]),c=(0,l.useMemo)(()=>jS.map(e=>({key:e.group,type:`group`,label:e.group,children:e.items.map(e=>({key:e.id,icon:e.icon,label:e.label}))})),[]),p=e=>{t(e),r(``)};return e===`dashboard`||a?.heading,(0,f.jsxs)(`main`,{className:`admin-page`,children:[(0,f.jsx)(`div`,{className:`admin-breadcrumb`,children:(0,f.jsx)(u.Breadcrumb,{items:[{title:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.HomeOutlined,{}),` Home`]})},{title:`Admin`}]})}),(0,f.jsxs)(u.Row,{gutter:[16,16],className:`admin-wrapper`,children:[(0,f.jsx)(u.Col,{xs:24,lg:6,xl:5,children:(0,f.jsxs)(Z,{title:`Admin Console`,icon:(0,f.jsx)(d.SettingOutlined,{}),children:[(0,f.jsxs)(`div`,{className:`admin-sidebar-banner`,children:[(0,f.jsx)(`span`,{className:`admin-sidebar-banner-title`,children:`Admin Panel`}),(0,f.jsx)(`span`,{className:`admin-sidebar-banner-sub`,children:`Configuration Center`}),(0,f.jsxs)(u.Row,{gutter:[8,0],children:[(0,f.jsx)(u.Col,{span:12,children:(0,f.jsxs)(`div`,{className:`admin-sidebar-pill`,children:[(0,f.jsx)(`span`,{className:`admin-sidebar-pill-label`,children:`Groups`}),(0,f.jsx)(`span`,{className:`admin-sidebar-pill-value`,children:jS.length})]})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsxs)(`div`,{className:`admin-sidebar-pill`,children:[(0,f.jsx)(`span`,{className:`admin-sidebar-pill-label`,children:`Modules`}),(0,f.jsx)(`span`,{className:`admin-sidebar-pill-value`,children:i.length})]})})]})]}),(0,f.jsx)(u.Menu,{mode:`inline`,selectedKeys:[e],items:c,onClick:({key:e})=>p(e),className:`admin-sidebar-menu`})]})}),(0,f.jsx)(u.Col,{xs:24,lg:18,xl:19,children:e===`dashboard`?(0,f.jsx)(FS,{}):a?.component===`form-groups`?(0,f.jsx)(J_,{}):a?.component===`detail-groups`?(0,f.jsx)(gv,{}):a?.component===`row-actions`?(0,f.jsx)(ay,{}):a?.component===`users`?(0,f.jsx)(d_,{}):a?.component===`teams`?(0,f.jsx)(sS,{}):a?.component===`roles`?(0,f.jsx)(g_,{}):a?.component===`permissions`?(0,f.jsx)(wS,{}):a?.component===`templates`?(0,f.jsx)(my,{}):a?.component===`ai-services`?(0,f.jsx)(vy,{}):(0,f.jsx)(IS,{activeSection:a,activeGroup:o,filteredCards:s,searchText:n,setSearchText:r,allItems:i,handleNav:p})})]})]})}var RS=[{label:`Home`,href:`/dashboard`},{label:`Jobs`}];function zS(){return(0,f.jsx)(Zl,{moduleName:`job`,breadcrumbItems:RS})}function BS(){let[e,t]=(0,l.useState)(null);return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(so,{items:[{label:`Home`,href:`/dashboard`},{label:`Jobs`,href:`/jobs`},{label:e?.eyebrow||`-`}]}),(0,f.jsx)(fm,{moduleName:`job`,backPath:`/jobs`,onHeaderData:t})]})}var{Title:VS}=u.Typography;function HS(){let e=(0,p.useNavigate)(),{state:t}=(0,p.useLocation)(),n=t?.moduleName||`stickyNotes`,r=t?.title||`Sticky Notes`,i={...t?.request,params:{...t?.request?.params,limit:200,offset:0}};return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.ArrowLeftOutlined,{}),onClick:()=>e(-1),style:{marginBottom:12},children:`Back`}),(0,f.jsx)(xt,{moduleName:n,title:r,columns:4,request:i,viewAll:!1})]})}var{Text:US,Title:WS}=u.Typography,GS=10*1024*1024,KS=`/templates/test_cases_flow_template.base64.txt`,qS=`test_cases_flow_template.xlsx`,JS=`module | subModule | step_order | description | actions | key | value | expected | scenario`,YS={idle:0,module_set:1,encoding:1,validating:2,preview:3,inserting:3,done:4,error:1},XS=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`},{label:`Bulk upload`,href:`/bulk-upload`}];function ZS(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).split(`,`)[1]),r.onerror=n,r.readAsDataURL(e)})}function QS(e){return e.filter(e=>e.row_status===`valid`).map(e=>{let t={...e};return delete t.row_status,delete t.errors,t})}function $S(e){return e.flatMap(e=>(e.errors??[]).map(t=>({id:e.id,...t})))}function eC({errors:e}){return(0,f.jsx)(`div`,{className:`bulk-tooltip-errors`,children:(e??[]).map((e,t)=>(0,f.jsx)(`div`,{children:e.message},`${e.field}-${t}`))})}function tC({errors:e,expanded:t,onToggle:n,onSummaryClick:r}){return e.length===0?null:(0,f.jsxs)(`div`,{className:`bulk-error-banner`,children:[(0,f.jsxs)(`div`,{className:`bulk-error-summary`,children:[(0,f.jsxs)(`button`,{type:`button`,className:`bulk-error-summary-main`,onClick:r,"aria-label":`Scroll to first invalid row`,children:[(0,f.jsx)(d.ExclamationCircleOutlined,{className:`bulk-error-icon`}),(0,f.jsxs)(`span`,{children:[e.length,` validation error(s) found`]})]}),(0,f.jsx)(u.Button,{type:`link`,onClick:n,"aria-expanded":t,children:t?`Hide Errors`:`View Errors`})]}),t&&(0,f.jsx)(`div`,{className:`bulk-error-list`,role:`region`,"aria-label":`Validation error details`,children:e.map((e,t)=>(0,f.jsxs)(`div`,{className:`bulk-error-line`,children:[(0,f.jsxs)(`span`,{className:`bulk-row-chip`,children:[`Row `,e.id]}),(0,f.jsx)(`span`,{children:e.message})]},`${e.id}-${e.field}-${t}`))})]})}function nC({rows:e,view:t,onViewChange:n,onConfirm:r,onReset:i,saving:a,firstInvalidRowId:o,firstInvalidRowRef:s}){let c=e.filter(e=>e.row_status===`invalid`),l=t===`errors`?c:e,p=c.length>0||a;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(u.Row,{justify:`space-between`,align:`middle`,gutter:[16,16],className:`bulk-table-toolbar`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsxs)(u.Space.Compact,{children:[(0,f.jsx)(u.Button,{type:t===`all`?`primary`:`default`,onClick:()=>n(`all`),children:`All rows`}),(0,f.jsx)(u.Button,{type:t===`errors`?`primary`:`default`,onClick:()=>n(`errors`),children:`Errors only`})]})}),(0,f.jsx)(u.Col,{children:(0,f.jsxs)(US,{type:`secondary`,children:[e.length,` row(s)`]})})]}),(0,f.jsx)(`div`,{className:`bulk-table-wrap`,children:(0,f.jsxs)(`table`,{className:`bulk-preview-table`,children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(`tr`,{children:[(0,f.jsx)(`th`,{className:`bulk-col-row`,children:`Row`}),(0,f.jsx)(`th`,{className:`bulk-col-flow`,children:`Submodule`}),(0,f.jsx)(`th`,{className:`bulk-col-description`,children:`Description`}),(0,f.jsx)(`th`,{className:`bulk-col-keyword`,children:`Action`}),(0,f.jsx)(`th`,{className:`bulk-col-target`,children:`Key`}),(0,f.jsx)(`th`,{className:`bulk-col-status`,children:`Status`}),(0,f.jsx)(`th`,{className:`bulk-col-error`,children:`Error`})]})}),(0,f.jsx)(`tbody`,{children:l.map(e=>{let t=e.errors??[],n=e.row_status===`invalid`;return(0,f.jsxs)(`tr`,{ref:n&&e.id===o?s:null,className:n?`bulk-row-invalid`:``,children:[(0,f.jsx)(`td`,{children:e.id}),(0,f.jsx)(`td`,{title:e.submodule,children:e.submodule}),(0,f.jsx)(`td`,{title:e.description,children:e.description?e.description:(0,f.jsx)(`span`,{className:`bulk-empty-text`,children:`-empty-`})}),(0,f.jsx)(`td`,{children:(0,f.jsx)(`code`,{className:`bulk-code-chip`,children:e.actions})}),(0,f.jsx)(`td`,{title:e.key,children:e.key}),(0,f.jsx)(`td`,{children:n?(0,f.jsx)(u.Tag,{color:`red`,children:`Error`}):(0,f.jsx)(u.Tag,{color:`green`,children:`Valid`})}),(0,f.jsx)(`td`,{children:n?(0,f.jsx)(u.Tooltip,{title:(0,f.jsx)(eC,{errors:t}),placement:`left`,children:(0,f.jsxs)(`button`,{type:`button`,className:`bulk-error-info`,"aria-label":`View ${t.length} error(s) for row ${e.id}`,children:[(0,f.jsx)(d.InfoCircleOutlined,{}),(0,f.jsx)(u.Badge,{count:t.length,size:`small`})]})}):(0,f.jsx)(`span`,{className:`bulk-error-none`,children:`-`})})]},`${e.id}-${e.step_order}`)})})]})}),(0,f.jsxs)(u.Space,{className:`bulk-actions`,children:[(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:i,children:`Reset`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:a,disabled:p,onClick:r,children:c.length>0?`Fix ${c.length} error(s) to proceed`:`Save to database`})]})]})}function rC(){let e=(0,p.useNavigate)(),t=(0,l.useMemo)(()=>se(),[]),n=(0,l.useRef)(null),r=(0,l.useRef)(null),[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(``),[c,m]=(0,l.useState)(`idle`),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(null),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)(`all`),[C,w]=(0,l.useState)(null),[T,E]=(0,l.useState)(null),[D,O]=(0,l.useState)(!1),k=i.map(e=>({value:e.modulename,label:e.modulename})),A=$S(y),j=c===`encoding`||c===`validating`,M=!!o&&!j,N=YS[c]??0,P=y.find(e=>e.row_status===`invalid`)?.id,F=(0,l.useCallback)(()=>{s(``),m(`idle`),g(!1),v(null),b([]),S(`all`),w(null),E(null),n.current&&(n.current.value=``)},[]);(0,l.useEffect)(()=>{async function e(){try{a((await eg({project:t?.name??``,activeOnly:!0}))?.items??[])}catch(e){console.error(e),u.message.error(`Unable to load modules.`)}}e()},[t?.name]);let I=e=>{s(e??``),b([]),E(null),w(null),v(null),O(!1),m(e?`module_set`:`idle`)},L=async e=>{if(!e||!M)return;let n=e.name.split(`.`).pop()?.toLowerCase();if(![`xlsx`,`csv`].includes(n)){m(`module_set`),w({message:`Invalid file type. Please upload an Excel .xlsx or CSV .csv file.`});return}if(e.size>GS){m(`module_set`),w({message:`File must be 10 MB or smaller.`});return}w(null),b([]),E(null),v({name:e.name,size:e.size}),m(`encoding`);try{let r=await ZS(e);m(`validating`),b((await Yh({filename:e.name,project:t?.name??``,module:o,file_base64:r,file_type:n}))?.rows??[]),S(`all`),m(`preview`)}catch(e){console.error(e),w(e.payload??{code:`NETWORK_ERROR`,message:e.message||`Could not reach the server.`}),m(`error`)}},R=async()=>{try{let e=await fetch(KS);if(!e.ok)throw Error(`Template file not found (${e.status})`);let t=(await e.text()).trim(),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e+=1)r[e]=n.charCodeAt(e);let i=new Blob([r],{type:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`}),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=qS,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(a),u.message.success(`Sample template downloaded.`)}catch(e){console.error(e),u.message.error(`Unable to download sample template.`)}},z=async()=>{m(`inserting`),w(null);try{E(await Xh({project:t?.name??``,module:o,uploaded_by:localStorage.getItem(`user_Email`)??``,rows:QS(y)})),m(`done`),u.message.success(`Bulk upload saved. Redirecting to view test cases...`),window.setTimeout(()=>e(`/viewTestCase`),900)}catch(e){console.error(e),w(e.payload??{code:`NETWORK_ERROR`,message:e.message||`Could not reach the server.`}),m(`preview`)}},B=(0,l.useCallback)(()=>{r.current?.scrollIntoView({behavior:`smooth`,block:`center`})},[]),V=[`bulk-dropzone`,h?`bulk-dropzone-dragging`:``,_?`bulk-dropzone-has-file`:``,C&&c!==`preview`?`bulk-dropzone-error`:``,o?``:`bulk-dropzone-disabled`].filter(Boolean).join(` `);return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:XS})}),t?.name&&(0,f.jsx)(u.Col,{children:(0,f.jsx)(US,{strong:!0,children:t.name})})]}),(0,f.jsxs)(`div`,{className:`zt-page zt-page-wide bulk-page`,children:[(0,f.jsxs)(`div`,{className:`bulk-header`,children:[(0,f.jsx)(WS,{level:3,children:`Bulk upload test cases`}),(0,f.jsxs)(u.Space,{direction:`vertical`,size:4,children:[(0,f.jsx)(US,{type:`secondary`,children:JS}),(0,f.jsx)(US,{type:`secondary`,children:`Use the sample template for the required columns. Uploaded rows are saved as Active by default.`})]})]}),(0,f.jsx)(`div`,{className:`bulk-stepbar`,children:[`Select`,`Upload`,`Validate`,`Save`].map((e,t)=>(0,f.jsxs)(`span`,{className:t<N?`bulk-step-active`:``,children:[t+1,` `,e]},e))}),(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:`1. Module selector`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,className:`bulk-module-select`,placeholder:`Choose a module`,options:k,value:o||void 0,onChange:I})}),o&&(0,f.jsxs)(u.Card,{className:`v1-card zt-fall`,title:`2. File upload`,extra:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.DownloadOutlined,{}),onClick:R,children:`Download Sample Template`}),children:[(0,f.jsx)(u.Alert,{type:`info`,showIcon:!0,message:`First time uploading?`,description:`Download the sample template, keep the column names unchanged, fill your test steps, and upload either .xlsx or .csv.`,className:`bulk-inline-alert`}),(0,f.jsxs)(`button`,{type:`button`,className:V,disabled:!M,onClick:()=>n.current?.click(),onDragOver:e=>{e.preventDefault(),M&&g(!0)},onDragLeave:()=>g(!1),onDrop:e=>{e.preventDefault(),g(!1),L(e.dataTransfer.files?.[0])},children:[(0,f.jsx)(d.CloudUploadOutlined,{className:`bulk-upload-icon`}),_?(0,f.jsxs)(`span`,{className:`bulk-file-chip`,children:[_.name,` - `,Math.ceil(_.size/1024),` KB`]}):(0,f.jsx)(`span`,{children:`Drag & drop here, or click to browse`})]}),(0,f.jsx)(`input`,{ref:n,hidden:!0,type:`file`,accept:`.xlsx,.csv`,onChange:e=>L(e.target.files?.[0])}),j&&(0,f.jsx)(u.Progress,{percent:c===`encoding`?45:82,showInfo:!1,size:`small`}),C&&c!==`preview`&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:C.message,className:`bulk-inline-alert`})]}),y.length>0&&(0,f.jsxs)(u.Card,{className:`v1-card zt-fall`,title:`3. Validation result`,children:[(0,f.jsx)(tC,{errors:A,expanded:D,onToggle:()=>O(e=>!e),onSummaryClick:B}),C&&c===`preview`&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:C.message,className:`bulk-inline-alert`}),(0,f.jsx)(nC,{rows:y,view:x,onViewChange:S,onConfirm:z,onReset:F,saving:c===`inserting`,firstInvalidRowId:P,firstInvalidRowRef:r})]}),T&&c===`done`&&(0,f.jsxs)(u.Card,{className:`v1-card zt-fall`,title:`4. Upload complete`,children:[(0,f.jsxs)(u.Row,{gutter:[16,16],className:`bulk-metrics`,children:[(0,f.jsx)(u.Col,{xs:24,md:8,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(US,{children:`Total`}),(0,f.jsx)(`strong`,{children:y.length})]})}),(0,f.jsx)(u.Col,{xs:24,md:8,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(US,{children:`Inserted`}),(0,f.jsx)(`strong`,{children:T.inserted??0})]})}),(0,f.jsx)(u.Col,{xs:24,md:8,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(US,{children:`Failed`}),(0,f.jsx)(`strong`,{children:T.failed??0})]})})]}),(0,f.jsx)(u.Alert,{type:`success`,showIcon:!0,icon:(0,f.jsx)(d.CheckCircleOutlined,{}),message:`${T.inserted??0} test cases saved to database - module: ${o}`,className:`bulk-inline-alert`}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:F,children:`Upload another file`})]})]})]})}var iC=[{value:`navigate`,label:`Navigate`},{value:`fill`,label:`Fill`},{value:`click`,label:`Click`},{value:`select`,label:`Select`},{value:`press_key`,label:`Press Key`},{value:`type_and_select`,label:`Type and Select`},{value:`type_and_select_modal`,label:`Type and Select (Modal)`},{value:`upload_file`,label:`Upload File`},{value:`check_checkbox`,label:`Check Checkbox`},{value:`check_filter_checkbox`,label:`Check Filter Checkbox`},{value:`select_page_size`,label:`Select Page Size`},{value:`check_n_checkboxes`,label:`Check N Checkboxes`},{value:`store_text`,label:`Store Text`},{value:`reset_session`,label:`Reset Session`},{value:`switch_to_new_tab`,label:`Switch To New Tab`},{value:`close_tab`,label:`Close Tab`},{value:`assert_visible`,label:`Assert Visible`},{value:`assert_hidden`,label:`Assert Hidden`},{value:`assert_text`,label:`Assert Text`},{value:`assert_url`,label:`Assert URL`},{value:`assert_body_contains`,label:`Assert Body Contains`},{value:`assert_button_disabled`,label:`Assert Button Disabled`},{value:`assert_field_error`,label:`Assert Field Error`},{value:`assert_field_accepted`,label:`Assert Field Accepted`},{value:`assert_children_disabled`,label:`Assert Children Disabled`},{value:`assert_children_visible`,label:`Assert Children Visible`},{value:`assert_element_count`,label:`Assert Element Count`},{value:`assert_toast`,label:`Assert Toast`},{value:`assert_toast_success`,label:`Assert Toast Success`},{value:`assert_toast_error`,label:`Assert Toast Error`},{value:`wait_for_visible`,label:`Wait For Visible`},{value:`wait_for_hidden`,label:`Wait For Hidden`},{value:`wait_for_text`,label:`Wait For Text`}],{Text:aC}=u.Typography,oC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/test-cases`}],sC={tags:`regression`,active:1},cC={module:{dbName:`Modules`,formField:`module`,label:`Module`}};function lC(e=[]){return e.map(e=>({value:e,label:e}))}function uC(e=``){return String(e??``).trim()}function dC(e=``){return uC(e).toLowerCase()}function fC(e=[]){let t=new Map;return e.forEach(e=>{let n=uC(e?.flow),r=n.toLowerCase();n&&!t.has(r)&&t.set(r,n)}),Array.from(t.values()).map(e=>({value:e,label:e}))}function pC(e=[],t,n){let r=uC(t).toLowerCase(),i=uC(n).toLowerCase();return e.reduce((e,t)=>{let n=uC(t?.module).toLowerCase(),a=uC(t?.flow).toLowerCase();if(n!==r||a!==i)return e;let o=Number(t?.step_order)||0;return Math.max(e,o)},0)+1}function mC({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(aC,{strong:!0,className:`v1-section-label`,children:t})]})}function hC(){let[e]=u.Form.useForm(),[t]=u.Form.useForm(),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)([]),[c,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)({open:!1,typeKey:`module`}),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(!1),T=(0,p.useNavigate)(),E=cC[_.typeKey],D=(0,l.useMemo)(()=>lC(n),[n]),O=u.Form.useWatch(`module`,e),k=u.Form.useWatch(`flow`,e),A=!!uC(O),j=!!uC(k),M=!A,N=!A||!j,P=(e,t=[])=>{e===`module`&&r(t)},F=async()=>{m(!0);try{r((await Wh(cC.module.dbName))?.items??[])}catch(e){console.error(`Unable to load testing options:`,e),u.message.error(`Unable to load testing options.`)}finally{m(!1)}},I=(0,l.useCallback)(async t=>{let n=uC(t);if(a([]),s([]),e.setFieldsValue({step_order:void 0}),n){g(!0);try{let e=await Jh({limit:1e4,offset:0,module:n}),t=Array.isArray(e?.items)?e.items:[];a(t),s(fC(t))}catch(e){console.error(`Unable to load flows:`,e),u.message.error(`Unable to load flows.`)}finally{g(!1)}}},[e]),L=(0,l.useCallback)(async(t,n,r)=>{let i=uC(t),a=uC(n);if(!i||!a){e.setFieldsValue({step_order:void 0});return}S(!0);try{e.setFieldsValue({step_order:pC(r,i,a)})}catch(e){console.error(`Unable to load step order:`,e),u.message.error(`Unable to load step order.`)}finally{S(!1)}},[e]);(0,l.useEffect)(()=>{Promise.resolve().then(F)},[]),(0,l.useEffect)(()=>{Promise.resolve().then(()=>I(O))},[I,O]),(0,l.useEffect)(()=>{Promise.resolve().then(()=>L(O,k,i))},[i,L,k,O]);let R=async t=>{let n={module:uC(t.module),flow:uC(t.flow),step_order:Number(t.step_order),description:uC(t.description),keyword:dC(t.keyword),target:uC(t.target),value:uC(t.value),expected:uC(t.expected),tags:t.tags?uC(t.tags):sC.tags,active:Number(t.active)};w(!0);try{await qh(n),u.message.success(`Test case details saved successfully.`),e.resetFields(),a([]),s([])}catch(e){console.error(`Unable to save test case:`,e),u.message.error(`Unable to save test case.`)}finally{w(!1)}},z=(t,n)=>{e.setFieldsValue({[t]:uC(n)})},B=t=>{e.setFieldsValue({module:uC(t),flow:void 0,step_order:void 0,keyword:void 0,description:void 0,target:void 0,tags:sC.tags,value:void 0,expected:void 0})},V=t=>{e.setFieldsValue({flow:uC(t),step_order:void 0})},H=e=>{let n=cC[e];v({open:!0,typeKey:e}),t.setFieldsValue({name:``,type:n.label})},U=()=>{v(e=>({...e,open:!1})),t.resetFields()},W=async()=>{try{let n=uC((await t.validateFields()).name),r=await Gh({name:n,type:E.dbName});P(_.typeKey,r?.items??[]),e.setFieldsValue({[E.formField]:n}),u.message.success(`${E.label} added successfully.`),U()}catch(e){if(e?.errorFields)return;console.error(`Unable to save testing option:`,e),u.message.error(`Unable to add ${E.label.toLowerCase()}.`)}finally{b(!1)}};return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:oC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>T(`/zinnext-home`),children:`View Table`})})]}),(0,f.jsx)(`div`,{className:`v1-page`,children:(0,f.jsxs)(`div`,{className:`v1-page-inner`,children:[(0,f.jsx)(`div`,{className:`v1-page-header`,children:(0,f.jsxs)(u.Space,{align:`center`,size:10,children:[(0,f.jsx)(d.ProfileOutlined,{className:`v1-outer-icon`}),(0,f.jsx)(`div`,{children:(0,f.jsx)(aC,{strong:!0,style:{fontSize:16},children:`Add Test Case`})})]})}),(0,f.jsx)(Z,{children:(0,f.jsxs)(u.Form,{form:e,className:`v1-form`,layout:`vertical`,colon:!1,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),initialValues:sC,onFinish:R,autoComplete:`off`,children:[(0,f.jsx)(u.Card,{className:`v1-card`,title:(0,f.jsx)(mC,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`Test Case Details`}),extra:(0,f.jsx)(aC,{type:`secondary`,className:`v1-card-subtitle`,children:`Module, flow, step order and execution data`}),children:(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`},children:[(0,f.jsx)(u.Form.Item,{label:`Module`,name:`module`,style:{flex:1},children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,loading:c,optionFilterProp:`label`,placeholder:`Select module`,options:D,onChange:B})}),(0,f.jsx)(u.Button,{"aria-label":`Add module`,icon:(0,f.jsx)(d.PlusOutlined,{}),style:{marginTop:30},onClick:()=>H(`module`)})]})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Flow`,name:`flow`,children:(0,f.jsx)(u.AutoComplete,{maxLength:100,allowClear:!0,disabled:M,options:o,placeholder:h?`Loading flows`:`Enter flow`,onChange:V,filterOption:(e,t)=>t?.value?.toLowerCase().includes(e.toLowerCase())})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Step Order`,name:`step_order`,validateTrigger:[`onBlur`,`onChange`],children:(0,f.jsx)(u.Input,{maxLength:10,disabled:!0,placeholder:x?`Loading step order`:`Step order`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Action`,name:`keyword`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,disabled:N,optionFilterProp:`label`,placeholder:`Select action`,options:iC,onChange:t=>e.setFieldsValue({keyword:dC(t)})})})}),(0,f.jsx)(u.Col,{xs:24,children:(0,f.jsx)(u.Form.Item,{label:`Description`,name:`description`,children:(0,f.jsx)(u.Input.TextArea,{rows:3,maxLength:255,disabled:N,placeholder:`Enter description`,showCount:!0,onBlur:e=>z(`description`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Key`,name:`target`,children:(0,f.jsx)(u.Input,{maxLength:255,disabled:N,placeholder:`Enter target`,onBlur:e=>z(`target`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Tags`,name:`tags`,children:(0,f.jsx)(u.Input,{maxLength:200,disabled:N,placeholder:`Enter tags`,prefix:(0,f.jsx)(d.TagsOutlined,{className:`v1-input-icon`}),onBlur:e=>z(`tags`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Value`,name:`value`,children:(0,f.jsx)(u.Input.TextArea,{rows:4,disabled:N,placeholder:`Enter value`,onBlur:e=>z(`value`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Expected`,name:`expected`,children:(0,f.jsx)(u.Input.TextArea,{rows:4,disabled:N,placeholder:`Enter expected result`,onBlur:e=>z(`expected`,e.target.value)})})})]})}),(0,f.jsx)(`div`,{className:`v1-form-actions`,children:(0,f.jsx)(u.Form.Item,{children:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{type:`primary`,htmlType:`submit`,loading:C,disabled:N,children:`Submit`}),(0,f.jsx)(u.Button,{onClick:()=>{e.resetFields(),a([]),s([])},children:`Reset`})]})})})]})}),(0,f.jsx)(u.Modal,{title:`Add ${E.label}`,open:_.open,confirmLoading:y,okText:`Add`,onCancel:U,onOk:()=>{b(!0),W()},destroyOnHidden:!0,children:(0,f.jsxs)(u.Form,{form:t,layout:`vertical`,colon:!1,className:`v1-form`,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),children:[(0,f.jsx)(u.Form.Item,{label:`Name`,name:`name`,children:(0,f.jsx)(u.Input,{maxLength:100,placeholder:`Enter ${E.label.toLowerCase()} name`,onBlur:e=>{t.setFieldsValue({name:uC(e.target.value)})}})}),(0,f.jsx)(u.Form.Item,{label:`Type`,name:`type`,children:(0,f.jsx)(u.Input,{disabled:!0})})]})})]})})]})}var{Text:gC}=u.Typography,_C=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`}];function vC(e=``){return String(e??``).trim()}function yC(e=[],t){return e.map(e=>({value:e.id,label:e[t]}))}var bC=[{label:`Step`,value:`step_order`,width:70},{label:`Action`,value:`actions`,width:140},{label:`Key`,value:`key`,width:160,ellipsis:!0},{label:`Value`,value:`value`,ellipsis:!0},{label:`Description`,value:`description`,ellipsis:!0},{label:`Scenario`,value:`scenario`,width:110,render:e=>e===1?(0,f.jsx)(u.Tag,{color:`green`,children:`Positive`}):(0,f.jsx)(u.Tag,{color:`red`,children:`Negative`})}],xC={key:!1,value:!1,expected:!1};function SC(e,t){return t?e[t]??xC:xC}function CC(e,t){e.setFields(t.map(e=>({name:e,errors:[]})))}function wC(){let[e]=u.Form.useForm(),t=(0,p.useNavigate)(),[n]=(0,p.useSearchParams)(),r=n.get(`edit`),i=!!r,a=(0,l.useMemo)(()=>se(),[]),[o,s]=(0,l.useState)([]),[c,m]=(0,l.useState)([]),[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)(iC),[y,b]=(0,l.useState)({}),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(!1),[T,E]=(0,l.useState)(!1),[D,O]=(0,l.useState)(!1),[k,A]=(0,l.useState)(!1),j=u.Form.useWatch(`module`,e),M=u.Form.useWatch(`submodule`,e),N=u.Form.useWatch(`actions`,e),P=!!j,F=!!M,I=(0,l.useMemo)(()=>SC(y,N),[y,N]),L=(0,l.useMemo)(()=>yC(o,`modulename`),[o]),R=(0,l.useMemo)(()=>yC(c,`submodulename`),[c]),z=(0,l.useMemo)(()=>o.find(e=>e.id===j)?.modulename??``,[o,j]),B=(0,l.useMemo)(()=>c.find(e=>e.id===M)?.submodulename??``,[M,c]),V=(0,l.useCallback)(async()=>{try{let e=await Kh();Array.isArray(e?.options)&&e.options.length>0&&v(e.options),e?.rules&&typeof e.rules==`object`&&b(e.rules)}catch(e){console.error(`Unable to load action field rules:`,e),u.message.error(`Unable to load action validation rules.`)}},[]),H=(0,l.useCallback)(async e=>{if(!e){s([]);return}S(!0);try{s((await eg({project:e,activeOnly:!0}))?.items??[])}catch(e){console.error(`Unable to load modules:`,e),u.message.error(`Unable to load modules.`)}finally{S(!1)}},[]),U=(0,l.useCallback)(async(e,t)=>{if(!e||!t){m([]);return}w(!0);try{m((await rg({project:e,module:t,activeOnly:!0}))?.items??[])}catch(e){console.error(`Unable to load submodules:`,e),u.message.error(`Unable to load submodules.`)}finally{w(!1)}},[]),W=(0,l.useCallback)(async(t,n,r,i=``)=>{if(!t||!n||!r){g([]),e.setFieldsValue({step_order:void 0});return}E(!0);try{let[a,o]=await Promise.all([og({product_parent_ID:t,module_parent_ID:n,submodule_parent_ID:r,actions:i,limit:1e3}),lg({product_parent_ID:t,module_parent_ID:n,submodule_parent_ID:r})]);g(a?.items??[]),e.setFieldsValue({step_order:o?.step_order??1})}catch(e){console.error(`Unable to load flows:`,e),u.message.error(`Unable to load flows.`)}finally{E(!1)}},[e]),G=(0,l.useCallback)(async(e=``)=>{if(!(!a?.id||!j||!M)){E(!0);try{g((await og({product_parent_ID:a.id,module_parent_ID:j,submodule_parent_ID:M,actions:e,limit:1e3}))?.items??[])}catch(e){console.error(`Unable to load action flows:`,e),u.message.error(`Unable to load action steps.`)}finally{E(!1)}}},[a?.id,j,M]),K=(0,l.useCallback)(async()=>{if(!(!r||!a?.name)){A(!0);try{let t=await cg(r);await U(a.name,t.module),g((await og({product_parent_ID:t.product_parent_ID,module_parent_ID:t.module_parent_ID,submodule_parent_ID:t.submodule_parent_ID,limit:1e3}))?.items??[]),e.setFieldsValue({module:t.module_parent_ID,submodule:t.submodule_parent_ID,step_order:t.step_order,actions:t.actions,key:t.key,value:t.value,expected:t.expected,description:t.description,scenario:t.scenario===1,active:Number(t.active)!==0})}catch(e){console.error(`Unable to load test flow:`,e),u.message.error(`Unable to load test flow for edit.`),t(`/viewTestCase`)}finally{A(!1)}}},[r,e,U,t,a?.name]);return(0,l.useEffect)(()=>{if(!a){t(`/select-project`,{replace:!0});return}Promise.resolve().then(async()=>{await V(),await H(a.name),r&&await K()})},[a,t,V,H,r,K]),a?(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:_C})}),(0,f.jsx)(u.Col,{children:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.ProjectOutlined,{}),(0,f.jsx)(gC,{strong:!0,children:a.name})]})})]}),(0,f.jsx)(`div`,{className:`zt-page`,children:(0,f.jsxs)(u.Form,{form:e,layout:`vertical`,colon:!1,className:`v1-form`,initialValues:{scenario:!0,active:!0},onFinish:async n=>{let o={product_parent_ID:Number(a?.id),module_parent_ID:Number(n.module),submodule_parent_ID:Number(n.submodule),description:vC(n.description),actions:vC(n.actions),key:vC(n.key),value:vC(n.value),expected:vC(n.expected),scenario:+!!n.scenario,active:+!!n.active};O(!0);try{if(i){await ug(r,{...o,step_order:Number(n.step_order)}),u.message.success(`Test case updated successfully.`),t(`/viewTestCase`);return}await sg(o),u.message.success(`Step saved (#${n.step_order}).`),e.setFieldsValue({actions:void 0,key:void 0,value:void 0,expected:void 0,description:void 0}),await W(o.product_parent_ID,o.module_parent_ID,o.submodule_parent_ID)}catch(e){console.error(`Unable to save test case:`,e),u.message.error(i?`Unable to update test case.`:`Unable to save step.`)}finally{O(!1)}},autoComplete:`off`,disabled:k,children:[(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:8,className:`zt-section-title`,children:[(0,f.jsx)(`span`,{className:`zt-step-tag`,children:`1`}),(0,f.jsx)(`span`,{children:`Module & Submodule`})]}),children:(0,f.jsxs)(u.Row,{gutter:[24,0],align:`bottom`,children:[(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Module`,name:`module`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,loading:x,placeholder:`Select module`,options:L,onChange:t=>{let n=o.find(e=>e.id===t)?.modulename??``;e.setFieldsValue({module:t,submodule:void 0,step_order:void 0,actions:void 0,key:void 0,value:void 0,expected:void 0}),CC(e,[`actions`,`key`,`value`,`expected`]),m([]),g([]),U(a?.name,n)}})})}),(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Submodule`,name:`submodule`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,disabled:!P,loading:C,placeholder:P?`Select submodule`:`Select module first`,options:R,onChange:t=>{e.setFieldsValue({submodule:t,actions:void 0,key:void 0,value:void 0,expected:void 0}),CC(e,[`actions`,`key`,`value`,`expected`]),W(a?.id,j,t)}})})}),(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Scenario`,name:`scenario`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{disabled:!F,checkedChildren:`Positive`,unCheckedChildren:`Negative`})})}),(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Active`,name:`active`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{checkedChildren:`Active`,unCheckedChildren:`Inactive`})})})]})}),F&&(0,f.jsxs)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:8,className:`zt-section-title`,children:[(0,f.jsx)(`span`,{className:`zt-step-tag`,children:`2`}),(0,f.jsx)(d.FileTextOutlined,{}),(0,f.jsx)(`span`,{children:`Step Details`})]}),extra:(0,f.jsxs)(gC,{type:`secondary`,children:[z,` / `,B]}),children:[(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Step Order`,name:`step_order`,children:(0,f.jsx)(u.Input,{disabled:!0,placeholder:T?`Loading…`:`Auto`})})}),(0,f.jsx)(u.Col,{xs:24,md:18,children:(0,f.jsx)(u.Form.Item,{label:`Action`,name:`actions`,rules:[{required:!0,message:`Mandatory Field`}],children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,placeholder:`Select action`,options:_,onChange:t=>{let n=SC(y,t);e.setFieldsValue({actions:t,key:n.key?e.getFieldValue(`key`):void 0,value:n.value?e.getFieldValue(`value`):void 0,expected:n.expected?e.getFieldValue(`expected`):void 0}),CC(e,[`key`,`value`,`expected`]),G(t||``)}})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Key`,name:`key`,rules:[{required:I.key,message:`Key is required for this action`}],children:(0,f.jsx)(u.Input,{maxLength:255,disabled:N&&!I.key,placeholder:N?I.key?`Required — Enter selector / locator`:`Not needed for this action`:`Select an action first`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Value`,name:`value`,rules:[{required:I.value,message:`Value is required for this action`}],children:(0,f.jsx)(u.Input.TextArea,{rows:1,autoSize:{minRows:1,maxRows:4},disabled:N&&!I.value,placeholder:N?I.value?`Required — Enter value`:`Not needed for this action`:`Select an action first`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Expected`,name:`expected`,rules:[{required:I.expected,message:`Expected result is required for this action`}],children:(0,f.jsx)(u.Input.TextArea,{rows:2,disabled:N&&!I.expected,placeholder:N?I.expected?`Required — Enter expected result`:`Not needed for this action`:`Select an action first`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Description`,name:`description`,children:(0,f.jsx)(u.Input.TextArea,{rows:2,maxLength:255,showCount:!0,placeholder:`Enter description`})})})]}),(0,f.jsxs)(u.Space,{className:`zt-actions`,children:[(0,f.jsx)(u.Button,{onClick:()=>{if(i){t(`/viewTestCase`);return}e.resetFields(),m([]),g([]),w(!1),E(!1)},children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,htmlType:`submit`,loading:D||k,children:i?`Update Test Case`:`Save & Continue`})]})]},`${j}-${M}`),F&&(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.TableOutlined,{}),(0,f.jsx)(`span`,{children:`Added Steps`})]}),extra:(0,f.jsx)(u.Tag,{children:N?`${h.length} ${N} step(s)`:`${h.length} step(s)`}),children:(0,f.jsx)(gf,{listName:`Added Steps`,loading:T,fields:bC,dataSource:h,current:1,pageSize:Math.max(h.length,1),total:h.length,rowSelection:!1,className:`zt-list-plain zt-list-static`})})]})})]}):null}var{Text:TC}=u.Typography,EC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`},{label:`Manage Modules`,href:`/manageModules`}];function DC(){let e=(0,p.useNavigate)(),t=(0,l.useMemo)(()=>se(),[]),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)({}),[o,s]=(0,l.useState)(!1),[c,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)(1),[x,S]=(0,l.useState)(10),C=(0,l.useCallback)(async e=>{if(!e){r([]);return}s(!0);try{let[t,n]=await Promise.all([eg({project:e}),rg({project:e})]);r(t?.items??[]);let i={};(n?.items??[]).forEach(e=>{let t=e.modulename;i[t]=(i[t]??0)+1}),a(i)}catch(e){console.error(e),u.message.error(`Unable to load modules.`)}finally{s(!1)}},[]);(0,l.useEffect)(()=>{if(!t){e(`/select-project`,{replace:!0});return}Promise.resolve().then(()=>C(t.name))},[t,e,C]);let w=async(e,t)=>{try{await ng(e.id,+!!t),r(n=>n.map(n=>n.id===e.id?{...n,active:+!!t}:n)),u.message.success(`Module ${t?`activated`:`deactivated`}.`)}catch(e){console.error(e),u.message.error(`Unable to update module status.`)}},T=async()=>{let e=h.trim();if(!e){u.message.warning(`Enter a module name.`);return}v(!0);try{await tg({project:t.name,modulename:e}),u.message.success(`Module added.`),m(!1),g(``),b(1),C(t.name)}catch(e){console.error(e),u.message.error(`Unable to add module (maybe it already exists).`)}finally{v(!1)}},E=t=>{e(`/test-cases/zinnext/submodules?module=${encodeURIComponent(t.modulename)}`)};return t?(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:EC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>e(`/addTestCase`),children:`Back to Form`})})]}),(0,f.jsxs)(`div`,{className:`zt-page`,children:[(0,f.jsx)(u.Card,{className:`v1-card zt-bar`,children:(0,f.jsxs)(u.Row,{gutter:[16,16],align:`middle`,justify:`space-between`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.ProjectOutlined,{}),(0,f.jsx)(`span`,{children:`Project:`}),(0,f.jsx)(TC,{strong:!0,children:t.name})]})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>m(!0),children:`Add Module`})})]})}),(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.AppstoreOutlined,{}),(0,f.jsx)(`span`,{children:`Modules`})]}),children:(0,f.jsx)(gf,{listName:`Modules`,loading:o,fields:[{label:`Module`,value:`modulename`},{label:`Submodules`,value:`submoduleCount`,width:140,render:(e,t)=>(0,f.jsxs)(u.Button,{type:`link`,className:`zt-count-link`,onClick:()=>E(t),children:[i[t.modulename]??0,` submodule(s)`]})},{label:`Active`,value:`active`,width:120,render:(e,t)=>(0,f.jsx)(u.Switch,{checked:e===1,checkedChildren:`On`,unCheckedChildren:`Off`,onChange:e=>w(t,e)})}],dataSource:n,current:y,pageSize:x,total:n.length,onPageChange:b,onPageSizeChange:e=>{b(1),S(e)},rowSelection:!1,className:`zt-list-plain`})})]}),(0,f.jsx)(u.Modal,{title:`Add Module`,open:c,confirmLoading:_,okText:`Add`,onOk:T,onCancel:()=>{m(!1),g(``)},destroyOnHidden:!0,children:(0,f.jsxs)(u.Space,{direction:`vertical`,className:`zt-modal-stack`,children:[(0,f.jsxs)(TC,{type:`secondary`,children:[`Project: `,(0,f.jsx)(`b`,{children:t.name})]}),(0,f.jsx)(u.Input,{placeholder:`Enter module name`,maxLength:100,value:h,onChange:e=>g(e.target.value),onPressEnter:T})]})})]}):null}var{Text:OC}=u.Typography,kC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`},{label:`Manage Modules`,href:`/manageModules`},{label:`Manage Submodules`,href:`/test-cases/zinnext/submodules`}];function AC(){let e=(0,p.useNavigate)(),[t]=(0,p.useSearchParams)(),n=(0,l.useMemo)(()=>se(),[]),r=t.get(`module`)??``,[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(!1),[c,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)(1),[x,S]=(0,l.useState)(10),C=(0,l.useCallback)(async(e,t)=>{if(!e||!t){a([]);return}s(!0);try{a((await rg({project:e,module:t}))?.items??[])}catch(e){console.error(e),u.message.error(`Unable to load submodules.`)}finally{s(!1)}},[]);(0,l.useEffect)(()=>{if(!n){e(`/select-project`,{replace:!0});return}if(!r){e(`/manageModules`,{replace:!0});return}Promise.resolve().then(()=>C(n.name,r))},[n,r,e,C]);let w=async(e,t)=>{try{await ag(e.id,+!!t),a(n=>n.map(n=>n.id===e.id?{...n,active:+!!t}:n)),u.message.success(`Submodule ${t?`activated`:`deactivated`}.`)}catch(e){console.error(e),u.message.error(`Unable to update submodule status.`)}},T=async()=>{let e=h.trim();if(!e){u.message.warning(`Enter a submodule name.`);return}v(!0);try{await ig({project:n.name,modulename:r,submodulename:e}),u.message.success(`Submodule added.`),m(!1),g(``),b(1),C(n.name,r)}catch(e){console.error(e),u.message.error(`Unable to add submodule (maybe it already exists).`)}finally{v(!1)}};return!n||!r?null:(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:kC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>e(`/manageModules`),children:`Back to Modules`})})]}),(0,f.jsxs)(`div`,{className:`zt-page`,children:[(0,f.jsx)(u.Card,{className:`v1-card zt-bar`,children:(0,f.jsxs)(u.Row,{gutter:[16,16],align:`middle`,justify:`space-between`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsxs)(u.Space,{size:16,wrap:!0,className:`zt-section-title`,children:[(0,f.jsxs)(u.Space,{size:6,children:[(0,f.jsx)(d.ProjectOutlined,{}),(0,f.jsx)(`span`,{children:`Project:`}),(0,f.jsx)(OC,{strong:!0,children:n.name})]}),(0,f.jsxs)(u.Space,{size:6,children:[(0,f.jsx)(d.AppstoreOutlined,{}),(0,f.jsx)(`span`,{children:`Module:`}),(0,f.jsx)(OC,{strong:!0,children:r})]})]})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>m(!0),children:`Add Submodule`})})]})}),(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.AppstoreOutlined,{}),(0,f.jsx)(`span`,{children:`Submodules`})]}),children:(0,f.jsx)(gf,{listName:`Submodules`,loading:o,fields:[{label:`Submodule`,value:`submodulename`},{label:`Active`,value:`active`,width:120,render:(e,t)=>(0,f.jsx)(u.Switch,{checked:e===1,checkedChildren:`On`,unCheckedChildren:`Off`,onChange:e=>w(t,e)})}],dataSource:i,current:y,pageSize:x,total:i.length,onPageChange:b,onPageSizeChange:e=>{b(1),S(e)},rowSelection:!1,className:`zt-list-plain`})})]}),(0,f.jsx)(u.Modal,{title:`Add Submodule`,open:c,confirmLoading:_,okText:`Add`,onOk:T,onCancel:()=>{m(!1),g(``)},destroyOnHidden:!0,children:(0,f.jsxs)(u.Space,{direction:`vertical`,className:`zt-modal-stack`,children:[(0,f.jsxs)(OC,{type:`secondary`,children:[`Project: `,(0,f.jsx)(`b`,{children:n.name}),` \xA0|\xA0 Module: `,(0,f.jsx)(`b`,{children:r})]}),(0,f.jsx)(u.Input,{placeholder:`Enter submodule name`,maxLength:100,value:h,onChange:e=>g(e.target.value),onPressEnter:T})]})})]})}var{Text:jC}=u.Typography,MC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`},{label:`Table`,href:`/viewTestCase`}];function NC(){let e=(0,p.useNavigate)(),[t,n]=(0,l.useState)([]),[r,i]=(0,l.useState)(0),[a,o]=(0,l.useState)(!1),s=(0,l.useMemo)(()=>se(),[]),[c,m]=(0,l.useState)(``),[h,g]=(0,l.useState)(1),[_,v]=(0,l.useState)(20),[y,b]=(0,l.useState)(null),x=(0,l.useCallback)(async(e={})=>{o(!0);try{let t=await og({product_parent_ID:e.project??s?.id??``,search:e.search??c??``,limit:e.pageSize??_,offset:((e.page??h)-1)*(e.pageSize??_)});n(t?.items??[]),i(t?.total??0)}catch(e){console.error(e),u.message.error(`Unable to load test flows.`)}finally{o(!1)}},[s?.id,c,h,_]),S=e=>{u.Modal.confirm({title:`Delete Test Case`,icon:(0,f.jsx)(d.ExclamationCircleOutlined,{}),content:`Are you sure you want to delete this test case?`,okText:`Delete`,okButtonProps:{danger:!0,loading:y===e.id},cancelText:`Cancel`,async onOk(){b(e.id);try{await dg(e.id),u.message.success(`Test case deleted successfully.`);let n=t.length===1&&h>1?h-1:h;g(n),await x({page:n})}catch(e){throw console.error(`Unable to delete test flow:`,e),u.message.error(`Unable to delete test case.`),e}finally{b(null)}}})};return(0,l.useEffect)(()=>{Promise.resolve().then(()=>{if(!s?.id){e(`/select-project`,{replace:!0});return}x({page:1})})},[]),(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:MC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>e(`/addTestCase`),children:`Back to Form`})})]}),(0,f.jsx)(`div`,{className:`zt-page zt-page-wide`,children:(0,f.jsxs)(u.Card,{className:`v1-card`,title:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.TableOutlined,{}),(0,f.jsx)(`span`,{children:`Test Flows`})]}),extra:(0,f.jsxs)(jC,{type:`secondary`,children:[r,` row(s)`]}),children:[(0,f.jsxs)(u.Space,{wrap:!0,className:`zt-toolbar`,children:[(0,f.jsx)(u.Input.Search,{allowClear:!0,className:`zt-search-filter`,placeholder:`Search module / key / description`,value:c,onChange:e=>m(e.target.value),onSearch:()=>{g(1),x({page:1})}}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:()=>x(),children:`Refresh`})]}),(0,f.jsx)(gf,{listName:`Test Flows`,loading:a,fields:[{label:`Actions`,value:`rowActions`,width:112,fixed:`left`,sorter:!1,render:(t,n)=>(0,f.jsxs)(u.Space,{size:4,className:`zt-row-actions`,children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>e(`/addTestCase?edit=${n.id}`)})}),(0,f.jsx)(u.Tooltip,{title:`Delete`,children:(0,f.jsx)(u.Button,{danger:!0,type:`text`,size:`small`,icon:(0,f.jsx)(d.DeleteOutlined,{}),loading:y===n.id,onClick:()=>S(n)})})]})},{label:`ID`,value:`id`,width:70,fixed:`left`},{label:`Project`,value:`project`,width:130},{label:`Module`,value:`module`,width:130},{label:`Submodule`,value:`submodule`,width:140},{label:`Step`,value:`step_order`,width:70},{label:`Action`,value:`actions`,width:140},{label:`Key`,value:`key`,width:160,ellipsis:!0},{label:`Value`,value:`value`,width:200,ellipsis:!0},{label:`Expected`,value:`expected`,width:180,ellipsis:!0},{label:`Description`,value:`description`,width:180,ellipsis:!0},{label:`Scenario`,value:`scenario`,width:110,render:e=>e===1?(0,f.jsx)(u.Tag,{color:`green`,children:`Positive`}):(0,f.jsx)(u.Tag,{color:`red`,children:`Negative`})},{label:`Active`,value:`active`,width:90,render:e=>e===1?(0,f.jsx)(u.Tag,{color:`blue`,children:`Active`}):(0,f.jsx)(u.Tag,{children:`Inactive`})}],dataSource:t,current:h,pageSize:_,total:r,onPageChange:e=>{g(e),x({page:e})},onPageSizeChange:e=>{g(1),v(e),x({page:1,pageSize:e})},rowSelection:!1,className:`zt-list-plain`})]})})]})}var PC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/test-cases`}];function FC(){return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsx)(so,{items:PC}),(0,f.jsx)(Zl,{moduleName:`test-flows`,rowKey:`id`})]})}var{Text:IC}=u.Typography,LC=[{label:`Home`,href:`/`},{label:`LMS Cases`,href:`/lms-cases`}],RC={tags:`regression`,active:1},zC={module:{dbName:`Modules`,formField:`module`,label:`Module`}},BC={key:!1,value:!1,expected:!1};function VC(e,t){return t?e[t]??BC:BC}function HC(e,t){e.setFields(t.map(e=>({name:e,errors:[]})))}function UC(e=[]){return e.map(e=>({value:e,label:e}))}function WC(e=``){return String(e??``).trim()}function GC(e=[]){let t=new Map;return e.forEach(e=>{let n=WC(e?.flow),r=n.toLowerCase();n&&!t.has(r)&&t.set(r,n)}),Array.from(t.values()).map(e=>({value:e,label:e}))}function KC(e=[],t,n){let r=WC(t).toLowerCase(),i=WC(n).toLowerCase();return e.reduce((e,t)=>{let n=WC(t?.module).toLowerCase(),a=WC(t?.flow).toLowerCase();if(n!==r||a!==i)return e;let o=Number(t?.step_order)||0;return Math.max(e,o)},0)+1}function qC({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(IC,{strong:!0,className:`v1-section-label`,children:t})]})}function JC(){let[e]=u.Form.useForm(),[t]=u.Form.useForm(),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)([]),[c,m]=(0,l.useState)(iC),[h,g]=(0,l.useState)({}),[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)({open:!1,typeKey:`module`}),[C,w]=(0,l.useState)(!1),[T,E]=(0,l.useState)(!1),[D,O]=(0,l.useState)(!1),k=(0,p.useNavigate)(),A=zC[x.typeKey],j=(0,l.useMemo)(()=>UC(n),[n]),M=u.Form.useWatch(`module`,e),N=u.Form.useWatch(`flow`,e),P=u.Form.useWatch(`keyword`,e),F=!!WC(M),I=!!WC(N),L=!F,R=!F||!I,z=(0,l.useMemo)(()=>VC(h,P),[h,P]),B=(e,t=[])=>{e===`module`&&r(t)},V=async()=>{v(!0);try{r((await Wh(zC.module.dbName))?.items??[])}catch(e){console.error(`Unable to load testing options:`,e),u.message.error(`Unable to load testing options.`)}finally{v(!1)}},H=async()=>{try{let e=await Kh();Array.isArray(e?.options)&&e.options.length>0&&m(e.options),e?.rules&&typeof e.rules==`object`&&g(e.rules)}catch(e){console.error(`Unable to load action field rules:`,e),u.message.error(`Unable to load action validation rules.`)}},U=(0,l.useCallback)(async t=>{let n=WC(t);if(a([]),s([]),e.setFieldsValue({step_order:void 0}),n){b(!0);try{let e=await Qh({limit:1e4,offset:0,module:n}),t=Array.isArray(e?.items)?e.items:[];a(t),s(GC(t))}catch(e){console.error(`Unable to load flows:`,e),u.message.error(`Unable to load flows.`)}finally{b(!1)}}},[e]),W=(0,l.useCallback)(async(t,n,r)=>{let i=WC(t),a=WC(n);if(!i||!a){e.setFieldsValue({step_order:void 0});return}E(!0);try{e.setFieldsValue({step_order:KC(r,i,a)})}catch(e){console.error(`Unable to load step order:`,e),u.message.error(`Unable to load step order.`)}finally{E(!1)}},[e]);(0,l.useEffect)(()=>{Promise.resolve().then(async()=>{await Promise.all([V(),H()])})},[]),(0,l.useEffect)(()=>{Promise.resolve().then(()=>U(M))},[U,M]),(0,l.useEffect)(()=>{Promise.resolve().then(()=>W(M,N,i))},[i,W,N,M]);let G=async t=>{let n={module:WC(t.module),flow:WC(t.flow),step_order:Number(t.step_order),description:WC(t.description),keyword:WC(t.keyword),target:WC(t.target),value:WC(t.value),expected:WC(t.expected),tags:t.tags?WC(t.tags):RC.tags,active:Number(t.active)};O(!0);try{await Zh(n),u.message.success(`LMS case details saved successfully.`),e.resetFields(),a([]),s([])}catch(e){console.error(`Unable to save LMS case:`,e),u.message.error(`Unable to save LMS case.`)}finally{O(!1)}},K=(t,n)=>{e.setFieldsValue({[t]:WC(n)})},q=t=>{e.setFieldsValue({module:WC(t),flow:void 0,step_order:void 0,keyword:void 0,description:void 0,target:void 0,tags:RC.tags,value:void 0,expected:void 0}),HC(e,[`keyword`,`target`,`value`,`expected`])},ee=t=>{e.setFieldsValue({flow:WC(t),step_order:void 0,keyword:void 0,target:void 0,value:void 0,expected:void 0}),HC(e,[`keyword`,`target`,`value`,`expected`])},te=t=>{let n=VC(h,t);e.setFieldsValue({keyword:WC(t),target:n.key?e.getFieldValue(`target`):void 0,value:n.value?e.getFieldValue(`value`):void 0,expected:n.expected?e.getFieldValue(`expected`):void 0}),HC(e,[`target`,`value`,`expected`])},ne=e=>{let n=zC[e];S({open:!0,typeKey:e}),t.setFieldsValue({name:``,type:n.label})},re=()=>{S(e=>({...e,open:!1})),t.resetFields()},ie=async()=>{try{let n=WC((await t.validateFields()).name),r=await Gh({name:n,type:A.dbName});B(x.typeKey,r?.items??[]),e.setFieldsValue({[A.formField]:n}),u.message.success(`${A.label} added successfully.`),re()}catch(e){if(e?.errorFields)return;console.error(`Unable to save testing option:`,e),u.message.error(`Unable to add ${A.label.toLowerCase()}.`)}finally{w(!1)}};return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:LC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>k(`/lms-home`),children:`View Table`})})]}),(0,f.jsx)(`div`,{className:`v1-page`,children:(0,f.jsxs)(`div`,{className:`v1-page-inner`,children:[(0,f.jsx)(`div`,{className:`v1-page-header`,children:(0,f.jsxs)(u.Space,{align:`center`,size:10,children:[(0,f.jsx)(d.ProfileOutlined,{className:`v1-outer-icon`}),(0,f.jsx)(`div`,{children:(0,f.jsx)(IC,{strong:!0,style:{fontSize:16},children:`Add LMS Case`})})]})}),(0,f.jsx)(Z,{children:(0,f.jsxs)(u.Form,{form:e,className:`v1-form`,layout:`vertical`,colon:!1,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),initialValues:RC,onFinish:G,autoComplete:`off`,children:[(0,f.jsx)(u.Card,{className:`v1-card`,title:(0,f.jsx)(qC,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`LMS Case Details`}),extra:(0,f.jsx)(IC,{type:`secondary`,className:`v1-card-subtitle`,children:`Module, flow, step order and execution data`}),children:(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`},children:[(0,f.jsx)(u.Form.Item,{label:`Module`,name:`module`,style:{flex:1},children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,loading:_,optionFilterProp:`label`,placeholder:`Select module`,options:j,onChange:q})}),(0,f.jsx)(u.Button,{"aria-label":`Add module`,icon:(0,f.jsx)(d.PlusOutlined,{}),style:{marginTop:30},onClick:()=>ne(`module`)})]})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Flow`,name:`flow`,children:(0,f.jsx)(u.AutoComplete,{maxLength:100,allowClear:!0,disabled:L,options:o,placeholder:y?`Loading flows`:`Enter flow`,onChange:ee,filterOption:(e,t)=>t?.value?.toLowerCase().includes(e.toLowerCase())})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Step Order`,name:`step_order`,validateTrigger:[`onBlur`,`onChange`],children:(0,f.jsx)(u.Input,{maxLength:10,disabled:!0,placeholder:T?`Loading step order`:`Step order`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Action`,name:`keyword`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,disabled:R,optionFilterProp:`label`,placeholder:`Select action`,options:c,onChange:te})})}),(0,f.jsx)(u.Col,{xs:24,children:(0,f.jsx)(u.Form.Item,{label:`Description`,name:`description`,children:(0,f.jsx)(u.Input.TextArea,{rows:3,maxLength:255,disabled:R,placeholder:`Enter description`,showCount:!0,onBlur:e=>K(`description`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Key`,name:`target`,rules:[{required:z.key,message:`Key is required for this action`}],children:(0,f.jsx)(u.Input,{maxLength:255,disabled:R||!!P&&!z.key,placeholder:R?`Select module and flow first`:P?z.key?`Required — Enter selector / locator`:`Not needed for this action`:`Select an action first`,onBlur:e=>K(`target`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Tags`,name:`tags`,children:(0,f.jsx)(u.Input,{maxLength:200,disabled:R,placeholder:`Enter tags`,prefix:(0,f.jsx)(d.TagsOutlined,{className:`v1-input-icon`}),onBlur:e=>K(`tags`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Value`,name:`value`,rules:[{required:z.value,message:`Value is required for this action`}],children:(0,f.jsx)(u.Input.TextArea,{rows:4,disabled:R||!!P&&!z.value,placeholder:R?`Select module and flow first`:P?z.value?`Required — Enter value`:`Not needed for this action`:`Select an action first`,onBlur:e=>K(`value`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Expected`,name:`expected`,rules:[{required:z.expected,message:`Expected result is required for this action`}],children:(0,f.jsx)(u.Input.TextArea,{rows:4,disabled:R||!!P&&!z.expected,placeholder:R?`Select module and flow first`:P?z.expected?`Required — Enter expected result`:`Not needed for this action`:`Select an action first`,onBlur:e=>K(`expected`,e.target.value)})})})]})}),(0,f.jsx)(`div`,{className:`v1-form-actions`,children:(0,f.jsx)(u.Form.Item,{children:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{type:`primary`,htmlType:`submit`,loading:D,disabled:R,children:`Submit`}),(0,f.jsx)(u.Button,{onClick:()=>{e.resetFields(),a([]),s([])},children:`Reset`})]})})})]})}),(0,f.jsx)(u.Modal,{title:`Add ${A.label}`,open:x.open,confirmLoading:C,okText:`Add`,onCancel:re,onOk:()=>{w(!0),ie()},destroyOnHidden:!0,children:(0,f.jsxs)(u.Form,{form:t,layout:`vertical`,colon:!1,className:`v1-form`,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),children:[(0,f.jsx)(u.Form.Item,{label:`Name`,name:`name`,children:(0,f.jsx)(u.Input,{maxLength:100,placeholder:`Enter ${A.label.toLowerCase()} name`,onBlur:e=>{t.setFieldsValue({name:WC(e.target.value)})}})}),(0,f.jsx)(u.Form.Item,{label:`Type`,name:`type`,children:(0,f.jsx)(u.Input,{disabled:!0})})]})})]})})]})}var YC=[{label:`Home`,href:`/`},{label:`LMS Cases`,href:`/lms-cases`}];function XC(){return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsx)(so,{items:YC}),(0,f.jsx)(Zl,{moduleName:`lms-flows`,rowKey:`id`})]})}var ZC=mg(ky),QC=mg(LS),$C=mg(zS),ew=mg(BS),tw=mg(HS),nw=mg(rC),rw=mg(hC),iw=mg(wC),aw=mg(DC),ow=mg(AC),sw=mg(NC),cw=mg(FC),lw=mg(JC),uw=mg(XC);exports.ADMIN_API_URL=D,exports.ADMIN_APP_ID=O,exports.AUTH_URL=E,exports.ActivityTab=fd,exports.AddFormV1=rd,exports.AdminDashboard=Oy,exports.AdminPage=ZC,exports.AppAlert=id,exports.AppButton=mc,exports.AppShell=Rh,exports.AssigneeAvatars=pd,exports.AuthGuard=Ih,exports.Breadcrumb=so,exports.BulkUploadPage=nw,exports.CANDIDATES_URL=j,exports.CalendarCard=Oe,exports.CoreThemeAdminApp=My,exports.CoreThemeAdminRoutes=jy,exports.CustomPagination=Rs,exports.DescriptionBlock=wd,exports.DetailHeaderCard=om,exports.DetailViewPage=fm,exports.DetailViewV1=pp,exports.DocumentViewer=Bt,exports.DynamicCards=xt,exports.DynamicPopup=Fb,exports.DynamicPopupRoute=zx,exports.DynamicTabs=Hs,exports.EditFormV1=Ym,exports.Header=wh,exports.JOBS_URL=A,exports.JobModuleDetailPage=ew,exports.JobsListPage=$C,exports.LegacyAdminPage=QC,exports.ListView=Zl,exports.LmsHomePage=uw,exports.LmsTestForm=lw,exports.Login=zh,exports.MailPopup=By,exports.ManageModules=aw,exports.ManageSubmodules=ow,exports.POPUP_CONFIGS=Fx,exports.ParamCardView=Cf,exports.ParamListView=gf,exports.PreviewPopup=$y,exports.ProjectSelect=pg,exports.SUBMISSIONS_URL=k,exports.Sidebar=Mh,exports.StickyNotesFullPage=tw,exports.StylishDynamicTabs=zd,exports.TemplateEditor=eh,exports.TestForm=rw,exports.TestingHomePage=cw,exports.TipTapEditor=wt,exports.UserForm=Zx,exports.VendorShareDrawer=Ux,exports.ViewSummaryWidget=pc,exports.WizardPopup=ab,exports.ZinnextTableView=sw,exports.ZinnextTestForm=iw,exports.clearSelectedProject=ce,exports.colors=Ka,exports.configureCoreTheme=N,exports.getCurrentRoleName=re,exports.getModuleConfig=Ie,exports.getSelectedProject=se,exports.getStoredToken=ee,exports.getStoredUser=te,exports.getUserRoles=ie,exports.isTester=ae,exports.logout=ne,exports.setSelectedProject=oe,exports.useDropdownFields=Yo,exports.useDropdownValues=hc,exports.useEditForm=th,exports.useFieldConfig=Xo,exports.useFilterFields=Zo,exports.useMenuPermission=ts,exports.withAuthGuard=mg;
8
+ `))}function rf(e){let t=e.match(/^([A-Za-z][A-Za-z&/ ]{1,28}?)\s*:\s*(\S.+)$/);if(!t)return null;let n=t[1].trim(),r=t[2].trim();return n.split(/\s+/).length>3||r.length>60?null:{fieldKey:n.toLowerCase().replace(/\s+/g,`-`),fieldLabel:Qd(n),value:r}}function af(e){let t=e.toLowerCase().replace(/[\s:.\-–—]+$/,``).trim();return Jd.has(t)?Yd.test(t)?`education`:Xd.test(t)?`keySkills`:`overview`:null}function of(e){let t=[],n={overview:[],keySkills:[],education:[]},r=`overview`;return e.forEach(e=>{let i=af(e);if(i){r=i;return}if(r===`overview`){let n=rf(e);if(n){t.push(n);return}}n[r].push(e)}),{meta:t,overview:$d(n.overview),keySkills:$d(n.keySkills),education:$d(n.education)}}function sf(e){let t=[...qd].sort((e,t)=>t.length-e.length),n=RegExp(`\\b(${t.map(Zd).join(`|`)})\\b\\s*:?`,`gi`),r=[...e.matchAll(n)];if(!r.length)return{meta:[],overview:$d(nf(e)),keySkills:[],education:[]};let i={overview:[],keySkills:[],education:[]},a=e.slice(0,r[0].index).trim();return a&&i.overview.push(...nf(a)),r.forEach((t,n)=>{let a=t[1].trim().toLowerCase(),o=t.index+t[0].length,s=n+1<r.length?r[n+1].index:e.length,c=nf(e.slice(o,s).trim());c.length&&i[Yd.test(a)?`education`:Xd.test(a)?`keySkills`:`overview`].push(...c)}),{meta:[],overview:$d(i.overview),keySkills:$d(i.keySkills),education:$d(i.education)}}function cf(e){let t=ef(e);if(!t)return{meta:[],overview:[],keySkills:[],education:[]};let n=tf(t);return n.length>=4?of(n):sf(t)}function lf({items:e}){return(0,f.jsx)(`ul`,{className:`jdv-ats-bullets`,children:e.map((e,t)=>(0,f.jsx)(`li`,{className:`jdv-ats-bullet-item`,children:e},t))})}function uf({raw:e=``,meta:t=[]}){let[n,r]=(0,l.useState)(!1),i=(0,l.useMemo)(()=>cf(e),[e]),a=t.length?t:i.meta,o=[];if(i.overview.length&&o.push({key:`overview`,title:`Overview`,items:i.overview}),i.keySkills.length&&o.push({key:`keySkills`,title:`Key Skills`,items:i.keySkills,card:!0,icon:`🛠️`}),i.education.length&&o.push({key:`education`,title:`Education`,items:i.education,card:!0,icon:`🎓`}),!a.length&&!o.length)return(0,f.jsx)(Gd,{type:`secondary`,children:`No description available.`});let s=n?o:o.slice(0,Kd),c=o.length-Kd;return(0,f.jsxs)(`div`,{className:`jdv-ats-desc`,children:[a.length>0&&(0,f.jsx)(`div`,{className:`jdv-ats-meta-grid`,children:a.map(({fieldKey:e,fieldLabel:t,value:n})=>(0,f.jsxs)(`div`,{className:`jdv-ats-meta-row`,children:[(0,f.jsx)(`span`,{className:`jdv-ats-meta-key`,children:t}),(0,f.jsx)(`span`,{className:`jdv-ats-meta-val`,children:n})]},e??t))}),(0,f.jsx)(`div`,{className:`jdv-ats-sections`,children:s.map(e=>e.card?(0,f.jsxs)(`div`,{className:`education-block`,children:[(0,f.jsxs)(`div`,{className:`education-header`,children:[(0,f.jsx)(`span`,{children:e.icon}),(0,f.jsx)(`span`,{children:e.title})]}),(0,f.jsx)(`ul`,{className:`education-list`,children:e.items.map((e,t)=>(0,f.jsx)(`li`,{className:`education-list-item`,children:e},t))})]},e.key):(0,f.jsxs)(`div`,{className:`jdv-ats-section`,children:[(0,f.jsx)(`div`,{className:`jdv-ats-section-hd`,children:(0,f.jsx)(`span`,{children:e.title})}),(0,f.jsx)(lf,{items:e.items})]},e.key))}),c>0&&(0,f.jsx)(`span`,{className:`jdv-desc-toggle`,onClick:()=>r(e=>!e),children:n?`Show less`:`Show more (${c} more section${c>1?`s`:``})`})]})}var{Text:df}=u.Typography;function ff(e){return e.label??e.fieldLabel??e.name??e.fieldName??e.value}function pf(e){return e.value??e.fieldName??e.name??e.label}function mf(e,t){let n=e?.[t];return n==null?`-`:Array.isArray(n)?n.join(`, `):typeof n==`object`?Object.values(n).join(` `):n}function hf(e,t){return(0,f.jsxs)(u.Space,{size:6,children:[(0,f.jsx)(`span`,{children:e}),(0,f.jsx)(u.Badge,{count:t,overflowCount:9999})]})}function gf({listName:e=`List`,fields:t=[],actions:n=[],dataSource:r=[],loading:i=!1,total:a,current:o,pageSize:s,onPageChange:c,onPageSizeChange:m,onSearch:h,rowSelection:g=!0,className:_=``,tableClassName:v=`job-list-table`,activeView:y=`list`,onViewChange:b}){let x=(0,p.useNavigate)(),S=(0,p.useLocation)(),[C,w]=(0,l.useState)(`all`),[T,E]=(0,l.useState)(``),[D,O]=(0,l.useState)([]),[k,A]=(0,l.useState)([]),[j,M]=(0,l.useState)({current:1,pageSize:10}),[N,P]=(0,l.useState)([]),[F,I]=(0,l.useState)(!1),L=(0,l.useRef)(null),R=n.filter(e=>!e.maxSelect||D.length<=e.maxSelect).map(e=>({key:e.key??e.name,label:e.label??e.name,danger:e.danger??!1,disabled:D.length===0,onClick:()=>{!e.route||D.length===0||x(e.route,{state:{background:S,selectedIds:D,selectedRecords:k,...e.popupState??{}}})}})),z=typeof o==`number`&&typeof s==`number`,B=z?{current:o,pageSize:s}:j,V=(0,l.useMemo)(()=>t.map(e=>({...e,key:pf(e),label:ff(e)})).filter(e=>e.key&&e.label&&!e.tableHidden),[t]),H=N.length?N:V.map(e=>e.key),U=(0,l.useMemo)(()=>{if(h)return r;let e=T.toLowerCase();return!e||e.length<3?r:r.filter(t=>V.some(n=>String(mf(t,n.key)).toLowerCase().includes(e)))},[r,V,h,T]),W=typeof a==`number`?a:T.trim()?U.length:r.length,G=(0,l.useMemo)(()=>{if(z)return U;let e=(B.current-1)*B.pageSize;return U.slice(e,e+B.pageSize)},[B.current,B.pageSize,U,z]),K=(0,l.useMemo)(()=>V.filter(e=>H.includes(e.key)).map(e=>({title:e.label,dataIndex:e.key,key:e.key,sorter:e.sorter===!1?!1:e.sorter??((t,n)=>String(mf(t,e.key)).localeCompare(String(mf(n,e.key)))),width:e.width??180,fixed:e.fixed,ellipsis:e.ellipsis??!0,className:e.className,render:(t,n,r)=>e.render?e.render(t,n,r):(0,f.jsx)(df,{className:`job-cell-primary`,children:mf(n,e.key)})})),[V,H]),q=H.length===V.length,ee=H.length>0&&!q,te=(e,t)=>{P(n=>{let r=n.length?n:V.map(e=>e.key);return t?r.includes(e)?r:[...r,e]:r.filter(t=>t!==e)})},ne=(0,f.jsxs)(`div`,{className:`column-visibility-menu`,onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(u.Checkbox,{checked:q,indeterminate:ee,onChange:e=>{P(e.target.checked?V.map(e=>e.key):[])},children:`Select All`}),V.map(e=>(0,f.jsx)(u.Checkbox,{checked:H.includes(e.key),onChange:t=>te(e.key,t.target.checked),children:e.label},e.key))]});return(0,f.jsxs)(`div`,{className:`antd dynamic-list-view ${_}`.trim(),children:[(0,f.jsx)(u.Card,{children:(0,f.jsxs)(u.Flex,{align:`center`,justify:`space-between`,children:[(0,f.jsx)(u.Tabs,{activeKey:C,items:[{key:`all`,label:hf(e,W)}],onChange:e=>{w(e),M({...j,current:1})}}),(0,f.jsxs)(u.Flex,{align:`center`,gap:8,children:[(0,f.jsx)(u.Input,{prefix:(0,f.jsx)(d.SearchOutlined,{className:`job-search-icon`}),placeholder:`Min 3 Chars to search`,value:T,onChange:e=>{let t=e.target.value;E(t),h?(clearTimeout(L.current),L.current=setTimeout(()=>{h(t),c?.(1)},350)):z?c?.(1):M({...j,current:1})},allowClear:!0,className:`job-search-input`}),(0,f.jsx)(u.Tooltip,{title:`Filter`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button`,icon:(0,f.jsx)(d.FilterOutlined,{})})}),(0,f.jsx)(u.Tooltip,{title:`Card view`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button param-view-toggle-btn${y===`card`?` param-view-toggle-btn--active`:``}`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),onClick:()=>b?.(`card`)})}),(0,f.jsx)(u.Tooltip,{title:`List view`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button param-view-toggle-btn${y===`list`?` param-view-toggle-btn--active`:``}`,icon:(0,f.jsx)(d.UnorderedListOutlined,{}),onClick:()=>b?.(`list`)})})]})]})}),(0,f.jsx)(u.Card,{children:(0,f.jsxs)(u.Flex,{align:`center`,gap:3,children:[(0,f.jsx)(u.Dropdown,{open:F,onOpenChange:I,trigger:[`click`],dropdownRender:()=>ne,placement:`bottomLeft`,overlayClassName:`column-visibility-dropdown`,children:(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(`img`,{src:Oc,alt:``,className:`job-action-list-icon`}),size:`small`,className:`job-actions-button`})}),D.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Dropdown,{menu:{items:R},trigger:[`click`],children:(0,f.jsxs)(u.Button,{type:`text`,size:`small`,className:`job-actions-button job-actions-menu-button`,children:[(0,f.jsx)(`img`,{src:`data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6279%206.78121C12.6857%206.88148%2012.7014%207.00057%2012.6715%207.11239C12.6417%207.22422%2012.5688%207.31967%2012.4688%207.37785L7.21875%2010.4403C7.15185%2010.4794%207.0758%2010.4999%206.99836%2010.4999C6.92092%2010.4999%206.84487%2010.4794%206.77797%2010.4403L1.52797%207.37785C1.42936%207.31859%201.35806%207.22289%201.32951%207.11145C1.30095%207.00001%201.31744%206.88181%201.37539%206.78244C1.43335%206.68306%201.52811%206.61052%201.63916%206.5805C1.75022%206.55048%201.86863%206.56542%201.96875%206.62207L7%209.55605L12.0312%206.62207C12.1315%206.56428%2012.2506%206.54858%2012.3624%206.57841C12.4743%206.60824%2012.5697%206.68116%2012.6279%206.78121ZM1.3125%204.37496C1.31267%204.29833%201.33297%204.22309%201.37136%204.15677C1.40975%204.09045%201.46489%204.03538%201.53125%203.99707L6.78125%200.934566C6.84815%200.895555%206.9242%200.875%207.00164%200.875C7.07908%200.875%207.15513%200.895555%207.22203%200.934566L12.472%203.99707C12.5381%204.0356%2012.5929%204.09076%2012.6309%204.15707C12.669%204.22337%2012.6891%204.2985%2012.6891%204.37496C12.6891%204.45142%2012.669%204.52654%2012.6309%204.59285C12.5929%204.65915%2012.5381%204.71432%2012.472%204.75285L7.22203%207.81535C7.15513%207.85436%207.07908%207.87491%207.00164%207.87491C6.9242%207.87491%206.84815%207.85436%206.78125%207.81535L1.53125%204.75285C1.46489%204.71453%201.40975%204.65946%201.37136%204.59314C1.33297%204.52682%201.31267%204.45159%201.3125%204.37496ZM2.61844%204.37496L7%206.93105L11.3816%204.37496L7%201.81886L2.61844%204.37496ZM7.65625%2011.7993L7%2012.1821L1.96875%209.24707C1.86913%209.19747%201.75436%209.18769%201.64779%209.21973C1.54122%209.25177%201.45087%209.32322%201.39512%209.41953C1.33937%209.51583%201.32241%209.62977%201.3477%209.73814C1.37299%209.84651%201.43863%209.94117%201.53125%2010.0028L6.78125%2013.0653C6.84815%2013.1044%206.9242%2013.1249%207.00164%2013.1249C7.07908%2013.1249%207.15513%2013.1044%207.22203%2013.0653L8.09703%2012.5551C8.14746%2012.5266%208.19171%2012.4883%208.22723%2012.4426C8.26275%2012.3968%208.28882%2012.3444%208.30394%2012.2885C8.31906%2012.2326%208.32291%2012.1742%208.31529%2012.1167C8.30766%2012.0593%208.28871%2012.004%208.25952%2011.9539C8.23033%2011.9039%208.19149%2011.8601%208.14526%2011.8252C8.09903%2011.7903%208.04632%2011.7649%207.9902%2011.7505C7.93408%2011.7361%207.87566%2011.7331%207.81833%2011.7414C7.761%2011.7498%207.70591%2011.7695%207.65625%2011.7993Z'%20fill='%236B7280'/%3e%3cpath%20d='M10.6036%2011.3825L13.4607%209.4477C13.5813%209.36599%2013.614%209.20256%2013.5341%209.08069L13.0105%208.282C12.9303%208.15966%2012.7665%208.12478%2012.6434%208.20383L9.54053%2010.1964L8.94939%2011.4054C8.84904%2011.6106%209.03632%2011.8387%209.25715%2011.7803L10.4338%2011.469C10.4561%2011.4631%2010.4776%2011.4543%2010.4977%2011.4429L10.6036%2011.3825ZM9.54053%2010.1964L10.6036%2011.3825'%20stroke='%236B7280'%20stroke-width='0.6'/%3e%3c/svg%3e`,alt:``,className:`job-actions-frame-icon`}),`Actions `,(0,f.jsx)(d.DownOutlined,{className:`job-actions-caret`})]})}),(0,f.jsxs)(df,{className:`job-selected-count`,children:[`Selected (`,D.length,`)`]})]})]})}),(0,f.jsx)(u.Spin,{spinning:i,children:(0,f.jsx)(u.Table,{rowSelection:g?{type:`checkbox`,selectedRowKeys:D,onChange:(e,t)=>{O(e),A(t)}}:void 0,columns:K,dataSource:G,size:`middle`,scroll:{x:`max-content`},showSorterTooltip:!1,tableLayout:`auto`,pagination:!1,className:v,rowKey:e=>e.id??e.key})}),(0,f.jsx)(Rs,{current:B.current,pageSize:B.pageSize,total:W,onChange:e=>{z?c?.(e):M(t=>({...t,current:e}))},onPageSizeChange:e=>{z?m?.(e):M({current:1,pageSize:e})}})]})}var{Text:_f}=u.Typography;function vf(e){return e.label??e.fieldLabel??e.name??e.fieldName??e.value}function yf(e){return e.value??e.fieldName??e.name??e.label}function bf(e,t){let n=e?.[t];return n==null?`-`:Array.isArray(n)?n.join(`, `):typeof n==`object`?Object.values(n).join(` `):n}var xf=[{key:`name`,label:`Name`},{key:`designation`,label:`Designation`},{key:`locationExp`,label:`Location / Exp`},{key:`skills`,label:`Skills`},{key:`createdOn`,label:`Created On`}];function Sf({record:e,fields:t,selected:n,onSelect:r}){let i=(0,p.useNavigate)(),a=(0,p.useLocation)(),o=t.find(e=>e.cardRole===`name`),s=t.find(e=>e.cardRole===`subtitle`),c=t.find(e=>e.cardRole===`location`),l=t.find(e=>e.cardRole===`skills`),m=t.find(e=>e.cardRole===`exp`),h=t.find(e=>e.cardRole===`date`),g=t.find(e=>e.cardRole===`action`),_=o?bf(e,o.key):`-`,v=s?bf(e,s.key):``,y=c?bf(e,c.key):``,b=m?bf(e,m.key):``,x=h?bf(e,h.key):``,S=l?e[l.key]:[],C=Array.isArray(S)?S:[],w=C.slice(0,3),T=C.slice(3),E=g?.render?g.render(bf(e,g.key),e):null;function D(){i(`/popup/preview`,{state:{background:a,moduleName:`candidate`,record:e,fields:xf}})}function O(){i(`/popup/mail`,{state:{background:a}})}return(0,f.jsxs)(`div`,{className:`param-card${n?` param-card--selected`:``}`,children:[(0,f.jsxs)(`div`,{className:`param-card__header`,children:[(0,f.jsxs)(`div`,{className:`param-card__header-left`,children:[(0,f.jsxs)(`div`,{className:`param-card__name-row`,children:[(0,f.jsx)(u.Checkbox,{checked:n,onChange:r,onClick:e=>e.stopPropagation(),className:`param-card__checkbox`}),(0,f.jsx)(d.EyeOutlined,{className:`param-card__eye-icon`,onClick:D}),(0,f.jsxs)(`span`,{className:`param-card__name-block`,children:[(0,f.jsx)(_f,{className:`param-card__name`,children:_}),v&&v!==`-`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{className:`param-card__sep`,children:`·`}),(0,f.jsx)(_f,{className:`param-card__subtitle`,children:v})]})]})]}),y&&y!==`-`&&(0,f.jsxs)(`div`,{className:`param-card__location`,children:[(0,f.jsx)(d.EnvironmentOutlined,{className:`param-card__location-icon`}),(0,f.jsx)(_f,{className:`param-card__location-text`,children:y})]})]}),(0,f.jsx)(`div`,{className:`param-card__header-right`,children:(0,f.jsxs)(`span`,{className:`param-card__exp-badge`,children:[`Exp: `,b&&b!==`-`?b:`-`]})})]}),(0,f.jsxs)(`div`,{className:`param-card__body`,children:[(0,f.jsxs)(`div`,{className:`param-card__body-left`,children:[(0,f.jsx)(_f,{className:`param-card__section-label`,children:`Skills`}),(0,f.jsxs)(`div`,{className:`param-card__skills-row`,children:[w.length>0?w.map(e=>(0,f.jsx)(u.Tag,{className:`sourcing-skill-tag`,children:e},e)):(0,f.jsx)(_f,{className:`param-card__empty`,children:`-`}),T.length>0&&(0,f.jsx)(u.Popover,{trigger:`click`,placement:`bottomLeft`,overlayClassName:`sourcing-skills-popover`,content:(0,f.jsx)(`div`,{className:`sourcing-skills-popup`,children:T.map(e=>(0,f.jsx)(u.Tag,{className:`sourcing-skill-tag`,children:e},e))}),children:(0,f.jsxs)(`span`,{className:`sourcing-more-skills`,children:[`+`,T.length]})})]})]}),x&&x!==`-`&&(0,f.jsxs)(`div`,{className:`param-card__body-right`,children:[(0,f.jsx)(_f,{className:`param-card__section-label param-card__section-label--right`,children:`Created on`}),(0,f.jsx)(_f,{className:`param-card__date-value`,children:x})]})]}),(0,f.jsx)(`div`,{className:`param-card__divider`}),(0,f.jsxs)(`div`,{className:`param-card__footer`,children:[(0,f.jsxs)(`div`,{className:`param-card__footer-left`,children:[(0,f.jsx)(u.Tooltip,{title:`Resume`,children:(0,f.jsx)(`button`,{type:`button`,className:`param-card__icon-btn`,"aria-label":`Resume`,children:(0,f.jsx)(d.FileTextOutlined,{})})}),(0,f.jsx)(u.Tooltip,{title:`Call`,children:(0,f.jsx)(`button`,{type:`button`,className:`param-card__icon-btn`,"aria-label":`Call`,children:(0,f.jsx)(d.PhoneOutlined,{})})}),(0,f.jsx)(u.Tooltip,{title:`Email`,children:(0,f.jsx)(`button`,{type:`button`,className:`param-card__icon-btn`,"aria-label":`Email`,onClick:O,children:(0,f.jsx)(d.MailOutlined,{})})})]}),(0,f.jsx)(`div`,{className:`param-card__footer-right`,children:E})]})]})}function Cf({listName:e=`List`,moduleName:t=``,actions:n=[],fields:r=[],dataSource:i=[],loading:a=!1,total:o,current:s,pageSize:c,onPageChange:m,onPageSizeChange:h,className:g=``,activeView:_=`card`,onViewChange:v}){let y=(0,p.useNavigate)(),b=(0,p.useLocation)(),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)({current:1,pageSize:12}),[T,E]=(0,l.useState)([]),[D,O]=(0,l.useState)([]),k=typeof s==`number`&&typeof c==`number`,A=k?{current:s,pageSize:c}:C,j=e=>{let t=e.id??e._id;E(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t]),O(n=>n.some(e=>(e.id??e._id)===t)?n.filter(e=>(e.id??e._id)!==t):[...n,e])},M=n.filter(e=>!e.maxSelect||T.length<=e.maxSelect).map(e=>({key:e.key??e.name,label:e.label??e.name,danger:e.danger??!1,disabled:T.length===0,onClick:()=>{!e.route||T.length===0||y(e.route,{state:{background:b,selectedIds:T,selectedRecords:D,moduleName:t,...e.popupState??{}}})}})),N=(0,l.useMemo)(()=>r.map(e=>({...e,key:yf(e),label:vf(e)})).filter(e=>e.key&&e.label),[r]),P=typeof o==`number`?o:i.length,F=(0,l.useMemo)(()=>{let e=x.toLowerCase();return!e||e.length<3?i:i.filter(t=>N.some(n=>String(bf(t,n.key)).toLowerCase().includes(e)))},[i,N,x]),I=(0,l.useMemo)(()=>{if(k)return F;let e=(A.current-1)*A.pageSize;return F.slice(e,e+A.pageSize)},[A.current,A.pageSize,F,k]);return(0,f.jsxs)(`div`,{className:`antd param-card-view ${g}`.trim(),children:[(0,f.jsx)(u.Card,{children:(0,f.jsxs)(u.Flex,{align:`center`,justify:`space-between`,children:[(0,f.jsxs)(u.Flex,{align:`center`,gap:6,children:[(0,f.jsx)(_f,{className:`param-card-view__tab-label`,children:e}),(0,f.jsx)(`span`,{className:`param-card-view__count`,children:P}),T.length>0&&n.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Dropdown,{menu:{items:M},trigger:[`click`],children:(0,f.jsxs)(u.Button,{type:`text`,size:`small`,className:`job-actions-button job-actions-menu-button`,children:[`Actions `,(0,f.jsx)(d.DownOutlined,{className:`job-actions-caret`})]})}),(0,f.jsxs)(_f,{className:`job-selected-count`,children:[`Selected (`,T.length,`)`]})]})]}),(0,f.jsxs)(u.Flex,{align:`center`,gap:8,children:[(0,f.jsx)(u.Input,{prefix:(0,f.jsx)(d.SearchOutlined,{className:`job-search-icon`}),placeholder:`Search by name, location, skills`,value:x,onChange:e=>{S(e.target.value),k?m?.(1):w(e=>({...e,current:1}))},allowClear:!0,className:`job-search-input`}),(0,f.jsx)(u.Tooltip,{title:`Filter`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button`,icon:(0,f.jsx)(d.FilterOutlined,{})})}),(0,f.jsx)(u.Tooltip,{title:`Card view`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button param-view-toggle-btn${_===`card`?` param-view-toggle-btn--active`:``}`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),onClick:()=>v?.(`card`)})}),(0,f.jsx)(u.Tooltip,{title:`List view`,children:(0,f.jsx)(u.Button,{className:`job-toolbar-icon-button param-view-toggle-btn${_===`list`?` param-view-toggle-btn--active`:``}`,icon:(0,f.jsx)(d.UnorderedListOutlined,{}),onClick:()=>v?.(`list`)})})]})]})}),(0,f.jsx)(u.Spin,{spinning:a,children:I.length>0?(0,f.jsx)(`div`,{className:`param-card-view__grid`,children:I.map((e,t)=>(0,f.jsx)(Sf,{record:e,fields:N,selected:T.includes(e.id??e._id),onSelect:()=>j(e)},e.id??e.key??t))}):!a&&(0,f.jsx)(`div`,{className:`param-card-view__empty`,children:`No results found`})}),(0,f.jsx)(Rs,{current:A.current,pageSize:A.pageSize,total:P,onChange:e=>{k?m?.(e):w(t=>({...t,current:e}))},onPageSizeChange:e=>{k?h?.(e):w({current:1,pageSize:e})}})]})}var{Text:wf}=u.Typography,Tf=[{key:`quick-submit`,name:`Quick Submit`,label:`Quick Submit`,route:`/popup/quick-submit`,maxSelect:1},{key:`shortlist`,name:`Shortlist`,label:`Shortlist`,route:`/popup/quick-submit`,popupState:{defaultStage:`Shortlisted`}},{key:`mail`,name:`Send Email`,label:`Send Email`,route:`/popup/mail`},{key:`tag-to-job`,name:`Tag to Jobs`,label:`Tag to Jobs`,route:`/popup/tag-to-job`},{key:`add-notes`,name:`Add Notes`,label:`Add Notes`,route:`/popup/add-notes`,maxSelect:1}],Ef=[{label:`Today`,value:`today`},{label:`Yesterday`,value:`yesterday`},{label:`Last 7 Days`,value:`7days`},{label:`Last 30 Days`,value:`30days`},{label:`This Month`,value:`months`},{label:`Last Month`,value:`lastmonth`}],Df=[`All`,`Internal`,`Dice`,`Network`],Of={0:`0`,15:`15`,30:`30+`},kf=({onMigrate:e,migratingDiceId:t,migratedDiceIds:n})=>[{label:`Name`,value:`name`,width:190,cardRole:`name`,render:e=>(0,f.jsx)(wf,{className:`job-cell-primary sourcing-candidate-name`,children:e||`-`})},{label:`Designation`,value:`designation`,width:200,cardRole:`subtitle`},{label:`Location/Exp`,value:`locationExp`,width:160},{label:`Location`,value:`location`,cardRole:`location`,tableHidden:!0},{label:`Exp`,value:`exp`,cardRole:`exp`,tableHidden:!0},{label:`Skills`,value:`skills`,width:220,cardRole:`skills`,render:e=>(0,f.jsxs)(u.Space,{size:[4,4],wrap:!0,children:[(Array.isArray(e)?e:[]).slice(0,3).map(e=>(0,f.jsx)(u.Tag,{className:`sourcing-skill-tag`,children:e},e)),Array.isArray(e)&&e.length>3&&(0,f.jsx)(u.Popover,{trigger:`click`,placement:`bottomLeft`,overlayClassName:`sourcing-skills-popover`,content:(0,f.jsx)(`div`,{className:`sourcing-skills-popup`,children:e.slice(3).map(e=>(0,f.jsx)(u.Tag,{className:`sourcing-skill-tag`,children:e},e))}),children:(0,f.jsxs)(`span`,{className:`sourcing-more-skills`,children:[`+`,e.length-3]})}),(!Array.isArray(e)||e.length===0)&&`-`]})},{label:`Created on`,value:`createdOn`,width:150,cardRole:`date`},{label:`Action`,value:`action`,width:120,sorter:!1,cardRole:`action`,render:(r,i)=>{if(!([i?.sourceType,i?.profileSource,i?.selectedSource,i?.customFields?.sourceType,i?.customFields?.profileSource].flat().some(e=>String(e??``).trim().toLowerCase()===`dice`)||i?.customFields?.diceProfileData))return(0,f.jsx)(mc,{size:`small`,variant:`soft`,icon:(0,f.jsx)(d.LikeOutlined,{}),className:`sourcing-shortlist-btn`,children:`Shortlist`});let a=Jt(i),o=!a,s=String(t)===String(a),c=n.has(String(a)),l=o||c;return process.env.NODE_ENV===`development`&&(console.log(`[DiceMigration] Candidate before render:`,{id:i?.id,diceId:a,candidateId:i?.candidateId,nestedDiceProfileData:i?.customFields?.diceProfileData}),a||console.warn(`[DiceMigration] Migrate disabled: no Dice profile id found on row`,i),console.log(`[DiceMigration] disabled check:`,{diceId:a,migratingDiceId:t,noDiceId:o,disabled:l,isMigrated:c,loading:s})),(0,f.jsx)(mc,{size:`small`,variant:`soft`,loading:s,disabled:l,onClick:()=>e(i,a),className:`sourcing-shortlist-btn`,children:c?`Migrated`:`Migrate`})}}];function Af(e){return[e.firstName,e.middleName,e.lastName].filter(Boolean).join(` `)||e.name||e.fullName||`-`}function jf(e){let t=e.skills??e.skill??e.primarySkills??e.technicalSkills??[];process.env.NODE_ENV===`development`&&console.log(`Raw API Skills:`,t);let n=[];return Array.isArray(t)?n=t.map(e=>typeof e==`string`?e:e?.skill??e?.name??e?.skillName??e?.value).filter(Boolean):typeof t==`string`&&(n=t.split(`,`).map(e=>e.trim()).filter(Boolean)),process.env.NODE_ENV===`development`&&console.log(`Mapped Skills:`,n),n}function Mf(e,t){let n=e.currentLocation??e.location??e.city??`-`,r=e.totalExperience??e.experience??e.exp??e.yearsOfExperience,i=e.createdOn??e.createdAt??e.createdDate??e.updatedAt,a=jf(e),o=[e?.sourceType,e?.profileSource,e?.selectedSource,e?.customFields?.sourceType,e?.customFields?.profileSource].flat().some(e=>String(e??``).trim().toLowerCase()===`dice`)||!!e?.customFields?.diceProfileData,s=o?Jt(e):void 0,c={...e,id:e.id??e._id??e.candidateId??`candidate-${t}`,...o&&{diceId:s,candidateId:e.candidateId??e.customFields?.diceProfileData?.candidateId??``},name:Af(e),designation:e.designation??e.currentDesignation??e.jobTitle??`-`,location:n===`-`?``:n,exp:r!=null&&r!==``?`${r} yrs`:``,locationExp:`${n} / ${r||`-`} yrs`,skills:a,createdOn:i?String(i):`-`,action:`shortlist`};return process.env.NODE_ENV===`development`&&(console.log(`Table Row Skills:`,c.skills),o&&console.log(`[DiceSourcingRow] IDs after mapping:`,{id:c.id,diceId:c.diceId,candidateId:c.candidateId})),c}function Nf({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(wf,{strong:!0,className:`v1-section-label`,children:t})]})}function Pf({jobId:e,onActionComplete:t,onDescriptionSaved:n}){let[r]=u.Form.useForm(),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)(0),[m,h]=(0,l.useState)(1),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(!1),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)([0,30]),[w,T]=(0,l.useState)([`All`,`Internal`]),[E,D]=(0,l.useState)(`list`),[O,k]=(0,l.useState)(10),[A,j]=(0,l.useState)(null),[M,N]=(0,l.useState)(()=>new Set),[P,F]=(0,l.useState)(`internal`),I=kf({onMigrate:async(e,n)=>{console.log(`Dice Profile ID:`,n),console.log(`Candidate Object:`,e),j(n);try{let e=await $l(n);u.message.success(e?.message??e?.data?.message??`Candidate migrated successfully.`),N(e=>new Set(e).add(String(n))),t?.(e)}catch(e){u.message.error(e?.message||`Failed to migrate candidate.`)}finally{j(null)}},migratingDiceId:A,migratedDiceIds:M});(0,l.useEffect)(()=>{w.some(e=>e.toLowerCase()===`dice`)&&E!==`card`&&D(`card`)},[w,E]);let[L,R]=(0,l.useState)(!1),[z,B]=(0,l.useState)(!1),[V,H]=(0,l.useState)(``),[U,W]=(0,l.useState)(!1),[G,K]=(0,l.useState)(``),[q,ee]=(0,l.useState)(!1);(0,l.useEffect)(()=>{H(``)},[e]);let te=[`jobDescription`,`description`,`rawDescription`,`jobDescriptionText`],ne=async()=>{if(R(!0),!V){B(!0);try{let t=await Vo({module:`job`,id:e}),n=Array.isArray(t)?t:[],r=``;for(let e of n){for(let t of e.fields??[]){let e=te.includes(t.field),n=/description/i.test(t.label??``);if((e||n)&&typeof t.value==`string`&&t.value.trim()){r=t.value;break}}if(r)break}H(r)}finally{B(!1)}}},re=()=>{K(V),W(!0)},ie=()=>{W(!1),K(``)},ae=async()=>{if(!G.trim()){u.message.warning(`Please enter a job description`);return}ee(!0);try{await xd(e,G.trim()),H(``),W(!1),K(``),B(!0);let t=await Vo({module:`job`,id:e}),r=Array.isArray(t)?t:[],i=``;for(let e of r){for(let t of e.fields??[]){let e=te.includes(t.field),n=/description/i.test(t.label??``);if((e||n)&&typeof t.value==`string`&&t.value.trim()){i=t.value;break}}if(i)break}H(i),u.message.success(`Description updated and parsed successfully`),n?.()}catch{u.message.error(`Failed to update description`)}finally{ee(!1),B(!1)}},oe=()=>{let e=w.filter(e=>e!==`All`);return e.length?e.map(e=>e.toLowerCase()):[`internal`]},se=(t,n=0,r=O)=>{let i=oe(),a=i.includes(`dice`)?`dice`:`internal`;return{tenantId:localStorage.getItem(`tenantId`)||``,businessId:localStorage.getItem(`businessId`)||``,businessUnitId:localStorage.getItem(`businessUnitId`)||``,jobId:e,filter:{skills:t.skills?[t.skills]:[],location:t.location?[t.location]:[],jobTitle:t.jobTitle?[t.jobTitle]:[],experienceFrom:String(S[0]),experienceTo:S[1]>=30?``:String(S[1])},hiringStage:``,hiringStageType:``,sortBy:`relevance`,sortType:`asc`,booleanQuery:t.booleanQuery||``,searchFilter:{},diceFilter:{},searchQuery:``,postedDate:t.createdDate||``,sourceType:i.includes(`internal`)?`internal`:i[0]||`internal`,selectedSource:i,scope:a,userId:Number(localStorage.getItem(`userId`))||0,offset:n,limit:r}},ce=async(e,t=1,n=O)=>{let r=(t-1)*n;a(!0);try{let i=await Wo(se(e,r,n),r,n),a=i?.data?.data??i?.data?.applicant??[],o=i?.data?.count?.searchCount??i?.data?.count?.total??i?.count?.searchCount??i?.count?.total??0;a.some(e=>{let t=e?.sourceType??e?.profileSource??``;return String(t).toLowerCase()===`dice`})&&E!==`card`&&D(`card`),s(a.map(Mf)),p(o),h(t),_(e),y(!0),x(!0)}catch(e){console.error(`Candidate search failed:`,e),u.message.error(`Failed to search candidates. Please try again.`),s([]),p(0),y(!0)}finally{a(!1)}},le=e=>ce(e,1),ue=(e,t)=>{g&&(t&&t!==O&&k(t),ce(g,e,t??O))},de=()=>{r.resetFields(),s([]),p(0),h(1),_(null),y(!1),x(!1),C([0,30]),T([`All`,`Internal`])},J=(e,t)=>{if(e===`All`){T(t?Df:[]);return}T(n=>{let r=t?[...n.filter(e=>e!==`All`),e]:n.filter(t=>t!==e);return Df.filter(e=>e!==`All`).every(e=>r.includes(e))?[`All`,...r]:r.filter(e=>e!==`All`)})};return(0,f.jsxs)(`div`,{className:`sourcing-tab`,children:[(0,f.jsx)(`div`,{className:`sourcing-v1-scope v1-edit-page`,children:(0,f.jsx)(`div`,{className:`v1-page-inner`,children:(0,f.jsx)(u.Card,{className:`v1-card v1-edit-card`,title:(0,f.jsx)(Nf,{icon:(0,f.jsx)(d.FilterOutlined,{}),title:`Build Your Search Query`}),extra:(0,f.jsxs)(u.Space,{size:8,children:[(0,f.jsx)(mc,{size:`small`,onClick:de,children:`Reset filters`}),(0,f.jsx)(mc,{variant:`primary`,size:`small`,icon:(0,f.jsx)(d.SearchOutlined,{}),loading:i,onClick:()=>r.submit(),children:`Search`}),(0,f.jsx)(mc,{size:`small`,variant:`soft`,icon:(0,f.jsx)(d.RobotOutlined,{}),children:`AI Search`}),(0,f.jsx)(mc,{size:`small`,variant:`soft`,icon:(0,f.jsx)(d.FileTextOutlined,{}),onClick:ne,children:`Job Description`}),(0,f.jsx)(mc,{type:`text`,size:`small`,icon:b?(0,f.jsx)(d.DownOutlined,{}):(0,f.jsx)(d.UpOutlined,{}),onClick:()=>x(e=>!e)})]}),children:!b&&(0,f.jsxs)(u.Form,{form:r,layout:`vertical`,onFinish:le,className:`v1-form`,colon:!1,children:[(0,f.jsx)(u.Row,{gutter:[24,0],children:(0,f.jsx)(u.Col,{xs:24,children:(0,f.jsx)(u.Form.Item,{name:`booleanQuery`,label:`Keyword / Boolean Query`,children:(0,f.jsx)(u.Input,{placeholder:`Enter keyword, e.g., Java OR (J2EE AND "Apache Kafka")`,prefix:(0,f.jsx)(d.SearchOutlined,{style:{color:`#bbb`}})})})})}),(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{name:`createdDate`,label:`Created Date`,children:(0,f.jsx)(u.Select,{placeholder:`Select created date`,allowClear:!0,options:Ef,suffixIcon:(0,f.jsx)(d.DownOutlined,{})})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{name:`location`,label:`Location`,children:(0,f.jsx)(u.Input,{placeholder:`Enter location`})})})]}),(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{name:`jobTitle`,label:`Job Title`,children:(0,f.jsx)(u.Input,{placeholder:`Enter job title`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{name:`skills`,label:`Skills`,children:(0,f.jsx)(u.Input,{placeholder:`Enter skills`})})})]}),(0,f.jsxs)(`div`,{className:`sourcing-exp-section`,children:[(0,f.jsx)(wf,{className:`sourcing-exp-title`,children:`Experience in Years`}),(0,f.jsx)(u.Slider,{range:!0,min:0,max:30,marks:Of,value:S,onChange:C,tooltip:{formatter:e=>e>=30?`30+`:String(e)},className:`sourcing-exp-slider`}),(0,f.jsxs)(u.Space,{size:8,className:`sourcing-exp-inputs`,wrap:!1,children:[(0,f.jsx)(wf,{className:`sourcing-exp-input-label`,children:`From`}),(0,f.jsx)(u.Input,{size:`small`,className:`sourcing-exp-num-input`,value:S[0],onChange:e=>{let t=parseInt(e.target.value,10)||0;C([Math.min(t,S[1]),S[1]])}}),(0,f.jsx)(wf,{className:`sourcing-exp-input-label`,children:`To`}),(0,f.jsx)(u.Input,{size:`small`,className:`sourcing-exp-num-input`,value:S[1]>=30?`30+`:S[1],onChange:e=>{let t=parseInt(e.target.value,10)||0;C([S[0],Math.min(t,30)])}}),(0,f.jsx)(wf,{className:`sourcing-exp-input-label`,children:`Years`})]})]}),(0,f.jsxs)(`div`,{className:`sourcing-pref-section`,children:[(0,f.jsx)(wf,{className:`sourcing-pref-label`,children:`Search Preference`}),(0,f.jsx)(`span`,{className:`sourcing-pref-sep`,children:`—`}),(0,f.jsx)(u.Space,{size:12,wrap:!0,children:Df.map(e=>(0,f.jsx)(u.Checkbox,{checked:w.includes(e),onChange:t=>J(e,t.target.checked),children:e},e))})]})]})})})}),(0,f.jsxs)(u.Spin,{spinning:i,children:[!v&&!i&&(0,f.jsx)(u.Empty,{style:{marginTop:24},description:`Use the search above to find candidates`}),v&&o.length===0&&!i&&(0,f.jsx)(u.Empty,{style:{marginTop:24},description:`No candidates found for this query`}),v&&o.length>0&&E===`list`&&(0,f.jsx)(gf,{listName:`Internal`,moduleName:`candidate`,actions:Tf,fields:I,dataSource:o,loading:i,total:c,current:m,pageSize:O,onPageChange:ue,onPageSizeChange:e=>ue(1,e),className:`sourcing-results-list`,activeView:E,onViewChange:D}),v&&o.length>0&&E===`card`&&(0,f.jsx)(Cf,{listName:`Internal`,moduleName:`candidate`,actions:Tf,fields:I,dataSource:o,loading:i,total:c,current:m,pageSize:O,onPageChange:ue,onPageSizeChange:e=>ue(1,e),className:`sourcing-results-list`,activeView:E,onViewChange:D}),!1,!1]}),(0,f.jsx)(u.Drawer,{title:(0,f.jsx)(Nf,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`Job Description`}),placement:`right`,width:Math.min(860,window.innerWidth*.85),open:L,onClose:()=>{R(!1),W(!1),K(``)},destroyOnHidden:!0,rootClassName:`v1-edit-page`,styles:{header:{background:`linear-gradient(120deg, rgba(0, 83, 165, 0.07) 0%, #ffffff 65%)`,borderBottom:`1px solid #d6e4f0`,minHeight:56,padding:`0 20px`,alignItems:`center`},body:{padding:`20px 24px`,background:`#f7fafd`}},extra:!z&&!U&&(0,f.jsx)(mc,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:re,children:`Edit`}),children:(0,f.jsx)(u.Spin,{spinning:z,children:U?(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,f.jsx)(`div`,{style:{background:`#ffffff`,border:`1px solid #d6e4f0`,borderRadius:8,padding:`4px`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:(0,f.jsx)(u.Input.TextArea,{rows:14,value:G,onChange:e=>K(e.target.value),placeholder:`Paste raw job description here...`,style:{fontSize:13,lineHeight:1.65,border:`none`,boxShadow:`none`,resize:`vertical`,padding:`12px 14px`}})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,f.jsx)(mc,{variant:`primary`,size:`small`,loading:q,onClick:ae,children:`Save & Parse`}),(0,f.jsx)(mc,{size:`small`,onClick:ie,children:`Cancel`})]})]}):(0,f.jsx)(`div`,{style:{background:`#ffffff`,border:`1px solid #d6e4f0`,borderRadius:8,padding:`18px 20px`,boxShadow:`0 2px 12px rgba(0,0,0,0.06)`},children:(0,f.jsx)(uf,{raw:V})})})})]})}function Ff(e){return e.referenceId||e.applicantRefrenceId||e._id}function If(e){let t=Hd(e);return{rows:t,total:e?.count??t.length,tabs:[],fields:xs(t),tabField:``}}function Lf({workflowId:e,stageName:t,actions:n=[],onCountChange:r}){return(0,f.jsx)(Zl,{moduleName:`candidate`,rowKey:Ff,actions:n,fetchData:(0,l.useCallback)(()=>e?Wd(e,t).then(e=>(r?.(e?.count??Hd(e).length),e)).catch(n=>{throw console.error(`[WorkflowStageTab] getWorkflowStage failed:`,e,t,n),n}):Promise.resolve({data:[],count:0}),[e,t,r]),responseMapper:If})}var Rf=[{key:`quick-submit`,label:`Quick Submit`,route:`/popup/quick-submit`,maxSelect:1},{key:`shortlist`,label:`Shortlist`,route:`/popup/quick-submit`,popupState:{defaultStage:`Shortlisted`}},{key:`tag-to-job`,label:`Tag to Jobs`,route:`/popup/tag-to-job`},{key:`mail`,label:`Send Email`,route:`/popup/mail`}],zf=[{key:`quick-submit`,label:`Quick Submit`,route:`/popup/quick-submit`,maxSelect:1},{key:`tag-to-job`,label:`Tag to Jobs`,route:`/popup/tag-to-job`},{key:`mail`,label:`Send Email`,route:`/popup/mail`},{key:`remove-from-shortlist`,label:`Remove from Shortlist`,route:`/popup/remove-from-shortlist`,danger:!0}],Bf=[{key:`mail`,label:`Send Email`,route:`/popup/mail`}];function Vf(e){return e?.workflowId??e?._id??e?.id??null}function Hf({jobId:e,onDescriptionSaved:t}){let[n,r]=(0,p.useSearchParams)(),i=n.get(`subTab`)||`source`,a=e=>{let t=new URLSearchParams(n);t.set(`subTab`,e),r(t,{replace:!0})},[o,s]=(0,l.useState)(null),[c,u]=(0,l.useState)(null),[d,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(null),_=()=>{e&&(Go({jobId:e}).then(s).catch(()=>{}),Ko({jobId:e}).then(u).catch(()=>{}),qo(e).then(e=>m(Array.isArray(e)?e.length:0)).catch(()=>{}))};return(0,l.useEffect)(()=>{_()},[e]),(0,l.useEffect)(()=>{if(!e)return;let t=!1;return Ud(e).then(e=>{t||g(Vf(e))}).catch(n=>{t||(console.error(`[CandidatesTab] getWorkflowByEntity failed:`,e,n),g(null))}),()=>{t=!0}},[e]),(0,f.jsxs)(`div`,{className:`candidates-tab-wrapper`,children:[(0,f.jsx)(Z,{children:(0,f.jsx)(zd,{tabs:[{key:`source`,label:`Source`},{key:`pipeline`,label:`Pipeline`,count:o},{key:`shortlisted`,label:`Shortlisted`,count:c},{key:`submitted`,label:`Submitted`,count:d}],activeKey:i,onChange:a})}),i===`source`&&(0,f.jsx)(Pf,{jobId:e,onActionComplete:_,onDescriptionSaved:t}),i===`pipeline`&&(0,f.jsx)(Lf,{workflowId:h,stageName:`Pipeline`,actions:Rf,onCountChange:s}),i===`shortlisted`&&(0,f.jsx)(Lf,{workflowId:h,stageName:`Shortlisted`,actions:zf,onCountChange:u}),i===`submitted`&&(0,f.jsx)(Lf,{workflowId:h,stageName:`Submitted`,actions:Bf,onCountChange:m})]})}var{Text:Uf}=u.Typography,Wf=e=>e==null||e===``,Gf=/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}|$)/;function Kf(e){return String(e).replace(/\w\S*/g,e=>e.length>1&&e===e.toUpperCase()?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase())}function qf(e){return!(typeof e!=`string`||!e.trim()||!/[a-z]/i.test(e)||e.includes(`@`)||/^https?:\/\//i.test(e)||/^[a-f0-9]{24}$/i.test(e)||/<[a-z][\s\S]*>/i.test(e))}function Jf(e,t){if(Wf(e))return``;let n=String(e);return t===!1?n:qf(n)?Kf(n):n}function Yf(e,t,n){return Object.values(e).filter(e=>!Wf(e)&&typeof e!=`object`).map(e=>Jf(e,t)).join(n)}function Xf(e,t){if(!e)return e;switch(t){case`upper`:return String(e).toUpperCase();case`lower`:return String(e).toLowerCase();case`title`:return Kf(e);default:return e}}var Zf=e=>e&&typeof e==`object`&&!Array.isArray(e)&&`value`in e&&`id`in e;function Qf(e,t,n){return Wf(e)?``:Zf(e)?Jf(e.value??e.id,t):Array.isArray(e)?e.map(e=>Zf(e)?Jf(e.value??e.id,t):e&&typeof e==`object`?Yf(e,t,n):Jf(e,t)).filter(Boolean).join(n):typeof e==`boolean`?e?`Yes`:`No`:typeof e==`object`?Yf(e,t,n):Jf(e,t)}function $f(e,t,n){if(Array.isArray(e))return e.map(e=>Zf(e)?Jf(e.value??e.id,t):e&&typeof e==`object`?Yf(e,t,n):Jf(e,t)).filter(e=>e!==``);if(typeof e==`string`)return e.split(`,`).map(e=>Jf(e.trim(),t)).filter(Boolean);let r=Qf(e,t,n);return r?[r]:[]}function ep({name:e}){let t=String(e||``).split(`.`).pop().toLowerCase();return t===`pdf`?(0,f.jsx)(d.FilePdfOutlined,{className:`v1-file-chip__icon`}):t===`doc`||t===`docx`?(0,f.jsx)(d.FileWordOutlined,{className:`v1-file-chip__icon`}):[`png`,`jpg`,`jpeg`,`gif`,`webp`,`bmp`,`svg`].includes(t)?(0,f.jsx)(d.FileImageOutlined,{className:`v1-file-chip__icon`}):[`txt`,`csv`,`json`,`md`].includes(t)?(0,f.jsx)(d.FileTextOutlined,{className:`v1-file-chip__icon`}):(0,f.jsx)(d.FileOutlined,{className:`v1-file-chip__icon`})}ep.propTypes={name:y.default.string};function tp(e){return e?.renderType&&e.renderType!==`auto`?e.renderType:e?.documentPreview===!0?`document`:e?.displayAs===`tag`?`tag`:e?.displayAs===`text`?`text`:`auto`}function np({value:e,mode:t,empty:n,style:r}){let[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(0),c=ya(e);if(!c.length)return(0,f.jsx)(Uf,{strong:!0,className:`v1-detail-value`,style:r,children:n});let p=c.filter(e=>e.url);return t===`text`?(0,f.jsx)(Uf,{strong:!0,className:`v1-detail-value`,style:r,children:c.map(e=>e.name).join(`, `)}):t===`tag`?(0,f.jsx)(`span`,{className:`v1-detail-value v1-detail-tags`,children:c.map((e,t)=>(0,f.jsx)(u.Tag,{icon:(0,f.jsx)(d.PaperClipOutlined,{}),children:e.name},t))}):t===`link`||t===`download`?(0,f.jsx)(`span`,{className:`v1-detail-value v1-doc-list`,children:(0,f.jsx)(`span`,{className:`v1-file-list`,children:c.map((e,n)=>e.url?(0,f.jsxs)(`a`,{className:`v1-file-chip`,href:e.url,target:`_blank`,rel:`noopener noreferrer`,download:t===`download`?e.name||``:void 0,title:e.name,children:[(0,f.jsx)(ep,{name:e.name}),(0,f.jsx)(`span`,{className:`v1-file-chip__name`,children:e.name}),t===`download`?(0,f.jsx)(d.DownloadOutlined,{className:`v1-file-chip__action`}):(0,f.jsx)(d.LinkOutlined,{className:`v1-file-chip__action`})]},n):(0,f.jsxs)(`span`,{className:`v1-file-chip v1-file-chip--disabled`,title:`No file location`,children:[(0,f.jsx)(ep,{name:e.name}),(0,f.jsx)(`span`,{className:`v1-file-chip__name`,children:e.name})]},n))})}):(0,f.jsxs)(`div`,{className:`v1-detail-value v1-doc-list`,children:[(0,f.jsx)(`div`,{className:`v1-file-list`,children:c.map((e,t)=>e.url?(0,f.jsxs)(`button`,{type:`button`,className:`v1-file-chip`,onClick:()=>{s(p.indexOf(e)),a(!0)},title:`Preview ${e.name}`,children:[(0,f.jsx)(ep,{name:e.name}),(0,f.jsx)(`span`,{className:`v1-file-chip__name`,children:e.name}),(0,f.jsx)(d.EyeOutlined,{className:`v1-file-chip__action`})]},t):(0,f.jsxs)(`span`,{className:`v1-file-chip v1-file-chip--disabled`,title:`No preview available for this file`,children:[(0,f.jsx)(ep,{name:e.name}),(0,f.jsx)(`span`,{className:`v1-file-chip__name`,children:e.name})]},t))}),(0,f.jsx)(Bt,{documents:p,open:i,onClose:()=>a(!1),initialIndex:o})]})}np.propTypes={value:y.default.any,mode:y.default.string,empty:y.default.string,style:y.default.object};function rp(e,t){let n=Number(String(e).replace(/[^0-9.-]/g,``));return Number.isNaN(n)?String(e):`${t.currencySymbol??``}${n.toLocaleString(void 0,{maximumFractionDigits:2})}`}function ip({field:e}){let{value:t,type:n,prefix:r=``,suffix:i=``,color:a=``,capitalize:o}=e??{},s=e?.renderOptions??{},c=ea(),l=c.emptyPlaceholder,p=c.separator||`, `,h=a?{color:a}:void 0,g=s.tagColor||a||void 0,_=s.textTransform&&s.textTransform!==`none`?s.textTransform:null,v=e=>`${r?`${r} `:``}${e}${i?` ${i}`:``}`,y=e=>_?Xf(e,_):e,b=e=>(0,f.jsx)(Uf,{strong:!0,className:`v1-detail-value`,style:h,children:y(e)}),x=e=>(0,f.jsx)(`span`,{className:`v1-detail-value v1-detail-tags`,children:(0,f.jsx)(u.Tag,{color:g,children:y(e)})}),S=tp(e);if(S!==`document`&&Wf(t)&&!s.showEmpty)return b(l);switch(S){case`document`:return(0,f.jsx)(np,{value:t,mode:s.documentMode||`preview`,empty:l,style:h});case`text`:return b(v(Qf(t,o,p)));case`tag`:case`chip`:return x(v(Qf(t,o,p)));case`badge`:{let e=y(Qf(t,o,p));return(0,f.jsx)(`span`,{className:`v1-detail-value`,children:(0,f.jsx)(u.Badge,{color:g||`blue`,text:e})})}case`tags`:case`multitag`:case`skills`:{let e=$f(t,o,p);return e.length?(0,f.jsx)(`span`,{className:`v1-detail-value v1-detail-tags`,children:e.map((e,t)=>(0,f.jsx)(u.Tag,{color:g,children:y(e)},t))}):b(l)}case`link`:{let e=Qf(t,!1,p);return(0,f.jsx)(`a`,{className:`v1-detail-value v1-doc-link`,href:/^https?:\/\//i.test(e)?e:ga(e)||e,target:`_blank`,rel:`noopener noreferrer`,children:y(v(e))})}case`email`:{let e=Qf(t,!1,p);return(0,f.jsxs)(`a`,{className:`v1-detail-value`,href:`mailto:${e}`,children:[(0,f.jsx)(d.MailOutlined,{}),` `,e]})}case`phone`:{let e=Qf(t,!1,p);return(0,f.jsxs)(`a`,{className:`v1-detail-value`,href:`tel:${e.replace(/[^0-9+]/g,``)}`,children:[(0,f.jsx)(d.PhoneOutlined,{}),` `,e]})}case`date`:{let e=(0,m.default)(t),n=s.dateFormat||c.dateFormat;return b(v(e.isValid()?e.format(n):Qf(t,o,p)))}case`currency`:return b(v(rp(t,s)));case`budget`:{let e=rp(t,s),n=s.unit?String(s.unit):``,r=n&&s.budgetUnitMap?s.budgetUnitMap[n]??n:n;return b(`${e}${r?`/${r}`:``}`)}case`html`:return(0,f.jsx)(`span`,{className:`v1-detail-value`,style:h,dangerouslySetInnerHTML:{__html:String(t??``)}});default:break}if(Wf(t))return b(l);let C=n===`date`,w=typeof t==`string`&&Gf.test(t.trim());if(C||w){let e=(0,m.default)(t);if(e.isValid())return b(v(e.format(c.dateFormat)))}if(Zf(t))return b(v(Jf(t.value??t.id,o)));if(Array.isArray(t)){let e=$f(t,o,p);return e.length?(0,f.jsx)(`span`,{className:`v1-detail-value v1-detail-tags`,children:e.map((e,t)=>(0,f.jsx)(u.Tag,{color:g,children:e},t))}):b(l)}return b(typeof t==`boolean`?t?c.booleanTrueLabel:c.booleanFalseLabel:typeof t==`object`?Yf(t,o,p)||l:v(Jf(t,o)))}ip.propTypes={field:y.default.object};var{Text:ap}=u.Typography,op=[(0,f.jsx)(d.UserOutlined,{}),(0,f.jsx)(d.EnvironmentOutlined,{}),(0,f.jsx)(d.SolutionOutlined,{}),(0,f.jsx)(d.InfoCircleOutlined,{}),(0,f.jsx)(d.FileTextOutlined,{})],sp=e=>e===!0||e===1||e===`1`,cp=[`jobDescription`,`description`,`rawDescription`,`jobDescriptionText`];function lp(e=[]){for(let t of e)for(let e of t.fields??[]){let t=cp.includes(e.field),n=/description/i.test(e.label??``);if((t||n)&&typeof e.value==`string`&&e.value.trim())return{...e,key:e.field,value:e.value}}return null}function up(e=[]){return[...e].sort((e,t)=>Number(e.order??0)-Number(t.order??0)).map(e=>({...e,fields:[...e.fields??[]].filter(e=>e.show===void 0||sp(e.show)).sort((e,t)=>Number(e.order??0)-Number(t.order??0))})).filter(e=>e.fields.length)}function dp({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(ap,{strong:!0,className:`v1-section-label`,children:t})]})}function fp({value:e}){let t=String(e??``);return/<[a-z][\s\S]*>/i.test(t)?(0,f.jsx)(`div`,{className:`v1-detail-value`,style:{whiteSpace:`normal`,lineHeight:1.7},dangerouslySetInnerHTML:{__html:t}}):(0,f.jsx)(`div`,{className:`v1-detail-value`,style:{whiteSpace:`pre-wrap`,lineHeight:1.7},children:t})}function pp({moduleName:e,id:t,refreshKey:n=0,onDescriptionSaved:r}){let[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(!!e),[c,p]=(0,l.useState)(``),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(``),[v,y]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(!e)return;let n=!1;async function r(){try{s(!0),p(``);let[r]=await Promise.all([Vo({module:e,id:t,view:`detail`}),ra()]);n||a(Array.isArray(r)?r:[])}catch(t){console.error(`Failed to fetch ${e} detail fields:`,t),n||p(t?.message||`Failed to fetch detail fields`)}finally{n||s(!1)}}return r(),()=>{n=!0}},[e,t,n]);let b=(0,l.useMemo)(()=>up(i),[i]),x=e===`job`,S=(0,l.useMemo)(()=>x?lp(i):null,[x,i]),C=()=>{h(!1),_(``)},w=async()=>{if(!g.trim()){u.message.warning(`Please enter a job description`);return}y(!0);try{await xd(t,g.trim()),h(!1),_(``),s(!0);let n=await Vo({module:e,id:t,view:`detail`});a(Array.isArray(n)?n:[]),u.message.success(`Description updated and parsed successfully`),r?.()}catch{u.message.error(`Failed to update description`)}finally{y(!1),s(!1)}},T=(e,t=``)=>(0,f.jsx)(u.Col,{xs:24,sm:12,lg:e.detailCol??e.col??8,children:(0,f.jsxs)(`div`,{className:`v1-detail-field`,children:[(0,f.jsx)(ap,{type:`secondary`,className:`v1-detail-label`,children:e.label??e.field}),(0,f.jsx)(ip,{field:e})]})},`${e.field}${t}`),E=(e,t)=>e.type===`file`||e.type===`document`?{...e,renderType:`document`,value:t}:{...e,value:wi(t,e.field)},D=(e,t,n)=>{let r=e.name??e.id??String(t),i=Array.isArray(e.rows)?e.rows:[];return(0,f.jsx)(u.Card,{size:`small`,className:`v1-card v1-detail-card`,title:(0,f.jsx)(dp,{icon:op[t%op.length],title:e.label??e.name??`Details`}),children:i.length===0?(0,f.jsx)(u.Empty,{image:u.Empty.PRESENTED_IMAGE_SIMPLE,description:`No ${e.label??`records`} added`}):i.map((t,r)=>(0,f.jsxs)(`div`,{className:`v1-detail-addrow-item`,children:[i.length>1&&(0,f.jsxs)(ap,{strong:!0,className:`v1-detail-addrow-index`,children:[e.label??`Record`,` `,r+1]}),(0,f.jsx)(u.Row,{gutter:[20,18],children:n.map(e=>T(E(e,t),`-${r}`))})]},r))},r)};return(0,f.jsx)(u.Spin,{spinning:o,tip:`Loading detail fields...`,children:(0,f.jsxs)(`div`,{className:`v1-detail-left`,children:[c&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:`Unable to load detail fields`,description:c,className:`v1-detail-alert`}),!o&&!c&&b.length===0&&(0,f.jsx)(u.Empty,{description:`No detail fields are configured.`}),b.map((e,t)=>{let n=e.name??e.id??String(t),r=S?e.fields.filter(e=>e.field!==S.key):e.fields;return r.length?e.addRow?D(e,t,r):(0,f.jsx)(u.Card,{size:`small`,className:`v1-card v1-detail-card`,title:(0,f.jsx)(dp,{icon:op[t%op.length],title:e.label??e.name??`Details`}),children:(0,f.jsx)(u.Row,{gutter:[20,18],children:r.map(e=>T(e))})},n):null}),x&&S?.value&&(0,f.jsx)(u.Card,{size:`small`,className:`v1-card v1-detail-card`,title:(0,f.jsx)(dp,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`Description`}),children:m?(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,f.jsx)(`div`,{style:{background:`#ffffff`,border:`1px solid #d6e4f0`,borderRadius:8,padding:`4px`,boxShadow:`0 2px 8px rgba(0,0,0,0.04)`},children:(0,f.jsx)(u.Input.TextArea,{rows:10,value:g,onChange:e=>_(e.target.value),placeholder:S.hidePlaceholder?void 0:S.placeholder,style:{fontSize:13,lineHeight:1.65,border:`none`,boxShadow:`none`,resize:`vertical`,padding:`12px 14px`}})}),(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,f.jsx)(mc,{variant:`primary`,size:`small`,loading:v,onClick:w,children:`Save & Parse`}),(0,f.jsx)(mc,{size:`small`,onClick:C,children:`Cancel`})]})]}):(0,f.jsx)(fp,{value:S.value})})]})})}function mp(e){let t=e?.user_name??e?.userName??e?.username,n=`${e?.first_name??e?.firstName??``} ${e?.last_name??e?.lastName??``}`.trim(),r=e?.email??``,i=t??n.replace(/\s+/g,``)??r??String(e?.user_id??e?.id??``),a=[t,n,r].filter(Boolean).join(` - `)||String(i);return{value:String(i),label:a}}var hp=[{id:`n1`,createdAt:new Date().toISOString(),author:`You`,notes:`Shortlisted 3 candidates, sharing profiles with @Hiring Manager today.`}];function gp(e=``){return e.split(/(\s+)/).map((e,t)=>e.startsWith(`@`)&&e.length>1?(0,f.jsx)(u.Tag,{color:`blue`,children:e},t):(0,f.jsx)(`span`,{children:e},t))}function _p({notes:e,users:t=[],onAddNote:n}){let[r]=u.Form.useForm(),[i,a]=(0,l.useState)(()=>Array.isArray(e)?e:hp),[o,s]=(0,l.useState)(!1),[c,d]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),h=(0,l.useRef)(null),g=Array.isArray(e)?e:i,_=(0,l.useMemo)(()=>t.map(e=>({value:e.display??e.value,label:e.display??e.label})),[t]),v=c??_;return(0,f.jsxs)(`div`,{className:`znx-an-body`,children:[(0,f.jsxs)(u.Form,{form:r,onFinish:async({note:e})=>{let t=(e??``).trim();if(t){s(!0);try{n?await n(t):a(e=>[{id:`local-${Date.now()}`,createdAt:new Date().toISOString(),author:`You`,notes:t},...e]),r.resetFields(),u.message.success(`Notes added successfully`)}catch{u.message.error(`Something went wrong, please try again.`)}finally{s(!1)}}},className:`znx-an-composer`,children:[(0,f.jsx)(u.Form.Item,{name:`note`,rules:[{required:!0,message:`Notes is required`}],style:{marginBottom:0},children:(0,f.jsx)(u.Mentions,{rows:3,prefix:`@`,options:v,loading:p,filterOption:!1,onSearch:e=>{clearTimeout(h.current),m(!0),h.current=setTimeout(()=>{Uo(e).then(e=>{d((Array.isArray(e)?e:e?.items??e?.list??e?.data??[]).map(mp))}).catch(()=>d([])).finally(()=>m(!1))},300)},placeholder:`Add your notes on the job, use '@' to mention`})}),(0,f.jsx)(`div`,{className:`znx-an-composer-actions`,children:(0,f.jsx)(u.Button,{type:`primary`,size:`small`,htmlType:`submit`,loading:o,children:`Post`})})]}),(0,f.jsx)(`div`,{className:`znx-an-scroll`,children:(0,f.jsx)(ld,{rows:g,getTime:e=>e.createdAt??e.activityTime,getKey:(e,t)=>e.id??e._id??t,emptyText:`No notes here.`,renderBody:e=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`znx-an-comment`,children:gp(e.notes)}),e.author&&(0,f.jsxs)(`div`,{className:`znx-an-author`,children:[`— `,e.author]})]})})})]})}function vp({moduleName:e,id:t,users:n=[],showActivity:r=!0,showNotes:i=!0,defaultActiveKey:a=`activity`}){let[o,s]=(0,l.useState)(null),[c,d]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!e||!t)return;let n=!1;async function a(){let[a,o]=await Promise.all([r?Qr(e,t).catch(()=>[]):Promise.resolve(null),i?$r(t).catch(()=>[]):Promise.resolve(null)]);n||(s(a),d(o))}return a(),()=>{n=!0}},[e,t,r,i]);let p=(0,l.useCallback)(async n=>{if(!t)return;await ei({relatedId:t,notes:n,notesFor:e});let[i,a]=await Promise.all([$r(t).catch(()=>[]),r?Qr(e,t).catch(()=>[]):Promise.resolve(o)]);d(i),r&&s(a)},[t,e,r,o]),m=[r&&{key:`activity`,title:`Activity`,count:Array.isArray(o)?o.length:void 0,children:(0,f.jsx)(fd,{activity:o})},i&&{key:`notes`,title:`Notes`,count:Array.isArray(c)?c.length:void 0,children:(0,f.jsx)(_p,{notes:c,users:n,onAddNote:t?p:void 0})}].filter(Boolean),[h,g]=(0,l.useState)(m.some(e=>e.key===a)?a:m[0]?.key);return(0,f.jsx)(u.Card,{className:`znx-an-card`,styles:{body:{padding:0}},children:(0,f.jsx)(Hs,{className:`znx-an-tabs`,tabs:m,activeKey:h,onChange:g})})}vp.propTypes={moduleName:y.default.string,id:y.default.string,users:y.default.array,showActivity:y.default.bool,showNotes:y.default.bool,defaultActiveKey:y.default.string};var yp=o({buildJobHeaderData:()=>Dp,default:()=>bp,jobConfig:()=>bp}),bp={module:`job`,tabs:[{key:`details`,label:`Details`},{key:`candidates`,label:`Candidates`}],tabContent:{details:{render:({id:e,refreshKey:t,onDescriptionSaved:n})=>l.default.createElement(u.Row,{gutter:[16,16],align:`stretch`},l.default.createElement(u.Col,{key:`main`,xs:24,lg:16},l.default.createElement(pp,{moduleName:`job`,id:e,refreshKey:t,onDescriptionSaved:n})),l.default.createElement(u.Col,{key:`side`,xs:24,lg:8},l.default.createElement(vp,{moduleName:`job`,id:e})))},candidates:{render:({id:e,onDescriptionSaved:t})=>l.default.createElement(Hf,{jobId:e,onDescriptionSaved:t})}},header:{title:`jobTitle`,eyebrow:({val:e})=>{let t=[];return Dd(Sp(e))&&t.push(kd(Sp(e))),Dd(Cp(e))&&t.push(`MSP Id ${kd(Cp(e))}`),t.length?t.join(` - `):Dd(e(`jobReferenceId`))?String(e(`jobReferenceId`)):``},clientName:({val:e})=>Sp(e),titleIds:[{label:`Client Req ID`,field:[`clientJobReferenceId`,`clientReqId`,`clientRequirementId`,`clientReferenceId`]}],status:{field:`jobStatus`},ids:[{label:`Zinnext Job ID`,field:`jobReferenceId`},{label:`Client Rate`,compute:Tp}],meta:[{icon:`location`,field:`jobLocation`},{icon:`experience`,compute:wp},{icon:`employment`,fields:[`employmentType`,`jobRemoteStatus`],join:` · `}],stats:[{label:`Target submissions`,field:[`targetSubmission`,`targetSubmissions`]},{label:`In Pipeline`,compute:Ep,always:!0}],timestamp:{label:`Created Date`,field:[`createdAt`,`jobCreatedDateTime`,`createdDate`]}}},xp=(e,...t)=>t.map(t=>e(t)).find(Dd),Sp=e=>xp(e,`clientName`,`client.name`,`client`,`accountName`),Cp=e=>xp(e,`mspReqId`,`mspreqId`,`msReqId`,`mspId`,`mspRequirementId`);function wp({val:e}){let t=e(`experience.experienceRequiredFrom`);if(!Dd(t))return``;let n=e(`experience.experienceRequiredTo`);return`${t}${Dd(n)?` - ${n}`:``} years`}function Tp({val:e}){let t=e(`jobPayDetails`)??{},n=t.clientBudgetStart??xp(e,`clientBudgetStart`,`clientRateStart`);return Dd(n)?Md({start:n,end:t.clientBudgetEnd??xp(e,`clientBudgetEnd`,`clientRateEnd`),sym:t.clientBudgetCurrencySymbol??Ad(t.clientBudgetCurrency)??``,unit:t.clientBudgetUnit??xp(e,`clientBudgetUnit`)}):``}function Ep({val:e}){let t=e(`submissions`),n=xp(e,`pipelineCount`,`PipelineCount`,`inPipeline`,`inPipelineCount`)??(Array.isArray(t)?t.length:void 0);return Dd(n)?n:0}function Dp({val:e,has:t}){let n,r=[];t(e(`jobReferenceId`))&&(n=String(e(`jobReferenceId`)));let i=[e(`jobTitle`)].filter(t).map(kd).join(` `)||`-`,a=null;if(t(e(`jobSource`))&&(a={label:Od(e(`jobSource`)),color:`#10b981`,textColor:`#ffffff`}),t(e(`jobLocation`))&&r.push({icon:`location`,text:kd(e(`jobLocation`))}),t(e(`experience.experienceRequiredFrom`))){let n=e(`experience.experienceRequiredFrom`),i=e(`experience.experienceRequiredTo`);r.push({icon:`experience`,text:`${n}${t(i)?` - ${i}`:``} years`})}let o=[e(`employmentType`),kd(e(`jobRemoteStatus`))].filter(t).join(` - `);return o&&r.push({icon:`employment`,text:o}),{eyebrow:n,title:i,status:a,meta:r}}var Op=o({default:()=>kp,submissionConfig:()=>kp}),kp={module:`submission`,tabs:[],header:{title:[`firstName`,`lastName`],eyebrow:({val:e,has:t})=>[Ap(e),e(`jobTitle`)].filter(t).map(kd).join(` - `),clientName:({val:e})=>Ap(e),status:({val:e,has:t})=>{let n=e(`internalSubmissionStatus`)??{},r=n.internalSubmissionStatusText;return t(r)?{label:Od(r),color:{positive:`success`,negative:`error`,neutral:`default`}[n.internalSubmissionStatusType]??Nd(r)}:null},ids:[{label:`Submission ID`,field:[`submissionId`,`clientSubmissionId`]},{label:`MS Req ID`,field:[`mspReqId`,`mspreqId`]},{label:`Client Req ID`,field:[`jobClientRefrenceId`,`jobClientReferenceId`,`clientJobReferenceId`]},{label:`Job ID`,field:[`jobRefrenceId`,`jobReferenceId`]}],meta:[{icon:`location`,field:`jobLocation`},{icon:`experience`,field:[`relevantExperienceYears`,`workExperienceYears`],suffix:` yrs`},{icon:`employment`,field:`workAuthorisation`},{icon:`rate`,prefix:`Client rate: `,compute:jp},{icon:`rate`,prefix:`Candidate rate: `,compute:Mp}],timestamp:{label:`Created Date`,field:[`submittedAt`,`createdAt`,`createdDate`]}}},Ap=e=>e(`clientName`)??e(`client.name`);function jp({val:e}){let t=e(`clientBudget`)??e(`candidateBudget`)??{};return Md({start:t.clientBudgetStart??t.candidateBudgetStart,end:t.clientBudgetEnd??t.candidateBudgetEnd,sym:t.clientBudgetCurrencySymbol??t.candidateBudgetCurrencySymbol??Ad(t.clientBudgetCurrency??t.candidateBudgetCurrency),unit:t.clientBudgetUnit??t.candidateBudgetUnit??`Hour`})}function Mp({val:e}){let t=e(`candidateRate`)??{},n=e(`proposedRate`)??{};return Md({start:t.candidateAcceptedRate,sym:t.candidateAcceptedCurrencySymbol??Ad(t.candidateAcceptedCurrency),unit:t.candidateAcceptedPayUnit??`Hour`})||Md({start:n.candidateProposedRate,sym:n.candidateProposedRateCurrencySymbol??Ad(n.candidateProposedRateCurrency),unit:n.candidateProposedRateUnit??`Hour`})}var Np=o({default:()=>Pp,submissionJobConfig:()=>Pp}),Pp={module:`submissionJob`,tabs:[],buildData:Dp};function Fp(e,t){let n=Array.isArray(t)?t:[t];for(let t of n)if(Dd(e(t)))return e(t)}function Ip(e,t,n=` `){return t.map(t=>e(t)).filter(Dd).map(kd).join(n)}function Lp(e,t){let{val:n}=e,r;if(typeof t.compute==`function`)r=t.compute(e);else if(t.join)r=Ip(n,t.fields??[],t.join);else{let e=Fp(n,t.field);r=Dd(e)?kd(e):``}return Dd(r)?`${t.prefix??``}${r}${t.suffix??``}`:``}function Rp(e){return typeof e==`function`?{compute:e}:typeof e==`string`||Array.isArray(e)?{field:e}:e}function zp(e={},t){let{val:n}=t,r={};if(e.title!==void 0&&(r.title=Ip(n,Array.isArray(e.title)?e.title:[e.title])||`-`),e.eyebrow!==void 0&&(r.eyebrow=Lp(t,Rp(e.eyebrow))||void 0),e.clientName!==void 0&&(r.clientName=Lp(t,Rp(e.clientName))||void 0),e.status!==void 0)if(typeof e.status==`function`)r.status=e.status(t)??null;else{let t=Fp(n,e.status.field);r.status=Dd(t)?{label:Od(t),color:Nd(t)}:null}let i=(e=[])=>e.map(e=>{let r=typeof e.compute==`function`?e.compute(t):kd(Fp(n,e.field)??``);return{label:e.label,value:r}}).filter(e=>Dd(e.value));if(e.ids!==void 0&&(r.ids=i(e.ids)),e.titleIds!==void 0&&(r.titleIds=i(e.titleIds)),e.meta!==void 0&&(r.meta=e.meta.map(e=>({icon:e.icon,text:Lp(t,e)})).filter(e=>Dd(e.text))),e.stats!==void 0&&(r.stats=e.stats.map(e=>{let r=typeof e.compute==`function`?e.compute(t):Fp(n,e.field),i=Dd(r)?kd(r):e.always?kd(e.fallback??0):void 0;return{label:e.label,value:i}}).filter(e=>e.value!==void 0)),e.timestamp!==void 0){let t=jd(Fp(n,e.timestamp.field));r.timestamp=Dd(t)?{label:e.timestamp.label,value:t}:null}return r}var Bp=Object.assign({"./modules/candidateConfig.js":Pd,"./modules/jobConfig.js":yp,"./modules/submissionConfig.js":Op,"./modules/submissionJobConfig.js":Np}),Vp={};Object.values(Bp).forEach(e=>{let t=e.default??Object.values(e)[0];t?.module&&(Vp[t.module]=t)});var Hp={job:`job`,jobs:`job`,candidate:`candidate`,candidates:`candidate`,applicant:`candidate`,applicants:`candidate`,submission:`submission`,submissions:`submission`,vendor:`vendor`,vendors:`vendor`,onboarding:`onboarding`};function Up(){let e=(typeof window<`u`&&window.__CORE_THEME_CONFIG__?.detailConfig)??{};return Object.keys(e).length?{...Vp,...e}:Vp}function Wp(e=``,t=Vp){let n=String(e).trim();if(t[n])return n;let r=n.toLowerCase();if(t[r])return r;let i=Hp[r];if(i&&t[i])return i;let a=r.endsWith(`s`)?r.slice(0,-1):`${r}s`;return t[a]?a:i??r}function Gp(e=[]){let t=new Map;return e.forEach(e=>{(e.fields??[]).forEach(e=>{t.has(e.field)||t.set(e.field,e)})}),t}function Kp(e,t){for(let n of t)if(n.includes(`+`)){let t=n.split(`+`).map(t=>e(t)).filter(Dd).map(kd).join(` `);if(t)return t}else if(Dd(e(n)))return e(n)}function qp({val:e}){let t=Kp(e,[`jobTitle`,`firstName+lastName`,`name`,`fullName`,`title`,`clientName`,`vendorCompanyName`,`companyName`])||`-`,n=Kp(e,[`clientName`,`source`,`designation`,`jobReferenceId`,`applicantRefrenceId`]),r=Dd(n)?kd(n):void 0,i=Kp(e,[`status`,`jobStatus`,`submissionStatus`,`stage`]),a=Dd(i)?{label:Od(i),color:Nd(i)}:null,o=[];[[`Reference ID`,[`jobReferenceId`,`applicantRefrenceId`,`submissionId`,`referenceId`,`refId`]],[`Client Req ID`,[`clientJobReferenceId`,`jobClientRefrenceId`,`clientReqId`]],[`MS Req ID`,[`mspreqId`,`mspReqId`]]].forEach(([t,n])=>{let r=Kp(e,n);Dd(r)&&o.push({label:t,value:kd(r)})});let s=[],c=Kp(e,[`jobLocation`,`currentLocation`,`location`]);Dd(c)&&s.push({icon:`location`,text:kd(c)});let l=Kp(e,[`designation`]);Dd(l)&&s.push({icon:`designation`,text:kd(l)});let u=jd(Kp(e,[`createdAt`,`submittedAt`,`createdDate`]));return{eyebrow:r,title:t,status:a,ids:o,meta:s,timestamp:Dd(u)?{label:`Created Date`,value:u}:null}}function Jp(e,t=[]){if(!t.length)return null;let n=Up(),r=n[Wp(e,n)],i=Gp(t),a=e=>i.get(e)?.value,o=qp({val:a,has:Dd}),s=r?.buildData?r.buildData({val:a,has:Dd})??{}:r?.header?zp(r.header,{val:a,has:Dd}):{},c=(e,t)=>Array.isArray(e)&&e.length?e:t??[];return{eyebrow:s.eyebrow??o.eyebrow,title:s.title??o.title??`-`,clientName:s.clientName??null,status:s.status??o.status??null,titleIds:c(s.titleIds,o.titleIds),meta:c(s.meta,o.meta),ids:c(s.ids,o.ids),stats:s.stats??[],timestamp:s.timestamp??o.timestamp??null,tabs:r?.tabs??[]}}var Yp={location:(0,f.jsx)(d.EnvironmentOutlined,{}),designation:(0,f.jsx)(d.SolutionOutlined,{}),experience:(0,f.jsx)(d.ClockCircleOutlined,{}),employment:(0,f.jsx)(d.LaptopOutlined,{}),rate:(0,f.jsx)(d.DollarOutlined,{}),source:(0,f.jsx)(d.AimOutlined,{}),resume:(0,f.jsx)(d.FileTextOutlined,{}),edit:(0,f.jsx)(d.EditOutlined,{}),approve:(0,f.jsx)(d.CheckCircleOutlined,{}),reject:(0,f.jsx)(d.CloseCircleOutlined,{})};function Xp(e,t){let n={_id:t,id:t};for(let t of e??[])for(let e of t.fields??[])e?.field!=null&&e.value!==void 0&&(n[e.field]=e.value);return n}function Zp(e){return e==null?``:Array.isArray(e)?e.join(`,`):String(typeof e==`object`?e.id??e.value??``:e)}function Qp(e,t){return String(e).replace(/\{([^}]+)\}/g,(e,n)=>encodeURIComponent(Zp(t?.[n]))).replace(/:([A-Za-z_][\w]*)/g,(e,n)=>encodeURIComponent(Zp(t?.[n])))}function $p(e,t){return String(t||``).split(`.`).reduce((e,t)=>e?.[t],e)}function em(e){return String(e??``).trim().toLowerCase()}function tm(e,t){let n=$p(t,e?.field);switch(e?.operator){case`eq`:return em(n)===em(e.value);case`ne`:return em(n)!==em(e.value);case`isEmpty`:return n==null||n===``||Array.isArray(n)&&!n.length;case`notEmpty`:return!(n==null||n===``||Array.isArray(n)&&!n.length);case`fieldEq`:return em(n)===em($p(t,e.compareField));case`contains`:return em(n).includes(em(e.value));case`scope`:return em(e.value)===`detail`;default:return!1}}function nm(e,t,n){return n.some(n=>n?.isActive!==!1&&(n?.blockedActions??[]).map(String).includes(String(e.key))&&(n?.conditions??[]).every(e=>tm(e,t)))}function rm(e){let t=String(e.key??``);return{...e,key:t,label:e.label||t,route:e.route||e.routeTemplate||(e.actionType===`modal`&&(e.popupKey||t)?`/popup/${e.popupKey||t}`:``)}}function im(e,t){if(!e)return!0;try{let n=JSON.parse(localStorage.getItem(`menuPermission`)||`{}`),[r,i]=String(e).split(`.`),a=(n[r||String(t||``).replace(/s$/i,``)]??n[String(t||``)]??n[String(t||``).replace(/s$/i,``)]??{})[i];return a==null||a!==!1&&a!==0&&a!==`0`}catch{return!0}}function am(e,t){let n=(e??[]).flatMap(e=>e.fields??[]),r=n.find(e=>e.field===t)??n.find(e=>/resume|cv/i.test(`${e.field??``} ${e.label??``}`));return r?ya(r.value):[]}function om({moduleName:e,id:t,customConfigName:n,onAction:r,onTabChange:i,onHeaderData:a,hideActions:o=!1,defaultTab:s}){let c=(0,p.useNavigate)(),m=(0,p.useLocation)(),[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)([]),T=n||e;(0,l.useEffect)(()=>{if(!e)return;let n=!1;async function r(){try{let[r,i]=await Promise.all([mn({module:e,id:t}),Jr(e).catch(()=>({actions:[],actionRules:[]})),ra()]);n||(g(Array.isArray(r)?r:[]),v(i.actions??[]),b(i.actionRules??[]))}catch(t){console.error(`Failed to fetch ${e} header fields:`,t),n||(g([]),v([]),b([]))}}return r(),()=>{n=!0}},[e,t]);let D=(0,l.useMemo)(()=>Jp(T,h),[T,h]);(0,l.useEffect)(()=>{D&&a&&a(D)},[D]);let{eyebrow:O,title:k=`-`,status:A,titleIds:j=[],meta:M=[],ids:N=[],tabs:P=[],stats:F=[]}=D??{},{canAdd:I,canEdit:L,canDelete:R}=ts(e),z=(0,l.useMemo)(()=>Xp(h,t),[h,t]),B=(0,l.useMemo)(()=>_.filter(e=>e.showInDetail??e.showInList).map(rm).filter(e=>!nm(e,z,y)),[y,_,z]);function V(t){let n=t.permissionKey??(t.danger?`delete`:null);if(n===`add`&&!I||n===`edit`&&!L||n===`delete`&&!R||!im(t.permission,e))return!1;if(t.permissionKey){let e=$p(z,`actionPermission.${t.permissionKey}`);if(e===!1||e===0||e===`0`)return!1}return!0}let[H,U]=(0,l.useState)(s);(0,l.useEffect)(()=>{U(s)},[s]);let W=P.some(e=>e.key===H)?H:P[0]?.key,G=e=>!e.allowedTabs?.length||e.allowedTabs.some(e=>em(e)===em(W)),K=B.filter(e=>e.detailPlacement===`primary`&&V(e)&&G(e)),q=B.filter(e=>e.detailPlacement!==`primary`&&V(e)&&G(e));if(!D)return null;let ee=n=>{let i=[...K,...q].find(e=>e.key===n);if(i?.actionType===`document`&&i.documentField){let e=am(h,i.documentField);e.length?(w(e),S(!0)):u.message.warning(`No ${(i.label||`document`).toLowerCase()} available`);return}if(i?.actionType===`copy`){let e=$p(z,i.copyField||`id`);navigator.clipboard.writeText(Zp(e)).then(()=>u.message.success(`Copied to clipboard`)).catch(()=>u.message.error(`Could not copy to clipboard`));return}if(i?.actionType===`api`&&i.apiPath){let e=Qp(i.apiPath,z),n=String(i.apiMethod||`POST`).toUpperCase();J(E,e.startsWith(`/`)?e:`/${e}`,{method:n,body:[`GET`,`DELETE`].includes(n)?void 0:JSON.stringify({ids:[t],record:z})}).then(()=>u.message.success(`${i.label} completed`)).catch(e=>u.message.error(e.message||`${i.label} failed`));return}if(i?.route){let n=typeof i.route==`function`?i.route(t):Qp(i.route,Xp(h,t));n.startsWith(`/popup/`)?c(n,{state:{background:m,moduleName:e,selectedIds:[t],selectedRecords:[z],popupContext:i.popupState??{},popupAction:{key:i.key,apiMethod:i.apiMethod,apiPath:i.apiPath,defaultTemplateId:i.defaultTemplateId},...i.popupState}}):c(n);return}r?.(n,{moduleName:e,id:t,action:i})},te=n=>{U(n),i?.(n,{moduleName:e,id:t})},ne=q.map(e=>({key:e.key,label:e.label,danger:e.danger,onClick:()=>ee(e.key)}));return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(u.Card,{className:`znx-dh-card`,children:[(0,f.jsxs)(`div`,{className:`znx-dh-top`,children:[(0,f.jsxs)(`div`,{className:`znx-dh-left`,children:[O&&(0,f.jsx)(`div`,{className:`znx-dh-eyebrow`,children:O}),(0,f.jsxs)(`div`,{className:`znx-dh-titlerow`,children:[(0,f.jsx)(`span`,{className:`znx-dh-title`,children:k}),j.map(e=>(0,f.jsxs)(`span`,{className:`znx-dh-titleid`,children:[(0,f.jsxs)(`span`,{className:`znx-dh-id-label`,children:[e.label,`:`]}),` `,e.value]},e.label)),A&&(0,f.jsx)(u.Tag,{color:A.color,className:`znx-dh-status`,style:{backgroundColor:A.backgroundColor??A.color,borderColor:A.backgroundColor??A.color,color:A.textColor},children:A.label})]}),N.length>0&&(0,f.jsx)(`div`,{className:`znx-dh-ids`,children:N.map(e=>(0,f.jsxs)(`span`,{className:`znx-dh-id`,children:[(0,f.jsxs)(`span`,{className:`znx-dh-id-label`,children:[e.label,`:`]}),` `,e.value]},e.label))}),M.length>0&&(0,f.jsx)(`div`,{className:`znx-dh-meta`,children:M.map((e,t)=>(0,f.jsxs)(`span`,{className:`znx-dh-meta-item`,children:[e.icon&&Yp[e.icon]&&(0,f.jsx)(`span`,{className:`znx-dh-meta-icon`,children:Yp[e.icon]}),(0,f.jsx)(`span`,{children:e.text})]},t))})]}),!o&&(0,f.jsxs)(`div`,{className:`znx-dh-actions-col`,children:[(0,f.jsxs)(`div`,{className:`znx-dh-actions`,children:[K.map(e=>(0,f.jsx)(u.Button,{type:`text`,className:`znx-dh-btn znx-dh-btn--${e.tone??`primary`}`,icon:e.icon?Yp[e.icon]:void 0,onClick:()=>ee(e.key),children:e.label},e.key)),q.length>0&&(0,f.jsx)(u.Dropdown,{trigger:[`click`],placement:`bottomRight`,menu:{items:ne},children:(0,f.jsx)(u.Button,{type:`text`,className:`znx-dh-more`,icon:(0,f.jsx)(d.MoreOutlined,{})})})]}),F.length>0&&(0,f.jsx)(`div`,{className:`znx-dh-stats`,children:F.map(e=>(0,f.jsxs)(`div`,{className:`znx-dh-stat`,children:[(0,f.jsx)(`span`,{className:`znx-dh-stat-value`,children:e.value}),(0,f.jsx)(`span`,{className:`znx-dh-stat-label`,children:e.label})]},e.label))})]})]}),P.length>0&&(0,f.jsx)(`div`,{className:`znx-dh-tabs`,children:P.map(e=>(0,f.jsx)(`button`,{type:`button`,className:`znx-dh-tab${W===e.key?` is-active`:``}`,onClick:()=>te(e.key),children:e.label},e.key))})]}),(0,f.jsx)(Bt,{documents:C,open:x,onClose:()=>S(!1)})]})}var sm={job:{candidates:({id:e,onDescriptionSaved:t})=>(0,f.jsx)(Hf,{jobId:e,onDescriptionSaved:t})}};function cm(){let e=(typeof window<`u`&&window.__CORE_THEME_CONFIG__?.tabContentRegistry)??{};if(!Object.keys(e).length)return sm;let t={...sm};return Object.entries(e).forEach(([e,n])=>{t[e]={...t[e]??{},...n}}),t}function lm(e,t){return!t||t===`details`?null:cm()[e]?.[t]??null}function um({component:e,id:t,moduleName:n,onDescriptionSaved:r}){return e?(0,f.jsx)(e,{id:t,moduleName:n,onDescriptionSaved:r}):null}var{Text:dm}=u.Typography;function fm({moduleName:e,id:t,backPath:n=``,showFooter:r=!0,users:i=[],showActivity:a=!0,showNotes:o=!0,onHeaderAction:s,onHeaderTabChange:c,onHeaderData:d}){let m=(0,p.useNavigate)(),h=(0,p.useParams)(),[g,_]=(0,p.useSearchParams)(),v=(0,p.useLocation)(),y=t||h.id||g.get(`jobId`)||g.get(`id`)||v.state?.record?._id||v.state?.record?.id,b=g.get(`tab`)||`details`,[x,S]=(0,l.useState)(0),C=(e,t)=>{let n=new URLSearchParams(g);n.set(`tab`,e),_(n,{replace:!0}),c?.(e,t)},w=()=>S(e=>e+1),T=(e,t)=>{s?.(e,t)},E=(0,l.useMemo)(()=>lm(e,b),[e,b]);return(0,f.jsxs)(`div`,{className:`v1-page v1-detail-page`,children:[(0,f.jsxs)(`div`,{className:`v1-page-inner`,children:[(0,f.jsx)(om,{moduleName:e,id:y,defaultTab:b,onAction:T,onTabChange:C,onHeaderData:d}),E?(0,f.jsx)(um,{component:E,id:y,moduleName:e,onDescriptionSaved:w}):(0,f.jsxs)(u.Row,{gutter:[16,16],align:`stretch`,children:[(0,f.jsx)(u.Col,{xs:24,lg:16,children:(0,f.jsx)(pp,{moduleName:e,id:y,refreshKey:x,onDescriptionSaved:w})}),(0,f.jsx)(u.Col,{xs:24,lg:8,children:(0,f.jsx)(vp,{moduleName:e,id:y,users:i,showActivity:a,showNotes:o})})]})]}),n&&r&&(0,f.jsxs)(`div`,{className:`v1-footer`,children:[(0,f.jsx)(dm,{type:`secondary`,children:y?`Record ID: ${y}`:`Detail view`}),(0,f.jsx)(u.Button,{onClick:()=>m(n),children:`Back`})]})]})}fm.propTypes={moduleName:y.default.string,id:y.default.string,backPath:y.default.string,showFooter:y.default.bool,users:y.default.array,showActivity:y.default.bool,showNotes:y.default.bool,onHeaderAction:y.default.func,onHeaderTabChange:y.default.func,onHeaderData:y.default.func};var pm={jobRemoteStatus:[`On-Site`,`Remote`,`Hybrid`],jobRecruitmentStatus:[`unread`,`partially fulfilled`,`fulfilled`],"experience.experienceRequiredUnit":[`Years`,`Months`],"contractDuration.unit":[`Days`,`Weeks`,`Months`,`Years`],noticePeriodUnit:[`Days`,`Weeks`,`Months`],"jobPayDetails.clientBudgetCurrency":[`$`,`USD`,`INR`],"jobPayDetails.clientBudgetUnit":[`Hour`,`Daily`,`Monthly`,`Yearly`],workAuthorisation:[`US Citizen`,`Green Card`,`H1B`,`OPT`,`CPT`,`L2 EAD`,`H4 EAD`,`Other`],relocation:[`Yes`,`No`],source:[`LinkedIn`,`Referral`,`Dice`,`Indeed`,`Monster`,`Vendor`,`Other`]};function mm(e={}){return pm[e.field]??[]}var{Text:hm}=u.Typography,{TextArea:gm}=u.Input,_m=[(0,f.jsx)(d.UserOutlined,{}),(0,f.jsx)(d.EnvironmentOutlined,{}),(0,f.jsx)(d.SolutionOutlined,{}),(0,f.jsx)(d.InfoCircleOutlined,{}),(0,f.jsx)(d.FileTextOutlined,{})],vm={email:(0,f.jsx)(d.MailOutlined,{className:`v1-input-icon`}),contactNumber:(0,f.jsx)(d.PhoneOutlined,{className:`v1-input-icon`}),phone:(0,f.jsx)(d.PhoneOutlined,{className:`v1-input-icon`}),currentLocation:(0,f.jsx)(d.EnvironmentOutlined,{className:`v1-input-icon`}),preferredLocation:(0,f.jsx)(d.EnvironmentOutlined,{className:`v1-input-icon`}),designation:(0,f.jsx)(d.SolutionOutlined,{className:`v1-input-icon`}),skills:(0,f.jsx)(d.TagsOutlined,{className:`v1-input-icon`}),firstName:(0,f.jsx)(d.UserOutlined,{className:`v1-input-icon`}),lastName:(0,f.jsx)(d.UserOutlined,{className:`v1-input-icon`}),jobTitle:(0,f.jsx)(d.SolutionOutlined,{className:`v1-input-icon`}),jobLocation:(0,f.jsx)(d.EnvironmentOutlined,{className:`v1-input-icon`}),vendorEmail:(0,f.jsx)(d.MailOutlined,{className:`v1-input-icon`})},ym=e=>e===!0||e===1||e===`1`,bm=e=>e?.edit===void 0||ym(e.edit),xm=e=>e==null||e===``;function Sm(e){return e==null||e===``?!1:Array.isArray(e)?e.length>0&&e.some(Sm):typeof e==`object`?Object.values(e).some(Sm):!0}function Cm(e=``){let t=String(e).toLowerCase();return t===`job`?`jobs`:t===`candidate`?`candidates`:t===`submissions`?`submission`:t}function wm(e=[]){return e.map(e=>typeof e==`string`?{label:e,value:e}:{label:e.label??e.name??e.value??e.userName??e.email,value:e.value??e.id??e.userId??e._id??e.name??e.label})}function Tm(e,t){return String(t??``).split(`.`).reduce((e,t)=>e?.[t],e)}function Em({field:e,label:t}){return!t||!ym(e?.infoEnabled)||xm(e?.infoText)?t:(0,f.jsxs)(`span`,{className:`v1-field-label-with-info`,children:[(0,f.jsx)(`span`,{children:t}),(0,f.jsx)(u.Tooltip,{title:e.infoText,children:(0,f.jsx)(d.InfoCircleOutlined,{className:`v1-field-info-icon`})})]})}function Dm({group:e}){return!ym(e?.infoEnabled)||xm(e?.infoText)?null:(0,f.jsx)(hm,{type:`secondary`,className:`v1-group-info-message`,children:e.infoText})}function Om({group:e}){return!ym(e?.toggleEnabled)||xm(e?.toggleField)?null:(0,f.jsxs)(u.Space,{size:6,align:`center`,onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(hm,{type:`secondary`,className:`v1-combine-toggle-label`,children:e.toggleLabel||`Toggle`}),(0,f.jsx)(u.Form.Item,{name:e.toggleField,valuePropName:`checked`,initialValue:!!e.toggleValue,noStyle:!0,children:(0,f.jsx)(u.Switch,{size:`small`})})]})}function km(e=[]){return[...e].sort((e,t)=>Number(e.order??0)-Number(t.order??0)).map(e=>({...e,fields:[...e.fields??[]].filter(e=>e.show===void 0||ym(e.show)).sort((e,t)=>Number(e.order??0)-Number(t.order??0))})).filter(e=>e.fields.length)}function Am(e){return String(e??``).replace(/<[^>]*>/g,``).replace(/&nbsp;/g,` `).replace(/&amp;/g,`&`).replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).trim()}function jm(e,t){let n=(e.validations??e.validation??e.rules??[]).find(e=>(typeof e==`string`?e:e?.type)===t);if(!(!n||typeof n==`string`))return n.value??n.length??n[t]}var Mm=({label:e,message:t,value:n,compare:r,text:i})=>({validator:(a,o)=>xm(o)||r(Number(o),Number(n))?Promise.resolve():Promise.reject(Error(t??`${e} ${i} ${n}`))});function Nm(e,t){let n=String(t).split(`.`).filter(Boolean);if(!Array.isArray(e))return n.length>1?n:t;if(n.length>1){if(e.length>=3&&typeof e[1]==`number`){let t=e.slice(0,2),r=n[0]===String(e[0])?n.slice(1):n;return[...t,...r]}return n}let r=[...e];return r[r.length-1]=n[0],r}function Pm(e){if(!e)return null;if(typeof e.valueOf==`function`){let t=e.valueOf();return Number.isNaN(t)?null:t}let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function Fm(e){if(!e)return null;let t=(0,m.default)(e);return t.isValid()?t.startOf(`day`).valueOf():null}function Im(e){if(!e)return null;let t=(0,m.default)(e);return t.isValid()?t.hour()*60+t.minute():null}var Lm=({label:e,message:t,value:n,rule:r,form:i,name:a,compare:o,text:s})=>({validator:async(c,l)=>{let u=n??r.compareField??r.field;if(!u||xm(l))return Promise.resolve();let d=i.getFieldValue(Nm(a,u));if(xm(d))return Promise.resolve();let f=Number(l),p=Number(d);return Number.isNaN(f)||Number.isNaN(p)||o(f,p)?Promise.resolve():Promise.reject(Error(t??`${e} ${s} ${u}`))}}),Rm={noPastDate:({label:e,message:t})=>({validator:(n,r)=>{if(xm(r))return Promise.resolve();let i=new Date;return i.setHours(0,0,0,0),Pm(r)<i.getTime()?Promise.reject(Error(t??`${e} cannot be a past date`)):Promise.resolve()}}),noFutureDate:({label:e,message:t})=>({validator:(n,r)=>{if(xm(r))return Promise.resolve();let i=new Date;return i.setHours(23,59,59,999),Pm(r)>i.getTime()?Promise.reject(Error(t??`${e} cannot be a future date`)):Promise.resolve()}}),minAge:({message:e,value:t})=>({validator:(n,r)=>{if(xm(r))return Promise.resolve();let i=Number(t??18),a=new Date;return a.setFullYear(a.getFullYear()-i),a.setHours(23,59,59,999),Pm(r)>a.getTime()?Promise.reject(Error(e??`Must be at least ${i} years old`)):Promise.resolve()}}),dateAfterField:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{let c=n??r.compareField??r.field;if(!c||xm(s))return Promise.resolve();let l=i.getFieldValue(Nm(a,c));if(xm(l))return Promise.resolve();let u=Fm(s),d=Fm(l);return u===null||d===null||u>=d?Promise.resolve():Promise.reject(Error(t??`${e} must be on or after ${c}`))}}),dateBeforeField:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{let c=n??r.compareField??r.field;if(!c||xm(s))return Promise.resolve();let l=i.getFieldValue(Nm(a,c));if(xm(l))return Promise.resolve();let u=Fm(s),d=Fm(l);return u===null||d===null||u<=d?Promise.resolve():Promise.reject(Error(t??`${e} must be on or before ${c}`))}}),timeAfterField:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{let c=n??r.compareField??r.field;if(!c||xm(s))return Promise.resolve();let l=i.getFieldValue(Nm(a,c));if(xm(l))return Promise.resolve();let u=Im(s),d=Im(l);return u===null||d===null||u>d?Promise.resolve():Promise.reject(Error(t??`${e} must be after ${c}`))}}),timeBeforeField:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{let c=n??r.compareField??r.field;if(!c||xm(s))return Promise.resolve();let l=i.getFieldValue(Nm(a,c));if(xm(l))return Promise.resolve();let u=Im(s),d=Im(l);return u===null||d===null||u<d?Promise.resolve():Promise.reject(Error(t??`${e} must be before ${c}`))}}),greaterThanField:e=>Lm({...e,compare:(e,t)=>e>=t,text:`must be greater than or equal to`}),strictGreaterThanField:e=>Lm({...e,compare:(e,t)=>e>t,text:`must be greater than`}),strictLessThanField:e=>Lm({...e,compare:(e,t)=>e<t,text:`must be less than`}),lessThanOrEqualField:e=>Lm({...e,compare:(e,t)=>e<=t,text:`must be less than or equal to`}),maxFieldWithFallback:({label:e,message:t,value:n,rule:r,form:i,name:a})=>({validator:async(o,s)=>{if(xm(s))return Promise.resolve();let c=String(n??r.compareFields??``).split(`,`).map(e=>e.trim()).filter(Boolean).find(e=>!xm(i.getFieldValue(Nm(a,e))));if(!c)return Promise.resolve();let l=Number(i.getFieldValue(Nm(a,c))),u=Number(s);return Number.isNaN(l)||Number.isNaN(u)||u<=l?Promise.resolve():Promise.reject(Error(t??`${e} must not exceed ${c}`))}}),required:({field:e,message:t,form:n,name:r})=>({validator:(i,a)=>{if(e?.disabledByField&&n&&r&&ym(n.getFieldValue(Bm(r,e.disabledByField))))return Promise.resolve();let o=a==null||a===``||Array.isArray(a)&&a.length===0;return!o&&e?.type===`text-editor`&&(o=Am(a)===``),o?Promise.reject(Error(t??`Mandatory Field`)):Promise.resolve()}}),email:({label:e,message:t})=>Va(e,t),url:({label:e,message:t})=>({type:`url`,message:t??`Enter valid ${e}`}),number:({label:e,message:t})=>({pattern:/^[0-9]+$/,message:t??`${e} must be a number`}),phone:({message:e})=>({pattern:/^[0-9]{10}$/,message:e??`Phone number must contain exactly 10 digits`}),len:({label:e,message:t,value:n})=>({len:Number(n),message:t??`${e} must be ${n} characters`}),pattern:({label:e,message:t,rule:n})=>({pattern:new RegExp(n.pattern??n.value,n.flags),message:t??`Enter valid ${e}`}),min:({field:e,label:t,message:n,value:r})=>e.type===`number`?Mm({label:t,message:n,value:r,compare:(e,t)=>e>=t,text:`must be at least`}):{validator:(i,a)=>{if(a==null||a===``)return Promise.resolve();let o=e.type===`text-editor`?Am(a):String(a);return o===``||o.length>=Number(r)?Promise.resolve():Promise.reject(Error(n??`${t} must be at least ${r} characters`))}},max:({field:e,label:t,message:n,value:r})=>e.type===`number`?Mm({label:t,message:n,value:r,compare:(e,t)=>e<=t,text:`must not exceed`}):{validator:(i,a)=>{if(a==null||a===``)return Promise.resolve();let o=e.type===`text-editor`?Am(a):String(a);return o===``||o.length<=Number(r)?Promise.resolve():Promise.reject(Error(n??`${t} must not exceed ${r} characters`))}}};function zm(e,t,n,r){let i=typeof e==`string`?{type:e}:e,a=i.type??i.rule??i.name,o=i.value??i.length??i.min??i.max,s=t.label??t.field??`Field`,c=Rm[a];return c?c({field:t,label:s,message:i.message,rule:i,value:o,form:n,name:r}):i}function Bm(e,t){return Array.isArray(e)&&e.length>1?[...e.slice(0,-1),t]:[t]}function Vm(e,t,n){let r=e.label??e.field??`Field`,i=e.validations??e.validation??e.rules??[],a=i.some(e=>(typeof e==`string`?e:e?.type)===`required`),o=i.some(e=>(typeof e==`string`?e:e?.type)===`email`),s=[];return ym(e.req)&&!a&&s.push(Rm.required({field:e,message:`Mandatory Field`,form:t,name:n})),(e.type===`email`||e.formatter===`email`)&&!o&&s.push(Va(r)),e.type===`number`&&s.push({pattern:/^[0-9]+$/,message:`${r} must be a number`}),[...s,...i.map(r=>zm(r,e,t,n)),gi(e)]}function Hm(e,t){let n=new Set([`greaterThanField`,`strictGreaterThanField`,`strictLessThanField`,`lessThanOrEqualField`,`maxFieldWithFallback`,`dateAfterField`,`dateBeforeField`,`timeAfterField`,`timeBeforeField`]);return(e.validations??e.validation??e.rules??[]).filter(e=>n.has(typeof e==`string`?e:e?.type)).flatMap(e=>String(e.value??e.compareField??e.field??``).split(`,`).map(e=>e.trim()).filter(Boolean).map(e=>Nm(t,e)))}function Um(e){let t=e.len??jm(e,`len`),n=e.min??jm(e,`min`),r=e.max??jm(e,`max`);return e.type===`number`?{min:n??void 0,max:r??void 0}:{minLength:n??void 0,maxLength:e.maxLength??t??r??void 0}}function Wm(e,t,n){let r=e.validations??e.validation??e.rules??[],i=[];for(let e of r){let r=typeof e==`string`?e:e?.type;if(r===`noPastDate`&&i.push(e=>{if(!e)return!1;let t=new Date;return t.setHours(0,0,0,0),Pm(e)<t.getTime()}),r===`noFutureDate`&&i.push(e=>{if(!e)return!1;let t=new Date;return t.setHours(23,59,59,999),Pm(e)>t.getTime()}),r===`minAge`){let t=Number(e?.value??18);i.push(e=>{if(!e)return!1;let n=new Date;return n.setFullYear(n.getFullYear()-t),n.setHours(23,59,59,999),Pm(e)>n.getTime()})}if(r===`dateAfterField`||r===`dateBeforeField`){let a=e?.value??e?.compareField??e?.field;if(!a)continue;i.push(e=>{if(!e)return!1;let i=t.getFieldValue(Nm(n,a));if(xm(i))return!1;let o=Fm(e),s=Fm(i);return o===null||s===null?!1:r===`dateAfterField`?o<s:o>s})}}return i.length?e=>i.some(t=>t(e)):void 0}function Gm(e){let t=e.validations??e.validation??e.rules??[];for(let e of t){let t=typeof e==`string`?e:e?.type;if(t===`minAge`)return(0,m.default)().subtract(Number(e?.value??18),`year`);if(t===`noFutureDate`||t===`noPastDate`)return(0,m.default)()}}function Km(e,t){return t?t===`phone`||t===`digits`?e.replace(/\D/g,``).slice(0,10):t===`email`||t===`noSpaces`?e.replace(/\s/g,``):t===`name`?e.replace(/\s+/g,` `).trimStart().replace(/\b\w/g,e=>e.toUpperCase()):e:e}function qm({field:e,form:t,name:n,value:r,checked:i,fileList:a,moduleName:o,initialValue:s,scopeValues:c={},onAiUpload:p,formDisabled:m}){let h=e.type??`text`,g=!bm(e),[_,v]=(0,l.useState)(null),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)(``),[T,D]=(0,l.useState)(``),[O,k]=(0,l.useState)({open:!1,docs:[],index:0}),[A,j]=(0,l.useState)(null),M=(0,l.useRef)([]),N=e.lookupFilterValueFrom?xa(e.lookupFilterValueFrom):[`__lookup_filter_${e.field}`],P=u.Form.useWatch(N,t),F=e.lookupFilterValueFrom?c[e.lookupFilterValueFrom]:void 0,I=xm(F)?P:F,L=e.disabledByField?Array.isArray(n)&&n.length>1?[...n.slice(0,-1),e.disabledByField]:[e.disabledByField]:[`__noop_disabled_watch__`],R=u.Form.useWatch(L,t),z=g||(e.disabledByField?ym(R):!1)||!!m;(0,l.useEffect)(()=>{if(h===`location`){let t=!1;async function n(){try{b(!0);let n=await J(E,`/admin/location-dropdown-values?${new URLSearchParams({search:x,limit:String(e.limit??50),offset:`0`})}`),r=n?.data??n??[];t||v(wm(Array.isArray(r)?r:[]))}catch(n){console.error(`[EditFormV1] Failed to fetch locations for "${e.field}":`,n),t||v([])}finally{t||b(!1)}}return n(),()=>{t=!0}}let t=e.dataSource;if(![`select`,`radio`,`checkbox`].includes(h)||!t||t===`static`)return;if(t===`lookup`&&e.lookupFilterField&&xm(I)){v([]),b(!1);return}let n=!1;async function r(){try{b(!0);let r=[];if(t===`master`||t===`module`)r=await cn(o,e.field,t===`master`?T:``,e.limit??50,0,{dataSource:t,masterName:e.masterName,groupName:e.groupName});else if(t===`lookup`){let t=new URLSearchParams({collection:e.lookupCollection??``,displayField:e.displayField??``,valueField:e.valueField??`_id`});e.displayField2&&t.set(`displayField2`,e.displayField2),C&&t.set(`search`,C),e.lookupFilterField&&!xm(I)&&(t.set(`filterField`,e.lookupFilterField),t.set(`filterValue`,String(I))),e.extraFields?.length&&t.set(`extraFields`,e.extraFields.join(`,`));let n=await J(E,`/admin/lookup-dropdown-values?${t}`);r=n?.data??n??[]}else if(t===`group`){let t=String(e.groupName??``).toLowerCase().trim();if(t===`users`||t===`user`){let e=await J(E,`/get-all-users?limit=500&offset=0`),t=e?.data?.users??e?.users??e?.data??[];r=Array.isArray(t)?t.map(e=>({label:[e.firstName,e.lastName].filter(Boolean).join(` `).trim()||e.userName||e.email||String(e.userId??e.id),value:e.userId??e.id})):[]}}n||(M.current=Array.isArray(r)?r:[],v(wm(M.current)))}catch(t){console.error(`[EditFormV1] Failed to fetch options for "${e.field}":`,t),n||v([])}finally{n||b(!1)}}return r(),()=>{n=!0}},[h,e.dataSource,e.field,e.lookupCollection,e.displayField,e.displayField2,e.valueField,e.lookupFilterField,I,e.groupName,e.masterName,e.limit,x,C,T,o,e.extraFields]);let B=wm([e.options,e.values].find(e=>Array.isArray(e)&&e.length>0)??mm(e)),V=_??B,H=(e.multiSelect?`multiple`:e.mode??(ym(e.multiple)?`multiple`:void 0))??(ji(e)===`array`?`multiple`:void 0),U=[`select`,`location`].includes(h),W=e.hidePlaceholder?void 0:e.placeholder??`${U?`Select`:`Enter`} ${String(e.label??``).toLowerCase()}`,G=Um(e),K=()=>{setTimeout(()=>{t.validateFields([n]).catch(()=>{})})},q=e=>{t.setFieldValue(n,e),K()},ee=e.validator?.type?{...e.validator,title:e.validator.title||e.label||`Field`}:null,te={...G,value:r,disabled:z,placeholder:W,prefix:e.icon?null:vm[e.field],onChange:t=>{let n=e.formatter?Km(t.target.value,e.formatter):t.target.value;if(ee){let{cleaned:e,error:t}=Ga(n,ee,`change`);j(t),n=e}q(n)},...ee&&{onBlur:e=>{let{cleaned:t,error:n}=Ga(e.target.value,ee,`blur`);j(n),t!==e.target.value&&q(t)},onKeyPress:e=>{let t=Wa(ee.type);if(!t||e.which===0||e.keyCode===8||e.keyCode===13)return;let n=String.fromCharCode(e.which??e.keyCode);if(!t.test(n)){e.preventDefault();let t=`${ee.title} — invalid character.`;j(t),setTimeout(()=>j(e=>e===t?null:e),1800)}},maxLength:ee.maxLength??G.maxLength}};if(h===`tagify`)return(0,f.jsx)(u.Select,{value:r,allowClear:!0,disabled:z,mode:`tags`,placeholder:W,onChange:q});if(h===`location`)return(0,f.jsx)(u.Select,{value:r,allowClear:!0,showSearch:!0,filterOption:!1,disabled:z,loading:y,options:V,placeholder:W,notFoundContent:y?(0,f.jsx)(u.Spin,{size:`small`}):void 0,onSearch:S,onFocus:()=>S(e=>e),onChange:q});if(h===`select`){let i=e.dataSource===`lookup`,a=e.dataSource===`master`,o=i||a,s=e.dataSource===`group`,c=Vi(e),l=Hi(e,r,V);return(0,f.jsx)(u.Select,{value:l,allowClear:!0,disabled:z,loading:y,labelInValue:c||void 0,showSearch:o||s||void 0,optionFilterProp:`label`,filterOption:o?!1:void 0,mode:H,options:V,placeholder:W,notFoundContent:y?(0,f.jsx)(u.Spin,{size:`small`}):void 0,onSearch:i?w:a?D:void 0,onChange:r=>{if(q(r),e.autofillFrom?.length){let i=r&&!Array.isArray(r)&&typeof r==`object`?r.value:r,a=Array.isArray(n)&&n.length>=3&&typeof n[1]==`number`;if(r==null)e.autofillFrom.forEach(({targetField:e})=>{let r=a?[...n.slice(0,2),...xa(e)]:xa(e);t.setFieldValue(r,null)});else if(M.current.length>0){let r=e.valueField??`_id`,o=M.current.find(e=>Tm(e,r)===i||e._id===i||e.id===i||e.value===i);o&&e.autofillFrom.forEach(({optionKey:e,targetField:r})=>{let i=Tm(o,e)??o.extraData?.[e]??null,s=a?[...n.slice(0,2),...xa(r)]:xa(r);t.setFieldValue(s,i)})}}}})}if(h===`radio`)return(0,f.jsx)(u.Radio.Group,{value:r,disabled:z,options:V,onChange:e=>q(e.target.value)});if(h===`checkbox`)return V.length>0?(0,f.jsx)(u.Checkbox.Group,{value:r,disabled:z,options:V,onChange:q}):(0,f.jsx)(u.Checkbox,{checked:i,disabled:z,onChange:r=>{let i=r.target.checked;if(q(i),e.linkedClearField&&i){let r=Array.isArray(n)&&n.length>1?[...n.slice(0,-1),e.linkedClearField]:[e.linkedClearField];t.setFieldValue(r,null)}},children:e.checkboxLabel??e.label});if(h===`text-editor`)return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(wt,{value:r??s??``,disabled:z,placeholder:W,onChange:e=>{if(ee){let{error:t}=Ga(e,ee,`change`);j(t)}q(e)}}),A&&(0,f.jsx)(`div`,{className:`v1-input-validator-hint`,children:A})]});if(h===`textarea`)return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(gm,{...te,rows:e.rows??3,className:`v1-scroll-textarea`}),A&&(0,f.jsx)(`div`,{className:`v1-input-validator-hint`,children:A})]});if(h===`date`)return(0,f.jsx)(u.DatePicker,{value:r,disabled:z,placeholder:W,style:{width:`100%`},suffixIcon:(0,f.jsx)(d.CalendarOutlined,{}),disabledDate:Wm(e,t,n),defaultPickerValue:Gm(e),onChange:e=>q(e)});if(h===`time`)return(0,f.jsx)(u.TimePicker,{value:r,disabled:z,placeholder:W,style:{width:`100%`},onChange:e=>q(e)});if(h===`file`){let t=e.validations??e.validation??e.rules??[],n=t.find(e=>(typeof e==`string`?e:e?.type)===`fileType`),i=t.find(e=>(typeof e==`string`?e:e?.type)===`fileSize`),a=t.find(e=>(typeof e==`string`?e:e?.type)===`maxFiles`),o=n?.value?n.value.split(`,`).map(e=>`.${e.trim().replace(/^\./,``)}`).join(`,`):void 0,s=i?Number(i?.value??5):void 0,c=a?Number(a?.value??1):ym(e.multiple)?e.maxCount??5:1,l=Array.isArray(r)?r:[],m=l.length<c,h=e=>e?e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(2)} MB`:``,g=e=>{let t=(e??``).split(`.`).pop()?.toLowerCase();return t===`pdf`?(0,f.jsx)(d.FilePdfOutlined,{className:`v1-file-type-icon v1-file-icon-pdf`}):[`doc`,`docx`].includes(t)?(0,f.jsx)(d.FileWordOutlined,{className:`v1-file-type-icon v1-file-icon-word`}):[`xls`,`xlsx`,`csv`].includes(t)?(0,f.jsx)(d.FileExcelOutlined,{className:`v1-file-type-icon v1-file-icon-excel`}):[`jpg`,`jpeg`,`png`,`gif`,`svg`,`webp`].includes(t)?(0,f.jsx)(d.FileImageOutlined,{className:`v1-file-type-icon v1-file-icon-image`}):(0,f.jsx)(d.FileOutlined,{className:`v1-file-type-icon v1-file-icon-default`})},_=e=>{q(l.filter((t,n)=>n!==e))},v=(e,t)=>{k({open:!0,docs:l.map(e=>{let t=e.url??e.thumbUrl??``;return!t&&e.originFileObj instanceof File&&(t=URL.createObjectURL(e.originFileObj)),t&&!t.startsWith(`http`)&&!t.startsWith(`blob:`)&&(t=ga(t)),{url:t,name:e.name??`file`}}).filter(e=>e.url),index:t??0})},y=c>1,b=c-l.length,x=[o?o.split(`,`).map(e=>e.replace(`.`,``).toUpperCase()).join(`, `):null,s?`up to ${s} MB`:null].filter(Boolean).join(` `),S=y&&l.length>0?[x,`${b} of ${c} remaining`].filter(Boolean).join(` • `):x,C=l.length>0?`Add ${y?`more files`:`file`}`:e.buttonLabel??`Upload ${e.label??`File`}`,w=e=>{if(l.length>=c)return u.Upload.LIST_IGNORE;if(o){let t=(e.name.split(`.`).pop()??``).toLowerCase();if(!o.split(`,`).map(e=>e.replace(/^\./,``).toLowerCase()).includes(t))return u.message.error(n?.message??`Only ${n.value} files are allowed`),u.Upload.LIST_IGNORE}return s!==void 0&&e.size/1024/1024>s?(u.message.error(i?.message??`File must be smaller than ${s} MB`),u.Upload.LIST_IGNORE):!1},T=({fileList:e})=>{let t=e.slice(0,c);if(q(t),p&&t.length>l.length){let e=t[t.length-1];e?.originFileObj&&p(e.originFileObj)}},E={accept:o,fileList:l,showUploadList:!1,multiple:!0,maxCount:c,beforeUpload:w,onChange:T,disabled:z},D=l.map((e,t)=>(0,f.jsxs)(`div`,{className:`v1-file-item`,children:[(0,f.jsx)(`div`,{className:`v1-file-item-icon`,children:g(e.name)}),(0,f.jsxs)(`div`,{className:`v1-file-item-info`,children:[(0,f.jsx)(`span`,{className:`v1-file-item-name`,children:e.name}),(0,f.jsx)(`span`,{className:`v1-file-item-meta`,children:e.existing?`Previously uploaded`:`${h(e.size)}${e.size?` • `:``}Uploaded just now`})]}),(0,f.jsxs)(u.Space,{size:6,className:`v1-file-item-actions`,children:[(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.EyeOutlined,{}),onClick:()=>v(e,t),className:`v1-file-view-btn`,children:`View`}),(0,f.jsx)(u.Button,{size:`small`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),onClick:()=>_(t),className:`v1-file-delete-btn`})]})]},e.uid??t)),A=(0,f.jsx)(Bt,{documents:O.docs,open:O.open,onClose:()=>k(e=>({...e,open:!1})),initialIndex:O.index});if(y){let t=l.length>0?`Upload more ${e.label??`files`}`:e.buttonLabel??`Upload ${e.label??`File`}`;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`v1-file-upload-wrapper`,children:[m&&(0,f.jsx)(u.Upload,{...E,style:{width:`100%`,display:`block`},children:(0,f.jsxs)(`div`,{className:`v1-upload-dropzone v1-upload-dropzone-center${z?` v1-upload-dropzone-disabled`:``}`,children:[(0,f.jsxs)(`div`,{className:`v1-upload-dropzone-title-row`,children:[(0,f.jsx)(d.CloudUploadOutlined,{className:`v1-upload-cloud-icon v1-upload-cloud-icon-sm`}),(0,f.jsx)(`span`,{className:`v1-upload-dropzone-title v1-upload-dropzone-title-blue`,children:t})]}),(0,f.jsx)(`span`,{className:`v1-upload-dropzone-sub`,children:`Drag & drop or click to upload`}),x&&(0,f.jsx)(`span`,{className:`v1-upload-dropzone-sub`,children:x})]})}),l.length>0&&(0,f.jsx)(`div`,{className:`v1-file-grid`,children:D}),m&&l.length>0&&(0,f.jsx)(u.Upload,{...E,style:{display:`inline-block`},children:(0,f.jsx)(u.Button,{type:`link`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),className:`v1-add-more-files-btn`,children:`Add more files`})})]}),A]})}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`v1-file-upload-wrapper`,children:[l.length>0&&(0,f.jsx)(`div`,{className:`v1-file-rows-single`,children:D}),m&&(0,f.jsx)(u.Upload,{accept:o,fileList:l,showUploadList:!1,multiple:!1,maxCount:1,beforeUpload:w,onChange:T,disabled:z,style:{width:`100%`,display:`block`},children:(0,f.jsxs)(`div`,{className:`v1-upload-dropzone v1-upload-dropzone-single${z?` v1-upload-dropzone-disabled`:``}`,children:[(0,f.jsx)(d.CloudUploadOutlined,{className:`v1-upload-cloud-icon`}),(0,f.jsx)(`span`,{className:`v1-upload-dropzone-title`,children:C}),S&&(0,f.jsxs)(`span`,{className:`v1-upload-dropzone-sub`,children:[`— `,S]})]})})]}),A]})}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Input,{...te,type:h===`number`?`number`:h}),A&&(0,f.jsx)(`div`,{className:`v1-input-validator-hint`,children:A})]})}function Jm({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(hm,{strong:!0,className:`v1-section-label`,children:t})]})}function Ym({moduleName:e,recordId:t,clientId:n,region:r,breadcrumbItems:i=[],submitText:a=`Save Changes`,cancelPath:o,onSuccess:s,fieldNameMap:c={},onFileUpload:m=null}){let h=(0,p.useNavigate)(),[g]=u.Form.useForm(),[_,v]=(0,l.useState)({}),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(``),[T,E]=(0,l.useState)(!1),[D,O]=(0,l.useState)(``),k=(0,l.useMemo)(()=>km(y),[y]),A=Ra({form:g,groups:k,module:e}),j=(0,l.useMemo)(()=>{let e={};return k.forEach(t=>{t.addRow&&(e[t.name]=Da(t))}),e},[k]),M={jobs:{list:`Jobs`,path:`/jobs`,edit:`Edit Job`},candidates:{list:`Candidates`,path:`/candidates`,edit:`Edit Candidate`},submissions:{list:`Submissions`,path:`/submissions`,edit:`Edit Submission`}},N=i.length>0?i:(()=>{let t=M[Cm(e)];return t?[{label:`Home`,href:`/`},{label:t.list,href:t.path},{label:t.edit}]:[]})();(0,l.useEffect)(()=>{if(!e||!t)return;let i=!1;async function a(){try{S(!0),w(``),O(``);let a=await mn({module:e,id:t,clientId:n,region:r});if(i)return;b(Array.isArray(a)?a:[])}catch(t){console.error(`Failed to fetch ${e} edit data:`,t),i||w(t?.message||`Failed to load record`)}finally{i||S(!1)}}return a(),()=>{i=!0}},[e,t,n,r]),(0,l.useEffect)(()=>{x||k.length===0||Oa(g,k)},[x,k,g]);let P=e=>{v(t=>({...t,[e]:!t[e]}))};function F(e){let t=Ki(e,k);return Object.entries(c).forEach(([e,n])=>{t[e]!==void 0&&(t[n]=t[e],delete t[e])}),t}async function I(n){try{E(!0),O(``);let r=Gi(n,k,{indexed:!0});if(m&&m.useLegacyUpload){let e=k.flatMap(e=>e.fields??[]).filter(e=>e.type===`file`);for(let r of e){let e=n[r.field];if(!Array.isArray(e))continue;let i=e.filter(e=>e.originFileObj instanceof File);try{await Promise.all(i.map(e=>m(r.field,e.originFileObj,t)))}catch(e){console.warn(`File upload failed — continuing with save:`,e)}}}await Xr(e,t,F(n),m?.useLegacyUpload?[]:r),u.message.success(`${e} updated successfully`),s?s():h(o||-1)}catch(t){console.error(`Failed to update ${e}:`,t),O(t?.message||`Failed to save changes`),u.message.error(t?.message||`Failed to save changes`)}finally{E(!1)}}let L=({errorFields:e})=>{if(!e?.length)return;let t=document.querySelector(`.ant-form-item-has-error`);if(!t)return;let n=t.querySelector(`input, textarea, select, .ProseMirror`);n&&(n.scrollIntoView({behavior:`smooth`,block:`center`}),setTimeout(()=>{n.focus?.(),n.style.boxShadow=`0 0 0 3px rgba(255, 77, 79, 0.3)`,setTimeout(()=>{n.style.boxShadow=``},1e3)},300))},[R,z]=(0,l.useState)({}),B=e=>String(e?.field??``),V=(e,t,n)=>{if(!e?.field)return!0;let r=t(n==null?[e.field]:[...Array.isArray(n)?n:[n],e.field]);switch(e.operator){case`eq`:return String(r??``)===String(e.value??``);case`neq`:return String(r??``)!==String(e.value??``);case`truthy`:return r!=null&&r!==``&&r!==!1;case`falsy`:return r==null||r===``||r===!1;default:return!0}},H=(t,r,i,a={})=>{let o=typeof t.field==`string`&&t.field.includes(`.`)?t.field.split(`.`):null,s=o??t.field,c=r===void 0?s:[r,...o??[t.field]],l=i!==void 0&&r!==void 0?[i,...Array.isArray(c)?c:[c]]:c,d=t.type===`checkbox`&&(t.options&&t.options.length>0||t.dataSource&&t.dataSource!==`static`),p=!d&&t.type===`checkbox`?`checked`:`value`,m=a.inline||a.hideLabel||!d&&t.type===`checkbox`?``:(0,f.jsx)(Em,{field:t,label:t.label}),h=a.inline||t.type===`text-editor`||t.type===`file`&&ym(t.multiple)?24:t.col??12,_=i!==void 0&&r!==void 0?[i,r]:null,v=Hm(t,l),y=a.inline?{flex:`${Number(t.combineWidth)>0?Number(t.combineWidth):1} 1 0`,maxWidth:`none`}:void 0,b=(t.aiActions||[]).filter(e=>e.trigger===`click`),x=(t.aiActions||[]).find(e=>e.trigger===`upload`),S=(0,f.jsx)(u.Form.Item,{label:m,name:c,extra:t.helpText?(0,f.jsx)(hm,{type:`secondary`,className:`v1-field-help-text`,children:t.helpText}):void 0,required:ym(t.req),rules:Vm(t,g,l),dependencies:v,valuePropName:p,getValueFromEvent:t.type===`file`?e=>Array.isArray(e)?e:e?.fileList:void 0,validateTrigger:[`onBlur`,`onChange`],children:(0,f.jsx)(qm,{field:t,form:g,name:l,moduleName:e,initialValue:t.value,scopeValues:{clientId:n},onAiUpload:x?e=>A.runAction(a.groupNameForActions,t,x,e):void 0,formDisabled:A.busy})}),C=b.length>0?(()=>{let e=La(b),n=n=>(0,f.jsx)(za,{position:n,actions:e[n],aiActions:A,groupName:a.groupNameForActions,field:t},n);return(0,f.jsxs)(`div`,{className:`v1-ai-action-wrap`,children:[n(`top-left`),n(`top-center`),n(`top-right`),S,n(`bottom-left`),n(`bottom-center`),n(`bottom-right`)]})})():S;return t.showIf?.field?(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,noStyle:!0,children:({getFieldValue:e})=>V(t.showIf,e,_)?(0,f.jsx)(u.Col,{xs:24,md:h,style:y,className:a.inline?`v1-combine-cell`:void 0,children:C}):null},t.field):(0,f.jsx)(u.Col,{xs:24,md:h,style:y,className:a.inline?`v1-combine-cell`:void 0,children:C},t.field)},U=(e,t,n,r=!1,i)=>{let a=new Set,o=[];return e.forEach(s=>{let c=s.combineKey?.trim?.();if(!c){o.push(H(s,t,n,{hideLabel:r,groupNameForActions:i}));return}let l=`${n??`root`}:${t??`root`}:${c}`;if(a.has(l))return;let d=e.filter(e=>e.combineKey===c);d.forEach(e=>a.add(`${n??`root`}:${t??`root`}:${e.combineKey}`));let p=d.find(e=>e.combineLabel)?.combineLabel??s.combineLabel??s.label,m=d.find(e=>e.combineToggleTarget)?.combineToggleTarget,h=d.find(e=>e.combineToggleLabel)?.combineToggleLabel??`Show range`,_=d.some(e=>ym(e.combineWrap)),v=Number(d.find(e=>[12,24].includes(Number(e.combineSpan)))?.combineSpan),y=m?d.find(e=>B(e)===m):null,b=y?.field?.includes?.(`.`)?y.field.split(`.`):[y?.field].filter(Boolean),x=y?n!==void 0&&t!==void 0?[n,t,...b]:b.length>1?b:y.field:null,S=d.some(e=>ym(e.req)),C=[12,24].includes(v)?v:d.length>=3?24:12;o.push((0,f.jsx)(u.Col,{xs:24,md:C,children:(0,f.jsx)(u.Form.Item,{label:p,required:S,colon:!1,className:`v1-combine-field`,children:(0,f.jsx)(u.Form.Item,{noStyle:!0,shouldUpdate:!0,children:({getFieldValue:e})=>{let r=x?!xm(e(x)):!1,i=R[l]??r,a=m&&!i?d.filter(e=>B(e)!==m):d;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Row,{gutter:[8,0],align:`top`,wrap:_,className:`v1-combine-row${_?` v1-combine-row-wrap`:``}`,children:a.map(e=>H(e,t,n,{inline:!0}))}),m&&(0,f.jsxs)(`div`,{className:`v1-combine-range`,children:[(0,f.jsx)(u.Switch,{size:`small`,checked:i,onChange:e=>{!e&&x&&(g.setFieldValue(x,void 0),g.validateFields([x]).catch(()=>{})),z(t=>({...t,[l]:e}))}}),(0,f.jsx)(hm,{type:`secondary`,className:`v1-combine-toggle-label`,children:h})]})]})}})})},l))}),o};return(0,f.jsxs)(`main`,{children:[N.length>0&&(0,f.jsx)(so,{items:N}),(0,f.jsxs)(`div`,{className:`v1-edit-page`,children:[(0,f.jsx)(`div`,{className:`v1-page-inner`,children:(0,f.jsxs)(u.Spin,{spinning:x||A.busy,tip:A.busy?`Running AI action…`:`Loading form fields...`,children:[C&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:C,style:{marginBottom:16}}),D&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:D,style:{marginBottom:16}}),(0,f.jsxs)(u.Form,{form:g,layout:`vertical`,colon:!1,className:`v1-form`,disabled:A.busy,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),onFinish:I,onFinishFailed:L,children:[k.map((e,t)=>{let n=e.name??e.id??String(t),r=e.name??n,i=Math.max(0,Number(e.minRows??0)||0),a=e.addRow?(0,f.jsx)(u.Form.List,{name:r,initialValue:j[e.name]??[],rules:[{validator:async(t,n=[])=>{if(!(ym(e.toggleEnabled)&&e.toggleField&&g.getFieldValue(e.toggleField))){if(i>0&&n.length<i)throw Error(`Keep at least ${i} row${i>1?`s`:``}.`);if(ym(e.requireOne)&&n.some(e=>!Sm(e)))throw Error(`Fill at least one field in each added row.`)}}}],children:(t,{add:n,remove:a},{errors:o})=>(0,f.jsxs)(`div`,{className:`v1-addrow-wrapper`,children:[(0,f.jsx)(`div`,{className:`v1-addrow-topbar`,children:(0,f.jsx)(u.Button,{type:`link`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>n(),className:`v1-addrow-add-btn`,children:e.addLabel??`Add ${e.label??`Row`}`})}),ym(e.sharedRowLabels)&&t.length>0&&(0,f.jsx)(u.Row,{gutter:[24,0],className:`v1-addrow-header`,children:e.fields.map(e=>(0,f.jsx)(u.Col,{md:e.col??12,className:`v1-addrow-header-label`,children:e.label},B(e)))}),t.map(({key:n,name:o})=>(0,f.jsxs)(`div`,{className:`v1-addrow-item`,children:[(0,f.jsx)(u.Button,{type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),disabled:t.length<=i,onClick:()=>a(o),className:`v1-addrow-delete-btn`}),(0,f.jsx)(u.Row,{gutter:[24,0],align:`top`,children:U(e.fields,o,r,ym(e.sharedRowLabels),r)})]},n)),(0,f.jsx)(u.Form.ErrorList,{errors:o})]})}):(0,f.jsx)(u.Row,{gutter:[24,0],children:U(e.fields,void 0,void 0,!1,r)});return(0,f.jsx)(u.Card,{className:`v1-card v1-edit-card`,title:(0,f.jsx)(Jm,{icon:_m[t%_m.length],title:e.label??e.name??`Details`}),extra:(0,f.jsxs)(u.Space,{size:8,align:`center`,className:`v1-group-actions`,children:[(0,f.jsx)(Dm,{group:e}),(0,f.jsx)(Om,{group:e}),(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:_[n]?(0,f.jsx)(d.DownOutlined,{}):(0,f.jsx)(d.UpOutlined,{}),onClick:e=>{e.stopPropagation(),P(n)}})]}),children:(0,f.jsx)(u.Form.Item,{noStyle:!0,shouldUpdate:!0,children:({getFieldValue:t})=>{let r=ym(e.toggleEnabled)&&e.toggleField&&!!t(e.toggleField);return(0,f.jsx)(`div`,{style:{display:_[n]||r?`none`:`block`},children:a})}})},n)}),!x&&!C&&k.length===0&&(0,f.jsx)(u.Alert,{type:`info`,showIcon:!0,message:`No form fields are configured.`})]})]})}),(0,f.jsxs)(`div`,{className:`v1-footer`,children:[(0,f.jsx)(hm,{type:`secondary`,children:`All unsaved changes will be lost if you cancel and reload.`}),(0,f.jsxs)(u.Space,{size:12,children:[(0,f.jsx)(u.Button,{onClick:()=>h(o||-1),children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,onClick:()=>g.submit(),disabled:x||T,loading:T,children:a})]})]})]})]})}var Xm=/(\{\{[\w.]+\}\})/g;function Zm(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function Qm(e,t){return e?e.split(Xm).map(e=>/^\{\{[\w.]+\}\}$/.test(e)?`<span style="color:var(--color-brand);font-weight:600;background:var(--color-brand-softer);border-radius:3px;padding:0 3px">${Zm(e)}</span>`:`<span style="color:var(--color-text-primary)">${Zm(e).replace(/\n/g,`<br>`)}</span>`).join(``):`<span style="color:#bbb;pointer-events:none">${Zm(t)}</span>`}var $m={fontFamily:`"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace`,fontSize:12,lineHeight:`1.7`,padding:`5px 10px`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,overflowWrap:`break-word`,boxSizing:`border-box`};function eh({value:e=``,onChange:t,placeholder:n="e.g. ${{clientRate}} /{{rateType}}",disabled:r=!1,textareaRef:i}){let a=(0,l.useRef)(null),o=i??a,[s,c]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=o.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[e]);let u=r?`var(--color-border-input)`:s?`var(--color-brand)`:`var(--color-border-input)`,d=s&&!r?`0 0 0 2px rgba(0,83,165,0.12)`:`none`;return(0,f.jsxs)(`div`,{style:{position:`relative`,border:`1px solid ${u}`,borderRadius:6,background:r?`var(--color-surface-soft)`:`#fff`,transition:`border-color 0.2s, box-shadow 0.2s`,boxShadow:d,minHeight:34,cursor:r?`not-allowed`:`text`},onClick:()=>!r&&o.current?.focus(),children:[(0,f.jsx)(`div`,{"aria-hidden":!0,style:{...$m,visibility:`hidden`,minHeight:22,pointerEvents:`none`,userSelect:`none`},dangerouslySetInnerHTML:{__html:Qm(e,n)+`​`}}),(0,f.jsx)(`div`,{"aria-hidden":!0,style:{...$m,position:`absolute`,inset:0,pointerEvents:`none`,userSelect:`none`,overflow:`hidden`},dangerouslySetInnerHTML:{__html:Qm(e,n)+`​`}}),(0,f.jsx)(`textarea`,{ref:o,value:e,rows:1,spellCheck:!1,autoCorrect:`off`,autoCapitalize:`off`,disabled:r,onChange:e=>t?.(e.target.value),onFocus:()=>c(!0),onBlur:()=>c(!1),style:{...$m,position:`absolute`,inset:0,width:`100%`,height:`100%`,background:`transparent`,color:`transparent`,caretColor:`#333`,border:`none`,outline:`none`,resize:`none`,overflow:`hidden`,cursor:r?`not-allowed`:`text`}})]})}function th({moduleName:e,recordId:t,cancelPath:n,onSuccess:r,fieldNameMap:i={},onFileUpload:a=null}){let o=(0,p.useNavigate)(),[s,c]=(0,l.useState)([]),[d,f]=(0,l.useState)({}),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(``),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(``);(0,l.useEffect)(()=>{if(!e||!t)return;let n=!1;async function r(){try{g(!0),v(``);let[r,i]=await Promise.all([mn({module:e,id:t}),Yr(e,t)]);if(n)return;c(Array.isArray(r)?r:[]),f(i??{})}catch(e){n||v(e?.message||`Failed to load record`)}finally{n||g(!1)}}return r(),()=>{n=!0}},[e,t]);function C(e,t){let n={...d},r=t.flatMap(e=>e.fields??[]);return Object.entries(e).forEach(([e,t])=>{if(t!==void 0&&r.find(t=>t.field===e)?.type!==`file`){if(m.default.isDayjs(t)){applyDotValue(n,e,t.format(`MM-DD-YYYY`));return}applyDotValue(n,e,t)}}),Object.keys(n).forEach(e=>{e.includes(`.`)&&delete n[e]}),Object.entries(i).forEach(([e,t])=>{n[e]!==void 0&&(n[t]=n[e],delete n[e])}),Object.keys(n).forEach(e=>{let t=n[e];if(typeof t==`string`&&t!==``){let r=/(date|time|Date|Time|At|at)$/.test(e),i=/ago|month|year|day|week|hour|minute/i.test(t),a=/^\d{4}-\d{2}-\d{2}/.test(t);r&&(i||!a)&&delete n[e]}}),Object.keys(n).forEach(e=>{let t=n[e];Array.isArray(t)&&t[0]?.originFileObj&&delete n[e]}),n}async function w(i,s){try{if(b(!0),S(``),a){let e=s.flatMap(e=>e.fields??[]).filter(e=>e.type===`file`);for(let n of e){let e=i[n.field];if(!Array.isArray(e))continue;let r=e.filter(e=>e.originFileObj instanceof File);await Promise.all(r.map(e=>a(n.field,e.originFileObj,t)))}}await Xr(e,t,C(i,s)),u.message.success(`${e} updated successfully`),r?r():o(n||-1)}catch(e){S(e?.message||`Failed to save changes`),u.message.error(e?.message||`Failed to save changes`)}finally{b(!1)}}return{formGroups:s,rawRecord:d,loading:h,error:_,submitting:y,submitError:x,submit:w}}var nh=`data:image/svg+xml,%3csvg%20width='380'%20height='130'%20viewBox='0%200%20380%20130'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_30_1933)'%20filter='url(%23filter0_d_30_1933)'%3e%3cpath%20d='M13.5623%2060V34.296H19.2143V44.16H29.6183V34.296H35.2703V60H29.6183V48.912H19.2143V60H13.5623ZM39.8859%2060V34.296H45.5379V60H39.8859ZM50.1431%2060V34.296H64.0031C66.2591%2034.296%2068.0951%2034.992%2069.5111%2036.384C70.8551%2037.728%2071.5271%2039.396%2071.5271%2041.388C71.5271%2044.58%2070.1711%2046.728%2067.4591%2047.832V47.904C69.7151%2048.48%2070.9631%2050.484%2071.2031%2053.916C71.2751%2054.948%2071.3471%2055.98%2071.4191%2057.012C71.5631%2058.404%2071.8511%2059.4%2072.2831%2060H66.6311C66.3671%2059.352%2066.1631%2058.38%2066.0191%2057.084C65.9231%2056.004%2065.8271%2054.924%2065.7311%2053.844C65.5391%2052.452%2065.1191%2051.456%2064.4711%2050.856C63.8471%2050.256%2062.8391%2049.956%2061.4471%2049.956H55.7951V60H50.1431ZM55.7951%2038.688V45.924H61.9871C64.5791%2045.924%2065.8751%2044.7%2065.8751%2042.252C65.8751%2039.876%2064.5791%2038.688%2061.9871%2038.688H55.7951ZM75.7635%2060V34.296H94.9875V39.048H81.4155V44.556H93.8715V48.948H81.4155V55.248H95.2755V60H75.7635ZM118.336%2060V10.02H125.336L142.626%2053.84L159.846%2010.02H166.846V60H162.086V16.81H161.946L144.866%2060H140.386L123.236%2016.81H123.096V60H118.336ZM190.506%2022.83C195.826%2022.83%20200.05%2024.72%20203.176%2028.5C206.116%2032.0467%20207.586%2036.5267%20207.586%2041.94C207.586%2047.3533%20206.116%2051.8333%20203.176%2055.38C200.05%2059.16%20195.826%2061.05%20190.506%2061.05C185.186%2061.05%20180.963%2059.16%20177.836%2055.38C174.896%2051.8333%20173.426%2047.3533%20173.426%2041.94C173.426%2036.5267%20174.896%2032.0467%20177.836%2028.5C180.963%2024.72%20185.186%2022.83%20190.506%2022.83ZM190.506%2026.54C186.493%2026.54%20183.32%2028.15%20180.986%2031.37C178.886%2034.2633%20177.836%2037.7867%20177.836%2041.94C177.836%2046.0933%20178.886%2049.6167%20180.986%2052.51C183.32%2055.73%20186.493%2057.34%20190.506%2057.34C194.52%2057.34%20197.693%2055.73%20200.026%2052.51C202.126%2049.6167%20203.176%2046.0933%20203.176%2041.94C203.176%2037.7867%20202.126%2034.2633%20200.026%2031.37C197.693%2028.15%20194.52%2026.54%20190.506%2026.54ZM213.443%2060V23.88H217.503V32.35H217.643C218.763%2029.41%20220.513%2027.1467%20222.893%2025.56C225.273%2023.9733%20228.073%2023.25%20231.293%2023.39V27.8C227.373%2027.6133%20224.153%2028.78%20221.633%2031.3C219.113%2033.7733%20217.853%2036.9233%20217.853%2040.75V60H213.443ZM265.203%2043.13H237.413C237.46%2046.8633%20238.393%2050.0367%20240.213%2052.65C242.406%2055.7767%20245.44%2057.34%20249.313%2057.34C255.286%2057.34%20259.066%2054.26%20260.653%2048.1H265.063C263.056%2056.7333%20257.806%2061.05%20249.313%2061.05C243.9%2061.05%20239.746%2059.16%20236.853%2055.38C234.286%2051.9733%20233.003%2047.4933%20233.003%2041.94C233.003%2036.6667%20234.286%2032.28%20236.853%2028.78C239.793%2024.8133%20243.946%2022.83%20249.313%2022.83C254.773%2022.83%20258.926%2024.9533%20261.773%2029.2C264.246%2032.8867%20265.39%2037.53%20265.203%2043.13ZM237.413%2039.42H260.793C260.7%2035.8733%20259.65%2032.8867%20257.643%2030.46C255.496%2027.8467%20252.72%2026.54%20249.313%2026.54C245.906%2026.54%20243.106%2027.87%20240.913%2030.53C238.953%2032.8633%20237.786%2035.8267%20237.413%2039.42Z'%20fill='white'/%3e%3cpath%20d='M124.417%20111V90.048H116.713V85.296H137.773V90.048H130.069V111H124.417ZM141.637%20111V85.296H147.289V111H141.637ZM153.154%20111V85.296H167.014C169.27%2085.296%20171.106%2085.992%20172.522%2087.384C173.866%2088.728%20174.538%2090.396%20174.538%2092.388C174.538%2095.58%20173.182%2097.728%20170.47%2098.832V98.904C172.726%2099.48%20173.974%20101.484%20174.214%20104.916C174.286%20105.948%20174.358%20106.98%20174.43%20108.012C174.574%20109.404%20174.862%20110.4%20175.294%20111H169.642C169.378%20110.352%20169.174%20109.38%20169.03%20108.084C168.934%20107.004%20168.838%20105.924%20168.742%20104.844C168.55%20103.452%20168.13%20102.456%20167.482%20101.856C166.858%20101.256%20165.85%20100.956%20164.458%20100.956H158.806V111H153.154ZM158.806%2089.688V96.924H164.998C167.59%2096.924%20168.886%2095.7%20168.886%2093.252C168.886%2090.876%20167.59%2089.688%20164.998%2089.688H158.806ZM180.034%20111V85.296H199.258V90.048H185.686V95.556H198.142V99.948H185.686V106.248H199.546V111H180.034ZM226.246%20111V61.02H231.006V106.94H259.006V111H226.246ZM295.134%2094.13H267.344C267.391%2097.863%20268.324%20101.037%20270.144%20103.65C272.337%20106.777%20275.371%20108.34%20279.244%20108.34C285.217%20108.34%20288.997%20105.26%20290.584%2099.1H294.994C292.987%20107.733%20287.737%20112.05%20279.244%20112.05C273.831%20112.05%20269.677%20110.16%20266.784%20106.38C264.217%20102.973%20262.934%2098.493%20262.934%2092.94C262.934%2087.667%20264.217%2083.28%20266.784%2079.78C269.724%2075.813%20273.877%2073.83%20279.244%2073.83C284.704%2073.83%20288.857%2075.953%20291.704%2080.2C294.177%2083.887%20295.321%2088.53%20295.134%2094.13ZM267.344%2090.42H290.724C290.631%2086.873%20289.581%2083.887%20287.574%2081.46C285.427%2078.847%20282.651%2077.54%20279.244%2077.54C275.837%2077.54%20273.037%2078.87%20270.844%2081.53C268.884%2083.863%20267.717%2086.827%20267.344%2090.42ZM328.843%2085.45H324.433C324.34%2082.837%20323.36%2080.83%20321.493%2079.43C319.813%2078.17%20317.643%2077.54%20314.983%2077.54C312.696%2077.54%20310.783%2077.983%20309.243%2078.87C307.376%2079.99%20306.443%2081.623%20306.443%2083.77C306.443%2086.71%20308.94%2088.74%20313.933%2089.86L319.813%2091.19C326.673%2092.73%20330.103%2096.067%20330.103%20101.2C330.103%20104.793%20328.54%20107.57%20325.413%20109.53C322.706%20111.21%20319.44%20112.05%20315.613%20112.05C306.373%20112.05%20301.426%20107.803%20300.773%2099.31H305.183C305.37%20102.203%20306.42%20104.443%20308.333%20106.03C310.293%20107.57%20312.79%20108.34%20315.823%20108.34C318.296%20108.34%20320.466%20107.827%20322.333%20106.8C324.573%20105.54%20325.693%20103.767%20325.693%20101.48C325.693%2098.26%20323.056%2096.067%20317.783%2094.9L312.113%2093.64C308.846%2092.893%20306.443%2091.89%20304.903%2090.63C302.99%2089.043%20302.033%2086.827%20302.033%2083.98C302.033%2080.573%20303.503%2077.96%20306.443%2076.14C308.916%2074.6%20311.973%2073.83%20315.613%2073.83C319.393%2073.83%20322.473%2074.787%20324.853%2076.7C327.373%2078.753%20328.703%2081.67%20328.843%2085.45ZM364.294%2085.45H359.884C359.791%2082.837%20358.811%2080.83%20356.944%2079.43C355.264%2078.17%20353.094%2077.54%20350.434%2077.54C348.147%2077.54%20346.234%2077.983%20344.694%2078.87C342.827%2079.99%20341.894%2081.623%20341.894%2083.77C341.894%2086.71%20344.391%2088.74%20349.384%2089.86L355.264%2091.19C362.124%2092.73%20365.554%2096.067%20365.554%20101.2C365.554%20104.793%20363.991%20107.57%20360.864%20109.53C358.157%20111.21%20354.891%20112.05%20351.064%20112.05C341.824%20112.05%20336.877%20107.803%20336.224%2099.31H340.634C340.821%20102.203%20341.871%20104.443%20343.784%20106.03C345.744%20107.57%20348.241%20108.34%20351.274%20108.34C353.747%20108.34%20355.917%20107.827%20357.784%20106.8C360.024%20105.54%20361.144%20103.767%20361.144%20101.48C361.144%2098.26%20358.507%2096.067%20353.234%2094.9L347.564%2093.64C344.297%2092.893%20341.894%2091.89%20340.354%2090.63C338.441%2089.043%20337.484%2086.827%20337.484%2083.98C337.484%2080.573%20338.954%2077.96%20341.894%2076.14C344.367%2074.6%20347.424%2073.83%20351.064%2073.83C354.844%2073.83%20357.924%2074.787%20360.304%2076.7C362.824%2078.753%20364.154%2081.67%20364.294%2085.45Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_30_1933'%20x='0'%20y='0'%20width='380'%20height='130'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='4'/%3e%3cfeGaussianBlur%20stdDeviation='7'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_30_1933'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_30_1933'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_30_1933'%3e%3crect%20width='352'%20height='102'%20fill='white'%20transform='translate(14%2010)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,rh=`data:image/svg+xml,%3csvg%20width='738'%20height='346'%20viewBox='0%200%20738%20346'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M166.531%20110.373V111.304L158.082%20116.188L158.071%20115.256L166.531%20110.373Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M162.346%20110.647V111.578L158.071%20114.043V113.123L162.346%20110.647Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M159.716%20109.501L159.727%20110.433L158.06%20111.387V110.455L159.716%20109.501Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M158.648%20121.324C158.485%20121.68%20158.4%20122.067%20158.399%20122.459V134.554C158.399%20135.508%20159.079%20135.894%20159.907%20135.406L177.916%20124.992C178.352%20124.709%20178.714%20124.326%20178.974%20123.877C179.234%20123.427%20179.385%20122.922%20179.413%20122.403V110.319C179.423%20110.026%20179.335%20109.739%20179.164%20109.501L168.957%20122.437L158.648%20121.324Z'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M159.894%20119.821C159.346%20120.197%20158.911%20120.715%20158.635%20121.32L168.921%20122.387L179.128%20109.452C179.006%20109.325%20178.848%20109.238%20178.675%20109.206C178.502%20109.173%20178.323%20109.196%20178.164%20109.271L159.894%20119.821Z'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M182.85%20117.448L217.621%2097.3806V115.551'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M368.923%20155.802C382.01%20163.366%20382.078%20175.642%20369.07%20183.206L307.977%20218.741C294.969%20226.315%20273.818%20226.315%20260.72%20218.741L199.264%20183.206C186.176%20175.642%20186.108%20163.366%20199.116%20155.802L260.175%20120.268C273.183%20112.693%20294.334%20112.693%20307.421%20120.268L368.923%20155.802Z'%20fill='%2379AEF5'/%3e%3cpath%20d='M369.066%20150.158L307.973%20185.693C294.965%20193.268%20273.814%20193.268%20260.715%20185.693L199.259%20150.158C192.67%20146.354%20189.381%20141.357%20189.393%20136.36V143.435C189.393%20148.421%20192.67%20153.429%20199.259%20157.234L260.738%20192.78C273.825%20200.343%20294.987%20200.343%20307.995%20192.78L369.054%20157.245C375.507%20153.486%20378.751%20148.568%20378.762%20143.617V136.542C378.762%20141.482%20375.53%20146.399%20369.066%20150.158Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M368.923%20122.754C382.01%20130.317%20382.078%20142.594%20369.07%20150.157L307.977%20185.692C294.969%20193.267%20273.818%20193.267%20260.72%20185.692L199.264%20150.157C186.176%20142.594%20186.108%20130.317%20199.116%20122.754L260.175%2087.2192C273.183%2079.6444%20294.334%2079.6444%20307.421%2087.2192L368.923%20122.754Z'%20fill='white'/%3e%3cpath%20d='M179.53%20276.419C192.617%20283.983%20192.685%20296.259%20179.677%20303.834L118.584%20339.358C105.576%20346.932%2084.4257%20346.932%2071.3384%20339.358L9.87097%20303.834C-3.21637%20296.259%20-3.28442%20283.994%209.72354%20276.419L70.7827%20240.885C83.7906%20233.321%20104.941%20233.321%20118.04%20240.885L179.53%20276.419Z'%20fill='%2379AEF5'/%3e%3cpath%20d='M179.673%20270.775L118.58%20306.344C105.572%20313.919%2084.4213%20313.919%2071.334%20306.344L9.86657%20270.821C3.27754%20267.005%20-0.0113116%20262.008%202.9229e-05%20257.011V264.086C2.9229e-05%20269.083%203.27754%20274.08%209.85523%20277.884L71.3226%20313.419C84.41%20320.994%20105.572%20320.994%20118.58%20313.419L179.639%20277.884C186.092%20274.125%20189.336%20269.208%20189.347%20264.256V257.181C189.381%20262.053%20186.137%20267.016%20179.673%20270.775Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M179.525%20243.37C192.613%20250.933%20192.681%20263.21%20179.673%20270.773L118.58%20306.342C105.572%20313.917%2084.4209%20313.917%2071.3336%20306.342L9.86621%20270.819C-3.18711%20263.187%20-3.25515%20250.933%209.70744%20243.37L70.7666%20207.835C83.7745%20200.26%20104.925%20200.26%20118.024%20207.835L179.525%20243.37Z'%20fill='white'/%3e%3cpath%20d='M561.71%20254.942C574.798%20262.506%20574.866%20274.782%20561.858%20282.357L500.765%20317.881C487.757%20325.456%20466.606%20325.456%20453.519%20317.881L392.051%20282.357C378.964%20274.782%20378.896%20262.517%20391.904%20254.942L452.963%20219.408C465.971%20211.844%20487.122%20211.844%20500.22%20219.408L561.71%20254.942Z'%20fill='%2379AEF5'/%3e%3cpath%20d='M561.861%20249.299L500.768%20284.834C487.76%20292.409%20466.609%20292.409%20453.522%20284.834L392.054%20249.311C385.465%20245.495%20382.176%20240.498%20382.188%20235.501V242.576C382.188%20247.573%20385.465%20252.57%20392.043%20256.375L453.51%20291.909C466.598%20299.484%20487.76%20299.484%20500.768%20291.909L561.849%20256.375C568.302%20252.616%20571.546%20247.698%20571.557%20242.747V235.672C571.557%20240.623%20568.325%20245.54%20561.861%20249.299Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M561.71%20221.895C574.798%20229.459%20574.866%20241.735%20561.858%20249.299L500.765%20284.833C487.757%20292.408%20466.606%20292.408%20453.519%20284.833L392.051%20249.31C378.964%20241.735%20378.896%20229.459%20391.904%20221.895L452.963%20186.36C465.971%20178.785%20487.122%20178.785%20500.22%20186.36L561.71%20221.895Z'%20fill='white'/%3e%3cpath%20opacity='0.43'%20d='M499.163%20269.382L514.995%20269.268L547.963%20250.666L529.681%20241.66L499.163%20269.382Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M727.582%20144.647C740.669%20152.21%20740.749%20164.487%20727.741%20172.05L666.636%20207.539C653.628%20215.114%20632.478%20215.114%20619.39%20207.539L557.923%20172.005C544.836%20164.441%20544.768%20152.165%20557.775%20144.601L618.835%20109.066C631.843%20101.492%20652.993%20101.492%20666.092%20109.066L727.582%20144.647Z'%20fill='%2379AEF5'/%3e%3cpath%20d='M727.709%20139.004L666.639%20174.538C653.631%20182.113%20632.48%20182.113%20619.393%20174.538L557.925%20139.004C551.336%20135.199%20548.048%20130.202%20548.059%20125.205V132.28C548.059%20137.266%20551.336%20142.263%20557.925%20146.079L619.382%20181.614C632.469%20189.177%20653.631%20189.177%20666.639%20181.614L727.698%20146.079C734.162%20142.32%20737.394%20137.391%20737.406%20132.451V125.387C737.406%20130.316%20734.162%20135.245%20727.709%20139.004Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M727.585%20111.591C740.673%20119.166%20740.752%20131.443%20727.744%20139.006L666.674%20174.541C653.666%20182.116%20632.515%20182.116%20619.428%20174.541L557.96%20139.006C544.873%20131.443%20544.805%20119.166%20557.813%20111.603L618.872%2076.0681C631.88%2068.4933%20653.031%2068.4933%20666.129%2076.0681L727.585%20111.591Z'%20fill='white'/%3e%3cpath%20d='M188.892%20167.791L116.878%20126.158C114.281%20124.659%20111.922%20124.511%20110.209%20125.511L106.002%20128.043C107.703%20127.055%20110.062%20127.191%20112.67%20128.702L184.673%20170.335C189.845%20173.322%20194.018%20180.556%20194.007%20186.507L193.882%20228.924C193.882%20231.876%20192.839%20233.955%20191.149%20234.931L195.379%20232.467C197.058%20231.49%20198.101%20229.412%20198.112%20226.459L198.226%20184.042C198.248%20178.069%20194.075%20170.823%20188.892%20167.791Z'%20fill='%23C8F3FF'/%3e%3cpath%20d='M184.677%20170.305C189.848%20173.292%20194.022%20180.526%20194.01%20186.477L193.886%20228.894C193.886%20234.833%20189.667%20237.229%20184.495%20234.242L112.492%20192.609C107.321%20189.622%20103.136%20182.388%20103.159%20176.437L103.272%20134.021C103.272%20128.07%20107.502%20125.685%20112.674%20128.672L184.677%20170.305Z'%20fill='%235C6BC0'/%3e%3cpath%20d='M114.142%20165.041L121.426%20150.951L123.13%20151.834L119.886%20158.109L127.389%20161.998L130.632%20155.723L132.336%20156.606L125.053%20170.697L123.349%20169.813L126.607%20163.511L119.104%20159.622L115.846%20165.925L114.142%20165.041Z'%20fill='white'/%3e%3cpath%20d='M137.451%20159.257L130.168%20173.348L128.464%20172.465L135.747%20158.374L137.451%20159.257Z'%20fill='white'/%3e%3cpath%20d='M133.585%20175.119L140.868%20161.028L145.622%20163.493C146.722%20164.062%20147.527%20164.718%20148.038%20165.46C148.551%20166.197%20148.809%20166.979%20148.811%20167.806C148.813%20168.633%20148.6%20169.462%20148.171%20170.292C147.742%20171.122%20147.192%20171.77%20146.521%20172.237C145.85%20172.703%20145.069%20172.938%20144.179%20172.942C143.291%20172.941%20142.302%20172.658%20141.212%20172.093L137.364%20170.099L138.161%20168.558L141.953%20170.524C142.704%20170.913%20143.366%20171.116%20143.938%20171.134C144.514%20171.153%20145.01%20171.015%20145.424%20170.718C145.846%20170.419%20146.203%20169.987%20146.494%20169.423C146.786%20168.859%20146.936%20168.311%20146.943%20167.78C146.95%20167.249%20146.782%20166.749%20146.438%20166.279C146.096%20165.806%20145.545%20165.372%20144.785%20164.978L141.789%20163.425L135.288%20176.002L133.585%20175.119ZM143.48%20172.222L143.671%20180.347L141.692%20179.321L141.556%20171.225L143.48%20172.222Z'%20fill='white'/%3e%3cpath%20d='M154.947%20168.326L147.664%20182.417L145.96%20181.533L153.243%20167.443L154.947%20168.326Z'%20fill='white'/%3e%3cpath%20d='M169.522%20175.88L162.238%20189.971L160.589%20189.116L158.64%20174.079L158.503%20174.007L152.784%20185.071L151.081%20184.187L158.364%20170.097L160.013%20170.952L161.975%20186.031L162.113%20186.102L167.845%20175.011L169.522%20175.88Z'%20fill='white'/%3e%3cpath%20d='M180.274%20187.036C180.362%20186.495%20180.378%20185.977%20180.32%20185.481C180.269%20184.984%20180.142%20184.517%20179.938%20184.08C179.739%20183.645%20179.462%20183.248%20179.107%20182.89C178.752%20182.531%20178.321%20182.221%20177.812%20181.957C176.978%20181.525%20176.109%20181.348%20175.204%20181.425C174.298%20181.502%20173.427%20181.856%20172.59%20182.487C171.753%20183.117%20171.02%20184.042%20170.389%20185.263C169.758%20186.483%20169.43%20187.618%20169.404%20188.669C169.377%20189.719%20169.601%20190.641%20170.074%20191.433C170.548%20192.225%20171.219%20192.846%20172.09%20193.297C172.896%20193.715%20173.695%20193.911%20174.486%20193.885C175.285%20193.857%20176.02%20193.616%20176.69%20193.161C177.368%20192.704%20177.93%20192.044%20178.375%20191.182L178.841%20191.562L174.608%20189.369L175.391%20187.855L180.75%20190.633L179.967%20192.146C179.368%20193.307%20178.599%20194.188%20177.661%20194.789C176.727%20195.393%20175.705%20195.707%20174.596%20195.73C173.493%20195.752%20172.382%20195.473%20171.265%20194.894C170.019%20194.248%20169.076%20193.387%20168.436%20192.311C167.8%20191.237%20167.499%20190.022%20167.532%20188.667C167.569%20187.314%20167.972%20185.894%20168.74%20184.408C169.316%20183.293%20169.983%20182.368%20170.741%20181.633C171.505%20180.895%20172.325%20180.354%20173.199%20180.011C174.074%20179.667%20174.973%20179.523%20175.897%20179.577C176.822%20179.632%20177.735%20179.893%20178.637%20180.361C179.379%20180.745%20180.013%20181.216%20180.538%20181.773C181.07%20182.328%20181.482%20182.94%20181.775%20183.61C182.075%20184.277%20182.249%20184.981%20182.296%20185.72C182.346%20186.456%20182.258%20187.198%20182.033%20187.948L180.274%20187.036Z'%20fill='white'/%3e%3cpath%20d='M291.119%20297.896C292.922%20298.941%20292.934%20300.633%20291.119%20301.678L279.619%20308.39C278.614%20308.905%20277.5%20309.174%20276.37%20309.174C275.24%20309.174%20274.127%20308.905%20273.121%20308.39L261.474%20301.678C259.671%20300.633%20259.659%20298.941%20261.474%20297.896L273.019%20291.184C274.025%20290.669%20275.138%20290.4%20276.268%20290.4C277.398%20290.4%20278.512%20290.669%20279.517%20291.184L291.119%20297.896Z'%20fill='white'/%3e%3cg%20opacity='0.29'%3e%3cpath%20d='M266.168%20283.475C267.971%20284.519%20267.982%20286.2%20266.168%20287.245L254.668%20293.968C253.662%20294.483%20252.549%20294.752%20251.419%20294.752C250.289%20294.752%20249.176%20294.483%20248.17%20293.968L236.523%20287.245C234.72%20286.2%20234.708%20284.519%20236.523%20283.475L248.045%20276.82C249.051%20276.304%20250.165%20276.036%20251.294%20276.036C252.424%20276.036%20253.538%20276.304%20254.543%20276.82L266.168%20283.475Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M265.479%20260.52C267.282%20261.565%20267.282%20263.257%20265.479%20264.29L253.934%20271.013C252.926%20271.529%20251.811%20271.797%20250.679%20271.797C249.548%20271.797%20248.432%20271.529%20247.424%20271.013L235.834%20264.324C234.031%20263.291%20234.019%20261.599%20235.834%20260.554L247.379%20253.842C248.385%20253.327%20249.498%20253.058%20250.628%20253.058C251.758%20253.058%20252.871%20253.327%20253.877%20253.842L265.479%20260.52Z'%20fill='%2358AFFB'/%3e%3cpath%20d='M330.119%20297.896C331.922%20298.94%20331.933%20300.633%20330.119%20301.677L318.574%20308.389C317.568%20308.904%20316.454%20309.173%20315.325%20309.173C314.195%20309.173%20313.081%20308.904%20312.075%20308.389L300.451%20301.666C298.648%20300.632%20298.637%20298.94%20300.451%20297.896L311.996%20291.172C313.003%20290.662%20314.116%20290.397%20315.245%20290.397C316.374%20290.397%20317.487%20290.662%20318.494%20291.172L330.119%20297.896Z'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M266.328%20312.022C268.131%20313.067%20268.142%20314.747%20266.328%20315.792L254.783%20322.504C253.777%20323.019%20252.663%20323.288%20251.534%20323.288C250.404%20323.288%20249.29%20323.019%20248.284%20322.504L236.66%20315.792C234.857%20314.747%20234.857%20313.055%20236.66%20312.022L248.205%20305.299C249.212%20304.789%20250.325%20304.523%20251.454%20304.523C252.583%20304.523%20253.696%20304.789%20254.703%20305.299L266.328%20312.022Z'%20fill='%2358AFFB'/%3e%3cpath%20d='M473.363%20111.794C475.177%20112.839%20475.177%20114.52%20473.363%20115.565L461.818%20122.288C460.811%20122.8%20459.698%20123.068%20458.569%20123.068C457.439%20123.068%20456.326%20122.8%20455.319%20122.288L443.718%20115.553C441.926%20114.508%20441.915%20112.828%20443.718%20111.783L455.263%20105.06C456.271%20104.547%20457.386%20104.28%20458.518%20104.28C459.649%20104.28%20460.764%20104.547%20461.772%20105.06L473.363%20111.794Z'%20fill='white'/%3e%3cg%20opacity='0.29'%3e%3cpath%20d='M448.416%2097.3849C450.219%2098.4184%20450.23%20100.111%20448.416%20101.155L436.871%20107.878C435.863%20108.388%20434.751%20108.654%20433.622%20108.654C432.493%20108.654%20431.38%20108.388%20430.373%20107.878L418.748%20101.155C416.945%20100.111%20416.945%2098.4184%20418.748%2097.3849L430.293%2090.6618C431.301%2090.1464%20432.416%2089.8777%20433.548%2089.8777C434.68%2089.8777%20435.795%2090.1464%20436.803%2090.6618L448.416%2097.3849Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M447.727%2074.4206C449.53%2075.4654%20449.542%2077.1462%20447.727%2078.191L436.205%2084.8913C435.199%2085.4067%20434.085%2085.6754%20432.956%2085.6754C431.826%2085.6754%20430.712%2085.4067%20429.706%2084.8913L418.082%2078.1796C416.279%2077.1348%20416.268%2075.454%20418.082%2074.4092L429.627%2067.6861C430.634%2067.1761%20431.747%2066.9104%20432.876%2066.9104C434.005%2066.9104%20435.118%2067.1761%20436.125%2067.6861L447.727%2074.4206Z'%20fill='%2358AFFB'/%3e%3cg%20opacity='0.26'%3e%3cpath%20d='M512.378%20111.797C514.17%20112.842%20514.182%20114.522%20512.378%20115.567L500.833%20122.29C499.825%20122.803%20498.71%20123.07%20497.579%20123.07C496.448%20123.07%20495.332%20122.803%20494.324%20122.29L482.722%20115.556C480.919%20114.511%20480.908%20112.83%20482.722%20111.785L494.267%20105.062C495.273%20104.547%20496.386%20104.278%20497.516%20104.278C498.646%20104.278%20499.76%20104.547%20500.765%20105.062L512.378%20111.797Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M448.598%20125.885C450.413%20126.929%20450.413%20128.622%20448.598%20129.655L437.053%20136.378C436.048%20136.893%20434.934%20137.162%20433.804%20137.162C432.674%20137.162%20431.561%20136.893%20430.555%20136.378L418.931%20129.655C417.139%20128.622%20417.128%20126.929%20418.931%20125.885L430.453%20119.173C431.459%20118.658%20432.572%20118.389%20433.702%20118.389C434.832%20118.389%20435.946%20118.658%20436.951%20119.173L448.598%20125.885Z'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M659.707%20269.092C661.511%20270.137%20661.522%20271.817%20659.707%20272.862L648.196%20279.574C647.189%20280.089%20646.073%20280.358%20644.942%20280.358C643.81%20280.358%20642.695%20280.089%20641.687%20279.574L630.051%20272.862C628.248%20271.817%20628.237%20270.125%20630.051%20269.092L641.596%20262.369C642.602%20261.853%20643.715%20261.585%20644.845%20261.585C645.975%20261.585%20647.089%20261.853%20648.094%20262.369L659.707%20269.092Z'%20fill='white'/%3e%3cg%20opacity='0.29'%3e%3cpath%20d='M634.761%20254.66C636.564%20255.705%20636.576%20257.397%20634.761%20258.442L623.25%20265.154C622.244%20265.669%20621.131%20265.938%20620.001%20265.938C618.871%20265.938%20617.758%20265.669%20616.752%20265.154L605.105%20258.442C603.302%20257.397%20603.29%20255.705%20605.105%20254.66L616.65%20247.949C617.655%20247.433%20618.769%20247.165%20619.899%20247.165C621.029%20247.165%20622.142%20247.433%20623.148%20247.949L634.761%20254.66Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M634.071%20231.709C635.874%20232.754%20635.874%20234.446%20634.071%20235.48L622.526%20242.203C621.518%20242.718%20620.403%20242.987%20619.271%20242.987C618.139%20242.987%20617.024%20242.718%20616.016%20242.203L604.426%20235.48C602.623%20234.446%20602.611%20232.754%20604.426%20231.709L615.971%20224.997C616.977%20224.482%20618.09%20224.213%20619.22%20224.213C620.35%20224.213%20621.463%20224.482%20622.469%20224.997L634.071%20231.709Z'%20fill='%2358AFFB'/%3e%3cg%20opacity='0.26'%3e%3cpath%20d='M698.708%20269.094C700.511%20270.127%20700.523%20271.819%20698.708%20272.864L687.163%20279.576C686.157%20280.091%20685.044%20280.36%20683.914%20280.36C682.784%20280.36%20681.671%20280.091%20680.665%20279.576L669.041%20272.853C667.237%20271.819%20667.215%20270.127%20669.041%20269.082L680.586%20262.371C681.591%20261.855%20682.705%20261.587%20683.835%20261.587C684.964%20261.587%20686.078%20261.855%20687.084%20262.371L698.708%20269.094Z'%20fill='white'/%3e%3c/g%3e%3cpath%20d='M634.916%20283.189C636.72%20284.234%20636.731%20285.914%20634.916%20286.959L623.371%20293.682C622.364%20294.192%20621.251%20294.458%20620.122%20294.458C618.993%20294.458%20617.881%20294.192%20616.873%20293.682L605.249%20286.959C603.446%20285.914%20603.446%20284.222%20605.249%20283.189L616.794%20276.466C617.801%20275.956%20618.914%20275.69%20620.043%20275.69C621.172%20275.69%20622.285%20275.956%20623.292%20276.466L634.916%20283.189Z'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M561.176%2037.9307L561.232%2058.3498L558.919%2059.6899L558.885%2050.1163L550.311%2055.0791L550.334%2064.6527L548.043%2065.9814L547.986%2045.5623L550.277%2044.2336L550.3%2052.7737L558.885%2047.8109L558.862%2039.2708L561.176%2037.9307Z'%20fill='white'/%3e%3cpath%20d='M567.436%2034.321L567.493%2054.7288L565.213%2056.0462L565.145%2035.6384L567.436%2034.321Z'%20fill='white'/%3e%3cpath%20d='M581.673%2040.9289C581.954%2042.5768%20582.418%2044.1881%20583.057%2045.7328L580.686%2047.1069C580.127%2045.7614%20579.728%2044.355%20579.496%2042.9163C578.951%2040.4065%20577.999%2039.8955%20575.923%2040.9971L573.769%2042.2463V51.0931L571.5%2052.4104V32.2752C572.892%2031.1793%20574.362%2030.1885%20575.901%2029.3111C578.35%2027.8916%20579.927%2027.4941%20581.027%2028.0051C581.934%2028.4026%20582.433%2029.5042%20582.433%2031.0714C582.362%2032.4286%20582.024%2033.7584%20581.438%2034.9843C580.852%2036.2102%20580.03%2037.308%20579.019%2038.2147V38.3283C580.426%2038.0671%20581.288%2039.0437%20581.673%2040.9289ZM576.105%2038.8961C577.26%2038.2922%20578.239%2037.3999%20578.948%2036.3056C579.658%2035.2113%20580.073%2033.9521%20580.153%2032.65C580.153%2030.0152%20578.486%2029.8335%20576.059%2031.1963C575.256%2031.6417%20574.496%2032.1626%20573.791%2032.7522V40.2021L576.139%2038.8507'%20fill='white'/%3e%3cpath%20d='M595.179%2018.2722L595.19%2020.4868L587.898%2024.7001L587.92%2031.1506L594.816%2027.1644V29.3449L587.932%2033.3311L587.943%2040.6901L595.632%2036.2497V38.4642L585.664%2044.222L585.596%2023.8142L595.179%2018.2722Z'%20fill='white'/%3e%3cpath%20d='M610.61%2011.7433C612.198%2012.5042%20613.128%2014.3326%20613.128%2017.6374C613.14%2020.9419%20612.266%2024.1891%20610.599%2027.0406C608.677%2030.172%20605.977%2032.7507%20602.762%2034.5246C601.141%2035.4559%20599.768%2036.16%20598.612%2036.6824V16.6039C600.166%2015.4264%20601.79%2014.3455%20603.477%2013.3673C606.709%2011.4594%20609.057%2010.9824%20610.61%2011.7433ZM603.205%2032.1852C605.54%2030.9088%20607.48%2029.0148%20608.814%2026.7098C610.148%2024.4048%20610.824%2021.7773%20610.769%2019.1137C610.769%2014.2758%20608.41%2012.5951%20603.568%2015.3888C602.626%2015.9243%20601.728%2016.5318%20600.88%2017.2058V33.3208C601.663%2032.9985%20602.421%2032.6189%20603.148%2032.1852'%20fill='white'/%3e%3cpath%20d='M58.2918%20176.574V178.152C58.2937%20178.364%2058.3509%20178.572%2058.4576%20178.755C58.5644%20178.938%2058.717%20179.09%2058.9004%20179.195C59.0838%20179.301%2059.2915%20179.357%2059.5031%20179.357C59.7146%20179.357%2059.9226%20179.302%2060.1064%20179.197L67.5573%20174.905C67.7404%20174.799%2067.8924%20174.646%2067.9979%20174.463C68.1034%20174.279%2068.1588%20174.071%2068.1584%20173.86V172.338C68.166%20172.128%2068.1192%20171.92%2068.0225%20171.733C67.9258%20171.547%2067.7825%20171.389%2067.6066%20171.274C67.4307%20171.16%2067.2281%20171.093%2067.0187%20171.081C66.8094%20171.068%2066.6003%20171.11%2066.4119%20171.202L58.961%20175.506C58.7626%20175.606%2058.5954%20175.758%2058.4774%20175.947C58.3594%20176.135%2058.2952%20176.352%2058.2918%20176.574Z'%20fill='%23F2F9FF'/%3e%3cpath%20d='M34.6559%20197.957V199.592C34.6569%20199.803%2034.7128%20200.01%2034.8182%20200.193C34.9235%20200.376%2035.0746%20200.528%2035.2566%20200.635C35.4387%20200.742%2035.6453%20200.799%2035.8561%20200.801C36.067%20200.804%2036.2748%20200.751%2036.459%20200.648L67.5443%20182.762C67.7274%20182.656%2067.8794%20182.503%2067.9849%20182.32C68.0904%20182.136%2068.1458%20181.928%2068.1454%20181.717V180.138C68.1478%20179.926%2068.094%20179.716%2067.9895%20179.531C67.8849%20179.347%2067.7334%20179.193%2067.5503%20179.085C67.3671%20178.978%2067.1589%20178.921%2066.9467%20178.921C66.7345%20178.92%2066.5259%20178.976%2066.3422%20179.082L35.2909%20196.912C35.1015%20197.013%2034.9427%20197.164%2034.831%20197.347C34.7193%20197.531%2034.6588%20197.742%2034.6559%20197.957Z'%20fill='%23F2F9FF'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M47.4966%20206.339V207.917C47.4962%20208.129%2047.5515%20208.336%2047.6568%20208.52C47.7622%20208.703%2047.9139%20208.855%2048.0967%20208.961C48.2795%20209.067%2048.487%20209.123%2048.6982%20209.123C48.9094%20209.123%2049.1169%20209.068%2049.2998%20208.962L67.5472%20198.457C67.7374%20198.359%2067.8958%20198.208%2068.0042%20198.023C68.1126%20197.838%2068.1665%20197.626%2068.1597%20197.412V195.822C68.1601%20195.611%2068.1048%20195.403%2067.9995%20195.22C67.8941%20195.036%2067.7424%20194.884%2067.5596%20194.778C67.3768%20194.672%2067.1693%20194.616%2066.9581%20194.616C66.7469%20194.616%2066.5394%20194.672%2066.3565%20194.778L48.0977%20205.271C47.9112%20205.379%2047.7571%20205.535%2047.6513%20205.722C47.5456%20205.91%2047.4922%20206.123%2047.4966%20206.339Z'%20fill='%23F2F9FF'/%3e%3c/g%3e%3cpath%20d='M39.5103%20203.054V204.633C39.5113%20204.844%2039.5672%20205.051%2039.6726%20205.234C39.7779%20205.417%2039.929%20205.569%2040.1111%20205.676C40.2931%20205.782%2040.4997%20205.84%2040.7105%20205.842C40.9214%20205.844%2041.1292%20205.791%2041.3135%20205.689L67.5448%20190.63C67.7288%20190.522%2067.8812%20190.368%2067.9867%20190.183C68.0923%20189.997%2068.1471%20189.787%2068.1459%20189.574V187.995C68.1449%20187.784%2068.089%20187.577%2067.9836%20187.394C67.8783%20187.211%2067.7271%20187.059%2067.5451%20186.952C67.3631%20186.846%2067.1565%20186.788%2066.9456%20186.786C66.7348%20186.784%2066.527%20186.836%2066.3427%20186.939L40.1113%20202.009C39.9282%20202.115%2039.7763%20202.267%2039.6707%20202.451C39.5652%20202.634%2039.5099%20202.842%2039.5103%20203.054Z'%20fill='%23F2F9FF'/%3e%3cpath%20d='M8.80978%20208.234V229.448L24.8004%20239.851'%20stroke='white'%20stroke-width='0.53'%20stroke-miterlimit='10'/%3e%3cpath%20d='M8.71457%20208.631C9.76055%20208.631%2010.6085%20207.782%2010.6085%20206.735C10.6085%20205.687%209.76055%20204.838%208.71457%20204.838C7.66858%20204.838%206.82065%20205.687%206.82065%20206.735C6.82065%20207.782%207.66858%20208.631%208.71457%20208.631Z'%20stroke='white'%20stroke-width='1.06'%20stroke-miterlimit='10'/%3e%3cpath%20d='M386.505%20197.436V218.638L402.484%20229.052'%20stroke='white'%20stroke-width='0.53'%20stroke-miterlimit='10'/%3e%3cpath%20d='M386.406%20197.821C387.452%20197.821%20388.3%20196.972%20388.3%20195.925C388.3%20194.877%20387.452%20194.028%20386.406%20194.028C385.36%20194.028%20384.512%20194.877%20384.512%20195.925C384.512%20196.972%20385.36%20197.821%20386.406%20197.821Z'%20stroke='white'%20stroke-width='1.06'%20stroke-miterlimit='10'/%3e%3cpath%20opacity='0.35'%20d='M249.201%20154.586C259.943%20154.586%20268.651%20149.044%20268.651%20142.208C268.651%20135.371%20259.943%20129.829%20249.201%20129.829C238.46%20129.829%20229.752%20135.371%20229.752%20142.208C229.752%20149.044%20238.46%20154.586%20249.201%20154.586Z'%20fill='%23A6D0F4'/%3e%3cpath%20opacity='0.35'%20d='M258.559%20155.143C258.559%20158.959%20263.424%20162.048%20269.412%20162.048C275.4%20162.048%20280.265%20158.959%20280.265%20155.143C280.265%20151.327%20275.411%20148.238%20269.412%20148.238C263.413%20148.238%20258.559%20151.327%20258.559%20155.143Z'%20fill='%23A6D0F4'/%3e%3cpath%20opacity='0.35'%20d='M302.642%20131.248C302.642%20135.064%20307.507%20138.153%20313.495%20138.153C319.483%20138.153%20324.348%20135.064%20324.348%20131.248C324.348%20127.432%20319.494%20124.332%20313.495%20124.332C307.496%20124.332%20302.642%20127.432%20302.642%20131.248Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M260.79%20140.663C260.564%20143.218%20258.171%20144.944%20256.005%20145.875C253.633%20146.854%20251.084%20147.329%20248.52%20147.272C245.889%20147.278%20243.29%20146.7%20240.91%20145.58C238.857%20144.569%20236.691%20142.741%20236.691%20140.242C236.594%20141.088%20236.671%20141.944%20236.916%20142.758C237.162%20143.573%20237.572%20144.328%20238.12%20144.978C239.93%20146.723%20242.229%20147.872%20244.709%20148.272C249.359%20149.225%20255.676%20148.771%20259.203%20145.183C259.806%20144.534%20260.263%20143.764%20260.543%20142.923C260.823%20142.083%20260.919%20141.192%20260.824%20140.311L260.79%20140.663Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M257.252%20135.994C261.981%20138.731%20262.015%20143.16%20257.32%20145.897C254.682%20147.231%20251.769%20147.926%20248.814%20147.926C245.859%20147.926%20242.946%20147.231%20240.308%20145.897C235.579%20143.16%20235.557%20138.731%20240.308%20135.994C242.936%20134.667%20245.837%20133.976%20248.78%20133.976C251.723%20133.976%20254.624%20134.667%20257.252%20135.994Z'%20fill='white'/%3e%3cpath%20d='M250.044%20132.339L250.021%20142.401L248.762%20143.139L248.774%20133.077L250.044%20132.339Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M248.775%20133.077L248.764%20143.139L247.493%20142.401L247.505%20132.339L248.775%20133.077Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M250.634%20130.51L248.786%20131.577L246.926%20130.51L248.774%20129.431L250.634%20130.51Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M236.786%2096.247C236.786%2096.247%20232.987%2098.5183%20231.978%20100.79C230.968%20103.061%20231.24%20118.96%20236.514%20126.069C241.787%20133.179%20251.631%20134.144%20253.911%20133.133C256.19%20132.122%20269.278%20125.558%20270.287%20122.276C271.296%20118.994%20266.261%20116.473%20263.483%20115.212C260.704%20113.952%20258.946%20112.18%20257.438%20107.638C255.93%20103.095%20255.17%2095.2703%20253.401%2094.0097C251.631%2092.7491%20247.379%2090.7163%20236.786%2096.247Z'%20fill='%2325437F'/%3e%3cpath%20d='M255.614%20130.875C257.462%20130.057%20266.512%20125.537%20270.357%20122.119C271.162%20118.916%20266.252%20116.44%20263.552%20115.203C260.853%20113.965%20259.016%20112.17%20257.508%20107.628C255.999%20103.085%20255.24%2095.2604%20253.47%2093.9998C251.701%2092.7392%20247.426%2090.7177%20236.833%2096.2711C235.702%2096.9583%20234.642%2097.7572%20233.669%2098.656C232.717%20101.302%20233.057%20116.827%20238.262%20123.811C243.468%20130.795%20253.346%20131.885%20255.614%20130.875Z'%20fill='%23254DA1'/%3e%3cpath%20d='M245.804%2084.3226C245.594%2085.0765%20245.562%2085.8687%20245.71%2086.6372C245.857%2087.4056%20246.181%2088.1294%20246.654%2088.7517C248.129%2090.512%20247.845%2091.023%20247.562%2091.6363C247.278%2092.2495%20245.532%2094.2369%20245.736%2096.9739C245.94%2099.7108%20253.595%2098.4502%20254.298%2096.5537C255.001%2094.6571%20252.2%2091.5%20252.03%2089.1038C251.86%2086.7075%20253.504%2083.6185%20251.474%2082.8463C249.444%2082.074%20246.791%2081.4835%20245.804%2084.3226Z'%20fill='%23BB543E'/%3e%3cpath%20d='M267.259%20149.509C267.259%20149.509%20266.556%20151.428%20266.987%20151.996C267.317%20152.802%20267.505%20153.659%20267.542%20154.529L268.245%20154.949L268.529%20153.541C268.678%20154.157%20268.965%20154.732%20269.368%20155.221C270.774%20156.172%20272.348%20156.842%20274.007%20157.197C275.821%20157.618%20276.388%20157.481%20276.524%20156.777C276.66%20156.073%20274.562%20153.541%20273.303%20152.7C272.045%20151.86%20267.259%20149.509%20267.259%20149.509Z'%20fill='%23254DA1'/%3e%3cpath%20d='M271.375%20149.326C271.766%20150.155%20272.221%20150.952%20272.736%20151.711C273.303%20152.415%20274.845%20153.675%20274.698%20154.38C274.55%20155.084%20273.155%20154.947%20271.477%20154.38C269.798%20153.812%20269.367%20152.279%20268.528%20151.847C268.063%20151.686%20267.675%20151.357%20267.441%20150.924C267.206%20150.491%20267.14%20149.986%20267.258%20149.508C267.405%20148.054%20271.375%20149.326%20271.375%20149.326Z'%20fill='%23FF9554'/%3e%3cpath%20d='M263.743%20126.295C263.373%20125.609%20263.284%20124.805%20263.496%20124.054C263.708%20123.304%20264.203%20122.665%20264.877%20122.275C267.327%20120.901%20269.119%20123.036%20269.55%20124.035C270.549%20126.061%20271.157%20128.257%20271.342%20130.508C271.342%20133.166%20271.557%20149.701%20271.557%20149.701C271.268%20149.956%20270.93%20150.149%20270.563%20150.269C270.197%20150.389%20269.81%20150.434%20269.427%20150.4C269.043%20150.366%20268.67%20150.254%20268.33%20150.071C267.991%20149.889%20267.692%20149.639%20267.452%20149.337C267.452%20149.337%20265.047%20129.486%20264.991%20128.532C264.768%20127.694%20264.339%20126.925%20263.743%20126.295Z'%20fill='%23FF9554'/%3e%3cpath%20d='M263.141%20151.574C263.141%20151.574%20262.438%20153.493%20262.857%20154.05C263.195%20154.854%20263.387%20155.711%20263.424%20156.582L264.127%20157.003L264.411%20155.594C264.559%20156.215%20264.846%20156.793%20265.25%20157.287C266.651%20158.235%20268.223%20158.902%20269.877%20159.251C271.703%20159.671%20272.27%20159.535%20272.406%20158.831C272.542%20158.127%20270.444%20155.594%20269.174%20154.754C267.904%20153.914%20263.141%20151.574%20263.141%20151.574Z'%20fill='%23254DA1'/%3e%3cpath%20d='M256.94%20131.145C256.94%20131.145%20255.25%20128.703%20257.496%20127.011C259.741%20125.319%20261.805%20127.204%20262.361%20128.147C263.62%20130.024%20264.509%20132.125%20264.981%20134.336C265.355%20136.959%20267.249%20151.371%20267.249%20151.371C266.997%20151.662%20266.688%20151.9%20266.341%20152.068C265.994%20152.236%20265.617%20152.332%20265.232%20152.351C264.847%20152.369%20264.462%20152.308%20264.102%20152.173C263.741%20152.038%20263.411%20151.831%20263.132%20151.564C263.132%20151.564%20258.596%20134.132%20258.46%20133.189C258.13%20132.393%20257.608%20131.69%20256.94%20131.145Z'%20fill='%23FF9554'/%3e%3cpath%20d='M267.256%20151.383C267.642%20152.219%20268.097%20153.02%20268.617%20153.779C269.173%20154.472%20270.727%20155.744%20270.579%20156.448C270.432%20157.152%20269.037%20157.005%20267.358%20156.448C265.68%20155.892%20265.249%20154.336%20264.41%20153.916C263.945%20153.754%20263.557%20153.425%20263.322%20152.992C263.087%20152.56%20263.022%20152.055%20263.14%20151.576C263.287%20150.123%20267.256%20151.383%20267.256%20151.383Z'%20fill='%23FF9554'/%3e%3cpath%20d='M267.077%20120.46C266.397%20119.813%20258.47%20113.055%20258.47%20113.055L245.36%20115.111C245.36%20115.111%20245.553%20121.119%20248.762%20125.048C250.535%20127.298%20252.616%20129.286%20254.943%20130.953C255.65%20131.527%20256.487%20131.917%20257.381%20132.089C257.822%20131.055%20258.63%20130.221%20259.649%20129.75C261.611%20128.614%20268.212%20124.071%20269.051%20124.264C269.89%20124.457%20270.037%20124.821%20270.037%20124.821C269.41%20123.153%20268.395%20121.658%20267.077%20120.46Z'%20fill='%2362759A'/%3e%3cpath%20d='M257.026%2092.5215C257.026%2092.5215%20258.942%2092.6237%20260.054%2095.2471C261.165%2097.8704%20262.583%20104.548%20262.98%20105.161C263.377%20105.775%20262.889%20107.58%20260.462%20108.091C259.046%20106.268%20257.825%20104.3%20256.822%20102.22C255.313%2098.9947%20254.667%2093.9751%20257.026%2092.5215Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M249.241%2091.1594C249.241%2091.1594%20243.979%2094.9298%20243.458%2096.179C242.831%2098.5159%20242.991%20100.994%20243.911%20103.231C245.045%20105.503%20244.603%20114.088%20244.989%20115.724C245.374%20117.359%20249.876%20117.927%20252.666%20117.393C255.456%20116.859%20258.813%20114.827%20258.711%20111.579C258.609%20108.331%20258.144%20106.536%20259.845%2098.8592C260.163%2097.4169%20258.813%2095.668%20258.133%2093.1809C257.985%2092.6698%20256.239%2092.1247%20256.239%2092.1247C256.239%2092.1247%20254.413%2090.9436%20249.241%2091.1594Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M247.341%2094.2955C247.341%2094.2955%20242.805%2093.3869%20240.865%20100.383C239.663%20105.198%20238.518%20109.298%20239.187%20110.183C239.856%20111.069%20241.829%20111.875%20243.088%20110.853C244.347%20109.831%20248.101%2098.2589%20248.01%2097.1119C247.919%2095.9649%20248.305%2095.1131%20247.341%2094.2955Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M259.453%20100.109C259.453%20100.109%20257.537%20104.754%20248.351%20102.937C246.536%20102.835%20244.812%20106.98%20245.924%20109.206C247.119%20111.81%20247.866%20114.597%20248.135%20117.451C249.637%20117.696%20251.169%20117.696%20252.672%20117.451C255.45%20116.906%20258.818%20114.884%20258.716%20111.636C258.363%20107.83%20258.65%20103.991%20259.567%20100.279L259.453%20100.109Z'%20fill='%23A9C9E6'/%3e%3cpath%20d='M249.114%2090.9548C248.966%2091.0754%20248.852%2091.2312%20248.781%2091.4078C248.709%2091.5845%20248.683%2091.7762%20248.705%2091.9655C249.335%2093.4506%20250.325%2094.7545%20251.586%2095.7586C252.391%2096.1561%20253.242%2093.7825%20253.242%2093.7825C253.242%2093.7825%20254.966%2094.498%20255.567%2093.987C256.168%2093.4759%20254.512%2091.5567%20254.058%2091.2046C252.449%2090.7577%20250.76%2090.6724%20249.114%2090.9548Z'%20fill='white'/%3e%3cpath%20d='M253.811%2090.4542C253.797%2090.5101%20253.797%2090.5687%20253.811%2090.6246C253.868%2091.0107%20254.061%2091.9987%20254.095%2092.4076C254.129%2092.8164%20253.675%2093.4865%20252.62%2093.4637C251.566%2093.441%20249.74%2092.9981%20249.139%2091.7262C249.165%2090.4746%20249.109%2089.2225%20248.969%2087.9785L253.811%2090.4542Z'%20fill='%23FF8654'/%3e%3cpath%20d='M255.328%2084.0166C254.829%2081.3592%20252.731%2079.8488%20250.349%2080.4052C249.573%2080.5081%20248.832%2080.7905%20248.185%2081.2301C247.537%2081.6697%20247.001%2082.2544%20246.618%2082.9378C245.484%2085.2091%20247.162%2087.117%20248.24%2088.3208C248.693%2088.8091%20249.033%2089.1952%20249.249%2089.4564L249.487%2089.729C250.104%2090.3499%20250.863%2090.81%20251.699%2091.0691C252.194%2091.2405%20252.726%2091.2773%20253.24%2091.1755C253.754%2091.0737%20254.232%2090.8371%20254.624%2090.4899C255.305%2089.7858%20255.804%2086.6854%20255.328%2084.0166Z'%20fill='%23FF9554'/%3e%3cpath%20d='M248.186%2087.036C248.186%2087.036%20247.403%2085.9685%20246.825%2086.2524C246.246%2086.5363%20247.607%2088.8985%20248.481%2088.853C249.354%2088.8076%20248.186%2087.036%20248.186%2087.036Z'%20fill='%23FF9554'/%3e%3cpath%20d='M257.244%20114.688L266.657%20123.683L259.353%20127.76L249.952%20118.765L257.244%20114.688Z'%20fill='white'/%3e%3cpath%20d='M258.933%20116.767C258.6%20117.311%20258.312%20117.881%20258.071%20118.471C257.912%20118.993%20257.425%20119.981%20257.629%20120.254C257.833%20120.526%20258.525%20120.083%20258.661%20119.765C258.759%20119.577%20258.908%20119.419%20259.092%20119.311L259.183%20120.254C259.183%20120.833%20259.455%20122.071%20259.92%20122.298C260.385%20122.525%20261.054%20121.628%20261.383%20121.094C261.678%20120.306%20261.725%20119.446%20261.519%20118.63C261.337%20118.266%20260.85%20117.437%20260.85%20117.437L258.933%20116.767Z'%20fill='%23FF9554'/%3e%3cpath%20d='M259.208%20105.559C259.255%20105.191%20259.413%20104.845%20259.661%20104.569C259.908%20104.292%20260.234%20104.098%20260.595%20104.012C260.956%20103.925%20261.335%20103.951%20261.68%20104.086C262.026%20104.22%20262.323%20104.457%20262.531%20104.764C262.966%20105.401%20263.277%20106.114%20263.45%20106.865C263.949%20109.137%20261.646%20117.086%20261.42%20117.79C261.193%20118.495%20259.809%20118.824%20258.732%20117.927C257.654%20117.03%20259.174%20108.047%20259.174%20106.945C259.159%20106.483%20259.17%20106.02%20259.208%20105.559Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M252.571%20117.199C253.201%20117.287%20253.823%20117.424%20254.431%20117.608C254.93%20117.812%20256.008%20118.062%20256.087%20118.392C256.166%20118.721%20255.384%20118.982%20255.055%20118.891C254.851%20118.833%20254.635%20118.833%20254.431%20118.891L255.1%20119.55C255.509%20119.97%20256.336%20120.924%20256.234%20121.413C256.132%20121.901%20254.998%20121.867%20254.374%20121.787C253.582%20121.52%20252.89%20121.016%20252.39%20120.345C252.22%20119.97%20251.891%20119.05%20251.891%20119.05L252.571%20117.199Z'%20fill='%23FF9554'/%3e%3cpath%20d='M241.843%20108.207C241.53%20108.011%20241.165%20107.915%20240.796%20107.93C240.427%20107.945%20240.071%20108.071%20239.775%20108.292C239.479%20108.512%20239.256%20108.817%20239.135%20109.167C239.015%20109.516%20239.002%20109.894%20239.099%20110.251C239.306%20110.995%20239.652%20111.692%20240.12%20112.306C241.526%20114.135%20250.927%20119.336%20251.63%20119.609C252.334%20119.881%20253.456%20119.052%20253.456%20117.644C253.456%20116.236%20243.771%20109.774%20242.932%20109.07C242.585%20108.763%20242.221%20108.475%20241.843%20108.207Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M252.752%2082.6185C252.752%2082.6185%20252.049%2082.3345%20251.698%2083.3226C251.346%2084.3106%20251.142%2085.5939%20249.872%2086.1276C248.602%2086.6614%20248.261%2086.8999%20247.354%2086.8318C246.869%2086.7941%20246.416%2086.572%20246.089%2086.2109C245.763%2085.8498%20245.586%2085.3771%20245.596%2084.8898C245.655%2083.7529%20246.063%2082.6621%20246.766%2081.7673C247.468%2080.8725%20248.431%2080.2176%20249.52%2079.8929C250.153%2079.6834%20250.823%2079.6063%20251.487%2079.6662C252.151%2079.726%20252.796%2079.9217%20253.382%2080.241C253.967%2080.5603%20254.481%2080.9965%20254.892%2081.5226C255.303%2082.0487%20255.601%2082.6536%20255.769%2083.2999C256.189%2085.0488%20255.497%2085.1964%20255.497%2085.1964C255.497%2085.1964%20255.417%2082.2891%20252.752%2082.6185Z'%20fill='%23BB543E'/%3e%3cpath%20opacity='0.35'%20d='M292.625%20129.105C303.367%20129.105%20312.075%20123.563%20312.075%20116.726C312.075%20109.89%20303.367%20104.347%20292.625%20104.347C281.884%20104.347%20273.176%20109.89%20273.176%20116.726C273.176%20123.563%20281.884%20129.105%20292.625%20129.105Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M304.215%20115.181C303.988%20117.725%20301.595%20119.451%20299.441%20120.382C297.068%20121.37%20294.513%20121.846%20291.944%20121.779C289.314%20121.784%20286.716%20121.206%20284.335%20120.087C282.293%20119.076%20280.116%20117.248%20280.116%20114.761C280.02%20115.604%20280.097%20116.458%20280.343%20117.271C280.588%20118.083%20280.998%20118.837%20281.545%20119.485C283.355%20121.23%20285.654%20122.379%20288.134%20122.778C292.784%20123.744%20299.1%20123.278%20302.627%20119.701C303.23%20119.052%20303.686%20118.281%20303.966%20117.441C304.245%20116.601%20304.342%20115.71%20304.249%20114.829C304.238%20114.942%20304.238%20115.056%20304.215%20115.181Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M300.688%20110.535C305.406%20113.272%20305.44%20117.701%20300.745%20120.438C298.102%20121.787%20295.177%20122.49%20292.211%20122.49C289.244%20122.49%20286.32%20121.787%20283.677%20120.438C278.947%20117.701%20278.936%20113.271%20283.677%20110.546C286.312%20109.205%20289.225%20108.506%20292.181%20108.504C295.137%20108.502%20298.051%20109.197%20300.688%20110.535Z'%20fill='white'/%3e%3cpath%20d='M293.463%20106.859L293.44%20116.909L292.181%20117.648L292.204%20107.586L293.463%20106.859Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M292.205%20107.586L292.183%20117.648L290.912%20116.909L290.935%20106.859L292.205%20107.586Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M294.053%20105.018L292.205%20106.097L290.345%20105.018L292.193%20103.951L294.053%20105.018Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M280.209%2070.7737C280.209%2070.7737%20276.41%2073.045%20275.401%2075.3163C274.392%2077.5876%20274.664%2093.4869%20279.937%20100.596C285.211%20107.705%20295.066%20108.671%20297.334%20107.66C299.602%20106.649%20312.712%20100.096%20313.722%2096.8143C314.731%2093.5323%20309.684%2090.9998%20306.917%2089.7392C304.15%2088.4786%20302.381%2086.7183%20300.872%2082.1643C299.364%2077.6103%20298.604%2069.797%20296.835%2068.5364C295.066%2067.2758%20290.802%2065.2203%20280.209%2070.7737Z'%20fill='%2325437F'/%3e%3cpath%20d='M299.036%20105.333C300.885%20104.515%20309.946%2099.9953%20313.78%2096.5769C314.596%2093.3744%20309.674%2090.8987%20306.975%2089.6608C304.276%2088.4229%20302.439%2086.6399%20300.93%2082.0859C299.422%2077.532%20298.662%2069.7186%20296.893%2068.458C295.124%2067.1975%20290.848%2065.176%20280.256%2070.7294C279.124%2071.4166%20278.064%2072.2155%20277.092%2073.1142C276.139%2075.7603%20276.479%2091.2848%20281.696%2098.2691C286.913%20105.253%20296.768%20106.389%20299.036%20105.333Z'%20fill='%23254DA1'/%3e%3cpath%20d='M303.153%2071.151C303.153%2071.151%20304.287%2071.5371%20305.115%2074.3422C305.943%2077.1473%20308.347%2082.2237%20307.508%2084.4723C306.669%2086.7209%20304.106%2085.4489%20303.437%2083.7682C302.768%2082.0874%20299.932%2074.2627%20300.488%2073.1157C301.044%2071.9687%20302.03%2070.7649%20303.153%2071.151Z'%20fill='%23113569'/%3e%3cpath%20d='M310.014%20128.657C310.183%20129.275%20310.419%20129.873%20310.717%20130.44C311.586%20131.532%20312.606%20132.496%20313.745%20133.302C314.505%20133.949%20315.435%20135.153%20315.344%20135.721C315.253%20136.288%20313.428%20136.425%20311.999%20136.118C310.57%20135.811%20309.311%20134.21%20308.891%20134.244C308.472%20134.278%20306.907%20133.972%20306.623%20133.427C306.339%20132.881%20306.838%20130.735%20306.838%20130.735V129.179L310.014%20128.657Z'%20fill='%23232839'/%3e%3cpath%20d='M317.044%20124.16C317.213%20124.775%20317.449%20125.369%20317.748%20125.932C318.613%20127.031%20319.633%20127.998%20320.776%20128.805C321.535%20129.452%20322.465%20130.645%20322.375%20131.224C322.284%20131.803%20320.458%20131.928%20319.029%20131.621C317.6%20131.315%20316.341%20129.714%20315.922%20129.748C315.502%20129.782%20313.937%20129.475%20313.654%20128.93C313.37%20128.385%20313.869%20126.238%20313.869%20126.238V124.683L317.044%20124.16Z'%20fill='%23232839'/%3e%3cpath%20d='M290.43%2093.2273C290.37%2095.1503%20290.892%2097.0465%20291.927%2098.6671C293.606%20101.109%20300.535%20107.287%20301.283%20107.855C302.032%20108.422%20302.225%20112.534%20302.973%20114.407C303.722%20116.281%20305.967%20128.467%20306.375%20129.409C306.375%20129.409%20306.75%20130.341%20309.369%20129.784C310.866%20129.591%20311.048%20129.035%20311.048%20129.035C311.048%20129.035%20310.118%20115.35%20309.369%20112.159C308.621%20108.968%20308.428%20105.413%20307.101%20104.107C305.774%20102.801%20299.423%2094.5447%20299.423%2094.5447L297.927%2092.103L290.43%2093.2273Z'%20fill='%23113C7A'/%3e%3cpath%20d='M302.03%2090.2268C302.03%2090.2268%20312.135%2095.9051%20313.541%2097.1203C314.897%2098.3056%20315.832%2099.8997%20316.206%20101.663C316.32%20102.276%20317.34%20124.013%20317.76%20125.001C317.896%20125.841%20315.231%20126.409%20313.961%20125.989C313.466%20125.646%20313.039%20125.215%20312.702%20124.717C312.702%20124.717%20310.173%20111.645%20310.173%20109.817C309.937%20107.359%20309.558%20104.917%20309.039%20102.503L297.392%2095.8938L296.541%2092.941L302.03%2090.2268Z'%20fill='%23113C7A'/%3e%3cpath%20d='M290.807%2095.1093C290.807%2095.1093%20291.782%2097.9144%20295.853%2097.4942L297.26%2097.2103L297.543%2094.939C298.96%2094.7497%20300.31%2094.2198%20301.479%2093.3945C302.034%2093.6784%20302.182%2095.0866%20302.737%2095.2229C303.293%2095.3592%20304.28%2093.3945%20303.996%2091.9863C303.713%2090.5781%20303.021%2091.1459%20303.021%2091.1459C303.021%2091.1459%20291.51%2094.0305%20290.807%2095.1093Z'%20fill='%23112C5C'/%3e%3cpath%20d='M295.1%2069.6954C295.1%2069.6954%20290.292%2073.1024%20289.815%2074.2381C289.244%2076.376%20289.391%2078.643%20290.235%2080.6886C291.222%2082.801%20290.859%2090.6143%20291.222%2092.1361C291.584%2093.6579%20295.69%2094.1462%20298.23%2093.6579C300.771%2093.1695%20303.901%2091.3184%20303.753%2088.343C303.606%2085.3675%20303.753%2079.8369%20303.889%2078.4968C304.024%2076.1613%20303.81%2073.8188%20303.254%2071.5466C303.118%2071.0696%20301.519%2070.5699%20301.519%2070.5699C301.519%2070.5699%20299.829%2069.491%20295.1%2069.6954Z'%20fill='white'/%3e%3cpath%20d='M299.272%2069.0491C299.265%2069.0981%20299.265%2069.1478%20299.272%2069.1968C299.329%2069.5488%20299.51%2070.4573%20299.533%2070.8321C299.556%2071.2069%20299.159%2071.8201%20298.183%2071.7974C297.564%2071.8184%20296.949%2071.684%20296.394%2071.4063C295.839%2071.1286%20295.363%2070.7165%20295.008%2070.2075C295.027%2069.0696%20294.974%2067.9317%20294.849%2066.8005L299.272%2069.0491Z'%20fill='%23E16B40'/%3e%3cpath%20d='M294.976%2069.4673C295.233%2070.1558%20295.7%2070.7458%20296.31%2071.1536C296.921%2071.5613%20297.645%2071.766%20298.378%2071.7386H298.56L297.233%2073.8736C296.292%2073.3206%20295.403%2072.6819%20294.579%2071.9657C294.19%2071.4984%20293.984%2070.9048%20294.001%2070.2963L294.976%2069.4673Z'%20fill='white'/%3e%3cpath%20d='M298.55%2071.7878L299.933%2073.1165C300.275%2072.7255%20300.494%2072.2428%20300.565%2071.7281C300.635%2071.2134%20300.554%2070.6893%20300.33%2070.2206L299.468%2069.8799C299.481%2070.2487%20299.405%2070.6152%20299.245%2070.9476C299.084%2071.2801%20298.846%2071.5684%20298.55%2071.7878Z'%20fill='white'/%3e%3cpath%20d='M301.33%2062.379C300.809%2059.6421%20298.642%2058.0862%20296.193%2058.6541C295.393%2058.7607%20294.63%2059.0523%20293.963%2059.5057C293.295%2059.959%20292.743%2060.5617%20292.348%2061.2661C291.214%2063.6055%20292.904%2065.5702%20294.015%2066.8195C294.48%2067.3191%20294.832%2067.7166%20295.059%2067.9551C295.136%2068.0513%20295.219%2068.1424%20295.308%2068.2277C295.945%2068.8588%20296.723%2069.3297%20297.576%2069.6018C298.089%2069.777%20298.638%2069.8147%20299.169%2069.7111C299.7%2069.6075%20300.195%2069.3662%20300.604%2069.0113C301.308%2068.3299%20301.841%2065.1273%20301.33%2062.379Z'%20fill='%23FF8654'/%3e%3cpath%20d='M293.988%2070.3425C293.988%2070.3425%20293.274%2071.0353%20294.215%2072.7615C295.501%2075.2189%20296.211%2077.9377%20296.291%2080.7111C296.381%2083.9932%20296.812%2094.339%20296.381%2096.5535C295.519%2097.3258%20291.369%2096.633%20290.155%2094.5548C289.634%2091.5339%20289.894%2082.3464%20289.293%2080.4499C288.788%2078.3751%20288.757%2076.2128%20289.203%2074.1243C290.498%2072.5233%20292.132%2071.2314%20293.988%2070.3425Z'%20fill='%23113C7A'/%3e%3cpath%20d='M300.676%2070.2751C301.189%2072.3546%20301.421%2074.4935%20301.368%2076.6348C301.368%2080.0418%20302.343%2094.1807%20302.502%2094.4647C302.661%2094.7486%20304.702%2092.9656%20304.77%2090.8873C304.838%2088.8091%20304.078%2076.0557%20303.965%2074.7837C303.894%2073.5356%20303.618%2072.3077%20303.148%2071.1496C302.356%2070.7742%20301.528%2070.4812%20300.676%2070.2751Z'%20fill='%23113C7A'/%3e%3cpath%20d='M299.67%2072.4777L299.046%2073.795L297.742%2072.7616L298.547%2071.7849L299.67%2072.4777Z'%20fill='%23113C7A'/%3e%3cpath%20d='M299.333%2072.9654C299.333%2072.9654%20300.569%2088.7851%20300.569%2089.4778L299.741%2090.9315L298.607%2089.7958L298.199%2072.8745L299.333%2072.9654Z'%20fill='%23113C7A'/%3e%3cpath%20d='M289.442%2073.5905C288.618%2074.4566%20288.039%2075.5266%20287.764%2076.6908C287.015%2079.0303%20286.539%2087.1843%20286.539%2088.3995C286.539%2089.6146%20286.539%2091.0228%20287.571%2091.6815C287.794%2091.8623%20288.054%2091.9901%20288.333%2092.0553C288.613%2092.1206%20288.903%2092.1215%20289.182%2092.0581C289.462%2091.9947%20289.723%2091.8685%20289.947%2091.6892C290.171%2091.5099%20290.351%2091.282%20290.474%2091.0228C291.132%2089.8077%20291.608%2082.8688%20292.062%2080.7224C292.516%2078.576%20293.287%2076.4069%20292.345%2075.0441C292.079%2074.5241%20291.654%2074.1028%20291.131%2073.8414C290.609%2073.58%20290.018%2073.4921%20289.442%2073.5905Z'%20fill='%23113C7A'/%3e%3cpath%20d='M292.814%2059.0649C293.137%2058.5521%20293.577%2058.1231%20294.097%2057.8132C294.617%2057.5033%20295.204%2057.3212%20295.808%2057.282C297.963%2057.1002%20298.53%2057.8498%20299.46%2057.9406C300.39%2058.0315%20301.24%2057.5659%20301.898%2058.5993C302.556%2059.6328%20301.15%2061.5975%20301.15%2061.5975C301.15%2061.5975%20300.401%2061.4157%20299.653%2063.2896C298.904%2065.1634%20296.182%2064.6864%20295.626%2064.5047L295.162%2065.436V66.2877L294.504%2066.1855C294.504%2066.1855%20294.787%2065.1634%20294.13%2064.7887C293.472%2064.4139%20293.29%2065.1634%20293.381%2065.7199C293.705%2066.6813%20294.371%2067.4898%20295.252%2067.9912L294.969%2068.559L294.787%2068.9338C294.254%2068.5023%20293.754%2068.0316%20293.29%2067.5256C292.814%2066.9691%20292.156%2067.4347%20291.226%2065.3678C290.296%2063.3009%20290.569%2061.711%20291.408%2060.8252L292.258%2059.8826L292.814%2059.0649Z'%20fill='%2396432A'/%3e%3cpath%20d='M302.164%2090.5122L311.577%2099.5066L304.274%20103.584L294.872%2094.5892L302.164%2090.5122Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M300.032%2097.3015C300.032%2097.3015%20300.497%2097.6309%20300.735%2097.7785L302.277%2098.7552C302.687%2099.1897%20303.034%2099.6789%20303.309%20100.209C303.571%20100.636%20303.73%20101.118%20303.774%20101.617C303.684%20101.856%20303.4%20101.708%20303.4%20101.708C303.124%20102.018%20302.737%20102.206%20302.323%20102.23C301.767%20102.174%20301.291%20101.481%20301.291%20101.481L300.497%20100.777C300.174%20100.417%20299.92%20100.002%20299.748%2099.5501L299.193%2099.1754C299.193%2099.1754%20298.796%2098.7552%20300.032%2097.3015Z'%20fill='%23FF8654'/%3e%3cpath%20d='M298.31%2098.8821C298.31%2098.8821%20298.899%2097.2127%20299.603%2096.7925L300.396%2097.349C299.896%2097.9305%20299.542%2098.6237%20299.364%2099.3704L298.31%2098.8821Z'%20fill='white'/%3e%3cpath%20d='M298.311%2098.8837C297.811%2098.837%20297.33%2098.6736%20296.904%2098.4068C295.66%2097.4896%20294.357%2096.655%20293.003%2095.9083C291.184%2095.0735%20289.483%2094.0004%20287.945%2092.7171C287.077%2091.8788%20286.572%2090.733%20286.539%2089.5259C286.914%2089.0409%20287.44%2088.695%20288.034%2088.5428C288.627%2088.3906%20289.255%2088.4408%20289.816%2088.6855C291.66%2089.5661%20293.365%2090.7141%20294.875%2092.0925C296.553%2093.5007%20299.411%2096.2944%20299.411%2096.2944L299.898%2096.8736C299.51%2097.0812%20299.168%2097.3668%20298.895%2097.7127C298.622%2098.0586%20298.423%2098.4573%20298.311%2098.8837Z'%20fill='%23113C7A'/%3e%3cpath%20d='M304.84%2085.0278C304.766%2085.9753%20304.858%2086.9285%20305.113%2087.8442C305.543%2089.2524%20304.557%2094.0335%20304.976%2094.4537C305.302%2094.7787%20305.706%2095.0143%20306.149%2095.1376C306.592%2095.2609%20307.059%2095.2679%20307.505%2095.1578L308.345%2094.59C308.345%2094.59%20308.764%2089.8089%20308.764%2088.4007C308.764%2086.9925%20308.345%2083.0631%20307.369%2082.2227C306.394%2081.3823%20303.99%2082.0751%20304.84%2085.0278Z'%20fill='%23113569'/%3e%3cpath%20d='M305.328%2094.3081C305.687%2093.9832%20306.157%2093.809%20306.64%2093.8217C307.124%2093.8344%20307.584%2094.033%20307.925%2094.3762L307.993%2095.3643C307.993%2095.3643%20307.71%2096.2841%20305.396%2095.4324L305.328%2094.3081Z'%20fill='white'/%3e%3cpath%20d='M305.545%2095.1786C305.895%2094.9846%20306.292%2094.8905%20306.691%2094.9065C307.091%2094.9226%20307.479%2095.0481%20307.813%2095.2694L307.904%2095.6442C307.904%2095.6442%20308.21%2096.4846%20308.323%2096.8593C308.376%2097.182%20308.353%2097.5126%20308.255%2097.8247C308.236%2098.1817%20308.179%2098.5357%20308.085%2098.8808C307.994%2099.0398%20307.813%2098.9944%20307.643%2098.9717C307.141%2098.8111%20306.648%2098.6215%20306.168%2098.4038C305.794%2098.2448%20305.681%2097.4272%20305.613%2097.1432C305.567%2096.7129%20305.567%2096.2789%20305.613%2095.8486C305.62%2095.6232%20305.597%2095.3979%20305.545%2095.1786Z'%20fill='%23FF8654'/%3e%3cpath%20d='M329.925%2063.9153V65.4938C329.926%2065.7053%20329.871%2065.9132%20329.765%2066.0965C329.66%2066.2798%20329.508%2066.4321%20329.325%2066.5381C329.143%2066.644%20328.935%2066.6998%20328.724%2066.6999C328.513%2066.7%20328.305%2066.6444%20328.122%2066.5386L320.671%2062.2345C320.487%2062.1292%20320.333%2061.9773%20320.226%2061.794C320.118%2061.6106%20320.061%2061.4023%20320.059%2061.1897V59.6111C320.061%2059.3993%20320.118%2059.1916%20320.225%2059.0087C320.331%2058.8258%20320.484%2058.6741%20320.667%2058.5685C320.851%2058.4629%20321.059%2058.4071%20321.27%2058.4067C321.482%2058.4064%20321.69%2058.4614%20321.874%2058.5663L329.324%2062.8591C329.509%2062.9659%20329.662%2063.12%20329.768%2063.3056C329.873%2063.4912%20329.928%2063.7016%20329.925%2063.9153Z'%20fill='%23F9FBFC'/%3e%3cpath%20d='M353.526%2085.2874V86.8773C353.526%2087.0888%20353.471%2087.2967%20353.366%2087.48C353.26%2087.6633%20353.109%2087.8156%20352.926%2087.9215C352.743%2088.0274%20352.535%2088.0833%20352.324%2088.0834C352.113%2088.0835%20351.906%2088.0278%20351.723%2087.9221L320.671%2070.1263C320.486%2070.0192%20320.332%2069.8653%20320.225%2069.68C320.117%2069.4947%20320.06%2069.2844%20320.059%2069.0702V67.4916C320.059%2067.2788%20320.115%2067.0697%20320.221%2066.8852C320.326%2066.7008%20320.479%2066.5474%20320.663%2066.4405C320.846%2066.3335%20321.055%2066.2768%20321.267%2066.2759C321.48%2066.275%20321.689%2066.33%20321.874%2066.4354L352.925%2084.2653C353.105%2084.3692%20353.254%2084.5179%20353.36%2084.697C353.465%2084.8761%20353.522%2085.0795%20353.526%2085.2874Z'%20fill='%23F9FBFC'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M340.735%2093.6676V95.2462C340.735%2095.459%20340.679%2095.6681%20340.573%2095.8525C340.467%2096.037%20340.315%2096.1904%20340.131%2096.2973C339.948%2096.4043%20339.739%2096.461%20339.527%2096.4619C339.314%2096.4628%20339.105%2096.4078%20338.92%2096.3024L320.673%2085.8202C320.49%2085.7144%20320.338%2085.5621%20320.232%2085.3786C320.127%2085.1952%20320.072%2084.9871%20320.072%2084.7754V83.1969C320.073%2082.9857%20320.129%2082.7785%20320.234%2082.5956C320.34%2082.4127%20320.491%2082.2604%20320.673%2082.1538C320.855%2082.0472%20321.061%2081.9899%20321.272%2081.9876C321.483%2081.9853%20321.691%2082.0381%20321.875%2082.1407L340.123%2092.6228C340.307%2092.7281%20340.461%2092.88%20340.568%2093.0634C340.676%2093.2467%20340.733%2093.4551%20340.735%2093.6676Z'%20fill='%23F9FBFC'/%3e%3c/g%3e%3cpath%20d='M348.722%2090.3889V91.9789C348.72%2092.1907%20348.663%2092.3984%20348.556%2092.5813C348.449%2092.7641%20348.296%2092.9159%20348.113%2093.0215C347.93%2093.1271%20347.722%2093.1829%20347.51%2093.1832C347.299%2093.1836%20347.091%2093.1286%20346.907%2093.0237L320.676%2077.9648C320.493%2077.859%20320.341%2077.7067%20320.235%2077.5232C320.13%2077.3398%20320.074%2077.1317%20320.075%2076.92V75.3301C320.074%2075.1186%20320.129%2074.9107%20320.235%2074.7274C320.34%2074.5441%20320.492%2074.3918%20320.675%2074.2859C320.857%2074.1799%20321.065%2074.1241%20321.276%2074.124C321.487%2074.1239%20321.695%2074.1795%20321.878%2074.2853L348.109%2089.3441C348.294%2089.4494%20348.447%2089.6013%20348.555%2089.7847C348.662%2089.968%20348.72%2090.1764%20348.722%2090.3889Z'%20fill='%23F9FBFC'/%3e%3cpath%20d='M365.824%2091.1697V112.384L350.729%20121.287'%20stroke='white'%20stroke-width='0.53'%20stroke-miterlimit='10'/%3e%3cpath%20d='M367.61%2089.6723C367.607%2090.0469%20367.494%2090.4125%20367.285%2090.7229C367.076%2091.0332%20366.779%2091.2746%20366.433%2091.4164C366.086%2091.5582%20365.706%2091.5941%20365.339%2091.5197C364.973%2091.4452%20364.636%2091.2637%20364.373%2090.998C364.109%2090.7323%20363.93%2090.3944%20363.857%2090.0268C363.785%2089.6592%20363.823%2089.2785%20363.967%2088.9326C364.111%2088.5867%20364.354%2088.2912%20364.665%2088.0833C364.976%2087.8754%20365.342%2087.7644%20365.716%2087.7644C365.965%2087.7644%20366.213%2087.8138%20366.443%2087.9098C366.674%2088.0059%20366.883%2088.1466%20367.059%2088.3239C367.235%2088.5012%20367.374%2088.7116%20367.469%2088.943C367.563%2089.1745%20367.611%2089.4223%20367.61%2089.6723V89.6723Z'%20stroke='white'%20stroke-width='1.06'%20stroke-miterlimit='10'/%3e%3cpath%20d='M715.132%2070.3542V91.5684L700.048%20100.472'%20stroke='white'%20stroke-width='0.53'%20stroke-miterlimit='10'/%3e%3cpath%20d='M715.031%2070.7535C716.077%2070.7535%20716.925%2069.9044%20716.925%2068.857C716.925%2067.8096%20716.077%2066.9604%20715.031%2066.9604C713.985%2066.9604%20713.137%2067.8096%20713.137%2068.857C713.137%2069.9044%20713.985%2070.7535%20715.031%2070.7535Z'%20stroke='white'%20stroke-width='1.06'%20stroke-miterlimit='10'/%3e%3cpath%20opacity='0.35'%20d='M501.346%20238.069C501.346%20242.305%20495.959%20245.723%20489.313%20245.723C482.668%20245.723%20477.281%20242.316%20477.281%20238.069C477.281%20233.822%20482.668%20230.415%20489.313%20230.415C495.959%20230.415%20501.346%20233.844%20501.346%20238.069Z'%20fill='%23A6D0F4'/%3e%3cpath%20opacity='0.35'%20d='M512.446%20235.683C524.353%20235.683%20534.005%20229.541%20534.005%20221.964C534.005%20214.387%20524.353%20208.245%20512.446%20208.245C500.539%20208.245%20490.887%20214.387%20490.887%20221.964C490.887%20229.541%20500.539%20235.683%20512.446%20235.683Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M496.12%20218.762C496.369%20221.59%20499.023%20223.509%20501.416%20224.531C504.044%20225.625%20506.872%20226.151%20509.717%20226.076C512.634%20226.086%20515.516%20225.446%20518.155%20224.202C520.423%20223.066%20522.839%20221.056%20522.827%20218.297C522.827%20220.307%20522.691%20221.965%20521.251%20223.532C519.245%20225.467%20516.697%20226.743%20513.947%20227.189C508.799%20228.256%20501.79%20227.745%20497.877%20223.782C496.301%20222.192%20496.086%20220.511%20496.086%20218.387C496.087%20218.513%20496.098%20218.638%20496.12%20218.762Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M500.033%20213.627C494.793%20216.648%20494.759%20221.576%20499.965%20224.597C505.17%20227.618%20513.653%20227.618%20518.892%20224.597C524.132%20221.576%20524.143%20216.648%20518.892%20213.627C513.642%20210.606%20505.306%20210.595%20500.033%20213.627Z'%20fill='white'/%3e%3cpath%20d='M508.03%20209.526L508.053%20220.678L509.459%20221.495L509.425%20210.343L508.03%20209.526Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M509.424%20210.343L509.458%20221.495L510.864%20220.678L510.842%20209.526L509.424%20210.343Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M507.375%20207.494L509.428%20208.687L511.48%20207.494L509.439%20206.313L507.375%20207.494Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M522.735%20169.54C522.735%20169.54%20526.942%20172.016%20528.065%20174.537C529.188%20177.058%20528.881%20194.729%20523.007%20202.565C517.132%20210.401%20506.245%20211.514%20503.727%20210.401C501.21%20209.288%20486.716%20201.997%20485.582%20198.363C484.448%20194.729%20490.118%20191.924%20493.135%20190.527C496.152%20189.13%20498.159%20187.177%20499.837%20182.135C501.516%20177.092%20502.355%20168.427%20504.306%20167.019C506.256%20165.611%20510.974%20163.385%20522.735%20169.54Z'%20fill='black'/%3e%3cpath%20d='M501.9%20207.903C499.859%20206.994%20489.822%20201.986%20485.581%20198.204C484.673%20194.638%20490.117%20191.913%20493.156%20190.527C496.196%20189.142%20498.18%20187.177%20499.859%20182.135C501.537%20177.092%20502.376%20168.427%20504.327%20167.019C506.278%20165.611%20511.041%20163.385%20522.779%20169.54C524.031%20170.305%20525.204%20171.191%20526.283%20172.186C527.349%20175.116%20526.963%20192.356%20521.191%20200.067C515.418%20207.778%20504.372%20209.027%20501.9%20207.903Z'%20fill='%23232839'/%3e%3cpath%20d='M500.764%20171.451C500.764%20171.451%20499.517%20171.883%20498.587%20174.995C497.657%20178.106%20495.003%20183.728%20495.944%20186.215C496.885%20188.702%20499.675%20187.35%20500.48%20185.431C501.286%20183.512%20504.359%20174.904%20503.735%20173.62C503.112%20172.337%20502.012%20171.02%20500.764%20171.451Z'%20fill='%23113569'/%3e%3cpath%20d='M493.169%20235.204C492.983%20235.885%20492.725%20236.544%20492.398%20237.169C491.854%20238.225%20489.869%20239.633%20488.996%20240.349C488.123%20241.064%20487.125%20242.393%20487.238%20243.029C487.352%20243.665%20489.359%20243.824%20490.947%20243.472C492.534%20243.12%20493.918%20241.36%20494.349%20241.394C494.78%20241.428%20496.617%20241.098%20496.912%20240.497C497.207%20239.895%20496.674%20237.51%20496.674%20237.51V235.784L493.169%20235.204Z'%20fill='%23232839'/%3e%3cpath%20d='M485.391%20230.256C485.205%20230.937%20484.946%20231.596%20484.619%20232.221C484.075%20233.277%20482.09%20234.685%20481.217%20235.401C480.344%20236.116%20479.346%20237.445%20479.448%20238.081C479.55%20238.717%20481.58%20238.865%20483.168%20238.524C484.756%20238.183%20486.139%20236.412%20486.57%20236.446C487.001%20236.48%20488.782%20236.139%20489.133%20235.549C489.485%20234.958%20488.895%20232.562%20488.895%20232.562V230.836L485.391%20230.256Z'%20fill='%23232839'/%3e%3cpath%20d='M514.883%20195.924C514.944%20198.055%20514.368%20200.155%20513.227%20201.955C511.356%20204.658%20503.678%20211.517%20502.85%20212.176C502.022%20212.834%20501.807%20217.366%20500.979%20219.444C500.151%20221.522%20497.667%20235.025%20497.248%20236.07C497.248%20236.07%20496.828%20237.104%20493.925%20236.479C492.269%20236.274%20492.065%20235.65%20492.065%20235.65C492.065%20235.65%20493.097%20220.489%20493.925%20216.946C494.753%20213.402%20494.968%20209.473%20496.42%20208.019C497.871%20206.566%20504.925%20197.424%20504.925%20197.424L506.581%20194.721L514.883%20195.924Z'%20fill='%23113C7A'/%3e%3cpath%20d='M502.023%20192.609C502.023%20192.609%20490.818%20198.844%20489.253%20200.241C487.765%20201.546%20486.732%20203.292%20486.304%20205.226C486.179%20205.919%20485.057%20230.006%20484.592%20231.097C484.433%20232.039%20487.393%20232.652%20488.788%20232.232C489.34%20231.859%20489.817%20231.385%20490.194%20230.835C490.194%20230.835%20492.995%20216.344%20492.995%20214.312C493.253%20211.59%20493.67%20208.887%20494.243%20206.214L507.16%20198.889L508.09%20195.607L502.023%20192.609Z'%20fill='%23113C7A'/%3e%3cpath%20d='M514.479%20198.058C514.479%20198.058%20513.345%20201.181%20508.876%20200.704L507.311%20200.397L507.005%20197.899C505.435%20197.694%20503.939%20197.105%20502.65%20196.184C502.027%20196.502%20501.868%20198.058%20501.244%20198.217C500.62%20198.376%20499.532%20196.184%20499.849%20194.628C500.167%20193.073%20500.983%20193.697%20500.983%20193.697C500.983%20193.697%20513.696%20196.809%20514.479%20198.058Z'%20fill='%23112C5C'/%3e%3cpath%20d='M509.703%20169.839C509.703%20169.839%20515.033%20173.644%20515.555%20174.916C516.198%20177.281%20516.039%20179.794%20515.101%20182.059C513.967%20184.41%20514.409%20193.064%20513.967%20194.756C513.525%20196.448%20509.011%20197.027%20506.187%20196.436C503.363%20195.846%20499.961%20193.847%20500.063%20190.554C500.165%20187.26%20500.063%20181.116%20499.927%20179.64C499.769%20177.049%20500.006%20174.449%20500.63%20171.929C500.766%20171.407%20502.547%20170.85%20502.547%20170.85C502.547%20170.85%20504.452%20169.612%20509.703%20169.839Z'%20fill='%23C7BFCE'/%3e%3cpath%20d='M505.075%20169.122C505.082%20169.179%20505.082%20169.236%20505.075%20169.293C505.018%20169.679%20504.825%20170.678%20504.78%20171.098C504.734%20171.518%20505.199%20172.234%20506.277%20172.166C507.354%20172.098%20509.191%20171.689%20509.804%20170.406C509.776%20169.135%20509.837%20167.864%20509.985%20166.601L505.075%20169.122Z'%20fill='%23E16B40'/%3e%3cpath%20d='M509.84%20169.586C509.561%20170.356%20509.048%20171.018%20508.372%20171.479C507.696%20171.94%20506.892%20172.175%20506.075%20172.153H505.882L507.345%20174.515C508.388%20173.904%20509.371%20173.197%20510.282%20172.402C510.714%20171.884%20510.944%20171.226%20510.929%20170.551L509.84%20169.586Z'%20fill='white'/%3e%3cpath%20d='M505.891%20172.155L504.348%20173.62C504.348%20173.62%20503.214%20172.666%20503.906%20170.429L504.859%20170.043C504.842%20170.453%20504.928%20170.861%20505.108%20171.23C505.288%20171.598%20505.557%20171.916%20505.891%20172.155Z'%20fill='white'/%3e%3cpath%20d='M502.807%20161.739C503.374%20158.696%20505.778%20156.97%20508.478%20157.606C509.364%20157.723%20510.211%20158.046%20510.952%20158.549C511.692%20159.051%20512.305%20159.72%20512.742%20160.502C514.046%20163.091%20512.129%20165.271%20510.893%20166.646C510.372%20167.213%20509.975%20167.645%20509.759%20167.929L509.487%20168.235C508.783%20168.942%20507.919%20169.467%20506.969%20169.769C506.403%20169.963%20505.796%20170.005%20505.208%20169.889C504.621%20169.774%20504.074%20169.505%20503.624%20169.11C502.83%20168.326%20502.24%20164.772%20502.807%20161.739Z'%20fill='%23FF8654'/%3e%3cpath%20d='M510.973%20170.552C510.973%20170.552%20511.767%20171.313%20510.712%20173.244C509.301%20175.976%20508.525%20178.992%20508.444%20182.068C508.353%20185.713%20507.877%20197.138%20508.354%20199.636C509.306%20200.499%20513.911%20199.727%20515.249%20197.433C515.827%20194.026%20515.544%20183.896%20516.213%20181.784C516.77%20179.485%20516.801%20177.089%20516.303%20174.777C515.759%20173.72%20512.107%20170.836%20510.973%20170.552Z'%20fill='%23113C7A'/%3e%3cpath%20d='M503.521%20170.486C502.951%20172.788%20502.691%20175.156%20502.75%20177.527C502.75%20181.309%20501.673%20196.981%20501.48%20197.299C501.287%20197.617%20499.053%20195.641%20498.985%20193.336C498.917%20191.03%20499.756%20176.891%20499.881%20175.483C499.954%20174.099%20500.257%20172.736%20500.777%20171.452C501.655%20171.034%20502.575%20170.711%20503.521%20170.486Z'%20fill='%23113C7A'/%3e%3cpath%20d='M504.631%20172.927L505.323%20174.38L506.775%20173.233L505.89%20172.154L504.631%20172.927Z'%20fill='%23113C7A'/%3e%3cpath%20d='M505.02%20173.472C505.02%20173.472%20503.648%20191.018%20503.648%20191.779L504.566%20193.392L505.791%20192.086L506.245%20173.325L505.02%20173.472Z'%20fill='%23113C7A'/%3e%3cpath%20d='M429.925%20232.455L427.396%20230.979L427.327%20201.997L429.856%20203.473L429.925%20232.455Z'%20fill='%238750CA'/%3e%3cpath%20d='M429.857%20203.473L427.327%20201.997L461.77%20182.078L464.31%20183.554L429.857%20203.473Z'%20fill='%23DBDBDB'/%3e%3cpath%20d='M464.311%20183.557L464.379%20212.539L429.925%20232.458L429.857%20203.476L464.311%20183.557Z'%20fill='%239966D7'/%3e%3cpath%20d='M432.321%20197.968L432.253%20226.95L501.296%20266.562L501.364%20237.58L432.321%20197.968Z'%20fill='%23A478D9'/%3e%3cpath%20d='M432.28%20214.174L501.334%20253.785L501.368%20237.58L432.325%20197.968L432.28%20214.174Z'%20fill='%238750CA'/%3e%3cpath%20d='M499.169%20269.379L496.629%20267.903L496.561%20238.921L499.101%20240.397L499.169%20269.379Z'%20fill='%238750CA'/%3e%3cpath%20d='M499.101%20240.396L496.561%20238.92L531.014%20219L533.543%20220.477L499.101%20240.396Z'%20fill='%23DBDBDB'/%3e%3cpath%20d='M533.54%20220.477L533.62%20249.459L499.166%20269.379L499.098%20240.397L533.54%20220.477Z'%20fill='%23976EC9'/%3e%3cpath%20d='M538.269%20219.725L538.258%20222.45L499.2%20245.175L499.211%20242.449L538.269%20219.725Z'%20fill='%238C57CC'/%3e%3cpath%20d='M499.209%20242.452L499.198%20245.178L421.558%20200.296L421.57%20197.571L499.209%20242.452Z'%20fill='%238750CA'/%3e%3cpath%20d='M538.271%20219.725L499.213%20242.45L421.573%20197.569L460.631%20174.833L538.271%20219.725Z'%20fill='%23B59AD7'/%3e%3cpath%20d='M515.975%20174.164C516.891%20175.111%20517.537%20176.288%20517.846%20177.571C518.674%20180.171%20519.195%20189.2%20519.195%20190.551C519.195%20191.903%20519.195%20193.47%20518.061%20194.197C517.814%20194.394%20517.526%20194.533%20517.218%20194.603C516.91%20194.674%20516.591%20194.674%20516.283%20194.604C515.974%20194.534%20515.686%20194.396%20515.438%20194.2C515.191%20194.004%20514.99%20193.754%20514.852%20193.47C514.126%20192.118%20513.604%20184.385%20513.083%20182.034C512.561%20179.683%20511.733%20177.253%20512.777%20175.697C513.081%20175.137%20513.554%20174.688%20514.128%20174.412C514.702%20174.137%20515.348%20174.05%20515.975%20174.164Z'%20fill='%23113C7A'/%3e%3cpath%20d='M504.164%20200.444C504.164%20200.444%20503.643%20200.807%20503.382%20200.966L501.669%20202.102C501.213%20202.58%20500.831%20203.123%20500.535%20203.714C500.238%20204.183%20500.058%20204.717%20500.014%20205.27C500.116%20205.531%20500.433%20205.372%20500.433%20205.372C500.74%20205.713%20501.167%20205.921%20501.624%20205.952C502.248%20205.895%20502.758%20205.123%20502.758%20205.123L503.643%20204.339C503.999%20203.943%20504.279%20203.485%20504.471%20202.987L505.094%20202.567C505.094%20202.567%20505.593%20202.056%20504.164%20200.444Z'%20fill='%23FF8654'/%3e%3cpath%20d='M506.141%20202.194C506.141%20202.194%20505.495%20200.343%20504.723%20199.923L503.839%20200.548C504.394%20201.202%20504.783%20201.981%20504.973%20202.819L506.141%20202.194Z'%20fill='white'/%3e%3cpath%20d='M506.146%20202.194C506.701%20202.144%20507.236%20201.965%20507.711%20201.672C509.092%20200.65%20510.539%20199.72%20512.043%20198.89C514.059%20197.967%20515.943%20196.779%20517.645%20195.358C518.603%20194.428%20519.161%20193.161%20519.199%20191.826C518.785%20191.287%20518.202%20190.902%20517.545%20190.734C516.887%20190.565%20516.192%20190.622%20515.57%20190.895C513.527%20191.854%20511.639%20193.113%20509.967%20194.631C508.096%20196.187%20504.909%20199.287%20504.909%20199.287L504.365%20199.934C504.805%20200.164%20505.19%20200.484%20505.497%20200.873C505.804%20201.263%20506.025%20201.713%20506.146%20202.194Z'%20fill='%23113C7A'/%3e%3cpath%20d='M502.908%20161.207C502.625%20160.774%20502.43%20160.289%20502.337%20159.78C502.243%20159.271%20502.252%20158.748%20502.364%20158.243C502.794%20156.71%20504.768%20157.368%20505.868%20157.255C506.968%20157.141%20511.232%20157.255%20512.672%20159.117C514.113%20160.98%20513.444%20161.865%20513.444%20161.865C513.557%20162.754%20513.444%20163.656%20513.115%20164.489C512.559%20165.693%20509.78%20167.896%20509.78%20167.896C510.514%20167.003%20511.086%20165.988%20511.47%20164.898C511.584%20163.91%20511.028%20163.365%20510.699%20163.58C510.37%20163.796%20510.155%20165.659%20510.155%20165.659L510.007%20166.567C509.281%20166.317%20509.497%20164.784%20509.497%20164.784C509.153%20164.282%20508.896%20163.725%20508.737%20163.137C508.51%20162.263%20508.408%20161.831%20507.524%20161.389C506.859%20160.904%20506.065%20160.628%20505.243%20160.595C504.422%20160.563%20503.609%20160.776%20502.908%20161.207Z'%20fill='%23505E83'/%3e%3cpath%20d='M484.475%20177.56C484.475%20177.56%20483.92%20177.265%20483.659%20177.094C483.398%20176.924%20482.4%20176.333%20481.912%20176.061C481.282%20175.859%20480.624%20175.756%20479.962%20175.754C479.41%20175.706%20478.855%20175.788%20478.34%20175.993C478.158%20176.209%20478.442%20176.413%20478.442%20176.413C478.266%20176.838%20478.266%20177.316%20478.442%20177.742C478.763%20178.105%20479.208%20178.336%20479.689%20178.389L480.824%20178.821C481.335%20178.967%20481.871%20179.013%20482.4%20178.957L483.046%20179.332C483.046%20179.332%20483.659%20179.536%20484.475%20177.56Z'%20fill='%23FF8654'/%3e%3cpath%20d='M483.761%20180.083C483.761%20180.083%20485.111%20178.675%20485.179%20177.812L484.226%20177.301C483.899%20178.084%20483.394%20178.78%20482.752%20179.334L483.761%20180.083Z'%20fill='white'/%3e%3cpath%20d='M483.754%20180.082C484.039%20180.544%20484.427%20180.932%20484.888%20181.217C486.42%20181.998%20487.901%20182.875%20489.323%20183.841C491.051%20185.227%20492.958%20186.373%20494.993%20187.248C496.254%20187.688%20497.637%20187.619%20498.849%20187.055C499.143%20186.442%20499.225%20185.749%20499.081%20185.084C498.937%20184.42%20498.576%20183.822%20498.055%20183.387C496.274%20181.992%20494.299%20180.867%20492.192%20180.048C489.924%20179.082%20485.773%20177.617%20485.773%20177.617L484.956%20177.424C484.955%20177.927%20484.847%20178.424%20484.64%20178.882C484.433%20179.34%20484.131%20179.749%20483.754%20180.082Z'%20fill='%23113569'/%3e%3cpath%20d='M501.324%20223.795L509.206%20228.383L521.964%20221.002L514.082%20216.414L501.324%20223.795Z'%20fill='%238C57CC'/%3e%3cpath%20d='M499.872%20221.066V223.02L507.765%20227.608L507.754%20225.654L499.872%20221.066Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M507.752%20225.656L507.763%20227.609L520.521%20220.228V218.274L507.752%20225.656Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M499.872%20221.065L507.754%20225.653L520.523%20218.271L512.63%20213.683L499.872%20221.065Z'%20fill='white'/%3e%3cpath%20d='M447.361%20200.377L455.254%20204.965L468.013%20197.594L460.12%20192.995L447.361%20200.377Z'%20fill='%238C57CC'/%3e%3cpath%20d='M445.913%20197.652L445.924%20199.605L453.806%20204.193V202.24L445.913%20197.652Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M453.801%20202.236V204.189L466.571%20196.818L466.559%20194.854L453.801%20202.236Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M445.913%20197.654L453.806%20202.242L466.564%20194.86L458.682%20190.272L445.913%20197.654Z'%20fill='white'/%3e%3cpath%20d='M490.068%20214.659L497.961%20219.247L510.719%20211.865L502.837%20207.277L490.068%20214.659Z'%20fill='white'/%3e%3cpath%20d='M496.942%20205.938C498.746%20206.983%20498.746%20208.663%20496.942%20209.708L485.397%20216.42C484.39%20216.935%20483.274%20217.204%20482.142%20217.204C481.011%20217.204%20479.895%20216.935%20478.888%20216.42L467.275%20209.708C465.471%20208.663%20465.46%20206.971%20467.275%20205.938L478.82%20199.215C479.825%20198.699%20480.939%20198.431%20482.069%20198.431C483.199%20198.431%20484.312%20198.699%20485.318%20199.215L496.942%20205.938Z'%20fill='%238C57CC'/%3e%3cpath%20d='M486.649%20207.686C486.634%20207.719%20486.615%20207.749%20486.592%20207.777L486.512%20207.856H486.456L486.376%20207.913L481.591%20210.571L476.419%20207.584V207.947L481.591%20210.934L486.376%20208.265H486.433H486.49L486.547%20208.208C486.547%20208.208%20486.547%20208.208%20486.547%20208.152V208.061V207.538C486.594%20207.577%20486.629%20207.628%20486.649%20207.686Z'%20fill='%23BAC0D2'/%3e%3cpath%20d='M486.392%20207.21C486.767%20207.426%20486.755%20207.766%20486.392%20207.982L481.606%20210.64L476.435%20207.653L480.484%20204.575C480.69%20204.466%20480.92%20204.409%20481.153%20204.409C481.386%20204.409%20481.616%20204.466%20481.822%20204.575L486.392%20207.21Z'%20fill='white'/%3e%3cpath%20d='M493.476%20195.894C493.905%20196.175%20494.21%20196.61%20494.327%20197.109L496.799%20213.78C496.867%20214.212%20496.584%20214.382%20496.187%20214.144L470.931%20199.585C470.499%20199.307%20470.193%20198.871%20470.08%20198.37L467.608%20181.698C467.54%20181.267%20467.812%20181.096%20468.22%20181.335L493.476%20195.894Z'%20fill='%23C7C9D7'/%3e%3cpath%20d='M497.204%20213.625V213.5L494.72%20196.829V196.658V196.522V196.374L494.641%20196.272L469.385%20181.656H468.976H468.908L468.511%20181.952H468.591C468.628%20181.946%20468.667%20181.946%20468.704%20181.952H468.84C468.897%20181.964%20468.951%20181.987%20468.999%20182.02L494.255%20196.636L494.403%20196.738L494.55%20196.863L494.686%20197.01L494.8%20197.169L494.902%20197.34L494.992%20197.51C494.997%20197.571%20494.997%20197.631%20494.992%20197.692C494.997%20197.745%20494.997%20197.798%20494.992%20197.851L497.465%20214.522C497.47%20214.568%20497.47%20214.613%20497.465%20214.658C497.47%20214.696%20497.47%20214.734%20497.465%20214.772C497.47%20214.795%20497.47%20214.818%20497.465%20214.84C497.444%20214.875%20497.417%20214.906%20497.385%20214.931L497.794%20214.636C497.825%20214.614%20497.849%20214.582%20497.862%20214.545V214.454L497.204%20213.625Z'%20fill='white'/%3e%3cpath%20opacity='0.2'%20d='M479.477%20205.318L476.415%20207.658L481.587%20210.645L485.204%20208.634L479.477%20205.318Z'%20fill='%23777DB2'/%3e%3cpath%20d='M482.675%20200.386L481.586%20211.028L476.404%20208.029L478.422%20198.058L482.675%20200.386Z'%20fill='%23BAC0D2'/%3e%3cpath%20d='M497.444%20233.936L500.313%20232.346L496.264%20230.245L497.444%20233.936Z'%20fill='%238C57CC'/%3e%3cpath%20d='M498.329%20229.19L499.123%20228.906L498.238%20233.653L497.445%20233.937L498.329%20229.19Z'%20fill='%23656874'/%3e%3cpath%20d='M485.4%20221.944L486.182%20221.66L499.122%20228.905L498.328%20229.189L485.4%20221.944Z'%20fill='%239C9EA6'/%3e%3cpath%20d='M498.329%20229.189L497.444%20233.936L484.516%20226.69L485.4%20221.943L498.329%20229.189Z'%20fill='%23232839'/%3e%3cpath%20d='M452.76%20189.871C453.894%20190.507%20453.894%20191.529%20452.76%20192.143C452.147%20192.456%20451.469%20192.619%20450.781%20192.619C450.093%20192.619%20449.415%20192.456%20448.802%20192.143C448.572%20192.055%20448.374%20191.9%20448.235%20191.697C448.095%20191.494%20448.02%20191.253%20448.02%20191.007C448.02%20190.761%20448.095%20190.52%20448.235%20190.317C448.374%20190.115%20448.572%20189.959%20448.802%20189.871C449.414%20189.556%20450.093%20189.391%20450.781%20189.391C451.47%20189.391%20452.148%20189.556%20452.76%20189.871Z'%20fill='%238C57CC'/%3e%3cpath%20d='M453.137%20184.219V190.442C453.116%20190.67%20453.034%20190.888%20452.9%20191.074C452.767%20191.26%20452.586%20191.406%20452.377%20191.498C451.806%20191.789%20451.175%20191.941%20450.534%20191.941C449.893%20191.941%20449.262%20191.789%20448.691%20191.498C448.48%20191.405%20448.297%20191.257%20448.161%20191.069C448.026%20190.882%20447.942%20190.661%20447.92%20190.431V184.196C447.938%20184.429%20448.02%20184.653%20448.156%20184.843C448.291%20185.033%20448.477%20185.183%20448.691%20185.275C449.262%20185.566%20449.893%20185.718%20450.534%20185.718C451.175%20185.718%20451.806%20185.566%20452.377%20185.275C452.586%20185.183%20452.767%20185.036%20452.9%20184.85C453.034%20184.665%20453.116%20184.447%20453.137%20184.219Z'%20fill='white'/%3e%3cpath%20d='M452.321%20183.137C453.342%20183.727%20453.353%20184.681%20452.321%20185.272C451.751%20185.563%20451.119%20185.715%20450.479%20185.715C449.838%20185.715%20449.206%20185.563%20448.636%20185.272C447.615%20184.681%20447.604%20183.727%20448.636%20183.137C449.206%20182.846%20449.838%20182.694%20450.479%20182.694C451.119%20182.694%20451.751%20182.846%20452.321%20183.137Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M451.925%20183.375C452.098%20183.434%20452.249%20183.545%20452.356%20183.694C452.463%20183.842%20452.52%20184.021%20452.52%20184.204C452.52%20184.387%20452.463%20184.566%20452.356%20184.715C452.249%20184.864%20452.098%20184.975%20451.925%20185.033C451.479%20185.262%20450.986%20185.382%20450.485%20185.382C449.984%20185.382%20449.49%20185.262%20449.044%20185.033C448.871%20184.975%20448.72%20184.864%20448.613%20184.715C448.506%20184.566%20448.449%20184.387%20448.449%20184.204C448.449%20184.021%20448.506%20183.842%20448.613%20183.694C448.72%20183.545%20448.871%20183.434%20449.044%20183.375C449.489%20183.144%20449.983%20183.024%20450.485%20183.024C450.986%20183.024%20451.48%20183.144%20451.925%20183.375Z'%20fill='%238C57CC'/%3e%3cpath%20d='M448.471%20184.387C447.988%20182.685%20447.397%20181.016%20446.701%20179.39C446.701%20178.811%20447.904%20179.503%20448.357%20180.582C448.747%20181.722%20449.043%20182.892%20449.242%20184.08C449.242%20184.08%20449.162%20178.504%20450.126%20177.266C450.739%20177.425%20450.365%20183.546%20450.285%20184.012C450.285%20184.012%20452.202%20179.924%20453.472%20179.083C454.05%20179.151%20451.623%20184.194%20451.623%20184.194C451.917%20183.646%20452.317%20183.163%20452.8%20182.773C453.283%20182.383%20453.839%20182.094%20454.436%20181.922C453.824%20182.822%20453.158%20183.683%20452.44%20184.5C452.151%20184.839%20451.776%20185.092%20451.355%20185.234C450.933%20185.376%20450.481%20185.401%20450.047%20185.307C449.73%20185.292%20449.421%20185.2%20449.146%20185.04C448.872%20184.88%20448.64%20184.656%20448.471%20184.387Z'%20fill='%234CA15C'/%3e%3cpath%20d='M562.062%20231.844C564.762%20233.411%20564.773%20235.933%20562.062%20237.523C560.558%20238.292%20558.892%20238.693%20557.203%20238.693C555.513%20238.693%20553.848%20238.292%20552.343%20237.523C549.644%20235.978%20549.633%20233.446%20552.343%20231.844C553.848%20231.076%20555.514%20230.675%20557.203%20230.675C558.892%20230.675%20560.558%20231.076%20562.062%20231.844Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M562.872%20217.955V233.241C562.822%20233.8%20562.625%20234.335%20562.3%20234.792C561.975%20235.249%20561.534%20235.612%20561.023%20235.841C559.619%20236.56%20558.064%20236.935%20556.487%20236.935C554.91%20236.935%20553.355%20236.56%20551.95%20235.841C551.43%20235.609%20550.98%20235.241%20550.649%20234.775C550.318%20234.31%20550.117%20233.764%20550.068%20233.195V217.909C550.119%20218.478%20550.32%20219.023%20550.651%20219.488C550.982%20219.953%20551.43%20220.322%20551.95%20220.555C553.354%20221.276%20554.909%20221.652%20556.487%20221.652C558.064%20221.652%20559.619%20221.276%20561.023%20220.555C561.534%20220.325%20561.974%20219.962%20562.298%20219.505C562.623%20219.048%20562.821%20218.513%20562.872%20217.955Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M560.975%20215.31C563.493%20216.764%20563.504%20219.114%20560.975%20220.557C559.571%20221.277%20558.016%20221.653%20556.439%20221.653C554.861%20221.653%20553.306%20221.277%20551.902%20220.557C549.396%20219.103%20549.385%20216.752%20551.902%20215.31C553.306%20214.588%20554.861%20214.211%20556.439%20214.211C558.016%20214.211%20559.572%20214.588%20560.975%20215.31Z'%20fill='white'/%3e%3cpath%20d='M559.976%20215.889C561.938%20217.024%20561.949%20218.853%20559.976%20219.977C558.883%20220.532%20557.674%20220.821%20556.449%20220.821C555.223%20220.821%20554.015%20220.532%20552.922%20219.977C550.971%20218.841%20550.96%20217.013%20552.922%20215.889C554.015%20215.332%20555.223%20215.042%20556.449%20215.042C557.675%20215.042%20558.883%20215.332%20559.976%20215.889Z'%20fill='%23713336'/%3e%3cpath%20d='M551.538%20218.388C551.538%20218.388%20548.328%20207.701%20547.194%20206.1C547.194%20204.68%20550.12%20206.384%20551.254%20209.03C552.211%20211.836%20552.939%20214.715%20553.432%20217.638C553.432%20217.638%20553.239%20203.92%20555.598%20200.899C557.106%20201.273%20556.165%20216.31%20555.983%20217.445C555.983%20217.445%20560.701%20207.417%20563.82%20205.339C565.226%20205.532%20559.284%20217.911%20559.284%20217.911C559.284%20217.911%20561.733%20213.289%20566.179%20212.437C564.671%20214.643%20563.031%20216.755%20561.268%20218.763C561.268%20218.763%20559.658%20221.227%20555.416%20220.75C555.416%20220.75%20552.479%20220.568%20551.538%20218.388Z'%20fill='%234CA15C'/%3e%3cpath%20opacity='0.35'%20d='M428.648%20256.795C428.648%20263.609%20437.358%20269.173%20448.097%20269.173C458.837%20269.173%20467.547%20263.631%20467.547%20256.795C467.547%20249.958%20458.837%20244.427%20448.097%20244.427C437.358%20244.427%20428.648%20249.958%20428.648%20256.795Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M456.241%20259.475C456.241%20259.475%20455.47%20262.564%20455.935%20263.189C456.315%20263.558%20456.784%20263.824%20457.297%20263.959C457.809%20264.094%20458.348%20264.095%20458.861%20263.961C459.652%20263.615%20460.306%20263.016%20460.721%20262.258C461.912%20261.589%20463.004%20260.755%20463.964%20259.782C464.143%20259.534%20464.239%20259.236%20464.239%20258.93C464.239%20258.624%20464.143%20258.326%20463.964%20258.078C463.084%20257.992%20462.196%20258.046%20461.333%20258.237C460.284%20258.536%20459.254%20258.896%20458.248%20259.316L456.241%20259.475Z'%20fill='%23232839'/%3e%3cpath%20d='M448.361%20255.136C448.361%20255.136%20447.59%20258.237%20448.055%20258.85C448.433%20259.223%20448.902%20259.491%20449.415%20259.627C449.929%20259.762%20450.469%20259.761%20450.981%20259.622C451.772%20259.276%20452.426%20258.677%20452.841%20257.919C454.033%20257.25%20455.125%20256.417%20456.085%20255.443C456.264%20255.195%20456.36%20254.897%20456.36%20254.591C456.36%20254.285%20456.264%20253.987%20456.085%20253.74C455.205%20253.66%20454.318%20253.714%20453.453%20253.899C452.403%20254.213%20451.373%20254.592%20450.369%20255.034L448.361%20255.136Z'%20fill='%23232839'/%3e%3cpath%20d='M472.03%20209.904L462.31%20219.841L452.864%20217.388L462.583%20207.451L472.03%20209.904Z'%20fill='white'/%3e%3cpath%20d='M461.593%20210.515L462.523%20210.867C462.912%20210.584%20463.363%20210.398%20463.838%20210.323C464.313%20210.248%20464.799%20210.286%20465.256%20210.435L466.027%20209.799C465.284%20209.561%20464.495%20209.501%20463.725%20209.625C462.954%20209.75%20462.224%20210.054%20461.593%20210.515Z'%20fill='%23E2EDFF'/%3e%3cpath%20d='M461.47%20210.605C460.563%20211.412%20460.62%20212.365%20461.538%20212.933L462.332%20212.275C461.913%20211.923%20461.924%20211.412%20462.4%20210.957L461.47%20210.605Z'%20fill='%23E2EDFF'/%3e%3cpath%20d='M461.661%20213.004L461.967%20213.141C462.702%20213.372%20463.48%20213.431%20464.241%20213.313C465.002%20213.195%20465.726%20212.903%20466.356%20212.459L465.426%20212.107C465.037%20212.373%20464.593%20212.547%20464.128%20212.616C463.662%20212.685%20463.187%20212.647%20462.738%20212.505L462.443%20212.357L461.661%20213.004Z'%20fill='%233EABFF'/%3e%3cpath%20d='M465.441%20210.516C466.099%20210.857%20466.156%20211.493%20465.555%20212.015L466.485%20212.367C467.505%20211.493%20467.381%20210.414%20466.224%20209.869L465.441%20210.516Z'%20fill='%233EABFF'/%3e%3cpath%20d='M454.053%20241.784C453.679%20244.838%20452.148%20252.856%20451.898%20255.65C451.898%20255.65%20451.263%20256.672%20449.358%20256.422L448.451%20256.036C448.273%20255.966%20448.124%20255.839%20448.027%20255.674C447.93%20255.509%20447.892%20255.317%20447.918%20255.128C448.277%20252.562%20448.417%20249.971%20448.337%20247.382C448.152%20245.793%20448.326%20244.182%20448.848%20242.669C448.779%20241.715%20448.655%20238.411%20450.56%20237.525C450.56%20237.525%20455.232%20236.662%20454.053%20241.784Z'%20fill='%23113569'/%3e%3cpath%20d='M450.171%20238.92L450.681%20239.93C450.681%20239.93%20458.495%20240.316%20460.593%20242.611C461.338%20242.936%20461.951%20243.506%20462.33%20244.226C462.709%20244.946%20462.833%20245.774%20462.68%20246.574C462.294%20249.629%20459.709%20256.988%20459.448%20259.793C459.448%20259.793%20458.813%20260.804%20456.907%20260.554L456.011%20260.179C455.833%20260.106%20455.683%20259.977%20455.585%20259.811C455.487%20259.645%20455.445%20259.451%20455.467%20259.259C455.825%20256.694%20455.969%20254.103%20455.898%20251.514C455.707%20249.928%20455.881%20248.32%20456.408%20246.812C453.973%20247.309%20451.588%20248.032%20449.286%20248.97C445.601%20250.503%20442.425%20248.72%20441.03%20247.948C440.34%20247.607%20439.696%20247.18%20439.114%20246.676C437.859%20246.591%20436.665%20246.101%20435.711%20245.279C434.056%20243.882%20433.806%20240.192%20435.587%20238.022C437.367%20235.853%20450.171%20238.92%20450.171%20238.92Z'%20fill='%23113C7A'/%3e%3cpath%20d='M447.385%20219.567C447.385%20219.567%20447.147%20219.567%20447.226%20217.898C447.333%20217.17%20447.575%20216.469%20447.941%20215.831C447.941%20215.831%20445.287%20214.003%20443.155%20214.514C442.456%20215.949%20441.503%20217.246%20440.342%20218.341C440.342%20218.341%20441.533%20221.487%20447.385%20219.567Z'%20fill='%23FF8654'/%3e%3cpath%20d='M444.618%20220.518C444.618%20220.518%20439.946%20216.611%20438.948%20216.52C438.305%20216.397%20437.64%20216.527%20437.091%20216.882C436.542%20217.238%20436.151%20217.791%20435.999%20218.428C435.83%20219.054%20435.868%20219.717%20436.107%20220.319C436.347%20220.921%20436.774%20221.429%20437.326%20221.767C438.188%20222.244%20445.718%20225.867%20447.056%20225.867C447.366%20225.894%20447.676%20225.828%20447.948%20225.678C448.22%20225.528%20448.441%20225.3%20448.583%20225.024C448.725%20224.747%20448.782%20224.435%20448.747%20224.126C448.711%20223.817%20448.585%20223.526%20448.383%20223.289C447.578%20221.858%20444.618%20220.518%20444.618%20220.518Z'%20fill='%23113569'/%3e%3cpath%20d='M443.189%20217.922C443.189%20217.922%20448.144%20219.569%20449.539%20221.863C450.934%20224.157%20450.673%20226.701%20449.675%20230.267C448.677%20233.832%20450.685%20237.012%20450.174%20238.92C449.664%20240.828%20446.114%20242.611%20440.898%20241.714C435.681%20240.817%20435.307%20238.795%20434.932%20237.648C434.558%20236.501%20435.942%20231.027%20434.672%20226.576C434.209%20225.124%20434.176%20223.569%20434.579%20222.099C434.982%20220.63%20435.802%20219.309%20436.94%20218.297C437.983%20217.536%20440.013%20216.525%20443.189%20217.922Z'%20fill='%23113C7A'/%3e%3cpath%20d='M447.931%20220.036C447.931%20220.036%20446.593%20220.899%20443.259%20220.422C439.924%20219.945%20439.732%20217.561%20440.015%20217.368C440.333%20217.079%20440.622%20216.759%20440.877%20216.414C440.877%20216.414%20444.404%20218.038%20445.64%20218.515C446.876%20218.992%20447.546%20219.275%20447.546%20219.275L447.931%20220.036Z'%20fill='white'/%3e%3cpath%20d='M433.505%20262.056C433.675%20263.975%20435.489%20265.292%20437.122%20265.997C438.92%20266.735%20440.851%20267.091%20442.793%20267.041C444.784%20267.049%20446.751%20266.615%20448.554%20265.769C450.108%20265.008%20451.752%20263.623%20451.741%20261.738C451.815%20262.376%20451.758%20263.023%20451.572%20263.638C451.387%20264.254%20451.078%20264.824%20450.663%20265.315C449.293%20266.629%20447.557%20267.497%20445.685%20267.802C442.169%20268.529%20437.383%20268.177%20434.718%20265.531C434.262%20265.04%20433.916%20264.456%20433.705%20263.819C433.493%20263.182%20433.421%20262.507%20433.493%20261.84C433.493%20261.84%20433.493%20261.931%20433.505%20262.056Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M436.181%20257.981C432.609%20260.048%20432.586%20263.398%20436.181%20265.465C438.18%20266.484%20440.391%20267.015%20442.634%20267.015C444.877%20267.015%20447.088%20266.484%20449.087%20265.465C452.659%20263.398%20452.671%20260.048%20449.087%20257.981C447.089%20256.96%20444.877%20256.427%20442.634%20256.427C440.391%20256.427%20438.179%20256.96%20436.181%20257.981Z'%20fill='white'/%3e%3cpath%20d='M440.983%20253.808L441.005%20261.791L442.4%20262.598L442.378%20254.614L440.983%20253.808Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M442.377%20254.614L442.4%20262.598L443.806%20261.791L443.784%20253.808L442.377%20254.614Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M440.983%20253.808L442.378%20254.614L443.784%20253.808L442.389%20252.99L440.983%20253.808Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M424.542%20224.136C424.549%20223.878%20424.616%20223.626%20424.739%20223.399C424.862%20223.172%20425.037%20222.977%20425.249%20222.831C425.462%20222.685%20425.706%20222.591%20425.961%20222.557C426.217%20222.524%20426.477%20222.551%20426.719%20222.637C431.256%20224.238%20441.905%20230.439%20442.597%20231.722C443.288%20233.006%20445.307%20240.16%20446.316%20243.749C446.386%20243.991%20446.509%20244.213%20446.677%20244.4C446.846%20244.586%20447.055%20244.732%20447.288%20244.825C447.521%20244.918%20447.772%20244.957%20448.023%20244.938C448.273%20244.918%20448.516%20244.842%20448.732%20244.714L455.049%20240.989C455.317%20240.828%20455.626%20240.748%20455.938%20240.757C456.251%20240.766%20456.554%20240.866%20456.812%20241.043C457.07%20241.22%20457.272%20241.467%20457.394%20241.756C457.516%20242.044%20457.552%20242.362%20457.499%20242.67L456.489%20248.769C456.448%20249.006%20456.354%20249.231%20456.214%20249.427C456.075%20249.624%20455.894%20249.787%20455.684%20249.904L448.88%20253.8C447.018%20254.868%20444.922%20255.459%20442.777%20255.521C440.632%20255.582%20438.505%20255.112%20436.586%20254.152L431.381%20251.54C426.844%20249.268%20424.02%20243.056%20424.202%20237.912L424.542%20224.136Z'%20fill='%233278CC'/%3e%3cpath%20d='M442.574%20231.776C443.209%20233.06%20445.285%20240.214%20446.294%20243.803C446.363%20244.045%20446.487%20244.267%20446.655%20244.454C446.824%20244.64%20447.032%20244.786%20447.266%20244.879C447.499%20244.972%20447.75%20245.011%20448%20244.991C448.251%20244.972%20448.493%20244.896%20448.71%20244.768L455.027%20241.043C455.295%20240.882%20455.604%20240.801%20455.916%20240.811C456.229%20240.82%20456.532%20240.919%20456.79%20241.096C457.048%20241.273%20457.25%20241.521%20457.372%20241.809C457.493%20242.098%20457.53%20242.415%20457.476%20242.724L456.467%20248.822C456.443%20248.96%20456.401%20249.093%20456.342%20249.22L456.093%20249.606C455.971%20249.751%20455.825%20249.874%20455.662%20249.969L448.857%20253.865C447.456%20254.668%20445.918%20255.203%20444.321%20255.443C438.843%20251.185%20439.535%20233.412%20441.52%20231.913C441.758%20231.731%20442.022%20231.586%20442.302%20231.481C442.407%20231.565%20442.499%20231.665%20442.574%20231.776Z'%20fill='%233AAEEF'/%3e%3cpath%20d='M455.052%20225.713C455.052%20225.713%20449.619%20221.068%20448.667%20220.966C447.533%20220.875%20446.591%20222.635%20446.206%20224.259C446.038%20224.886%20446.078%20225.55%20446.319%20226.152C446.56%20226.754%20446.99%20227.261%20447.544%20227.598C448.406%20228.075%20455.936%20231.709%20457.263%20231.709C457.625%20231.697%20457.978%20231.596%20458.29%20231.415C458.603%20231.233%20458.867%20230.977%20459.056%20230.669C459.246%20230.361%20459.357%20230.01%20459.378%20229.648C459.4%20229.287%20459.332%20228.926%20459.18%20228.597C458.318%20227.189%20455.052%20225.713%20455.052%20225.713Z'%20fill='%23113C7A'/%3e%3cpath%20d='M461.368%20220.179C461.498%20219.92%20461.593%20219.645%20461.652%20219.362C461.581%20218.857%20461.581%20218.345%20461.652%20217.84C461.844%20217.079%20462.173%20216.409%20462.321%20215.875C462.695%20215.398%20463.035%20216.261%20462.752%20217.011C462.468%20217.76%20462.559%20218.146%20462.842%20218.203C463.523%20218.007%20464.145%20217.648%20464.657%20217.158C464.986%20216.772%20466.925%20214.887%20467.084%20215.148C467.243%20215.409%20467.277%20215.625%20466.608%20216.341C466.21%20216.689%20465.886%20217.114%20465.655%20217.59C465.625%20217.918%20465.545%20218.24%20465.417%20218.544C465.179%20219.112%20465.417%20219.498%20464.94%20220.02C464.464%20220.543%20463.704%20220.633%20463.319%20220.974L462.933%20221.304L461.368%20220.179Z'%20fill='%23FFAA83'/%3e%3cpath%20d='M457.265%20231.727C457.911%20231.803%20458.564%20231.662%20459.122%20231.327C459.68%20230.992%20460.111%20230.482%20460.35%20229.876C461.427%20227.605%20463.276%20221.665%20463.525%20221.097C463.317%20220.678%20462.992%20220.329%20462.59%20220.091C462.187%20219.853%20461.724%20219.737%20461.257%20219.757C461.257%20219.757%20459.477%20223.255%20458.456%20224.857C457.435%20226.458%20453.863%20231.091%20457.265%20231.727Z'%20fill='%23113C7A'/%3e%3cpath%20d='M450.551%20210.085C450.551%20211.163%20450.232%20212.217%20449.634%20213.113C449.036%20214.01%20448.186%20214.709%20447.191%20215.121C446.196%20215.534%20445.102%20215.642%20444.046%20215.431C442.99%20215.221%20442.02%20214.702%20441.259%20213.94C440.497%20213.177%20439.979%20212.206%20439.769%20211.148C439.559%20210.091%20439.667%20208.995%20440.079%20207.999C440.491%20207.003%20441.188%20206.151%20442.083%20205.552C442.979%20204.953%20444.031%20204.634%20445.108%20204.634C445.823%20204.632%20446.532%20204.772%20447.193%20205.046C447.854%20205.319%20448.455%20205.721%20448.96%20206.227C449.466%20206.734%20449.867%20207.335%20450.14%20207.997C450.413%20208.659%20450.553%20209.369%20450.551%20210.085Z'%20fill='%23FF8654'/%3e%3cpath%20d='M450.553%20210.449C450.553%20210.449%20450.621%20215.911%20449.419%20217.013C448.217%20218.114%20446.402%20215.979%20443.488%20215.298C440.573%20214.617%20445.847%20208.87%20445.847%20208.87L450.553%20210.449Z'%20fill='%23FF8654'/%3e%3cpath%20d='M440.533%20205.61C440.533%20205.61%20446.351%20202.203%20449.605%20205.031C452.86%20207.859%20449.14%20208.983%20448.562%20209.801C447.984%20210.619%20448.562%20211.277%20448.256%20211.868C447.95%20212.458%20447.859%20212.561%20447.859%20212.561L448.063%20213.265L447.711%20213.571C447.711%20213.571%20447.246%20212.254%20446.815%20212.288C446.385%20212.322%20446.044%20213.185%20446.192%20213.685C446.339%20214.185%20446.781%20214.741%20446.702%20215.093C446.623%20215.445%20446.158%20216.41%20445.727%20216.444C444.688%20216.361%20443.67%20216.112%20442.71%20215.706C441.201%20214.78%20439.998%20213.429%20439.251%20211.822C439.028%20211.25%20438.94%20210.633%20438.993%20210.021C439.046%20209.408%20439.239%20208.816%20439.557%20208.29C439.413%20207.798%20439.43%20207.272%20439.606%20206.79C439.781%20206.308%20440.106%20205.895%20440.533%20205.61Z'%20fill='%2396432A'/%3e%3cpath%20opacity='0.43'%20d='M668.681%20149.759L684.513%20149.656L717.481%20131.043L699.2%20122.037L668.681%20149.759Z'%20fill='%23A6D0F4'/%3e%3cpath%20opacity='0.35'%20d='M688.581%20112.949C698.196%20112.949%20705.99%20107.991%20705.99%20101.876C705.99%2095.7606%20698.196%2090.8032%20688.581%2090.8032C678.967%2090.8032%20671.173%2095.7606%20671.173%20101.876C671.173%20107.991%20678.967%20112.949%20688.581%20112.949Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M675.418%2099.2895C675.623%20101.561%20677.766%20103.117%20679.694%20103.957C681.817%20104.836%20684.1%20105.258%20686.396%20105.195C688.748%20105.202%20691.072%20104.686%20693.201%20103.685C695.027%20102.787%20696.977%20101.141%20696.977%2098.9148C697.064%2099.6711%20696.995%20100.437%20696.774%20101.166C696.554%20101.894%20696.187%20102.57%20695.696%20103.151C694.076%20104.711%20692.018%20105.737%20689.799%20106.092C685.637%20106.955%20679.977%20106.535%20676.825%20103.333C676.293%20102.748%20675.893%20102.057%20675.65%20101.304C675.408%20100.552%20675.329%2099.7568%20675.418%2098.9716V99.2895Z'%20fill='%23ADCDFC'/%3e%3cpath%20d='M678.556%2095.1075C674.326%2097.5491%20674.292%20101.513%20678.556%20103.966C680.923%20105.17%20683.54%20105.797%20686.194%20105.797C688.849%20105.797%20691.466%20105.17%20693.832%20103.966C698.063%20101.513%20698.074%2097.5491%20693.832%2095.1075C691.468%2093.8964%20688.85%2093.2649%20686.194%2093.2649C683.539%2093.2649%20680.921%2093.8964%20678.556%2095.1075Z'%20fill='white'/%3e%3cpath%20d='M685.004%2091.8394L685.026%20100.845L686.16%20101.504L686.138%2092.498L685.004%2091.8394Z'%20fill='%23C7D8F2'/%3e%3cpath%20d='M686.144%2092.498L686.166%20101.504L687.3%20100.845L687.278%2091.8394L686.144%2092.498Z'%20fill='%237BAEFF'/%3e%3cpath%20d='M684.482%2090.2053L686.138%2091.1593L687.793%2090.2053L686.149%2089.24L684.482%2090.2053Z'%20fill='%234DA5DC'/%3e%3cpath%20d='M696.881%2059.5533C696.881%2059.5533%20700.283%2061.5521%20701.179%2063.5849C702.075%2065.6177%20701.837%2079.893%20697.096%2086.2186C692.356%2092.5442%20683.567%2093.4414%20681.537%2092.5442C679.507%2091.647%20667.769%2085.7302%20666.873%2082.823C665.977%2079.9157%20670.479%2077.633%20672.963%2076.4974C675.447%2075.3617%20677.023%2073.7831%20678.373%2069.6834C679.722%2065.5837%20680.403%2058.6107%20681.99%2057.4864C683.578%2056.3621%20687.4%2054.5791%20696.881%2059.5533Z'%20fill='%2325437F'/%3e%3cpath%20d='M680.029%2090.57C678.374%2089.8318%20670.265%2085.8002%20666.84%2082.734C666.114%2079.8608%20670.514%2077.6576%20672.964%2076.5446C675.414%2075.4317%20677.024%2073.8304%20678.374%2069.7307C679.723%2065.6309%20680.404%2058.658%20681.991%2057.5337C683.579%2056.4094%20687.401%2054.5923%20696.882%2059.5665C697.895%2060.1825%20698.845%2060.8977%20699.717%2061.7016C700.568%2064.0751%20700.261%2077.9869%20695.589%2084.2103C690.917%2090.4337%20682.059%2091.4331%20680.029%2090.57Z'%20fill='%23254DA1'/%3e%3cpath%20d='M609.514%20118.378L606.985%20116.902L606.917%2087.9197L609.446%2089.396L609.514%20118.378Z'%20fill='%23CB6A50'/%3e%3cpath%20d='M609.446%2089.395L606.917%2087.9186L641.359%2068.0105L643.899%2069.4869L609.446%2089.395Z'%20fill='%23DBDBDB'/%3e%3cpath%20d='M643.9%2069.4895L643.968%2098.4715L609.515%20118.38L609.447%2089.3976L643.9%2069.4895Z'%20fill='%239966D7'/%3e%3cpath%20d='M611.92%2083.8906L611.852%20112.873L670.768%20146.886L670.836%20117.904L611.92%2083.8906Z'%20fill='%23A478D9'/%3e%3cpath%20d='M611.887%20100.108L670.791%20134.121L670.837%20117.904L611.921%2083.8906L611.887%20100.108Z'%20fill='%238C57CC'/%3e%3cpath%20d='M668.621%20149.703L666.092%20148.238L666.024%20119.256L668.553%20120.732L668.621%20149.703Z'%20fill='%238C57CC'/%3e%3cpath%20d='M668.553%20120.731L666.024%20119.254L700.466%2099.335L703.007%20100.811L668.553%20120.731Z'%20fill='%23DBDBDB'/%3e%3cpath%20d='M703.008%20100.814L703.076%20129.796L668.622%20149.704L668.554%20120.733L703.008%20100.814Z'%20fill='%23976EC9'/%3e%3cpath%20d='M707.733%20100.052L707.722%20102.778L668.664%20125.513V122.788L707.733%20100.052Z'%20fill='%238C57CC'/%3e%3cpath%20d='M668.663%20122.79V125.515L601.151%2086.2214L601.163%2083.4958L668.663%20122.79Z'%20fill='%238C57CC'/%3e%3cpath%20d='M707.738%20100.054L668.669%20122.79L601.168%2083.496L640.226%2060.7715L707.738%20100.054Z'%20fill='%23B195D2'/%3e%3cpath%20d='M670.777%20104.115L678.67%20108.703L691.429%20101.332L683.535%2096.7441L670.777%20104.115Z'%20fill='%238C57CC'/%3e%3cpath%20d='M669.325%20101.393L669.336%20103.358L677.229%20107.946L677.218%20105.981L669.325%20101.393Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M677.216%20105.977L677.227%20107.942L689.985%20100.56L689.974%2098.6069L677.216%20105.977Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M669.325%20101.392L677.218%20105.98L689.976%2098.6096L682.094%2094.0215L669.325%20101.392Z'%20fill='white'/%3e%3cpath%20d='M659.536%2094.9864L667.429%2099.5858L680.188%2092.204L672.294%2087.616L659.536%2094.9864Z'%20fill='white'/%3e%3cpath%20d='M666.398%2086.2649C668.212%2087.3097%20668.212%2089.0018%20666.398%2090.0353L654.853%2096.7584C653.847%2097.2737%20652.733%2097.5424%20651.604%2097.5424C650.474%2097.5424%20649.36%2097.2737%20648.355%2096.7584L636.73%2090.0353C634.938%2089.0018%20634.927%2087.3097%20636.73%2086.2649L648.275%2079.5532C649.283%2079.0378%20650.398%2078.769%20651.53%2078.769C652.662%2078.769%20653.777%2079.0378%20654.785%2079.5532L666.398%2086.2649Z'%20fill='%238C57CC'/%3e%3cpath%20d='M656.133%2088.0245C656.135%2088.0548%20656.135%2088.0852%20656.133%2088.1154L656.065%2088.1949H655.997H655.929L651.131%2090.8637L645.926%2087.9905V88.2971L651.086%2091.2839L655.883%2088.6264H655.94L656.008%2088.5583C656.01%2088.5243%20656.01%2088.4902%20656.008%2088.4561V88.0927C656.044%2088.0612%20656.087%2088.0379%20656.133%2088.0245Z'%20fill='%23BAC0D2'/%3e%3cpath%20d='M655.849%2087.5369C655.929%2087.5648%20655.999%2087.617%20656.048%2087.6861C656.097%2087.7553%20656.123%2087.8381%20656.123%2087.923C656.123%2088.0079%20656.097%2088.0907%20656.048%2088.1599C655.999%2088.2291%20655.929%2088.2812%20655.849%2088.3091L651.052%2090.9779L645.926%2087.9912L649.963%2084.9022C650.169%2084.7928%20650.399%2084.7356%20650.632%2084.7356C650.866%2084.7356%20651.095%2084.7928%20651.302%2084.9022L655.849%2087.5369Z'%20fill='white'/%3e%3cpath%20d='M662.942%2076.2336C663.158%2076.369%20663.344%2076.5463%20663.49%2076.755C663.636%2076.9637%20663.739%2077.1996%20663.793%2077.4488L666.276%2094.1202C666.333%2094.5518%20666.061%2094.7108%20665.653%2094.4836L640.396%2079.8564C640.183%2079.7221%20639.999%2079.5464%20639.855%2079.3396C639.711%2079.1329%20639.61%2078.8992%20639.557%2078.6526L637.074%2061.9811C637.006%2061.5382%20637.289%2061.3792%20637.686%2061.6177L662.942%2076.2336Z'%20fill='%23C7C9D7'/%3e%3cpath%20d='M666.672%2093.9753V93.8504L664.2%2077.1789V76.9404V76.8382V76.736L664.12%2076.6338L638.864%2062.0179H637.991H637.64C637.631%2062.0129%20637.621%2062.0103%20637.611%2062.0103C637.601%2062.0103%20637.592%2062.0129%20637.583%2062.0179L637.175%2062.3131C637.205%2062.307%20637.235%2062.307%20637.265%2062.3131H637.39H637.526L637.674%2062.3926L662.941%2076.2363L663.1%2076.3385L663.236%2076.4634L663.372%2076.6111C663.42%2076.659%20663.462%2076.7124%20663.497%2076.7701C663.535%2076.8243%20663.569%2076.8812%20663.599%2076.9404L663.678%2077.1108L663.746%2077.2811C663.752%2077.3378%20663.752%2077.3948%20663.746%2077.4515L666.23%2094.1229C666.236%2094.1682%20666.236%2094.214%20666.23%2094.2592C666.236%2094.2968%20666.236%2094.3352%20666.23%2094.3728V94.4409C666.218%2094.4777%20666.194%2094.5096%20666.162%2094.5318L666.559%2094.2365C666.594%2094.21%20666.621%2094.1748%20666.638%2094.1343V93.9753H666.672Z'%20fill='white'/%3e%3cpath%20opacity='0.2'%20d='M648.944%2085.6511L645.882%2087.9906L651.042%2090.9774L654.671%2088.9559L648.944%2085.6511Z'%20fill='%23777DB2'/%3e%3cpath%20d='M652.132%2080.7118L651.044%2091.3642L645.861%2088.3548L647.891%2078.395L652.132%2080.7118Z'%20fill='%23BAC0D2'/%3e%3cpath%20d='M606.644%20113.464C606.644%20113.464%20607.846%20115.349%20607.676%20116.031C607.506%20116.712%20606.644%20115.69%20606.644%20115.69C606.644%20115.69%20606.905%20117.961%20606.304%20118.438C605.703%20118.915%20605.442%20117.496%20605.442%20117.496C605.2%20117.659%20604.905%20117.723%20604.618%20117.674C604.331%20117.625%20604.074%20117.468%20603.899%20117.234C603.593%20116.631%20603.448%20115.958%20603.478%20115.281C603.507%20114.605%20603.711%20113.948%20604.07%20113.373C604.761%20112.26%20606.644%20113.464%20606.644%20113.464Z'%20fill='%23FF9554'/%3e%3cpath%20d='M610.772%2081.4148C610.772%2081.4148%20607.574%2081.3013%20606.089%2085.7644C604.603%2090.2275%20604.036%2097.2118%20603.82%2099.2674C603.605%20101.323%20603.503%20112.804%20603.616%20113.372C603.787%20113.662%20604.025%20113.906%20604.311%20114.083C604.597%20114.259%20604.922%20114.363%20605.257%20114.386C605.593%20114.408%20605.928%20114.348%20606.235%20114.211C606.542%20114.074%20606.811%20113.864%20607.019%20113.599C607.937%20111.544%20607.914%20102.583%20608.935%2099.1538C609.956%2095.7241%20612.485%2087.025%20612.598%2084.6174C612.652%2083.9614%20612.507%2083.3043%20612.181%2082.7326C611.855%2082.161%20611.364%2081.7016%20610.772%2081.4148Z'%20fill='%23113569'/%3e%3cpath%20d='M631.99%2074.4519C632%2073.9354%20632.084%2073.4229%20632.239%2072.9302C632.5%2072.2033%20631.729%2071.0563%20631.525%2070.3977C631.321%2069.739%20631.525%2069.5005%20631.979%2069.5459C632.432%2069.5913%20633.305%2071.5333%20633.498%2071.8172C633.691%2072.1011%20634.984%2070.2273%20635.381%2070.1592C635.778%2070.091%20636.152%2070.7043%20636.118%2071.1926C636.084%2071.6809%20637.105%2072.862%20636.628%2074.0318C636.152%2075.2015%20634.882%2076.1214%20634.36%2075.8715C633.838%2075.6217%20631.99%2074.4519%20631.99%2074.4519Z'%20fill='%23FF9554'/%3e%3cpath%20opacity='0.35'%20d='M595.057%20146.604C595.057%20153.895%20604.345%20159.812%20615.822%20159.812C627.299%20159.812%20636.575%20153.895%20636.575%20146.604C636.575%20139.313%20627.287%20133.396%20615.822%20133.396C604.356%20133.396%20595.057%20139.302%20595.057%20146.604Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M609.731%20143.59C609.312%20143.793%20608.966%20144.119%20608.738%20144.525C608.511%20144.932%20608.414%20145.398%20608.461%20145.861C608.471%20146.284%20608.551%20146.703%20608.699%20147.099C609.058%20147.392%20609.5%20147.564%20609.962%20147.59C610.424%20147.617%20610.883%20147.497%20611.273%20147.247C612.257%20146.565%20613.04%20145.632%20613.541%20144.544C614.141%20143.727%20614.657%20142.852%20615.084%20141.932C615.197%20141.285%20614.471%20140.796%20613.802%20140.887C612.512%20141.591%20611.29%20142.412%20610.15%20143.34C610.031%20143.434%20609.902%20143.514%20609.765%20143.579L609.731%20143.59Z'%20fill='%23232839'/%3e%3cpath%20d='M608.507%20106.594C608.507%20106.594%20608.235%20115.679%20608.575%20121.187C608.881%20126.093%20608.45%20140.3%20608.348%20143.457C608.321%20143.895%20608.429%20144.331%20608.655%20144.706C608.882%20145.082%20609.218%20145.379%20609.618%20145.558C609.952%20145.679%20610.31%20145.719%20610.663%20145.675C611.016%20145.632%20611.353%20145.506%20611.648%20145.308C611.902%20145.155%20612.121%20144.949%20612.289%20144.704C612.457%20144.459%20612.571%20144.181%20612.624%20143.889C613.236%20140.936%20615.277%20130.874%20615.572%20125.775C615.912%20119.767%20616.219%20112.261%20616.559%20109.876C616.899%20107.491%20608.507%20106.594%20608.507%20106.594Z'%20fill='%23113569'/%3e%3cpath%20d='M621.192%20146.817C620.742%20146.924%20620.336%20147.167%20620.028%20147.512C619.72%20147.857%20619.525%20148.288%20619.468%20148.747C619.399%20149.165%20619.399%20149.591%20619.468%20150.008C619.764%20150.36%20620.16%20150.614%20620.604%20150.736C621.047%20150.858%20621.517%20150.841%20621.952%20150.689C623.07%20150.245%20624.047%20149.502%20624.775%20148.543C625.538%20147.857%20626.23%20147.096%20626.839%20146.272C626.881%20146.117%20626.885%20145.954%20626.851%20145.797C626.818%20145.64%20626.748%20145.493%20626.648%20145.368C626.547%20145.243%20626.419%20145.144%20626.273%20145.078C626.127%20145.012%20625.968%20144.981%20625.807%20144.988C624.401%20145.401%20623.034%20145.941%20621.725%20146.601C621.586%20146.666%20621.442%20146.719%20621.294%20146.76L621.192%20146.817Z'%20fill='%23232839'/%3e%3cpath%20d='M623.76%20108.367C623.76%20108.367%20624.225%20136.213%20623.216%20146.298C623.212%20146.63%20623.135%20146.958%20622.991%20147.258C622.847%20147.557%20622.638%20147.821%20622.381%20148.032C622.123%20148.242%20621.823%20148.393%20621.501%20148.474C621.179%20148.555%20620.843%20148.564%20620.517%20148.501C620.347%20148.501%20619.201%20148.785%20619.008%20148.705C618.101%20148.365%20617.137%20121.449%20616.332%20118.326C615.527%20115.203%20613.134%20112.943%20613.361%20108.367C613.588%20103.79%20620.449%20106.084%20623.76%20108.367Z'%20fill='%23113C7A'/%3e%3cpath%20d='M624.303%20110.578C623.906%20112.599%20618.077%20113.121%20614.72%20112.576C611.363%20112.031%20607.405%20111.27%20607.518%20107.375C607.518%20107.375%20607.836%2089.92%20607.836%2086.8537C607.882%2084.9035%20608.554%2083.0201%20609.752%2081.482C609.752%2081.482%20611.635%2079.3356%20617.544%2080.5394C617.544%2080.5394%20622.352%2081.5842%20624.575%2085.1502C624.575%2085.1502%20626.423%2088.5572%20625.913%2096.6885C625.647%20101.346%20625.11%20105.983%20624.303%20110.578Z'%20fill='%23113C7A'/%3e%3cpath%20d='M612.926%2076.2691C613.196%2077.7025%20613.196%2079.1739%20612.926%2080.6073C612.846%2081.2887%20615.817%2083.5827%20618.448%2082.9808C619.98%2082.6401%20619.9%2081.8452%20619.9%2081.8452C619.153%2080.5839%20618.761%2079.1436%20618.766%2077.6773C618.959%2075.6672%20614.717%2075.8035%20612.926%2076.2691Z'%20fill='%23FF7C40'/%3e%3cpath%20d='M621.268%2082.0607L619.442%2081.0273C619.442%2081.0273%20614.758%2080.5957%20613.08%2079.4941L612.207%2080.7434C612.646%2081.4711%20613.254%2082.0829%20613.978%2082.5274C614.702%2082.972%20615.522%2083.2364%20616.369%2083.2986C617.889%2083.572%20619.457%2083.2596%20620.758%2082.4241L621.268%2082.0607Z'%20fill='%23E1E8F2'/%3e%3cpath%20d='M622.655%2084.6527C622.293%2084.6577%20621.937%2084.7455%20621.614%2084.9091C621.291%2085.0728%20621.009%2085.3081%20620.79%2085.5972C620.572%2085.8863%20620.422%2086.2215%20620.352%2086.5774C620.282%2086.9332%20620.294%2087.3003%20620.387%2087.6508C620.61%2088.525%20621.1%2089.3074%20621.79%2089.888C622.48%2090.4685%20623.334%2090.8181%20624.232%2090.8874C629.029%2091.6029%20638.362%2087.4805%20639.451%2085.3795C640.54%2083.2785%20637.036%2075.4766%20635.425%2074.2841C634.064%2073.4324%20631.807%2074.7384%20632.023%2075.8627C632.238%2076.987%20634.2%2082.5631%20634.291%2082.8583C634.382%2083.1536%20634.11%2083.165%20634.11%2083.165L624.504%2084.5164C623.89%2084.593%20623.273%2084.6385%20622.655%2084.6527Z'%20fill='%23113C7A'/%3e%3cpath%20d='M621.512%2071.262C621.525%2072.4014%20621.2%2073.519%20620.578%2074.4729C619.955%2075.4269%20619.064%2076.174%20618.017%2076.6194C616.969%2077.0648%20615.814%2077.1884%20614.696%2076.9744C613.578%2076.7604%20612.55%2076.2186%20611.74%2075.4177C610.931%2074.6168%20610.377%2073.5931%20610.15%2072.4765C609.923%2071.36%20610.033%2070.2011%20610.465%2069.1471C610.898%2068.0931%20611.633%2067.1916%20612.578%2066.5571C613.523%2065.9226%20614.635%2065.5838%20615.773%2065.5837C617.282%2065.5866%20618.73%2066.1836%20619.804%2067.2459C620.877%2068.3083%20621.491%2069.7508%20621.512%2071.262Z'%20fill='%23FF8654'/%3e%3cpath%20d='M621.513%2071.6276C621.513%2071.6276%20621.581%2077.374%20620.379%2078.5437C619.177%2079.7134%20617.204%2077.4081%20614.13%2076.738C611.057%2076.068%20616.625%2069.9241%20616.625%2069.9241L621.513%2071.6276Z'%20fill='%23FF8654'/%3e%3cpath%20d='M610.956%2066.5292C610.956%2066.5292%20617.091%2062.9746%20620.516%2065.916C623.941%2068.8573%20620.028%2070.0952%20619.382%2070.947C618.735%2071.7987%20619.382%2072.5028%20619.053%2073.1161C618.724%2073.7293%20618.645%2073.8542%20618.645%2073.8542L618.849%2074.5924L618.486%2074.9218C618.486%2074.9218%20618.021%2073.5363%20617.579%2073.5363C617.136%2073.5363%20616.762%2074.4789%20616.921%2075.0126C617.08%2075.5464%20617.533%2076.1483%20617.454%2076.4776C617.375%2076.8069%20616.887%2077.8745%20616.433%2077.9199C615.337%2077.8264%20614.261%2077.562%20613.246%2077.1363C611.663%2076.1551%20610.399%2074.7349%20609.606%2073.0479C609.371%2072.4436%20609.278%2071.793%20609.335%2071.1469C609.392%2070.5008%20609.597%2069.8766%20609.935%2069.323C609.789%2068.809%20609.809%2068.262%20609.992%2067.7602C610.176%2067.2584%20610.513%2066.8275%20610.956%2066.5292Z'%20fill='%2396432A'/%3e%3cpath%20d='M236.658%20220.478L247.715%20223.442L236.703%20239.171L236.692%20235.049L213.886%20248.234L213.863%20238.444L236.669%20225.259L236.658%20220.478Z'%20fill='white'/%3e%3cpath%20d='M607.506%20199.468L618.564%20202.432L607.552%20218.161L607.54%20214.039L584.734%20227.223L584.711%20217.434L607.518%20204.249L607.506%20199.468Z'%20fill='white'/%3e%3cpath%20d='M361.999%20210.934L372.898%20226.061L361.954%20228.559L361.965%20224.596L337.537%20210.48L337.56%20200.781L361.988%20214.898L361.999%20210.934Z'%20fill='white'/%3e%3cpath%20d='M84.669%20223.126C84.669%20223.126%2085.8712%20225.011%2085.7011%20225.704C85.5309%20226.396%2084.669%20225.352%2084.669%20225.352C84.669%20225.352%2084.9299%20227.623%2084.3288%20228.1C83.7277%20228.577%2083.4783%20227.157%2083.4783%20227.157C83.2359%20227.324%2082.9385%20227.39%2082.6487%20227.341C82.3589%20227.292%2082.0993%20227.133%2081.9246%20226.896C81.6177%20226.292%2081.4731%20225.618%2081.505%20224.941C81.5368%20224.264%2081.7439%20223.607%2082.106%20223.035C82.7865%20221.922%2084.669%20223.126%2084.669%20223.126Z'%20fill='%23FF9554'/%3e%3cpath%20d='M88.7642%20191.074C88.7642%20191.074%2085.5547%20190.961%2084.0691%20195.424C82.5834%20199.887%2082.0164%20206.872%2081.8009%20208.927C81.5854%20210.983%2081.4834%20222.464%2081.5968%20223.032C81.7673%20223.322%2082.0059%20223.566%2082.292%20223.742C82.578%20223.919%2082.9027%20224.023%2083.238%20224.045C83.5733%20224.068%2083.9089%20224.008%2084.2158%20223.871C84.5227%20223.734%2084.7916%20223.524%2084.999%20223.259C85.9063%20221.204%2085.8836%20212.255%2086.9043%20208.813C87.925%20205.372%2090.454%20196.685%2090.5674%20194.277C90.6235%20193.624%2090.4815%20192.968%2090.1598%20192.397C89.8381%20191.826%2089.3517%20191.365%2088.7642%20191.074Z'%20fill='%23113569'/%3e%3cpath%20opacity='0.35'%20d='M93.849%20269.47C105.317%20269.47%20114.614%20263.556%20114.614%20256.262C114.614%20248.967%20105.317%20243.054%2093.849%20243.054C82.3808%20243.054%2073.0839%20248.967%2073.0839%20256.262C73.0839%20263.556%2082.3808%20269.47%2093.849%20269.47Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M87.7696%20253.262C87.3488%20253.462%2087%20253.788%2086.7707%20254.195C86.5414%20254.601%2086.4427%20255.068%2086.4881%20255.533C86.501%20255.956%2086.5814%20256.374%2086.7262%20256.771C87.0908%20257.053%2087.5323%20257.216%2087.9922%20257.241C88.452%20257.265%2088.9084%20257.149%2089.3006%20256.907C90.2813%20256.227%2091.064%20255.298%2091.5688%20254.216C92.1687%20253.395%2092.6854%20252.516%2093.1111%20251.592C93.2359%20250.956%2092.4987%20250.457%2091.8296%20250.559C90.5388%20251.261%2089.3163%20252.082%2088.1778%20253.012C88.0587%20253.102%2087.9292%20253.179%2087.7923%20253.239L87.7696%20253.262Z'%20fill='%23232839'/%3e%3cpath%20d='M86.4744%20216.253C86.4744%20216.253%2086.2022%20225.339%2086.5424%20230.847C86.8486%20235.753%2086.4177%20249.96%2086.327%20253.117C86.2944%20253.554%2086.3979%20253.991%2086.6233%20254.367C86.8487%20254.744%2087.1849%20255.041%2087.5858%20255.218C87.9192%20255.34%2088.2766%20255.382%2088.6291%20255.341C88.9817%20255.299%2089.3197%20255.175%2089.6158%20254.979C89.8692%20254.822%2090.0869%20254.614%2090.2549%20254.367C90.4229%20254.121%2090.5374%20253.842%2090.5911%20253.548C91.2035%20250.607%2093.2562%20240.534%2093.5397%20235.435C93.88%20229.427%2094.1862%20221.92%2094.5264%20219.535C94.8666%20217.151%2086.4744%20216.253%2086.4744%20216.253Z'%20fill='%23113569'/%3e%3cpath%20d='M99.222%20256.476C98.7745%20256.585%2098.371%20256.829%2098.0651%20257.173C97.7592%20257.518%2097.5654%20257.948%2097.5095%20258.406C97.4369%20258.823%2097.4369%20259.25%2097.5095%20259.667C97.8043%20260.021%2098.1998%20260.277%2098.6435%20260.401C99.0871%20260.525%2099.5579%20260.51%2099.9931%20260.359C101.11%20259.911%20102.085%20259.169%20102.817%20258.213C103.58%20257.528%20104.271%20256.767%20104.881%20255.942C105.142%20255.34%20104.541%20254.658%20103.849%20254.658C102.44%20255.071%20101.073%20255.614%2099.7663%20256.282C99.627%20256.344%2099.4828%20256.393%2099.3354%20256.43L99.222%20256.476Z'%20fill='%23232839'/%3e%3cpath%20d='M101.785%20218.026C101.785%20218.026%20102.25%20245.873%20101.24%20255.969C101.235%20256.3%20101.157%20256.627%20101.012%20256.925C100.867%20257.223%20100.658%20257.486%20100.401%20257.695C100.144%20257.904%2099.8439%20258.054%2099.5226%20258.134C99.2013%20258.215%2098.8663%20258.224%2098.5411%20258.161C98.371%20258.161%2097.2256%20258.444%2097.0441%20258.365C96.1255%20258.024%2095.1616%20231.109%2094.3564%20227.986C93.5512%20224.863%2091.1582%20222.603%2091.3851%20218.026C91.6119%20213.45%2098.4731%20215.744%20101.785%20218.026Z'%20fill='%23113C7A'/%3e%3cpath%20d='M102.342%20220.236C101.934%20222.258%2096.1044%20222.78%2092.7475%20222.246C89.3906%20221.713%2085.4326%20220.94%2085.546%20217.034C85.546%20217.034%2085.8636%20199.579%2085.8636%20196.524C85.9205%20194.584%2086.5961%20192.714%2087.7915%20191.186C87.7915%20191.186%2089.6628%20189.04%2095.5713%20190.244C95.5713%20190.244%20100.391%20191.3%20102.603%20194.854C102.603%20194.854%20104.451%20198.261%20103.941%20206.393C103.673%20211.034%20103.139%20215.656%20102.342%20220.236Z'%20fill='%23113C7A'/%3e%3cpath%20d='M90.952%20185.964C91.2221%20187.397%2091.2221%20188.868%2090.952%20190.302C90.8726%20190.983%2093.8439%20193.277%2096.475%20192.687C98.006%20192.346%2097.9266%20191.551%2097.9266%20191.551C97.1797%20190.29%2096.7878%20188.849%2096.7925%20187.383C97.0307%20185.328%2092.7438%20185.498%2090.952%20185.964Z'%20fill='%23FF7C40'/%3e%3cpath%20d='M99.2954%20191.722L97.4695%20190.7C97.4695%20190.7%2092.7858%20190.257%2091.1073%20189.156L90.2341%20190.405C90.6738%20191.134%2091.2808%20191.747%2092.0047%20192.193C92.7287%20192.639%2093.5485%20192.906%2094.3962%20192.972C95.9183%20193.242%2097.4862%20192.925%2098.7851%20192.086L99.2954%20191.722Z'%20fill='%23E1E8F2'/%3e%3cpath%20d='M99.5354%20180.913C99.5354%20182.049%2099.1988%20183.16%2098.5683%20184.105C97.9377%20185.05%2097.0415%20185.787%2095.9929%20186.222C94.9444%20186.657%2093.7905%20186.77%2092.6774%20186.549C91.5642%20186.327%2090.5417%20185.78%2089.7392%20184.976C88.9367%20184.172%2088.3901%20183.148%2088.1687%20182.034C87.9473%20180.919%2088.0609%20179.764%2088.4953%20178.714C88.9296%20177.664%2089.6651%20176.766%2090.6088%20176.135C91.5525%20175.503%2092.6619%20175.166%2093.7969%20175.166C95.3188%20175.166%2096.7785%20175.772%2097.8546%20176.849C98.9308%20177.927%2099.5354%20179.389%2099.5354%20180.913Z'%20fill='%23FF8654'/%3e%3cpath%20d='M99.5445%20181.286C99.5445%20181.286%2099.6125%20187.043%2098.4104%20188.202C97.2083%20189.36%2095.2349%20187.066%2092.1616%20186.396C89.0882%20185.726%2094.6566%20179.582%2094.6566%20179.582L99.5445%20181.286Z'%20fill='%23FF8654'/%3e%3cpath%20d='M88.9823%20176.191C88.9823%20176.191%2095.1177%20172.636%2098.5426%20175.578C101.968%20178.519%2098.055%20179.757%2097.4086%20180.62C96.7621%20181.483%2097.4085%20182.176%2097.0797%20182.789C96.7508%20183.402%2096.6714%20183.516%2096.6714%20183.516L96.8755%20184.254L96.5126%20184.583C96.5126%20184.583%2096.025%20183.198%2095.5713%20183.232C95.1177%20183.266%2094.7548%20184.175%2094.9136%20184.708C95.0723%20185.242%2095.526%20185.844%2095.4466%20186.185C95.3672%20186.525%2094.8795%20187.57%2094.4259%20187.616C93.3294%20187.522%2092.2542%20187.258%2091.2391%20186.832C89.6561%20185.851%2088.3914%20184.431%2087.5987%20182.744C87.3635%20182.139%2087.2708%20181.489%2087.3279%20180.843C87.3849%20180.196%2087.5902%20179.572%2087.9276%20179.019C87.7789%20178.496%2087.8011%20177.94%2087.9908%20177.431C88.1806%20176.922%2088.5281%20176.488%2088.9823%20176.191Z'%20fill='%2396432A'/%3e%3cpath%20d='M109.698%20224.2L104.028%20227.607L104.776%20237.635L117.161%20229.969L116.684%20220.407L109.698%20224.2Z'%20fill='%2394C3FF'/%3e%3cpath%20d='M110.776%20221.454C110.776%20221.454%20112.126%20222.873%20112.409%20223.305C112.693%20223.737%20112.84%20225.928%20112.477%20226.212C111.69%20226.714%20110.789%20227.007%20109.858%20227.064C109.291%20226.916%20108.939%20226.632%20108.939%20226.417C108.939%20226.201%20108.803%20224.793%20108.803%20224.793C108.803%20224.793%20107.805%20224.077%20107.737%20223.657C107.707%20223.3%20107.73%20222.94%20107.805%20222.59L110.776%20221.454Z'%20fill='%23FF9554'/%3e%3cpath%20d='M100.629%20192.584C101.648%20193.135%20102.542%20193.89%20103.257%20194.802C103.971%20195.715%20104.489%20196.765%20104.78%20197.888C105.539%20201.488%20107.048%20210.755%20107.048%20210.755L111.21%20221.237C111.111%20221.644%20110.917%20222.022%20110.645%20222.34C110.372%20222.658%20110.028%20222.907%20109.641%20223.067C109.254%20223.226%20108.835%20223.292%20108.418%20223.258C108%20223.224%20107.597%20223.092%20107.241%20222.872C107.241%20222.872%20102.704%20214.162%20101.57%20211.709C100.436%20209.256%2099.302%20197.888%2099.1092%20195.616C99.0222%20195.016%2099.1212%20194.403%2099.393%20193.861C99.6647%20193.319%20100.096%20192.873%20100.629%20192.584Z'%20fill='%23113C7A'/%3e%3cpath%20d='M364.359%20134.939C367.058%20136.495%20367.069%20139.016%20364.359%20140.617C362.853%20141.384%20361.188%20141.784%20359.499%20141.784C357.81%20141.784%20356.145%20141.384%20354.639%20140.617C351.952%20139.062%20351.94%20136.54%20354.639%20134.939C356.145%20134.172%20357.81%20133.772%20359.499%20133.772C361.188%20133.772%20362.853%20134.172%20364.359%20134.939Z'%20fill='%23A6D0F4'/%3e%3cpath%20d='M365.159%20121.041V136.338C365.107%20136.898%20364.908%20137.434%20364.581%20137.891C364.254%20138.348%20363.812%20138.709%20363.299%20138.939C361.894%20139.654%20360.34%20140.027%20358.763%20140.027C357.186%20140.027%20355.632%20139.654%20354.227%20138.939C353.706%20138.706%20353.256%20138.338%20352.925%20137.872C352.594%20137.407%20352.394%20136.862%20352.344%20136.293V121.007C352.393%20121.574%20352.594%20122.119%20352.925%20122.582C353.256%20123.046%20353.706%20123.411%20354.227%20123.641C355.631%20124.359%20357.186%20124.733%20358.763%20124.733C360.34%20124.733%20361.895%20124.359%20363.299%20123.641C363.811%20123.411%20364.253%20123.049%20364.58%20122.592C364.906%20122.135%20365.106%20121.6%20365.159%20121.041Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M363.266%20118.394C365.773%20119.848%20365.795%20122.199%20363.266%20123.652C361.862%20124.37%20360.307%20124.744%20358.73%20124.744C357.153%20124.744%20355.598%20124.37%20354.194%20123.652C351.687%20122.21%20351.676%20119.859%20354.194%20118.406C355.598%20117.689%20357.152%20117.314%20358.728%20117.312C360.305%20117.31%20361.86%20117.681%20363.266%20118.394Z'%20fill='white'/%3e%3cpath%20d='M362.267%20118.962C364.229%20120.097%20364.229%20121.914%20362.267%20123.05C361.175%20123.607%20359.966%20123.898%20358.74%20123.898C357.514%20123.898%20356.306%20123.607%20355.213%20123.05C353.263%20121.914%20353.251%20120.097%20355.213%20118.973C356.303%20118.409%20357.512%20118.114%20358.739%20118.112C359.966%20118.11%20361.175%20118.402%20362.267%20118.962Z'%20fill='%23713336'/%3e%3cpath%20d='M353.838%20121.482C353.838%20121.482%20350.629%20110.795%20349.495%20109.183C349.495%20107.774%20352.421%20109.467%20353.555%20112.124C354.509%20114.926%20355.233%20117.801%20355.721%20120.721C355.721%20120.721%20355.539%20107.014%20357.898%20103.993C359.406%20104.367%20358.465%20119.404%20358.272%20120.539C358.272%20120.539%20362.99%20110.511%20366.109%20108.433C367.527%20108.626%20361.573%20121.005%20361.573%20121.005C361.573%20121.005%20364.022%20116.371%20368.456%20115.52C366.949%20117.729%20365.309%20119.846%20363.546%20121.857C363.546%20121.857%20361.947%20124.321%20357.694%20123.844C357.705%20123.844%20354.779%20123.651%20353.838%20121.482Z'%20fill='%234CA15C'/%3e%3cpath%20d='M231.058%2046.2549L231.069%2048.4808L225.864%2051.4903L225.875%2056.2941L223.732%2057.532L223.721%2050.5023L231.058%2046.2549Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M231.075%2048.4773L251.965%2036.4053V49.6471V55.632L248.2%2057.8125L225.881%2070.7135V56.2907V51.4868L231.075%2048.4773ZM251.398%2055.2913L251.341%2037.4614L226.482%2051.8389V69.6687L251.353%2055.2913'%20fill='%23E6F4FF'/%3e%3cpath%20d='M254.342%2048.2988L254.364%2056.7481L248.24%2060.28V57.8157L252.006%2055.6352L251.994%2049.6503L254.342%2048.2988Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M252.028%2045.9031L273.95%2033.4109V54.9884L291.336%2066.7198'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M243.33%2056.6934H243.398H243.466L243.545%2056.6366H243.613H243.67L243.738%2056.5798V56.523H243.806L243.874%2056.4662L244.01%2056.33L244.067%2056.2732L244.124%2056.205H244.192V56.1369L244.248%2056.0687C244.319%2056.0064%20244.383%2055.938%20244.441%2055.8643L244.498%2055.7962V55.7281L244.555%2055.6599L244.611%2055.5918L244.679%2055.5236L244.906%2055.2284V55.1602L244.963%2055.0807V55.0126L245.224%2054.6265V54.547L245.28%2054.4788L245.564%2054.0019V53.9224V53.8315C245.643%2053.6952%20245.711%2053.5589%20245.779%2053.4227C244.948%2053.3118%20244.111%2053.2511%20243.273%2053.241C243.251%2053.2815%20243.224%2053.3195%20243.194%2053.3545C242.873%2053.8563%20242.447%2054.2825%20241.946%2054.6038C241.758%2054.7243%20241.547%2054.8047%20241.327%2054.8399C241.106%2054.8751%20240.881%2054.8643%20240.665%2054.8082H240.585C240.517%2054.899%20239.043%2056.6366%20238.215%2057.7268L238.295%2057.8063L238.431%2057.8972H238.487L238.646%2057.9653H238.703H238.873H239.882H240.018H240.268H240.415H240.472H240.744H240.824H240.88H240.971H241.062H241.152H241.22L243.33%2056.6934Z'%20fill='%234B5CC0'/%3e%3cpath%20d='M242.196%2053.4647C242.141%2053.5833%20242.076%2053.6972%20242.003%2053.8054C242.219%2053.8615%20242.445%2053.8723%20242.665%2053.8371C242.886%2053.802%20243.096%2053.7216%20243.284%2053.601C243.786%2053.2798%20244.211%2052.8536%20244.532%2052.3518C244.45%2052.3375%20244.375%2052.2977%20244.317%2052.2382C244.215%2051.9725%20244.154%2051.6931%20244.135%2051.4092L243.602%2052.1587C243.52%2052.2863%20243.412%2052.3948%20243.284%2052.4767C243.179%2052.5179%20243.061%2052.5179%20242.956%2052.4767L242.411%2052.3291C242.375%2052.7136%20242.303%2053.0938%20242.196%2053.4647Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M242.081%2050.0277C242.009%2050.0798%20241.928%2050.1183%20241.843%2050.1413L241.718%2051.0839V51.4019C241.712%2051.4623%20241.712%2051.5232%20241.718%2051.5836C241.737%2051.7642%20241.807%2051.9357%20241.919%2052.0783C242.032%2052.221%20242.182%2052.3289%20242.353%2052.3899L242.897%2052.5375C243.003%2052.5787%20243.12%2052.5787%20243.226%2052.5375C243.354%2052.4556%20243.462%2052.3471%20243.544%2052.2195L244.077%2051.47C244.405%2051.009%20244.63%2050.482%20244.734%2049.9255V49.6757V49.051L244.292%2047.6655C244.292%2047.6655%20244.224%2047.5633%20244.065%2047.6655C243.922%2047.7614%20243.798%2047.8849%20243.702%2048.0289C243.283%2048.6308%20243.238%2049.1646%20242.512%2049.6984C242.373%2049.8145%20242.229%2049.9244%20242.081%2050.0277Z'%20fill='%23CBDCEB'/%3e%3cpath%20d='M242.723%2046.82C242.015%2047.47%20241.55%2048.344%20241.408%2049.2958C241.369%2049.7306%20241.407%2050.169%20241.521%2050.5904C241.567%2050.784%20241.628%2050.9738%20241.703%2051.1582V51.0787L241.828%2050.1361C241.913%2050.1132%20241.994%2050.0747%20242.066%2050.0226C242.278%2049.8989%20242.482%2049.7623%20242.678%2049.6137C243.404%2049.0913%20243.449%2048.5462%20243.869%2047.9443C243.965%2047.8003%20244.088%2047.6768%20244.232%2047.5809C244.391%2047.4787%20244.459%2047.5809%20244.459%2047.5809L244.901%2048.9664C244.901%2048.9664%20244.901%2048.7847%20245.003%2048.5462C245.105%2048.3077%20245.128%2047.9784%20245.162%2047.7626C245.21%2047.2124%20245.057%2046.6633%20244.731%2046.2181C244.493%2045.991%20243.858%2046.0478%20243.222%2046.4112C243.043%2046.5301%20242.875%2046.6671%20242.723%2046.82Z'%20fill='%2396432A'/%3e%3cpath%20d='M244.567%2052.3549C244.597%2052.3199%20244.624%2052.2818%20244.647%2052.2413C245.489%2052.2518%20246.329%2052.3124%20247.164%2052.4231C247.842%2051.1363%20248.21%2049.7094%20248.242%2048.2552C248.242%2045.1776%20246.064%2043.9283%20243.376%2045.4842C241.967%2046.3993%20240.794%2047.6361%20239.954%2049.093C239.114%2050.5499%20238.632%2052.1854%20238.545%2053.8653C238.506%2054.4056%20238.587%2054.948%20238.783%2055.4528C238.979%2055.9577%20239.285%2056.4124%20239.679%2056.784L239.6%2056.7045C240.428%2055.5688%20241.868%2053.8767%20241.97%2053.7858H242.049C242.123%2053.6777%20242.187%2053.5637%20242.242%2053.4451C242.338%2053.0731%20242.399%2052.6929%20242.424%2052.3095C242.253%2052.2485%20242.103%2052.1405%20241.99%2051.9979C241.878%2051.8553%20241.808%2051.6838%20241.789%2051.5032C241.771%2051.5374%20241.743%2051.5652%20241.709%2051.5827C241.301%2051.7303%20241.085%2050.9581%20241.346%2050.6514L241.46%2050.5492H241.539C241.425%2050.1278%20241.387%2049.6894%20241.426%2049.2546C241.568%2048.3028%20242.033%2047.4289%20242.741%2046.7788C242.902%2046.6365%20243.077%2046.5109%20243.263%2046.4041C243.898%2046.0406%20244.533%2045.9839%20244.771%2046.211C245.098%2046.6562%20245.251%2047.2053%20245.202%2047.7555C245.202%2047.9713%20245.1%2048.2893%20245.043%2048.5391C245.068%2048.5068%20245.099%2048.4798%20245.134%2048.4596C245.171%2048.4482%20245.211%2048.4482%20245.248%2048.4596C245.508%2048.4596%20245.304%2049.493%20244.919%2049.7883H244.851C244.746%2050.3448%20244.521%2050.8718%20244.193%2051.3328C244.2%2051.6244%20244.258%2051.9126%20244.363%2052.1846C244.409%2052.2631%20244.482%2052.3233%20244.567%2052.3549Z'%20fill='%2358AFFB'/%3e%3cpath%20d='M237.782%2056.8159V57.7358L229.333%2062.6191V61.6993L237.782%2056.8159Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M233.597%2057.0879V58.0078L229.322%2060.4835V59.5523L233.597%2057.0879Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M230.977%2055.9329V56.8641L229.322%2057.8294V56.8868L230.977%2055.9329Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M237.782%2071.5825V72.5024L229.333%2077.3857V76.4659L237.782%2071.5825Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M233.597%2071.8525V72.7724L229.322%2075.2481V74.3169L233.597%2071.8525Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M230.977%2070.6956V71.6268L229.322%2072.5921V71.6495L230.977%2070.6956Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M237.782%2080.6665V81.5864L229.333%2086.4697V85.5498L237.782%2080.6665Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M233.597%2080.9365V81.8564L229.322%2084.3321V83.4009L233.597%2080.9365Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M230.977%2079.7815V80.7127L229.322%2081.678V80.7354L230.977%2079.7815Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M310.242%2026.2321L310.162%2053.4197L294.694%2044.4821L294.773%2017.2944L310.242%2026.2321Z'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M308.224%2027.3716L308.757%2027.0649L308.677%2054.2526L308.144%2054.5592L308.224%2027.3716Z'%20fill='%23BDC5CB'/%3e%3cpath%20d='M292.754%2018.4301L293.287%2018.1121L308.756%2027.0611L308.223%2027.3677L292.754%2018.4301Z'%20fill='white'/%3e%3cpath%20d='M308.222%2027.3698L308.143%2054.5574L292.674%2045.6198L292.753%2018.4321L308.222%2027.3698Z'%20fill='%23EAF1F7'/%3e%3cpath%20d='M297.045%2028.5267V28.7653C297.045%2028.7974%20297.037%2028.829%20297.021%2028.8568C297.005%2028.8847%20296.983%2028.9079%20296.955%2028.924C296.927%2028.9402%20296.896%2028.9487%20296.864%2028.9488C296.832%2028.9489%20296.8%2028.9405%20296.773%2028.9244L295.638%2028.2767C295.611%2028.2598%20295.588%2028.2364%20295.572%2028.2086C295.557%2028.1809%20295.548%2028.1496%20295.547%2028.1176V27.879C295.547%2027.847%20295.555%2027.8154%20295.571%2027.7875C295.587%2027.7597%20295.61%2027.7365%20295.637%2027.7203C295.665%2027.7042%20295.696%2027.6956%20295.728%2027.6956C295.76%2027.6955%20295.792%2027.7039%20295.819%2027.7199L296.954%2028.3676C296.982%2028.3837%20297.005%2028.4069%20297.021%2028.4349C297.037%2028.4628%20297.045%2028.4945%20297.045%2028.5267Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M300.612%2031.7523V31.9908C300.612%2032.0228%20300.604%2032.0544%20300.588%2032.0822C300.573%2032.1101%20300.55%2032.1332%20300.522%2032.1494C300.494%2032.1655%20300.463%2032.174%20300.431%2032.1741C300.399%2032.1742%20300.368%2032.1658%20300.34%2032.1498L295.645%2029.4583C295.617%2029.4422%20295.594%2029.419%20295.578%2029.391C295.562%2029.3631%20295.554%2029.3314%20295.554%2029.2993V29.0608C295.554%2029.0287%20295.562%2028.9972%20295.578%2028.9694C295.594%2028.9415%20295.616%2028.9183%20295.644%2028.9022C295.672%2028.8861%20295.703%2028.8775%20295.735%2028.8774C295.767%2028.8774%20295.799%2028.8858%20295.826%2028.9018L300.521%2031.5933C300.548%2031.6102%20300.571%2031.6336%20300.587%2031.6613C300.603%2031.6891%20300.611%2031.7204%20300.612%2031.7523Z'%20fill='%2394A3C0'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M298.667%2033.0225V33.261C298.667%2033.293%20298.659%2033.3246%20298.643%2033.3524C298.627%2033.3803%20298.604%2033.4035%20298.576%2033.4196C298.549%2033.4357%20298.517%2033.4443%20298.485%2033.4444C298.453%2033.4444%20298.422%2033.436%20298.394%2033.42L295.639%2031.8301C295.61%2031.815%20295.586%2031.792%20295.57%2031.7638C295.554%2031.7357%20295.546%2031.7035%20295.548%2031.6711V31.4326C295.547%2031.4006%20295.556%2031.369%20295.571%2031.3412C295.587%2031.3133%20295.61%2031.2902%20295.638%2031.274C295.665%2031.2579%20295.697%2031.2493%20295.729%2031.2493C295.761%2031.2492%20295.792%2031.2576%20295.82%2031.2736L298.576%2032.8635C298.604%2032.8796%20298.627%2032.9028%20298.643%2032.9308C298.659%2032.9587%20298.667%2032.9904%20298.667%2033.0225Z'%20fill='%2394A3C0'/%3e%3c/g%3e%3cpath%20d='M299.875%2032.5257V32.7642C299.875%2032.7962%20299.867%2032.8278%20299.851%2032.8556C299.835%2032.8835%20299.813%2032.9066%20299.785%2032.9228C299.757%2032.9389%20299.726%2032.9475%20299.694%2032.9475C299.662%2032.9476%20299.63%2032.9392%20299.603%2032.9232L295.645%2030.6519C295.617%2030.6358%20295.594%2030.6126%20295.578%2030.5847C295.562%2030.5567%20295.554%2030.525%20295.554%2030.4929V30.2544C295.554%2030.2223%20295.562%2030.1908%20295.578%2030.163C295.594%2030.1351%20295.616%2030.1119%20295.644%2030.0958C295.672%2030.0797%20295.703%2030.0711%20295.735%2030.071C295.767%2030.071%20295.799%2030.0794%20295.826%2030.0954L299.784%2032.3667C299.812%2032.3828%20299.835%2032.406%20299.851%2032.4339C299.867%2032.4619%20299.875%2032.4935%20299.875%2032.5257Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M297.045%2034.4908V34.7295C297.045%2034.7615%20297.037%2034.7931%20297.021%2034.8209C297.005%2034.8488%20296.983%2034.872%20296.955%2034.8881C296.927%2034.9043%20296.896%2034.9128%20296.864%2034.9129C296.832%2034.913%20296.8%2034.9046%20296.773%2034.8885L295.638%2034.2408C295.611%2034.2239%20295.588%2034.2005%20295.572%2034.1727C295.557%2034.145%20295.548%2034.1137%20295.547%2034.0817V33.8431C295.547%2033.8111%20295.555%2033.7795%20295.571%2033.7516C295.587%2033.7238%20295.61%2033.7006%20295.637%2033.6844C295.665%2033.6683%20295.696%2033.6597%20295.728%2033.6597C295.76%2033.6596%20295.792%2033.668%20295.819%2033.684L296.954%2034.3317C296.982%2034.3478%20297.005%2034.371%20297.021%2034.399C297.037%2034.4269%20297.045%2034.4586%20297.045%2034.4908Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M300.612%2037.7145V37.9529C300.612%2037.985%20300.604%2038.0165%20300.588%2038.0444C300.573%2038.0722%20300.55%2038.0954%20300.522%2038.1115C300.494%2038.1277%20300.463%2038.1362%20300.431%2038.1363C300.399%2038.1363%20300.368%2038.128%20300.34%2038.1119L295.645%2035.4204C295.617%2035.4043%20295.594%2035.3811%20295.578%2035.3532C295.562%2035.3253%20295.554%2035.2936%20295.554%2035.2614V35.0229C295.554%2034.9909%20295.562%2034.9594%20295.578%2034.9315C295.594%2034.9037%20295.616%2034.8805%20295.644%2034.8644C295.672%2034.8482%20295.703%2034.8397%20295.735%2034.8396C295.767%2034.8395%20295.799%2034.8479%20295.826%2034.8639L300.521%2037.5555C300.548%2037.5724%20300.571%2037.5958%20300.587%2037.6235C300.603%2037.6513%20300.611%2037.6825%20300.612%2037.7145Z'%20fill='%2394A3C0'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M298.667%2038.9906V39.229C298.667%2039.2611%20298.659%2039.2926%20298.643%2039.3205C298.627%2039.3483%20298.604%2039.3715%20298.576%2039.3876C298.549%2039.4038%20298.517%2039.4123%20298.485%2039.4124C298.453%2039.4125%20298.422%2039.404%20298.394%2039.388L295.639%2037.7981C295.61%2037.783%20295.586%2037.76%20295.57%2037.7319C295.554%2037.7037%20295.546%2037.6715%20295.548%2037.6391V37.4006C295.547%2037.3686%20295.556%2037.3371%20295.571%2037.3092C295.587%2037.2814%20295.61%2037.2582%20295.638%2037.242C295.665%2037.2259%20295.697%2037.2174%20295.729%2037.2173C295.761%2037.2172%20295.792%2037.2256%20295.82%2037.2416L298.576%2038.8316C298.604%2038.8477%20298.627%2038.8708%20298.643%2038.8988C298.659%2038.9267%20298.667%2038.9584%20298.667%2038.9906Z'%20fill='%2394A3C0'/%3e%3c/g%3e%3cpath%20d='M299.875%2038.4879V38.7264C299.875%2038.7584%20299.867%2038.7899%20299.851%2038.8178C299.835%2038.8456%20299.813%2038.8688%20299.785%2038.8849C299.757%2038.9011%20299.726%2038.9096%20299.694%2038.9097C299.662%2038.9098%20299.63%2038.9014%20299.603%2038.8853L295.645%2036.614C295.617%2036.5979%20295.594%2036.5747%20295.578%2036.5468C295.562%2036.5189%20295.554%2036.4872%20295.554%2036.455V36.2165C295.554%2036.1845%20295.562%2036.153%20295.578%2036.1251C295.594%2036.0973%20295.616%2036.0741%20295.644%2036.0579C295.672%2036.0418%20295.703%2036.0333%20295.735%2036.0332C295.767%2036.0331%20295.799%2036.0415%20295.826%2036.0576L299.784%2038.3289C299.812%2038.345%20299.835%2038.3682%20299.851%2038.3961C299.867%2038.424%20299.875%2038.4557%20299.875%2038.4879Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M316.193%2026.9705H314.492V28.6739H316.193V26.9705Z'%20fill='white'/%3e%3cpath%20d='M321.292%2029.8127H317.323V33.7876H321.292V29.8127Z'%20fill='white'/%3e%3cpath%20d='M525.999%20135.142H524.298V136.845H525.999V135.142Z'%20fill='white'/%3e%3cpath%20d='M531.102%20137.982H527.133V141.957H531.102V137.982Z'%20fill='white'/%3e%3cpath%20d='M625.797%200H624.096V1.70349H625.797V0Z'%20fill='white'/%3e%3cpath%20d='M630.903%202.83838H626.934V6.81319H630.903V2.83838Z'%20fill='white'/%3e%3cpath%20d='M541.221%20108.171H539.52V109.875H541.221V108.171Z'%20fill='white'/%3e%3cpath%20d='M546.324%20111.01H542.354V114.984H546.324V111.01Z'%20fill='white'/%3e%3cpath%20d='M394.448%20207.254H392.747V208.958H394.448V207.254Z'%20fill='white'/%3e%3cpath%20d='M399.547%20210.095H395.578V214.07H399.547V210.095Z'%20fill='white'/%3e%3cpath%20d='M81.4377%20163.34H79.7366V165.044H81.4377V163.34Z'%20fill='white'/%3e%3cpath%20d='M86.5408%20166.177H82.5715V170.152H86.5408V166.177Z'%20fill='white'/%3e%3cpath%20d='M195.978%20272.556H194.277V274.26H195.978V272.556Z'%20fill='white'/%3e%3cpath%20d='M201.082%20275.397H197.112V279.372H201.082V275.397Z'%20fill='white'/%3e%3cpath%20d='M609.762%20152.212V153.132L601.313%20158.016V157.096L609.762%20152.212Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M605.581%20152.484V153.404L601.306%20155.88V154.949L605.581%20152.484Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M602.957%20151.329V152.26L601.301%20153.226L601.29%20152.283L602.957%20151.329Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M401.858%20174.723V175.654L393.409%20180.537V179.606L401.858%20174.723Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M397.677%20174.997V175.928L393.401%20178.392V177.472L397.677%20174.997Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M395.057%20173.847V174.779L393.402%20175.733L393.39%20174.801L395.057%20173.847Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M518.674%20137.212C520.036%20138.1%20521.17%20139.297%20521.984%20140.706C522.797%20142.115%20523.268%20143.696%20523.358%20145.321V152.35C523.358%20155.326%20521.237%20156.53%20518.651%20155.031L512.255%20151.34L509.431%20153.679V149.716L504.804%20147.036C503.443%20146.148%20502.31%20144.95%20501.498%20143.541C500.687%20142.132%20500.218%20140.551%20500.132%20138.927V131.897C500.132%20128.922%20502.252%20127.718%20504.838%20129.217L518.674%20137.212ZM522.904%20152.101V145.082C522.828%20143.603%20522.402%20142.163%20521.663%20140.88C520.924%20139.597%20519.892%20138.507%20518.651%20137.7L504.815%20129.751C502.468%20128.388%20500.551%20129.49%20500.54%20132.192V139.222C500.623%20140.698%20501.051%20142.135%20501.789%20143.415C502.528%20144.695%20503.557%20145.784%20504.793%20146.593L509.851%20149.511V152.589L512.051%20150.783L518.64%20154.588C520.999%20155.95%20522.915%20154.86%20522.915%20152.146'%20fill='white'/%3e%3cpath%20d='M509.963%20136.258V136.86C509.962%20136.94%20509.939%20137.019%20509.898%20137.088C509.857%20137.157%20509.799%20137.215%20509.73%20137.255C509.66%20137.295%20509.581%20137.316%20509.501%20137.316C509.421%20137.317%20509.341%20137.296%20509.271%20137.257L506.436%20135.622C506.367%20135.582%20506.309%20135.524%20506.269%20135.454C506.229%20135.384%20506.209%20135.305%20506.209%20135.224V134.622C506.211%20134.542%20506.233%20134.463%20506.274%20134.394C506.315%20134.325%20506.373%20134.268%20506.443%20134.228C506.513%20134.187%20506.591%20134.166%20506.672%20134.166C506.752%20134.165%20506.831%20134.186%20506.901%20134.225L509.725%20135.86C509.797%20135.899%20509.857%20135.956%20509.899%20136.026C509.94%20136.096%20509.963%20136.176%20509.963%20136.258Z'%20fill='%23F9FBFC'/%3e%3cpath%20d='M518.915%20144.377V144.979C518.914%20145.059%20518.891%20145.138%20518.85%20145.207C518.809%20145.276%20518.751%20145.334%20518.682%20145.374C518.612%20145.414%20518.533%20145.435%20518.453%20145.436C518.373%20145.436%20518.293%20145.416%20518.223%20145.376L506.44%20138.563C506.368%20138.525%20506.307%20138.468%20506.265%20138.397C506.223%20138.327%20506.201%20138.247%20506.202%20138.165V137.563C506.204%20137.483%20506.226%20137.404%20506.267%20137.335C506.308%20137.266%20506.366%20137.208%20506.436%20137.168C506.505%20137.128%20506.584%20137.107%20506.664%20137.106C506.745%20137.106%20506.824%20137.126%20506.894%20137.166L518.688%20143.98C518.756%20144.021%20518.813%20144.08%20518.852%20144.149C518.892%20144.219%20518.914%20144.297%20518.915%20144.377Z'%20fill='%23F9FBFC'/%3e%3cg%20opacity='0.53'%3e%3cpath%20d='M514.066%20147.566V148.168C514.066%20148.248%20514.046%20148.327%20514.006%20148.396C513.967%20148.466%20513.91%20148.524%20513.841%20148.564C513.772%20148.605%20513.693%20148.626%20513.613%20148.626C513.533%20148.626%20513.454%20148.605%20513.385%20148.565L506.445%20144.579C506.372%20144.541%20506.312%20144.484%20506.269%20144.414C506.227%20144.344%20506.206%20144.263%20506.206%20144.182V143.58C506.208%20143.499%20506.23%20143.421%20506.271%20143.351C506.312%20143.282%20506.37%20143.225%20506.44%20143.185C506.51%20143.145%20506.588%20143.124%20506.669%20143.123C506.749%20143.123%20506.828%20143.143%20506.898%20143.182L513.828%20147.157C513.9%20147.198%20513.96%20147.257%20514.002%20147.329C514.044%20147.401%20514.066%20147.483%20514.066%20147.566Z'%20fill='%23F9FBFC'/%3e%3c/g%3e%3cpath%20d='M517.097%20146.319V146.921C517.095%20147.001%20517.073%20147.08%20517.032%20147.149C516.991%20147.218%20516.933%20147.276%20516.863%20147.316C516.793%20147.356%20516.715%20147.377%20516.634%20147.377C516.554%20147.378%20516.475%20147.357%20516.405%20147.318L506.448%20141.64C506.375%20141.602%20506.314%20141.545%20506.272%20141.475C506.23%20141.405%20506.209%20141.324%20506.209%20141.242V140.641C506.211%20140.56%20506.233%20140.481%20506.274%20140.412C506.315%20140.343%20506.373%20140.286%20506.443%20140.246C506.513%20140.206%20506.591%20140.184%20506.672%20140.184C506.752%20140.183%20506.831%20140.204%20506.901%20140.243L516.87%20145.921C516.939%20145.962%20516.997%20146.02%20517.037%20146.089C517.077%20146.159%20517.097%20146.238%20517.097%20146.319Z'%20fill='%23F9FBFC'/%3e%3cpath%20d='M284.927%2030.6317C286.323%2031.5387%20287.484%2032.7638%20288.316%2034.2068C289.148%2035.6497%20289.627%2037.2695%20289.713%2038.9333C289.713%2041.9883%20287.558%2043.2148%20284.904%2041.6816C283.508%2040.7745%20282.345%2039.5496%20281.512%2038.1069C280.678%2036.6641%20280.197%2035.0444%20280.107%2033.38C280.119%2030.3818%20282.273%2029.0872%20284.927%2030.6317Z'%20stroke='%23E6F4FF'%20stroke-width='0.75'%20stroke-miterlimit='10'/%3e%3cpath%20d='M286.657%2034.6392L287.689%2036.4222L283.754%2038.6708L281.837%2035.3546L282.869%2034.7641L283.754%2036.2972L286.657%2034.6392Z'%20fill='white'/%3e%3cpath%20d='M605.057%2054.7488L606.134%2057.6788L609.071%2058.769L606.134%2059.8592L605.057%2062.7892L603.968%2059.8592L601.031%2058.769L603.968%2057.6788L605.057%2054.7488Z'%20fill='white'/%3e%3cpath%20d='M618.664%2045.6648L619.742%2048.5948L622.679%2049.685L619.742%2050.7753L618.664%2053.7052L617.575%2050.7753L614.638%2049.685L617.575%2048.5948L618.664%2045.6648Z'%20fill='white'/%3e%3cpath%20d='M628.591%2059.0103L629.362%2061.1112L631.472%2061.8948L629.362%2062.6784L628.591%2064.7794L627.809%2062.6784L625.699%2061.8948L627.809%2061.1112L628.591%2059.0103Z'%20fill='white'/%3e%3cpath%20d='M384.006%20161.057L391.899%20156.435'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M352.2%20179.716L380.563%20163.078'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M352.575%20180.809C352.575%20181.261%20352.44%20181.702%20352.189%20182.076C351.937%20182.451%20351.579%20182.742%20351.161%20182.912C350.744%20183.082%20350.285%20183.124%20349.843%20183.032C349.402%20182.939%20348.998%20182.717%20348.683%20182.394C348.368%20182.07%20348.157%20181.66%20348.076%20181.216C347.995%20180.772%20348.048%20180.314%20348.228%20179.9C348.409%20179.486%20348.708%20179.135%20349.088%20178.892C349.469%20178.65%20349.913%20178.526%20350.364%20178.538C350.955%20178.552%20351.518%20178.798%20351.931%20179.223C352.344%20179.647%20352.575%20180.216%20352.575%20180.809Z'%20stroke='%23E6F4FF'%20stroke-miterlimit='10'/%3e%3cpath%20d='M559.788%2027.6204L567.681%2022.9983'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M527.982%2046.2785L556.346%2029.6411'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M528.358%2047.4156C528.358%2047.8648%20528.224%2048.304%20527.975%2048.6775C527.726%2049.051%20527.372%2049.3421%20526.957%2049.514C526.543%2049.6859%20526.087%2049.7309%20525.647%2049.6433C525.207%2049.5556%20524.803%2049.3393%20524.486%2049.0217C524.168%2048.704%20523.952%2048.2993%20523.865%2047.8587C523.777%2047.4181%20523.822%2046.9614%20523.994%2046.5464C524.166%2046.1314%20524.456%2045.7767%20524.829%2045.5271C525.202%2045.2775%20525.641%2045.1443%20526.089%2045.1443C526.691%2045.1443%20527.268%2045.3836%20527.693%2045.8095C528.119%2046.2355%20528.358%2046.8132%20528.358%2047.4156Z'%20stroke='%23E6F4FF'%20stroke-miterlimit='10'/%3e%3cpath%20d='M641.44%2021.9437L649.333%2017.3215'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M609.635%2040.5979L637.999%2023.9604'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M610.014%2041.733C610.014%2042.1822%20609.881%2042.6214%20609.632%2042.9949C609.383%2043.3684%20609.028%2043.6595%20608.614%2043.8314C608.199%2044.0033%20607.743%2044.0483%20607.303%2043.9607C606.863%2043.873%20606.459%2043.6567%20606.142%2043.3391C605.825%2043.0214%20605.609%2042.6167%20605.521%2042.1761C605.434%2041.7355%20605.479%2041.2788%20605.65%2040.8638C605.822%2040.4488%20606.113%2040.094%20606.486%2039.8445C606.859%2039.5949%20607.297%2039.4617%20607.746%2039.4617C608.347%2039.4617%20608.924%2039.701%20609.35%2040.1269C609.775%2040.5529%20610.014%2041.1306%20610.014%2041.733Z'%20stroke='%23E6F4FF'%20stroke-miterlimit='10'/%3e%3cpath%20d='M10.4121%20314.616L2.53021%20309.993'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M42.2219%20333.27L13.8471%20316.633'%20stroke='%23E6F4FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M41.8344%20334.359C41.8344%20334.808%2041.9675%20335.247%2042.2167%20335.621C42.4659%20335.994%2042.8202%20336.285%2043.2346%20336.457C43.6491%20336.629%2044.1051%20336.674%2044.5451%20336.586C44.9851%20336.499%2045.3892%20336.282%2045.7065%20335.965C46.0237%20335.647%2046.2397%20335.242%2046.3272%20334.802C46.4147%20334.361%2046.3698%20333.905%2046.1981%20333.49C46.0265%20333.074%2045.7357%20332.72%2045.3627%20332.47C44.9897%20332.221%2044.5512%20332.087%2044.1026%20332.087C43.5011%20332.087%2042.9241%20332.327%2042.4988%20332.753C42.0734%20333.179%2041.8344%20333.756%2041.8344%20334.359Z'%20stroke='%23E6F4FF'%20stroke-miterlimit='10'/%3e%3cpath%20d='M537.046%20165.261V166.181L545.495%20171.075V170.144L537.046%20165.261Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M541.227%20165.537V166.457L545.502%20168.932V168.012L541.227%20165.537Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M543.852%20164.374V165.305L545.507%20166.27L545.519%20165.339L543.852%20164.374Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M544.63%20195.469C544.85%20195.797%20545.136%20196.075%20545.47%20196.287L545.663%20196.389C545.322%20196.264%20544.982%20196.105%20544.63%20195.935V195.469Z'%20fill='%23747878'/%3e%3cpath%20d='M544.5%20177.641L544%20177.322L544.114%20177.39L544.432%20177.595L544.5%20177.641Z'%20fill='%236C7070'/%3e%3cpath%20d='M544.209%20192.554L544.437%20192.668L544.209%20192.554Z'%20fill='%23747878'/%3e%3cpath%20d='M545.176%20193C545.002%20192.949%20544.817%20192.949%20544.642%20193V192.783C544.816%20192.865%20544.995%20192.937%20545.176%20193Z'%20fill='%23747878'/%3e%3cpath%20d='M545.292%20178.223L545.655%20178.53C545.299%20178.218%20544.919%20177.933%20544.521%20177.677L544.657%20177.768V177.564C544.834%20177.814%20545.048%20178.037%20545.292%20178.223Z'%20fill='%23747878'/%3e%3cpath%20d='M544.046%20174.202C544.273%20174.327%20544.488%20174.463%20544.693%20174.599V175.065C544.513%20175.142%20544.364%20175.276%20544.268%20175.447C544.172%20175.617%20544.134%20175.814%20544.16%20176.008C544.185%20176.567%20544.37%20177.107%20544.693%20177.563V177.768C544.486%20177.618%20544.27%20177.482%20544.046%20177.359C540.44%20175.269%20537.491%20176.95%20537.48%20181.118C537.595%20183.393%20538.247%20185.609%20539.382%20187.583C540.518%20189.557%20542.104%20191.233%20544.012%20192.475L544.216%20192.588L544.454%20192.713L544.659%20192.804V193.02C544.479%20193.095%20544.329%20193.226%20544.231%20193.394C544.133%20193.562%20544.092%20193.758%20544.114%20193.951C544.137%20194.51%20544.323%20195.051%20544.647%20195.507V195.972L544.466%20195.882L544.001%20195.632C538.863%20192.656%20534.724%20185.411%20534.735%20179.562C534.747%20173.713%20538.92%20171.204%20544.046%20174.202Z'%20stroke='%23E6F4FF'%20stroke-width='0.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M545.544%20175.222L545.725%20175.347H545.805C549.516%20178.466%20552.069%20182.747%20553.051%20187.498C553.056%20187.54%20553.056%20187.582%20553.051%20187.623V187.759C553.055%20187.805%20553.055%20187.85%20553.051%20187.896C553.054%20187.941%20553.054%20187.987%20553.051%20188.032V188.168C553.049%20188.214%20553.049%20188.259%20553.051%20188.305C553.051%20188.373%20553.051%20188.407%20553.051%20188.452C553.056%20188.547%20553.056%20188.642%20553.051%20188.736V188.861V190.837C553.048%20190.879%20553.048%20190.92%20553.051%20190.962C553.054%20191.004%20553.054%20191.045%20553.051%20191.087C553.06%20191.128%20553.06%20191.171%20553.051%20191.212C553.059%20191.253%20553.059%20191.295%20553.051%20191.337C553.051%20191.405%20553.051%20191.428%20553.051%20191.462C553.051%20191.496%20553.051%20191.553%20553.051%20191.575C553.051%20191.598%20553.051%20191.757%20553.051%20191.836C553.051%20191.916%20553.051%20191.916%20553.051%20191.95V192.064V192.177V192.279C553.049%20192.317%20553.049%20192.355%20553.051%20192.393V192.507C553.048%20192.544%20553.048%20192.582%20553.051%20192.62C553.047%20192.658%20553.047%20192.696%20553.051%20192.734C552.144%20196.141%20549.309%20197.628%20545.77%20196.356H545.702L545.51%20196.254C545.111%20195.994%20544.779%20195.644%20544.54%20195.232C544.302%20194.819%20544.164%20194.356%20544.137%20193.881C544.115%20193.687%20544.156%20193.492%20544.254%20193.324C544.352%20193.156%20544.502%20193.024%20544.682%20192.949C544.856%20192.899%20545.041%20192.899%20545.215%20192.949H545.283C546.17%20193.309%20547.152%20193.361%20548.073%20193.097H548.186H548.288H548.402L548.492%20193.04H548.594H548.685L548.787%20192.983L548.878%20192.927L548.98%20192.859L549.059%20192.79L549.15%20192.722L549.229%20192.643L549.32%20192.563L549.4%20192.484L549.479%20192.393L549.558%20192.302V192.245V192.177L549.626%20192.075L549.694%20191.973C549.721%20191.937%20549.743%20191.899%20549.762%20191.859L549.831%20191.746V191.643C549.854%20191.608%20549.873%20191.57%20549.887%20191.53C549.892%20191.488%20549.892%20191.446%20549.887%20191.405V191.28V191.155V191.019V190.894C549.884%20190.848%20549.884%20190.803%20549.887%20190.758V190.621C549.884%20190.576%20549.884%20190.53%20549.887%20190.485C549.89%20190.436%20549.89%20190.387%20549.887%20190.337C549.89%20190.284%20549.89%20190.231%20549.887%20190.178C549.892%20190.129%20549.892%20190.08%20549.887%20190.031C549.887%20190.031%20549.887%20189.929%20549.887%20189.883C549.887%20189.838%20549.887%20189.781%20549.887%20189.736C549.887%20189.69%20549.887%20189.622%20549.887%20189.565C549.887%20189.508%20549.887%20189.452%20549.887%20189.406C549.887%20189.361%20549.887%20189.293%20549.887%20189.236V189.065C549.887%20188.997%20549.887%20188.941%20549.887%20188.895C549.893%20188.838%20549.893%20188.781%20549.887%20188.725V188.554C549.894%20188.498%20549.894%20188.441%20549.887%20188.384C549.894%20188.324%20549.894%20188.263%20549.887%20188.202C549.894%20188.146%20549.894%20188.089%20549.887%20188.032C549.887%20187.953%20549.887%20187.896%20549.887%20187.839C549.887%20187.669%20549.887%20187.669%20549.887%20187.498C549.882%20187.438%20549.882%20187.377%20549.887%20187.317C549.883%20187.256%20549.883%20187.195%20549.887%20187.135V186.953C549.887%20186.76%20549.808%20186.59%20549.774%20186.408C549.767%20186.348%20549.767%20186.287%20549.774%20186.226L549.672%20185.863C548.932%20183.323%20547.554%20181.016%20545.668%20179.163L545.555%20179.049L545.419%20178.924L545.351%20178.856L545.271%20178.788L544.897%20178.47C544.665%20178.281%20544.463%20178.059%20544.296%20177.811C543.973%20177.354%20543.788%20176.814%20543.763%20176.255C543.737%20176.061%20543.775%20175.864%20543.872%20175.694C543.968%20175.524%20544.117%20175.39%20544.296%20175.313C544.472%20175.177%20544.684%20175.096%20544.906%20175.079C545.128%20175.063%20545.35%20175.113%20545.544%20175.222Z'%20fill='%2358AFFB'/%3e%3cpath%20d='M545.724%20175.349L545.543%20175.224C545.291%20175.06%20544.985%20175.003%20544.692%20175.065V174.61C544.998%20174.837%20545.395%20175.087%20545.724%20175.349Z'%20fill='%23747878'/%3e%3cpath%20d='M579.805%2062.4946V63.4145L571.356%2068.2978V67.378L579.805%2062.4946Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M575.616%2062.7666V63.6865L571.341%2066.1622V65.231L575.616%2062.7666Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M573%2061.6077V62.5389L571.344%2063.5042L571.333%2062.573L573%2061.6077Z'%20fill='%23E6F4FF'/%3e%3cpath%20d='M548.123%2073.3742L548.214%20102.413L564.726%2092.8622L564.646%2063.8347L548.123%2073.3742Z'%20stroke='%23E6F4FF'%20stroke-width='0.8'%20stroke-miterlimit='10'/%3e%3cpath%20d='M550.291%2074.5995L549.713%2074.2588L549.803%20103.298L550.37%20103.627L550.291%2074.5995Z'%20fill='%23BDC5CB'/%3e%3cpath%20d='M566.803%2065.049L566.236%2064.7083L549.713%2074.2591L550.291%2074.5998L566.803%2065.049Z'%20fill='white'/%3e%3cpath%20d='M550.291%2074.5985L550.371%20103.626L566.883%2094.075L566.803%2065.0476L550.291%2074.5985Z'%20fill='%23EAF1F7'/%3e%3cpath%20d='M561.945%2078.3853L561.957%2079.3051L553.496%2084.1998V83.2686L561.945%2078.3853Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M557.76%2078.6553L557.772%2079.5752L553.496%2082.0509V81.131L557.76%2078.6553Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M555.148%2077.4963L555.16%2078.4276L553.492%2079.3929V78.4616L555.148%2077.4963Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M561.945%2087.6621L561.957%2088.582L553.496%2093.4653V92.5454L561.945%2087.6621Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M557.76%2087.9321L557.772%2088.852L553.496%2091.3278V90.3965L557.76%2087.9321Z'%20fill='%2394A3C0'/%3e%3cpath%20d='M555.148%2086.7771L555.16%2087.7083L553.492%2088.6736V87.731L555.148%2086.7771Z'%20fill='%2394A3C0'/%3e%3c/svg%3e`,ih=`data:image/svg+xml,%3csvg%20width='22'%20height='32'%20viewBox='0%200%2022%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.1593%2014.3814C17.2069%2015.0272%205.56056%2018.3882%205.56056%2018.3882C4.03868%2021.4659%2011.1005%2023.4995%2011.1005%2023.4995C6.62739%2019.7609%2013.9819%2017.901%2018.4833%2016.4868C23.7193%2014.8403%2020.7473%2012.4385%2020.7473%2012.4385C21.0173%2013.2089%2020.6906%2013.8716%2019.1574%2014.3776'%20fill='white'/%3e%3cpath%20d='M19.9428%2015.3237C18.6683%2015.7448%2014.2688%2016.9796%2010.7945%2018.3807C6.36106%2020.1763%2011.1004%2023.5014%2011.1004%2023.5014C6.62729%2019.7628%2013.9818%2017.903%2018.4832%2016.4887C23.7211%2014.8403%2020.7491%2012.4404%2020.7491%2012.4404C21.4477%2013.36%2021.476%2014.8177%2019.9428%2015.3237Z'%20fill='white'/%3e%3cpath%20d='M5.56915%2023.6885C8.14464%2026.9022%2013.0124%2030.0007%2015.7314%2031.5887C16.8794%2032.259%2018.3295%2032.0966%2019.3001%2031.1903C20.1007%2030.4425%2020.1422%2029.1869%2019.3945%2028.3863C19.2472%2028.2277%2019.0754%2028.0955%2018.8847%2027.9936C16.1657%2026.5321%2011.7624%2024.0756%208.74509%2021.923C4.09636%2018.6111%207.66693%2017.7822%207.66693%2017.7822C3.3392%2018.7414%202.58392%2019.9688%205.56915%2023.6828'%20fill='white'/%3e%3cpath%20d='M3.38919%2016.1084C-1.84676%2017.753%201.12525%2020.1567%201.12525%2020.1567C0.853355%2019.3844%201.1819%2018.7235%202.71511%2018.2175C4.67505%2017.5698%2016.312%2014.207%2016.312%2014.207C17.8357%2011.1292%2010.7739%209.09375%2010.7739%209.09375C15.2433%2012.8324%207.88875%2014.6941%203.38919%2016.1084Z'%20fill='white'/%3e%3cpath%20d='M3.38919%2016.1084C-1.84676%2017.753%201.12525%2020.1567%201.12525%2020.1567C0.426624%2019.2371%200.38886%2017.7794%201.92962%2017.2734C3.20604%2016.8523%207.60552%2015.6174%2011.0798%2014.2164C15.5114%2012.4207%2010.7739%209.09375%2010.7739%209.09375C15.2433%2012.8324%207.88875%2014.6941%203.38919%2016.1084Z'%20fill='white'/%3e%3cpath%20d='M2.57331%201.40596C1.77272%202.15368%201.72929%203.40933%202.47701%204.20992C2.62429%204.36853%202.79612%204.5007%202.98682%204.60266C5.70771%206.06412%2010.111%208.51877%2013.1283%2010.6732C17.777%2013.9851%2014.2065%2014.814%2014.2065%2014.814C18.5323%2013.8529%2019.2895%2012.6275%2016.3042%208.9134C13.7287%205.6997%208.86098%202.59929%206.1401%201.01321C4.99397%200.342905%203.54195%200.50529%202.57331%201.41162'%20fill='white'/%3e%3cg%20opacity='0.3'%3e%3cpath%20d='M15.6146%2014.4409C15.8714%2014.3635%2016.1093%2014.2823%2016.3264%2014.1973C16.4284%2014.0293%2016.4945%2013.8404%2016.519%2013.646C16.5473%2013.391%2016.5152%2013.1324%2016.4227%2012.8907C16.3377%2012.6622%2016.2207%2012.447%2016.0791%2012.2487C15.9431%2012.0523%2015.7921%2011.8692%2015.6278%2011.6973C15.303%2011.365%2014.9518%2011.0572%2014.5798%2010.7778C13.8434%2010.2264%2013.0655%209.72607%2012.2895%209.23325C11.5134%208.74232%2010.7223%208.27405%209.92923%207.81333C8.34315%206.89378%206.73441%206.00633%205.13134%205.12077L3.93045%204.45235C3.52826%204.24087%203.17328%203.95009%202.88817%203.597C2.75033%203.41951%202.65026%203.2137%202.5955%202.99467C2.54263%202.77564%202.55396%202.54528%202.6276%202.33191C2.70312%202.11855%202.82019%201.92218%202.97125%201.75413C3.04677%201.66916%203.12797%201.58797%203.21294%201.51055L3.34133%201.40103L3.40931%201.34817L3.44518%201.32173L3.46218%201.30851C3.46218%201.30851%203.47351%201.31795%203.46218%201.29152C3.45085%201.26509%203.46218%201.29152%203.44707%201.28019H3.43763L3.42064%201.29341L3.38476%201.31984L3.31679%201.37082L3.18272%201.48034C3.09587%201.55587%203.01279%201.63706%202.93537%201.72392C2.77488%201.89385%202.65026%202.094%202.56717%202.31303C2.48787%202.53584%202.47276%202.77564%202.52375%203.006C2.5785%203.23447%202.67858%203.44783%202.82019%203.63476C3.1072%204.00107%203.46595%204.30507%203.8738%204.52977L5.06525%205.21707C6.657%206.13662%208.24874%207.03728%209.81783%207.9776C10.6014%208.44965%2011.3794%208.93303%2012.1479%209.43151C12.9145%209.92999%2013.6754%2010.4455%2014.3929%2010.9968C14.7498%2011.2725%2015.0821%2011.5765%2015.3918%2011.905C15.6977%2012.2166%2015.9375%2012.5867%2016.0998%2012.9926C16.1678%2013.1833%2016.1924%2013.3892%2016.1678%2013.5912C16.1376%2013.7876%2016.0564%2013.9745%2015.9299%2014.1293C15.8355%2014.2445%2015.7279%2014.3484%2015.607%2014.4371'%20fill='white'/%3e%3c/g%3e%3c/svg%3e`,ah=`data:image/svg+xml,%3csvg%20width='89'%20height='21'%20viewBox='0%200%2089%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.4537%209.65056L5.6297%2017.2781H12.9309C13.4136%2017.243%2013.8916%2017.3924%2014.2685%2017.696C14.4166%2017.8312%2014.5335%2017.997%2014.6112%2018.1818C14.6889%2018.3667%2014.7255%2018.5662%2014.7185%2018.7666C14.7242%2018.9592%2014.6875%2019.1507%2014.6111%2019.3276C14.5346%2019.5045%2014.4202%2019.6624%2014.2759%2019.7902C13.9792%2020.0539%2013.5309%2020.1858%2012.9309%2020.1858H2.83086C2.12127%2020.1858%201.59463%2020.0325%201.24107%2019.7209C1.0652%2019.5615%200.926946%2019.3651%200.836296%2019.1457C0.745646%2018.9264%200.704869%2018.6896%200.716905%2018.4526C0.728826%2018.0998%200.858518%2017.7612%201.0853%2017.4908C1.3309%2017.1611%201.84023%2016.5677%202.61329%2015.7106C3.43744%2014.8007%204.17918%2013.9766%204.83851%2013.2381C5.50608%2012.4964%206.12667%2011.8115%206.70028%2011.1687C7.27389%2010.5258%207.74861%209.98434%208.1269%209.5393C8.50519%209.09426%208.80683%208.71103%209.03429%208.39208H3.5009C2.9168%208.41478%202.33277%208.34553%201.77017%208.18686C1.37787%208.0517%201.18173%207.69237%201.18173%207.10887C1.17386%206.91572%201.2098%206.7233%201.28688%206.54603C1.36395%206.36876%201.48015%206.21123%201.62677%206.08526C1.98683%205.80907%202.43488%205.6729%202.88773%205.70203H11.4425C12.0692%205.66774%2012.6949%205.78744%2013.2647%206.05065C13.6867%206.28306%2013.8985%206.69926%2013.9001%207.29924C13.8974%207.51195%2013.8555%207.72233%2013.7765%207.91984C13.7093%208.10655%2013.6179%208.28361%2013.5045%208.44647C13.4032%208.58246%2013.2573%208.74811%2013.0941%208.94097C12.9309%209.13382%2012.7084%209.37118%2012.4537%209.64562'%20fill='white'/%3e%3cpath%20d='M17.2637%203.64451C16.7764%203.65633%2016.3022%203.4862%2015.9335%203.16732C15.7567%202.99393%2015.6165%202.78678%2015.5212%202.55816C15.4259%202.32955%2015.3776%202.08413%2015.3789%201.83647C15.3803%201.58881%2015.4314%201.34394%2015.5292%201.11641C15.6271%200.888871%2015.7696%200.683299%2015.9483%200.511889C16.3048%200.178623%2016.7758%20-0.00464918%2017.2637%208.96584e-05C17.7334%20-0.00408682%2018.1889%200.160906%2018.5469%200.464912C18.7373%200.632%2018.8868%200.84066%2018.9837%201.07475C19.0806%201.30884%2019.1223%201.56208%2019.1057%201.81488C19.1194%202.06527%2019.0778%202.31562%2018.9838%202.5481C18.8898%202.78058%2018.7457%202.98947%2018.5617%203.15991C18.2073%203.48319%2017.7434%203.65992%2017.2637%203.6544M19.1057%207.50404V18.2716C19.1057%2019.0134%2018.9301%2019.5821%2018.5741%2019.9628C18.4037%2020.15%2018.1948%2020.2981%2017.9618%2020.3972C17.7288%2020.4962%2017.4772%2020.5437%2017.2241%2020.5364C16.9723%2020.5445%2016.7219%2020.4961%2016.4913%2020.3947C16.2607%2020.2933%2016.0557%2020.1415%2015.8915%2019.9505C15.5503%2019.5598%2015.3797%2018.9986%2015.3797%2018.2716V7.60294C15.3797%206.86614%2015.5503%206.31066%2015.8915%205.93649C16.0602%205.75283%2016.2667%205.6078%2016.4967%205.51136C16.7267%205.41491%2016.9749%205.36933%2017.2241%205.37771C17.4758%205.37068%2017.7261%205.41681%2017.9587%205.5131C18.1913%205.60938%2018.401%205.75366%2018.5741%205.93649C18.9496%206.3654%2019.1406%206.92517%2019.1057%207.49415'%20fill='white'/%3e%3cpath%20d='M24.8301%207.43997V7.88996C25.3957%207.10255%2026.1308%206.45199%2026.9811%205.98616C27.8125%205.56827%2028.7334%205.3595%2029.6637%205.37793C30.5817%205.36311%2031.4882%205.58356%2032.2969%206.0183C33.0505%206.42702%2033.6562%207.06291%2034.0276%207.83557C34.2757%208.29687%2034.4375%208.79962%2034.5048%209.31905C34.5864%209.98918%2034.6227%2010.664%2034.6136%2011.3391V18.262C34.6136%2019.0087%2034.443%2019.5724%2034.1018%2019.9531C33.9362%2020.141%2033.731%2020.2899%2033.501%2020.3891C33.271%2020.4883%2033.0219%2020.5353%2032.7716%2020.5268C32.5172%2020.5353%2032.2641%2020.4872%2032.0306%2020.3858C31.7971%2020.2845%2031.5891%2020.1325%2031.4217%2019.9408C31.0755%2019.5501%2030.9024%2018.9889%2030.9024%2018.262V12.0511C30.9024%2010.8149%2030.7318%209.88524%2030.3906%209.23251C30.0494%208.57978%2029.3695%208.25836%2028.3508%208.25836C27.6969%208.25479%2027.0594%208.46296%2026.5336%208.85175C25.9783%209.26214%2025.5602%209.83104%2025.3344%2010.4836C25.1515%2011.0374%2025.06%2012.0742%2025.06%2013.594V18.262C25.06%2019.0169%2024.8853%2019.5831%2024.5358%2019.9606C24.3635%2020.1468%2024.153%2020.2938%2023.9188%2020.3915C23.6846%2020.4892%2023.4321%2020.5353%2023.1784%2020.5268C22.9279%2020.5335%2022.679%2020.4845%2022.4498%2020.3831C22.2206%2020.2818%2022.0168%2020.1307%2021.8532%2019.9408C21.5071%2019.5501%2021.334%2018.9889%2021.334%2018.262V7.49436C21.334%206.78477%2021.4897%206.25813%2021.7988%205.90457C21.958%205.72826%2022.1543%205.58954%2022.3737%205.49845C22.5931%205.40737%2022.8299%205.3662%2023.0672%205.37793C23.3787%205.37314%2023.6856%205.4535%2023.9548%205.61034C24.2293%205.77571%2024.45%206.01702%2024.5902%206.30511C24.7616%206.6584%2024.8463%207.04742%2024.8375%207.43997'%20fill='white'/%3e%3cpath%20d='M40.2031%207.43997V7.88996C40.7688%207.10255%2041.5038%206.45199%2042.3542%205.98616C43.1847%205.56829%2044.1047%205.3595%2045.0343%205.37793C45.9531%205.36279%2046.8605%205.58325%2047.67%206.0183C48.4231%206.4277%2049.0285%207.06339%2049.4007%207.83557C49.6477%208.29734%2049.8093%208.79988%2049.8779%209.31905C49.9582%209.98929%2049.9945%2010.6641%2049.9867%2011.3391V18.262C49.9867%2019.0087%2049.8161%2019.5724%2049.4749%2019.9531C49.3093%2020.141%2049.1041%2020.2899%2048.8741%2020.3891C48.6441%2020.4883%2048.395%2020.5353%2048.1447%2020.5268C47.89%2020.5347%2047.6367%2020.4862%2047.403%2020.3849C47.1692%2020.2836%2046.9606%2020.132%2046.7922%2019.9408C46.4461%2019.5501%2046.2755%2018.9889%2046.2755%2018.262V12.0511C46.2755%2010.8149%2046.1049%209.88524%2045.7637%209.23251C45.4225%208.57978%2044.7401%208.25836%2043.7214%208.25836C43.0683%208.25514%2042.4317%208.4633%2041.9066%208.85175C41.3499%209.26122%2040.9308%209.83035%2040.705%2010.4836C40.5237%2011.0374%2040.433%2012.0742%2040.433%2013.594V18.262C40.433%2019.0169%2040.2575%2019.5831%2039.9064%2019.9606C39.7344%2020.1472%2039.524%2020.2945%2039.2897%2020.3922C39.0554%2020.4899%2038.8027%2020.5358%2038.549%2020.5268C38.2989%2020.5332%2038.0505%2020.4839%2037.8217%2020.3826C37.5929%2020.2813%2037.3896%2020.1303%2037.2263%2019.9408C36.8801%2019.5501%2036.707%2018.9889%2036.707%2018.262V7.49436C36.707%206.78477%2036.8628%206.25813%2037.1719%205.90457C37.331%205.72826%2037.5274%205.58954%2037.7468%205.49845C37.9661%205.40737%2038.203%205.3662%2038.4402%205.37793C38.7517%205.37314%2039.0587%205.4535%2039.3279%205.61034C39.6023%205.77571%2039.823%206.01702%2039.9633%206.30511C40.1346%206.6584%2040.2194%207.04742%2040.2105%207.43997'%20fill='white'/%3e%3cpath%20d='M62.5909%2013.8682H55.3045C55.2961%2014.6445%2055.4706%2015.4119%2055.8138%2016.1083C56.0972%2016.7002%2056.5443%2017.1985%2057.1021%2017.5442C57.6599%2017.8899%2058.3051%2018.0686%2058.9613%2018.059C59.3736%2018.0634%2059.7846%2018.0109%2060.1827%2017.9033C60.5618%2017.7916%2060.9225%2017.625%2061.2533%2017.4088C61.5893%2017.1934%2061.9091%2016.9538%2062.2101%2016.6918C62.5002%2016.4363%2062.8777%2016.091%2063.3425%2015.6558C63.5761%2015.4765%2063.8671%2015.3885%2064.1609%2015.4086C64.4983%2015.3935%2064.8292%2015.5056%2065.0881%2015.7226C65.2092%2015.835%2065.304%2015.973%2065.3656%2016.1264C65.4271%2016.2799%2065.454%2016.4451%2065.4441%2016.6102C65.4164%2017.0309%2065.2801%2017.4372%2065.0485%2017.7895C64.736%2018.2937%2064.3308%2018.7342%2063.8543%2019.0876C63.2467%2019.5398%2062.5682%2019.8882%2061.8467%2020.1186C60.9495%2020.4048%2060.0116%2020.5426%2059.0701%2020.5266C56.6767%2020.5266%2054.8158%2019.8442%2053.4872%2018.4794C52.1587%2017.1146%2051.4944%2015.2635%2051.4944%2012.9262C51.4863%2011.8837%2051.6534%2010.8473%2051.9889%209.86033C52.2925%208.96156%2052.7819%208.1368%2053.4254%207.43978C54.0703%206.75306%2054.8635%206.22281%2055.7446%205.88954C56.7214%205.5203%2057.7588%205.33747%2058.803%205.35054C60.1121%205.31362%2061.4066%205.63234%2062.5488%206.27277C63.5369%206.83149%2064.3482%207.65648%2064.8903%208.65376C65.3902%209.56343%2065.6569%2010.5828%2065.6666%2011.6207C65.6666%2012.5586%2065.3988%2013.166%2064.8631%2013.4429C64.3241%2013.7199%2063.57%2013.8583%2062.5958%2013.8583M55.3094%2011.7443H62.0642C61.9736%2010.4718%2061.6299%209.5183%2061.0332%208.8837C60.7303%208.56817%2060.3638%208.32058%2059.9581%208.15733C59.5523%207.99408%2059.1164%207.91889%2058.6794%207.93674C58.2515%207.92332%2057.8257%208.00227%2057.431%208.16824C57.0364%208.33422%2056.6821%208.5833%2056.3924%208.89853C55.7957%209.53808%2055.4347%2010.4867%2055.3094%2011.7443Z'%20fill='white'/%3e%3cpath%20d='M75.0025%2018.9842L72.3001%2015.0135L69.5309%2018.9842C69.2359%2019.4182%2068.8925%2019.8172%2068.5073%2020.1735C68.21%2020.4156%2067.8347%2020.5412%2067.4516%2020.5271C67.0071%2020.5377%2066.5751%2020.3796%2066.2425%2020.0845C66.0908%2019.9616%2065.9679%2019.8069%2065.8825%2019.6313C65.797%2019.4557%2065.7511%2019.2635%2065.748%2019.0683C65.748%2018.676%2066.0027%2018.1164%2066.512%2017.3895L69.882%2012.5583L66.8928%208.53063C66.3736%207.86801%2066.1164%207.2944%2066.1164%206.7999C66.1177%206.61148%2066.1597%206.42556%2066.2395%206.25486C66.3193%206.08417%2066.435%205.93273%2066.5788%205.81092C66.9148%205.51876%2067.3505%205.36733%2067.7952%205.38813C68.1892%205.37419%2068.5745%205.50527%2068.8782%205.75652C69.2554%206.10401%2069.5921%206.49301%2069.882%206.91611L72.2976%2010.2193L74.6465%206.91611C74.9393%206.48057%2075.2857%206.08351%2075.6775%205.73427C75.9802%205.4913%2076.3601%205.36497%2076.7481%205.37823C77.1925%205.36149%2077.6274%205.5094%2077.9695%205.79361C78.1225%205.9126%2078.2465%206.06477%2078.3321%206.23866C78.4178%206.41254%2078.4629%206.6036%2078.464%206.79743C78.4633%207.08041%2078.3955%207.3592%2078.2661%207.61087C78.0919%207.93536%2077.8883%208.24322%2077.6579%208.53063L74.6489%2012.5583L78.0189%2017.3895C78.5447%2018.1444%2078.8084%2018.7131%2078.8101%2019.0955C78.8094%2019.2901%2078.7645%2019.482%2078.6789%2019.6568C78.5932%2019.8315%2078.469%2019.9845%2078.3156%2020.1043C77.9771%2020.3904%2077.5446%2020.5411%2077.1016%2020.5271C76.7074%2020.538%2076.3223%2020.4073%2076.0162%2020.1587C75.6305%2019.8104%2075.2892%2019.416%2075%2018.9842'%20fill='white'/%3e%3cpath%20d='M80.1811%205.70949H80.5915V3.46944C80.5915%202.86863%2080.6064%202.39886%2080.6385%202.05766C80.6608%201.74802%2080.752%201.44728%2080.9055%201.17746C81.0552%200.917818%2081.2721%200.703405%2081.5335%200.556866C81.8103%200.392732%2082.1266%200.307244%2082.4484%200.309618C82.9289%200.31336%2083.3891%200.504012%2083.7316%200.841198C83.9854%201.06984%2084.1588%201.37415%2084.2261%201.70904C84.3039%202.18956%2084.3378%202.67618%2084.3274%203.16285V5.70949H85.6922C86.1277%205.67931%2086.5587%205.81242%2086.9013%206.08284C87.037%206.20323%2087.1446%206.35203%2087.2164%206.51868C87.2882%206.68533%2087.3224%206.86574%2087.3167%207.0471C87.3338%207.26146%2087.2865%207.47606%2087.1808%207.66332C87.075%207.85057%2086.9157%208.00192%2086.7233%208.0979C86.187%208.32481%2085.6062%208.4271%2085.0247%208.39707H84.3274V15.2483C84.3202%2015.6975%2084.3409%2016.1467%2084.3892%2016.5933C84.4163%2016.8756%2084.5304%2017.1426%2084.7156%2017.3573C84.8317%2017.4641%2084.969%2017.5452%2085.1185%2017.5955C85.268%2017.6457%2085.4264%2017.664%2085.5835%2017.6491C85.8823%2017.6397%2086.1795%2017.6016%2086.4711%2017.5353C86.7574%2017.4677%2087.0498%2017.4288%2087.3439%2017.4191C87.4965%2017.4205%2087.6473%2017.4533%2087.7868%2017.5154C87.9263%2017.5775%2088.0516%2017.6676%2088.1548%2017.7801C88.2737%2017.8963%2088.3673%2018.0357%2088.4298%2018.1897C88.4924%2018.3437%2088.5225%2018.509%2088.5183%2018.6751C88.5183%2019.2735%2088.1886%2019.7325%2087.5293%2020.0523C86.87%2020.3721%2085.9288%2020.5311%2084.7057%2020.5295C83.5387%2020.5295%2082.6585%2020.3342%2082.0577%2019.9435C81.469%2019.5736%2081.0444%2018.9924%2080.8709%2018.3191C80.6615%2017.4107%2080.5677%2016.4794%2080.5915%2015.5475V8.39459H80.097C79.6515%208.42648%2079.2102%208.28969%2078.8608%208.01136C78.7234%207.8914%2078.6142%207.74251%2078.5411%207.57537C78.468%207.40823%2078.4328%207.22698%2078.438%207.04463C78.4337%206.8606%2078.4716%206.67803%2078.5487%206.5109C78.6259%206.34376%2078.7402%206.19649%2078.8831%206.08036C79.2545%205.807%2079.7111%205.67466%2080.1712%205.70702'%20fill='white'/%3e%3c/svg%3e`,oh=`data:image/svg+xml,%3csvg%20width='7'%20height='13'%20viewBox='0%200%207%2013'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M5.04492%206.50535L0.757579%2010.7927C0.457835%2011.0924%200.457835%2011.5784%200.757579%2011.8782C1.05732%2012.1779%201.54331%2012.1779%201.84305%2011.8782L6.67312%207.04809C6.97287%206.74835%206.97287%206.26236%206.67312%205.96262L1.84305%201.13255C1.54331%200.832802%201.05732%200.832802%200.757579%201.13255C0.457835%201.43229%200.457835%201.91827%200.757579%202.21802L5.04492%206.50535Z'%20fill='white'/%3e%3c/svg%3e`,sh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%2019C5.5544%2017.9895%202%2013.6998%202%209.18182V4.27273L10%201L18%204.27273V9.18182C18%2013.7015%2014.4456%2017.9895%2010%2019ZM3.6%205.09091V9.18182C3.64572%2011.0736%204.29629%2012.8979%205.45214%2014.3755C6.608%2015.8532%208.20545%2016.9028%2010%2017.3636C11.7946%2016.9028%2013.392%2015.8532%2014.5479%2014.3755C15.7037%2012.8979%2016.3543%2011.0736%2016.4%209.18182V5.09091L10%202.63636L3.6%205.09091Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M10%209.18185C11.1046%209.18185%2012%208.26607%2012%207.1364C12%206.00672%2011.1046%205.09094%2010%205.09094C8.89543%205.09094%208%206.00672%208%207.1364C8%208.26607%208.89543%209.18185%2010%209.18185Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M6%2012.4545C6.39431%2013.1894%206.97247%2013.804%207.67531%2014.2353C8.37815%2014.6666%209.18042%2014.8991%2010%2014.9091C10.8196%2014.8991%2011.6219%2014.6666%2012.3247%2014.2353C13.0275%2013.804%2013.6057%2013.1894%2014%2012.4545C13.98%2010.9033%2011.3264%2010%2010%2010C8.6664%2010%206.02%2010.9033%206%2012.4545Z'%20fill='%23C9C9E8'/%3e%3c/svg%3e`,ch=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17%205.3335H3.66667C2.74619%205.3335%202%206.07969%202%207.00016V15.3335C2%2016.254%202.74619%2017.0002%203.66667%2017.0002H17C17.9205%2017.0002%2018.6667%2016.254%2018.6667%2015.3335V7.00016C18.6667%206.07969%2017.9205%205.3335%2017%205.3335Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.6667%2017V3.66667C13.6667%203.22464%2013.4911%202.80072%2013.1785%202.48816C12.866%202.17559%2012.442%202%2012%202H8.66667C8.22464%202%207.80072%202.17559%207.48816%202.48816C7.1756%202.80072%207%203.22464%207%203.66667V17'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,lh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.1667%2017.5V15.8333C19.1661%2015.0948%2018.9203%2014.3773%2018.4678%2013.7936C18.0153%2013.2099%2017.3818%2012.793%2016.6667%2012.6083'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.1667%2017.5V15.8333C14.1667%2014.9493%2013.8155%2014.1014%2013.1904%2013.4763C12.5652%2012.8512%2011.7174%2012.5%2010.8333%2012.5H4.16668C3.28262%2012.5%202.43478%2012.8512%201.80965%2013.4763C1.18453%2014.1014%200.833344%2014.9493%200.833344%2015.8333V17.5'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.3333%202.60834C14.0504%202.79192%2014.6859%203.20892%2015.1397%203.7936C15.5935%204.37827%2015.8399%205.09736%2015.8399%205.8375C15.8399%206.57765%2015.5935%207.29674%2015.1397%207.88141C14.6859%208.46609%2014.0504%208.88309%2013.3333%209.06667'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.49999%209.16667C9.34094%209.16667%2010.8333%207.67428%2010.8333%205.83333C10.8333%203.99238%209.34094%202.5%207.49999%202.5C5.65904%202.5%204.16666%203.99238%204.16666%205.83333C4.16666%207.67428%205.65904%209.16667%207.49999%209.16667Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,uh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.5%2011.6667H11.6667V17.5001H17.5V11.6667Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.33333%2011.6667H2.5V17.5001H8.33333V11.6667Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M17.5%202.5H11.6667V8.33333H17.5V2.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.33333%202.5H2.5V8.33333H8.33333V2.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,dh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%201C5.02991%201%201%205.02991%201%2010C1%2014.9701%205.02991%2019%2010%2019C14.9701%2019%2019%2014.9701%2019%2010C19%205.02991%2014.9701%201%2010%201ZM10%2017.4732C5.87366%2017.4732%202.52679%2014.1263%202.52679%2010C2.52679%205.87366%205.87366%202.52679%2010%202.52679C14.1263%202.52679%2017.4732%205.87366%2017.4732%2010C17.4732%2014.1263%2014.1263%2017.4732%2010%2017.4732Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M12.242%206.07661C11.6393%205.54826%2010.8437%205.25897%209.99999%205.25897C9.15624%205.25897%208.36071%205.55027%207.75803%206.07661C7.13124%206.62504%206.78571%207.36232%206.78571%208.15183V8.30451C6.78571%208.3929%206.85803%208.46522%206.94642%208.46522H7.91071C7.9991%208.46522%208.07142%208.3929%208.07142%208.30451V8.15183C8.07142%207.26589%208.93727%206.54469%209.99999%206.54469C11.0627%206.54469%2011.9286%207.26589%2011.9286%208.15183C11.9286%208.77661%2011.4866%209.34915%2010.8016%209.61232C10.3757%209.77504%2010.0141%2010.0603%209.7549%2010.434C9.49173%2010.8157%209.35512%2011.2737%209.35512%2011.7378V12.1697C9.35512%2012.2581%209.42745%2012.3304%209.51584%2012.3304H10.4801C10.5685%2012.3304%2010.6408%2012.2581%2010.6408%2012.1697V11.7137C10.6419%2011.5186%2010.7017%2011.3285%2010.8124%2011.1679C10.9231%2011.0074%2011.0797%2010.8839%2011.2616%2010.8137C12.4469%2010.3576%2013.2123%209.31299%2013.2123%208.15183C13.2143%207.36232%2012.8687%206.62504%2012.242%206.07661ZM9.19642%2014.4197C9.19642%2014.6328%209.28108%2014.8372%209.43178%2014.9879C9.58248%2015.1386%209.78687%2015.2233%209.99999%2015.2233C10.2131%2015.2233%2010.4175%2015.1386%2010.5682%2014.9879C10.7189%2014.8372%2010.8036%2014.6328%2010.8036%2014.4197C10.8036%2014.2066%2010.7189%2014.0022%2010.5682%2013.8515C10.4175%2013.7008%2010.2131%2013.6161%209.99999%2013.6161C9.78687%2013.6161%209.58248%2013.7008%209.43178%2013.8515C9.28108%2014.0022%209.19642%2014.2066%209.19642%2014.4197Z'%20fill='%23C9C9E8'/%3e%3c/svg%3e`,fh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%2018.3333C16.3807%2018.3333%2017.5%2017.214%2017.5%2015.8333C17.5%2014.4526%2016.3807%2013.3333%2015%2013.3333C13.6193%2013.3333%2012.5%2014.4526%2012.5%2015.8333C12.5%2017.214%2013.6193%2018.3333%2015%2018.3333Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5%2012.5C6.38071%2012.5%207.5%2011.3807%207.5%2010C7.5%208.61929%206.38071%207.5%205%207.5C3.61929%207.5%202.5%208.61929%202.5%2010C2.5%2011.3807%203.61929%2012.5%205%2012.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.15833%2011.2584L12.85%2014.575'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15%206.66669C16.3807%206.66669%2017.5%205.5474%2017.5%204.16669C17.5%202.78598%2016.3807%201.66669%2015%201.66669C13.6193%201.66669%2012.5%202.78598%2012.5%204.16669C12.5%205.5474%2013.6193%206.66669%2015%206.66669Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8417%205.42499L7.15833%208.74165'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,ph=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.6667%201.66669H5.00001C4.55798%201.66669%204.13406%201.84228%203.8215%202.15484C3.50894%202.4674%203.33334%202.89133%203.33334%203.33335V16.6667C3.33334%2017.1087%203.50894%2017.5326%203.8215%2017.8452C4.13406%2018.1578%204.55798%2018.3334%205.00001%2018.3334H15C15.442%2018.3334%2015.866%2018.1578%2016.1785%2017.8452C16.4911%2017.5326%2016.6667%2017.1087%2016.6667%2016.6667V6.66669L11.6667%201.66669Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.3333%2014.1667H6.66666'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.3333%2010.8333H6.66666'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.33332%207.5H7.49999H6.66666'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.6667%201.66669V6.66669H16.6667'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,mh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_530_15536)'%3e%3cpath%20d='M10%2012.5C11.3807%2012.5%2012.5%2011.3807%2012.5%2010C12.5%208.61929%2011.3807%207.5%2010%207.5C8.61929%207.5%207.5%208.61929%207.5%2010C7.5%2011.3807%208.61929%2012.5%2010%2012.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.1667%2012.5C16.0557%2012.7513%2016.0227%2013.0301%2016.0717%2013.3005C16.1207%2013.5708%2016.2496%2013.8202%2016.4417%2014.0166L16.4917%2014.0666C16.6466%2014.2214%2016.7696%2014.4052%2016.8534%2014.6076C16.9373%2014.8099%2016.9805%2015.0268%2016.9805%2015.2458C16.9805%2015.4648%2016.9373%2015.6817%2016.8534%2015.884C16.7696%2016.0864%2016.6466%2016.2702%2016.4917%2016.425C16.3369%2016.5799%2016.1531%2016.7029%2015.9507%2016.7867C15.7484%2016.8706%2015.5315%2016.9138%2015.3125%2016.9138C15.0935%2016.9138%2014.8766%2016.8706%2014.6743%2016.7867C14.4719%2016.7029%2014.2881%2016.5799%2014.1333%2016.425L14.0833%2016.375C13.8869%2016.1829%2013.6375%2016.054%2013.3672%2016.005C13.0968%2015.956%2012.818%2015.989%2012.5667%2016.1C12.3202%2016.2056%2012.11%2016.381%2011.9619%2016.6046C11.8139%2016.8282%2011.7344%2017.0902%2011.7333%2017.3583V17.5C11.7333%2017.942%2011.5577%2018.3659%2011.2452%2018.6785C10.9326%2018.991%2010.5087%2019.1666%2010.0667%2019.1666C9.62465%2019.1666%209.20073%2018.991%208.88817%2018.6785C8.5756%2018.3659%208.40001%2017.942%208.40001%2017.5V17.425C8.39356%2017.1491%208.30427%2016.8816%208.14377%2016.6572C7.98326%2016.4328%207.75896%2016.2619%207.50001%2016.1666C7.24866%2016.0557%206.96985%2016.0226%206.69952%2016.0716C6.42919%2016.1207%206.17974%2016.2495%205.98334%2016.4416L5.93334%2016.4916C5.77855%2016.6466%205.59474%2016.7695%205.39241%2016.8534C5.19008%2016.9373%204.9732%2016.9805%204.75418%2016.9805C4.53515%2016.9805%204.31827%2016.9373%204.11594%2016.8534C3.91361%2016.7695%203.7298%2016.6466%203.57501%2016.4916C3.42005%2016.3369%203.29712%2016.153%203.21324%2015.9507C3.12937%2015.7484%203.0862%2015.5315%203.0862%2015.3125C3.0862%2015.0935%203.12937%2014.8766%203.21324%2014.6742C3.29712%2014.4719%203.42005%2014.2881%203.57501%2014.1333L3.62501%2014.0833C3.81712%2013.8869%203.946%2013.6375%203.99501%2013.3671C4.04403%2013.0968%204.01094%2012.818%203.90001%2012.5666C3.79437%2012.3202%203.61897%2012.11%203.3954%2011.9619C3.17182%2011.8138%202.90983%2011.7344%202.64168%2011.7333H2.50001C2.05798%2011.7333%201.63406%2011.5577%201.3215%2011.2452C1.00894%2010.9326%200.833344%2010.5087%200.833344%2010.0666C0.833344%209.62462%201.00894%209.2007%201.3215%208.88813C1.63406%208.57557%202.05798%208.39998%202.50001%208.39998H2.57501C2.85084%208.39353%203.11835%208.30424%203.34276%208.14374C3.56717%207.98323%203.73811%207.75893%203.83334%207.49998C3.94427%207.24863%203.97736%206.96982%203.92835%206.69949C3.87933%206.42916%203.75046%206.17971%203.55834%205.98331L3.50834%205.93331C3.35338%205.77852%203.23045%205.59471%203.14658%205.39238C3.0627%205.19005%203.01953%204.97317%203.01953%204.75415C3.01953%204.53512%203.0627%204.31824%203.14658%204.11591C3.23045%203.91358%203.35338%203.72977%203.50834%203.57498C3.66313%203.42002%203.84695%203.29709%204.04928%203.21321C4.25161%203.12934%204.46848%203.08617%204.68751%203.08617C4.90654%203.08617%205.12341%203.12934%205.32574%203.21321C5.52807%203.29709%205.71189%203.42002%205.86668%203.57498L5.91668%203.62498C6.11308%203.81709%206.36252%203.94597%206.63285%203.99498C6.90318%204.044%207.182%204.01091%207.43334%203.89998H7.50001C7.74648%203.79434%207.95669%203.61894%208.10475%203.39537C8.25282%203.17179%208.33227%202.9098%208.33334%202.64165V2.49998C8.33334%202.05795%208.50894%201.63403%208.8215%201.32147C9.13406%201.00891%209.55798%200.833313%2010%200.833313C10.442%200.833313%2010.866%201.00891%2011.1785%201.32147C11.4911%201.63403%2011.6667%202.05795%2011.6667%202.49998V2.57498C11.6677%202.84313%2011.7472%203.10513%2011.8953%203.3287C12.0433%203.55228%2012.2535%203.72768%2012.5%203.83331C12.7514%203.94424%2013.0302%203.97733%2013.3005%203.92832C13.5708%203.8793%2013.8203%203.75043%2014.0167%203.55831L14.0667%203.50831C14.2215%203.35335%2014.4053%203.23042%2014.6076%203.14655C14.8099%203.06267%2015.0268%203.0195%2015.2458%203.0195C15.4649%203.0195%2015.6817%203.06267%2015.8841%203.14655C16.0864%203.23042%2016.2702%203.35335%2016.425%203.50831C16.58%203.6631%2016.7029%203.84692%2016.7868%204.04925C16.8706%204.25158%2016.9138%204.46845%2016.9138%204.68748C16.9138%204.90651%2016.8706%205.12338%2016.7868%205.32571C16.7029%205.52804%2016.58%205.71186%2016.425%205.86665L16.375%205.91665C16.1829%206.11305%2016.054%206.36249%2016.005%206.63282C15.956%206.90315%2015.9891%207.18197%2016.1%207.43331V7.49998C16.2056%207.74645%2016.381%207.95666%2016.6046%208.10472C16.8282%208.25279%2017.0902%208.33224%2017.3583%208.33331H17.5C17.942%208.33331%2018.366%208.50891%2018.6785%208.82147C18.9911%209.13403%2019.1667%209.55795%2019.1667%209.99998C19.1667%2010.442%2018.9911%2010.8659%2018.6785%2011.1785C18.366%2011.4911%2017.942%2011.6666%2017.5%2011.6666H17.425C17.1569%2011.6677%2016.8949%2011.7472%2016.6713%2011.8952C16.4477%2012.0433%2016.2723%2012.2535%2016.1667%2012.5V12.5Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_530_15536'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,hh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%204.33333C1%203.18274%201.93274%202.25%203.08333%202.25H16.4167C17.5673%202.25%2018.5%203.18274%2018.5%204.33333V16C18.5%2017.1506%2017.5673%2018.0833%2016.4167%2018.0833H3.08333C1.93274%2018.0833%201%2017.1506%201%2016V4.33333ZM3.08333%203.08333C2.39298%203.08333%201.83333%203.64298%201.83333%204.33333V16C1.83333%2016.6904%202.39298%2017.25%203.08333%2017.25H16.4167C17.107%2017.25%2017.6667%2016.6904%2017.6667%2016V4.33333C17.6667%203.64298%2017.107%203.08333%2016.4167%203.08333H3.08333Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'%20stroke-linejoin='round'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1%204.33333C1%203.18274%201.93274%202.25%203.08333%202.25H16.4167C17.5673%202.25%2018.5%203.18274%2018.5%204.33333V6.83333C18.5%207.06345%2018.3135%207.25%2018.0833%207.25H1.41667C1.18655%207.25%201%207.06345%201%206.83333V4.33333ZM3.08333%203.08333C2.39298%203.08333%201.83333%203.64298%201.83333%204.33333V6.41667H17.6667V4.33333C17.6667%203.64298%2017.107%203.08333%2016.4167%203.08333H3.08333Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'%20stroke-linejoin='round'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.33333%201V3.91667H3.5V1H4.33333Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.1667%201V3.91667H9.33334V1H10.1667Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M16%201V3.91667H15.1667V1H16Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.53453%2015.2573C6.43104%2015.1538%206.38944%2015.0036%206.42493%2014.8616L7.01419%2012.5046C7.03251%2012.4313%207.07039%2012.3644%207.12379%2012.311L10.0701%209.36472C10.5582%208.87657%2011.3497%208.87657%2011.8378%209.36472L12.4271%209.95398C12.9152%2010.4421%2012.9152%2011.2336%2012.4271%2011.7217L9.48081%2014.668C9.42741%2014.7214%209.3605%2014.7593%209.28724%2014.7776L6.93022%2015.3669C6.78823%2015.4024%206.63802%2015.3608%206.53453%2015.2573ZM8.97316%2013.9972L11.8378%2011.1325C12.0006%2010.9698%2012.0006%2010.706%2011.8378%2010.5432L11.2486%209.95398C11.0859%209.79126%2010.822%209.79126%2010.6593%209.95398L7.79465%2012.8186L7.40181%2014.39L8.97316%2013.9972Z'%20fill='%23C9C9E8'%20stroke='%23C9C9E8'%20stroke-width='0.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,gh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_530_15505)'%3e%3cpath%20d='M18.3333%201.66669L9.16666%2010.8334'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.3333%201.66669L12.5%2018.3334L9.16666%2010.8334L1.66666%207.50002L18.3333%201.66669Z'%20stroke='%23C9C9E8'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_530_15505'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,_h=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_7154_21562)'%3e%3cpath%20d='M4.10156%208.64844H8.24219V9.82031H4.10156V8.64844Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M4.10156%2010.9922H8.24219V12.1641H4.10156V10.9922Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M4.10156%2013.3359H8.24219V14.5078H4.10156V13.3359Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M18.2422%2011.3516H20V0.804688H9.41406V3.96074H4.10156C2.80922%203.96074%201.75781%205.01215%201.75781%206.30449V14.5076C1.75781%2014.9344%201.87301%2015.3345%202.07312%2015.6795H0V16.2654C0%2017.8809%201.31426%2019.1951%202.92969%2019.1951H17.0703C18.6857%2019.1951%2020%2017.8809%2020%2016.2654V15.6795H17.9269C18.127%2015.3345%2018.2422%2014.9344%2018.2422%2014.5076V11.3516ZM10.5859%201.97656H18.8281V10.1797H12.1429L10.5859%2011.7112V1.97656ZM1.27227%2016.8513H7.07031V18.0232H2.92969C2.16578%2018.0232%201.5141%2017.5334%201.27227%2016.8513ZM11.7578%2016.8513V18.0232H8.24219V16.8513H11.7578ZM17.0703%2018.0232H12.9297V16.8513H18.7277C18.4859%2017.5334%2017.8342%2018.0232%2017.0703%2018.0232ZM4.10156%2015.6795C3.45539%2015.6795%202.92969%2015.1538%202.92969%2014.5076V6.30445C2.92969%205.65828%203.45539%205.13258%204.10156%205.13258H9.41406V14.5075L12.6227%2011.3515H17.0703V14.5076C17.0703%2015.1538%2016.5446%2015.6795%2015.8984%2015.6795H4.10156Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M17.6367%208.42184C17.6367%207.64664%2017.3213%206.88887%2016.7714%206.34258L16.4648%206.0368V4.90625C16.4648%203.93699%2015.6763%203.14844%2014.707%203.14844C13.7378%203.14844%2012.9492%203.93699%2012.9492%204.90625V6.03691L12.6437%206.34152C12.0931%206.88793%2011.7773%207.64617%2011.7773%208.42188V9.00781H17.6367V8.42184ZM13.0507%207.8359C13.1386%207.58801%2013.2814%207.35973%2013.4702%207.17234L14.1211%206.52328V4.90625C14.1211%204.58316%2014.3839%204.32031%2014.707%204.32031C15.0301%204.32031%2015.293%204.58316%2015.293%204.90625V6.52313L15.9448%207.17336C16.1331%207.36016%2016.2756%207.5882%2016.3634%207.83594H13.0507V7.8359Z'%20fill='%23C9C9E8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_7154_21562'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,vh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6415_8719)'%3e%3cpath%20d='M10.0391%208.88672H11.0156C11.3392%208.88672%2011.6016%208.62438%2011.6016%208.30078C11.6016%207.97719%2011.3392%207.71484%2011.0156%207.71484H10.0391C9.71547%207.71484%209.45312%207.97719%209.45312%208.30078C9.45312%208.62438%209.71547%208.88672%2010.0391%208.88672Z'%20fill='white'/%3e%3cpath%20d='M7.53906%207.71484H6.5625C6.23891%207.71484%205.97656%207.97719%205.97656%208.30078C5.97656%208.62438%206.23891%208.88672%206.5625%208.88672H7.53906C7.86266%208.88672%208.125%208.62438%208.125%208.30078C8.125%207.97719%207.86266%207.71484%207.53906%207.71484Z'%20fill='white'/%3e%3cpath%20d='M13.5156%208.88672H14.4922C14.8158%208.88672%2015.0781%208.62438%2015.0781%208.30078C15.0781%207.97719%2014.8158%207.71484%2014.4922%207.71484H13.5156C13.192%207.71484%2012.9297%207.97719%2012.9297%208.30078C12.9297%208.62438%2013.192%208.88672%2013.5156%208.88672Z'%20fill='white'/%3e%3cpath%20d='M4.0625%2010.3516H3.08594C2.76234%2010.3516%202.5%2010.6139%202.5%2010.9375C2.5%2011.2611%202.76234%2011.5234%203.08594%2011.5234H4.0625C4.38609%2011.5234%204.64844%2011.2611%204.64844%2010.9375C4.64844%2010.6139%204.38609%2010.3516%204.0625%2010.3516Z'%20fill='white'/%3e%3cpath%20d='M7.53906%2010.3516H6.5625C6.23891%2010.3516%205.97656%2010.6139%205.97656%2010.9375C5.97656%2011.2611%206.23891%2011.5234%206.5625%2011.5234H7.53906C7.86266%2011.5234%208.125%2011.2611%208.125%2010.9375C8.125%2010.6139%207.86266%2010.3516%207.53906%2010.3516Z'%20fill='white'/%3e%3cpath%20d='M11.6016%2010.9375C11.6016%2010.6139%2011.3392%2010.3516%2011.0156%2010.3516H10.0391C9.71547%2010.3516%209.45312%2010.6139%209.45312%2010.9375C9.45312%2011.2611%209.71547%2011.5234%2010.0391%2011.5234H11.0156C11.3392%2011.5234%2011.6016%2011.2611%2011.6016%2010.9375Z'%20fill='white'/%3e%3cpath%20d='M4.0625%2012.9883H3.08594C2.76234%2012.9883%202.5%2013.2506%202.5%2013.5742C2.5%2013.8978%202.76234%2014.1602%203.08594%2014.1602H4.0625C4.38609%2014.1602%204.64844%2013.8978%204.64844%2013.5742C4.64844%2013.2506%204.38609%2012.9883%204.0625%2012.9883Z'%20fill='white'/%3e%3cpath%20d='M7.53906%2012.9883H6.5625C6.23891%2012.9883%205.97656%2013.2506%205.97656%2013.5742C5.97656%2013.8978%206.23891%2014.1602%206.5625%2014.1602H7.53906C7.86266%2014.1602%208.125%2013.8978%208.125%2013.5742C8.125%2013.2506%207.86266%2012.9883%207.53906%2012.9883Z'%20fill='white'/%3e%3cpath%20d='M17.5781%2010.9014V3.32031C17.5781%202.13566%2016.6143%201.17188%2015.4297%201.17188H14.2969V0.585938C14.2969%200.262344%2014.0345%200%2013.7109%200C13.3873%200%2013.125%200.262344%2013.125%200.585938V1.17188H11.0156V0.585938C11.0156%200.262344%2010.7533%200%2010.4297%200C10.1061%200%209.84375%200.262344%209.84375%200.585938V1.17188H7.73438V0.585938C7.73438%200.262344%207.47203%200%207.14844%200C6.82484%200%206.5625%200.262344%206.5625%200.585938V1.17188H4.45312V0.585938C4.45312%200.262344%204.19078%200%203.86719%200C3.54359%200%203.28125%200.262344%203.28125%200.585938V1.17188H2.14844C0.963789%201.17188%200%202.13566%200%203.32031V15.0391C0%2016.0083%200.788555%2016.7969%201.75781%2016.7969H10.5321C11.2184%2018.6643%2013.0147%2020%2015.1172%2020C17.8096%2020%2020%2017.8096%2020%2015.1172C20%2013.3217%2019.0257%2011.7496%2017.5781%2010.9014ZM1.17188%203.32031C1.17188%202.78184%201.60996%202.34375%202.14844%202.34375H3.28125V2.92969C3.28125%203.25328%203.54359%203.51562%203.86719%203.51562C4.19078%203.51562%204.45312%203.25328%204.45312%202.92969V2.34375H6.5625V2.92969C6.5625%203.25328%206.82484%203.51562%207.14844%203.51562C7.47203%203.51562%207.73438%203.25328%207.73438%202.92969V2.34375H9.84375V2.92969C9.84375%203.25328%2010.1061%203.51562%2010.4297%203.51562C10.7533%203.51562%2011.0156%203.25328%2011.0156%202.92969V2.34375H13.125V2.92969C13.125%203.25328%2013.3873%203.51562%2013.7109%203.51562C14.0345%203.51562%2014.2969%203.25328%2014.2969%202.92969V2.34375H15.4297C15.9682%202.34375%2016.4062%202.78184%2016.4062%203.32031V5.07812H1.17188V3.32031ZM1.75781%2015.625C1.43473%2015.625%201.17188%2015.3621%201.17188%2015.0391V6.25H16.4062V10.4074C15.9954%2010.2948%2015.5632%2010.2344%2015.1172%2010.2344C12.4248%2010.2344%2010.2344%2012.4248%2010.2344%2015.1172C10.2344%2015.2886%2010.2434%2015.458%2010.2607%2015.625H1.75781ZM15.1172%2018.8281C13.071%2018.8281%2011.4062%2017.1634%2011.4062%2015.1172C11.4062%2013.071%2013.071%2011.4062%2015.1172%2011.4062C17.1634%2011.4062%2018.8281%2013.071%2018.8281%2015.1172C18.8281%2017.1634%2017.1634%2018.8281%2015.1172%2018.8281Z'%20fill='white'/%3e%3cpath%20d='M17.0703%2014.5312H15.7031V13.1641C15.7031%2012.8405%2015.4408%2012.5781%2015.1172%2012.5781C14.7936%2012.5781%2014.5312%2012.8405%2014.5312%2013.1641V15.1172C14.5312%2015.4408%2014.7936%2015.7031%2015.1172%2015.7031H17.0703C17.3939%2015.7031%2017.6562%2015.4408%2017.6562%2015.1172C17.6562%2014.7936%2017.3939%2014.5312%2017.0703%2014.5312Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6415_8719'%3e%3crect%20width='20'%20height='20'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,yh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18.415%208.82125C18.21%208.71313%2017.9606%208.72938%2017.7694%208.86063L11.8056%2012.9894L10.3562%2011.9856C10.1419%2011.8375%209.85875%2011.8375%209.64437%2011.9856L8.19438%2012.9894L3.0275%209.4125L5.32188%208.03563C5.61813%207.85813%205.71375%207.47438%205.53625%207.17813C5.35875%206.88188%204.97438%206.78625%204.67875%206.96375L1.55375%208.83875C1.37%208.94875%201.25%209.17563%201.25%209.375V16.875C1.25%2017.9088%202.09125%2018.75%203.125%2018.75H16.875C17.9088%2018.75%2018.75%2017.9088%2018.75%2016.875V9.375C18.75%209.1425%2018.6206%208.92938%2018.415%208.82125ZM2.51%2016.925C2.50875%2016.9075%202.5%2016.8925%202.5%2016.875V10.5681L7.09625%2013.75L2.51%2016.925ZM3.87625%2017.5L10%2013.26L16.1244%2017.5H3.87625ZM17.5%2016.875C17.5%2016.8925%2017.4912%2016.9075%2017.49%2016.925L12.9037%2013.75L17.5%2010.5681V16.875Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M13.3644%208.7025C13.5975%208.60562%2013.75%208.3775%2013.75%208.125V2.5C13.75%202.2475%2013.5975%202.01937%2013.3644%201.9225C13.13%201.825%2012.8619%201.87937%2012.6831%202.05812C11.6162%203.125%209.95937%203.125%208.75%203.125H7.8125C6.60625%203.125%205.625%204.10625%205.625%205.3125C5.625%206.44875%206.49937%207.37437%207.60875%207.47937L8.1375%2010.1225C8.20438%2010.4587%208.53187%2010.6806%208.87312%2010.6125C9.21187%2010.545%209.43125%2010.2156%209.36312%209.87687L8.8875%207.5C10.0831%207.50125%2011.655%207.53812%2012.6831%208.56625C12.8619%208.74562%2013.13%208.79937%2013.3644%208.7025ZM8.125%206.25H7.8125C7.29562%206.25%206.875%205.82937%206.875%205.3125C6.875%204.79562%207.29562%204.375%207.8125%204.375H8.125V6.25ZM12.5%206.905C11.4719%206.3725%2010.3263%206.27437%209.375%206.25562V4.36937C10.3263%204.35062%2011.4719%204.2525%2012.5%203.72V6.905Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M16.25%204.6875H17.5C17.845%204.6875%2018.125%204.9675%2018.125%205.3125C18.125%205.6575%2017.845%205.9375%2017.5%205.9375H16.25C15.905%205.9375%2015.625%205.6575%2015.625%205.3125C15.625%204.9675%2015.905%204.6875%2016.25%204.6875Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M17.2488%202.1875C17.4213%202.48625%2017.3188%202.86875%2017.02%203.04125L15.9375%203.66625C15.6413%203.8375%2015.2575%203.73875%2015.0838%203.4375C14.9113%203.13875%2015.0138%202.75625%2015.3125%202.58375L16.395%201.95875C16.6931%201.78562%2017.0763%201.88812%2017.2488%202.1875Z'%20fill='%23C9C9E8'/%3e%3cpath%20d='M15.0838%207.1875C15.2563%206.88813%2015.6388%206.78562%2015.9375%206.95875L17.02%207.58375C17.3194%207.75625%2017.4213%208.13875%2017.2488%208.4375C17.075%208.73813%2016.6913%208.8375%2016.395%208.66625L15.3125%208.04125C15.0132%207.86875%2014.9113%207.48625%2015.0838%207.1875Z'%20fill='%23C9C9E8'/%3e%3c/svg%3e`,bh=`data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%204.35092C20%203.33607%2019.1743%202.51041%2018.1595%202.51041H1.84052C0.825863%202.51045%200.000351564%203.33572%200%204.35123V4.35155V15.6484C0%2016.676%200.834066%2017.4896%201.84114%2017.4896H18.1588C19.1863%2017.4896%2020%2016.6555%2020%2015.6484V4.35155C20%204.35147%2020%204.35139%2020%204.35131C20%204.35119%2020%204.35108%2020%204.35092ZM1.84052%203.68233H18.1595C18.5282%203.68233%2018.8281%203.98229%2018.8281%204.3519C18.8281%204.54831%2018.7305%204.73061%2018.5668%204.83967L10.3713%2010.3036C10.1458%2010.454%209.8543%2010.454%209.62875%2010.3036C9.62875%2010.3036%201.43301%204.83956%201.43317%204.83967C1.43321%204.83971%201.43305%204.8396%201.43301%204.83956C1.2695%204.73061%201.17188%204.54831%201.17188%204.35092C1.17188%203.98225%201.47184%203.68233%201.84052%203.68233ZM18.1589%2016.3177H1.84114C1.47633%2016.3177%201.17188%2016.0227%201.17188%2015.6484V6.07394L8.97867%2011.2786C9.2889%2011.4854%209.64445%2011.5888%2010%2011.5888C10.3556%2011.5888%2010.7112%2011.4854%2011.0214%2011.2786L18.8281%206.07394V15.6485C18.8281%2016.0132%2018.5332%2016.3177%2018.1589%2016.3177Z'%20fill='%23586888'/%3e%3c/svg%3e`;function xh(e){return!e||typeof e!=`string`?`User`:e.split(` `).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Sh(e){let t=(e||`User`).split(` `).filter(Boolean);return`${t[0]?.charAt(0)||`U`}${t.length>1?t.at(-1)?.charAt(0):``}`.toUpperCase()}function Ch(e){let t=(e||`User`).charAt(0).toUpperCase(),n=JSON.parse(localStorage.getItem(`colorMap`)||`{}`);if(n[t])return n[t];let r=[`#0053a5`,`#1677ff`,`#15803d`,`#f97316`,`#6366f1`,`#8b5cf6`],i=r[t.charCodeAt(0)%r.length];return localStorage.setItem(`colorMap`,JSON.stringify({...n,[t]:i})),i}function wh({leftOffset:e}){let t=(0,p.useNavigate)(),n=(0,p.useLocation)(),r=localStorage.getItem(`companyName`)||`Zinnext`,i=localStorage.getItem(`userName`)||localStorage.getItem(`preferred_Username`)||`User`,a=localStorage.getItem(`preferred_Username`)||i,o=localStorage.getItem(`roleId`)||``,s=xh(i),c=Sh(s);function l(){ne(),t(`/login`,{replace:!0})}let m=[{key:`profile-name`,label:(0,f.jsxs)(`div`,{className:`app-layout-profile-summary`,children:[(0,f.jsx)(u.Avatar,{size:42,style:{backgroundColor:Ch(s)},children:c}),(0,f.jsxs)(`div`,{className:`app-layout-profile-copy`,children:[(0,f.jsx)(X,{variant:`body-strong`,truncate:!0,className:`app-layout-profile-name`,children:s}),o&&(0,f.jsx)(X,{variant:`caption`,color:`secondary`,className:`app-layout-profile-role`,children:o})]})]}),disabled:!0},{type:`divider`},{key:`dashboard`,label:(0,f.jsxs)(p.Link,{to:`/dashboard`,className:`app-layout-menu-link`,children:[(0,f.jsx)(d.AppstoreOutlined,{}),`Dashboard`]})},{key:`my-profile`,label:(0,f.jsxs)(p.Link,{to:`/my-profile`,className:`app-layout-menu-link`,children:[(0,f.jsx)(d.UserOutlined,{}),`My Profile`]})},{type:`divider`},{key:`logout`,label:(0,f.jsxs)(`span`,{className:`app-layout-menu-link app-layout-menu-danger`,children:[(0,f.jsx)(d.LogoutOutlined,{}),`Logout`]}),onClick:l}];return(0,f.jsxs)(`header`,{className:`app-layout-header`,style:{left:e},children:[(0,f.jsx)(`div`,{className:`app-layout-company`,children:(0,f.jsx)(X,{variant:`body-strong`,truncate:!0,className:`app-layout-company-name`,children:r})}),(0,f.jsxs)(`div`,{className:`app-layout-header-actions`,children:[(0,f.jsx)(u.Tooltip,{title:`Inbox`,children:(0,f.jsx)(p.Link,{to:`/inbox`,className:n.pathname===`/inbox`?`app-layout-icon-btn is-active`:`app-layout-icon-btn`,"aria-label":`Inbox`,children:(0,f.jsx)(`img`,{src:bh,alt:``,"aria-hidden":`true`,className:`app-layout-icon-img`})})}),(0,f.jsx)(`div`,{className:`app-layout-header-divider`}),(0,f.jsxs)(`div`,{className:`app-layout-user`,children:[(0,f.jsx)(u.Avatar,{size:30,style:{backgroundColor:Ch(s)},children:c}),(0,f.jsx)(X,{variant:`label`,truncate:!0,className:`app-layout-user-name`,children:a}),(0,f.jsx)(u.Dropdown,{menu:{items:m},trigger:[`click`],placement:`bottomRight`,overlayClassName:`app-layout-user-dropdown`,children:(0,f.jsx)(`button`,{type:`button`,className:`app-layout-dropdown-btn`,"aria-label":`Open user menu`,children:(0,f.jsx)(d.DownOutlined,{})})})]})]})]})}var{Sider:Th}=u.Layout,Eh={Dashboard:uh,Jobs:ch,Candidates:lh,Submissions:gh,Network:fh,Scheduler:hh,Admin:sh,Reports:ph,Settings:mh,Help:dh,onboarding:_h,Onboarding:_h,timesheet:vh,Timesheet:vh,campaign:yh,Campaign:yh,addTestCase:ph,viewTestCase:hh,manageModules:mh,bulkUpload:d.UploadOutlined,"bulk-upload":d.UploadOutlined};function Dh(e){let t=localStorage.getItem(e);if(!t||t===`undefined`||t===`null`||t.trim()===``)return[];try{let e=JSON.parse(t);return Array.isArray(e)?e:Array.isArray(e?.menu)?e.menu:Array.isArray(e?.menus?.menu)?e.menus.menu:[]}catch(t){return console.error(`Error parsing ${e}:`,t),[]}}function Oh(e){let t=e.replace(/^\/+/,``);if(!t)return[`dashboard`];let n=t.split(`/`);return[t,n[0],n.at(-1)].filter(Boolean)}function kh({icon:e,itemKey:t}){let n=t===`bulk-upload`?d.UploadOutlined:Eh[e];return n?typeof n==`string`?(0,f.jsx)(`img`,{src:n,alt:``,className:`app-sidebar-menu-icon`,"aria-hidden":`true`}):(0,f.jsx)(n,{className:`app-sidebar-menu-icon`,"aria-hidden":`true`}):null}function Ah(e){return e.map(e=>({key:e.key,icon:(0,f.jsx)(kh,{icon:e.icon,itemKey:e.key}),label:e.label,disabled:e.status===`inactive`,children:Array.isArray(e.children)?Ah(e.children):void 0}))}function jh(e){let t=e.some(e=>e.key===`addTestCase`),n=e.some(e=>e.key===`bulk-upload`);if(!t||n)return e;let r=[...e],i=r.findIndex(e=>e.key===`manageModules`);return r.splice(i>=0?i+1:r.length,0,{key:`bulk-upload`,icon:`bulk-upload`,label:`Bulk upload`,status:`active`}),r}function Mh({collapsed:e,onToggle:t}){let n=(0,p.useNavigate)(),r=(0,p.useLocation)(),[i,a]=(0,l.useState)([]),o=(0,l.useMemo)(()=>Oh(r.pathname),[r.pathname]);(0,l.useEffect)(()=>{o.length>0&&localStorage.setItem(`activeKey`,o[0])},[o]);let s=(0,l.useMemo)(()=>Ah(jh(Dh(`menu`))),[]);function c(){e||a([]),t()}function d({key:e}){n(`/${e}`)}return(0,f.jsx)(Th,{trigger:null,collapsible:!0,collapsed:e,width:200,collapsedWidth:60,className:`app-sidebar`,children:(0,f.jsxs)(`div`,{className:`app-sidebar-panel`,children:[(0,f.jsx)(`div`,{className:`app-sidebar-brand`,children:(0,f.jsxs)(`div`,{className:`app-sidebar-logo`,children:[(0,f.jsx)(`img`,{src:ih,alt:``,className:`app-sidebar-logo-icon`}),(0,f.jsx)(`img`,{src:ah,alt:`Zinnext`,className:`app-sidebar-logo-text`})]})}),(0,f.jsx)(`button`,{type:`button`,className:`app-sidebar-toggle`,onClick:c,"aria-label":e?`Expand sidebar`:`Collapse sidebar`,children:(0,f.jsx)(`img`,{src:oh,alt:``,"aria-hidden":`true`})}),(0,f.jsx)(`div`,{className:`app-sidebar-body`,children:(0,f.jsx)(u.Menu,{mode:`inline`,theme:`dark`,selectedKeys:o,openKeys:e?[]:i,items:s,onClick:d,onOpenChange:a,className:`app-sidebar-menu`})})]})})}var Nh=`You're not logged in`,Ph=`You haven't logged into this session. Please login to access the data.`;function Fh(){try{return!!ee()}catch{return!1}}function Ih({children:e,title:t=Nh,message:n=Ph,loginPath:r=`/login`,loginLabel:i=`Go to Login`,onLogin:a,fallback:o}){let[s,c]=(0,l.useState)(Fh);return(0,l.useEffect)(()=>{let e=()=>c(Fh());return window.addEventListener(`auth:login`,e),window.addEventListener(`auth:logout`,e),window.addEventListener(`storage`,e),window.addEventListener(`focus`,e),()=>{window.removeEventListener(`auth:login`,e),window.removeEventListener(`auth:logout`,e),window.removeEventListener(`storage`,e),window.removeEventListener(`focus`,e)}},[]),s?e:o===void 0?(0,f.jsx)(`div`,{className:`ct-auth-guard`,children:(0,f.jsx)(`div`,{className:`ct-auth-guard__card`,children:(0,f.jsx)(u.Result,{status:`403`,icon:(0,f.jsx)(d.LockOutlined,{className:`ct-auth-guard__icon`}),title:t,subTitle:n,extra:(0,f.jsx)(u.Button,{type:`primary`,size:`large`,onClick:()=>{if(typeof a==`function`){a();return}typeof window<`u`&&window.location.assign(r)},children:i})})})}):o}Ih.propTypes={children:y.default.node,title:y.default.node,message:y.default.node,loginPath:y.default.string,loginLabel:y.default.node,onLogin:y.default.func,fallback:y.default.node};var Lh=60;function Rh(){let[e,t]=(0,l.useState)(!0);return(0,f.jsxs)(`div`,{className:`app-layout-shell`,children:[(0,f.jsx)(Mh,{collapsed:e,onToggle:()=>t(e=>!e)}),(0,f.jsx)(wh,{leftOffset:60}),(0,f.jsx)(`main`,{className:`app-layout-main`,style:{marginLeft:60,paddingTop:Lh},children:(0,f.jsx)(`div`,{className:`app-layout-content`,children:(0,f.jsx)(Ih,{children:(0,f.jsx)(p.Outlet,{})})})})]})}function zh({onLogin:e,defaultRedirectPath:t=`/`}){let[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(``),o=(0,p.useNavigate)(),s=(0,p.useLocation)(),c=s.state?.from?.pathname||t,m=new URLSearchParams(s.search).get(`session_expired`)===`1`;async function h(t){a(``),r(!0);try{let n=await le({email:t.email,user_pwd:t.user_pwd});if(e?.(n),ae()){o(`/select-project`,{replace:!0});return}o(c,{replace:!0})}catch(e){a(e.message||`Unable to login. Please check your credentials.`)}finally{r(!1)}}return(0,f.jsxs)(`div`,{className:`auth-login-page`,children:[(0,f.jsx)(`section`,{className:`auth-login-bg`,style:{background:Ka.brand},children:(0,f.jsxs)(`div`,{className:`auth-login-static-section`,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(`img`,{src:nh,alt:``,className:`auth-login-img-one`})}),(0,f.jsx)(`div`,{className:`auth-login-hero-wrap`,children:(0,f.jsx)(`img`,{src:rh,alt:``,className:`auth-login-img-two`})}),(0,f.jsx)(X,{as:`p`,variant:`body`,color:`inverse`,size:`2xl`,weight:`regular`,align:`right`,className:`auth-login-tagline`,children:`Best in class processes in a box.`})]})}),(0,f.jsx)(`section`,{className:`auth-login-form-layout`,children:(0,f.jsx)(`div`,{className:`auth-login-form-container`,children:(0,f.jsxs)(`div`,{className:`auth-login-form-shell`,children:[m&&(0,f.jsx)(`div`,{className:`auth-login-session-expired-container`,children:(0,f.jsx)(`div`,{className:`auth-login-slide-in`,children:(0,f.jsx)(u.Alert,{type:`warning`,showIcon:!0,icon:(0,f.jsx)(d.ExclamationCircleFilled,{style:{fontSize:30,color:`#FFC107`}}),message:(0,f.jsxs)(`div`,{className:`auth-login-alert-message-container`,children:[(0,f.jsx)(u.Divider,{className:`auth-login-alert-divider`,type:`vertical`}),(0,f.jsx)(`div`,{className:`auth-login-alert-text`,children:`Session expired. Please log in again.`})]}),className:`auth-login-session-expired-alert`})})}),(0,f.jsxs)(`div`,{className:`auth-login-brand`,children:[(0,f.jsx)(`img`,{src:`/favicon.ico`,alt:``,className:`auth-login-logo`}),(0,f.jsx)(X,{variant:`h3`,color:`primary`,weight:`bold`,className:`auth-login-brand-text`,children:`Zinnext`})]}),(0,f.jsx)(`div`,{className:`auth-login-body`,children:(0,f.jsxs)(`div`,{className:`auth-login-sign-body`,children:[(0,f.jsx)(X,{variant:`h2`,color:`primary`,weight:`bold`,align:`center`,className:`auth-login-title`,children:`Sign in`}),(0,f.jsx)(`div`,{className:`auth-login-form-con`,children:(0,f.jsxs)(u.Form,{className:`v1-form auth-login-form`,layout:`vertical`,requiredMark:!1,onFinish:h,autoComplete:`off`,children:[(0,f.jsx)(u.Form.Item,{label:`Email`,name:`email`,rules:[{type:`email`,required:!0,message:`Enter valid email.`}],children:(0,f.jsx)(u.Input,{size:`large`,placeholder:`Your work email`,autoComplete:`email`})}),(0,f.jsx)(u.Form.Item,{label:`Password`,name:`user_pwd`,rules:[{required:!0,message:`Mandatory field.`}],children:(0,f.jsx)(u.Input.Password,{size:`large`,placeholder:`Enter password`,autoComplete:`current-password`})}),(0,f.jsx)(u.Form.Item,{className:`auth-login-forgot-row`,children:(0,f.jsx)(u.Button,{type:`link`,className:`auth-login-forgot`,htmlType:`button`,children:`Forgot Password?`})}),i&&(0,f.jsx)(u.Form.Item,{children:(0,f.jsx)(X,{color:`danger`,variant:`body`,children:i})}),(0,f.jsx)(u.Button,{className:`auth-login-submit`,block:!0,size:`large`,type:`primary`,htmlType:`submit`,loading:n,id:`znxt-signin`,children:`Sign in`}),(0,f.jsx)(u.Form.Item,{className:`auth-login-divider-row`,children:(0,f.jsx)(u.Divider,{children:`Or`})}),(0,f.jsxs)(X,{as:`p`,variant:`body`,color:`secondary`,align:`center`,className:`auth-login-signup-text`,children:[`Not registered yet?`,` `,(0,f.jsx)(u.Button,{type:`link`,htmlType:`button`,className:`auth-login-signup`,id:`znxt-signup`,children:`Sign up`})]})]})})]})})]})})})]})}async function Bh(e){return fe(E,e)}async function Vh(e,t){let n=await J(E,e,{method:`POST`,body:JSON.stringify(t)});return n.data??n}async function Hh(e,t){let n=await J(E,e,{method:`PUT`,body:JSON.stringify(t)});return n.data??n}async function Uh(e){let t=await J(E,e,{method:`DELETE`});return t.data??t}async function Wh(e){return Bh(`/testing-modules?type=${encodeURIComponent(e)}`)}async function Gh({name:e,type:t}){return Vh(`/testing-modules`,{name:e,type:t})}async function Kh(){return Bh(`/test-action-field-rules`)}async function qh(e){return Vh(`/test-flows`,e)}async function Jh({limit:e=10,offset:t=0,search:n=``,module:r=``,keyword:i=``,tags:a=``,active:o}={}){let s=new URLSearchParams({limit:String(e),offset:String(t)});return n&&s.append(`search`,n),r&&s.append(`module`,r),i&&s.append(`keyword`,i),a&&s.append(`tags`,a),o!=null&&o!==``&&s.append(`active`,String(o)),Bh(`/test-flows?${s.toString()}`)}async function Yh(e){return Vh(`/test-steps/validate`,e)}async function Xh(e){return Vh(`/test-steps/bulk-insert`,e)}async function Zh(e){return Vh(`/lms-flows`,e)}async function Qh({limit:e=10,offset:t=0,search:n=``,module:r=``,keyword:i=``,tags:a=``,active:o}={}){let s=new URLSearchParams({limit:String(e),offset:String(t)});return n&&s.append(`search`,n),r&&s.append(`module`,r),i&&s.append(`keyword`,i),a&&s.append(`tags`,a),o!=null&&o!==``&&s.append(`active`,String(o)),Bh(`/lms-flows?${s.toString()}`)}async function $h({activeOnly:e=!1}={}){let t=new URLSearchParams;e&&t.append(`active`,`1`);let n=t.toString();return Bh(`/ct/projects${n?`?${n}`:``}`)}async function eg({project:e=``,activeOnly:t=!1}={}){let n=new URLSearchParams;e&&n.append(`project`,e),t&&n.append(`active`,`1`);let r=n.toString();return Bh(`/ct/modules${r?`?${r}`:``}`)}async function tg({project:e,modulename:t}){return Vh(`/ct/modules`,{project:e,modulename:t})}async function ng(e,t){return Hh(`/ct/modules/status`,{id:e,active:t})}async function rg({project:e=``,module:t=``,activeOnly:n=!1}={}){let r=new URLSearchParams;e&&r.append(`project`,e),t&&r.append(`module`,t),n&&r.append(`active`,`1`);let i=r.toString();return Bh(`/ct/submodules${i?`?${i}`:``}`)}async function ig({project:e,modulename:t,submodulename:n}){return Vh(`/ct/submodules`,{project:e,modulename:t,submodulename:n})}async function ag(e,t){return Hh(`/ct/submodules/status`,{id:e,active:t})}async function og({project:e=``,module:t=``,submodule:n=``,product_parent_ID:r=``,module_parent_ID:i=``,submodule_parent_ID:a=``,actions:o=``,search:s=``,active:c,limit:l=1e3,offset:u=0}={}){let d=new URLSearchParams({limit:String(l),offset:String(u)}),f=r||e,p=i||t,m=a||n;return f&&d.append(`product_parent_ID`,f),p&&d.append(`module_parent_ID`,p),m&&d.append(`submodule_parent_ID`,m),o&&d.append(`actions`,o),s&&d.append(`search`,s),c!=null&&c!==``&&d.append(`active`,String(c)),Bh(`/ct/flows?${d.toString()}`)}async function sg(e){return Vh(`/ct/flows`,e)}async function cg(e){return Bh(`/ct/flows/${encodeURIComponent(e)}`)}async function lg({project:e,module:t,submodule:n,product_parent_ID:r,module_parent_ID:i,submodule_parent_ID:a}){return Bh(`/ct/flows/next-step?${new URLSearchParams({product_parent_ID:String(r||e),module_parent_ID:String(i||t),submodule_parent_ID:String(a||n)}).toString()}`)}async function ug(e,t){return Hh(`/ct/flows/${encodeURIComponent(e)}`,t)}async function dg(e){return Uh(`/ct/flows/${encodeURIComponent(e)}`)}var fg=`zinnext`;function pg(){let[e]=u.Form.useForm(),t=(0,p.useNavigate)(),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(``);(0,l.useEffect)(()=>{let t=!0;return Promise.resolve().then(()=>$h({activeOnly:!0})).then(n=>{if(!t)return;let i=n?.items??[];r(i);let a=se(),o=i.find(e=>e.id===a?.id)||i.find(e=>e.projectname?.toLowerCase()===fg)||i[0];o&&e.setFieldsValue({project:o.id})}).catch(e=>{console.error(`Unable to load projects:`,e),t&&s(`Unable to load projects. Please try again.`)}),()=>{t=!1}},[e]);function c(e){let r=n.find(t=>t.id===e.project);if(!r){s(`Please select a project.`);return}a(!0),oe({id:r.id,name:r.projectname}),t(`/addTestCase`,{replace:!0})}return(0,f.jsxs)(`div`,{className:`auth-login-page`,children:[(0,f.jsx)(`section`,{className:`auth-login-bg`,style:{background:Ka.brand},children:(0,f.jsxs)(`div`,{className:`auth-login-static-section`,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(`img`,{src:nh,alt:``,className:`auth-login-img-one`})}),(0,f.jsx)(`div`,{className:`auth-login-hero-wrap`,children:(0,f.jsx)(`img`,{src:rh,alt:``,className:`auth-login-img-two`})}),(0,f.jsx)(X,{as:`p`,variant:`body`,color:`inverse`,size:`2xl`,weight:`regular`,align:`right`,className:`auth-login-tagline`,children:`Best in class processes in a box.`})]})}),(0,f.jsx)(`section`,{className:`auth-login-form-layout`,children:(0,f.jsx)(`div`,{className:`auth-login-form-container`,children:(0,f.jsxs)(`div`,{className:`auth-login-form-shell`,children:[(0,f.jsxs)(`div`,{className:`auth-login-brand`,children:[(0,f.jsx)(`img`,{src:`/favicon.ico`,alt:``,className:`auth-login-logo`}),(0,f.jsx)(X,{variant:`h3`,color:`primary`,weight:`bold`,className:`auth-login-brand-text`,children:`Zinnext`})]}),(0,f.jsx)(`div`,{className:`auth-login-body`,children:(0,f.jsxs)(`div`,{className:`auth-login-sign-body`,children:[(0,f.jsx)(X,{variant:`h2`,color:`primary`,weight:`bold`,align:`center`,className:`auth-login-title`,children:`Select Project`}),(0,f.jsx)(`div`,{className:`auth-login-form-con`,children:(0,f.jsxs)(u.Form,{form:e,className:`v1-form auth-login-form`,layout:`vertical`,requiredMark:!1,onFinish:c,autoComplete:`off`,children:[(0,f.jsx)(u.Form.Item,{label:`Project`,name:`project`,rules:[{required:!0,message:`Select a project.`}],children:(0,f.jsx)(u.Select,{size:`large`,showSearch:!0,optionFilterProp:`label`,placeholder:`Select project`,prefix:(0,f.jsx)(d.ProjectOutlined,{}),options:n.map(e=>({value:e.id,label:e.projectname}))})}),o&&(0,f.jsx)(u.Form.Item,{children:(0,f.jsx)(X,{color:`danger`,variant:`body`,children:o})}),(0,f.jsx)(u.Button,{className:`auth-login-submit`,block:!0,size:`large`,type:`primary`,htmlType:`submit`,loading:i,id:`znxt-select-project`,children:`Continue`})]})})]})})]})})})]})}function mg(e,t){function n(n){return(0,f.jsx)(Ih,{...t,children:(0,f.jsx)(e,{...n})})}return n.displayName=`withAuthGuard(${e.displayName||e.name||`Component`})`,n}var hg=`${D}`;async function gg(e,t={}){let n=ee(),r=t.body instanceof FormData,i=await fetch(`${hg}${e}`,{...t,headers:{...r?{}:{"Content-Type":`application/json`},"X-App-Id":O,...n?{Authorization:`Bearer ${n}`}:{},...t.headers??{}}}),a=await i.json().catch(()=>({}));if(!i.ok)throw Error(a?.error??a?.message??`Request failed: ${i.status}`);return a?.data??a}function _g(e,t=[]){if(Array.isArray(e))return e;for(let n of[...t,`data`,`result`,`rows`,`items`])if(Array.isArray(e?.[n]))return e[n];for(let n of t){if(Array.isArray(e?.data?.[n]))return e.data[n];if(Array.isArray(e?.result?.[n]))return e.result[n]}return[]}function vg(e){let t=e.user_id??e.userId??e.UserId,n=e.user_type_id??e.roleId??e.role_id??e.RoleId,r=e.first_name??e.firstName??``,i=e.last_name??e.lastName??``;return{...e,user_id:t,username:e.username??e.userName??e.user_name??`${r}${i}`.trim(),first_name:r,last_name:i,email:e.email,mobile:e.mobile??e.phoneNumber??e.phone_number??e.mobile_number,user_type_id:n,role_id:n,profile_image:e.profile_image??e.photoLocation??e.photo_location,status:bg(e.status??e.active_status)}}function yg(e){let t=e.user_type_id??e.role_id??e.roleId??e.id;return{...e,user_type_id:t,user_type_name:e.user_type_name??e.role_name??e.roleName??e.name,description:e.description??e.role_description??e.roleDescription??``,status:bg(e.status??e.active_status??`ACTIVE`)}}function bg(e){if(e===!0||e===1||e===`1`)return`ACTIVE`;let t=String(e??`ACTIVE`).trim().toUpperCase();return t===`ACTIVE`||t===`ENABLED`?`ACTIVE`:`INACTIVE`}function xg(e){return{...e,user_name:e.username??e.user_name,first_name:e.first_name,last_name:e.last_name,email:e.email,user_pwd:e.password??e.user_pwd,phone_number:e.mobile??e.phone_number,mobile_number:e.mobile??e.mobile_number,role_id:e.user_type_id??e.role_id,status:e.status}}function Sg(e){let t=new FormData;return t.append(`json`,JSON.stringify(e)),t}function Cg(e){return(Array.isArray(e)?e:Object.entries(e??{}).map(([e,t])=>({...t,menu_name:e}))).map(e=>{let t=e.menu_id??e.menuId,n=e.menu_name??e.menuName??e.name??String(t??``),r=Object.entries(e.permissions??{}).reduce((e,[t,n])=>(e[t]={...n,permission_id:n?.permission_id??n?.permissionId??n?.id,permission_key:n?.permission_key??n?.permissionKey??t,value:n?.value??n?.access_value??n},e),{});return{...e,menu_id:t,menu_name:n,menu_key:e.menu_key??e.menuKey??n,permissions:r}})}function wg(e,t){return{roleId:e,menus:t.reduce((e,t)=>{let n=t.menu_name??t.menuName??t.menu_key??String(t.menu_id),r=t.permission_key??t.permissionKey;return r?(e[n]||(e[n]={menuId:t.menu_id??t.menuId,permissions:{}}),e[n].permissions[r]={id:t.permission_id??t.permissionId,value:String(+(Number(t.access_value??t.accessValue)===1))},e):e},{})}}function Tg(){return gg(`/get-all-users?limit=500&offset=0`).then(e=>_g(e,[`users`]).map(vg))}function Eg(e){return gg(`/create-user`,{method:`POST`,body:Sg(xg(e))})}function Dg(e,t){return gg(`/update-user?userId=${encodeURIComponent(e)}`,{method:`PUT`,body:Sg(xg(t))})}function Og(e){return gg(`/delete-user?userId=${encodeURIComponent(e)}`,{method:`PUT`})}function kg(){return gg(`/roles-list`).then(e=>_g(e).map(yg))}function Ag(e){return gg(`/get-role-details?roleid=${encodeURIComponent(e)}`).then(Cg)}function jg(e,t){return gg(`/edit-role-details`,{method:`PUT`,body:JSON.stringify(wg(e,t))})}var{Text:Mg}=u.Typography,{Option:Ng}=u.Select,Pg=[{key:`job`,label:`Jobs`},{key:`candidate`,label:`Candidates`},{key:`submissions`,label:`Submissions`}],Fg=[{key:`listView`,label:`List View`},{key:`filter`,label:`Filter`},{key:`form`,label:`Form`},{key:`permissions`,label:`Permissions`}],Ig=[{key:``,label:`Text`,icon:(0,f.jsx)(`span`,{style:{fontSize:14,fontWeight:700},children:`Aa`})},{key:`badge`,label:`Badge`,icon:(0,f.jsx)(d.TagsOutlined,{style:{fontSize:16}})},{key:`avatar`,label:`Avatar`,icon:(0,f.jsx)(d.UserOutlined,{style:{fontSize:16}})},{key:`link`,label:`Link`,icon:(0,f.jsx)(d.LinkOutlined,{style:{fontSize:16}})}];function Lg(e){return e?.USER_NAME??e?.user_name??e?.username??e?.name??e?.full_name??e?.fullName??e?.email??`User ${e?.USER_ID??e?.user_id??`?`}`}function Rg(e){return{...e,key:e.USER_ID??e.user_id??e.userId??e.id??e._id,_name:Lg(e),_email:e.email??e.EMAIL??e.user_email??``,_role:e.role_name??e.roleName??e.ROLE_NAME??``,_rawRef:e}}var zg=[{color:`#52c41a`,bg:`#f6ffed`},{color:`#1677ff`,bg:`#e6f7ff`},{color:`#fa8c16`,bg:`#fff7e6`},{color:`#ff4d4f`,bg:`#fff2f0`},{color:`#722ed1`,bg:`#f9f0ff`},{color:`#13c2c2`,bg:`#e6fffb`},{color:`#eb2f96`,bg:`#fff0f6`},{color:`#faad14`,bg:`#fffbe6`}],Bg={job:`jobs`,candidate:`candidates`,submissions:`submissions`};function Vg(e){let t=e?.raw?.ROLE_ID??e?.raw?.role_id??e?.raw?.roleId??e?.raw?.ROLEID??e?.ROLE_ID??e?.role_id??e?.roleId??e?.ROLEID??0,n=Number(t);return Number.isFinite(n)&&n>0?n:0}function Hg(e){let t=e?.data??e;return Array.isArray(t)?t:Array.isArray(t?.visibleFields)?t.visibleFields:Array.isArray(e?.visibleFields)?e.visibleFields:[]}async function Ug(e,t,n){let r=e?ur(e):0,i=e?Vg(e):0;return(await Promise.all(n.map(async({key:e,apiModule:n})=>{let a=n??Bg[e]??e,o=new URLSearchParams({module:a,userId:String(r??``),roleId:String(i??``),configType:t});try{return Hg(await J(E,`/admin/field-config?${o}`)).length>0}catch{return!1}}))).some(Boolean)}function Wg(e){return J(E,`/admin/field-config/seed`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({collections:e})})}function Gg(e){return String(e||``).replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}function Kg(e){if(typeof e==`string`)return{key:e,apiModule:e,label:Gg(e)};let t=e?.key??e?.moduleKey??e?.value??e?.module??e?.apiModule??e?.name??e?.modulename??e?.menuName;return t?{key:t,apiModule:e?.apiModule??e?.api_module??e?.module??e?.value??e?.key??e?.name??e?.modulename??e?.menuName??t,label:e?.label??e?.moduleLabel??e?.moduleName??e?.name??e?.modulename??e?.menuName??Gg(t)}:null}function qg(e){let t=Array.isArray(e)&&e.length?e:Pg,n=new Set,r=t.map(Kg).filter(Boolean).filter(e=>n.has(e.key)?!1:(n.add(e.key),!0));return r.length?r:Pg}function Jg({field:e,collections:t,collFields:n,subfields:r,onCollectionChange:i,onLookupFieldChange:a,addSecondaryField:o,removeSecondaryField:s,addActionButton:c,updateActionButton:p,removeActionButton:m,moduleKey:h,fieldKey:g,update:_}){let[v,y]=(0,l.useState)(``),[b,x]=(0,l.useState)({}),[S,C]=(0,l.useState)(!1);function w(e){_(e===`common`?{commonStyle:{color:`#1677ff`,bg:`#e6f7ff`,variant:`badge`},valueStyles:[]}:{commonStyle:null})}function T(t){_({commonStyle:{...e.commonStyle??{color:`#595959`,bg:`#f5f5f5`,variant:`badge`},...t}})}function E(){_({valueStyles:[...e.valueStyles??[],{value:``,label:``,color:`#595959`,bg:`#f5f5f5`,variant:`badge`}]})}function D(t,n){let r=[...e.valueStyles??[]];r[t]={...r[t],...n},_({valueStyles:r})}function O(t){_({valueStyles:(e.valueStyles??[]).filter((e,n)=>n!==t)})}async function k(){C(!0);try{let t=await zo(e.apiModule??Bg[h]??h,g,``,50,0),n=(Array.isArray(t)?t:t?.data??[]).map((e,t)=>{let n=typeof e==`object`?e.value??e.label??``:String(e),r=typeof e==`object`?e.label??e.value??``:String(e);return{value:String(n),label:String(r),variant:`badge`,...zg[t%zg.length]}});if(n.length===0){u.message.info(`No values found for this field`);return}_({valueStyles:n})}catch{u.message.error(`Could not detect values`)}finally{C(!1)}}async function A(e,t){x(t=>({...t,[e]:!0}));try{let n=await gr(t);p(e,{iconUrl:n?.iconUrl??n?.url??``,iconPath:n?.iconPath??n?.path??``})}catch{u.message.error(`Icon upload failed`)}finally{x(t=>({...t,[e]:!1}))}return!1}let j=e.renderType??``,M=!!e.commonStyle,N=e.commonStyle??{},P=e.valueStyles??[],F=e.renderConfig??{};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsx)(`div`,{className:`uss-detail-label`,children:`Display Style`}),(0,f.jsx)(`div`,{className:`uss-detail-row`,children:Ig.map(e=>(0,f.jsxs)(`button`,{className:`uss-render-type-btn${j===e.key?` active`:``}`,onClick:()=>_({renderType:e.key,commonStyle:null,valueStyles:[],renderConfig:null}),children:[e.icon,(0,f.jsx)(`span`,{children:e.label})]},e.key))}),j===`badge`&&(0,f.jsxs)(`div`,{className:`uss-badge-config`,children:[(0,f.jsxs)(u.Radio.Group,{size:`small`,value:M?`common`:`perValue`,onChange:e=>w(e.target.value),style:{marginBottom:8},children:[(0,f.jsx)(u.Radio,{value:`perValue`,children:`Per value`}),(0,f.jsx)(u.Radio,{value:`common`,children:`Same for all`})]}),M&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,flexWrap:`wrap`},children:[(0,f.jsx)(u.Tooltip,{title:`Text color`,children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,f.jsx)(`input`,{type:`color`,value:N.color||`#595959`,style:{width:28,height:24,border:`none`,cursor:`pointer`,padding:0},onChange:e=>T({color:e.target.value})}),(0,f.jsx)(Mg,{style:{fontSize:10},children:`Text`})]})}),(0,f.jsx)(u.Tooltip,{title:`Background color`,children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,f.jsx)(`input`,{type:`color`,value:N.bg||`#f5f5f5`,style:{width:28,height:24,border:`none`,cursor:`pointer`,padding:0},onChange:e=>T({bg:e.target.value})}),(0,f.jsx)(Mg,{style:{fontSize:10},children:`BG`})]})}),(0,f.jsx)(u.Select,{size:`small`,style:{width:80},value:N.variant||`badge`,options:[{value:`badge`,label:`Badge`},{value:`dot`,label:`Dot`},{value:`tag`,label:`Tag`}],onChange:e=>T({variant:e})}),(0,f.jsx)(`span`,{style:{padding:`1px 12px`,borderRadius:20,fontSize:11,fontWeight:500,color:N.color||`#595959`,background:N.bg||`#f5f5f5`},children:`Preview`})]}),!M&&(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:6},children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#555`,fontWeight:600},children:`Value → Style mapping`}),(0,f.jsxs)(u.Space,{size:6,children:[(0,f.jsx)(u.Button,{size:`small`,loading:S,onClick:k,children:`Auto-detect values`}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:E,children:`Add`})]})]}),P.length===0&&(0,f.jsx)(Mg,{type:`secondary`,style:{fontSize:12},children:`Click "Auto-detect values" to populate from live data, or "Add" to map manually.`}),P.map((e,t)=>(0,f.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 62px 62px 54px 26px`,gap:5,alignItems:`center`,marginBottom:6},children:[(0,f.jsx)(u.Input,{size:`small`,placeholder:`raw value`,value:e.value??``,onChange:e=>D(t,{value:e.target.value})}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`display label`,value:e.label??``,onChange:e=>D(t,{label:e.target.value})}),(0,f.jsx)(u.Tooltip,{title:`Text color`,children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:3},children:[(0,f.jsx)(`input`,{type:`color`,value:e.color||`#595959`,style:{width:28,height:24,border:`none`,cursor:`pointer`,padding:0},onChange:e=>D(t,{color:e.target.value})}),(0,f.jsx)(Mg,{style:{fontSize:10},children:`Text`})]})}),(0,f.jsx)(u.Tooltip,{title:`Background color`,children:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:3},children:[(0,f.jsx)(`input`,{type:`color`,value:e.bg||`#f5f5f5`,style:{width:28,height:24,border:`none`,cursor:`pointer`,padding:0},onChange:e=>D(t,{bg:e.target.value})}),(0,f.jsx)(Mg,{style:{fontSize:10},children:`BG`})]})}),(0,f.jsx)(`span`,{style:{padding:`1px 6px`,borderRadius:20,fontSize:11,fontWeight:500,textAlign:`center`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:e.color||`#595959`,background:e.bg||`#f5f5f5`},children:e.label||e.value||`…`}),(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.CloseOutlined,{}),onClick:()=>O(t)})]},t))]})]}),j===`avatar`&&(0,f.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr 80px`,gap:8,marginTop:8},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#555`,display:`block`,marginBottom:3},children:`Name field`}),(0,f.jsx)(u.Select,{size:`small`,showSearch:!0,allowClear:!0,style:{width:`100%`},placeholder:`e.g. recruiterName`,value:F.labelField||void 0,options:r.length>0?r.map(e=>({value:e,label:e})):[],onChange:e=>_({renderConfig:{...F,labelField:e??``}})})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#555`,display:`block`,marginBottom:3},children:`Color field (opt.)`}),(0,f.jsx)(u.Select,{size:`small`,showSearch:!0,allowClear:!0,style:{width:`100%`},placeholder:`color`,value:F.colorField||void 0,options:r.length>0?r.map(e=>({value:e,label:e})):[],onChange:e=>_({renderConfig:{...F,colorField:e??``}})})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#555`,display:`block`,marginBottom:3},children:`Max visible`}),(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:1,max:10,value:F.maxVisible||3,onChange:e=>_({renderConfig:{...F,maxVisible:Number(e.target.value)||3}})})]})]})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsx)(`div`,{className:`uss-detail-label`,children:`Display Template`}),(0,f.jsx)(eh,{value:e.displayTemplate??``,onChange:e=>_({displayTemplate:e}),placeholder:`e.g. {{firstName}} {{lastName}}`})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsxs)(`div`,{className:`uss-detail-label`,children:[`Link`,(0,f.jsx)(u.Switch,{size:`small`,style:{marginLeft:8},checked:!!e.isLink,onChange:e=>_({isLink:e})})]}),e.isLink&&(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,paddingTop:4},children:[(0,f.jsx)(eh,{value:e.linkTemplate??``,onChange:e=>_({linkTemplate:e}),placeholder:`e.g. /jobs/{{jobId}}`}),(0,f.jsxs)(`div`,{className:`uss-detail-row`,children:[(0,f.jsxs)(u.Select,{size:`small`,value:e.linkType??`internal`,onChange:e=>_({linkType:e}),style:{width:120},children:[(0,f.jsx)(Ng,{value:`internal`,children:`internal`}),(0,f.jsx)(Ng,{value:`external`,children:`external`})]}),(0,f.jsxs)(u.Select,{size:`small`,value:e.linkTarget??`_self`,onChange:e=>_({linkTarget:e}),style:{width:100},children:[(0,f.jsx)(Ng,{value:`_self`,children:`_self`}),(0,f.jsx)(Ng,{value:`_blank`,children:`_blank`})]})]})]})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsx)(`div`,{className:`uss-detail-label`,children:`Secondary Fields`}),(0,f.jsx)(`div`,{className:`uss-detail-row`,style:{flexWrap:`wrap`},children:(e.secondaryFields??[]).map(e=>(0,f.jsxs)(`span`,{className:`uss-secondary-tag`,children:[e,(0,f.jsx)(`button`,{onClick:()=>s(e),children:`×`})]},e))}),(0,f.jsxs)(`div`,{className:`uss-detail-row`,children:[(0,f.jsx)(u.Input,{size:`small`,placeholder:`Add field key`,value:v,onChange:e=>y(e.target.value),onPressEnter:()=>{o(v),y(``)},style:{width:160}}),(0,f.jsx)(u.Button,{size:`small`,type:`link`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{o(v),y(``)},children:`Add`})]}),e.secondaryFields?.length>0&&(0,f.jsxs)(`div`,{style:{marginTop:4,display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`var(--color-text-muted)`},children:`Separator:`}),(0,f.jsx)(u.Input,{size:`small`,value:e.secondarySeparator??``,placeholder:`·`,style:{width:64},onChange:e=>_({secondarySeparator:e.target.value})})]})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsxs)(`div`,{className:`uss-detail-label`,children:[`Lookup (FK resolve)`,(0,f.jsx)(u.Switch,{size:`small`,style:{marginLeft:8},checked:!!e.lookup,onChange:e=>_({lookup:e?{collection:``,displayField:``,valueField:``,projectFields:[]}:null})})]}),e.lookup&&(0,f.jsxs)(`div`,{className:`uss-lookup-grid`,children:[(0,f.jsxs)(`div`,{className:`uss-lookup-row`,children:[(0,f.jsx)(`span`,{className:`uss-lookup-label`,children:`Collection`}),(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.collection??``,onChange:i,showSearch:!0,placeholder:`Select collection`,style:{flex:1},children:t.map(e=>(0,f.jsx)(Ng,{value:e,children:e},e))})]}),n.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`uss-lookup-row`,children:[(0,f.jsx)(`span`,{className:`uss-lookup-label`,children:`Value Field`}),(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.valueField??``,onChange:t=>a(e.fieldKey,{valueField:t}),placeholder:`ID field`,style:{flex:1},children:n.map(e=>(0,f.jsx)(Ng,{value:e,children:e},e))})]}),(0,f.jsxs)(`div`,{className:`uss-lookup-row`,children:[(0,f.jsx)(`span`,{className:`uss-lookup-label`,children:`Display Field`}),(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.displayField??``,onChange:t=>a(e.fieldKey,{displayField:t}),placeholder:`Label field`,style:{flex:1},children:[...n,...r].map(e=>(0,f.jsx)(Ng,{value:e,children:e},e))})]})]})]})]}),(0,f.jsxs)(`div`,{className:`uss-detail-section`,children:[(0,f.jsxs)(`div`,{className:`uss-detail-label`,style:{display:`flex`,justifyContent:`space-between`},children:[(0,f.jsxs)(`span`,{children:[`Action Buttons `,(0,f.jsx)(`span`,{style:{fontSize:11,fontWeight:400,color:`var(--color-text-muted)`},children:`(max 3)`})]}),(e.actionButtons??[]).length<3&&(0,f.jsx)(u.Button,{type:`link`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:c,children:`Add Icon`})]}),(e.actionButtons??[]).map((e,t)=>(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`div`,{className:`uss-action-btn-row`,children:[(0,f.jsx)(u.Upload,{showUploadList:!1,beforeUpload:e=>(A(t,e),!1),accept:`image/*`,children:(0,f.jsx)(u.Tooltip,{title:`Click to upload icon`,children:(0,f.jsx)(`div`,{className:`uss-action-btn-icon-slot`,children:b[t]?(0,f.jsx)(u.Spin,{size:`small`}):e.iconUrl?(0,f.jsx)(`img`,{src:e.iconUrl,alt:`action-${t}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}}):(0,f.jsx)(d.UploadOutlined,{style:{color:`#aaa`,fontSize:14}})})})}),(0,f.jsx)(u.Input,{size:`small`,value:e.name??``,onChange:e=>p(t,{name:e.target.value}),placeholder:`Tooltip (e.g. Edit)`,style:{width:110}}),(0,f.jsxs)(u.Radio.Group,{size:`small`,value:e.type??`page`,onChange:e=>p(t,{type:e.target.value}),children:[(0,f.jsx)(u.Radio,{value:`page`,children:`Page`}),(0,f.jsx)(u.Radio,{value:`popup`,children:`Popup`})]}),(0,f.jsx)(u.Input,{size:`small`,value:e.routeUrl??``,onChange:e=>p(t,{routeUrl:e.target.value}),placeholder:`Route URL (e.g. /jobs/:_id)`,prefix:(0,f.jsx)(d.LinkOutlined,{style:{color:`#bbb`}}),style:{flex:1}}),(0,f.jsx)(u.Button,{size:`small`,danger:!0,type:`text`,onClick:()=>m(t),children:`✕`})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,paddingLeft:36},children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#999`,whiteSpace:`nowrap`},children:`Permission:`}),(0,f.jsx)(u.Select,{size:`small`,allowClear:!0,value:e.permissionKey||void 0,onChange:e=>p(t,{permissionKey:e??``}),placeholder:`Always visible`,style:{width:180},options:[{value:`edit`},{value:`delete`},{value:`add`},{value:`view`}]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,paddingLeft:36,marginTop:4},children:[(0,f.jsx)(Mg,{style:{fontSize:11,color:`#999`,whiteSpace:`nowrap`},children:`Show only if:`}),(0,f.jsx)(u.Input,{size:`small`,value:e.showIfField??``,onChange:e=>p(t,{showIfField:e.target.value}),placeholder:`field (e.g. internalSubmissionStatus)`,style:{width:210}}),(0,f.jsx)(Mg,{style:{fontSize:11,color:`#999`},children:`=`}),(0,f.jsx)(u.Input,{size:`small`,value:e.showIfValue??``,onChange:e=>p(t,{showIfValue:e.target.value}),placeholder:`value (e.g. Resubmitted)`,style:{width:150}}),e.showIfField&&(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.CloseOutlined,{}),onClick:()=>p(t,{showIfField:``,showIfValue:``})})]})]},t))]})]})}var Yg=[{label:`Module data (distinct)`,value:`module`},{label:`Masters collection`,value:`master`},{label:`Group value`,value:`group`}],Xg=[`select`,`radio`,`checkbox`],Zg=[{label:`Dropdown`,value:`dropdown`},{label:`Checkbox`,value:`checkbox`},{label:`Radio`,value:`radio`},{label:`Date Range`,value:`datepicker`},{label:`Number Range`,value:`number-range`}];function Qg({field:e,update:t,configType:n,collections:r,collFields:i,onCollectionChange:a,onLookupFieldChange:o}){let s=Xg.includes(e.type),c=!!e.lookup;function l(e){t({lookup:e?{collection:``,displayField:``,valueField:``,projectFields:[]}:null})}return(0,f.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Editable`}),(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.isEditable,onChange:e=>t({isEditable:e})})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Mandatory`}),(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.ismandatory,onChange:e=>t({ismandatory:e})})]}),n===`filter`&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Value Input`}),(0,f.jsx)(u.Select,{size:`small`,value:e.filterInputType??`dropdown`,onChange:e=>t({filterInputType:e}),options:Zg,style:{width:140}})]}),n===`filter`&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Default`}),(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.isDefaultFilter,onChange:e=>t({isDefaultFilter:e})})]}),n===`filter`&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Lookup`}),(0,f.jsx)(u.Switch,{size:`small`,checked:c,onChange:l})]}),n===`filter`&&c&&(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:[(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.collection||void 0,onChange:a,showSearch:!0,placeholder:`Collection`,style:{width:160},options:(r??[]).map(e=>({label:e,value:e}))}),(i??[]).length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Select,{size:`small`,value:e.lookup?.valueField||void 0,onChange:t=>o(e.fieldKey,{valueField:t}),showSearch:!0,placeholder:`Value field (ID)`,style:{width:160},options:(i??[]).map(e=>({label:e,value:e}))}),(0,f.jsx)(u.Input,{size:`small`,value:e.lookup?.displayField??``,onChange:t=>o(e.fieldKey,{displayField:t.target.value}),placeholder:`Display field (e.g. name)`,style:{width:180}})]})]}),s&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Source`}),(0,f.jsx)(u.Select,{size:`small`,value:e.dataSource??`module`,onChange:e=>t({dataSource:e,groupName:``}),options:Yg,style:{width:170}})]}),(e.dataSource??`module`)===`group`&&(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(Mg,{style:{fontSize:12},children:`Group Name`}),(0,f.jsx)(u.Input,{size:`small`,value:e.groupName??``,onChange:e=>t({groupName:e.target.value}),placeholder:`e.g. skills`,style:{width:120}})]})]})]})}function $g({field:e,index:t,configType:n,moduleKey:r,onUpdate:i,onReorder:a,collections:o,onFetchCollFields:s,dragFromRef:c}){let[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(e.fieldName),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)([]),[C,w]=(0,l.useState)(!1),[T,E]=(0,l.useState)(!1);(0,l.useEffect)(()=>{queueMicrotask(()=>{v(e.fieldName)})},[e.fieldName]);function D(e){c.current=t,e.dataTransfer.effectAllowed=`move`,E(!0)}function O(){E(!1),w(!1)}function k(e){e.preventDefault(),w(!0)}function A(){w(!1)}function j(e){e.preventDefault(),w(!1),c.current!==null&&c.current!==t&&a(c.current,t),c.current=null}function M(e){i(t,e)}function N(){g(!1);let t=_.trim();t&&t!==e.fieldName?M({fieldName:t}):v(e.fieldName)}async function P(t){M({lookup:{...e.lookup,collection:t,displayField:``,valueField:``,projectFields:[]}}),b(await s(t))}async function F(t,n){if(M({lookup:{...e.lookup,...n}}),n.valueField)try{S(await yr(r,t))}catch{S([])}}function I(t){let n=e.secondaryFields??[];!t||n.includes(t)||M({secondaryFields:[...n,t]})}function L(t){M({secondaryFields:(e.secondaryFields??[]).filter(e=>e!==t)})}function R(){let t=e.actionButtons??[];t.length>=3||M({actionButtons:[...t,{name:``,iconUrl:``,iconPath:``,type:`page`,routeUrl:``,permissionKey:``}]})}function z(t,n){let r=[...e.actionButtons??[]];r[t]={...r[t],...n},M({actionButtons:r})}function B(t){let n=[...e.actionButtons??[]];n.splice(t,1),M({actionButtons:n})}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{draggable:!0,onDragStart:D,onDragEnd:O,onDragOver:k,onDragLeave:A,onDrop:j,className:`uss-field-row${C?` drag-over`:``}${T?` dragging`:``}`,style:{gridTemplateColumns:`24px 1fr 80px 56px`},children:[(0,f.jsx)(`span`,{className:`uss-drag-handle`,children:(0,f.jsx)(d.HolderOutlined,{})}),(0,f.jsxs)(`span`,{className:`uss-field-name`,children:[e.isVirtual&&(0,f.jsx)(`span`,{className:`uss-virtual-tag`,children:`virtual`}),h?(0,f.jsx)(`input`,{autoFocus:!0,value:_,onChange:e=>v(e.target.value),onBlur:N,onKeyDown:t=>{t.key===`Enter`&&N(),t.key===`Escape`&&(g(!1),v(e.fieldName))},onClick:e=>e.stopPropagation()}):(0,f.jsx)(u.Tooltip,{title:`Double-click to rename`,children:(0,f.jsx)(`span`,{style:{cursor:`text`,borderBottom:`1px dashed var(--color-border-muted)`},onDoubleClick:e=>{e.stopPropagation(),g(!0)},children:e.fieldName})}),(0,f.jsx)(`span`,{className:`uss-field-key`,children:e.fieldKey})]}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:e.isVisible,onChange:e=>M({isVisible:e})})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:p?(0,f.jsx)(d.DownOutlined,{}):(0,f.jsx)(d.RightOutlined,{}),onClick:()=>m(e=>!e),style:{color:`var(--color-text-muted)`}})})]}),p&&(0,f.jsx)(`div`,{className:`uss-detail-panel`,children:n===`listView`?(0,f.jsx)(Jg,{field:e,collections:o,collFields:y,subfields:x,onCollectionChange:P,onLookupFieldChange:F,addSecondaryField:I,removeSecondaryField:L,addActionButton:R,updateActionButton:z,removeActionButton:B,moduleKey:r,fieldKey:e.fieldKey,update:M}):(0,f.jsx)(Qg,{field:e,update:M,configType:n,collections:o,collFields:y,onCollectionChange:P,onLookupFieldChange:F})})]})}var e_={jobs:{title:`Jobs`,description:`Manage and configure job postings.`,Icon:d.SolutionOutlined,order:[`view`,`my_jobs`,`all_jobs`,`add`,`edit`,`delete`,`sourcing`,`assign`,`share`]},job:{title:`Job`,description:`Individual job management.`,Icon:d.SolutionOutlined,order:[`view`,`my_jobs`,`all_jobs`,`add`,`edit`,`delete`,`sourcing`,`assign`,`share`]},candidates:{title:`Candidates`,description:`Manage candidate profiles and data.`,Icon:d.UserOutlined,order:[`view`,`candidate_self`,`candidate_all`,`add`,`edit`,`delete`,`share`]},submissions:{title:`Submissions`,description:`Review and manage submissions.`,Icon:d.FileTextOutlined,order:[`view`,`approve`,`share`,`edit`,`change_status`,`move_onboard`]},vendors:{title:`Vendors`,description:`Manage vendor records and details.`,Icon:d.BankOutlined,order:[`view`,`add`,`edit`,`delete`]},hotlist:{title:`Hotlist`,description:`Manage hotlist candidates.`,Icon:d.StarOutlined,order:[`view`,`add`,`edit`,`delete`]},campaingns:{title:`Campaigns`,description:`Manage campaigns.`,Icon:d.NotificationOutlined,order:[`view`,`add`,`edit`,`delete`]},network:{title:`Network`,description:`Manage your network.`,Icon:d.GlobalOutlined,order:[`view`,`add`,`edit`,`delete`]},scheduler:{title:`Scheduler`,description:`Manage scheduling.`,Icon:d.CalendarOutlined,order:[`view`,`add`,`edit`,`delete`]},reports:{title:`Reports`,description:`View and manage reports.`,Icon:d.BarChartOutlined,order:[`view`,`add`,`edit`,`delete`]},onboarding:{title:`Onboarding`,description:`Manage onboarding.`,Icon:d.TeamOutlined,order:[`view`,`add`,`edit`,`delete`]}},t_={view:`View`,add:`Add`,edit:`Edit`,delete:`Delete`,sourcing:`Source`,assign:`Assign`,share:`Share`,approve:`Approve`,change_status:`Change Status`,move_onboard:`Move to Onboard`,candidate_self:`Self`,candidate_all:`All Candidates`,my_jobs:`My Jobs`,all_jobs:`All Jobs`},n_={candidates:{title:`Candidate View Access`,keys:[`candidate_self`,`candidate_all`],control:`radio`},jobs:{title:`Job View Access`,keys:[`my_jobs`,`all_jobs`],control:`mixed`},job:{title:`Job View Access`,keys:[`my_jobs`,`all_jobs`],control:`mixed`}};function r_(e){return String(e||``).replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}function i_(e){return e_[e]??{title:r_(e),description:`Manage ${r_(e).toLowerCase()} permissions.`,Icon:d.AppstoreOutlined,order:[`view`,`add`,`edit`,`delete`]}}function a_(e,t){let n=Object.keys(t?.permissions??{}),r=i_(e).order;return[...r.filter(e=>n.includes(e)),...n.filter(e=>!r.includes(e))]}function o_(e,t){let n=n_[e];return n?n.keys.filter(e=>!!t?.permissions?.[e]):[]}function s_(e,t){let n=o_(e,t);return a_(e,t).filter(e=>!n.includes(e))}function c_(e,t){let n=a_(e,t);return e===`candidates`?n.filter(e=>e!==`candidate_self`):e===`jobs`||e===`job`?n.filter(e=>e!==`my_jobs`):n}function l_({user:e}){let[t,n]=(0,l.useState)({}),[r,i]=(0,l.useState)(!1),[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(!1),p=ur(e);(0,l.useEffect)(()=>{if(!p){console.warn(`[UserPermPanel] Could not resolve userId from user object:`,e);return}queueMicrotask(()=>{i(!0),c(!1),Ar(p).then(e=>n(e??{})).catch(e=>{console.error(`[UserPermPanel] getUserPermissions error:`,e),u.message.error(`Failed to load permissions`)}).finally(()=>i(!1))})},[e,p]);let m=(0,l.useMemo)(()=>Object.entries(t).filter(([,e])=>e&&typeof e.permissions==`object`&&Object.keys(e.permissions).length>0),[t]);function h(e,t,r){c(!0),n(n=>{let i=n[e]??{},a={...i.permissions??{}};a[t]={...a[t],value:r?`1`:`0`};let o=o_(e,i);return t===`view`&&(e===`jobs`||e===`job`)&&r&&o.forEach(e=>{a[e]={...a[e],value:`1`}}),t===`view`&&!r&&o.forEach(e=>{a[e]={...a[e],value:`0`}}),o.includes(t)&&r&&a.view&&(a.view={...a.view,value:`1`}),{...n,[e]:{...i,permissions:a}}})}function g(e,t,r){c(!0),n(n=>{let i=n[e]??{},a={...i.permissions??{}},o=o_(e,i);if(e===`candidates`)o.forEach(e=>{a[e]={...a[e],value:e===t?`1`:`0`}});else{if(t===`my_jobs`)return n;a[t]={...a[t],value:r?`1`:`0`}}return a.view&&={...a.view,value:`1`},{...n,[e]:{...i,permissions:a}}})}function _(e,t){c(!0),n(n=>{let r=n[e]??{},i=Object.fromEntries(Object.entries(r.permissions??{}).map(([n,r])=>{if(e===`candidates`&&t){if(n===`candidate_self`)return[n,{...r,value:`0`}];if(n===`candidate_all`)return[n,{...r,value:`1`}]}return(e===`jobs`||e===`job`)&&t&&(n===`my_jobs`||n===`all_jobs`)?[n,{...r,value:`1`}]:[n,{...r,value:t?`1`:`0`}]}));return{...n,[e]:{...r,permissions:i}}})}async function v(){o(!0);try{await jr(p,t),c(!1),u.message.success(`Permissions saved`)}catch{u.message.error(`Save failed`)}finally{o(!1)}}return(0,f.jsxs)(u.Spin,{spinning:r,children:[(0,f.jsxs)(`div`,{className:`uss-perm-header`,children:[(0,f.jsxs)(`span`,{style:{fontSize:13,color:`var(--color-text-muted)`},children:[(0,f.jsx)(d.LockOutlined,{style:{color:`var(--color-brand)`,marginRight:6}}),`Configure module-level permissions for this user.`]}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.UnlockOutlined,{}),loading:a,disabled:!s,onClick:v,children:`Save Changes`})]}),m.length===0&&!r?(0,f.jsx)(`div`,{className:`uss-empty`,children:`No permission entries found for this user.`}):(0,f.jsx)(`div`,{className:`uperm-list`,children:m.map(([e,t])=>{let n=i_(e),{Icon:r}=n,i=s_(e,t),a=c_(e,t),o=o_(e,t),s=n_[e],c=t.permissions?.view?.value===`1`,l=o.find(e=>t.permissions[e]?.value===`1`),d=a.every(e=>t.permissions[e]?.value===`1`);return(0,f.jsxs)(`section`,{className:`uperm-card`,children:[(0,f.jsxs)(`div`,{className:`uperm-card-info`,children:[(0,f.jsx)(`div`,{className:`uperm-module-icon`,children:(0,f.jsx)(r,{style:{fontSize:22}})}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`uperm-module-title`,children:n.title}),(0,f.jsx)(`div`,{className:`uperm-module-desc`,children:n.description})]})]}),(0,f.jsxs)(`div`,{className:`uperm-permissions`,children:[(0,f.jsx)(u.Checkbox,{className:`uperm-select-all`,checked:d,onChange:t=>_(e,t.target.checked),children:`Select all`}),(0,f.jsx)(`div`,{className:`uperm-chip-row`,children:i.map(n=>(0,f.jsxs)(`label`,{className:`uperm-chip`,children:[(0,f.jsx)(u.Checkbox,{checked:t.permissions[n]?.value===`1`,onChange:t=>h(e,n,t.target.checked)}),(0,f.jsx)(`span`,{children:t_[n]??r_(n)})]},n))}),o.length>0&&(0,f.jsxs)(`div`,{className:`uperm-view-scope${c?``:` is-disabled`}`,children:[(0,f.jsx)(`div`,{className:`uperm-scope-title`,children:s.title}),s.control===`radio`?(0,f.jsx)(u.Radio.Group,{className:`uperm-scope-row`,value:l,disabled:!c,onChange:t=>g(e,t.target.value,!0),children:o.map(e=>(0,f.jsx)(u.Radio,{className:`uperm-scope-option`,value:e,children:t_[e]??r_(e)},e))}):(0,f.jsx)(`div`,{className:`uperm-scope-row`,children:o.map(n=>(0,f.jsxs)(`label`,{className:`uperm-scope-option`,children:[(0,f.jsx)(u.Checkbox,{checked:t.permissions[n]?.value===`1`,disabled:!c||n===`my_jobs`,onChange:t=>g(e,n,t.target.checked)}),(0,f.jsx)(`span`,{children:t_[n]??r_(n)})]},n))})]})]})]},e)})})]})}function u_({user:e,configType:t}){let[n,r]=(0,l.useState)({}),[i,a]=(0,l.useState)(Pg),[o,s]=(0,l.useState)(!1),[c,d]=(0,l.useState)({}),[p,m]=(0,l.useState)(`job`),[h,g]=(0,l.useState)([]),_=(0,l.useRef)({}),v=(0,l.useRef)(null),y=(0,l.useCallback)(async(n=e,r=t)=>{let[i,a]=await Promise.all([Tn().catch(()=>[]),_r()]),o=qg(i);return{tabs:o,colls:a,fields:await mr(n,r,o)}},[t,e]);(0,l.useEffect)(()=>{if(!e)return;let t=!1;return queueMicrotask(()=>{s(!0),(async()=>{try{let{tabs:e,colls:n,fields:i}=await y();if(t)return;a(e),g(n),m(t=>e.some(e=>e.key===t)?t:e[0]?.key??``),r(i)}catch{t||u.message.error(`Failed to load field config`)}finally{t||s(!1)}})()}),()=>{t=!0}},[y,e]);let b=n[p]??[];function x(e,t){r(n=>({...n,[e]:typeof t==`function`?t(n[e]??[]):t}))}function S(e,t){x(p,n=>n.map((n,r)=>r===e?{...n,...t}:n))}function C(e,t){x(p,n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r.map((e,t)=>({...e,order:t}))})}async function w(e){if(_.current[e])return _.current[e];try{let t=await vr(e);return _.current[e]=t,t}catch{return[]}}async function T(){let n=p;d(e=>({...e,[n]:!0}));try{await hr(e,n,b,t,i),u.message.success(`Saved`)}catch{u.message.error(`Save failed`)}finally{d(e=>({...e,[n]:!1}))}}return(0,f.jsxs)(u.Spin,{spinning:o,children:[(0,f.jsx)(u.Tabs,{size:`small`,activeKey:p,onChange:m,items:i.map(e=>({key:e.key,label:e.label}))}),(0,f.jsxs)(`div`,{className:`uss-field-header`,style:{gridTemplateColumns:`24px 1fr 80px 56px`},children:[(0,f.jsx)(`span`,{}),(0,f.jsx)(`span`,{children:`Field`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Visible`}),(0,f.jsx)(`span`,{})]}),(0,f.jsxs)(`div`,{className:`uss-field-list`,children:[b.length===0&&!o&&(0,f.jsx)(`div`,{className:`uss-empty`,children:`No fields found.`}),b.map((e,n)=>(0,f.jsx)($g,{field:e,index:n,configType:t,moduleKey:p,onUpdate:S,onReorder:C,collections:h,onFetchCollFields:w,dragFromRef:v},`${e.fieldKey??n}-${p}`))]}),(0,f.jsx)(`div`,{className:`uss-modal-footer`,children:(0,f.jsxs)(u.Button,{type:`primary`,size:`small`,loading:c[p],onClick:T,children:[`Save `,i.find(e=>e.key===p)?.label]})})]})}function d_(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(`listView`),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)(0),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(1),[v,y]=(0,l.useState)(10),[b,x]=(0,l.useState)(``),[S,C]=(0,l.useState)([]),[w,T]=(0,l.useState)([]),[E,D]=(0,l.useState)(!1),[O,k]=(0,l.useState)(!1),[A,j]=(0,l.useState)(!1),M=(0,l.useCallback)(async()=>{k(!0);try{let[e,t]=await Promise.all([Tn().catch(()=>[]),_r()]),n=qg(e),r=await Promise.all([`listView`,`filter`,`form`].map(e=>Ug(null,e,n)));C(t),D(r.some(Boolean))}catch{u.message.error(`Failed to load seed status`)}finally{k(!1)}},[]),N=(0,l.useCallback)(async({offset:e,limit:t,searchQuery:n}={})=>{h(!0);try{let r=await lr({offset:e,limit:t,searchQuery:n??``}),i=(r.users??[]).map(Rg);s(i),p(r.total??i.length)}catch{u.message.error(`Failed to load users`)}finally{h(!1)}},[]);(0,l.useEffect)(()=>{queueMicrotask(()=>{N({offset:(g-1)*v,limit:v,searchQuery:b})})},[N,g,v,b]),(0,l.useEffect)(()=>{queueMicrotask(()=>{M()})},[M]);async function P(){if(E){u.message.info(`Field config already exists. Seed is not allowed.`);return}if(w.length===0){u.message.warning(`Select at least one collection to seed.`);return}j(!0);try{await Wg(w),u.message.success(`Field config seeded`),T([]),await M()}catch(e){u.message.error(e?.message||`Seed failed`)}finally{j(!1)}}function F(e,n=`listView`){t({...e._rawRef,key:e.key}),a(n),r(!0)}let I=[{label:`Name`,value:`_name`,width:220,render:(e,t)=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Mg,{strong:!0,style:{fontSize:13},children:e}),t._email&&(0,f.jsx)(`div`,{style:{fontSize:11,color:`var(--color-text-muted)`},children:t._email})]})},{label:`Role`,value:`_role`,width:180},{label:`Actions`,value:`_configure`,width:200,sorter:!1,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Button,{size:`small`,type:`link`,onClick:()=>F(t),children:`Configure`}),(0,f.jsx)(u.Button,{size:`small`,type:`link`,icon:(0,f.jsx)(d.LockOutlined,{}),onClick:()=>F(t,`permissions`),children:`Permissions`})]})}],L=e?Lg(e):``;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.AppstoreOutlined,{}),title:`Field Config Seed`,style:{marginBottom:12},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,f.jsx)(`div`,{style:{minWidth:320,flex:1},children:(0,f.jsx)(u.Select,{mode:`multiple`,allowClear:!0,showSearch:!0,value:w,options:S.map(e=>({label:e,value:e})),placeholder:E?`Field config already exists`:`Select collections to seed`,disabled:E||O||A,loading:O,onChange:T,style:{width:`100%`}})}),(0,f.jsx)(u.Button,{type:`primary`,loading:A,disabled:E||O||w.length===0,onClick:P,children:`Seed Field Config`})]}),(0,f.jsx)(Mg,{type:`secondary`,style:{display:`block`,marginTop:8,fontSize:12},children:E?`Seed is disabled because field config data already exists.`:`Select collections and seed default field configuration for this project.`})]}),(0,f.jsx)(Z,{icon:(0,f.jsx)(d.TeamOutlined,{}),title:`Users`,style:{marginBottom:0},bodyStyle:{padding:0},children:(0,f.jsx)(gf,{listName:`Users`,dataSource:o,fields:I,loading:m,total:c,current:g,pageSize:v,onPageChange:e=>_(e),onPageSizeChange:e=>{y(e),_(1)},onSearch:e=>{x(e),_(1)}})}),(0,f.jsxs)(u.Modal,{className:`uss-modal`,open:n,onCancel:()=>r(!1),title:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(d.UserOutlined,{style:{color:`var(--color-brand)`}}),(0,f.jsxs)(`span`,{children:[`Configure: `,L]})]}),width:i===`permissions`?860:780,footer:null,destroyOnClose:!0,children:[(0,f.jsx)(`div`,{style:{marginBottom:12},children:(0,f.jsx)(`div`,{className:`uss-config-toggle`,children:Fg.map(e=>(0,f.jsx)(`button`,{className:`uss-config-btn${i===e.key?` active`:``}`,onClick:()=>a(e.key),children:e.label},e.key))})}),e&&i===`permissions`?(0,f.jsx)(l_,{user:e},String(ur(e)??``)):e&&(0,f.jsx)(u_,{user:e,configType:i},`${String(ur(e)??``)}-${i}`)]})]})}var f_=[{key:`job`,label:`Jobs`},{key:`candidate`,label:`Candidates`},{key:`submissions`,label:`Submissions`}],p_=[{key:`listView`,label:`List View`},{key:`filter`,label:`Filter`},{key:`form`,label:`Form`}];function m_({field:e,index:t,onToggle:n,onReorder:r}){let i=useRef(null),[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(!1);function p(e){i.current=t,e.dataTransfer.effectAllowed=`move`,c(!0)}function m(){c(!1),o(!1)}function h(e){e.preventDefault(),o(!0)}function g(){o(!1)}function _(e){e.preventDefault(),o(!1),i.current!==null&&i.current!==t&&r(i.current,t),i.current=null}return(0,f.jsxs)(`div`,{draggable:!0,onDragStart:p,onDragEnd:m,onDragOver:h,onDragLeave:g,onDrop:_,className:`uss-field-row with-edit${a?` drag-over`:``}${s?` dragging`:``}`,children:[(0,f.jsx)(`span`,{className:`uss-drag-handle`,children:(0,f.jsx)(d.HolderOutlined,{})}),(0,f.jsxs)(`span`,{className:`uss-field-name`,children:[e.fieldName,(0,f.jsx)(`span`,{className:`uss-field-key`,children:e.fieldKey})]}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:e.isVisible,onChange:e=>n(t,`isVisible`,e)})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.isEditable,onChange:e=>n(t,`isEditable`,e)})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.ismandatory,onChange:e=>n(t,`ismandatory`,e)})})]})}function h_({role:e,configType:t}){let[n,r]=(0,l.useState)({}),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)({}),[c,d]=(0,l.useState)(`job`);(0,l.useEffect)(()=>{e&&(a(!0),ir(e,t).then(r).catch(()=>u.message.error(`Failed to load field config`)).finally(()=>a(!1)))},[e,t]);let p=n[c]??[];function m(e,t){r(n=>({...n,[e]:typeof t==`function`?t(n[e]??[]):t}))}function h(e,t,n){m(c,r=>r.map((r,i)=>i===e?{...r,[t]:n}:r))}function g(e,t){m(c,n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r.map((e,t)=>({...e,order:t}))})}async function _(){let n=c;s(e=>({...e,[n]:!0}));try{await sr(e,n,p,t),u.message.success(`Saved`)}catch{u.message.error(`Save failed`)}finally{s(e=>({...e,[n]:!1}))}}return(0,f.jsxs)(u.Spin,{spinning:i,children:[(0,f.jsx)(u.Tabs,{size:`small`,activeKey:c,onChange:d,items:f_.map(e=>({key:e.key,label:e.label}))}),(0,f.jsxs)(`div`,{className:`uss-field-header with-edit`,children:[(0,f.jsx)(`span`,{}),(0,f.jsx)(`span`,{children:`Field`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Visible`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Editable`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Mandatory`})]}),(0,f.jsxs)(`div`,{className:`uss-field-list`,children:[p.length===0&&!i&&(0,f.jsx)(`div`,{className:`uss-empty`,children:`No fields found for this module.`}),p.map((e,t)=>(0,f.jsx)(m_,{field:e,index:t,onToggle:h,onReorder:g},e.fieldKey??t))]}),(0,f.jsx)(`div`,{className:`uss-modal-footer`,children:(0,f.jsxs)(u.Button,{type:`primary`,size:`small`,loading:o[c],onClick:_,children:[`Save `,f_.find(e=>e.key===c)?.label]})})]})}function g_(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(`listView`),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)(0),[m,h]=(0,l.useState)(!1),g=(0,l.useCallback)(async()=>{h(!0);try{let e=await Qn();s(e.roles),p(e.total)}catch{u.message.error(`Failed to load roles`)}finally{h(!1)}},[]);(0,l.useEffect)(()=>{g()},[g]);function _(e,n=`listView`){t(e),a(n),r(!0)}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Z,{icon:(0,f.jsx)(d.SafetyOutlined,{}),title:`Roles`,style:{marginBottom:0},bodyStyle:{padding:0},children:(0,f.jsx)(gf,{listName:`Roles`,dataSource:o,fields:[{label:`Role Name`,value:`roleName`,width:200},{label:`Description`,value:`description`,width:240},{label:`Users`,value:`userCount`,width:70,sorter:!1},{label:`Actions`,value:`_configure`,width:200,sorter:!1,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Button,{size:`small`,type:`link`,onClick:()=>_(t),children:`Configure`}),(0,f.jsx)(u.Button,{size:`small`,type:`link`,icon:(0,f.jsx)(d.LockOutlined,{}),onClick:()=>_(t,`permissions`),children:`Permissions`})]})}],loading:m,total:c})}),(0,f.jsxs)(u.Modal,{className:`uss-modal`,open:n,onCancel:()=>r(!1),title:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(d.SafetyOutlined,{style:{color:`var(--color-brand)`}}),(0,f.jsxs)(`span`,{children:[`Configure: `,e?.roleName]})]}),width:720,footer:null,destroyOnClose:!0,children:[(0,f.jsx)(`div`,{style:{marginBottom:12},children:(0,f.jsx)(`div`,{className:`uss-config-toggle`,children:p_.map(e=>(0,f.jsx)(`button`,{className:`uss-config-btn${i===e.key?` active`:``}`,onClick:()=>a(e.key),children:e.label},e.key))})}),e&&(0,f.jsx)(h_,{role:e,configType:i},`${e?.roleId}-${i}`)]})]})}var{Text:__}=u.Typography,v_={key:``,label:``,collectionName:``,baseModule:``,order:0,isActive:!0};function y_({open:e,initial:t,existingModules:n,onClose:r,onSave:i}){let[a]=u.Form.useForm(),o=!!t?.key;(0,l.useEffect)(()=>{e&&a.setFieldsValue({...v_,...t})},[e,t,a]);let s=(0,l.useMemo)(()=>n.filter(e=>e.key!==t?.key).map(e=>({value:e.key,label:`${e.label||e.key} (${e.key})`})),[n,t]);return(0,f.jsx)(u.Modal,{title:o?`Edit Module`:`New Module`,open:e,onCancel:r,onOk:async()=>{i(await a.validateFields())},okText:`Save Module`,className:`fg-editor-modal`,children:(0,f.jsxs)(u.Form,{form:a,layout:`vertical`,initialValues:v_,children:[(0,f.jsx)(u.Form.Item,{name:`key`,label:`Key`,tooltip:`Lowercase identifier used everywhere this module is referenced (moduleName, admin config lookups). Cannot be changed after creation.`,rules:[{required:!0,message:`Key is required`},{pattern:/^[a-z][a-z0-9]*$/,message:`Lowercase letters and numbers only, starting with a letter`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. sourceCandidates`,disabled:o})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Label`,rules:[{required:!0,message:`Label is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. Source Candidates`})}),(0,f.jsx)(u.Form.Item,{name:`collectionName`,label:`Collection Name`,tooltip:`The MongoDB collection that stores this module's records. Point it at an existing module's collection (e.g. "candidates") to reuse the same data without duplicating it.`,rules:[{required:!0,message:`Collection name is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. candidates`})}),(0,f.jsx)(u.Form.Item,{name:`baseModule`,label:`Extends (Base Module)`,tooltip:`When set, this module inherits every form/column/tab/filter/action config it hasn't configured itself from the base module - e.g. "Source Candidates" extending "Candidates" only needs its own List Actions configured.`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,placeholder:`None — standalone module`,options:s})}),(0,f.jsx)(u.Form.Item,{name:`order`,label:`Order`,children:(0,f.jsx)(u.InputNumber,{min:0,style:{width:`100%`}})}),o&&(0,f.jsx)(u.Form.Item,{name:`isActive`,label:`Active`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})})]})})}function b_(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(!1),[c,p]=(0,l.useState)(null),m=async()=>{r(!0);try{let e=await Tn();t(Array.isArray(e)?e:[])}catch(e){u.message.error(e.message||`Failed to load modules`)}finally{r(!1)}};(0,l.useEffect)(()=>{m()},[]);let h=()=>{p(null),s(!0)},g=e=>{p(e),s(!0)};return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.AppstoreOutlined,{}),title:`Modules`,extra:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:m,loading:n,children:`Reload`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:h,children:`New Module`})]}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(__,{type:`secondary`,children:`Define workflow modules that reuse another module's collection and config. A module set to "Extends" a base module inherits every form, column, tab, filter, and action config it hasn't configured for itself — override only what's different (e.g. just its List Actions).`})]}),(0,f.jsx)(Z,{children:(0,f.jsx)(u.Table,{dataSource:e,rowKey:`key`,columns:[{title:`Key`,dataIndex:`key`,key:`key`,render:e=>(0,f.jsx)(__,{code:!0,children:e})},{title:`Label`,dataIndex:`label`,key:`label`},{title:`Collection`,dataIndex:`collectionName`,key:`collectionName`,render:e=>(0,f.jsx)(__,{type:`secondary`,children:e})},{title:`Extends`,dataIndex:`baseModule`,key:`baseModule`,render:e=>e?(0,f.jsx)(u.Tag,{color:`blue`,children:e}):(0,f.jsx)(__,{type:`secondary`,children:`—`})},{title:`Order`,dataIndex:`order`,key:`order`,width:80},{title:`Active`,dataIndex:`isActive`,key:`isActive`,width:90,render:e=>e?(0,f.jsx)(u.Tag,{color:`green`,children:`Active`}):(0,f.jsx)(u.Tag,{children:`Inactive`})},{title:``,key:`actions`,width:60,fixed:`right`,render:(e,t)=>(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>g(t)})})}],pagination:!1,size:`small`,loading:n,className:`fg-table admin-config-table`,locale:{emptyText:`No modules yet.`}})}),(0,f.jsx)(y_,{open:o,initial:c,existingModules:e,onClose:()=>s(!1),onSave:async e=>{a(!0);try{c?.key?(await Dn(c.key,e),u.message.success(`Module updated`)):(await En(e),u.message.success(`Module created`)),s(!1),await m()}catch(e){u.message.error(e.message||`Failed to save module`)}finally{a(!1)}}})]})}var{Paragraph:x_,Text:S_}=u.Typography;function C_({open:e,scope:t,action:n,title:r,description:i,confirmLabel:a=`Confirm`,danger:o=!1,onCancel:s,onVerified:c}){let[p,m]=(0,l.useState)(``),[h,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(``),C=(0,l.useRef)(!1);async function w(){if(!(!t||!n)){v(!0),S(``);try{let e=await Ln(t,n);g(e?.data?.email||e?.email||`the registered approver`),u.message.success(`OTP sent`)}catch(e){S(e?.message||`Could not send the OTP`)}finally{v(!1)}}}(0,l.useEffect)(()=>{e&&!C.current&&(C.current=!0,m(``),S(``),g(``),w()),e||(C.current=!1)},[e]);async function T(){if(!p.trim()){S(`Enter the OTP sent to your email`);return}b(!0),S(``);try{let e=await Rn(t,n,p.trim());u.message.success(e?.data?.message||e?.message||`Done`),c?.(e)}catch(e){S(e?.message||`Verification failed — check the code and try again`)}finally{b(!1)}}return(0,f.jsxs)(u.Modal,{open:e,onCancel:s,title:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.SafetyCertificateOutlined,{}),` `,r]}),destroyOnClose:!0,maskClosable:!y,footer:[(0,f.jsx)(u.Button,{onClick:s,disabled:y,children:`Cancel`},`cancel`),(0,f.jsx)(u.Button,{type:`primary`,danger:o,loading:y,onClick:T,children:a},`ok`)],children:[i&&(0,f.jsx)(x_,{type:`secondary`,style:{fontSize:13,marginBottom:8},children:i}),(0,f.jsxs)(x_,{type:`secondary`,style:{fontSize:13},children:[`This is a protected action. A one-time code has been emailed to`,` `,(0,f.jsx)(S_,{strong:!0,children:h||`…`}),`. Enter it below to continue.`]}),(0,f.jsx)(u.Input,{size:`large`,inputMode:`numeric`,placeholder:`Enter OTP`,value:p,maxLength:6,onChange:e=>m(e.target.value.replace(/\D/g,``)),onPressEnter:T,autoFocus:!0}),x&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:x,style:{marginTop:12}}),(0,f.jsx)(`div`,{style:{marginTop:12},children:(0,f.jsx)(u.Button,{type:`link`,size:`small`,loading:_,onClick:w,style:{padding:0},children:`Resend code`})})]})}var{Text:w_}=u.Typography,T_={reset:{action:`reset`,title:`Reset all form groups`,confirmLabel:`Reset All`,danger:!0,description:`This reseeds every module in this workspace back to the built-in default groups, discarding current customizations.`},save:{action:`save`,title:`Save current as default`,confirmLabel:`Save Default`,danger:!1,description:`Snapshots the current form groups for all modules as the saved default you can restore to later.`},restore:{action:`restore`,title:`Restore saved default`,confirmLabel:`Restore Default`,danger:!0,description:`Replaces the current form groups for all modules with the last saved default.`}},E_=[`#0053a5`,`#52c41a`,`#722ed1`,`#fa8c16`,`#eb2f96`,`#13c2c2`],D_=[{label:`Text`,value:`text`},{label:`Number`,value:`number`},{label:`Email`,value:`email`},{label:`Date`,value:`date`},{label:`Time Picker`,value:`time`},{label:`Location`,value:`location`},{label:`Select`,value:`select`},{label:`Radio`,value:`radio`},{label:`Checkbox`,value:`checkbox`},{label:`Tagify`,value:`tagify`},{label:`Textarea`,value:`textarea`},{label:`Text Editor`,value:`text-editor`},{label:`File`,value:`file`}],O_=[{label:`Static (define options here)`,value:`static`},{label:`Masters collection`,value:`master`},{label:`Module data (distinct)`,value:`module`},{label:`Collection lookup (FK)`,value:`lookup`},{label:`Group value`,value:`group`}],k_=[{label:`Required`,value:`required`,hasValue:!1},{label:`Min length/value`,value:`min`,hasValue:!0,valueType:`number`,placeholder:`e.g. 2`},{label:`Max length/value`,value:`max`,hasValue:!0,valueType:`number`,placeholder:`e.g. 100`},{label:`Pattern (regex)`,value:`pattern`,hasValue:!0,valueType:`text`,placeholder:`^[A-Za-z]+$`},{label:`Email (reject numeric-only address)`,value:`email`,hasValue:!1},{label:`Phone format`,value:`phone`,hasValue:!1},{label:`On or after another date field`,value:`dateAfterField`,hasValue:!0,valueType:`text`,placeholder:`startDate`,dateOnly:!0,messageOptional:!0},{label:`On or before another date field`,value:`dateBeforeField`,hasValue:!0,valueType:`text`,placeholder:`endDate`,dateOnly:!0,messageOptional:!0},{label:`File types allowed`,value:`fileType`,hasValue:!0,valueType:`text`,placeholder:`pdf,doc,jpg`,messageOptional:!0},{label:`Max file size (MB)`,value:`fileSize`,hasValue:!0,valueType:`number`,placeholder:`e.g. 5`,messageOptional:!0},{label:`Max files count`,value:`maxFiles`,hasValue:!0,valueType:`number`,placeholder:`e.g. 3`,messageOptional:!0},{label:`Greater than or equal to field`,value:`greaterThanField`,hasValue:!0,valueType:`text`,placeholder:`experienceRequiredFrom`},{label:`Greater than field (strict)`,value:`strictGreaterThanField`,hasValue:!0,valueType:`text`,placeholder:`numberOfPosition`},{label:`Less than field (strict)`,value:`strictLessThanField`,hasValue:!0,valueType:`text`,placeholder:`experienceRequiredTo`},{label:`Less than or equal to field`,value:`lessThanOrEqualField`,hasValue:!0,valueType:`text`,placeholder:`experienceRequiredTo`},{label:`Max field with fallback`,value:`maxFieldWithFallback`,hasValue:!0,valueType:`text`,placeholder:`preferredToField,fallbackFromField`},{label:`Disable previous dates`,value:`noPastDate`,hasValue:!1,messageOptional:!0,dateOnly:!0},{label:`Disable future dates`,value:`noFutureDate`,hasValue:!1,messageOptional:!0,dateOnly:!0},{label:`Min age (years)`,value:`minAge`,hasValue:!0,valueType:`number`,placeholder:`e.g. 18`,messageOptional:!0,dateOnly:!0}],A_=[{label:`Equals (=)`,value:`eq`},{label:`Not equals (≠)`,value:`neq`},{label:`Has any value`,value:`truthy`},{label:`Is empty`,value:`falsy`}],j_=[{label:`Auto (infer from field)`,value:`auto`},{label:`String`,value:`string`},{label:`Number`,value:`number`},{label:`Boolean`,value:`boolean`},{label:`Array`,value:`array`},{label:`Object`,value:`object`},{label:`Date (ISO)`,value:`date`}],M_=[{label:`(none)`,value:``},{label:`String`,value:`string`},{label:`Number`,value:`number`},{label:`Boolean`,value:`boolean`}],N_=[{label:`Auto (value as-is)`,value:`auto`},{label:`Value only — { key: id }`,value:`value`},{label:`Label only — { key: "India" }`,value:`label`},{label:`Full object — { id, name }`,value:`object`},{label:`Custom template`,value:`custom`},{label:`Skip (never send)`,value:`skip`}],P_={required:`red`,min:`orange`,max:`gold`,pattern:`purple`,email:`blue`,phone:`cyan`,dateAfterField:`volcano`,dateBeforeField:`orange`,fileType:`cyan`,fileSize:`blue`,maxFiles:`geekblue`,greaterThanField:`lime`,strictGreaterThanField:`green`,strictLessThanField:`cyan`,lessThanOrEqualField:`blue`,maxFieldWithFallback:`purple`,noPastDate:`geekblue`,noFutureDate:`magenta`,minAge:`green`};function F_(e){return k_.find(t=>t.value===e)??{hasValue:!1}}function I_(e){return[{key:`all`,label:`All`,color:`#8c8c8c`},...e.map((e,t)=>({key:e.key,label:e.label,color:E_[t%E_.length]}))]}function L_(e){return Object.fromEntries(e.map(({key:e})=>[e,{groups:[],loading:!1,loaded:!1,error:``}]))}function R_(e){if(e==null)return;if(typeof e==`object`)return e;let t=String(e).trim();if(t)try{let e=JSON.parse(t);return e&&typeof e==`object`?e:void 0}catch{return}}function z_(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return``}}function B_(e,t){t.payloadKey&&(e.payloadKey=t.payloadKey),t.prefillFrom&&(e.prefillFrom=t.prefillFrom),t.dataType&&t.dataType!==`auto`&&(e.dataType=t.dataType),t.elementType&&(e.elementType=t.elementType),t.payloadMode&&t.payloadMode!==`auto`&&(e.payloadMode=t.payloadMode),t.valueKey&&(e.valueKey=t.valueKey),t.displayKey&&(e.displayKey=t.displayKey),t.defaultValue!==void 0&&t.defaultValue!==``&&(e.defaultValue=t.defaultValue),t.richValue&&(e.richValue=!0),t.omitEmpty&&(e.omitEmpty=!0);let n=R_(t.payloadTemplate);n&&(e.payloadTemplate=n);let r=R_(t.transformRule);return r&&(e.transformRule=r),e}function V_(e=[]){return e.map(e=>{let t=(e.validations??[]).filter(e=>e?.type).map(e=>{let t=F_(e.type),n={type:e.type,message:e.message??``};return t.hasValue&&e.value!==``&&e.value!==void 0&&e.value!==null&&(n.value=t.valueType===`number`?Number(e.value):e.value),n}),n={label:e.label,field:e.field,type:e.type??`text`,show:+!!e.show,req:+!!e.req,edit:+!!e.edit,formatter:e.formatter??``,validations:t};if(e.showOnAdd===!1&&(n.showOnAdd=!1),e.placeholder&&(n.placeholder=e.placeholder),e.hidePlaceholder&&(n.hidePlaceholder=!0),e.combineKey&&(n.combineKey=e.combineKey),e.combineLabel&&(n.combineLabel=e.combineLabel),e.combineRole&&(n.combineRole=e.combineRole),e.combineToggleLabel&&(n.combineToggleLabel=e.combineToggleLabel),e.combineToggleTarget&&(n.combineToggleTarget=e.combineToggleTarget),e.combineWidth!==void 0&&e.combineWidth!==``&&Number(e.combineWidth)>0&&(n.combineWidth=Number(e.combineWidth)),e.combineWrap&&(n.combineWrap=!0),e.combineSpan!==void 0&&e.combineSpan!==``&&[12,24].includes(Number(e.combineSpan))&&(n.combineSpan=Number(e.combineSpan)),e.defaultOnEdit&&(n.defaultOnEdit=!0),e.emptyValues!==void 0&&e.emptyValues!==``&&(n.emptyValues=String(e.emptyValues).split(`,`).map(e=>e.trim()).filter(e=>e!==``)),e.valuePaths!==void 0&&e.valuePaths!==``&&(n.valuePaths=String(e.valuePaths).split(`,`).map(e=>e.trim()).filter(e=>e!==``)),e.clientScope&&(n.clientScope=!0,e.clientGateMessage&&(n.clientGateMessage=e.clientGateMessage),e.clientGateResetOnChange&&(n.clientGateResetOnChange=!0)),e.infoEnabled&&e.infoText&&(n.infoEnabled=!0,n.infoText=e.infoText),e.helpText&&(n.helpText=e.helpText),B_(n,e),e.type===`file`&&(n.multiple=e.multiple??!1,n.maxCount=n.multiple?Number(e.maxCount??5):1,e.fileKey&&(n.fileKey=e.fileKey),e.fileNameKey&&(n.fileNameKey=e.fileNameKey),e.fileUrlKey&&(n.fileUrlKey=e.fileUrlKey)),e.showIf?.field){n.showIf={field:e.showIf.field,operator:e.showIf.operator??`eq`};let t=n.showIf.operator;(t===`eq`||t===`neq`)&&e.showIf.value!=null&&e.showIf.value!==``&&(n.showIf.value=e.showIf.value)}if(e.disabledByField&&(n.disabledByField=String(e.disabledByField).trim()),e.linkedClearField&&(n.linkedClearField=String(e.linkedClearField).trim()),e.autofillFrom)try{let t=typeof e.autofillFrom==`string`?JSON.parse(e.autofillFrom):e.autofillFrom;Array.isArray(t)&&t.length>0&&(n.autofillFrom=t)}catch{}Array.isArray(e.aiActions)&&e.aiActions.length>0&&(n.aiActions=e.aiActions.filter(e=>e?.key&&e?.label&&e?.serviceKey&&e?.endpointPath).map(e=>({key:e.key,label:e.label,trigger:e.trigger||`click`,serviceKey:e.serviceKey,endpointPath:e.endpointPath,bodyType:e.bodyType||`json`,inputs:(e.inputs||[]).filter(e=>e?.param&&e?.sourceField).map(e=>({param:e.param,sourceField:e.sourceField,kind:e.kind||`text`,...e.transform?{transform:e.transform}:{},...e.group?{group:e.group}:{},...e.required?{required:!0}:{},...Number(e.minWords)>0?{minWords:Number(e.minWords)}:{}})),...String(e.responseDataPath||``).trim()?{responseDataPath:String(e.responseDataPath).trim()}:{},...String(e.position||``).trim()?{position:String(e.position).trim()}:{}})));let r=e.validator?.type;if(r){n.validator={type:r},e.validator.title&&(n.validator.title=e.validator.title);let t=Number(e.validator.maxLength);!isNaN(t)&&t>0&&(n.validator.maxLength=t);let i=Number(e.validator.maxChars);!isNaN(i)&&i>0&&(n.validator.maxChars=i)}if([`select`,`radio`,`checkbox`].includes(e.type)){let t=e.dataSource??`static`;n.dataSource=t,e.type===`select`&&(n.multiSelect=e.multiSelect??!1),t===`master`&&(n.masterName=e.masterName??``),t===`group`&&(n.groupName=e.groupName??``),t===`static`&&(n.options=(e.options??[]).filter(e=>e?.label||e?.value)),t===`lookup`&&(n.lookupCollection=e.lookupCollection??``,n.displayField=e.displayField??``,e.displayField2&&(n.displayField2=e.displayField2),n.valueField=e.valueField??`_id`,e.lookupFilterField&&e.lookupFilterValueFrom&&(n.lookupFilterField=e.lookupFilterField,n.lookupFilterValueFrom=e.lookupFilterValueFrom))}return n})}function H_(e){return{...e,show:e.show===1,req:e.req===1,edit:e.edit===1,showOnAdd:e.showOnAdd!==!1,placeholder:e.placeholder??``,hidePlaceholder:e.hidePlaceholder??!1,clientScope:e.clientScope??!1,clientGateMessage:e.clientGateMessage??``,clientGateResetOnChange:e.clientGateResetOnChange??!1,infoEnabled:e.infoEnabled??!1,infoText:e.infoText??``,helpText:e.helpText??``,formatter:e.formatter??``,combineKey:e.combineKey??``,combineLabel:e.combineLabel??``,combineRole:e.combineRole??``,combineToggleLabel:e.combineToggleLabel??``,combineToggleTarget:e.combineToggleTarget??``,combineWidth:e.combineWidth??``,combineWrap:e.combineWrap??!1,combineSpan:e.combineSpan??``,defaultOnEdit:e.defaultOnEdit??!1,emptyValues:Array.isArray(e.emptyValues)?e.emptyValues.join(`, `):e.emptyValues??``,valuePaths:Array.isArray(e.valuePaths)?e.valuePaths.join(`, `):e.valuePaths??``,dataSource:e.dataSource??`static`,masterName:e.masterName??``,groupName:e.groupName??``,options:e.options??[],lookupCollection:e.lookupCollection??``,displayField:e.displayField??``,displayField2:e.displayField2??``,valueField:e.valueField??`_id`,lookupFilterField:e.lookupFilterField??``,lookupFilterValueFrom:e.lookupFilterValueFrom??``,multiSelect:e.multiSelect??!1,multiple:e.multiple??!1,maxCount:e.maxCount??5,fileKey:e.fileKey??``,fileNameKey:e.fileNameKey??``,fileUrlKey:e.fileUrlKey??``,payloadKey:e.payloadKey??``,prefillFrom:e.prefillFrom??``,dataType:e.dataType??`auto`,elementType:e.elementType??``,payloadMode:e.payloadMode??`auto`,valueKey:e.valueKey??``,displayKey:e.displayKey??``,defaultValue:e.defaultValue??``,richValue:e.richValue??!1,omitEmpty:e.omitEmpty??!1,payloadTemplate:z_(e.payloadTemplate),transformRule:z_(e.transformRule),showIf:e.showIf?.field?{field:e.showIf.field,operator:e.showIf.operator??`eq`,value:e.showIf.value??``}:{field:``,operator:`eq`,value:``},validations:(e.validations??[]).map(e=>({type:e.type,value:e.value??``,message:e.message??``})),validator:{type:e.validator?.type??``,title:e.validator?.title??``,maxLength:e.validator?.maxLength??``,maxChars:e.validator?.maxChars??``},disabledByField:e.disabledByField??``,linkedClearField:e.linkedClearField??``,autofillFrom:Array.isArray(e.autofillFrom)?JSON.stringify(e.autofillFrom,null,2):e.autofillFrom??``,aiActions:Array.isArray(e.aiActions)?e.aiActions.map(e=>({...e,inputs:(e.inputs??[]).map(e=>({...e,minWords:e.minWords??``})),responseDataPath:e.responseDataPath??``,position:e.position??``})):[]}}function U_({form:e,fieldItems:t,add:n,remove:r,move:i,absBase:a,moduleFieldOptions:o,dragIndexRef:s,dragOverIndex:c,setDragOverIndex:l,onFieldKeySelect:p,expandedFieldKeys:m,onToggleField:h}){let g=[...a,`fields`];return(0,f.jsxs)(f.Fragment,{children:[t.map(({key:t,name:n,...a},_)=>{let v=[...g,n],y=e.getFieldValue(v)??{},b=m&&!m.has(_);return(0,f.jsx)(`div`,{draggable:!0,onDragStart:()=>{s.current=_},onDragEnd:()=>{s.current=null,l(null)},onDragOver:e=>{e.preventDefault(),l(_)},onDragLeave:()=>l(null),onDrop:e=>{e.preventDefault();let t=s.current;t!==null&&t!==_&&i(t,_),s.current=null,l(null)},className:`fg-field-card${c===_?` fg-drag-over`:``}`,children:(0,f.jsxs)(`div`,{className:`fg-field-card-inner`,children:[(0,f.jsx)(`span`,{className:`fg-drag-handle`,children:(0,f.jsx)(d.HolderOutlined,{})}),b?(0,f.jsxs)(`div`,{className:`fg-field-summary`,children:[(0,f.jsxs)(`button`,{type:`button`,className:`fg-field-summary-main`,onClick:()=>h(_),children:[(0,f.jsx)(d.RightOutlined,{className:`fg-field-summary-chevron`}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`strong`,{children:y.label||y.field||`Field ${_+1}`}),(0,f.jsxs)(`small`,{children:[y.field||`Field key not set`,` · `,y.type||`text`]})]})]}),(0,f.jsxs)(u.Space,{size:4,children:[y.req&&(0,f.jsx)(u.Tag,{color:`red`,children:`Required`}),y.show===!1&&(0,f.jsx)(u.Tag,{children:`Hidden`}),(0,f.jsx)(u.Tooltip,{title:`Edit field settings`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>h(_)})}),(0,f.jsx)(u.Tooltip,{title:`Remove field`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.MinusCircleOutlined,{}),onClick:()=>r(n)})})]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`fg-field-body`,children:[m&&(0,f.jsxs)(`button`,{type:`button`,className:`fg-field-collapse-btn`,onClick:()=>h(_),children:[(0,f.jsx)(d.DownOutlined,{}),` Collapse field`]}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`field`],label:`Field`,style:{marginBottom:10},rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.AutoComplete,{options:o,placeholder:`Search or type field key…`,filterOption:(e,t)=>(t?.searchLabel??``).includes(e.toLowerCase()),onSelect:e=>p(e,n),className:`fg-mono-input`})}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsx)(u.Form.Item,{...a,name:[n,`label`],label:`Label`,style:{marginBottom:8,flex:2},rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Display label`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`type`],label:`Type`,style:{marginBottom:8,flex:2},initialValue:`text`,children:(0,f.jsx)(u.Select,{size:`small`,options:D_})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`formatter`],label:`Formatter`,style:{marginBottom:8,flex:2},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`name / phone…`})})]}),(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Layout / Combine`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,style:{flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{name:[n,`combineKey`],label:`Combine Key`,style:{marginBottom:0},tooltip:`Fields with the same key render together as one visual block. Payload stays unchanged.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. client_rate`,style:{width:150},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineLabel`],label:`Combined Label`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. Client Rate`,style:{width:160}})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineRole`],label:`Role`,style:{marginBottom:0},children:(0,f.jsx)(u.Select,{size:`small`,style:{width:120},allowClear:!0,options:[{label:`Primary`,value:`primary`},{label:`From`,value:`from`},{label:`To`,value:`to`},{label:`Currency`,value:`currency`},{label:`Unit`,value:`unit`}]})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineToggleLabel`],label:`Toggle Label`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. Range`,style:{width:130}})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineToggleTarget`],label:`Toggle Target`,style:{marginBottom:0},tooltip:`Field key hidden until the combined-field slider is enabled. Example: clientRateTo.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`target field key`,style:{width:150},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineWidth`],label:`Width`,style:{marginBottom:0},tooltip:`Width weight of this box inside the combined block. Set the same key's fields to e.g. 2 & 1 for 2:1, or 1/2/3 for 1:2:3. Blank/0 = equal share.`,children:(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:0,step:.5,placeholder:`1`,style:{width:80}})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineWrap`],label:`Wrap`,valuePropName:`checked`,style:{marginBottom:0},tooltip:`Allow this combined block to wrap to another line. Useful for wider controls such as document upload rows.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:[n,`combineSpan`],label:`Block Span`,style:{marginBottom:0},tooltip:`How much row width this combined block uses. Blank keeps the existing automatic layout.`,children:(0,f.jsx)(u.Select,{size:`small`,allowClear:!0,placeholder:`Auto`,style:{width:110},options:[{label:`Half`,value:12},{label:`Full`,value:24}]})})]})]}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{if(e([...v,`type`])!==`file`)return null;let t=e([...v,`multiple`]);return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`File Options`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,children:[(0,f.jsx)(u.Form.Item,{name:[n,`multiple`],label:`Upload Mode`,valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Multiple`,unCheckedChildren:`Single`})}),t&&(0,f.jsx)(u.Form.Item,{name:[n,`maxCount`],label:`Max files`,style:{marginBottom:0},initialValue:5,rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:2,placeholder:`e.g. 5`,style:{width:80}})}),(0,f.jsx)(u.Form.Item,{name:[n,`fileKey`],label:`File Key`,style:{marginBottom:0},tooltip:`Multipart field name sent to the server. Leave blank to use the field key. Set to 'file' for the jobs service.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. file`,style:{width:120},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`fileNameKey`],label:`Name Key`,style:{marginBottom:0},tooltip:`Stored object key that contains the uploaded file name. Leave blank for automatic detection.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. passportUploadName`,style:{width:180},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`fileUrlKey`],label:`URL Key`,style:{marginBottom:0},tooltip:`Stored object key that contains the file location/path. Leave blank for automatic detection.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. passportCopyLocation`,style:{width:190},className:`fg-mono-input`})})]})]})}}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`type`]);if(![`select`,`radio`,`checkbox`].includes(t))return null;let r=e([...v,`dataSource`])??`static`;return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Options / Values`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,children:[(0,f.jsx)(u.Form.Item,{name:[n,`dataSource`],label:`Source`,style:{marginBottom:0},initialValue:`static`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:190},options:O_})}),t===`select`&&(0,f.jsx)(u.Form.Item,{name:[n,`multiSelect`],label:`Multi Select`,valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Multi`,unCheckedChildren:`Single`})}),r===`master`&&(0,f.jsx)(u.Form.Item,{name:[n,`masterName`],label:`Master Name`,style:{marginBottom:0},rules:[{required:!0,message:`Enter master name`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. tracker`,style:{width:140}})}),r===`group`&&(0,f.jsx)(u.Form.Item,{name:[n,`groupName`],label:`Group Name`,style:{marginBottom:0},rules:[{required:!0,message:`Enter group name`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. users`,style:{width:140}})})]}),r===`static`&&(0,f.jsxs)(`div`,{className:`fg-static-options`,children:[(0,f.jsx)(`span`,{className:`fg-static-options-hint`,children:`Label / Value pairs`}),(0,f.jsx)(u.Form.List,{name:[n,`options`],children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsxs)(`div`,{className:`fg-option-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`label`],style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Label`})}),(0,f.jsx)(u.Form.Item,{name:[t,`value`],style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Value`,className:`fg-mono-input`})}),(0,f.jsx)(d.MinusCircleOutlined,{onClick:()=>n(t),className:`fg-remove-icon`})]},e)),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>t({label:``,value:``}),className:`fg-add-option-btn`,children:`Add Option`})]})})]}),r===`module`&&(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`Options fetched from the module's distinct field values at runtime.`}),r===`group`&&(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`Use "users" to load all users from the system (MySQL).`}),r===`lookup`&&(0,f.jsxs)(`div`,{className:`fg-lookup-block`,children:[(0,f.jsx)(`p`,{className:`fg-source-hint`,style:{marginBottom:8},children:`Cross-collection lookup — shows label, stores FK value.`}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsx)(u.Form.Item,{name:[n,`lookupCollection`],label:`Collection`,style:{marginBottom:0,flex:1},rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. vendors`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`displayField`],label:`Display Field`,style:{marginBottom:0,flex:1},rules:[{required:!0,message:`Required`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. vendorContact.firstName`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`displayField2`],label:`Display Field 2`,style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. vendorContact.lastName`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`valueField`],label:`Value Field (FK)`,style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`_id`,className:`fg-mono-input`})})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:8},children:[(0,f.jsx)(u.Form.Item,{name:[n,`lookupFilterField`],label:`Filter Field`,style:{marginBottom:0,flex:1},tooltip:`Optional DB field to filter lookup rows by. Example: _id or clientId.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. _id`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`lookupFilterValueFrom`],label:`Filter Value From`,style:{marginBottom:0,flex:1},tooltip:`Optional form/scope field that provides the filter value. Example: clientId.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. clientId`,className:`fg-mono-input`})})]})]})]})}}),(0,f.jsxs)(`div`,{className:`fg-toggles-row`,children:[(0,f.jsx)(u.Form.Item,{...a,name:[n,`show`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!0,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Show`,unCheckedChildren:`Hide`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`req`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Req`,unCheckedChildren:`Opt`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`showOnAdd`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!0,tooltip:`Show this field on Add. Turn off for edit-only fields.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Add`,unCheckedChildren:`No Add`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`edit`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!0,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Edit`,unCheckedChildren:`Read`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`clientScope`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,tooltip:`Use this field as the client-selector gate. It shows as the top 'Select Client' picker and is hidden from the form body (no duplicate client card).`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Client Gate`,unCheckedChildren:`Client Gate`})}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`infoEnabled`],valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,tooltip:`Show an info icon next to this field label in add/edit forms.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Info`,unCheckedChildren:`Info`})})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:8},children:[(0,f.jsx)(u.Form.Item,{name:[n,`placeholder`],label:`Placeholder`,style:{marginBottom:0,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Admin-controlled placeholder`})}),(0,f.jsx)(u.Form.Item,{name:[n,`hidePlaceholder`],label:`Hide Placeholder`,valuePropName:`checked`,style:{marginBottom:0},children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Hidden`,unCheckedChildren:`Shown`})})]}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>e([...v,`clientScope`])?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Client Gate Message`}),(0,f.jsx)(u.Form.Item,{name:[n,`clientGateMessage`],style:{marginBottom:0},children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Message shown below 'Select Client' in the add form (leave blank for default)`})}),(0,f.jsx)(u.Form.Item,{name:[n,`clientGateResetOnChange`],valuePropName:`checked`,style:{margin:`10px 0 0`},tooltip:`When the selected client changes or is cleared, remove every value already entered in the form before loading the new client configuration.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Reset form on client change`,unCheckedChildren:`Keep form values`})})]}):null}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>e([...v,`infoEnabled`])?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsxs)(`span`,{className:`fg-options-label`,children:[(0,f.jsx)(d.InfoCircleOutlined,{}),` Field Info`]}),(0,f.jsx)(u.Form.Item,{name:[n,`infoText`],style:{marginBottom:0},rules:[{required:!0,message:`Enter info message`}],children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Message shown when users hover the info icon`})})]}):null}),(0,f.jsx)(u.Form.Item,{...a,name:[n,`helpText`],label:`Extra Text`,tooltip:`Small gray helper text rendered below this field in add/edit forms. Example: date format.`,children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Shown below the field`})}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`showIf`,`field`]),r=e([...v,`showIf`,`operator`])??`eq`,i=r===`eq`||r===`neq`;return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Show Condition`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,style:{flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{name:[n,`showIf`,`field`],label:`Show only when field`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`field key — blank = always show`,style:{width:210},className:`fg-mono-input`})}),t&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Form.Item,{name:[n,`showIf`,`operator`],label:`Operator`,style:{marginBottom:0},initialValue:`eq`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:130},options:A_,getPopupContainer:()=>document.body})}),i&&(0,f.jsx)(u.Form.Item,{name:[n,`showIf`,`value`],label:`Value`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. yes`,style:{width:100},className:`fg-mono-input`})})]})]}),t&&(0,f.jsxs)(`p`,{className:`fg-source-hint`,style:{marginTop:4},children:[`Hidden until “`,t,`”`,i?` ${r===`eq`?`equals`:`does not equal`} the value above.`:` ${r===`truthy`?`has any value.`:`is empty.`}`]})]})}}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`type`]),r=e([...v,`dataType`])??`auto`,i=e([...v,`payloadMode`])??`auto`,a=[`select`,`radio`,`checkbox`].includes(t),o=[`label`,`object`,`custom`].includes(i);return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Payload Mapping`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,style:{flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{name:[n,`payloadKey`],label:`Payload Key`,style:{marginBottom:8},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`defaults to field key`,style:{width:180},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`prefillFrom`],label:`Prefill From`,tooltip:`Source path to inherit this field's value from when the record is created by prefilling another module (e.g. submission ← candidate). Dotted paths allowed, e.g. passport.passportNumber.`,style:{marginBottom:8},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`source key (cross-module prefill)`,style:{width:200},className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`dataType`],label:`Data Type`,style:{marginBottom:8},initialValue:`auto`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:170},options:j_,getPopupContainer:()=>document.body})}),r===`array`&&(0,f.jsx)(u.Form.Item,{name:[n,`elementType`],label:`Array Element Type`,style:{marginBottom:8},children:(0,f.jsx)(u.Select,{size:`small`,style:{width:130},options:M_,getPopupContainer:()=>document.body})}),(0,f.jsx)(u.Form.Item,{name:[n,`payloadMode`],label:`Payload Mode`,style:{marginBottom:8},initialValue:`auto`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:210},options:N_,getPopupContainer:()=>document.body})}),(0,f.jsx)(u.Form.Item,{name:[n,`defaultValue`],label:`Default Value`,style:{marginBottom:8},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`optional`,style:{width:130}})}),(0,f.jsx)(u.Form.Item,{name:[n,`defaultOnEdit`],label:`Default on Edit`,valuePropName:`checked`,style:{marginBottom:8},tooltip:`When the stored value is empty, show Default Value in edit form. Keep off for fields that should remain blank on edit.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:[n,`emptyValues`],label:`Empty Values`,style:{marginBottom:8},tooltip:`Comma separated stored values that should render as blank in edit form. Example: 0, candidate`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. 0, candidate`,style:{width:170}})}),(0,f.jsx)(u.Form.Item,{name:[n,`valuePaths`],label:`Value Paths`,style:{marginBottom:8},tooltip:`Comma separated read paths for edit/detail prefill. Supports array filters like socialProfiles[type=linkedin].value.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`linkedIn, socialProfiles[type=linkedin].value`,style:{width:300},className:`fg-mono-input`})})]}),(o||a)&&(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsx)(u.Form.Item,{name:[n,`valueKey`],label:`Value Key (id)`,style:{marginBottom:8,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. id`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[n,`displayKey`],label:`Display Key (label)`,style:{marginBottom:8,flex:1},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. name`,className:`fg-mono-input`})}),a&&(0,f.jsx)(u.Form.Item,{name:[n,`richValue`],label:`Keep label`,valuePropName:`checked`,style:{marginBottom:8},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})})]}),i===`custom`&&(0,f.jsxs)(`div`,{style:{marginBottom:8},children:[(0,f.jsxs)(`span`,{className:`fg-static-options-hint`,children:[`Payload Template (JSON) — tokens: `,`{{value}} {{label}} {{raw.field}}`]}),(0,f.jsx)(u.Form.Item,{name:[n,`payloadTemplate`],style:{marginBottom:0},children:(0,f.jsx)(u.Input.TextArea,{rows:2,className:`fg-mono-input`,placeholder:`{ "countryId": "{{value}}", "countryName": "{{label}}" }`})})]}),(0,f.jsxs)(`details`,{style:{marginTop:4},children:[(0,f.jsx)(`summary`,{className:`fg-source-hint`,style:{cursor:`pointer`},children:`Advanced: transform rule / omit empty`}),(0,f.jsxs)(`div`,{style:{marginTop:6},children:[(0,f.jsxs)(`span`,{className:`fg-static-options-hint`,children:[`Transform Rule (JSON) — e.g. `,`{ "map": { "true": "high", "false": "medium" } }`]}),(0,f.jsx)(u.Form.Item,{name:[n,`transformRule`],style:{marginBottom:6},children:(0,f.jsx)(u.Input.TextArea,{rows:2,className:`fg-mono-input`,placeholder:`{ "map": { "true": "high" }, "default": "medium" }`})}),(0,f.jsx)(u.Form.Item,{name:[n,`omitEmpty`],label:`Omit when empty`,valuePropName:`checked`,style:{marginBottom:0},initialValue:!1,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Omit`,unCheckedChildren:`Send`})})]})]})]})}}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`type`]);if([`select`,`radio`,`checkbox`,`date`,`time`,`file`,`location`].includes(t))return null;let r=e([...v,`validator`,`type`]),i=r&&![`email`,`websiteUrl`,`jobDescription`].includes(r),a=r===`jobDescription`;return(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Input Validator`}),(0,f.jsxs)(`div`,{className:`fg-options-controls`,style:{flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{name:[n,`validator`,`type`],label:`Type`,style:{marginBottom:0},children:(0,f.jsx)(u.Select,{size:`small`,allowClear:!0,placeholder:`None — no char restriction`,style:{width:260},options:Ha})}),i&&(0,f.jsx)(u.Form.Item,{name:[n,`validator`,`maxLength`],label:`Max Length`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:1,placeholder:`e.g. 55`,style:{width:90}})}),a&&(0,f.jsx)(u.Form.Item,{name:[n,`validator`,`maxChars`],label:`Max Chars`,style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,type:`number`,min:1,placeholder:`1500`,style:{width:90}})}),r&&(0,f.jsx)(u.Form.Item,{name:[n,`validator`,`title`],label:`Error Title`,style:{marginBottom:0},tooltip:`Used in error messages. Defaults to the field label when blank.`,children:(0,f.jsx)(u.Input,{size:`small`,placeholder:e([...v,`label`])||`Field`,style:{width:180}})})]})]})}}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>{let t=e([...v,`type`]),r=t===`checkbox`,i=t===`select`&&e([...v,`dataSource`])===`lookup`;return!r&&!i?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Disable When Field Is Checked`}),(0,f.jsx)(u.Form.Item,{name:[n,`disabledByField`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`sibling field key (e.g. currentlyPursuing)`,className:`fg-mono-input`,style:{width:260}})}),(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`This field becomes disabled (and read-only) when the specified sibling checkbox is checked.`})]}):r?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Clear Field When Checked`}),(0,f.jsx)(u.Form.Item,{name:[n,`linkedClearField`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`sibling field key to clear (e.g. endDate)`,className:`fg-mono-input`,style:{width:260}})}),(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`When this checkbox is checked the specified sibling field is cleared and disabled.`})]}):i?(0,f.jsxs)(`div`,{className:`fg-options-block`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Autofill Fields (JSON)`}),(0,f.jsx)(u.Form.Item,{name:[n,`autofillFrom`],style:{marginBottom:0},children:(0,f.jsx)(u.Input.TextArea,{rows:3,className:`fg-mono-input`,placeholder:`[{"optionKey":"vendorContact.email","targetField":"vendorEmail"}]`})}),(0,f.jsx)(`p`,{className:`fg-source-hint`,children:`When a value is selected, copy raw lookup object fields into sibling fields. Each entry: optionKey (dotted path into the raw record) + targetField (sibling key).`})]}):null}}),(0,f.jsxs)(`div`,{className:`fg-validations-section`,children:[(0,f.jsxs)(`div`,{className:`fg-validations-header`,children:[(0,f.jsx)(d.SafetyCertificateOutlined,{className:`fg-val-icon`}),(0,f.jsx)(`span`,{className:`fg-val-title`,children:`Validations`})]}),(0,f.jsx)(u.Form.List,{name:[n,`validations`],children:(e,{add:t,remove:r})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:6},children:({getFieldValue:e})=>{let i=e([...g,n,`validations`,t,`type`]),a=F_(i),o=e([...g,n,`type`]),s=i===`dateAfterField`||i===`dateBeforeField`,c=(e(g)??[]).map((e,t)=>({candidate:e,index:t})).filter(({candidate:e,index:t})=>t!==n&&e?.type===`date`&&e?.field).map(({candidate:e})=>({value:e.field,label:`${e.label||e.field} (${e.field})`})),l=k_.filter(e=>o===`date`?e.dateOnly||e.value===`required`:!e.dateOnly).map(e=>({label:e.label,value:e.value}));return(0,f.jsxs)(`div`,{className:`fg-val-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`type`],style:{marginBottom:0},rules:[{required:!0,message:`Pick type`}],children:(0,f.jsx)(u.Select,{size:`small`,placeholder:o===`date`?`Date condition`:`Type`,style:{width:210},listHeight:400,getPopupContainer:()=>document.body,options:l})}),a.hasValue&&(0,f.jsx)(u.Form.Item,{name:[t,`value`],style:{marginBottom:0},children:s?(0,f.jsx)(u.Select,{size:`small`,showSearch:!0,allowClear:!0,placeholder:`Related date field`,style:{width:210},options:c,optionFilterProp:`label`,getPopupContainer:()=>document.body}):(0,f.jsx)(u.Input,{size:`small`,type:a.valueType===`number`?`number`:`text`,placeholder:a.placeholder,style:{width:90}})}),(0,f.jsx)(u.Form.Item,{name:[t,`message`],style:{marginBottom:0,flex:1},rules:a.messageOptional?[]:[{required:!0,message:`Message required`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:a.messageOptional?`Optional — uses default`:`Error message shown to user`})}),(0,f.jsx)(d.MinusCircleOutlined,{className:`fg-remove-icon`,style:{marginTop:4},onClick:()=>r(t)})]})}},e)),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>t({type:``,value:``,message:``}),className:`fg-add-val-btn`,children:`Add Validation`})]})})]}),(0,f.jsxs)(`div`,{className:`fg-validations-section`,children:[(0,f.jsxs)(`div`,{className:`fg-validations-header`,children:[(0,f.jsx)(d.ThunderboltOutlined,{className:`fg-val-icon`}),(0,f.jsx)(`span`,{className:`fg-val-title`,children:`AI Actions`})]}),(0,f.jsx)(u.Form.List,{name:[n,`aiActions`],children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsxs)(`div`,{className:`fg-ai-action-card`,children:[(0,f.jsxs)(`div`,{className:`fg-val-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`key`],style:{marginBottom:0},rules:[{required:!0,message:`Key`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`key (e.g. generateJD)`,style:{width:150}})}),(0,f.jsx)(u.Form.Item,{name:[t,`label`],style:{marginBottom:0},rules:[{required:!0,message:`Label`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Button label`,style:{width:170}})}),(0,f.jsx)(u.Form.Item,{name:[t,`trigger`],style:{marginBottom:0},initialValue:`click`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:100},options:[{label:`Click`,value:`click`},{label:`Upload`,value:`upload`}]})}),(0,f.jsx)(u.Form.Item,{name:[t,`bodyType`],style:{marginBottom:0},initialValue:`json`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:110},options:[{label:`JSON`,value:`json`},{label:`Multipart`,value:`multipart`}]})}),(0,f.jsx)(u.Form.Item,{name:[t,`position`],style:{marginBottom:0},children:(0,f.jsx)(u.Select,{size:`small`,style:{width:150},placeholder:`Button position`,allowClear:!0,options:[{label:`Top Left`,value:`top-left`},{label:`Top Center`,value:`top-center`},{label:`Top Right`,value:`top-right`},{label:`Bottom Left`,value:`bottom-left`},{label:`Bottom Center`,value:`bottom-center`},{label:`Bottom Right`,value:`bottom-right`}]})}),(0,f.jsx)(d.MinusCircleOutlined,{className:`fg-remove-icon`,style:{marginTop:4},onClick:()=>n(t)})]}),(0,f.jsxs)(`div`,{className:`fg-val-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`serviceKey`],style:{marginBottom:0},rules:[{required:!0,message:`Service key`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`Service key (e.g. pyOps)`,style:{width:170}})}),(0,f.jsx)(u.Form.Item,{name:[t,`endpointPath`],style:{marginBottom:0,flex:1},rules:[{required:!0,message:`Endpoint path`}],children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`/v1/promtJD`,className:`fg-mono-input`})})]}),(0,f.jsxs)(`div`,{className:`fg-ai-subsection`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Inputs (form field → request param) — mark an input "Required", or give it a Min Words count, to make the button stay disabled until that field has a value (or enough words). Inputs sharing the same "group" gate as one unit: either one satisfies it (e.g. a JD file OR JD text).`}),(0,f.jsx)(u.Form.List,{name:[t,`inputs`],children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsxs)(`div`,{className:`fg-val-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`param`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`param`,style:{width:100}})}),(0,f.jsx)(u.Form.Item,{name:[t,`sourceField`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`source field`,className:`fg-mono-input`,style:{width:150}})}),(0,f.jsx)(u.Form.Item,{name:[t,`kind`],style:{marginBottom:0},initialValue:`text`,children:(0,f.jsx)(u.Select,{size:`small`,style:{width:90},options:[{label:`Text`,value:`text`},{label:`File`,value:`file`}]})}),(0,f.jsx)(u.Form.Item,{name:[t,`transform`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`transform`,style:{width:120}})}),(0,f.jsx)(u.Form.Item,{name:[t,`group`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`group (either/or)`,style:{width:130}})}),(0,f.jsx)(u.Form.Item,{name:[t,`minWords`],style:{marginBottom:0},children:(0,f.jsx)(u.InputNumber,{size:`small`,min:0,placeholder:`min words`,style:{width:100}})}),(0,f.jsx)(u.Form.Item,{name:[t,`required`],valuePropName:`checked`,style:{marginBottom:0},children:(0,f.jsx)(u.Checkbox,{children:`Required`})}),(0,f.jsx)(d.MinusCircleOutlined,{className:`fg-remove-icon`,onClick:()=>n(t)})]},e)),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>t({kind:`text`}),children:`Add Input`})]})})]}),(0,f.jsxs)(`div`,{className:`fg-ai-subsection`,children:[(0,f.jsx)(`span`,{className:`fg-options-label`,children:`Response Data Path (optional — where the record lives in the service's response envelope, e.g. "data"; the response is then resolved onto this module's fields the exact same way Edit prefill resolves getFormGroups — by field name, ValuePaths, and each addRow group's payloadKey)`}),(0,f.jsx)(u.Form.Item,{name:[t,`responseDataPath`],style:{marginBottom:0},children:(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. data`,className:`fg-mono-input`,style:{width:200}})})]})]},e)),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>t({trigger:`click`,bodyType:`json`,inputs:[]}),className:`fg-add-val-btn`,children:`Add AI Action`})]})})]})]}),(0,f.jsx)(u.Tooltip,{title:`Remove field`,children:(0,f.jsx)(`button`,{type:`button`,className:`fg-field-remove-btn`,onClick:()=>r(n),"aria-label":`Remove field`,children:(0,f.jsx)(d.MinusCircleOutlined,{})})})]})]})},t)}),(0,f.jsx)(u.Button,{type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{n({type:`text`,show:!0,req:!1,edit:!0,dataSource:`static`,masterName:``,options:[]}),h?.(t.length,!0)},block:!0,className:`fg-add-field-btn`,children:`Add Field`})]})}function W_({open:e,editingGroup:t,defaultModule:n,moduleOptions:r,allGroupsByModule:i,onClose:a,onSaved:o,onSaveGroup:s}){let[c]=u.Form.useForm(),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(n),[_,v]=(0,l.useState)({}),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(null),[C,w]=(0,l.useState)(()=>new Set),[T,E]=(0,l.useState)(`settings`),[D,O]=(0,l.useState)(!1),k=(0,l.useRef)({}),A=(0,l.useRef)(null);async function j(e){if(!(!e||k.current[e])){k.current[e]=`loading`,b(!0);try{let t=await Nn(e);v(n=>({...n,[e]:t})),k.current[e]=`loaded`}catch{delete k.current[e]}finally{b(!1)}}}(0,l.useEffect)(()=>{if(!e)return;let r=t?.module??n;g(r),t?c.setFieldsValue({module:t.module,name:t.name,label:t.label,addRow:t.addRow??!1,minRows:t.minRows??``,initialRows:t.initialRows??``,requireOne:t.requireOne??!1,infoEnabled:t.infoEnabled??!1,infoText:t.infoText??``,toggleEnabled:t.toggleEnabled??!1,toggleLabel:t.toggleLabel??``,toggleField:t.toggleField??``,order:t.order??0,fields:(t.fields??[]).map(H_)}):(c.resetFields(),c.setFieldsValue({module:r,addRow:!1,minRows:``,requireOne:!1,infoEnabled:!1,toggleEnabled:!1,order:0,fields:[]})),j(r)},[e,t,n,c]);function M(e){g(e),j(e)}function N(){w(new Set),E(`settings`),O(!1),a()}function P(e){E(e),e===`fields`&&O(!0)}function F(e,t=!1){w(n=>{let r=new Set(n);return t?r.add(e):r.has(e)?r.delete(e):r.add(e),r})}function I(e){let n=i[e]??[],r=new Set;return n.forEach(e=>{t&&e.id===t.id||(e.fields??[]).forEach(e=>{e.field&&r.add(e.field)})}),r}function L(e,t){let n=(_[h]??[]).find(t=>t.value===e);if(!n)return;let r=c.getFieldValue([`fields`,t])??{};c.setFieldValue([`fields`,t],{...r,field:n.value,label:n.label,type:n.type??`text`})}function R(e){let t=I(e);return(_[e]??[]).map(e=>({value:e.value,disabled:t.has(e.value),label:(0,f.jsxs)(`span`,{style:{opacity:t.has(e.value)?.4:1},children:[e.label,(0,f.jsx)(`span`,{className:`fg-field-key-hint`,children:e.value}),t.has(e.value)&&(0,f.jsx)(`span`,{className:`fg-field-taken-hint`,children:`(in another group)`})]}),searchLabel:`${e.label} ${e.value}`.toLowerCase()}))}async function z(){try{let e=await c.validateFields(),n={...c.getFieldsValue(!0),...e,fields:c.getFieldValue(`fields`)??[]};m(!0);let r={module:n.module,name:n.name,label:n.label,addRow:n.addRow??!1,order:Number(n.order??0),fields:V_(n.fields??[])};n.addRow&&n.minRows!==void 0&&n.minRows!==``&&(r.minRows=Number(n.minRows)),n.addRow&&n.initialRows!==void 0&&n.initialRows!==``&&(r.initialRows=Number(n.initialRows)),n.addRow&&n.requireOne&&(r.requireOne=!0),n.infoEnabled&&n.infoText&&(r.infoEnabled=!0,r.infoText=n.infoText),n.toggleEnabled&&n.toggleField&&(r.toggleEnabled=!0,r.toggleLabel=n.toggleLabel||`Toggle`,r.toggleField=n.toggleField),s?(await s(r,t),u.message.success(t?`Group updated`:`Group created`)):t?(await Fn(t.id,r),u.message.success(`Group updated`)):(await Pn(r),u.message.success(`Group created`)),w(new Set),E(`settings`),O(!1),o()}catch(e){if(e?.errorFields)return;u.message.error(e.message||`Could not save group`)}finally{m(!1)}}let B=(0,l.useMemo)(()=>R(h||n),[i,n,t,h,_]);return(0,f.jsx)(u.Modal,{open:e,onCancel:N,width:1080,centered:!0,destroyOnClose:!0,maskClosable:!1,className:`fg-editor-modal fg-group-editor-modal`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[t?(0,f.jsx)(d.EditOutlined,{}):(0,f.jsx)(d.PlusOutlined,{}),t?` Edit Form Group`:` New Form Group`]}),footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:N,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:p,onClick:z,icon:t?(0,f.jsx)(d.EditOutlined,{}):(0,f.jsx)(d.PlusOutlined,{}),children:t?`Update Group`:`Create Group`})]}),children:(0,f.jsxs)(u.Form,{form:c,layout:`vertical`,className:`fg-form fg-editor-form fg-group-editor-form`,children:[(0,f.jsxs)(`div`,{className:`fg-group-editor-tabs`,role:`tablist`,"aria-label":`Form group editor sections`,children:[(0,f.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":T===`settings`,className:T===`settings`?`is-active`:``,onClick:()=>P(`settings`),children:[(0,f.jsx)(`span`,{className:`fg-editor-tab-number`,children:`1`}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`strong`,{children:`Group settings`}),(0,f.jsx)(`small`,{children:`Name, behaviour and display options`})]})]}),(0,f.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":T===`fields`,className:T===`fields`?`is-active`:``,onClick:()=>P(`fields`),children:[(0,f.jsx)(`span`,{className:`fg-editor-tab-number`,children:`2`}),(0,f.jsxs)(`span`,{children:[(0,f.jsx)(`strong`,{children:`Fields`}),(0,f.jsxs)(`small`,{children:[t?.fields?.length??0,` configured fields`]})]})]})]}),(0,f.jsxs)(`div`,{className:`fg-group-editor-panel${T===`settings`?` is-active`:``}`,children:[(0,f.jsxs)(`div`,{className:`fg-form-section fg-group-settings-card`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Group Info`}),(0,f.jsx)(u.Form.Item,{name:`module`,label:`Module`,rules:[{required:!0,message:`Select a module`}],children:(0,f.jsx)(u.Select,{options:r,placeholder:`Select module`,onChange:M})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Group Label`,rules:[{required:!0,message:`Label is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. Work Experience`})}),(0,f.jsx)(u.Form.Item,{name:`name`,label:`Group Name (key)`,rules:[{required:!0,message:`Name is required`},{pattern:/^[a-z0-9_]+$/,message:`Lowercase letters, numbers, underscores only`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. work_experience`,className:`fg-mono-input`})}),(0,f.jsxs)(`div`,{className:`fg-inline-row`,children:[(0,f.jsx)(u.Form.Item,{name:`order`,label:`Display Order`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:100}})}),(0,f.jsx)(u.Form.Item,{name:`addRow`,label:`Allow Add Row`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:`minRows`,label:`Min Rows`,tooltip:`Minimum rows users must keep. Delete is disabled at this count.`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:90}})}),(0,f.jsx)(u.Form.Item,{name:`initialRows`,label:`Initial Rows`,tooltip:`How many empty rows to show on load (0 = show only the + button).`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:90}})}),(0,f.jsx)(u.Form.Item,{name:`requireOne`,label:`Row Required`,valuePropName:`checked`,tooltip:`When users add a row, at least one field in that row must be filled.`,children:(0,f.jsx)(u.Switch,{checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:`infoEnabled`,label:`Group Info`,valuePropName:`checked`,initialValue:!1,children:(0,f.jsx)(u.Switch,{checkedChildren:`Info`,unCheckedChildren:`Info`})}),(0,f.jsx)(u.Form.Item,{name:`toggleEnabled`,label:`Group Switch`,valuePropName:`checked`,initialValue:!1,children:(0,f.jsx)(u.Switch,{checkedChildren:`On`,unCheckedChildren:`Off`})})]}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:0},className:`fg-group-conditional`,children:({getFieldValue:e})=>e(`infoEnabled`)?(0,f.jsx)(u.Form.Item,{name:`infoText`,label:`Group Info Message`,rules:[{required:!0,message:`Enter group info message`}],children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Message shown when users hover the group info icon`})}):null}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:0},className:`fg-group-conditional`,children:({getFieldValue:e})=>e(`toggleEnabled`)?(0,f.jsxs)(`div`,{className:`fg-inline-row`,children:[(0,f.jsx)(u.Form.Item,{name:`toggleLabel`,label:`Switch Label`,rules:[{required:!0,message:`Enter switch label`}],style:{flex:1},children:(0,f.jsx)(u.Input,{placeholder:`e.g. Fresher`})}),(0,f.jsx)(u.Form.Item,{name:`toggleField`,label:`Payload Field`,rules:[{required:!0,message:`Enter payload field`},{pattern:/^[A-Za-z_][\w.]*$/,message:`Use a valid key, dot path allowed`}],style:{flex:1},children:(0,f.jsx)(u.Input,{placeholder:`e.g. isFresher`,className:`fg-mono-input`})})]}):null})]}),(0,f.jsxs)(`div`,{className:`fg-editor-next-row`,children:[(0,f.jsx)(w_,{type:`secondary`,children:`Next, review the fields included in this group.`}),(0,f.jsx)(u.Button,{type:`primary`,onClick:()=>P(`fields`),children:`Continue to Fields`})]})]}),D&&(0,f.jsxs)(`div`,{className:`fg-group-editor-panel${T===`fields`?` is-active`:``}`,children:[(0,f.jsxs)(`div`,{className:`fg-fields-header`,children:[(0,f.jsx)(`span`,{className:`fg-fields-title`,children:`Fields`}),(0,f.jsx)(`span`,{className:`fg-fields-hint`,children:`Open only the field you want to change`}),y&&(0,f.jsx)(u.Spin,{size:`small`}),!y&&B.length>0&&(0,f.jsxs)(`span`,{className:`fg-fields-hint`,children:[B.length,` fields available`]})]}),(0,f.jsx)(u.Form.List,{name:`fields`,children:(e,{add:t,remove:n,move:r})=>U_({form:c,fieldItems:e,add:t,remove:n,move:r,absBase:[],moduleFieldOptions:B,fieldsLoading:y,dragIndexRef:A,dragOverIndex:x,setDragOverIndex:S,onFieldKeySelect:(e,t)=>L(e,t),expandedFieldKeys:C,onToggleField:F})})]})]})})}function G_({groups:e,onEdit:t,onDelete:n,onCopy:r,onPaste:i,canPaste:a}){let o=[{title:`Label`,dataIndex:`label`,key:`label`,render:e=>(0,f.jsx)(w_,{strong:!0,style:{color:`var(--color-text-heading)`},children:e})},{title:`Key`,dataIndex:`name`,key:`name`,render:e=>(0,f.jsx)(`code`,{className:`fg-table-code`,children:e})},{title:`Add Row`,dataIndex:`addRow`,key:`addRow`,align:`center`,width:90,render:e=>e?(0,f.jsx)(u.Tag,{color:`blue`,style:{margin:0},children:`Yes`}):(0,f.jsx)(u.Tag,{color:`default`,style:{margin:0},children:`No`})},{title:`Order`,dataIndex:`order`,key:`order`,align:`center`,width:72,render:e=>(0,f.jsx)(`span`,{className:`fg-order-cell`,children:e??0})},{title:`Fields`,dataIndex:`fields`,key:`fields`,align:`center`,width:76,render:e=>(0,f.jsx)(u.Badge,{count:e?.length??0,showZero:!0,color:`var(--color-brand)`})},{title:``,key:`actions`,align:`right`,width:132,render:(e,o)=>(0,f.jsxs)(u.Space,{size:4,children:[(0,f.jsx)(u.Tooltip,{title:`Copy settings`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.CopyOutlined,{}),onClick:()=>r(o),className:`fg-action-btn`})}),(0,f.jsx)(u.Tooltip,{title:`Paste copied settings into this group`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.SnippetsOutlined,{}),disabled:!a,onClick:()=>i(o),className:`fg-action-btn`})}),(0,f.jsx)(u.Tooltip,{title:`Edit group`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>t(o),className:`fg-action-btn`})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this group?`,description:`All field mappings inside will be removed.`,onConfirm:()=>n(o.id),okText:`Delete`,okButtonProps:{danger:!0},children:(0,f.jsx)(u.Tooltip,{title:`Delete group`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),className:`fg-action-btn`})})})]})}];return(0,f.jsx)(u.Table,{rowKey:e=>e.id??e.name,dataSource:[...e].sort((e,t)=>(e.order??0)-(t.order??0)),columns:o,pagination:!1,className:`fg-table`,locale:{emptyText:(0,f.jsx)(u.Empty,{description:`No groups configured for this module yet.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE,style:{padding:`24px 0`}})},expandable:{expandedRowRender:e=>(e.fields??[]).length===0?(0,f.jsx)(w_,{type:`secondary`,style:{fontSize:12},children:`No fields in this group.`}):(0,f.jsx)(`div`,{className:`fg-expanded-fields`,children:(e.fields??[]).map(e=>{let t={master:`geekblue`,module:`cyan`,lookup:`volcano`,static:`default`},n={master:`master: ${e.masterName||`?`}`,module:`module`,lookup:`lookup: ${e.lookupCollection||`?`} → ${e.displayField||`?`}`,static:`static (${(e.options??[]).length})`};return(0,f.jsxs)(`div`,{className:`fg-field-row`,children:[(0,f.jsxs)(`div`,{className:`fg-field-row-info`,children:[(0,f.jsx)(`span`,{className:`fg-field-row-label`,children:e.label}),(0,f.jsx)(`span`,{className:`fg-field-row-key`,children:e.field}),(0,f.jsxs)(`span`,{className:`fg-field-row-type`,children:[`(`,e.type,`)`]}),[`select`,`radio`,`checkbox`].includes(e.type)&&e.dataSource&&(0,f.jsx)(u.Tag,{color:t[e.dataSource]??`default`,style:{fontSize:10,marginLeft:6},children:n[e.dataSource]??e.dataSource})]}),(0,f.jsxs)(`div`,{className:`fg-field-row-flags`,children:[e.show===1&&(0,f.jsx)(u.Tag,{color:`blue`,style:{marginRight:4},children:`Show`}),e.showOnAdd===!1&&(0,f.jsx)(u.Tag,{color:`orange`,style:{marginRight:4},children:`Edit only`}),e.req===1&&(0,f.jsx)(u.Tag,{color:`red`,style:{marginRight:4},children:`Required`}),e.edit===1&&(0,f.jsx)(u.Tag,{color:`green`,style:{marginRight:4},children:`Editable`}),e.formatter&&(0,f.jsxs)(u.Tag,{color:`purple`,style:{marginRight:4},children:[`fmt: `,e.formatter]})]}),(e.validations??[]).length>0&&(0,f.jsxs)(`div`,{className:`fg-field-row-validations`,children:[(0,f.jsx)(d.CheckCircleOutlined,{style:{color:`var(--color-brand)`,fontSize:11,marginRight:4}}),(e.validations??[]).map((e,t)=>(0,f.jsx)(u.Tooltip,{title:`${e.value!==void 0&&e.value!==``?`Value: ${e.value} — `:``}${e.message}`,children:(0,f.jsxs)(u.Tag,{color:P_[e.type]??`default`,style:{cursor:`default`,fontFamily:`monospace`,fontSize:10},children:[e.type,e.value!==void 0&&e.value!==``?`(${e.value})`:``]})},t))]})]},e.field)})}),rowExpandable:()=>!0}})}function K_({open:e,editingForm:t,moduleOptions:n,onClose:r,onSaved:i}){let[a]=u.Form.useForm(),[o,s]=(0,l.useState)(!1),[c,p]=(0,l.useState)(``),[m,h]=(0,l.useState)({}),[g,_]=(0,l.useState)(!1),[v,y]=(0,l.useState)(null),b=(0,l.useRef)({}),x=(0,l.useRef)(null);async function S(e){if(!(!e||b.current[e])){_(!0);try{let t=await Nn(e);h(n=>({...n,[e]:t})),b.current[e]=!0}catch{}finally{_(!1)}}}(0,l.useEffect)(()=>{if(!e){b.current={},h({});return}if(t){let e=t.module;p(e),a.setFieldsValue({module:e,formType:t.formType||`popup`,action:t.action,label:t.label,groups:(t.groups??[]).map(e=>({...e,infoEnabled:e.infoEnabled??!1,infoText:e.infoText??``,minRows:e.minRows??``,initialRows:e.initialRows??``,requireOne:e.requireOne??!1,toggleEnabled:e.toggleEnabled??!1,toggleLabel:e.toggleLabel??``,toggleField:e.toggleField??``,fields:(e.fields??[]).map(H_)}))}),S(e)}else a.resetFields(),a.setFieldsValue({groups:[],formType:`popup`}),p(``)},[e,t,a]);function C(e){p(e),S(e)}function w(){return(m[c]??[]).map(e=>({value:e.value,label:(0,f.jsxs)(`span`,{children:[e.label,(0,f.jsx)(`span`,{className:`fg-field-key-hint`,children:e.value})]}),searchLabel:`${e.label} ${e.value}`.toLowerCase()}))}async function T(){try{let e=await a.validateFields();s(!0);let n={module:e.module,formType:e.formType,action:e.action.trim(),label:e.label,groups:(e.groups??[]).map(e=>({label:e.label,name:e.name,addRow:e.addRow??!1,...e.addRow&&e.minRows!==void 0&&e.minRows!==``?{minRows:Number(e.minRows)}:{},...e.addRow&&e.initialRows!==void 0&&e.initialRows!==``?{initialRows:Number(e.initialRows)}:{},...e.addRow&&e.requireOne?{requireOne:!0}:{},order:Number(e.order??0),fields:V_(e.fields??[]),...e.infoEnabled&&e.infoText?{infoEnabled:!0,infoText:e.infoText}:{}}))};t?(await Fr(t.id,{...t,...n}),u.message.success(`Custom form updated`)):(await Pr(n),u.message.success(`Custom form created`)),i()}catch(e){if(e?.errorFields)return;u.message.error(e.message||`Could not save custom form`)}finally{s(!1)}}let E=w();return(0,f.jsx)(u.Modal,{open:e,onCancel:r,width:1120,centered:!0,destroyOnClose:!0,maskClosable:!1,className:`fg-editor-modal`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[t?(0,f.jsx)(d.EditOutlined,{}):(0,f.jsx)(d.PlusOutlined,{}),t?` Edit Custom Form`:` New Custom Form`]}),footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:r,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:o,onClick:T,icon:t?(0,f.jsx)(d.EditOutlined,{}):(0,f.jsx)(d.PlusOutlined,{}),children:t?`Update`:`Create`})]}),children:(0,f.jsxs)(u.Form,{form:a,layout:`vertical`,className:`fg-form fg-editor-form`,children:[(0,f.jsxs)(`div`,{className:`fg-form-section fg-editor-sticky-section`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Form Identity`}),(0,f.jsx)(u.Form.Item,{name:`module`,label:`Module`,rules:[{required:!0,message:`Select a module`}],children:(0,f.jsx)(u.Select,{options:n,placeholder:`Select module`,onChange:C})}),(0,f.jsx)(u.Form.Item,{name:`formType`,label:`Form Type`,rules:[{required:!0,message:`Form Type is required`}],initialValue:`popup`,children:(0,f.jsx)(u.Select,{placeholder:`Select form type`,options:[{label:`Search`,value:`search`},{label:`Popup`,value:`popup`}]})}),(0,f.jsx)(u.Form.Item,{name:`action`,label:`Action Key`,extra:`Unique identifier used as ?action= in the URL (e.g. quickAdd, popup)`,rules:[{required:!0,message:`Action is required`},{pattern:/^[a-zA-Z0-9_-]+$/,message:`Letters, numbers, hyphens, underscores only`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. quickAdd`,className:`fg-mono-input`,disabled:!!t})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Display Label`,rules:[{required:!0,message:`Label is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. Quick Add Job`})})]}),(0,f.jsxs)(`div`,{className:`fg-fields-header`,children:[(0,f.jsx)(`span`,{className:`fg-fields-title`,children:`Groups`}),(0,f.jsx)(`span`,{className:`fg-fields-hint`,children:`Each group holds a set of form fields`}),g&&(0,f.jsx)(u.Spin,{size:`small`})]}),(0,f.jsx)(u.Form.List,{name:`groups`,children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t})=>(0,f.jsxs)(`div`,{className:`fg-form-section`,style:{marginBottom:16},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:10},children:[(0,f.jsxs)(`span`,{className:`fg-form-section-label`,style:{marginBottom:0},children:[`Group `,t+1]}),(0,f.jsx)(u.Tooltip,{title:`Remove group`,children:(0,f.jsx)(`button`,{type:`button`,className:`fg-field-remove-btn`,onClick:()=>n(t),"aria-label":`Remove group`,children:(0,f.jsx)(d.MinusCircleOutlined,{})})})]}),(0,f.jsxs)(`div`,{className:`fg-inline-row`,style:{flexWrap:`wrap`,marginBottom:8},children:[(0,f.jsx)(u.Form.Item,{name:[t,`label`],label:`Group Label`,rules:[{required:!0,message:`Required`}],style:{flex:2,marginBottom:8},children:(0,f.jsx)(u.Input,{placeholder:`e.g. Basic Info`})}),(0,f.jsx)(u.Form.Item,{name:[t,`name`],label:`Group Key`,rules:[{required:!0,message:`Required`},{pattern:/^[a-z0-9_]+$/,message:`Lowercase, numbers, underscores`}],style:{flex:2,marginBottom:8},children:(0,f.jsx)(u.Input,{placeholder:`e.g. basicInfo`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:[t,`addRow`],label:`Add Row`,valuePropName:`checked`,initialValue:!1,style:{marginBottom:8},children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:[t,`minRows`],label:`Min Rows`,style:{marginBottom:8},tooltip:`Minimum rows users must keep. Delete is disabled at this count.`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:80}})}),(0,f.jsx)(u.Form.Item,{name:[t,`initialRows`],label:`Initial Rows`,style:{marginBottom:8},tooltip:`How many empty rows to show on load (0 = show only the + button).`,children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:80}})}),(0,f.jsx)(u.Form.Item,{name:[t,`requireOne`],label:`Row Required`,valuePropName:`checked`,initialValue:!1,style:{marginBottom:8},tooltip:`When users add a row, at least one field in that row must be filled.`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Yes`,unCheckedChildren:`No`})}),(0,f.jsx)(u.Form.Item,{name:[t,`infoEnabled`],label:`Group Info`,valuePropName:`checked`,initialValue:!1,style:{marginBottom:8},children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Info`,unCheckedChildren:`Info`})}),(0,f.jsx)(u.Form.Item,{name:[t,`toggleEnabled`],label:`Group Switch`,valuePropName:`checked`,initialValue:!1,style:{marginBottom:8},children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`On`,unCheckedChildren:`Off`})}),(0,f.jsx)(u.Form.Item,{name:[t,`order`],label:`Order`,initialValue:0,style:{marginBottom:8},children:(0,f.jsx)(u.Input,{type:`number`,min:0,style:{width:70}})})]}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>e([`groups`,t,`infoEnabled`])?(0,f.jsx)(u.Form.Item,{name:[t,`infoText`],label:`Group Info Message`,rules:[{required:!0,message:`Enter group info message`}],children:(0,f.jsx)(u.Input.TextArea,{rows:2,placeholder:`Message shown when users hover the group info icon`})}):null}),(0,f.jsx)(u.Form.Item,{shouldUpdate:!0,style:{marginBottom:8},children:({getFieldValue:e})=>e([`groups`,t,`toggleEnabled`])?(0,f.jsxs)(`div`,{className:`fg-inline-row`,children:[(0,f.jsx)(u.Form.Item,{name:[t,`toggleLabel`],label:`Switch Label`,rules:[{required:!0,message:`Enter switch label`}],style:{flex:1,marginBottom:0},children:(0,f.jsx)(u.Input,{placeholder:`e.g. Fresher`})}),(0,f.jsx)(u.Form.Item,{name:[t,`toggleField`],label:`Payload Field`,rules:[{required:!0,message:`Enter payload field`},{pattern:/^[A-Za-z_][\w.]*$/,message:`Use a valid key, dot path allowed`}],style:{flex:1,marginBottom:0},children:(0,f.jsx)(u.Input,{placeholder:`e.g. isFresher`,className:`fg-mono-input`})})]}):null}),(0,f.jsx)(`div`,{className:`fg-fields-header`,style:{marginTop:4,marginBottom:8},children:(0,f.jsx)(`span`,{className:`fg-fields-title`,style:{fontSize:12},children:`Fields`})}),(0,f.jsx)(u.Form.List,{name:[t,`fields`],children:(e,{add:n,remove:r,move:i})=>U_({form:a,fieldItems:e,add:n,remove:r,move:i,absBase:[`groups`,t],moduleFieldOptions:E,fieldsLoading:g,dragIndexRef:x,dragOverIndex:v,setDragOverIndex:y,onFieldKeySelect:(e,n)=>{let r=(m[c]??[]).find(t=>t.value===e);if(!r)return;let i=a.getFieldValue([`groups`,t,`fields`,n])??{};a.setFieldValue([`groups`,t,`fields`,n],{...i,field:r.value,label:r.label,type:r.type??`text`})}})})]},e)),(0,f.jsx)(u.Button,{type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),block:!0,style:{marginBottom:16},onClick:()=>t({label:``,name:``,addRow:!1,order:e.length,fields:[]}),children:`Add Group`})]})})]})})}function q_({moduleOptions:e}){let[t,n]=(0,l.useState)([]),[r,i]=(0,l.useState)(!1),[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(null);function p(){i(!0),Nr().then(e=>n(e)).catch(e=>u.message.error(e.message||`Could not load custom forms`)).finally(()=>i(!1))}(0,l.useEffect)(()=>{p()},[]);async function m(e){try{await Ir(e.id),u.message.success(`Custom form deleted`),p()}catch(e){u.message.error(e.message||`Could not delete custom form`)}}return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`fg-tab-toolbar`,style:{marginBottom:12},children:(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{c(null),o(!0)},children:`New Custom Form`})}),(0,f.jsx)(u.Spin,{spinning:r,children:(0,f.jsx)(u.Table,{rowKey:e=>e.id??e.action,dataSource:t,columns:[{title:`Module`,dataIndex:`module`,key:`module`,render:e=>(0,f.jsx)(u.Tag,{color:`blue`,children:e})},{title:`Action Key`,dataIndex:`action`,key:`action`,render:e=>(0,f.jsx)(`code`,{className:`fg-table-code`,children:e})},{title:`Label`,dataIndex:`label`,key:`label`,render:e=>(0,f.jsx)(w_,{strong:!0,style:{color:`var(--color-text-heading)`},children:e})},{title:`Groups`,dataIndex:`groups`,key:`groups`,align:`center`,width:76,render:e=>(0,f.jsx)(u.Badge,{count:e?.length??0,showZero:!0,color:`var(--color-brand)`})},{title:``,key:`actions`,align:`right`,width:100,render:(e,t)=>(0,f.jsxs)(u.Space,{size:4,children:[(0,f.jsx)(u.Tooltip,{title:`Edit form`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{c(t),o(!0)},className:`fg-action-btn`})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this custom form?`,description:`All configured groups will be lost.`,onConfirm:()=>m(t),okText:`Delete`,okButtonProps:{danger:!0},children:(0,f.jsx)(u.Tooltip,{title:`Delete form`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),className:`fg-action-btn`})})})]})}],pagination:!1,className:`fg-table`,locale:{emptyText:(0,f.jsx)(u.Empty,{description:`No custom forms yet. Click 'New Custom Form' to create one.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE,style:{padding:`24px 0`}})}})}),(0,f.jsx)(K_,{open:a,editingForm:s,moduleOptions:e,onClose:()=>{o(!1),c(null)},onSaved:()=>{o(!1),c(null),p()}})]})}function J_(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[i,a]=(0,l.useState)({}),[o,s]=(0,l.useState)(`all`),[c,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(`module`),[b,x]=(0,l.useState)([]),[S,C]=(0,l.useState)({clientId:``,region:``}),[w,T]=(0,l.useState)(!1),[E,D]=(0,l.useState)(null),O=I_(e),k=e.map(e=>({value:e.key,label:e.label}));(0,l.useEffect)(()=>{Tn().then(e=>{t(e);let n=I_(e);a(L_(n)),j(`all`,n)}).catch(()=>t([])).finally(()=>r(!1))},[]),(0,l.useEffect)(()=>{Mn({limit:200}).then(x).catch(()=>x([]))},[]);function A(e,t){a(n=>({...n,[e]:{...n[e],...t}}))}function j(e,t){(t??O).find(t=>t.key===e)&&(A(e,{loading:!0,error:``}),jn(e===`all`?``:e,e===`jobs`?S:{}).then(t=>A(e,{groups:t,loading:!1,loaded:!0})).catch(t=>A(e,{error:t.message||`Could not load groups`,loading:!1})))}function M(e){j(e,null)}function N(e){s(e),i[e]?.loaded||M(e)}function P(){h(null),p(!0)}function F(e){h(e),p(!0)}function I(){p(!1),h(null)}async function L(){I(),M(o),o!==`all`&&M(`all`)}async function R(e){try{await In(e),u.message.success(`Group deleted`),M(o),o!==`all`&&M(`all`)}catch(e){u.message.error(e.message||`Could not delete group`)}}function z(e){_(T_[e])}function B(e){let t={...S,...e};C(t),o===`jobs`&&(A(`jobs`,{loading:!0,error:``}),jn(`jobs`,t).then(e=>A(`jobs`,{groups:e,loading:!1})).catch(e=>A(`jobs`,{error:e.message||`Could not load scoped groups`,loading:!1})))}function V(e=o){return e===`jobs`?S:{}}function H(e){D(JSON.parse(JSON.stringify(e))),u.message.success(`Copied settings from ${e.label||e.name}`)}async function U(e){if(E)try{let t={...e,addRow:E.addRow??e.addRow,payloadKey:E.payloadKey??e.payloadKey,fields:JSON.parse(JSON.stringify(E.fields??[]))};await Fn(e.id,t,V(e.module||o)),u.message.success(`Pasted settings into ${e.label||e.name}`),M(o),o!==`all`&&M(`all`)}catch(e){u.message.error(e.message||`Could not paste settings`)}}function W(){_(null),a(L_(O)),M(o),o!==`all`&&M(`all`)}let G=O.map(({key:e,label:t,color:n})=>{let r=i[e]??{groups:[],loading:!1,loaded:!1,error:``},a=[...r.groups].sort((e,t)=>(e.order??0)-(t.order??0));return{key:e,label:(0,f.jsxs)(`span`,{className:`fg-tab-label`,children:[(0,f.jsx)(`span`,{className:`fg-tab-dot`,style:{background:n}}),t,(0,f.jsx)(u.Badge,{count:r.groups.length,showZero:!0,color:n,size:`small`})]}),children:(0,f.jsxs)(`div`,{className:`fg-tab-content`,children:[r.error&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:r.error,style:{marginBottom:12}}),(0,f.jsx)(`div`,{className:`fg-tab-toolbar`,children:(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),disabled:e===`all`,onClick:()=>{s(e),P()},children:`Add Group`})}),(0,f.jsx)(u.Spin,{spinning:r.loading,children:(0,f.jsx)(G_,{groups:a,onEdit:F,onDelete:R,onCopy:H,onPaste:U,canPaste:!!E})})]})}}),K=[{key:`module`,label:`Module Form`,children:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Z,{children:(0,f.jsxs)(`div`,{className:`fg-scope-toolbar`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(w_,{strong:!0,children:`Jobs Client Scope`}),(0,f.jsx)(`div`,{children:(0,f.jsx)(w_,{type:`secondary`,style:{fontSize:12},children:`Select a client to edit a scoped Jobs field list. Leave blank for the default module config.`})})]}),(0,f.jsxs)(u.Space,{wrap:!0,size:8,children:[(0,f.jsx)(u.Select,{size:`small`,allowClear:!0,showSearch:!0,placeholder:`Client`,style:{width:240},value:S.clientId||void 0,optionFilterProp:`label`,options:b.map(e=>({value:e._id??e.id,label:e.clientName??e.name??e.clientRefrenceId??e._id})).filter(e=>e.value),onChange:e=>B({clientId:e??``})}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:()=>M(o),children:`Reload`}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.EyeOutlined,{}),disabled:o!==`jobs`,onClick:()=>T(!0),children:`Preview`})]})]})}),(0,f.jsx)(Z,{children:(0,f.jsx)(u.Spin,{spinning:n,children:(0,f.jsx)(u.Tabs,{activeKey:o,onChange:N,items:G,size:`middle`,className:`fg-tabs`})})}),(0,f.jsx)(W_,{open:c,editingGroup:m,defaultModule:o===`all`?k[0]?.value??``:o,moduleOptions:k,allGroupsByModule:Object.fromEntries(Object.entries(i).filter(([e])=>e!==`all`).map(([e,t])=>[e,t.groups??[]])),onClose:I,onSaved:L,onSaveGroup:(e,t)=>t?Fn(t.id,e,V(e.module)):Pn(e,V(e.module))}),(0,f.jsx)(u.Drawer,{open:w,onClose:()=>T(!1),width:`92vw`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.EyeOutlined,{}),` Jobs Add Form Preview`]}),classNames:{body:`fg-preview-body`},children:(0,f.jsx)(rd,{moduleName:`jobs`,clientId:S.clientId,region:S.region,cancelPath:`/jobs`,onSubmit:async()=>u.message.info(`Preview only. No record was created.`),breadcrumbItems:[{label:`Admin`},{label:`Form Groups`},{label:`Jobs Preview`}]})})]})},{key:`custom`,label:`Custom Form`,children:(0,f.jsx)(Z,{children:(0,f.jsx)(q_,{moduleOptions:k})})}];return(0,f.jsxs)(`div`,{className:`fg-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.AppstoreAddOutlined,{}),title:`Form Groups`,extra:v===`module`?(0,f.jsxs)(u.Space,{size:8,wrap:!0,children:[(0,f.jsx)(u.Dropdown,{trigger:[`click`],menu:{items:[{key:`save`,label:`Save current as default`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>z(`save`)},{key:`restore`,label:`Restore saved default`,icon:(0,f.jsx)(d.CloudDownloadOutlined,{}),onClick:()=>z(`restore`)},{type:`divider`},{key:`reset`,label:`Reset all form groups`,icon:(0,f.jsx)(d.ReloadOutlined,{}),danger:!0,onClick:()=>z(`reset`)}]},children:(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.MoreOutlined,{}),children:`Workspace defaults`})}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.AppstoreAddOutlined,{}),onClick:P,children:`New Group`})]}):null,children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsxs)(w_,{type:`secondary`,style:{fontSize:13},children:[(0,f.jsx)(`strong`,{children:`Module Form`}),` — configure the default add/edit form for each module.`,` `,(0,f.jsx)(`strong`,{children:`Custom Form`}),` — create standalone named forms (module + action) for context-specific flows such as quick-add or popup forms.`]})]}),(0,f.jsx)(Z,{styles:{body:{padding:`0 0`}},children:(0,f.jsx)(u.Tabs,{activeKey:v,onChange:y,items:K,size:`middle`,className:`fg-top-tabs`,tabBarStyle:{padding:`0 16px`,margin:0},destroyInactiveTabPane:!1})}),(0,f.jsx)(C_,{open:!!g,scope:`formGroups`,action:g?.action,title:g?.title,description:g?.description,confirmLabel:g?.confirmLabel,danger:g?.danger,onCancel:()=>_(null),onVerified:W})]})}var{Text:Q}=u.Typography,Y_,X_=new Map;function Z_(){return Y_||=_r().catch(e=>{throw Y_=void 0,e}),Y_}function Q_(e){return X_.has(e)||X_.set(e,vr(e).catch(t=>{throw X_.delete(e),t})),X_.get(e)}var $_={reset:{action:`reset`,title:`Reset all detail config`,confirmLabel:`Reset All`,danger:!0,description:`Clears every detail-view override for all modules in this workspace, so the detail view falls back to the plain form-group fields.`},save:{action:`save`,title:`Save current as default`,confirmLabel:`Save Default`,danger:!1,description:`Snapshots the current detail config for all modules as the saved default you can restore to later.`},restore:{action:`restore`,title:`Restore saved default`,confirmLabel:`Restore Default`,danger:!0,description:`Replaces the current detail config for all modules with the last saved default.`}},ev=[{label:`Default`,value:`default`},{label:`Title Case On`,value:`on`},{label:`Off (raw text)`,value:`off`}],tv=e=>e===!0?`on`:e===!1?`off`:`default`,nv=e=>e===`on`?!0:e===`off`?!1:void 0;function rv(e){let t=new Set,n=[];for(let r of e??[])for(let e of r.fields??[])!e.field||t.has(e.field)||(t.add(e.field),n.push({key:e.field,label:e.label??e.field,type:e.type??`text`,group:r.label??r.name,lookupDefaults:e.lookupCollection?{lookupCollection:e.lookupCollection,displayField:e.displayField??``,displayField2:e.displayField2??``,valueField:e.valueField||`_id`}:{}}));return n}function iv(e,t){if(!t)return null;let n={field:e};t.label&&(n.label=t.label),t.prefix&&(n.prefix=t.prefix),t.suffix&&(n.suffix=t.suffix),t.color&&(n.color=t.color),(t.capitalize===!0||t.capitalize===!1)&&(n.capitalize=t.capitalize),(t.hidden===!0||t.hidden===!1)&&(n.hidden=t.hidden);let r=t.renderType||(t.documentPreview?`document`:t.displayAs===`tag`?`tag`:t.displayAs===`text`?`text`:``);r&&r!==`auto`&&(n.renderType=r);let i={};for(let[e,n]of Object.entries(t.renderOptions??{}))n!==void 0&&n!==``&&n!==!1&&(i[e]=n);return Object.keys(i).length&&(n.renderOptions=i),t.lookupCollection&&(n.lookupCollection=t.lookupCollection,n.displayField=t.displayField||``,t.displayField2&&(n.displayField2=t.displayField2),n.valueField=t.valueField||`_id`),Object.keys(n).length>1?n:null}function av(e){return(e??[]).filter(e=>e.key&&(e.fields??[]).length).map(e=>{let t={key:e.key,label:e.label||e.key,fields:e.fields};return e.template&&(t.template=e.template),e.valueMaps&&Object.keys(e.valueMaps).length&&(t.valueMaps=e.valueMaps),e.separator&&(t.separator=e.separator),e.prefix&&(t.prefix=e.prefix),e.suffix&&(t.suffix=e.suffix),e.color&&(t.color=e.color),(e.capitalize===!0||e.capitalize===!1)&&(t.capitalize=e.capitalize),e.group&&(t.group=e.group),e.hideSources===!1&&(t.hideSources=!1),t})}function ov(e){return Number(e?.show??1)===0}function sv(e,t){let n=[];return{nextGroups:(e??[]).map(e=>{let r=!1,i=(e.fields??[]).map(e=>{let n=t[e.field];if(!n||n.hidden===void 0)return e;let i=+!n.hidden;return Number(e.show??1)===i?e:(r=!0,{...e,show:i})}),a=r?{...e,fields:i}:e;return r&&n.push(a),a}),changed:n}}function cv({value:e,onChange:t}){return(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`},children:[(0,f.jsx)(u.Input,{size:`small`,placeholder:`#0053a5`,value:e??``,onChange:e=>t(e.target.value),className:`fg-mono-input`,prefix:(0,f.jsx)(d.BgColorsOutlined,{style:{color:e||`#bbb`}})}),(0,f.jsx)(`input`,{type:`color`,value:/^#[0-9a-f]{6}$/i.test(e??``)?e:`#0053a5`,onChange:e=>t(e.target.value),style:{width:32,border:`1px solid #d9d9d9`,borderLeft:0,cursor:`pointer`,padding:0},"aria-label":`Pick colour`})]})}function lv({open:e,fieldMeta:t,value:n,onClose:r,onSave:i}){let[a,o]=(0,l.useState)(()=>({...n??{}})),[s,c]=(0,l.useState)([]),[p,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(`display`);(0,l.useEffect)(()=>{if(!e||h!==`lookup`)return;let t=!1;return Z_().then(e=>{t||c(e.map(e=>typeof e==`string`?e:e.name??e.value??``).filter(Boolean))}).catch(()=>{}),()=>{t=!0}},[h,e]),(0,l.useEffect)(()=>{if(!e||h!==`lookup`||!a.lookupCollection)return;let t=!1;return Q_(a.lookupCollection).then(e=>{t||m(e.map(e=>typeof e==`string`?e:e.value??e.field??e.label??``).filter(Boolean))}).catch(()=>{}),()=>{t=!0}},[h,e,a.lookupCollection]);let _=(e,t)=>o(n=>({...n,[e]:t})),v=e=>{m([]),o(t=>({...t,lookupCollection:e}))},y=s.map(e=>({value:e})),b=p.map(e=>({value:e})),x=a.renderOptions??{},S=(e,t)=>_(`renderOptions`,{...x,[e]:t||void 0}),C=a.renderType||(a.documentPreview?`document`:a.displayAs===`tag`?`tag`:a.displayAs===`text`?`text`:`auto`),w=[`tag`,`tags`,`chip`,`badge`].includes(C),T=[`text`,`tag`,`tags`,`chip`,`badge`,`link`,`email`,`phone`].includes(C);return(0,f.jsxs)(u.Modal,{open:e,onCancel:r,width:760,centered:!0,destroyOnClose:!0,maskClosable:!1,className:`fg-editor-modal detail-field-editor-modal`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.EditOutlined,{}),` `,t?.label,(0,f.jsx)(`code`,{className:`fg-field-key-hint`,style:{marginLeft:8},children:t?.key})]}),footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:r,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>i(a),children:`Apply`})]}),children:[(0,f.jsxs)(`div`,{className:`detail-editor-nav`,role:`tablist`,"aria-label":`Field settings`,children:[(0,f.jsx)(u.Button,{type:h===`display`?`primary`:`text`,onClick:()=>g(`display`),children:`Display`}),(0,f.jsx)(u.Button,{type:h===`lookup`?`primary`:`text`,onClick:()=>g(`lookup`),children:`Reference lookup`})]}),h===`display`&&(0,f.jsxs)(`div`,{className:`fg-form-section detail-editor-panel`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Display`}),(0,f.jsxs)(`div`,{style:{marginBottom:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Label override`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:t?.label,value:a.label??``,onChange:e=>_(`label`,e.target.value)})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Prefix`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. $`,value:a.prefix??``,onChange:e=>_(`prefix`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Suffix`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`e.g. yrs`,value:a.suffix??``,onChange:e=>_(`suffix`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Colour`}),(0,f.jsx)(cv,{value:a.color,onChange:e=>_(`color`,e)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Capitalize`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},options:ev,value:tv(a.capitalize),onChange:e=>_(`capitalize`,nv(e))})]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:14},children:[(0,f.jsx)(u.Switch,{size:`small`,checked:!!a.hidden,onChange:e=>_(`hidden`,e)}),(0,f.jsx)(Q,{style:{fontSize:13},children:`Hide this field in the detail view`})]}),(0,f.jsxs)(`div`,{style:{marginTop:14},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Render Type`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},value:C,onChange:e=>_(`renderType`,e),options:ia}),(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12,display:`block`,marginTop:4},children:`How this field is displayed in the detail view — entirely config-driven.`})]}),C===`document`&&(0,f.jsxs)(`div`,{style:{marginTop:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Document mode`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},value:x.documentMode||`preview`,onChange:e=>S(`documentMode`,e),options:aa})]}),T&&(0,f.jsxs)(`div`,{style:{marginTop:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Text transform`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},value:x.textTransform||`none`,onChange:e=>S(`textTransform`,e===`none`?void 0:e),options:oa})]}),w&&(0,f.jsxs)(`div`,{style:{marginTop:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Tag colour`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`geekblue / #0053a5`,value:x.tagColor??``,onChange:e=>S(`tagColor`,e.target.value),className:`fg-mono-input`})]}),C===`date`&&(0,f.jsxs)(`div`,{style:{marginTop:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Date format (dayjs tokens)`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`DD/MM/YYYY`,value:x.dateFormat??``,onChange:e=>S(`dateFormat`,e.target.value),className:`fg-mono-input`})]}),(C===`currency`||C===`budget`)&&(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Currency symbol`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`$ / ₹ / £`,value:x.currencySymbol??``,onChange:e=>S(`currencySymbol`,e.target.value)})]}),C===`budget`&&(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Unit (e.g. Monthly)`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`Monthly`,value:x.unit??``,onChange:e=>S(`unit`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:14},children:[(0,f.jsx)(u.Switch,{size:`small`,checked:!!x.showEmpty,onChange:e=>S(`showEmpty`,e)}),(0,f.jsx)(Q,{style:{fontSize:13},children:`Show empty values`})]})]}),h===`lookup`&&(0,f.jsxs)(`div`,{className:`fg-form-section detail-editor-panel`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Reference Lookup (id → name)`}),(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:12,display:`block`,marginBottom:8},children:[`For fields that store a foreign-key id. The detail API resolves the name from the target collection and returns `,(0,f.jsx)(`code`,{children:`{ id, value }`}),`.`]}),(0,f.jsxs)(`div`,{style:{marginBottom:10},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Collection`}),(0,f.jsx)(u.AutoComplete,{size:`small`,style:{width:`100%`},options:y,placeholder:`e.g. vendors`,value:a.lookupCollection??``,onChange:v,filterOption:(e,t)=>(t?.value??``).toLowerCase().includes(e.toLowerCase()),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Display Field`}),(0,f.jsx)(u.AutoComplete,{size:`small`,style:{width:`100%`},options:b,placeholder:`e.g. vendorCompanyName`,value:a.displayField??``,onChange:e=>_(`displayField`,e),filterOption:(e,t)=>(t?.value??``).toLowerCase().includes(e.toLowerCase()),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Display Field 2`}),(0,f.jsx)(u.AutoComplete,{size:`small`,style:{width:`100%`},options:b,placeholder:`e.g. lastName`,value:a.displayField2??``,onChange:e=>_(`displayField2`,e),filterOption:(e,t)=>(t?.value??``).toLowerCase().includes(e.toLowerCase()),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Value Field (FK)`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`_id`,value:a.valueField??``,onChange:e=>_(`valueField`,e.target.value),className:`fg-mono-input`})]})]})]})]})}function uv(e){let t=[];return Object.entries(e??{}).forEach(([e,n])=>{Object.entries(n??{}).forEach(([n,r])=>t.push({field:e,from:n,to:r}))}),t}function dv(e){let t={};for(let n of e??[])!n.field||!n.from||(t[n.field]={...t[n.field]??{},[n.from]:n.to??``});return t}function fv({open:e,merge:t,fieldOptions:n,groupOptions:r,onClose:i,onSave:a}){let[o,s]=(0,l.useState)(()=>({key:``,label:``,fields:[],separator:` - `,template:``,prefix:``,suffix:``,color:``,capitalize:void 0,group:``,hideSources:!0,...t??{},mapRows:uv(t?.valueMaps)})),c=(e,t)=>s(n=>({...n,[e]:t})),p=(e,t)=>s(n=>{let r=[...n.mapRows??[]];return r[e]={...r[e],...t},{...n,mapRows:r}}),m=e=>s(t=>({...t,mapRows:(t.mapRows??[]).filter((t,n)=>n!==e)}));return(0,f.jsx)(u.Modal,{open:e,onCancel:i,width:820,centered:!0,destroyOnClose:!0,maskClosable:!1,className:`fg-editor-modal`,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.MergeCellsOutlined,{}),` `,t?`Edit Merged Field`:`New Merged Field`]}),footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:i,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>{if(!o.key?.trim())return u.message.error(`A merge key is required`);if(!/^[a-z0-9_]+$/.test(o.key))return u.message.error(`Key: lowercase letters, numbers, underscores only`);if(!(o.fields??[]).length)return u.message.error(`Pick at least one source field`);let{mapRows:e,...t}=o;a({...t,valueMaps:dv(e)})},children:`Apply`})]}),children:(0,f.jsxs)(`div`,{className:`fg-form-section`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Merged Field`}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Key`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`experience_range`,value:o.key??``,onChange:e=>c(`key`,e.target.value),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Label`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`Experience`,value:o.label??``,onChange:e=>c(`label`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{style:{margin:`12px 0`},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Source fields (combined in order)`}),(0,f.jsx)(u.Select,{mode:`multiple`,size:`small`,style:{width:`100%`},placeholder:`Pick fields to combine`,options:n,value:o.fields??[],onChange:e=>c(`fields`,e),optionFilterProp:`label`})]}),(0,f.jsxs)(`div`,{style:{margin:`12px 0`},children:[(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:12},children:[`Template `,(0,f.jsx)(`span`,{style:{color:`#94a3b8`},children:`(optional — overrides separator)`})]}),(0,f.jsx)(u.Input.TextArea,{rows:2,value:o.template??``,onChange:e=>c(`template`,e.target.value),placeholder:`{clientBudgetStart} - {clientBudgetEnd} {clientBudgetCurrency}/{clientBudgetUnit}`,className:`fg-mono-input`}),(o.fields??[]).length>0&&(0,f.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4,marginTop:6},children:(o.fields??[]).map(e=>(0,f.jsxs)(u.Tag,{color:`blue`,style:{cursor:`pointer`,margin:0},onClick:()=>c(`template`,`${o.template??``}{${e}}`),children:[`+ `,`{${e}}`]},e))}),(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:11,display:`block`,marginTop:4},children:[`Click a chip to insert a field. Everything else (spaces, “/”, “-”) is kept literally. Result e.g. `,(0,f.jsx)(`code`,{children:`60 - 80 $/Monthly`}),`.`]})]}),(0,f.jsxs)(`div`,{style:{margin:`12px 0`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Value mappings (raw → display)`}),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),disabled:!(o.fields??[]).length,onClick:()=>s(e=>({...e,mapRows:[...e.mapRows??[],{field:e.fields?.[0]??``,from:``,to:``}]})),children:`Add`})]}),(o.mapRows??[]).map((e,t)=>(0,f.jsxs)(`div`,{style:{display:`flex`,gap:6,marginTop:6,alignItems:`center`},children:[(0,f.jsx)(u.Select,{size:`small`,style:{flex:1.4},placeholder:`field`,value:e.field||void 0,options:(o.fields??[]).map(e=>({value:e,label:e})),onChange:e=>p(t,{field:e})}),(0,f.jsx)(u.Input,{size:`small`,style:{flex:1},placeholder:`Monthly`,value:e.from,onChange:e=>p(t,{from:e.target.value})}),(0,f.jsx)(`span`,{style:{color:`#94a3b8`},children:`→`}),(0,f.jsx)(u.Input,{size:`small`,style:{flex:1},placeholder:`mon`,value:e.to,onChange:e=>p(t,{to:e.target.value})}),(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),onClick:()=>m(t)})]},t)),!(o.mapRows??[]).length&&(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:11,display:`block`,marginTop:4},children:`e.g. Monthly → mon, Daily → day, Yearly → yr. Unmapped values stay as-is.`})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:12},children:[`Separator `,(0,f.jsx)(`span`,{style:{color:`#94a3b8`},children:`(used when no template)`})]}),(0,f.jsx)(u.Input,{size:`small`,placeholder:` - `,value:o.separator??``,onChange:e=>c(`separator`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Place in group`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},allowClear:!0,placeholder:`(first source's group)`,options:r,value:o.group||void 0,onChange:e=>c(`group`,e??``)})]})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Prefix`}),(0,f.jsx)(u.Input,{size:`small`,value:o.prefix??``,onChange:e=>c(`prefix`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Suffix`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`yrs`,value:o.suffix??``,onChange:e=>c(`suffix`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Colour`}),(0,f.jsx)(cv,{value:o.color,onChange:e=>c(`color`,e)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`Capitalize`}),(0,f.jsx)(u.Select,{size:`small`,style:{width:`100%`},options:ev,value:tv(o.capitalize),onChange:e=>c(`capitalize`,nv(e))})]})]}),(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:14},children:[(0,f.jsx)(u.Switch,{size:`small`,checked:o.hideSources!==!1,onChange:e=>c(`hideSources`,e)}),(0,f.jsx)(Q,{style:{fontSize:13},children:`Hide the source fields after merging`})]})]})})}function pv({open:e,module:t,onClose:n}){let[r,i]=(0,l.useState)(``),[a,o]=(0,l.useState)([]),[s,c]=(0,l.useState)(!1),[p,m]=(0,l.useState)(``),h=async()=>{if(!r.trim())return u.message.warning(`Enter a record _id to preview`);c(!0),m(``);try{let[e]=await Promise.all([Yn(t,r.trim()),ra()]);o(e),e.length||m(`No groups returned — check the id and module.`)}catch(e){m(e?.message||`Failed to load preview`)}finally{c(!1)}};return(0,f.jsxs)(u.Drawer,{open:e,onClose:n,width:520,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.EyeOutlined,{}),` Detail Preview — `,t]}),classNames:{header:`fg-drawer-header`,body:`fg-drawer-body`},children:[(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`,marginBottom:14},children:[(0,f.jsx)(u.Input,{placeholder:`Paste a record _id (24-char ObjectId)`,value:r,onChange:e=>i(e.target.value),onPressEnter:h,className:`fg-mono-input`}),(0,f.jsx)(u.Button,{type:`primary`,loading:s,onClick:h,children:`Load`})]}),p&&(0,f.jsx)(u.Alert,{type:`warning`,showIcon:!0,message:p,style:{marginBottom:12}}),(0,f.jsxs)(u.Spin,{spinning:s,children:[a.map(e=>(0,f.jsxs)(`div`,{style:{marginBottom:18},children:[(0,f.jsx)(Q,{strong:!0,style:{display:`block`,marginBottom:8},children:e.label??e.name}),(e.fields??[]).filter(e=>e.show===void 0||e.show===1).map(e=>(0,f.jsxs)(`div`,{style:{display:`flex`,gap:10,padding:`4px 0`,borderBottom:`1px dashed #eee`},children:[(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12,width:150,flexShrink:0},children:e.label}),(0,f.jsx)(ip,{field:e})]},e.field))]},e.id??e.name)),!s&&!a.length&&!p&&(0,f.jsx)(u.Empty,{description:`Load a record to preview its detail view.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE})]})]})}function mv(e){let t={};return[`s3BaseUrl`,`dateFormat`,`booleanTrueLabel`,`booleanFalseLabel`,`emptyPlaceholder`,`separator`].forEach(n=>{e?.[n]!==void 0&&e?.[n]!==``&&(t[n]=e[n])}),Array.isArray(e?.documentNameOrder)&&e.documentNameOrder.length&&(t.documentNameOrder=e.documentNameOrder),t}function hv({open:e,onClose:t}){let[n,r]=(0,l.useState)(()=>({...ea()})),[i,a]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(!e)return;let t=!1;return Un().then(e=>{t||r(t=>({...t,...mv(e)}))}).catch(()=>{}),()=>{t=!0}},[e]);let o=(e,t)=>r(n=>({...n,[e]:t})),s=async()=>{a(!0);try{let e={s3BaseUrl:(n.s3BaseUrl??``).trim(),dateFormat:(n.dateFormat??``).trim(),booleanTrueLabel:n.booleanTrueLabel??``,booleanFalseLabel:n.booleanFalseLabel??``,emptyPlaceholder:n.emptyPlaceholder??``,separator:n.separator??``,documentNameOrder:Array.isArray(n.documentNameOrder)?n.documentNameOrder:[]};await Wn(e),na(e),u.message.success(`Display defaults saved`),t()}catch(e){u.message.error(e?.message||`Could not save defaults`)}finally{a(!1)}},c={fontSize:12,display:`block`,marginBottom:4};return(0,f.jsxs)(u.Drawer,{open:e,onClose:t,width:460,title:(0,f.jsxs)(`span`,{className:`fg-drawer-title`,children:[(0,f.jsx)(d.SettingOutlined,{}),` Display Defaults`]}),classNames:{header:`fg-drawer-header`,body:`fg-drawer-body`},footer:(0,f.jsxs)(`div`,{className:`fg-drawer-footer`,children:[(0,f.jsx)(u.Button,{onClick:()=>r({...Zi}),children:`Reset to built-in`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:i,onClick:s,children:`Save Defaults`})]}),children:[(0,f.jsxs)(`div`,{className:`fg-form-section`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Documents / Files`}),(0,f.jsxs)(`div`,{style:{marginBottom:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`S3 Base URL`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:Zi.s3BaseUrl,value:n.s3BaseUrl??``,onChange:e=>o(`s3BaseUrl`,e.target.value),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Document name priority (first match wins)`}),(0,f.jsx)(u.Select,{mode:`tags`,size:`small`,style:{width:`100%`},placeholder:`name, documentName, uploadedFileName…`,value:n.documentNameOrder??[],onChange:e=>o(`documentNameOrder`,e)})]})]}),(0,f.jsxs)(`div`,{className:`fg-form-section`,children:[(0,f.jsx)(`div`,{className:`fg-form-section-label`,children:`Value Formatting`}),(0,f.jsxs)(`div`,{style:{marginBottom:12},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Date format (dayjs tokens)`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`DD MMM YYYY`,value:n.dateFormat??``,onChange:e=>o(`dateFormat`,e.target.value),className:`fg-mono-input`})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Boolean — true`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`Yes`,value:n.booleanTrueLabel??``,onChange:e=>o(`booleanTrueLabel`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Boolean — false`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`No`,value:n.booleanFalseLabel??``,onChange:e=>o(`booleanFalseLabel`,e.target.value)})]})]}),(0,f.jsxs)(`div`,{className:`fg-field-meta-row`,style:{marginTop:12},children:[(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Empty placeholder`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:`-`,value:n.emptyPlaceholder??``,onChange:e=>o(`emptyPlaceholder`,e.target.value)})]}),(0,f.jsxs)(`div`,{style:{flex:1},children:[(0,f.jsx)(Q,{type:`secondary`,style:c,children:`Object / array separator`}),(0,f.jsx)(u.Input,{size:`small`,placeholder:` - `,value:n.separator??``,onChange:e=>o(`separator`,e.target.value)})]})]})]})]})}function gv(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)([]),[m,h]=(0,l.useState)([]),[g,_]=(0,l.useState)({}),[v,y]=(0,l.useState)([]),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)(``),[w,T]=(0,l.useState)(!1),[E,D]=(0,l.useState)(null),[O,k]=(0,l.useState)(null),[A,j]=(0,l.useState)(!1),[M,N]=(0,l.useState)(!1),[P,F]=(0,l.useState)(null),[I,L]=(0,l.useState)(0),[R,z]=(0,l.useState)(``);function B(e){F($_[e])}function V(){F(null),L(e=>e+1)}(0,l.useEffect)(()=>{Tn().then(e=>{t(e),e.length&&a(e[0].key)}).catch(()=>t([])).finally(()=>r(!1))},[]),(0,l.useEffect)(()=>{if(!i)return;let e=!1;return(async()=>{x(!0),C(``);try{let[t,n]=await Promise.all([jn(i),Bn(i)]);if(e)return;s(t??[]),p(rv(t)),h((t??[]).map(e=>({value:e.name,label:e.label??e.name})));let r={};(n.fields??[]).forEach(e=>{r[e.field]=e}),_(r),y(n.merges??[])}catch(t){e||C(t?.message||`Failed to load configuration`)}finally{e||x(!1)}})(),()=>{e=!0}},[i,I]);let H=(0,l.useMemo)(()=>c.map(e=>({value:e.key,label:`${e.label} (${e.key})`})),[c]);async function U(){T(!0);try{let e=Object.entries(g).map(([e,t])=>iv(e,t)).filter(Boolean),{nextGroups:t,changed:n}=sv(o,g);await Vn({module:i,fields:e,merges:av(v)}),n.length&&(s(t),p(rv(t)),h(t.map(e=>({value:e.name,label:e.label??e.name})))),u.message.success(`Detail view configuration saved`)}catch(e){u.message.error(e?.message||`Could not save configuration`)}finally{T(!1)}}function W(e){_(t=>({...t,[E.key]:{...e,field:E.key}})),D(null)}function G(e){_(t=>{let n={...t};return delete n[e],n})}function K(e){y(t=>{let n=[...t];return O.index===null?n.push(e):n[O.index]=e,n}),k(null)}function q(e,t){_(n=>{let r=n[e]??{field:e};return{...n,[e]:{...r,hidden:t}}})}let ee=e=>{if(!e)return null;let t=[];e.label&&t.push((0,f.jsx)(u.Tag,{color:`blue`,children:`label`},`l`)),(e.prefix||e.suffix)&&t.push((0,f.jsx)(u.Tag,{color:`geekblue`,children:`±fix`},`ps`)),e.color&&t.push((0,f.jsx)(u.Tag,{color:e.color,children:`colour`},`c`)),e.capitalize===!0&&t.push((0,f.jsx)(u.Tag,{color:`purple`,children:`Title`},`cap`)),e.capitalize===!1&&t.push((0,f.jsx)(u.Tag,{color:`default`,children:`raw`},`cap`)),e.lookupCollection&&t.push((0,f.jsxs)(u.Tag,{color:`volcano`,children:[`lookup: `,e.lookupCollection]},`lk`));let n=e.renderType||(e.documentPreview?`document`:e.displayAs);return n&&n!==`auto`&&t.push((0,f.jsx)(u.Tag,{color:`cyan`,children:n},`rt`)),t.length?t:(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`—`})},te=[{title:`Group`,dataIndex:`label`,key:`label`,render:(e,t)=>(0,f.jsx)(Q,{strong:!0,style:{color:`var(--color-text-heading)`},children:e??t.name})},{title:`Key`,dataIndex:`name`,key:`name`,render:e=>(0,f.jsx)(`code`,{className:`fg-table-code`,children:e})},{title:`Order`,dataIndex:`order`,key:`order`,width:72,align:`center`,render:e=>(0,f.jsx)(`span`,{className:`fg-order-cell`,children:e??0})},{title:`Fields`,dataIndex:`fields`,key:`fields`,width:76,align:`center`,render:e=>(0,f.jsx)(u.Badge,{count:e?.length??0,showZero:!0,color:`var(--color-brand)`})},{title:`Customized`,key:`cust`,width:100,align:`center`,render:(e,t)=>{let n=(t.fields??[]).filter(e=>g[e.field]).length;return n?(0,f.jsx)(u.Tag,{color:`blue`,style:{margin:0},children:n}):(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`—`})}}],ne=e=>{let t=e.fields??[];return t.length?(0,f.jsx)(`div`,{className:`fg-expanded-fields`,children:t.map(t=>{let n=g[t.field],r=n?.hidden??ov(t),i={key:t.field,label:t.label??t.field,type:t.type??`text`,group:e.label??e.name,lookupDefaults:t.lookupCollection?{lookupCollection:t.lookupCollection,displayField:t.displayField??``,displayField2:t.displayField2??``,valueField:t.valueField||`_id`}:{}};return(0,f.jsxs)(`div`,{className:`fg-field-row`,children:[(0,f.jsxs)(`div`,{className:`fg-field-row-info`,children:[(0,f.jsx)(`span`,{className:`fg-field-row-label`,children:n?.label||t.label}),(0,f.jsx)(`span`,{className:`fg-field-row-key`,children:t.field}),(0,f.jsxs)(`span`,{className:`fg-field-row-type`,children:[`(`,t.type,`)`]})]}),(0,f.jsx)(`div`,{className:`fg-field-row-flags`,children:ee(n)}),(0,f.jsxs)(u.Space,{size:4,style:{marginLeft:`auto`},children:[(0,f.jsx)(u.Tooltip,{title:r?`Hidden in form and detail view`:`Visible`,children:(0,f.jsx)(u.Switch,{size:`small`,checkedChildren:`Hide`,unCheckedChildren:`Show`,checked:r,onChange:e=>q(t.field,e)})}),(0,f.jsx)(u.Tooltip,{title:`Customize field`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>D(i)})}),n&&(0,f.jsx)(u.Tooltip,{title:`Reset to default`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:()=>G(t.field)})})]})]},t.field)})}):(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:12},children:`No fields in this group.`})},re=(0,l.useMemo)(()=>{let e=R.trim().toLowerCase();return[...o].filter(t=>!e||[t.label,t.name,...(t.fields??[]).flatMap(e=>[e.label,e.field,e.type])].some(t=>String(t??``).toLowerCase().includes(e))).sort((e,t)=>(e.order??0)-(t.order??0))},[o,R]),ie=[{title:`Label`,dataIndex:`label`,key:`label`,render:(e,t)=>(0,f.jsxs)(`span`,{children:[(0,f.jsx)(Q,{strong:!0,children:e||t.key}),(0,f.jsx)(`span`,{className:`fg-field-key-hint`,children:t.key})]})},{title:`Fields`,dataIndex:`fields`,key:`fields`,render:e=>(0,f.jsx)(u.Space,{size:4,wrap:!0,children:(e??[]).map(e=>(0,f.jsx)(u.Tag,{children:e},e))})},{title:`Format`,key:`sep`,width:220,render:(e,t)=>(0,f.jsx)(`code`,{className:`fg-table-code`,children:t.template?.trim()?t.template:`join: ${t.separator||` - `}`})},{title:``,key:`actions`,width:90,align:`right`,render:(e,t,n)=>(0,f.jsxs)(u.Space,{size:4,children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>k({index:n,merge:t})})}),(0,f.jsx)(u.Tooltip,{title:`Delete`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),onClick:()=>y(e=>e.filter((e,t)=>t!==n))})})]})}],ae=e.map(e=>({key:e.key,label:e.label}));return(0,f.jsxs)(`div`,{className:`fg-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.BgColorsOutlined,{}),title:`Detail Groups`,extra:(0,f.jsxs)(u.Space,{size:8,wrap:!0,children:[(0,f.jsx)(u.Dropdown,{trigger:[`click`],menu:{items:[{key:`save`,label:`Save current as default`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>B(`save`)},{key:`restore`,label:`Restore saved default`,icon:(0,f.jsx)(d.CloudDownloadOutlined,{}),onClick:()=>B(`restore`)},{type:`divider`},{key:`reset`,label:`Reset all detail settings`,icon:(0,f.jsx)(d.ReloadOutlined,{}),danger:!0,onClick:()=>B(`reset`)}]},children:(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.MoreOutlined,{}),children:`Workspace defaults`})}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.SettingOutlined,{}),onClick:()=>N(!0),children:`Display Defaults`}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.EyeOutlined,{}),disabled:!i,onClick:()=>j(!0),children:`Preview`}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:w,disabled:!i,onClick:U,children:`Save Configuration`})]}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(Q,{type:`secondary`,style:{fontSize:13},children:`Customize how each module's detail view renders: per-field label, prefix/suffix, colour, capitalization, hide, reference lookups (id → name), and merged display fields. Applied on top of Form Groups — the add/edit forms are unaffected.`})]}),(0,f.jsx)(Z,{styles:{body:{paddingTop:8}},children:(0,f.jsxs)(u.Spin,{spinning:n,children:[(0,f.jsx)(u.Tabs,{activeKey:i,onChange:a,items:ae.map(e=>({...e,children:null})),className:`admin-module-tabs`}),S&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:S,style:{marginBottom:12}}),(0,f.jsxs)(u.Spin,{spinning:b,children:[(0,f.jsxs)(`div`,{className:`admin-config-table-tools`,children:[(0,f.jsx)(u.Input,{allowClear:!0,prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search groups or fields`,value:R,onChange:e=>z(e.target.value)}),(0,f.jsxs)(Q,{type:`secondary`,style:{fontSize:12},children:[o.length,` groups · `,c.length,` fields`]})]}),(0,f.jsx)(u.Table,{rowKey:e=>e.id??e.name,dataSource:re,columns:te,pagination:!1,size:`small`,className:`fg-table`,expandable:{expandedRowRender:ne,rowExpandable:()=>!0},locale:{emptyText:(0,f.jsx)(u.Empty,{description:`Select a module to see its groups and fields.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE})}}),(0,f.jsxs)(`div`,{style:{margin:`20px 0 8px`,display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,f.jsxs)(Q,{strong:!0,children:[(0,f.jsx)(d.MergeCellsOutlined,{}),` Merged Fields`]}),(0,f.jsx)(u.Button,{size:`small`,type:`dashed`,icon:(0,f.jsx)(d.PlusOutlined,{}),disabled:!i,onClick:()=>k({index:null,merge:null}),children:`Add Merge`})]}),(0,f.jsx)(u.Table,{rowKey:`key`,dataSource:v,columns:ie,pagination:!1,size:`small`,className:`fg-table`,locale:{emptyText:(0,f.jsx)(u.Empty,{description:`No merged fields. Combine e.g. 'from' + 'to' into one.`,image:u.Empty.PRESENTED_IMAGE_SIMPLE})}})]})]})}),(0,f.jsx)(lv,{open:!!E,fieldMeta:E,value:E?{...E.lookupDefaults,...g[E.key]??{}}:null,onClose:()=>D(null),onSave:W},E?.key??`field-closed`),(0,f.jsx)(fv,{open:!!O,merge:O?.merge,fieldOptions:H,groupOptions:m,onClose:()=>k(null),onSave:K},O?`merge-${O.index??`new`}`:`merge-closed`),(0,f.jsx)(hv,{open:M,onClose:()=>N(!1)}),(0,f.jsx)(pv,{open:A,module:i,onClose:()=>j(!1)}),(0,f.jsx)(C_,{open:!!P,scope:`detailConfig`,action:P?.action,title:P?.title,description:P?.description,confirmLabel:P?.confirmLabel,danger:P?.danger,onCancel:()=>F(null),onVerified:V})]})}var _v=`/admin/email-templates`,vv=`/email-templates`;function yv(e){return e?.data??e}async function bv({offset:e=0,limit:t=20,search:n=``,module:r=``,action:i=``,active:a}={}){let o=new URLSearchParams({offset:String(e),limit:String(t)});n&&o.set(`search`,n),r&&o.set(`module`,r),i&&o.set(`action`,i),a!==void 0&&o.set(`active`,String(a));let s=yv(await J(E,`${_v}?${o}`))??{};return{items:Array.isArray(s.items)?s.items:[],totalCount:Number(s.totalCount??0)}}async function xv(e){return yv(await J(E,`${_v}/${encodeURIComponent(e)}`))}async function Sv(e){return J(E,_v,{method:`POST`,body:JSON.stringify(e)})}async function Cv(e,t){return J(E,`${_v}/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)})}async function wv(e){return J(E,`${_v}/${encodeURIComponent(e)}`,{method:`DELETE`})}async function Tv({module:e=``,action:t=``}={}){let n=new URLSearchParams;e&&n.set(`module`,e),t&&n.set(`action`,t);let r=yv(await J(E,`${vv}${n.toString()?`?${n}`:``}`));return Array.isArray(r)?r:[]}async function Ev(e){return yv(await J(E,`${vv}/${encodeURIComponent(e)}`))}async function Dv({offset:e=0,limit:t=20,search:n=``}={}){let r=yv(await J(E,`/signature/homePage?${new URLSearchParams({offset:String(e),limit:String(t),sortBy:`new`,searchValue:n})}`))??{},i=Array.isArray(r.data)?r.data.map(e=>({...e,isActive:e.isActive??e.status??!1})):[];return{items:i,totalCount:Number(r.totalCount??i.length)}}async function Ov(e){return yv(await J(E,`/signature/editPreview?signatureId=${encodeURIComponent(e)}`))}async function kv(e){return J(E,`/signature/add`,{method:`POST`,body:JSON.stringify(e)})}async function Av(e){return J(E,`/signature/edit`,{method:`PUT`,body:JSON.stringify(e)})}async function jv(e){return J(E,`/signature/delete?signatureId=${encodeURIComponent(e)}`,{method:`DELETE`})}async function Mv(e,t){return J(E,`/signature/statusUpdate?signatureId=${encodeURIComponent(e)}&status=${t}`,{method:`PUT`})}var Nv={reset:{action:`reset`,title:`Reset all row actions`,confirmLabel:`Reset All`,danger:!0,description:`This clears every configured row action for every module in this workspace. Actions have no built-in defaults, so this leaves every module with no actions until reconfigured.`},save:{action:`save`,title:`Save current as default`,confirmLabel:`Save Default`,danger:!1,description:`Snapshots the current row actions for all modules and roles as the saved default you can restore to later.`},restore:{action:`restore`,title:`Restore saved default`,confirmLabel:`Restore Default`,danger:!0,description:`Replaces the current row actions for all modules and roles with the last saved default.`}},{Text:Pv}=u.Typography,Fv=[{value:`delete`,label:`delete (trash)`},{value:`edit`,label:`edit (pencil)`},{value:`mail`,label:`mail (envelope)`},{value:`shareAlt`,label:`shareAlt (share)`},{value:`swap`,label:`swap (arrows)`},{value:`thunderbolt`,label:`thunderbolt (lightning)`},{value:`userAdd`,label:`userAdd (add user)`},{value:`userSwitch`,label:`userSwitch (switch user)`}],Iv=[{value:`navigate`,label:`Navigate (open page)`},{value:`modal`,label:`Modal (open popup)`},{value:`api`,label:`API (call endpoint)`},{value:`copy`,label:`Copy (clipboard)`},{value:`document`,label:`Document (open viewer)`},{value:`group`,label:`Group (submenu of child actions)`}],Lv=[`GET`,`POST`,`PUT`,`DELETE`],Rv=[`quick-submit`,`add-notes`,`mail`,`change-status`,`tag-to-job`,`add-to-groups`,`self-assign`,`others-assign`,`delete`,`vendor-share`,`sticky-notes`,`move-to-onboarding`,`approve-rate`,`reject`],zv={key:``,label:``,icon:``,actionType:`navigate`,routeTemplate:``,apiMethod:`POST`,apiPath:``,popupKey:``,popupStateText:``,copyField:``,documentField:``,allowedTabs:[],permission:``,permissionKey:``,allowMultiple:!1,danger:!1,showInList:!0,showInDetail:!1,detailPlacement:`more`};function Bv(){return`action_${Date.now()}`}function Vv({open:e,initial:t,isChild:n,popupForms:r,templateOptions:i,onClose:a,onSave:o}){let[s]=u.Form.useForm(),c=u.Form.useWatch(`actionType`,s)??`navigate`,p=u.Form.useWatch(`showInDetail`,s)??!1,m=u.Form.useWatch(`popupKey`,s)??``;(0,l.useEffect)(()=>{e&&s.setFieldsValue({...zv,...t,popupStateText:t?.popupState?JSON.stringify(t.popupState,null,2):``})},[e,t,s]);let h=async()=>{let e=await s.validateFields(),t;if(e.popupStateText?.trim())try{t=JSON.parse(e.popupStateText)}catch{s.setFields([{name:`popupStateText`,errors:[`Enter valid JSON`]}]);return}let n={...e};delete n.popupStateText,(n.actionType!==`modal`||![`mail`,`vendor-share`].includes(n.popupKey))&&delete n.defaultTemplateId,o({...n,...t?{popupState:t}:{popupState:void 0}})},g=[...Rv.map(e=>({value:e,label:`${e} (built-in)`})),...r.map(e=>({value:e.action,label:`${e.label} (${e.action})`}))].filter((e,t,n)=>n.findIndex(t=>t.value===e.value)===t);return(0,f.jsx)(u.Modal,{title:`${t?.key?`Edit`:`Add`}${n?` Child`:``} Action`,width:720,open:e,onCancel:a,onOk:h,okText:`Save Action`,okButtonProps:{icon:(0,f.jsx)(d.SaveOutlined,{})},className:`fg-editor-modal action-editor-modal`,children:(0,f.jsxs)(u.Form,{form:s,layout:`vertical`,initialValues:zv,className:`action-editor-form`,children:[(0,f.jsx)(`div`,{className:`action-editor-intro`,children:`Choose what the action does, then decide where it appears and who can use it.`}),(0,f.jsxs)(`div`,{className:`action-editor-grid`,children:[(0,f.jsx)(u.Form.Item,{name:`key`,label:`Key`,rules:[{required:!0,message:`Key is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. sourceCandidates`})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Label`,rules:[{required:!0,message:`Label is required`}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. Source Candidates`})}),(0,f.jsx)(u.Form.Item,{name:`icon`,label:`Icon`,rules:[{required:!1,message:`Icon is required`}],children:(0,f.jsx)(u.Select,{options:Fv,placeholder:`Select icon`,allowClear:!0})}),(0,f.jsx)(u.Form.Item,{name:`actionType`,label:`Action Type`,rules:[{required:!0}],children:(0,f.jsx)(u.Select,{options:Iv})})]}),c===`group`&&(0,f.jsx)(u.Alert,{type:`info`,showIcon:!0,message:`Group actions don't run anything themselves.`,description:`This action renders as a submenu. Save it, then use "Add Child Action" on its row to configure what appears inside (e.g. Tag To Job, Send Mail, Add Notes).`,style:{marginBottom:16}}),c!==`group`&&(0,f.jsx)(`div`,{className:`action-editor-section-title`,children:`Behaviour`}),c===`navigate`&&(0,f.jsx)(u.Form.Item,{name:`routeTemplate`,label:`Route Template`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. /app/jobs/edit/:_id`})}),c===`modal`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Form.Item,{name:`popupKey`,label:`Popup`,rules:[{required:!0,message:`Select a popup`}],tooltip:`Admin popup forms and built-in popup integrations are listed together.`,children:(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,options:g,placeholder:`Select popup form`})}),(0,f.jsx)(u.Form.Item,{name:`popupStateText`,label:`Popup Context (JSON, optional)`,tooltip:`Static context passed to the popup, for example {"notesfor":"candidate"}`,children:(0,f.jsx)(u.Input.TextArea,{rows:4,placeholder:`{"notesfor":"candidate"}`})}),(0,f.jsxs)(u.Space.Compact,{block:!0,children:[(0,f.jsx)(u.Form.Item,{name:`apiMethod`,label:`Submit Method`,style:{width:150},children:(0,f.jsx)(u.Select,{options:Lv.map(e=>({value:e,label:e}))})}),(0,f.jsx)(u.Form.Item,{name:`apiPath`,label:`Submit API (optional)`,style:{flex:1},tooltip:`Leave empty to use the built-in handler for the selected popup key.`,children:(0,f.jsx)(u.Input,{placeholder:`e.g. /module-data-update`})})]})]}),c===`modal`&&[`mail`,`vendor-share`].includes(m)&&(0,f.jsx)(u.Form.Item,{name:`defaultTemplateId`,label:`Default Email Template`,tooltip:`This template is selected and loaded automatically whenever this action opens the mail composer.`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,options:i,placeholder:`No default — user selects in composer`})}),c===`api`&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Form.Item,{name:`apiMethod`,label:`API Method`,children:(0,f.jsx)(u.Select,{options:Lv.map(e=>({value:e,label:e}))})}),(0,f.jsx)(u.Form.Item,{name:`apiPath`,label:`API Path`,children:(0,f.jsx)(u.Input,{placeholder:`e.g. /jobs/:_id`})})]}),c===`copy`&&(0,f.jsx)(u.Form.Item,{name:`copyField`,label:`Record Field to Copy`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. email or applicantRefrenceId`})}),c===`document`&&(0,f.jsx)(u.Form.Item,{name:`documentField`,label:`Document Field`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`e.g. resume or attachment`})}),(0,f.jsx)(`div`,{className:`action-editor-section-title`,children:`Availability and access`}),(0,f.jsx)(u.Form.Item,{name:`allowedTabs`,label:`Allowed Tabs (optional)`,tooltip:`Leave empty to show on every tab.`,children:(0,f.jsx)(u.Select,{mode:`tags`,tokenSeparators:[`,`],placeholder:`e.g. allJobs`})}),(0,f.jsx)(u.Form.Item,{name:`permission`,label:`Role Permission (optional)`,children:(0,f.jsx)(u.Input,{placeholder:`e.g. job.edit`})}),(0,f.jsx)(u.Form.Item,{name:`permissionKey`,label:`Permission Key (row-level gate)`,tooltip:`Maps to record.actionPermission.<key>. Leave blank to always show.`,children:(0,f.jsx)(u.Input,{placeholder:`e.g. edit, sourceCandidates, sharePermission`})}),(0,f.jsxs)(`div`,{className:`action-toggle-grid`,children:[(0,f.jsx)(u.Form.Item,{name:`allowMultiple`,label:`Multiple Records`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})}),(0,f.jsx)(u.Form.Item,{name:`danger`,label:`Danger`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})}),(0,f.jsx)(u.Form.Item,{name:`showInList`,label:`Show in List`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})}),(0,f.jsx)(u.Form.Item,{name:`showInDetail`,label:`Show in Detail`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})})]}),p&&(0,f.jsx)(u.Form.Item,{name:`detailPlacement`,label:`Detail Placement`,children:(0,f.jsx)(u.Select,{options:[{value:`primary`,label:`Primary button`},{value:`more`,label:`More actions menu`}]})})]})})}function Hv(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)(0),[c,p]=(0,l.useState)([]),[m,h]=(0,l.useState)(null),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)(!1),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)(!1),[w,T]=(0,l.useState)(null),[E,D]=(0,l.useState)(!1),[O,k]=(0,l.useState)(null),[A,j]=(0,l.useState)([]),[M,N]=(0,l.useState)([]),[P,F]=(0,l.useState)(null),[I,L]=(0,l.useState)(``);(0,l.useEffect)(()=>{Promise.all([Tn(),Qn()]).then(([e,{roles:n}])=>{let i=Array.isArray(e)?e.map(e=>e.module??e.key??e.value??e):[],o=[...new Set(i.filter(Boolean))];t(o),a(e=>e||o[0]||``),r(n??[])}).catch(()=>{t([])})},[]);let R=(0,l.useCallback)(async()=>{if(i){x(!0),T(null),p([]);try{p(await Rr(i))}catch(e){T(e.message)}finally{x(!1)}}},[i]);(0,l.useEffect)(()=>{R()},[R]),(0,l.useEffect)(()=>{Promise.all([Nr(i,`popup`).catch(()=>[]),Tv({module:i}).catch(()=>[])]).then(([e,t])=>{j(e),N(t.map(e=>({value:e._id??e.id,label:`${e.name} · ${e.action}`})))})},[i]),(0,l.useEffect)(()=>{let e=c.find(e=>e.roleId===o);h(e??null),_(e?e.rowActions??[]:[]),y(!1)},[o,c]);let z=async()=>{C(!0);try{if(m)await Br(m.id??m._id,g),p(e=>e.map(e=>(e.id??e._id)===(m.id??m._id)?{...e,rowActions:g}:e)),u.message.success(`Config saved`);else{let e=await zr({module:i,roleId:o,rowActions:g}),t=e?.data??e;h(t),p(e=>[...e,t]),u.message.success(`Config created`)}y(!1)}catch(e){u.message.error(e.message)}finally{C(!1)}},B=async()=>{if(m)try{await Vr(m.id??m._id),u.message.success(`Config deleted`),await R()}catch(e){u.message.error(e.message)}},[V,H]=(0,l.useState)(null),U=(e=null)=>{H(e),k(null),D(!0)},W=(e,t=null)=>{H(t),k(e),D(!0)},G=e=>{_(V?t=>t.map(t=>{if(t.key!==V)return t;let n=t.children??[],r=O?n.map(t=>t.key===O.key?{...t,...e}:t):[...n,{...zv,...e,_localKey:Bv()}];return{...t,children:r}}):O?t=>t.map(t=>t.key===O.key?{...t,...e}:t):t=>[...t,{...zv,...e,_localKey:Bv()}]),y(!0),D(!1)},K=(e,t=null)=>{_(t?n=>n.map(n=>n.key===t?{...n,children:(n.children??[]).filter(t=>t.key!==e)}:n):t=>t.filter(t=>t.key!==e)),y(!0)},q=(e,t)=>{_(n=>{let r=[...n],i=e+t;return i<0||i>=r.length?n:([r[e],r[i]]=[r[i],r[e]],r)}),y(!0)};function ee(e){F(Nv[e])}function te(){F(null),R()}let ne=(0,l.useMemo)(()=>[{value:0,label:`All Roles (default)`},...n.map(e=>({value:e.roleId,label:e.roleName}))],[n]),re=(0,l.useMemo)(()=>{let e=I.trim().toLowerCase();return e?g.filter(t=>[t.label,t.key,t.actionType,t.popupKey,t.routeTemplate,t.apiPath,t.permissionKey].some(t=>String(t??``).toLowerCase().includes(e))):g},[g,I]),ie=[{title:`Order`,key:`order`,width:76,render:(e,t)=>(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{size:`small`,type:`text`,disabled:t._actionIndex===0,onClick:()=>q(t._actionIndex,-1),children:`↑`}),(0,f.jsx)(u.Button,{size:`small`,type:`text`,disabled:t._actionIndex===g.length-1,onClick:()=>q(t._actionIndex,1),children:`↓`})]})},{title:`Action`,key:`identity`,width:210,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(Pv,{strong:!0,children:t.label||t.key}),(0,f.jsx)(Pv,{type:`secondary`,code:!0,children:t.key})]})},{title:`Behaviour`,key:`destination`,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(u.Tag,{color:`blue`,children:t.actionType}),(0,f.jsx)(Pv,{type:`secondary`,ellipsis:{tooltip:!0},children:t.actionType===`group`?`${(t.children??[]).length} child action${(t.children??[]).length===1?``:`s`}`:t.popupKey||t.routeTemplate||t.apiPath||t.copyField||t.documentField||`No destination`})]})},{title:`Visible in`,key:`visibility`,width:210,render:(e,t)=>(0,f.jsxs)(u.Space,{size:[4,4],wrap:!0,children:[t.showInList&&(0,f.jsx)(u.Tag,{color:`green`,children:`List`}),(t.showInDetail??t.showInList)&&(0,f.jsxs)(u.Tag,{color:`purple`,children:[`Detail · `,t.detailPlacement||`more`]}),t.allowMultiple&&(0,f.jsx)(u.Tag,{children:`Multi-select`}),t.danger&&(0,f.jsx)(u.Tag,{color:`red`,children:`Destructive`}),!t.showInList&&!(t.showInDetail??t.showInList)&&(0,f.jsx)(Pv,{type:`secondary`,children:`Nowhere`})]})},{title:`Access`,key:`access`,width:170,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(Pv,{type:`secondary`,children:t.permission||`All permitted roles`}),t.permissionKey&&(0,f.jsx)(Pv,{type:`secondary`,code:!0,children:t.permissionKey})]})},{title:``,key:`actions`,width:110,fixed:`right`,render:(e,t)=>(0,f.jsxs)(u.Space,{children:[t.actionType===`group`&&(0,f.jsx)(u.Tooltip,{title:`Add child action`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>U(t.key)})}),(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>W(t)})}),(0,f.jsx)(u.Popconfirm,{title:`Remove this action?`,onConfirm:()=>K(t.key),okText:`Remove`,okType:`danger`,children:(0,f.jsx)(u.Tooltip,{title:`Remove`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})})]})}],ae=e=>[{title:`Action`,key:`identity`,width:210,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(Pv,{strong:!0,children:t.label||t.key}),(0,f.jsx)(Pv,{type:`secondary`,code:!0,children:t.key})]})},{title:`Behaviour`,key:`destination`,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(u.Tag,{color:`blue`,children:t.actionType}),(0,f.jsx)(Pv,{type:`secondary`,ellipsis:{tooltip:!0},children:t.popupKey||t.routeTemplate||t.apiPath||t.copyField||t.documentField||`No destination`})]})},{title:`Access`,key:`access`,width:170,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(Pv,{type:`secondary`,children:t.permission||`All permitted roles`}),t.permissionKey&&(0,f.jsx)(Pv,{type:`secondary`,code:!0,children:t.permissionKey})]})},{title:``,key:`actions`,width:80,fixed:`right`,render:(t,n)=>(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>W(n,e)})}),(0,f.jsx)(u.Popconfirm,{title:`Remove this child action?`,onConfirm:()=>K(n.key,e),okText:`Remove`,okType:`danger`,children:(0,f.jsx)(u.Tooltip,{title:`Remove`,children:(0,f.jsx)(u.Button,{size:`small`,type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})})]})}];return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.ToolOutlined,{}),title:`Actions`,extra:(0,f.jsx)(u.Dropdown,{trigger:[`click`],menu:{items:[{key:`save`,label:`Save current as default`,icon:(0,f.jsx)(d.SaveOutlined,{}),onClick:()=>ee(`save`)},{key:`restore`,label:`Restore saved default`,icon:(0,f.jsx)(d.CloudDownloadOutlined,{}),onClick:()=>ee(`restore`)},{type:`divider`},{key:`reset`,label:`Reset all actions`,icon:(0,f.jsx)(d.ReloadOutlined,{}),danger:!0,onClick:()=>ee(`reset`)}]},children:(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.MoreOutlined,{}),children:`Workspace defaults`})}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(Pv,{type:`secondary`,children:`Build one action once, then control its List and Detail placement, permissions, tabs, and multi-select behaviour.`})]}),(0,f.jsx)(Z,{styles:{body:{padding:`14px 18px`}},children:(0,f.jsxs)(`div`,{className:`admin-config-context`,children:[(0,f.jsxs)(`div`,{className:`admin-config-context-copy`,children:[(0,f.jsx)(Pv,{strong:!0,children:`Configuration context`}),(0,f.jsx)(Pv,{type:`secondary`,children:`Choose a module and role. “All Roles” is the fallback configuration.`})]}),(0,f.jsxs)(`div`,{className:`admin-config-context-controls`,children:[(0,f.jsxs)(`label`,{className:`admin-config-control`,children:[(0,f.jsx)(Pv,{type:`secondary`,style:{display:`block`,marginBottom:4,fontSize:12},children:`Module`}),(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,style:{width:200},value:i,onChange:e=>a(e),options:e.map(e=>({value:e,label:e}))})]}),(0,f.jsxs)(`label`,{className:`admin-config-control`,children:[(0,f.jsx)(Pv,{type:`secondary`,style:{display:`block`,marginBottom:4,fontSize:12},children:`Role`}),(0,f.jsx)(u.Select,{style:{width:220},value:o,onChange:e=>s(e),options:ne})]}),(0,f.jsx)(`div`,{className:`admin-config-reload`,children:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:R,loading:b,children:`Reload`})})]})]})}),w&&(0,f.jsx)(u.Alert,{type:`error`,message:w,showIcon:!0}),(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.ToolOutlined,{}),title:(0,f.jsxs)(u.Space,{wrap:!0,children:[(0,f.jsxs)(`span`,{children:[g.length,` configured action`,g.length===1?``:`s`]}),m?(0,f.jsxs)(u.Tag,{color:`green`,children:[`Config loaded (roleId: `,o,`)`]}):(0,f.jsx)(u.Tag,{color:`orange`,children:`No config — will create on Save`})]}),extra:(0,f.jsxs)(u.Space,{wrap:!0,children:[m&&(0,f.jsx)(u.Popconfirm,{title:`Delete this entire config?`,onConfirm:B,okText:`Delete`,okType:`danger`,children:(0,f.jsx)(u.Button,{danger:!0,size:`small`,icon:(0,f.jsx)(d.DeleteOutlined,{}),children:`Delete Config`})}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:U,children:`New action`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:S,disabled:!v,onClick:z,children:`Save Config`})]}),children:[(0,f.jsxs)(`div`,{className:`admin-config-table-tools`,children:[(0,f.jsx)(u.Input,{allowClear:!0,prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search actions`,value:I,onChange:e=>L(e.target.value)}),v&&(0,f.jsx)(Pv,{type:`warning`,children:`Unsaved changes`})]}),(0,f.jsx)(u.Spin,{spinning:b,children:(0,f.jsx)(u.Table,{dataSource:re.map((e,t)=>({...e,_actionIndex:g.indexOf(e),_rowKey:e.key||e._localKey||t})),rowKey:`_rowKey`,columns:ie,pagination:!1,size:`small`,className:`fg-table admin-config-table`,scroll:{x:820},locale:{emptyText:`No actions configured. Click "Add Action" to start.`},expandable:{rowExpandable:e=>e.actionType===`group`,expandedRowRender:e=>(0,f.jsx)(u.Table,{dataSource:(e.children??[]).map((e,t)=>({...e,_rowKey:e.key||e._localKey||t})),rowKey:`_rowKey`,columns:ae(e.key),pagination:!1,size:`small`,className:`fg-table admin-config-table`,locale:{emptyText:`No child actions yet. Use the + button on this row to add one (e.g. Tag To Job, Send Mail, Add Notes).`}})}})})]}),(0,f.jsx)(Vv,{open:E,initial:O,isChild:!!V,popupForms:A,templateOptions:M,onClose:()=>D(!1),onSave:G}),(0,f.jsx)(C_,{open:!!P,scope:`rowActions`,action:P?.action,title:P?.title,description:P?.description,confirmLabel:P?.confirmLabel,danger:P?.danger,onCancel:()=>F(null),onVerified:te})]})}var{Text:Uv,Title:Wv}=u.Typography,Gv=[{value:`eq`,label:`equals`},{value:`ne`,label:`not equals`},{value:`isEmpty`,label:`is empty`},{value:`notEmpty`,label:`is not empty`},{value:`contains`,label:`contains`},{value:`fieldEq`,label:`field = field`},{value:`scope`,label:`view scope`}],Kv=[{value:`myJobs`,label:`My Jobs`},{value:`allJobs`,label:`All Jobs`}],qv=[`eq`,`ne`,`contains`],Jv=`scope`,Yv=`fieldEq`,Xv=[{name:`Fulfilled jobs — block sourcing`,description:`When a job status is fulfilled and has no recruiters, hide source & quick-submit buttons.`,conditions:[{field:`jobRecruitmentStatus`,operator:`eq`,value:`fulfilled`,compareField:``},{field:`recruiters`,operator:`isEmpty`,value:``,compareField:``}],blockedActions:[`sourceCandidates`,`quickSubmit`],isActive:!0},{name:`All Jobs scope — restrict actions`,description:`When viewing All Jobs, hide sourcing, quick-submit, change-status, notes and share.`,conditions:[{field:``,operator:`scope`,value:`allJobs`,compareField:``}],blockedActions:[`sourceCandidates`,`quickSubmit`,`changeStatus`,`addNotes`,`share`],isActive:!0},{name:`Target submission reached — block sourcing`,description:`When targetSubmission equals submissionCount, no more sourcing is needed.`,conditions:[{field:`targetSubmission`,operator:`fieldEq`,value:``,compareField:`submissionCount`}],blockedActions:[`sourceCandidates`,`quickSubmit`],isActive:!0}],Zv=()=>({field:``,operator:`eq`,value:``,compareField:``}),Qv=()=>({name:``,description:``,conditions:[Zv()],blockedActions:[],isActive:!0});function $v(e){return Gv.find(t=>t.value===e)?.label??e}function ey(e){return e.operator===Jv?`scope = ${e.value}`:e.operator===Yv?`${e.field} = field:${e.compareField}`:[`isEmpty`,`notEmpty`].includes(e.operator)?`${e.field} ${$v(e.operator)}`:`${e.field} ${$v(e.operator)} "${e.value}"`}function ty(e){return String(e||``).replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}function ny(e){if(typeof e==`string`)return{value:e,label:ty(e)};let t=e?.module??e?.key??e?.moduleKey??e?.value??e?.apiModule??e?.name??e?.modulename??e?.menuName;return t?{value:t,label:e?.label??e?.moduleLabel??e?.moduleName??e?.name??e?.modulename??e?.menuName??ty(t)}:null}function ry(e){let t=new Set;return(Array.isArray(e)?e:[]).map(ny).filter(Boolean).filter(e=>t.has(e.value)?!1:(t.add(e.value),!0))}function iy(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)([]),[c,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(Qv()),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)(!1),[w,T]=(0,l.useState)([]),[E,D]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!1;return queueMicrotask(()=>{r(!0),Tn().then(n=>{if(e)return;let r=ry(n);t(r),a(e=>r.some(t=>t.value===e)?e:r[0]?.value??``)}).catch(()=>{e||(t([]),a(``))}).finally(()=>{e||r(!1)})}),()=>{e=!0}},[]);function O(e){p(!0),Ur(e).then(e=>s(Array.isArray(e)?e:[])).catch(()=>s([])).finally(()=>p(!1))}function k(e){Nn(e).then(e=>{T((Array.isArray(e)?e:[]).map(e=>({value:e.field??e.fieldKey??e.key??e.name,label:`${e.label??e.fieldName??e.name} (${e.field??e.fieldKey??e.key??e.name})`})).filter(e=>e.value))}).catch(()=>T([]))}function A(e){Rr(e).then(e=>{let t=new Set;(Array.isArray(e)?e:[]).forEach(e=>{(e.rowActions??[]).forEach(e=>{e.key&&t.add(e.key)})}),D([...t].map(e=>({value:e,label:e})))}).catch(()=>D([]))}(0,l.useEffect)(()=>{queueMicrotask(()=>{if(!i){s([]),T([]),D([]);return}O(i),k(i),A(i)})},[i]);function j(){_(null),y(Qv()),h(!0)}function M(e){_(e),y({name:e.name??``,description:e.description??``,conditions:e.conditions?.length?e.conditions.map(e=>({...e})):[Zv()],blockedActions:e.blockedActions??[],isActive:e.isActive??!0}),h(!0)}async function N(){if(v.name.trim()){x(!0);try{g?await Gr(g.id,v):await Wr({...v,module:i}),h(!1),O(i)}finally{x(!1)}}}async function P(e){await Kr(e.id),O(i)}async function F(){C(!0);try{for(let e of Xv)await Wr({...e,module:i});O(i)}finally{C(!1)}}function I(e,t){y(n=>({...n,conditions:n.conditions.map((n,r)=>r===e?{...n,...t}:n)}))}function L(){y(e=>({...e,conditions:[...e.conditions,Zv()]}))}function R(e){y(t=>({...t,conditions:t.conditions.filter((t,n)=>n!==e)}))}return(0,f.jsxs)(`div`,{style:{padding:`24px 0`},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:8,flexWrap:`wrap`},children:[(0,f.jsx)(Wv,{level:5,style:{margin:0},children:`Action Rules`}),(0,f.jsx)(u.Select,{options:e,value:i,loading:n,placeholder:`Select module`,onChange:a,style:{width:200}}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.PlusOutlined,{}),type:`primary`,disabled:!i,onClick:j,children:`Add Rule`}),(i===`job`||i===`jobs`)&&(0,f.jsx)(u.Tooltip,{title:`Create the 3 standard job rules that replace the hardcoded backend logic`,children:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ThunderboltOutlined,{}),loading:S,onClick:F,children:`Seed Job Defaults`})})]}),(0,f.jsx)(u.Alert,{type:`info`,showIcon:!0,style:{marginBottom:16,fontSize:12},message:(0,f.jsxs)(`span`,{children:[`Rules are evaluated `,(0,f.jsx)(`b`,{children:`per row`}),` in the list view using the record's own field values. When `,(0,f.jsx)(`b`,{children:`all conditions`}),` of a rule match, the listed action buttons are hidden for that row. The `,(0,f.jsx)(`b`,{children:`key`}),` of each blocked action must match what is set in `,(0,f.jsx)(`b`,{children:`Row Actions`}),` config.`]})}),(0,f.jsx)(u.Table,{columns:[{title:`Rule Name`,dataIndex:`name`,key:`name`,width:200,render:(e,t)=>(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Uv,{strong:!0,children:e}),t.description?(0,f.jsx)(`div`,{children:(0,f.jsx)(Uv,{type:`secondary`,style:{fontSize:11},children:t.description})}):null]})},{title:`Conditions (ALL must match)`,key:`conditions`,render:(e,t)=>(0,f.jsx)(u.Space,{size:4,direction:`vertical`,children:(t.conditions??[]).map((e,t)=>(0,f.jsx)(u.Tag,{style:{fontFamily:`monospace`,fontSize:11,margin:0},children:ey(e)},t))})},{title:`Blocked Row Actions`,key:`blockedActions`,render:(e,t)=>(0,f.jsx)(u.Space,{size:4,wrap:!0,children:(t.blockedActions??[]).map(e=>(0,f.jsx)(u.Tag,{color:`volcano`,children:e},e))})},{title:`Active`,dataIndex:`isActive`,key:`isActive`,width:70,render:e=>(0,f.jsx)(u.Tag,{color:e?`green`:`default`,children:e?`On`:`Off`})},{title:``,key:`act`,width:80,render:(e,t)=>(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.EditOutlined,{}),size:`small`,type:`text`,onClick:()=>M(t)})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this rule?`,onConfirm:()=>P(t),children:(0,f.jsx)(u.Tooltip,{title:`Delete`,children:(0,f.jsx)(u.Button,{danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{}),size:`small`,type:`text`})})})]})}],dataSource:o,loading:c,rowKey:`id`,size:`small`,pagination:!1,locale:{emptyText:i?`No rules yet. Click "Add Rule" to get started.`:`No modules found. Configure modules first.`}}),(0,f.jsx)(u.Drawer,{open:m,title:g?`Edit: ${g.name}`:`Add Action Rule`,width:620,onClose:()=>h(!1),footer:(0,f.jsxs)(u.Space,{style:{float:`right`},children:[(0,f.jsx)(u.Button,{onClick:()=>h(!1),children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:b,onClick:N,children:`Save Rule`})]}),children:(0,f.jsxs)(u.Form,{layout:`vertical`,children:[(0,f.jsx)(u.Form.Item,{label:`Rule Name`,required:!0,children:(0,f.jsx)(u.Input,{value:v.name,placeholder:`e.g. Fulfilled jobs — block sourcing`,onChange:e=>y(t=>({...t,name:e.target.value}))})}),(0,f.jsx)(u.Form.Item,{label:`Description`,children:(0,f.jsx)(u.Input.TextArea,{rows:2,value:v.description,placeholder:`Explain when this rule applies`,onChange:e=>y(t=>({...t,description:e.target.value}))})}),(0,f.jsx)(u.Form.Item,{label:`Active`,children:(0,f.jsx)(u.Switch,{checked:v.isActive,onChange:e=>y(t=>({...t,isActive:e}))})}),(0,f.jsxs)(u.Divider,{orientation:`left`,orientationMargin:0,style:{fontSize:13},children:[`Conditions `,(0,f.jsx)(Uv,{type:`secondary`,style:{fontSize:12},children:`(ALL must match for the rule to fire)`})]}),v.conditions.map((e,t)=>(0,f.jsxs)(`div`,{style:{background:`#fafafa`,border:`1px solid #f0f0f0`,borderRadius:6,padding:`10px 12px`,marginBottom:8},children:[(0,f.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,f.jsx)(u.Form.Item,{label:`Operator`,style:{marginBottom:0,minWidth:140},children:(0,f.jsx)(u.Select,{options:Gv,value:e.operator,style:{width:140},onChange:e=>I(t,{operator:e,value:``,compareField:``})})}),e.operator!==Jv&&(0,f.jsxs)(u.Form.Item,{label:`Record Field`,style:{marginBottom:0,flex:1,minWidth:180},children:[(0,f.jsx)(u.Select,{showSearch:!0,allowClear:!0,mode:`tags`,maxCount:1,value:e.field?[e.field]:[],options:w,style:{width:`100%`},placeholder:`Select or type field name`,onChange:e=>I(t,{field:e[e.length-1]??``}),filterOption:(e,t)=>(t?.label??t?.value??``).toLowerCase().includes(e.toLowerCase())}),(0,f.jsxs)(Uv,{type:`secondary`,style:{fontSize:11},children:[`Field from the record (e.g. `,(0,f.jsx)(`code`,{children:`jobRecruitmentStatus`}),`, `,(0,f.jsx)(`code`,{children:`recruiters`}),`)`]})]}),qv.includes(e.operator)&&(0,f.jsx)(u.Form.Item,{label:`Value`,style:{marginBottom:0,minWidth:140},children:(0,f.jsx)(u.Input,{value:e.value,placeholder:`e.g. "fulfilled"`,style:{width:150},onChange:e=>I(t,{value:e.target.value})})}),e.operator===Jv&&(0,f.jsxs)(u.Form.Item,{label:`Scope Value`,style:{marginBottom:0,minWidth:140},children:[(0,f.jsx)(u.Select,{options:Kv,value:e.value||void 0,style:{width:150},placeholder:`Select scope`,onChange:e=>I(t,{value:e})}),(0,f.jsx)(Uv,{type:`secondary`,style:{fontSize:11},children:`Current view tab (myJobs / allJobs)`})]}),e.operator===Yv&&(0,f.jsxs)(u.Form.Item,{label:`Compare To Field`,style:{marginBottom:0,minWidth:160},children:[(0,f.jsx)(u.Select,{showSearch:!0,allowClear:!0,mode:`tags`,maxCount:1,value:e.compareField?[e.compareField]:[],options:w,style:{width:170},placeholder:`Select or type field`,onChange:e=>I(t,{compareField:e[e.length-1]??``}),filterOption:(e,t)=>(t?.label??t?.value??``).toLowerCase().includes(e.toLowerCase())}),(0,f.jsxs)(Uv,{type:`secondary`,style:{fontSize:11},children:[`e.g. `,(0,f.jsx)(`code`,{children:`submissionCount`})]})]}),(0,f.jsx)(`div`,{style:{paddingTop:22},children:(0,f.jsx)(u.Button,{danger:!0,disabled:v.conditions.length<=1,icon:(0,f.jsx)(d.DeleteOutlined,{}),size:`small`,type:`text`,onClick:()=>R(t)})})]}),(0,f.jsx)(`div`,{style:{marginTop:6},children:(0,f.jsxs)(Uv,{type:`secondary`,style:{fontSize:11},children:[`Preview: `,(0,f.jsx)(`code`,{style:{color:`#1677ff`},children:ey(e)})]})})]},t)),(0,f.jsx)(u.Button,{size:`small`,style:{marginBottom:16},onClick:L,children:`+ Add Condition`}),(0,f.jsxs)(u.Divider,{orientation:`left`,orientationMargin:0,style:{fontSize:13},children:[`Blocked Row Actions`,(0,f.jsx)(Uv,{type:`secondary`,style:{fontSize:12,marginLeft:8},children:`(hidden when this rule fires)`})]}),(0,f.jsxs)(u.Form.Item,{children:[(0,f.jsx)(u.Select,{mode:`tags`,style:{width:`100%`},value:v.blockedActions,options:E,placeholder:`Select or type action key (e.g. sourceCandidates, quickSubmit)`,onChange:e=>y(t=>({...t,blockedActions:e})),filterOption:(e,t)=>(t?.value??``).toLowerCase().includes(e.toLowerCase())}),(0,f.jsxs)(Uv,{type:`secondary`,style:{fontSize:11},children:[`Must match the `,(0,f.jsx)(`b`,{children:`key`}),` of a Row Action (configured in Admin → Row Actions). Common job keys: `,(0,f.jsx)(`code`,{children:`sourceCandidates`}),`, `,(0,f.jsx)(`code`,{children:`quickSubmit`}),`,`,` `,(0,f.jsx)(`code`,{children:`changeStatus`}),`, `,(0,f.jsx)(`code`,{children:`share`}),`, `,(0,f.jsx)(`code`,{children:`addNotes`}),`, `,(0,f.jsx)(`code`,{children:`assign`}),`.`]})]})]})})]})}function ay(){return(0,f.jsx)(u.Tabs,{defaultActiveKey:`actions`,className:`admin-config-tabs`,destroyOnHidden:!1,items:[{key:`actions`,label:`Action library`,icon:(0,f.jsx)(d.ThunderboltOutlined,{}),children:(0,f.jsx)(Hv,{})},{key:`rules`,label:`Visibility rules`,icon:(0,f.jsx)(d.ApartmentOutlined,{}),children:(0,f.jsx)(iy,{})}]})}var{Text:oy}=u.Typography,sy={name:``,module:``,action:``,clientId:``,description:``,toMail:[],ccMail:[],bccMail:[],subject:``,body:``,isActive:!0},cy=e=>e?._id??e?.id;function ly(...e){let t=new Set;return e.forEach(e=>{let n=/{{\.([\w.]+)}}/g,r;for(;(r=n.exec(String(e??``)))!==null;)t.add(r[1])}),t}function uy({open:e,templateId:t,modules:n,clients:r,onClose:i,onSaved:a}){let[o]=u.Form.useForm(),[s,c]=(0,l.useState)(``),[d,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)([]);async function b(e){if(!e){_([]),y([]);return}let[t,n]=await Promise.all([Rr(e).catch(()=>[]),Nn(e).catch(()=>[])]),r=new Map;t.forEach(e=>(e.rowActions??[]).forEach(e=>{e.key&&r.set(e.key,e.label||e.key)})),_([...r].map(([e,t])=>({value:e,label:t}))),y(n.map(e=>({key:e.value??e.field??e.fieldKey??e.key??e.name,value:e.path??e.value??e.field??e.fieldKey??e.key??e.name,label:e.label??e.fieldName??e.name??e.value})).filter(e=>e.key))}(0,l.useEffect)(()=>{if(!e)return;let n=!1;return queueMicrotask(()=>{h(!0),(t?xv(t):Promise.resolve(sy)).then(e=>{if(n)return;let t={...sy,...e,clientId:e?.clientIdStr||(typeof e?.clientId==`string`?e.clientId:``)};o.setFieldsValue(t),c(t.body||``),b(t.module)}).catch(e=>u.message.error(e?.message||`Could not load template`)).finally(()=>{n||h(!1)})}),()=>{n=!0}},[o,e,t]);function x(e){let t=`{{.${e.key}}}`;c(e=>`${e}${e?` `:``}${t}`),u.message.success(`Inserted ${t}`)}async function S(){try{let e=await o.validateFields();if(!s.trim()){u.message.error(`Message body is required`);return}p(!0);let n=ly(e.subject,s),r=v.filter(e=>n.has(e.key)).map(e=>({key:e.key,value:e.value})),i={...e,action:Array.isArray(e.action)?e.action.at(-1):e.action,body:s,placeholders:r.length?[{moduleName:e.module,holders:r}]:[]};i.clientId||delete i.clientId,t?await Cv(t,i):await Sv(i),u.message.success(t?`Template updated`:`Template created`),a()}catch(e){e?.errorFields||u.message.error(e?.message||`Could not save template`)}finally{p(!1)}}return(0,f.jsx)(u.Drawer,{open:e,onClose:i,width:`min(920px, 96vw)`,title:t?`Edit email template`:`New email template`,destroyOnClose:!0,extra:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{onClick:i,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:d,onClick:S,children:t?`Update`:`Create`})]}),children:(0,f.jsxs)(u.Form,{form:o,layout:`vertical`,initialValues:sy,disabled:m,className:`template-editor-form`,children:[(0,f.jsxs)(`div`,{className:`template-editor-grid`,children:[(0,f.jsx)(u.Form.Item,{name:`name`,label:`Template name`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`Candidate introduction`})}),(0,f.jsx)(u.Form.Item,{name:`module`,label:`Module`,rules:[{required:!0}],children:(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,options:n,onChange:e=>{o.setFieldValue(`action`,``),b(e)}})}),(0,f.jsx)(u.Form.Item,{name:`action`,label:`Action`,rules:[{required:!0}],tooltip:`Actions come from this module's DB-configured Row Actions.`,children:(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,options:g,placeholder:`Select configured action`})}),(0,f.jsx)(u.Form.Item,{name:`clientId`,label:`Client scope (optional)`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,options:r,placeholder:`Available to every client`})})]}),(0,f.jsx)(u.Form.Item,{name:`description`,label:`Description`,children:(0,f.jsx)(u.Input.TextArea,{rows:2})}),(0,f.jsxs)(`div`,{className:`template-editor-grid template-editor-grid--three`,children:[(0,f.jsx)(u.Form.Item,{name:`toMail`,label:`Default To`,children:(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`]})}),(0,f.jsx)(u.Form.Item,{name:`ccMail`,label:`Default Cc`,children:(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`]})}),(0,f.jsx)(u.Form.Item,{name:`bccMail`,label:`Default Bcc`,children:(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`]})})]}),(0,f.jsx)(u.Form.Item,{name:`subject`,label:`Subject`,rules:[{required:!0}],children:(0,f.jsx)(u.Input,{placeholder:`Email subject`})}),(0,f.jsx)(u.Form.Item,{label:`Message`,required:!0,children:(0,f.jsx)(wt,{value:s,onChange:c,placeholder:`Write the reusable email body…`})}),(0,f.jsxs)(`div`,{className:`template-placeholder-panel`,children:[(0,f.jsx)(oy,{strong:!0,children:`Module placeholders`}),(0,f.jsx)(oy,{type:`secondary`,children:`Click to append a DB field token to the message.`}),(0,f.jsxs)(`div`,{className:`template-placeholder-list`,children:[v.map(e=>(0,f.jsx)(u.Tag,{color:`blue`,onClick:()=>x(e),children:`{{.${e.key}}}`},e.key)),!v.length&&(0,f.jsx)(u.Empty,{image:u.Empty.PRESENTED_IMAGE_SIMPLE,description:`No module fields available`})]})]}),(0,f.jsx)(u.Form.Item,{name:`isActive`,label:`Available in mail composer`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})})]})})}function dy(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(0),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(``),[c,p]=(0,l.useState)(1),[m,h]=(0,l.useState)(20),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)([]),[b,x]=(0,l.useState)(null),[S,C]=(0,l.useState)(!1),w=(0,l.useMemo)(()=>g.map(e=>({value:e.key??e.module??e.value,label:e.label??e.name??e.key??e.module??e.value})).filter(e=>e.value),[g]);function T(e=c,n=m,i=o){a(!0),bv({offset:(e-1)*n,limit:n,search:i}).then(({items:e,totalCount:n})=>{t(e),r(n)}).catch(e=>u.message.error(e?.message||`Could not load templates`)).finally(()=>a(!1))}(0,l.useEffect)(()=>{queueMicrotask(()=>{T(1,m,``)})},[]),(0,l.useEffect)(()=>{Promise.all([Tn(),Mn({limit:200})]).then(([e,t])=>{_(e),y(t)}).catch(()=>{})},[]);async function E(e,n){let r=cy(e);try{await Cv(r,{...e,isActive:n}),t(e=>e.map(e=>cy(e)===r?{...e,isActive:n}:e))}catch(e){u.message.error(e?.message||`Could not update status`)}}async function D(e){try{await wv(e),u.message.success(`Template deleted`),T(1),p(1)}catch(e){u.message.error(e?.message||`Could not delete template`)}}let O=[{title:`Template`,key:`template`,width:300,ellipsis:!0,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell templates-primary-cell`,children:[(0,f.jsx)(oy,{strong:!0,ellipsis:{tooltip:t.name},children:t.name}),(0,f.jsx)(oy,{type:`secondary`,ellipsis:{tooltip:t.description||t.subject},children:t.description||t.subject||`No description`})]})},{title:`Module`,dataIndex:`module`,key:`module`,width:140,ellipsis:!0,responsive:[`sm`],render:e=>e?(0,f.jsx)(u.Tag,{color:`blue`,children:e}):`—`},{title:`Action`,dataIndex:`action`,key:`action`,width:180,ellipsis:!0,responsive:[`md`],render:e=>e?(0,f.jsx)(oy,{code:!0,ellipsis:{tooltip:e},children:e}):`—`},{title:`Recipients`,key:`recipients`,width:130,responsive:[`lg`],render:(e,t)=>`${(t.toMail?.length??0)+(t.ccMail?.length??0)+(t.bccMail?.length??0)} defaults`},{title:`Active`,dataIndex:`isActive`,key:`active`,width:80,render:(e,t)=>(0,f.jsx)(u.Switch,{size:`small`,checked:e,onChange:e=>E(t,e)})},{title:``,key:`actions`,width:84,fixed:`right`,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{x(cy(t)),C(!0)}})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this template?`,onConfirm:()=>D(cy(t)),children:(0,f.jsx)(u.Button,{type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})]})}],k=v.map(e=>({value:e._id??e.id,label:e.clientName??e.name??e._id})).filter(e=>e.value);return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.MailOutlined,{}),title:`Email templates`,extra:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{x(null),C(!0)},children:`New template`}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(oy,{type:`secondary`,children:`Create reusable, module-aware email content. Modules, actions and placeholders are read from DB configuration.`})]}),(0,f.jsxs)(Z,{title:`${n} template${n===1?``:`s`}`,extra:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:()=>T(),children:`Reload`}),children:[(0,f.jsx)(`div`,{className:`admin-config-table-tools`,children:(0,f.jsx)(u.Input,{allowClear:!0,prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search templates`,value:o,onChange:e=>{let t=e.target.value;s(t),p(1),T(1,m,t)}})}),(0,f.jsx)(`div`,{className:`templates-table-viewport`,children:(0,f.jsx)(u.Table,{rowKey:cy,columns:O,dataSource:e,loading:i,className:`fg-table`,size:`small`,tableLayout:`fixed`,sticky:!0,scroll:{x:914,y:`calc(100vh - 410px)`},pagination:{current:c,pageSize:m,total:n,showSizeChanger:!0,responsive:!0,onChange:(e,t)=>{p(e),h(t),T(e,t)}}})})]}),(0,f.jsx)(uy,{open:S,templateId:b,modules:w,clients:k,onClose:()=>C(!1),onSaved:()=>{C(!1),T()}})]})}function fy({open:e,signatureId:t,onClose:n,onSaved:r}){let[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)(``),[c,d]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&queueMicrotask(()=>{if(!t){a(``),s(``);return}Ov(t).then(e=>{a(e?.signatureName??``),s(e?.signature??``)}).catch(()=>u.message.error(`Could not load signature`))})},[e,t]);async function p(){if(!i.trim())return u.message.error(`Signature name is required`);if(!o.trim())return u.message.error(`Signature content is required`);d(!0);try{let e={signatureId:t,signatureName:i,signature:o,signatureLogoPath:``,placeHolder:[]};t?await Av(e):await kv(e),u.message.success(t?`Signature updated`:`Signature created`),r()}catch(e){u.message.error(e?.message||`Could not save signature`)}finally{d(!1)}}return(0,f.jsx)(u.Drawer,{open:e,onClose:n,width:`min(760px, 96vw)`,title:t?`Edit signature`:`New signature`,destroyOnClose:!0,extra:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{onClick:n,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:c,onClick:p,children:t?`Update`:`Create`})]}),children:(0,f.jsxs)(u.Form,{layout:`vertical`,children:[(0,f.jsx)(u.Form.Item,{label:`Signature name`,required:!0,children:(0,f.jsx)(u.Input,{value:i,onChange:e=>a(e.target.value)})}),(0,f.jsx)(u.Form.Item,{label:`Signature content`,required:!0,children:(0,f.jsx)(wt,{value:o,onChange:s,placeholder:`Create the reusable signature…`})})]})})}function py(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(0),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(``),[c,p]=(0,l.useState)(1),[m,h]=(0,l.useState)(20),[g,_]=(0,l.useState)(!1),[v,y]=(0,l.useState)(null);function b(e=c,n=m,i=o){a(!0),Dv({offset:(e-1)*n,limit:n,search:i}).then(({items:e,totalCount:n})=>{t(e),r(n)}).catch(()=>u.message.error(`Could not load signatures`)).finally(()=>a(!1))}(0,l.useEffect)(()=>{queueMicrotask(()=>{b(1,m,``)})},[]);async function x(e,n){try{await Mv(e.signatureId,n),t(t=>t.map(t=>t.signatureId===e.signatureId?{...t,isActive:n}:t))}catch{u.message.error(`Could not update status`)}}async function S(e){try{await jv(e),u.message.success(`Signature deleted`),p(1),b(1)}catch{u.message.error(`Could not delete signature`)}}return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsx)(Z,{icon:(0,f.jsx)(d.MailOutlined,{}),title:`Signature templates`,extra:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{y(null),_(!0)},children:`New signature`}),children:(0,f.jsx)(oy,{type:`secondary`,children:`Existing company and user signatures from the shared DB.`})}),(0,f.jsxs)(Z,{title:`${n} signature${n===1?``:`s`}`,children:[(0,f.jsx)(`div`,{className:`admin-config-table-tools`,children:(0,f.jsx)(u.Input,{allowClear:!0,prefix:(0,f.jsx)(d.SearchOutlined,{}),value:o,placeholder:`Search signatures`,onChange:e=>{s(e.target.value),p(1),b(1,m,e.target.value)}})}),(0,f.jsx)(`div`,{className:`templates-table-viewport`,children:(0,f.jsx)(u.Table,{rowKey:`signatureId`,dataSource:e,columns:[{title:`Signature`,dataIndex:`templateName`,key:`name`,width:300,ellipsis:!0,render:e=>(0,f.jsx)(oy,{strong:!0,ellipsis:{tooltip:e},children:e||`Untitled signature`})},{title:`Created`,dataIndex:`createdDt`,key:`created`,width:150,responsive:[`md`],render:e=>e?new Date(e).toLocaleDateString():`—`},{title:`Active`,dataIndex:`isActive`,key:`active`,width:80,render:(e,t)=>(0,f.jsx)(u.Switch,{size:`small`,checked:e,onChange:e=>x(t,e)})},{title:``,key:`actions`,width:84,fixed:`right`,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{y(t.signatureId),_(!0)}}),(0,f.jsx)(u.Popconfirm,{title:`Delete this signature?`,onConfirm:()=>S(t.signatureId),children:(0,f.jsx)(u.Button,{type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})]})}],loading:i,className:`fg-table`,size:`small`,tableLayout:`fixed`,sticky:!0,scroll:{x:614,y:`calc(100vh - 410px)`},pagination:{current:c,pageSize:m,total:n,responsive:!0,onChange:(e,t)=>{p(e),h(t),b(e,t)}}})})]}),(0,f.jsx)(fy,{open:g,signatureId:v,onClose:()=>_(!1),onSaved:()=>{_(!1),b()}})]})}function my(){return(0,f.jsx)(u.Tabs,{defaultActiveKey:`email`,className:`admin-config-tabs`,items:[{key:`email`,label:`Email templates`,children:(0,f.jsx)(dy,{})},{key:`signature`,label:`Signatures`,children:(0,f.jsx)(py,{})}]})}var{Text:hy}=u.Typography,gy={serviceKey:``,label:``,baseUrl:``,authHeader:``,authValue:``,enabled:!0};function _y({open:e,service:t,onClose:n,onSaved:r}){let[i]=u.Form.useForm(),[a,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&i.setFieldsValue({...gy,...t,authValue:``})},[e,t,i]);async function s(){try{let e=await i.validateFields();o(!0),await qn(e),u.message.success(`AI service saved`),r()}catch(e){e?.errorFields||u.message.error(e?.message||`Could not save AI service`)}finally{o(!1)}}return(0,f.jsx)(u.Drawer,{open:e,onClose:n,width:`min(560px, 96vw)`,title:t?`Edit AI service`:`New AI service`,destroyOnClose:!0,extra:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{onClick:n,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:a,onClick:s,children:`Save`})]}),children:(0,f.jsxs)(u.Form,{form:i,layout:`vertical`,initialValues:gy,children:[(0,f.jsx)(u.Form.Item,{name:`serviceKey`,label:`Service Key`,rules:[{required:!0,message:`Service key is required`}],tooltip:`Referenced by an AI Action's Service Key on any form field (e.g. pyOps).`,children:(0,f.jsx)(u.Input,{placeholder:`pyOps`,disabled:!!t,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:`label`,label:`Label`,children:(0,f.jsx)(u.Input,{placeholder:`Resume/JD Parsing Service`})}),(0,f.jsx)(u.Form.Item,{name:`baseUrl`,label:`Base URL`,rules:[{required:!0,message:`Base URL is required`}],children:(0,f.jsx)(u.Input,{placeholder:`https://ai.example.com`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:`authHeader`,label:`Auth Header (optional)`,children:(0,f.jsx)(u.Input,{placeholder:`x-api-key`,className:`fg-mono-input`})}),(0,f.jsx)(u.Form.Item,{name:`authValue`,label:`Auth Value`,tooltip:`Write-only — leave blank to keep the currently saved value.`,children:(0,f.jsx)(u.Input.Password,{placeholder:t?`Unchanged`:``})}),(0,f.jsx)(u.Form.Item,{name:`enabled`,label:`Enabled`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{})})]})})}function vy(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(null);function c(){r(!0),Kn().then(e=>t(Array.isArray(e)?e:[])).catch(e=>u.message.error(e?.message||`Could not load AI services`)).finally(()=>r(!1))}(0,l.useEffect)(()=>{queueMicrotask(()=>{c()})},[]);async function p(e,n){try{await qn({...e,enabled:n}),t(t=>t.map(t=>t.serviceKey===e.serviceKey?{...t,enabled:n}:t))}catch(e){u.message.error(e?.message||`Could not update AI service`)}}async function m(e){try{await Jn(e),u.message.success(`AI service deleted`),c()}catch(e){u.message.error(e?.message||`Could not delete AI service`)}}return(0,f.jsxs)(`div`,{className:`fg-section admin-config-section`,children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.ThunderboltOutlined,{}),title:`AI Services`,extra:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>{s(null),a(!0)},children:`New service`}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(hy,{type:`secondary`,children:`Register the AI/automation backends that admin-configured "AI Actions" (Generate/Parse-style buttons on any form field) call. A field's AI Action names a Service Key here — no URL is ever hardcoded in the app.`})]}),(0,f.jsx)(Z,{title:`${e.length} service${e.length===1?``:`s`}`,extra:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:c,children:`Reload`}),children:(0,f.jsx)(u.Table,{rowKey:`serviceKey`,columns:[{title:`Service`,key:`service`,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-config-primary-cell`,children:[(0,f.jsx)(hy,{strong:!0,children:t.label||t.serviceKey}),(0,f.jsx)(hy,{type:`secondary`,code:!0,children:t.serviceKey})]})},{title:`Base URL`,dataIndex:`baseUrl`,key:`baseUrl`,ellipsis:!0,render:e=>(0,f.jsx)(hy,{code:!0,ellipsis:{tooltip:e},children:e})},{title:`Auth Header`,dataIndex:`authHeader`,key:`authHeader`,width:140,render:e=>e||`—`},{title:`Enabled`,dataIndex:`enabled`,key:`enabled`,width:90,render:(e,t)=>(0,f.jsx)(u.Switch,{size:`small`,checked:e,onChange:e=>p(t,e)})},{title:``,key:`actions`,width:84,fixed:`right`,render:(e,t)=>(0,f.jsxs)(u.Space,{size:2,children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{s(t),a(!0)}})}),(0,f.jsx)(u.Popconfirm,{title:`Delete this AI service?`,onConfirm:()=>m(t.serviceKey),children:(0,f.jsx)(u.Button,{type:`text`,danger:!0,icon:(0,f.jsx)(d.DeleteOutlined,{})})})]})}],dataSource:e,loading:n,className:`fg-table`,size:`small`})}),(0,f.jsx)(_y,{open:i,service:o,onClose:()=>a(!1),onSaved:()=>{a(!1),c()}})]})}var{Content:yy,Header:by,Sider:xy}=u.Layout,{Text:Sy,Title:Cy}=u.Typography;function wy(e){return String(e??``).trim().replace(/[\s_-]+/g,` `).toUpperCase()}function Ty(e){let t=e?.user_type_id??e?.userTypeId??e?.id,n=e?.user_type_name??e?.userTypeName??e?.name;return Number(t)===1||wy(n)===`SUPER ADMIN`}function Ey(e){return e.flatMap(e=>{let t=e.menu_id??e.menuId??e.MenuID,n=e.menu_name??e.menuName??e.MenuName??`Menu ${t??``}`,r=e.menu_key??e.menuKey??e.MenuKey??``,i=e.permissions??e.Permissions??{};return Object.entries(i).map(([e,i])=>{let a=i.permission_id??i.permissionId??i.PermissionID,o=i.permission_key??i.permissionKey??i.PermissionKey??e,s=i.value??i.Value??i.access_value??i.accessValue??i;return{key:`${t}-${a??o}`,menuId:t,menuName:n,menuKey:r,permissionId:a,permissionKey:o,accessValue:+(Number(s)===1)}})})}function Dy({title:e,description:t,selectedName:n,loading:r,saving:i,rows:a,onChange:o,onSave:s}){return(0,f.jsxs)(`section`,{className:`admin-editor`,children:[(0,f.jsxs)(`div`,{className:`admin-section-head`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:e}),(0,f.jsx)(Sy,{type:`secondary`,children:n||t})]}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:i,disabled:!n||a.length===0,onClick:s,children:`Save`})]}),r?(0,f.jsx)(`div`,{className:`admin-loading`,children:(0,f.jsx)(u.Spin,{})}):a.length?(0,f.jsx)(u.Table,{size:`small`,rowKey:`key`,columns:[{title:`Menu`,dataIndex:`menuName`,width:220,render:(e,t)=>(0,f.jsxs)(`div`,{className:`admin-menu-cell`,children:[(0,f.jsx)(`span`,{children:e}),(0,f.jsx)(Sy,{type:`secondary`,children:t.menuKey})]})},{title:`Permission`,dataIndex:`permissionKey`,width:160,render:e=>(0,f.jsx)(u.Tag,{children:e})},{title:`Access`,dataIndex:`accessValue`,width:140,render:(e,t)=>(0,f.jsx)(u.Segmented,{size:`small`,value:e,options:[{label:`Off`,value:0},{label:`On`,value:1}],onChange:e=>o(t.key,e)})}],dataSource:a,pagination:!1,scroll:{y:420}}):(0,f.jsx)(u.Empty,{description:`Select a record to customize permissions`})]})}function Oy({onLogout:e}){let[t]=u.Form.useForm(),[n,r]=(0,l.useState)(`users`),[i,a]=(0,l.useState)(!0),[o,s]=(0,l.useState)(!1),[c,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)([]),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)(null),[b,x]=(0,l.useState)([]),[S,C]=(0,l.useState)(!1),[w,T]=(0,l.useState)(null),[E,D]=(0,l.useState)(!1),[O,k]=(0,l.useState)(null),A=te();async function j(){a(!0);try{let[e,t]=await Promise.allSettled([Tg(),kg()]),n=e.status===`fulfilled`?e.value:[],r=t.status===`fulfilled`?t.value:[];e.status===`rejected`&&u.message.error(e.reason?.message||`Unable to load users`),t.status===`rejected`&&u.message.error(t.reason?.message||`Unable to load user types`),h(n??[]),_(r??[]),y((r??[])[0]?.user_type_id??null)}catch(e){u.message.error(e.message||`Unable to load admin data`)}finally{a(!1)}}(0,l.useEffect)(()=>{queueMicrotask(()=>{j()})},[]),(0,l.useEffect)(()=>{queueMicrotask(()=>{if(!v){x([]);return}s(!0),Ag(v).then(e=>x(Ey(e??[]))).catch(e=>u.message.error(e.message||`Unable to load role permissions`)).finally(()=>s(!1))})},[v]);let M=(0,l.useMemo)(()=>g.find(e=>e.user_type_id===v),[v,g]),N=(0,l.useMemo)(()=>g.reduce((e,t)=>({...e,[t.user_type_id]:t.user_type_name}),{}),[g]),P=(0,l.useMemo)(()=>g.filter(e=>!Ty(e)),[g]),F=(0,l.useMemo)(()=>m.filter(e=>!Ty({user_type_id:e.user_type_id,user_type_name:N[e.user_type_id]})),[N,m]),I=[{label:`Users`,value:F.length},{label:`User Types`,value:g.length},{label:`Config Modules`,value:8}],L=[{key:`user-config`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.UserOutlined,{}),` User Config`]}),title:`User Config`,description:`Configure user-level list, filter, form, and permission settings from CORE-THEME.`,component:(0,f.jsx)(d_,{})},{key:`role-config`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.SafetyCertificateOutlined,{}),` Role Config`]}),title:`Role Config`,description:`Configure role-level field visibility, editability, and mandatory rules.`,component:(0,f.jsx)(g_,{})},{key:`modules`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.AppstoreOutlined,{}),` Modules`]}),title:`Modules`,description:`Define workflow modules and set which module they extend to inherit its config.`,component:(0,f.jsx)(b_,{})},{key:`form-groups`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.AppstoreAddOutlined,{}),` Form Groups`]}),title:`Form Groups`,description:`Build module add and edit form groups with validations, dropdowns, and custom forms.`,component:(0,f.jsx)(J_,{})},{key:`detail-groups`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.BgColorsOutlined,{}),` Detail Groups`]}),title:`Detail Groups`,description:`Control detail-view labels, rendering, lookups, merged fields, and display defaults.`,component:(0,f.jsx)(gv,{})},{key:`actions`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.ThunderboltOutlined,{}),` Actions`]}),title:`Actions`,description:`Manage row action buttons and their visibility rules from one workspace.`,component:(0,f.jsx)(ay,{})},{key:`templates`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.MailOutlined,{}),` Templates`]}),title:`Templates`,description:`Manage reusable email templates and signatures.`,component:(0,f.jsx)(my,{})},{key:`ai-services`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.ThunderboltOutlined,{}),` AI Services`]}),title:`AI Services`,description:`Register the AI and automation services used by admin-configured AI actions.`,component:(0,f.jsx)(vy,{})}],R=[{key:`users`,icon:(0,f.jsx)(d.UserOutlined,{}),label:`Users`},{key:`roles`,icon:(0,f.jsx)(d.TeamOutlined,{}),label:`User Types`},{key:`configurations`,icon:(0,f.jsx)(d.AppstoreAddOutlined,{}),label:`Configurations`}];function z(e,t){x(n=>n.map(n=>n.key===e?{...n,accessValue:t}:n))}async function B(){p(!0);try{await jg(v,b.map(e=>({menu_id:e.menuId,menu_name:e.menuName,menu_key:e.menuKey,permission_id:e.permissionId,permission_key:e.permissionKey,access_value:e.accessValue,updated_by:A?.userId??null}))),u.message.success(`Role permissions updated`)}catch(e){u.message.error(e.message||`Unable to save role permissions`)}finally{p(!1)}}function V(){ne(),e?.()}function H(){T(null),t.resetFields(),t.setFieldsValue({status:`ACTIVE`,user_type_id:P[0]?.user_type_id}),C(!0)}function U(e){T(e),t.setFieldsValue({first_name:e.first_name,last_name:e.last_name,username:e.username,email:e.email,mobile:e.mobile,user_type_id:e.user_type_id,profile_image:e.profile_image,status:e.status}),C(!0)}async function W(e){D(!0);try{let t={...e,updated_by:A?.userId??null,created_by:A?.userId??null};t.password||delete t.password,w?(await Dg(w.user_id,t),u.message.success(`User updated`)):(await Eg(t),u.message.success(`User created`)),C(!1),T(null),await j()}catch(e){u.message.error(e.message||`Unable to save user`)}finally{D(!1)}}async function G(e){k(e);try{await Og(e),u.message.success(`User deleted`),await j()}catch(e){u.message.error(e.message||`Unable to delete user`)}finally{k(null)}}function K(e){y(e.user_type_id)}return(0,f.jsxs)(u.Layout,{className:`admin-shell`,children:[(0,f.jsxs)(xy,{width:248,className:`admin-sider`,children:[(0,f.jsxs)(`div`,{className:`admin-brand`,children:[(0,f.jsx)(`img`,{src:`/favicon.svg`,alt:``}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`strong`,{children:`Zinnext`}),(0,f.jsx)(`span`,{children:`Admin Core`})]})]}),(0,f.jsxs)(`div`,{className:`admin-profile`,children:[(0,f.jsx)(Sy,{children:A?.username||`Admin`}),(0,f.jsx)(`span`,{children:A?.email})]}),(0,f.jsxs)(`div`,{className:`admin-sidebar-nav`,children:[(0,f.jsx)(Sy,{className:`admin-sidebar-title`,children:`Admin Menu`}),(0,f.jsx)(u.Menu,{theme:`dark`,mode:`inline`,selectedKeys:[n],onClick:({key:e})=>r(e),items:R})]})]}),(0,f.jsxs)(u.Layout,{children:[(0,f.jsxs)(by,{className:`admin-header`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:3,children:`Admin`}),(0,f.jsx)(Sy,{type:`secondary`,children:`Manage access and CORE-THEME configuration.`})]}),(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:j,children:`Refresh`}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.LogoutOutlined,{}),onClick:V,children:`Logout`})]})]}),(0,f.jsxs)(yy,{className:`admin-content`,children:[(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`admin-metrics`,children:I.map(e=>(0,f.jsxs)(`div`,{className:`admin-metric`,children:[(0,f.jsx)(`span`,{children:e.label}),(0,f.jsx)(`strong`,{children:e.value})]},e.label))}),(0,f.jsx)(u.Tabs,{activeKey:n,onChange:r,tabBarStyle:{display:`none`},items:[{key:`users`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.UserOutlined,{}),` Users`]}),children:(0,f.jsx)(`div`,{className:`admin-stack`,children:(0,f.jsxs)(`section`,{className:`admin-section`,children:[(0,f.jsxs)(`div`,{className:`admin-section-head`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:`Users`}),(0,f.jsx)(Sy,{type:`secondary`,children:`Create and manage users with non-super-admin user types.`})]}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:H,children:`Add`})]}),(0,f.jsx)(u.Table,{loading:i,rowKey:`user_id`,size:`small`,columns:[{title:`Name`,dataIndex:`first_name`,render:(e,t)=>`${e??``} ${t.last_name??``}`.trim()||t.username},{title:`Email`,dataIndex:`email`},{title:`User Type`,dataIndex:`user_type_id`,width:160,render:e=>N[e]||`Type ${e}`},{title:`Status`,dataIndex:`status`,width:110,render:e=>(0,f.jsx)(u.Tag,{color:e===`ACTIVE`?`green`:`default`,children:e})},{title:``,key:`actions`,width:104,render:(e,t)=>(0,f.jsxs)(u.Space,{size:4,children:[(0,f.jsx)(u.Button,{"aria-label":`Edit user`,icon:(0,f.jsx)(d.EditOutlined,{}),size:`small`,onClick:()=>U(t)}),(0,f.jsx)(u.Popconfirm,{title:`Delete user?`,description:`This removes the user from the auth database.`,okText:`Delete`,okButtonProps:{danger:!0},onConfirm:()=>G(t.user_id),children:(0,f.jsx)(u.Button,{danger:!0,"aria-label":`Delete user`,icon:(0,f.jsx)(d.DeleteOutlined,{}),loading:O===t.user_id,size:`small`})})]})}],dataSource:F,pagination:{pageSize:8}})]})})},{key:`roles`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.TeamOutlined,{}),` User Types`]}),children:(0,f.jsxs)(`div`,{className:`admin-stack`,children:[(0,f.jsxs)(`section`,{className:`admin-section`,children:[(0,f.jsx)(`div`,{className:`admin-section-head`,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:`User Types`}),(0,f.jsx)(Sy,{type:`secondary`,children:`Role level permissions are inherited by users.`})]})}),(0,f.jsx)(u.Table,{loading:i,rowKey:`user_type_id`,size:`small`,columns:[{title:`User Type`,dataIndex:`user_type_name`},{title:`Description`,dataIndex:`description`},{title:`Status`,dataIndex:`status`,width:110,render:e=>(0,f.jsx)(u.Tag,{color:e===`ACTIVE`?`green`:`default`,children:e})},{title:``,key:`actions`,width:96,render:(e,t)=>(0,f.jsx)(u.Button,{"aria-label":`Edit role permissions`,icon:(0,f.jsx)(d.SafetyCertificateOutlined,{}),size:`small`,onClick:()=>K(t),children:`Permission`})}],dataSource:g,pagination:!1,rowClassName:e=>e.user_type_id===v?`admin-selected-row`:``})]}),(0,f.jsx)(Dy,{title:`Role Permissions`,description:`Pick a user type from the table`,selectedName:M?.user_type_name,loading:o,saving:c,rows:b,onChange:z,onSave:B})]})},{key:`configurations`,label:(0,f.jsxs)(`span`,{children:[(0,f.jsx)(d.AppstoreAddOutlined,{}),` Configurations`]}),children:(0,f.jsxs)(`section`,{className:`admin-section admin-config-workspace`,children:[(0,f.jsxs)(`div`,{className:`admin-section-head`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:`Configuration Center`}),(0,f.jsx)(Sy,{type:`secondary`,children:`CORE-THEME admin modules embedded into the admin dashboard.`})]}),(0,f.jsx)(u.Tag,{color:`blue`,children:`7 modules`})]}),(0,f.jsx)(u.Tabs,{className:`admin-config-tabs`,defaultActiveKey:`user-config`,tabPosition:`left`,items:L.map(e=>({key:e.key,label:e.label,children:(0,f.jsxs)(`div`,{className:`admin-config-panel`,children:[(0,f.jsx)(`div`,{className:`admin-config-panel-head`,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(Cy,{level:4,children:e.title}),(0,f.jsx)(Sy,{type:`secondary`,children:e.description})]})}),(0,f.jsx)(`div`,{className:`admin-config-panel-body`,children:e.component})]})}))})]})}]})]}),(0,f.jsx)(u.Modal,{title:w?`Edit User`:`Add User`,open:S,onCancel:()=>C(!1),onOk:()=>t.submit(),confirmLoading:E,destroyOnHidden:!0,children:(0,f.jsxs)(u.Form,{form:t,layout:`vertical`,requiredMark:!1,onFinish:W,children:[(0,f.jsxs)(`div`,{className:`admin-form-row`,children:[(0,f.jsx)(u.Form.Item,{label:`First Name`,name:`first_name`,rules:[{required:!0,message:`First name is required`}],children:(0,f.jsx)(u.Input,{placeholder:`John`})}),(0,f.jsx)(u.Form.Item,{label:`Last Name`,name:`last_name`,children:(0,f.jsx)(u.Input,{placeholder:`Doe`})})]}),(0,f.jsx)(u.Form.Item,{label:`Username`,name:`username`,rules:[{required:!0,message:`Username is required`}],children:(0,f.jsx)(u.Input,{placeholder:`john.doe`})}),(0,f.jsx)(u.Form.Item,{label:`Email`,name:`email`,rules:[{required:!0,message:`Email is required`},{type:`email`,message:`Enter a valid email`}],children:(0,f.jsx)(u.Input,{placeholder:`john@example.com`})}),(0,f.jsx)(u.Form.Item,{label:`Password`,name:`password`,rules:w?[]:[{required:!0,message:`Password is required`}],children:(0,f.jsx)(u.Input.Password,{placeholder:w?`Leave empty to keep current password`:`Password`})}),(0,f.jsxs)(`div`,{className:`admin-form-row`,children:[(0,f.jsx)(u.Form.Item,{label:`Mobile`,name:`mobile`,children:(0,f.jsx)(u.Input,{placeholder:`9999999999`})}),(0,f.jsx)(u.Form.Item,{label:`User Type`,name:`user_type_id`,rules:[{required:!0,message:`User type is required`}],children:(0,f.jsx)(u.Select,{placeholder:`Select user type`,options:P.map(e=>({label:e.user_type_name,value:e.user_type_id}))})})]}),(0,f.jsx)(u.Form.Item,{label:`Profile Image`,name:`profile_image`,children:(0,f.jsx)(u.Input,{placeholder:`https://...`})}),(0,f.jsx)(u.Form.Item,{label:`Status`,name:`status`,children:(0,f.jsx)(u.Select,{options:[{label:`ACTIVE`,value:`ACTIVE`},{label:`INACTIVE`,value:`INACTIVE`}]})})]})})]})]})]})}var ky=Oy;function Ay(e,t){return String(e||t).replace(/\/\*$/,``).replace(/\/+$/,``)||t}function jy({loginPath:e=`/login`,adminPath:t=`/admin`,fallbackPath:n=`/`}){let r=(0,p.useNavigate)(),i=Ay(e,`/login`),a=Ay(t,`/admin`),o=`${a}/*`;return(0,f.jsxs)(p.Routes,{children:[(0,f.jsx)(p.Route,{path:i,element:(0,f.jsx)(zh,{defaultRedirectPath:a,onLogin:()=>r(a,{replace:!0})})}),(0,f.jsx)(p.Route,{path:o,element:(0,f.jsx)(Ih,{loginPath:i,children:(0,f.jsx)(ky,{onLogout:()=>r(i,{replace:!0})})})}),(0,f.jsx)(p.Route,{path:n,element:(0,f.jsx)(p.Navigate,{to:a,replace:!0})}),(0,f.jsx)(p.Route,{path:`*`,element:(0,f.jsx)(p.Navigate,{to:a,replace:!0})})]})}function My(e){return(0,f.jsx)(p.BrowserRouter,{children:(0,f.jsx)(jy,{...e})})}function Ny(e){return Array.isArray(e)?e.map(String).map(e=>e.trim()).filter(Boolean):String(e??``).split(`,`).map(e=>e.trim()).filter(Boolean)}function Py(e){return Ny(e).every(e=>/^[^,\s@]+@[^,\s@]+\.[^\s@]{2,}$/.test(e))}var{Text:Fy}=u.Typography;function Iy(e,t){return[...new Set([...Ny(e),...Ny(t)])].join(`, `)}function Ly(e,t){return String(t??``).split(`.`).reduce((e,t)=>e?.[t],e)}function Ry(e,t,n){if(!n)return String(e??``);let r=new Map;return(t??[]).forEach(e=>(e.holders??[]).forEach(e=>{r.set(e.key,Ly(n,e.value))})),String(e??``).replace(/{{\.([\w.]+)}}/g,(e,t)=>{let n=r.get(t);return n==null?e:String(n)})}function zy({value:e,onChange:t,moduleName:n=``,defaultTemplateId:r=``,ready:i=!0,title:a=`Mail`,hint:o,bccHint:s,afterBcc:c,className:p=``,contextRecords:m=[]}){let[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)(n),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)(!0),T=(0,l.useRef)(``),E=n=>t?.({...e,...n});(0,l.useEffect)(()=>{Tn().then(e=>g(e.map(e=>({value:e.key??e.module??e.value,label:e.label??e.name??e.key??e.module??e.value})).filter(e=>e.value))).catch(()=>g([]))},[]),(0,l.useEffect)(()=>{let e=!1;return Tv({module:_}).then(t=>{e||b(t)}).catch(()=>{e||b([])}).finally(()=>{e||w(!1)}),()=>{e=!0}},[_]);async function D(t,n=!1){if(!t){S(``);return}try{let r=await Ev(t),i=m[0];S(t),E({to:Iy(e.to,(r?.toMail??[]).map(e=>Ry(e,r?.placeholders,i))),cc:Iy(e.cc,(r?.ccMail??[]).map(e=>Ry(e,r?.placeholders,i))),bcc:Iy(e.bcc,(r?.bccMail??[]).map(e=>Ry(e,r?.placeholders,i))),subject:Ry(r?.subject,r?.placeholders,i),contents:Ry(r?.body,r?.placeholders,i)}),n||u.message.success(`Loaded ${r?.name||`email template`}`)}catch(e){n||u.message.error(e?.message||`Could not load email template`)}}(0,l.useEffect)(()=>{!i||!r||T.current===r||(T.current=r,D(r,!0))},[r,i]);let O=(0,l.useMemo)(()=>!_||h.some(e=>e.value===_)?h:[{value:_,label:_},...h],[h,_]);return(0,f.jsxs)(`div`,{className:`common-mail-composer ${p}`.trim(),children:[(0,f.jsxs)(`div`,{className:`mail-popup__header`,children:[(0,f.jsxs)(`div`,{className:`mail-popup__header-brand`,children:[(0,f.jsx)(`span`,{className:`dynamic-popup__header-icon-box`,children:(0,f.jsx)(d.MailOutlined,{})}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`span`,{className:`dynamic-popup__header-label`,children:a}),o&&(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__header-hint`,children:o})]})]}),(0,f.jsxs)(`div`,{className:`mail-popup__header-controls`,children:[(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,placeholder:`Module`,value:_||void 0,options:O,onChange:e=>{w(!0),v(e),S(``),E({cc:``,bcc:``,subject:``,contents:``,showCc:!1,showBcc:!1})},className:`mail-popup__module-select`}),(0,f.jsx)(u.Select,{showSearch:!0,optionFilterProp:`label`,allowClear:!0,placeholder:`Template`,value:x||void 0,loading:C,notFoundContent:C?(0,f.jsx)(u.Spin,{size:`small`}):`No templates`,options:y.map(e=>({value:e._id??e.id,label:e.name||e.action||`Template`})),onChange:e=>D(e),className:`mail-popup__template-select`})]})]}),(0,f.jsxs)(`div`,{className:`mail-popup__body`,children:[(0,f.jsxs)(`div`,{className:`mail-popup__field-row`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__field-label`,children:`To`}),(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`],value:Ny(e.to),onChange:e=>E({to:e.join(`, `)}),variant:`borderless`,className:`mail-popup__recipient-select`,placeholder:`Add email addresses`}),(0,f.jsxs)(`div`,{className:`mail-popup__cc-bcc-actions`,children:[!e.showCc&&(0,f.jsx)(`span`,{className:`mail-popup__cc-bcc-link`,onClick:()=>E({showCc:!0}),children:`Cc`}),!e.showBcc&&(0,f.jsx)(`span`,{className:`mail-popup__cc-bcc-link`,onClick:()=>E({showBcc:!0}),children:`Bcc`})]})]}),(0,f.jsx)(u.Divider,{}),e.showCc&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`mail-popup__field-row`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__field-label`,children:`Cc`}),(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`],value:Ny(e.cc),onChange:e=>E({cc:e.join(`, `)}),variant:`borderless`,className:`mail-popup__recipient-select`})]}),(0,f.jsx)(u.Divider,{})]}),e.showBcc&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`mail-popup__field-row`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__field-label`,children:`Bcc`}),(0,f.jsx)(u.Select,{mode:`tags`,open:!1,tokenSeparators:[`,`],value:Ny(e.bcc),onChange:e=>E({bcc:e.join(`, `)}),variant:`borderless`,className:`mail-popup__recipient-select`,placeholder:s})]}),c,(0,f.jsx)(u.Divider,{})]}),(0,f.jsxs)(`div`,{className:`mail-popup__field-row`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__field-label`,children:`Subject`}),(0,f.jsx)(u.Input,{variant:`borderless`,value:e.subject,onChange:e=>E({subject:e.target.value}),placeholder:`Enter subject`,className:`mail-popup__field-input`})]}),(0,f.jsx)(u.Divider,{}),(0,f.jsxs)(`div`,{className:`mail-popup__message-section`,children:[(0,f.jsx)(Fy,{type:`secondary`,className:`mail-popup__message-label`,children:`Message`}),(0,f.jsx)(wt,{value:e.contents,onChange:e=>E({contents:e})})]})]})]})}function By(){let e=(0,p.useNavigate)(),{state:t={}}=(0,p.useLocation)(),{selectedIds:n=[],selectedRecords:r=[],recipients:i=[],subject:a=``,onSend:o,moduleName:s=``,popupAction:c={}}=t,d=n[0]??r[0]?._id??r[0]?.id,[m,h]=(0,l.useState)({to:i.join(`, `),cc:``,bcc:``,subject:a,contents:``,showCc:!1,showBcc:!1}),[g,_]=(0,l.useState)(!d),[v,y]=(0,l.useState)(!1);(0,l.useEffect)(()=>{d&&yo(d).then(e=>h(t=>({...t,subject:e.subject||t.subject,to:e.toMail?.length?Array.isArray(e.toMail)?e.toMail.join(`, `):String(e.toMail):t.to,cc:e.ccMail?.length?Array.isArray(e.ccMail)?e.ccMail.join(`, `):String(e.ccMail):t.cc,bcc:e.bccMail?.length?Array.isArray(e.bccMail)?e.bccMail.join(`, `):String(e.bccMail):t.bcc,contents:e.contents||t.contents,showCc:t.showCc||!!e.ccMail?.length,showBcc:t.showBcc||!!e.bccMail?.length}))).catch(()=>{}).finally(()=>_(!0))},[d]);let b=Ny(m.to).length+Ny(m.cc).length+Ny(m.bcc).length>0&&Py(m.to)&&Py(m.cc)&&Py(m.bcc)&&m.subject.trim();async function x(){if(!(!b||v)){y(!0);try{await bo({jobId:d,toMail:Ny(m.to),ccMail:Ny(m.cc),bccMail:Ny(m.bcc),subject:m.subject,contents:m.contents}),u.message.success(`Mail sent successfully`),typeof o==`function`&&o({...m,message:m.contents,selectedIds:n}),e(-1)}catch(e){u.message.error(e?.message||`Failed to send mail`)}finally{y(!1)}}}return(0,f.jsx)(u.Drawer,{open:!0,placement:`right`,onClose:()=>e(-1),closable:!1,rootClassName:`mail-popup`,width:620,maskClosable:!1,footer:(0,f.jsxs)(`div`,{className:`mail-popup__footer`,children:[(0,f.jsx)(u.Button,{onClick:()=>e(-1),children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:v,disabled:!b,onClick:x,children:`Send`})]}),children:(0,f.jsx)(zy,{value:m,onChange:h,moduleName:s,defaultTemplateId:c.defaultTemplateId??t.defaultTemplateId??``,ready:g,contextRecords:r})})}var{Text:Vy}=u.Typography;function Hy(e){return e?e.trim().split(/\s+/).slice(0,2).map(e=>e[0].toUpperCase()).join(``):`?`}function Uy(e){return e?e.name?e.name:e.fullName?e.fullName:e.firstName||e.lastName?[e.firstName,e.lastName].filter(Boolean).join(` `):e.candidateName??e.clientName??e.jobTitle??``:``}function Wy(e){return e?e.email??e.emailId??e.emailAddress??``:``}function Gy(e){return e?e.status?e.status:e.stage?e.stage:typeof e.isActive==`boolean`?e.isActive?`Active`:`Inactive`:``:``}function Ky(e){return e==null||e===``?`-`:typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):Array.isArray(e)?e.join(`, `):typeof e==`object`?e.label??e.name??Object.values(e).join(` `):String(e)}var qy=[`jobDescription`,`description`,`rawDescription`,`jobDescriptionText`];function Jy(e){return String(e??``).toLowerCase()===`job`}function Yy(e){let t=qy.includes(e.field),n=/description/i.test(e.label??``);return t||n}function Xy({steps:e,current:t,onStepClick:n}){return(0,f.jsx)(`div`,{className:`preview-stepper`,children:e.map((r,i)=>{let a=i<t,o=i===t,s=i===e.length-1;return(0,f.jsxs)(l.Fragment,{children:[(0,f.jsxs)(`button`,{type:`button`,className:`preview-stepper__item${o?` preview-stepper__item--active`:``}`,onClick:()=>n(i),"aria-label":`Go to step ${i+1}: ${r.title}`,"aria-current":o?`step`:void 0,children:[(0,f.jsx)(`div`,{className:[`preview-stepper__circle`,a?`preview-stepper__circle--done`:``,o?`preview-stepper__circle--active`:``].filter(Boolean).join(` `),children:a?(0,f.jsx)(d.CheckOutlined,{}):i+1}),(0,f.jsx)(`span`,{className:`preview-stepper__label${o?` preview-stepper__label--active`:``}`,children:r.title})]}),!s&&(0,f.jsx)(`div`,{className:`preview-stepper__line${a?` preview-stepper__line--done`:``}`})]},r.title??i)})})}function Zy({record:e}){let t=Uy(e),n=Wy(e),r=Gy(e);return!t&&!n?null:(0,f.jsxs)(`div`,{className:`preview-profile-card`,children:[(0,f.jsxs)(`div`,{className:`preview-profile-card__info`,children:[(0,f.jsx)(u.Avatar,{className:`preview-profile-card__avatar`,children:Hy(t)}),(0,f.jsxs)(`div`,{className:`preview-profile-card__text`,children:[t&&(0,f.jsx)(`span`,{className:`preview-profile-card__name`,children:t}),n&&(0,f.jsx)(`span`,{className:`preview-profile-card__email`,children:n})]})]}),r&&(0,f.jsx)(u.Tag,{className:`preview-profile-card__status`,children:r})]})}function Qy({fields:e,moduleName:t}){return e?.length?(0,f.jsx)(`div`,{className:`preview-field-grid`,children:e.map(e=>{let n=e.value,r=Array.isArray(n)&&n.length>0,i=Jy(t)&&Yy(e)&&typeof n==`string`&&n.trim();return r?n.map((t,r)=>(0,f.jsxs)(`div`,{className:`preview-field-card`,children:[(0,f.jsxs)(`span`,{className:`preview-field-card__label`,children:[e.label,n.length>1?` (${r+1})`:``]}),(0,f.jsx)(`span`,{className:`preview-field-card__value`,children:Ky(t)})]},`${e.field??e.label}-${r}`)):i?(0,f.jsxs)(`div`,{className:`preview-field-card preview-field-card--description`,children:[(0,f.jsx)(`span`,{className:`preview-field-card__label`,children:e.label}),(0,f.jsx)(`div`,{className:`preview-field-card__description`,children:(0,f.jsx)(uf,{raw:n})})]},e.field??e.label):(0,f.jsxs)(`div`,{className:`preview-field-card`,children:[(0,f.jsx)(`span`,{className:`preview-field-card__label`,children:e.label}),(0,f.jsx)(`span`,{className:`preview-field-card__value`,children:Ky(n)})]},e.field??e.label)})}):null}function $y(){let e=(0,p.useNavigate)(),{moduleName:t=``,record:n=null}=(0,p.useLocation)().state??{},r=n?.id??n?._id,[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(!!(t&&r)),[c,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(0);(0,l.useEffect)(()=>{if(!t||!r)return;let e=!1;return mn({module:t,id:r}).then(t=>{e||(a(Array.isArray(t)?t:[]),s(!1))}).catch(t=>{e||(m(t.message||`Failed to load preview`),s(!1))}),()=>{e=!0}},[t,r]);function _(){e(-1)}let v=i.length,y=v>1,b=i[h],x=v>4?`min(${v*105+80}px, min(95vw, 1200px))`:`min(680px, calc(100vw - 32px))`,S=i.map((e,t)=>({title:e.label??e.name??`Step ${t+1}`})),C=(0,f.jsxs)(`div`,{className:`preview-modal-header`,children:[(0,f.jsx)(`span`,{className:`preview-modal-module`,children:t.toUpperCase()}),(0,f.jsx)(`span`,{className:`preview-modal-title`,children:b?.label??(t?`Preview - ${t}`:`Preview`)})]}),w=(0,f.jsxs)(`div`,{className:`wizard-footer`,children:[y&&(0,f.jsxs)(Vy,{className:`preview-footer-step-count`,children:[`Step `,h+1,` of `,v]}),(0,f.jsxs)(`div`,{className:`wizard-footer-nav`,children:[(0,f.jsx)(u.Button,{onClick:_,children:`Close`}),y&&h>0&&(0,f.jsx)(u.Button,{onClick:()=>g(e=>e-1),children:`Back`}),y&&(h<v-1?(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.RightOutlined,{}),iconPosition:`end`,onClick:()=>g(e=>e+1),children:`Next`}):(0,f.jsx)(u.Button,{type:`primary`,onClick:_,children:`Done`}))]})]});function T(){return!t||!r?(0,f.jsx)(`div`,{className:`job-preview-content job-preview-status`,children:`Preview id is missing.`}):o?(0,f.jsx)(`div`,{className:`job-preview-content job-preview-status`,children:(0,f.jsx)(u.Spin,{size:`small`})}):c?(0,f.jsx)(`div`,{className:`job-preview-content job-preview-status job-preview-error`,children:c}):i.length?i.map((e,n)=>(0,f.jsx)(`div`,{style:{display:n===h?`block`:`none`},children:e.fields?.length>0?(0,f.jsx)(Qy,{fields:e.fields,moduleName:t}):(0,f.jsx)(Vy,{type:`secondary`,children:`No fields in this group.`})},e.name??e.id??n)):(0,f.jsx)(`div`,{className:`job-preview-content job-preview-status`,children:`No form groups found.`})}return(0,f.jsxs)(u.Modal,{centered:!0,className:`wizard-modal preview-modal`,footer:w,open:!0,title:C,width:x,onCancel:_,maskClosable:!1,children:[y&&(0,f.jsx)(`div`,{className:`wizard-steps-container`,children:(0,f.jsx)(Xy,{steps:S,current:h,onStepClick:g})}),(0,f.jsxs)(`div`,{className:`wizard-body`,children:[n&&(0,f.jsx)(Zy,{record:n}),T()]})]})}var{Text:eb}=u.Typography,{TextArea:tb}=u.Input,nb=[{key:`basic`,title:`Basic Info`,description:`General details`,fields:[{name:`firstName`,label:`First Name`,type:`input`,required:!0,placeholder:`Enter first name`,span:12},{name:`lastName`,label:`Last Name`,type:`input`,required:!0,placeholder:`Enter last name`,span:12},{name:`email`,label:`Email Address`,type:`input`,required:!0,placeholder:`Enter email address`,rules:[{type:`email`,message:`Please enter a valid email`}]},{name:`phone`,label:`Phone`,type:`input`,placeholder:`Enter phone number`}]},{key:`details`,title:`Details`,description:`Additional info`,fields:[{name:`role`,label:`Role`,type:`select`,required:!0,placeholder:`Select a role`,span:12,options:[{label:`Developer`,value:`developer`},{label:`Designer`,value:`designer`},{label:`Manager`,value:`manager`},{label:`Analyst`,value:`analyst`}]},{name:`department`,label:`Department`,type:`select`,placeholder:`Select department`,span:12,options:[{label:`Engineering`,value:`engineering`},{label:`Product`,value:`product`},{label:`Operations`,value:`operations`},{label:`Finance`,value:`finance`}]},{name:`notes`,label:`Notes`,type:`textarea`,placeholder:`Any additional notes...`}]},{key:`confirm`,title:`Confirm`,description:`Review & submit`,isReview:!0}];function rb(e){switch(e.type){case`select`:return(0,f.jsx)(u.Select,{placeholder:e.placeholder,options:e.options,style:{width:`100%`}});case`textarea`:return(0,f.jsx)(tb,{rows:3,placeholder:e.placeholder});case`number`:return(0,f.jsx)(u.InputNumber,{placeholder:e.placeholder,style:{width:`100%`}});default:return(0,f.jsx)(u.Input,{type:e.inputType||`text`,placeholder:e.placeholder})}}function ib({steps:e,form:t}){let n=t.getFieldsValue(),r=e.filter(e=>!e.isReview);return r.some(e=>(e.fields||[]).some(e=>n[e.name]!==void 0&&n[e.name]!==``))?(0,f.jsxs)(`div`,{className:`wizard-review-content`,children:[r.map(e=>(0,f.jsxs)(`div`,{className:`wizard-review-section`,children:[(0,f.jsx)(eb,{className:`wizard-review-section-title`,children:e.title}),(0,f.jsx)(`div`,{className:`wizard-review-grid`,children:(e.fields||[]).map(e=>{let t=n[e.name],r=t===void 0||t===``||t===null?`—`:String(t);return(0,f.jsxs)(`div`,{className:`wizard-review-row`,children:[(0,f.jsx)(`span`,{className:`wizard-review-label`,children:e.label}),(0,f.jsx)(`span`,{className:`wizard-review-separator`,children:`:`}),(0,f.jsx)(`span`,{className:`wizard-review-value`,children:r})]},e.name)})})]},e.key)),(0,f.jsxs)(`div`,{className:`wizard-review-confirm-note`,children:[(0,f.jsx)(d.CheckCircleOutlined,{className:`wizard-review-confirm-icon`}),(0,f.jsx)(eb,{type:`secondary`,children:`Please review the information above before submitting.`})]})]}):(0,f.jsx)(`div`,{className:`wizard-review-empty`,children:(0,f.jsx)(eb,{type:`secondary`,children:`No data entered yet.`})})}function ab(){let[e]=u.Form.useForm(),t=(0,p.useNavigate)(),{title:n=`Wizard`,moduleName:r=``,steps:i=nb,onSubmit:a}=(0,p.useLocation)().state??{},[o,s]=(0,l.useState)(0),c=i[o],d=o===i.length-1,m=o===0;function h(){t(-1)}function g(){let t=(c.fields||[]).map(e=>e.name);e.validateFields(t.length>0?t:void 0).then(()=>{s(e=>e+1)})}function _(){s(e=>e-1)}function v(){let n=e.getFieldsValue();typeof a==`function`&&a(n),t(-1)}let y=i.map((e,t)=>({title:e.title,description:e.description,status:t<o?`finish`:t===o?`process`:`wait`}));return(0,f.jsxs)(u.Modal,{open:!0,title:r?`${n} — ${r}`:n,footer:(0,f.jsxs)(`div`,{className:`wizard-footer`,children:[(0,f.jsx)(u.Button,{onClick:h,children:`Cancel`}),(0,f.jsxs)(`div`,{className:`wizard-footer-nav`,children:[!m&&(0,f.jsx)(u.Button,{onClick:_,children:`Back`}),d?(0,f.jsx)(u.Button,{type:`primary`,onClick:v,children:`Submit`}):(0,f.jsx)(u.Button,{type:`primary`,onClick:g,children:`Next`})]})]}),onCancel:h,width:`min(680px, calc(100vw - 32px))`,centered:!0,className:`wizard-modal`,children:[(0,f.jsx)(`div`,{className:`wizard-steps-container`,children:(0,f.jsx)(u.Steps,{current:o,items:y,size:`small`,className:`wizard-steps`})}),(0,f.jsx)(`div`,{className:`wizard-body`,children:(0,f.jsxs)(u.Form,{form:e,layout:`vertical`,children:[i.filter(e=>!e.isReview).map((e,t)=>(0,f.jsx)(`div`,{style:{display:t===o?`block`:`none`},children:(0,f.jsx)(u.Row,{gutter:16,children:(e.fields||[]).map(e=>(0,f.jsx)(u.Col,{span:e.span||24,children:(0,f.jsx)(u.Form.Item,{name:e.name,label:e.label,rules:[...e.required?[{required:!0,message:`${e.label} is required`}]:[],...e.rules||[]],children:rb(e)})},e.name))})},e.key)),c.isReview&&(0,f.jsx)(ib,{steps:i,form:e})]})})]})}function ob({titleText:e,titleIcon:t}){let n=t===`delete`;return(0,f.jsxs)(`span`,{className:`dynamic-popup__header`,children:[(0,f.jsx)(`span`,{className:`dynamic-popup__header-icon-box${n?` dynamic-popup__header-icon-box--danger`:``}`,children:n?(0,f.jsx)(d.DeleteOutlined,{}):(0,f.jsx)(d.AppstoreOutlined,{})}),(0,f.jsx)(`span`,{className:`dynamic-popup__header-label`,children:e})]})}function sb({note:e,description:t,showSelectedCount:n,count:r,itemLabel:i,bodyText:a,deleteError:o}){return(0,f.jsxs)(f.Fragment,{children:[e&&(0,f.jsx)(X,{variant:`body`,color:`secondary`,className:`dynamic-popup__note`,children:e}),t&&(0,f.jsx)(X,{variant:`body`,className:`dynamic-popup__description`,children:t}),n&&r>0&&(0,f.jsxs)(X,{variant:`body`,className:`dynamic-popup__selected-count`,children:[`Changing status for `,(0,f.jsx)(`strong`,{children:r}),` selected `,i,`.`]}),a&&(0,f.jsx)(X,{variant:`body`,children:a}),o&&(0,f.jsx)(X,{variant:`caption`,color:`danger`,className:`dynamic-popup__error`,children:o})]})}function cb({footerNote:e}){return e?(0,f.jsx)(X,{variant:`caption`,color:`secondary`,className:`dynamic-popup__footer-note`,children:e}):null}var{TextArea:lb}=u.Input,ub=[{label:`$`,value:`$`},{label:`EUR`,value:`EUR`},{label:`GBP`,value:`GBP`},{label:`INR`,value:`INR`}],db=[{label:`Hourly`,value:`Hourly`},{label:`Daily`,value:`Daily`},{label:`Weekly`,value:`Weekly`},{label:`Monthly`,value:`Monthly`},{label:`Yearly`,value:`Yearly`}];function fb({field:e,value:t,onChange:n}){return(0,f.jsx)(u.Input,{value:t,onChange:n,placeholder:e.placeholder,maxLength:e.maxLength,prefix:(0,f.jsx)(d.CrownOutlined,{})})}function pb({field:e,value:t,onChange:n}){return(0,f.jsx)(lb,{value:t,onChange:n,rows:e.rows??5,placeholder:e.placeholder})}function mb({field:e,options:t,value:n,onChange:r}){return(0,f.jsx)(u.Select,{value:n,onChange:r,options:t,placeholder:e.placeholder,className:`dynamic-popup__field-select`,prefix:(0,f.jsx)(d.CrownOutlined,{})})}function hb({field:e,options:t,value:n,onChange:r}){return(0,f.jsx)(u.Select,{mode:`multiple`,value:n,onChange:r,options:t,placeholder:e.placeholder,className:`dynamic-popup__field-select`,prefix:(0,f.jsx)(d.CrownOutlined,{})})}function gb({field:e,options:t,onSearch:n,value:r,onChange:i}){return(0,f.jsx)(u.Select,{showSearch:!0,filterOption:!1,notFoundContent:null,value:r,onChange:i,options:t,placeholder:e.placeholder,onSearch:n,className:`dynamic-popup__field-select`,prefix:(0,f.jsx)(d.CrownOutlined,{})})}function _b({field:e,mentionOpts:t,onMentionSearch:n,value:r,onChange:i}){return(0,f.jsx)(u.Mentions,{value:r,onChange:i,rows:e.rows??5,placeholder:e.placeholder,prefix:`@`,options:t,onSearch:n,className:`dynamic-popup__mention-textarea`})}function vb({value:e={},onChange:t}){let n=e.period??`Hourly`,r=e.isRange??!1;function i(n){t?.({...e,...n})}return(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`},children:[r?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.InputNumber,{controls:!1,placeholder:`From`,value:e.minAmount,onChange:e=>i({minAmount:e}),style:{flex:1}}),(0,f.jsx)(u.InputNumber,{controls:!1,placeholder:`To`,value:e.maxAmount,onChange:e=>i({maxAmount:e}),style:{flex:1}})]}):(0,f.jsx)(u.InputNumber,{controls:!1,placeholder:`0`,value:e.amount,onChange:e=>i({amount:e}),style:{flex:2}}),(0,f.jsx)(u.Select,{value:e.currency??void 0,options:ub,onChange:e=>i({currency:e}),style:{width:80}}),(0,f.jsx)(u.Select,{value:n,options:db,onChange:e=>i({period:e}),style:{width:110}})]}),(0,f.jsxs)(u.Space,{size:`small`,style:{marginTop:8},children:[(0,f.jsx)(u.Switch,{checked:r,onChange:e=>i({isRange:e})}),(0,f.jsx)(`span`,{children:`Range`})]})]})}function yb({field:e,value:t,onChange:n}){return(0,f.jsx)(u.DatePicker,{value:t,onChange:n,placeholder:e.placeholder??`Select date`,style:{width:`100%`},format:`YYYY-MM-DD`})}function bb({field:e,checked:t,onChange:n}){return(0,f.jsx)(u.Checkbox,{checked:t,onChange:n,children:e.checkboxLabel})}function xb({field:e,value:t,onChange:n}){return(0,f.jsx)(u.InputNumber,{value:t,onChange:n,min:e.min,max:e.max,placeholder:e.placeholder,style:{width:`100%`}})}function Sb({options:e,value:t,onChange:n}){return(0,f.jsx)(u.Radio.Group,{value:t,onChange:n,options:e})}var Cb={input:fb,text:fb,textarea:pb,select:mb,"multi-select":hb,"search-select":gb,"mention-textarea":_b,"candidate-rate":vb,"priority-checkbox":bb,"date-picker":yb,number:xb,radio:Sb};function wb(e){return e===`priority-checkbox`?{valuePropName:`checked`}:{}}function Tb(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>t?.[n]??``).trim()}function Eb(e){if(!e)return``;let t=new Date(e);if(Number.isNaN(t.getTime()))return``;let n=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=Math.round((n(new Date)-n(t))/864e5);return r<=0?`Today`:r===1?`Yesterday`:`${r} days ago`}function Db(e){let t=Array.isArray(e?.submissionHistory)?e.submissionHistory:[],n=[e?.lastSubmittedAt,e?.submittedAt,e?.updatedAt,...t.map(e=>e?.submittedAt||e?.updatedAt)].filter(Boolean);return n.length?n.reduce((e,t)=>new Date(t)>new Date(e)?t:e):null}function Ob(e,t){if(typeof e==`string`)return{label:e,value:e};if(e?.label!==void 0&&e?.value!==void 0&&!t?.labelTemplate&&!t?.valueKey)return e;let{labelKey:n,valueKey:r,labelTemplate:i}=t??{},a=i?.includes(`{lastdate}`)?{...e,lastdate:Eb(Db(e))}:e,o=(i?Tb(i,a):null)||(n?e?.[n]:null)||e?.name||e?.fullName||e?.candidateName||e?.title||e?.displayName||e?.text||e?.applicantReferenceId||e?.applicantRefrenceId||String(Object.values(e||{})[0]??``),s=(r?e?.[r]:null)??e?.id??e?._id??e?.applicantReferenceId??e?.applicantRefrenceId??String(Object.values(e||{})[0]??``);return{label:String(o),value:String(s),_raw:e}}function kb(e,t){return(t?.[e.optionsKey]??e.defaultOptions??[]).map(t=>Ob(t,e))}function Ab(e={}){return{selectedIds:[],selectedRecords:[],moduleName:``,removedIds:[],...e}}function jb({form:e,fields:t,initialValues:n,dynamicOptions:r,popupContext:i,extraData:a,removedIds:o,setRemovedIds:s,showAlreadyAssigned:c,onValuesChange:l,getSearchHandler:d,getMentionSearchHandler:p,mentionOptions:m}){let h=c&&a;return!t.length&&!h?null:(0,f.jsxs)(f.Fragment,{children:[h&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`dynamic-popup__already-assigned`,children:[(0,f.jsx)(X,{variant:`caption`,color:`secondary`,children:`Already Assigned People`}),(0,f.jsx)(`div`,{style:{marginTop:6,display:`flex`,flexWrap:`wrap`,gap:6},children:(a?.recruitersData??[]).filter(e=>{let t=String(e?.user_id??e?.id??e?.userId??``);return t&&!o.includes(t)}).map(e=>{let t=String(e?.user_id??e?.id??e?.userId??``),n=e?.name??e?.user_name??e?.userName??e?.email??t;return(0,f.jsx)(u.Tag,{closable:!0,onClose:()=>{t&&s(e=>Array.from(new Set([...e,t])))},children:n},t||n)})})]}),(0,f.jsx)(u.Divider,{style:{margin:`12px 0`}})]}),t.length>0&&(0,f.jsx)(u.Form,{form:e,layout:`vertical`,initialValues:n,onValuesChange:(e,t)=>l(t),children:t.map(e=>{let t=r[e.name]??kb(e,i),n=d(e),a=p(e),o=m[e.name]??[],s=wb(e.type),c=Cb[e.type],l=[];return e.required&&l.push({required:!0,message:`${e.label||`This field`} is required`}),typeof e.validator==`function`&&l.push({validator:(t,n)=>{let r=e.validator(n,i);return r?Promise.reject(Error(r)):Promise.resolve()}}),(0,f.jsx)(u.Form.Item,{name:e.name,label:e.label,rules:l,...s,children:c?(0,f.jsx)(c,{field:e,options:t,onSearch:n,mentionOpts:o,onMentionSearch:a}):null},e.name)})})]})}function Mb({open:e,config:t,api:n,fields:r,popupContext:i,formValues:a}){let[o,s]=(0,l.useState)({}),[c,u]=(0,l.useState)(null);return(0,l.useEffect)(()=>{e||(s({}),u(null))},[e]),(0,l.useEffect)(()=>{if(!e||!t||!n.getOptions)return;let a=new AbortController;return r.forEach(e=>{!e.fetchOptionsKey||e.fetchOptionsParamKey||Promise.resolve(n.getOptions(e,void 0,i)).then(t=>{a.signal.aborted||s(n=>({...n,[e.name]:t}))}).catch(t=>{a.signal.aborted||console.error(`[DynamicPopup] Failed to load options for field "${e.name}":`,t)})}),()=>a.abort()},[e,n,t,r,i]),(0,l.useEffect)(()=>{if(!e||!t||!n.getOptions)return;let o=r.filter(e=>e.fetchOptionsKey&&e.fetchOptionsParamKey);if(!o.length)return;let c=new AbortController;return o.forEach(e=>{let t=a[e.fetchOptionsParamKey]??i[e.fetchOptionsParamKey],r={[e.fetchOptionsParamKey]:t};Promise.resolve(n.getOptions(e,r,i)).then(t=>{c.signal.aborted||s(n=>({...n,[e.name]:t}))}).catch(t=>{c.signal.aborted||console.error(`[DynamicPopup] Failed to load param-dependent options for "${e.name}":`,t)})}),()=>c.abort()},[e,n,t,r,a,i]),(0,l.useEffect)(()=>{if(!e||!t||!n.loadExtraData)return;let r=new AbortController;return Promise.resolve(n.loadExtraData(i)).then(e=>{r.signal.aborted||u(e)}).catch(e=>{r.signal.aborted||(console.error(`[DynamicPopup] Failed to load extra data:`,e),u(null))}),()=>r.abort()},[e,n,t,i]),{dynamicOptions:o,setDynamicOptions:s,extraData:c}}var Nb=500,Pb=3;function Fb({api:e,popupContext:t,setDynamicOptions:n}){let[r,i]=(0,l.useState)({}),a=(0,l.useRef)({}),o=(0,l.useRef)({}),s=(0,l.useRef)({});function c(r){if(!r.searchFetchKey&&!r.searchFetcher)return;let i=e.searchOptions??e.searchFetcher;if(typeof i==`function`)return e=>{if(clearTimeout(a.current[r.name]),e.length<Pb){n(e=>({...e,[r.name]:[]}));return}a.current[r.name]=setTimeout(()=>{o.current[r.name]?.abort();let a=new AbortController;o.current[r.name]=a,Promise.resolve(i(r,e,t)).then(e=>{if(a.signal.aborted)return;let t=Array.isArray(e)?e:e?.items??e?.list??[];n(e=>({...e,[r.name]:t.map(e=>Ob(e,r))}))}).catch(e=>{a.signal.aborted||console.error(`[DynamicPopup] Search failed for field "${r.name}":`,e)})},Nb)}}function u(n){let r=e.getMentionOptions??e.mentionFetcher;if(typeof r==`function`)return e=>{s.current[n.name]?.abort();let a=new AbortController;s.current[n.name]=a,Promise.resolve(r(n,e,t)).then(e=>{if(a.signal.aborted)return;let t=Array.isArray(e)?e:e?.items??e?.list??[];i(e=>({...e,[n.name]:t.map(e=>({value:e.user_name??e.userName??e.username??String(e),label:e.user_name??e.userName??e.username??String(e)}))}))}).catch(e=>{a.signal.aborted||console.error(`[DynamicPopup] Mention search failed for field "${n.name}":`,e)})}}return{mentionOptions:r,getSearchHandler:c,getMentionSearchHandler:u}}function Ib({form:e,config:t,api:n,popupContext:r,resolvedIds:i,dynamicOptions:a,extraData:o,removedIds:s,fields:c,onClose:d,onSubmit:f}){let[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(null);async function _(e){let t={resolvedIds:i,dynamicOptions:a,extraData:o,removedIds:s};if(typeof n.submit==`function`)return n.submit(e,r,t);if(typeof f==`function`)return f(e,r,t)}function v(){if(t){if(!c.length){if(t.mode===`delete`&&typeof n.deleteItems==`function`){m(!0),g(null),Promise.resolve(n.deleteItems(i,r)).then(()=>d()).catch(e=>{let t=e?.message||`Delete failed. Please try again.`;g(t),m(!1),u.message.error(t)});return}if(typeof n.onOk==`function`){m(!0),Promise.resolve(n.onOk(r)).then(()=>d()).catch(e=>{let t=e?.message||`Failed. Please try again.`;u.message.error(t),m(!1)});return}d();return}e.validateFields().then(async e=>{m(!0);try{if((await _(e))?.navigated)return;u.message.success(t.successMessage||`Saved successfully`),d()}catch(e){u.message.error(e?.message||`Failed. Please try again.`)}finally{m(!1)}}).catch(()=>{})}}function y(){m(!1),g(null)}return{handleOk:v,confirming:p,deleteError:h,resetSubmitState:y}}function Lb({open:e=!0,config:t,context:n={},onClose:r,onSubmit:i,api:a={}}){let[o]=u.Form.useForm(),[s,c]=(0,l.useState)({}),[d,p]=(0,l.useState)([]),m=(0,l.useMemo)(()=>Ab(n),[n]),{selectedIds:h=[],selectedRecords:g=[],moduleName:_=``}=m,v=(0,l.useMemo)(()=>h.map((e,t)=>{let n=g[t];return n?.id??n?._id??e}),[h,g]),y=(0,l.useMemo)(()=>t?typeof t.getFields==`function`?t.getFields(m):t.fields??[]:[],[t,m]),b=(0,l.useMemo)(()=>{let e={};return y.forEach(t=>{t.initialValueKey&&m[t.initialValueKey]!==void 0&&(e[t.name]=m[t.initialValueKey])}),e},[y,m]),{dynamicOptions:x,setDynamicOptions:S,extraData:C}=Mb({open:e,config:t,api:a,fields:y,popupContext:m,formValues:s}),{mentionOptions:w,getSearchHandler:T,getMentionSearchHandler:E}=Fb({api:a,popupContext:m,setDynamicOptions:S});function D(){typeof r==`function`&&r()}let{handleOk:O,confirming:k,deleteError:A,resetSubmitState:j}=Ib({form:o,config:t,api:a,popupContext:m,resolvedIds:v,dynamicOptions:x,extraData:C,removedIds:d,fields:y,onClose:D,onSubmit:i});(0,l.useEffect)(()=>{e&&(o.resetFields(),c({}),p(m.removedIds??[]),j())},[e]);let M=h.length,N=String(_).replace(/s$/i,``),P=M===1?N:_,F=g[0]??{},I=t?.getTitleText?t.getTitleText(M,P,F,m):t?.title,L=M===1?F.jobTitle??F.title??F.name??F.fullName??F.candidateName??null:null,R=t?.getBodyText?t.getBodyText(M,N,P,L,m):t?.bodyText??null,z=typeof t?.getNote==`function`?t.getNote(m):t?.note,B=y.filter(e=>e.required).every(e=>{let t=s[e.name];return!(t==null||t===``||Array.isArray(t)&&t.length===0||typeof t==`object`&&!Array.isArray(t)&&Object.keys(t).length===0)}),V=t?.disabledUntilFilled&&!B;return!t||!e?null:(0,f.jsxs)(u.Modal,{open:e,title:(0,f.jsx)(ob,{titleText:I,titleIcon:t.titleIcon}),okText:t.okText||`OK`,cancelText:t.cancelText??`Cancel`,onOk:O,onCancel:D,okButtonProps:{danger:t.okButtonDanger,disabled:V,loading:k},cancelButtonProps:{disabled:k},closable:!k,maskClosable:!1,width:t.width??480,centered:!0,className:`dynamic-popup${t.className?` ${t.className}`:``}`,children:[(0,f.jsx)(sb,{note:z,description:t.description,showSelectedCount:t.showSelectedCount,count:M,itemLabel:P,bodyText:R,deleteError:A}),(0,f.jsx)(cb,{footerNote:t.footerNote}),(0,f.jsx)(jb,{form:o,fields:y,initialValues:b,dynamicOptions:x,popupContext:m,extraData:C,removedIds:d,setRemovedIds:p,showAlreadyAssigned:t.showAlreadyAssigned,onValuesChange:c,getSearchHandler:T,getMentionSearchHandler:E,mentionOptions:w})]})}var Rb={mode:`delete`,getTitleText:(e,t)=>`Delete ${e>0?`${e} `:``}${t}`,titleIcon:`delete`,okText:`Delete`,okButtonDanger:!0,width:420,getBodyText:(e,t,n,r)=>r?`Are you sure you want to delete the ${r} ${t}?`:e>1?`Are you sure you want to delete ${e} selected ${n}?`:`Are you sure you want to delete this ${t}?`,footerNote:`This action cannot be undone.`,fields:[]};function zb(){return{tenantId:localStorage.getItem(`tenantId`)||``,businessId:localStorage.getItem(`businessId`)||``,businessUnitId:localStorage.getItem(`businessUnitId`)||``}}function Bb(){return Number(localStorage.getItem(`userId`))||0}var Vb=e=>e?.data??e;async function Hb(e,t,n){return Vb(await J(E,`/module-data-update`,{method:`PUT`,body:JSON.stringify({module:e,ids:t,updates:{status:n}})}))}async function Ub(e){return J(A,`/delete`,{method:`POST`,body:JSON.stringify({schemaVersion:1,...zb(),jobId:e})})}async function Wb(e){let t=await Promise.all(e.map(e=>J(j,`/delete?_id=${encodeURIComponent(e)}`,{method:`PUT`})));return t[t.length-1]??{}}async function Gb(e,t){return J(E,`/module-data-delete`,{method:`POST`,body:JSON.stringify({module:e,ids:t})})}function Kb(e,t){return e===`job`?Ub(t):e===`candidate`||e===`candidates`?Wb(t):Gb(e,t)}async function qb(e){return Vb(await J(A,`/joblist`,{method:`POST`,body:JSON.stringify({...zb(),searchQuery:e,userId:Bb()})}))}async function Jb(e=``){return fe(A,`/users/any${e?`?search=${encodeURIComponent(e)}`:``}`)}async function Yb({relatedIds:e,module:t,title:n,targetDate:r,notes:i,mentionedUsers:a=[]}){return J(A,`/notes`,{method:`POST`,body:JSON.stringify({schemaVersion:1,...zb(),title:n,notes:i,notesFor:t||`general`,notesRelatedId:Array.isArray(e)&&e.length?e:null,receiver:a,reminder:r?{type:`single`,time:r,interval:``}:null,targetDate:r||null})})}async function Xb({jobId:e,candidateIds:t,hiringStage:n}){return J(A,`/source/hiringStgUpdate`,{method:`PUT`,body:JSON.stringify({...zb(),multiJobId:Array.isArray(e)?e:[e],applicantId:Array.isArray(t)?t:[t],updateStatus:String(n??``).toLowerCase(),updateStatusType:`call`,responseType:`responded`,hiriringStatusChangeType:`tagToJobs`,comments:``,userId:Bb()})})}async function Zb(){return Vb(await J(E,`/masters/dropdown?masterName=candidateGroups&offset=0&limit=50`))}async function Qb({candidateIds:e,groupId:t,groupName:n}){return Vb(await J(j,`/actions/update-group`,{method:`PUT`,body:JSON.stringify({candidateIds:e,groupId:t,groupName:n})}))}async function $b({jobIds:e,rate:t,priority:n}){return J(A,`/assign?type=self`,{method:`PUT`,body:JSON.stringify({multiJobId:Array.isArray(e)?e:[e],userId:Bb(),schemaVersion:1,...zb(),jobPayDetails:t??{},priority:n??!1,priorityFrom:null,recruitersData:[]})})}async function ex(){let e=await fe(A,`/users/manager`);return(Array.isArray(e)?e:e?[e]:[]).map(e=>({...e,label:e.name??e.userName??e.email??String(e.userId??``),value:String(e.userId??e.id??e._id??``)}))}async function tx(e){return e?fe(A,`/self-assign?jobId=${encodeURIComponent(e)}`):null}async function nx({jobIds:e,userId:t,rate:n,priority:r,removedIds:i,existingRecruiters:a}){let o=(a??[]).filter(e=>{let t=String(e?.user_id??e?.id??e?.userId??``);return t&&!(i??[]).includes(t)});return J(A,`/assign?type=other`,{method:`PUT`,body:JSON.stringify({multiJobId:Array.isArray(e)?e:[e],userId:t,schemaVersion:1,...zb(),jobPayDetails:n??{},priority:r??!1,priorityFrom:null,recruitersData:o})})}async function rx({submissionId:e,isMail:t=!1}){return Vb(await J(E,`/submissions/move-to-onboarding`,{method:`POST`,body:JSON.stringify({submissionId:e,isMail:!!t})}))}async function ix(e,t){return Vb(await J(E,`/submissions/approve`,{method:`POST`,body:JSON.stringify({submissionId:e,...t})}))}async function ax(e){return Vb(await J(E,`/submissions/vms-approve?submissionId=${encodeURIComponent(e)}`))}async function ox({submissionId:e,rejectReasonId:t,rejectReason:n,rejectReasonComments:r}){return Vb(await J(E,`/submissions/reject`,{method:`POST`,body:JSON.stringify({submissionId:e,rejectReasonId:t,rejectReason:n,rejectReasonComments:r})}))}async function sx({jobId:e,candidateIds:t}){return J(A,`/source/hiringStgUpdate`,{method:`PUT`,body:JSON.stringify({...zb(),multiJobId:Array.isArray(e)?e:[e],applicantId:Array.isArray(t)?t:[t],updateStatus:`pipeline`,updateStatusType:`call`,responseType:`responded`,hiriringStatusChangeType:`tagToJobs`,comments:``,userId:Bb()})})}var cx={deleteItems:async(e,t)=>{await Kb(t.moduleName,e)}},lx={title:`Quick Submit`,okText:`Submit`,width:480,disabledUntilFilled:!0,getNote:e=>e.moduleName===`candidate`?`Note: Select a job to submit this candidate`:`Note: Select a candidate to submit for this job`,getFields:e=>e.moduleName===`candidate`?[{name:`jobId`,label:`Job list`,type:`search-select`,required:!0,placeholder:`Search Job ID/Job name (minimum 3 characters)`,searchFetchKey:`quickSubmitJobList`}]:[{name:`candidate`,label:`Candidate`,type:`search-select`,required:!0,placeholder:`Search candidate name (minimum 3 character)`,optionsKey:`candidateOptions`,searchFetchKey:`quickSubmitCandidates`,labelTemplate:`{applicantRefrenceId} - {firstName} {lastName} - ({lastdate})`,valueKey:`_id`}]},ux={searchOptions:async(e,t,n)=>{if(e.searchFetchKey===`quickSubmitJobList`){let e=n.selectedRecords?.[0]??{},r=await Ho({searchQuery:t,candidateId:e.id??e._id??n.selectedIds?.[0]});return(Array.isArray(r?.data)?r.data:[]).map(e=>({label:[e.jobReferenceId,e.jobTitle].filter(Boolean).join(` - `)||String(e._id??``),value:e._id??``}))}if(e.searchFetchKey===`quickSubmitCandidates`){let e=n.selectedRecords?.[0]??{},r=n.jobId??e.jobId??e.id??e._id??n.selectedIds?.[0];return Ql({isFromSubmission:n.isFromSubmission,jobId:r,submissionId:n.submissionId,search:t})}return[]},submit:async(e,t)=>{let{navigate:n,selectedRecords:r=[],selectedIds:i=[],moduleName:a,isFromSubmission:o=!1}=t,s=r[0]??{};return n(a===`candidate`?`/submission-create/${e.jobId??``}?candidateId=${s.id??s._id??i[0]??``}&isFromSubmission=${o}`:`/submission-create/${t.jobId??s.jobId??s.id??s._id??i[0]??``}?candidateId=${e.candidate??``}&isFromSubmission=${o}`),{navigated:!0}}},dx={title:`Add Notes & Share`,okText:`Save & Share`,width:480,fields:[{name:`notes`,type:`mention-textarea`,required:!0,rows:5,placeholder:`Add your notes on the job. Use '@' to mention someone.`,mentionFetchKey:`mentionUsers`}]},fx=e=>e?.data??e;async function px({relatedId:e,notes:t,title:n,notesFor:r}){return fx(await wo(E,`/notes`,{method:`POST`,body:JSON.stringify({relatedId:e,notes:t,title:n,notesFor:r})}))}var mx={getMentionOptions:async(e,t)=>Jb(t),submit:async(e,t)=>{let n=Array.isArray(t.selectedIds)?t.selectedIds[0]:t.selectedIds;if(!n)throw Error(`Please select a record before adding a note.`);await px({relatedId:String(n),notes:e.notes,notesFor:t.moduleName})}},hx={title:`Tag to Job`,okText:`Tag`,width:480,disabledUntilFilled:!0,fields:[{name:`jobId`,label:`Job Title / ID`,type:`search-select`,required:!0,placeholder:`Minimum 3 characters`,searchFetchKey:`tagToJobJobList`,valueKey:`_id`,labelTemplate:`{jobReferenceId} - {jobTitle}`},{name:`hiringStage`,label:`Hiring stage`,type:`select`,required:!0,defaultOptions:[{label:`Shortlisted`,value:`Shortlisted`},{label:`Pipeline`,value:`Pipeline`}]}]},gx={searchOptions:async(e,t)=>e.searchFetchKey===`tagToJobJobList`?qb(t):[],submit:async(e,t)=>{await Xb({jobId:e.jobId,candidateIds:t.selectedIds,hiringStage:e.hiringStage})}},_x={title:`Change Status`,okText:`Apply`,width:420,showSelectedCount:!0,fields:[{name:`status`,label:`New Status`,type:`select`,required:!0,placeholder:`Select a status`,optionsKey:`statusOptions`,initialValueKey:`currentStatus`,defaultOptions:[{label:`Active`,value:`active`},{label:`Inactive`,value:`inactive`},{label:`Pending`,value:`pending`},{label:`Closed`,value:`closed`}]}]},vx={submit:async(e,t)=>{await Hb(t.moduleName,t.selectedIds,e.status)}},yx={getTitleText:e=>`Remove ${e>1?`${e} Candidates`:`Candidate`} from Shortlist`,titleIcon:`delete`,okText:`Remove`,okButtonDanger:!0,width:420,getBodyText:e=>e>1?`Are you sure you want to remove ${e} selected candidates from the shortlist?`:`Are you sure you want to remove this candidate from the shortlist?`,footerNote:`The candidate will be moved back to the pipeline.`,fields:[]},bx={onOk:async e=>{await sx({jobId:e.jobId??e.selectedIds[0],candidateIds:e.selectedIds})}},xx={title:`Add to Groups`,description:`Select a group to add the selected candidate(s) to`,okText:`Add to Group`,width:480,disabledUntilFilled:!0,fields:[{name:`groupId`,label:`Group`,type:`select`,required:!0,placeholder:`Select a group`,fetchOptionsKey:`candidateGroups`}]},Sx={getOptions:async e=>e.fetchOptionsKey===`candidateGroups`?Zb():[],submit:async(e,t,{dynamicOptions:n})=>{let r=(n.groupId??[]).find(t=>String(t.value)===String(e.groupId));await Qb({candidateIds:t.selectedIds,groupId:e.groupId,groupName:r?.label??``})}},Cx={title:`Self Assign`,okText:`Yes`,cancelText:`No`,width:420,bodyText:`Are you sure you want to assign this job?`,fields:[]},wx={onOk:async e=>{await $b({jobIds:e.selectedIds})}},Tx={getTitleText:(e,t,n)=>{let r=n?.jobTitle||n?.title||``;return r?`Assign - ${r}`:`Assign`},okText:`Assign`,width:520,disabledUntilFilled:!0,showAlreadyAssigned:!0,fields:[{name:`assignToUserId`,label:`Assign to`,type:`select`,required:!0,placeholder:`Select a user`,fetchOptionsKey:`assignToUsers`},{name:`candidateRate`,label:`Candidate Rate`,type:`candidate-rate`},{name:`priority`,label:`Priority`,type:`priority-checkbox`,checkboxLabel:`Mark as High`}]},Ex={getOptions:async e=>e.fetchOptionsKey===`assignToUsers`?ex():[],loadExtraData:async e=>tx(e.selectedIds[0]),submit:async(e,t,{removedIds:n,extraData:r})=>{await nx({jobIds:t.selectedIds,userId:e.assignToUserId,rate:e.candidateRate,priority:e.priority,removedIds:n,existingRecruiters:r?.recruitersData})}},Dx={title:`Add Sticky Notes`,okText:`Save`,width:480,fields:[{name:`heading`,label:`Heading`,type:`input`,required:!0,placeholder:`Enter heading`},{name:`targetDate`,label:`Target Date`,type:`date-picker`,required:!1},{name:`comments`,label:`Comments`,type:`mention-textarea`,required:!0,rows:5,placeholder:`Enter your note here... Use '@' to mention someone.`,mentionFetchKey:`mentionUsers`}]},Ox={getMentionOptions:async(e,t)=>Jb(t),submit:async(e,t)=>{let n=(e.comments?.match(/@([\w.]+)/g)??[]).map(e=>e.slice(1));await Yb({relatedIds:t.selectedIds,module:t.moduleName,title:e.heading,targetDate:e.targetDate?e.targetDate.toISOString():``,notes:e.comments,mentionedUsers:n}),window.dispatchEvent(new Event(`sticky-notes:refresh`))}},kx={title:`Move to Onboarding`,bodyText:`Are you sure you want to move this candidate to onboarding?`,okText:`Yes`,cancelText:`No`,width:420,successMessage:`Moved to onboarding successfully`,fields:[{name:`sendOnboardingEmail`,type:`priority-checkbox`,checkboxLabel:`Send Onboarding Email`}]},Ax={submit:async(e,t)=>{await rx({submissionId:t.selectedIds[0],isMail:e.sendOnboardingEmail})}};function jx(e){let t=(e.selectedRecords?.[0]??{}).candidateRate??{};return t.candidateAcceptedRate?{amount:t.candidateAcceptedRate,symbol:t.candidateAcceptedCurrencySymbol||`$`,unit:t.candidateAcceptedPayUnit}:null}var Mx={title:`Approve Rate`,okText:`Approve`,width:480,className:`medium-modal`,successMessage:`Rate approved`,getBodyText:(e,t,n,r,i)=>{let a=jx(i);return`Candidate Rate: ${a?`${a.symbol}${a.amount}/${a.unit}`:`-`}`},fields:[{name:`candidateProposedRate`,label:`Proposed Rate`,type:`number`,required:!0,placeholder:`Amount`,min:0,validator:(e,t)=>{if(e==null||e===``)return;let n=jx(t);if(n&&Number(e)<=Number(n.amount))return`Proposed rate must be greater than Candidate Rate`}},{name:`candidateProposedRateCurrency`,label:`Currency`,type:`select`,required:!0,defaultOptions:[{label:`$ USD`,value:`$`},{label:`₹ INR`,value:`₹`},{label:`€ EUR`,value:`€`}]},{name:`candidateProposedRateUnit`,label:`Unit`,type:`select`,required:!0,defaultOptions:[{label:`Year`,value:`yr`},{label:`Month`,value:`mo`},{label:`Week`,value:`wk`},{label:`Hour`,value:`hr`},{label:`Daily`,value:`day`}]},{name:`submitVia`,label:`Submit Via`,type:`radio`,required:!0,defaultOptions:[{label:`Mail`,value:`Mail`},{label:`VMS`,value:`VMS`}]}]},Nx={submit:async(e,t)=>{let n=t.selectedIds[0];await ix(n,{candidateProposedRate:e.candidateProposedRate,candidateProposedRateCurrency:e.candidateProposedRateCurrency,candidateProposedRateUnit:e.candidateProposedRateUnit,submitVia:e.submitVia}),e.submitVia===`VMS`?await ax(n):u.message.info(`Approved — use Send Mail to notify the client.`)}},Px=[{id:1,name:`Re-Submission`},{id:2,name:`Candidate doesn't fit into the profile`},{id:3,name:`Incomplete candidate details - (Re-Submission)`}],Fx={title:`Reject`,okText:`Reject`,okButtonDanger:!0,width:480,successMessage:`Submission rejected successfully`,fields:[{name:`rejectReason`,label:`Rejection Reasons`,type:`select`,required:!0,placeholder:`Select rejection reasons`,defaultOptions:Px.map(e=>({label:e.name,value:e.id}))},{name:`rejectReasonComments`,label:`Comments`,type:`textarea`,required:!0,rows:4}]},Ix={submit:async(e,t)=>{let n=Px.find(t=>t.id===e.rejectReason);await ox({submissionId:t.selectedIds[0],rejectReasonId:e.rejectReason,rejectReason:n?.name??``,rejectReasonComments:e.rejectReasonComments})}},Lx={delete:Rb,"quick-submit":lx,"add-notes":dx,"tag-to-job":hx,"change-status":_x,"remove-from-shortlist":yx,"add-to-groups":xx,"self-assign":Cx,"others-assign":Tx,"sticky-notes":Dx,"move-to-onboarding":kx,"approve-rate":Mx,reject:Fx},Rx={delete:cx,"quick-submit":ux,"add-notes":mx,"tag-to-job":gx,"change-status":vx,"remove-from-shortlist":bx,"add-to-groups":Sx,"self-assign":wx,"others-assign":Ex,"sticky-notes":Ox,"move-to-onboarding":Ax,"approve-rate":Nx,reject:Ix},zx={text:`input`,string:`input`,textarea:`textarea`,date:`date-picker`,datepicker:`date-picker`,multiselect:`multi-select`,lookup:`search-select`};function Bx(e){if(!e)return null;let t=[...e.groups??[]].sort((e,t)=>Number(e.order??0)-Number(t.order??0)).flatMap(e=>[...e.fields??[]].filter(e=>e.show!==0&&e.show!==!1).sort((e,t)=>Number(e.order??0)-Number(t.order??0)).map(e=>({...e,name:e.name??e.field,label:e.label??e.field,type:zx[String(e.type??`text`).toLowerCase()]??e.type??`input`,required:e.required??e.req===1,options:(e.options??[]).map(e=>({label:e.label??e.name??e.value,value:e.value??e.id??e.label}))})));return{title:e.label,fields:t}}function Vx({apiMap:e={},extraConfigs:t={}}){let n=(0,l.useMemo)(()=>({...Rx,...e}),[e]),r=(0,l.useMemo)(()=>({...Lx,...t}),[t]),{popupKey:i}=(0,p.useParams)(),a=(0,p.useNavigate)(),{state:o={}}=(0,p.useLocation)(),[s,c]=(0,l.useState)({key:``,config:null});(0,l.useEffect)(()=>{let e=!1;if(!i||!o.moduleName)return;let t=`${o.moduleName}:${i}`;return Nr(o.moduleName,`popup`,i).then(n=>{e||c({key:t,config:Bx(n[0])})}).catch(()=>{e||c({key:t,config:null})}),()=>{e=!0}},[i,o.moduleName]);let u=(0,l.useMemo)(()=>{let e=r[i],t=`${o.moduleName}:${i}`,n=s.key===t?s.config:null;return n?{...e,...n}:e},[s,r,i,o.moduleName]),d=(0,l.useMemo)(()=>({selectedIds:o.selectedIds??[],selectedRecords:o.selectedRecords??[],moduleName:o.moduleName??``,navigate:a,...o.popupContext??{}}),[a,o.selectedIds,o.selectedRecords,o.moduleName,o.popupContext]),m=(0,l.useMemo)(()=>{let e=o.popupAction;return e?.apiPath?{submit:(t,n)=>{let r=String(e.apiMethod||`POST`).toUpperCase();return J(E,e.apiPath.startsWith(`/`)?e.apiPath:`/${e.apiPath}`,{method:r,body:[`GET`,`DELETE`].includes(r)?void 0:JSON.stringify({...t,selectedIds:n.selectedIds,selectedRecords:n.selectedRecords,moduleName:n.moduleName})})}}:{}},[o.popupAction]);return(0,f.jsx)(Lb,{open:!0,config:u,context:d,onClose:()=>a(-1),api:{...n[i]??{},...m}})}var Hx={title:`Vendor Share`,maxVendorSelect:1e3,defaultTab:`myVendor`,defaultPageSize:10,vendorTabs:[{key:`myVendor`,label:`My Vendors`},{key:`allVendor`,label:`All Vendors`}],vendorColumns:[{title:`Vendor Name`,dataIndex:`vendorName`,key:`vendorName`},{title:`Email`,dataIndex:`vendorEmail`,key:`vendorEmail`},{title:`Location`,dataIndex:`vendorLocation`,key:`vendorLocation`},{title:`Updated On`,dataIndex:`updatedOn`,key:`updatedOn`}]},Ux={getVendorList:({jobId:e,limit:t,offset:n,type:r})=>vo({jobId:e,limit:t,offset:n,sortBy:`new`,type:r}),getMailDetails:e=>yo(e),submit:({jobId:e,toMail:t,ccMail:n,bccMail:r,subject:i,contents:a})=>bo({jobId:e,toMail:t,ccMail:n,bccMail:r,subject:i,contents:a})},Wx=Hx.vendorColumns.map(e=>({...e,render:e=>e||`-`}));function Gx(){let e=(0,p.useNavigate)(),t=(0,p.useLocation)(),{selectedIds:n=[],selectedRecords:r=[],recipients:i=[],subject:a=``,onSend:o,moduleName:s=``,popupAction:c={}}=t.state??{},m=n[0]??r[0]?._id??r[0]?.id,[h,g]=(0,l.useState)({to:i.join(`, `),cc:``,bcc:``,subject:a,contents:``,showCc:!1,showBcc:!1}),[_,v]=(0,l.useState)(!m),[y,b]=(0,l.useState)(Hx.defaultTab),[x,S]=(0,l.useState)(``),[C,w]=(0,l.useState)([]),[T,E]=(0,l.useState)(0),[D,O]=(0,l.useState)(0),[k,A]=(0,l.useState)(0),[j,M]=(0,l.useState)(1),[N,P]=(0,l.useState)(Hx.defaultPageSize),[F,I]=(0,l.useState)(!1),[L,R]=(0,l.useState)([]);(0,l.useEffect)(()=>{if(!m)return;let e=!1;I(!0);let t=x?100:N,n=x?0:(j-1)*N;return Ux.getVendorList({jobId:m,limit:t,offset:n,type:y}).then(t=>{if(e)return;let n=t?.data?.vendorList??t?.data??[],r=t?.data?.myVendorCount??0,i=t?.data?.allVendorCount??0;w(Array.isArray(n)?n:[]),E(r),O(i),A(y===`myVendor`?r:i)}).catch(()=>{e||(w([]),A(0))}).finally(()=>{e||I(!1)}),()=>{e=!0}},[m,y,j,N,x]),(0,l.useEffect)(()=>{m&&Ux.getMailDetails(m).then(e=>g(t=>({...t,subject:e.subject||t.subject,contents:e.contents||t.contents,to:e.toMail?.length?Array.isArray(e.toMail)?e.toMail.join(`, `):String(e.toMail):t.to,cc:e.ccMail?.length?Array.isArray(e.ccMail)?e.ccMail.join(`, `):String(e.ccMail):t.cc}))).catch(()=>{}).finally(()=>v(!0))},[m]);let z=(0,l.useMemo)(()=>L.map(e=>C.find(t=>t.vendorId===e)?.vendorEmail??``).filter(Boolean),[L,C]),B=(0,l.useMemo)(()=>({...h,bcc:[...new Set([...Ny(h.bcc),...z])].join(`, `),showBcc:h.showBcc||z.length>0}),[h,z]);function V(e){let t=new Set(z);g({...e,bcc:Ny(e.bcc).filter(e=>!t.has(e)).join(`, `)})}let H=(Ny(B.to).length||Ny(B.bcc).length)&&Py(B.to)&&Py(B.cc)&&Py(B.bcc)&&B.subject.trim(),U=e=>e===`myVendor`?T:D;function W(){e(-1)}function G(){H&&Ux.submit({jobId:m,toMail:Ny(B.to),ccMail:Ny(B.cc),bccMail:Ny(B.bcc),subject:B.subject,contents:B.contents}).then(t=>{t?.status===!0?(u.message.success(t?.data||`Mail sent successfully.`),typeof o==`function`&&o({...B,message:B.contents,selectedIds:n}),e(-1)):u.message.error(t?.message||t?.data||`Failed to send mail. Please try again.`)}).catch(e=>{u.message.error(e?.message||`Failed to send mail. Please try again.`)})}let K=(0,l.useMemo)(()=>{if(!x)return C;let e=x.toLowerCase();return C.filter(t=>(t.vendorName??``).toLowerCase().includes(e)||(t.vendorEmail??``).toLowerCase().includes(e)||(t.vendorLocation??``).toLowerCase().includes(e))},[C,x]);return(0,f.jsx)(u.Drawer,{open:!0,placement:`right`,onClose:W,closable:!1,rootClassName:`vendor-share`,width:`95%`,footer:(0,f.jsxs)(`div`,{className:`vendor-share__footer`,children:[(0,f.jsx)(u.Button,{onClick:W,children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,disabled:!H,onClick:G,children:`Send`})]}),children:(0,f.jsxs)(`div`,{className:`vendor-share__body`,children:[(0,f.jsxs)(`div`,{className:`vendor-share__left`,children:[(0,f.jsxs)(`div`,{className:`vendor-share__vendor-header`,children:[(0,f.jsxs)(`div`,{className:`vendor-share__vendor-header-row`,children:[(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.CloseOutlined,{}),onClick:W,size:`small`,style:{marginRight:8}}),(0,f.jsx)(`span`,{className:`dynamic-popup__header-icon-box`,children:(0,f.jsx)(d.TeamOutlined,{})}),(0,f.jsx)(`span`,{className:`dynamic-popup__header-label`,children:`Vendor List`}),(0,f.jsxs)(`div`,{className:`vendor-share__vendor-search`,children:[(0,f.jsx)(d.SearchOutlined,{className:`vendor-share__search-icon`}),(0,f.jsx)(u.Input,{variant:`borderless`,placeholder:`Search vendor`,value:x,onChange:e=>{S(e.target.value),M(1)},className:`vendor-share__search-input`})]})]}),(0,f.jsx)(`div`,{className:`vendor-share__vendor-tabs`,children:Hx.vendorTabs.map(e=>(0,f.jsxs)(`span`,{className:`vendor-share__vendor-tab${y===e.key?` vendor-share__vendor-tab--active`:``}`,onClick:()=>{b(e.key),M(1),R([])},children:[e.label,` (`,U(e.key),`)`]},e.key))})]}),(0,f.jsx)(`div`,{className:`vendor-share__vendor-table-wrapper`,children:(0,f.jsx)(u.Table,{rowKey:e=>e.vendorId,columns:Wx,dataSource:K,loading:F,pagination:!1,size:`small`,rowSelection:{selectedRowKeys:L,onChange:e=>{e.length>Hx.maxVendorSelect||R(e)}},scroll:{y:`calc(100vh - 340px)`}})}),(0,f.jsx)(`div`,{className:`vendor-share__vendor-footer`,children:(0,f.jsx)(Rs,{current:j,pageSize:N,total:k,onChange:e=>M(e),onPageSizeChange:e=>P(e)})})]}),(0,f.jsx)(`div`,{className:`vendor-share__right`,children:(0,f.jsx)(zy,{value:B,onChange:V,moduleName:s,defaultTemplateId:c.defaultTemplateId??t.state?.defaultTemplateId??``,ready:_,contextRecords:r,title:`Share`,hint:`Select vendors or add email addresses`,bccHint:`Vendor emails are added automatically`,afterBcc:L.length>0?(0,f.jsxs)(`div`,{className:`vendor-share__selected-count`,children:[L.length,` / `,Hx.maxVendorSelect,` Vendors selected`]}):null})})]})})}var Kx={EMAIL:/^[a-zA-Z0-9._%+-]+@[a-zA-Z][a-zA-Z-]*\.[a-zA-Z]{2,}$/,PHONE:/^[0-9]{10}$/,PASSWORD:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,ALPHABETS:/^[A-Za-z ]+$/,ALPHANUMERIC:/^(?!\s)[A-Za-z0-9 ]+$/,NUMBER:/^[0-9]+$/,URL:/^(https?:\/\/)?(www\.)?([a-zA-Z0-9-]+\.)+(com|org|net|in|co|io|gov|edu)(\/[^\s]*)?$/i,CANDIDATE_ID:/^[A-Za-z0-9-]+$/,REMARKS:/^[A-Za-z0-9\s.,'"\-()!?/@#$%&]*$/,DESIGNATION:/^[a-zA-Z0-9\s,.\-&()]{2,100}$/,DOB:/^(0[1-9]|1[0-2])\/(0[1-9]|[12][0-9]|3[01])\/\d{4}$/,COMPANY_NAME:/^[A-Za-z0-9\s&.,'()-]+$/,FIRST_NAME:/^[A-Z][a-zA-Z]*$/,FULL_NAME:/^[A-Z][a-zA-Z]*(?: [A-Z][a-zA-Z]*)*$/,NO_SPACES:/^\S+$/,STARTS_WITH_CAPITAL:/^[A-Z].*$/},qx={SINGLE_FILE_COUNT:1,MULTI_FILE_COUNT:5,MAX_FILE_SIZE:2,ALLOWED_FILE_TYPES:[`image/jpeg`,`image/png`,`application/pdf`]},$={REQUIRED:e=>`Mandatory Field`,INVALID_EMAIL:`Please enter a valid email address.`,INVALID_PHONE:`Phone number must contain exactly 10 digits.`,INVALID_PASSWORD:`Password must contain uppercase, lowercase, number, special character and minimum 8 characters.`,INVALID_ALPHABETS:`Only alphabets and spaces are allowed.`,INVALID_ALPHANUMERIC:`Only letters, numbers and spaces are allowed.`,INVALID_NUMBER:`Only numbers are allowed.`,INVALID_URL:`Please enter a valid URL.`,INVALID_CANDIDATE_ID:e=>`${e} can contain only letters, numbers and hyphens.`,INVALID_REMARKS:`Remarks contain invalid characters.`,INVALID_DESIGNATION:`Designation contains invalid characters.`,INVALID_DOB:`DOB must be in MM/DD/YYYY format.`,INVALID_LINKEDIN:`Please enter a valid LinkedIn URL.`,INVALID_COMPANY_NAME:`Company name contains invalid characters.`,INVALID_FIRST_NAME:`First letter must be capital and spaces are not allowed.`,INVALID_FULL_NAME:`Each word must start with a capital letter.`,NO_SPACES_ALLOWED:`Spaces are not allowed.`,MUST_START_WITH_CAPITAL:`First letter must be capital.`,INVALID_FILE_TYPE:`Only JPG, PNG and PDF files are allowed.`,INVALID_FILE_SIZE:`File upload must be ${qx.MAX_FILE_SIZE} MB below.`,INVALID_FILE_TYPE:`Only JPG, PNG and PDF files are allowed.`,SINGLE_FILE_ONLY:`Only one file can be uploaded.`},Jx={FIRST_NAME_MIN:3,FIRST_NAME_MAX:30},Yx={REMARKS_MIN:10,REMARKS_MAX:250},Xx={removeSpaces:(e=``)=>e.replace(/\s/g,``),capitalizeFirstLetter:(e=``)=>e.charAt(0).toUpperCase()+e.slice(1),capitalizeWords:(e=``)=>e.replace(/\b\w/g,e=>e.toUpperCase()),removeExtraSpaces:(e=``)=>e.replace(/\s+/g,` `).trim(),firstNameFormatter:(e=``)=>e.replace(/\s+/g,` `).trimStart().replace(/\b\w/g,e=>e.toUpperCase()),fullNameFormatter:(e=``)=>e.replace(/\s+/g,` `).trimStart().replace(/\b\w/g,e=>e.toUpperCase()),phoneFormatter:(e=``)=>e.replace(/\D/g,``).slice(0,10),dobFormatter:(e=``)=>{let t=e.replace(/\D/g,``);return t.length<=2?t:t.length<=4?`${t.slice(0,2)}/${t.slice(2)}`:`${t.slice(0,2)}/${t.slice(2,4)}/${t.slice(4,8)}`}},Zx={required:(e=`Field`)=>({required:!0,message:$.REQUIRED(e)}),email:()=>({pattern:Kx.EMAIL,message:$.INVALID_EMAIL}),phone:()=>({pattern:Kx.PHONE,message:$.INVALID_PHONE}),password:()=>({pattern:Kx.PASSWORD,message:$.INVALID_PASSWORD}),alphabets:()=>({pattern:Kx.ALPHABETS,message:$.INVALID_ALPHABETS}),alphanumeric:()=>({pattern:Kx.ALPHANUMERIC,message:$.INVALID_ALPHANUMERIC}),number:()=>({pattern:Kx.NUMBER,message:$.INVALID_NUMBER}),url:()=>({pattern:Kx.URL,message:$.INVALID_URL}),candidateId:(e=`ID`)=>({pattern:Kx.CANDIDATE_ID,message:$.INVALID_CANDIDATE_ID(e)}),remarks:()=>({pattern:Kx.REMARKS,message:$.INVALID_REMARKS,REMARKS_MIN:`Remarks must be at least ${Yx.REMARKS_MIN} characters.`,REMARKS_MAX:`Remarks must not exceed ${Yx.REMARKS_MAX} characters.`}),designation:()=>({pattern:Kx.DESIGNATION,message:$.INVALID_DESIGNATION}),dob:(e=!0)=>({validator:(t,n)=>{if(!n)return e?Promise.reject(Error(`Date of Birth is required.`)):Promise.resolve();if(!Kx.DOB.test(n))return Promise.reject(Error($.INVALID_DOB));let r=(0,m.default)(n,`MM/DD/YYYY`,!0);if(!r.isValid())return Promise.reject(Error($.INVALID_DOB));let i=(0,m.default)().endOf(`day`);return r.isAfter(i)?Promise.reject(Error(`Date of Birth cannot be a future date.`)):i.diff(r,`year`)<21?Promise.reject(Error(`Age must be at least 21 years.`)):Promise.resolve()}}),linkedin:()=>({pattern:Kx.LINKEDIN,message:$.INVALID_LINKEDIN}),companyName:()=>({pattern:Kx.COMPANY_NAME,message:$.INVALID_COMPANY_NAME}),firstName:()=>({pattern:Kx.FIRST_NAME,message:$.INVALID_FIRST_NAME,FIRST_NAME_MIN:`First Name must be at least ${Jx.FIRST_NAME_MIN} characters.`,FIRST_NAME_MAX:`First Name must not exceed ${Jx.FIRST_NAME_MAX} characters.`}),firstNameMinLength:()=>({min:Jx.FIRST_NAME_MIN,message:$.FIRST_NAME_MIN}),firstNameMaxLength:()=>({max:Jx.FIRST_NAME_MAX,message:$.FIRST_NAME_MAX}),remarksMinLength:()=>({min:Yx.REMARKS_MIN,message:$.REMARKS_MIN}),remarksMaxLength:()=>({max:Yx.REMARKS_MAX,message:$.REMARKS_MAX}),fullName:()=>({pattern:Kx.FULL_NAME,message:$.INVALID_FULL_NAME}),noSpaces:()=>({pattern:Kx.NO_SPACES,message:$.NO_SPACES_ALLOWED}),startsWithCapital:()=>({pattern:Kx.STARTS_WITH_CAPITAL,message:$.MUST_START_WITH_CAPITAL}),fileUpload:()=>({validator:(e,t)=>{if(!t||t.length===0)return Promise.resolve();for(let e of t){let t=e.originFileObj||e;if(!(t.size/1024/1024<=qx.MAX_FILE_SIZE))return u.message.error($.INVALID_FILE_SIZE),Promise.reject(Error($.INVALID_FILE_SIZE));if(!qx.ALLOWED_FILE_TYPES.includes(t.type))return Promise.reject(Error($.INVALID_FILE_TYPE))}return Promise.resolve()}}),singleFileUpload:()=>({validator:(e,t)=>{if(!t||t.length===0)return Promise.resolve();if(t.length>qx.SINGLE_FILE_COUNT)return Promise.reject(Error($.SINGLE_FILE_ONLY));let n=t[0];return n.size/1024/1024<qx.MAX_FILE_SIZE?qx.ALLOWED_FILE_TYPES.includes(n.type)?Promise.resolve():Promise.reject(Error($.INVALID_FILE_TYPE)):Promise.reject(Error($.INVALID_FILE_SIZE))}}),multiFileUpload:()=>({validator:(e,t)=>{if(!t||t.length===0)return Promise.resolve();if(t.length>qx.MULTI_FILE_COUNT)return Promise.reject(Error($.INVALID_FILE_COUNT));for(let e of t){if(!(e.size/1024/1024<qx.MAX_FILE_SIZE))return Promise.reject(Error($.INVALID_FILE_SIZE));if(!qx.ALLOWED_FILE_TYPES.includes(e.type))return Promise.reject(Error($.INVALID_FILE_TYPE))}return Promise.resolve()}})},Qx={beforeUpload:e=>[`image/jpeg`,`image/png`,`application/pdf`].includes(e.type)?e.size/1024/1024<=2?!1:(u.message.error(`File upload must be 2 MB below.`),u.Upload.LIST_IGNORE):(u.message.error(`Only JPG, PNG and PDF files are allowed.`),u.Upload.LIST_IGNORE)},$x=()=>{let[e]=u.Form.useForm();return(0,f.jsx)(`div`,{style:{padding:24},children:(0,f.jsxs)(u.Form,{form:e,layout:`vertical`,onFinish:e=>{console.log(`Form Values:`,e)},autoComplete:`off`,children:[(0,f.jsxs)(u.Row,{gutter:16,children:[(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Email`,name:`email`,rules:[Zx.required(`Email`),Zx.email()],children:(0,f.jsx)(u.Input,{})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Phone Number`,name:`phone`,rules:[Zx.required(`Phone Number`),Zx.phone()],validateTrigger:[`onBlur`,`onChange`],children:(0,f.jsx)(u.Input,{maxLength:10,onChange:t=>{e.setFieldsValue({phone:Xx.phoneFormatter(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Password`,name:`password`,rules:[Zx.required(`Password`),Zx.password()],children:(0,f.jsx)(u.Input.Password,{})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Full Name`,name:`fullName`,rules:[Zx.required(`Full Name`),Zx.alphabets(),Zx.firstNameMinLength(),Zx.firstNameMaxLength()],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({fullName:Xx.firstNameFormatter(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Username`,name:`username`,rules:[Zx.required(`Username`),Zx.alphanumeric()],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({username:Xx.removeExtraSpaces(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Website URL`,name:`website`,rules:[Zx.required(`Website URL`),Zx.url()],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({website:Xx.removeExtraSpaces(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`MSP Req ID`,name:`mspreqID`,rules:[Zx.required(`MSP Req ID`),Zx.candidateId(`MSP Req ID`)],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({mspreqID:Xx.removeExtraSpaces(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Candidate ID`,name:`candidateId`,rules:[Zx.required(`Candidate ID`),Zx.candidateId(`Candidate ID`)],children:(0,f.jsx)(u.Input,{onChange:t=>{e.setFieldsValue({candidateId:Xx.removeExtraSpaces(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:24,children:(0,f.jsx)(u.Form.Item,{label:`Remarks`,name:`remarks`,rules:[Zx.required(`Remarks`),Zx.remarks(),Zx.remarksMinLength(),Zx.remarksMaxLength()],children:(0,f.jsx)(u.Input.TextArea,{rows:4})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Designation`,name:`designation`,rules:[Zx.required(`Designation`),Zx.designation()],children:(0,f.jsx)(u.Input,{})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Date of Birth`,name:`dob`,rules:[Zx.dob()],children:(0,f.jsx)(u.Input,{placeholder:`MM/DD/YYYY`,maxLength:10,onChange:t=>{e.setFieldsValue({dob:Xx.dobFormatter(t.target.value)})}})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Company Name`,name:`companyName`,rules:[Zx.required(`Company Name`),Zx.companyName()],children:(0,f.jsx)(u.Input,{})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{name:`contractType`,label:`Contract Type`,children:(0,f.jsxs)(u.Select,{showSearch:!0,allowClear:!0,filterOption:(e,t)=>(t?.label??``).toLowerCase().includes(e.toLowerCase()),children:[(0,f.jsx)(u.Select.Option,{value:`C2C`,label:`C2C`,children:`C2C`}),(0,f.jsx)(u.Select.Option,{value:`W2-Contract`,label:`W2-Contract`,children:`W2-Contract`}),(0,f.jsx)(u.Select.Option,{value:`W2-Fulltime`,label:`W2-Fulltime`,children:`W2-Fulltime`}),(0,f.jsx)(u.Select.Option,{value:`1099`,label:`1099`,children:`1099`})]})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{name:`candidateProposedRateCurrency`,label:`Currency`,children:(0,f.jsxs)(u.Select,{showSearch:!0,allowClear:!0,children:[(0,f.jsx)(u.Select.Option,{value:`$`,children:`$`}),(0,f.jsx)(u.Select.Option,{value:`₹`,children:`₹`}),(0,f.jsx)(u.Select.Option,{value:`€`,children:`€`}),(0,f.jsx)(u.Select.Option,{value:`zł`,children:`zł`}),(0,f.jsx)(u.Select.Option,{value:`£`,children:`£`}),(0,f.jsx)(u.Select.Option,{value:`kr`,children:`kr`}),(0,f.jsx)(u.Select.Option,{value:`Fr`,children:`Fr`}),(0,f.jsx)(u.Select.Option,{value:`kr`,children:`kr`})]})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Resume new`,name:`resume`,children:(0,f.jsx)(u.Upload,{beforeUpload:Qx.beforeUpload,maxCount:1,children:(0,f.jsx)(u.Button,{children:`Upload Resume`})})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Documents`,name:`documents`,valuePropName:`fileList`,getValueFromEvent:e=>e?.fileList,rules:[Zx.multiFileUpload()],children:(0,f.jsx)(u.Upload,{multiple:!0,beforeUpload:Qx.beforeUpload,children:(0,f.jsx)(u.Button,{children:`Upload Documents`})})})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{label:`Upload File`,name:`file`,valuePropName:`fileList`,getValueFromEvent:e=>e?.fileList,rules:[Zx.fileUpload()],children:(0,f.jsx)(u.Upload,{beforeUpload:Qx.beforeUpload,maxCount:1,children:(0,f.jsx)(u.Button,{children:`Upload`})})})})]}),(0,f.jsx)(u.Row,{children:(0,f.jsx)(u.Form.List,{name:`users`,children:(e,{add:t,remove:n})=>(0,f.jsxs)(f.Fragment,{children:[e.map(({key:e,name:t,...r})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Col,{span:12,children:(0,f.jsx)(u.Form.Item,{required:!0,...r,rules:[{required:!0,message:`First name is requried`}],name:[t,`first`],children:(0,f.jsx)(u.Input,{placeholder:`First Name`})})}),(0,f.jsx)(u.Col,{span:11,children:(0,f.jsx)(u.Form.Item,{...r,required:!0,name:[t,`last`],children:(0,f.jsx)(u.Input,{placeholder:`Last Name`})})}),(0,f.jsx)(u.Col,{span:1,children:(0,f.jsx)(d.MinusCircleOutlined,{onClick:()=>n(t)})})]})),(0,f.jsx)(u.Form.Item,{children:(0,f.jsx)(u.Button,{type:`dashed`,onClick:()=>t(),block:!0,icon:(0,f.jsx)(d.PlusOutlined,{}),children:`Add field`})})]})})}),(0,f.jsxs)(u.Form.Item,{children:[(0,f.jsx)(u.Button,{type:`primary`,htmlType:`submit`,children:`Submit`}),(0,f.jsx)(u.Button,{style:{marginLeft:10},onClick:()=>e.resetFields(),children:`Reset`})]})]})})},{Text:eS}=u.Typography,tS=[{label:`Total Jobs`,value:1697,icon:`fileText`},{label:`Active Jobs`,value:1685,icon:`checkCircle`},{label:`My Jobs`,value:600,icon:`user`}],nS={fileText:(0,f.jsx)(d.FileTextOutlined,{}),checkCircle:(0,f.jsx)(d.CheckCircleOutlined,{}),user:(0,f.jsx)(d.UserOutlined,{}),filter:(0,f.jsx)(d.FilterOutlined,{})};function rS({stats:e=tS}){return(0,f.jsx)(u.Card,{children:(0,f.jsx)(u.Row,{gutter:[12,12],children:e.map(e=>(0,f.jsx)(u.Col,{xs:24,sm:24,md:8,lg:8,xl:8,children:(0,f.jsxs)(u.Card,{className:`stats-inner-card`,children:[(0,f.jsxs)(u.Space,{align:`center`,children:[nS[e.icon]??nS.fileText,(0,f.jsx)(eS,{children:e.label})]}),(0,f.jsx)(u.Statistic,{value:e.value})]})},e.label))})})}var{Text:iS}=u.Typography,aS=[{key:`job`,label:`Jobs`},{key:`candidate`,label:`Candidates`},{key:`submissions`,label:`Submissions`}],oS=[{key:`listView`,label:`List View`},{key:`filter`,label:`Filter`},{key:`form`,label:`Form`}];function sS({field:e,index:t,onToggle:n,onReorder:r}){let i=(0,l.useRef)(null),[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(!1);function p(e){i.current=t,e.dataTransfer.effectAllowed=`move`,c(!0)}function m(){c(!1),o(!1)}function h(e){e.preventDefault(),o(!0)}function g(){o(!1)}function _(e){e.preventDefault(),o(!1),i.current!==null&&i.current!==t&&r(i.current,t),i.current=null}return(0,f.jsxs)(`div`,{draggable:!0,onDragStart:p,onDragEnd:m,onDragOver:h,onDragLeave:g,onDrop:_,className:`uss-field-row with-edit${a?` drag-over`:``}${s?` dragging`:``}`,children:[(0,f.jsx)(`span`,{className:`uss-drag-handle`,children:(0,f.jsx)(d.HolderOutlined,{})}),(0,f.jsxs)(`span`,{className:`uss-field-name`,children:[e.fieldName,(0,f.jsx)(`span`,{className:`uss-field-key`,children:e.fieldKey})]}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:e.isVisible,onChange:e=>n(t,`isVisible`,e)})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.isEditable,onChange:e=>n(t,`isEditable`,e)})}),(0,f.jsx)(`span`,{className:`uss-toggle-cell`,children:(0,f.jsx)(u.Switch,{size:`small`,checked:!!e.ismandatory,onChange:e=>n(t,`ismandatory`,e)})})]})}function cS({team:e,configType:t}){let[n,r]=(0,l.useState)({}),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)({}),[c,d]=(0,l.useState)(`job`);(0,l.useEffect)(()=>{e&&(a(!0),ar(e,t).then(r).catch(()=>u.message.error(`Failed to load field config`)).finally(()=>a(!1)))},[e,t]);let p=n[c]??[];function m(e,t){r(n=>({...n,[e]:typeof t==`function`?t(n[e]??[]):t}))}function h(e,t,n){m(c,r=>r.map((r,i)=>i===e?{...r,[t]:n}:r))}function g(e,t){m(c,n=>{let r=[...n],[i]=r.splice(e,1);return r.splice(t,0,i),r.map((e,t)=>({...e,order:t}))})}async function _(){let n=c;s(e=>({...e,[n]:!0}));try{await cr(e,n,p,t),u.message.success(`Saved`)}catch{u.message.error(`Save failed`)}finally{s(e=>({...e,[n]:!1}))}}return(0,f.jsxs)(u.Spin,{spinning:i,children:[(0,f.jsx)(u.Tabs,{size:`small`,activeKey:c,onChange:d,items:aS.map(e=>({key:e.key,label:e.label}))}),(0,f.jsxs)(`div`,{className:`uss-field-header with-edit`,children:[(0,f.jsx)(`span`,{}),(0,f.jsx)(`span`,{children:`Field`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Visible`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Editable`}),(0,f.jsx)(`span`,{style:{textAlign:`center`},children:`Mandatory`})]}),(0,f.jsxs)(`div`,{className:`uss-field-list`,children:[p.length===0&&!i&&(0,f.jsx)(`div`,{className:`uss-empty`,children:`No fields found.`}),p.map((e,t)=>(0,f.jsx)(sS,{field:e,index:t,onToggle:h,onReorder:g},e.fieldKey??t))]}),(0,f.jsx)(`div`,{className:`uss-modal-footer`,children:(0,f.jsxs)(u.Button,{type:`primary`,size:`small`,loading:o[c],onClick:_,children:[`Save `,aS.find(e=>e.key===c)?.label]})})]})}function lS(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(`listView`),[c,p]=(0,l.useState)([]),[m,h]=(0,l.useState)(0),[g,_]=(0,l.useState)(!1),[v,y]=(0,l.useState)(``),[b,x]=(0,l.useState)(!1),S=(0,l.useCallback)(async()=>{_(!0);try{let e=await tr();p(e.teams),h(e.total)}catch{u.message.error(`Failed to load teams`)}finally{_(!1)}},[]);(0,l.useEffect)(()=>{S()},[S]);function C(e){t(e),s(`listView`),r(!0)}function w(e){t(e),y(e.teamName??``),a(!0)}async function T(){if(!v.trim()){u.message.warning(`Team name is required`);return}x(!0);try{await nr(e,{teamName:v.trim(),managerId:e.managerId,memberIds:e.memberIds}),u.message.success(`Team updated`),a(!1),S()}catch{u.message.error(`Failed to update team`)}finally{x(!1)}}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Z,{icon:(0,f.jsx)(d.TeamOutlined,{}),title:`Teams`,style:{marginBottom:0},bodyStyle:{padding:0},children:(0,f.jsx)(gf,{listName:`Teams`,dataSource:c,fields:[{label:`Team Name`,value:`teamName`,width:200},{label:`Manager`,value:`manager`,width:200},{label:`Members`,value:`memberCount`,width:90,sorter:!1},{label:`Actions`,value:`_actions`,width:160,sorter:!1,render:(e,t)=>(0,f.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,f.jsx)(u.Button,{size:`small`,type:`link`,onClick:()=>w(t),children:`Edit`}),(0,f.jsx)(u.Button,{size:`small`,type:`link`,onClick:()=>C(t),children:`Configure`})]})}],loading:g,total:m})}),(0,f.jsx)(u.Modal,{open:i,onCancel:()=>a(!1),title:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.TeamOutlined,{style:{color:`var(--color-brand)`,marginRight:6}}),`Edit Team`]}),width:420,footer:null,destroyOnClose:!0,children:(0,f.jsxs)(`div`,{className:`uss-edit-team-body`,style:{paddingTop:12},children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`uss-edit-team-label`,children:`Team Name`}),(0,f.jsx)(u.Input,{value:v,onChange:e=>y(e.target.value),onPressEnter:T,placeholder:`Enter team name`})]}),(0,f.jsxs)(`div`,{className:`uss-modal-footer`,children:[(0,f.jsx)(u.Button,{onClick:()=>a(!1),children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,loading:b,onClick:T,children:`Save`})]})]})}),(0,f.jsxs)(u.Modal,{className:`uss-modal`,open:n,onCancel:()=>r(!1),title:(0,f.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(d.TeamOutlined,{style:{color:`var(--color-brand)`}}),(0,f.jsxs)(`span`,{children:[`Configure: `,e?.teamName]})]}),width:720,footer:null,destroyOnClose:!0,children:[(0,f.jsx)(`div`,{style:{marginBottom:12},children:(0,f.jsx)(`div`,{className:`uss-config-toggle`,children:oS.map(e=>(0,f.jsx)(`button`,{className:`uss-config-btn${o===e.key?` active`:``}`,onClick:()=>s(e.key),children:e.label},e.key))})}),e&&(0,f.jsx)(cS,{team:e,configType:o},`${e?.teamId}-${o}`)]})]})}var uS=[`view`,`add`,`edit`,`delete`],dS={view:`View`,add:`Add`,edit:`Edit`,delete:`Delete`,sourcing:`Sourcing`,assign:`Assign`,share:`Share`,change_status:`Status`,my_jobs:`My Jobs`,all_jobs:`All Jobs`};function fS(e){return dS[e]??e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function pS(e){let t=uS.filter(t=>e.includes(t)),n=e.filter(e=>!uS.includes(e)).sort();return[...t,...n]}function mS(e){let t=new Set;return Object.values(e).forEach(({permissions:e})=>Object.keys(e??{}).forEach(e=>t.add(e))),pS([...t])}function hS(e){let t=0,n=0;return Object.values(e).forEach(({permissions:e})=>{Object.values(e??{}).forEach(({value:e})=>{n++,e===`1`&&t++})}),{enabled:t,total:n}}var gS=`perm-module-labels`,_S=`perm-action-labels`;function vS(e){try{return JSON.parse(localStorage.getItem(e)??`{}`)}catch{return{}}}function yS(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function bS({value:e,onSave:t,className:n}){let[r,i]=(0,l.useState)(!1),[a,o]=(0,l.useState)(e);(0,l.useEffect)(()=>{o(e)},[e]);function s(){i(!1);let n=a.trim();n&&n!==e?t(n):o(e)}return r?(0,f.jsx)(`input`,{autoFocus:!0,className:`perm-inline-input${n?` ${n}`:``}`,value:a,style:{width:Math.max(48,a.length*8)},onChange:e=>o(e.target.value),onBlur:s,onKeyDown:t=>{t.key===`Enter`&&s(),t.key===`Escape`&&(i(!1),o(e)),t.stopPropagation()},onClick:e=>e.stopPropagation()}):(0,f.jsxs)(`span`,{className:`perm-editable-name${n?` ${n}`:``}`,onDoubleClick:e=>{e.stopPropagation(),i(!0)},children:[e,(0,f.jsx)(d.EditOutlined,{className:`perm-name-edit-icon`})]})}function xS({permKey:e,entry:t,label:n,onToggle:r,onLabelSave:i}){let[a,o]=(0,l.useState)(!1),[s,c]=(0,l.useState)(n),p=t?.value===`1`,m=!!t;(0,l.useEffect)(()=>{c(n)},[n]);function h(){o(!1);let e=s.trim();e&&e!==n?i(e):c(n)}return(0,f.jsx)(u.Tooltip,{title:m?p?`Click to disable`:`Click to enable`:`Not applicable for this module`,children:(0,f.jsxs)(`div`,{className:`perm-action-pill${p?` on`:``}${m?``:` na`}`,onClick:()=>{!a&&m&&r()},children:[(0,f.jsx)(`span`,{className:`perm-action-pill-dot${p?` on`:``}`}),a?(0,f.jsx)(`input`,{autoFocus:!0,className:`perm-pill-input`,value:s,style:{width:Math.max(36,s.length*7)},onChange:e=>c(e.target.value),onBlur:h,onKeyDown:e=>{e.key===`Enter`&&h(),e.key===`Escape`&&(o(!1),c(n)),e.stopPropagation()},onClick:e=>e.stopPropagation()}):(0,f.jsx)(`span`,{className:`perm-action-pill-label`,onDoubleClick:e=>{e.stopPropagation(),o(!0)},children:n}),p&&!a&&(0,f.jsx)(d.CheckOutlined,{className:`perm-action-pill-check`})]})})}function SS({menuName:e,menuData:t,permKeys:n,onChange:r,displayName:i,actionLabels:a,onModuleLabelSave:o,onActionLabelSave:s}){let c=t?.permissions??{},l=Object.values(c).filter(e=>e?.value===`1`).length,u=Object.keys(c).length,d=u>0&&l===u;return(0,f.jsxs)(`div`,{className:`perm-module-card${d?` all-on`:l>0&&!d?` some-on`:``}`,children:[(0,f.jsxs)(`div`,{className:`perm-module-card-header`,children:[(0,f.jsx)(bS,{value:i,onSave:t=>o(e,t),className:`perm-module-card-name`}),u>0&&(0,f.jsxs)(`span`,{className:`perm-module-card-badge${l>0?` active`:``}`,children:[l,`/`,u]})]}),(0,f.jsx)(`div`,{className:`perm-module-card-body`,children:n.map(t=>(0,f.jsx)(xS,{permKey:t,entry:c[t],label:a[t]??fS(t),onToggle:()=>r(e,t),onLabelSave:e=>s(t,e)},t))})]})}function CS({label:e,onSave:t,onDelete:n,loading:r}){let[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(e);function c(){a(!1);let n=o.trim();n&&n!==e?t(n):s(e)}return(0,f.jsxs)(`div`,{className:`perm-manage-row`,children:[i?(0,f.jsx)(`input`,{autoFocus:!0,className:`perm-inline-input`,value:o,style:{flex:1,minWidth:0},onChange:e=>s(e.target.value),onBlur:c,onKeyDown:t=>{t.key===`Enter`&&c(),t.key===`Escape`&&(a(!1),s(e))}}):(0,f.jsx)(`span`,{className:`perm-manage-row-label`,children:e}),(0,f.jsxs)(`div`,{className:`perm-manage-row-actions`,children:[(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>{s(e),a(!0)},loading:r}),(0,f.jsx)(u.Popconfirm,{title:`Delete this item?`,onConfirm:n,okText:`Delete`,cancelText:`Cancel`,okType:`danger`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.DeleteOutlined,{}),danger:!0})})]})]})}function wS({open:e,onClose:t}){let[n,r]=(0,l.useState)(`modules`),[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(!1),[c,p]=(0,l.useState)(``),[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)([]),[v,y]=(0,l.useState)(!1),[b,x]=(0,l.useState)(``),[S,C]=(0,l.useState)(``),[w,T]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&(E(),D())},[e]);async function E(){s(!0);try{a(await br())}catch{u.message.error(`Failed to load modules`)}finally{s(!1)}}async function D(){y(!0);try{_(await wr())}catch{u.message.error(`Failed to load actions`)}finally{y(!1)}}async function O(){let e=c.trim();if(!e){u.message.warning(`Enter a module name`);return}h(!0);try{let t=await xr({menuName:e});a(e=>[...e,t]),p(``),u.message.success(`Module added`)}catch{u.message.error(`Failed to add module`)}finally{h(!1)}}async function k(e,t){try{await Sr(e,{menuName:t}),a(n=>n.map(n=>n.MENUID===e?{...n,MENUNAME:t}:n))}catch{u.message.error(`Failed to update module`)}}async function A(e){try{await Cr(e),a(t=>t.filter(t=>t.MENUID!==e)),u.message.success(`Module deleted`)}catch{u.message.error(`Failed to delete module`)}}async function j(){let e=b.trim(),t=S.trim().toLowerCase().replace(/\s+/g,`_`);if(!e||!t){u.message.warning(`Enter both name and key`);return}T(!0);try{let n=await Tr({permissionName:e,permissionKey:t});_(e=>[...e,n]),x(``),C(``),u.message.success(`Action added`)}catch(e){u.message.error(e?.message?.includes(`409`)||e?.status===409?`Permission key already exists`:`Failed to add action`)}finally{T(!1)}}async function M(e,t){try{await Er(e,{permissionName:t}),_(n=>n.map(n=>n.permissionId===e?{...n,permissionName:t}:n))}catch{u.message.error(`Failed to update action`)}}async function N(e){try{await Dr(e),_(t=>t.filter(t=>t.permissionId!==e)),u.message.success(`Action deleted`)}catch{u.message.error(`Failed to delete action`)}}let P=[{key:`modules`,label:`Modules`,children:(0,f.jsxs)(u.Spin,{spinning:o,children:[(0,f.jsxs)(`div`,{className:`perm-manage-add-row`,children:[(0,f.jsx)(u.Input,{placeholder:`Module name`,value:c,onChange:e=>p(e.target.value),onPressEnter:O,style:{flex:1},size:`small`}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),loading:m,onClick:O,children:`Add`})]}),(0,f.jsxs)(`div`,{className:`perm-manage-list`,children:[i.length===0&&!o&&(0,f.jsx)(`div`,{className:`perm-empty`,style:{paddingTop:24},children:`No modules found`}),i.map(e=>(0,f.jsx)(CS,{label:e.MENUNAME,onSave:t=>k(e.MENUID,t),onDelete:()=>A(e.MENUID)},e.MENUID))]})]})},{key:`actions`,label:`Actions`,children:(0,f.jsxs)(u.Spin,{spinning:v,children:[(0,f.jsxs)(`div`,{className:`perm-manage-add-row`,children:[(0,f.jsx)(u.Input,{placeholder:`Action name (e.g. Approve)`,value:b,onChange:e=>x(e.target.value),style:{flex:1},size:`small`}),(0,f.jsx)(u.Input,{placeholder:`Key (e.g. approve)`,value:S,onChange:e=>C(e.target.value),onPressEnter:j,style:{width:140},size:`small`}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.PlusOutlined,{}),loading:w,onClick:j,children:`Add`})]}),(0,f.jsxs)(`div`,{className:`perm-manage-list`,children:[g.length===0&&!v&&(0,f.jsx)(`div`,{className:`perm-empty`,style:{paddingTop:24},children:`No actions found`}),g.map(e=>(0,f.jsx)(CS,{label:`${e.permissionName} (${e.permissionKey})`,onSave:t=>M(e.permissionId,t),onDelete:()=>N(e.permissionId)},e.permissionId))]})]})}];return(0,f.jsx)(u.Modal,{open:e,onCancel:t,title:(0,f.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,f.jsx)(d.SettingOutlined,{style:{color:`var(--color-brand)`}}),`Manage Modules & Actions`]}),width:520,footer:null,destroyOnClose:!0,children:(0,f.jsx)(u.Tabs,{activeKey:n,onChange:r,size:`small`,items:P})})}function TS({role:e,moduleLabels:t,actionLabels:n,onModuleLabelSave:r,onActionLabelSave:i}){let[a,o]=(0,l.useState)({}),[s,c]=(0,l.useState)({}),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(!1),y=Zn(e);(0,l.useEffect)(()=>{y&&(m(!0),v(!1),Or(y).then(e=>{o(e),c(e)}).catch(()=>u.message.error(`Failed to load permissions`)).finally(()=>m(!1)))},[y]);function b(e,t){v(!0),c(n=>{let r=n[e]??{menuId:a[e]?.menuId??0,permissions:{}},i=r.permissions?.[t]??{id:0,value:`0`};return{...n,[e]:{...r,permissions:{...r.permissions,[t]:{...i,value:i.value===`1`?`0`:`1`}}}}})}async function x(){g(!0);try{await kr(y,s),o(s),v(!1),u.message.success(`Permissions saved`)}catch{u.message.error(`Save failed`)}finally{g(!1)}}let S=(0,l.useMemo)(()=>Object.keys(s).sort(),[s]),C=(0,l.useMemo)(()=>mS(s),[s]),{enabled:w,total:T}=(0,l.useMemo)(()=>hS(s),[s]);return(0,f.jsxs)(u.Spin,{spinning:p,children:[(0,f.jsxs)(`div`,{className:`perm-panel-header`,children:[(0,f.jsxs)(`div`,{className:`perm-panel-title`,children:[(0,f.jsx)(d.LockOutlined,{style:{color:`var(--color-brand)`,marginRight:6}}),(0,f.jsx)(`span`,{children:e?.roleName}),!p&&T>0&&(0,f.jsxs)(u.Tag,{color:`blue`,style:{marginLeft:8,fontSize:11},children:[w,`/`,T,` enabled`]})]}),(0,f.jsx)(u.Button,{type:`primary`,size:`small`,icon:(0,f.jsx)(d.UnlockOutlined,{}),loading:h,disabled:!_,onClick:x,children:`Save Changes`})]}),(0,f.jsxs)(`div`,{className:`perm-hint`,children:[(0,f.jsx)(d.InfoCircleOutlined,{className:`perm-hint-icon`}),(0,f.jsxs)(`span`,{children:[`Click a pill to toggle. `,(0,f.jsx)(`strong`,{children:`Double-click`}),` a module name or action label to rename it — labels are saved locally.`]})]}),S.length===0&&!p?(0,f.jsx)(`div`,{className:`perm-empty`,children:`No permission entries found for this role.`}):(0,f.jsx)(`div`,{className:`perm-cards-grid`,children:S.map(e=>(0,f.jsx)(SS,{menuName:e,menuData:s[e],permKeys:C,onChange:b,displayName:t[e]??e,actionLabels:n,onModuleLabelSave:r,onActionLabelSave:i},e))})]})}function ES(){let[e,t]=(0,l.useState)([]),[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(null),[o,s]=(0,l.useState)(``),[c,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(()=>vS(gS)),[g,_]=(0,l.useState)(()=>vS(_S)),v=(0,l.useCallback)((e,t)=>{h(n=>{let r={...n,[e]:t};return yS(gS,r),r})},[]),y=(0,l.useCallback)((e,t)=>{_(n=>{let r={...n,[e]:t};return yS(_S,r),r})},[]);function b(){h({}),_({}),yS(gS,{}),yS(_S,{}),u.message.success(`Labels reset to defaults`)}let x=(0,l.useCallback)(async()=>{r(!0);try{let{roles:e}=await Qn();t(e),e.length>0&&a(e[0])}catch{u.message.error(`Failed to load roles`)}finally{r(!1)}},[]);(0,l.useEffect)(()=>{x()},[x]);let S=(0,l.useMemo)(()=>{let t=o.trim().toLowerCase();return t?e.filter(e=>e.roleName.toLowerCase().includes(t)):e},[e,o]),C=Object.keys(m).length>0||Object.keys(g).length>0;return(0,f.jsxs)(`div`,{className:`perm-page`,children:[(0,f.jsxs)(Z,{className:`perm-left-card`,icon:(0,f.jsx)(d.SafetyOutlined,{}),title:`Roles`,bodyStyle:{padding:0},children:[(0,f.jsx)(`div`,{className:`perm-role-search`,children:(0,f.jsx)(u.Input,{prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search roles…`,allowClear:!0,size:`small`,value:o,onChange:e=>s(e.target.value)})}),(0,f.jsx)(u.Spin,{spinning:n,children:(0,f.jsxs)(`div`,{className:`perm-role-list`,children:[S.length===0&&!n&&(0,f.jsx)(`div`,{className:`perm-role-empty`,children:`No roles found`}),S.map(e=>{let t=i?.roleId===e.roleId,n=e.description&&e.description!==`N/A`?e.description:e.roleType===0?`Default role`:`Custom role`;return(0,f.jsxs)(`div`,{className:`perm-role-item${t?` active`:``}`,onClick:()=>a(e),children:[(0,f.jsx)(`div`,{className:`perm-role-item-name`,children:e.roleName}),(0,f.jsx)(`div`,{className:`perm-role-item-desc`,children:n})]},e.roleId)})]})})]}),(0,f.jsx)(Z,{className:`perm-right-card`,icon:(0,f.jsx)(d.LockOutlined,{}),title:`Module Permissions`,extra:(0,f.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[C&&(0,f.jsx)(`button`,{className:`perm-reset-btn`,onClick:b,children:`Reset labels`}),(0,f.jsx)(u.Button,{size:`small`,icon:(0,f.jsx)(d.SettingOutlined,{}),onClick:()=>p(!0),children:`Manage`})]}),bodyStyle:{padding:`12px 16px`},children:i?(0,f.jsx)(TS,{role:i,moduleLabels:m,actionLabels:g,onModuleLabelSave:v,onActionLabelSave:y},i.roleId):(0,f.jsx)(`div`,{className:`perm-empty`,children:`Select a role from the left to manage its permissions.`})}),(0,f.jsx)(wS,{open:c,onClose:()=>p(!1)})]})}var{Title:DS,Text:OS}=u.Typography,kS=[{label:`In Progress`,value:107,sub:`Under review`,color:`blue`},{label:`Hired`,value:2,sub:`Onboarded`,color:`green`},{label:`Project Completed`,value:2,sub:`Project cycle closed`,color:`purple`},{label:`Archive`,value:2,sub:`No longer active`,color:`peach`}];function AS({items:e=kS}){return(0,f.jsx)(u.Card,{className:`onboarding-card`,title:(0,f.jsx)(DS,{level:5,children:`Onboarding`}),extra:(0,f.jsx)(u.Button,{type:`link`,children:`View all`}),children:(0,f.jsx)(u.Row,{gutter:[12,12],children:e.map(e=>(0,f.jsx)(u.Col,{xs:12,sm:6,md:6,lg:12,xl:12,children:(0,f.jsxs)(`div`,{className:`onboarding-item ${e.color}`,children:[(0,f.jsx)(OS,{className:`onboarding-item-label`,children:e.label}),(0,f.jsx)(u.Statistic,{value:e.value,className:`onboarding-stat`}),(0,f.jsx)(`div`,{className:`onboarding-item-footer`,children:(0,f.jsx)(OS,{className:`onboarding-item-sub`,children:e.sub})})]})},e.label))})})}var{Text:jS,Title:MS}=u.Typography,NS=[{group:`Dashboard`,items:[{id:`dashboard`,label:`Admin Dashboard`,icon:(0,f.jsx)(d.DashboardOutlined,{})}]},{group:`Settings`,items:[{id:`org`,label:`Organization`,icon:(0,f.jsx)(d.BankOutlined,{}),heading:`Organization Settings`,desc:`Manage your company profile and location details`,cards:[{label:`Company Information`,icon:(0,f.jsx)(d.BankOutlined,{}),desc:`Manage company profile, address and business details.`},{label:`Location`,icon:(0,f.jsx)(d.BuildOutlined,{}),desc:`Manage office locations, branches and regions.`}]},{id:`users`,label:`Users`,icon:(0,f.jsx)(d.UserOutlined,{}),heading:`Users`,desc:`Manage platform users and configure their field views.`,component:`users`},{id:`teams`,label:`Teams`,icon:(0,f.jsx)(d.TeamOutlined,{}),heading:`Teams`,desc:`Organize users into teams and configure field visibility per team.`,component:`teams`},{id:`roles`,label:`Roles`,icon:(0,f.jsx)(d.SafetyOutlined,{}),heading:`Roles`,desc:`Control permissions and configure field visibility per role.`,component:`roles`},{id:`permissions`,label:`Permissions`,icon:(0,f.jsx)(d.LockOutlined,{}),heading:`Permissions`,desc:`Manage module-wise action permissions (view, add, edit, delete, and more) per role.`,component:`permissions`},{id:`templates`,label:`Templates`,icon:(0,f.jsx)(d.FileTextOutlined,{}),heading:`Templates`,desc:`Email and signature templates for communications`,component:`templates`},{id:`ai-services`,label:`AI Services`,icon:(0,f.jsx)(d.ThunderboltOutlined,{}),heading:`AI Services`,desc:`Register the AI/automation backends (base URL + auth) that admin-configured AI Actions call.`,component:`ai-services`}]},{group:`Clients`,items:[{id:`clients`,label:`Clients`,icon:(0,f.jsx)(d.BankOutlined,{}),heading:`Clients`,desc:`Manage client accounts and settings`,cards:[{label:`Clients`,icon:(0,f.jsx)(d.BankOutlined,{}),desc:`Manage client companies and account details.`}]}]},{group:`Forms`,items:[{id:`form-groups`,label:`Form Groups`,icon:(0,f.jsx)(d.AppstoreAddOutlined,{}),heading:`Form Groups`,desc:`Define field groups for module add/edit forms with validations and dropdown sources.`,component:`form-groups`},{id:`detail-groups`,label:`Detail Groups`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),heading:`Detail Groups`,desc:`Customize the detail view per module: labels, prefix/suffix, colour, capitalization, reference lookups and merged fields.`,component:`detail-groups`},{id:`row-actions`,label:`Actions`,icon:(0,f.jsx)(d.ToolOutlined,{}),heading:`Actions`,desc:`Configure which action buttons appear per row in each module's list view, scoped per role.`,component:`row-actions`}]},{group:`Master`,items:[{id:`jobs`,label:`Jobs`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),heading:`Jobs Master`,desc:`Configure job sources and status types`,cards:[{label:`Sources`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),desc:`Manage job source master values.`},{label:`Job Status`,icon:(0,f.jsx)(d.CheckCircleOutlined,{}),desc:`Configure job workflow status.`}]},{id:`candidates`,label:`Candidates`,icon:(0,f.jsx)(d.UserOutlined,{}),heading:`Candidates Master`,desc:`Skills, sources and work authorization settings`,cards:[{label:`Sources`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),desc:`Manage candidate source values.`},{label:`Skills`,icon:(0,f.jsx)(d.SettingOutlined,{}),desc:`Manage skill master data.`},{label:`Work Authorization`,icon:(0,f.jsx)(d.SafetyOutlined,{}),desc:`Manage visa and authorization types.`}]},{id:`submissions`,label:`Submissions`,icon:(0,f.jsx)(d.FileTextOutlined,{}),heading:`Submissions Master`,desc:`Rejection reasons and submission status configuration`,cards:[{label:`Rejection Reasons`,icon:(0,f.jsx)(d.FileTextOutlined,{}),desc:`Manage common rejection reasons.`},{label:`Client Submission Status`,icon:(0,f.jsx)(d.CheckCircleOutlined,{}),desc:`Manage client submission statuses.`}]},{id:`clientmaster`,label:`Client Master`,icon:(0,f.jsx)(d.BankOutlined,{}),heading:`Client Master`,desc:`Payment terms, client types and contact types`,cards:[{label:`Payment Terms`,icon:(0,f.jsx)(d.FileTextOutlined,{}),desc:`Manage billing and payment terms.`},{label:`Client Type`,icon:(0,f.jsx)(d.AppstoreOutlined,{}),desc:`Classify client business types.`},{label:`Client Contact Type`,icon:(0,f.jsx)(d.TeamOutlined,{}),desc:`Manage client contact categories.`}]}]}],PS=[{label:`Sourced`,count:312,color:`#378ADD`,pct:35},{label:`Screened`,count:223,color:`#7F77DD`,pct:25},{label:`Interview`,count:161,color:`#1D9E75`,pct:18},{label:`Offered`,count:107,color:`#EF9F27`,pct:12},{label:`Rejected`,count:89,color:`#E24B4A`,pct:10}],FS=[{name:`Tcs`,jobs:14,candidates:86},{name:`Empasis`,jobs:9,candidates:64},{name:`NovaSystems`,jobs:7,candidates:51},{name:`Brightwave`,jobs:5,candidates:38}],IS=[{text:`New candidate Ravi Kumar added to Java Developer role`,time:`2 min ago`,color:`#378ADD`},{text:`Submission approved by Acme Corp for Sr. React Dev`,time:`18 min ago`,color:`#1D9E75`},{text:`User Priya S. added to Recruiters team`,time:`1 hr ago`,color:`#7F77DD`},{text:`Job Data Analyst — TechFlow moved to archived`,time:`3 hr ago`,color:`#EF9F27`},{text:`Candidate rejected — work authorization mismatch`,time:`5 hr ago`,color:`#E24B4A`}];function LS(){return(0,f.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:16},children:[(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.DashboardOutlined,{}),title:`Admin Dashboard`,children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(MS,{level:5,children:`Admin Dashboard`}),(0,f.jsx)(jS,{type:`secondary`,children:`Overview of jobs, candidates, onboarding and recent activity`})]}),(0,f.jsx)(`div`,{className:`admin-dashboard-stats`,children:(0,f.jsx)(rS,{stats:[{label:`Total Jobs`,value:1697,icon:`fileText`},{label:`Active Jobs`,value:1685,icon:`checkCircle`},{label:`My Jobs`,value:600,icon:`user`},{label:`Total Candidates`,value:4320,icon:`team`},{label:`Submissions`,value:892,icon:`fileText`}]})}),(0,f.jsxs)(`div`,{className:`admin-dashboard-mid-row`,children:[(0,f.jsx)(AS,{}),(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.AppstoreOutlined,{}),title:`Candidate Pipeline`,children:[(0,f.jsx)(jS,{type:`secondary`,style:{fontSize:12},children:`By stage (892 total)`}),(0,f.jsx)(`div`,{className:`admin-pipeline-bar`,children:PS.map(e=>(0,f.jsx)(`div`,{className:`admin-pipeline-seg`,style:{width:`${e.pct}%`,background:e.color}},e.label))}),(0,f.jsx)(`div`,{className:`admin-pipeline-legend`,children:PS.map(e=>(0,f.jsxs)(`div`,{className:`admin-pipeline-legend-item`,children:[(0,f.jsx)(`span`,{className:`admin-pipeline-dot`,style:{background:e.color}}),e.label,` `,e.count]},e.label))}),(0,f.jsx)(`div`,{className:`admin-divider`}),(0,f.jsx)(jS,{strong:!0,style:{fontSize:12},children:`Submission status`}),(0,f.jsxs)(`div`,{className:`admin-sub-status-list`,style:{marginTop:6},children:[(0,f.jsxs)(`div`,{className:`admin-sub-status-item`,children:[(0,f.jsx)(jS,{style:{fontSize:13},children:`Pending client review`}),(0,f.jsx)(`span`,{className:`admin-badge warn`,children:`312`})]}),(0,f.jsxs)(`div`,{className:`admin-sub-status-item`,children:[(0,f.jsx)(jS,{style:{fontSize:13},children:`Client approved`}),(0,f.jsx)(`span`,{className:`admin-badge success`,children:`248`})]}),(0,f.jsxs)(`div`,{className:`admin-sub-status-item`,children:[(0,f.jsx)(jS,{style:{fontSize:13},children:`Rejected`}),(0,f.jsx)(`span`,{className:`admin-badge danger`,children:`89`})]})]})]})]}),(0,f.jsxs)(`div`,{className:`admin-dashboard-bottom-row`,children:[(0,f.jsx)(Z,{icon:(0,f.jsx)(d.BankOutlined,{}),title:`Top Clients`,extra:(0,f.jsx)(u.Button,{type:`link`,size:`small`,children:`View all`}),children:FS.map(e=>(0,f.jsxs)(`div`,{className:`admin-client-row`,children:[(0,f.jsxs)(`div`,{className:`admin-client-left`,children:[(0,f.jsx)(`div`,{className:`admin-client-icon`,children:(0,f.jsx)(d.BankOutlined,{})}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`admin-client-name`,children:e.name}),(0,f.jsxs)(`div`,{className:`admin-client-sub`,children:[e.jobs,` open jobs`]})]})]}),(0,f.jsxs)(`div`,{className:`admin-client-right`,children:[(0,f.jsx)(`div`,{className:`admin-client-val`,children:e.candidates}),(0,f.jsx)(`div`,{className:`admin-client-sub`,children:`candidates`})]})]},e.name))}),(0,f.jsx)(Z,{icon:(0,f.jsx)(d.BellOutlined,{}),title:`Recent Activity`,children:IS.map((e,t)=>(0,f.jsxs)(`div`,{className:`admin-activity-row`,children:[(0,f.jsx)(`div`,{className:`admin-activity-dot`,style:{background:e.color}}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`admin-activity-text`,children:e.text}),(0,f.jsx)(`div`,{className:`admin-activity-time`,children:e.time})]})]},t))})]}),(0,f.jsx)(Z,{icon:(0,f.jsx)(d.SettingOutlined,{}),title:`Admin Configuration Overview`,extra:(0,f.jsx)(u.Button,{type:`link`,size:`small`,children:`Manage`}),children:(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsxs)(u.Col,{span:8,children:[(0,f.jsx)(jS,{type:`secondary`,style:{fontSize:12,fontWeight:500},children:`Settings`}),[[`Organization`,2],[`User Settings`,4],[`Templates`,2]].map(([e,t])=>(0,f.jsxs)(`div`,{className:`admin-cfg-overview-row`,children:[(0,f.jsx)(jS,{style:{fontSize:12},children:e}),(0,f.jsxs)(`span`,{className:`admin-badge info`,children:[t,` items`]})]},e))]}),(0,f.jsxs)(u.Col,{span:8,children:[(0,f.jsx)(jS,{type:`secondary`,style:{fontSize:12,fontWeight:500},children:`Master`}),[[`Jobs`,2],[`Candidates`,3],[`Submissions`,2]].map(([e,t])=>(0,f.jsxs)(`div`,{className:`admin-cfg-overview-row`,children:[(0,f.jsx)(jS,{style:{fontSize:12},children:e}),(0,f.jsxs)(`span`,{className:`admin-badge info`,children:[t,` items`]})]},e))]}),(0,f.jsxs)(u.Col,{span:8,children:[(0,f.jsx)(jS,{type:`secondary`,style:{fontSize:12,fontWeight:500},children:`System`}),[[`Total Groups`,4],[`Total Modules`,9],[`Config Items`,19]].map(([e,t])=>(0,f.jsxs)(`div`,{className:`admin-cfg-overview-row`,children:[(0,f.jsx)(jS,{style:{fontSize:12},children:e}),(0,f.jsx)(jS,{strong:!0,style:{fontSize:12},children:t})]},e))]})]})})]})}function RS({activeSection:e,activeGroup:t,filteredCards:n,searchText:r,setSearchText:i,allItems:a,handleNav:o}){return(0,f.jsxs)(u.Row,{gutter:[16,16],children:[(0,f.jsx)(u.Col,{span:24,children:(0,f.jsxs)(Z,{icon:e?.icon,title:e?.heading,extra:(0,f.jsx)(u.Input,{className:`admin-search`,prefix:(0,f.jsx)(d.SearchOutlined,{}),placeholder:`Search settings…`,allowClear:!0,value:r,onChange:e=>i(e.target.value)}),children:[(0,f.jsx)(`div`,{className:`admin-accent-bar`}),(0,f.jsx)(MS,{level:5,children:e?.heading}),(0,f.jsx)(jS,{type:`secondary`,children:e?.desc})]})}),(0,f.jsx)(u.Col,{xs:24,xl:16,style:{alignSelf:`flex-start`},children:(0,f.jsx)(Z,{icon:(0,f.jsx)(d.AppstoreOutlined,{}),title:`Configuration Items`,extra:(0,f.jsxs)(jS,{type:`secondary`,children:[n.length,` item`,n.length===1?``:`s`]}),children:(0,f.jsx)(u.Row,{gutter:[14,14],children:n.length>0?n.map(e=>(0,f.jsx)(u.Col,{xs:24,sm:12,xl:8,children:(0,f.jsxs)(`div`,{className:`admin-config-item`,children:[(0,f.jsx)(`div`,{className:`admin-config-top-bar`}),(0,f.jsxs)(`div`,{className:`admin-config-body`,children:[(0,f.jsx)(`div`,{className:`admin-config-icon`,children:e.icon}),(0,f.jsxs)(`div`,{className:`admin-config-text`,children:[(0,f.jsx)(`span`,{className:`admin-config-label`,children:e.label}),(0,f.jsx)(`span`,{className:`admin-config-desc`,children:e.desc})]})]}),(0,f.jsx)(`div`,{className:`admin-config-divider`}),(0,f.jsx)(u.Button,{type:`link`,size:`small`,className:`admin-config-manage`,icon:(0,f.jsx)(d.RightOutlined,{}),iconPosition:`end`,children:`Manage`})]})},e.label)):(0,f.jsx)(u.Col,{span:24,children:(0,f.jsx)(`div`,{className:`admin-config-empty`,children:(0,f.jsx)(u.Empty,{description:`No settings found`,image:u.Empty.PRESENTED_IMAGE_SIMPLE})})})})})}),(0,f.jsx)(u.Col,{xs:24,xl:8,style:{alignSelf:`flex-start`},children:(0,f.jsxs)(Z,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`Section Overview`,children:[(0,f.jsx)(`div`,{className:`admin-overview-list`,children:NS.filter(e=>e.group!==`Dashboard`).map(e=>{let n=e.group===t?.group;return(0,f.jsxs)(`div`,{className:`admin-overview-item${n?` active`:``}`,onClick:()=>{let t=e.items[0];t&&o(t.id)},children:[(0,f.jsxs)(`div`,{className:`admin-overview-left`,children:[(0,f.jsx)(`div`,{className:`admin-overview-icon`,children:e.items[0]?.icon}),(0,f.jsxs)(`div`,{className:`admin-overview-text`,children:[(0,f.jsx)(`span`,{className:`admin-overview-name`,children:e.group}),(0,f.jsxs)(`span`,{className:`admin-overview-sub`,children:[e.items.length,` module`,e.items.length===1?``:`s`]})]})]}),(0,f.jsx)(`span`,{className:`admin-overview-count${n?` active`:``}`,children:e.items.length})]},e.group)})}),(0,f.jsxs)(`div`,{className:`admin-overview-footer`,children:[(0,f.jsx)(`span`,{className:`admin-overview-footer-label`,children:`Total configuration items`}),(0,f.jsx)(`span`,{className:`admin-overview-footer-value`,children:a.filter(e=>e.cards).reduce((e,t)=>e+t.cards.length,0)})]})]})})]})}function zS(){let[e,t]=(0,l.useState)(`dashboard`),[n,r]=(0,l.useState)(``),i=(0,l.useMemo)(()=>NS.flatMap(e=>e.items),[]),a=(0,l.useMemo)(()=>i.find(t=>t.id===e),[i,e]),o=(0,l.useMemo)(()=>NS.find(t=>t.items.some(t=>t.id===e)),[e]),s=(0,l.useMemo)(()=>{if(!a?.cards)return[];let e=n.trim().toLowerCase();return e?a.cards.filter(t=>t.label.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e)):a.cards},[a,n]),c=(0,l.useMemo)(()=>NS.map(e=>({key:e.group,type:`group`,label:e.group,children:e.items.map(e=>({key:e.id,icon:e.icon,label:e.label}))})),[]),p=e=>{t(e),r(``)};return e===`dashboard`||a?.heading,(0,f.jsxs)(`main`,{className:`admin-page`,children:[(0,f.jsx)(`div`,{className:`admin-breadcrumb`,children:(0,f.jsx)(u.Breadcrumb,{items:[{title:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.HomeOutlined,{}),` Home`]})},{title:`Admin`}]})}),(0,f.jsxs)(u.Row,{gutter:[16,16],className:`admin-wrapper`,children:[(0,f.jsx)(u.Col,{xs:24,lg:6,xl:5,children:(0,f.jsxs)(Z,{title:`Admin Console`,icon:(0,f.jsx)(d.SettingOutlined,{}),children:[(0,f.jsxs)(`div`,{className:`admin-sidebar-banner`,children:[(0,f.jsx)(`span`,{className:`admin-sidebar-banner-title`,children:`Admin Panel`}),(0,f.jsx)(`span`,{className:`admin-sidebar-banner-sub`,children:`Configuration Center`}),(0,f.jsxs)(u.Row,{gutter:[8,0],children:[(0,f.jsx)(u.Col,{span:12,children:(0,f.jsxs)(`div`,{className:`admin-sidebar-pill`,children:[(0,f.jsx)(`span`,{className:`admin-sidebar-pill-label`,children:`Groups`}),(0,f.jsx)(`span`,{className:`admin-sidebar-pill-value`,children:NS.length})]})}),(0,f.jsx)(u.Col,{span:12,children:(0,f.jsxs)(`div`,{className:`admin-sidebar-pill`,children:[(0,f.jsx)(`span`,{className:`admin-sidebar-pill-label`,children:`Modules`}),(0,f.jsx)(`span`,{className:`admin-sidebar-pill-value`,children:i.length})]})})]})]}),(0,f.jsx)(u.Menu,{mode:`inline`,selectedKeys:[e],items:c,onClick:({key:e})=>p(e),className:`admin-sidebar-menu`})]})}),(0,f.jsx)(u.Col,{xs:24,lg:18,xl:19,children:e===`dashboard`?(0,f.jsx)(LS,{}):a?.component===`form-groups`?(0,f.jsx)(J_,{}):a?.component===`detail-groups`?(0,f.jsx)(gv,{}):a?.component===`row-actions`?(0,f.jsx)(ay,{}):a?.component===`users`?(0,f.jsx)(d_,{}):a?.component===`teams`?(0,f.jsx)(lS,{}):a?.component===`roles`?(0,f.jsx)(g_,{}):a?.component===`permissions`?(0,f.jsx)(ES,{}):a?.component===`templates`?(0,f.jsx)(my,{}):a?.component===`ai-services`?(0,f.jsx)(vy,{}):(0,f.jsx)(RS,{activeSection:a,activeGroup:o,filteredCards:s,searchText:n,setSearchText:r,allItems:i,handleNav:p})})]})]})}var BS=[{label:`Home`,href:`/dashboard`},{label:`Jobs`}];function VS(){return(0,f.jsx)(Zl,{moduleName:`job`,breadcrumbItems:BS})}function HS(){let[e,t]=(0,l.useState)(null);return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(so,{items:[{label:`Home`,href:`/dashboard`},{label:`Jobs`,href:`/jobs`},{label:e?.eyebrow||`-`}]}),(0,f.jsx)(fm,{moduleName:`job`,backPath:`/jobs`,onHeaderData:t})]})}var{Title:US}=u.Typography;function WS(){let e=(0,p.useNavigate)(),{state:t}=(0,p.useLocation)(),n=t?.moduleName||`stickyNotes`,r=t?.title||`Sticky Notes`,i={...t?.request,params:{...t?.request?.params,limit:200,offset:0}};return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(u.Button,{type:`text`,icon:(0,f.jsx)(d.ArrowLeftOutlined,{}),onClick:()=>e(-1),style:{marginBottom:12},children:`Back`}),(0,f.jsx)(xt,{moduleName:n,title:r,columns:4,request:i,viewAll:!1})]})}var{Text:GS,Title:KS}=u.Typography,qS=10*1024*1024,JS=`/templates/test_cases_flow_template.base64.txt`,YS=`test_cases_flow_template.xlsx`,XS=`module | subModule | step_order | description | actions | key | value | expected | scenario`,ZS={idle:0,module_set:1,encoding:1,validating:2,preview:3,inserting:3,done:4,error:1},QS=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`},{label:`Bulk upload`,href:`/bulk-upload`}];function $S(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).split(`,`)[1]),r.onerror=n,r.readAsDataURL(e)})}function eC(e){return e.filter(e=>e.row_status===`valid`).map(e=>{let t={...e};return delete t.row_status,delete t.errors,t})}function tC(e){return e.flatMap(e=>(e.errors??[]).map(t=>({id:e.id,...t})))}function nC({errors:e}){return(0,f.jsx)(`div`,{className:`bulk-tooltip-errors`,children:(e??[]).map((e,t)=>(0,f.jsx)(`div`,{children:e.message},`${e.field}-${t}`))})}function rC({errors:e,expanded:t,onToggle:n,onSummaryClick:r}){return e.length===0?null:(0,f.jsxs)(`div`,{className:`bulk-error-banner`,children:[(0,f.jsxs)(`div`,{className:`bulk-error-summary`,children:[(0,f.jsxs)(`button`,{type:`button`,className:`bulk-error-summary-main`,onClick:r,"aria-label":`Scroll to first invalid row`,children:[(0,f.jsx)(d.ExclamationCircleOutlined,{className:`bulk-error-icon`}),(0,f.jsxs)(`span`,{children:[e.length,` validation error(s) found`]})]}),(0,f.jsx)(u.Button,{type:`link`,onClick:n,"aria-expanded":t,children:t?`Hide Errors`:`View Errors`})]}),t&&(0,f.jsx)(`div`,{className:`bulk-error-list`,role:`region`,"aria-label":`Validation error details`,children:e.map((e,t)=>(0,f.jsxs)(`div`,{className:`bulk-error-line`,children:[(0,f.jsxs)(`span`,{className:`bulk-row-chip`,children:[`Row `,e.id]}),(0,f.jsx)(`span`,{children:e.message})]},`${e.id}-${e.field}-${t}`))})]})}function iC({rows:e,view:t,onViewChange:n,onConfirm:r,onReset:i,saving:a,firstInvalidRowId:o,firstInvalidRowRef:s}){let c=e.filter(e=>e.row_status===`invalid`),l=t===`errors`?c:e,p=c.length>0||a;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(u.Row,{justify:`space-between`,align:`middle`,gutter:[16,16],className:`bulk-table-toolbar`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsxs)(u.Space.Compact,{children:[(0,f.jsx)(u.Button,{type:t===`all`?`primary`:`default`,onClick:()=>n(`all`),children:`All rows`}),(0,f.jsx)(u.Button,{type:t===`errors`?`primary`:`default`,onClick:()=>n(`errors`),children:`Errors only`})]})}),(0,f.jsx)(u.Col,{children:(0,f.jsxs)(GS,{type:`secondary`,children:[e.length,` row(s)`]})})]}),(0,f.jsx)(`div`,{className:`bulk-table-wrap`,children:(0,f.jsxs)(`table`,{className:`bulk-preview-table`,children:[(0,f.jsx)(`thead`,{children:(0,f.jsxs)(`tr`,{children:[(0,f.jsx)(`th`,{className:`bulk-col-row`,children:`Row`}),(0,f.jsx)(`th`,{className:`bulk-col-flow`,children:`Submodule`}),(0,f.jsx)(`th`,{className:`bulk-col-description`,children:`Description`}),(0,f.jsx)(`th`,{className:`bulk-col-keyword`,children:`Action`}),(0,f.jsx)(`th`,{className:`bulk-col-target`,children:`Key`}),(0,f.jsx)(`th`,{className:`bulk-col-status`,children:`Status`}),(0,f.jsx)(`th`,{className:`bulk-col-error`,children:`Error`})]})}),(0,f.jsx)(`tbody`,{children:l.map(e=>{let t=e.errors??[],n=e.row_status===`invalid`;return(0,f.jsxs)(`tr`,{ref:n&&e.id===o?s:null,className:n?`bulk-row-invalid`:``,children:[(0,f.jsx)(`td`,{children:e.id}),(0,f.jsx)(`td`,{title:e.submodule,children:e.submodule}),(0,f.jsx)(`td`,{title:e.description,children:e.description?e.description:(0,f.jsx)(`span`,{className:`bulk-empty-text`,children:`-empty-`})}),(0,f.jsx)(`td`,{children:(0,f.jsx)(`code`,{className:`bulk-code-chip`,children:e.actions})}),(0,f.jsx)(`td`,{title:e.key,children:e.key}),(0,f.jsx)(`td`,{children:n?(0,f.jsx)(u.Tag,{color:`red`,children:`Error`}):(0,f.jsx)(u.Tag,{color:`green`,children:`Valid`})}),(0,f.jsx)(`td`,{children:n?(0,f.jsx)(u.Tooltip,{title:(0,f.jsx)(nC,{errors:t}),placement:`left`,children:(0,f.jsxs)(`button`,{type:`button`,className:`bulk-error-info`,"aria-label":`View ${t.length} error(s) for row ${e.id}`,children:[(0,f.jsx)(d.InfoCircleOutlined,{}),(0,f.jsx)(u.Badge,{count:t.length,size:`small`})]})}):(0,f.jsx)(`span`,{className:`bulk-error-none`,children:`-`})})]},`${e.id}-${e.step_order}`)})})]})}),(0,f.jsxs)(u.Space,{className:`bulk-actions`,children:[(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:i,children:`Reset`}),(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.SaveOutlined,{}),loading:a,disabled:p,onClick:r,children:c.length>0?`Fix ${c.length} error(s) to proceed`:`Save to database`})]})]})}function aC(){let e=(0,p.useNavigate)(),t=(0,l.useMemo)(()=>se(),[]),n=(0,l.useRef)(null),r=(0,l.useRef)(null),[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(``),[c,m]=(0,l.useState)(`idle`),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(null),[y,b]=(0,l.useState)([]),[x,S]=(0,l.useState)(`all`),[C,w]=(0,l.useState)(null),[T,E]=(0,l.useState)(null),[D,O]=(0,l.useState)(!1),k=i.map(e=>({value:e.modulename,label:e.modulename})),A=tC(y),j=c===`encoding`||c===`validating`,M=!!o&&!j,N=ZS[c]??0,P=y.find(e=>e.row_status===`invalid`)?.id,F=(0,l.useCallback)(()=>{s(``),m(`idle`),g(!1),v(null),b([]),S(`all`),w(null),E(null),n.current&&(n.current.value=``)},[]);(0,l.useEffect)(()=>{async function e(){try{a((await eg({project:t?.name??``,activeOnly:!0}))?.items??[])}catch(e){console.error(e),u.message.error(`Unable to load modules.`)}}e()},[t?.name]);let I=e=>{s(e??``),b([]),E(null),w(null),v(null),O(!1),m(e?`module_set`:`idle`)},L=async e=>{if(!e||!M)return;let n=e.name.split(`.`).pop()?.toLowerCase();if(![`xlsx`,`csv`].includes(n)){m(`module_set`),w({message:`Invalid file type. Please upload an Excel .xlsx or CSV .csv file.`});return}if(e.size>qS){m(`module_set`),w({message:`File must be 10 MB or smaller.`});return}w(null),b([]),E(null),v({name:e.name,size:e.size}),m(`encoding`);try{let r=await $S(e);m(`validating`),b((await Yh({filename:e.name,project:t?.name??``,module:o,file_base64:r,file_type:n}))?.rows??[]),S(`all`),m(`preview`)}catch(e){console.error(e),w(e.payload??{code:`NETWORK_ERROR`,message:e.message||`Could not reach the server.`}),m(`error`)}},R=async()=>{try{let e=await fetch(JS);if(!e.ok)throw Error(`Template file not found (${e.status})`);let t=(await e.text()).trim(),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e+=1)r[e]=n.charCodeAt(e);let i=new Blob([r],{type:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`}),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=YS,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(a),u.message.success(`Sample template downloaded.`)}catch(e){console.error(e),u.message.error(`Unable to download sample template.`)}},z=async()=>{m(`inserting`),w(null);try{E(await Xh({project:t?.name??``,module:o,uploaded_by:localStorage.getItem(`user_Email`)??``,rows:eC(y)})),m(`done`),u.message.success(`Bulk upload saved. Redirecting to view test cases...`),window.setTimeout(()=>e(`/viewTestCase`),900)}catch(e){console.error(e),w(e.payload??{code:`NETWORK_ERROR`,message:e.message||`Could not reach the server.`}),m(`preview`)}},B=(0,l.useCallback)(()=>{r.current?.scrollIntoView({behavior:`smooth`,block:`center`})},[]),V=[`bulk-dropzone`,h?`bulk-dropzone-dragging`:``,_?`bulk-dropzone-has-file`:``,C&&c!==`preview`?`bulk-dropzone-error`:``,o?``:`bulk-dropzone-disabled`].filter(Boolean).join(` `);return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:QS})}),t?.name&&(0,f.jsx)(u.Col,{children:(0,f.jsx)(GS,{strong:!0,children:t.name})})]}),(0,f.jsxs)(`div`,{className:`zt-page zt-page-wide bulk-page`,children:[(0,f.jsxs)(`div`,{className:`bulk-header`,children:[(0,f.jsx)(KS,{level:3,children:`Bulk upload test cases`}),(0,f.jsxs)(u.Space,{direction:`vertical`,size:4,children:[(0,f.jsx)(GS,{type:`secondary`,children:XS}),(0,f.jsx)(GS,{type:`secondary`,children:`Use the sample template for the required columns. Uploaded rows are saved as Active by default.`})]})]}),(0,f.jsx)(`div`,{className:`bulk-stepbar`,children:[`Select`,`Upload`,`Validate`,`Save`].map((e,t)=>(0,f.jsxs)(`span`,{className:t<N?`bulk-step-active`:``,children:[t+1,` `,e]},e))}),(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:`1. Module selector`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,className:`bulk-module-select`,placeholder:`Choose a module`,options:k,value:o||void 0,onChange:I})}),o&&(0,f.jsxs)(u.Card,{className:`v1-card zt-fall`,title:`2. File upload`,extra:(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.DownloadOutlined,{}),onClick:R,children:`Download Sample Template`}),children:[(0,f.jsx)(u.Alert,{type:`info`,showIcon:!0,message:`First time uploading?`,description:`Download the sample template, keep the column names unchanged, fill your test steps, and upload either .xlsx or .csv.`,className:`bulk-inline-alert`}),(0,f.jsxs)(`button`,{type:`button`,className:V,disabled:!M,onClick:()=>n.current?.click(),onDragOver:e=>{e.preventDefault(),M&&g(!0)},onDragLeave:()=>g(!1),onDrop:e=>{e.preventDefault(),g(!1),L(e.dataTransfer.files?.[0])},children:[(0,f.jsx)(d.CloudUploadOutlined,{className:`bulk-upload-icon`}),_?(0,f.jsxs)(`span`,{className:`bulk-file-chip`,children:[_.name,` - `,Math.ceil(_.size/1024),` KB`]}):(0,f.jsx)(`span`,{children:`Drag & drop here, or click to browse`})]}),(0,f.jsx)(`input`,{ref:n,hidden:!0,type:`file`,accept:`.xlsx,.csv`,onChange:e=>L(e.target.files?.[0])}),j&&(0,f.jsx)(u.Progress,{percent:c===`encoding`?45:82,showInfo:!1,size:`small`}),C&&c!==`preview`&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:C.message,className:`bulk-inline-alert`})]}),y.length>0&&(0,f.jsxs)(u.Card,{className:`v1-card zt-fall`,title:`3. Validation result`,children:[(0,f.jsx)(rC,{errors:A,expanded:D,onToggle:()=>O(e=>!e),onSummaryClick:B}),C&&c===`preview`&&(0,f.jsx)(u.Alert,{type:`error`,showIcon:!0,message:C.message,className:`bulk-inline-alert`}),(0,f.jsx)(iC,{rows:y,view:x,onViewChange:S,onConfirm:z,onReset:F,saving:c===`inserting`,firstInvalidRowId:P,firstInvalidRowRef:r})]}),T&&c===`done`&&(0,f.jsxs)(u.Card,{className:`v1-card zt-fall`,title:`4. Upload complete`,children:[(0,f.jsxs)(u.Row,{gutter:[16,16],className:`bulk-metrics`,children:[(0,f.jsx)(u.Col,{xs:24,md:8,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(GS,{children:`Total`}),(0,f.jsx)(`strong`,{children:y.length})]})}),(0,f.jsx)(u.Col,{xs:24,md:8,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(GS,{children:`Inserted`}),(0,f.jsx)(`strong`,{children:T.inserted??0})]})}),(0,f.jsx)(u.Col,{xs:24,md:8,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(GS,{children:`Failed`}),(0,f.jsx)(`strong`,{children:T.failed??0})]})})]}),(0,f.jsx)(u.Alert,{type:`success`,showIcon:!0,icon:(0,f.jsx)(d.CheckCircleOutlined,{}),message:`${T.inserted??0} test cases saved to database - module: ${o}`,className:`bulk-inline-alert`}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:F,children:`Upload another file`})]})]})]})}var oC=[{value:`navigate`,label:`Navigate`},{value:`fill`,label:`Fill`},{value:`click`,label:`Click`},{value:`select`,label:`Select`},{value:`press_key`,label:`Press Key`},{value:`type_and_select`,label:`Type and Select`},{value:`type_and_select_modal`,label:`Type and Select (Modal)`},{value:`upload_file`,label:`Upload File`},{value:`check_checkbox`,label:`Check Checkbox`},{value:`check_filter_checkbox`,label:`Check Filter Checkbox`},{value:`select_page_size`,label:`Select Page Size`},{value:`check_n_checkboxes`,label:`Check N Checkboxes`},{value:`store_text`,label:`Store Text`},{value:`reset_session`,label:`Reset Session`},{value:`switch_to_new_tab`,label:`Switch To New Tab`},{value:`close_tab`,label:`Close Tab`},{value:`assert_visible`,label:`Assert Visible`},{value:`assert_hidden`,label:`Assert Hidden`},{value:`assert_text`,label:`Assert Text`},{value:`assert_url`,label:`Assert URL`},{value:`assert_body_contains`,label:`Assert Body Contains`},{value:`assert_button_disabled`,label:`Assert Button Disabled`},{value:`assert_field_error`,label:`Assert Field Error`},{value:`assert_field_accepted`,label:`Assert Field Accepted`},{value:`assert_children_disabled`,label:`Assert Children Disabled`},{value:`assert_children_visible`,label:`Assert Children Visible`},{value:`assert_element_count`,label:`Assert Element Count`},{value:`assert_toast`,label:`Assert Toast`},{value:`assert_toast_success`,label:`Assert Toast Success`},{value:`assert_toast_error`,label:`Assert Toast Error`},{value:`wait_for_visible`,label:`Wait For Visible`},{value:`wait_for_hidden`,label:`Wait For Hidden`},{value:`wait_for_text`,label:`Wait For Text`}],{Text:sC}=u.Typography,cC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/test-cases`}],lC={tags:`regression`,active:1},uC={module:{dbName:`Modules`,formField:`module`,label:`Module`}};function dC(e=[]){return e.map(e=>({value:e,label:e}))}function fC(e=``){return String(e??``).trim()}function pC(e=``){return fC(e).toLowerCase()}function mC(e=[]){let t=new Map;return e.forEach(e=>{let n=fC(e?.flow),r=n.toLowerCase();n&&!t.has(r)&&t.set(r,n)}),Array.from(t.values()).map(e=>({value:e,label:e}))}function hC(e=[],t,n){let r=fC(t).toLowerCase(),i=fC(n).toLowerCase();return e.reduce((e,t)=>{let n=fC(t?.module).toLowerCase(),a=fC(t?.flow).toLowerCase();if(n!==r||a!==i)return e;let o=Number(t?.step_order)||0;return Math.max(e,o)},0)+1}function gC({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(sC,{strong:!0,className:`v1-section-label`,children:t})]})}function _C(){let[e]=u.Form.useForm(),[t]=u.Form.useForm(),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)([]),[c,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)({open:!1,typeKey:`module`}),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(!1),T=(0,p.useNavigate)(),E=uC[_.typeKey],D=(0,l.useMemo)(()=>dC(n),[n]),O=u.Form.useWatch(`module`,e),k=u.Form.useWatch(`flow`,e),A=!!fC(O),j=!!fC(k),M=!A,N=!A||!j,P=(e,t=[])=>{e===`module`&&r(t)},F=async()=>{m(!0);try{r((await Wh(uC.module.dbName))?.items??[])}catch(e){console.error(`Unable to load testing options:`,e),u.message.error(`Unable to load testing options.`)}finally{m(!1)}},I=(0,l.useCallback)(async t=>{let n=fC(t);if(a([]),s([]),e.setFieldsValue({step_order:void 0}),n){g(!0);try{let e=await Jh({limit:1e4,offset:0,module:n}),t=Array.isArray(e?.items)?e.items:[];a(t),s(mC(t))}catch(e){console.error(`Unable to load flows:`,e),u.message.error(`Unable to load flows.`)}finally{g(!1)}}},[e]),L=(0,l.useCallback)(async(t,n,r)=>{let i=fC(t),a=fC(n);if(!i||!a){e.setFieldsValue({step_order:void 0});return}S(!0);try{e.setFieldsValue({step_order:hC(r,i,a)})}catch(e){console.error(`Unable to load step order:`,e),u.message.error(`Unable to load step order.`)}finally{S(!1)}},[e]);(0,l.useEffect)(()=>{Promise.resolve().then(F)},[]),(0,l.useEffect)(()=>{Promise.resolve().then(()=>I(O))},[I,O]),(0,l.useEffect)(()=>{Promise.resolve().then(()=>L(O,k,i))},[i,L,k,O]);let R=async t=>{let n={module:fC(t.module),flow:fC(t.flow),step_order:Number(t.step_order),description:fC(t.description),keyword:pC(t.keyword),target:fC(t.target),value:fC(t.value),expected:fC(t.expected),tags:t.tags?fC(t.tags):lC.tags,active:Number(t.active)};w(!0);try{await qh(n),u.message.success(`Test case details saved successfully.`),e.resetFields(),a([]),s([])}catch(e){console.error(`Unable to save test case:`,e),u.message.error(`Unable to save test case.`)}finally{w(!1)}},z=(t,n)=>{e.setFieldsValue({[t]:fC(n)})},B=t=>{e.setFieldsValue({module:fC(t),flow:void 0,step_order:void 0,keyword:void 0,description:void 0,target:void 0,tags:lC.tags,value:void 0,expected:void 0})},V=t=>{e.setFieldsValue({flow:fC(t),step_order:void 0})},H=e=>{let n=uC[e];v({open:!0,typeKey:e}),t.setFieldsValue({name:``,type:n.label})},U=()=>{v(e=>({...e,open:!1})),t.resetFields()},W=async()=>{try{let n=fC((await t.validateFields()).name),r=await Gh({name:n,type:E.dbName});P(_.typeKey,r?.items??[]),e.setFieldsValue({[E.formField]:n}),u.message.success(`${E.label} added successfully.`),U()}catch(e){if(e?.errorFields)return;console.error(`Unable to save testing option:`,e),u.message.error(`Unable to add ${E.label.toLowerCase()}.`)}finally{b(!1)}};return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:cC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>T(`/zinnext-home`),children:`View Table`})})]}),(0,f.jsx)(`div`,{className:`v1-page`,children:(0,f.jsxs)(`div`,{className:`v1-page-inner`,children:[(0,f.jsx)(`div`,{className:`v1-page-header`,children:(0,f.jsxs)(u.Space,{align:`center`,size:10,children:[(0,f.jsx)(d.ProfileOutlined,{className:`v1-outer-icon`}),(0,f.jsx)(`div`,{children:(0,f.jsx)(sC,{strong:!0,style:{fontSize:16},children:`Add Test Case`})})]})}),(0,f.jsx)(Z,{children:(0,f.jsxs)(u.Form,{form:e,className:`v1-form`,layout:`vertical`,colon:!1,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),initialValues:lC,onFinish:R,autoComplete:`off`,children:[(0,f.jsx)(u.Card,{className:`v1-card`,title:(0,f.jsx)(gC,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`Test Case Details`}),extra:(0,f.jsx)(sC,{type:`secondary`,className:`v1-card-subtitle`,children:`Module, flow, step order and execution data`}),children:(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`},children:[(0,f.jsx)(u.Form.Item,{label:`Module`,name:`module`,style:{flex:1},children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,loading:c,optionFilterProp:`label`,placeholder:`Select module`,options:D,onChange:B})}),(0,f.jsx)(u.Button,{"aria-label":`Add module`,icon:(0,f.jsx)(d.PlusOutlined,{}),style:{marginTop:30},onClick:()=>H(`module`)})]})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Flow`,name:`flow`,children:(0,f.jsx)(u.AutoComplete,{maxLength:100,allowClear:!0,disabled:M,options:o,placeholder:h?`Loading flows`:`Enter flow`,onChange:V,filterOption:(e,t)=>t?.value?.toLowerCase().includes(e.toLowerCase())})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Step Order`,name:`step_order`,validateTrigger:[`onBlur`,`onChange`],children:(0,f.jsx)(u.Input,{maxLength:10,disabled:!0,placeholder:x?`Loading step order`:`Step order`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Action`,name:`keyword`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,disabled:N,optionFilterProp:`label`,placeholder:`Select action`,options:oC,onChange:t=>e.setFieldsValue({keyword:pC(t)})})})}),(0,f.jsx)(u.Col,{xs:24,children:(0,f.jsx)(u.Form.Item,{label:`Description`,name:`description`,children:(0,f.jsx)(u.Input.TextArea,{rows:3,maxLength:255,disabled:N,placeholder:`Enter description`,showCount:!0,onBlur:e=>z(`description`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Key`,name:`target`,children:(0,f.jsx)(u.Input,{maxLength:255,disabled:N,placeholder:`Enter target`,onBlur:e=>z(`target`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Tags`,name:`tags`,children:(0,f.jsx)(u.Input,{maxLength:200,disabled:N,placeholder:`Enter tags`,prefix:(0,f.jsx)(d.TagsOutlined,{className:`v1-input-icon`}),onBlur:e=>z(`tags`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Value`,name:`value`,children:(0,f.jsx)(u.Input.TextArea,{rows:4,disabled:N,placeholder:`Enter value`,onBlur:e=>z(`value`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Expected`,name:`expected`,children:(0,f.jsx)(u.Input.TextArea,{rows:4,disabled:N,placeholder:`Enter expected result`,onBlur:e=>z(`expected`,e.target.value)})})})]})}),(0,f.jsx)(`div`,{className:`v1-form-actions`,children:(0,f.jsx)(u.Form.Item,{children:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{type:`primary`,htmlType:`submit`,loading:C,disabled:N,children:`Submit`}),(0,f.jsx)(u.Button,{onClick:()=>{e.resetFields(),a([]),s([])},children:`Reset`})]})})})]})}),(0,f.jsx)(u.Modal,{title:`Add ${E.label}`,open:_.open,confirmLoading:y,okText:`Add`,onCancel:U,onOk:()=>{b(!0),W()},destroyOnHidden:!0,children:(0,f.jsxs)(u.Form,{form:t,layout:`vertical`,colon:!1,className:`v1-form`,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),children:[(0,f.jsx)(u.Form.Item,{label:`Name`,name:`name`,children:(0,f.jsx)(u.Input,{maxLength:100,placeholder:`Enter ${E.label.toLowerCase()} name`,onBlur:e=>{t.setFieldsValue({name:fC(e.target.value)})}})}),(0,f.jsx)(u.Form.Item,{label:`Type`,name:`type`,children:(0,f.jsx)(u.Input,{disabled:!0})})]})})]})})]})}var{Text:vC}=u.Typography,yC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`}];function bC(e=``){return String(e??``).trim()}function xC(e=[],t){return e.map(e=>({value:e.id,label:e[t]}))}var SC=[{label:`Step`,value:`step_order`,width:70},{label:`Action`,value:`actions`,width:140},{label:`Key`,value:`key`,width:160,ellipsis:!0},{label:`Value`,value:`value`,ellipsis:!0},{label:`Description`,value:`description`,ellipsis:!0},{label:`Scenario`,value:`scenario`,width:110,render:e=>e===1?(0,f.jsx)(u.Tag,{color:`green`,children:`Positive`}):(0,f.jsx)(u.Tag,{color:`red`,children:`Negative`})}],CC={key:!1,value:!1,expected:!1};function wC(e,t){return t?e[t]??CC:CC}function TC(e,t){e.setFields(t.map(e=>({name:e,errors:[]})))}function EC(){let[e]=u.Form.useForm(),t=(0,p.useNavigate)(),[n]=(0,p.useSearchParams)(),r=n.get(`edit`),i=!!r,a=(0,l.useMemo)(()=>se(),[]),[o,s]=(0,l.useState)([]),[c,m]=(0,l.useState)([]),[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)(oC),[y,b]=(0,l.useState)({}),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(!1),[T,E]=(0,l.useState)(!1),[D,O]=(0,l.useState)(!1),[k,A]=(0,l.useState)(!1),j=u.Form.useWatch(`module`,e),M=u.Form.useWatch(`submodule`,e),N=u.Form.useWatch(`actions`,e),P=!!j,F=!!M,I=(0,l.useMemo)(()=>wC(y,N),[y,N]),L=(0,l.useMemo)(()=>xC(o,`modulename`),[o]),R=(0,l.useMemo)(()=>xC(c,`submodulename`),[c]),z=(0,l.useMemo)(()=>o.find(e=>e.id===j)?.modulename??``,[o,j]),B=(0,l.useMemo)(()=>c.find(e=>e.id===M)?.submodulename??``,[M,c]),V=(0,l.useCallback)(async()=>{try{let e=await Kh();Array.isArray(e?.options)&&e.options.length>0&&v(e.options),e?.rules&&typeof e.rules==`object`&&b(e.rules)}catch(e){console.error(`Unable to load action field rules:`,e),u.message.error(`Unable to load action validation rules.`)}},[]),H=(0,l.useCallback)(async e=>{if(!e){s([]);return}S(!0);try{s((await eg({project:e,activeOnly:!0}))?.items??[])}catch(e){console.error(`Unable to load modules:`,e),u.message.error(`Unable to load modules.`)}finally{S(!1)}},[]),U=(0,l.useCallback)(async(e,t)=>{if(!e||!t){m([]);return}w(!0);try{m((await rg({project:e,module:t,activeOnly:!0}))?.items??[])}catch(e){console.error(`Unable to load submodules:`,e),u.message.error(`Unable to load submodules.`)}finally{w(!1)}},[]),W=(0,l.useCallback)(async(t,n,r,i=``)=>{if(!t||!n||!r){g([]),e.setFieldsValue({step_order:void 0});return}E(!0);try{let[a,o]=await Promise.all([og({product_parent_ID:t,module_parent_ID:n,submodule_parent_ID:r,actions:i,limit:1e3}),lg({product_parent_ID:t,module_parent_ID:n,submodule_parent_ID:r})]);g(a?.items??[]),e.setFieldsValue({step_order:o?.step_order??1})}catch(e){console.error(`Unable to load flows:`,e),u.message.error(`Unable to load flows.`)}finally{E(!1)}},[e]),G=(0,l.useCallback)(async(e=``)=>{if(!(!a?.id||!j||!M)){E(!0);try{g((await og({product_parent_ID:a.id,module_parent_ID:j,submodule_parent_ID:M,actions:e,limit:1e3}))?.items??[])}catch(e){console.error(`Unable to load action flows:`,e),u.message.error(`Unable to load action steps.`)}finally{E(!1)}}},[a?.id,j,M]),K=(0,l.useCallback)(async()=>{if(!(!r||!a?.name)){A(!0);try{let t=await cg(r);await U(a.name,t.module),g((await og({product_parent_ID:t.product_parent_ID,module_parent_ID:t.module_parent_ID,submodule_parent_ID:t.submodule_parent_ID,limit:1e3}))?.items??[]),e.setFieldsValue({module:t.module_parent_ID,submodule:t.submodule_parent_ID,step_order:t.step_order,actions:t.actions,key:t.key,value:t.value,expected:t.expected,description:t.description,scenario:t.scenario===1,active:Number(t.active)!==0})}catch(e){console.error(`Unable to load test flow:`,e),u.message.error(`Unable to load test flow for edit.`),t(`/viewTestCase`)}finally{A(!1)}}},[r,e,U,t,a?.name]);return(0,l.useEffect)(()=>{if(!a){t(`/select-project`,{replace:!0});return}Promise.resolve().then(async()=>{await V(),await H(a.name),r&&await K()})},[a,t,V,H,r,K]),a?(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:yC})}),(0,f.jsx)(u.Col,{children:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.ProjectOutlined,{}),(0,f.jsx)(vC,{strong:!0,children:a.name})]})})]}),(0,f.jsx)(`div`,{className:`zt-page`,children:(0,f.jsxs)(u.Form,{form:e,layout:`vertical`,colon:!1,className:`v1-form`,initialValues:{scenario:!0,active:!0},onFinish:async n=>{let o={product_parent_ID:Number(a?.id),module_parent_ID:Number(n.module),submodule_parent_ID:Number(n.submodule),description:bC(n.description),actions:bC(n.actions),key:bC(n.key),value:bC(n.value),expected:bC(n.expected),scenario:+!!n.scenario,active:+!!n.active};O(!0);try{if(i){await ug(r,{...o,step_order:Number(n.step_order)}),u.message.success(`Test case updated successfully.`),t(`/viewTestCase`);return}await sg(o),u.message.success(`Step saved (#${n.step_order}).`),e.setFieldsValue({actions:void 0,key:void 0,value:void 0,expected:void 0,description:void 0}),await W(o.product_parent_ID,o.module_parent_ID,o.submodule_parent_ID)}catch(e){console.error(`Unable to save test case:`,e),u.message.error(i?`Unable to update test case.`:`Unable to save step.`)}finally{O(!1)}},autoComplete:`off`,disabled:k,children:[(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:8,className:`zt-section-title`,children:[(0,f.jsx)(`span`,{className:`zt-step-tag`,children:`1`}),(0,f.jsx)(`span`,{children:`Module & Submodule`})]}),children:(0,f.jsxs)(u.Row,{gutter:[24,0],align:`bottom`,children:[(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Module`,name:`module`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,loading:x,placeholder:`Select module`,options:L,onChange:t=>{let n=o.find(e=>e.id===t)?.modulename??``;e.setFieldsValue({module:t,submodule:void 0,step_order:void 0,actions:void 0,key:void 0,value:void 0,expected:void 0}),TC(e,[`actions`,`key`,`value`,`expected`]),m([]),g([]),U(a?.name,n)}})})}),(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Submodule`,name:`submodule`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,disabled:!P,loading:C,placeholder:P?`Select submodule`:`Select module first`,options:R,onChange:t=>{e.setFieldsValue({submodule:t,actions:void 0,key:void 0,value:void 0,expected:void 0}),TC(e,[`actions`,`key`,`value`,`expected`]),W(a?.id,j,t)}})})}),(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Scenario`,name:`scenario`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{disabled:!F,checkedChildren:`Positive`,unCheckedChildren:`Negative`})})}),(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Active`,name:`active`,valuePropName:`checked`,children:(0,f.jsx)(u.Switch,{checkedChildren:`Active`,unCheckedChildren:`Inactive`})})})]})}),F&&(0,f.jsxs)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:8,className:`zt-section-title`,children:[(0,f.jsx)(`span`,{className:`zt-step-tag`,children:`2`}),(0,f.jsx)(d.FileTextOutlined,{}),(0,f.jsx)(`span`,{children:`Step Details`})]}),extra:(0,f.jsxs)(vC,{type:`secondary`,children:[z,` / `,B]}),children:[(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:6,children:(0,f.jsx)(u.Form.Item,{label:`Step Order`,name:`step_order`,children:(0,f.jsx)(u.Input,{disabled:!0,placeholder:T?`Loading…`:`Auto`})})}),(0,f.jsx)(u.Col,{xs:24,md:18,children:(0,f.jsx)(u.Form.Item,{label:`Action`,name:`actions`,rules:[{required:!0,message:`Mandatory Field`}],children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,optionFilterProp:`label`,placeholder:`Select action`,options:_,onChange:t=>{let n=wC(y,t);e.setFieldsValue({actions:t,key:n.key?e.getFieldValue(`key`):void 0,value:n.value?e.getFieldValue(`value`):void 0,expected:n.expected?e.getFieldValue(`expected`):void 0}),TC(e,[`key`,`value`,`expected`]),G(t||``)}})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Key`,name:`key`,rules:[{required:I.key,message:`Key is required for this action`}],children:(0,f.jsx)(u.Input,{maxLength:255,disabled:N&&!I.key,placeholder:N?I.key?`Required — Enter selector / locator`:`Not needed for this action`:`Select an action first`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Value`,name:`value`,rules:[{required:I.value,message:`Value is required for this action`}],children:(0,f.jsx)(u.Input.TextArea,{rows:1,autoSize:{minRows:1,maxRows:4},disabled:N&&!I.value,placeholder:N?I.value?`Required — Enter value`:`Not needed for this action`:`Select an action first`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Expected`,name:`expected`,rules:[{required:I.expected,message:`Expected result is required for this action`}],children:(0,f.jsx)(u.Input.TextArea,{rows:2,disabled:N&&!I.expected,placeholder:N?I.expected?`Required — Enter expected result`:`Not needed for this action`:`Select an action first`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Description`,name:`description`,children:(0,f.jsx)(u.Input.TextArea,{rows:2,maxLength:255,showCount:!0,placeholder:`Enter description`})})})]}),(0,f.jsxs)(u.Space,{className:`zt-actions`,children:[(0,f.jsx)(u.Button,{onClick:()=>{if(i){t(`/viewTestCase`);return}e.resetFields(),m([]),g([]),w(!1),E(!1)},children:`Cancel`}),(0,f.jsx)(u.Button,{type:`primary`,htmlType:`submit`,loading:D||k,children:i?`Update Test Case`:`Save & Continue`})]})]},`${j}-${M}`),F&&(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.TableOutlined,{}),(0,f.jsx)(`span`,{children:`Added Steps`})]}),extra:(0,f.jsx)(u.Tag,{children:N?`${h.length} ${N} step(s)`:`${h.length} step(s)`}),children:(0,f.jsx)(gf,{listName:`Added Steps`,loading:T,fields:SC,dataSource:h,current:1,pageSize:Math.max(h.length,1),total:h.length,rowSelection:!1,className:`zt-list-plain zt-list-static`})})]})})]}):null}var{Text:DC}=u.Typography,OC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`},{label:`Manage Modules`,href:`/manageModules`}];function kC(){let e=(0,p.useNavigate)(),t=(0,l.useMemo)(()=>se(),[]),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)({}),[o,s]=(0,l.useState)(!1),[c,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)(1),[x,S]=(0,l.useState)(10),C=(0,l.useCallback)(async e=>{if(!e){r([]);return}s(!0);try{let[t,n]=await Promise.all([eg({project:e}),rg({project:e})]);r(t?.items??[]);let i={};(n?.items??[]).forEach(e=>{let t=e.modulename;i[t]=(i[t]??0)+1}),a(i)}catch(e){console.error(e),u.message.error(`Unable to load modules.`)}finally{s(!1)}},[]);(0,l.useEffect)(()=>{if(!t){e(`/select-project`,{replace:!0});return}Promise.resolve().then(()=>C(t.name))},[t,e,C]);let w=async(e,t)=>{try{await ng(e.id,+!!t),r(n=>n.map(n=>n.id===e.id?{...n,active:+!!t}:n)),u.message.success(`Module ${t?`activated`:`deactivated`}.`)}catch(e){console.error(e),u.message.error(`Unable to update module status.`)}},T=async()=>{let e=h.trim();if(!e){u.message.warning(`Enter a module name.`);return}v(!0);try{await tg({project:t.name,modulename:e}),u.message.success(`Module added.`),m(!1),g(``),b(1),C(t.name)}catch(e){console.error(e),u.message.error(`Unable to add module (maybe it already exists).`)}finally{v(!1)}},E=t=>{e(`/test-cases/zinnext/submodules?module=${encodeURIComponent(t.modulename)}`)};return t?(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:OC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>e(`/addTestCase`),children:`Back to Form`})})]}),(0,f.jsxs)(`div`,{className:`zt-page`,children:[(0,f.jsx)(u.Card,{className:`v1-card zt-bar`,children:(0,f.jsxs)(u.Row,{gutter:[16,16],align:`middle`,justify:`space-between`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.ProjectOutlined,{}),(0,f.jsx)(`span`,{children:`Project:`}),(0,f.jsx)(DC,{strong:!0,children:t.name})]})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>m(!0),children:`Add Module`})})]})}),(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.AppstoreOutlined,{}),(0,f.jsx)(`span`,{children:`Modules`})]}),children:(0,f.jsx)(gf,{listName:`Modules`,loading:o,fields:[{label:`Module`,value:`modulename`},{label:`Submodules`,value:`submoduleCount`,width:140,render:(e,t)=>(0,f.jsxs)(u.Button,{type:`link`,className:`zt-count-link`,onClick:()=>E(t),children:[i[t.modulename]??0,` submodule(s)`]})},{label:`Active`,value:`active`,width:120,render:(e,t)=>(0,f.jsx)(u.Switch,{checked:e===1,checkedChildren:`On`,unCheckedChildren:`Off`,onChange:e=>w(t,e)})}],dataSource:n,current:y,pageSize:x,total:n.length,onPageChange:b,onPageSizeChange:e=>{b(1),S(e)},rowSelection:!1,className:`zt-list-plain`})})]}),(0,f.jsx)(u.Modal,{title:`Add Module`,open:c,confirmLoading:_,okText:`Add`,onOk:T,onCancel:()=>{m(!1),g(``)},destroyOnHidden:!0,children:(0,f.jsxs)(u.Space,{direction:`vertical`,className:`zt-modal-stack`,children:[(0,f.jsxs)(DC,{type:`secondary`,children:[`Project: `,(0,f.jsx)(`b`,{children:t.name})]}),(0,f.jsx)(u.Input,{placeholder:`Enter module name`,maxLength:100,value:h,onChange:e=>g(e.target.value),onPressEnter:T})]})})]}):null}var{Text:AC}=u.Typography,jC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`},{label:`Manage Modules`,href:`/manageModules`},{label:`Manage Submodules`,href:`/test-cases/zinnext/submodules`}];function MC(){let e=(0,p.useNavigate)(),[t]=(0,p.useSearchParams)(),n=(0,l.useMemo)(()=>se(),[]),r=t.get(`module`)??``,[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)(!1),[c,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)(1),[x,S]=(0,l.useState)(10),C=(0,l.useCallback)(async(e,t)=>{if(!e||!t){a([]);return}s(!0);try{a((await rg({project:e,module:t}))?.items??[])}catch(e){console.error(e),u.message.error(`Unable to load submodules.`)}finally{s(!1)}},[]);(0,l.useEffect)(()=>{if(!n){e(`/select-project`,{replace:!0});return}if(!r){e(`/manageModules`,{replace:!0});return}Promise.resolve().then(()=>C(n.name,r))},[n,r,e,C]);let w=async(e,t)=>{try{await ag(e.id,+!!t),a(n=>n.map(n=>n.id===e.id?{...n,active:+!!t}:n)),u.message.success(`Submodule ${t?`activated`:`deactivated`}.`)}catch(e){console.error(e),u.message.error(`Unable to update submodule status.`)}},T=async()=>{let e=h.trim();if(!e){u.message.warning(`Enter a submodule name.`);return}v(!0);try{await ig({project:n.name,modulename:r,submodulename:e}),u.message.success(`Submodule added.`),m(!1),g(``),b(1),C(n.name,r)}catch(e){console.error(e),u.message.error(`Unable to add submodule (maybe it already exists).`)}finally{v(!1)}};return!n||!r?null:(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:jC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>e(`/manageModules`),children:`Back to Modules`})})]}),(0,f.jsxs)(`div`,{className:`zt-page`,children:[(0,f.jsx)(u.Card,{className:`v1-card zt-bar`,children:(0,f.jsxs)(u.Row,{gutter:[16,16],align:`middle`,justify:`space-between`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsxs)(u.Space,{size:16,wrap:!0,className:`zt-section-title`,children:[(0,f.jsxs)(u.Space,{size:6,children:[(0,f.jsx)(d.ProjectOutlined,{}),(0,f.jsx)(`span`,{children:`Project:`}),(0,f.jsx)(AC,{strong:!0,children:n.name})]}),(0,f.jsxs)(u.Space,{size:6,children:[(0,f.jsx)(d.AppstoreOutlined,{}),(0,f.jsx)(`span`,{children:`Module:`}),(0,f.jsx)(AC,{strong:!0,children:r})]})]})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`primary`,icon:(0,f.jsx)(d.PlusOutlined,{}),onClick:()=>m(!0),children:`Add Submodule`})})]})}),(0,f.jsx)(u.Card,{className:`v1-card zt-fall`,title:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.AppstoreOutlined,{}),(0,f.jsx)(`span`,{children:`Submodules`})]}),children:(0,f.jsx)(gf,{listName:`Submodules`,loading:o,fields:[{label:`Submodule`,value:`submodulename`},{label:`Active`,value:`active`,width:120,render:(e,t)=>(0,f.jsx)(u.Switch,{checked:e===1,checkedChildren:`On`,unCheckedChildren:`Off`,onChange:e=>w(t,e)})}],dataSource:i,current:y,pageSize:x,total:i.length,onPageChange:b,onPageSizeChange:e=>{b(1),S(e)},rowSelection:!1,className:`zt-list-plain`})})]}),(0,f.jsx)(u.Modal,{title:`Add Submodule`,open:c,confirmLoading:_,okText:`Add`,onOk:T,onCancel:()=>{m(!1),g(``)},destroyOnHidden:!0,children:(0,f.jsxs)(u.Space,{direction:`vertical`,className:`zt-modal-stack`,children:[(0,f.jsxs)(AC,{type:`secondary`,children:[`Project: `,(0,f.jsx)(`b`,{children:n.name}),` \xA0|\xA0 Module: `,(0,f.jsx)(`b`,{children:r})]}),(0,f.jsx)(u.Input,{placeholder:`Enter submodule name`,maxLength:100,value:h,onChange:e=>g(e.target.value),onPressEnter:T})]})})]})}var{Text:NC}=u.Typography,PC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/addTestCase`},{label:`Table`,href:`/viewTestCase`}];function FC(){let e=(0,p.useNavigate)(),[t,n]=(0,l.useState)([]),[r,i]=(0,l.useState)(0),[a,o]=(0,l.useState)(!1),s=(0,l.useMemo)(()=>se(),[]),[c,m]=(0,l.useState)(``),[h,g]=(0,l.useState)(1),[_,v]=(0,l.useState)(20),[y,b]=(0,l.useState)(null),x=(0,l.useCallback)(async(e={})=>{o(!0);try{let t=await og({product_parent_ID:e.project??s?.id??``,search:e.search??c??``,limit:e.pageSize??_,offset:((e.page??h)-1)*(e.pageSize??_)});n(t?.items??[]),i(t?.total??0)}catch(e){console.error(e),u.message.error(`Unable to load test flows.`)}finally{o(!1)}},[s?.id,c,h,_]),S=e=>{u.Modal.confirm({title:`Delete Test Case`,icon:(0,f.jsx)(d.ExclamationCircleOutlined,{}),content:`Are you sure you want to delete this test case?`,okText:`Delete`,okButtonProps:{danger:!0,loading:y===e.id},cancelText:`Cancel`,async onOk(){b(e.id);try{await dg(e.id),u.message.success(`Test case deleted successfully.`);let n=t.length===1&&h>1?h-1:h;g(n),await x({page:n})}catch(e){throw console.error(`Unable to delete test flow:`,e),u.message.error(`Unable to delete test case.`),e}finally{b(null)}}})};return(0,l.useEffect)(()=>{Promise.resolve().then(()=>{if(!s?.id){e(`/select-project`,{replace:!0});return}x({page:1})})},[]),(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:PC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>e(`/addTestCase`),children:`Back to Form`})})]}),(0,f.jsx)(`div`,{className:`zt-page zt-page-wide`,children:(0,f.jsxs)(u.Card,{className:`v1-card`,title:(0,f.jsxs)(u.Space,{size:6,className:`zt-section-title`,children:[(0,f.jsx)(d.TableOutlined,{}),(0,f.jsx)(`span`,{children:`Test Flows`})]}),extra:(0,f.jsxs)(NC,{type:`secondary`,children:[r,` row(s)`]}),children:[(0,f.jsxs)(u.Space,{wrap:!0,className:`zt-toolbar`,children:[(0,f.jsx)(u.Input.Search,{allowClear:!0,className:`zt-search-filter`,placeholder:`Search module / key / description`,value:c,onChange:e=>m(e.target.value),onSearch:()=>{g(1),x({page:1})}}),(0,f.jsx)(u.Button,{icon:(0,f.jsx)(d.ReloadOutlined,{}),onClick:()=>x(),children:`Refresh`})]}),(0,f.jsx)(gf,{listName:`Test Flows`,loading:a,fields:[{label:`Actions`,value:`rowActions`,width:112,fixed:`left`,sorter:!1,render:(t,n)=>(0,f.jsxs)(u.Space,{size:4,className:`zt-row-actions`,children:[(0,f.jsx)(u.Tooltip,{title:`Edit`,children:(0,f.jsx)(u.Button,{type:`text`,size:`small`,icon:(0,f.jsx)(d.EditOutlined,{}),onClick:()=>e(`/addTestCase?edit=${n.id}`)})}),(0,f.jsx)(u.Tooltip,{title:`Delete`,children:(0,f.jsx)(u.Button,{danger:!0,type:`text`,size:`small`,icon:(0,f.jsx)(d.DeleteOutlined,{}),loading:y===n.id,onClick:()=>S(n)})})]})},{label:`ID`,value:`id`,width:70,fixed:`left`},{label:`Project`,value:`project`,width:130},{label:`Module`,value:`module`,width:130},{label:`Submodule`,value:`submodule`,width:140},{label:`Step`,value:`step_order`,width:70},{label:`Action`,value:`actions`,width:140},{label:`Key`,value:`key`,width:160,ellipsis:!0},{label:`Value`,value:`value`,width:200,ellipsis:!0},{label:`Expected`,value:`expected`,width:180,ellipsis:!0},{label:`Description`,value:`description`,width:180,ellipsis:!0},{label:`Scenario`,value:`scenario`,width:110,render:e=>e===1?(0,f.jsx)(u.Tag,{color:`green`,children:`Positive`}):(0,f.jsx)(u.Tag,{color:`red`,children:`Negative`})},{label:`Active`,value:`active`,width:90,render:e=>e===1?(0,f.jsx)(u.Tag,{color:`blue`,children:`Active`}):(0,f.jsx)(u.Tag,{children:`Inactive`})}],dataSource:t,current:h,pageSize:_,total:r,onPageChange:e=>{g(e),x({page:e})},onPageSizeChange:e=>{g(1),v(e),x({page:1,pageSize:e})},rowSelection:!1,className:`zt-list-plain`})]})})]})}var IC=[{label:`Home`,href:`/`},{label:`Test Cases`,href:`/test-cases`}];function LC(){return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsx)(so,{items:IC}),(0,f.jsx)(Zl,{moduleName:`test-flows`,rowKey:`id`})]})}var{Text:RC}=u.Typography,zC=[{label:`Home`,href:`/`},{label:`LMS Cases`,href:`/lms-cases`}],BC={tags:`regression`,active:1},VC={module:{dbName:`Modules`,formField:`module`,label:`Module`}},HC={key:!1,value:!1,expected:!1};function UC(e,t){return t?e[t]??HC:HC}function WC(e,t){e.setFields(t.map(e=>({name:e,errors:[]})))}function GC(e=[]){return e.map(e=>({value:e,label:e}))}function KC(e=``){return String(e??``).trim()}function qC(e=[]){let t=new Map;return e.forEach(e=>{let n=KC(e?.flow),r=n.toLowerCase();n&&!t.has(r)&&t.set(r,n)}),Array.from(t.values()).map(e=>({value:e,label:e}))}function JC(e=[],t,n){let r=KC(t).toLowerCase(),i=KC(n).toLowerCase();return e.reduce((e,t)=>{let n=KC(t?.module).toLowerCase(),a=KC(t?.flow).toLowerCase();if(n!==r||a!==i)return e;let o=Number(t?.step_order)||0;return Math.max(e,o)},0)+1}function YC({icon:e,title:t}){return(0,f.jsxs)(u.Space,{size:10,align:`center`,children:[(0,f.jsx)(`div`,{className:`v1-section-icon-box`,children:e}),(0,f.jsx)(RC,{strong:!0,className:`v1-section-label`,children:t})]})}function XC(){let[e]=u.Form.useForm(),[t]=u.Form.useForm(),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)([]),[o,s]=(0,l.useState)([]),[c,m]=(0,l.useState)(oC),[h,g]=(0,l.useState)({}),[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),[x,S]=(0,l.useState)({open:!1,typeKey:`module`}),[C,w]=(0,l.useState)(!1),[T,E]=(0,l.useState)(!1),[D,O]=(0,l.useState)(!1),k=(0,p.useNavigate)(),A=VC[x.typeKey],j=(0,l.useMemo)(()=>GC(n),[n]),M=u.Form.useWatch(`module`,e),N=u.Form.useWatch(`flow`,e),P=u.Form.useWatch(`keyword`,e),F=!!KC(M),I=!!KC(N),L=!F,R=!F||!I,z=(0,l.useMemo)(()=>UC(h,P),[h,P]),B=(e,t=[])=>{e===`module`&&r(t)},V=async()=>{v(!0);try{r((await Wh(VC.module.dbName))?.items??[])}catch(e){console.error(`Unable to load testing options:`,e),u.message.error(`Unable to load testing options.`)}finally{v(!1)}},H=async()=>{try{let e=await Kh();Array.isArray(e?.options)&&e.options.length>0&&m(e.options),e?.rules&&typeof e.rules==`object`&&g(e.rules)}catch(e){console.error(`Unable to load action field rules:`,e),u.message.error(`Unable to load action validation rules.`)}},U=(0,l.useCallback)(async t=>{let n=KC(t);if(a([]),s([]),e.setFieldsValue({step_order:void 0}),n){b(!0);try{let e=await Qh({limit:1e4,offset:0,module:n}),t=Array.isArray(e?.items)?e.items:[];a(t),s(qC(t))}catch(e){console.error(`Unable to load flows:`,e),u.message.error(`Unable to load flows.`)}finally{b(!1)}}},[e]),W=(0,l.useCallback)(async(t,n,r)=>{let i=KC(t),a=KC(n);if(!i||!a){e.setFieldsValue({step_order:void 0});return}E(!0);try{e.setFieldsValue({step_order:JC(r,i,a)})}catch(e){console.error(`Unable to load step order:`,e),u.message.error(`Unable to load step order.`)}finally{E(!1)}},[e]);(0,l.useEffect)(()=>{Promise.resolve().then(async()=>{await Promise.all([V(),H()])})},[]),(0,l.useEffect)(()=>{Promise.resolve().then(()=>U(M))},[U,M]),(0,l.useEffect)(()=>{Promise.resolve().then(()=>W(M,N,i))},[i,W,N,M]);let G=async t=>{let n={module:KC(t.module),flow:KC(t.flow),step_order:Number(t.step_order),description:KC(t.description),keyword:KC(t.keyword),target:KC(t.target),value:KC(t.value),expected:KC(t.expected),tags:t.tags?KC(t.tags):BC.tags,active:Number(t.active)};O(!0);try{await Zh(n),u.message.success(`LMS case details saved successfully.`),e.resetFields(),a([]),s([])}catch(e){console.error(`Unable to save LMS case:`,e),u.message.error(`Unable to save LMS case.`)}finally{O(!1)}},K=(t,n)=>{e.setFieldsValue({[t]:KC(n)})},q=t=>{e.setFieldsValue({module:KC(t),flow:void 0,step_order:void 0,keyword:void 0,description:void 0,target:void 0,tags:BC.tags,value:void 0,expected:void 0}),WC(e,[`keyword`,`target`,`value`,`expected`])},ee=t=>{e.setFieldsValue({flow:KC(t),step_order:void 0,keyword:void 0,target:void 0,value:void 0,expected:void 0}),WC(e,[`keyword`,`target`,`value`,`expected`])},te=t=>{let n=UC(h,t);e.setFieldsValue({keyword:KC(t),target:n.key?e.getFieldValue(`target`):void 0,value:n.value?e.getFieldValue(`value`):void 0,expected:n.expected?e.getFieldValue(`expected`):void 0}),WC(e,[`target`,`value`,`expected`])},ne=e=>{let n=VC[e];S({open:!0,typeKey:e}),t.setFieldsValue({name:``,type:n.label})},re=()=>{S(e=>({...e,open:!1})),t.resetFields()},ie=async()=>{try{let n=KC((await t.validateFields()).name),r=await Gh({name:n,type:A.dbName});B(x.typeKey,r?.items??[]),e.setFieldsValue({[A.formField]:n}),u.message.success(`${A.label} added successfully.`),re()}catch(e){if(e?.errorFields)return;console.error(`Unable to save testing option:`,e),u.message.error(`Unable to add ${A.label.toLowerCase()}.`)}finally{w(!1)}};return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsxs)(u.Row,{align:`middle`,justify:`space-between`,className:`breadcrumb-action-wrapper`,children:[(0,f.jsx)(u.Col,{children:(0,f.jsx)(so,{items:zC})}),(0,f.jsx)(u.Col,{children:(0,f.jsx)(u.Button,{type:`link`,onClick:()=>k(`/lms-home`),children:`View Table`})})]}),(0,f.jsx)(`div`,{className:`v1-page`,children:(0,f.jsxs)(`div`,{className:`v1-page-inner`,children:[(0,f.jsx)(`div`,{className:`v1-page-header`,children:(0,f.jsxs)(u.Space,{align:`center`,size:10,children:[(0,f.jsx)(d.ProfileOutlined,{className:`v1-outer-icon`}),(0,f.jsx)(`div`,{children:(0,f.jsx)(RC,{strong:!0,style:{fontSize:16},children:`Add LMS Case`})})]})}),(0,f.jsx)(Z,{children:(0,f.jsxs)(u.Form,{form:e,className:`v1-form`,layout:`vertical`,colon:!1,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),initialValues:BC,onFinish:G,autoComplete:`off`,children:[(0,f.jsx)(u.Card,{className:`v1-card`,title:(0,f.jsx)(YC,{icon:(0,f.jsx)(d.FileTextOutlined,{}),title:`LMS Case Details`}),extra:(0,f.jsx)(RC,{type:`secondary`,className:`v1-card-subtitle`,children:`Module, flow, step order and execution data`}),children:(0,f.jsxs)(u.Row,{gutter:[24,0],children:[(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsxs)(u.Space.Compact,{style:{width:`100%`},children:[(0,f.jsx)(u.Form.Item,{label:`Module`,name:`module`,style:{flex:1},children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,loading:_,optionFilterProp:`label`,placeholder:`Select module`,options:j,onChange:q})}),(0,f.jsx)(u.Button,{"aria-label":`Add module`,icon:(0,f.jsx)(d.PlusOutlined,{}),style:{marginTop:30},onClick:()=>ne(`module`)})]})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Flow`,name:`flow`,children:(0,f.jsx)(u.AutoComplete,{maxLength:100,allowClear:!0,disabled:L,options:o,placeholder:y?`Loading flows`:`Enter flow`,onChange:ee,filterOption:(e,t)=>t?.value?.toLowerCase().includes(e.toLowerCase())})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Step Order`,name:`step_order`,validateTrigger:[`onBlur`,`onChange`],children:(0,f.jsx)(u.Input,{maxLength:10,disabled:!0,placeholder:T?`Loading step order`:`Step order`})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Action`,name:`keyword`,children:(0,f.jsx)(u.Select,{allowClear:!0,showSearch:!0,disabled:R,optionFilterProp:`label`,placeholder:`Select action`,options:c,onChange:te})})}),(0,f.jsx)(u.Col,{xs:24,children:(0,f.jsx)(u.Form.Item,{label:`Description`,name:`description`,children:(0,f.jsx)(u.Input.TextArea,{rows:3,maxLength:255,disabled:R,placeholder:`Enter description`,showCount:!0,onBlur:e=>K(`description`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Key`,name:`target`,rules:[{required:z.key,message:`Key is required for this action`}],children:(0,f.jsx)(u.Input,{maxLength:255,disabled:R||!!P&&!z.key,placeholder:R?`Select module and flow first`:P?z.key?`Required — Enter selector / locator`:`Not needed for this action`:`Select an action first`,onBlur:e=>K(`target`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Tags`,name:`tags`,children:(0,f.jsx)(u.Input,{maxLength:200,disabled:R,placeholder:`Enter tags`,prefix:(0,f.jsx)(d.TagsOutlined,{className:`v1-input-icon`}),onBlur:e=>K(`tags`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Value`,name:`value`,rules:[{required:z.value,message:`Value is required for this action`}],children:(0,f.jsx)(u.Input.TextArea,{rows:4,disabled:R||!!P&&!z.value,placeholder:R?`Select module and flow first`:P?z.value?`Required — Enter value`:`Not needed for this action`:`Select an action first`,onBlur:e=>K(`value`,e.target.value)})})}),(0,f.jsx)(u.Col,{xs:24,md:12,children:(0,f.jsx)(u.Form.Item,{label:`Expected`,name:`expected`,rules:[{required:z.expected,message:`Expected result is required for this action`}],children:(0,f.jsx)(u.Input.TextArea,{rows:4,disabled:R||!!P&&!z.expected,placeholder:R?`Select module and flow first`:P?z.expected?`Required — Enter expected result`:`Not needed for this action`:`Select an action first`,onBlur:e=>K(`expected`,e.target.value)})})})]})}),(0,f.jsx)(`div`,{className:`v1-form-actions`,children:(0,f.jsx)(u.Form.Item,{children:(0,f.jsxs)(u.Space,{children:[(0,f.jsx)(u.Button,{type:`primary`,htmlType:`submit`,loading:D,disabled:R,children:`Submit`}),(0,f.jsx)(u.Button,{onClick:()=>{e.resetFields(),a([]),s([])},children:`Reset`})]})})})]})}),(0,f.jsx)(u.Modal,{title:`Add ${A.label}`,open:x.open,confirmLoading:C,okText:`Add`,onCancel:re,onOk:()=>{w(!0),ie()},destroyOnHidden:!0,children:(0,f.jsxs)(u.Form,{form:t,layout:`vertical`,colon:!1,className:`v1-form`,requiredMark:(e,{required:t})=>(0,f.jsxs)(f.Fragment,{children:[e,t&&(0,f.jsx)(`span`,{className:`v1-required-mark`,children:` *`})]}),children:[(0,f.jsx)(u.Form.Item,{label:`Name`,name:`name`,children:(0,f.jsx)(u.Input,{maxLength:100,placeholder:`Enter ${A.label.toLowerCase()} name`,onBlur:e=>{t.setFieldsValue({name:KC(e.target.value)})}})}),(0,f.jsx)(u.Form.Item,{label:`Type`,name:`type`,children:(0,f.jsx)(u.Input,{disabled:!0})})]})})]})})]})}var ZC=[{label:`Home`,href:`/`},{label:`LMS Cases`,href:`/lms-cases`}];function QC(){return(0,f.jsxs)(`main`,{className:`jobs-list-page`,children:[(0,f.jsx)(so,{items:ZC}),(0,f.jsx)(Zl,{moduleName:`lms-flows`,rowKey:`id`})]})}var $C=mg(ky),ew=mg(zS),tw=mg(VS),nw=mg(HS),rw=mg(WS),iw=mg(aC),aw=mg(_C),ow=mg(EC),sw=mg(kC),cw=mg(MC),lw=mg(FC),uw=mg(LC),dw=mg(XC),fw=mg(QC);exports.ADMIN_API_URL=D,exports.ADMIN_APP_ID=O,exports.AUTH_URL=E,exports.ActivityTab=fd,exports.AddFormV1=rd,exports.AdminDashboard=Oy,exports.AdminPage=$C,exports.AppAlert=id,exports.AppButton=mc,exports.AppShell=Rh,exports.AssigneeAvatars=pd,exports.AuthGuard=Ih,exports.Breadcrumb=so,exports.BulkUploadPage=iw,exports.CANDIDATES_URL=j,exports.CalendarCard=Oe,exports.CoreThemeAdminApp=My,exports.CoreThemeAdminRoutes=jy,exports.CustomPagination=Rs,exports.DescriptionBlock=wd,exports.DetailHeaderCard=om,exports.DetailViewPage=fm,exports.DetailViewV1=pp,exports.DocumentViewer=Bt,exports.DynamicCards=xt,exports.DynamicPopup=Lb,exports.DynamicPopupRoute=Vx,exports.DynamicTabs=Hs,exports.EditFormV1=Ym,exports.Header=wh,exports.JOBS_URL=A,exports.JobModuleDetailPage=nw,exports.JobsListPage=tw,exports.LegacyAdminPage=ew,exports.ListView=Zl,exports.LmsHomePage=fw,exports.LmsTestForm=dw,exports.Login=zh,exports.MailPopup=By,exports.ManageModules=sw,exports.ManageSubmodules=cw,exports.POPUP_CONFIGS=Lx,exports.ParamCardView=Cf,exports.ParamListView=gf,exports.PreviewPopup=$y,exports.ProjectSelect=pg,exports.SUBMISSIONS_URL=k,exports.Sidebar=Mh,exports.StickyNotesFullPage=rw,exports.StylishDynamicTabs=zd,exports.TemplateEditor=eh,exports.TestForm=aw,exports.TestingHomePage=uw,exports.TipTapEditor=wt,exports.UserForm=$x,exports.VendorShareDrawer=Gx,exports.ViewSummaryWidget=pc,exports.WizardPopup=ab,exports.ZinnextTableView=lw,exports.ZinnextTestForm=ow,exports.clearSelectedProject=ce,exports.colors=Ka,exports.configureCoreTheme=N,exports.getCurrentRoleName=re,exports.getModuleConfig=Ie,exports.getSelectedProject=se,exports.getStoredToken=ee,exports.getStoredUser=te,exports.getUserRoles=ie,exports.isTester=ae,exports.logout=ne,exports.setSelectedProject=oe,exports.useDropdownFields=Yo,exports.useDropdownValues=hc,exports.useEditForm=th,exports.useFieldConfig=Xo,exports.useFilterFields=Zo,exports.useMenuPermission=ts,exports.withAuthGuard=mg;
9
9
  //# sourceMappingURL=index.cjs.map