window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.agent=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],o=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){this.agent.avatar&&(n.push('\n\n')),n.push('\n\n '),n.push(t(this.agent.name)),n.push("\n")}.call(this)}.call(e),e.safe=o,e.escape=s,n.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.chat=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],o=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push('
")}.call(this)}.call(e),e.safe=o,e.escape=s,n.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.customer_timeout=function(e){var t=[],n=(e=e||{}).safe,o=e.escape,o=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},o||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e;t.push('\n '),this.agent?(t.push("\n "),t.push(this.T("Since you didn't respond in the last %s minutes your conversation with
%s was closed.",this.delay,this.agent))):(t.push("\n "),t.push(this.T("Since you didn't respond in the last %s minutes your conversation was closed.",this.delay))),t.push("\n "),t.push('\n
\n
"),t.push(this.T("Start new conversation")),t.push("
\n
")}.call(this)}.call(e),e.safe=n,e.escape=o,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.loader=function(e){var t=[],n=(e=e||{}).safe,o=e.escape,o=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},o||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){t.push('\n \n \n \n\n'),t.push(this.T("Connecting")),t.push("")}.call(this)}.call(e),e.safe=n,e.escape=o,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.message=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],o=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push('\n "),n.push(this.message),n.push("\n
")}.call(this)}.call(e),e.safe=o,e.escape=s,n.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.status=function(e){var t=[],n=(e=e||{}).safe,o=e.escape,o=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},o||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){t.push('\n
\n '),t.push(this.status),t.push("\n
\n
")}.call(this)}.call(e),e.safe=n,e.escape=o,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.timestamp=function(e){function t(e){return e&&e.ecoSafe?e:void 0!==e&&null!=e?s(e):""}var n=[],o=(e=e||{}).safe,s=e.escape,s=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},s||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){n.push(''),n.push(t(this.label)),n.push(" "),n.push(t(this.time)),n.push("
")}.call(this)}.call(e),e.safe=o,e.escape=s,n.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.typingIndicator=function(e){var t=[],n=(e=e||{}).safe,o=e.escape,o=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},o||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){t.push('\n \n \n \n \n \n \n \n
')}.call(this)}.call(e),e.safe=n,e.escape=o,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.waiting_list_timeout=function(e){var t=[],n=(e=e||{}).safe,o=e.escape,o=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},o||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){var e;t.push('\n '),t.push(this.T("We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!")),t.push('\n
\n
"),t.push(this.T("Start new conversation")),t.push("
\n
")}.call(this)}.call(e),e.safe=n,e.escape=o,t.join("")},window.zammadChatTemplates||(window.zammadChatTemplates={}),window.zammadChatTemplates.waiting=function(e){var t=[],n=(e=e||{}).safe,o=e.escape,o=(e.safe=function(e){return e&&e.ecoSafe?e:(void 0!==e&&null!=e||(e=""),(e=new String(e)).ecoSafe=!0,e)},o||(e.escape=function(e){return(""+e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}));return function(){!function(){t.push('\n \n \n \n \n \n '),t.push(this.T("All colleagues are busy.")),t.push("
\n "),t.push(this.T("You are on waiting list position %s.",this.position)),t.push("\n
")}.call(this)}.call(e),e.safe=n,e.escape=o,t.join("")},function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).DOMPurify=t()}(this,function(){"use strict";function je(){for(var e=arguments.length,t=Array(e),n=0;n/gm),it=e(/^data-[\-\w.\u00B7-\uFFFF]/),at=e(/^aria-[\-\w]+$/),rt=e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lt=e(/^(?:\w+script|data):/i),ct=e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function $e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t"+e:n=(o=Re(e,/^[\r\n\t ]+/))&&o[0],u?u.createHTML(e):e);if(E===j)try{t=(new F).parseFromString(o,"text/html")}catch(e){}if(!t||!t.documentElement){t=i.createDocument(E,"template",null);try{t.documentElement.innerHTML=te?"":o}catch(e){}}return o=t.body||t.documentElement,e&&n&&o.insertBefore(s.createTextNode(n),o.childNodes[0]||null),E===j?K.call(t,C?"html":"body")[0]:C?t.documentElement:o}function Z(e){return Y.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT,null,!1)}function m(e){return"object"===(void 0===d?"undefined":Xe(d))?e instanceof d:e&&"object"===(void 0===e?"undefined":Xe(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}function X(e){var t;if(_("beforeSanitizeElements",e,null),!((n=e)instanceof P||n instanceof q||"string"==typeof n.nodeName&&"string"==typeof n.textContent&&"function"==typeof n.removeChild&&n.attributes instanceof N&&"function"==typeof n.removeAttribute&&"function"==typeof n.setAttribute&&"string"==typeof n.namespaceURI&&"function"==typeof n.insertBefore))return p(e),1;if(Re(e.nodeName,/[\u0080-\uFFFF]/))return p(e),1;var n=Me(e.nodeName);if(_("uponSanitizeElement",e,{tagName:n,allowedTags:b}),!m(e.firstElementChild)&&(!m(e.content)||!m(e.content.firstElementChild))&&Pe(/<[/\w]/g,e.innerHTML)&&Pe(/<[/\w]/g,e.textContent))return p(e),1;if("select"===n&&Pe(//i,t))Oe(i,e);else{T&&(t=He(t,f," "),t=He(t,y," "));var l=e.nodeName.toLowerCase();if(xe(l,r,t))try{a?e.setAttributeNS(a,i,t):e.setAttribute(i,t),Ie(c.removed)}catch(e){}}}_("afterSanitizeAttributes",e,null)}}function ee(e){var t,n=Z(e);for(_("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)_("uponSanitizeShadowNode",t,null),X(t)||(t.content instanceof R&&ee(t.content),$(t));_("afterSanitizeShadowDOM",e,null)}var te,g={},f=(c.isSupported="function"==typeof a&&i&&void 0!==i.createHTMLDocument&&9!==o,ot),y=st,ne=it,oe=at,se=lt,ie=ct,v=rt,b=null,ae=qe({},[].concat($e(Be),$e(Ue),$e(Ve),$e(Ye),$e(Qe))),w=null,re=qe({},[].concat($e(Ke),$e(Ge),$e(Je),$e(Ze))),S=null,le=null,ce=!0,de=!0,ue=!1,T=!1,C=!1,he=!1,pe=!1,z=!1,k=!1,me=!0,A=!1,ge=!0,fe=!0,L=!1,O={},x=null,ye=qe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ve=null,be=qe({},["audio","video","img","source","image","track"]),we=null,Se=qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Te="http://www.w3.org/1998/Math/MathML",Ce="http://www.w3.org/2000/svg",j="http://www.w3.org/1999/xhtml",E=j,D=null,ze=s.createElement("form"),ke=qe({},["mi","mo","mn","ms","mtext"]),Ae=qe({},["foreignobject","desc","title","annotation-xml"]),I=qe({},Ue),Le=(qe(I,Ve),qe(I,tt),qe({},Ye)),Oe=(qe(Le,nt),function(e,t){try{_e(c.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_e(c.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!w[e])if(z||k)try{p(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}}),_=function(e,t,n){g[e]&&De(g[e],function(e){e.call(c,t,n,D)})},xe=function(e,t,n){if(ge&&("id"===t||"name"===t)&&(n in s||n in ze))return!1;if((!de||le[t]||!Pe(ne,t))&&(!ce||!Pe(oe,t))){if(!w[t]||le[t])return!1;if(!we[t]&&!Pe(v,He(n,ie,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ne(n,"data:")||!ve[e])&&(!ue||Pe(se,He(n,ie,"")))&&n)return!1}return!0};return c.sanitize=function(e,t){var n,o=void 0,s=void 0,i=void 0;if("string"!=typeof(e=(te=!e)?"\x3c!--\x3e":e)&&!m(e)){if("function"!=typeof e.toString)throw je("toString is not a function");if("string"!=typeof(e=e.toString()))throw je("dirty is not a string, aborting")}if(!c.isSupported){if("object"===Xe(r.toStaticHTML)||"function"==typeof r.toStaticHTML){if("string"==typeof e)return r.toStaticHTML(e);if(m(e))return r.toStaticHTML(e.outerHTML)}return e}if(he||h(t),c.removed=[],!(L="string"==typeof e?!1:L))if(e instanceof d)1===(t=(o=J("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===t.nodeName||"HTML"===t.nodeName?o=t:o.appendChild(t);else{if(!z&&!T&&!C&&-1===e.indexOf("<"))return u&&A?u.createHTML(e):e;if(!(o=J(e)))return z?null:V}o&&pe&&p(o.firstChild);for(var a=Z(L?e:o);n=a.nextNode();)3===n.nodeType&&n===s||X(n)||(n.content instanceof R&&ee(n.content),$(n),s=n);if(s=null,L)return e;if(z){if(k)for(i=Q.call(o.ownerDocument);o.firstChild;)i.appendChild(o.firstChild);else i=o;return i=me?G.call(l,i,!0):i}t=C?o.outerHTML:o.innerHTML;return T&&(t=He(t,f," "),t=He(t,y," ")),u&&A?u.createHTML(t):t},c.setConfig=function(e){h(e),he=!0},c.clearConfig=function(){D=null,he=!1},c.isValidAttribute=function(e,t,n){D||h({});e=Me(e),t=Me(t);return xe(e,t,n)},c.addHook=function(e,t){"function"==typeof t&&(g[e]=g[e]||[],_e(g[e],t))},c.removeHook=function(e){g[e]&&Ie(g[e])},c.removeHooks=function(e){g[e]&&(g[e]=[])},c.removeAllHooks=function(){g={}},c}()});var extend=function(e,t){for(var n in t)hasProp.call(t,n)&&(e[n]=t[n]);function o(){this.constructor=e}return o.prototype=t.prototype,e.prototype=new o,e.__super__=t.prototype,e},hasProp={}.hasOwnProperty,bind=function(e,t){return function(){return e.apply(t,arguments)}},slice=[].slice;!function(S){var e,n,o,s,i,a,r;function l(e){var t,n,o;for(t in this.options={},n=this.defaults)o=n[t],this.options[t]=o;for(t in e)o=e[t],this.options[t]=o}function c(e){c.__super__.constructor.call(this,e),this.log=new o({debug:this.options.debug,logPrefix:this.options.logPrefix||this.logPrefix})}function d(){return this.log=bind(this.log,this),this.error=bind(this.error,this),this.notice=bind(this.notice,this),this.debug=bind(this.debug,this),d.__super__.constructor.apply(this,arguments)}function u(){return this.stop=bind(this.stop,this),this.start=bind(this.start,this),u.__super__.constructor.apply(this,arguments)}function h(){return this.ping=bind(this.ping,this),this.send=bind(this.send,this),this.reconnect=bind(this.reconnect,this),this.close=bind(this.close,this),this.connect=bind(this.connect,this),this.set=bind(this.set,this),h.__super__.constructor.apply(this,arguments)}function p(e){if(this.removeAttributes=bind(this.removeAttributes,this),this.startTimeoutObservers=bind(this.startTimeoutObservers,this),this.onCssLoaded=bind(this.onCssLoaded,this),this.setAgentOnlineState=bind(this.setAgentOnlineState,this),this.onConnectionEstablished=bind(this.onConnectionEstablished,this),this.setSessionId=bind(this.setSessionId,this),this.onConnectionReestablished=bind(this.onConnectionReestablished,this),this.reconnect=bind(this.reconnect,this),this.destroy=bind(this.destroy,this),this.onScrollHintClick=bind(this.onScrollHintClick,this),this.detectScrolledtoBottom=bind(this.detectScrolledtoBottom,this),this.onLeaveTemporary=bind(this.onLeaveTemporary,this),this.onAgentTypingEnd=bind(this.onAgentTypingEnd,this),this.onAgentTypingStart=bind(this.onAgentTypingStart,this),this.onQueue=bind(this.onQueue,this),this.onQueueScreen=bind(this.onQueueScreen,this),this.onWebSocketClose=bind(this.onWebSocketClose,this),this.onCloseAnimationEnd=bind(this.onCloseAnimationEnd,this),this.close=bind(this.close,this),this.toggle=bind(this.toggle,this),this.sessionClose=bind(this.sessionClose,this),this.onOpenAnimationEnd=bind(this.onOpenAnimationEnd,this),this.open=bind(this.open,this),this.renderMessage=bind(this.renderMessage,this),this.receiveMessage=bind(this.receiveMessage,this),this.onSubmit=bind(this.onSubmit,this),this.onInput=bind(this.onInput,this),this.onReopenSession=bind(this.onReopenSession,this),this.onError=bind(this.onError,this),this.onWebSocketMessage=bind(this.onWebSocketMessage,this),this.send=bind(this.send,this),this.onKeydown=bind(this.onKeydown,this),this.onPaste=bind(this.onPaste,this),this.onDrop=bind(this.onDrop,this),this.render=bind(this.render,this),this.view=bind(this.view,this),this.T=bind(this.T,this),p.__super__.constructor.call(this,e),"undefined"!=typeof jQuery&&this.options.target instanceof jQuery&&(this.log.notice("Chat: target option is a jQuery object. jQuery is not a requirement for the chat any more."),this.options.target=this.options.target.get(0)),this.isFullscreen=S.matchMedia&&S.matchMedia("(max-width: 768px)").matches,this.scrollRoot=this.getScrollRoot(),S.WebSocket&&sessionStorage)return this.options.chatId?(this.options.lang||(this.options.lang=document.documentElement.getAttribute("lang")),this.options.lang&&(this.translations[this.options.lang]||(this.log.debug("lang: No "+this.options.lang+" found, try first two letters"),this.options.lang=this.options.lang.replace(/-.+?$/,"")),this.log.debug("lang: "+this.options.lang)),this.options.host||this.detectHost(),this.loadCss(),this.io=new n(this.options),this.io.set({onOpen:this.render,onClose:this.onWebSocketClose,onMessage:this.onWebSocketMessage,onError:this.onError}),void this.io.connect()):(this.state="unsupported",void this.log.error("Chat: need chatId as option!"));this.state="unsupported",this.log.notice("Chat: Browser not supported!")}r=(r=document.getElementsByTagName("script"))[r.length-1],a=S.location.protocol.replace(":",""),r&&r.src&&(i=r.src.match(".*://([^:/]*).*")[1],a=r.src.match("(.*)://[^:/]*.*")[1]),l.prototype.defaults={debug:!1},extend(c,r=l),e=c,extend(d,r),d.prototype.debug=function(){var e=1<=arguments.length?slice.call(arguments,0):[];if(this.options.debug)return this.log("debug",e)},d.prototype.notice=function(){var e=1<=arguments.length?slice.call(arguments,0):[];return this.log("notice",e)},d.prototype.error=function(){var e=1<=arguments.length?slice.call(arguments,0):[];return this.log("error",e)},d.prototype.log=function(e,t){var n,o,s,i;if(t.unshift("||"),t.unshift(e),t.unshift(this.options.logPrefix),console.log.apply(console,t),this.options.debug){for(i="",o=0,s=t.length;o"+i+""+e.innerHTML:void 0}},o=d,extend(u,e),u.prototype.timeoutStartedAt=null,u.prototype.logPrefix="timeout",u.prototype.defaults={debug:!1,timeout:4,timeoutIntervallCheck:.5},u.prototype.start=function(){var e,t,n;return this.stop(),t=new Date,e=function(){var e=new Date-new Date(t.getTime()+1e3*n.options.timeout*60);if(n.log.debug("Timeout check for "+n.options.timeout+" minutes (left "+e/1e3+" sec.)"),!(e<0))return n.stop(),n.options.callback()},(n=this).log.debug("Start timeout in "+this.options.timeout+" minutes"),this.intervallId=setInterval(e,1e3*this.options.timeoutIntervallCheck*60)},u.prototype.stop=function(){if(this.intervallId)return this.log.debug("Stop timeout of "+this.options.timeout+" minutes"),clearInterval(this.intervallId)},s=u,extend(h,e),h.prototype.logPrefix="io",h.prototype.set=function(e){var t,n,o=[];for(t in e)n=e[t],o.push(this.options[t]=n);return o},h.prototype.connect=function(){var t,s,n,o;return this.log.debug("Connecting to "+this.options.host),this.ws=new S.WebSocket(""+this.options.host),this.ws.onopen=(t=this,function(e){return t.log.debug("onOpen",e),t.options.onOpen(e),t.ping()}),this.ws.onmessage=(s=this,function(e){var t,n,o=JSON.parse(e.data);for(s.log.debug("onMessage",e.data),t=0,n=o.length;tChat with us!",scrollHint:"Scroll down to see new messages",idleTimeout:6,idleTimeoutIntervallCheck:.5,inactiveTimeout:8,inactiveTimeoutIntervallCheck:.5,waitingListTimeout:4,waitingListTimeoutIntervallCheck:.5,onReady:void 0,onCloseAnimationEnd:void 0,onError:void 0,onOpenAnimationEnd:void 0,onConnectionReestablished:void 0,onSessionClosed:void 0,onConnectionEstablished:void 0,onCssLoaded:void 0},p.prototype.logPrefix="chat",p.prototype._messageCount=0,p.prototype.isOpen=!1,p.prototype.blinkOnlineInterval=null,p.prototype.stopBlinOnlineStateTimeout=null,p.prototype.showTimeEveryXMinutes=2,p.prototype.lastTimestamp=null,p.prototype.lastAddedType=null,p.prototype.inputDisabled=!1,p.prototype.inputTimeout=null,p.prototype.isTyping=!1,p.prototype.state="offline",p.prototype.initialQueueDelay=1e4,p.prototype.translations={cs:{"Chat with us!":"Chatujte s námi!","All colleagues are busy.":"Všichni kolegové jsou vytíženi.","Chat closed by %s":"%s ukončil konverzaci","Compose your message…":"Napište svou zprávu…",Connecting:"Připojování","Connection lost":"Připojení ztraceno","Connection re-established":"Připojení obnoveno",Offline:"Offline",Online:"Online","Scroll down to see new messages":"Srolujte dolů pro zobrazení nových zpráv",Send:"Odeslat","Since you didn't respond in the last %s minutes your conversation was closed.":"Jelikož jste nereagovali v posledních %s minutách, vaše konverzace byla uzavřena.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Jelikož jste nereagovali v posledních %s minutách, vaše konverzace s %s byla uzavřena.","Start new conversation":"Zahájit novou konverzaci",Today:"Dnes","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Omlouváme se, že musíte čekat déle, než je vhodné pro získání slotu. Prosím, zkuste to později, případně nám napište e-mail. Děkujeme!","You are on waiting list position %s.":"Jste %s. v pořadí na čekací listině."},da:{"Chat with us!":"Chat med os!","All colleagues are busy.":"Alle medarbejdere er optaget.","Chat closed by %s":"Chat lukket af %s","Compose your message…":"Skriv din besked…",Connecting:"Forbinder","Connection lost":"Forbindelse mistet","Connection re-established":"Forbindelse genoprettet",Offline:"Offline",Online:"Online","Scroll down to see new messages":"Scroll ned for at se nye beskeder",Send:"Afsend","Since you didn't respond in the last %s minutes your conversation was closed.":"","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"","Start new conversation":"Start en ny samtale",Today:"I dag","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"","You are on waiting list position %s.":"Du er i kø som nummer %s."},de:{"Chat with us!":"Chatte mit uns!","All colleagues are busy.":"Alle Kollegen sind beschäftigt.","Chat closed by %s":"Chat von %s geschlossen","Compose your message…":"Verfassen Sie Ihre Nachricht…",Connecting:"Verbinde","Connection lost":"Verbindung verloren","Connection re-established":"Verbindung wieder aufgebaut",Offline:"Offline",Online:"Online","Scroll down to see new messages":"Nach unten scrollen um neue Nachrichten zu sehen",Send:"Senden","Since you didn't respond in the last %s minutes your conversation was closed.":"Da Sie innerhalb der letzten %s Minuten nicht reagiert haben, wurde Ihre Unterhaltung geschlossen.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Da Sie innerhalb der letzten %s Minuten nicht reagiert haben, wurde Ihre Unterhaltung mit %s geschlossen.","Start new conversation":"Neue Unterhaltung starten",Today:"Heute","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Entschuldigung, es dauert länger als erwartet einen freien Platz zu bekommen. Versuchen Sie es später erneut oder senden Sie uns eine E-Mail. Vielen Dank!","You are on waiting list position %s.":"Sie sind in der Warteliste auf Position %s."},es:{"Chat with us!":"Chatee con nosotros!","All colleagues are busy.":"Todos los colegas están ocupados.","Chat closed by %s":"Chat cerrado por %s","Compose your message…":"Escribe tu mensaje…",Connecting:"Conectando","Connection lost":"Conexión perdida","Connection re-established":"Conexión reestablecida",Offline:"Desconectado",Online:"En línea","Scroll down to see new messages":"Desplace hacia abajo para ver nuevos mensajes",Send:"Enviar","Since you didn't respond in the last %s minutes your conversation was closed.":"Debido a que usted no ha respondido en los últimos %s minutos, su conversación se ha cerrado.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Debido a que usted no ha respondido en los últimos %s minutos, su conversación con %s se ha cerrado.","Start new conversation":"Iniciar nueva conversación",Today:"Hoy","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Lo sentimos, estamos tardando más de lo esperado para asignar un agente. Inténtelo de nuevo más tarde o envíenos un correo electrónico. ¡Gracias!","You are on waiting list position %s.":"Usted está en la posición %s de la lista de espera."},fr:{"Chat with us!":"Chattez avec nous !","All colleagues are busy.":"Tous les agents sont occupés.","Chat closed by %s":"Chat fermé par %s","Compose your message…":"Écrivez votre message…",Connecting:"Connexion","Connection lost":"Connexion perdue","Connection re-established":"Connexion ré-établie",Offline:"Hors-ligne",Online:"En ligne","Scroll down to see new messages":"Défiler vers le bas pour voir les nouveaux messages",Send:"Envoyer","Since you didn't respond in the last %s minutes your conversation was closed.":"Sans réponse de votre part depuis %s minutes, votre conservation a été fermée.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Sans réponse de votre part depuis %s minutes, votre conversation avec %s a été fermée.","Start new conversation":"Démarrer une nouvelle conversation",Today:"Aujourd'hui","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Nous sommes désolés, trouver un agent disponible prend plus de temps que prévu. Réessayez plus tard ou envoyez-nous un mail. Merci !","You are on waiting list position %s.":"Vous êtes actuellement en position %s dans la file d'attente."},hr:{"Chat with us!":"Čavrljajte sa nama!","All colleagues are busy.":"Svi agenti su zauzeti.","Chat closed by %s":"%s zatvara chat","Compose your message…":"Sastavite poruku…",Connecting:"Povezivanje","Connection lost":"Veza prekinuta","Connection re-established":"Veza je ponovno uspostavljena",Offline:"Odsutan",Online:"Dostupan(a)","Scroll down to see new messages":"Pomaknite se prema dolje da biste vidjeli nove poruke",Send:"Pošalji","Since you didn't respond in the last %s minutes your conversation was closed.":"Budući da niste odgovorili u posljednjih %s minuta, Vaš je razgovor zatvoren.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Budući da niste odgovorili u posljednjih %s minuta, Vaš je razgovor s %s zatvoren.","Start new conversation":"Započni novi razgovor",Today:"Danas","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Oprostite, traje duže nego inače za dobiti slobodan termin. Molimo, pokušajte ponovno kasnije ili nam pošaljite e-mail. Hvala!","You are on waiting list position %s.":"Nalazite se u redu čekanja na poziciji %s."},hu:{"Chat with us!":"Csevegjen velünk!","All colleagues are busy.":"Minden munkatársunk foglalt.","Chat closed by %s":"A csevegés %s által lezárva","Compose your message…":"Fogalmazza meg üzenetét…",Connecting:"Csatlakozás","Connection lost":"A kapcsolat megszakadt","Connection re-established":"A kapcsolat helyreállt",Offline:"Offline",Online:"Online","Scroll down to see new messages":"Görgessen lefelé az új üzenetek megtekintéséhez",Send:"Küldés","Since you didn't respond in the last %s minutes your conversation was closed.":"Mivel az elmúlt %s percben nem válaszolt, a beszélgetése lezárásra került.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Mivel az elmúlt %s percben nem válaszolt, %s munkatársunkkal folytatott beszélgetését lezártuk.","Start new conversation":"Új beszélgetés indítása",Today:"Ma","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Sajnáljuk, hogy a vártnál hosszabb ideig tart a helyfoglalás. Kérjük, próbálja meg később újra, vagy küldjön nekünk egy e-mailt. Köszönjük!","You are on waiting list position %s.":"Ön a várólistán a %s helyen szerepel."},it:{"Chat with us!":"Chatta con noi!","All colleagues are busy.":"Tutti i colleghi sono occupati.","Chat closed by %s":"Chat chiusa da %s","Compose your message…":"Scrivi il tuo messaggio…",Connecting:"Connessione in corso","Connection lost":"Connessione persa","Connection re-established":"Connessione ristabilita",Offline:"Offline",Online:"Online","Scroll down to see new messages":"Scorri verso il basso per vedere i nuovi messaggi",Send:"Invia","Since you didn't respond in the last %s minutes your conversation was closed.":"Dato che non hai risposto negli ultimi %s minuti, la conversazione è stata chiusa.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Dato che non hai risposto negli ultimi %s minuti, la conversazione con %s è stata chiusa.","Start new conversation":"Avvia una nuova chat",Today:"Oggi","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Siamo spiacenti, ci vuole più tempo del previsto per ottenere uno spazio libero. Riprova più tardi o inviaci un'e-mail. Grazie!","You are on waiting list position %s.":"Sei alla posizione %s della lista di attesa."},lt:{"Chat with us!":"Kalbėkitės su mumis!","All colleagues are busy.":"Visi kolegos užimti.","Chat closed by %s":"%s uždarė pokalbį","Compose your message…":"Rašykite žinutę…",Connecting:"Jungiamasi","Connection lost":"Dingo ryšys","Connection re-established":"Ryšys atnaujintas",Offline:"Atsijungęs",Online:"Prisijungęs","Scroll down to see new messages":"Naujos žinutės žemiau",Send:"Siųsti","Since you didn't respond in the last %s minutes your conversation was closed.":"Jūsų pokalbis buvo uždarytas, nes nieko neatsakėte per %s minučių.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Jūsų pokalbis su %s buvo uždarytas, nes nieko neatsakėte per %s minučių.","Start new conversation":"Pradėti naują pokalbį",Today:"Šiandien","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Atsiprašome, kad tenka laukti atskymo. Bandykite vėliau arba rašykite el. paštu. Ačiū!","You are on waiting list position %s.":"Esate %s eilėje."},nl:{"Chat with us!":"Chat met ons!","All colleagues are busy.":"Alle collega's zijn bezet.","Chat closed by %s":"Chat gesloten door %s","Compose your message…":"Stel je bericht op…",Connecting:"Verbinden","Connection lost":"Verbinding verbroken","Connection re-established":"Verbinding hersteld",Offline:"Offline",Online:"Online","Scroll down to see new messages":"Scroll naar beneden om nieuwe tickets te bekijken",Send:"Verstuur","Since you didn't respond in the last %s minutes your conversation was closed.":"De chat is afgesloten omdat je de laatste %s minuten niet hebt gereageerd.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Je chat met %s is afgesloten omdat je niet hebt gereageerd in de laatste %s minuten.","Start new conversation":"Nieuw gesprek starten",Today:"Vandaag","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Het spijt ons, het duurt langer dan verwacht om een chat te starten. Probeer het later nog eens of stuur ons een e-mail. Bedankt!","You are on waiting list position %s.":"Je bevindt zich op wachtlijstpositie %s."},pl:{"Chat with us!":"Czatuj z nami!","All colleagues are busy.":"Wszyscy agenci są zajęci.","Chat closed by %s":"Chat zamknięty przez %s","Compose your message…":"Skomponuj swoją wiadomość…",Connecting:"Łączenie","Connection lost":"Utracono połączenie","Connection re-established":"Ponowne nawiązanie połączenia",Offline:"Offline",Online:"Online","Scroll down to see new messages":"Skroluj w dół, aby zobaczyć wiadomości",Send:"Wyślij","Since you didn't respond in the last %s minutes your conversation was closed.":"Ponieważ nie odpowiedziałeś w ciągu ostatnich %s minut, Twoja rozmowa została zamknięta.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Ponieważ nie odpowiedziałeś w ciągu ostatnich %s minut, Twoja rozmowa z %s została zamknięta.","Start new conversation":"Rozpocznij nową rozmowę",Today:"Dzisiaj","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Przepraszamy, znalezienie wolnego konsultanta zajmuje więcej czasu niż oczekiwano. Spróbuj ponownie później lub wyślij nam e-mail. Dziękujemy!","You are on waiting list position %s.":"Jesteś na pozycji listy oczekujących %s."},"pt-br":{"Chat with us!":"Converse conosco!","All colleagues are busy.":"Nossos atendentes estão ocupados.","Chat closed by %s":"Chat encerrado por %s","Compose your message…":"Escreva sua mensagem…",Connecting:"Conectando","Connection lost":"Conexão perdida","Connection re-established":"Conexão restabelecida",Offline:"Desconectado",Online:"Online","Scroll down to see new messages":"Rolar para baixo para ver novas mensagems",Send:"Enviar","Since you didn't respond in the last %s minutes your conversation was closed.":"Como você não respondeu nos últimos %s minutos, sua conversa foi encerrada.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Como você não respondeu nos últimos %s minutos, sua conversa com %s foi encerrada.","Start new conversation":"Iniciar uma nova conversa",Today:"Hoje","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Lamentamos, está demorando mais do que o esperado para conseguir uma vaga. Tente novamente mais tarde ou envie-nos um e-mail. Obrigado!","You are on waiting list position %s.":"Você está na posição %s da lista de espera."},ro:{"Chat with us!":"Comunică cu noi!","All colleagues are busy.":"Toți colegii sunt ocupați momentan.","Chat closed by %s":"Chat închis de către %s","Compose your message…":"Compune-ți mesajul…",Connecting:"Se conectează","Connection lost":"Conexiune pierdută","Connection re-established":"Conexiune restabilită",Offline:"Offline",Online:"Online","Scroll down to see new messages":"Derulați în jos pentru a vedea mesajele noi",Send:"Trimite","Since you didn't respond in the last %s minutes your conversation was closed.":"Deoarece nu ai răspuns în ultimele %s minute, conversația ta a fost închisă.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Deoarece nu ai răspuns în ultimele %s minute, conversația ta cu %s a fost închisă.","Start new conversation":"Începe o conversație nouă",Today:"Azi","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Ne pare rău, durează mai mult decât ne așteptam să obținem un loc. Te rugăm să încerci din nou mai târziu sau să ne trimiți un email. Mulțumim!","You are on waiting list position %s.":"Aveți poziția %s în lista de așteptare."},ru:{"Chat with us!":"Напишите нам!","All colleagues are busy.":"Все коллеги заняты.","Chat closed by %s":"Чат закрыт %s","Compose your message…":"Составьте сообщение…",Connecting:"Подключение","Connection lost":"Подключение потеряно","Connection re-established":"Подключение восстановлено",Offline:"Оффлайн",Online:"В сети","Scroll down to see new messages":"Прокрутите вниз, чтобы увидеть новые сообщения",Send:"Отправить","Since you didn't respond in the last %s minutes your conversation was closed.":"Поскольку Вы не ответили в течение последних %s минут, Ваш разговор был закрыт.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Поскольку Вы не ответили в течение последних %s минут, Ваш разговор с %s был закрыт.","Start new conversation":"Начать новый разговор",Today:"Сегодня","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Извините, получение свободного слота занимает больше времени, чем ожидалось. Пожалуйста, повторите попытку позже или отправьте нам электронное письмо. Благодарим Вас!","You are on waiting list position %s.":"Вы находитесь в списке ожидания %s."},sr:{"Chat with us!":"Ћаскајте са нама!","All colleagues are busy.":"Све колеге су заузете.","Chat closed by %s":"Ћаскање затворено од стране %s","Compose your message…":"Напишите поруку…",Connecting:"Повезивање","Connection lost":"Веза је изгубљена","Connection re-established":"Веза је поново успостављена",Offline:"Одсутан(а)",Online:"Доступан(а)","Scroll down to see new messages":"Скролујте на доле за нове поруке",Send:"Пошаљи","Since you didn't respond in the last %s minutes your conversation was closed.":"Пошто нисте одговорили у последњих %s минут(a), ваш разговор је завршен.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Пошто нисте одговорили у последњих %s минут(a), ваш разговор са %s је завршен.","Start new conversation":"Започни нови разговор",Today:"Данас","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Жао нам је, добијање празног термина траје дуже од очекиваног. Молимо покушајте поново касније или нам пошаљите имејл поруку. Хвала вам!","You are on waiting list position %s.":"Ви сте тренутно %s. у реду за чекање."},"sr-latn-rs":{"Chat with us!":"Ćaskajte sa nama!","All colleagues are busy.":"Sve kolege su zauzete.","Chat closed by %s":"Ćaskanje zatvoreno od strane %s","Compose your message…":"Napišite poruku…",Connecting:"Povezivanje","Connection lost":"Veza je izgubljena","Connection re-established":"Veza je ponovo uspostavljena",Offline:"Odsutan(a)",Online:"Dostupan(a)","Scroll down to see new messages":"Skrolujte na dole za nove poruke",Send:"Pošalji","Since you didn't respond in the last %s minutes your conversation was closed.":"Pošto niste odgovorili u poslednjih %s minut(a), vaš razgovor je završen.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Pošto niste odgovorili u poslednjih %s minut(a), vaš razgovor sa %s je završen.","Start new conversation":"Započni novi razgovor",Today:"Danas","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Žao nam je, dobijanje praznog termina traje duže od očekivanog. Molimo pokušajte ponovo kasnije ili nam pošaljite imejl poruku. Hvala vam!","You are on waiting list position %s.":"Vi ste trenutno %s. u redu za čekanje."},sv:{"Chat with us!":"Chatta med oss!","All colleagues are busy.":"Alla kollegor är upptagna.","Chat closed by %s":"Chatt stängd av %s","Compose your message…":"Skriv ditt meddelande …",Connecting:"Ansluter","Connection lost":"Anslutningen försvann","Connection re-established":"Anslutningen återupprättas",Offline:"Offline",Online:"Online","Scroll down to see new messages":"Bläddra ner för att se nya meddelanden",Send:"Skicka","Since you didn't respond in the last %s minutes your conversation was closed.":"Din chatt avslutades då du inte svarade inom %s minuter.","Since you didn't respond in the last %s minutes your conversation with %s was closed.":"Chatten stängdes eftersom du inte svarat inom %s minuter i din konversation med %s.","Start new conversation":"Starta ny konversation",Today:"Idag","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"Det tar tyvärr längre tid än förväntat att få en ledig plats. Försök igen senare eller skicka ett mejl till oss. Tack!","You are on waiting list position %s.":"Du är på väntelistan som position %s."},"zh-cn":{"Chat with us!":"发起即时对话!","All colleagues are busy.":"所有同事都很忙。","Chat closed by %s":"对话已被 %s 关闭","Compose your message…":"编辑您的信息…",Connecting:"连接中","Connection lost":"连接丢失","Connection re-established":"正在重新建立连接",Offline:"离线",Online:"在线","Scroll down to see new messages":"向下滚动以查看新消息",Send:"发送","Since you didn't respond in the last %s minutes your conversation was closed.":'"由于您超过 %s 分钟没有任何回复',"Since you didn't respond in the last %s minutes your conversation with %s was closed.":'"由于您超过 %s 分钟没有回复',"Start new conversation":"开始新的会话",Today:"今天","We are sorry, it is taking longer than expected to get a slot. Please try again later or send us an email. Thank you!":"","You are on waiting list position %s.":"您目前的等候位置是第 %s 位."}},p.prototype.sessionId=void 0,p.prototype.scrolledToBottom=!0,p.prototype.scrollSnapTolerance=10,p.prototype.richTextFormatKey={66:!0,73:!0,85:!0,83:!0},p.prototype.T=function(){var e,t,n,o,s=arguments[0],i=2<=arguments.length?slice.call(arguments,1):[];if(this.options.lang&&"en"!==this.options.lang&&(this.translations[this.options.lang]?((o=this.translations[this.options.lang])[s]||this.log.notice("Translation needed for '"+s+"'"),s=o[s]||s):this.log.notice("Translation '"+this.options.lang+"' needed!")),i)for(t=0,n=i.length;t"+b.replace(/\n/g,"")+"
").replace(/<\/div>/g,"
")),console.log("p",n,b),"html"===n){for(e=document.createElement("div"),t=DOMPurify.sanitize(b),this.log.debug("sanitized HTML clipboard",t),e.innerHTML=t,u=!1,t=b,v=new RegExp("<(/w|w):[A-Za-z]"),t.match(v)&&(u=!0,t=t.replace(v,"")),v=new RegExp("<(/o|o):[A-Za-z]"),t.match(v)&&(u=!0,t=t.replace(v,"")),o=0,a=(m=(e=u?this.wordFilter(e):e).childNodes).length;o
new Date((new Date).getTime()-1500)))return this.isTyping=new Date,this.send("chat_session_typing",{session_id:this.sessionId}),this.inactiveTimeout.start()},p.prototype.onSubmit=function(e){return e.preventDefault(),this.sendMessage()},p.prototype.sendMessage=function(){var e,t=this.input.innerHTML;if(t)return this.inactiveTimeout.start(),sessionStorage.removeItem("unfinished_message"),e=this.view("message")({message:t,from:"customer",id:this._messageCount++,unreadClass:""}),this.maybeAddTimestamp(),this.el.querySelector(".zammad-chat-message--typing")?(this.lastAddedType="typing-placeholder",this.el.querySelector(".zammad-chat-message--typing").insertAdjacentHTML("beforebegin",e)):(this.lastAddedType="message--customer",this.body.insertAdjacentHTML("beforeend",e)),this.input.innerHTML="",this.scrollToBottom(),this.send("chat_session_message",{content:t,id:this._messageCount,session_id:this.sessionId})},p.prototype.receiveMessage=function(e){return this.inactiveTimeout.start(),this.onAgentTypingEnd(),this.maybeAddTimestamp(),this.renderMessage({message:e.message.content,id:e.id,from:"agent"}),this.scrollToBottom({showHint:!0})},p.prototype.renderMessage=function(e){return this.lastAddedType="message--"+e.from,e.unreadClass=document.hidden?" zammad-chat-message--unread":"",this.body.insertAdjacentHTML("beforeend",this.view("message")(e))},p.prototype.open=function(){var e;if(!this.isOpen)return this.isOpen=!0,this.log.debug("open widget"),this.show(),this.sessionId||this.showLoader(),this.el.classList.add("zammad-chat-is-open"),e=this.el.clientHeight-this.el.querySelector(".zammad-chat-header").offsetHeight,this.el.style.transform="translateY("+e+"px)",this.el.clientHeight,this.sessionId?(this.el.style.transform="",this.onOpenAnimationEnd()):(this.el.addEventListener("transitionend",this.onOpenAnimationEnd),this.el.classList.add("zammad-chat--animate"),this.el.clientHeight,this.el.style.transform="",this.send("chat_session_init",{url:S.location.href}));this.log.debug("widget already open, block")},p.prototype.onOpenAnimationEnd=function(){var e;return this.el.removeEventListener("transitionend",this.onOpenAnimationEnd),this.el.classList.remove("zammad-chat--animate"),this.idleTimeout.stop(),this.isFullscreen&&this.disableScrollOnRoot(),"function"==typeof(e=this.options).onOpenAnimationEnd?e.onOpenAnimationEnd():void 0},p.prototype.sessionClose=function(){return this.send("chat_session_close",{session_id:this.sessionId}),this.inactiveTimeout.stop(),this.waitingListTimeout.stop(),sessionStorage.removeItem("unfinished_message"),this.onInitialQueueDelayId&&clearTimeout(this.onInitialQueueDelayId),this.setSessionId(void 0)},p.prototype.toggle=function(e){return this.isOpen?this.close(e):this.open(e)},p.prototype.close=function(e){if(this.isOpen)return this.initDelayId&&clearTimeout(this.initDelayId),this.sessionId&&(this.log.debug("session close before widget close"),this.sessionClose()),this.log.debug("close widget"),e&&e.stopPropagation(),this.isFullscreen&&this.enableScrollOnRoot(),e=this.el.clientHeight-this.el.querySelector(".zammad-chat-header").offsetHeight,this.el.addEventListener("transitionend",this.onCloseAnimationEnd),this.el.classList.add("zammad-chat--animate"),document.offsetHeight,this.el.style.transform="translateY("+e+"px)";this.log.debug("can't close widget, it's not open")},p.prototype.onCloseAnimationEnd=function(){var e;return this.el.removeEventListener("transitionend",this.onCloseAnimationEnd),this.el.classList.remove("zammad-chat-is-open","zammad-chat--animate"),this.el.style.transform="",this.showLoader(),this.el.querySelector(".zammad-chat-welcome").classList.remove("zammad-chat-is-hidden"),this.el.querySelector(".zammad-chat-agent").classList.add("zammad-chat-is-hidden"),this.el.querySelector(".zammad-chat-agent-status").classList.add("zammad-chat-is-hidden"),this.isOpen=!1,"function"==typeof(e=this.options).onCloseAnimationEnd&&e.onCloseAnimationEnd(),this.io.reconnect()},p.prototype.onWebSocketClose=function(){if(!this.isOpen)return this.el?(this.el.classList.remove("zammad-chat-is-shown"),this.el.classList.remove("zammad-chat-is-loaded")):void 0},p.prototype.show=function(){if("offline"!==this.state)return this.el.classList.add("zammad-chat-is-loaded"),this.el.classList.add("zammad-chat-is-shown")},p.prototype.disableInput=function(){return this.inputDisabled=!0,this.input.setAttribute("contenteditable",!1),this.el.querySelector(".zammad-chat-send").disabled=!0,this.io.close()},p.prototype.enableInput=function(){return this.inputDisabled=!1,this.input.setAttribute("contenteditable",!0),this.el.querySelector(".zammad-chat-send").disabled=!1},p.prototype.hideModal=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=""},p.prototype.onQueueScreen=function(e){var t,n;if(this.setSessionId(e.session_id),t=function(){return n.onQueue(e),n.waitingListTimeout.start()},!(n=this).initialQueueDelay||this.onInitialQueueDelayId)return this.onInitialQueueDelayId&&clearTimeout(this.onInitialQueueDelayId),t();this.onInitialQueueDelayId=setTimeout(t,this.initialQueueDelay)},p.prototype.onQueue=function(e){return this.log.notice("onQueue",e.position),this.inQueue=!0,this.el.querySelector(".zammad-chat-modal").innerHTML=this.view("waiting")({position:e.position})},p.prototype.onAgentTypingStart=function(){if(this.stopTypingId&&clearTimeout(this.stopTypingId),this.stopTypingId=setTimeout(this.onAgentTypingEnd,3e3),!this.el.querySelector(".zammad-chat-message--typing")&&(this.maybeAddTimestamp(),this.body.insertAdjacentHTML("beforeend",this.view("typingIndicator")()),this.isVisible(this.el.querySelector(".zammad-chat-message--typing"),!0)))return this.scrollToBottom()},p.prototype.onAgentTypingEnd=function(){if(this.el.querySelector(".zammad-chat-message--typing"))return this.el.querySelector(".zammad-chat-message--typing").remove()},p.prototype.onLeaveTemporary=function(){if(this.sessionId)return this.send("chat_session_leave_temporary",{session_id:this.sessionId})},p.prototype.maybeAddTimestamp=function(){var e,t,n=Date.now();if(!this.lastTimestamp||n-this.lastTimestamp>6e4*this.showTimeEveryXMinutes)return e=this.T("Today"),t=(new Date).toTimeString().substr(0,5),"timestamp"===this.lastAddedType?(this.updateLastTimestamp(e,t),this.lastTimestamp=n):(this.body.insertAdjacentHTML("beforeend",this.view("timestamp")({label:e,time:t})),this.lastTimestamp=n,this.lastAddedType="timestamp",this.scrollToBottom())},p.prototype.updateLastTimestamp=function(e,t){var n;if(this.el&&(n=this.el.querySelectorAll(".zammad-chat-body .zammad-chat-timestamp")))return n[n.length-1].outerHTML=this.view("timestamp")({label:e,time:t})},p.prototype.addStatus=function(e){if(this.el)return this.maybeAddTimestamp(),this.body.insertAdjacentHTML("beforeend",this.view("status")({status:e})),this.scrollToBottom()},p.prototype.detectScrolledtoBottom=function(){var e=this.body.scrollTop+this.body.offsetHeight;if(this.scrolledToBottom=Math.abs(e-this.body.scrollHeight)<=this.scrollSnapTolerance,this.scrolledToBottom)return this.el.querySelector(".zammad-scroll-hint").classList.add("is-hidden")},p.prototype.showScrollHint=function(){return this.el.querySelector(".zammad-scroll-hint").classList.remove("is-hidden"),this.body.scrollTop=this.body.scrollTop+this.el.querySelector(".zammad-scroll-hint").offsetHeight},p.prototype.onScrollHintClick=function(){return this.body.scrollTo({top:this.body.scrollHeight,behavior:"smooth"})},p.prototype.scrollToBottom=function(e){e=(null!=e?e:{showHint:!1}).showHint;return this.scrolledToBottom?this.body.scrollTop=this.body.scrollHeight:e?this.showScrollHint():void 0},p.prototype.destroy=function(e){return this.log.debug("destroy widget",e=null==e?{}:e),this.setAgentOnlineState("offline"),e.remove&&this.el&&(this.el.remove(),(e=document.querySelector("."+this.options.buttonClass))&&(e.classList.add(this.options.inactiveClass),e.style.display="none")),this.waitingListTimeout&&this.waitingListTimeout.stop(),this.inactiveTimeout&&this.inactiveTimeout.stop(),this.idleTimeout&&this.idleTimeout.stop(),this.io.close()},p.prototype.reconnect=function(){return this.log.notice("reconnecting"),this.disableInput(),this.lastAddedType="status",this.setAgentOnlineState("connecting"),this.addStatus(this.T("Connection lost"))},p.prototype.onConnectionReestablished=function(){var e;return this.lastAddedType="status",this.setAgentOnlineState("online"),this.addStatus(this.T("Connection re-established")),"function"==typeof(e=this.options).onConnectionReestablished?e.onConnectionReestablished():void 0},p.prototype.onSessionClosed=function(e){var t;return this.addStatus(this.T("Chat closed by %s",e.realname)),this.disableInput(),this.setAgentOnlineState("offline"),this.inactiveTimeout.stop(),"function"==typeof(t=this.options).onSessionClosed?t.onSessionClosed(e):void 0},p.prototype.setSessionId=function(e){return void 0===(this.sessionId=e)?sessionStorage.removeItem("sessionId"):sessionStorage.setItem("sessionId",e)},p.prototype.onConnectionEstablished=function(e){var t;return this.onInitialQueueDelayId&&clearTimeout(this.onInitialQueueDelayId),this.inQueue=!1,e.agent&&(this.agent=e.agent),e.session_id&&this.setSessionId(e.session_id),this.body.innerHTML="",this.el.querySelector(".zammad-chat-agent").innerHTML=this.view("agent")({agent:this.agent}),this.enableInput(),this.hideModal(),this.el.querySelector(".zammad-chat-welcome").classList.add("zammad-chat-is-hidden"),this.el.querySelector(".zammad-chat-agent").classList.remove("zammad-chat-is-hidden"),this.el.querySelector(".zammad-chat-agent-status").classList.remove("zammad-chat-is-hidden"),this.isFullscreen||this.input.focus(),this.setAgentOnlineState("online"),this.waitingListTimeout.stop(),this.idleTimeout.stop(),this.inactiveTimeout.start(),"function"==typeof(t=this.options).onConnectionEstablished?t.onConnectionEstablished(e):void 0},p.prototype.showCustomerTimeout=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=this.view("customer_timeout")({agent:this.agent.name,delay:this.options.inactiveTimeout}),this.el.querySelector(".js-restart").addEventListener("click",function(){return location.reload()}),this.sessionClose()},p.prototype.showWaitingListTimeout=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=this.view("waiting_list_timeout")({delay:this.options.watingListTimeout}),this.el.querySelector(".js-restart").addEventListener("click",function(){return location.reload()}),this.sessionClose()},p.prototype.showLoader=function(){return this.el.querySelector(".zammad-chat-modal").innerHTML=this.view("loader")()},p.prototype.setAgentOnlineState=function(e){var t;if(this.state=e,this.el)return t=e.charAt(0).toUpperCase()+e.slice(1),this.el.querySelector(".zammad-chat-agent-status").dataset.status=e,this.el.querySelector(".zammad-chat-agent-status").textContent=this.T(t)},p.prototype.detectHost=function(){var e="https"===a?"wss://":"ws://";return this.options.host=""+e+i+"/ws"},p.prototype.loadCss=function(){var e,t;if(this.options.cssAutoload)return(t=this.options.cssUrl)||(t=this.options.host.replace(/^wss/i,"https").replace(/^ws/i,"http").replace(/\/ws$/i,""),t+="/assets/chat/chat.css"),this.log.debug("load css from '"+t+"'"),t="@import url('"+t+"');",(e=document.createElement("link")).onload=this.onCssLoaded,e.rel="stylesheet",e.href="data:text/css,"+escape(t),document.getElementsByTagName("head")[0].appendChild(e)},p.prototype.onCssLoaded=function(){var e;return this.cssLoaded=!0,this.socketReady&&this.onReady(),"function"==typeof(e=this.options).onCssLoaded?e.onCssLoaded():void 0},p.prototype.startTimeoutObservers=function(){var e,t,n;return this.idleTimeout=new s({logPrefix:"idleTimeout",debug:this.options.debug,timeout:this.options.idleTimeout,timeoutIntervallCheck:this.options.idleTimeoutIntervallCheck,callback:(e=this,function(){return e.log.debug("Idle timeout reached, hide widget",new Date),e.destroy({remove:!0})})}),this.inactiveTimeout=new s({logPrefix:"inactiveTimeout",debug:this.options.debug,timeout:this.options.inactiveTimeout,timeoutIntervallCheck:this.options.inactiveTimeoutIntervallCheck,callback:(t=this,function(){return t.log.debug("Inactive timeout reached, show timeout screen.",new Date),t.showCustomerTimeout(),t.destroy({remove:!1})})}),this.waitingListTimeout=new s({logPrefix:"waitingListTimeout",debug:this.options.debug,timeout:this.options.waitingListTimeout,timeoutIntervallCheck:this.options.waitingListTimeoutIntervallCheck,callback:(n=this,function(){return n.log.debug("Waiting list timeout reached, show timeout screen.",new Date),n.showWaitingListTimeout(),n.destroy({remove:!1})})})},p.prototype.disableScrollOnRoot=function(){return this.rootScrollOffset=this.scrollRoot.scrollTop,this.scrollRoot.style.overflow="hidden",this.scrollRoot.style.position="fixed"},p.prototype.enableScrollOnRoot=function(){return this.scrollRoot.scrollTop=this.rootScrollOffset,this.scrollRoot.style.overflow="",this.scrollRoot.style.position=""},p.prototype.isVisible=function(e,n,o,s){var i,a,r,l;if(!(e.length<1))return l=S.innerWidth,r=S.innerHeight,s=s||"both",o=!0!==o||t.offsetWidth*t.offsetHeight,a=0<=(e=e.getBoundingClientRect()).top&&e.top/gi,"")).replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,"")).replace(/<(\/?)s>/gi,"<$1strike>")).replace(/ /gi," "),e.innerHTML=M,s=0,l=(k=e.querySelectorAll("p")).length;s",/^\s*\w+\./.test(_)&&(f=(v=/([0-9])\./.exec(_))?null!=(O=1<(_=parseInt(v[1],10)))?O:'
':"
"}:"
"),r"+S.innerHTML+""),S.remove(),r=t}else r=0;for(y=0,d=(E=e.querySelectorAll("[style]")).length;y