1import{a as Te,d as vs,e as We,ak as Ge,f as Et,c as A,g as a,h as n,Y as s,G as p,t as o,H as f,I as j,al as h,aq as q,i as e,q as Q,x as ke,aG as Xs,aJ as xt,P as Fe,o as dt,az as qe,b2 as Pe,Z as zt,a_ as Qs,s as Wt,B as Js,y as en,ac as tn,b as is,k as sn,ad as nn,am as rt,a9 as ye,aj as on}from"./B6nVQaMA.js";import{u as an,a as ln,b as rn,c as un,O as cs,d as cn,e as dn,A as Ut,i as mn,f as pn,l as bn,M as _n,g as yn,h as hn,j as kn}from"./dealScreenUpload-DD4Gd2Paj.js";import{u as fn}from"./useAttachFile-By7lWgGt8.js";import{u as Yt}from"./useMobileShell-BFxR5JoOt.js";import{u as vn,a as gn}from"./userPresetUpsert-BMnK4Lspg.js";import{u as $n,l as Sn,m as wn,n as xn,q as Cn,r as On,t as Nn,U as An,v as Tn,x as En,i as Mn}from"./useWorkflows-B4TRugYJ5.js";import{r as In,j as ds,f as Ln}from"./workflowRun-DOgMW06Fh.js";import{u as Dn,A as jn,o as Bn,g as Vt,c as Fn,b as ut,d as qn,l as Pn,e as Se,h as Rn}from"./OutputViewer-DLYb3rkDj.js";import"./lodash-C5hb1S-ZT.js";import"./useBackStep-BYmpeLQIp.js";import"./productLabel-DwRxDJ7Td.js";import"./roomTaskState-zqR2e96DS.js";import"./useHome2-DM811JDug.js";import"./useDataSources-CrwGcps7u.js";import"./dataCatalog-DLjoa8ZMJ.js";import"./conversationCreate-HxBhvD6om.js";import"./roomKey-D_gABIijZ.js";import"./useCreditsRefusal-BXcq0mexc.js";import"./useSelfServeBilling-yorGrXXFz.js";import"./useRunStartGate-CUpwkXTnk.js";import"./useShellRooms-DpkQBr7Nx.js";import"./conversationsRoomsList-DdOvvlTWu.js";import"./ledgerRun-zxfcQwH0y.js";import"./intlCache-BH4qR28Bm.js";import"./reportsTime-C7nPDpVWh.js";import"./usersTaskLedger-SkuDUR-a8.js";import"./PaneDeck-CPtD0p2wj.js";import"./useRunSurfaceState-D9hNY5epC.js";import"./useDeckArrangement-BeVKG5KrJ.js";import"./useCanvasArrangement-D5m5lmxUs.js";import"./deckBuilder-DwPEenGTb.js";import"./deckCover-BrJc8hLn4.js";import"./slideCurrency-Dizb9Uft3.js";import"./buyerListName-C_Y7RJ5BP.js";import"./deliverCatalog-CTQWlOhJo.js";import"./canvasBlockSlide-BVNBh4qm4.js";import"./canvasToBovRow-dXSaX_reU.js";import"./_registerPrice-bw_u6cXYR.js";import"./shelf-Bt8dDdVaS.js";import"./deckThemes-DIhx4yToX.js";import"./useDeckFrames-BJGfX7zX1.js";import"./PaneExcel-l1nWIsqaA.js";import"./ExcelLiveEditor-C4btlhJpq.js";import"./liveWorkbookOpen-BV-O9VPIX.js";import"./liveWorkbookExport-BhwmO5H7Q.js";import"./useExcelLivePrompt-CgExaXKCo.js";import"./xleWaiting-T9vdCoXYn.js";import"./cellAddress-WmG5edBi4.js";import"./conversationsReportsExcelWorkbook-DeUQYDQ04.js";import"./useExcelBuildStatus-BY1ZB-hje.js";import"./useDeckComments-CCORjbh-1.js";import"./dealDocumentFile-CDese9oya.js";import"./dealDocument-C6-PHyZse.js";import"./useDealGrid-GPk_sulmZ.js";import"./dryReportProducts-BL6tZXpBb.js";import"./useScoutShortlist-CJbdiRpmb.js";import"./multiple-V-2mxn079.js";import"./fileSave-De0y_PEuy.js";import"./conversationsRoomState-CaRHMkRlw.js";import"./roomStatePublishedPage-CS8Gk-O1V.js";import"./shelfEntries-CLmV5WUVj.js";import"./resultsToc-Guoibeed0.js";import"./compsMapModel-YHRYgVkxl.js";import"./compsMapPanel-CE3SA1pi9.js";import"./subjectPoint-GBM5jLAxU.js";import"./shelfContent-DLuxy3H0I.js";import"./memoModel-DNpfJDsu8.js";import"./onlyFacts-Buiq07Blc.js";import"./scoutSurface-CYK6GucBO.js";import"./httpUrl-Dplvx7SZi.js";import"./usePresentations-DbdqDwnZk.js";import"./conversationsRoomPresentations-By9G86zM7.js";import"./userPresentations-B9gay-4yP.js";const Ht=t=>{const l=String((t==null?void 0:t.sheet)||"").trim(),i=String((t==null?void 0:t.cell)||"").trim();return!l||!i?"":`${/^[A-Za-z_][A-Za-z0-9_.]*$/.test(l)?l:`'${l.replace(/'/g,"''")}'`}!${i}`},Zt=t=>{if(!t)return"";const l=Ht(t),i=[l||String(t.sheet||"").trim()||(t.page?`p.${t.page}`:null),t.section||null,l?null:t.cell||null,t.suite?`suite ${t.suite}`:null,!l&&(t.line===0||t.line)?`line ${t.line}`:null].filter(Boolean).join(" · ");return[t.document,i].filter(Boolean).join(" ")},ms=t=>{if(!t)return"";const l=Zt(t);return t.kind==="computed"&&t.page?`our calculation · base ${l}`:l},Ae=t=>{var r;if(!t)return"";if(t.computed)return t.basis||"from the documents";const l=Zt(t.source||{}),i=(r=t.source)==null?void 0:r.quote;return i?`${l} â â${i}â`:l},gs=t=>t!=null&&t!==""&&Number.isFinite(Number(t)),te=t=>{if(!gs(t))return"â";const l=Math.abs(Math.round(Number(t)));return`${Number(t)<0&&l>0?"â":""}
1$${l.toLocaleString("en-US")}`},xe=(t,l=1)=>{if(!gs(t))return"â";const i=Math.abs(Number(t)).toFixed(l);return`${Number(t)<0&&Number(i)>0?"â":""}${i}%`},ps=t=>{if(!t)return"";if(t.kind==="computed")return`our calculation â ${t.quote||t.doc||""}`.trim();if(t.kind==="absent")return`${t.doc?`${t.doc}: `:""}not in the document${t.quote?` â ${t.quote}`:""}`;const l=Ht(t),i=[t.suite?`suite ${t.suite}`:null,!l&&(t.line===0||t.line)?`line ${t.line}`:null].filter(Boolean).join(" · "),r=[t.doc,[l||t.where,i].filter(Boolean).join(" · ")].filter(Boolean).join(" ");return t.quote?`${r} â â${t.quote}â`:r},Un=t=>{if(!t)return null;const l=t.summary||{},i=(t.findings||[]).filter(d=>d.severity!=="note").map(d=>{var b,O;return{code:d.code,title:d.title||d.code,a:{value:(b=d.a)==null?void 0:b.value,label:ps(d.a),cite:d.a||null},b:{value:(O=d.b)==null?void 0:O.value,label:ps(d.b),cite:d.b||null},diff:d.diff,diffPct:d.diff_pct,unit:d.unit||"",flattersOm:d.flatters_om===!0,valueEffect:d.value_effect,reason:d.reason||"",question:d.question||""}}),r=(t.not_checked||[]).map(d=>String(d||"").trim()).filter(Boolean),_=Array.isArray(l.flattering_bases)?l.flattering_bases.map(String):[];return{headline:l.headline||"",dressedUp:l.systematic===!0,flatteringBases:_,findings:i,notChecked:r}},$s={pass:"Pass",fail:"Fail",no_data:"Not in the documents",not_set:"Not set",not_applicable:"Not applicable",manual:"Check by reading"},Vn=t=>(t==null?void 0:t.state)==="no_data"&&(t!=null&&t.display)?"Not judged":$s[t==null?void 0:t.state],bs=t=>{const l=Array.isArray(t)?t[0]:t,i=typeof l=="string"?l.trim():"";return i&&i.length<=80&&i.toLowerCase()!=="default"?i:null},_s=(t,l)=>l?{...t,buyBoxProfileKey:l}:t,At=t=>t&&typeof t=="object"?Object.fromEntries(Object.entries(t).filter(([,l])=>l!=null&&l!=="")):{roomRunId:t},Wn=["sale_price","assessed_value","market_value","rent"],Gn=t=>{var r,_;if(!t||!((r=t.figures)!=null&&r.length||(_=t.not_found)!=null&&_.length))return null;const l=d=>d.value==null?"â":Wn.includes(d.key)?te(d.value):d.key==="cap_rate"?xe(d.value,2):String(d.value),i=d=>d.as_of?d.as_of_basis==="retrieved"?`retrieved ${d.as_of}`:`as of ${d.as_of}`:"";return{figures:(t.figures||[]).map(d=>({key:d.key,label:d.label||d.key,value:l(d),source:d.source||d.source_key||"",when:i(d)})),gaps:(t.not_found||[]).map(d=>({what:d.what||d.key,reason:d.reason||""})),note:t.note||""}},Ct=(t,l,i)=>`${Number(t).toLocaleString("en-US",{maximumFractionDigits:1})} ${Number(t)===1?l:i}`,Kn={$:t=>te(t),"$/yr":t=>`${te(t)} a year`,"%":t=>xe(t,2),years:t=>Ct(t,"year","years"),SF:t=>Ct(t,"SF","SF"),units:t=>Ct(t,"unit","units"),suites:t=>Ct(t,"suite","suites")},zn=/(\d+\.\d{8,})(?!\d)/g,Yn=/^ [A-Z][A-Za-z &/,.()'-]*? (?:(?:19|20)\d\d(?![\d,.]) [-â]?\$?\d|[-â]?(?:\$\d|(?!(?:19|20)\d\d(?![\d,.]))\d))/,Hn=(t,l,i,r)=>l===0||/;\s$/.test(t.slice(0,l))||/(?::|\+|â|\bTotal for)\s$/.test(t.slice(0,l))&&i.length<=6&&Yn.test(r),Ss=t=>String(t!=null?t:"").replace(/\s+/g," ").trim().replace(/^\d{3,6}\.\d{3,4}\s*,\s*/,"").replace(zn,l=>{const i=Number(l).toFixed(2);return i.endsWith(".00")?i.slice(0,-3):i}).replace(/(^|[^\d,.$#/A-Za-z-])(-?)(\d{4,}\.\d+|\d{5,})(?![\d,-]|\.\d)/g,(l,i,r,_,d,b)=>{if(!_.includes(".")&&!r&&Hn(b,d+i.length,_,b.slice(d+l.length))&&/^ [A-Za-z]/.test(b.slice(d+l.length)))return l;const[O,v]=Number(_).toFixed(2).split(".");return`${i}${r}${O.replace(/\B(?=(\d{3})+(?!\d))/g,",")}${v==="00"?"":`.${v}`}`}).replace(/([A-Za-z)] -?\d{1,3})\.00?(?=;|$)/g,"$1"),Ot=t=>{if(!t)return"";if(t.kind==="computed"||!t.kind&&t.where==="computed")return`our calculation${t.doc?` from ${t.doc}`:""}${t.quote?` â ${t.quote}`:""}`;if(t.kind==="absent")return`${t.doc?`${t.doc}: `:""}not in the document${t.quote?` â ${t.quote}`:""}`;const l=[t.doc,Ht(t)||t.where].filter(Boolean).join(" ");return t.quote?`${l} â â${Ss(t.quote)}â`:l},Zn=t=>{if(!t)return null;const l=b=>(Kn[b.unit]||(O=>Number(O).toLocaleString("en-US",{maximumFractionDigits:2})))(b.value),i=t.email||{},r=(b,O)=>O?{...b,status:O}:b,_=t.ledger&&typeof t.ledger=="object"?t.ledger:null,d={rankedBy:t.ranked_by||"",figures:(t.figures||[]).map(b=>{var O,v;return r({key:b.key,label:b.label,value:l(b),source:Ot(b.source),computed:/computed|÷/.test(`${((O=b.source)==null?void 0:O.where)||""} ${((v=b.source)==null?void 0:v.quote)||""}`),om:b.om?r({value:l({...b,value:b.om.value}),source:Ot(b.om),cite:b.om},b.om.status):null,cite:b.source||null},b.status)}),discrepancies:(t.discrepancies||[]).map(b=>{const O=(b.citations||[]).map($=>typeof $=="string"?{text:$,status:null,cite:null}:{text:Ot($),status:$&&$.status||null,cite:$&&typeof $=="object"?$:null}).filter($=>
1$.text),v={rank:b.rank,code:b.code,headline:b.headline||b.title,text:b.text||"",impact:b.impact||"",question:b.question||"",citations:O.map($=>$.text)};return O.some($=>$.status)&&(v.citationStatuses=O.map($=>$.status)),v.sources=O.map($=>({label:$.text,cite:$.cite})),v.also=(b.also||[]).map($=>({headline:$.headline||"",citations:($.citations||[]).map(E=>typeof E=="string"?E:Ot(E)).filter(Boolean)})).filter($=>$.headline),v}),missing:(t.missing||[]).map(b=>({what:b.what,ask:b.ask})),notChecked:(t.not_checked||[]).map(b=>String(b||"").trim()).filter(Boolean),email:{subject:i.subject||"",body:i.body||"",questions:(i.questions||[]).length},buyBox:t.buy_box?{headline:t.buy_box.headline,criteria:t.buy_box.criteria||[]}:null,readFrom:Jn(t.figures),hasOm:!(t.missing||[]).some(b=>/^No offering memorandum/.test(b.what||""))};return d.disagreeHeading=d.hasOm?"Where the OM and the documents disagree":"Where the documents disagree",_&&(d.ledger={numbers:Number(_.numbers)||0,sourced:Number(_.sourced)||0,documented:Number(_.documented)||0,found:Number(_.found)||0,byStatus:_.by_status||{}}),d},Xn={FACT:{label:"In your documents",tone:""},DERIVED:{label:"Our calculation",tone:""},CONFLICT:{label:"Documents disagree",tone:"warn"},MISSING:{label:"Not in the package",tone:"warn"},STATED:{label:"You told us",tone:"muted"},ASSUMED:{label:"Our reading",tone:"muted"},FOUND:{label:"Outside source",tone:"warn"}},Be=t=>Xn[t]||null,Qn=(t,{defaultBuyBox:l=!1}={})=>{if(!t)return null;const i=t.byStatus||{},r=[`${t.documented} of ${t.numbers} numbers trace to your documents`];return Number(i.MISSING)>0&&r.push(`${i.MISSING} not in the package`),Number(i.STATED)>0&&r.push(l?`${i.STATED} default criteria (not set by you)`:`${i.STATED} you told us`),{text:r.join(" · "),warn:t.numbers-t.sourced>0||t.found>0}},Jn=t=>{const l=[],i=r=>{const _=String(r||"").trim();!_||l.some(d=>d===_||d.startsWith(`${_} `))||l.push(_)};return(t||[]).forEach(r=>{const _=r&&r.source;if(!_||!_.doc)return;const d=_.where==="computed";String(_.doc).split(" + ").forEach(b=>{const O=!d&&/^p\.?\s*\d/.test(String(_.where||""))&&!/\bp\.\s*\d/.test(b);i(O?`${b} ${_.where}`:b)})}),l},eo=t=>!t||!t.sentence?null:{status:String(t.status||""),sentence:t.sentence,costarPrompt:t.costar_prompt||"",notLocated:String(t.status)==="not_located",noStreetAddress:String(t.status)==="no_street_address"},to=t=>{var d;const l=Number(t.units);if(!(l>0))return null;const i=`${l.toLocaleString("en-US")} ${l===1?"unit":"units"}`,r=t.units_from;if(r&&String(r.quote||"").trim())return r.page?`${i} (OM p.${r.page})`:i;const _=String(t.quote||((d=t.source)==null?void 0:d.quote)||"");return new RegExp(`(?<![\\d,.])${Math.round(l)}(?![\\d,])`).test(_)?i:null},so=t=>{if(!t)return null;const l=[],i=to(t);return i&&l.push(i),Number(t.sf)>0&&l.push(`${Math.round(Number(t.sf)).toLocaleString("en-US")} SF`),l.length?{text:l.join(" · "),source:Ae(t)}:null},Tt=t=>{if(!t||typeof t!="object")return"";for(const l of Object.values(t)){const i=l&&l.source&&l.source.as_of;if(i)return String(i)}return""},no=t=>{var i;if(!t)return{ok:!1,text:"No response â nothing was started."};if((i=t.errors)!=null&&i.length)return{ok:!1,text:t.errors.join(" ")};const l=t.address||"this deal";return t.marketEnabled?t.started?{ok:!0,text:`Looking up open sources around ${l}. What is found appears below in its own section, apart from your documents' figures.`}:{ok:!1,text:`The market lookup for ${l} could not be started â try again in a minute.`}:{ok:!1,text:`The market lookup is switched off here â nothing will run for ${l}.`}},oo=t=>!t||!t.sentence?null:{status:String(t.status||""),sentence:String(t.sentence),none:t.status==="none_here"},ao=t=>{const l=[];t.effective_rent_psf_annual!=null&&l.push(`effective $${Number(t.effective_rent_psf_annual).toFixed(2)}/SF/yr`),t.ti_allowance_psf!=null&&l.push(`TI $${Number(t.ti_allowance_psf).toFixed(2)}/SF`);const i=t.escalation||{};return i.pct_per_year!=null?l.push(`escalation ${Number(i.pct_per_year).toFixed(1)}%/yr`):i.usd_psf_per_year!=null&&l.push(`escalation $${Number(i.usd_psf_per_year).toFixed(2)}/SF/yr`),l},lo=t=>{if(!t||!Array.isArray(t.rows)||!t.rows.length)return null;const l=r=>r==null?"â":`$${Number(r).toFixed(2)}/SF/yr`,i=(r,_)=>r||_?`${r||"â¦"} â ${_||"â¦"}`:"â";return{heading:t.heading||"Your comps base",source:t.source||"",note:[t.unpriced_note,t.rent_types_note,t.dated_note].filter(
1Boolean).join(" "),rows:t.rows.map((r,_)=>r.kind==="sale"?{key:`${r.address||""}|sale|${_}`,place:r.address||"â",tenant:["Sale",r.asset_class].filter(Boolean).join(" · "),sf:"â",rent:r.price_usd==null?"price not disclosed":`$${Math.round(Number(r.price_usd)).toLocaleString("en-US")}`,term:r.transacted_on?`sold ${r.transacted_on}`:"â",citation:r.citation||""}:{key:`${r.address||""}|${r.suite||""}|${_}`,place:[[r.address,r.suite?`suite ${r.suite}`:null].filter(Boolean).join(", ")||"â",r.asset_class].filter(Boolean).join(" · "),tenant:r.tenant_name||"â",sf:r.unit_sqft?Number(r.unit_sqft).toLocaleString("en-US"):"â",rent:[[l(r.rent_psf_annual),r.rent_psf_annual==null?null:r.rent_type].filter(Boolean).join(" "),...ao(r)].join(" · "),term:i(r.lease_start,r.lease_end),citation:r.citation||""})}},ro=(t,l)=>{const i=new Set(((l==null?void 0:l.criteria)||[]).map(r=>r.label));return(t||[]).filter(r=>!i.has(r.what)&&r.reason!=="Not provided")},uo=()=>{const t=Te("ds-screen",()=>null),l=Te("ds-om-grid",()=>null),i=Te("ds-status",()=>null),r=Te("ds-error",()=>""),_=Te("ds-box-profile",()=>null),d=()=>vs().$apollo.clients.default,b=async K=>{var y,M;i.value="starting",r.value="",l.value=null;try{const N=await d().mutate({mutation:dn,variables:{input:{roomRunId:K}}}),S=((y=N==null?void 0:N.data)==null?void 0:y.userDealScreenStart)||{errors:["No response"]};return(M=S.errors)!=null&&M.length?(r.value=S.errors.join(" "),i.value="error",S):(l.value=S.omGridId,t.value=S.screen,i.value="success",S)}catch(N){return We(N),r.value=(N==null?void 0:N.message)||"Request failed",i.value="error",{errors:[r.value]}}},O=async K=>{var M;const y=_s(typeof K=="object"&&K!==null?K:{roomRunId:K},_.value);try{const N=await d().query({query:cn,variables:y,fetchPolicy:"network-only",errorPolicy:"ignore"});(M=N==null?void 0:N.data)!=null&&M.userDealScreen&&(t.value=N.data.userDealScreen)}catch(N){We(N)}return t.value},v=async(K,y,M,N=null)=>{var L,Y,B;const S=_s(At(M),N);try{const D=await d().mutate({mutation:K,variables:{input:S}}),oe=((L=D==null?void 0:D.data)==null?void 0:L[y])||{errors:["No response"]};return(Y=oe.errors)!=null&&Y.length?(r.value=oe.errors.join(" "),""):((B=oe.file)==null?void 0:B.downloadUrl)||""}catch(D){return We(D),r.value=(D==null?void 0:D.message)||"Request failed",""}};return{screen:t,omGridId:l,status:i,error:r,boxProfile:_,start:b,refresh:O,uploadDeal:async K=>{var y,M;i.value="starting",r.value="";try{const N=await d().mutate({mutation:un,variables:{input:K}}),S=(y=N==null?void 0:N.data)==null?void 0:y.userDealScreenUpload;return!S||(M=S.errors)!=null&&M.length?(r.value=S?S.errors.join(" "):cs,i.value="error",null):(i.value="success",S)}catch(N){return We(N),r.value=cs,i.value="error",null}},addMarket:async K=>{var M,N;const y=At(K);try{const S=await d().mutate({mutation:rn,variables:{input:y}}),L=((M=S==null?void 0:S.data)==null?void 0:M.userDealScreenAddMarket)||{errors:["No response"]};return(N=L.errors)!=null&&N.length||await O({...y,withMarket:!0}),L}catch(S){return We(S),{errors:[(S==null?void 0:S.message)||"Request failed"]}}},rentRollXlsx:K=>v(ln,"userDealScreenRentRollXlsx",K),icMemoDocx:K=>v(an,"userDealScreenIcMemoDocx",K,_.value)}},io={class:"mdsu"},co={class:"mdsu-k"},mo=["data-slot"],po={class:"mdsu-lb"},bo={key:0,class:"mdsu-opt"},_o=["data-state"],yo={class:"mdsu-nm"},ho={key:0,class:"mdsu-st"},ko={key:1,class:"mdsu-st mdsu-ok"},fo=["onClick"],vo={key:3,class:"mdsu-st"},go=["data-action","onClick"],$o=["aria-label","onClick"],So=["multiple","onChange"],wo={key:1,class:"mdsu-lim"},xo=["aria-expanded"],Co={class:"mdsu-opt"},Oo={key:0,class:"mdsu-hint",role:"status"},No={key:1,class:"mdsu-err",role:"alert"},Ao={class:"mdsu-foot"},To=["disabled"],Eo={__name:"DealScreenUpload",props:{up:{type:Object,required:!0},starting:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["submit"],setup(t,{emit:l}){const i=t,r=l,{t:_}=Et("",{language:"en"}),{MAIN_SLOTS:d,MORE_SLOTS:b,moreOpen:O}=i.up,v=L=>_(`page.deal_screen.upload.${L}`),$=L=>_(`attach_file.upload_errors.${L}`),E=L=>L.note==="optional_several"?v("optional_several_short"):v(L.note),H=A(()=>[...d.map(L=>({kind:"slot",key:L.key,doc:L})),{kind:"limits",key:"limits"},{kind:"more",key:"more"},...O.value?b.map(L=>({kind:"slot",key:L.key,doc:L})):[]]),G=A(()=>
1i.up.launch(i.starting)),K=()=>{O.value=!O.value},y={},M=L=>{var Y;return(Y=y[L.key])==null?void 0:Y.click()},N=(L,Y)=>{var B;i.up.add(L,(B=Y.target)==null?void 0:B.files),Y.target&&(Y.target.value="")},S=(L,Y)=>{Y.action==="retry"?i.up.retry(L,Y.file):Y.action==="replace"?M(L):i.up.remove(L,Y.file)};return(L,Y)=>(n(),a("div",io,[s("span",co,o(v("documents")),1),(n(!0),a(f,null,j(e(H),B=>(n(),a(f,{key:B.key},[B.kind==="slot"?(n(),a("div",{key:0,class:"mdsu-slot","data-slot":B.doc.key},[s("span",po,[h(o(v(`slot.${B.doc.key}`))+" ",1),B.doc.note?(n(),a("span",bo,o(E(B.doc)),1)):p("",!0)]),(n(!0),a(f,null,j(t.up.chips(B.doc),(D,oe)=>(n(),a("div",{key:`${D.file.id}-${oe}`,class:q(["mdsu-chip",{"mdsu-chip--err":D.state==="error"}]),"data-state":D.state},[s("span",yo,o(D.file.name),1),D.state==="uploading"?(n(),a("span",ho,o(D.pct)+"%",1)):D.state==="ready"?(n(),a("span",ko,o(v("uploaded")),1)):D.action==="retry"?(n(),a("button",{key:2,type:"button",class:"mdsu-st mdsu-a","data-action":"retry",onClick:Z=>S(B.doc,D)},o(v("try_again")),9,fo)):(n(),a("span",vo,o($(D.errorKey)),1)),D.action!=="retry"?(n(),a("button",{key:4,type:"button",class:"mdsu-a","data-action":D.action,onClick:Z=>S(B.doc,D)},o(v(D.action)),9,go)):p("",!0)],10,_o))),128)),B.doc.multi||!t.up.chips(B.doc).length?(n(),a("button",{key:0,type:"button",class:"mdsu-dz","aria-label":`${v(`slot.${B.doc.key}`)}: ${v(B.doc.multi?"pick_many":"pick_one")}`,onClick:D=>M(B.doc)},o(v(B.doc.multi?"pick_many":"pick_one")),9,$o)):p("",!0),s("input",{ref_for:!0,ref:D=>{y[B.doc.key]=D},class:"mdsu-input",type:"file",tabindex:"-1","aria-hidden":"true",multiple:B.doc.multi,onChange:D=>N(B.doc,D)},null,40,So)],8,mo)):B.kind==="limits"?(n(),a("p",wo,o(v("limits")),1)):(n(),a("button",{key:2,type:"button",class:"mdsu-more","aria-expanded":e(O)?"true":"false",onClick:K},[h(o(v(e(O)?"more_open":"more"))+" ",1),s("span",Co,o(v("optional")),1)],8,xo))],64))),128)),e(G).hint?(n(),a("p",Oo,o(v(e(G).hint)),1)):p("",!0),t.error&&!t.starting?(n(),a("p",No,o(t.error),1)):p("",!0),s("div",Ao,[s("button",{type:"button",class:"mdsu-primary",disabled:e(G).disabled,onClick:Y[0]||(Y[0]=B=>r("submit"))},o(v(e(G).label)),9,To)])]))}},Mo=Ge(Eo,[["__scopeId","data-v-42aa686f"]]),Io=()=>{const t=Object.fromEntries(Ut.map(y=>[y.key,fn()])),l=new WeakMap,i=Q(!1),r=y=>t[y].attachedFiles.value,_=y=>r(y).filter(hn).map(M=>M.signedId),d=A(()=>Ut.some(y=>r(y.key).some(mn))),b=A(()=>_("om").length>0||_("rent_roll").length>0),O=async(y,M)=>{var L;const N=t[y.key];(L=N.fileUploadInfo)!=null&&L.value||await N.fetchFileUploadInfo();const S=N.attachedFiles.value.length;N.uploadFiles(M),N.attachedFiles.value.slice(S).forEach((Y,B)=>l.set(Y,M[B]))},v=async(y,M)=>{const N=Array.from(M||[]);N.length&&(y.multi||(t[y.key].attachedFiles.value=[]),await O(y,y.multi?N:N.slice(0,1)))},$=(y,M)=>{const N=t[y.key].attachedFiles.value,S=N.indexOf(M);S>=0&&N.splice(S,1)};return{MAIN_SLOTS:yn,MORE_SLOTS:_n,drops:t,moreOpen:i,uploading:d,core:b,add:v,remove:$,retry:async(y,M)=>{const N=l.get(M);if(!N)return $(y,M);$(y,M);const S=t[y.key];M.error==="no_upload_url"&&await S.fetchFileUploadInfo(),await O(y,[N])},chips:y=>r(y.key).map(M=>({file:M,...kn(M,y)})),launch:y=>bn({starting:y,uploading:d.value,core:b.value}),input:()=>pn(Object.fromEntries(Ut.map(y=>[y.key,_(y.key)])))}},Lo={class:"dsu-k"},Do=["data-slot"],jo={class:"dsu-lb"},Bo={key:0,class:"dsu-opt"},Fo={class:"dsu-files"},qo=["data-state"],Po=["title"],Ro=["aria-valuenow"],Uo={class:"dsu-st"},Vo={key:1,class:"dsu-st dsu-ok"},Wo={key:2,class:"dsu-st"},Go=["data-action","onClick"],Ko=["aria-label","onClick","onDragover","onDragenter","onDrop"],zo=["multiple","onChange"],Yo={key:1,class:"dsu-lim"},Ho={key:2,class:"dsu-more"},Zo=["aria-expanded"],Xo={class:"dsu-opt dsu-opt--inline"},Qo={class:"dsu-act"},Jo=["disabled"],ea={key:0,class:"dsu-hint",role:"status"},ta={key:0,class:"dsu-err",role:"alert"},sa={__name:"Upload",props:{starting:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["submit"],setup(t,{emit:l}){const i=t,r=l,{t:_}=Et("",{language:"en"}),{isMobileApp:d}=Yt(),b=Io(),{MAIN_SLOTS:O,MORE_SLOTS:v,moreOpen:$}=b,E=w=>_(`page.deal_screen.upload.${w}`),H=w=>_(`attach_file.upload_errors.${w}`),G={remove:"remove",replace:"replace",retry:"try_again"},K=A(()=>[...O.map(w=>({kind:"slot",key:w.key,doc:w})),{kind:"limits",key:"limits"},{kind:"more",key:"more"},...$.value?v.map(w=>({kind:"slot",key:w.key,doc:w})):[]]),y=()=>{$.value=!$.value},M=A(()=>b.launch(i.starting)),N=()=>{M.value.disabled||r("submit",b.input())},S={},L=Q(""),Y=w=>{var T;return(T=S[w.key])==null?void 0:T.click()},B=(w,T)=>{var x;b.add(w,(x=T.target)==null?void 0:x.files),T.target&&(T.target.value="")},D=w=>{L.value=w.key},oe=w=>{w.currentTarget===w.target&&(L.value="")},Z=(w,T)=>{var x;L.value="",b.add(w,(x=T.dataTransfer)==null?void 0:x.files)},z=(w,T)=>{T.action==="retry"?b.retry(w,T.file):T.action==="replace"?Y(w):b.remove(w,T.file)};return(w,T)=>{const x=Mo;return e(d)?(n(),ke(x,{key:0,up:e(b),starting:t.starting,error:t.error,onSubmit:N},null,8,["up","starting","error"])):(n(),a("form",{key:1,class:"dsu",onSubmit:xt(N,["prevent"])},[s("span",Lo,o(E("documents")),1),(n(!0),a(f,null,j(e(K),k=>(n(),a(f,{key:k.key},[k.kind==="slot"?(n(),a("div",{key:0,class:"dsu-row","data-slot":k.doc.key},[s("span",jo,[h(o(E(`slot.${k.doc.key}`))+" ",1),k.doc.note?(n(),a("span",Bo,o(E(k.doc.note)),1)):p("",!0)]),s("div",Fo,[(n(!0),a(f,null,j(e(b).chips(k.doc),(P,Ke)=>(n(),a("div",{key:`${P.file.id}-${Ke}`,class:q(["dsu-chip",{"dsu-chip--err":P.state==="error"}]),"data-state":P.state},[s("span",{class:"dsu-nm",title:P.file.name},o(P.file.name),9,Po),P.state==="uploading"?(n(),a(f,{key:0},[s("span",{class:"dsu-bar",role:"progressbar","aria-valuemin":"
10","aria-valuemax":"100","aria-valuenow":P.pct},[s("i",{style:Xs({width:`${P.pct}%`})},null,4)],8,Ro),s("span",Uo,o(P.pct)+"%",1)],64)):P.state==="ready"?(n(),a("span",Vo,o(E("uploaded")),1)):(n(),a("span",Wo,o(H(P.errorKey)),1)),s("button",{type:"button",class:"dsu-a","data-action":P.action,onClick:ze=>z(k.doc,P)},o(E(G[P.action])),9,Go)],10,qo))),128)),k.doc.multi||!e(b).chips(k.doc).length?(n(),a("button",{key:0,type:"button",class:q(["dsu-dz",{"is-over":e(L)===k.doc.key}]),"aria-label":`${E(`slot.${k.doc.key}`)}: ${E(k.doc.multi?"drop_many":"drop_one")} ${E(k.doc.multi?"choose_many":"choose_one")}`,onClick:P=>Y(k.doc),onDragover:xt(P=>D(k.doc),["prevent"]),onDragenter:xt(P=>D(k.doc),["prevent"]),onDragleave:oe,onDrop:xt(P=>Z(k.doc,P),["prevent"])},[h(o(E(k.doc.multi?"drop_many":"drop_one"))+" ",1),s("u",null,o(E(k.doc.multi?"choose_many":"choose_one")),1)],42,Ko)):p("",!0),s("input",{ref_for:!0,ref:P=>{S[k.doc.key]=P},class:"dsu-input",type:"file",tabindex:"-1","aria-hidden":"true",multiple:k.doc.multi,onChange:P=>B(k.doc,P)},null,40,zo)])],8,Do)):k.kind==="limits"?(n(),a("p",Yo,o(E("limits")),1)):(n(),a("div",Ho,[s("button",{type:"button",class:"dsu-more-btn","aria-expanded":e($)?"true":"false",onClick:y},o(E(e($)?"more_open":"more")),9,Zo),T[0]||(T[0]=h()),s("span",Xo,o(E("more_note")),1)]))],64))),128)),s("div",Qo,[s("button",{type:"submit",class:"dsu-btn",disabled:e(M).disabled},o(E(e(M).label)),9,Jo),e(M).hint?(n(),a("span",ea,o(E(e(M).hint)),1)):p("",!0)]),t.error&&!t.starting?(n(),a("p",ta,o(t.error),1)):p("",!0)],32))}}},na=Ge(sa,[["__scopeId","data-v-fae8b292"]]),Xt={"bb-asset-class":{rule:"one_of",unit:"text"},"bb-market":{rule:"matches_any",unit:"text"},"bb-price":{rule:"range",unit:"money"},"bb-size":{rule:"range",unit:"size"},"bb-cap-rate-min":{rule:"min",unit:"pct"},"bb-occupancy-min":{rule:"min",unit:"pct"},"bb-walt-min":{rule:"min",unit:"years",notFor:["multifamily"]},"bb-top-tenant-max":{rule:"max",unit:"pct",notFor:["multifamily"]},"bb-year-built-min":{rule:"min",unit:"year"}},ws=t=>{const l=Xt[t];return l?`${l.rule}_${l.unit}`:null},xs=t=>{var l;return(((l=Xt[t])==null?void 0:l.notFor)||[]).includes("multifamily")},oa=t=>Object.fromEntries((Array.isArray(t)?t:[]).filter(l=>(l==null?void 0:l.id)&&l.message).map(l=>[String(l.id),String(l.message)]));let Cs=0;const Os=t=>(t||[]).map(l=>{var i;return{key:l.id||`row-${Cs+=1}`,id:l.id||void 0,label:l.label||"",value:(i=l.value)!=null?i:"",enabled:l.enabled!==!1,own:!Xt[l.id]}}),aa=()=>({key:`own-${Cs+=1}`,id:void 0,label:"",value:"",enabled:!0,own:!0}),$e=t=>t.own&&t.value.trim()&&!t.label.trim()?"name":null,la=t=>(t||[]).filter(l=>$e(l)).map(l=>l.key),Gt=t=>(t||[]).filter(l=>!(l.own&&!l.label.trim()&&!l.value.trim())).map(l=>({...l.id?{id:l.id}:{},label:l.label.trim(),value:l.value.trim(),enabled:l.enabled})),ra=(t,l)=>JSON.stringify(Gt(t))!==JSON.stringify(Gt(Os(l))),ua=t=>Array.isArray(t)&&t.length>0&&t.every(l=>l.enabled===!1),ia=t=>{const l=t?new Date(t):null;return!l||Number.isNaN(l.getTime())?"":`${String(l.getHours()).padStart(2,"0")}:${String(l.getMinutes()).padStart(2,"0")}`},ys=t=>(Array.isArray(t)?t:[t]).filter(Boolean).map(l=>String(l).split(` 2`)[0]).join("; "),ca=t=>{const l=[t==null?void 0:t.message,...((t==null?void 0:t.graphQLErrors)||[]).map(i=>i==null?void 0:i.message)].filter(Boolean).join(" ").toLowerCase();return["cannot query field","unknown field","unknown type","doesn't exist","does not exist","no field"].some(i=>l.includes(i))},da=()=>{const t=Te("ds-buy-box-preset",()=>null),l=Te("ds-buy-box-status",()=>null),i=Te("ds-buy-box-saving",()=>!1),r=Te("ds-box-profile",()=>null),_=()=>vs().$apollo.clients.default,d=async()=>{var $;if(!(l.value==="fetching"||l.value==="unsupported")){l.value="fetching";try{const E=await _().query({query:gn,variables:{kind:"buy_box",profileKey:r.value||"default"},fetchPolicy:"no-cache"}),H=($=E==null?void 0:E.data)==null?void 0:$.userPresets;if(!Array.isArray(H)){l.value="unsupported";return}t.value=H[0]||null,l.value=t.value?"ready":"unsupported"}catch(E){l.value=ca(E)?"unsupported":"error",l.value==="error"&&We(E)}}},b=async $=>{var E;i.value=!0;try{const H=await _().mutate({mutation:vn,variables:{input:{kind:"buy_box",...r.value?{profileKey:r.value}:{},...$}}}),G=(E=H==null?void 0:H.data)==null?void 0:E.userPresetUpsert;return G?(G.status&&G.preset&&(t.value=G.preset),{ok:G.status===!0,errors:ys(G.errors),itemErrors:oa(G.itemErrors),preset:G.preset||null}):{ok:!1,errors:"No response",itemErrors:{}
2,preset:null}}catch(H){return We(H),{ok:!1,errors:ys((H==null?void 0:H.message)||"Request failed"),itemErrors:{},preset:null}}finally{i.value=!1}};return{preset:t,status:l,saving:i,boxProfile:r,fetchPreset:d,save:$=>b({items:$}),reset:()=>b({reset:!0})}},Ns=t=>{const{preset:l,status:i,saving:r,boxProfile:_,fetchPreset:d,save:b,reset:O}=da(),v=Q(!1),$=Q([]),E=Q(null),H=Q(null),G=Q({}),K=w=>w!=null&&w.id&&G.value[w.id]&&G.value[w.id].value===w.value?G.value[w.id].message:null,y=A(()=>i.value==="ready"&&!!l.value),M=A(()=>y.value&&l.value.customized===!1),N=A(()=>la($.value)),S=A(()=>{var w;return v.value&&ra($.value,(w=l.value)==null?void 0:w.items)}),L=A(()=>ua($.value));Fe(_,()=>{v.value=!1,$.value=[],(i.value==="ready"||i.value==="error")&&(i.value=null,d())});const Y=()=>{y.value&&($.value=Os(l.value.items),E.value=null,G.value={},H.value=null,v.value=!0)},B=()=>{v.value=!1,$.value=[],E.value=null,G.value={}},D=()=>{$.value=[...$.value,aa()]},oe=(w,{stamp:T})=>{var x;return w.ok?(G.value={},v.value=!1,$.value=[],E.value=null,H.value=T?ia((x=w.preset)==null?void 0:x.updatedAt):null,t==null||t(),!0):(E.value=w.errors||"",G.value=Object.fromEntries(Object.entries(w.itemErrors||{}).map(([k,P])=>{var Ke;return[k,{message:P,value:(Ke=$.value.find(ze=>ze.id===k))==null?void 0:Ke.value}]})),!1)};return{preset:l,status:i,saving:r,fetchPreset:d,open:v,draft:$,failure:E,savedAt:H,offered:y,defaults:M,problems:N,changed:S,everythingOff:L,lineError:K,start:Y,cancel:B,addOwn:D,submit:async()=>r.value||N.value.length?!1:oe(await b(Gt($.value)),{stamp:!0}),restore:async()=>r.value?!1:oe(await O(),{stamp:!1})}},ma={class:"mbb"},pa={class:"tm-kicker"},ba={key:0,class:"mbb-saved",role:"status"},_a={key:1,class:"mbb-note"},ya={key:2,class:"mbb-note"},ha={key:3,class:"tm-list"},ka={class:"mbb-m"},fa={key:4,class:"tm-sub"},va=["aria-label"],ga={class:"tm-header"},$a=["aria-label"],Sa={class:"tm-header--title"},wa={class:"tm-overlay--body tm-scroll mbb-body"},xa={class:"tm-sub"},Ca={class:"mbb-err",role:"alert"},Oa={key:0,class:"tm-sub mbb-reason"},Na={key:1,class:"mbb-note"},Aa={key:2,class:"tm-list"},Ta=["for"],Ea={class:"mbb-hint"},Ma=["aria-checked","aria-label","onClick"],Ia=["id","onUpdate:modelValue","placeholder","aria-invalid"],La={key:0,class:"mbb-problem"},Da={key:1,class:"mbb-problem"},ja={class:"mbb-lb"},Ba={class:"mbb-hint"},Fa=["aria-checked","aria-label","onClick"],qa=["onUpdate:modelValue","aria-label","placeholder"],Pa=["onUpdate:modelValue","aria-label","placeholder"],Ra={key:0,class:"mbb-problem"},Ua={key:1,class:"mbb-problem"},Va=["disabled"],Wa={class:"tm-overlay--foot mbb-foot"},Ga=["disabled"],Ka={__name:"DealScreenBuyBox",props:{box:{type:Object,default:null}},emits:["saved"],setup(t,{emit:l}){const i=t,r=l,{t:_}=Et("",{language:"en"}),d=Ns(()=>r("saved")),{open:b,draft:O,failure:v,savedAt:$,offered:E,defaults:H,saving:G,everythingOff:K}=d;dt(d.fetchPreset);const y=(w,T)=>_(`page.deal_screen.buy_box.${w}`,T),M=["pass","fail","no_data"],N=A(()=>{var w;return((w=i.box)==null?void 0:w.criteria)||[]}),S=A(()=>N.value.filter(w=>M.includes(w.state))),L=A(()=>!!i.box&&!N.value.length),Y={pass:"mbb-ok",fail:"mbb-bad",no_data:"mbb-na"},B=w=>{const T=y("send",{ask:w.ask||""});if(w.state!=="no_data"){const x=w.computed?y("our_calculation"):Zt(w.source||{});return[w.threshold,w.display,x].filter(Boolean).join(" · ")}return w.display?[w.threshold,w.display,T].filter(Boolean).join(" · "):T},D=A(()=>{const w=new Map;N.value.filter(x=>!M.includes(x.state)).forEach(x=>{w.has(x.state)||w.set(x.state,[]),w.get(x.state).push(x.label)});const T=[...w].map(([x,k])=>`${k.join(", ")} â ${y(`not_counted_reason.${x}`)}`).join("; ");return T?y("not_counted",{list:T}):""}),oe=A(()=>O.value.filter(w=>!w.own)),Z=A(()=>O.value.filter(w=>w.own)),z=w=>{const T=ws(w.id);return T?xs(w.id)?`${y(`hint.${T}`)} · ${y("not_for_multifamily")}`:y(`hint.${T}`):""};return(w,T)=>{var x;return n(),a("div",ma,[s("div",pa,[h(o(y("title")),1),(x=t.box)!=null&&x.headline?(n(),a(f,{key:0},[h(" · "+o(t.box.headline),1)],64)):p("",!0)]),e($)!==null?(n(),a("div",ba,[h(o(y("saved")),1),e($)?(n(),a(f,{key:0},[h(" · "+o(e($)),1)],64)):p("",!0)])):p("",!0),e(H)?(n(),a("div",_a,o(y("defaults_notice_short")),1)):p("",!0),e(L)?(n(),a("div",ya,o(y("all_off_short")),1)):p("",!0),e(S).length?(n(),a("div",ha,[(n(!0),a(f,null,j(e(S),k=>(n(),a("div",{key:k.id,class:"mbb-row"},[s("span",null,o(k.label),1),s("span",{class:q(Y[k.state])},o(y(`state.${k.state}`)),3),s("span",ka,o(B(k)),1)]))),128))])):p("",!0),e(D)?(n(),a("p",fa,o(e(D)),1)):p("",!0),e(E)?(n(),a("button",{key:5,type:"button",class:"tm-primary tm-primary--ink tm-tap",onClick:T[0]||(T[0]=(...k)=>e(d).start&&e(d).start(...k))},o(y("edit")),1)):p("",!0),e(b)?(n(),a("div",{key:6,class:"tm-overlay mbb-screen",role:"dialog","aria-modal":"true","aria-label":y("title")},[s("div",ga,[s("button",{type:"button",class:"tm-icon-btn tm-tap","aria-label":y("back"),onClick:T[1]||(T[1]=(...k)=>e(d).cancel&&e(d).cancel(...k))},[...T[6]||(T[6]=[s("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[s("path",{d:"M15 6l-6 6 6 6"})],-1)])],8,$a),s("div",Sa,o(y("title")),1)]),s("div",wa,[s("p",xa,o(y("intro_short")),1),e(v)!==null?(n(),a(f,{key:0},[s("div",Ca,o(y("not_saved")),1),e(v)?(n(),a("p",Oa,o(e(v)),1)):p("",!0)],64)):p("",!0),e(K)?(n(),a("div",Na,o(y("all_off_short")),1)):p("",!0),e(oe).length?(n(),a("div",Aa,[(n(!0),a(f,null,j(e(oe),k=>(n(),a("div",{key:k.key,class:q(["mbb-cr",{"mbb-cr--off":!k.enabled}])},[s("div",null,[s("label",{class:"mbb-lb",for:`mbb-${k.key}`},o(k.label),9,Ta),s("div",Ea,o(z(k)),1)]),s("button",{type:"button",role:"switch",class:q(["tm-switch tm-switch--sm tm-tap mbb-sw",{"is-on":k.enabled}]),"aria-checked":k.enabled?"true":"false","aria-label":k.label,onClick:P=>k.enabled=!k.enabled},[...T[7]||(T[7]=[s("i",null,null,-1)])],10,Ma),qe(s("input",{id:`mbb-${k.key}`,"onUpdate:modelValue":P=>k.value=P,class:q(["mbb-inp",{"mbb-inp--err":e($e)(k)||e(d).lineError(k)}]),type:"text",placeholder:y("no_threshold"),"aria-invalid":e($e)(k)||e(d).lineError(k)?"true":"false"},null,10,Ia),[[Pe,k.value]]),e(d).lineError(k)?(n(),a("div",La,o(e(d).lineError(k)),1)):e($e)(k)?(n(),a("div",Da,o(y(`problem.${e($e)(k)}`)),1)):p("",!0)],2))),128))])):p("",!0),(n(!0),a(f,null,j(e(Z),k=>(n(),a("div",{key:k.key,class:"tm-card"},[s("div",{class:q(["mbb-cr",{"mbb-cr--off":!k.enabled}])},[s("div",null,[s("div",ja,o(y("own_title")),1),s("div",Ba,o(y("own_hint_short")),1)]),s("button",{type:"button",role:"switch",class:q(["tm-switch tm-switch--sm tm-tap mbb-sw",{"is-on":k.enabled}]),"aria-checked":k.enabled?"true":"false","aria-label":k.label||y("own_title"),onClick:P=>k.enabled=!k.enabled},[...T[8]||(T[8]=[s("i",null,null,-1)])],10,Fa),qe(s("input",{"onUpdate:modelValue":P=>k.label=P,class:"mbb-inp",type:"text","aria-label":y("own_title"),placeholder:y("own_name_placeholder")},null,8,qa),[[Pe,k.label]]),qe(s("input",{"onUpdate:modelValue":P=>k.value=P,class:q(["mbb-inp",{"mbb-inp--err":e($e)(k)||e(d).lineError(k)}]),type:"text","aria-label":y("own_value_placeholder_short"),placeholder:y("own_value_placeholder_short")},null,10,Pa),[[Pe,k.value]]),e(d).lineError(k)?(n(),a("div",Ra,o(e(d).lineError(k)),1)):e($e)(k)?(n(),a("div",Ua,o(y(`problem.${e($e)(k)}`)),1)):p("",!0)],2)]))),128)),s("button",{type:"button",class:"mbb-ghost tm-tap",onClick:T[2]||(T[2]=(...k)=>e(d).addOwn&&e(d).addOwn(...k))}
2,o(y("add_own")),1),s("button",{type:"button",class:"mbb-ghost tm-tap",disabled:e(G),onClick:T[3]||(T[3]=(...k)=>e(d).restore&&e(d).restore(...k))},o(y("reset")),9,Va)]),s("div",Wa,[s("button",{type:"button",class:"tm-primary tm-primary--ink tm-tap",disabled:e(G),onClick:T[4]||(T[4]=(...k)=>e(d).submit&&e(d).submit(...k))},o(e(G)?y("saving"):e(v)!==null?y("try_again"):y("save_short")),9,Ga),s("button",{type:"button",class:"mbb-ghost tm-tap",onClick:T[5]||(T[5]=(...k)=>e(d).cancel&&e(d).cancel(...k))},o(y("cancel")),1)])],8,va)):p("",!0)])}}},za=Ge(Ka,[["__scopeId","data-v-a8709d81"]]),Ya={key:1,class:"bb"},Ha={key:0,class:"bb-saved",role:"status"},Za={class:"bb-head"},Xa={key:1,class:"bb-notice"},Qa={key:2,class:"bb-notice"},Ja=["aria-label"],el={class:"bb-pane-head"},tl={class:"bb-grow"},sl=["disabled"],nl={class:"bb-pane-body"},ol={class:"bb-m11"},al={class:"bb-err",role:"alert"},ll=["disabled"],rl={key:0,class:"bb-m11"},ul={key:1,class:"bb-notice"},il=["aria-checked","aria-label","onClick"],cl={class:"bb-cr-body"},dl={class:"bb-lb"},ml=["onUpdate:modelValue","aria-label","placeholder"],pl=["onUpdate:modelValue","aria-label","placeholder"],bl={class:"bb-hint bb-hint--own"},_l=["for"],yl={class:"bb-hint"},hl=["id","onUpdate:modelValue","placeholder","aria-invalid"],kl={key:2,class:"bb-problem"},fl={key:3,class:"bb-problem"},vl={class:"bb-pane-foot"},gl=["disabled"],$l={key:0,class:"bb-m11"},Sl={__name:"BuyBox",props:{box:{type:Object,default:null}},emits:["saved"],setup(t,{emit:l}){const i=t,r=l,{t:_}=Et("",{language:"en"}),{isMobileApp:d}=Yt(),b=Ns(()=>r("saved")),{open:O,draft:v,failure:$,savedAt:E,offered:H,defaults:G,saving:K,changed:y,everythingOff:M}=b;dt(b.fetchPreset);const N=A(()=>!!i.box&&!(i.box.criteria||[]).length),S=Z=>_(`page.deal_screen.buy_box.${Z}`),L=Z=>{const z=ws(Z.id);return z?xs(Z.id)?`${S(`hint.${z}`)} · ${S("not_for_multifamily")}`:S(`hint.${z}`):""},Y=Q(null),B=Q(null),D=async()=>{var Z,z;b.start(),await Wt(),(z=(Z=B.value)==null?void 0:Z.focus)==null||z.call(Z)},oe=async()=>{var Z,z;b.cancel(),await Wt(),(z=(Z=Y.value)==null?void 0:Z.focus)==null||z.call(Z)};return(Z,z)=>{var T;const w=za;return e(d)?(n(),ke(w,{key:0,box:t.box,onSaved:z[0]||(z[0]=x=>r("saved"))},null,8,["box"])):(n(),a("div",Ya,[e(E)!==null?(n(),a("p",Ha,[h(o(S("saved")),1),e(E)?(n(),a(f,{key:0},[h(" · "+o(e(E)),1)],64)):p("",!0)])):p("",!0),s("div",Za,[s("h2",null,[h(o(S("title")),1),(T=t.box)!=null&&T.headline?(n(),a(f,{key:0},[h(" â "+o(t.box.headline),1)],64)):p("",!0)]),e(H)?(n(),a("button",{key:0,ref_key:"editBtn",ref:Y,type:"button",class:"bb-btn",onClick:D},o(S("edit")),513)):p("",!0)]),e(G)?(n(),a("p",Xa,[h(o(S("defaults_notice"))+" ",1),s("button",{type:"button",class:"bb-link",onClick:D},o(S("edit")),1),h(" "+o(S("defaults_notice_own")),1)])):p("",!0),e(N)?(n(),a("p",Qa,o(S("all_off")),1)):p("",!0),zt(Z.$slots,"default",{},void 0,!0),e(O)?(n(),a(f,{key:3},[s("div",{class:"bb-scrim","aria-hidden":"true",onClick:oe}),s("aside",{ref_key:"pane",ref:B,class:"bb-pane",role:"dialog","aria-modal":"true","aria-label":S("title"),tabindex:"-1",onKeydown:Qs(oe,["esc"])},[s("div",el,[s("b",tl,o(S("title")),1),s("button",{type:"button",class:"bb-btn",disabled:e(K),onClick:z[1]||(z[1]=(...x)=>e(b).restore&&e(b).restore(...x))},o(S("reset")),9,sl)]),s("div",nl,[s("p",ol,o(S("intro")),1),e($)!==null?(n(),a(f,{key:0},[s("div",al,[s("span",null,o(S("not_saved")),1),s("button",{type:"button",class:"bb-link",disabled:e(K),onClick:z[2]||(z[2]=(...x)=>e(b).submit&&e(b).submit(...x))},o(S("try_again")),9,ll)]),e($)?(n(),a("p",rl,o(e($)),1)):p("",!0)],64)):p("",!0),e(M)?(n(),a("p",ul,o(S("all_off")),1)):p("",!0),(n(!0),a(f,null,j(e(v),x=>(n(),a("div",{key:x.key,class:q(["bb-cr",{"bb-cr--off":!x.enabled}])},[s("button",{type:"button",role:"switch",class:q(["bb-tg",{"bb-tg--on":x.enabled}]),"aria-checked":x.enabled?"true":"false","aria-label":x.label||S("own_title"),onClick:k=>x.enabled=!x.enabled},[...z[5]||(z[5]=[s("i",null,null,-1)])],10,il),s("div",cl,[x.own?(n(),a(f,{key:0},[s("div",dl,o(S("own_title")),1),qe(s("input",{"onUpdate:modelValue":k=>x.label=k,class:"bb-inp",type:"text","aria-label":S("own_title"),placeholder:S("own_name_placeholder")},null,8,ml),[[Pe,x.label]]),qe(s("input",{"onUpdate:modelValue":k=>x.value=k,class:q(["bb-inp",{"bb-inp--err":e($e)(x)||e(b).lineError(x)}]),type:"text","aria-label":S("own_value_placeholder_short"),placeholder:S("own_value_placeholder")},null,10,pl),[[Pe,x.value]]),s("div",bl,o(S("own_hint")),1)],64)):(n(),a(f,{key:1},[s("label",{class:"bb-lb",for:`bb-${x.key}`},o(x.label),9,_l),s("div",yl,o(L(x)),1),qe(s("input",{id:`bb-${x.key}`,"onUpdate:modelValue":k=>x.value=k,class:q(["bb-inp",{"bb-inp--err":e($e)(x)||e(b).lineError(x)}]),type:"text",placeholder:S("no_threshold"),"aria-invalid":e($e)(x)||e(b).lineError(x)?"true":"false"},null,10,hl),[[Pe,x.value]])],64)),e(b).lineError(x)?(n(),a("div",kl,o(e(b).lineError(x)),1)):e($e)(x)?(n(),a("div",fl,o(S(`problem.${e($e)(x)}`)),1)):p("",!0)])],2))),128)),s("button",{type:"button",class:"bb-btn bb-add",onClick:z[3]||(z[3]=(...x)=>e(b).addOwn&&e(b).addOwn(...x))}
2,o(S("add_own")),1)]),s("div",vl,[s("button",{type:"button",class:"bb-btn bb-btn--dark",disabled:e(K),onClick:z[4]||(z[4]=(...x)=>e(b).submit&&e(b).submit(...x))},o(e(K)?S("saving"):S("save")),9,gl),s("button",{type:"button",class:"bb-btn",onClick:oe},o(S("cancel")),1),z[6]||(z[6]=s("span",{class:"bb-grow"},null,-1)),e(y)?(n(),a("span",$l,o(S("unsaved")),1)):p("",!0)])],40,Ja)],64)):p("",!0)]))}}},wl=Ge(Sl,[["__scopeId","data-v-b722ad4e"]]),hs=36,xl=51,Cl=5e3,Ol=2e4,Nl=(t,l)=>l!=null&&l.complete?null:t<hs?Cl:!l||t>=hs+xl?null:Ol,Al=t=>!!t&&!t.complete,ie=t=>(t==null?"":String(t)).trim(),As=(t,l)=>{var r;const i=Number((r=t==null?void 0:t.cited)==null?void 0:r[l]);return Number.isInteger(i)&&i>=1?i:null},it=(t,l,i,r,_=l)=>{var $,E;const d=As(t,_),b=ie(($=t==null?void 0:t.quotes)==null?void 0:$[_]),O=(E=t==null?void 0:t.document_id)!=null?E:null,v=d&&b&&O&&r?{gridId:String(r),documentId:String(O),page:d,quote:b,label:ie(t==null?void 0:t.doc)||"Estoppel certificate"}:null;return{key:l,value:ie(i)||"â",locus:d&&ie(i)?`p. ${d}`:"",target:ie(i)?v:null}},Kt=/^none( stated)?\.?$/i,Tl=t=>{const l=d=>d&&!Kt.test(d),i=ie(t==null?void 0:t.defaults_claimed),r=ie(t==null?void 0:t.claims_claimed),_=[l(i)?i:"",l(r)?r+(Number(t==null?void 0:t.claim_amount)>0?` (${te(t.claim_amount)})`:""):""].filter(Boolean);return _.length?_.join(" · "):[i,r].some(d=>Kt.test(d))?"None stated":""},El=/^estoppel_(rent|deposit|lease_end|abatement)$/,Ml=(t,l)=>{const i=ie(t==null?void 0:t.doc),r=(Array.isArray(l)?l:[]).find(b=>{var O;return El.test(ie(b==null?void 0:b.code))&&i&&ie((O=b==null?void 0:b.a)==null?void 0:O.doc)===i});if(!r)return"";const _=r.b||{};if(!/^estoppel_(rent|deposit|lease_end)$/.test(ie(r.code)))return"â rent roll · see the check above";const d=Number.isFinite(Number(_.value))&&ie(_.value)!==""?te(_.value):ie(_.value);return d?`â rent roll ${d} · see the check above`:"â rent roll · see the check above"},Il=t=>{var _;const l=t==null?void 0:t.estoppel_grid_id,i=Array.isArray(t==null?void 0:t.estoppels)?t.estoppels.filter(Boolean):[];if(!l||!i.length)return[];const r=(_=t==null?void 0:t.reconciliation)==null?void 0:_.findings;return i.map((d,b)=>{const O=Tl(d),v=ie(d==null?void 0:d.defaults_claimed)&&!Kt.test(ie(d.defaults_claimed))?"defaults_claimed":"claims_claimed";return{key:`${ie(d.doc)}#${b}`,tenant:[ie(d.tenant),ie(d.suite)&&`Suite ${ie(d.suite)}`].filter(Boolean).join(" · ")||"â",cells:[it(d,"annual_rent",Number.isFinite(Number(d.annual_rent))&&d.annual_rent!==null?te(d.annual_rent):"",l,As(d,"annual_rent")?"annual_rent":"monthly_rent"),it(d,"security_deposit",d.security_deposit!=null?te(d.security_deposit):"",l),it(d,"lease_end",d.lease_end,l),it(d,"abatement_monthly",d.abatement_monthly!=null?te(d.abatement_monthly):"",l),it(d,"claims",O,l,v)],doc:ie(d.doc)||"Estoppel certificate",gap:Ml(d,r)}})},de=t=>(t==null?"":String(t)).trim(),Re=t=>t!=null&&t!==""&&Number.isFinite(Number(t)),Qt=t=>{var i;const l=de(t&&((i=t.doc)!=null?i:t.document));return l?/\bT-?12\b|operating statement/i.test(l)?"T-12":/rent\s*roll/i.test(l)?"RR":/\bOM\b|offering/i.test(l)?"OM":/\blease/i.test(l)?"Lease":/\bPSA\b|purchase/i.test(l)?"PSA":"Doc":""},Ts=t=>!!t&&(t.computed===!0||t.kind==="computed"||t.where==="computed"),ks={om:"OM",rent_roll:"Rent roll",t12:"T-12",leases:"Leases",estoppels:"Estoppels",records:"Other papers"},Ll=(t,l=null)=>(t&&Array.isArray(t.steps)?t.steps:[]).filter(i=>i&&ks[i.step]).map(i=>{const r=Re(i.total)&&Number(i.total)>0;let _="";i.state==="reading"?(_=r?`reading⦠${Number(i.done)||0} of ${Number(i.total)}`:"readingâ¦",Re(i.open_minutes)&&(_+=` · waiting ${Number(i.open_minutes)} min`)):i.state==="not_uploaded"?_="not uploaded":i.state==="failed"?_="could not be read":r?_=`${Number(i.done)||0} of ${Number(i.total)} figures`:i.step==="rent_roll"&&Tt(l)&&(_=`as of ${Tt(l)}`);const d=i.state==="done"?"done":i.state==="reading"?"reading":"none";return i.step==="t12"&&i.state==="done"&&de(i.from_om)?{key:i.step,label:"T-12 â not sent",meta:"",tone:"warn",title:"The operating statement read here comes from the OM"}
2:{key:i.step,label:ks[i.step],meta:_,tone:d}}),Nt=(t,l,i)=>{if(!i||!de(i.value))return null;const r=i.cite||null,_=de(i.value).replace(/ a year$/,"");return i.computed||Ts(r)?{key:t,label:l,value:_,src:null,calc:{basis:de(r&&r.quote)||de(i.source),from:de(r&&r.doc),inputs:[]}}:{key:t,label:l,value:_,src:r,calc:null,short:Qt(r)}},ct=(t,l,i,r)=>{if(!i||!Re(i.value))return null;if(i.computed||Ts(i.source)){const d=(Array.isArray(i.inputs)?i.inputs:[]).filter(b=>b&&typeof b=="object");return{key:t,label:l,value:r(i.value),src:null,calc:{basis:de(i.basis),from:"",inputs:d}}}const _=i.source||null;return{key:t,label:l,value:r(i.value),src:_,calc:null,short:Qt(_)}},Dl=(t,l)=>{const i=t||{},r=new Map((l&&l.figures||[]).map(E=>[E.key,E])),_=i.noi||{},d=i.rent_roll||{},b=i.facts||{},O=[],v=!_.t12||!_.t12.name||_.t12.name==="T-12"?"NOI · T-12":"NOI · statement";let $=Nt("noi",v,r.get("t12_noi"));return!$&&_.recomputed&&($=ct("noi",v,_.recomputed,te)),!$&&_.om_noi&&($=ct("noi","NOI · OM",{value:_.om_noi.value,source:{document:"OM",page:_.om_noi.page,quote:_.om_noi.quote,document_id:_.om_noi.document_id}},te)),O.push($),O.push(Nt("occupancy","Occupancy",r.get("occupancy"))||ct("occupancy","Occupancy",d.occupancy&&{...d.occupancy,computed:!0},E=>xe(E,1))),O.push(Nt("in_place_rent","In-place rent · year",r.get("in_place_rent"))||ct("in_place_rent","In-place rent · year",d.passing_rent&&{...d.passing_rent,computed:!0},te)),O.push(ct("cap_rate","Cap rate",b.cap_rate&&{...b.cap_rate,computed:!0},E=>xe(E,2))),O.push(Nt("price_per_unit","Price / unit",r.get("price_per_unit"))),O.filter(Boolean)},jl=(t,l,i=3)=>{const r=t&&t.discrepancies||[],d=(r.length?r.map(b=>({t:de(b.headline),s:de(b.impact)||de(b.text)})):(l&&l.findings||[]).map(b=>({t:de(b.title),s:de(b.reason)}))).filter(b=>b.t);return{count:d.length,lines:d.slice(0,i)}},Bl=t=>{const l=(t&&t.criteria||[]).filter(i=>["pass","fail","no_data"].includes(i.state));return l.length?`${l.filter(i=>i.state==="pass").length} of ${l.length} pass`:""},Fl=t=>{if(!t)return"";const l=[];return t.occupancy&&Re(t.occupancy.value)&&l.push(`${xe(t.occupancy.value,1)} occupied`),t.passing_rent&&Re(t.passing_rent.value)&&l.push(`${te(t.passing_rent.value)} a year`),l.join(" · ")},ql=t=>{const l=de(t==null?void 0:t.label).replace(/\s*\bNOI\b\s*/i," ").trim().toLowerCase();return/^(pro[\s-]?forma|in[\s-]place|current|stabili[sz]ed|projected|market|actual|trailing|t-?12|year\s+1)$/.test(l)?l:""},fs=t=>{if(!t)return"";const l=t.recomputed&&Re(t.recomputed.value)?te(t.recomputed.value):"",i=t.om_noi&&Re(t.om_noi.value)?te(t.om_noi.value):"",r=i?ql(t.om_noi):"",_=r?`OM ${r} ${i}`:`OM ${i}`;return l&&i?`${l} vs ${_}`:l||(i?_:"")},Pl=t=>{var d;if(!t||typeof t!="object")return"";const l=de((d=t.document)!=null?d:t.doc),i=Re(t.page)?`p. ${t.page}`:de(t.where)==="computed"?"":de(t.where),r=Array.isArray(t.lines)?t.lines.map(de).filter(Boolean).join("; "):"",_=de(t.quote);return[[l,i].filter(Boolean).join(" "),r,_?`â${_}â`:""].filter(Boolean).join(" â ")},Rl={class:"dsc-head"},Ul={class:"dsc-t"},Vl={key:0,class:"dsc-m"},Wl={key:0,class:"dsc-kick"},Gl={class:"dsc-docs","aria-label":"Documents"},Kl=["title"],zl={key:0,class:"dsc-doc--m"},Yl={key:0,class:"dsc-kick"},Hl={class:"dsc-kn","data-test":"key-numbers"},Zl={class:"dsc-kn--l"},Xl={class:"dsc-kn--v"},Ql=["aria-label","onClick"],Jl=["title"],er={key:2,class:"dsc-cfl","data-test":"conflicts"},tr={class:"dsc-cfl--t"},sr={key:3,class:"dsc-acts","data-test":"deal-actions"},nr=["disabled","onClick"],or={key:4,class:"dsc-note"},ar={__name:"Card",props:{phone:{type:Boolean,default:!1},title:{type:String,default:""},meta:{type:String,default:""},chips:{type:Array,default:()=>[]},numbers:{type:Array,default:()=>[]},conflicts:{type:Object,default:()=>({count:0,lines:[]})},actions:{type:Array,default:()=>[]},note:{type:String,default:""},selected:{type:String,default:""}},emits:["open","action"],setup(t,{emit:l}){const i=t,r=l,_=b=>b.calc?"calc":b.short||"Doc",d=b=>b.calc?`How ${b.label.toLowerCase()} was calculated`:`Open the source of ${b.label}`;return(b,O)=>(n(),a("section",{class:q(["dsc",{"is-phone":i.phone}]),"aria-label":"Deal screen"}
2,[s("header",Rl,[s("h1",Ul,o(t.title),1),t.meta?(n(),a("p",Vl,o(t.meta),1)):p("",!0)]),t.chips.length?(n(),a(f,{key:0},[t.phone?(n(),a("span",Wl,"Documents")):p("",!0),s("ul",Gl,[(n(!0),a(f,null,j(t.chips,v=>(n(),a("li",{key:v.key,class:q(["dsc-doc",`is-${v.tone}`]),title:v.title||null},[O[0]||(O[0]=s("i",{"aria-hidden":"true"},null,-1)),h(o(v.label),1),v.meta?(n(),a("span",zl,o(v.meta),1)):p("",!0)],10,Kl))),128))])],64)):p("",!0),t.numbers.length?(n(),a(f,{key:1},[t.phone?(n(),a("span",Yl,"Key numbers")):p("",!0),s("div",Hl,[(n(!0),a(f,null,j(t.numbers,v=>(n(),a("div",{key:v.key,class:"dsc-kn--c"},[s("span",Zl,o(v.label),1),s("span",Xl,[h(o(v.value)+" ",1),v.opens?(n(),a("button",{key:0,type:"button",class:q(["dsc-srcb ds-cite-badge",{"is-calc":!!v.calc,"is-sel":t.selected===v.key}]),"aria-label":d(v),onClick:$=>r("open",v)},o(_(v)),11,Ql)):(n(),a("span",{key:1,class:q(["dsc-srcb is-static",{"is-calc":!!v.calc}]),title:v.calc?v.calc.basis:""},o(_(v)),11,Jl))])]))),128))])],64)):p("",!0),t.conflicts.count?(n(),a("div",er,[s("span",tr,"Where the documents disagree · "+o(t.conflicts.count),1),(n(!0),a(f,null,j(t.conflicts.lines,(v,$)=>(n(),a("span",{key:$,class:"dsc-cfl--s"},[h(o(v.t),1),v.s?(n(),a(f,{key:0},[h(" â "+o(v.s),1)],64)):p("",!0)]))),128))])):p("",!0),zt(b.$slots,"default",{},void 0,!0),t.actions.length?(n(),a("div",sr,[(n(!0),a(f,null,j(t.actions,v=>(n(),a("button",{key:v.key,type:"button",class:q(["dsc-btn",{"is-dark":v.dark}]),disabled:v.disabled,onClick:$=>r("action",v.key)},o(v.label),11,nr))),128))])):p("",!0),t.note?(n(),a("p",or,o(t.note),1)):p("",!0)],2))}},lr=Ge(ar,[["__scopeId","data-v-f14ab863"]]),rr=["open"],ur={class:"dss-h"},ir={class:"dss-t"},cr={key:0,class:"dss-m"},dr={class:"dss-x","aria-hidden":"true"},mr={class:"dss-b"},pr={__name:"Section",props:{title:{type:String,required:!0},meta:{type:String,default:""},phone:{type:Boolean,default:!1},initiallyOpen:{type:Boolean,default:!1}},setup(t){const l=Q(!1),i=r=>{var _;l.value=!!((_=r==null?void 0:r.target)!=null&&_.open)};return(r,_)=>(n(),a("details",{class:q(["dss",{"is-phone":t.phone}]),open:t.initiallyOpen||void 0,onToggle:i},[s("summary",ur,[s("span",ir,o(t.title),1),t.meta?(n(),a("span",cr,o(t.meta),1)):p("",!0),s("span",dr,o(e(l)?"Close â¾":"Open â¸"),1)]),s("div",mr,[zt(r.$slots,"default",{},void 0,!0)])],42,rr))}},ge=Ge(pr,[["__scopeId","data-v-4cc4df56"]]),br={key:0,class:"ds-head"},_r={key:2,class:"ds-empty"},yr={key:3,class:"ds-warn"},hr={key:0,class:"ds-warn"},kr={key:1,class:"ds-uw","data-test":"deck-assumptions"},fr=["onUpdate:modelValue","name"],vr={class:"ds-uw-term"},gr={key:2,class:"ds-verdict"},$r={class:"ds-verdict-line"},Sr={class:"ds-verdict-meta"},wr={key:0},xr={class:"ds-sections"},Cr={class:"ds-block"},Or={key:0,class:"ds-meta ds-key-risk"},Nr={class:"ds-table"},Ar=["onClick"],Tr={key:0,class:"ds-meta"},Er={class:"ds-src"},Mr={key:0,class:"ds-calc"},Ir={key:1,class:"ds-meta"},Lr={class:"ds-block"},Dr={class:"ds-kv"},jr={key:0,class:"ds-calc"},Br={class:"ds-src"},Fr={key:0,class:"ds-src"},qr={key:1,class:"ds-table"},Pr={class:"ds-block"},Rr={class:"ds-verdict-meta"},Ur={class:"ds-src"},Vr={class:"ds-src"},Wr={key:3},Gr={class:"ds-src"},Kr={key:4},zr={class:"ds-src"},Yr={key:0,class:"ds-note"},Hr={class:"ds-table"},Zr={key:0},Xr=["onClick"],Qr={key:3,class:"ds-calc"},Jr={class:"ds-src"},eu={key:0},tu=["onClick"],su={key:3,class:"ds-src"},nu={class:"ds-block"},ou={class:"ds-kv"},au={key:2,class:"ds-src"},lu={class:"ds-src"},ru={class:"ds-src"},uu={class:"ds-reason"},iu={class:"ds-omfacts"},cu={class:"ds-omfacts--l"},du=["onClick"],mu={class:"ds-src"},pu={class:"ds-block"},bu={class:"ds-meta"},_u={key:0,class:"ds-warn"},yu={class:"ds-meta"},hu={key:1,class:"ds-meta"},ku={class:"ds-questions"},fu={key:0,class:"ds-meta"},vu={key:1,class:"ds-meta"},gu=["onClick"],$u={class:"ds-block"},Su={key:0,class:"ds-meta"},wu={key:1,class:"ds-table"},xu={class:"ds-src"},Cu=["onClick"],Ou={class:"ds-src"},Nu=["onClick"],Au={key:0,class:"ds-src"},Tu={class:"ds-src"},Eu={key:2,class:"ds-meta"},Mu={class:"ds-gaps"},Iu={class:"ds-block"},Lu={class:"ds-table"},Du={key:0,class:"ds-src"},ju=["onClick"],Bu={key:0,class:"ds-src"},Fu=["onClick"],qu={key:0,class:"ds-src"},Pu=["onClick"],Ru={key:0,class:"ds-src"},Uu=["onClick"],Vu={class:"ds-src"},Wu={class:"ds-block"},Gu={key:0,class:"ds-table"},Ku={key:0,class:"ds-est-gap"},zu={key:0,class:"ds-src"},Yu=["onClick"],Hu={class:"ds-src"},Zu={key:1,class:"ds-est-cards"},Xu={key:0,class:"ds-est-gap"},Qu=["onClick"],Ju={key:1,class:"ds-src"},ei={class:"ds-src"},ti={class:"ds-block"},si={key:0,class:"ds-meta"},ni={class:"ds-gaps"},oi={class:"ds-meta"},ai={key:1,class:"ds-meta"},li={class:"ds-gaps"}
2,ri={class:"ds-block"},ui=["disabled"],ii={class:"ds-meta"},ci={class:"ds-letter"},di={class:"ds-block"},mi={key:0,class:"ds-meta"},pi={class:"ds-questions"},bi={key:0,class:"ds-meta"},_i={class:"ds-src"},yi=["onClick"],hi={key:0,class:"ds-block"},ki={class:"ds-gaps"},fi={key:0,class:"ds-block ds-market"},vi={key:0},gi={key:1,class:"ds-meta"},$i={key:2,class:"ds-meta"},Si={key:3,class:"ds-meta"},wi={key:5},xi=["disabled"],Ci={key:1,class:"ds-block ds-market"},Oi={class:"ds-src"},Ni={class:"ds-table"},Ai={class:"ds-src"},Ti={key:0,class:"ds-meta"},Ei={key:2,class:"ds-block ds-market"},Mi={key:0},Ii={key:1},Li={class:"ds-src"},Di={key:2},ji={class:"ds-src"},Bi={key:0,class:"ds-table"},Fi={class:"ds-src"},qi={class:"ds-src"},Pi={key:1,class:"ds-gaps"},Ri={key:2,class:"ds-meta"},Ui={key:4,class:"ds-meta"},Vi={key:5},Wi={key:0,class:"ds-workflows"},Gi=["title","disabled","onClick"],Ki={key:0,class:"ds-src"},zi={key:1,class:"ds-src"},Yi={key:2,class:"ds-src ds-wf-charged"},Hi={key:3,class:"ds-src"},Zi={key:4,class:"ds-src ds-wf-unmet"},Xi={key:5,class:"ds-src ds-wf-open"},Qi={key:6,class:"ds-src ds-wf-open-why"},Ji={key:7,class:"ds-src ds-wf-na"},ec={key:1,class:"ds-workflows"},tc=["disabled","onClick"],sc={key:0,class:"ds-src ds-wf-charge"},nc={key:2,class:"ds-workflows"},oc=["title","disabled","onClick"],ac={key:0,class:"ds-src ds-wf-charge"},_e="Open the document at the place this comes from",lc={__name:"deal-screen",setup(t){Js({title:"Screen a deal â Titleman"});const l=en(),i=tn(),{screen:r,omGridId:_,status:d,error:b,boxProfile:O,start:v,refresh:$,uploadDeal:E,addMarket:H,rentRollXlsx:G,icMemoDocx:K}=uo();O.value=bs(l.query.box);const y=A(()=>l.query.run||null),M=A(()=>{const c=l.query;return!c.om&&!c.rr?null:{omGridId:c.om||null,rentRollDocumentId:c.rr||null,t12DocumentId:c.t12||null,leaseGridId:c.leases||null}}),N=Q(!1),S=Q(""),L=async c=>{if(N.value)return;N.value=!0,S.value="";const u=await E(c);if(N.value=!1,!u){S.value=b.value;return}const C={om:u.omGridId,rr:u.rentRollDocumentId,t12:u.t12DocumentId,leases:u.leaseGridId};i.push({query:Object.fromEntries(Object.entries(C).filter(([,R])=>R))})},Y=$s,B=Vn;let D=null,oe=0;const Z=()=>{var C;clearTimeout(D);const c=y.value||M.value,u=Nl(oe,(C=r.value)==null?void 0:C.progress);!c||u===null||(D=setTimeout(async()=>{oe+=1,await $(yt.value?{...At(c),withMarket:!0}:c),Z()},u))},z=async()=>{var c;oe=0,y.value?(c=(await v(y.value)).errors)!=null&&c.length||Z():M.value&&(await $(M.value),Z())};dt(z),is(()=>clearTimeout(D)),Fe(()=>l.fullPath,()=>{O.value=bs(l.query.box),z()});const w=()=>{const c=y.value||M.value;if(c)return $(yt.value?{...At(c),withMarket:!0}:c)},T=A(()=>{var c;return((c=r.value)==null?void 0:c.buy_box)||null}),x=A(()=>{var c;return Al((c=r.value)==null?void 0:c.progress)}),k=A(()=>x.value&&T.value?{...T.value,headline:null}:T.value),P=A(()=>{var c;return ro((c=r.value)==null?void 0:c.not_in_documents,T.value)}),Ke=A(()=>{var c;return(((c=T.value)==null?void 0:c.criteria)||[]).filter(u=>["pass","fail","no_data"].includes(u.state))}),ze=A(()=>{var c;return(((c=T.value)==null?void 0:c.criteria)||[]).filter(u=>!["pass","fail","no_data"].includes(u.state))}),J=A(()=>{var c;return((c=r.value)==null?void 0:c.noi)||null}),ne=A(()=>{var c;return((c=r.value)==null?void 0:c.rent_roll)||null}),V=A(()=>{var c;return((c=r.value)==null?void 0:c.subject)||null}),he=A(()=>{var c;return Un((c=r.value)==null?void 0:c.reconciliation)}),Ce=A(()=>{var c;return Gn((c=r.value)==null?void 0:c.market)}),F=A(()=>{var c;return Zn((c=r.value)==null?void 0:c.step1)}),Mt=A(()=>{var c,u;return Qn((c=F.value)==null?void 0:c.ledger,{defaultBuyBox:((u=r.value)==null?void 0:u.buy_box_saved)===!1})}),It=c=>{var u;return(u=Be(c))!=null&&u.tone?`ds-calc--${Be(c).tone}`:""},Ze=A(()=>{var c;return eo((c=r.value)==null?void 0:c.market_preview)}),mt=A(()=>{var c,u;return so((u=(c=r.value)==null?void 0:c.facts)==null?void 0:u.size)}),Lt=A(()=>{var c;return oo((c=r.value)==null?void 0:c.your_comps_preview)}),Ye=A(()=>{var c;return lo((c=r.value)==null?void 0:c.your_comps)}),pt=Q(!1),Es=async()=>{var u;const c=(u=F.value)==null?void 0:u.email;if(c!=null&&c.body)try{await navigator.clipboard.writeText(`Subject: ${c.subject} 3 4${c.body}`),pt.value=!0,setTimeout(()=>{pt.value=!1},2e3)}catch{pt.value=!1}},{definitions:Xe,loadDefinitions:Ms,saveDefinition:Is,startRun:Ls,run:Ee,loadAddressProducts:Ds,loadStepKinds:js,loadProductCharge:Jt,loadRunCharged:es}=$n(),He=Q([]),bt=A(()=>He.value.includes("deal_screen")?wn(Xe.value):[]),Qe=A(()=>xn(Xe.value,He.value)),Dt=Q([]),ts=A(()=>He.value.includes("deal_screen")?Cn(Xe.value,Dt.value):[]),Me=sn({hold_years:"",growth:"",exit_cap:"",sale_cost:""}),Bs={hold_years:"Hold, years",growth:"NOI growth, %/yr",exit_cap:"Exit cap, %"};let ss=!1;Fe(Xe,c=>
4{if(ss||!Array.isArray(c)||!c.length)return;ss=!0;const u=En(c);Object.keys(Me).forEach(C=>{Me[C]===""&&u[C]!==""&&(Me[C]=u[C])})},{immediate:!0});const Fs=A(()=>He.value.includes("deal_screen")?On(Xe.value,Dt.value,He.value,{uw:{...Me}}):[]),Je=Q(!1),et=A(()=>{var c,u;return Nn((u=(c=V.value)==null?void 0:c.address)==null?void 0:u.value)}),ve=Q(""),Ue=Q(""),be=A(()=>{var c;return In((c=Ee.value)==null?void 0:c.state)}),_t=Q("");Fe(()=>{var c,u;return[(c=Ee.value)==null?void 0:c.id,(u=Ee.value)==null?void 0:u.status]},async([c])=>{var C,R;if(!c||!Mn((R=(C=Ee.value)==null?void 0:C.definition)==null?void 0:R.graph)||!es){_t.value="";return}const u=Ln(await es(c));_t.value=u?u.key==="chain_charged"?`Charged so far: $${u.params.usd} (${u.params.credits} credits)`:"Nothing charged yet":""},{immediate:!0});const Ie=A(()=>Sn(y.value,M.value));let ns=!1;const os=async()=>{ns||!Ie.value||(ns=!0,Ms(),[He.value,Dt.value]=await Promise.all([js(),Ds()]))};dt(os),Fe(Ie,os);const ae=Q(null),tt=async c=>{var R,X,U,pe;if(ve.value||!Ie.value)return;if(c.paid&&((R=ae.value)==null?void 0:R.key)!==c.key){const le=c.definitionId&&Jt?await Jt(c.definitionId):null,m=Number(le==null?void 0:le.usd);ae.value={key:c.key,text:Tn(c.name,le),usd:Number.isFinite(m)&&m>0?m:null};return}ae.value=null,ve.value=c.key,Ue.value="";let u=c.definitionId;if(!u){const le=await Is({...c.replaceId?{id:c.replaceId}:{},name:c.name,description:c.description,graph:c.graph});if(u=le.ok?(X=le.definition)==null?void 0:X.id:null,!u){ve.value="",Ue.value=((U=le.errors)==null?void 0:U[0])||"The workflow could not be saved to your account.";return}}const C=await Ls(u,Ie.value);ve.value="",Ue.value=C.ok?`Started â${c.name}â.`:((pe=C.errors)==null?void 0:pe[0])||"The workflow was not started."},yt=Q(!1),st=Q(!1),nt=Q(null),qs=async()=>{const c=y.value||M.value;if(st.value||!c)return;st.value=!0;const u=await H(c);nt.value=no(u),nt.value.ok&&(yt.value=!0),st.value=!1},Ve=Q(""),Ps=async c=>{const u=y.value||M.value;if(Ve.value||!u)return;Ve.value=c;const C=await(c==="memo"?K(u):G(u));Ve.value="",C&&window.open(C,"_blank","noopener")},{dealScreenSourcePaneEnabled:ht}=nn(),jt=c=>(Array.isArray(c)?c[0]:c)||null,as=()=>jt(l.query.om)||(y.value?_.value:null),se=c=>ht.value?Bn(c,as()):null,Le=(c,u)=>ht.value?Rn(c,u,jt(l.query.leases)):null,kt=Dn(),{isMobileApp:Bt}=Yt(),ce=A(()=>!!(Bt!=null&&Bt.value)),ft=A(()=>!!kt.view.value),Ft=Q(null);let vt=null;const Rs=c=>{var C,R,X;const u=(R=(C=c==null?void 0:c.target)==null?void 0:C.closest)==null?void 0:R.call(C,".ds-cite, .ds-cite-badge");u&&!((X=Ft.value)!=null&&X.contains(u))&&(vt=u)},qt=()=>kt.closeOutput(),Pt=Q("");Fe(ft,async c=>{var C,R,X,U;if(c){await Wt(),(U=(X=(R=(C=Ft.value)==null?void 0:C.querySelector)==null?void 0:R.call(C,'.ao-vh [aria-label="Close"]'))==null?void 0:X.focus)==null||U.call(X);return}Pt.value="";const u=vt;vt=null,u&&typeof u.focus=="function"&&u.isConnected!==!1&&u.focus()}),dt(()=>{qt(),rs()}),is(qt),Fe(()=>l.fullPath,()=>{vt=null,Rt=!1,qt()});const gt=A(()=>{var c,u,C,R,X;return ht.value?qn({...((c=r.value)==null?void 0:c.facts)||{},noi:((C=(u=r.value)==null?void 0:u.facts)==null?void 0:C.noi)||((X=(R=r.value)==null?void 0:R.noi)==null?void 0:X.om_noi)},as()):[]}),$t=A(()=>Dl(r.value,F.value).map(c=>({...c,opens:ht.value&&(c.calc?!0:!!se(c.src))}))),Us=A(()=>{var c,u;return Ll((c=r.value)==null?void 0:c.progress,(u=r.value)==null?void 0:u.rent_roll)}),Vs=A(()=>jl(F.value,he.value)),Ws=A(()=>{var c,u,C,R;return((u=(c=V.value)==null?void 0:c.name)==null?void 0:u.value)||((R=(C=V.value)==null?void 0:C.address)==null?void 0:R.value)||"Screen a deal"}),Gs=A(()=>{var R,X,U,pe,le;const c=V.value||{},u=[(R=c.name)!=null&&R.value?(X=c.address)==null?void 0:X.value:null,(U=c.asset_class)==null?void 0:U.value,(pe=mt.value)==null?void 0:pe.text],C=(le=r.value)==null?void 0:le.source_audit;return C&&Number(C.figures)>0&&u.push(`${C.sourced} of ${C.figures} figures carry their source`),u.filter(Boolean).join(" · ")}),ot=A(()=>Il(r.value)),at={annual_rent:"Annual rent",security_deposit:"Deposit",lease_end:"Lease to",abatement_monthly:"Abatement / mo",claims:"Claims or defaults"},Ks=A(()=>{var R,X;const c=[],u=new Set,C=(U,pe,le=null)=>{const m=Vt(le||se(U),{figure:pe});!m||u.has(ut(m))||(u.add(ut(m)),c.push(m))};return $t.value.forEach(U=>{!U.calc&&U.src&&C(U.src,U.label)}
4),(((R=F.value)==null?void 0:R.figures)||[]).forEach(U=>{C(U.cite,U.label),U.om&&C(U.om.cite,`${U.label} (OM)`)}),gt.value.forEach(U=>C(null,U.label,U.target)),(((X=F.value)==null?void 0:X.discrepancies)||[]).forEach(U=>(U.sources||[]).forEach(pe=>C(pe.cite,U.headline))),ot.value.forEach(U=>U.cells.forEach(pe=>{pe.target&&C(null,`${U.tenant} â ${at[pe.key]}`,pe.target)})),c}),me=(c,u="")=>{const C=Vt(c,{figure:u});if(!C)return;const R=ut(C),X=Ks.value,U=X.findIndex(le=>ut(le)===R),pe=(U>=0?X:[C]).map(le=>({kind:"source",key:`src:${ut(le)}`,place:le}));kt.openOutput(pe,Math.max(U,0),"deal-screen")},ls=c=>{if(!c||!c.opens)return;if(Pt.value=c.key,!c.calc){me(se(c.src),c.label);return}const u=(c.calc.inputs||[]).map(R=>{const X=se(R);return{label:Pl(R),short:Qt(R),place:X?Vt(X):null}}),C=Fn({label:c.label,value:c.value,basis:c.calc.basis,from:c.calc.from,inputs:u});kt.openOutput([{kind:"source",key:`calc:${c.key}`,place:C}],0,"deal-screen")};let Rt=!1;const rs=()=>{const c=jt(l.query.cite);if(Rt||!c)return;const u=$t.value.find(C=>C.key===c&&C.opens);u&&(Rt=!0,ls(u))};Fe($t,rs);const lt=A(()=>y.value&&F.value&&et.value&&ts.value.find(c=>c.key==="underwriting_build")||null),we=A(()=>{const c=Fs.value[0]||null;return Ie.value&&F.value&&c&&(c.fromScreen||et.value)?c:null}),us=(c,u)=>{var C;return ve.value===c.key?"Startingâ¦":((C=ae.value)==null?void 0:C.key)===c.key?ae.value.usd?`Start â up to $${ae.value.usd.toFixed(2)}`:"Start â uses credits":u},zs=A(()=>[lt.value&&{key:"underwrite",label:us(lt.value,"Underwrite"),dark:!0,disabled:!!ve.value},we.value&&{key:"deck",label:us(we.value,"Build deck"),dark:!1,disabled:!!ve.value},{key:"memo",label:Ve.value==="memo"?"Writingâ¦":"IC memo (Word)",dark:!1,disabled:!!Ve.value},{key:"xlsx",label:Ve.value==="xlsx"?"Buildingâ¦":"Rent roll & T-12 in Excel",dark:!1,disabled:!!Ve.value}].filter(Boolean)),Ys=c=>{if(c==="underwrite"&<.value)tt(lt.value);else if(c==="deck"&&we.value){if(we.value.fromScreen&&(!Je.value||we.value.missing.length)){Je.value=!0;return}Je.value=!1,tt(we.value)}else(c==="memo"||c==="xlsx")&&Ps(c)},Hs=A(()=>{var u,C,R;return ae.value&&[(u=lt.value)==null?void 0:u.key,(C=we.value)==null?void 0:C.key].includes(ae.value.key)?ae.value.text:Je.value&&((R=we.value)!=null&&R.fromScreen)?we.value.missing.length?"Fill in your hold, growth and exit cap â the deckâs returns are built on them.":"Built at $0 from your documents and these assumptions â no product, no market section. Press «Build deck» again to start.":Ue.value&&!bt.value.length&&!Qe.value.length?Ue.value:""}),St=A(()=>ts.value.filter(c=>c.key!=="underwriting_build")),Zs=A(()=>!!Ie.value&&(bt.value.length>0||Qe.value.length>0||!!y.value&&!!F.value&&!!et.value&&St.value.length>0));return(c,u)=>{var U,pe,le;const C=na,R=wl,X=on;return n(),a("div",{class:q(["ds ts-tokens",{"ds--split":e(ft)&&!e(ce),"is-phone":e(ce)}]),onClickCapture:Rs},[e(r)?p("",!0):(n(),a("header",br,[...u[4]||(u[4]=[s("h1",null,"Screen a deal",-1),s("p",{class:"ds-sub"}," Your dealâs documents, checked against your buy box. Every number has a source; what the documents do not contain is listed, never guessed. ",-1)])])),!e(y)&&!e(M)?(n(),ke(C,{key:1,starting:e(N),error:e(S),onSubmit:L},null,8,["starting","error"])):e(d)==="starting"?(n(),a("p",_r,"Reading the documentsâ¦")):e(b)?(n(),a("p",yr,o(e(b)),1)):p("",!0),e(r)?(n(),a(f,{key:4},[rt(lr,{phone:e(ce),title:e(Ws),meta:e(Gs),chips:e(Us),numbers:e($t),conflicts:e(Vs),actions:e(zs),note:e(Hs),selected:e(ft)?e(Pt):"",onOpen:ls,onAction:Ys},{default:ye(()=>{var m,g,I;return[e(x)?(n(),a("p",hr,"Still reading your documents â the checks below are not final.")):p("",!0),e(Je)&&((m=e(we))!=null&&m.fromScreen)?(n(),a("div",kr,[(n(!0),a(f,null,j(e(An),ee=>(n(),a("label",{key:ee.key,class:q(["ds-uw-term",{missing:e(we).missing.includes(ee.key)}])},[h(o(Bs[ee.key])+" ",1),qe(s("input",{"onUpdate:modelValue":ue=>e(Me)[ee.key]=ue,type:"text",inputmode:"decimal",name:`uw_${ee.key}`},null,8,fr),[[Pe,e(Me)[ee.key]]])],2))),128)),s("label",vr,[u[5]||(u[5]=h("Sale costs, % (optional) ",-1)),qe(s("input",{"onUpdate:modelValue":u[0]||(u[0]=ee=>e(Me).sale_cost=ee),type:"text",inputmode:"decimal",name:"uw_sale_cost"},null,512),[[Pe,e(Me).sale_cost]])])])):p("",!0),!e(F)&&(e(r).verdict||e(r).headline)?(n(),a("div",gr,[s("div",$r,o(e(r).verdict),1),s("div",Sr,[s("strong",null,o(e(r).headline),1),e(r).key_risk?(n(),a("span",wr," · Key risk: "+o(e(r).key_risk.text),1)):p("",!0)]),e(r).source_audit?(n(),a("p",{key:0,class:q(["ds-note",{"ds-warn":(g=e(r).source_audit.unsourced)==null?void 0:g.length}])},[h(o(e(r).source_audit.sourced)+" of "+o(e(r).source_audit.figures)+" figures carry their source",1),(I=e(r).source_audit.unsourced)!=null&&I.length?(n(),a(f,{key:0},[h(" â without one: "+o(e(r).source_audit.unsourced.join(", ")),1)],64)):p("",!0),u[6]||(u[6]=h(". ",-1))],2)):p("",!0),u[7]||(u[7]=s("p",{class:"ds-note"},[h("Figures below come from your documents only. "),s("span",{class:"ds-calc"},"Our calculation"),h(" marks a number we computed from them.")],-1))])):p("",!0)]}),_:1},8,["phone","title","meta","chips","numbers","conflicts","actions","note","selected"]),s("div",xr,[rt(ge,{title:"Buy box",meta:e(Bl)(e(k)),phone:e(ce)},{default:ye(()=>[s("section",Cr,[rt(R,{box:e(k),onSaved:w},{default:ye(()=>{var m;return[e(F)&&((m=e(r).key_risk)!=null&&m.text)&&!e(x)?(n(),a("p",Or,"Key risk: "+o(e(r).key_risk.text),1)):p("",!0),s("table",Nr,[s("thead",null,[s("tr",null,[u[8]||(u[8]=s("th",null,"Criterion",-1)),s("th",null,o(e(r).buy_box_saved===!1?"Default threshold":"Your threshold"),1),u[9]||(u[9]=s("th",null,"This deal",-1)),u[10]||(u[10]=s("th",null,"Result",-1)),u[11]||(u[11]=s("th",null,"Source",-1))])]),s("tbody",null,[(n(!0),a(f,null,j(e(Ke),g=>(n(),a("tr",{key:g.id,class:q(`ds-row--${g.state}`)},[s("td",null,o(g.label),1),s("td",null,o(g.threshold),1),s("td",null,[g.display&&!g.computed&&se(g.source)?(n(),a("button",{key:0,t
4ype:"button",class:"ds-cite",title:_e,onClick:I=>me(se(g.source))},o(g.display),9,Ar)):(n(),a(f,{key:1},[h(o(g.display||"â"),1)],64))]),s("td",null,[h(o(e(B)(g)),1),g.reason&&g.state!=="pass"&&g.reason.trim().toLowerCase()!==String(e(B)(g)).toLowerCase()?(n(),a("span",Tr," â "+o(g.reason),1)):p("",!0)]),s("td",Er,[g.state==="no_data"?(n(),a(f,{key:0},[h("Send: "+o(g.ask),1)],64)):(n(),a(f,{key:1},[g.computed?(n(),a("span",Mr,"Our calculation")):p("",!0),h(" "+o(e(Ae)(g)),1)],64))])],2))),128))])]),e(ze).length?(n(),a("p",Ir,[u[12]||(u[12]=h(" Not counted: ",-1)),(n(!0),a(f,null,j(e(ze),(g,I)=>(n(),a("span",{key:g.id},o(g.label)+" ("+o(e(Y)[g.state].toLowerCase())+")"+o(I<e(ze).length-1?", ":""),1))),128))])):p("",!0)]}),_:1},8,["box"])])]),_:1},8,["meta","phone"]),e(ne)?(n(),ke(ge,{key:0,title:"Rent roll",meta:e(Fl)(e(ne)),phone:e(ce)},{default:ye(()=>{var m,g,I,ee,ue,fe,Oe,De,je,W,re,wt;return[s("section",Lr,[s("dl",Dr,[u[15]||(u[15]=s("dt",null,"Occupancy",-1)),s("dd",null,[h(o(((m=e(ne).occupancy)==null?void 0:m.value)!=null?e(xe)(e(ne).occupancy.value,2):(g=e(ne).occupancy)==null?void 0:g.reason)+" ",1),((I=e(ne).occupancy)==null?void 0:I.value)!=null?(n(),a("span",jr,"Our calculation")):p("",!0)]),u[16]||(u[16]=s("dt",null,"Passing rent (annual)",-1)),s("dd",null,o(((ee=e(ne).passing_rent)==null?void 0:ee.value)!=null?e(te)(e(ne).passing_rent.value):(ue=e(ne).passing_rent)==null?void 0:ue.reason),1),u[17]||(u[17]=s("dt",null,"WALT",-1)),s("dd",null,o(((fe=e(ne).walt_years)==null?void 0:fe.value)!=null?`${Number(e(ne).walt_years.value).toFixed(2)} yrs`:(Oe=e(ne).walt_years)==null?void 0:Oe.reason),1),((De=e(ne).walt_to_break)==null?void 0:De.value)!=null?(n(),a(f,{key:0},[u[14]||(u[14]=s("dt",null,"WALT to the first break",-1)),s("dd",null,[h(o(Number(e(ne).walt_to_break.value).toFixed(2))+" yrs ",1),u[13]||(u[13]=s("span",{class:"ds-calc"},"Our calculation",-1)),s("div",Br,o(e(ne).walt_to_break.basis),1)])],64)):p("",!0),u[18]||(u[18]=s("dt",null,"Largest tenant",-1)),s("dd",null,o(((je=e(ne).top_tenant_share)==null?void 0:je.value)!=null?`${e(ne).top_tenant_share.tenant} â ${e(xe)(e(ne).top_tenant_share.value)} of rent`:(W=e(ne).top_tenant_share)==null?void 0:W.reason),1)]),(re=e(ne).passing_rent)!=null&&re.basis?(n(),a("p",Fr,o(e(ne).passing_rent.basis),1)):p("",!0),(wt=e(ne).expiry_profile)!=null&&wt.length?(n(),a("table",qr,[u[19]||(u[19]=s("thead",null,[s("tr",null,[s("th",null,"Lease expiry"),s("th",null,"SF"),s("th",null,"% of NRA"),s("th",null,"Annual rent"),s("th",null,"% of rent"),s("th",null,"Tenants")])],-1)),s("tbody",null,[(n(!0),a(f,null,j(e(ne).expiry_profile,Ne=>(n(),a("tr",{key:Ne.year,class:q({"ds-row--fail":Ne.pct_abr>=30})},[s("td",null,o(Ne.year),1),s("td",null,o(Ne.sf!=null?Math.round(Ne.sf).toLocaleString("en-US"):"â"),1),s("td",null,o(e(xe)(Ne.pct_nra)),1),s("td",null,o(e(te)(Ne.abr)),1),s("td",null,o(e(xe)(Ne.pct_abr)),1),s("td",null,o(Ne.tenants),1)],2))),128))])])):p("",!0),u[20]||(u[20]=s("p",{class:"ds-meta"},"Rent and area columns are our calculation from the rent roll.",-1))])]}),_:1},8,["meta","phone"])):p("",!0),e(F)?(n(),ke(ge,{key:1,title:"Figures from your documents",meta:e(fs)(e(J)),phone:e(ce)},{default:ye(()=>{var m,g,I,ee,ue,fe,Oe,De,je;return[s("section",Pr,[s("div",Rr,[(g=(m=e(V))==null?void 0:m.name)!=null&&g.value?(n(),a(f,{key:0},[s("strong",null,o(e(V).name.value),1),u[23]||(u[23]=h()),s("span",Ur,[u[21]||(u[21]=h("(",-1)),se(e(V).name.source)?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:u[1]||(u[1]=W=>me(se(e(V).name.source)))},o(e(Ae)(e(V).name)),1)):(n(),a(f,{key:1},[h(o(e(Ae)(e(V).name)),1)],64)),u[22]||(u[22]=h(")",-1))]),u[24]||(u[24]=h(" · ",-1))],64)):p("",!0),(ee=(I=e(V))==null?void 0:I.address)!=null&&ee.value?(n(),a(f,{key:1},[h(o(e(V).address.value)+" ",1),s("span",Vr,[u[25]||(u[25]=h("(",-1)),e(V).status==="bound_from_chat"?(n(),a(f,{key:0},[h("from your chat â not in the documents")],64)):se(e(V).address.source)?(n(),a("button",{key:1,type:"button",class:"ds-cite",title:_e,onClick:u[2]||(u[2]=W=>me(se(e(V).address.source)))},o(e(Ae)(e(V).address)),1)):(n(),a(f,{key:2},[h(o(e(Ae)(e(V).address)),1)],64)),u[26]||(u[26]=h(")",-1))])],64)):(n(),a(f,{key:2},[h("Address: not in the documents")],64)),(fe=(ue=e(V))==null?void 0:ue.asset_class)!=null&&fe.value?(n(),a("span",Wr,[h(" · "+o(e(V).asset_class.value),1),e(V).asset_class.computed?(n(),a(f,{key:0},[u[27]||(u[27]=s("span",{class:"ds-calc"},"Our calculation",-1)),u[28]||(u[28]=h()),s("span",Gr,"("+o(e(Ae)(e(V).asset_class))+")",1)],64)):p("",!0)])):p("",!0),e(mt)?(n(),a("span",Kr,[h(" · "+o(e(mt).text)+" ",1),s("span",zr,"("+o(e(mt).source)+")",1)])):p("",!0)]),(Oe=e(F).readFrom)!=null&&Oe.length?(n(),a("p",Yr,[h("Read from: "+o(e(F).readFrom.join(" · "))+".",1),e(Tt)(e(r).rent_roll)?(n(),a(f,{key:0},[h(" Rent roll as of "+o(e(Tt)(e(r).rent_roll))+".",1)],64)):p("",!0)])):p("",!0),e(r).source_audit?(n(),a("p",{key:1,class:q(["ds-note",{"ds-warn":(De=e(r).source_audit.unsourced)==null?void 0:De.length}])},[h(o(e(r).source_audit.sourced)+" of "+o(e(r).source_audit.figures)+" figures carry their source",1),(je=e(r).source_audit.unsourced)!=null&&je.length?(n(),a(f,{key:0},[h(" â without one: "+o(e(r).source_audit.unsourced.join(", ")),1)],64)):p("",!0),u[29]||(u[29]=h(". ",-1))],2)):p("",!0),u[33]||(u[33]=s("p",{class:"ds-note"},[h("Only your documents: no valuation, comps or market here. "),s("span",{class:"ds-calc"},"Our calculation"),h(" marks a number we computed from them.")],-1)),s("table",Hr,[s("thead",null,[s("tr",null,[u[30]||(u[30]=s("th",null,"Figure",-1)),u[31]||(u[31]=s("th",null,"From the documents",-1)),u[32]||(u[32]=s("th",null,"Source",-1)),e(F).hasOm?(n(),a("th",Zr,"The OM states")):p("",!0)])]),s("tbody",null,[(n(!0),a(f,null,j(e(F).figures,W=>(n(),a("tr",{key:W.key,class:q({"ds-row--fail":W.om&&W.om.value!==W.value})},[s("td",null,o(W.label),1),s("td",null,[se(W.cite)?(n(),a("button",{key:0,t
4ype:"button",class:"ds-cite",title:_e,onClick:re=>me(se(W.cite))},o(W.value),9,Xr)):(n(),a(f,{key:1},[h(o(W.value),1)],64)),e(Be)(W.status)?(n(),a("span",{key:2,class:q(["ds-calc",It(W.status)])},o(e(Be)(W.status).label),3)):W.computed?(n(),a("span",Qr,"Our calculation")):p("",!0)]),s("td",Jr,o(W.source),1),e(F).hasOm?(n(),a("td",eu,[W.om&&se(W.om.cite)?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:re=>me(se(W.om.cite))},o(W.om.value),9,tu)):(n(),a(f,{key:1},[h(o(W.om?W.om.value:"â"),1)],64)),W.om&&e(Be)(W.om.status)?(n(),a("span",{key:2,class:q(["ds-calc ds-calc--gap",It(W.om.status)])},o(e(Be)(W.om.status).label),3)):p("",!0),W.om?(n(),a("div",su,o(W.om.source),1)):p("",!0)])):p("",!0)],2))),128))])]),e(Mt)?(n(),a("p",{key:2,class:q(["ds-note",{"ds-warn":e(Mt).warn}])},o(e(Mt).text)+".",3)):p("",!0)])]}),_:1},8,["meta","phone"])):p("",!0),e(J)&&!e(F)?(n(),ke(ge,{key:2,title:"T-12 · NOI against the OM",meta:e(fs)(e(J)),phone:e(ce)},{default:ye(()=>{var m,g,I;return[s("section",nu,[s("dl",ou,[u[41]||(u[41]=s("dt",null,"OM states",-1)),s("dd",null,[e(J).om_noi&&se({document:"OM",...e(J).om_noi})?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:u[3]||(u[3]=ee=>me(se({document:"OM",...e(J).om_noi})))},o(e(te)(e(J).om_noi.value)),1)):(n(),a(f,{key:1},[h(o(e(J).om_noi?e(te)(e(J).om_noi.value):"â"),1)],64)),u[34]||(u[34]=h()),e(J).om_noi?(n(),a("span",au,"OM"+o(e(J).om_noi.page?` p.${e(J).om_noi.page}
4`:"")+o(e(J).om_noi.quote?` â â${e(J).om_noi.quote}â`:""),1)):p("",!0)]),u[42]||(u[42]=s("dt",null,"Recomputed from the operating statement",-1)),s("dd",null,[h(o(e(te)((m=e(J).recomputed)==null?void 0:m.value))+" ",1),u[35]||(u[35]=s("span",{class:"ds-calc"},"Our calculation",-1)),u[36]||(u[36]=h()),s("span",lu,o(((g=e(J).recomputed)==null?void 0:g.basis)||((I=e(J).recomputed)==null?void 0:I.reason)),1)]),e(J).rent_roll_noi?(n(),a(f,{key:0},[u[39]||(u[39]=s("dt",null,"Recomputed from today's rent roll",-1)),s("dd",null,[h(o(e(te)(e(J).rent_roll_noi.value))+" ",1),u[37]||(u[37]=s("span",{class:"ds-calc"},"Our calculation",-1)),u[38]||(u[38]=h()),s("span",ru,o(e(J).rent_roll_noi.basis||e(J).rent_roll_noi.reason),1)])],64)):p("",!0),e(J).diff!=null?(n(),a(f,{key:1},[u[40]||(u[40]=s("dt",null,"Difference",-1)),s("dd",null,[s("strong",null,o(e(te)(e(J).diff)),1),h(" ("+o(e(xe)(e(J).diff_pct))+")",1)])],64)):p("",!0)]),s("p",uu,o(e(J).reason),1)])]}),_:1},8,["meta","phone"])):p("",!0),e(gt).length?(n(),ke(ge,{key:3,title:"OM facts",meta:`${e(gt).length} figures, each with its page`,phone:e(ce)},{default:ye(()=>[s("ul",iu,[(n(!0),a(f,null,j(e(gt),m=>(n(),a("li",{key:m.key},[s("span",cu,o(m.label),1),s("button",{type:"button",class:"ds-cite",title:_e,onClick:g=>me(m.target,m.label)},o(m.display),9,du),s("span",mu,"p. "+o(m.page),1)]))),128))])]),_:1},8,["meta","phone"])):p("",!0),e(F)?(n(),ke(ge,{key:4,title:"Conflicts",meta:String(e(F).discrepancies.length),phone:e(ce)},{default:ye(()=>[s("section",pu,[s("p",bu,[s("strong",null,o(e(F).disagreeHeading),1)]),e(he)&&e(he).headline&&(e(he).dressedUp||e(he).flatteringBases.length)?(n(),a("p",_u,o(e(he).headline),1)):p("",!0),s("p",yu,"Ranked by "+o(e(F).rankedBy)+".",1),!e(F).discrepancies.length&&!e(x)?(n(),a("p",hu,o(e(F).notChecked.length?"No discrepancy in what could be checked â see what could not, below.":"No discrepancy between the documents read."),1)):p("",!0),s("ol",ku,[(n(!0),a(f,null,j(e(F).discrepancies,m=>(n(),a("li",{key:m.code},[s("strong",null,o(m.headline),1),m.text?(n(),a("div",fu,o(m.text),1)):p("",!0),m.impact?(n(),a("div",vu,o(m.impact),1)):p("",!0),(n(!0),a(f,null,j(m.citations,(g,I)=>{var ee,ue,fe;return n(),a("div",{key:I,class:"ds-src"},[se((ue=(ee=m.sources)==null?void 0:ee[I])==null?void 0:ue.cite)?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:Oe=>me(se(m.sources[I].cite))},o(g),9,gu)):(n(),a(f,{key:1},[h(o(g),1)],64)),e(Be)((fe=m.citationStatuses)==null?void 0:fe[I])?(n(),a("span",{key:2,class:q(["ds-calc ds-calc--gap",It(m.citationStatuses[I])])},o(e(Be)(m.citationStatuses[I]).label),3)):p("",!0)])}),128)),(n(!0),a(f,null,j(m.also,(g,I)=>(n(),a("div",{key:`also-${I}`,class:"ds-meta"},"Same gap: "+o(g.headline),1))),128))]))),128))])])]),_:1},8,["meta","phone"])):p("",!0),e(he)&&!e(F)?(n(),ke(ge,{key:5,title:"Conflicts",meta:String(e(he).findings.length),phone:e(ce)},{default:ye(()=>[s("section",$u,[s("p",{class:q(e(he).dressedUp?"ds-warn":"ds-meta")},o(e(he).headline),3),!e(he).findings.length&&!e(x)?(n(),a("p",Su,o(e(he).notChecked.length?"No discrepancy in what could be checked â see below what could not.":"No discrepancy between the documents read."),1)):(n(),a("table",wu,[u[43]||(u[43]=s("thead",null,[s("tr",null,[s("th",null,"Check"),s("th",null,"One document says"),s("th",null,"Another says"),s("th",null,"Difference"),s("th",null,"Why, and what to ask")])],-1)),s("tbody",null,[(n(!0),a(f,null,j(e(he).findings,m=>(n(),a("tr",{key:m.code,class:q({"ds-row--fail":m.flattersOm})},[s("td",null,o(m.title),1),s("td",null,[h(o(m.unit.startsWith("$")?e(te)(m.a.value):m.a.value),1),s("div",xu,[se(m.a.cite)?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:g=>me(se(m.a.cite))},o(m.a.label),9,Cu)):(n(),a(f,{key:1},[h(o(m.a.label),1)],64))])]),s("td",null,[h(o(m.unit.startsWith("$")?e(te)(m.b.value):m.b.value),1),s("div",Ou,[se(m.b.cite)?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:g=>me(se(m.b.cite))},o(m.b.label),9,Nu)):(n(),a(f,{key:1},[h(o(m.b.label),1)],64))])]),s("td",null,[h(o(m.unit.startsWith("$")?e(te)(m.diff):m.diff)+" ("+o(e(
4xe)(m.diffPct))+")",1),m.valueEffect?(n(),a("div",Au,"â "+o(e(te)(Math.abs(m.valueEffect)))+" of value",1)):p("",!0)]),s("td",null,[h(o(m.reason),1),s("div",Tu,o(m.question),1)])],2))),128))])])),e(he).notChecked.length?(n(),a("div",Eu,[u[44]||(u[44]=s("strong",null,"Not checked",-1)),s("ul",Mu,[(n(!0),a(f,null,j(e(he).notChecked,(m,g)=>(n(),a("li",{key:g},o(m),1))),128))])])):p("",!0)])]),_:1},8,["meta","phone"])):p("",!0),(U=e(r).leases)!=null&&U.length?(n(),ke(ge,{key:6,title:"Leases",meta:String(e(r).leases.length),phone:e(ce)},{default:ye(()=>[s("section",Iu,[s("table",Lu,[u[45]||(u[45]=s("thead",null,[s("tr",null,[s("th",null,"Tenant"),s("th",null,"Term to"),s("th",null,"Options"),s("th",null,"Early termination"),s("th",null,"Escalation"),s("th",null,"Document")])],-1)),s("tbody",null,[(n(!0),a(f,null,j(e(r).leases,(m,g)=>(n(),a("tr",{key:g},[s("td",null,o(e(Pn)(m)),1),s("td",null,[h(o(m.lease_end||"â"),1),e(Se)(m,"expiration_date")?(n(),a("span",Du,[Le(m,"expiration_date")?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:I=>me(Le(m,"expiration_date"))},o(e(Se)(m,"expiration_date")),9,ju)):(n(),a(f,{key:1},[h(o(e(Se)(m,"expiration_date")),1)],64))])):p("",!0)]),s("td",null,[h(o(m.options||"â"),1),e(Se)(m,"renewal_options")?(n(),a("span",Bu,[Le(m,"renewal_options")?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:I=>me(Le(m,"renewal_options"))},o(e(Se)(m,"renewal_options")),9,Fu)):(n(),a(f,{key:1},[h(o(e(Se)(m,"renewal_options")),1)],64))])):p("",!0)]),s("td",null,[h(o(m.early_termination==null?"â":m.early_termination==="true"?"yes":m.early_termination),1),e(Se)(m,"termination_right")?(n(),a("span",qu,[Le(m,"termination_right")?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:I=>me(Le(m,"termination_right"))},o(e(Se)(m,"termination_right")),9,Pu)):(n(),a(f,{key:1},[h(o(e(Se)(m,"termination_right")),1)],64))])):p("",!0)]),s("td",null,[h(o(m.escalation||"â"),1),e(Se)(m,"escalation")?(n(),a("span",Ru,[Le(m,"escalation")?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:I=>me(Le(m,"escalation"))},o(e(Se)(m,"escalation")),9,Uu)):(n(),a(f,{key:1},[h(o(e(Se)(m,"escalation")),1)],64))])):p("",!0)]),s("td",Vu,o(m.doc),1)]))),128))])])])]),_:1},8,["meta","phone"])):p("",!0),e(ot).length?(n(),ke(ge,{key:7,title:"Estoppels",meta:String(e(ot).length),phone:e(ce)},{default:ye(()=>[s("section",Wu,[e(ce)?(n(),a("ul",Zu,[(n(!0),a(f,null,j(e(ot),m=>(n(),a("li",{key:m.key,class:q(["ds-est-card",{"is-gap":m.gap}])},[s("strong",null,o(m.tenant),1),m.gap?(n(),a("div",Xu,o(m.gap),1)):p("",!0),s("dl",null,[(n(!0),a(f,null,j(m.cells,g=>(n(),a(f,{key:g.key},[s("dt",null,o(at[g.key]),1),s("dd",null,[h(o(g.value)+" ",1),g.target?(n(),a("button",{key:0,type:"button",class:"ds-cite ds-est-page",title:_e,onClick:I=>me(g.target,`${m.tenant} â ${at[g.key]}`)},o(g.locus),9,Qu)):g.locus?(n(),a("span",Ju,o(g.locus),1)):p("",!0)])],64))),128))]),s("span",ei,o(m.doc),1)],2))),128))])):(n(),a("table",Gu,[s("thead",null,[s("tr",null,[u[46]||(u[46]=s("th",null,"Tenant",-1)),(n(),a(f,null,j(at,(m,g)=>s("th",{key:g},o(m),1)),64)),u[47]||(u[47]=s("th",null,"Certificate",-1))])]),s("tbody",null,[(n(!0),a(f,null,j(e(ot),m=>(n(),a("tr",{key:m.key,class:q({"ds-row--estoppel-gap":m.gap})},[s("td",null,[h(o(m.tenant),1),m.gap?(n(),a("div",Ku,o(m.gap),1)):p("",!0)]),(n(!0),a(f,null,j(m.cells,g=>(n(),a("td",{key:g.key},[h(o(g.value),1),g.locus?(n(),a("span",zu,[g.target?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:I=>me(g.target,`${m.tenant} â ${at[g.key]}`)},o(g.locus),9,Yu)):(n(),a(f,{key:1},[h(o(g.locus),1)],64))])):p("",!0)]))),128)),s("td",Hu,o(m.doc),1)],2))),128))])]))])]),_:1},8,["meta","phone"])):p("",!0),e(F)?(n(),ke(ge,{key:8,title:"Not in the package · letter to the broker",meta:String(e(F).missing.length+e(P).length),phone:e(ce)},{default:ye(()=>[s("section",ti,[!e(F).missing.length&&!e(P).length?(n(),a("p",si,"Nothing missing among the documents read.")):p("",!0),s("ul",ni,[(n(!0),a(f,null,j(e(F).missing,(m,g)=>(n(),a("li",{key:`m${g}`},[h(o(m.what)+" ",1),s("span",oi,"Ask for: "+o(m.ask)+".",1)]))),128)),(n(!0),a(f,null,j(e(P),(m,g)=>(n(),a("li",{key:`g${g}`},[s("strong",null,o(m.what),1),h(" â "+o(m.reason)+". Send: "+o(m.send)+".",1)]))),128))]),e(F).notChecked.length?(n(),a("div",ai,[u[48]||(u[48]=s("strong",null,"Not checked",-1)),s("ul",li,[(n(!0),a(f,null,j(e(F).notChecked,(m,g)=>(n(),a("li",{key:g},o(m),1))),128))])])):p("",!0)]),s("section",ri,[s("h2",null,[u[49]||(u[49]=h("Letter to the broker ",-1)),s("button",{class:"ds-btn",type:"button",disabled:!e(F).email.body,onClick:Es},o(e(pt)?"Copied":"Copy"),9,ui)]),s("p",ii,"Subject: "+o(e(F).email.subject),1),s("pre",ci,o(e(F).email.body),1)])]),_:1},8,["meta","phone"])):p("",!0),e(F)?p("",!0):(n(),ke(ge,{key:9,title:"Questions for the broker · not in the documents",meta:String((((pe=e(r).questions)==null?void 0:pe.length)||0)+(((le=e(r).not_in_documents)==null?void 0:le.length)||0)),phone:e(ce)},{default:ye(()=>{var m,g;return[s("section",di,[(m=e(r).questions)!=null&&m.length?p("",!0):(n(),a("p",mi,"None raised by the documents read.")),s("ol",pi,[(n(!0),a(f,null,j(e(r).questions,(I,ee)=>(n(),a("li",{key:ee},[s("div",null,o(I.question),1),I.detail?(n(),a("div",bi,o(I.detail),1)):p("",!0),s("div",_i,[(n(!0),a(f,null,j(I.citations,(ue,fe)=>(n(),a("span",{key:fe}
4,[se(ue)?(n(),a("button",{key:0,type:"button",class:"ds-cite",title:_e,onClick:Oe=>me(se(ue))},o(e(ms)(ue)),9,yi)):(n(),a(f,{key:1},[h(o(e(ms)(ue)),1)],64)),ue.quote?(n(),a(f,{key:2},[h(" â â"+o(e(Ss)(ue.quote))+"â",1)],64)):p("",!0),h(o(fe<I.citations.length-1?"; ":""),1)]))),128))])]))),128))])]),(g=e(r).not_in_documents)!=null&&g.length?(n(),a("section",hi,[u[50]||(u[50]=s("h2",null,"Not in the documents",-1)),s("ul",ki,[(n(!0),a(f,null,j(e(r).not_in_documents,(I,ee)=>(n(),a("li",{key:ee},[s("strong",null,o(I.what),1),h(" â "+o(I.reason)+". Send: "+o(I.send)+".",1)]))),128))])])):p("",!0)]}),_:1},8,["meta","phone"])),rt(ge,{title:"The market (step 2, only when you ask)",meta:e(F)&&!e(Ce)?"not added":"",phone:e(ce)},{default:ye(()=>{var m,g,I,ee,ue,fe,Oe,De,je,W;return[e(F)&&!e(Ce)?(n(),a("section",fi,[e(Ze)?(n(),a("p",vi,o(e(Ze).sentence),1)):(g=(m=e(V))==null?void 0:m.address)!=null&&g.value?(n(),a("p",gi,"Nothing on file for "+o(e(V).address.value)+" yet.",1)):(n(),a("p",$i,"No address in the documents read â the market cannot be bound to this deal. Tell us the address, or send the OM page that states it.")),(I=e(Ze))!=null&&I.costarPrompt?(n(),a("p",Si,o(e(Ze).costarPrompt),1)):p("",!0),e(Lt)?(n(),a("p",{key:4,class:q(e(Lt).none?"ds-meta":"")},[u[51]||(u[51]=s("span",{class:"ds-calc"},"Your comps base",-1)),h(" "+o(e(Lt).sentence),1)],2)):p("",!0),(ue=(ee=e(V))==null?void 0:ee.address)!=null&&ue.value&&!((fe=e(Ze))!=null&&fe.noStreetAddress)?(n(),a("p",wi,[s("button",{class:"ds-btn",type:"button",disabled:e(st)||e(yt),onClick:qs},o(e(st)?"Askingâ¦":"Add the market"),9,xi)])):p("",!0),e(nt)?(n(),a("p",{key:6,class:q(e(nt).ok?"ds-meta":"ds-warn")},o(e(nt).text),3)):p("",!0),u[52]||(u[52]=s("p",{class:"ds-note"},"Market data is shown in its own section, apart from the figures above, and never mixed into them.",-1))])):p("",!0),e(Ye)?(n(),a("section",Ci,[s("h2",null,[h(o(e(Ye).heading)+" ",1),s("span",Oi,o(e(Ye).source),1)]),s("table",Ni,[u[53]||(u[53]=s("thead",null,[s("tr",null,[s("th",null,"Property"),s("th",null,"Tenant"),s("th",null,"SF"),s("th",null,"Rent"),s("th",null,"Term"),s("th",null,"Source")])],-1)),s("tbody",null,[(n(!0),a(f,null,j(e(Ye).rows,re=>(n(),a("tr",{key:re.key},[s("td",null,o(re.place),1),s("td",null,o(re.tenant),1),s("td",null,o(re.sf),1),s("td",null,o(re.rent),1),s("td",null,o(re.term),1),s("td",Ai,o(re.citation),1)]))),128))])]),e(Ye).note?(n(),a("p",Ti,o(e(Ye).note),1)):p("",!0),u[54]||(u[54]=s("p",{class:"ds-note"},"Your own documents, private to your organization â apart from the figures above and from market data.",-1))])):p("",!0),!e(F)||e(Ce)?(n(),a("section",Ei,[u[58]||(u[58]=s("h2",null,"Market (separate layer)",-1)),((Oe=e(V))==null?void 0:Oe.status)==="bound_from_chat"?(n(),a("p",Mi," The documents state no address. Market data will be bound to the address you gave in the chat: "+o(e(V).address.value)+" â please confirm it. Market figures are shown apart from document figures. ",1)):((De=e(V))==null?void 0:De.status)==="bound"?(n(),a("p",Ii,[h(" Market data will be bound to the address the documents state: "+o(e(V).address.value)+" ",1),s("span",Li,"("+o(e(Ae)(e(V).address))+")",1),u[55]||(u[55]=h(". Market figures are shown apart from document figures. ",-1))])):((je=e(V))==null?void 0:je.status)==="market_only"?(n(),a("p",Di,[h(" The documents give a place, not the property's street address: "+o(e(V).address.value)+" ",1),s("span",ji,"("+o(e(Ae)(e(V).address))+")",1),u[56]||(u[56]=h(". Market data for it would be the place's, not this deal's â send the street address (the OM page that states it) to bind the market to the deal. ",-1))])):p("",!0),e(Ce)?(n(),a(f,{key:3},[e(Ce).figures.length?(n(),a("table",Bi,[u[57]||(u[57]=s("thead",null,[s("tr",null,[s("th",null,"Found in open sources"),s("th",null,"Figure"),s("th",null,"Source"),s("th",null,"Date")])],-1)),s("tbody",null,[(n(!0),a(f,null,j(e(Ce).figures,re=>(n(),a("tr",{key:re.key},[s("td",null,o(re.label),1),s("td",null,o(re.value),1),s("td",Fi,o(re.source),1),s("td",qi,o(re.when),1)]))),128))])])):p("",!0),e(Ce).gaps.length?(n(),a("ul",Pi,[(n(!0),a(f,null,j(e(Ce).gaps,(re,wt)=>(n(),a("li",{key:wt},[s("strong",null,o(re.what),1),h(" â not found: "+o(re.reason),1)]))),128))])):p("",!0),e(Ce).note?(n(),a("p",Ri,o(e(Ce).note),1)):p("",!0)],64)):(W=e(V))!=null&&W.market_note?(n(),a("p",Ui,o(e(V).market_note),1)):(n(),a("p",Vi,"
4No address in the documents read â market data is not attached. Tell us the address, or send the OM page that states it."))])):p("",!0)]}),_:1},8,["meta","phone"]),e(Zs)?(n(),ke(ge,{key:10,title:"Workflows on these documents",phone:e(ce)},{default:ye(()=>[e(Ie)&&e(bt).length?(n(),a("section",Wi,[u[60]||(u[60]=s("span",null,"Run as a workflow on these documents:",-1)),(n(!0),a(f,null,j(e(bt),m=>(n(),a("button",{key:m.key,class:"ds-btn",type:"button",title:m.description,disabled:!!e(ve),onClick:g=>tt(m)},o(e(ve)===m.key?"Startingâ¦":m.name),9,Gi))),128)),e(Ue)?(n(),a("span",Ki,o(e(Ue)),1)):p("",!0),e(Ee)?(n(),a("span",zi,"Workflow run: "+o(e(Ee).status),1)):p("",!0),e(Ee)&&e(_t)?(n(),a("span",Yi,"· "+o(e(_t)),1)):p("",!0),e(be)?(n(),a("span",Hi,"Contract: "+o(e(be).closed)+" of "+o(e(be).of)+" questions answered",1)):p("",!0),e(be)&&e(be).unmet.length?(n(),a("span",Zi,"· not met: "+o(e(be).unmet.join("; ")),1)):p("",!0),e(be)&&e(be).open.length?(n(),a("span",Xi,"· still open: "+o(e(ds)(e(be).open)),1)):p("",!0),e(be)&&e(be).openReasons.length?(n(),a("span",Qi,"· why: "+o(e(be).openReasons.join("; ")),1)):p("",!0),e(be)&&e(be).notApplicable.length?(n(),a("span",Ji,[h("· does not apply here: "+o(e(ds)(e(be).notApplicable)),1),e(be).notApplicableReasons.length?(n(),a(f,{key:0},[h(" ("+o(e(be).notApplicableReasons.join("; "))+")",1)],64)):p("",!0)])):p("",!0),e(Ee)?(n(),ke(X,{key:8,class:"ds-btn",to:"/assistant"},{default:ye(()=>[...u[59]||(u[59]=[h("Open the chain",-1)])]),_:1})):p("",!0)])):p("",!0),e(Ie)&&e(Qe).length?(n(),a("section",ec,[u[61]||(u[61]=s("span",null,"Your chains on these documents:",-1)),(n(!0),a(f,null,j(e(Qe),m=>{var g;return n(),a("button",{key:m.key,class:"ds-btn",type:"button",disabled:!!e(ve),onClick:I=>tt(m)},o(e(ve)===m.key?"Startingâ¦":((g=e(ae))==null?void 0:g.key)===m.key?e(ae).usd?`Start â up to $${e(ae).usd.toFixed(2)}`:"Start â uses credits":m.name),9,tc)}),128)),e(ae)&&e(Qe).some(m=>m.key===e(ae).key)?(n(),a("span",sc,o(e(ae).text),1)):p("",!0)])):p("",!0),e(y)&&e(F)&&e(et)&&e(St).length?(n(),a("section",nc,[s("span",null,"After you have checked step 1 â run on "+o(e(et))+" (runs the product; uses credits):",1),(n(!0),a(f,null,j(e(St),m=>{var g;return n(),a("button",{key:m.key,class:"ds-btn",type:"button",title:m.description,disabled:!!e(ve),onClick:I=>tt(m)},o(e(ve)===m.key?"Startingâ¦":((g=e(ae))==null?void 0:g.key)===m.key?e(ae).usd?`Start â up to $${e(ae).usd.toFixed(2)}`:"Start â uses credits":m.name),9,oc)}),128)),e(ae)&&e(St).some(m=>m.key===e(ae).key)?(n(),a("span",ac,o(e(ae).text),1)):p("",!0)])):p("",!0)]),_:1},8,["phone"])):p("",!0)])],64)):p("",!0),e(ft)?(n(),a("div",{key:5,ref_key:"sourcePaneEl",ref:Ft,class:q(["ds-viewer",{"is-phone":e(ce)}]),role:"dialog","aria-label":"Source"},[rt(jn,{phone:e(ce)},null,8,["phone"])],2)):p("",!0)],34)}}},Cd=Ge(lc,[["__scopeId","data-v-3966fbd8"]]);export{Cd as default};
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.