1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3356],{490:(e,t,r)=>{r.d(t,{y:()=>n});let i=e=>{let t,r=new Set,i=(e,i)=>{let n="function"==typeof e?e(t):e;if(!Object.is(n,t)){let e=t;t=(null!=i?i:"object"!=typeof n||null===n)?n:Object.assign({},t,n),r.forEach(r=>r(t,e))}},n=()=>t,o={setState:i,getState:n,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e))},a=t=e(i,n,o);return o},n=e=>e?i(e):i},1138:(e,t,r)=>{r.d(t,{v:()=>a});var i=r(2115),n=r(490);let o=e=>{let t=(0,n.y)(e),r=e=>(function(e,t=e=>e){let r=i.useSyncExternalStore(e.subscribe,i.useCallback(()=>t(e.getState()),[e,t]),i.useCallback(()=>t(e.getInitialState()),[e,t]));return i.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},a=e=>e?o(e):o},1546:(e,t,r)=>{r.d(t,{l:()=>a});var i=r(9203),n=r(1138),o=r(9863);let a=(0,n.v)()((0,o.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})}))},3356:(e,t,r)=>{r.r(t),r.d(t,{HomeCalculatorStateBridge:()=>a});var i=r(5155),n=r(2115),o=r(1546);function a(e){let{mode:t,children:r}=e,a=(0,o.l)(e=>e.mode),s=(0,o.l)(e=>e.setMode);return(0,n.useEffect)(()=>{a!==t&&s(t)},[t,s,a]),(0,i.jsx)(i.Fragment,{children:r})}},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))}},9863:(e,t,r)=>{r.d(t,{Zr:()=>n});let i=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>i(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>i(t)(e)}}},n=(e,t)=>(r,n,o)=>{let a,s={storage:function(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var t;let i=e=>null===e?null:JSON.parse(e,void 0),n=null!=(t=r.getItem(e))?t:null;return n instanceof Promise?n.then(i):i(n)},setItem:(e,t)=>r.setItem(e,JSON.stringify(t,void 0)),removeItem:e=>r.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,c=0,d=new Set,u=new Set,h=s.storage;if(!h)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,o);let m=()=>{let e=s.partialize({...n()});return h.setItem(s.name,{state:e,version:s.version})},g=o.setState;o.setState=(e,t)=>(g(e,t),m());let f=e((...e)=>(r(...e),m()),n,o);o.getInitialState=()=>f;let y=()=>{var e,t;if(!h)return;let o=++c;l=!1,d.forEach(e=>{var t;return e(null!=(t=n())?t:f)});let g=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=n())?e:f))||void 0;return i(h.getItem.bind(h))(s.name).then(e=>
1{if(e)if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];else{if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(o!==c)return;let[i,l]=e;if(r(a=s.merge(l,null!=(t=n())?t:f),!0),i)return m()}).then(()=>{o===c&&(null==g||g(a,void 0),a=n(),l=!0,u.forEach(e=>e(a)))}).catch(e=>{o===c&&(null==g||g(void 0,e))})};return o.persist={setOptions:e=>{s={...s,...e},e.storage&&(h=e.storage)},clearStorage:()=>{null==h||h.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>y(),hasHydrated:()=>l,onHydrate:e=>(d.add(e),()=>{d.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},s.skipHydration||y(),a||f}}}]);
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.