1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cc6d52f6-d472-4644-9969-17909dd05d19",e._sentryDebugIdIdentifier="sentry-dbid-cc6d52f6-d472-4644-9969-17909dd05d19")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2038],{27703:(e,t,a)=>{a.d(t,{A:()=>s});let s=async(e,t,a)=>{var s;let l=await fetch(e,{method:"GET"});if(!l.ok)throw Error("Download failed: ".concat(l.status));let n=await l.blob(),i=window.URL.createObjectURL(new Blob([n],{type:a})),r=document.createElement("a");r.href=i,r.setAttribute("download",t),document.body.appendChild(r),r.click(),null==(s=r.parentNode)||s.removeChild(r)}},76689:(e,t,a)=>{a.d(t,{fE:()=>E,kg:()=>T,SX:()=>M,QC:()=>w.getFileExtension,u:()=>k,lc:()=>S,yU:()=>A});var s=a(80263),l=a(53239),n=a(79028),i=a(12805),r=a(94205),o=a(70260),c=a(23559),d=a(2974),m=a(491),u=a(4011),h=a(8074),x=a(9184),p=a(51275),b=a(12294),g=a(75825),w=a(93941),v=a(27703),y=a(73854);let f=["image/jpeg","image/jpg","image/png","image/gif","image/webp","image/svg+xml","image/bmp","image/ico","image/x-icon"],j=["jpg","jpeg","png","gif","webp","svg","bmp","ico","icon"],k=(e,t)=>!!(e&&f.includes(e.toLowerCase())||t&&j.includes(t.toLowerCase())),N=e=>{var t;return null!=(t=null==e?void 0:e.toLowerCase().startsWith("video/"))&&t},C=w.isPreviewableDocumentFile,L=(e,t,a)=>(0,w.isBrowserNativeDocFile)(t,a)?e:(0,w.isOfficeDocFile)(t,a)&&!e.startsWith("blob:")?"".concat("https://view.officeapps.live.com/op/view.aspx?src=").concat(encodeURIComponent(e)):void 0,S=(e,t,a)=>!!(k(e,t)||N(e))||(a?void 0!==L(a,e,t):C(e,t)),A=(e,t,a)=>{let s=L(e,t,a);return s?window.open(s,"_blank","noopener,noreferrer")?"opened":"blocked":"unsupported"},M="Your browser blocked the preview window. Allow pop-ups for this site or download the file instead.",E="The file could not be downloaded. Please try again.",T=e=>{let{open:t,onClose:a,items:w,initialIndex:f=0,onDownload:j}=e,{showErrorToast:L}=(0,y.d)(),[S,T]=(0,l.useState)(f),[D,O]=(0,l.useState)(1),[F,U]=(0,l.useState)(0),[I,R]=(0,l.useState)(!1),[_,B]=(0,l.useState)({x:0,y:0}),[P,X]=(0,l.useState)(!1),[Y,z]=(0,l.useState)({x:0,y:0}),[q,W]=(0,l.useState)(!1),[Z,G]=(0,l.useState)(!1),V=(0,l.useMemo)(()=>w.length?Math.min(Math.max(f,0),w.length-1):0,[f,w.length]);(0,l.useEffect)(()=>{t&&T(V)},[t,V]),(0,l.useEffect)(()=>{t&&(O(1),U(0),B({x:0,y:0}),W(!1),G(!1),X(!1))},[t,S]);let Q=w[S],H=k((null==Q?void 0:Q.contentType)||(null==Q?void 0:Q.mimeType),null==Q?void 0:Q.extension),J=N((null==Q?void 0:Q.contentType)||(null==Q?void 0:Q.mimeType)||void 0),K=C((null==Q?void 0:Q.contentType)||(null==Q?void 0:Q.mimeType),null==Q?void 0:Q.extension),$=w.length>1,ee=(0,l.useCallback)(()=>{$&&T(e=>(e+1)%w.length)},[$,w.length]),et=(0,l.useCallback)(()=>{$&&T(e=>(e-1+w.length)%w.length)},[$,w.length]),ea=(0,l.useCallback)(()=>{O(e=>Math.min(e+.25,5))},[]),es=(0,l.useCallback)(()=>{O(e=>Math.max(e-.25,.1))},[]),el=(0,l.useCallback)(()=>{U(e=>(e+90)%360)},[]),en=(0,l.useCallback)(()=>{O(1),U(0),B({x:0,y:0})},[]),ei=(0,l.useCallback)(()=>{R(e=>!e)},[]),er=(0,l.useCallback)(()=>{if(Q){if(j)return void j(Q);(0,v.A)(Q.url,Q.name,Q.contentType||Q.mimeType||"application/octet-stream").catch(()=>L(E))}},[Q,j,L]),eo=(0,l.useCallback)(()=>{Q&&"blocked"===A(Q.url,Q.contentType||Q.mimeType,Q.extension)&&L(M)},[Q,L]),ec=(0,l.useCallback)(e=>{e.preventDefault();let t=e.deltaY>0?-.25:.25;O(e=>Math.min(Math.max(e+t,.1),5))},[]),ed=(0,l.useCallback)(e=>{D>1&&(X(!0),z({x:e.clientX-_.x,y:e.clientY-_.y}))},[D,_]),em=(0,l.useCallback)(e=>{P&&D>1&&B({x:e.clientX-Y.x,y:e.clientY-Y.y})},[P,Y,D]),eu=(0,l.useCallback)(()=>{X(!1)},[]),eh=(0,l.useCallback)(()=>{W(!0),G(!1)},[]),ex=(0,l.useCallback)(()=>{W(!1),G(!0)},[]);(0,l.useEffect)(()=>{if(!t)return;let e=e=>{switch(e.key){case"Escape":a();break;case"ArrowRight":ee();break;case"ArrowLeft":et();break;case"+":case"=":H&&ea();break;case"-":H&&es();break;case"r":case"R":H&&el();break;case"0":H&&en()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,H,a,ee,et,ea,es,el,en]);let ep=Math.round(100*D);return t&&Q?(0,s.jsxs)(n.lG,{open:t,onClose:a,className:"relative z-50","data-sentry-element":"Dialog","data-sentry-component":"MediaLightbox","data-sentry-source-file":"MediaLightbox.tsx",children:[(0,s.jsx)(n.Xi,{className:(0,b.cn)("fixed inset-0 transition-opacity duration-300",I?"bg-black":"bg-black/80"),"data-sentry-element":"DialogBackdrop","data-sentry-source-file":"MediaLightbox.tsx"}),(0,s.jsxs)(n.Lj,{className:"fixed inset-0 flex flex-col","data-sentry-element":"DialogPanel","data-sentry-source-file":"MediaLightbox.tsx",children:[(0,s.jsxs)("div",{className:"flex-shrink-0 bg-midnight/95 text-white px-4 py-3 flex items-center justify-between gap-3 z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[(0,s.jsx)("h3",{className:"text-base font-semibold truncate",children:Q.name}),$&&(0,s.jsxs)("span",{className:"text-sm text-gray-300 flex-shrink-0",children:[S+1,"/",w.length]}),H&&q&&(0,s.jsxs)("span",{className:"text-sm text-gray-300 flex-shrink-0",children:[ep,"%"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[H&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.S,{onClick:es,className:"text-white hover:bg-white/10",title:"Zoom out (â)",children:(0,s.jsx)(i.A,{className:"w-5 h-5"})}),(0,s.jsx)(g.S,{onClick:ea,className:"text-white hover:bg-white/10",title:"Zoom in (+)",children:(0,s.jsx)(r.A,{className:"w-5 h-5"})}),(0,s.jsx)("div",{className:"w-px h-5 bg-gray-500 mx-1"}),(0,s.jsx)(g.S,{onClick:el,className:"text-white hover:bg-white/10",title:"Rotate (R)",children:(0,s.jsx)(o.A,{className:"w-5 h-5"})}),(0,s.jsx)(g.S,{onClick:ei,className:"text-white hover:bg-white/10",title:I?"
1Exit full screen":"Full screen",children:I?(0,s.jsx)(c.A,{className:"w-5 h-5"}):(0,s.jsx)(d.A,{className:"w-5 h-5"})}),(0,s.jsx)("div",{className:"w-px h-5 bg-gray-500 mx-1"}),(0,s.jsx)(g.S,{onClick:en,className:"text-white hover:bg-white/10 text-xs px-2",title:"Reset view (0)",children:"Reset"})]}),(0,s.jsx)("div",{className:"w-px h-5 bg-gray-500 mx-1"}),(0,s.jsx)(g.S,{onClick:er,className:"text-white hover:bg-white/10",title:"Download","data-sentry-element":"ButtonSquare","data-sentry-source-file":"MediaLightbox.tsx",children:(0,s.jsx)(m.A,{className:"w-5 h-5","data-sentry-element":"ArrowDownTrayIcon","data-sentry-source-file":"MediaLightbox.tsx"})}),(0,s.jsx)(g.S,{onClick:a,className:"text-white hover:bg-white/10",title:"Close (Esc)","data-sentry-element":"ButtonSquare","data-sentry-source-file":"MediaLightbox.tsx",children:(0,s.jsx)(u.A,{className:"w-5 h-5","data-sentry-element":"XMarkIcon","data-sentry-source-file":"MediaLightbox.tsx"})})]})]}),(0,s.jsxs)("div",{className:(0,b.cn)("relative flex-1 bg-black flex items-center justify-center overflow-hidden select-none",H&&D>1?"cursor-grab":"cursor-default",P&&"cursor-grabbing"),onWheel:H?ec:void 0,onMouseDown:H?ed:void 0,onMouseMove:H?em:void 0,onMouseUp:H?eu:void 0,onMouseLeave:H?eu:void 0,children:[!J&&!K&&(0,s.jsxs)(s.Fragment,{children:[!q&&!Z&&(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,s.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-4 border-white border-t-transparent"})}),Z&&(0,s.jsxs)("div",{className:"text-center text-white",children:[(0,s.jsx)("p",{className:"text-lg mb-2",children:"Failed to load image"}),(0,s.jsx)("p",{className:"text-sm text-gray-400",children:"The image could not be loaded. Try downloading it instead."})]}),(0,s.jsx)("img",{src:Q.url,alt:Q.name,onLoad:eh,onError:ex,draggable:!1,className:(0,b.cn)("max-w-full max-h-full object-contain transition-transform duration-200",!q&&"opacity-0",q&&"opacity-100"),style:{transform:"translate(".concat(_.x,"px, ").concat(_.y,"px) scale(").concat(D,") rotate(").concat(F,"deg)"),transformOrigin:"center center"}})]}),J&&(0,s.jsx)("video",{src:Q.url,controls:!0,className:"max-h-full max-w-full",children:"Your browser does not support the video tag."}),K&&(0,s.jsxs)("div",{className:"text-center text-white",children:[(0,s.jsx)("p",{className:"text-lg mb-4",children:Q.name}),(0,s.jsxs)(g.S,{onClick:eo,className:"text-white bg-white/10 hover:bg-white/20 px-3 gap-2",title:"Open in new tab",children:[(0,s.jsx)(h.A,{className:"w-5 h-5"}),"Open in new tab"]})]}),$&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"absolute left-4 top-1/2 -translate-y-1/2",children:(0,s.jsx)(g.S,{onClick:et,className:"text-white hover:bg-white/10 bg-white/5",title:"Previous (â)",children:(0,s.jsx)(x.A,{className:"w-6 h-6"})})}),(0,s.jsx)("div",{className:"absolute right-4 top-1/2 -translate-y-1/2",children:(0,s.jsx)(g.S,{onClick:ee,className:"text-white hover:bg-white/10 bg-white/5",title:"Next (â)",children:(0,s.jsx)(p.A,{className:"w-6 h-6"})})})]})]}),H&&q&&!I&&(0,s.jsxs)("div",{className:"flex-shrink-0 bg-midnight/80 text-gray-400 text-xs px-4 py-2 text-center",children:[(0,s.jsx)("span",{className:"mr-4",children:"Scroll to zoom"}),(0,s.jsx)("span",{className:"mr-4",children:"Drag to pan (when zoomed)"}),(0,s.jsxs)("span",{className:"mr-4",children:[(0,s.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-700 rounded",children:"R"})," Rotate"]}),(0,s.jsxs)("span",{className:"mr-4",children:[(0,s.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-700 rounded",children:"+"}),"/",(0,s.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-700 rounded",children:"â"})," Zoom"]}),(0,s.jsxs)("span",{children:[(0,s.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-700 rounded",children:"Esc"})," Close"]})]})]})]}):null}},92246:(e,t,a)=>{a.d(t,{c:()=>c});var s=a(80263),l=a(80380),n=a(66993),i=a(53239),r=a(80475),o=a(2297);let c=e=>{var t,a,c,d,m,u;let[h,x]=(0,i.useState)(""),p=(0,r.A)(h,100),[b,g]=(0,i.useState)([]),w=void 0!==e.value,v=!!e.multiple,y=(e.propertyIds||[]).filter(e=>"string"==typeof e&&""!==e),{data:f}=(0,l._c1)({variables:{where:{property:y.length>0?{id:{in:y}}:{},id:{in:e.defaultLeasesIds}}},skip:!(null==(t=e.defaultLeasesIds)?void 0:t.length)}),j=p.trim(),k={where:{property:y.length>0?{id:{in:y}}:{}},take:5,...j?{term:j}:{}}
1,N=(0,l._c1)({variables:k,skip:e.skipDefault&&!j||e.disabled}),C=null==(a=(0,o.S)(N).data)?void 0:a.leases,L=(0,i.useMemo)(()=>{var t;return e.disabled?[]:null!=(t=null==C?void 0:C.map(t=>{var a,s,l;return{id:t.id,label:e.getLabelOption?e.getLabelOption(t):(null==(a=t.tenant)?void 0:a.name)||"Unnamed Tenant",property:{id:null==(s=t.property)?void 0:s.id,name:(null==(l=t.property)?void 0:l.name)||"Unnamed Property"},unitsForActiveLease:t.unitsForActiveLease.map(e=>({id:e.id,name:e.name||"Unnamed Unit"}))}}))?t:[]},[C,e.getLabelOption,e.disabled]);(0,i.useEffect)(()=>{var t;!w&&(null==f||null==(t=f.leases)?void 0:t.length)&&g(f.leases.map(t=>{var a,s,l;return{id:t.id,label:e.getLabelOption?e.getLabelOption(t):(null==(a=t.tenant)?void 0:a.name)||"Unnamed Tenant",property:{id:null==(s=t.property)?void 0:s.id,name:(null==(l=t.property)?void 0:l.name)||"Unnamed Property"},unitsForActiveLease:t.unitsForActiveLease.map(e=>({id:e.id,name:e.name||"Unnamed Unit"}))}}))},[f,w,e.getLabelOption]);let S=(0,i.useCallback)((t,a,s)=>{let l=v?null!=a?a:[]:a?[a]:[];w||g(l),e.onChange(t,l,s)},[w,v,e]),A=w?null!=(c=e.value)?c:[]:b,M=v?A:null!=(d=A[0])?d:null;return(0,s.jsx)(n.u,{inputLabel:null!=(m=e.inputLabel)?m:"Select one or more leases",isOptionEqualToValue:(e,t)=>e.id===t.id,filterOptions:e=>e,placeholder:"Search leases",options:L,onChange:S,onInputChange:(e,t,a)=>{x(t)},defaultValue:void 0,value:M,multiple:v,clearOnBlur:!0,disableCloseOnSelect:e.disableCloseOnSelect,onChipClick:null!=(u=e.onChipClick)?u:void 0,disabled:e.disabled,"data-sentry-element":"CAutocomplete","data-sentry-component":"LeasesSearch","data-sentry-source-file":"LeasesSearch.tsx"})}}}]);
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.