1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9421],{1546:(e,t,r)=>{r.d(t,{l:()=>c});var i=r(9203),a=r(1138),s=r(9863);let c=(0,a.v)()((0,s.Zr)(e=>({mode:"direct",setMode:t=>e({mode:t}),directValue:1,directUnit:"cubic_feet",setDirectValue:t=>e({directValue:t}),setDirectUnit:t=>e({directUnit:t}),shape:"box",setShape:t=>e({shape:t}),dimLength:1,dimWidth:1,dimHeight:1,dimRadius:1,dimLengthUnit:"feet",dimWidthUnit:"feet",dimHeightUnit:"feet",dimRadiusUnit:"feet",setDimLength:t=>e({dimLength:t}),setDimWidth:t=>e({dimWidth:t}),setDimHeight:t=>e({dimHeight:t}),setDimRadius:t=>e({dimRadius:t}),setDimLengthUnit:t=>e({dimLengthUnit:t}),setDimWidthUnit:t=>e({dimWidthUnit:t}),setDimHeightUnit:t=>e({dimHeightUnit:t}),setDimRadiusUnit:t=>e({dimRadiusUnit:t}),sceneType:"concrete",setSceneType:t=>e({sceneType:t}),precision:4,setPrecision:t=>e({precision:t}),show3D:!0,toggle3D:()=>e(e=>({show3D:!e.show3D})),history:[],addHistory:t=>e(e=>({history:[{...t,id:(0,i.h)("history"),timestamp:Date.now(),favorite:!1},...e.history].slice(0,100)})),toggleFavorite:t=>e(e=>({history:e.history.map(e=>e.id===t?{...e,favorite:!e.favorite}:e)})),clearHistory:()=>e({history:[]}),updateNote:(t,r)=>e(e=>({history:e.history.map(e=>e.id===t?{...e,note:r}:e)})),deleteHistoryEntry:t=>e(e=>({history:e.history.filter(e=>e.id!==t)})),historyFilter:"all",setHistoryFilter:t=>e({historyFilter:t}),historySearch:"",setHistorySearch:t=>e({historySearch:t})}),{name:"cubic-calculator-storage",partialize:e=>({history:e.history,precision:e.precision,show3D:e.show3D})}))},3998:(e,t,r)=>{r.d(t,{$:()=>l});var i=r(5155),a=r(2115),s=r(2467),c=r(3101),o=r(4269);let n=(0,c.F)("inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]",{variants:{variant:{default:"bg-primary-600 text-white shadow-md hover:bg-primary-700 hover:shadow-lg",secondary:"bg-gray-100 text-gray-900 hover:bg-gray-200",outline:"border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 hover:border-gray-400",ghost:"text-gray-600 hover:bg-gray-100 hover:text-gray-900",destructive:"bg-red-500 text-white hover:bg-red-600"},size:{sm:"h-8 px-3 text-xs gap-1.5",md:"h-10 px-4 text-sm gap-2",lg:"h-12 px-6 text-base gap-2.5",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),l=a.forwardRef((e,t)=>{let{className:r,variant:a,size:c,asChild:l=!1,...d}=e,u=l?s.DX:"button";return(0,i.jsx)(u,{className:(0,o.cn)(n({variant:a,size:c,className:r})),ref:t,...d})});l.displayName="Button"},9203:(e,t,r)=>{r.d(t,{h:()=>i});function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";if("undefined"!=typeof crypto){if("function"==typeof crypto.randomUUID)return crypto.randomUUID();if("function"==typeof crypto.getRandomValues){let t=crypto.getRandomValues(new Uint32Array(2));return"".concat(e,"-").concat(t[0].toString(36),"-").concat(t[1].toString(36))}}return"".concat(e,"-").concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2))}},9421:(e,t,r)=>{r.r(t),r.d(t,{HistorySidebar:()=>y});var i=r(5155),a=r(2115),s=r(1546),c=r(1065),o=r(3998),n=r(6983),l=r(1360),d=r(6651),u=r(8514),g=r(9347),b=r(2108),h=r(4033),m=r(9867);let x=[{key:"all",label:"All"},{key:"favorites",label:"Favorites"},{key:"today",label:"Today"},{key:"week",label:"This Week"}],p=[{title:"Cubic Inches to Cubic Feet",description:"in\xb3 â ft\xb3 reference page",href:"/cubic-inches-to-cubic-feet/",accent:"bg-sky-100 text-sky-700"},{title:"Cubic Feet to Cubic Inches",description:"ft\xb3 â in\xb3 reverse page",href:"/cubic-feet-to-cubic-inches/",accent:"bg-orange-100 text-orange-700"},{title:"Cubic Centimeters to Cubic Feet",description:"cm\xb3 / cc â ft\xb3 metric reference page",href:"/cubic-centimeters-to-cubic-feet/",accent:"bg-violet-100 text-violet-700"},{title:"Cubic Feet to Cubic Centimeters",description:"ft\xb3 â cm\xb3 / cc reverse metric page",href:"/cubic-feet-to-cubic-centimeters/",accent:"bg-fuchsia-100 text-fuchsia-700"},{title:"Milliliters to Cubic Feet",description:"mL / cm\xb3 / cc â ft\xb3 liquid-volume page",href:"/milliliters-to-cubic-feet/",accent:"bg-teal-100 text-teal-700"},{title:"Cubic Feet to Milliliters",description:"ft\xb3 â mL / cm\xb3 / cc reverse liquid-volume page",href:"/cubic-feet-to-milliliters/",accent:"bg-cyan-100 text-cyan-700"},{title:"Cubic Feet to Barrels",description:"ft\xb3 â oil / beer / liquid barrel page",href:"/cubic-feet-to-barrels/",accent:"bg-amber-100 text-amber-700"},{title:"Barrels to Cubic Feet",description:"bbl â ft\xb3 reverse barrel conversion page",href:"/barrels-to-cubic-feet/",accent:"bg-yellow-100 text-yellow-700"},{title:"Cubic Feet to Board Feet",description:"ft\xb3 â BF lumber and timber conversion page",href:"/cubic-feet-to-board-feet/",accent:"bg-stone-100 text-stone-700"},{title:"Board Feet to Cubic Feet",description:"BF â ft\xb3 reverse lumber and timber conversion page",href:"/board-feet-to-cubic-feet/",accent:"bg-stone-200 text-stone-800"},{title:"Concrete Calculator - Cubic Feet",description:"slabs, footings, walls, steps, bags, and cost page",href:"/concrete-calculator-cubic-feet/",accent:"bg-gray-200 text-gray-800"},{title:"Mulch Calculator - Cubic Feet",description:"garden beds, tree rings, bags, bulk yards, and cost page",href:"/mulch-calculator-cubic-feet/",accent:"bg-green-100 text-green-800"},{title:"Gravel Calculator - Cubic Feet",description:"driveways, paths, drainage, tons, bags, and cost page",href:"/gravel-calculator-cubic-feet/",accent:"bg-stone-100 text-stone-800"},{title:"Cubic Feet to Cubic Yards",description:"ft\xb3 â yd\xb3 conversion page",href:"/cubic-feet-to-cubic-yards/",accent:"bg-blue-100 text-blue-600"},{title:"Cubic Yards to Cubic Feet",description:"yd\xb3 â ft\xb3 verification page",href:"/cubic-yards-to-cubic-feet/",accent:"bg-green-100 text-green-600"},{title:"Cubic Feet to Cubic Meters (CBM)",description:"ft\xb3 â m\xb3 shipping conversion page",href:"/cubic-feet-to-cubic-meters/",accent:"bg-indigo-100 text-indigo-700"},{title:"Cubic Feet to Gallons",description:"ft\xb3 â gallons tank conversion page",href:"/cubic-feet-to-gallons/",accent:"bg-cyan-100 text-cyan-700"},{title:"Gallons to Cubic Feet",description:"gallons â ft\xb3 sizing page",href:"/gallons-to-cubic-feet/",accent:"bg-emerald-100 text-emerald-700"},{title:"Cubic Feet to Liters",description:"ft\xb3 â liters metric page",href:"/cubic-feet-to-liters
1/",accent:"bg-purple-100 text-purple-700"},{title:"Liters to Cubic Feet",description:"liters â ft\xb3 US spec page",href:"/liters-to-cubic-feet/",accent:"bg-indigo-100 text-indigo-700"},{title:"Cubic Yards to Cubic Meters",description:"yd\xb3 â m\xb3 international construction page",href:"/cubic-yards-to-cubic-meters/",accent:"bg-orange-100 text-orange-700"},{title:"Cubic Meters to Cubic Yards",description:"m\xb3 â yd\xb3 reverse construction page",href:"/cubic-meters-to-cubic-yards/",accent:"bg-amber-100 text-amber-700"}],f=Math.ceil(p.length/2);function y(){let[e,t]=(0,a.useState)(!1),[r,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(null),[j,N]=(0,a.useState)(""),[C,F]=(0,a.useState)(!1),k=(0,s.l)(e=>e.history),D=(0,s.l)(e=>e.toggleFavorite),S=(0,s.l)(e=>e.clearHistory),U=(0,s.l)(e=>e.updateNote),M=(0,s.l)(e=>e.deleteHistoryEntry),A=(0,s.l)(e=>e.historyFilter),L=(0,s.l)(e=>e.setHistoryFilter),H=(0,s.l)(e=>e.historySearch),R=(0,s.l)(e=>e.setHistorySearch);(0,a.useEffect)(()=>{t(!0)},[]);let B=(0,a.useMemo)(()=>{let e=k;switch(A){case"favorites":e=e.filter(e=>e.favorite);break;case"today":e=e.filter(e=>(function(e){let t=new Date(e),r=new Date;return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate()})(e.timestamp));break;case"week":e=e.filter(e=>{var t;return t=e.timestamp,Date.now()-t<6048e5})}if(H.trim()){let t=H.toLowerCase();e=e.filter(e=>e.note&&e.note.toLowerCase().includes(t)||"string"==typeof e.inputUnit&&e.inputUnit.toLowerCase().includes(t))}return e},[k,A,H]);if(!e)return null;function V(e){U(e,j),w(null),N("")}let E=r?B:B.slice(0,5),Y=C?p:p.slice(0,f);return(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"rounded-xl border border-gray-100 bg-white shadow-sm",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-100 px-5 py-4",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(n.A,{className:"h-4 w-4 text-gray-400"}),(0,i.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"History"}),B.length>0&&(0,i.jsx)("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-xs font-medium text-gray-500",children:B.length})]}),k.length>0&&(0,i.jsxs)(o.$,{variant:"ghost",size:"sm",onClick:S,className:"text-xs text-gray-400 hover:text-red-500",children:[(0,i.jsx)(l.A,{className:"mr-1 h-3 w-3"}),"Clear"]})]}),(0,i.jsxs)("div",{className:"border-b border-gray-100 px-4 py-2",children:[(0,i.jsx)("div",{className:"flex flex-wrap gap-1",children:x.map(e=>(0,i.jsx)("button",{onClick:()=>L(e.key),className:"rounded-full px-2.5 py-1 text-[11px] font-medium transition-colors ".concat(A===e.key?"bg-blue-100 text-blue-700":"text-gray-500 hover:bg-gray-100 hover:text-gray-700"),children:e.label},e.key))}),(0,i.jsxs)("div",{className:"relative mt-2",children:[(0,i.jsx)(d.A,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-gray-400"}),(0,i.jsx)("input",{type:"text",value:H,onChange:e=>R(e.target.value),placeholder:"Search history...",className:"h-8 w-full rounded-lg border border-gray-200 bg-gray-50 pl-8 pr-3 text-xs text-gray-700 placeholder:text-gray-400 focus:border-blue-300 focus:bg-white focus:outline-none focus:ring-2 focus:ring-blue-100"})]})]}),0===B.length?(0,i.jsxs)("div",{className:"px-5 py-8 text-center",children:[(0,i.jsx)(n.A,{className:"mx-auto mb-2 h-8 w-8 text-gray-200"}),(0,i.jsx)("p",{className:"text-sm text-gray-400",children:function(){switch(A){case"favorites":return"No favorites yet";case"today":return"No calculations today";case"week":return"No calculations this week";default:return"No calculations yet"}}()}),(0,i.jsx)("p",{className:"mt-1 text-xs text-gray-300",children:"Your calculation history will appear here"})]}):(0,i.jsx)("div",{className:"divide-y divide-gray-50",children:E.map(e=>(0,i.jsx)("div",{className:"group px-5 py-3 transition-colors hover:bg-gray-50/50",children:(0,i.jsxs)("div",{className:"flex items-start justify-between",children:[(0,i.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase ".concat(function(e){switch(e){case"direct":return"bg-blue-50 text-blue-700";case"dimension":return"bg-emerald-50 text-emerald-700";case"scene":return"bg-amber-50 text-amber-700";case"batch":return"bg-violet-50 text-violet-700";default:return"bg-gray-50 text-gray-700"}}(e.mode)),children:function(e){switch(e){case"direct":return"Direct";case"dimension":return"Dimension";case"scene":return"Scene";case"batch":return"Batch";default:return e}}(e.mode)}),(0,i.jsx)("span",{className:"text-xs text-gray-400",children:function(e){let t=Math.floor((Date.now()-e)/1e3),r=Math.floor(t/60),i=Math.floor(r/60),a=Math.floor(i/24);return t<60?"Just now":r<60?"".concat(r," min ago"):i<24?"".concat(i," hour").concat(i>1?"s":""," ago"):1===a?"Yesterday":a<7?"".concat(a," days ago"):new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"})}(e.timestamp)})]}),(0,i.jsxs)("p",{className:"mt-1 font-mono text-sm font-semibold text-gray-900",children:[(0,c.ZV)(e.resultCubicFeet)," ft\xb3"]}),e.inputUnit&&(0,i.jsxs)("p",{className:"text-[11px] text-gray-400",children:["from ",e.inputValue," ",String(e.inputUnit).replace(/_/g," ")
1]}),v===e.id?(0,i.jsx)("div",{className:"mt-1 flex items-center gap-1",children:(0,i.jsx)("input",{type:"text",value:j,onChange:e=>N(e.target.value),onKeyDown:t=>{"Enter"===t.key&&V(e.id)},onBlur:()=>V(e.id),className:"h-6 flex-1 rounded border border-gray-200 px-2 text-xs text-gray-700 focus:border-blue-400 focus:outline-none",placeholder:"Add a note...",autoFocus:!0})}):(0,i.jsxs)("div",{className:"mt-0.5 flex items-center gap-1",children:[e.note?(0,i.jsx)("p",{className:"text-xs text-gray-500",children:e.note}):(0,i.jsx)("button",{onClick:()=>{var t;return t=e.id,void(w(t),N(""))},className:"text-xs text-gray-300 opacity-0 transition-opacity group-hover:opacity-100",children:"Add note..."}),e.note&&(0,i.jsx)("button",{onClick:()=>{var t,r;return t=e.id,r=e.note,void(w(t),N(r))},className:"opacity-0 transition-opacity group-hover:opacity-100",children:(0,i.jsx)(u.A,{className:"h-3 w-3 text-gray-300 hover:text-gray-500"})})]})]}),(0,i.jsxs)("div",{className:"ml-2 flex shrink-0 flex-col items-center gap-1",children:[(0,i.jsx)("button",{onClick:()=>D(e.id),className:"rounded-md p-1 transition-colors hover:bg-gray-100",children:(0,i.jsx)(g.A,{className:"h-4 w-4 ".concat(e.favorite?"fill-amber-400 text-amber-400":"text-gray-300")})}),(0,i.jsx)("button",{onClick:()=>M(e.id),className:"rounded-md p-1 text-gray-300 opacity-0 transition-all hover:bg-red-50 hover:text-red-500 group-hover:opacity-100",children:(0,i.jsx)(l.A,{className:"h-3.5 w-3.5"})})]})]})},e.id))}),B.length>5&&(0,i.jsx)("div",{className:"border-t border-gray-100 px-5 py-2",children:(0,i.jsx)("button",{onClick:()=>y(!r),className:"flex w-full items-center justify-center gap-1 py-1 text-xs font-medium text-gray-400 transition-colors hover:text-gray-600",children:r?(0,i.jsxs)(i.Fragment,{children:["Show less ",(0,i.jsx)(b.A,{className:"h-3 w-3"})]}):(0,i.jsxs)(i.Fragment,{children:["Show all (",B.length,")"," ",(0,i.jsx)(h.A,{className:"h-3 w-3"})]})})}),B.length>0&&(0,i.jsx)("div",{className:"border-t border-gray-100 px-5 py-3",children:(0,i.jsxs)("button",{onClick:()=>(function(e){let t=new Blob(["Timestamp,Mode,Input Value,Input Unit,Result (ft\xb3),Note,Favorite\n"+e.map(e=>'"'.concat(new Date(e.timestamp).toISOString(),'","').concat(e.mode,'",').concat(e.inputValue,',"').concat(e.inputUnit,'",').concat(e.resultCubicFeet,',"').concat((e.note||"").replace(/"/g,'""'),'",').concat(e.favorite)).join("\n")],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(t),i=document.createElement("a");i.href=r,i.download="calculation-history.csv",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)})(B),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-gray-200 py-2 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-50 hover:text-gray-800",children:[(0,i.jsx)(m.A,{className:"h-3.5 w-3.5"}),"Export CSV"]})})]}),(0,i.jsxs)("div",{className:"rounded-xl border border-gray-100 bg-white shadow-sm",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-100 px-5 py-4",children:[(0,i.jsx)("h4",{className:"text-sm font-semibold text-gray-900",children:"More Tools"}),(0,i.jsx)("a",{href:"/calculators/",className:"text-xs font-medium text-blue-600 hover:text-blue-700",children:"View all"})]}),(0,i.jsxs)("div",{className:"space-y-4 px-5 py-4",children:[(0,i.jsx)("div",{className:"space-y-3",children:Y.map(e=>(0,i.jsxs)("a",{href:e.href,className:"block rounded-xl border border-gray-200 bg-white px-4 py-3 transition-colors hover:border-gray-300 hover:bg-gray-50",children:[(0,i.jsx)("p",{className:"text-base font-semibold text-gray-900",children:e.title}),(0,i.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:e.description})]},e.href))}),p.length>f&&(0,i.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-blue-200 bg-blue-50 py-2 text-xs font-semibold text-blue-700 transition-colors hover:border-blue-300 hover:bg-blue-100",children:C?(0,i.jsxs)(i.Fragment,{children:["Show fewer ",(0,i.jsx)(b.A,{className:"h-3 w-3"})]}):(0,i.jsxs)(i.Fragment,{children:["Show more (",p.length-f,") ",(0,i.jsx)(h.A,{className:"h-3 w-3"})]})})]})]})]})}}}]);
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.