@digital-blueprint/checkin-app
Version:
[GitHub Repository](https://github.com/digital-blueprint/checkin-app) | [npmjs package](https://www.npmjs.com/package/@digital-blueprint/checkin-app) | [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/checkin-app/) | [Checkin Bundle](https://github
54 lines (48 loc) • 23.5 kB
JavaScript
let e,t=e=>e;function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},n.apply(this,arguments)}
/*!
* License: LGPL-2.1-or-later
* Dependencies:
*
* @webcomponents/scoped-custom-element-registry: 0.0.9 (BSD-3-Clause)
* @dbp-toolkit/app-shell: 0.3.4 (LGPL-2.1-or-later)
* @dbp-toolkit/language-select: 0.3.2 (LGPL-2.1-or-later)
* @dbp-toolkit/common: 0.3.5 (LGPL-2.1-or-later)
* @dbp-toolkit/auth: 0.3.2 (LGPL-2.1-or-later)
* event-target-shim: 6.0.2 (MIT)
* @dbp-toolkit/notification: 0.3.2 (LGPL-2.1-or-later)
* @dbp-toolkit/theme-switcher: 0.0.6 (LGPL-2.1-or-later)
* path-to-regexp: 6.2.0 (MIT)
* universal-router: 9.1.0 (MIT)
* generateUrls: 9.1.0 (MIT)
* @dbp-toolkit/matomo: 0.2.7 (LGPL-2.1-or-later)
* @dbp-toolkit/qr-code-scanner: 0.3.3 (LGPL-2.1-or-later)
* async-mutex: 0.4.0 (MIT)
* select2: 4.0.13 (MIT)
* @lit/reactive-element: 1.6.1 (BSD-3-Clause)
* lit-element: 3.3.1 (BSD-3-Clause)
*/import{c as i,s as a,D as s,i as r}from"./notification.fWOMSAA9.es.js";var o={error:{"connection-to-server-refused":"Verbindungs zum Server verweigert!",summary:"Ein Fehler ist aufgetreten"},jsonld:{"api-documentation-server":"Verbindung zum apiDocumentation API Server {{apiDocUrl}} fehlgeschlagen!","error-api-server":"Verbindung zum API Server {{apiUrl}} fehlgeschlagen!","error-hydra-documentation-url-not-set":"Hydra apiDocumentation URL wurden für server {{apiUrl}} nicht gesetzt!"},"dbp-modal":{close:"Schließen"}},c={error:{"connection-to-server-refused":"Connection to server refused!",summary:"An error occurred"},jsonld:{"api-documentation-server":"Connection to apiDocumentation server {{apiDocUrl}} failed!","error-api-server":"Connection to api server {{apiUrl}} failed!","error-hydra-documentation-url-not-set":"Hydra apiDocumentation url was not set for server {{apiUrl}}!"},"dbp-modal":{close:"close"}};function h(){return i({en:c,de:o},"de","en")}var l={"check-in":{"already-checkin-body":"Sie sind hier bereits angemeldet. Sie können Ihre aktuelle Anmeldung verlängern oder sich bei diesem Ort abmelden.","already-checkin-title":"Bereits angemeldet!","checked-in-at":"{{clock}} Uhr am","data-protection":'Was macht die Universität mit Ihren Daten? Die genaueren Informationen zur App "check-in " finden Sie unter den Datenschutzerklärungen der Universität.',"error-body":"Es tut uns leid, etwas ist schief gelaufen.","error-title":"Fehler!","hash-false-body":"Der gescannte Raum existiert nicht, bitte wenden Sie sich an den IT-Support.","hash-false-title":"Raum existiert nicht!","how-to":"Scannen Sie den angebrachten QR-Code oder wählen Sie einen Ort manuell aus, um sich anzumelden. Im Risikofall werden Sie von der Universität per E-Mail kontaktiert.","invalid-input-body":"Ihre Eingabe war ungültig. Bitte probieren Sie es noch einmal.","invalid-input-title":"Ungültige Eingabe!","invalid-seatnr-body":"Die eingegebene Sitznummer existiert nicht. Bitte wenden Sie sich an den IT-Support oder geben Sie eine andere Sitznummer ein.","invalid-seatnr-title":"Falsche Sitznummer!","manual-checkin":"Bitte geben Sie den Namen des Ortes ein, an dem Sie sich anmelden möchten.","manually-button-text":"Ort manuell auswählen","manually-checkin-button-text":"Anmelden","manually-place":"Raum","manually-seat":"Sitzplatz","no-permission-body":"Sie haben keine Rechte diese Aktion durchzuführen. Bitte wenden Sie sich an den IT-Support","no-permission-title":"Keine Rechte","no-seatnr-body":"Der angegebene Raum hat keine Sitzplätze. Bitte machen Sie Ihre Anmeldung ohne Sitzplatznummer.","no-seatnr-title":"Raum hat keine Sitzplätze!","other-checkins-notification-body":'Sie haben eine weitere Anmeldung an einem anderen Ort. <a href="check-out-request" title="" target="_self" class="int-link-internal"><span>Zeige alle Anmeldungen</span></a>',"other-checkins-notification-body_plural":'Sie haben {{count}} weitere Anmeldungen an anderen Orten. <a href="check-out-request" title="" target="_self" class="int-link-internal"><span>Zeige alle Anmeldungen</span></a>',"other-checkins-notification-title":"Weitere Anmeldungen gefunden!","qr-button-text":"Mit QR Code anmelden","qr-false-body":"Dieser Code ist nicht für diese Applikation. Bitte benutzen Sie einen check-in QR-Code.","qr-false-title":"Falscher QR-Code!","refresh-button-text":"Anmeldung verlängern","refresh-failed-body":"Das Erneuern Ihrer Anmeldung ist fehlgeschlagen. Bitte versuchen Sie es noch mal.","refresh-failed-title":"Anmeldung verlängern fehlgeschlagen!",seatNr:"Sitzplatz","success-checkin-body":"Sie haben sich erfolgreich am Ort {{room}} angemeldet.","success-checkin-seat-body":"Sie haben sich erfolgreich am Ort {{room}} am Sitzplatz {{seat}} angemeldet.","success-checkin-title":"Erfolgreich angemeldet!","success-refresh-body":"Sie haben Ihre Anmeldung in {{room}} erfolgreich verlängert.","success-refresh-title":"Anmeldung erfolgreich verlängert!"},"check-in-place-select":{"login-required":"Anmeldung erforderlich",placeholder:'Z.B. "P1", "Rechbauerstraße", "PZ2EG048"'},"check-out":{"already-checked-out-body":"Es wurde keine aktive Anmeldung auf diesem Platz gefunden. Sie sind wahrscheinlich schon abgemeldet.","already-checked-out-title":"Keine Anmeldung gefunden!","button-text":"Abmelden","checkin-until":"Angemeldet bis:","checkout-failed-body":"Ihre Abmeldung bei {{room}} schlug fehl. Es tut uns leid, etwas ist schief gelaufen.","checkout-failed-title":"Abmeldung fehlgeschlagen!","checkout-success-body":"Sie haben sich erfolgreich vom Ort {{room}} abgemeldet.","checkout-success-title":"Erfolgreich abgemeldet!","loading-message":"Lädt...","no-checkins-message":"Sie sind derzeit an keinem Ort angemeldet."},"error-login-message":"Sie müssen eingeloggt sein um diese Funktion nutzen zu können!","guest-check-in":{"already-checkin-body":"Sie sind hier bereits angemeldet. Sie können sich hier erst wieder anmelden, wenn Ihre aktuelle Anmeldung abgelaufen ist.","already-checkin-title":"Bereits angemeldet!","data-protection":'Mit der Anmeldung bestätige ich, dass ich dem von mir angemeldeten Gast die Datenschutzerklärung zur App "check-in" zur Kenntnis gebracht habe.',email:"Email des Gastes","end-time":"Angemeldet bis","error-permission-message":"Sie müssen einen Bediensteten Account besitzen, um diese Funktion nutzen zu können!","how-to":"Melden Sie einen Gast ohne Universitätsaccount an einem Ort für die Dauer seines Besuchs an. Die Abmeldung erfolgt automatisch an dem angegebenen Zeitpunkt. Im Risikofall wird der Gast von der Universität per E-Mail kontaktiert.","invalid-email-address-body":"Die eingegebene E-Mail-Adresse entspricht keinem gültigen Format. Bitte prüfen Sie Ihre Eingabe und versuchen es erneut.","invalid-email-address-title":"Ungültige E-Mail-Adresse!","max-time-body":"Bitte geben Sie für die Abmeldung einen anderen Zeitpunkt ein.","max-time-title":"Zeitangabe zu hoch!","no-seatnr-body":"Es wurde kein Sitzplatz angegeben. Bitte Geben Sie eine Sitzplatz-Nummer ein.","no-seatnr-title":"Kein Sitzplatz angegeben!","no-time-body":"Bitte geben Sie eine Zeit für die Abmeldung an.","no-time-title":"Zeitangabe fehlt!","success-checkin-body":"Sie haben {{email}} erfolgreich angemeldet.","success-checkin-title":"Gast erfolgreich angemeldet!"},"report-risk":{text:"Sollten Sie als COVID-19-Verdachts- oder -Erkrankungsfall gelten, melden Sie sich bitte umgehend bei Ihrer Meldestelle!"}},d={"check-in":{"already-checkin-body":"You are already registered here. You can extend your current registration or check out at this location.","already-checkin-title":"Already checked in!","checked-in-at":"{{clock}} on ","data-protection":'What does the university do with your data? You can find more detailed information on the "check-in" app under the university\'s privacy policy.',"error-body":"We're sorry, something went wrong.","error-title":"Error!","hash-false-body":"The scanned room does not exist, please contact the local IT support.","hash-false-title":"Room doesn't exist!","how-to":"Scan the attached QR code or manually select a location to check in. In the event of a risk, you will be contacted by the university by email.","invalid-input-body":"Your input was invalid. Please try again.","invalid-input-title":"Invalid input!","invalid-seatnr-body":"The seat number entered does not exist. Please contact the local IT support. or enter a different seat number.","invalid-seatnr-title":"Invalid Seatnumber!","manual-checkin":"Please enter the name of the place where you want to register.","manually-button-text":"Select location manually","manually-checkin-button-text":"Check-in","manually-place":"Room","manually-seat":"Seat Number","no-permission-body":"You have no permissions to perform this action. Please contact the local IT support.","no-permission-title":"No permissions","no-seatnr-body":"The specified room has no seats. Please register without a seat number.","no-seatnr-title":"Room has no seats defined!","other-checkins-notification-body":'You have one more check-in at another location. <a href="check-out-request" title="" target="_self" class="int-link-internal"><span>Show all check-ins</span></a>',"other-checkins-notification-body_plural":'You have {{count}} more check-ins at other locations. <a href="check-out-request" title="" target="_self" class="int-link-internal"><span>Show all check-ins</span></a>',"other-checkins-notification-title":"More check-ins found!","qr-button-text":"Check-in with QR Code","qr-false-body":"This code is not for this application. Please use a check-in QR code.","qr-false-title":"Wrong QR-Code!","refresh-button-text":"Refresh check-in","refresh-failed-body":"Refreshing your check-in failed. Please try again.","refresh-failed-title":"Refresh check-in failed!",seatNr:"Seat","success-checkin-body":"You have successfully checked into {{room}}.","success-checkin-seat-body":"You have successfully checked into {{room}} at {{seat}}.","success-checkin-title":"Checked in!","success-refresh-body":"You have successfully extended your check-in in the {{room}}.","success-refresh-title":"Check-in extended successfully!"},"check-in-place-select":{"login-required":"Login required",placeholder:'E.g. "P1", "Rechbauerstraße", "PZ2EG048"'},"check-out":{"already-checked-out-body":"No active checkin was found at this location. You are probably already checked out.","already-checked-out-title":"No checkin found!","button-text":"Check-out","checkin-until":"Check-in until:","checkout-failed-body":"Your check-out from {{room}} failed. We're sorry, something went wrong.","checkout-failed-title":"Check-out failed!","checkout-success-body":"You have successfully checked out of the {{room}}.","checkout-success-title":"Successfully checked out!","loading-message":"Loading...","no-checkins-message":"You are currently not checked-in at any location."},"error-login-message":"You need to be logged in to use this function!","guest-check-in":{"already-checkin-body":"You are already registered here. You will not be able to register here again until your current registration has expired.","already-checkin-title":"Already checked in!","data-protection":'With the check-in I confirm that I have made the data protection declaration for the "check-in" app known to the guest I have checked in.',email:"Email of the guest","end-time":"Checked in until","error-permission-message":"You need to have a staff account to use this function!","how-to":"Check in a guest without a university account at a location for the duration of their visit. The check out takes place automatically at the specified time. In the event of a risk, the guest will be contacted by university by email.","invalid-email-address-body":"The e-mail address you entered does not correspond to a valid format. Please check your input and try again.","invalid-email-address-title":"Invalid e-mail address!","max-time-body":"Please enter a different time for check-out.","max-time-title":"Time too high!","no-seatnr-body":"No seat number was specified. Please enter a valid seat number.","no-seatnr-title":"No seat number specified!","no-time-body":"Please enter a time for check-out.","no-time-title":"Missing time!","success-checkin-body":"You have successfully checked in {{email}}.","success-checkin-title":"Guest checked in!"},"report-risk":{text:"If you are a suspected COVID-19 case or a case of illness, please report this immediately to your organization!"}};function u(){return i({en:d,de:l},"de","en")}const m=e=>{const t=document.createElement("pre"),n=document.createTextNode(e);return t.appendChild(n),t.innerHTML},y=e=>{var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""},k={handleXhrError(e,t,n,i="sad",s="de"){if("abort"===t)return;let r;const o=h();o.changeLanguage(s),void 0!==e.responseJSON&&void 0!==e.responseJSON["hydra:description"]?r=e.responseJSON["hydra:description"]:void 0!==e.responseJSON&&void 0!==e.responseJSON.detail?r=e.responseJSON.detail:(r=t,n&&(r+=" - "+n)),0===e.status&&(r=o.t("error.connection-to-server-refused")),a({summary:o.t("error.summary"),body:m(y(r)),icon:i,type:"danger"}),void 0!==this.sendSetPropertyEvent&&this.sendSetPropertyEvent("analytics-event",{category:"XhrError",action:r})},handleFetchError:async function(e,t="",n="sad",i="de"){if("AbortError"===e.name)return;let s;const r=h();r.changeLanguage(i);try{await e.json().then((t=>{s=void 0!==t["hydra:description"]?t["hydra:description"]:void 0!==t.detail?t.detail:e.statusText})).catch((()=>{s=void 0!==e.statusText?e.statusText:e}))}catch(t){"TypeError"===e.name&&(s=""!==e.message?e.message:r.t("error.connection-to-server-refused"))}a({summary:""===t?r.t("error.summary"):t,body:m(y(s)),icon:n,type:"danger"}),void 0!==this.sendSetPropertyEvent&&this.sendSetPropertyEvent("analytics-event",{category:"FetchError",action:""===t?s:t+": "+s})}},g=()=>{let e=(new Error).stack||"";return e=e.split("\n").map((function(e){return e.trim()})),e.splice("Error"===e[0]?2:1)};function p(e,t){return e}class b extends s{constructor(){super(),this.isSessionRefreshed=!1,this.auth={}}static get properties(){return n({},super.properties,{auth:{type:Object}})}connectedCallback(){super.connectedCallback(),this._loginStatus="",this._loginState=[]}_updateAuth(){this._loginStatus=this.auth["login-status"];let e=[this.isLoggedIn(),this.isLoading()];this._loginState.toString()!==e.toString()&&this.requestUpdate(),this._loginState=e}update(e){e.forEach(((e,t)=>{if("auth"===t)this._updateAuth()})),super.update(e)}isLoggedIn(){return void 0!==this.auth.person&&null!==this.auth.person}isLoading(){return"logged-out"!==this._loginStatus&&(!this.isLoggedIn()&&void 0!==this.auth.token)}async httpGetAsync(e,t){let n=await fetch(e,t).then((e=>{if(!e.ok)throw e;return e})).catch((e=>e));return n}async getActiveCheckIns(){let e;const t={method:"GET",headers:{"Content-Type":"application/ld+json",Authorization:"Bearer "+this.auth.token}};return e=await this.httpGetAsync(this.entryPointUrl+"/checkin/check-in-actions",t),e}async sendCheckOutRequest(e,t){let n,i={location:"/checkin/places/"+e,seatNumber:parseInt(t)};const a={method:"POST",headers:{"Content-Type":"application/ld+json",Authorization:"Bearer "+this.auth.token},body:JSON.stringify(i)};return n=await this.httpGetAsync(this.entryPointUrl+"/checkin/check-out-actions",a),n}async sendCheckInRequest(e,t){let n={location:"/checkin/places/"+e,seatNumber:parseInt(t)};const i={method:"POST",headers:{"Content-Type":"application/ld+json",Authorization:"Bearer "+this.auth.token},body:JSON.stringify(n)};return await this.httpGetAsync(this.entryPointUrl+"/checkin/check-in-actions",i)}async sendErrorAnalyticsEvent(e,t,n,i={}){let a={};try{a=await i.clone().json()}catch(e){}const s={status:i.status||"",url:i.url||"",description:a["hydra:description"]||"",room:n,stack:g().slice(1,6)};this.sendSetPropertyEvent("analytics-event",{category:e,action:t,name:JSON.stringify(s)})}async doCheckIn(e,t,n,i,a=!1,s=!1){const r=this._i18n;if(e.length<=0)return this.saveWrongHashAndNotify(r.t("check-in.error-title"),r.t("check-in.error-body"),e,t),void this.sendSetPropertyEvent("analytics-event",{category:i,action:"CheckInFailedNoLocationHash"});let o=await this.sendCheckInRequest(e,t);await this.checkCheckinResponse(o,e,t,n,i,a,s)}async checkCheckinResponse(e,t,n,i,s,r=!1,o=!1){const c=this._i18n;let h=e.status,l=await e.clone().json();switch(h){case 201:o&&(this.checkedInRoom=l.location.name,this.checkedInSeat=l.seatNumber,this.checkedInEndTime=l.endTime,this.identifier=l.identifier,this.agent=l.agent,this.stopQRReader(),this.isCheckedIn=!0,this._("#text-switch")._active="",i=l.location.name),r?(a({summary:c.t("check-in.success-refresh-title",{room:i}),body:c.t("check-in.success-refresh-body",{room:i}),type:"success",timeout:5}),this.sendSetPropertyEvent("analytics-event",{category:s,action:"RefreshSuccess",name:i})):"GuestCheckInRequest"===s?(a({summary:c.t("guest-check-in.success-checkin-title",{email:this.guestEmail}),body:c.t("guest-check-in.success-checkin-body",{email:this.guestEmail}),type:"success",timeout:5}),i=l.location.name,this._("#email-field").value="",this.guestEmail="",this._("#select-seat").value="",this.seatNr="",this.isEmailSet=!1):a({summary:c.t("check-in.success-checkin-title",{room:i}),body:""!==n?c.t("check-in.success-checkin-seat-body",{room:i,seat:n}):c.t("check-in.success-checkin-body",{room:i}),type:"success",timeout:5}),this.sendSetPropertyEvent("analytics-event",{category:s,action:"CheckInSuccess",name:i}),await this.checkOtherCheckins(t,n);break;case 400:this.saveWrongHashAndNotify(c.t("check-in.invalid-input-title"),c.t("check-in.invalid-input-body"),t,n),this.sendSetPropertyEvent("analytics-event",{category:s,action:"CheckInFailed400",name:i});break;case 403:this.saveWrongHashAndNotify(c.t("check-in.no-permission-title"),c.t("check-in.no-permission-body"),t,n),await this.sendErrorAnalyticsEvent(s,"CheckInFailed403",i,e);break;case 404:this.saveWrongHashAndNotify(c.t("check-in.hash-false-title"),c.t("check-in.hash-false-body"),t,n),this.sendSetPropertyEvent("analytics-event",{category:s,action:"CheckInFailed404",name:i});break;case 424:await this.sendErrorAnalyticsEvent(s,"CheckInFailed424",i,e),await this.checkErrorDescription(l["hydra:description"],t,n);break;default:this.saveWrongHashAndNotify(c.t("check-in.error-title"),c.t("check-in.error-body"),t,n),this.sendSetPropertyEvent("analytics-event",{category:s,action:"CheckInFailed",name:i})}}async checkErrorDescription(e,t,n){const i=this._i18n;switch(console.log(e),e){case"seatNumber must not exceed maximumPhysicalAttendeeCapacity of location!":case"seatNumber too low!":this.saveWrongHashAndNotify(i.t("check-in.invalid-seatnr-title"),i.t("check-in.invalid-seatnr-body"),t,n);break;case"Location doesn't have any seats activated, you cannot set a seatNumber!":this.saveWrongHashAndNotify(i.t("check-in.no-seatnr-title"),i.t("check-in.no-seatnr-body"),t,n);break;case"Location has seats activated, you need to set a seatNumber!":this.saveWrongHashAndNotify(i.t("guest-check-in.no-seatnr-title"),i.t("guest-check-in.no-seatnr-body"),t,n);break;case"There are already check-ins at the location with provided seat for the current user!":await this.checkOtherCheckins(t,n,!0);break;case"There are already check-ins at the location with provided seat for the email address!":a({summary:i.t("guest-check-in.already-checkin-title"),body:i.t("guest-check-in.already-checkin-body"),type:"warning",timeout:5});break;default:e.includes("The endDate can't be after ")&&a({summary:i.t("guest-check-in.max-time-title"),body:i.t("guest-check-in.max-time-body"),type:"danger",timeout:5})}}async checkOtherCheckins(e,t,n=!1){const i=this._i18n;let s=await this.getActiveCheckIns();if(200!==s.status)return void this.saveWrongHashAndNotify(i.t("check-in.error-title"),i.t("check-in.error-body"),e,t);let r=(await s.json())["hydra:member"];if(0===r.filter((n=>n.location.identifier===e&&n.seatNumber===(""===t?null:parseInt(t)))).length)return-1;if(this.checkinCount=r.length,r.length>1&&(this.status={summary:p("check-in.other-checkins-notification-title"),body:p("check-in.other-checkins-notification-body"),type:"warning",options:{count:r.length-1}}),!n)return;let o=r.filter((n=>n.location.identifier===e&&n.seatNumber===(""===t?null:parseInt(t))));1===o.length?(this.checkedInRoom=o[0].location.name,this.checkedInEndTime=o[0].endTime,this.checkedInSeat=o[0].seatNumber,this.stopQRReader(),this.isCheckedIn=!0,this._("#text-switch")._active="",a({summary:i.t("check-in.already-checkin-title"),body:i.t("check-in.already-checkin-body"),type:"warning",timeout:5})):this.saveWrongHashAndNotify(i.t("check-in.error-title"),i.t("check-in.error-body"),e,t)}saveWrongHashAndNotify(e,t,n,i){a({summary:e,body:t,type:"danger",timeout:5}),this.wrongHash&&this.wrongHash.push(n+"-"+i)}async refreshSession(e,t,n,i,s=!1){const r=this._i18n;let o=await this.sendCheckOutRequest(e,t);if(201!==o.status){if(424===o.status){if(-1===await this.checkOtherCheckins(this.locationHash,this.seatNumber))return this.sendSetPropertyEvent("analytics-event",{category:"CheckInRequest",action:"CheckOutFailedNoCheckin",name:this.checkedInRoom}),void await this.doCheckIn(e,t,n,i,!0,s)}a({summary:r.t("check-in.refresh-failed-title"),body:r.t("check-in.refresh-failed-body",{room:n}),type:"warning",timeout:5}),await this.sendErrorAnalyticsEvent("CheckInRequest","RefreshFailed",n,o)}else await this.doCheckIn(e,t,n,i,!0,s)}getReadableDate(e){const t=this._i18n;let n=new Date(e),i=n.getMonth()+1;return t.t("check-in.checked-in-at",{clock:n.getHours()+":"+("0"+n.getMinutes()).slice(-2)})+" "+n.getDate()+"."+i+"."+n.getFullYear()}async checkCheckoutResponse(e,t,n,i,s,r=null,o=function(){}){const c=this._i18n;if(201===e.status)a({summary:c.t("check-out.checkout-success-title"),body:c.t("check-out.checkout-success-body",{room:i}),type:"success",timeout:5}),this.sendSetPropertyEvent("analytics-event",{category:s,action:"CheckOutSuccess",name:i}),o(r);else if(424===e.status){-1===await this.checkOtherCheckins(t,n)&&(this.sendSetPropertyEvent("analytics-event",{category:s,action:"CheckOutFailedNoCheckin",name:i}),o(r),a({summary:c.t("check-out.already-checked-out-title"),body:c.t("check-out.already-checked-out-body",{room:i}),type:"warning",timeout:5}))}else a({summary:c.t("check-out.checkout-failed-title"),body:c.t("check-out.checkout-failed-body",{room:i}),type:"warning",timeout:5}),await this.sendErrorAnalyticsEvent(s,"CheckOutFailed",this.checkedInRoom,e)}}function f(){return r(e||(e=t`
h2:first-child {
margin-top: 0;
}
h2 {
margin-bottom: 10px;
}
.border {
margin-top: 2rem;
border-top: var(--dbp-border);
}
.container {
margin-top: 2rem;
}
.loading {
text-align: center;
display: flex;
padding: 30px;
}
only screen and (orientation: portrait) and (max-width: 768px) {
.inline-block {
width: 100%;
}
}
`))}class v{constructor(e){this._data=e}getName(e){var t;let n=this._data.name;return null!=(t=n[e])?t:n.en}getDescription(e){var t;let n=this._data.description;return null!=(t=n[e])?t:n.en}}export{v as A,b as D,u as c,k as e,f as g};
//# sourceMappingURL=activity.pxR99eKk.es.js.map