PageSourceSearch

https://makeabim.com/_next/static/chunks/5923-7cda234e03738924.js

js makeabim.com collected 2026-10-07 16:53:58 UTC 32,418 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5923],{7:(e,t,a)=>{a.d(t,{E1:()=>O,R4:()=>_,Vg:()=>v,Zw:()=>S,_S:()=>k,bQ:()=>E,bm:()=>N,ci:()=>W,gy:()=>I,h9:()=>J,qX:()=>C});var s=a(3292);let l="files",r="session",n="makeabim:ifcModelId",i="plan:",o="ifc:",c="ifcIndex";function m(){return(0,s.HN)()||sessionStorage.getItem(n)}async function d(e){let t=await new Promise((e,t)=>{let a=indexedDB.open("makeabim-db",2);a.onupgradeneeded=()=>{let e=a.result;e.objectStoreNames.contains(l)||e.createObjectStore(l),e.objectStoreNames.contains(r)||e.createObjectStore(r)},a.onsuccess=()=>e(a.result),a.onerror=()=>t(a.error)});try{return await e(t)}finally{t.close()}}function u(e){return new Promise((t,a)=>{e.oncomplete=()=>t(),e.onabort=()=>{var t;return a(null!=(t=e.error)?t:new DOMException("Transaction aborted","AbortError"))},e.onerror=()=>a(e.error)})}function x(e){return new Promise((t,a)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>a(e.error)})}let h=["currentIfc","currentIfcModelId"],f=/^plan:\d+$/,g=/^elevation:[^:]+$/,p=null;function b(){return p||(p=d(async e=>{let t=e.transaction([l,r],"readwrite"),a=t.objectStore(l);for(let e of h)a.delete(e);let s=t.objectStore(r);for(let e of(await x(s.getAllKeys()))){var n;("meta"===(n=String(e))||f.test(n)||g.test(n))&&s.delete(e)}await u(t)}).catch(()=>{})),p}function y(e){return"".concat(o).concat(e)}async function j(e){try{let t=await x(e.get(c)),a=t?JSON.parse(String(t)):null;return a&&"object"==typeof a?a:{}}catch(e){return{}}}async function w(e,t){var a;let s=await j(e),l=Math.max(0,...Object.values(s).filter(e=>Number.isFinite(e)));s[t]=Math.max(Date.now(),l+1);let r=(await x(e.getAllKeys())).map(String).filter(e=>e.startsWith(o)).map(e=>e.slice(o.length)),n={};for(let e of r)n[e]=null!=(a=s[e])?a:0;for(let a of(n[t]=s[t],Object.keys(n).filter(e=>e!==t).sort((e,t)=>n[t]-n[e]).slice(4)))e.delete(y(a)),delete n[a];e.put(JSON.stringify(n),c)}async function v(e,t){if(!t)throw Error("A model ID is required to cache IFC bytes");let a=new Uint8Array(e.byteLength);a.set(e);let s=new Blob([a.buffer],{type:"application/octet-stream"});b(),await d(async e=>{let a=e.transaction(l,"readwrite"),r=a.objectStore(l);r.put(s,y(t)),await w(r,t),await u(a)})}async function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m();return e?d(async t=>{let a=t.transaction(l,"readonly"),s=await x(a.objectStore(l).get(y(e)));return s instanceof Blob?new Uint8Array(await s.arrayBuffer()):null}):null}async function k(e){{let t=(0,s.HN)();t&&t!==e||sessionStorage.setItem(n,e)}}async function S(){return m()}async function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m();if(e){await d(async t=>{let a=t.transaction(l,"readwrite"),s=a.objectStore(l);s.delete(y(e));let r=await j(s);delete r[e],s.put(JSON.stringify(r),c),await u(a)});try{sessionStorage.getItem(n)===e&&sessionStorage.removeItem(n)}catch(e){}}}async function C(){sessionStorage.removeItem(n)}async function E(){try{await d(async e=>{let t=e.transaction([l,r],"readwrite");t.objectStore(l).clear(),t.objectStore(r).clear(),await u(t)})}catch(e){console.error("Failed to clear cached project data",e)}try{sessionStorage.removeItem(n)}catch(e){}}function M(e){return"".concat("meta:").concat(e)}function P(e,t){return"".concat(i).concat(e,":").concat(t)}function B(e,t){return"".concat("elevation:").concat(e,":").concat(t)}async function A(e,t,a,s){await d(async l=>{let n=l.transaction(r,"readwrite"),o=n.objectStore(r);o.put(JSON.stringify(t),M(e));for(let t=0;t<a.length;t++)o.put(a[t],P(e,t));let c="".concat(i).concat(e,":");for(let e of(await x(o.getAllKeys(IDBKeyRange.bound(c,"".concat(c,"ï¿¿")))))){let t=Number(String(e).slice(c.length));(!Number.isInteger(t)||t>=a.length)&&o.delete(e)}for(let[t,a]of Object.entries(s))a?o.put(a,B(e,t)):o.delete(B(e,t));await u(n)})}async function D(e){return await d(async t=>{let a=t.transaction(l,"readwrite"),s=a.objectStore(l),r=(await x(s.getAllKeys())).map(String).filter(t=>t.startsWith(o)&&t!==y(e));for(let e of r)s.delete(e);if(r.length>0){let e=await j(s);for(let t of r)delete e[t.slice(o.length)];s.put(JSON.stringify(e),c)}return await u(a),r.length>0}).catch(()=>!1)}async function O(e,t,a,s){b();for(let l=0;;l++)try{await A(e,t,a,s);return}catch(t){if(!(t instanceof DOMException&&("QuotaExceededError"===t.name||22===t.code))||l>=2||!await D(e))throw t}}async function W(e){b();try{return await d(async t=>{let a=t.transaction(r,"readonly"),s=await x(a.objectStore(r).get(M(e)));if(!s)return null;try{return JSON.parse(String(s))}catch(e){return null}})}catch(e){return null}}async function F(e){try{return await d(async t=>{let a=t.transaction(r,"readonly"),s=await x(a.objectStore(r).get(e));return s instanceof Blob?s:null})}catch(e){return null}}async function J(e,t){return F(P(e,t))}async function _(e,t){return F(B(e,t))}},1289:(e,t,a)=>{a.d(t,{N:()=>n});var s,l=a(8956);let r=globalThis,n=null!=(s=r.__makeabimSupabase)?s:r.__makeabimSupabase=(0,l.UU)("https://xoiphzopqxurhidelewy.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhvaXBoem9wcXh1cmhpZGVsZXd5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTMxNTQ3MDAsImV4cCI6MjA2ODczMDcwMH0.tpzCWEhwulXaC7nFGaYDGYtJhg3BeVJL-ulDeD9wH94")},1763:(e,t,a)=>{a.d(t,{Bz:()=>d,Oy:()=>m,ik:()=>u,l9:()=>n,lo:()=>r,tW:()=>i,yX:()=>c});let s="makeabim:prefillWrittenAt:";function l(e,t){return"".concat(e,":").concat(String(t))}function r(e,t,a){try{return localStorage.setItem(l(e,t),a),localStorage.setItem("".concat(s).concat(t),Str
1ing(Date.now())),!0}catch(a){return n(e,t),!1}}function n(e,t){try{localStorage.removeItem(l(e,t))}catch(e){}}function i(e,t){try{return localStorage.getItem(l(e,t))}catch(e){return null}}let o=["makeabim:prefillInputUrls","makeabim:prefillName","makeabim:prefillProjectData","makeabim:prefillSvgFiles","makeabim:prefillElevationUrls","makeabim:scaledImages","makeabim:autoContinueBimification"];function c(){for(let e of o)try{localStorage.removeItem(e)}catch(e){}}function m(e){try{let t=[];for(let a=0;a<localStorage.length;a++){let l=localStorage.key(a);if(!(null==l?void 0:l.startsWith(s)))continue;let r=l.slice(s.length),n=Number(localStorage.getItem(l));r!==e&&n>0&&Date.now()-n>864e5&&t.push(r)}t.forEach(d)}catch(e){}}function d(e){for(let t of o)n(t,e);try{localStorage.removeItem("".concat(s).concat(e))}catch(e){}}function u(){c(),function(e){try{let t=[];for(let a=0;a<localStorage.length;a++){let l=localStorage.key(a);!(!l||e.has(l))&&(l.startsWith(s)||o.some(e=>l.startsWith("".concat(e,":"))))&&t.push(l)}t.forEach(e=>localStorage.removeItem(e))}catch(e){}}(new Set)}},1824:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(5155);a(2115);var l=a(3969);function r(e){let{open:t,onClose:a}=e;return t?(0,s.jsxs)("div",{className:"fixed inset-0 z-[80]",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/40",onClick:a}),(0,s.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 top-20 w-[min(96vw,1040px)] max-h-[calc(100vh-160px)] overflow-y-auto",children:(0,s.jsxs)("div",{className:"bg-white border border-gray-200 rounded-2xl shadow-2xl overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 border-b border-gray-200",children:[(0,s.jsx)("h3",{className:"text-xl sm:text-2xl font-semibold text-gray-900",children:"Select tier to unlock BIM download"}),(0,s.jsx)("button",{onClick:a,className:"text-blue-600 hover:underline text-sm font-semibold","aria-label":"Close pricing",children:"Close"})]}),(0,s.jsx)("div",{className:"px-5 py-8",children:(0,s.jsx)(l.c,{onContactSales:a})})]})})]}):null}},3292:(e,t,a)=>{a.d(t,{HN:()=>m,OD:()=>f,j5:()=>g,mj:()=>x,qk:()=>d});let s="makeabim:project_id",l="__pending__",r=new Map,n=new Set(["makeabim:project_id"]),i=["makeabim:queue:","makeabim:uploadPanel:","makeabim:tmpRename:","makeabim:prefill"],o=null,c=null;function m(){try{var e,t;return null!=(t=null!=(e=function(){let e=window.location.search;return e!==o&&(o=e,c=new URLSearchParams(e).get("model")),c}())?e:sessionStorage.getItem(s))?t:null}catch(e){return null}}function d(e,t){if(!t||t===l)return;let a=null!=e?e:l;if(a===t)return;let s="makeabim:".concat(a,":"),n="makeabim:".concat(t,":");try{let e=[];for(let t=0;t<sessionStorage.length;t++){let a=sessionStorage.key(t);(null==a?void 0:a.startsWith(s))&&e.push([a,n+a.slice(s.length)])}for(let[t,a]of e){if(null===sessionStorage.getItem(a)){var i;sessionStorage.setItem(a,null!=(i=sessionStorage.getItem(t))?i:"")}sessionStorage.removeItem(t)}}catch(e){}for(let[e,t]of[...r]){if(!e.startsWith(s))continue;r.delete(e);let a=n+e.slice(s.length);r.has(a)||r.set(a,t)}}let u=null;async function x(e){let t=m();return t||(u||(u=e().then(e=>{let t=m();return t?(d(null,t),t):(e&&(sessionStorage.setItem(s,e),d(null,e)),e)}).finally(()=>{u=null})),u)}function h(){var e;return null!=(e=m())?e:l}function f(e){return n.has(e)||i.some(t=>e.startsWith(t))?e:e.startsWith("makeabim:")?"makeabim:".concat(h(),":").concat(e.slice(9)):e}let g={getItem(e){let t=f(e);
1if(r.has(t))return r.get(t);try{return sessionStorage.getItem(t)}catch(e){return null}},setItem(e,t){let a=f(e);try{sessionStorage.setItem(a,t),r.delete(a)}catch(e){(a.includes(":svgDraftContent:")||a.includes(":svgDraftPaths:"))&&r.set(a,t)}},removeItem(e){let t=f(e);r.delete(t);try{sessionStorage.removeItem(t)}catch(e){}},getProjectKeys(){let e="makeabim:".concat(h(),":"),t=new Set;for(let a of r.keys())a.startsWith(e)&&t.add(a);try{for(let a=0;a<sessionStorage.length;a++){let s=sessionStorage.key(a);s&&s.startsWith(e)&&t.add(s)}}catch(e){}return[...t]},entriesForProject(){let e={};for(let t of this.getProjectKeys()){let a=r.get(t);if(void 0!==a){e[t]=a;continue}try{let a=sessionStorage.getItem(t);null!==a&&(e[t]=a)}catch(e){}}return e},clearForProject(e){for(let t of r.keys())t.startsWith("makeabim:".concat(e,":"))&&r.delete(t);try{let t="makeabim:".concat(e,":"),a=[];for(let e=0;e<sessionStorage.length;e++){let s=sessionStorage.key(e);s&&s.startsWith(t)&&a.push(s)}a.forEach(e=>sessionStorage.removeItem(e))}catch(e){}},clearCurrentProject(){this.clearForProject(h())}}},3969:(e,t,a)=>{a.d(t,{A:()=>c,c:()=>o});var s=a(5155),l=a(2115),r=a(63),n=a(1289);function i(){return(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 20 20","aria-hidden":!0,className:"shrink-0",children:(0,s.jsx)("path",{d:"M7.667 13.5L4.5 10.333 3.333 11.5 7.667 15.833 16.667 6.833 15.5 5.667 7.667 13.5Z",fill:"currentColor"})})}function o(e){let{onContactSales:t}=e,a=(0,r.useRouter)(),[o,c]=(0,l.useState)(!1),[m,d]=(0,l.useState)("monthly");l.useEffect(()=>{(async()=>{try{var e;let{data:t}=await n.N.auth.getSession();c(!!(null==t||null==(e=t.session)?void 0:e.user))}catch(e){c(!1)}})()},[]);let u=async()=>{try{var e;let{data:t}=await n.N.auth.getSession();(null==t||null==(e=t.session)?void 0:e.access_token)?a.push("/my-models"):a.push("/login?next=/my-models")}catch(e){console.error("Auth check failed:",e),a.push("/login?next=/my-models")}},x=()=>{t&&t(),a.push("/contact")},h="monthly"===m?{price:"0.06€",unitText:"per BIM object (walls, windows, doors etc.). Consumed after model preview.",minText:"Min 499€ per month, including 8333 BIM objects."}:{price:"0.05€",unitText:"per downloaded BIM object (walls, windows, doors etc.). Paid after model preview.",minText:"Min 4999€ per year, including 100 000 BIM objects."};return(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 justify-items-center items-stretch",children:[(0,s.jsx)("div",{className:"flex flex-col h-full rounded-2xl border border-gray-200 bg-white p-6 md:p-8 shadow-sm w-full max-w-[330px] transition-transform duration-300 hover:-translate-y-1",children:(0,s.jsxs)("div",{className:"flex flex-col h-full",children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Per project"}),(0,s.jsx)("div",{className:"mt-2 flex items-baseline gap-2",children:(0,s.jsx)("div",{className:"text-3xl md:text-4xl font-extrabold text-black",children:"0.10€"})}),(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-600",children:"per downloaded BIM object (walls, windows, doors etc.). Paid after model preview."})]}),(0,s.jsx)("div",{className:"mb-6",children:(0,s.jsx)("button",{className:"w-full rounded-xl bg-[#3B82F6] px-4 py-2.5 text-white font-semibold text-sm hover:bg-[#2563EB] transition",onClick:u,children:"Get started for free"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-gray-800 mb-2",children:"For occasional use"}),(0,s.jsx)("ul",{className:"space-y-2 mb-4",children:(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[(0,s.jsx)("span",{className:"mt-[2px] text-gray-800",children:(0,s.jsx)(i,{})}),(0,s.jsx)("span",{children:"All standard features."})]})}),(0,s.jsx)("div",{className:"text-sm font-semibold text-gray-800 mb-2",children:"Example prices"}),(0,s.jsxs)("ul",{className:"space-y-1 text-sm text-gray-600",children:[(0,s.jsx)("li",{children:"6€ for a 80m2 apartment"}),(0,s.jsx)("li",{children:"16€ for a 200 m2 single family house"}),(0,s.jsx)("li",{children:"43€ for a 800 m2 daycare"}),(0,s.jsx)("li",{children:"46€ for a 12000 m2 warehouse"}),(0,s.jsx)("li",{children:"50€ for a 1300 m2 apartment building"}),(0,s.jsx)("li",{children:"200€ for a 7200 m2 office building"})]})]}),(0,s.jsx)("div",{className:"mt-auto"})]})}),(0,s.jsx)("div",{className:"flex flex-col h-full rounded-2xl border bg-white p-6 md:p-8 w-full max-w-[330px] ring-2 ring-blue-500 border-transparent shadow-md transition-transform duration-300 hover:-translate-y-1",children:(0,s.jsxs)("div",{className:"flex flex-col h-full",children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Team subscription"}),(0,s.jsxs)("div",{className:"flex rounded-full bg-gray-100 p-1 text-xs font-medium",children:[(0,s.jsx)("button",{type:"button",className:"px-3 py-1 rounded-full transition ".concat("monthly"===m?"bg-white text-gray-900 shadow":"text-gray-600"),onClick:()=>d("monthly"),children:"Monthly"}),(0,s.jsx)("button",{type:"button",className:"px-3 py-1 rounded-full transition ".concat("annual"===m?"bg-white text-gray-900 shadow":"text-gray-600"),onClick:()=>d("annual"),children:"Annual"})]})]}),(0,s.jsxs)("div",{className:"fade-in-up",children:[(0,s.jsx)("div",{className:"mt-3 flex items-baseline gap-2",children:(0,s.jsx)("div",{className:"text-3xl md:text-4xl font-extrabold text-black",children:h.price})}),(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-600",children:h.unitText}),(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-600",children:h.minText})]},m)]}),(0,s.jsx)("div",{className:"mb-6 mt-4",children:(0,s.jsx)("button",{className:"w-full rounded-xl bg-gray-100 px-4 py-2.5 text-gray-900 font-semibold text-sm hover:bg-gray-200 transition",onClick:x,children:"Contact Sales"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-gray-800 mb
1-2",children:"For continuous use"}),(0,s.jsxs)("ul",{className:"space-y-2 mb-4",children:[(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[(0,s.jsx)("span",{className:"mt-[2px] text-gray-800",children:(0,s.jsx)(i,{})}),(0,s.jsx)("span",{children:"All standard features."})]}),(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[(0,s.jsx)("span",{className:"mt-[2px] text-gray-800",children:(0,s.jsx)(i,{})}),(0,s.jsx)("span",{children:"Unlimited users."})]}),(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[(0,s.jsx)("span",{className:"mt-[2px] text-gray-800",children:(0,s.jsx)(i,{})}),(0,s.jsx)("span",{children:"Support."})]})]}),(0,s.jsx)("div",{className:"text-sm font-semibold text-gray-800 mb-2",children:"Example prices"}),(0,s.jsxs)("ul",{className:"space-y-1 text-sm text-gray-600",children:[(0,s.jsx)("li",{children:"4€ for a 80m2 apartment"}),(0,s.jsx)("li",{children:"10€ for a 200 m2 single family house"}),(0,s.jsx)("li",{children:"26€ for a 800 m2 daycare"}),(0,s.jsx)("li",{children:"28€ for a 12000 m2 warehouse"}),(0,s.jsx)("li",{children:"30€ for a 1300 m2 apartment building"}),(0,s.jsx)("li",{children:"120€ for a 7200 m2 office building"})]})]}),(0,s.jsx)("div",{className:"mt-auto"})]})}),(0,s.jsx)("div",{className:"flex flex-col h-full rounded-2xl border border-gray-200 bg-white p-6 md:p-8 shadow-sm w-full max-w-[330px] transition-transform duration-300 hover:-translate-y-1",children:(0,s.jsxs)("div",{className:"flex flex-col h-full",children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Enterprise"}),(0,s.jsx)("div",{className:"mt-2 flex items-baseline gap-2",children:(0,s.jsx)("div",{className:"text-3xl md:text-4xl font-extrabold text-black",children:"Custom pricing"})})]}),(0,s.jsx)("div",{className:"mb-6",children:(0,s.jsx)("button",{className:"w-full rounded-xl bg-gray-100 px-4 py-2.5 text-gray-900 font-semibold text-sm hover:bg-gray-200 transition",onClick:x,children:"Contact Sales"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-gray-800 mb-2",children:"Features customized, for example:"}),(0,s.jsxs)("ul",{className:"space-y-2",children:[(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[(0,s.jsx)("span",{className:"mt-[2px] text-gray-800",children:(0,s.jsx)(i,{})}),(0,s.jsx)("span",{children:"All standard and team features."})]}),(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[(0,s.jsx)("span",{className:"mt-[2px] text-gray-800",children:(0,s.jsx)(i,{})}),(0,s.jsx)("span",{children:"API access."})]}),(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[(0,s.jsx)("span",{className:"mt-[2px] text-gray-800",children:(0,s.jsx)(i,{})}),(0,s.jsx)("span",{children:"Geographic requirements."})]}),(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[(0,s.jsx)("span",{className:"mt-[2px] text-gray-800",children:(0,s.jsx)(i,{})}),(0,s.jsx)("span",{children:"Additional security features."})]})]})]}),(0,s.jsx)("div",{className:"mt-auto"})]})})]})}function c(){return(0,s.jsx)("section",{className:"w-full bg-gray-100 py-20",id:"pricing",children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto px-4",style:{minWidth:"70vw"},children:[(0,s.jsx)("div",{className:"text-center mb-12",children:(0,s.jsx)("h2",{className:"text-3xl md:text-5xl font-bold text-black",children:"Pricing"})}),(0,s.jsx)(o,{})]})})}},5923:(e,t,a)=>{a.d(t,{A:()=>g});var s=a(5155),l=a(2115),r=a(2619),n=a.n(r),i=a(5239),o=a(63),c=a(1289),m=a(7),d=a(3292),u=a(1763),x=a(8122),h=a(1824),f=a(898);function g(){var e,t;let a=(0,o.usePathname)(),r=(0,o.useRouter)(),[g,p]=(0,l.useState)(!1),[b,y]=(0,l.useState)(!1),[j,w]=(0,l.useState)(null),[v,N]=(0,l.useState)(!1),[k,S]=(0,l.useState)(""),[I,C]=(0,l.useState)(null),[E,M]=(0,l.useState)(null),P="makeabim:planCache:v1";function B(e){try{let t=sessionStorage.getItem(P);if(!t)return null;let a=JSON.parse(t);if(!a||"object"!=typeof a||e&&a.uid&&a.uid!==e)return null;return a}catch(e){return null}}let A=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=e=>{A.current&&!A.current.contains(e.target)&&y(!1)};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},[]),(0,l.useEffect)(()=>{(async()=>{var e;let{data:t}=await c.N.auth.getUser();w(null!=(e=t.user)?e:null)})();let{data:{subscription:e}}=c.N.auth.onAuthStateChange((e,t)=>{var a;w(null!=(a=null==t?void 0:t.user)?a:null)});return()=>e.unsubscribe()},[]),(0,l.useEffect)(()=>{S("https://makeabim-api-gpu-122548177603.europe-west4.run.app")},[]),(0,l.useEffect)(()=>
1{if(!j||!k){C(null),M(null);return}let e=!1,t=!1,a=null,s=j.id;try{let e=B(s);if(e&&Date.now()-e.stamp<3e5){var l;C(null!=(l=e.plan)?l:null),M("number"==typeof e.modelsRemaining?e.modelsRemaining:null)}}catch(e){}let r=async()=>{if(!e&&!t){t=!0;try{var a;let{data:t}=await c.N.auth.getSession(),l=null==t||null==(a=t.session)?void 0:a.access_token;if(!l)return;let r=await fetch("".concat(k,"/api/plan"),{headers:{Authorization:"Bearer ".concat(l),"Content-Type":"application/json"}});if(!r.ok)return;let n=await r.json();if(e)return;let i=(null==n?void 0:n.plan)||null,o="number"==typeof(null==n?void 0:n.models_remaining)?n.models_remaining:null;C(e=>e===i?e:i),M(e=>e===o?e:o);try{sessionStorage.setItem(P,JSON.stringify({uid:s,plan:i,modelsRemaining:o,stamp:Date.now()}))}catch(e){}}catch(e){}finally{t=!1}}};r();let n=()=>{try{let e=B(s);(!e||Date.now()-e.stamp>3e5)&&r()}catch(e){}};return window.addEventListener("focus",n),a=window.setInterval(()=>{try{let e=B(s);(!e||Date.now()-e.stamp>3e5)&&r()}catch(e){r()}},3e5),()=>{e=!0,a&&window.clearInterval(a),window.removeEventListener("focus",n)}},[null==j?void 0:j.id,k]);let D=()=>{if("/"===a){let e=document.getElementById("features");e?e.scrollIntoView({behavior:"smooth",block:"start"}):r.push("/#features")}else r.push("/#features")},O=()=>{if("/"===a){let e=document.getElementById("pricing");e?e.scrollIntoView({behavior:"smooth",block:"start"}):r.push("/#pricing")}else r.push("/#pricing")},W=[{name:"Features",href:"/#features"},{name:"Pricing",href:"/#pricing"},{name:"Documentation",href:"/documentation"},{name:"Contact sales",href:"/contact"}],F=async()=>{try{await c.N.auth.signOut()}finally{try{await (0,m.bQ)()}catch(e){}try{(0,u.ik)()}catch(e){}try{let e=[];for(let t=0;t<sessionStorage.length;t++){let a=sessionStorage.key(t);(null==a?void 0:a.startsWith("makeabim:"))&&e.push(a)}e.forEach(e=>sessionStorage.removeItem(e))}catch(e){}y(!1),r.replace("/")}},J=async e=>{e&&p(!1);try{await (0,m.qX)()}catch(e){}try{d.j5.clearCurrentProject()}catch(e){}try{sessionStorage.removeItem("makeabim:project_id")}catch(e){}try{window.dispatchEvent(new Event("makeabim:clearIfc"))}catch(e){}try{window.dispatchEvent(new Event("makeabim:clearAllProjectData"))}catch(e){}window.location.href="/create/bim"},_=e=>{"/create/bim"===a||a.startsWith("/create/bim/")?window.dispatchEvent(new CustomEvent("makeabim:requestNavigation",{detail:e})):e()},z=(e,t)=>{e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||("/create/bim"===a||a.startsWith("/create/bim/"))&&(e.preventDefault(),window.dispatchEvent(new CustomEvent("makeabim:requestNavigation",{detail:()=>r.push(t)})))},L=e=>{_(()=>J(e))},K=null!=(t=null==j||null==(e=j.user_metadata)?void 0:e.avatar_url)?t:"https://api.dicebear.com/9.x/glass/svg?seed=Maria";return"admin"===String(I||"").toLowerCase()?(0,s.jsx)("nav",{className:"fixed top-0 left-0 w-full bg-white border-b border-gray-200 z-50",children:(0,s.jsxs)("div",{className:"flex items-center h-14 w-full",children:[(0,s.jsx)("div",{className:"flex-shrink-0 ml-[5%]",children:(0,s.jsx)(n(),{href:"/","aria-label":"Make a BIM",className:"inline-block",onClick:e=>z(e,"/"),children:(0,s.jsx)(i.default,{src:"/logo.svg",alt:"Make a BIM",width:140,height:28,priority:!0})})}),(0,s.jsxs)("div",{className:"ml-auto flex items-center mr-[5%] gap-3",children:[(0,s.jsx)(n(),{href:"/admin",className:"hidden sm:inline text-sm font-semibold text-gray-700 hover:underline",onClick:e=>z(e,"/admin"),children:"Admin"}),j&&(0,s.jsxs)("div",{className:"relative",ref:A,children:[(0,s.jsx)("button",{"aria-label":"Open profile menu",onClick:e=>{e.stopPropagation(),y(e=>!e)},className:"h-9 w-9 rounded-full overflow-hidden ring-2 ring-gray-200 hover:ring-gray-300",children:(0,s.jsx)(i.default,{src:K,alt:"Profile",width:36,height:36,className:"object-cover",unoptimized:!0})}),b&&(0,s.jsxs)("div",{className:"absolute right-0 mt-2 w-52 bg-white border border-gray-200 rounded-xl shadow-xl py-2",children:[(0,s.jsxs)("button",{onClick:()=>_(()=>{y(!1),r.push("/profile")}),className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-black hover:bg-gray-50",children:[(0,s.jsx)(x.JXP,{className:"text-black"}),(0,s.jsx)("span",{children:"Profile"})]}),(0,s.jsxs)("button",{onClick:()=>_(()=>{y(!1),r.push("/account/settings")}),className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-black hover:bg-gray-50",children:[(0,s.jsx)(x.VSk,{className:"text-black"}),(0,s.jsx)("span",{children:"Account Settings"})]}),(0,s.jsx)("div",{className:"my-1 h-px bg-gray-100"}),(0,s.jsxs)("button",{onClick:()=>_(F),className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-red-600 hover:bg-red-50",children:[(0,s.jsx)(x.QeK,{}),(0,s.jsx)("span",{children:"Sign out"})]})]})]})]})]})}):(0,s.jsxs)("nav",{className:"fixed top-0 left-0 w-full bg-white border-b border-gray-200 z-50",children:[(0,s.jsxs)("div",{className:"flex items-center h-14 w-full",children:[(0,s.jsx)("div",{className:"flex-shrink-0 ml-[5%]",children:(0,s.jsx)(n(),{href:"/","aria-label":"Make a BIM",className:"inline-block",onClick:e=>z(e,"/"),children:(0,s.jsx)(i.default,{src:"/logo.svg",alt:"Make a BIM",width:140,height:28,priority:!0})})}),(0,s.jsxs)("div",{className:"ml-auto hidden md:flex items-center mr-[5%] gap-1",children:[W.map(e=>{let t;return"Pricing"===e.name?(0,s.jsx)("button",{onClick:()=>_(O),className:"mx-1 px-3 py-1 rounded text-sm font-medium transition-colors text-gray-800 hover:text-black hover:bg-gray-100","aria-haspopup":"dialog","aria-expanded":v,children:e.name},e.name):"Features"===e.name?(0,s.jsx)("button",{onClick:()=>_(D),className:"mx-1 px-3 py-1 rounded text-sm font-medium transition-colors text-gray-800 hover:text-black hover:bg-gray-100",children:e.name},e.name):(0,s.jsx)(n(),{href:e.href,onClick:t=>z(t,e.href),className:"mx-1 px-3 py-1 rounded text-sm font-medium transition-colors "+("/"!==(t=e.href)&&!t.startsWith("#")&&a.startsWith(t)?"text-black":"text-gray-800 hover:text-black hover:bg-gray-100"),children:e.name},e.name)}),(0,s.jsx)("span",{className:"mx-3 h-6 w-px bg-gray-200"}),j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>L(!1),className:"px-3.5 py-1.5 rounded-full bg-blue-500 hover:bg-blue-600 text-white text-sm font-semibold shadow-sm",children:"New model"}),(0,s.jsx)("button",{onClick:()=>_(()=>r.push("/my-models")),className:"px-3.5 py-1.5 rounded-full bg-gray-100 hover:bg-gray-200 text-gray-900 text-sm font-semibold",children:"My models"}),(0,s.jsxs)("div",{className:"relative ml-2",ref:A,children:[(0,s.jsx)("button",{"aria-label":"Open profile menu",onClick:e=>{e.stopPropagation(),y(e=>!e)},className:"h-9 w-9 rounded-full overflow-hidden ring-2 ring-gray-200 hover:ring-gray-300",children:(0,s.jsx)(i.default,{src:K,alt:"Profile",width:36,height:36,className:"object-cover",unoptimized:!0})}),b&&(0,s.jsxs)("div",{className:"absolute right-0 mt-2 w-56 bg-white border border-gray-200 rounded-xl shadow-xl py-2",children:[I&&(0,s.jsxs)("div",{className:"px-4 py-2.5 text-sm text-gray-800 border-b border-gray-100",children:["pro"===String(I).toLowerCase()&&(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(f.Hu1,{className:"text-yellow-500",size:14}),(0,s.jsx)("span",{className:"font-semibold",children:"Pro"})]}),"business"===String(I).toLowerCase()&&(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(f.BJb,{className:"text-blue-600",size:14}),(0,s.jsx)("span",{className:"font-semibold",children:"Business"})]}),"free"===String(I).toLowerCase()&&(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-semibold",children:"Free"}),(0,s.jsx)("button",{onClick:()=>{y(!1),N(!0)},className:"ml-2 px-2 py-0.5 rounded-full bg-blue-600 hover:bg-blue-700 text-white text-[10px] font-semibold",children:"Upgrade"})]})]}),(0,s.jsxs)("button",{onClick:()=>_(()=>{y(!1),r.push("/profile")}),className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-black hover:bg-gray-50",children:[(0,s.jsx)(x.JXP,{className:"text-black"}),(0,s.jsx)("span",{children:"Profile"})]}),(0,s.jsxs)("button",{onClick:()=>_(()=>{y(!1),r.push("/account/settings")}),className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-black hover:bg-gray-50",children:[(0,s.jsx)(x.VSk,{className:"text-black"}),(0,s.jsx)("span",{children:"Account Settings"})]}),(0,s.jsx)("div",{className:"my-1 h-px bg-gray-100"}),(0,s.jsxs)("button",{onClick:()=>_(F),className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-red-600 hover:bg-red-50",children:[(0,s.jsx)(x.QeK,{}),(0,s.jsx)("span",{children:"Sign out"})]})]})]}),I&&("free"===String(I).toLowerCase()?(0,s.jsxs)("span",{className:"ml-2 inline-flex items-center gap-2 rounded-full border border-gray-200 bg-white px-2 py-1 text-xs font-medium text-gray-800",children:[(0,s.jsx)("span",{children:"Free"}),(0,s.jsx)("button",{onClick:()=>N(!0),className:"ml-1 px-2 py-0.5 rounded-full bg-blue-600 hover:bg-blue-700 text-white text-[10px] font-semibold",children:"Upgrade"})]}):(0,s.jsxs)("span",{className:"ml-2 inline-flex items-center gap-1 rounded-full border border-gray-200 bg-white px-2 py-1 text-xs font-medium text-gray-800",children:["pro"===String(I).toLowerCase()&&(0,s.jsx)(f.Hu1,{className:"text-yellow-500",size:12}),"business"===String(I).toLowerCase()&&(0,s.jsx)(f.BJb,{className:"text-blue-600",size:12}),I]}))]}):(0,s.jsx)("button",{onClick:()=>
1r.push("/login"),className:"px-3.5 py-1.5 rounded-full bg-blue-500 hover:bg-blue-600 text-white text-sm font-semibold shadow-sm",children:"New model"})]}),(0,s.jsx)("div",{className:"ml-auto md:hidden mr-[5%]",children:(0,s.jsx)("button",{"aria-label":"Open menu",onClick:()=>p(e=>!e),className:"p-2 rounded hover:bg-gray-100",children:(0,s.jsx)("svg",{width:26,height:26,viewBox:"0 0 24 24",fill:"none",stroke:"black",strokeWidth:"2",children:(0,s.jsx)("path",{d:"M4 7h16M4 12h16M4 17h16"})})})})]}),g&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-black/0",onClick:()=>p(!1)}),(0,s.jsx)("div",{className:"absolute right-[5%] top-14 w-64 bg-white border border-gray-200 rounded-xl shadow-xl py-4",children:(0,s.jsxs)("ul",{className:"px-5",children:[W.map(e=>"Pricing"===e.name?(0,s.jsx)("li",{className:"py-3",children:(0,s.jsx)("button",{onClick:()=>_(()=>{p(!1),setTimeout(()=>O(),0)}),className:"text-left w-full text-base font-medium text-gray-900 hover:opacity-80",children:e.name})},e.name):"Features"===e.name?(0,s.jsx)("li",{className:"py-3",children:(0,s.jsx)("button",{onClick:()=>_(()=>{if(p(!1),"/"===a){let e=document.getElementById("features");e?e.scrollIntoView({behavior:"smooth",block:"start"}):r.push("/#features")}else r.push("/#features")}),className:"text-left w-full text-base font-medium text-gray-900 hover:opacity-80",children:e.name})},e.name):(0,s.jsx)("li",{className:"py-3",children:(0,s.jsx)(n(),{href:e.href,onClick:t=>{z(t,e.href),p(!1)},className:"text-base font-medium text-gray-900 hover:opacity-80",children:e.name})},e.name)),j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("li",{className:"pt-2",children:(0,s.jsx)("button",{onClick:()=>L(!0),className:"w-full px-4 py-2.5 rounded-full bg-blue-500 hover:bg-blue-600 text-white text-sm font-semibold shadow-sm",children:"New model"})}),(0,s.jsx)("li",{className:"pt-2",children:(0,s.jsx)("button",{onClick:()=>_(()=>{p(!1),r.push("/my-models")}),className:"w-full px-4 py-2.5 rounded-full bg-gray-100 hover:bg-gray-200 text-gray-900 text-sm font-semibold",children:"My models"})}),(0,s.jsxs)("li",{className:"mt-4 border-t border-gray-100 pt-3",children:[(0,s.jsxs)("button",{onClick:()=>_(()=>{p(!1),r.push("/profile")}),className:"w-full flex items-center gap-3 px-1 py-2 text-sm",children:[(0,s.jsx)(x.JXP,{className:"text-black"})," Profile"]}),(0,s.jsxs)("button",{onClick:()=>_(()=>{p(!1),r.push("/account/settings")}),className:"w-full flex items-center gap-3 px-1 py-2 text-sm",children:[(0,s.jsx)(x.VSk,{className:"text-black"})," Account Settings"]}),(0,s.jsxs)("button",{onClick:()=>_(async()=>{p(!1),await F()}),className:"w-full flex items-center gap-3 px-1 py-2 text-sm text-red-600",children:[(0,s.jsx)(x.QeK,{})," Sign out"]})]})]}):(0,s.jsx)("li",{className:"pt-2",children:(0,s.jsx)("button",{onClick:()=>{p(!1),r.push("/login")},className:"w-full px-4 py-2.5 rounded-full bg-blue-500 hover:bg-blue-600 text-white text-sm font-semibold shadow-sm",children:"New model"})})]})})]}),(0,s.jsx)(h.A,{open:v,onClose:()=>N(!1)})]})}}}]);

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.