1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,753160,e=>{"use strict";var t,r,o,a=e.i(843476),n=e.i(271645),s=e.i(247167),l=e.i(775780);let i={toWeb(){throw Error("Vercel Blob: Sorry, we cannot get a Readable stream in this environment. If you see this message please open an issue here: https://github.com/vercel/storage/ with details on your environment.")}};var c=e.i(531716);let d=globalThis.fetch.bind(globalThis);var u=e.i(561866),m=new Promise(e=>{try{let t=new Uint8Array([104,101,108,108,111]);new Blob([t]).text().then(t=>{e("hello"===t)}).catch(()=>{e(!1)})}catch{e(!1)}});async function p(e){var t,r;let o;return e instanceof ReadableStream?e:e instanceof Blob?e.stream():h(e)?i.toWeb(e):(o=e instanceof ArrayBuffer?new Uint8Array(e):(t=e,(0,l.default)(t))?e:(r=e,new TextEncoder().encode(r)),await m)?new Blob([o]).stream():new ReadableStream({start(e){e.enqueue(o),e.close()}})}function h(e){return"object"==typeof e&&"function"==typeof e.pipe&&e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState}var f=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i,b={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000};function g(e){let t;if("number"==typeof e&&!Number.isNaN(e))return e;if("string"!=typeof e)return null;let r=f.exec(e),o="b";if(r){let[,e,,,a]=r;if(!e)return null;t=parseFloat(e),a&&(o=a.toLowerCase())}else t=parseInt(e,10);return Number.isNaN(t)?null:Math.floor(b[o]*t)}var x=class extends Error{constructor(e){super(`Vercel Blob: ${e}`)}};function y(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var v=["//"],w=(()=>{if(function(){if("u">typeof navigator&&"ReactNative"===navigator.product)return!0;if(void 0!==s.default){let e=s.default.type;return"renderer"!==e&&"worker"!==e&&!!(s.default.versions&&s.default.versions.node)}return!1}())return!0;if(j().startsWith("http://localhost"))return!1;let e=!1,t=new Request(j(),{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})();function j(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=null;try{t=s.default.env.VERCEL_BLOB_API_URL||s.default.env.NEXT_PUBLIC_VERCEL_BLOB_API_URL}catch{}return`${t||"https://vercel.com/api/blob"}${e}`}var _="function"==typeof TextEncoder?new TextEncoder:null;function N(e){return e?"string"==typeof e?_?_.encode(e).byteLength:new Blob([e]).size:"byteLength"in e&&"number"==typeof e.byteLength?e.byteLength:"size"in e&&"number"==typeof e.size?e.size:0:0}function T(e){return globalThis.ReadableStream&&e instanceof ReadableStream}function k(e){return!!(T(e)||h(e))}var S=!1;try{((null==(t=s.default.env.DEBUG)?void 0:t.includes("blob"))||(null==(r=s.default.env.NEXT_PUBLIC_DEBUG)?void 0:r.includes("blob")))&&(S=!0)}catch{}function E(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];S&&console.debug(`vercel-blob: ${e}`,...r)}var R=null!=(o=globalThis.DOMException)?o:(()=>{try{atob("~")}catch(e){return Object.getPrototypeOf(e).constructor}})(),C=Object.prototype.toString,L=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]),O="function"==typeof d,P=O&&w,U=async e=>{let t,{input:r,init:o,onUploadProgress:a}=e;if(E("using fetch"),o.body)if(a){var n;let e,r=await p(o.body),s=0,l=(n=e=>{a(s+=e)},e=new Uint8Array(0),new TransformStream({transform(t,r){let o=new Uint8Array(e.length+t.byteLength);for(o.set(e),o.set(new Uint8Array(t),e.length),e=o;e.length>=65536;){let t=e.slice(0,65536);r.enqueue(t),null==n||n(t.byteLength),e=e.slice(65536)}},flush(t){e.length>0&&(t.enqueue(e),null==n||n(e.byteLength))}}));t=r.pipeThrough(l)}else t=o.body;let s=w&&t&&k(t)?"half":void 0;return d(r,{...o,...o.body?{body:t}:{},duplex:s})},B="u">typeof XMLHttpRequest,A=async e=>
1{let{input:t,init:r,onUploadProgress:o}=e;E("using xhr");let a=null;return r.body&&(a=T(r.body)?await new Response(r.body).blob():r.body),new Promise((e,n)=>{let s=new XMLHttpRequest;(s.open(r.method||"GET",t.toString(),!0),o&&s.upload.addEventListener("progress",e=>{e.lengthComputable&&o(e.loaded)}),s.onload=()=>{var t;if(null==(t=r.signal)?void 0:t.aborted)return void n(new DOMException("The user aborted the request.","AbortError"));let o=new Headers;s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{let t=e.split(": "),r=t.shift(),a=t.join(": ");r&&o.set(r.toLowerCase(),a)}),e(new Response(s.response,{status:s.status,statusText:s.statusText,headers:o}))},s.onerror=()=>{n(TypeError("Network request failed"))},s.ontimeout=()=>{n(TypeError("Network request timed out"))},s.onabort=()=>{n(new DOMException("The user aborted a request.","AbortError"))},r.headers&&new Headers(r.headers).forEach((e,t)=>{s.setRequestHeader(t,e)}),r.signal&&(r.signal.addEventListener("abort",()=>{s.abort()}),r.signal.aborted))?s.abort():s.send(a)})},$=async e=>{let{input:t,init:r,onUploadProgress:o}=e;if(o){if(P)return U({input:t,init:r,onUploadProgress:o});if(B)return A({input:t,init:r,onUploadProgress:o})}if(O)return U({input:t,init:r});if(B)return A({input:t,init:r});throw Error("No request implementation available")},I=class extends x{constructor(){super("Access denied, please provide a valid token for this resource.")}},M=class extends x{constructor(e){super(`Content type mismatch, ${e}.`)}},F=class extends x{constructor(e){super(`Pathname mismatch, ${e}. Check the pathname used in upload() or put() matches the one from the client token.`)}},q=class extends x{constructor(){super("Client token has expired.")}},z=class extends x{constructor(e){super(`File is too large, ${e}.`)}},D=class extends x{constructor(){super("This store does not exist.")}},V=class extends x{constructor(){super("This store has been suspended.")}},H=class extends x{constructor(){super("Unknown error, please visit https://vercel.com/help.")}},W=class extends x{constructor(){super("The requested blob does not exist")}},X=class extends x{constructor(){super("The blob service is currently not available. Please try again.")}},G=class extends x{constructor(e){super(`Too many requests please lower the number of concurrent requests ${e?` - try again in ${e} seconds`:""}.`),this.retryAfter=null!=e?e:0}},J=class extends x{constructor(){super("The request was aborted.")}},Y=class extends x{constructor(){super("Precondition failed: ETag mismatch.")}};async function K(e){var t,r,o;let a,n,s,l;try{let s=await e.json();a=null!=(r=null==(t=s.error)?void 0:t.code)?r:"unknown_error",n=null==(o=s.error)?void 0:o.message}catch{a="unknown_error"}switch((null==n?void 0:n.includes("contentType"))&&n.includes("is not allowed")&&(a="content_type_not_allowed"),(null==n?void 0:n.includes('"pathname"'))&&n.includes("does not match the token payload")&&(a="client_token_pathname_mismatch"),"Token expired"===n&&(a="client_token_expired"),(null==n?void 0:n.includes("the file length cannot be greater than"))&&(a="file_too_large"),a){case"store_suspended":s=new V;break;case"forbidden":s=new I;break;case"content_type_not_allowed":s=new M(n);break;case"client_token_pathname_mismatch":s=new F(n);break;case"client_token_expired":s=new q;break;case"file_too_large":s=new z(n);break;case"not_found":s=new W;break;case"store_not_found":s=new D;break;case"bad_request":s=new x(null!=n?n:"Bad request");break;case"service_unavailable":s=new X;break;case"rate_limited":s=new G((l=e.headers.get("retry-after"))?parseInt(l,10):void 0);break;case"precondition_failed":s=new Y;break;default:s=new H}return{code:a,error:s}}async function Z(e,t,r){let o=function(){let e=null;try{e=s.default.env.VERCEL_BLOB_API_VERSION_OVERRIDE||s.default.env.NEXT_PUBLIC_VERCEL_BLOB_API_VERSION_OVERRIDE}catch{}return`${null!=e?e:12}`}(),a=function(e){if(null==e?void 0:e.token)return e.token;if(s.default.env.BLOB_READ_WRITE_TOKEN)return s.default.env.BLOB_READ_WRITE_TOKEN;throw new x("No token found. Either configure the `BLOB_READ_WRITE_TOKEN` environment variable, or pass a `token` option to your calls.")}(r),n=function(){let e={};try{"VERCEL_BLOB_PROXY_THROUGH_ALTERNATIVE_API"in s.default.env&&void 0!==s.default.env.VERCEL_BLOB_PROXY_THROUGH_ALTERNATIVE_API?e["x-proxy-through-alternative-api"]=s.default.env.VERCEL_BLOB_PROXY_THROUGH_ALTERNATIVE_API:"NEXT_PUBLIC_VERCEL_BLOB_PROXY_THROUGH_ALTERNATIVE_API"in s.default.env&&void 0!==s.default.env.NEXT_PUBLIC_VERCEL_BLOB_PROXY_THROUGH_ALTERNATIVE_API&&(e["x-proxy-through-alternative-api"]=s.default.env.NEXT_PUBLIC_VERCEL_BLOB_PROXY_THROUGH_ALTERNATIVE_API)}catch{}return e}(),[,,,l=""]=a.split("_"),i=`${l}:${Date.now()}:${Math.random().toString(16).slice(2)}`,d=0,u=0,m=0,p=(null==r?void 0:r.onUploadProgress)||function(){try{return"1"===s.default.env.VERCEL_BLOB_USE_X_CONTENT_LENGTH}catch{return!1}}();t.body&&p&&(u=N(t.body)),(null==r?void 0:r.onUploadProgress)&&r.onUploadProgress({loaded:0,total:u,percentage:0});let h=await (0,c.default)(async s=>{let l;try{l=await $({input:j(e),init:{...t,headers:{"x-api-blob-request-id":i,"x-api-blob-request-attempt":String(d),"x-api-version":o,...p?{"x-content-length":String(u)}:{},authorization:`Bearer ${a}`,...n,...t.headers}},onUploadProgress:(null==r?void 0:r.onUploadProgress)?e=>{var t;let o=0!==u?u:e;m=e;let a=u>0?Number((e/o*100).toFixed(2)):0;100===a&&u>0||null==(t=r.onUploadProgress)||t.call(r,{loaded:e,total:o,percentage:a})}:void 0})}catch(e){if(e instanceof R&&"AbortError"===e.name)return void s(new J);if(e&&"[object Error]"===C.call(e)&&"TypeError"===e.name&&"string"==typeof e.message&&("Load failed"===e.message?void 0===e.stack:L.has(e.message)))throw e;if(e instanceof TypeError)return void s(e);throw e}if(l.ok)return l;let{code:c,error:h}=await K(l);if("unknown_error"===c||"service_unavailable"===c||"internal_server_error"===c)throw h;s(h)},{retries:function(){try{let e=s.default.env.VERCEL_BLOB_RETRIES||"10";return parseInt(e,10)}catch{return 10}}(),onRetry:t=>{t instanceof Error&&E(`retrying API request to ${e}`,t.message),d+=1}});if(!h)throw new H;return(null==r?void 0:r.onUploadProgress)&&r.onUploadProgress({loaded:m,total:m,percentage:100}),await h.json()}var Q="x-allow-overwrite";function ee(e,t){let r={};if(r["x-vercel-blob-access"]=t.access,e.includes("contentType")&&t.contentType&&(r["x-content-type"]=t.contentType),e.includes("addRandomSuffix")&&void 0!==t.addRandomSuffix&&(r["x-add-random-suffix"]=t.addRandomSuffix?"1":"0"),e.includes("ifMatch")&&t.ifMatch){if(!1===t.allowOverwrite)throw new x("ifMatch and allowOverwrite: false are contradictory. ifMatch is used for c
1onditional overwrites, which requires allowOverwrite to be true.");r["x-if-match"]=t.ifMatch,e.includes("allowOverwrite")&&void 0===t.allowOverwrite&&(r[Q]="1")}return e.includes("allowOverwrite")&&void 0!==t.allowOverwrite&&(r[Q]=t.allowOverwrite?"1":"0"),e.includes("cacheControlMaxAge")&&void 0!==t.cacheControlMaxAge&&(r["x-cache-control-max-age"]=t.cacheControlMaxAge.toString()),r}async function et(e){let{pathname:t,options:r,extraChecks:o,getToken:a}=e;if(!t)throw new x("pathname is required");if(t.length>950)throw new x("pathname is too long, maximum length is 950");for(let e of v)if(t.includes(e))throw new x(`pathname cannot contain "${e}", please encode it if needed`);if(!r)throw new x("missing options, see usage");if("public"!==r.access&&"private"!==r.access)throw new x('access must be "private" or "public", see https://vercel.com/docs/vercel-blob');return o&&o(r),a&&(r.token=await a(t,r)),r}async function er(e){let{uploadId:t,key:r,pathname:o,parts:a,headers:n,options:s}=e,l=new URLSearchParams({pathname:o});try{let e=await Z(`/mpu?${l.toString()}`,{method:"POST",headers:{...n,"content-type":"application/json","x-mpu-action":"complete","x-mpu-upload-id":t,"x-mpu-key":encodeURIComponent(r)},body:JSON.stringify(a),signal:s.abortSignal},s);return E("mpu: complete",e),e}catch(e){if(e instanceof TypeError&&("Failed to fetch"===e.message||"fetch failed"===e.message))throw new X;throw e}}async function eo(e,t,r){E("mpu: create","pathname:",e);let o=new URLSearchParams({pathname:e});try{let e=await Z(`/mpu?${o.toString()}`,{method:"POST",headers:{...t,"x-mpu-action":"create"},signal:r.abortSignal},r);return E("mpu: create",e),e}catch(e){if(e instanceof TypeError&&("Failed to fetch"===e.message||"fetch failed"===e.message))throw new X;throw e}}async function ea(e){var t,r,o;let{uploadId:a,key:n,pathname:s,headers:l,options:i,internalAbortController:c=new AbortController,part:d}=e,u=new URLSearchParams({pathname:s}),m=Z(`/mpu?${u.toString()}`,{signal:c.signal,method:"POST",headers:{...l,"x-mpu-action":"upload","x-mpu-key":encodeURIComponent(n),"x-mpu-upload-id":a,"x-mpu-part-number":d.partNumber.toString()},body:d.blob},i);function p(){c.abort()}(null==(t=i.abortSignal)?void 0:t.aborted)?p():null==(r=i.abortSignal)||r.addEventListener("abort",p);let h=await m;return null==(o=i.abortSignal)||o.removeEventListener("abort",p),h}var en="u">typeof window?6:8,es=8388608*en*2;async function el(e,t,r,o){E("mpu: init","pathname:",e,"headers:",r);let a={...o,onUploadProgress:void 0};if(void 0!==o.maximumSizeInBytes&&!k(t)&&N(t)>o.maximumSizeInBytes)throw new x(`Body size of ${N(t)} bytes exceeds the maximum allowed size of ${o.maximumSizeInBytes} bytes`);let n=await eo(e,r,a),s=N(t),l=await p(t),i=await function(e){let{uploadId:t,key:r,pathname:o,stream:a,headers:n,options:s,totalToLoad:l}=e;E("mpu: upload init","key:",r);let i=new AbortController;return new Promise((e,c)=>{let d,m=[],p=[],h=a.getReader(),f=0,b=!1,x=1,y=!1,v=0,w=!1,j=0,_=[],N=0,T={};async function k(){for(E("mpu: upload read start","activeUploads:",f,"currentBytesInMemory:",`${g(v)}/${g(es)}`,"bytesSent:",g(j)),b=!0;v<es&&!y;)try{let{value:t,done:r}=await h.read();if(r){w=!0,E("mpu: upload read consumed the whole stream"),_.length>0?(m.push({partNumber:x++,blob:new Blob(_,{type:"application/octet-stream"})}),R()):0===f&&(h.releaseLock(),e(p)),b=!1;return}v+=t.byteLength;let o=0;for(;o<t.byteLength;){let e=8388608-N,r=Math.min(o+e,t.byteLength),a=t.slice(o,r);_.push(a),N+=a.byteLength,o=r,8388608===N&&(m.push({partNumber:x++,blob:new Blob(_,{type:"application/octet-stream"})}),_=[],N=0,R())}}catch(e){C(e)}E("mpu: upload read end","activeUploads:",f,"currentBytesInMemory:",`${g(v)}/${g(es)}`,"bytesSent:",g(j)),b=!1}async function S(a){f++,E("mpu: upload send part start","partNumber:",a.partNumber,"size:",a.blob.size,"activeUploads:",f,"currentBytesInMemory:",`${g(v)}/${g(es)}`,"bytesSent:",g(j));try{let l=s.onUploadProgress?e=>{T[a.partNumber]=e.loaded,d&&d()}:void 0,c=await ea({uploadId:t,key:r,pathname:o,headers:n,options:{...s,onUploadProgress:l},internalAbortController:i,part:a});if(E("mpu: upload send part end","partNumber:",a.partNumber,"activeUploads",f,"currentBytesInMemory:",`${g(v)}/${g(es)}`,"bytesSent:",g(j)),y)return;if(p.push({partNumber:a.partNumber,etag:c.etag}),v-=a.blob.size,f--,j+=a.blob.size,m.length>0&&R(),w){0===f&&(h.releaseLock(),e(p));return}b||k().catch(C)}catch(e){C(e)}}function R(){if(!y)for(E("send parts","activeUploads",f,"partsToUpload",m.length);f<en&&m.length>0;){let e=m.shift();e&&S(e)}}function C(e){y||(y=!0,i.abort(),h.releaseLock(),e instanceof TypeError&&("Failed to fetch"===e.message||"fetch failed"===e.message)?c(new X):c(e))}
1s.onUploadProgress&&(d=(0,u.default)(()=>{var e;let t=Object.values(T).reduce((e,t)=>e+t,0),r=l||t,o=l>0?Number((100*(t/l||t)).toFixed(2)):0;null==(e=s.onUploadProgress)||e.call(s,{loaded:t,total:r,percentage:o})},150)),k().catch(C)})}({uploadId:n.uploadId,key:n.key,pathname:e,stream:l,headers:r,options:o,totalToLoad:s});return await er({uploadId:n.uploadId,key:n.key,pathname:e,parts:i,headers:r,options:a})}function ei(e){let{allowedOptions:t,getToken:r,extraChecks:o}=e;return async function(e,a,n){if(!a)throw new x("body is required");if(y(a))throw new x("Body must be a string, buffer or stream. You sent a plain JavaScript object, double check what you're trying to upload.");let s=await et({pathname:e,options:n,extraChecks:o,getToken:r}),l=ee(t,s);if(!0===s.multipart)return el(e,a,l,s);let i=s.onUploadProgress?(0,u.default)(s.onUploadProgress,100):void 0,c=new URLSearchParams({pathname:e}),d=await Z(`/?${c.toString()}`,{method:"PUT",body:a,headers:l,signal:s.abortSignal},{...s,onUploadProgress:i});return{url:d.url,downloadUrl:d.downloadUrl,pathname:d.pathname,contentType:d.contentType,contentDisposition:d.contentDisposition,etag:d.etag}}}function ec(e){return function(t){if(!t.token.startsWith("vercel_blob_client_"))throw new x(`${e} must be called with a client token`);if(void 0!==t.addRandomSuffix||void 0!==t.allowOverwrite||void 0!==t.cacheControlMaxAge)throw new x(`${e} doesn't allow \`addRandomSuffix\`, \`cacheControlMaxAge\` or \`allowOverwrite\`. Configure these options at the server side when generating client tokens.`)}}ei({allowedOptions:["contentType"],extraChecks:ec("client/`put`")}),function(e){let{allowedOptions:t,getToken:r,extraChecks:o}=e}({allowedOptions:["contentType"],extraChecks:ec("client/`createMultipartUpload`")}),function(e){let{allowedOptions:t,getToken:r,extraChecks:o}=e}({allowedOptions:["contentType"],extraChecks:ec("client/`createMultipartUpload`")}),function(e){let{allowedOptions:t,getToken:r,extraChecks:o}=e}({allowedOptions:["contentType"],extraChecks:ec("client/`multipartUpload`")}),function(e){let{allowedOptions:t,getToken:r,extraChecks:o}=e}({allowedOptions:["contentType"],extraChecks:ec("client/`completeMultipartUpload`")});var ed=ei({allowedOptions:["contentType"],extraChecks(e){if(void 0===e.handleUploadUrl)throw new x("client/`upload` requires the 'handleUploadUrl' parameter");if(void 0!==e.addRandomSuffix||void 0!==e.createPutExtraChecks||void 0!==e.cacheControlMaxAge||void 0!==e.ifMatch)throw new x("client/`upload` doesn't allow `addRandomSuffix`, `cacheControlMaxAge`, `allowOverwrite` or `ifMatch`. Configure these options at the server side when generating client tokens.")},async getToken(e,t){var r,o;return eu({handleUploadUrl:t.handleUploadUrl,pathname:e,clientPayload:null!=(r=t.clientPayload)?r:null,multipart:null!=(o=t.multipart)&&o,headers:t.headers})}});async function eu(e){let{handleUploadUrl:t,pathname:r}=e,o=!function(e){try{return new URL(e),!0}catch{return!1}}(t)?new URL(t,location.href).href:t,a={type:"blob.generate-client-token",payload:{pathname:r,clientPayload:e.clientPayload,multipart:e.multipart}},n=await d(o,{method:"POST",body:JSON.stringify(a),headers:{"content-type":"application/json",...e.headers},signal:e.abortSignal});if(!n.ok)throw new x("Failed to retrieve the client token");try{let{clientToken:e}=await n.json();return e}catch{throw new x("Failed to retrieve the client token")}}var em=e.i(621724);let ep=[{value:"residential-new",label:"Residential - New Build"},{value:"residential-addition-renovation",label:"Residential - Addition/Renovation"},{value:"garden-suite",label:"Garden Suite / Laneway Suite"},{value:"multiplex",label:"Multiplex / Multi-Unit"},{value:"commercial",label:"Commercial"},{value:"other",label:"Other"}],eh=[{value:"homeowner",label:"Homeowner"},{value:"contractor",label:"General Contractor"},{value:"builder",label:"Builder / Developer"},{value:"property-manager",label:"Property Manager"},{value:"architect",label:"Architect / Designer"}],ef=[{value:"asap",label:"ASAP"},{value:"1-month",label:"Within 1 month"},{value:"1-3-months",label:"1-3 months"},{value:"3-6-months",label:"3-6 months"},{value:"6-plus",label:"6+ months"},{value:"just-exploring",label:"Just exploring options"}],eb=[{value:"under-25k",label:"Under $25,000"},{value:"25k-50k",label:"$25,000 - $50,000"},{value:"50k-100k",label:"$50,000 - $100,000"},{value:"100k-200k",label:"$100,000 - $200,000"},{value:"200k-500k",label:"$200,000 - $500,000"},{value:"500k-plus",label:"$500,000+"},{value:"not-sure",label:"Not sure yet"}],eg=[{value:"framing",label:"Rough Framing",description:"Wood & steel stud framing"},{value:"spray-foam",label:"Spray Foam Insulation",description:"Closed & open cell"},{value:"batt-insulation",label:"Batt / Blown-in Insulation",description:"Fiberglass & cellulose"},{value:"drywall",label:"Drywall",description:"Boarding & finishing"},{value:"steel-beams",label:"Steel Beams & Columns",description:"Fabrication & installation"}
1,{value:"soundproofing",label:"Soundproofing",description:"Acoustic solutions"}];e.s(["default",0,function(){let[e,t]=(0,n.useState)({success:!1,message:""}),[r,o]=(0,n.useState)(!1),[s,l]=(0,n.useState)([]),[i,c]=(0,n.useState)([]),[d,u]=(0,n.useState)(""),[m,p]=(0,n.useState)({}),[h,f]=(0,n.useState)(!1),[b,g]=(0,n.useState)(null),[x,y]=(0,n.useState)(new Set),v=(0,n.useRef)(null),w=(0,n.useRef)(null),j=(0,n.useRef)(null),_=(0,n.useRef)(null),[N]=(0,n.useState)(()=>Date.now()),T=()=>{if(!w.current)return;let e=new FormData(w.current),t={};for(let r of["fullName","companyName","email","phone","projectAddress","projectType","clientType","startTimeline","budgetRange","projectNotes","projectFilesUrl"]){let o=e.get(r);o&&(t[r]=o)}t.services=JSON.stringify(e.getAll("services")),sessionStorage.setItem("contact_form_data",JSON.stringify(t))};(0,n.useEffect)(()=>{let e=sessionStorage.getItem("contact_form_data");if(e&&w.current)try{let t=JSON.parse(e),r=w.current;for(let[e,o]of Object.entries(t)){if("services"===e){let e=JSON.parse(o);l(e);continue}let t=r.elements.namedItem(e);t&&!t.value&&(t.value=o)}}catch{}},[]);let k=async e=>{if(h||r)return;if(e.get("website_url"))return void p({form:"Something went wrong. Please try again."});if(Date.now()-N<3e3)return void p({form:"Please take a moment to fill out the form completely."});let a={},n=e.get("email")||"",s=e.get("phone")||"";if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)||(a.email="Please enter a valid email address"),10!==s.replace(/\D/g,"").length&&(a.phone="Please enter a valid 10-digit phone number"),Object.keys(a).length>0){p(a);let e=Object.keys(a)[0],t=document.getElementById(e);t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),t.focus({preventScroll:!0}));return}if(T(),i.length>0){f(!0),y(new Set);try{let t=[],r=(e.get("projectAddress")||"").replace(/[^a-zA-Z0-9\s\-,.]/g,"").trim().replace(/\s+/g,"-")||"unknown";for(let e=0;e<i.length;e++){let o=i[e];g({current:e+1,total:i.length,currentFileName:o.file.name});let a=await ed(`lead-attachments/${r}/${Date.now()}-${o.file.name}`,o.file,{access:"public",handleUploadUrl:"/api/upload"});t.push(a.url),y(e=>new Set(e).add(o.id))}e.append("uploadedFileUrls",JSON.stringify(t))}catch{p({files:"File upload failed. Please try again or submit without attachments."}),f(!1),g(null);return}f(!1),g(null)}p({}),o(!0);try{let r=await fetch("/api/contact",{method:"POST",body:e}),o=await r.json();t(o)}catch{t({success:!1,message:"Something went wrong. Please try again or call us at (416) 901-6020."})}finally{o(!1)}},[S,E]=(0,n.useState)([]),[R,C]=(0,n.useState)(!1),L=(0,n.useRef)(null),O=(0,n.useRef)(!1);(0,n.useEffect)(()=>{let e=!1;return(async()=>{await new Promise(e=>{if(window.google?.maps)return void e();let t=setInterval(()=>{window.google?.maps&&(clearInterval(t),e())},500);setTimeout(()=>{clearInterval(t),e()},1e4)}),e||!window.google?.maps||(await window.google.maps.importLibrary("places"),e||(L.current=new window.google.maps.places.AutocompleteSessionToken,O.current=!0))})(),()=>{e=!0}},[]);let P=async e=>{let t=e.target.value;if(!t||t.length<3||!O.current){E([]),C(!1);return}try{let{suggestions:e}=await window.google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:t,sessionToken:L.current,language:"en",region:"ca",includedRegionCodes:["ca"],locationBias:{west:-83,north:47,east:-74,south:41.5}});if(e?.length){let t=e.map(e=>{let t=e.placePrediction,r=t.text?.text||"";return{description:r,place_id:t.placeId||"",structured_formatting:{main_text:t.mainText?.text||r,secondary_text:t.secondaryText?.text||""},_placePrediction:t}}).sort((e,t)=>{let r=e.description.includes(", ON,")||e.description.includes(", ON "),o=t.description.includes(", ON,")||t.description.includes(", ON ");return r&&!o?-1:!r&&o?1:0});E(t),C(!0)}else E([]),C(!1)}catch{E([]),C(!1)}},U=async e=>{E([]),C(!1);try{let t=e._placePrediction?.toPlace();if(t)if(await t.fetchFields({fields:["addressComponents","formattedAddress"]}),t.addressComponents){let e=t.addressComponents,r=e.find(e=>e.types.includes("street_number"))?.longText||"",o=e.find(e=>e.types.includes("route"))?.longText||"",a=e.find(e=>
1e.types.includes("locality"))?.longText||"",n=e.find(e=>e.types.includes("postal_code"))?.longText||"",s=e.find(e=>e.types.includes("postal_code_suffix"))?.longText||"",l=s?`${n} ${s}`:n,i=[];(r||o)&&i.push(`${r} ${o}`.trim()),a&&i.push(l?`${a} ${l}`:a);let c=i.join(", ");j.current&&(j.current.value=c)}else t.formattedAddress&&j.current&&(j.current.value=t.formattedAddress.replace(/, Canada$/,""));else j.current&&(j.current.value=e.description.replace(/, Canada$/,""))}catch{j.current&&(j.current.value=e.description.replace(/, Canada$/,""))}L.current=new window.google.maps.places.AutocompleteSessionToken};(0,n.useEffect)(()=>{if(!e.success&&e.errors){let t=Object.keys(e.errors)[0],r=document.getElementById(t);r&&(r.scrollIntoView({behavior:"smooth",block:"center"}),r.focus({preventScroll:!0}))}},[e]),(0,n.useEffect)(()=>{e.success&&((0,em.track)("lead_submit"),"function"==typeof window.gtag&&window.gtag("event","lead_submit",{event_category:"conversion"}),"function"==typeof window.fbq&&window.fbq("track","Lead"),w.current?.reset(),l([]),c([]),y(new Set),sessionStorage.removeItem("contact_form_data"),_.current?.scrollIntoView({behavior:"smooth",block:"center"}))},[e.success]),(0,n.useEffect)(()=>()=>{i.forEach(e=>{e.preview&&URL.revokeObjectURL(e.preview)})},[i]);let B={...e.errors,...m};return(0,a.jsxs)("form",{ref:w,onSubmit:e=>{e.preventDefault(),k(new FormData(e.currentTarget))},onChange:T,className:"space-y-6",children:[!e.success&&e.message&&!e.errors&&(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-800 px-4 py-3 rounded-sm",children:(0,a.jsx)("p",{children:e.message})}),m.form&&(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-800 px-4 py-3 rounded-sm",children:(0,a.jsx)("p",{children:m.form})}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 pb-2 border-b border-gray-200",children:"Contact Information"}),(0,a.jsxs)("div",{className:"grid md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"fullName",className:"block text-sm font-medium text-gray-700 mb-1",children:["Full Name ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"text",id:"fullName",name:"fullName",required:!0,autoComplete:"name",className:`w-full px-4 py-3 border ${e.errors?.fullName?"border-red-500":"border-gray-300"} rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors`,placeholder:"John Smith"}),e.errors?.fullName&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-500",children:e.errors.fullName})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"companyName",className:"block text-sm font-medium text-gray-700 mb-1",children:["Company Name ",(0,a.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,a.jsx)("input",{type:"text",id:"companyName",name:"companyName",autoComplete:"organization",className:"w-full px-4 py-3 border border-gray-300 rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors",placeholder:"ABC Construction"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:["Email Address ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"email",id:"email",name:"email",required:!0,autoComplete:"email",className:`w-full px-4 py-3 border ${B?.email?"border-red-500":"border-gray-300"} rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors`,placeholder:"[email protected]"}),B?.email&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-500",children:B.email})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"phone",className:"block text-sm font-medium text-gray-700 mb-1",children:["Phone Number ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"tel",id:"phone",name:"phone",required:!0,autoComplete:"tel",className:`w-full px-4 py-3 border ${B?.phone?"border-red-500":"border-gray-300"} rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors`,placeholder:"(416) 555-1234"}),B?.phone&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-500",children:B.phone})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"clientType",className:"block text-sm font-medium text-gray-700 mb-1",children:["I am a... ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsxs)("select",{id:"clientType",name:"clientType",required:!0,className:`w-full px-4 py-3 border ${e.errors?.clientType?"border-red-500":"border-gray-300"} rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors bg-white`,children:[(0,a.jsx)("option",{value:"",children:"Select one..."}),eh.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))]}),e.errors?.clientType&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-500",children:e.errors.clientType})]})]}),(0,a.jsxs)("div",{className:"space-y-4 pt-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 pb-2 border-b border-gray-200",children:"Project Details"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("label",{htmlFor:"projectAddress",className:"block text-sm font-medium text-gray-700 mb-1",children:["Project Address ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{ref:j,type:"text",id:"projectAddress",name:"projectAddress",required:!0,autoComplete:"off",onChange:P,onFocus:()=>S.length>0&&C(!0),onBlur:()=>setTimeout(()=>C(!1),200),className:`w-full px-4 py-3 border ${e.errors?.projectAddress?"border-red-500":"border-gray-300"} rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors`,placeholder:"Start typing an address..."}),R&&S.length>0?(0,a.jsx)("ul",{className:"absolute z-50 w-full bg-white border border-gray-300 shadow-lg mt-1 max-h-60 overflow-auto",children:S.map(e=>(0,a.jsxs)("li",{onClick:()=>U(e),className:"px-4 py-3 cursor-pointer hover:bg-[#f7931e]/10 border-b border-gray-100 last:border-b-0",children:[(0,a.jsx)("span",{className:"font-medium text-gray-900",children:e.structured_formatting.main_text}),(0,a.jsx)("span",{className:"text-gray-500 text-sm ml-1",children:e.structured_formatting.secondary_text})]},e.place_id))}):null,e.errors?.projectAddress&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-500",children:e.errors.projectAddress})]}),(0,a.jsxs)("div",{className:"grid md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"projectType",className:"block text-sm font-medium text-gray-700 mb-1",children:["Project Type ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsxs)("select",{id:"projectType",name:"projectType",required:!0,className:`w-full px-4 py-3 border ${e.errors?.projectType?"border-red-500":"border-gray-300"} rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors bg-white`,children:[(0,a.jsx)("option",{value:"",children:"Select type..."}),ep.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))]}),e.errors?.projectType&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-500",children:e.errors.projectType})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"budgetRange",className:"block text-sm font-medium text-gray-700 mb-1",children:["Estimated Budget ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsxs)("select",{id:"budgetRange",name:"budgetRange",required:!0,className:`w-full px-4 py-3 border ${e.errors?.budgetRange?"border-red-500":"border-gray-300"} rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors bg-white`,children:[(0,a.jsx)("option",{value:"",children:"Select budget..."}),eb.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))]}),e.errors?.budgetRange&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-500",children:e.errors.budgetRange})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"startTimeline",className:"block text-sm font-medium text-gray-700 mb-1",children:["When do you want to start? ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsxs)("select",{id:"startTimeline",name:"startTimeline",required:!0,className:`w-full px-4 py-3 border ${e.errors?.startTimeline?"border-red-500":"border-gray-300"} rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors bg-white`,children:[(0,a.jsx)("option",{value:"",children:"Select timeline..."}),ef.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))]}),e.errors?.startTimeline&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-500",children:e.errors.startTimeline})]})]}),(0,a.jsxs)("div",{className:"space-y-4 pt-4",children:[(0,a.jsxs)("h3",{className:"text-lg font-semibold text-gray-900 pb-2 border-b border-gray-200",children:["Services Needed ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})," ",(0,a.jsx)("span",{className:"text-sm font-normal text-gray-500",children:"(select all that apply)"})]}),e.errors?.services&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:e.errors.services}),(0,a.jsx)("div",{className:"grid sm:grid-cols-2 gap-3",children:eg.map(e=>(0,a.jsxs)("label",{className:`flex items-start gap-3 p-4 border rounded-sm cursor-pointer transition-all ${s.includes(e.value)?"border-[#f7931e] bg-[#f7931e]/5 ring-1 ring-[#f7931e]":"border-gray-200 hover:border-gray-300 hover:bg-gray-50"}`,children:[(0,a.jsx)("input",{type:"checkbox",id:`service-${e.value}
1`,name:"services",value:e.value,checked:s.includes(e.value),onChange:t=>{var r,o;return r=e.value,o=t.target.checked,void l(e=>o?[...e,r]:e.filter(e=>e!==r))},className:"appearance-none h-5 w-5 mt-0.5 shrink-0 border border-gray-300 rounded cursor-pointer checked:bg-[#f7931e] checked:border-[#f7931e] checked:bg-[url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.207%204.793a1%201%200%20010%201.414l-5%205a1%201%200%2001-1.414%200l-2-2a1%201%200%20011.414-1.414L6.5%209.086l4.293-4.293a1%201%200%20011.414%200z%22%2F%3E%3C%2Fsvg%3E')] checked:bg-center checked:bg-no-repeat focus-visible:ring-2 focus-visible:ring-[#f7931e] focus-visible:ring-offset-2"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-gray-900",children:e.label}),(0,a.jsx)("p",{className:"text-sm text-gray-500",children:e.description})]})]},e.value))})]}),(0,a.jsxs)("div",{className:"space-y-4 pt-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 pb-2 border-b border-gray-200",children:"Project Description"}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"projectNotes",className:"block text-sm font-medium text-gray-700 mb-1",children:["Tell us about your project ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("textarea",{id:"projectNotes",name:"projectNotes",required:!0,rows:5,maxLength:1e3,className:`w-full px-4 py-3 border ${e.errors?.projectNotes?"border-red-500":"border-gray-300"} rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors resize-y`,placeholder:"Describe your project, including any specific requirements, timelines, or questions you have..."}),e.errors?.projectNotes&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-500",children:e.errors.projectNotes})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"projectFilesUrl",className:"block text-sm font-medium text-gray-700 mb-1",children:["Shared Project Files ",(0,a.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,a.jsx)("p",{className:"text-sm text-gray-500 mb-2",children:"Link to files on Dropbox, Google Drive, OneDrive, SharePoint, or similar."}),(0,a.jsx)("input",{type:"url",id:"projectFilesUrl",name:"projectFilesUrl",className:"w-full px-4 py-3 border border-gray-300 rounded-sm focus:ring-2 focus:ring-[#f7931e] focus:border-transparent transition-colors",placeholder:"https://drive.google.com/drive/folders/..."})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"fileUpload",className:"block text-sm font-medium text-gray-700 mb-1",children:["Attach Files ",(0,a.jsx)("span",{className:"text-gray-400",children:"(optional)"})]}),(0,a.jsxs)("p",{className:"text-sm text-gray-500 mb-2",children:["Upload blueprints, photos, or documents. Max ",5," files, 20MB each, 100MB total."]}),B?.files&&(0,a.jsx)("p",{className:"text-sm text-red-500 mb-2",children:B.files}),(0,a.jsxs)("div",{className:"border-2 border-dashed border-gray-300 rounded-sm p-6 text-center hover:border-[#f7931e] transition-colors cursor-pointer",onClick:()=>v.current?.click(),children:[(0,a.jsx)("input",{ref:v,type:"file",id:"fileUpload",name:"files",accept:".jpg,.jpeg,.png,.gif,.webp,.pdf,.zip",multiple:!0,onChange:e=>{let t=Array.from(e.target.files||[]);u("");let r=[];for(let e of t){if(i.some(t=>t.file.name===e.name&&t.file.size===e.size)){u(`${e.name} is already added`);continue}if(i.length+r.length>=5){u("Maximum 5 files allowed");break}if(e.size>0x1400000){u(`${e.name} is too large. Maximum size is 20MB.`);continue}if(i.reduce((e,t)=>e+t.file.size,0)+r.reduce((e,t)=>e+t.file.size,0)+e.size>0x6400000){u("Total file size exceeds 100MB limit.");break}let t={file:e,id:`${Date.now()}-${Math.random().toString(36).slice(2)}`};e.type.startsWith("image/")&&(t.preview=URL.createObjectURL(e)),r.push(t)}c(e=>[...e,...r]),v.current&&(v.current.value="")},className:"hidden"}),(0,a.jsx)("svg",{className:"w-10 h-10 text-gray-400 mx-auto mb-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),(0,a.jsxs)("p",{className:"text-gray-600",children:[(0,a.jsx)("span",{className:"text-[#f7931e] font-medium",children:"Click to upload"})," or drag and drop"]}),(0,a.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Images, PDFs, and ZIP files accepted"})]}),d&&(0,a.jsx)("p",{className:"mt-2 text-sm text-red-500",children:d}),h&&b&&(0,a.jsxs)("div",{className:"mt-3 p-3 bg-blue-50 border border-blue-200 rounded-sm",children:[(0,a.jsxs)("p",{className:"text-sm font-medium text-blue-800",children:["Uploading file ",b.current," of ",b.total,": ",b.currentFileName]}),(0,a.jsx)("div",{className:"mt-1.5 w-full bg-blue-200 rounded-full h-1.5",children:(0,a.jsx)("div",{className:"bg-blue-600 h-1.5 rounded-full transition-all duration-300",style:{width:`${(b.current-1)/b.total*100}%`}})})]}),i.length>0&&(0,a.jsx)("div",{className:"mt-4 space-y-2",children:i.map(e=>(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-sm ${x.has(e.id)?"bg-green-50":"bg-gray-50"}`,children:[e.preview?(0,a.jsx)("img",{src:e.preview,alt:e.file.name,className:"w-12 h-12 object-cover rounded"}):(0,a.jsx)("div",{className:"w-12 h-12 bg-slate-100 rounded flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-6 h-6 text-[#0f172a]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900 truncate",children:e.file.name}),(0,a.jsxs)("p",{className:"text-xs text-gray-500",children:[(e.file.size/1024/1024).toFixed(2)," MB"]})]}),h&&!x.has(e.id)&&b?.currentFileName===e.file.name?(0,a.jsxs)("svg",{className:"animate-spin h-5 w-5 text-blue-600 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):x.has(e.id)?(0,a.jsx)("svg",{className:"w-5 h-5 text-green-600 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):null,(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void c(e=>{let r=e.find(e=>e.id===t);return r?.preview&&URL.revokeObjectURL(r.preview),e.filter(e=>e.id!==t)})},disabled:h,className:"p-1 text-gray-400 hover:text-red-500 transition-colors disabled:opacity-30 disabled:cursor-not-allowed","aria-label":`Remove ${e.file.name}`,children:(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},e.id))})]})]}),(0,a.jsx)("input",{type:"hidden",id:"sourcePage",name:"sourcePage",value:"/contact-us"}),(0,a.jsxs)("div",{className:"absolute -left-[9999px]","aria-hidden":"true",children:[(0,a.jsx)("label",{htmlFor:"website_url",children:"Website"}),(0,a.jsx)("input",{type:"text",id:"website_url",name:"website_url",tabIndex:-1,autoComplete:"off"})]}),(0,a.jsxs)("div",{ref:_,className:"pt-4",children:[(0,a.jsx)("button",{type:"submit",disabled:r||h||e.success,className:`w-full px-8 py-4 font-semibold text-lg transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ${e.success?"bg-green-600 text-white cursor-default focus-visible:ring-green-600":"bg-[#f7931e] text-[#0f172a] hover:bg-[#d97c18] active:bg-[#c26d14] disabled:opacity-50 disabled:cursor-not-allowed focus-visible:ring-[#f7931e]"}`,children:e.success?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("svg",{className:"w-6 h-6 animate-[scaleIn_0.3s_ease-out]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),"Sent Successfully"]}):h&&b?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsxs)("svg",{className:"animate-spin h-5 w-5",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Uploading file ",b.current," of ",b.total,"..."]}
1):r?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsxs)("svg",{className:"animate-spin h-5 w-5",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Sending..."]}):"Submit Request"}),e.success?(0,a.jsx)("p",{className:"text-center text-sm text-green-700 mt-3",children:e.message}):(0,a.jsx)("p",{className:"text-center text-sm text-gray-500 mt-3",children:"We respond within 3 business days."})]})]})}],753160)},775780,(e,t,r)=>{t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},311561,(e,t,r)=>{function o(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=o,o.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},o.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},o.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(void 0===r)if(!this._cachedTimeouts)return!1;else this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1);var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},r),this._options.unref&&this._timer.unref(),!0},o.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},o.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},o.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},o.prototype.start=o.prototype.try,o.prototype.errors=function(){return this._errors},o.prototype.attempts=function(){return this._attempts},o.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,r=0,o=0;o<this._errors.length;o++){var a=this._errors[o],n=a.message,s=(e[n]||0)+1;e[n]=s,s>=r&&(t=a,r=s)}return t}},830855,(e,t,r)=>{var o=e.r(311561);r.operation=function(e){return new o(r.timeouts(e),{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})},r.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw Error("minTimeout is greater than maxTimeout");for(var o=[],a=0;a<t.retries;a++)o.push(this.createTimeout(a,t));return e&&e.forever&&!o.length&&o.push(this.createTimeout(a,t)),o.sort(function(e,t){return e-t}),o},r.createTimeout=function(e,t){var r=Math.round((t.randomize?Math.random()+1:1)*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return Math.min(r,t.maxTimeout)},r.wrap=function(e,t,o){if(t instanceof Array&&(o=t,t=null),!o)for(var a in o=[],e)"function"==typeof e[a]&&o.push(a);for(var n=0;n<o.length;n++){var s=o[n],l=e[s];e[s]=(function(o){var a=r.operation(t),n=Array.prototype.slice.call(arguments,1
1),s=n.pop();n.push(function(e){a.retry(e)||(e&&(arguments[0]=a.mainError()),s.apply(this,arguments))}),a.attempt(function(){o.apply(e,n)})}).bind(e,l),e[s].options=t}}},925894,(e,t,r)=>{t.exports=e.r(830855)},531716,(e,t,r)=>{var o=e.r(925894);t.exports=function(e,t){return new Promise(function(r,a){var n,s=t||{};function l(e){a(e||Error("Aborted"))}function i(e,t){e.bail?l(e):n.retry(e)?s.onRetry&&s.onRetry(e,t):a(n.mainError())}"randomize"in s||(s.randomize=!0),(n=o.operation(s)).attempt(function(t){var o;try{o=e(l,t)}catch(e){i(e,t);return}Promise.resolve(o).then(r).catch(function(e){i(e,t)})})})}}]);
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.