1import{y as Z,z as ve,A as ye,R as k,D as Ee,r as q,e as be,j as f,L as J}from"./vendor-_AfItP6J.js";import{g as pe}from"./index-BbP3371Q.js";import{c as Ae,B as N}from"./Button-BE2btxPp.js";import{S as K}from"./Skeleton-D3x9ax42.js";import{P as Ce,o as ee}from"./useSavedState-ijMRsriL.js";import{B as te,P as re,z as I,R as Se}from"./ZeladoriaMaintenance-DIk2KorX.js";import{u as Oe}from"./index-Np9uNKXK.js";import{s as E,C as Pe}from"./zeladoriaPhoto-nUcmPHWi.js";import{W as je}from"./wifi-off-ooqLQeXl.js";import"./Input-DQtN42FO.js";import"./listPagination-NppUUHWX.js";import"./Select-ByDs1dDb.js";import"./Combination-Bkgh0AjG.js";import"./FullscreenCamera-RLoXZLrr.js";import"./camera-CtlhRi-f.js";import"./Checkbox-BAkRDo5i.js";import"./EcoMetric-C5hJlCZ9.js";import"./map-pin-DA2ZrPVj.js";import"./clockSync-CkZKkFBp.js";import"./printer-C7wNmDR2.js";/** 2 * @license lucide-react v0.477.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const we=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],ne=Ae("LogIn",we);var U={exports:{}},B,ae;function Re(){if(ae)return B;ae=1;var o="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return B=o,B}var Y,oe;function xe(){if(oe)return Y;oe=1;var o=Re();function e(){}function r(){}return r.resetWarningCache=e,Y=function(){function t(d,a,i,s,l,u){if(u!==o){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}t.isRequired=t;function n(){return t}var c={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:e};return c.PropTypes=c,c},Y}var ie;function Le(){return ie||(ie=1,U.exports=xe()()),U.exports}var Ne=Le();const T=Z(Ne);var $,se;function Ie(){if(se)return $;se=1;function o(a){return a&&typeof a=="object"&&"default"in a?a.default:a}var e=ve(),r=o(e);function t(a,i,s){return i in a?Object.defineProperty(a,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[i]=s,a}function n(a,i){a.prototype=Object.create(i.prototype),a.prototype.constructor=a,a.__proto__=i}var c=!!(typeof window<"u"&&window.document&&window.document.createElement);function d(a,i,s){if(typeof a!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof i!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof s<"u"&&typeof s!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function l(u){return u.displayName||u.name||"Component"}return function(p){if(typeof p!="function")throw new Error("Expected WrappedComponent to be a React component.");var m=[],v;function y(){v=a(m.map(function(A){return A.props})),b.canUseDOM?i(v):s&&(v=s(v))}var b=(function(A){n(S,A);function S(){return A.apply(this,arguments)||this}S.peek=function(){return v},S.rewind=function(){if(S.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var D=v;return v=void 0,m=[],D};var j=S.prototype;return j.UNSAFE_componentWillMount=function(){m.push(this),y()},j.componentDidUpdate=function(){y()},j.componentWillUnmount=function(){var D=m.indexOf(this);m.splice(D,1),y()},j.render=function(){return r.createElement(p,this.props)},S})(e.PureComponent);return t(b,"displayName","SideEffect("+l(p)+")"),t(b,"canUseDOM",c),b}}return $=d,$}var _e=Ie();const He=Z(_e);/* 7object-assign 8(c) Sindre Sorhus 9@license MIT
10*/var z,ce;function ke(){if(ce)return z;ce=1;var o=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function t(c){if(c==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(c)}function n(){try{if(!Object.assign)return!1;var c=new String("abc");if(c[5]="de",Object.getOwnPropertyNames(c)[0]==="5")return!1;for(var d={},a=0;a<10;a++)d["_"+String.fromCharCode(a)]=a;var i=Object.getOwnPropertyNames(d).map(function(l){return d[l]});if(i.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(l){s[l]=l}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return z=n()?Object.assign:function(c,d){for(var a,i=t(c),s,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var u in a)e.call(a,u)&&(i[u]=a[u]);if(o){s=o(a);for(var p=0;p<s.length;p++)r.call(a,s[p])&&(i[s[p]]=a[s[p]])}}return i},z}var Me=ke();const Fe=Z(Me);var R={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},h={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(h).map(function(o){return h[o]});var g={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},F={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},M={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},De=Object.keys(F).reduce(function(o,e){return o[F[e]]=e,o},{}),qe=[h.NOSCRIPT,h.SCRIPT,h.STYLE],O="data-react-helmet",Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Be=function(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")},Ye=(function(){function o(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,r,t){return r&&o(e.prototype,r),t&&o(e,t),e}})(),C=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(o[t]=r[t])}return o},$e=function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)},le=function(o,e){var r={};for(var t in o)e.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t]);return r},ze=function(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o},G=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},We=function(e){var r=L(e,h.TITLE),t=L(e,M.TITLE_TEMPLATE);if(t&&r)return t.replace(/%s/g,function(){return Array.isArray(r)?r.join(""):r});var n=L(e,M.DEFAULT_TITLE);return r||n||void 0},Ge=function(e){return L(e,M.ON_CHANGE_CLIENT_STATE)||function(){}},W=function(e,r){return r.filter(function(t){return typeof t[e]<"u"}).map(function(t){return t[e]}).reduce(function(t,n){return C({},t,n)},{})},Qe=function(e,r){return r.filter(function(t){return typeof t[h.BASE]<"u"}).map(function(t){return t[h.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var c=Object.keys(n),d=0;d<c.length;d++){var a=c[d],i=a.toLowerCase();if(e.indexOf(i)!==-1&&n[i])return t.concat(n)}return t},[])},_=function(e,r,t){var n={};return t.filter(function(c){return Array.isArray(c[e])?!0:(typeof c[e]<"u"&&Je("Helmet: "+e+' should be of type "Array". Instead found type "'+Ue(c[e])+'"'),!1)}).map(function(c){return c[e]}).reverse().reduce(function(c,d){var a={};d.filter(function(p){for(var m=void 0,v=Object.keys(p),y=0;y<v.length;y++){var b=v[y],A=b.toLowerCase();r.indexOf(A)!==-1&&!(m===g.REL&&p[m].toLowerCase()==="canonical")&&!(A===g.REL&&p[A].toLowerCase()==="stylesheet")&&(m=A),r.indexOf(b)!==-1&&(b===g.INNER_HTML||b===g.CSS_TEXT||b===g.ITEM_PROP)&&(m=b)}if(!m||!p[m])return!1;var S=p[m].toLowerCase();return n[m]||(n[m]={}),a[m]||(a[m]={}),n[m][S]?!1:(a[m][S]=!0,!0)}
10).reverse().forEach(function(p){return c.push(p)});for(var i=Object.keys(a),s=0;s<i.length;s++){var l=i[s],u=Fe({},n[l],a[l]);n[l]=u}return c},[]).reverse()},L=function(e,r){for(var t=e.length-1;t>=0;t--){var n=e[t];if(n.hasOwnProperty(r))return n[r]}return null},Xe=function(e){return{baseTag:Qe([g.HREF,g.TARGET],e),bodyAttributes:W(R.BODY,e),defer:L(e,M.DEFER),encode:L(e,M.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:W(R.HTML,e),linkTags:_(h.LINK,[g.REL,g.HREF],e),metaTags:_(h.META,[g.NAME,g.CHARSET,g.HTTPEQUIV,g.PROPERTY,g.ITEM_PROP],e),noscriptTags:_(h.NOSCRIPT,[g.INNER_HTML],e),onChangeClientState:Ge(e),scriptTags:_(h.SCRIPT,[g.SRC,g.INNER_HTML],e),styleTags:_(h.STYLE,[g.CSS_TEXT],e),title:We(e),titleAttributes:W(R.TITLE,e)}},Q=(function(){var o=Date.now();return function(e){var r=Date.now();r-o>16?(o=r,e(r)):setTimeout(function(){Q(e)},0)}})(),ue=function(e){return clearTimeout(e)},Ve=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Q:pe.requestAnimationFrame||Q,Ze=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||ue:pe.cancelAnimationFrame||ue,Je=function(e){return console&&typeof console.warn=="function"&&console.warn(e)},H=null,Ke=function(e){H&&Ze(H),e.defer?H=Ve(function(){fe(e,function(){H=null})}):(fe(e),H=null)},fe=function(e,r){var t=e.baseTag,n=e.bodyAttributes,c=e.htmlAttributes,d=e.linkTags,a=e.metaTags,i=e.noscriptTags,s=e.onChangeClientState,l=e.scriptTags,u=e.styleTags,p=e.title,m=e.titleAttributes;X(h.BODY,n),X(h.HTML,c),et(p,m);var v={baseTag:x(h.BASE,t),linkTags:x(h.LINK,d),metaTags:x(h.META,a),noscriptTags:x(h.NOSCRIPT,i),scriptTags:x(h.SCRIPT,l),styleTags:x(h.STYLE,u)},y={},b={};Object.keys(v).forEach(function(A){var S=v[A],j=S.newTags,w=S.oldTags;j.length&&(y[A]=j),w.length&&(b[A]=v[A].oldTags)}),r&&r(),s(e,y,b)},me=function(e){return Array.isArray(e)?e.join(""):e},et=function(e,r){typeof e<"u"&&document.title!==e&&(document.title=me(e)),X(h.TITLE,r)},X=function(e,r){var t=document.getElementsByTagName(e)[0];if(t){for(var n=t.getAttribute(O),c=n?n.split(","):[],d=[].concat(c),a=Object.keys(r),i=0;i<a.length;i++){var s=a[i],l=r[s]||"";t.getAttribute(s)!==l&&t.setAttribute(s,l),c.indexOf(s)===-1&&c.push(s);var u=d.indexOf(s);u!==-1&&d.splice(u,1)}for(var p=d.length-1;p>=0;p--)t.removeAttribute(d[p]);c.length===d.length?t.removeAttribute(O):t.getAttribute(O)!==a.join(",")&&t.setAttribute(O,a.join(","))}},x=function(e,r){var t=document.head||document.querySelector(h.HEAD),n=t.querySelectorAll(e+"["+O+"]"),c=Array.prototype.slice.call(n),d=[],a=void 0;return r&&r.length&&r.forEach(function(i){var s=document.createElement(e);for(var l in i)if(i.hasOwnProperty(l))if(l===g.INNER_HTML)s.innerHTML=i.innerHTML;else if(l===g.CSS_TEXT)s.styleSheet?s.styleSheet.cssText=i.cssText:s.appendChild(document.createTextNode(i.cssText));else{var u=typeof i[l]>"u"?"":i[l];s.setAttribute(l,u)}s.setAttribute(O,"true"),c.some(function(p,m){return a=m,s.isEqualNode(p)})?c.splice(a,1):d.push(s)}),c.forEach(function(i){return i.parentNode.removeChild(i)}),d.forEach(function(i){return t.appendChild(i)}),{oldTags:c,newTags:d}},he=function(e){return Object.keys(e).reduce(function(r,t){var n=typeof e[t]<"u"?t+'="'+e[t]+'"':""+t;return r?r+" "+n:n},"")},tt=function(e,r,t,n){var c=he(t),d=me(r);return c?"<"+e+" "+O+'="true" '+c+">"+G(d,n)+"</"+e+">":"<"+e+" "+O+'="true">'+G(d,n)+"</"+e+">"},rt=function(e,r,t){return r.reduce(function(n,c){var d=Object.keys(c).filter(function(s){return!(s===g.INNER_HTML||s===g.CSS_TEXT)}).reduce(function(s,l){var u=typeof c[l]>"u"?l:l+'="'+G(c[l],t)+'"';return s?s+" "+u:u},""),a=c.innerHTML||c.cssText||"",i=qe.indexOf(e)===-1;return n+"<"+e+" "+O+'="true" '+d+(i?"/>":">"+a+"</"+e+">")},"")},Te=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[F[n]||n]=e[n],t},r)},nt=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[De[n]||n]=e[n],t},r)},at=function(e,r,t){var n,c=(n={key:r},n[O]=!0,n),d=Te(t,c);return[k.createElement(h.TITLE,d,r)]},ot=function(e,r){return r.map(function(t,n){var c,d=(c={key:n},c[O]=!0,c);return Object.keys(t).forEach(function(a){var i=F[a]||a;if(i===g.INNER_HTML||i===g.CSS_TEXT){var s=t.innerHTML||t.cssText;d.dangerouslySetInnerHTML={__html:s}}else d[i]=t[a]}),k.createElement(e,d)})},P=function(e,r,t){switch(e){case h.TITLE:return{toComponent:function(){return at(e,r.title,r.titleAttributes)},toString:function(){return tt(e,r.title,r.titleAttributes,t)}};case R.BODY:case R.HTML:return{toComponent:function(){return Te(r)},toString:function(){return he(r)}};default:return{toComponent:function(){return ot(e,r)},toString:function(){return rt(e,r,t)}}}},ge=function(e){var r=e.baseTag,t=e.bodyAttributes,n=e.encode,c=e.htmlAttributes,d=e.linkTags,a=e.metaTags,i=e.noscriptTags,s=e.scriptTags,l=e.styleTags,u=e.title,p=u===void 0?"":u,m=e.titleAttributes;return{base:P(h.BASE,r,n),bodyAttributes:P(R.BODY,t,n),htmlAttributes:P(R.HTML,c,n),link:P(h.LINK,d,n),meta:P(h.META,a,n),noscript:P(h.NOSCRIPT,i,n),script:P(h.SCRIPT,s,n),style:P(h.STYLE,l,
10n),title:P(h.TITLE,{title:p,titleAttributes:m},n)}},it=function(e){var r,t;return t=r=(function(n){$e(c,n);function c(){return Be(this,c),ze(this,n.apply(this,arguments))}return c.prototype.shouldComponentUpdate=function(a){return!ye(this.props,a)},c.prototype.mapNestedChildrenToProps=function(a,i){if(!i)return null;switch(a.type){case h.SCRIPT:case h.NOSCRIPT:return{innerHTML:i};case h.STYLE:return{cssText:i}}throw new Error("<"+a.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},c.prototype.flattenArrayTypeChildren=function(a){var i,s=a.child,l=a.arrayTypeChildren,u=a.newChildProps,p=a.nestedChildren;return C({},l,(i={},i[s.type]=[].concat(l[s.type]||[],[C({},u,this.mapNestedChildrenToProps(s,p))]),i))},c.prototype.mapObjectTypeChildren=function(a){var i,s,l=a.child,u=a.newProps,p=a.newChildProps,m=a.nestedChildren;switch(l.type){case h.TITLE:return C({},u,(i={},i[l.type]=m,i.titleAttributes=C({},p),i));case h.BODY:return C({},u,{bodyAttributes:C({},p)});case h.HTML:return C({},u,{htmlAttributes:C({},p)})}return C({},u,(s={},s[l.type]=C({},p),s))},c.prototype.mapArrayTypeChildrenToProps=function(a,i){var s=C({},i);return Object.keys(a).forEach(function(l){var u;s=C({},s,(u={},u[l]=a[l],u))}),s}
10,c.prototype.warnOnInvalidChildren=function(a,i){return!0},c.prototype.mapChildrenToProps=function(a,i){var s=this,l={};return k.Children.forEach(a,function(u){if(!(!u||!u.props)){var p=u.props,m=p.children,v=le(p,["children"]),y=nt(v);switch(s.warnOnInvalidChildren(u,m),u.type){case h.LINK:case h.META:case h.NOSCRIPT:case h.SCRIPT:case h.STYLE:l=s.flattenArrayTypeChildren({child:u,arrayTypeChildren:l,newChildProps:y,nestedChildren:m});break;default:i=s.mapObjectTypeChildren({child:u,newProps:i,newChildProps:y,nestedChildren:m});break}}}),i=this.mapArrayTypeChildrenToProps(l,i),i},c.prototype.render=function(){var a=this.props,i=a.children,s=le(a,["children"]),l=C({},s);return i&&(l=this.mapChildrenToProps(i,l)),k.createElement(e,l)},Ye(c,null,[{key:"canUseDOM",set:function(a){e.canUseDOM=a}}]),c})(k.Component),r.propTypes={base:T.object,bodyAttributes:T.object,children:T.oneOfType([T.arrayOf(T.node),T.node]),defaultTitle:T.string,defer:T.bool,encodeSpecialCharacters:T.bool,htmlAttributes:T.object,link:T.arrayOf(T.object),meta:T.arrayOf(T.object),noscript:T.arrayOf(T.object),onChangeClientState:T.func,script:T.arrayOf(T.object),style:T.arrayOf(T.object),title:T.string,titleAttributes:T.object,titleTemplate:T.string},r.defaultProps={defer:!0,encodeSpecialCharacters:!0},r.peek=e.peek,r.rewind=function(){var n=e.rewind();return n||(n=ge({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),n},t},st=function(){return null},ct=He(Xe,Ke,ge)(st),V=it(ct);V.renderStatic=V.rewind;async function lt(o){const e=await fetch(`/_api/zeladoria/room?token=${encodeURIComponent(o)}`,{credentials:"include"}),r=await e.json();if(!e.ok)throw new Error(r.error||"Não foi possÃvel abrir este quarto.");return r}const ut=o=>new Date(o+"T12:00:00Z").toLocaleDateString("pt-BR",{timeZone:"UTC"}),de=o=>new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short",timeZone:"America/Sao_Paulo"}).format(new Date(o));function Lt(){const{roomToken:o=""}=Ee(),e=o.toLowerCase(),{authState:r}=Oe(),[t,n]=q.useState(!1),[c,d]=q.useState(!1),[a,i]=q.useState(""),s=r.type==="authenticated"?r.user.id:0,l=be({queryKey:["zeladoria-room",e,s],enabled:r.type!=="loading"&&/^[a-f0-9]{16,64}$/.test(e),retry:!1,queryFn:async()=>{const m=`zeladoria-room:${s}:${e}`;try{const v=await lt(e);return v.access==="full"&&await ee.set(m,v,{ownerId:s,category:"zeladoria-room"}).catch(()=>{}),{data:v,cachedAt:null}}catch(v){const y=s?await ee.get(m).catch(()=>null):null;if(y&&!navigator.onLine)return{data:y.value,cachedAt:y.updatedAt};
10if(y&&v instanceof TypeError)return{data:y.value,cachedAt:y.updatedAt};throw v}}}),u=l.data?.data,p=l.data?.cachedAt??null;return f.jsxs("main",{className:E.qrPage,children:[f.jsx(V,{children:f.jsx("title",{children:"Quarto · Portal EcoagrÃcola"})}),r.type==="loading"||l.isLoading?f.jsxs(f.Fragment,{children:[f.jsx(K,{style:{height:120,borderRadius:12}}),f.jsx(K,{style:{height:220,borderRadius:12}})]}):!/^[a-f0-9]{16,64}$/.test(e)||l.isError?f.jsxs("section",{className:E.panel,role:"alert",children:[f.jsxs("h3",{children:[f.jsx(te,{})," Quarto não encontrado"]}),f.jsx("p",{className:E.hint,children:l.error instanceof Error?l.error.message:"O código desta etiqueta não é válido."}),l.isError&&/^[a-f0-9]{16,64}$/.test(e)&&f.jsx(N,{variant:"outline",loading:l.isFetching,loadingLabel:"Tentando novamente...",onClick:()=>void l.refetch(),children:"Tentar novamente"}),f.jsx(N,{asChild:!0,variant:"outline",children:f.jsx(J,{to:"/",children:"Abrir o Portal"})})]}):u?.access==="public"?f.jsxs(f.Fragment,{children:[f.jsxs("header",{className:E.qrHero,children:[f.jsx("small",{children:"EcoagrÃcola · Conservação Patrimonial e Obras"}),f.jsx("h1",{children:u.roomName}),f.jsx("p",{children:u.lodgingName})]}),t&&r.type==="unauthenticated"?f.jsx(Ce,{}):f.jsxs(f.Fragment,{children:[f.jsx(re,{token:e}),f.jsxs("section",{className:E.panel,children:[f.jsxs("h3",{children:[f.jsx(ne,{})," Conservação e Obras, RH ou gestão"]}),r.type==="authenticated"?f.jsx("p",{className:E.hint,children:"Seu perfil não tem acesso à lista de alojados."}):f.jsxs(f.Fragment,{children:[f.jsx("p",{className:E.hint,children:"Entre com seu CPF para ver quem está alojado e fazer a conferência."}),f.jsxs(N,{onClick:()=>n(!0),children:[f.jsx(ne,{size:16})," Entrar"]})]})]})]})]}):u?.access==="full"?f.jsxs(f.Fragment,{children:[f.jsxs("header",{className:E.qrHero,children:[f.jsxs("small",{children:[u.lodging.name,(()=>{const m=I.lodgingTypeOf(u.lodging);return m?` · ${I.lodgingTypeLabel[m]}`:""})()]}),f.jsx("h1",{children:u.room.name}),f.jsxs("p",{children:[u.occupants.length," de ",u.room.capacity," vaga(s) ocupada(s) · ",I.roomStatusLabel[u.room.status],u.room.lastCheckAt?` · conferido em ${de(u.room.lastCheckAt)}`:" · sem conferência"]})]}),p&&f.jsxs("div",{className:E.alert,children:[f.jsx(je,{}),"Sem internet. Lista sincronizada em ",de(p),"."]}),a&&f.jsx("div",{className:E.success,children:a}),c&&!p?f.jsx(Se,{room:{id:u.room.id,name:u.room.name,lodgingName:u.lodging.name},occupants:u.occupants,onCancel:()=>d(!1),onDone:m=>{d(!1),i(m),l.refetch()}}):f.jsxs(f.Fragment,{children:[f.jsxs("section",{className:E.panel,children:[f.jsxs("h3",{children:[f.jsx(te,{})," Alojados"]}),f.jsxs("div",{className:E.list,children:[u.occupants.map(m=>f.jsx("div",{className:E.listRow,children:f.jsxs("span",{children:[f.jsx("b",{children:m.name}),f.jsxs("small",{children:[m.bed?`Leito ${m.bed} · `:"",I.occupantDetail(m)," · entrada ",ut(m.startedOn),I.allocatedByText(m)]})]})},m.allocationId)),!u.occupants.length&&f.jsx("p",{className:E.empty,children:"Ninguém alocado neste quarto."})]})]}),u.canCheck&&f.jsxs(N,{size:"lg",disabled:!!p,onClick:()=>{i(""),d(!0)},children:[f.jsx(Pe,{size:18})," Iniciar conferência deste quarto"]}),u.canCheck&&p&&f.jsx("p",{className:E.hint,children:"A conferência precisa de internet para ser registrada."}),!p&&f.jsx(re,{token:e})]}),f.jsx(N,{asChild:!0,variant:"ghost",children:f.jsx(J,{to:"/",children:"Voltar ao Portal"})})]}):null]})}export{Lt 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.