PageSourceSearch

https://app.drodat.com/_next/static/chunks/3929-9f301d99c331b2ab.js?dpl=dpl_396VR8uAHsKA1xkHjSvxfMWbQcVP

js drodat.com collected 2026-10-02 00:49:56 UTC 22,770 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]="5a5b6982-03b6-42ea-aa1b-a5f7299bd134",e._sentryDebugIdIdentifier="sentry-dbid-5a5b6982-03b6-42ea-aa1b-a5f7299bd134")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3929],{48639:function(e,t,r){r.d(t,{U:function(){return b},h:function(){return k}});var o=r(57437),n=r(2265),i=r(99376),a=r(48061),d=r(56943),l=r(1850),c=r(23340),s=r(61466),u=r(32352),p=r(9008),f=r(29827),m=r(72166);async function h(e,t,r,o,n){var i;let a=(0,d.doc)(e,"organizations",t,"properties",r),l=(0,d.doc)(e,"organizations",t,"properties",r,"metadata","info"),c=(0,d.writeBatch)(e);c.update(a,(i=new Date().toISOString(),o?{isArchived:!0,archivedAt:i,archivedBy:{uid:n.uid,name:n.name},updatedAt:i,updatedBy:n.uid}:{isArchived:!1,restoredAt:i,restoredBy:{uid:n.uid,name:n.name},updatedAt:i,updatedBy:n.uid})),c.set(l,{isArchived:o},{merge:!0}),await c.commit()}var g=r(64142);let y=["/","/dashboard","/contracts","/intakes","/projects","/properties","/contacts","/schedule"],v=0,w=(0,n.createContext)(void 0);function b(e){var t;let{children:r}=e,{currentUser:b,userRole:k,organization:C}=(0,a.a)(),[I,D]=(0,n.useState)([]),[A,E]=(0,n.useState)(!1),S=(0,n.useRef)(!1),{toast:z}=(0,c.useToast)(),B=(0,f.NL)(),P=["properties",null==C?void 0:C.id,null==b?void 0:b.uid],U=(0,n.useCallback)(async()=>{if(b&&(null==C?void 0:C.id))try{var e;console.time("properties-fetch-total"),E(!0),console.time("[Properties] slim fetch");let t=(0,s.getAuth)(),r=await (null===(e=t.currentUser)||void 0===e?void 0:e.getIdToken());if(!r)throw Error("No auth token available");let o=await fetch("/api/properties/list?orgId=".concat(encodeURIComponent(C.id)),{headers:{Authorization:"Bearer ".concat(r)},cache:(0,u.LJ)("properties")});if(!o.ok)throw Error("Failed to fetch properties: ".concat(o.status));let n=await o.json(),i=Array.isArray(n.properties)?n.properties:[];console.timeEnd("[Properties] slim fetch");let a=i.filter(e=>!0!==e.isArchived).map(e=>{var t,r,o;return{id:e.id,address:e.address,zipCode:e.zipCode||"",lat:e.lat||0,long:e.long||0,mainphoto:e.mainphoto||"",timestamp:e.timestamp||"",createdBy:e.createdBy||{uid:"unknown",name:"Unknown"},createdAt:e.createdAt||"",updatedBy:e.updatedBy||e.createdBy||{uid:"unknown",name:"Unknown"},updatedAt:e.updatedAt||e.createdAt||"",isArchived:e.isArchived||!1,userStars:e.userStars||{},primaryContactName:null!==(t=e.primaryContactName)&&void 0!==t?t:null,primaryContactId:null!==(r=e.primaryContactId)&&void 0!==r?r:null,primaryContactIsCompany:null!==(o=e.primaryContactIsCompany)&&void 0!==o&&o,photos:[],files:[]}});D(a),console.log("[Properties] ".concat(a.length," loaded (slim payload)")),console.timeEnd("properties-fetch-total"),E(!1)}catch(e){console.error("[Properties] Error:",e),E(!1)}},[b,null==C?void 0:C.id,k]),x=(0,n.useCallback)(async e=>{var t,r,o;if(!b||!e.formatted_address||!(null===(t=e.geometry)||void 0===t?void 0:t.location)||!(null==C?void 0:C.id)){z({variant:"destructive",title:"Error",description:"Missing required information to create property."});return}let n=(0,m.x)("addProperty");try{let t=e.geometry.location,i=e.formatted_address,a=(null===(o=i.match(/\b\d{5}(?:-\d{4})?\b/g))||void 0===o?void 0:null===(r=o.pop())||void 0===r?void 0:r.slice(0,5))||"";if(!a){z({variant:"destructive",title:"Error",description:"Could not extract ZIP code from address."});return}let c=(0,d.getFirestore)(),s=encodeURIComponent(i),p=(0,d.doc)(c,"organizations",C.id,"properties",s),f=await (0,d.getDoc)(p);if(n.mark("exists check"),f.exists())return{success:!0,existingProperty:!0,address:i};let m=(0,l.$C)(),h=(0,l.V1)(m,"createOrganizationProperty"),g=await h({organizationId:C.id,address:i,zipCode:a,lat:t.lat(),long:t.lng(),createdBy:{uid:b.uid,name:b.email||"Unknown"}});if(n.mark("createOrganizationProperty callable"),g.data.success){await (0,u.rt)(C.id,b.uid,["properties"]),n.mark("invalidate properties cache");
1let e={id:g.data.propertyId,address:i,zipCode:a,lat:t.lat(),long:t.lng(),mainphoto:g.data.mainphoto||"",timestamp:new Date().toISOString(),createdBy:{uid:b.uid,name:b.email||"Unknown"},createdAt:new Date().toISOString(),updatedBy:{uid:b.uid,name:b.email||"Unknown"},updatedAt:new Date().toISOString(),photos:[],files:[]};D(t=>[e,...t]),B.setQueryData(P,t=>t?[e,...t]:t);try{let e=(0,d.doc)(c,"organizations",C.id,"folder-configs","property-cloud"),t=await (0,d.getDoc)(e);if(console.log("\uD83D\uDD0D Checking for folder template...",t.exists()),t.exists()){let e=t.data().folders||[];if(console.log("\uD83D\uDCC1 Folder template found:",e),e.length>0){let t=(0,d.collection)(c,"organizations",C.id,"properties",g.data.propertyId,"files");console.log("\uD83D\uDCC2 Creating folders at path:","organizations/".concat(C.id,"/properties/").concat(g.data.propertyId,"/files"));let r=(0,d.query)(t,(0,d.where)("type","==","folder"),(0,d.where)("parentId","==",null)),o=await (0,d.getDocs)(r),n=new Set(o.docs.map(e=>e.data().name));console.log("\uD83D\uDCCB Existing folders:",Array.from(n));let i=0;for(let r of e){if(n.has(r)){console.log("⏭️ Skipping existing folder:",r);continue}let e={name:r,type:"folder",createdAt:Date.now(),createdBy:{name:b.displayName||b.email||"Unknown User",uid:b.uid},parentId:null};console.log("➕ Creating folder:",r),await (0,d.addDoc)(t,e),i++}i>0?console.log("✅ Created ".concat(i," folders for new property from template")):console.log("ℹ️ No new folders created (all already exist)")}else console.log("⚠️ Template exists but has no folders")}else console.log("⚠️ No folder template found for property-cloud")}catch(e){console.error("Error creating folders from template:",e)}return n.mark("property-cloud template folders"),n.done(g.data.propertyId),{success:!0,existingProperty:!1,address:i}}throw Error("Failed to create property")}catch(e){throw console.error("Error adding property:",e),z({variant:"destructive",title:"Error",description:"Failed to add property. Please try again."}),e}},[b,C,z]),T=(0,n.useCallback)(e=>{var t,r,o;let n=e.formatted_address||"",i=encodeURIComponent(n),a=null===(t=e.geometry)||void 0===t?void 0:t.location,c=null==C?void 0:C.id,s=(null===(o=n.match(/\b\d{5}(?:-\d{4})?\b/g))||void 0===o?void 0:null===(r=o.pop())||void 0===r?void 0:r.slice(0,5))||"",p=e=>{let t=Promise.reject(Error(e));return t.catch(()=>{}),{propertyId:i,address:n,ready:t}};if(!b||!c||!n||!a)return p("Missing required information to create the property.");if(!s)return p("Could not find a ZIP code in this address.");let f=(0,m.x)("startPropertyCreation"),h=(0,d.getFirestore)(),g=(0,l.V1)((0,l.$C)(),"createOrganizationProperty"),y=a.lat(),v=a.lng(),w=g({organizationId:c,address:n,zipCode:s,lat:y,long:v,createdBy:{uid:b.uid,name:b.email||"Unknown"}}),k=new Promise((e,t)=>{let r=!1,o=null,n=Date.now(),a=e=>{r||(r=!0,o&&clearTimeout(o),e())};w.then(r=>{var o;return(null===(o=r.data)||void 0===o?void 0:o.success)?a(()=>e(r.data.propertyId||i)):a(()=>t(Error("Could not create the property.")))},e=>a(()=>t(e)));let l=(0,d.doc)(h,"organizations",c,"properties",i,"metadata","info"),s=async()=>{if(!r){try{if((await (0,d.getDoc)(l)).exists()){a(()=>e(i));return}}catch(e){}if(Date.now()-n>25e3){a(()=>t(Error("The property is taking too long to create. Please try again.")));return}o=setTimeout(s,400)}};o=setTimeout(s,400)});k.then(async e=>{f.mark("property exists");let t=new Date().toISOString(),r={id:e,address:n,zipCode:s,lat:y,long:v,mainphoto:"",timestamp:t,createdBy:{uid:b.uid,name:b.email||"Unknown"},createdAt:t,updatedBy:{uid:b.uid,name:b.email||"Unknown"},updatedAt:t,photos:[],files:[]};D(t=>t.some(t=>t.id===e)?t:[r,...t]),B.setQueryData(["properties",c,b.uid],t=>t&&!t.some(t=>t.id===e)?[r,...t]:t),(0,u.rt)(c,b.uid,["properties"]);try{let t=await (0,d.getDoc)((0,d.doc)(h,"organizations",c,"folder-configs","property-cloud")),r=t.exists()&&t.data().folders||[];if(r.length>0){let t=(0,d.collection)(h,"organizations",c,"properties",e,"files"),o=await (0,d.getDocs)((0,d.query)(t,(0,d.where)("type","==","folder"),(0,d.where)("parentId","==",null))),n=new Set(o.docs.map(e=>e.data().name)),i=(0,d.writeBatch)(h),a=0;for(let e of r)!n.has(e)&&(i.set((0,d.doc)(t),{name:e,type:"folder",createdAt:Date.now(),createdBy:{name:b.displayName||b.email||"Unknown User",uid:b.uid},parentId:null}),a++);a>0&&await i.commit()}}catch(e){console.error("Error creating Property Cloud folders for the new property:",e)}}).catch(()=>{});let I=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;try{let t=await (0,d.getDoc)((0,d.doc)(h,"organizations",c,"properties",e)),r=t.exists()?t.data().mainphoto:void 0;if(r){let t=t=>t.id===e?{...t,mainphoto:r}:t;D(e=>e.map(t)),B.setQueryData(["properties",c,b.uid],e=>null==e?void 0:e.map(t));return}}catch(e){}t<5&&setTimeout(()=>void I(e,t+1),5e3)};return w.then(()=>{f.mark("callable finished (enrichment)"),f.done(i),(0,u.rt)(c,b.uid,["properties"]),k.then(e=>I(e)).catch(()=>{})}).catch(e=>{f.done("callable failed"),console.error("createOrganizationProperty failed:",e)}),{propertyId:i,address:n,ready:k}},[b,null==C?void 0:C.id,B]),j=(0,n.useCallback)(()=>{!b||Date.now()-v<6e4||(v=Date.now(),(0,l.V1)((0,l.$C)(),"createOrganizationProperty")({}).catch(()=>{}))},[b]),N=(0,n.useCallback)(async(e,t)=>{if(!b||!(null==C?void 0:C.id))return z({variant:"destructive",title:"Error",description:"Organization information is missing."}),!1;if("admin"!==k)return z({variant:"destructive",title:"Permission Denied",description:"Only admins can ".concat(t?"archive":"restore"," properties.")}),!1;let r=C.id,o=b.displayName||b.email||"Unknown user";try{return await h((0,d.getFirestore)(),r,e.id,t,{uid:b.uid,name:o}),(0,g.rf)(r,t?"property_archived":"property_restored",{id:b.uid,name:o,email:b.email||void 0},{address:e.address,propertyId:e.id}),t&&(D(t=>t.filter(t=>t.id!==e.id)),B.setQueryData(["properties",r,b.uid],t=>null==t?void 0:t.filter(t=>t.id!==e.id))),await (0,u.rt)(r,b.uid,["properties"]),B.invalidateQueries({queryKey:["properties",r]}),B.invalidateQueries({queryKey:["property",e.id]}),z({title:"Success",description:t?"Property has been archived successfully.":"Property has been restored successfully."}),!0}catch(e){return console.error("Error ".concat(t?"archiving":"restoring"," property:"),e),z({variant:"destructive",title:"Error",description:"Failed to ".concat(t?"archive":"restore"," property. Please try again.")}),!1}},[b,null==C?void 0:C.id,k,B,z]),O=(0,n.useCallback)(e=>
1N(e,!0),[N]),R=(0,n.useCallback)(e=>N(e,!1),[N]),L=(0,n.useCallback)(async(e,t)=>{if(!(null==C?void 0:C.id)||!(null==b?void 0:b.uid))return;let r=encodeURIComponent(e),o=b.uid,n=B.getQueryData(P),i=r=>null==r?void 0:r.map(r=>{var n;if(r.address!==e)return r;let i={...null!==(n=r.userStars)&&void 0!==n?n:{}};return t?delete i[o]:i[o]=!0,{...r,userStars:i}});B.setQueryData(P,i),D(e=>{var t;return null!==(t=i(e))&&void 0!==t?t:e});try{let e=(0,d.getFirestore)(),n=(0,d.doc)(e,"organizations",C.id,"properties",r);t?await (0,d.updateDoc)(n,{["userStars.".concat(o)]:(0,d.deleteField)()}):await (0,d.updateDoc)(n,{["userStars.".concat(o)]:!0})}catch(e){console.error("[Properties] toggleStar failed, rolling back:",e),B.setQueryData(P,n),D(I),z({variant:"destructive",title:"Star failed",description:"Could not toggle star — please try again."})}},[null==C?void 0:C.id,null==b?void 0:b.uid,I,B,P,z]),F=(0,n.useCallback)(async e=>{if(!b||!(null==C?void 0:C.id))return null;try{var t;let r=I.find(t=>t.id===e);if(r&&r.photos.length>0)return r;let o=(0,d.getFirestore)(),[n,i,a,l]=await Promise.all([(0,d.getDoc)((0,d.doc)(o,"organizations",C.id,"properties",e)),"admin"!==k?(0,d.getDoc)((0,d.doc)(o,"organizations",C.id,"properties",e,"permissions",b.uid)):Promise.resolve(null),(0,d.getDocs)((0,d.collection)(o,"organizations",C.id,"properties",e,"photos")),(0,d.getDocs)((0,d.collection)(o,"organizations",C.id,"properties",e,"files"))]);if(!n.exists())return console.error("Property ".concat(e," not found")),null;let c=n.data();if(!0===c.isArchived)return null;if(!("admin"===k||(null===(t=c.createdBy)||void 0===t?void 0:t.uid)===b.uid||i&&i.exists()))return console.error("User doesn't have access to property ".concat(e)),null;let s=a.docs.filter(e=>"info"!==e.id&&".info"!==e.id).map(e=>({id:e.id,...e.data()})),u=l.docs.filter(e=>"info"!==e.id&&".info"!==e.id).map(e=>({id:e.id,...e.data()})),p={id:e,address:c.address,zipCode:c.zipCode||"",lat:c.lat||0,long:c.long||0,mainphoto:c.mainphoto||"",timestamp:c.timestamp||"",createdBy:c.createdBy||{uid:"unknown",name:"Unknown"},createdAt:c.createdAt||"",updatedBy:c.updatedBy||c.createdBy||{uid:"unknown",name:"Unknown"},updatedAt:c.updatedAt||c.createdAt||"",isArchived:c.isArchived||!1,photos:s,files:u};return D(t=>t.map(t=>t.id===e?p:t)),p}catch(t){return console.error("Error fetching property details for ".concat(e,":"),t),null}},[b,null==C?void 0:C.id,k,I]),M=null!==(t=(0,i.usePathname)())&&void 0!==t?t:"",_=y.some(e=>M===e||M.startsWith(e+"/"));return(0,n.useEffect)(()=>{!_&&b&&(null==C?void 0:C.id)&&0===I.length&&U()},[b,null==C?void 0:C.id,I.length,U,_]),(0,n.useEffect)(()=>{let e=e=>{let{types:t}=e.detail;t.includes("properties")&&(S.current=!1,(0,p.E)(),U())};return window.addEventListener(u.pZ,e),()=>window.removeEventListener(u.pZ,e)},[U]),(0,n.useEffect)(()=>{b&&(null==C?void 0:C.id)||D([])},[b,null==C?void 0:C.id]),(0,o.jsx)(w.Provider,{value:{properties:I,isLoading:A,fetchProperties:U,addProperty:x,startPropertyCreation:T,prewarmPropertyCreation:j,archiveProperty:O,restoreProperty:R,fetchPropertyDetails:F,toggleStar:L},children:r})}function k(){let e=(0,n.useContext)(w);if(void 0===e)throw Error("useProperties must be used within a PropertiesProvider");return e}},55753:function(e,t,r){r.d(t,{cn:function(){return i}});var o=r(61994),n=r(53335);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.m6)((0,o.W)(t))}},9008:function(e,t,r){r.d(t,{E:function(){return d},h:function(){return i}});let o=null,n="";async function i(e,t,r,i,d){let l="".concat(e,":").concat(t,":").concat(i||"",":").concat(d||"all");if(o&&n===l)return console.log("[BatchLoader] Dedup HIT — reusing in-flight batch request"),o;console.log("[BatchLoader] Initiating new batch request, filterByUserId:",i||"none","filterMode:",d||"all"),console.time("[BatchLoader] total");let c=a(e,t,r,i,d);return o=c,n=l,c.finally(()=>{setTimeout(()=>{o===c&&(o=null,n="")},1e4)}),c}async function a(e,t,r,o,n){var i,a,d,l,c,s,u,p;let f="/api/data/batch?orgId=".concat(e).concat(o?"&filterByUserId=".concat(o):"").concat(n?"&filterMode=".concat(n):""),m=await fetch(f,{headers:{Authorization:"Bearer ".concat(r)}});if(!m.ok){let e=await m.text().catch(()=>"");throw console.timeEnd("[BatchLoader] total"),Error("Batch API error ".concat(m.status,": ").concat(e))}let h=await m.json();return console.timeEnd("[BatchLoader] total"),console.log("[BatchLoader] Received: "+"".concat(null!==(c=null===(i=h.properties)||void 0===i?void 0:i.length)&&void 0!==c?c:0," properties, ")+"".concat(null!==(s=null===(a=h.intakes)||void 0===a?void 0:a.length)&&void 0!==s?s:0," intakes, ")+"".concat(null!==(u=null===(d=h.contracts)||void 0===d?void 0:d.length)&&void 0!==u?u:0," 
1contracts, ")+"".concat(null!==(p=null===(l=h.projects)||void 0===l?void 0:l.length)&&void 0!==p?p:0," projects")+(h.userBreakdown?" (with user breakdown, role: ".concat(h.filterUserRole,")"):"")),h}function d(){o=null,n=""}},32352:function(e,t,r){r.d(t,{LJ:function(){return d},pZ:function(){return i},rt:function(){return l}});var o=r(61466);let n=["properties","intakes","contracts","projects"],i="data-cache-invalidated",a="dataCacheInvalidatedAt";function d(e){try{let t=JSON.parse(window.sessionStorage.getItem(a)||"{}")[e];if("number"==typeof t&&Date.now()-t<9e4)return"no-store"}catch(e){}return"default"}async function l(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;try{var d;let t=(0,o.getAuth)(),n=await (null===(d=t.currentUser)||void 0===d?void 0:d.getIdToken());n&&await fetch("/api/data/invalidate",{method:"POST",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"},body:JSON.stringify({orgId:e,types:r})})}catch(e){console.warn("[CacheInvalidation] Failed to clear Redis:",e)}!function(e){try{let t=JSON.parse(window.sessionStorage.getItem(a)||"{}");for(let r of e)t[r]=Date.now();window.sessionStorage.setItem(a,JSON.stringify(t))}catch(e){}}(r),window.dispatchEvent(new CustomEvent(i,{detail:{types:r}})),console.log("[CacheInvalidation] Invalidated ".concat(r.join(", ")," for user ").concat(t))}},16895:function(e,t,r){r.d(t,{HY:function(){return C},JF:function(){return d},Nk:function(){return k},So:function(){return b},Yo:function(){return w},bV:function(){return v},dW:function(){return y},gI:function(){return g},gc:function(){return c},kV:function(){return o},mT:function(){return p},qi:function(){return l},s4:function(){return s},vk:function(){return a}});let o=10,n=new Set(["localhost","127.0.0.1","[::1]"]),i=["light","dark","auto"];function a(e){return i.includes(e)?e:"auto"}let d=[640,840,1080],l=320,c=1600,s=840,u=["center","left"],p=32;function f(e){if("full"===e)return"full";let t=Math.round(Number(e));return Number.isFinite(t)?Math.max(l,Math.min(c,t)):s}function m(e){return u.includes(e)?e:"center"}function h(e){let t=Math.round(Number(e));return Number.isFinite(t)?Math.max(0,Math.min(p,t)):14}function g(e){let t;if("string"!=typeof e)return null;let r=e.trim();if(!r||/[\s'"\\<>]/.test(r)||r.startsWith("//"))return null;if(r.startsWith("/"))return r;try{t=new URL(r)}catch(e){return null}if(t.username||t.password)return null;let o=t.hostname.toLowerCase();if(!o)return null;let i=n.has(o);return("https:"===t.protocol||"http:"===t.protocol&&i)&&(i||o.includes("."))?t.toString():null}let y={embedEnabled:!1,allowedEmbedOrigins:[],embedTheme:"auto",embedWidth:840,embedAlign:"center",embedRadius:14,embedRedirectUrl:null};function v(e){let t;if("string"!=typeof e)return null;let r=e.trim();if(!r||/[\s;,'"\\<>]/.test(r)||"*"===r||"*.*"===r)return null;let o=!1,i=r.match(/^([a-z][a-z0-9+.-]*:\/\/)/i),a=i?i[1]:"",d=r.slice(a.length);if(d.startsWith("*.")){if(o=!0,!(d=d.slice(2)))return null;r="".concat(a).concat(d)}let l=/^[a-z][a-z0-9+.-]*:\/\//i.test(r)?r:"https://".concat(r);try{t=new URL(l)}catch(e){return null}if(t.username||t.password)return null;let c=t.hostname.toLowerCase();if(!c)return null;let s=n.has(c);if("https:"!==t.protocol&&!("http:"===t.protocol&&s)||!s&&!c.includes(".")||o&&c.split(".").length<2)return null;let u=t.origin.toLowerCase();return"null"===u?null:o?u.replace("://","://*."):u}function w(e){let t=null!=e?e:{};return{embedEnabled:!0===t.embedEnabled,allowedEmbedOrigins:function(e){let t=Array.isArray(e)?e:"string"==typeof e?e.split(/[\n,]/):[],r=new Set;for(let e of t){let t=v(e);if(t&&!r.has(t)&&(r.add(t),r.size>=o))break}return Array.from(r)}(t.allowedEmbedOrigins),embedTheme:a(t.embedTheme),embedWidth:void 0===t.embedWidth?s:f(t.embedWidth),embedAlign:m(t.embedAlign),embedRadius:void 0===t.embedRadius?14:h(t.embedRadius),embedRedirectUrl:g(t.embedRedirectUrl)}}function b(e){return(null==e?void 0:e.requirePassword)?{eligible:!1,reason:"Password-protected links can't be embedded."}:{eligible:!0}}function k(e){let{baseUrl:t,shareId:r,shareToken:o,theme:n="auto",width:i=s,align:d="center",radiu
1s:l=14}=e,c=t.replace(/\/+$/,""),u=new URLSearchParams({shareId:r,token:o,theme:a(n),width:String(f(i)),align:m(d),radius:String(h(l))});return"".concat(c,"/intake/embed/preview-host?").concat(u.toString())}function C(e){var t;let{baseUrl:r,fallbackHeight:o=1400,width:n=s,align:i="center",radius:d=14}=e,l=r.replace(/\/+$/,""),c=(function(e){let{baseUrl:t,shareId:r,shareToken:o,theme:n="auto"}=e,i=t.replace(/\/+$/,"");return"".concat(i,"/intake/embed/").concat(encodeURIComponent(r))+"?token=".concat(encodeURIComponent(o),"&theme=").concat(a(n))})(e).replace(/&/g,"&amp;"),u=f(n),p=h(d),g=(t=m(i),["full"===u?null:"max-width:".concat(u,"px"),"center"===t?"margin:0 auto":"margin:0"].filter(Boolean).join(";"));return{script:["<div data-drodat-form",'     data-src="'.concat(c,'"'),...14===p?[]:['     data-radius="'.concat(p,'"')],'     style="'.concat(g,'"></div>'),'<script async src="'.concat(l,'/embed/v1"></script>')].join("\n"),iframe:['<iframe src="'.concat(c,'"'),'        style="width:100%;'.concat(g,";height:").concat(o,"px;border:0;border-radius:").concat(p,'px"'),'        loading="lazy" referrerpolicy="strict-origin-when-cross-origin"','        title="Intake form"></iframe>'].join("\n")}}},72166:function(e,t,r){r.d(t,{x:function(){return n}});let o={mark:()=>{},done:()=>{}};function n(e){if(!function(){try{return"1"===window.localStorage.getItem("drodat:creationTiming")}catch(e){return!1}}())return o;let t=performance.now(),r=t,n=[];return{mark(e){let o=performance.now();n.push({step:e,ms:Math.round(o-r),atMs:Math.round(o-t)}),r=o},done(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"done",o=Math.round(performance.now()-t),i=n.map(e=>"".concat(e.step," ").concat(e.ms,"ms")).join(" | ");console.info("[creation-timing] ".concat(e,": ").concat(r," in ").concat(o," ms :: ").concat(i))}}}},93448:function(e,t,r){r.d(t,{cn:function(){return i}});var o=r(61994),n=r(53335);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.m6)((0,o.W)(t))}},64142:function(e,t,r){r.d(t,{rf:function(){return i},z7:function(){return d}});var o=r(56943),n=r(34621);async function i(e,t,r,i,a){try{let d=(0,o.collection)(n.db,"organizations",e,"orgActivities");await (0,o.addDoc)(d,{organizationId:e,projectId:(null==a?void 0:a.projectId)||"",projectTitle:(null==a?void 0:a.projectTitle)||"",projectAddress:(null==a?void 0:a.projectAddress)||"",type:t,createdAt:o.Timestamp.now(),user:r,metadata:i||{}})}catch(e){console.error("Error logging org activity:",e)}}function a(e){return{id:e.id,...e.data()}}function d(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{limitCount:r=30,userId:i,projectId:a,activityTypes:d}=t,l=(0,o.collection)(n.db,"organizations",e,"orgActivities"),c=[(0,o.orderBy)("createdAt","desc")];return i&&c.push((0,o.where)("user.id","==",i)),a&&c.push((0,o.where)("projectId","==",a)),d&&d.length>0&&d.length<=30&&c.push((0,o.where)("type","in",d)),c.push((0,o.limit)(r)),(0,o.query)(l,...c)}(e,r);return(0,o.onSnapshot)(i,e=>{t(e.docs.map(a))},e=>{console.error("Error in org activity subscription:",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.