PageSourceSearch

https://bolt.earth/_next/static/chunks/pages/referral/lead-9ed60234eeaa3005.js

js bolt.earth collected 2026-09-24 10:06:53 UTC 26,285 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e123ac82-c0cf-4356-8539-1974bfd667f9",e._sentryDebugIdIdentifier="sentry-dbid-e123ac82-c0cf-4356-8539-1974bfd667f9")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2656],{58699:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/referral/lead",function(){return r(65948)}])},65948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>W});var n=r(37876),a=r(27964),i=r(77545),s=r(55515),l=r(13215);function o(e){let t,r,i=(0,a.c)(4),{className:s}=e;return i[0]!==s?(t=(0,l.cn)("text-custom-gray-tertiary text-[10px] leading-[15px]",s),i[0]=s,i[1]=t):t=i[1],i[2]!==t?(r=(0,n.jsx)("p",{className:t,children:"This site is protected by reCAPTCHA."}),i[2]=t,i[3]=r):r=i[3],r}var c=r(85025),u=r(90281),d=r(83170),m=r(54587),h=r.n(m),p=r(14232);let f="/images/referral/icons";function g(e){let t,r,i,s,o,m,g,y=(0,a.c)(17),{open:b,slot:v,onClose:w,onFileSelected:j}=e,S=(0,p.useRef)(null),_=(0,p.useRef)(null),N=b&&(0===v||1===v);y[0]!==N?(t=()=>{if(N)return document.body.classList.add("overflow-hidden"),x},r=[N],y[0]=N,y[1]=t,y[2]=r):(t=y[1],r=y[2]),(0,p.useEffect)(t,r),y[3]!==N||y[4]!==w?(i=()=>{if(!N)return;let e=e=>{"Escape"===e.key&&w()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},s=[N,w],y[3]=N,y[4]=w,y[5]=i,y[6]=s):(i=y[5],s=y[6]),(0,p.useEffect)(i,s),y[7]!==w||y[8]!==j||y[9]!==v?(o=async e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];e.target.value="",null!=r&&(0===v||1===v)&&await Promise.resolve(j(v,r)),w()},y[7]=w,y[8]=j,y[9]=v,y[10]=o):o=y[10];let k=o;return y[11]!==N||y[12]!==k||y[13]!==w?(m=N?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.m.button,{type:"button","aria-label":"Close",className:"fixed inset-0 z-100 bg-black/45",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},onClick:w},"site-image-sheet-backdrop"),(0,n.jsxs)(c.m.div,{role:"dialog","aria-modal":"true","aria-labelledby":"site-image-sheet-title",className:"fixed right-0 bottom-0 left-0 z-101 mx-auto w-full max-w-[450px] rounded-t-2xl bg-white px-4 pt-2 pb-8 shadow-[0_-4px_24px_rgba(0,0,0,0.12)]",initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"tween",duration:.32,ease:[.32,.72,0,1]},children:[(0,n.jsx)("div",{className:"bg-custom-gray-lighter mx-auto mb-3 h-1 w-10 rounded-full","aria-hidden":!0}),(0,n.jsx)("p",{id:"site-image-sheet-title",className:"text-custom-gray-primary mb-4 text-center text-base font-semibold",children:"Add site image"}),(0,n.jsx)("input",{ref:S,type:"file",accept:"image/*",capture:"environment",className:"sr-only",onChange:k}),(0,n.jsx)("input",{ref:_,type:"file",accept:"image/*",className:"sr-only",onChange:k}),(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("button",{type:"button",className:(0,l.cn)("border-custom-gray-lighter flex w-full items-center gap-3 rounded-xl border bg-white px-4 py-3.5 text-left transition-colors hover:bg-[#f7f7f7] active:bg-[#f0f0f0]"),onClick:()=>{var e;return null==(e=S.current)?void 0:e.click()},children:[(0,n.jsx)("span",{className:"h-8 w-8",children:(0,n.jsx)(h(),{src:"".concat(f,"/site-image-camera.svg"),alt:"",width:36,height:36})}),(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{className:"text-custom-gray-medium block text-sm font-bold",children:"Take photo"}),(0,n.jsx)("span",{className:"text-custom-gray-tertiary text-xs font-medium",children:"Use your camera"})]})]}),(0,n.jsxs)("button",{type:"button",className:(0,l.cn)("border-custom-gray-lighter flex w-full items-center gap-3 rounded-xl border bg-white px-4 py-3.5 text-left transition-colors hover:bg-[#f7f7f7] active:bg-[#f0f0f0]"),onClick:()=>{var e;return null==(e=_.current)?void 0:e.click()},children:[(0,n.jsx)("span",{className:"h-8 w-8",children:(0,n.jsx)(h(),{src:"".concat(f,"/site-image-gallery.svg"),alt:"",width:36,height:36})}),(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{className:"text-custom-gray-medium block text-sm font-bold",children:"Choose from gallery"}),(0,n.jsx)("span",{className:"text-custom-gray-tertiary text-xs font-medium",children:"Select from your existing photos"})]})]})]})]},"site-image-sheet-panel")]}):null,y[11]=N,y[12]=k,y[13]=w,y[14]=m):m=y[14],y[15]!==m?(g=(0,n.jsx)(d.A,{children:(0,n.jsx)(u.N,{children:m})}),y[15]=m,y[16]=g):g=y[16],g}function x(){document.body.classList.remove("overflow-hidden")}var y=r(63392),b=r(98975),v=r(7940),w=r(83437),j=r(66737);async function S(){let e="6LfqIugsAAAAADqOOQbTQGso7tJVEDtO86p5iFoH";if(!e)throw Error("reCAPTCHA is not configured.");if(!window.grecaptcha)throw Error("reCAPTCHA is still loading. Please try again in a moment.");return await new Promise(e=>{window.grecaptcha.ready(e)}),window.grecaptcha.execute(e,{action:"upload"})}function _(e){var t,r;if(!(null==e||null==(t=e.urls)?void 0:t.length))return!1;let n=null==(r=e.urls[0])?void 0:r.expiresInSeconds,a="number"==typeof n&&n>0?Math.min(n,300):300;return Date.now()-e.fetchedAt<1e3*a-3e4}async function N(){var e,t;let r=await S(),n=await fetch("".concat(v.vf,"/referral/presigned-url"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({captchaToken:r})}),a=await n.json().catch(()=>({}));if(!n.ok||(null==a||null==(e=a.meta)?void 0:e.success)===!1)throw Error((null==a?void 0:a.msg)||"Could not prepare image upload. Please try again.");let i=null==a||null==(t=a.data)?void 0:t.presignedUrls;if(!Array.isArray(i)||i.length<1)throw Error("Could not prepare image upload. Please try again.");return{urls:i,fetchedAt:Date.now()}}async function k(e){if(!_(e.current))try{e.current=await N()}catch(e){}}async function C(e){let{forceRefresh:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t&&_(e.current))return e.current.urls;let r=await N();return e.current=r,r.urls}async function E(e,t){if(!(null==t?void 0:t.uploadUrl)||!(null==t?void 0:t.s3Key))return{ok:!1,s3Key:null};let r=t.httpMethod||"PUT";try{return{ok:(await fetch(t.uploadUrl,{method:r,body:e,headers:{"Content-Type":e.type||"application/octet-stream"}})).ok,s3Key:t.s3Key}}catch(e){return{ok:!1,s3Key:null}}}async function A(e,t){let r=[];for(let n=0;n<e.length;n+=1){let a=e[n],i=n+1,s=t[n],{ok:l,s3Key:o}=await E(a,s);r.push({slot:i,uploadStatus:l?"COMPLETED":"FAILED",s3Key:l?o:null})}return r}async function R(e,t){if(!e.length)return[];let r=await C(t),n=await A(e,r);return n.some(e=>"FAILED"===e.uploadStatus)&&(r=await C(t,{forceRefresh:!0}),n=await Promise.all(n.map(async(t,n)=>{if("FAILED"!==t.uploadStatus)return t;let a=e[n];if(!a)return t;let i=r[n],{ok:s,s3Key:l}=await E(a,i);return{slot:t.slot,uploadStatus:s?"COMPLETED":"FAILED",s3Key:s?l:null}}))),n}async function O(e){var t,n,a,i,s;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null!=(t=l.maxBytes)?t:5242880,c=o/1048576,u=null!=(n=l.maxWidthOrHeight)?n:4096,d=null!=(a=l.fallbackMaxWidthOrHeight)?a:2048,m=null!=(i=l.fallbackMaxSizeMB)?i:Math.min(4.5,Math.max(.5,c-.25)),h=null!=(s=l.fallbackInitialQuality)?s:.78;if(e.size<=o)return e;let{default:p}=await r.e(3587).then(r.bind(r,83587)),f=await p(e,{maxSizeMB:c,maxWidthOrHeight:u,useWebWorker:!0});return f.size<=o?f:p(e,{maxSizeMB:m,maxWidthOrHeight:d,useWebWorker:!0,initialQuality:h})}var L=r(89099),M=r(21407),P=r(60388),U=r(90089),I=r(37149),T=class extends U.Q{#e;#t=void 0;#r;#n;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,I.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,I.EN)(t.mutationKey)!==(0,I.EN)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#i()}mutate(e,t){return this.#n=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#a(){let e=this.#r?.state??(0,M.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){P.jG.batch(()=>
1{if(this.#n&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#n.onSuccess?.(e.data,t,r,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(e.data,null,t,r,n)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#n.onError?.(e.error,t,r,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(void 0,e.error,t,r,n)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},B=r(67768);let D={lat:20.5937,lng:78.9629},z="/images/referral/icons",F=e=>{let t,r,i=(0,a.c)(6),{label:s,labelAs:l,children:o}=e,c=void 0===l?"label":l;return i[0]!==c||i[1]!==s?(t=s?(0,n.jsx)(c,{className:"text-custom-gray-tertiary mb-3 block text-sm",children:s}):null,i[0]=c,i[1]=s,i[2]=t):t=i[2],i[3]!==o||i[4]!==t?(r=(0,n.jsxs)("div",{children:[t,o]}),i[3]=o,i[4]=t,i[5]=r):r=i[5],r},K=e=>{let t,r,i=(0,a.c)(5),{className:s,children:o}=e;return i[0]!==s?(t=(0,l.cn)("border-custom-gray-lighter text-custom-gray-medium focus:border-primary h-12 w-full rounded-[25px] border bg-white px-4 text-base outline-hidden",s),i[0]=s,i[1]=t):t=i[1],i[2]!==o||i[3]!==t?(r=(0,n.jsx)("div",{className:t,children:o}),i[2]=o,i[3]=t,i[4]=r):r=i[4],r},$=e=>{let t,r,i,s,o=(0,a.c)(8);return o[0]!==e?({className:t,...r}=e,o[0]=e,o[1]=t,o[2]=r):(t=o[1],r=o[2]),o[3]!==t?(i=(0,l.cn)("border-custom-gray-lighter text-custom-gray-medium focus:border-primary h-12 w-full rounded-[25px] border bg-white px-4 text-base outline-hidden",t),o[3]=t,o[4]=i):i=o[4],o[5]!==r||o[6]!==i?(s=(0,n.jsx)("input",{className:i,...r}),o[5]=r,o[6]=i,o[7]=s):s=o[7],s},q=e=>{let t,r,i=(0,a.c)(5),{title:s,children:l}=e;return i[0]!==s?(t=(0,n.jsx)("h2",{className:"text-custom-gray-primary text-base leading-[27px] font-semibold",children:s}),i[0]=s,i[1]=t):t=i[1],i[2]!==l||i[3]!==t?(r=(0,n.jsxs)("div",{className:"space-y-4",children:[t,l]}),i[2]=l,i[3]=t,i[4]=r):r=i[4],r};async function H(e){var t,r,n;let{userId:a,referralCode:i,hostName:s,phone:l,latitude:o,longitude:c,address:u,siteImages:d,hasSiteLocation:m,presignCacheRef:h}=e,p=v.vf,f=Array.isArray(d)?d.filter(Boolean).slice(0,2):[],g=f.length>0?await R(f,h):[],x={hostName:s,phone:l,...m&&null!=o&&null!=c?{location:{lat:o,lng:c}}:{},...(null==u?void 0:u.trim())?{address:u.trim()}:{},images:0===f.length?[]:g},y="".concat(p,"/internal/referral/lead?").concat(new URLSearchParams({userId:a,referralCode:i})),b=await fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)}),w=await b.json().catch(()=>({}));if(!b.ok||(null==w||null==(t=w.meta)?void 0:t.success)===!1)throw Error((null==w?void 0:w.msg)||"Failed to submit referral. Please retry.");let j=null!=(n=null==w||null==(r=w.data)?void 0:r.link)?n:null;return{link:"string"==typeof j?j:null}}let W=()=>{let e,t,r,c,u,d,m,f,x,S,_,N,C,E,A,R,M,U,W,Y,ee,et,er,en,ea,ei,es=(0,a.c)(80),el=(0,L.useRouter)(),eo="string"==typeof el.query.referralCode?el.query.referralCode:"",ec="string"==typeof el.query.userId?el.query.userId:"",[eu,ed]=(0,p.useState)(""),[em,eh]=(0,p.useState)(""),[ep,ef]=(0,p.useState)("");es[0]===Symbol.for("react.memo_cache_sentinel")?(e=[null,null],es[0]=e):e=es[0];let[eg,ex]=(0,p.useState)(e);es[1]===Symbol.for("react.memo_cache_sentinel")?(t=[null,null],es[1]=t):t=es[1];let[ey,eb]=(0,p.useState)(t),[ev,ew]=(0,p.useState)(D.lat),[ej,eS]=(0,p.useState)(D.lng);es[2]===Symbol.for("react.memo_cache_sentinel")?(r={name:"",area:""},es[2]=r):r=es[2];let[e_,eN]=(0,p.useState)(r),[ek]=(0,p.useState)(0),[eC,eE]=(0,p.useState)(null),[eA,eR]=(0,p.useState)("form"),[eO,eL]=(0,p.useState)(0);es[3]===Symbol.for("react.memo_cache_sentinel")?(c={open:!1,slot:null},es[3]=c):c=es[3];let[eM,eP]=(0,p.useState)(c),eU=(0,p.useRef)(null);es[4]!==ep||es[5]!==ev||es[6]!==e_||es[7]!==ej||es[8]!==eu||es[9]!==em||es[10]!==eo||es[11]!==eg||es[12]!==ec?(u=()=>{var e;return H({userId:ec,referralCode:eo,hostName:eu.trim(),phone:"+91".concat(em),latitude:ev,longitude:ej,address:ep,siteImages:eg,hasSiteLocation:!!(null==(e=e_.name)?void 0:e.trim()),presignCacheRef:eU})},es[4]=ep,es[5]=ev,es[6]=e_,es[7]=ej,es[8]=eu,es[9]=em,es[10]=eo,es[11]=eg,es[12]=ec,es[13]=u):u=es[13],es[14]!==eo||es[15]!==el||es[16]!==ec?(d=e=>{if(!eo||!ec)return;let t=new URLSearchParams({referralCode:eo,userId:ec});(null==e?void 0:e.link)&&t.set("link",encodeURIComponent(e.link)),el.push("/referral/lead/submitted?".concat(t.toString()))},es[14]=eo,es[15]=el,es[16]=ec,es[17]=d):d=es[17],es[18]!==u||es[19]!==d?(m={mutationFn:u,retry:!1,onSuccess:d,onError:G},es[18]=u,es[19]=d,es[20]=m):m=es[20];let eI=function(e,t){let r=(0,B.jE)(void 0),[n]=p.useState(()=>new T(r,e));p.useEffect(()=>{n.setOptions(e)},[n,e]);let a=p.useSyncExternalStore(p.useCallback(e=>n.subscribe(P.jG.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=p.useCallback((e,t)=>{n.mutate(e,t).catch(I.lQ)},[n]);if(a.error&&(0,I.GU)(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}(m);es[21]!==eo||es[22]!==el.isReady||es[23]!==ec?(f=()=>{if(!el.isReady||!eo||!ec)return;let e=!1,t=()=>{e||(ew(D.lat),eS(D.lng),ef(""),eN({name:"",area:""}))};return navigator.geolocation?(navigator.geolocation.getCurrentPosition(async t=>{if(e)return;let r=t.coords.latitude,n=t.coords.longitude;ew(r),eS(n);
1let a=await (0,j.e0)(r,n);e||(ef(a.formattedAddress),eN({name:a.name,area:a.area}))},()=>{e||(t(),w.$B.error("Location permission denied."))},{enableHighAccuracy:!0,timeout:12e3,maximumAge:6e4}),()=>{e=!0}):(t(),w.$B.error("Geolocation is not supported on this device."),()=>{e=!0})},es[21]=eo,es[22]=el.isReady,es[23]=ec,es[24]=f):f=es[24],es[25]!==ek||es[26]!==eo||es[27]!==el.isReady||es[28]!==ec?(x=[el.isReady,eo,ec,ek],es[25]=ek,es[26]=eo,es[27]=el.isReady,es[28]=ec,es[29]=x):x=es[29],(0,p.useEffect)(f,x),es[30]!==eg?(_=()=>{eg.some(Boolean)&&k(eU)},S=[eg],es[30]=eg,es[31]=S,es[32]=_):(S=es[31],_=es[32]),(0,p.useEffect)(_,S),es[33]!==eu||es[34]!==em||es[35]!==eo||es[36]!==ec?(N=()=>eo?ec?eu.trim()?em.trim()?/^\d{10}$/.test(em)?"":"Please enter a valid 10-digit phone number.":"Owner phone number is required.":"Location owner name is required.":"User id is missing from the URL.":"Referral code is missing from the URL.",es[33]=eu,es[34]=em,es[35]=eo,es[36]=ec,es[37]=N):N=es[37];let eT=N;es[38]===Symbol.for("react.memo_cache_sentinel")?(C=async(e,t)=>{if(!t.type.startsWith("image/"))return void w.$B.error("Please choose an image file.");let r=t;if(t.size>5242880)try{r=await O(t)}catch(e){console.error("Image compression failed:",e),w.$B.error("Could not process this image. Try another file.");return}if(r.size>5242880)return void w.$B.error("This image is still too large after compression. Try a smaller photo.");ex(t=>{var n,a;let i=null!=(n=t[0])?n:null,s=null!=(a=t[1])?a:null;return 0===e?[r,s]:[i,r]})},es[38]=C):C=es[38];let eB=C;es[39]===Symbol.for("react.memo_cache_sentinel")?(E=e=>{eP({open:!0,slot:e})},es[39]=E):E=es[39];let eD=E;es[40]===Symbol.for("react.memo_cache_sentinel")?(A=()=>{eP({open:!1,slot:null})},es[40]=A):A=es[40];let ez=A;es[41]!==ep||es[42]!==ev||es[43]!==e_||es[44]!==ej?(R=()=>{eE({latitude:ev,longitude:ej,address:ep,locationMeta:{...e_}}),eR("location-picker")},es[41]=ep,es[42]=ev,es[43]=e_,es[44]=ej,es[45]=R):R=es[45];let eF=R;es[46]!==eC?(M=()=>{eC&&(ew(eC.latitude),eS(eC.longitude),ef(eC.address),eN(eC.locationMeta)),eE(null),eR("form")},es[46]=eC,es[47]=M):M=es[47];let eK=M;es[48]===Symbol.for("react.memo_cache_sentinel")?(U=()=>{eE(null),eR("form")},es[48]=U):U=es[48];let e$=U;es[49]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{if(!navigator.geolocation)return void w.$B.error("Geolocation is not supported on this device.");navigator.geolocation.getCurrentPosition(async e=>{let t=e.coords.latitude,r=e.coords.longitude;ew(t),eS(r),eL(Q);let n=await (0,j.e0)(t,r);ef(n.formattedAddress),eN({name:n.name,area:n.area})},J,{enableHighAccuracy:!0,timeout:12e3,maximumAge:6e4})},es[49]=W):W=es[49];let eq=W;es[50]!==eg?(Y=()=>{let e=[0,1].map(e=>eg[e]?URL.createObjectURL(eg[e]):null);return eb(e),()=>{e.forEach(V)}},ee=[eg],es[50]=eg,es[51]=Y,es[52]=ee):(Y=es[51],ee=es[52]),(0,p.useEffect)(Y,ee),es[53]!==eI||es[54]!==eT?(et=e=>{e.preventDefault();let t=eT();if(t)return void w.$B.error(t);eI.mutate()},es[53]=eI,es[54]=eT,es[55]=et):et=es[55];let eH=et;if(el.isReady&&(!eo||!ec)){let e;return es[56]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)("section",{className:"min-h-screen bg-[#f7f7f7] py-10",children:(0,n.jsx)("div",{className:"container",children:(0,n.jsxs)("div",{className:"border-custom-gray-lighter mx-auto w-full max-w-[760px] rounded-2xl border bg-white p-6 text-center shadow-xs lg:p-10",children:[(0,n.jsx)("h1",{className:"text-custom-gray-primary text-2xl font-extrabold lg:text-3xl",children:"Invalid referral link"}),(0,n.jsx)("p",{className:"text-custom-gray-tertiary mt-2 text-sm",children:"A valid referral code and user id are required in the link."})]})})}),es[56]=e):e=es[56],e}return es[57]===Symbol.for("react.memo_cache_sentinel")?(er=(0,n.jsx)(i.A,{title:"Submit Referral - Bolt.Earth"}),es[57]=er):er=es[57],es[58]!==ep||es[59]!==eK||es[60]!==eH||es[61]!==ev||es[62]!==e_||es[63]!==ej||es[64]!==eO||es[65]!==eF||es[66]!==eu||es[67]!==em||es[68]!==ey||es[69]!==eo||es[70]!==eg||es[71]!==eI||es[72]!==eA?(en=(0,n.jsx)("section",{className:"min-h-screen bg-[#f7f7f7]",children:(0,n.jsx)("div",{className:"container max-w-[450px] bg-white py-6",children:"location-picker"===eA?(0,n.jsx)(s.A,{latitude:ev,longitude:ej,setLatitude:ew,setLongitude:eS,setAddress:ef,locationName:e_.name,locationArea:e_.area,setLocationMeta:eN,initialSearchValue:ep,onBack:eK,onConfirm:e$,onError:X}
1):(0,n.jsxs)("form",{onSubmit:eH,className:"space-y-4",children:[(0,n.jsx)("div",{children:(0,n.jsx)(h(),{src:"".concat(v.ZU,"/images/referral/feature-banner.png"),alt:"",width:328,height:246,className:"h-auto w-full",quality:100,priority:!0})}),(0,n.jsx)(F,{label:"Referral code",children:(0,n.jsxs)(K,{className:"flex items-center gap-2",children:[(0,n.jsx)(h(),{src:"".concat(z,"/tag.svg"),alt:"",width:20,height:20}),(0,n.jsx)("span",{children:eo})]})}),(0,n.jsxs)(q,{title:"Share Owner's Details",children:[(0,n.jsx)(F,{label:"Owner Name *",children:(0,n.jsx)($,{value:eu,onChange:e=>ed(e.target.value),placeholder:"Enter name"})}),(0,n.jsx)(F,{label:"Owner Phone Number *",children:(0,n.jsxs)(K,{className:"flex items-center gap-3",children:[(0,n.jsx)("span",{children:"+91"}),(0,n.jsx)("div",{className:"bg-custom-gray-lighter h-full w-px"}),(0,n.jsx)("input",{value:em,onChange:e=>{eh(e.target.value.replace(/\D/g,"").slice(0,10))},placeholder:"Enter phone number",inputMode:"numeric",autoComplete:"tel-national",maxLength:10,className:"w-full bg-transparent outline-hidden"})]})})]}),(0,n.jsx)(q,{title:e_.name?"Add Site Details (optional)":"Location Details (optional)",children:(0,n.jsx)(y.A,{locationMeta:e_,onOpenPicker:eF,emptyHint:"Set a location on the map (optional)",latitude:ev,longitude:ej,setLatitude:ew,setLongitude:eS,setAddress:ef,setLocationMeta:eN,onGeocodeError:Z,onRequestCurrentLocation:eq,mapRecenterTick:eO})}),(0,n.jsx)(F,{label:"Address (optional)",labelAs:"p",children:(0,n.jsx)("textarea",{value:ep,onChange:e=>ef(e.target.value),className:"border-custom-gray-lighter focus:border-primary h-[130px] w-full resize-none rounded-[24px] border bg-white p-4 outline-hidden"})}),(0,n.jsx)("div",{children:(0,n.jsx)(F,{label:"Site Images (optional)",labelAs:"p",children:(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3",children:[0,1].map(e=>{let t=eg[e],r=ey[e];return(0,n.jsxs)("button",{type:"button",onClick:()=>eD(e),className:"border-custom-gray-lighter relative flex h-[105px] w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border-2 border-dashed bg-white p-2 text-left",children:[r?(0,n.jsx)(h(),{src:r,alt:"",fill:!0,unoptimized:!0,className:"absolute inset-0 z-0 h-full w-full object-cover"}):null,(0,n.jsx)("div",{className:(0,l.cn)("pointer-events-none relative z-10 flex flex-col items-center justify-center",r&&"bg-black/35 px-1 py-0.5"),children:r?(0,n.jsx)("span",{className:"max-w-full truncate text-center text-[10px] font-medium text-white",children:(null==t?void 0:t.name)?"Replace Image":"Upload Image ".concat(e+1)}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h(),{src:"".concat(z,"/upload-image.svg"),alt:"",width:32,height:32}),(0,n.jsxs)("span",{className:"text-custom-gray-tertiary mt-1 text-center text-xs",children:["Upload Image ",e+1]})]})})]},e)})})})}),(0,n.jsx)(o,{className:"mt-6 text-center"}),(0,n.jsx)("button",{type:"submit",disabled:eI.isPending,className:(0,l.cn)((0,b.V)({variant:"filled",size:"lg"}),"inline-flex w-full items-center justify-center gap-2 disabled:opacity-60"),children:eI.isPending?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"h-5 w-5 shrink-0 animate-spin rounded-full border-2 border-white border-t-transparent","aria-hidden":!0}),"Submitting…"]}):"Submit"})]})})}),es[58]=ep,es[59]=eK,es[60]=eH,es[61]=ev,es[62]=e_,es[63]=ej,es[64]=eO,es[65]=eF,es[66]=eu,es[67]=em,es[68]=ey,es[69]=eo,es[70]=eg,es[71]=eI,es[72]=eA,es[73]=en):en=es[73],es[74]!==eM.open||es[75]!==eM.slot?(ea=(0,n.jsx)(g,{open:eM.open,slot:eM.slot,onClose:ez,onFileSelected:eB}),es[74]=eM.open,es[75]=eM.slot,es[76]=ea):ea=es[76],es[77]!==en||es[78]!==ea?(ei=(0,n.jsxs)(n.Fragment,{children:[er,en,ea]}),es[77]=en,es[78]=ea,es[79]=ei):ei=es[79],ei};function G(e){console.error("Error submitting referral:",e)}function Q(e){return e+1}function J(){return w.$B.error("Location permission denied.")}function V(e){e&&URL.revokeObjectURL(e)}function X(e){return w.$B.error(e)}function Z(e){return w.$B.error(e)}},66737:(e,t,r)=>{"use strict";function n(e){var t,r,n,a,i,s,l,o;let c=null==(r=e.address_components)||null==(t=r.find(e=>e.types.includes("locality")))?void 0:t.long_name,u=null==(a=e.address_components)||null==(n=a.find(e=>e.types.includes("sublocality")))?void 0:n.long_name,d=null==(s=e.address_components)||null==(i=s.find(e=>e.types.includes("administrative_area_level_1")))?void 0:i.long_name,m=null==(o=e.address_components)||null==(l=o.find(e=>e.types.includes("postal_code")))?void 0:l.long_name,h=u||c||"Selected location",p=[c,d].filter(
1Boolean).join(", ");return{formattedAddress:e.formatted_address||"",name:h,area:p||e.formatted_address||"",postalCode:m||""}}async function a(e,t){try{let r=new URLSearchParams({lat:String(e),lng:String(t)}),a=await fetch("/api/geocode/reverse?".concat(r.toString())),i=await a.json();if(i.ok&&i.topResult)return n(i.topResult)}catch(e){}let r="".concat(e.toFixed(5),", ").concat(t.toFixed(5));return{formattedAddress:"",name:"Current location",area:"".concat(r," — use Change to set address on the map"),postalCode:""}}r.d(t,{Gj:()=>n,e0:()=>a})},77545:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(37876),a=r(27964),i=r(77328),s=r.n(i),l=r(14e3);let o=e=>{let t,r,i,o,c,u,d,m,h,p,f,g,x,y,b,v,w,j,S,_=(0,a.c)(50),{title:N,ogTitle:k,description:C,ogDescription:E,image:A,imageAlt:R,isArticle:O,author:L,disableCanonical:M}=e,P=void 0!==M&&M,U=(0,l.usePathname)(),I="https://bolt.earth".concat(U);_[0]!==N?(t=(0,n.jsx)("title",{children:N}),_[0]=N,_[1]=t):t=_[1],_[2]!==C?(r=C&&(0,n.jsx)("meta",{name:"description",content:C}),_[2]=C,_[3]=r):r=_[3];let T=k||N;_[4]!==T?(i=(0,n.jsx)("meta",{property:"og:title",content:T}),_[4]=T,_[5]=i):i=_[5],_[6]!==C||_[7]!==E?(o=(E||C)&&(0,n.jsx)("meta",{property:"og:description",content:E||C}),_[6]=C,_[7]=E,_[8]=o):o=_[8],_[9]===Symbol.for("react.memo_cache_sentinel")?(c=(0,n.jsx)("meta",{property:"og:site_name",content:"Bolt Earth"}),_[9]=c):c=_[9],_[10]!==I?(u=I&&(0,n.jsx)("meta",{property:"og:url",content:I}),_[10]=I,_[11]=u):u=_[11];let B=A||"https://bolt.earth/images/link-thumbnail.png";_[12]!==B?(d=(0,n.jsx)("meta",{property:"og:image",content:B}),_[12]=B,_[13]=d):d=_[13];let D=O?"article":"website";_[14]!==D?(m=(0,n.jsx)("meta",{property:"og:type",content:D}),_[14]=D,_[15]=m):m=_[15],_[16]!==L?(h=L&&(0,n.jsx)("meta",{name:"author",content:L}),_[16]=L,_[17]=h):h=_[17],_[18]!==L?(p=L&&(0,n.jsx)("meta",{property:"article:author",content:L}),_[18]=L,_[19]=p):p=_[19],_[20]===Symbol.for("react.memo_cache_sentinel")?(f=(0,n.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),g=(0,n.jsx)("meta",{name:"twitter:creator",content:"@bolt_earth"}),_[20]=f,_[21]=g):(f=_[20],g=_[21]);let z=k||N;_[22]!==z?(x=(0,n.jsx)("meta",{name:"twitter:title",content:z}),_[22]=z,_[23]=x):x=_[23],_[24]!==C||_[25]!==E?(y=(E||C)&&(0,n.jsx)("meta",{name:"twitter:description",content:E||C}),_[24]=C,_[25]=E,_[26]=y):y=_[26],_[27]===Symbol.for("react.memo_cache_sentinel")?(b=(0,n.jsx)("meta",{name:"twitter:site",content:"@bolt_earth"}),_[27]=b):b=_[27];let F=A||"https://bolt.earth/images/link-thumbnail.png";return _[28]!==F?(v=(0,n.jsx)("meta",{name:"twitter:image",content:F}),_[28]=F,_[29]=v):v=_[29],_[30]!==R?(w=R&&(0,n.jsx)("meta",{name:"twitter:image:alt",content:R}),_[30]=R,_[31]=w):w=_[31],_[32]!==P||_[33]!==I?(j=!P&&(0,n.jsx)("link",{rel:"canonical",href:I}),_[32]=P,_[33]=I,_[34]=j):j=_[34],_[35]!==d||_[36]!==m||_[37]!==h||_[38]!==p||_[39]!==x||_[40]!==y||_[41]!==t||_[42]!==v||_[43]!==w||_[44]!==j||_[45]!==r||_[46]!==i||_[47]!==o||_[48]!==u?(S=(0,n.jsxs)(s(),{children:[t,r,i,o,c,u,d,m,h,p,f,g,x,y,b,v,w,j]}),_[35]=d,_[36]=m,_[37]=h,_[38]=p,_[39]=x,_[40]=y,_[41]=t,_[42]=v,_[43]=w,_[44]=j,_[45]=r,_[46]=i,_[47]=o,_[48]=u,_[49]=S):S=_[49],S}}},e=>{e.O(0,[1120,4e3,1006,3324,8857,6593,636,8792],()=>e(e.s=58699)),_N_E=e.O()}]);

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.