PageSourceSearch

https://app.merlinai.co/_next/static/chunks/92970-8b60771ec9509223.js

js merlinai.co collected 2026-09-30 05:41:03 UTC 26,998 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[92970],{609706:function(e,t,n){n.d(t,{KW:function(){return g},Sm:function(){return d},aO:function(){return m},kS:function(){return c},m4:function(){return l},mc:function(){return h},p7:function(){return u},uv:function(){return p}});var r=n(878551),a=n(430202),s=n(720249),o=n(792567),i=n(491733);n(926495);let l=e=>{var t;let{data:n,isLoading:a}=(0,r.a)({queryKey:["org-product-categories"],queryFn:()=>(0,i.Am)(),select:e=>null!==(t=null==e?void 0:e.data)&&void 0!==t?t:[],staleTime:3e5,...e});return{productCategoryOptions:null!=n?n:[],isLoadingProductCategoryOptions:a}},c=(e,t)=>{var n;let{data:a,isLoading:s,isError:o}=(0,r.a)({queryKey:["all-projects",e],queryFn:()=>(0,i.g6)({globalSearch:e,size:200}),select:e=>{var t;return null!==(n=null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.projects)&&void 0!==n?n:[]},staleTime:3e5,...t});return{allProjects:a,isLoadingAllProjects:s,isErrorAllProjects:o}},u=(e,t)=>{let{data:n,isLoading:a,isError:s}=(0,r.a)({queryKey:["projectDetails",e],queryFn:()=>(0,i.A3)(e),select:e=>null==e?void 0:e.data,staleTime:6e4,enabled:!!e,...t});return{projectDetails:n,isLoadingProjectDetails:a,isErrorProjectDetails:s}},d=(e,t)=>{let{notify:n}=(0,o.lm)(),r=(0,a.NL)(),{onSuccess:l,...c}=null!=t?t:{},u=(0,s.D)({mutationFn:async t=>{let{section:n,payload:r}=t,a=await (0,i.xv)(e,n,r);if(!a)throw Error("Saving the project's ".concat(n," failed"));return a},onSuccess:(t,a,s)=>{n({message:"Updated",type:"success"}),r.invalidateQueries({queryKey:["project-details",e]}),r.invalidateQueries({queryKey:["projectDetails",e]}),null==l||l(t,a,s)},...c});return u},p=e=>{let{data:t,isLoading:n,isError:a}=(0,r.a)({queryKey:["unlinked-sale-estimates"],queryFn:()=>(0,i.Ye)(),select:e=>null==e?void 0:e.data,...e});return{unlinkedSaleEstimates:t,isLoadingUnlinkedSaleEstimates:n,isErrorUnlinkedSaleEstimates:a}},m=(e,t)=>{let{notify:n}=(0,o.lm)(),r=(0,a.NL)(),{onSuccess:l,...c}=null!=t?t:{};return(0,s.D)({mutationFn:async t=>{let n=await (0,i.W_)(e,t);if(!n)throw Error("Failed to update sale estimates");return n},onSuccess:(t,a,s)=>{n({message:"Sale estimates updated",type:"success"}),r.invalidateQueries({queryKey:["projectDetails",e]}),r.invalidateQueries({queryKey:["unlinked-sale-estimates"]}),null==l||l(t,a,s)},...c})},h=()=>{let{notify:e}=(0,o.lm)();return(0,s.D)({mutationFn:e=>(0,i.m6)(e),onError:()=>{e({message:"Failed to open customer portal preview. Please try again.",type:"error"})}})},g=e=>{let{projectNumber:t,lastSerialNumber:n,length:a}=e,{data:s,isLoading:o,isError:l,refetch:c}=(0,r.a)({queryKey:["get-serial-numbers",t],queryFn:()=>(0,i.dD)(t),select:e=>null==e?void 0:e.data,enabled:!!t}),u=[];if(s&&Array.isArray(s)){if(n){let e=s.findIndex(e=>e===n);u=-1!==e?s.slice(e+1,e+1+a):s.slice(0,a)}else u=s.slice(0,a)}return{serialNumbersSet:u,isLoadingSerialNumbersSet:o,isErrorSerialNumbersSet:l,refetchSerialNumbersSet:c}}},926495:function(e,t,n){n.d(t,{A$:function(){return u},Bz:function(){return s},G:function(){return m},Hh:function(){return d},IK:function(){return l},L2:function(){return q},Lq:function(){return F},Lr:function(){return Z},NF:function(){return k},NO:function(){return j},P5:function(){return h},Rd:function(){return c},VV:function(){return S},W8:function(){return p},We:function(){return D},Yq:function(){return b},_M:function(){return P},_g:function(){return y},a9:function(){return O},bm:function(){return w},e6:function(){return x},eh:function(){return A},gI:function(){return I},gz:function(){return i},i0:function(){return U},j$:function(){return L},k8:function(){return g},lU:function(){return f},ng:function(){return W},pn:function(){return z},s7:function(){return C},tg:function(){return v},uX:function(){return E},v$:function(){return o},v5:function(){return B},zG:function(){return N}});var r=n(55678),a=n(921156);let s=e=>{try{return a.ZP.get("/operations/api/v1/taskConfig/".concat(e))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},o=e=>{try{return a.ZP.get("/operations/api/v1/taskConfig/".concat(e,"/items"))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},i=e=>{try{return a.ZP.post("/operations/api/v1/taskConfig/items",[e])}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},l=e=>{try{return a.ZP.post("/operations/api/v1/taskConfig/items/".concat(e,"/delete"))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},c=e=>{try{return a.ZP.post("/operations/api/v1/taskConfig/connections/".concat(e,"/delete"))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},u=()=>{try{return a.ZP.get("/operations/api/v1/taskConfig/trades")}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},d=(e,t,n)=>{try{return a.ZP.post("/operations/api/v1/taskConfig/items/".concat(e),{x:t,y:n})}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},p=e=>{try{return a.ZP.get("/operations/api/v1/taskConfig/".concat(e,"/connections"))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},m=()=>{try{return a.ZP.get("/operations/api/v1/taskConfig/all")}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},h=(e,t,n)=>{try{return a.ZP.post("/operations/api/v1/taskConfig/connections",{configId:e,edge:{from:t,to:n}})}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},g=e=>{try{return a.ZP.get("/operations/api/v1/taskConfig/items/".concat(e))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},x=()=>{try{return a.ZP.get("/operations/api/v1/taskConfig/materials")}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},f=()=>{try{return a.ZP.get("/operations/api/v1/taskConfig/products")}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},y=e=>{try{return a.ZP.post("/operations/api/v1/taskConfig/create",{title:e})}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},v=e=>{try{return a.ZP.get("/operations/api/v1/taskConfig/".concat(e,"/processSummary"))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},w=e=>{try{return a.ZP.post("/operations/api/v1/taskConfig/".concat(e,"/copy"))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},j=e=>{try{return a.ZP.post("/operations/api/v1/taskConfig/".concat(e,"/delete"))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},b=(e,t)=>{try{return a.ZP.post("/operations/api/v1/taskConfig/create",{id:e,title:t})}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},k=(e,t)=>{try{if(!e)return a.ZP.post("/operations/api/v1/taskConfig/steps/tempUrl",t);return a.ZP.post("/operations/api/v1/taskConfig/steps/".concat(e,"/url"),t)}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},S=async e=>{let{startDate:t,endDate:n,location:s=null}=e;try{let e=new URLSearchParams({startDate:t,endDate:t});return s&&e.append("location",s),await a.ZP.get("/operations/api/v1/tasks/check-in?".concat(e.toString()))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},N=e=>{try{return a.ZP.post("/operations/api/v1/tasks/timesheet/add",e)}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},C=e=>{try{return a.ZP.post("/operations/api/v1/tasks/timesheet/edit",e)}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},P=e=>{try{return a.ZP.delete("/operations/api/v1/tasks/timesheet/".concat(e))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},A=()=>{try{return a.ZP.get("/operations/api/v1/tasks/warehouses")}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},L=async e=>{try{return await a.ZP.get("/operations/api/v1/tasks/check-in/project?projectId=".concat(e))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},F=async(e,t)=>{try{return await a.ZP.get("/api/v1/inventory/bin/contents?projectId=".concat(e,"&binType=").concat(t))}catch(e){throw e}},Z=async e=>{try{return await a.ZP.post("/projects/api/v1/".concat(e,"/finish"))}catch(e){throw e}},E=async e=>{try{return await a.ZP.put("/projects/api/v1/".concat(e,"/reverse-completion"))}catch(e){return null}},O=async e=>{try{return await a.ZP.post("/projects/api/v1/".concat(e,"/deliver"))}catch(e){throw e}},z=async e=>{try{return await a.ZP.put("/projects/api/v1/".concat(e,"/reverse-delivery"))}catch(e){return null}},B=async e=>{try{return await a.ZP.post("/projects/api/v1/".concat(e,"/in_progress"))}catch(e){throw e}},D=async e=>{try{return await a.ZP.get("/projects/api/v1/".concat(e,"/check-is-archivable"))}catch(e){return null}},W=async e=>{try{return await a.ZP.post("/projects/api/v1/".concat(e,"/archive"))}catch(e){throw e}},q=async e=>{try{return await a.ZP.put("/projects/api/v1/".concat(e,"/reverse-archive"))}catch(e){throw e}},I=()=>{try{return a.ZP.get("/api/v1/marketplace/customerOrders/configs")}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}},U=e=>{try{return a.ZP.get("/api/v1/marketplace/customerOrders/configs/serial/".concat(e))}catch(e){return r.Am.error("Oops, Something went wrong! Let's try again."),null}}},513323:function(e,t,n){n.d(t,{P:function(){return l},y:function(){return c}});var r=n(785893),a=n(741664),s=n.n(a),o=n(14066);let i={fontFeatureSettings:"'ss11' 1, 'calt' 0, 'liga' 0"};function l(e){let{title:t,subtitle:n,breadcrumbs:a,activeTab:l,onTabChange:c,onBack:u,backLabel:d="Back",titleAdornment:p,actions:m}=e;return(0,r.jsxs)("div",{className:"relative flex shrink-0 items-center justify-between bg-white",style:{borderBottom:"1px solid #EBEBEB",padding:"12px 24px"},children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center",children:[(0,r.jsx)(o.pnl,{delayDuration:200,children:(0,r.jsxs)(o.ua7,{children:[(0,r.jsx)(o.aJU,{asChild:!0,children:(0,r.jsx)("button",{onClick:u,"aria-label":d,className:"mr-4 flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-[8px] transition-colors duration-150 hover:bg-[#F5F5F5]",children:(0,r.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M15 9H3M3 9L9 3M3 9L9 15",stroke:"#737373",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,r.jsx)(o._vU,{side:"bottom",children:d})]})}),(0,r.jsxs)("div",{className:"min-w-0",children:[a&&a.length>0&&(0,r.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 items-center gap-1 truncate",children:a.map((e,t)=>(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[t>0&&(0,r.jsx)("span",{"aria-hidden":"true",style:{...i,fontSize:11,color:"#c4c4c4",lineHeight:"14px"},children:"/"}),e.href?(0,r.jsx)(s(),{href:e.href,className:"truncate transition-colors hover:text-[#6e3785] hover:underline",style:{...i,fontSize:11,color:"#737373",lineHeight:"14px"},children:e.label}):(0,r.jsx)("span",{className:"truncate",style:{...i,fontSize:11,color:"#171717",fontWeight:500,lineHeight:"14px"},"aria-current":"page",children:e.label})]},"".concat(e.label,"-").concat(t)))}),(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-1",children:[(0,r.jsx)("h1",{className:"truncate",style:{...i,fontSize:14,fontWeight:500,color:"#171717",lineHeight:"20px",margin:0,letterSpacing:"-0.084px"},children:t}),p]}),(0,r.jsx)("p",{className:"truncate",style:{...i,fontSize:12,color:"#5c5c5c",lineHeight:"16px",margin:0,marginTop:2},children:n})]})]}),l&&c&&(0,r.jsx)("div",{className:"inline-flex items-center",style:{background:"#F0EDF2",borderRadius:8,padding:3,gap:2,position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"},children:["costing","pricing"].map(e=>{let t=l===e;return(0,r.jsx)("button",{onClick:()=>c(e),className:"cursor-pointer","aria-pressed":t,style:{...i,padding:"6px 20px",borderRadius:6,border:"none",fontSize:13,fontWeight:500,background:t?"#ffffff"
1:"transparent",color:t?"#6e3785":"#888888",boxShadow:t?"0 1px 3px rgba(0,0,0,0.12)":"none",transition:"background 150ms, color 150ms, box-shadow 150ms"},children:"costing"===e?"Costing":"Pricing"},e)})}),(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-3",children:m})]})}function c(e){let{onClick:t,icon:n,children:a,testId:s}=e;return(0,r.jsxs)("button",{onClick:t,"data-testid":s,className:"flex cursor-pointer items-center gap-1.5 bg-white transition-colors hover:bg-purple-50",style:{...i,border:"1px solid #6e3785",color:"#6e3785",borderRadius:8,padding:"8px 14px",fontSize:13,fontWeight:500},children:[n,a]})}},896407:function(e,t,n){n.d(t,{O:function(){return g}});var r=n(785893),a=n(667294),s=n(114409),o=n(730074),i=n(632318),l=n(264511),c=n(374811),u=n(489087),d=n(597042),p=n(992133),m=n(4907),h=n(972728);function g(e){var t,n,g,x,f,y,v;let{section:w,tree:j,budgetId:b,projectId:k,onShowOnPlan:S}=e,[N,C]=(0,a.useState)(!0),[P,A]=(0,a.useState)(null),[L,F]=(0,a.useState)(null),Z=(0,i.GA)(b),E=(0,i.v3)(b),O=(0,i.hk)(),z=(0,h.NR)(b),B=(0,i.Tm)(),D=null!==(t=w.scopes)&&void 0!==t?t:[],W=(0,a.useMemo)(()=>(0,o.$)(w,j),[w,j]),q=j.map(e=>e.item),I=(0,s.bC)(q,D),U=(0,s.v8)(q,D),_=W.length+D.length,K=(0,a.useCallback)(async e=>{let t=e.trim();if(!t)return;let n=[...D,{id:"",name:t,requirements:[],connectedProductRefs:[],scopes:[]}];await E.mutateAsync({sectionId:w.id,data:{scopes:n}})},[D,w.id,E]),T=(0,a.useCallback)(async e=>{await z.mutateAsync({sectionId:w.id,data:{catalogScopeId:e}})},[z,w.id]),R=(0,a.useCallback)(e=>{let t=D.filter(t=>t.id!==e);E.mutate({sectionId:w.id,data:{scopes:t}})},[D,w.id,E]);return(0,r.jsxs)("div",{className:"rounded-none bg-white",style:{border:"1px solid #EFEFEF"},children:[(0,r.jsx)(m.q,{section:w,budgetId:b,expanded:N,onToggleExpanded:()=>C(e=>!e),itemCount:_,totalEstimated:I,totalAllowance:U,onShowOnPlan:S,onDelete:()=>Z.mutate(w.id)}),N&&(0,r.jsxs)("div",{className:"px-5 pb-5 pt-3",children:[W.length>0&&(0,r.jsx)("div",{className:"overflow-hidden rounded-none",style:{border:"1px solid #F0F0F0"},children:W.map((e,t)=>(0,r.jsx)(p.L,{kind:"product",name:null!==(n=e.item.name)&&void 0!==n?n:"Untitled product",countLabel:e.item.scopes.length>0?"".concat(e.item.scopes.length," scope").concat(1!==e.item.scopes.length?"s":""):null,estimated:null!==(g=e.item.estimatedPrice)&&void 0!==g?g:0,allowance:null!==(x=e.item.allowance)&&void 0!==x?x:0,isLast:t===W.length-1,onOpen:()=>F(e.item.id),onDelete:()=>O.mutate(e.item.id)},e.item.id))}),D.length>0&&(0,r.jsx)("div",{className:W.length>0?"mt-3":"",children:(0,r.jsx)("div",{className:"overflow-hidden rounded-none",style:{border:"1px solid #F0F0F0"},children:D.map((e,t)=>(0,r.jsx)(p.L,{kind:"scope",name:null!==(f=e.name)&&void 0!==f?f:"Untitled scope",countLabel:e.requirements.length>0?"".concat(e.requirements.length," solution").concat(1!==e.requirements.length?"s":""):null,estimated:null!==(y=e.estimatedPrice)&&void 0!==y?y:0,allowance:null!==(v=e.allowance)&&void 0!==v?v:0,isLast:t===D.length-1,onOpen:()=>A(e.id),onDelete:()=>R(e.id)},e.id))})}),(0,r.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,r.jsx)(u.P,{onSelect:async e=>{await B.mutateAsync({budgetId:b,sectionId:w.id,productId:e.id})}}),(0,r.jsx)(d.o,{onImport:T,onCreate:K,isPending:E.isPending||z.isPending})]}),0===W.length&&0===D.length&&(0,r.jsx)("p",{className:"py-6 text-center text-neutral-400",style:{fontSize:"calc(12px * var(--font-scale, 1))"},children:"Add products or scopes to this section"})]}),P&&(()=>{let e=D.find(e=>e.id===P);return e?(0,r.jsx)(l.D,{scope:e,onClose:()=>A(null),onUpdate:e=>{let t=D.map(t=>t.id===e.id?e:t);E.mutate({sectionId:w.id,data:{scopes:t}})},budgetId:b,importContext:{kind:"section",sectionId:w.id,budgetId:b}}):null})(),L&&(()=>{let e=j.find(e=>e.item.id===L);return e?(0,r.jsx)(c.S,{node:e,budgetId:b,onClose:()=>F(null)}):null})()]})}},641508:function(e,t,n){n.d(t,{v:function(){return u}});var r=n(785893),a=n(251267),s=n(14066),o=n(363548),i=n(114409);let l={estimate:"border-stroke-soft-200 bg-bg-weak-50 text-text-sub-600 hover:bg-bg-soft-200",allowance:"border-state-success-light bg-state-success-lighter text-state-success-dark hover:bg-state-success-light"};function c(e){let{label:t,amount:n}=e;return(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 px-2 py-1.5 text-xs font-medium",children:[(0,r.jsx)("span",{className:"text-text-sub-600",children:t}),(0,r.jsx)("span",{className:(0,o.cn)("tabular-nums",n>0?"text-text-strong-950":"text-text-soft-400"),children:n>0?(0,i.lb)(n):"none"})]})}function u(e){let{name:t,estimated:n,allowance:u,onClick:d}=e;if(n<=0&&u<=0)return null;let p=n>0?"estimate":"allowance",m="estimate"===p?"Est. ".concat((0,i.lb)(n)):"Allow. ".concat((0,i.lb)(u));return(0,r.jsx)(s.pnl,{children:(0,r.jsxs)(s.ua7,{children:[(0,r.jsx)(s.aJU,{asChild:!0,children:(0,r.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),d()},className:(0,o.cn)("inline-flex h-6 shrink-0 items-center whitespace-nowrap border px-1.5 text-[11px] font-semibold tabular-nums transition-colors",l[p]),"data-testid":"line-cost-chip","data-cost-kind":p,children:m})}),(0,r.jsxs)(s._vU,{side:"bottom",align:"end",className:"flex w-[220px] flex-col gap-0.5 border border-stroke-soft-200 bg-bg-white-0 p-1.5 text-text-strong-950","data-testid":"line-cost-breakdown",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[(0,r.jsx)(a.Z,{className:"h-3.5 w-3.5 shrink-0"}),(0,r.jsx)("p",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:t})]}),(0,r.jsx)("div",{className:"mx-1 h-px bg-stroke-soft-200"}),(0,r.jsx)(c,{label:"Estimated",amount:n}),(0,r.jsx)(c,{label:"Allowance",amount:u}),(0,r.jsx)("div",{className:"mx-1 h-px bg-stroke-soft-200"}),(0,r.jsx)("p",{className:"px-2 py-1.5 text-xs font-medium text-text-soft-400",children:"Click to open its editor."})]})]})})}},22417:function(e,t,n){n.d(t,{g:function(){return a}});var r=n(785893);function a(e){let{message:t}=e;return(0,r.jsx)("div",{className:"flex h-full items-center justify-center p-8",style:{background:"#F7F7F8"},children:(0,r.jsxs)("div",{className:"max-w-md rounded-none bg-white p-6 text-center",style:{border:"1px solid #FEE2E2"},children:[(0,r.jsx)("p",{className:"text-red-600",style:{fontSize:"calc(14px * var(--font-scale, 1))",fontWeight:600},children:"Failed to load budget"}),(0,r.jsx)("p",{className:"mt-2 text-neutral-500",style:{fontSize:"calc(12px * var(--font-scale, 1))"},children:t})]})})}},285667:function(e,t,n){n.d(t,{b:function(){return s}});var r=n(785893),a=n(114409);function s(e){let{totalCost:t,totalAllowance:n}=e;return(0,r.jsxs)("div",{className:"shrink-0 flex items-center justify-between gap-6 bg-white px-8 py-2.5",style:{borderTop:"1px solid #EBEBEB"},children:[(0,r.jsxs)("div",{className:"flex items-center gap-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",children:(0,r.jsx)("polygon",{points:"7,0.5 13,3.5 13,10.5 7,13.5 1,10.5 1,3.5",fill:"#6E3785"})}),(0,r.jsx)("span",{style:{fontSize:"calc(10px * var(--font-scale, 1))",color:"#6B7280",fontWeight:500},children:"Product"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",children:(0,r.jsx)("polygon",{points:"7,0.5 13,3.5 13,10.5 7,13.5 1,10.5 1,3.5",fill:"#FCB03A"})}),(0,r.jsx)("span",{style:{fontSize:"calc(10px * var(--font-scale, 1))",color:"#6B7280",fontWeight:500},children:"Scope"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 14 14",children:(0,r.jsx)("polygon",{points:"7,0.5 13,3.5 13,10.5 7,13.5 1,10.5 1,3.5",fill:"#2D8A4E"})}),(0,r.jsx)("span",{style:{fontSize:"calc(10px * var(--font-scale, 1))",color:"#6B7280",fontWeight:500},children:"Solution"})]})]}),(t>0||n>0)&&(0,r.jsxs)("div",{className:"flex items-center gap-5",children:[t>0&&(0,r.jsxs)("div",{className:"flex items-baseline gap-1.5",children:[(0,r.jsx)("span",{className:"text-neutral-400",style:{fontSize:"calc(9px * var(--font-scale, 1))",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em"},children:"Estimated"}),(0,r.jsx)("span",{className:"tabular-nums text-neutral-900",style:{fontSize:"calc(14px * var(--font-scale, 1))",fontWeight:700},children:(0,a.lb)(t)})]}),n>0&&(0,r.jsxs)("div",{className:"flex items-baseline gap-1.5",children:[(0,r.jsx)("span",{className:"text-neutral-400",style:{fontSize:"calc(9px * var(--font-scale, 1))",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.06em"},children:"Allowance"}),(0,r.jsx)("span",{className:"tabular-nums text-neutral-900",style:{fontSize:"calc(14px * var(--font-scale, 1))",fontWeight:700},children:(0,a.lb)(n)})]})]})]})}},4907:function(e,t,n){n.d(t,{q:function(){return m}});var r=n(785893),a=n(667294),s=n(808971),o=n(884979),i=n(554976),l=n(390470),c=n(613718),u=n(632318),d=n(790276),p=n(14066);function m(e){let{section:t,budgetId:n,expanded:m,onToggleExpanded:h,itemCount:g,totalEstimated:x,totalAllowance:f,onShowOnPlan:y,onDelete:v}=e,[w,j]=(0,a.useState)(!t.name),[b,k]=(0,a.useState)(t.name),S=(0,a.useRef)(null),N=(0,u.b$)(n);(0,a.useEffect)(()=>{var e;w&&(null===(e=S.current)||void 0===e||e.focus())},[w]);let C=(0,a.useCallback)(()=>{let e=b.trim();e&&e!==t.name&&N.mutate({sectionId:t.id,data:{name:e}}),j(!1)},[b,t.name,t.id,N]);return(0,r.jsxs)("div",{className:"px-5 py-4",style:{borderBottom:m?"1px solid #F0F0F0":"none"},children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("button",{onClick:h,className:"flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-none hover:bg-neutral-100",children:m?(0,r.jsx)(o.Z,{className:"h-3.5 w-3.5 text-neutral-400"}):(0,r.jsx)(s.Z,{className:"h-3.5 w-3.5 text-neutral-400"})}),w?(0,r.jsx)("input",{ref:S,value:b,onChange:e=>k(e.target.value),onBlur:C,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),C()),"Escape"===e.key&&(k(t.name),j(!1))},placeholder:"Section name...",className:"min-w-0 flex-1 rounded-none bg-white px-2 py-1 outline-none focus:ring-1 focus:ring-[#5D2F70]",style:{fontSize:"calc(15px * var(--font-scale, 1))",fontWeight:700,border:"1px solid #E5E5E5"}}):(0,r.jsx)("span",{className:"min-w-0 flex-1 cursor-pointer",onClick:h,children:(0,r.jsx)(p.s1R,{content:t.name||"Untitled Section",children:(0,r.jsx)("span",{className:"block truncate",style:{fontSize:"calc(15px * var(--font-scale, 1))",fontWeight:700,color:"#171717"},children:t.name||"Untitled Section"})})}),!w&&(0,r.jsx)("button",{"aria-label":"Rename section",onClick:e=>{e.stopPropagation(),k(t.name),j(!0)},className:"flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-none text-neutral-400 hover:bg-neutral-100 hover:text-neutral-600",children:(0,r.jsx)(l.Z,{className:"h-3 w-3"})}),y&&(0,r.jsx)(p.pnl,{delayDuration:150,children:(0,r.jsxs)(p.ua7,{children:[(0,r.jsx)(p.aJU,{asChild:!0,children:(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),y("SECTION",t.id)},"aria-label":"Show on plan",className:"flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-none text-neutral-400 hover:bg-purple-50 hover:text-[#5D2F70]",children:(0,r.jsx)(i.Z,{className:"h-3.5 w-3.5"})})}),(0,r.jsx)(p._vU,{children:"Show on plan"})]})}),(0,r.jsx)("button",{"aria-label":"Delete section",onClick:e=>{e.stopPropagation(),v()},className:"flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-none text-neutral-400 hover:bg-red-50 hover:text-red-500",children:(0,r.jsx)(c.Z,{className:"h-3.5 w-3.5"})})]}),(g>0||x>0||f>0)&&(0,r.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 pl-9",children:[g>0&&(0,r.jsxs)("span",{className:"rounded-none px-2 py-0.5",style:{background:"#F3F4F6",color:"#6B7280",fontSize:"calc(10px * var(--font-scale, 1))",fontWeight:600},children:[g," item",1!==g?"s":""]}),(0,r.jsx)(d.n,{totalEstimated:x,totalAllowance:f})]})]})}},992133:function(e,t,n){n.d(t,{L:function(){return c}});var r=n(785893),a=n(364998),s=n(613718),o=n(641508);let i={product:"#6E3785",scope:"#FCB03A"},l={fontSize:"calc(10px * var(--font-scale, 1))",fontWeight:600};function c(e){let{kind:t,name:n,countLabel:c,estimated:u,allowance:d,isLast:p,onOpen:m,onDelete:h}=e;return(0,r.jsxs)("div",{className:"flex cursor-pointer items-center gap-3 px-4 py-2.5 transition-colors hover:bg-neutral-50",style:{borderBottom:p?"none":"1px solid #F5F5F5"},onClick:m,children:[(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 14 14",className:"shrink-0","aria-hidden":!0,
1children:(0,r.jsx)("polygon",{points:"7,0.5 13,3.5 13,10.5 7,13.5 1,10.5 1,3.5",fill:i[t]})}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate text-neutral-700",style:{fontSize:"calc(13px * var(--font-scale, 1))",fontWeight:"product"===t?600:500},children:n}),c&&(0,r.jsx)("span",{className:"shrink-0 rounded-none px-1.5 py-0.5",style:{...l,background:"#F3F4F6",color:"#6B7280"},children:c}),(0,r.jsx)(o.v,{name:n,estimated:u,allowance:d,onClick:m}),h&&(0,r.jsx)("button",{type:"button","aria-label":"Delete ".concat(n),onClick:e=>{e.stopPropagation(),h()},className:"flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-none text-neutral-400 hover:bg-red-50 hover:text-red-500",children:(0,r.jsx)(s.Z,{className:"h-3 w-3"})}),(0,r.jsx)(a.Z,{className:"h-3.5 w-3.5 shrink-0 text-neutral-300"})]})}},790276:function(e,t,n){n.d(t,{n:function(){return o}});var r=n(785893),a=n(114409),s=n(14066);function o(e){let{totalEstimated:t,totalAllowance:n}=e;return t<=0&&n<=0?null:(0,r.jsx)(s.pnl,{delayDuration:150,children:(0,r.jsxs)(s.ua7,{children:[(0,r.jsx)(s.aJU,{asChild:!0,children:(0,r.jsxs)("span",{className:"cursor-default rounded-none px-1.5 py-0.5 tabular-nums",style:{background:"#F8FAFC",fontSize:"calc(10px * var(--font-scale, 1))",fontWeight:600,color:"#374151"},children:[t>0&&(0,r.jsxs)("span",{style:{color:"#374151"},children:["Est. ",(0,a.kn)(t)]}),t>0&&n>0&&(0,r.jsx)("span",{style:{color:"#9CA3AF",margin:"0 6px"},children:"\xb7"}),n>0&&(0,r.jsxs)("span",{style:{color:"#047857"},children:["Alw. ",(0,a.kn)(n)]})]})}),(0,r.jsx)(s._vU,{children:[t>0?"Estimated ".concat((0,a.lb)(t)):null,n>0?"Allowance ".concat((0,a.lb)(n)):null].filter(Boolean).join(" \xb7 ")})]})})}},276720:function(e,t,n){n.d(t,{C:function(){return o}});var r=n(667294),a=n(632318),s=n(730074);function o(e){let{data:t=[],isLoading:n}=(0,a._7)(e),{data:o=[],isLoading:i}=(0,a.sM)(e),l=(0,a.rM)(e),c=(0,r.useMemo)(()=>t.map(e=>({section:e,tree:(0,s.X)(o.filter(t=>t.sectionId===e.id))})),[t,o]),u=(0,r.useCallback)(async()=>{await l.mutateAsync({name:"",position:t.length})},[l,t.length]);return{sections:t,allItems:o,sectionData:c,isLoading:n||i,isAddingSection:l.isPending,addSection:u}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.