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 Ie(){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=Me(e,/^[\r\n\t ]+/))&&o[0],u?u.createHTML(e):e);if(_===I)try{t=(new B).parseFromString(o,"text/html")}catch(e){}if(!t||!t.documentElement){t=i.createDocument(_,"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),_===I?K.call(t,S?"html":"body")[0]:S?t.documentElement:o}function Z(e){return Q.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(R("beforeSanitizeElements",e,null),!((n=e)instanceof F||n instanceof H||"string"==typeof n.nodeName&&"string"==typeof n.textContent&&"function"==typeof n.removeChild&&n.attributes instanceof P&&"function"==typeof n.removeAttribute&&"function"==typeof n.setAttribute&&"string"==typeof n.namespaceURI&&"function"==typeof n.insertBefore))return p(e),1;if(Me(e.nodeName,/[\u0080-\uFFFF]/))return p(e),1;var n=Le(e.nodeName);if(R("uponSanitizeElement",e,{tagName:n,allowedTags:b}),!m(e.firstElementChild)&&(!m(e.content)||!m(e.content.firstElementChild))&&Fe(/<[/\w]/g,e.innerHTML)&&Fe(/<[/\w]/g,e.textContent))return p(e),1;if("select"===n&&Fe(//i,t))Oe(i,e);else{C&&(t=Ne(t,f," "),t=Ne(t,y," "));var l=e.nodeName.toLowerCase();if(je(l,r,t))try{a?e.setAttributeNS(a,i,t):e.setAttribute(i,t),Ee(c.removed)}catch(e){}}}R("afterSanitizeAttributes",e,null)}}function ee(e){var t,n=Z(e);for(R("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)R("uponSanitizeShadowNode",t,null),X(t)||(t.content instanceof M&&ee(t.content),$(t));R("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=He({},[].concat($e(Ue),$e(Ve),$e(qe),$e(Qe),$e(Ye))),w=null,re=He({},[].concat($e(Ke),$e(Ge),$e(Je),$e(Ze))),T=null,le=null,ce=!0,de=!0,ue=!1,C=!1,S=!1,he=!1,pe=!1,z=!1,k=!1,me=!0,A=!1,ge=!0,fe=!0,x=!1,O={},j=null,ye=He({},["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=He({},["audio","video","img","source","image","track"]),we=null,Te=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ce="http://www.w3.org/1998/Math/MathML",Se="http://www.w3.org/2000/svg",I="http://www.w3.org/1999/xhtml",_=I,D=null,ze=s.createElement("form"),ke=He({},["mi","mo","mn","ms","mtext"]),Ae=He({},["foreignobject","desc","title","annotation-xml"]),E=He({},Ve),xe=(He(E,qe),He(E,tt),He({},Qe)),Oe=(He(xe,nt),function(e,t){try{Re(c.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Re(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){}}),R=function(e,t,n){g[e]&&De(g[e],function(e){e.call(c,t,n,D)})},je=function(e,t,n){if(ge&&("id"===t||"name"===t)&&(n in s||n in ze))return!1;if((!de||le[t]||!Fe(ne,t))&&(!ce||!Fe(oe,t))){if(!w[t]||le[t])return!1;if(!we[t]&&!Fe(v,Ne(n,ie,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Pe(n,"data:")||!ve[e])&&(!ue||Fe(se,Ne(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 Ie("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ie("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=[],!(x="string"==typeof e?!1:x))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&&!C&&!S&&-1===e.indexOf("<"))return u&&A?u.createHTML(e):e;if(!(o=J(e)))return z?null:q}o&&pe&&p(o.firstChild);for(var a=Z(x?e:o);n=a.nextNode();)3===n.nodeType&&n===s||X(n)||(n.content instanceof M&&ee(n.content),$(n),s=n);if(s=null,x)return e;if(z){if(k)for(i=Y.call(o.ownerDocument);o.firstChild;)i.appendChild(o.firstChild);else i=o;return i=me?G.call(l,i,!0):i}t=S?o.outerHTML:o.innerHTML;return C&&(t=Ne(t,f," "),t=Ne(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=Le(e),t=Le(t);return je(e,t,n)},c.addHook=function(e,t){"function"==typeof t&&(g[e]=g[e]||[],Re(g[e],t))},c.removeHook=function(e){g[e]&&Ee(g[e])},c.removeHooks=function(e){g[e]&&(g[e]=[])},c.removeAllHooks=function(){g={}},c}()});var bind=function(e,t){return function(){return e.apply(t,arguments)}},slice=[].slice,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;!function(h,p){var t,n,o,s,i,e;function a(e){this.options=h.extend({},this.defaults,e),this.log=new n({debug:this.options.debug,logPrefix:this.options.logPrefix||this.logPrefix})}function r(e){this.log=bind(this.log,this),this.error=bind(this.error,this),this.notice=bind(this.notice,this),this.debug=bind(this.debug,this),this.options=h.extend({},this.defaults,e)}function l(e){this.stop=bind(this.stop,this),this.start=bind(this.start,this),l.__super__.constructor.call(this,e)}function c(e){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),c.__super__.constructor.call(this,e)}function d(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.onFocus=bind(this.onFocus,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.checkForEnter=bind(this.checkForEnter,this),this.render=bind(this.render,this),this.view=bind(this.view,this),this.T=bind(this.T,this),this.options=h.extend({},this.defaults,e),d.__super__.constructor.call(this,this.options),this.isFullscreen=p.matchMedia&&p.matchMedia("(max-width: 768px)").matches,this.scrollRoot=h(this.getScrollRoot()),h)return p.WebSocket&&sessionStorage?this.options.chatId?(this.options.lang||(this.options.lang=h("html").attr("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 t(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",void this.log.notice("Chat: Browser not supported!"));this.state="unsupported",this.log.notice("Chat: no jquery found!")}e=(e=document.getElementsByTagName("script"))[e.length-1],i=p.location.protocol.replace(":",""),e&&e.src&&(s=e.src.match(".*://([^:/]*).*")[1],i=e.src.match("(.*)://[^:/]*.*")[1]),a.prototype.defaults={debug:!1},e=a,r.prototype.defaults={debug:!1},r.prototype.debug=function(){var e=1<=arguments.length?slice.call(arguments,0):[];if(this.options.debug)return this.log("debug",e)},r.prototype.notice=function(){var e=1<=arguments.length?slice.call(arguments,0):[];return this.log("notice",e)},r.prototype.error=function(){var e=1<=arguments.length?slice.call(arguments,0):[];return this.log("error",e)},r.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+"")}},n=r,extend(l,e),l.prototype.timeoutStartedAt=null,l.prototype.logPrefix="timeout",l.prototype.defaults={debug:!1,timeout:4,timeoutIntervallCheck:.5},l.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)},l.prototype.stop=function(){if(this.intervallId)return this.log.debug("Stop timeout of "+this.options.timeout+" minutes"),clearInterval(this.intervallId)},o=l,extend(c,e),c.prototype.logPrefix="io",c.prototype.set=function(e){var t,n,o=[];for(t in e)n=e[t],o.push(this.options[t]=n);return o},c.prototype.connect=function(){var t,s,n,o;return this.log.debug("Connecting to "+this.options.host),this.ws=new p.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},d.prototype.logPrefix="chat",d.prototype._messageCount=0,d.prototype.isOpen=!1,d.prototype.blinkOnlineInterval=null,d.prototype.stopBlinOnlineStateTimeout=null,d.prototype.showTimeEveryXMinutes=2,d.prototype.lastTimestamp=null,d.prototype.lastAddedType=null,d.prototype.inputDisabled=!1,d.prototype.inputTimeout=null,d.prototype.isTyping=!1,d.prototype.state="offline",d.prototype.initialQueueDelay=1e4,d.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 kolege 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:"Š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, proces traje duže nego što se očekivalo da biste dobili 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."},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 位."}},d.prototype.sessionId=void 0,d.prototype.scrolledToBottom=!0,d.prototype.scrollSnapTolerance=10,d.prototype.richTextFormatKey={66:!0,73:!0,85:!0,83:!0},d.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',document.execCommand("insertHTML",!1,s)})},i.readAsDataURL(n),e=!0)),!e){n=i=void 0;try{i=o.getData("text/html"),n="html",i&&0!==i.length||(n="text",i=o.getData("text/plain")),i&&0!==i.length||(n="text2",i=o.getData("text"))}catch(e){t=e,console.log("Sorry, can't insert markup because browser is not supporting it."),n="text3",i=o.getData("text")}return"text"!==n&&"text2"!==n&&"text3"!==n||(i=(i=""+i.replace(/\n/g,"
")+"
").replace(/<\/div>/g,"
")),console.log("p",n,i),"html"===n&&(e=DOMPurify.sanitize(i),a.log.debug("sanitized HTML clipboard",e),t=h("
"+e+"
"),o=!1,e=i,s=new RegExp("<(/w|w):[A-Za-z]"),e.match(s)&&(o=!0,e=e.replace(s,"")),s=new RegExp("<(/o|o):[A-Za-z]"),e.match(s)&&(o=!0,e=e.replace(s,"")),o&&(t=a.wordFilter(t)),(t=h(t)).contents().each(function(){if(8===this.nodeType)return h(this).remove()}),t.find("a, font, small, time, form, label").replaceWith(function(){return h(this).contents()}),t.find("textarea").each(function(){var e=this.outerHTML;return s=new RegExp("<"+this.tagName,"i"),e=e.replace(s,"
')).get(0),document.caretPositionFromPoint?(t=document.caretPositionFromPoint(a,r),(s=document.createRange()).setStart(t.offsetNode,t.offset),s.collapse(),s.insertNode(i)):document.caretRangeFromPoint?(s=document.caretRangeFromPoint(a,r)).insertNode(i):console.log("could not find carat")})},t.readAsDataURL(e)})),h(p).on("beforeunload",(e=this,function(){return e.onLeaveTemporary()})),h(p).on("hashchange",(t=this,function(){if(!t.isOpen)return t.idleTimeout.start();t.sessionId&&t.send("chat_session_notice",{session_id:t.sessionId,message:p.location.href})})),this.isFullscreen)return this.input.on({focus:this.onFocus,focusout:this.onFocusOut})},d.prototype.stopPropagation=function(e){return e.stopPropagation()},d.prototype.checkForEnter=function(e){if(!this.inputDisabled&&!e.shiftKey&&13===e.keyCode)return e.preventDefault(),this.sendMessage()},d.prototype.send=function(e,t){return(t=null==t?{}:t).chat_id=this.options.chatId,this.io.send(e,t)},d.prototype.onWebSocketMessage=function(e){for(var t,n=0,o=e.length;n
new Date((new Date).getTime()-1500)))return this.isTyping=new Date,this.send("chat_session_typing",{session_id:this.sessionId}),this.inactiveTimeout.start()},d.prototype.onSubmit=function(e){return e.preventDefault(),this.sendMessage()},d.prototype.sendMessage=function(){var e,t=this.input.html();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.find(".zammad-chat-message--typing").get(0)?(this.lastAddedType="typing-placeholder",this.el.find(".zammad-chat-message--typing").before(e)):(this.lastAddedType="message--customer",this.el.find(".zammad-chat-body").append(e)),this.input.html(""),this.scrollToBottom(),this.send("chat_session_message",{content:t,id:this._messageCount,session_id:this.sessionId})},d.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})},d.prototype.renderMessage=function(e){return this.lastAddedType="message--"+e.from,e.unreadClass=document.hidden?" zammad-chat-message--unread":"",this.el.find(".zammad-chat-body").append(this.view("message")(e))},d.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.addClass("zammad-chat-is-open"),e=this.el.height()-this.el.find(".zammad-chat-header").outerHeight(),this.el.css("bottom",-e),this.sessionId?(this.el.css("bottom",0),this.onOpenAnimationEnd()):(this.el.animate({bottom:0},500,this.onOpenAnimationEnd),this.send("chat_session_init",{url:p.location.href}));this.log.debug("widget already open, block")},d.prototype.onOpenAnimationEnd=function(){var e;return this.idleTimeout.stop(),this.isFullscreen&&this.disableScrollOnRoot(),"function"==typeof(e=this.options).onOpenAnimationEnd?e.onOpenAnimationEnd():void 0},d.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)},d.prototype.toggle=function(e){return this.isOpen?this.close(e):this.open(e)},d.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.height()-this.el.find(".zammad-chat-header").outerHeight(),this.el.animate({bottom:-e},500,this.onCloseAnimationEnd);this.log.debug("can't close widget, it's not open")},d.prototype.onCloseAnimationEnd=function(){var e;return this.el.css("bottom",""),this.el.removeClass("zammad-chat-is-open"),this.showLoader(),this.el.find(".zammad-chat-welcome").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent").addClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent-status").addClass("zammad-chat-is-hidden"),this.isOpen=!1,"function"==typeof(e=this.options).onCloseAnimationEnd&&e.onCloseAnimationEnd(),this.io.reconnect()},d.prototype.onWebSocketClose=function(){if(!this.isOpen)return this.el?(this.el.removeClass("zammad-chat-is-shown"),this.el.removeClass("zammad-chat-is-loaded")):void 0},d.prototype.show=function(){if("offline"!==this.state)return this.el.addClass("zammad-chat-is-loaded"),this.el.addClass("zammad-chat-is-shown")},d.prototype.disableInput=function(){return this.inputDisabled=!0,this.input.prop("contenteditable",!1),this.el.find(".zammad-chat-send").prop("disabled",!0),this.io.close()},d.prototype.enableInput=function(){return this.inputDisabled=!1,this.input.prop("contenteditable",!0),this.el.find(".zammad-chat-send").prop("disabled",!1)},d.prototype.hideModal=function(){return this.el.find(".zammad-chat-modal").html("")},d.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)},d.prototype.onQueue=function(e){return this.log.notice("onQueue",e.position),this.inQueue=!0,this.el.find(".zammad-chat-modal").html(this.view("waiting")({position:e.position}))},d.prototype.onAgentTypingStart=function(){if(this.stopTypingId&&clearTimeout(this.stopTypingId),this.stopTypingId=setTimeout(this.onAgentTypingEnd,3e3),!this.el.find(".zammad-chat-message--typing").get(0)&&(this.maybeAddTimestamp(),this.el.find(".zammad-chat-body").append(this.view("typingIndicator")()),this.isVisible(this.el.find(".zammad-chat-message--typing"),!0)))return this.scrollToBottom()},d.prototype.onAgentTypingEnd=function(){return this.el.find(".zammad-chat-message--typing").remove()},d.prototype.onLeaveTemporary=function(){if(this.sessionId)return this.send("chat_session_leave_temporary",{session_id:this.sessionId})},d.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.el.find(".zammad-chat-body").append(this.view("timestamp")({label:e,time:t})),this.lastTimestamp=n,this.lastAddedType="timestamp",this.scrollToBottom())},d.prototype.updateLastTimestamp=function(e,t){if(this.el)return this.el.find(".zammad-chat-body").find(".zammad-chat-timestamp").last().replaceWith(this.view("timestamp")({label:e,time:t}))},d.prototype.addStatus=function(e){if(this.el)return this.maybeAddTimestamp(),this.el.find(".zammad-chat-body").append(this.view("status")({status:e})),this.scrollToBottom()},d.prototype.detectScrolledtoBottom=function(){var e=this.el.find(".zammad-chat-body").scrollTop()+this.el.find(".zammad-chat-body").outerHeight();if(this.scrolledToBottom=Math.abs(e-this.el.find(".zammad-chat-body").prop("scrollHeight"))<=this.scrollSnapTolerance,this.scrolledToBottom)return this.el.find(".zammad-scroll-hint").addClass("is-hidden")},d.prototype.showScrollHint=function(){return this.el.find(".zammad-scroll-hint").removeClass("is-hidden"),this.el.find(".zammad-chat-body").scrollTop(this.el.find(".zammad-chat-body").scrollTop()+this.el.find(".zammad-scroll-hint").outerHeight())},d.prototype.onScrollHintClick=function(){return this.el.find(".zammad-chat-body").animate({scrollTop:this.el.find(".zammad-chat-body").prop("scrollHeight")},300)},d.prototype.scrollToBottom=function(e){e=(null!=e?e:{showHint:!1}).showHint;return this.scrolledToBottom?this.el.find(".zammad-chat-body").scrollTop(h(".zammad-chat-body").prop("scrollHeight")):e?this.showScrollHint():void 0},d.prototype.destroy=function(e){return this.log.debug("destroy widget",e=null==e?{}:e),this.setAgentOnlineState("offline"),e.remove&&this.el&&(this.el.remove(),h("."+this.options.buttonClass).hide()),this.waitingListTimeout&&this.waitingListTimeout.stop(),this.inactiveTimeout&&this.inactiveTimeout.stop(),this.idleTimeout&&this.idleTimeout.stop(),this.io.close()},d.prototype.reconnect=function(){return this.log.notice("reconnecting"),this.disableInput(),this.lastAddedType="status",this.setAgentOnlineState("connecting"),this.addStatus(this.T("Connection lost"))},d.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},d.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},d.prototype.setSessionId=function(e){return void 0===(this.sessionId=e)?sessionStorage.removeItem("sessionId"):sessionStorage.setItem("sessionId",e)},d.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.el.find(".zammad-chat-body").html(""),this.el.find(".zammad-chat-agent").html(this.view("agent")({agent:this.agent})),this.enableInput(),this.hideModal(),this.el.find(".zammad-chat-welcome").addClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent").removeClass("zammad-chat-is-hidden"),this.el.find(".zammad-chat-agent-status").removeClass("zammad-chat-is-hidden"),this.isFullscreen||this.input.trigger("focus"),this.setAgentOnlineState("online"),this.waitingListTimeout.stop(),this.idleTimeout.stop(),this.inactiveTimeout.start(),"function"==typeof(t=this.options).onConnectionEstablished?t.onConnectionEstablished(e):void 0},d.prototype.showCustomerTimeout=function(){var e;return this.el.find(".zammad-chat-modal").html(this.view("customer_timeout")({agent:this.agent.name,delay:this.options.inactiveTimeout})),e=function(){return location.reload()},this.el.find(".js-restart").on("click",e),this.sessionClose()},d.prototype.showWaitingListTimeout=function(){var e;return this.el.find(".zammad-chat-modal").html(this.view("waiting_list_timeout")({delay:this.options.watingListTimeout})),e=function(){return location.reload()},this.el.find(".js-restart").on("click",e),this.sessionClose()},d.prototype.showLoader=function(){return this.el.find(".zammad-chat-modal").html(this.view("loader")())},d.prototype.setAgentOnlineState=function(e){var t;if(this.state=e,this.el)return t=e.charAt(0).toUpperCase()+e.slice(1),this.el.find(".zammad-chat-agent-status").attr("data-status",e).text(this.T(t))},d.prototype.detectHost=function(){var e="https"===i?"wss://":"ws://";return this.options.host=""+e+s+"/ws"},d.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)},d.prototype.onCssLoaded=function(){var e;return this.cssLoaded=!0,this.socketReady&&this.onReady(),"function"==typeof(e=this.options).onCssLoaded?e.onCssLoaded():void 0},d.prototype.startTimeoutObservers=function(){var e,t,n;return this.idleTimeout=new o({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 o({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 o({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})})})},d.prototype.disableScrollOnRoot=function(){return this.rootScrollOffset=this.scrollRoot.scrollTop(),this.scrollRoot.css({overflow:"hidden",position:"fixed"})},d.prototype.enableScrollOnRoot=function(){return this.scrollRoot.scrollTop(this.rootScrollOffset),this.scrollRoot.css({overflow:"",position:""})},d.prototype.isVisible=function(e,t,n,o){var s,i,a,r,l,c,d,u;if(!(e.length<1))return s=h(p),a=(e=1/gi,"")).replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,"")).replace(/<(\/?)s>/gi,"<$1strike>")).replace(/ /gi," "),e.html(t),h("p",e).each(function(){var e=h(this).attr("style"),e=/mso-list:\w+ \w+([0-9]+)/.exec(e);if(e)return h(this).data("_listLevel",parseInt(e[1],10))}),l=0,c=null,h("p",e).each(function(){var e,t,n,o,s,i,a,r=h(this).data("_listLevel");if(void 0===r)return l=0;if(a=h(this).text(),n="",/^\s*\w+\./.test(a)&&(n=(a=/([0-9])\./.exec(a))?null!=(o=1<(a=parseInt(a[1],10)))?o:'
':"
"}:"
"),l"+h(this).html()+""),h(this).remove(),l=r}),h("[style]",e).removeAttr("style"),h("[align]",e).removeAttr("align"),h("span",e).replaceWith(function(){return h(this).contents()}),h("span:empty",e).remove(),h("[class^='Mso']",e).removeAttr("class"),h("p:empty",e).remove(),e},d.prototype.removeAttribute=function(e){var t,n,o,s,i;if(e){for(t=h(e),o=0,s=(i=e.attributes).length;o