@aigelb/chatbot-widget 9.2.2 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chatbot-widget.js +1 -1
- package/package.json +1 -1
package/dist/chatbot-widget.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={77(e){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function h(e){var n=e.match(t);n&&(d+=n.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function f(){var e={line:d,column:p};return function(n){return n.position=new g(e),v(),n}}function g(e){this.start=e,this.end={line:d,column:p},this.source=l.source}function b(n){var t=new Error(l.source+":"+d+":"+p+": "+n);if(t.reason=n,t.filename=l.source,t.line=d,t.column=p,t.source=e,!l.silent)throw t}function m(n){var t=n.exec(e);if(t){var o=t[0];return h(o),e=e.slice(o.length),t}}function v(){m(o)}function y(e){var n;for(e=e||[];n=x();)!1!==n&&e.push(n);return e}function x(){var n=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var t=2;c!=e.charAt(t)&&("*"!=e.charAt(t)||"/"!=e.charAt(t+1));)++t;if(t+=2,c===e.charAt(t-1))return b("End of comment missing");var o=e.slice(2,t-2);return p+=2,h(o),e=e.slice(t),p+=2,n({type:"comment",comment:o})}}function w(){var e=f(),t=m(r);if(t){if(x(),!m(i))return b("property missing ':'");var o=m(a),l=e({type:"declaration",property:u(t[0].replace(n,c)),value:o?u(o[0].replace(n,c)):c});return m(s),l}}return g.prototype.content=e,v(),function(){var e,n=[];for(y(n);e=w();)!1!==e&&(n.push(e),y(n));return n}()}},133(e,n,t){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n){let t=null;if(!e||"string"!=typeof e)return t;const o=(0,r.default)(e),i="function"==typeof n;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:o,value:r}=e;i?n(o,r,e):r&&(t=t||{},t[o]=r)}),t};const r=o(t(77))},229(e,n,t){var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(t(133)),r=t(917);function i(e,n){var t={};return e&&"string"==typeof e?((0,o.default)(e,function(e,o){e&&o&&(t[(0,r.camelCase)(e,n)]=o)}),t):t}i.default=i,e.exports=i},849(e){var n=Object.prototype.hasOwnProperty,t=Object.prototype.toString,o=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},a=function(e){if(!e||"[object Object]"!==t.call(e))return!1;var o,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(o in e);return void 0===o||n.call(e,o)},s=function(e,n){o&&"__proto__"===n.name?o(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},l=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(r)return r(e,t).value}return e[t]};e.exports=function e(){var n,t,o,r,c,u,d=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(null!=(n=arguments[p]))for(t in n)o=l(d,t),d!==(r=l(n,t))&&(f&&r&&(a(r)||(c=i(r)))?(c?(c=!1,u=o&&i(o)?o:[]):u=o&&a(o)?o:{},s(d,{name:t,newValue:e(f,u,r)})):void 0!==r&&s(d,{name:t,newValue:r}));return d}},917(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,n){return n.toUpperCase()},l=function(e,n){return"".concat(n,"-")};n.camelCase=function(e,n){return void 0===n&&(n={}),function(e){return!e||r.test(e)||t.test(e)}(e)?e:(e=e.toLowerCase(),(e=n.reactCompat?e.replace(a,l):e.replace(i,l)).replace(o,s))}}},n={};function t(o){var r=n[o];if(void 0!==r)return r.exports;var i=n[o]={exports:{}};return e[o].call(i.exports,i,i.exports,t),i.exports}t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};t.r(o),t.d(o,{boolean:()=>Lo,booleanish:()=>No,commaOrSpaceSeparated:()=>Oo,commaSeparated:()=>Do,number:()=>Po,overloadedBoolean:()=>Fo,spaceSeparated:()=>Mo});var r={};t.r(r),t.d(r,{attentionMarkers:()=>fa,contentInitial:()=>la,disable:()=>ga,document:()=>sa,flow:()=>ua,flowInitial:()=>ca,insideSpan:()=>ha,string:()=>da,text:()=>pa});var i,a,s,l,c,u,d,p,h,f,g,b,m={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,x=Array.isArray;function w(e,n){for(var t in n)e[t]=n[t];return e}function k(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,n,t){var o,r,a,s={};for(a in n)"key"==a?o=n[a]:"ref"==a?r=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?i.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return C(e,s,o,r,null)}function C(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++s:r,__i:-1,__u:0};return null==r&&null!=a.vnode&&a.vnode(i),i}function S(e){return e.children}function E(e,n){this.props=e,this.context=n}function I(e,n){if(null==n)return e.__?I(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?I(e):null}function T(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return T(e)}}function A(e){(!e.__d&&(e.__d=!0)&&l.push(e)&&!L.__r++||c!=a.debounceRendering)&&((c=a.debounceRendering)||u)(L)}function L(){for(var e,n,t,o,r,i,s,c=1;l.length;)l.length>c&&l.sort(d),e=l.shift(),c=l.length,e.__d&&(t=void 0,o=void 0,r=(o=(n=e).__v).__e,i=[],s=[],n.__P&&((t=w({},o)).__v=o.__v+1,a.vnode&&a.vnode(t),B(n.__P,t,o,n.__n,n.__P.namespaceURI,32&o.__u?[r]:null,i,null==r?I(o):r,!!(32&o.__u),s),t.__v=o.__v,t.__.__k[t.__i]=t,H(i,t,s),o.__e=o.__=null,t.__e!=r&&T(t)));L.__r=0}function N(e,n,t,o,r,i,a,s,l,c,u){var d,p,h,f,g,b,y,x=o&&o.__k||v,w=n.length;for(l=F(t,n,x,l,w),d=0;d<w;d++)null!=(h=t.__k[d])&&(p=-1==h.__i?m:x[h.__i]||m,h.__i=d,b=B(e,h,p,r,i,a,s,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Y(p.ref,null,h),u.push(h.ref,h.__c||f,h)),null==g&&null!=f&&(g=f),(y=!!(4&h.__u))||p.__k===h.__k?l=P(h,l,e,y):"function"==typeof h.type&&void 0!==b?l=b:f&&(l=f.nextSibling),h.__u&=-7);return t.__e=g,l}function F(e,n,t,o,r){var i,a,s,l,c,u=t.length,d=u,p=0;for(e.__k=new Array(r),i=0;i<r;i++)null!=(a=n[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[i]=C(null,a,null,null,null):x(a)?a=e.__k[i]=C(S,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[i]=C(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,l=i+p,a.__=e,a.__b=e.__b+1,s=null,-1!=(c=a.__i=D(a,t,l,d))&&(d--,(s=t[c])&&(s.__u|=2)),null==s||null==s.__v?(-1==c&&(r>u?p--:r<u&&p++),"function"!=typeof a.type&&(a.__u|=4)):c!=l&&(c==l-1?p--:c==l+1?p++:(c>l?p--:p++,a.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<u;i++)null!=(s=t[i])&&!(2&s.__u)&&(s.__e==o&&(o=I(s)),V(s,s));return o}function P(e,n,t,o){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,n=P(r[i],n,t,o));return n}e.__e!=n&&(o&&(n&&e.type&&!n.parentNode&&(n=I(e)),t.insertBefore(e.__e,n||null)),n=e.__e);do{n=n&&n.nextSibling}while(null!=n&&8==n.nodeType);return n}function M(e,n){return n=n||[],null==e||"boolean"==typeof e||(x(e)?e.some(function(e){M(e,n)}):n.push(e)),n}function D(e,n,t,o){var r,i,a,s=e.key,l=e.type,c=n[t],u=null!=c&&!(2&c.__u);if(null===c&&null==s||u&&s==c.key&&l==c.type)return t;if(o>(u?1:0))for(r=t-1,i=t+1;r>=0||i<n.length;)if(null!=(c=n[a=r>=0?r--:i++])&&!(2&c.__u)&&s==c.key&&l==c.type)return a;return-1}function O(e,n,t){"-"==n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||y.test(n)?t:t+"px"}function z(e,n,t,o,r){var i,a;e:if("style"==n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||O(e.style,n,"");if(t)for(n in t)o&&t[n]==o[n]||O(e.style,n,t[n])}else if("o"==n[0]&&"n"==n[1])i=n!=(n=n.replace(p,"$1")),a=n.toLowerCase(),n=a in e||"onFocusOut"==n||"onFocusIn"==n?a.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=h,e.addEventListener(n,i?g:f,i)):e.removeEventListener(n,i?g:f,i);else{if("http://www.w3.org/2000/svg"==r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&"popover"!=n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=n[4]?e.removeAttribute(n):e.setAttribute(n,"popover"==n&&1==t?"":t))}}function R(e){return function(n){if(this.l){var t=this.l[n.type+e];if(null==n.t)n.t=h++;else if(n.t<t.u)return;return t(a.event?a.event(n):n)}}}function B(e,n,t,o,r,i,s,l,c,u){var d,p,h,f,g,b,m,v,y,_,C,I,T,A,L,F,P,M=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(c=!!(32&t.__u),i=[l=n.__e=t.__e]),(d=a.__b)&&d(n);e:if("function"==typeof M)try{if(v=n.props,y="prototype"in M&&M.prototype.render,_=(d=M.contextType)&&o[d.__c],C=d?_?_.props.value:d.__:o,t.__c?m=(p=n.__c=t.__c).__=p.__E:(y?n.__c=p=new M(v,C):(n.__c=p=new E(v,C),p.constructor=M,p.render=q),_&&_.sub(p),p.state||(p.state={}),p.__n=o,h=p.__d=!0,p.__h=[],p._sb=[]),y&&null==p.__s&&(p.__s=p.state),y&&null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=w({},p.__s)),w(p.__s,M.getDerivedStateFromProps(v,p.__s))),f=p.props,g=p.state,p.__v=n,h)y&&null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),y&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(y&&null==M.getDerivedStateFromProps&&v!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(v,C),n.__v==t.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(v,p.__s,C)){for(n.__v!=t.__v&&(p.props=v,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.some(function(e){e&&(e.__=n)}),I=0;I<p._sb.length;I++)p.__h.push(p._sb[I]);p._sb=[],p.__h.length&&s.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(v,p.__s,C),y&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(f,g,b)})}if(p.context=C,p.props=v,p.__P=e,p.__e=!1,T=a.__r,A=0,y){for(p.state=p.__s,p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),L=0;L<p._sb.length;L++)p.__h.push(p._sb[L]);p._sb=[]}else do{p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++A<25);p.state=p.__s,null!=p.getChildContext&&(o=w(w({},o),p.getChildContext())),y&&!h&&null!=p.getSnapshotBeforeUpdate&&(b=p.getSnapshotBeforeUpdate(f,g)),F=d,null!=d&&d.type===S&&null==d.key&&(F=$(d.props.children)),l=N(e,x(F)?F:[F],n,t,o,r,i,s,l,c,u),p.base=n.__e,n.__u&=-161,p.__h.length&&s.push(p),m&&(p.__E=p.__=null)}catch(e){if(n.__v=null,c||null!=i)if(e.then){for(n.__u|=c?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,n.__e=l}else{for(P=i.length;P--;)k(i[P]);j(n)}else n.__e=t.__e,n.__k=t.__k,e.then||j(n);a.__e(e,n,t)}else null==i&&n.__v==t.__v?(n.__k=t.__k,n.__e=t.__e):l=n.__e=U(t.__e,n,t,o,r,i,s,c,u);return(d=a.diffed)&&d(n),128&n.__u?void 0:l}function j(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(j)}function H(e,n,t){for(var o=0;o<t.length;o++)Y(t[o],t[++o],t[++o]);a.__c&&a.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){a.__e(e,n.__v)}})}function $(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:x(e)?e.map($):w({},e)}function U(e,n,t,o,r,s,l,c,u){var d,p,h,f,g,b,v,y=t.props||m,w=n.props,_=n.type;if("svg"==_?r="http://www.w3.org/2000/svg":"math"==_?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=s)for(d=0;d<s.length;d++)if((g=s[d])&&"setAttribute"in g==!!_&&(_?g.localName==_:3==g.nodeType)){e=g,s[d]=null;break}if(null==e){if(null==_)return document.createTextNode(w);e=document.createElementNS(r,_,w.is&&w),c&&(a.__m&&a.__m(n,s),c=!1),s=null}if(null==_)y===w||c&&e.data==w||(e.data=w);else{if(s=s&&i.call(e.childNodes),!c&&null!=s)for(y={},d=0;d<e.attributes.length;d++)y[(g=e.attributes[d]).name]=g.value;for(d in y)if(g=y[d],"children"==d);else if("dangerouslySetInnerHTML"==d)h=g;else if(!(d in w)){if("value"==d&&"defaultValue"in w||"checked"==d&&"defaultChecked"in w)continue;z(e,d,null,g,r)}for(d in w)g=w[d],"children"==d?f=g:"dangerouslySetInnerHTML"==d?p=g:"value"==d?b=g:"checked"==d?v=g:c&&"function"!=typeof g||y[d]===g||z(e,d,g,y[d],r);if(p)c||h&&(p.__html==h.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),n.__k=[];else if(h&&(e.innerHTML=""),N("template"==n.type?e.content:e,x(f)?f:[f],n,t,o,"foreignObject"==_?"http://www.w3.org/1999/xhtml":r,s,l,s?s[0]:t.__k&&I(t,0),c,u),null!=s)for(d=s.length;d--;)k(s[d]);c||(d="value","progress"==_&&null==b?e.removeAttribute("value"):null!=b&&(b!==e[d]||"progress"==_&&!b||"option"==_&&b!=y[d])&&z(e,d,b,y[d],r),d="checked",null!=v&&v!=e[d]&&z(e,d,v,y[d],r))}return e}function Y(e,n,t){try{if("function"==typeof e){var o="function"==typeof e.__u;o&&e.__u(),o&&null==n||(e.__u=e(n))}else e.current=n}catch(e){a.__e(e,t)}}function V(e,n,t){var o,r;if(a.unmount&&a.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||Y(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){a.__e(e,n)}o.base=o.__P=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&V(o[r],n,t||"function"!=typeof e.type);t||k(e.__e),e.__c=e.__=e.__e=void 0}function q(e,n,t){return this.constructor(e,t)}function W(e,n,t){var o,r,s,l;n==document&&(n=document.documentElement),a.__&&a.__(e,n),r=(o="function"==typeof t)?null:t&&t.__k||n.__k,s=[],l=[],B(n,e=(!o&&t||n).__k=_(S,null,[e]),r||m,m,n.namespaceURI,!o&&t?[t]:r?null:n.firstChild?i.call(n.childNodes):null,s,!o&&t?t:r?r.__e:n.firstChild,o,l),H(s,e,l)}function Z(e,n){W(e,n,Z)}function G(e,n,t){var o,r,a,s,l=w({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)"key"==a?o=n[a]:"ref"==a?r=n[a]:l[a]=void 0===n[a]&&null!=s?s[a]:n[a];return arguments.length>2&&(l.children=arguments.length>3?i.call(arguments,2):t),C(e.type,l,o||e.key,r||e.ref,null)}function K(e){function n(e){var t,o;return this.getChildContext||(t=new Set,(o={})[n.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach(function(e){e.__e=!0,A(e)})},this.sub=function(e){t.add(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),n&&n.call(e)}}),e.children}return n.__c="__cC"+b++,n.__=e,n.Provider=n.__l=(n.Consumer=function(e,n){return e.children(n)}).contextType=n,n}i=v.slice,a={__e:function(e,n,t,o){for(var r,i,a;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),a=r.__d),a)return r.__E=r}catch(n){e=n}throw e}},s=0,E.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},t),this.props)),e&&w(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),A(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),A(this))},E.prototype.render=S,l=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,n){return e.__v.__b-n.__v.__b},L.__r=0,p=/(PointerCapture)$|Capture$/i,h=0,f=R(!1),g=R(!0),b=0;var Q,X,J,ee,ne=0,te=[],oe=a,re=oe.__b,ie=oe.__r,ae=oe.diffed,se=oe.__c,le=oe.unmount,ce=oe.__;function ue(e,n){oe.__h&&oe.__h(X,e,ne||n),ne=0;var t=X.__H||(X.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function de(e){return ne=1,pe(Te,e)}function pe(e,n,t){var o=ue(Q++,2);if(o.t=e,!o.__c&&(o.__=[t?t(n):Te(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=X,!X.__f)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter(function(e){return!!e.__c});if(r.every(function(e){return!e.__N}))return!i||i.call(this,e,n,t);var a=o.__c.props!==e;return r.forEach(function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(a=!0)}}),i&&i.call(this,e,n,t)||a};X.__f=!0;var i=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}a&&a.call(this,e,n,t)},X.shouldComponentUpdate=r}return o.__N||o.__}function he(e,n){var t=ue(Q++,3);!oe.__s&&Ie(t.__H,n)&&(t.__=e,t.u=n,X.__H.__h.push(t))}function fe(e,n){var t=ue(Q++,4);!oe.__s&&Ie(t.__H,n)&&(t.__=e,t.u=n,X.__h.push(t))}function ge(e){return ne=5,me(function(){return{current:e}},[])}function be(e,n,t){ne=6,fe(function(){if("function"==typeof e){var t=e(n());return function(){e(null),t&&"function"==typeof t&&t()}}if(e)return e.current=n(),function(){return e.current=null}},null==t?t:t.concat(e))}function me(e,n){var t=ue(Q++,7);return Ie(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function ve(e,n){return ne=8,me(function(){return e},n)}function ye(e){var n=X.context[e.__c],t=ue(Q++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(X)),n.props.value):e.__}function xe(e,n){oe.useDebugValue&&oe.useDebugValue(n?n(e):e)}function we(){var e=ue(Q++,11);if(!e.__){for(var n=X.__v;null!==n&&!n.__m&&null!==n.__;)n=n.__;var t=n.__m||(n.__m=[0,0]);e.__="P"+t[0]+"-"+t[1]++}return e.__}function ke(){for(var e;e=te.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Se),e.__H.__h.forEach(Ee),e.__H.__h=[]}catch(n){e.__H.__h=[],oe.__e(n,e.__v)}}oe.__b=function(e){X=null,re&&re(e)},oe.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),ce&&ce(e,n)},oe.__r=function(e){ie&&ie(e),Q=0;var n=(X=e.__c).__H;n&&(J===X?(n.__h=[],X.__h=[],n.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(n.__h.forEach(Se),n.__h.forEach(Ee),n.__h=[],Q=0)),J=X},oe.diffed=function(e){ae&&ae(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==te.push(n)&&ee===oe.requestAnimationFrame||((ee=oe.requestAnimationFrame)||Ce)(ke)),n.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),J=X=null},oe.__c=function(e,n){n.some(function(e){try{e.__h.forEach(Se),e.__h=e.__h.filter(function(e){return!e.__||Ee(e)})}catch(t){n.some(function(e){e.__h&&(e.__h=[])}),n=[],oe.__e(t,e.__v)}}),se&&se(e,n)},oe.unmount=function(e){le&&le(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(e){try{Se(e)}catch(e){n=e}}),t.__H=void 0,n&&oe.__e(n,t.__v))};var _e="function"==typeof requestAnimationFrame;function Ce(e){var n,t=function(){clearTimeout(o),_e&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,35);_e&&(n=requestAnimationFrame(t))}function Se(e){var n=X,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),X=n}function Ee(e){var n=X;e.__c=e.__(),X=n}function Ie(e,n){return!e||e.length!==n.length||n.some(function(n,t){return n!==e[t]})}function Te(e,n){return"function"==typeof n?n(e):n}function Ae(e,n){for(var t in n)e[t]=n[t];return e}function Le(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var o in n)if("__source"!==o&&e[o]!==n[o])return!0;return!1}function Ne(e,n){var t=n(),o=de({t:{__:t,u:n}}),r=o[0].t,i=o[1];return fe(function(){r.__=t,r.u=n,Fe(r)&&i({t:r})},[e,t,n]),he(function(){return Fe(r)&&i({t:r}),e(function(){Fe(r)&&i({t:r})})},[e]),t}function Fe(e){var n,t,o=e.u,r=e.__;try{var i=o();return!((n=r)===(t=i)&&(0!==n||1/n==1/t)||n!=n&&t!=t)}catch(e){return!0}}function Pe(e){e()}function Me(e){return e}function De(){return[!1,Pe]}var Oe=fe;function ze(e,n){this.props=e,this.context=n}(ze.prototype=new E).isPureReactComponent=!0,ze.prototype.shouldComponentUpdate=function(e,n){return Le(this.props,e)||Le(this.state,n)};var Re=a.__b;a.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Re&&Re(e)};var Be="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var je=function(e,n){return null==e?null:M(M(e).map(n))},He={map:je,forEach:je,count:function(e){return e?M(e).length:0},only:function(e){var n=M(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:M},$e=a.__e;a.__e=function(e,n,t,o){if(e.then)for(var r,i=n;i=i.__;)if((r=i.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);$e(e,n,t,o)};var Ue=a.unmount;function Ye(e,n,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Ae({},e)).__c&&(e.__c.__P===t&&(e.__c.__P=n),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Ye(e,n,t)})),e}function Ve(e,n,t){return e&&t&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Ve(e,n,t)}),e.__c&&e.__c.__P===n&&(e.__e&&t.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=t)),e}function qe(){this.__u=0,this.o=null,this.__b=null}function We(e){var n=e.__.__c;return n&&n.__a&&n.__a(e)}function Ze(){this.i=null,this.l=null}a.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&32&e.__u&&(e.type=null),Ue&&Ue(e)},(qe.prototype=new E).__c=function(e,n){var t=n.__c,o=this;null==o.o&&(o.o=[]),o.o.push(t);var r=We(o.__v),i=!1,a=function(){i||(i=!0,t.__R=null,r?r(s):s())};t.__R=a;var s=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=Ve(e,e.__c.__P,e.__c.__O)}var n;for(o.setState({__a:o.__b=null});n=o.o.pop();)n.forceUpdate()}};o.__u++||32&n.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(a,a)},qe.prototype.componentWillUnmount=function(){this.o=[]},qe.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Ye(this.__b,t,o.__O=o.__P)}this.__b=null}var r=n.__a&&_(S,null,e.fallback);return r&&(r.__u&=-33),[_(S,null,n.__a?null:e.children),r]};var Ge=function(e,n,t){if(++t[1]===t[0]&&e.l.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(t=e.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.i=t=t[2]}};function Ke(e){return this.getChildContext=function(){return e.context},e.children}function Qe(e){var n=this,t=e.h;if(n.componentWillUnmount=function(){W(null,n.v),n.v=null,n.h=null},n.h&&n.h!==t&&n.componentWillUnmount(),!n.v){for(var o=n.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;n.h=t,n.v={nodeType:1,parentNode:t,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},insertBefore:function(e,t){this.childNodes.push(e),n.h.insertBefore(e,t)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),n.h.removeChild(e)}}}W(_(Ke,{context:n.context},e.__v),n.v)}(Ze.prototype=new E).__a=function(e){var n=this,t=We(n.__v),o=n.l.get(e);return o[0]++,function(r){var i=function(){n.props.revealOrder?(o.push(r),Ge(n,e,o)):r()};t?t(i):i()}},Ze.prototype.render=function(e){this.i=null,this.l=new Map;var n=M(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.l.set(n[t],this.i=[1,0,this.i]);return e.children},Ze.prototype.componentDidUpdate=Ze.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(n,t){Ge(e,t,n)})};var Xe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Je=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,en=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,nn=/[A-Z0-9]/g,tn="undefined"!=typeof document,on=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function rn(e,n,t){return null==n.__k&&(n.textContent=""),W(e,n),"function"==typeof t&&t(),e?e.__c:null}function an(e,n,t){return Z(e,n),"function"==typeof t&&t(),e?e.__c:null}E.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(E.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})});var sn=a.event;function ln(){}function cn(){return this.cancelBubble}function un(){return this.defaultPrevented}a.event=function(e){return sn&&(e=sn(e)),e.persist=ln,e.isPropagationStopped=cn,e.isDefaultPrevented=un,e.nativeEvent=e};var dn,pn={enumerable:!1,configurable:!0,get:function(){return this.class}},hn=a.vnode;a.vnode=function(e){"string"==typeof e.type&&function(e){var n=e.props,t=e.type,o={},r=-1===t.indexOf("-");for(var i in n){var a=n[i];if(!("value"===i&&"defaultValue"in n&&null==a||tn&&"children"===i&&"noscript"===t||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===a?a="":"translate"===s&&"no"===a?a=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==t&&"textarea"!==t||on(n.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":en.test(i)&&(i=s):s=i="oninput":r&&Je.test(i)?i=i.replace(nn,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===s&&o[i=s]&&(i="oninputCapture"),o[i]=a}}"select"==t&&o.multiple&&Array.isArray(o.value)&&(o.value=M(n.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==t&&null!=o.defaultValue&&(o.value=M(n.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",pn)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),e.props=o}(e),e.$$typeof=Xe,hn&&hn(e)};var fn=a.__r;a.__r=function(e){fn&&fn(e),dn=e.__c};var gn=a.diffed;a.diffed=function(e){gn&&gn(e);var n=e.props,t=e.__e;null!=t&&"textarea"===e.type&&"value"in n&&n.value!==t.value&&(t.value=null==n.value?"":n.value),dn=null};var bn={ReactCurrentDispatcher:{current:{readContext:function(e){return dn.__n[e.__c].props.value},useCallback:ve,useContext:ye,useDebugValue:xe,useDeferredValue:Me,useEffect:he,useId:we,useImperativeHandle:be,useInsertionEffect:Oe,useLayoutEffect:fe,useMemo:me,useReducer:pe,useRef:ge,useState:de,useSyncExternalStore:Ne,useTransition:De}}};function mn(e){return!!e&&e.$$typeof===Xe}function vn(e){return!!e.__k&&(W(null,e),!0)}var yn={useState:de,useId:we,useReducer:pe,useEffect:he,useLayoutEffect:fe,useInsertionEffect:Oe,useTransition:De,useDeferredValue:Me,useSyncExternalStore:Ne,startTransition:Pe,useRef:ge,useImperativeHandle:be,useMemo:me,useCallback:ve,useContext:ye,useDebugValue:xe,version:"18.3.1",Children:He,render:rn,hydrate:an,unmountComponentAtNode:vn,createPortal:function(e,n){var t=_(Qe,{__v:e,h:n});return t.containerInfo=n,t},createElement:_,createContext:K,createFactory:function(e){return _.bind(null,e)},cloneElement:function(e){return mn(e)?G.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:S,isValidElement:mn,isElement:mn,isFragment:function(e){return mn(e)&&e.type===S},isMemo:function(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:E,PureComponent:ze,memo:function(e,n){function t(e){var t=this.props.ref,o=t==e.ref;return!o&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!o:Le(this.props,e)}function o(n){return this.shouldComponentUpdate=t,_(e,n)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o.type=e,o},forwardRef:function(e){function n(n){var t=Ae({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=Be,n.render=e,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n},flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:S,Suspense:qe,SuspenseList:Ze,lazy:function(e){var n,t,o,r=null;function i(i){if(n||(n=e()).then(function(e){e&&(r=e.default||e),o=!0},function(e){t=e,o=!0}),t)throw t;if(!o)throw n;return r?_(r,i):null}return i.displayName="Lazy",i.__f=!0,i},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bn};function xn(e){return{render:function(n){rn(n,e)},unmount:function(){vn(e)}}}var wn=0;Array.isArray;function kn(e,n,t,o,r,i){n||(n={});var s,l,c=n;if("ref"in c)for(l in c={},n)"ref"==l?s=n[l]:c[l]=n[l];var u={type:e,props:c,key:t,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--wn,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(s=e.defaultProps))for(l in s)void 0===c[l]&&(c[l]=s[l]);return a.vnode&&a.vnode(u),u}const _n=e=>{const[n,t]=de(!!e),o=ve(()=>t(!0),[]),r=ve(()=>t(!1),[]),i=ve(e=>t(e),[]);return me(()=>[n,{open:o,close:r,toggle:()=>t(!n),force:i}],[n])},Cn=({children:e,text:n,position:t="top",delay:o=300})=>{const[r,i]=de(!1),[a,s]=de(null),[l,c]=de(!1),u=ge(null),d=we(),p=ge(null);he(()=>{const e=()=>{c((()=>{if("undefined"==typeof window)return!1;const e="ontouchstart"in window||navigator.maxTouchPoints>0,n=window.innerWidth<=768,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);return e&&(n||t)})())};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);return kn("div",{className:"tooltip-container",onMouseEnter:()=>{if(!l){if(p.current&&p.current.hasAttribute("title")){const e=p.current.getAttribute("title");s(e),p.current.removeAttribute("title")}u.current=setTimeout(()=>{i(!0)},o)}},onMouseLeave:()=>{u.current&&clearTimeout(u.current),a&&p.current&&(p.current.setAttribute("title",a),s(null)),i(!1)},children:[yn.cloneElement(e,{"aria-describedby":n?d:void 0,ref:p,onFocus:()=>{if(!l){if(p.current&&p.current.hasAttribute("title")){const e=p.current.getAttribute("title");s(e),p.current.removeAttribute("title")}i(!0)}},onBlur:()=>{a&&p.current&&(p.current.setAttribute("title",a),s(null)),i(!1)},onKeyDown:e=>{"Escape"===e.key&&(a&&p.current&&(p.current.setAttribute("title",a),s(null)),i(!1))}}),r&&n&&!l&&kn("div",{id:d,className:`tooltip tooltip-${t}`,role:"tooltip","aria-live":"polite",children:[n,kn("div",{className:"tooltip-arrow","aria-hidden":"true"})]})]})},Sn=({svg:e,className:n,style:t})=>kn("span",{className:n,dangerouslySetInnerHTML:{__html:e},style:Object.assign({display:"inline-block",lineHeight:0},t)}),En='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="7" viewBox="0 0 14 7" fill="currentColor" class="accordion-arrow" ><path d="M13.023 1.14798L7.39804 6.77298C7.3458 6.82527 7.28376 6.86676 7.21547 6.89507C7.14719 6.92338 7.07399 6.93795 7.00007 6.93795C6.92615 6.93795 6.85295 6.92338 6.78466 6.89507C6.71638 6.86676 6.65434 6.82527 6.6021 6.77298L0.9771 1.14798C0.871552 1.04243 0.812256 0.899275 0.812256 0.750008C0.812256 0.60074 0.871552 0.457586 0.9771 0.352039C1.08265 0.246491 1.2258 0.187195 1.37507 0.187195C1.52434 0.187195 1.66749 0.246491 1.77304 0.352039L7.00007 5.57977L12.2271 0.352039C12.2794 0.299777 12.3414 0.25832 12.4097 0.230036C12.478 0.201752 12.5512 0.187195 12.6251 0.187195C12.699 0.187195 12.7722 0.201752 12.8404 0.230036C12.9087 0.25832 12.9708 0.299777 13.023 0.352039C13.0753 0.404301 13.1168 0.466345 13.145 0.534628C13.1733 0.602912 13.1879 0.676098 13.1879 0.750008C13.1879 0.823917 13.1733 0.897103 13.145 0.965387C13.1168 1.03367 13.0753 1.09571 13.023 1.14798Z" /></svg>',In='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="7" viewBox="0 0 14 7" fill="currentColor" class="accordion-arrow open" ><path d="M13.023 1.14798L7.39804 6.77298C7.3458 6.82527 7.28376 6.86676 7.21547 6.89507C7.14719 6.92338 7.07399 6.93795 7.00007 6.93795C6.92615 6.93795 6.85295 6.92338 6.78466 6.89507C6.71638 6.86676 6.65434 6.82527 6.6021 6.77298L0.9771 1.14798C0.871552 1.04243 0.812256 0.899275 0.812256 0.750008C0.812256 0.60074 0.871552 0.457586 0.9771 0.352039C1.08265 0.246491 1.2258 0.187195 1.37507 0.187195C1.52434 0.187195 1.66749 0.246491 1.77304 0.352039L7.00007 5.57977L12.2271 0.352039C12.2794 0.299777 12.3414 0.25832 12.4097 0.230036C12.478 0.201752 12.5512 0.187195 12.6251 0.187195C12.699 0.187195 12.7722 0.201752 12.8404 0.230036C12.9087 0.25832 12.9708 0.299777 13.023 0.352039C13.0753 0.404301 13.1168 0.466345 13.145 0.534628C13.1733 0.602912 13.1879 0.676098 13.1879 0.750008C13.1879 0.823917 13.1733 0.897103 13.145 0.965387C13.1168 1.03367 13.0753 1.09571 13.023 1.14798Z" /></svg>',Tn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none" ><path d="M16 3C13.7556 2.99951 11.5493 3.58011 9.59585 4.68529C7.64239 5.79046 6.00834 7.38256 4.85274 9.30662C3.69715 11.2307 3.05938 13.4212 3.00151 15.6648C2.94365 17.9085 3.46765 20.1289 4.52253 22.11L3.10378 26.3662C2.98626 26.7186 2.96921 27.0968 3.05453 27.4583C3.13985 27.8199 3.32417 28.1505 3.58684 28.4132C3.84951 28.6759 4.18015 28.8602 4.54169 28.9455C4.90323 29.0308 5.28139 29.0138 5.63378 28.8962L9.89003 27.4775C11.6335 28.4048 13.5653 28.9228 15.5388 28.992C17.5123 29.0613 19.4757 28.68 21.2799 27.8772C23.084 27.0743 24.6816 25.871 25.9513 24.3586C27.221 22.8462 28.1294 21.0644 28.6077 19.1484C29.0859 17.2325 29.1214 15.2327 28.7114 13.301C28.3015 11.3693 27.4568 9.55642 26.2416 7.99989C25.0263 6.44337 23.4725 5.18415 21.6979 4.31782C19.9234 3.45149 17.9748 3.00081 16 3ZM16 27C14.0663 27.0013 12.1664 26.4921 10.4925 25.5237C10.37 25.4527 10.2337 25.4085 10.0928 25.394C9.95185 25.3796 9.80945 25.3953 9.67503 25.44L5.00003 27L6.55878 22.325C6.60371 22.1907 6.61959 22.0483 6.60537 21.9074C6.59115 21.7664 6.54715 21.6301 6.47628 21.5075C5.26374 19.4111 4.77692 16.9732 5.09132 14.5719C5.40572 12.1707 6.50377 9.94027 8.21514 8.22674C9.92651 6.51321 12.1555 5.41234 14.5564 5.0949C16.9573 4.77747 19.3958 5.26122 21.4937 6.47111C23.5916 7.68099 25.2316 9.54938 26.1592 11.7864C27.0869 14.0235 27.2504 16.5042 26.6243 18.8436C25.9983 21.1831 24.6177 23.2505 22.6967 24.7253C20.7758 26.2 18.4218 26.9996 16 27Z" fill="currentColor" /><path d="M22.8334 13.3333C22.8334 13.5985 22.728 13.8529 22.5405 14.0404C22.3529 14.228 22.0986 14.3333 21.8334 14.3333H10.6667C10.4015 14.3333 10.1471 14.228 9.95959 14.0404C9.77205 13.8529 9.6667 13.5985 9.6667 13.3333C9.6667 13.0681 9.77205 12.8138 9.95959 12.6262C10.1471 12.4387 10.4015 12.3333 10.6667 12.3333H21.8334C22.0986 12.3333 22.3529 12.4387 22.5405 12.6262C22.728 12.8138 22.8334 13.0681 22.8334 13.3333ZM17.8334 17.6667H10.6667C10.4015 17.6667 10.1471 17.772 9.95959 17.9596C9.77205 18.1471 9.6667 18.4014 9.6667 18.6667C9.6667 18.9319 9.77205 19.1862 9.95959 19.3738C10.1471 19.5613 10.4015 19.6667 10.6667 19.6667H17.8334C18.0986 19.6667 18.3529 19.5613 18.5405 19.3738C18.728 19.1862 18.8334 18.9319 18.8334 18.6667C18.8334 18.4014 18.728 18.1471 18.5405 17.9596C18.3529 17.772 18.0986 17.6667 17.8334 17.6667Z" fill="currentColor" /></svg>',An='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" ><path d="M13.7071 1.70711C14.0976 1.31658 14.0976 0.683417 13.7071 0.292893C13.3166 -0.0976311 12.6834 -0.0976311 12.2929 0.292893L7 5.58579L1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L5.58579 7L0.292893 12.2929C-0.0976311 12.6834 -0.0976311 13.3166 0.292893 13.7071C0.683417 14.0976 1.31658 14.0976 1.70711 13.7071L7 8.41421L12.2929 13.7071C12.6834 14.0976 13.3166 14.0976 13.7071 13.7071C14.0976 13.3166 14.0976 12.6834 13.7071 12.2929L8.41421 7L13.7071 1.70711Z" fill="currentColor" /></svg>',Ln='<svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none" ><path d="M21.3585 12.5306L14.6085 19.2806C14.4678 19.4213 14.2769 19.5004 14.0779 19.5004C13.8789 19.5004 13.688 19.4213 13.5473 19.2806C13.4065 19.1399 13.3275 18.949 13.3275 18.75C13.3275 18.551 13.4065 18.3601 13.5473 18.2194L19.0176 12.75H4.32788C4.12897 12.75 3.9382 12.671 3.79755 12.5303C3.6569 12.3897 3.57788 12.1989 3.57788 12C3.57788 11.8011 3.6569 11.6103 3.79755 11.4697C3.9382 11.329 4.12897 11.25 4.32788 11.25H19.0176L13.5473 5.78061C13.4065 5.63988 13.3275 5.44901 13.3275 5.24999C13.3275 5.05097 13.4065 4.8601 13.5473 4.71936C13.688 4.57863 13.8789 4.49957 14.0779 4.49957C14.2769 4.49957 14.4678 4.57863 14.6085 4.71936L21.3585 11.4694C21.4282 11.539 21.4836 11.6217 21.5213 11.7128C21.559 11.8038 21.5785 11.9014 21.5785 12C21.5785 12.0986 21.559 12.1961 21.5213 12.2872C21.4836 12.3782 21.4282 12.461 21.3585 12.5306Z" fill="currentColor" /></svg>',Nn='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" ><path d="M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17316C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8078C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C21.9972 9.34869 20.9427 6.80678 19.068 4.93202C17.1932 3.05727 14.6513 2.0028 12 2ZM12 20.4615C10.3265 20.4615 8.69052 19.9653 7.29902 19.0355C5.90753 18.1057 4.823 16.7842 4.18256 15.2381C3.54213 13.6919 3.37456 11.9906 3.70105 10.3492C4.02754 8.70786 4.83343 7.20016 6.01679 6.01679C7.20016 4.83342 8.70786 4.02754 10.3492 3.70105C11.9906 3.37456 13.6919 3.54212 15.2381 4.18256C16.7842 4.82299 18.1057 5.90753 19.0355 7.29902C19.9653 8.69051 20.4615 10.3265 20.4615 12C20.459 14.2434 19.5667 16.3941 17.9804 17.9804C16.3941 19.5667 14.2434 20.459 12 20.4615ZM11.2308 12.7692V7.38461C11.2308 7.1806 11.3118 6.98494 11.4561 6.84069C11.6003 6.69643 11.796 6.61538 12 6.61538C12.204 6.61538 12.3997 6.69643 12.5439 6.84069C12.6882 6.98494 12.7692 7.1806 12.7692 7.38461V12.7692C12.7692 12.9732 12.6882 13.1689 12.5439 13.3132C12.3997 13.4574 12.204 13.5385 12 13.5385C11.796 13.5385 11.6003 13.4574 11.4561 13.3132C11.3118 13.1689 11.2308 12.9732 11.2308 12.7692ZM13.1538 16.2308C13.1538 16.459 13.0862 16.6821 12.9594 16.8718C12.8326 17.0616 12.6524 17.2094 12.4416 17.2968C12.2307 17.3841 11.9987 17.407 11.7749 17.3624C11.5511 17.3179 11.3455 17.208 11.1841 17.0467C11.0227 16.8853 10.9128 16.6797 10.8683 16.4559C10.8238 16.232 10.8467 16 10.934 15.7892C11.0213 15.5784 11.1692 15.3982 11.359 15.2714C11.5487 15.1446 11.7718 15.0769 12 15.0769C12.306 15.0769 12.5995 15.1985 12.8159 15.4149C13.0323 15.6313 13.1538 15.9247 13.1538 16.2308Z" fill="currentColor" /></svg>',Fn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <rect x="5" y="11" width="14" height="10" rx="2" ry="2"/>\n <path d="M7 11V7a5 5 0 0 1 10 0v4"/>\n</svg>\n',Pn=e=>({Deutsch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="6" fill="#000000" /><rect y="6" width="18" height="6" fill="#DD0000" /><rect y="12" width="18" height="6" fill="#FFCE00" /></svg>'}),Englisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="18" fill="#012169" /><path d="M0,0 L18,18 M18,0 L0,18" stroke="#FFFFFF" stroke-width="2" /><path d="M9,0 L9,18 M0,9 L18,9" stroke="#FFFFFF" stroke-width="3" /><path d="M0,0 L18,18 M18,0 L0,18" stroke="#C8102E" stroke-width="1" /><path d="M9,0 L9,18 M0,9 L18,9" stroke="#C8102E" stroke-width="1.5" /></svg>'}),Französisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="6" height="18" fill="#0055A4" /><rect x="6" width="6" height="18" fill="#FFFFFF" /><rect x="12" width="6" height="18" fill="#EF4135" /></svg>'}),Italienisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="6" height="18" fill="#009246" /><rect x="6" width="6" height="18" fill="#FFFFFF" /><rect x="12" width="6" height="18" fill="#CE2B37" /></svg>'}),Polnisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="9" fill="#FFFFFF" /><rect y="9" width="18" height="9" fill="#DC143C" /></svg>'}),Türkisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="18" fill="#E30A17" /><circle cx="7" cy="9" r="3" fill="none" stroke="#FFFFFF" stroke-width="0.8" /><circle cx="8.5" cy="9" r="2.2" fill="#E30A17" /><path d="M10.5,7 L11.5,8.5 L13,8 L12,9.5 L13,11 L11.5,10.5 L10.5,12 L10,10.5 L8.5,11 L9.5,9.5 L8.5,8 L10,8.5 Z" fill="#FFFFFF" /></svg>'}),Griechisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="18" fill="#0D5EAF" /><rect x="0" y="0" width="7" height="7" fill="#FFFFFF" /><rect x="3" y="0" width="1" height="7" fill="#0D5EAF" /><rect x="0" y="3" width="7" height="1" fill="#0D5EAF" /><rect y="8" width="18" height="1" fill="#FFFFFF" /><rect y="10" width="18" height="1" fill="#FFFFFF" /><rect y="12" width="18" height="1" fill="#FFFFFF" /><rect y="14" width="18" height="1" fill="#FFFFFF" /><rect y="16" width="18" height="1" fill="#FFFFFF" /></svg>'}),Russisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="6" fill="#FFFFFF" /><rect y="6" width="18" height="6" fill="#0039A6" /><rect y="12" width="18" height="6" fill="#D52B1E" /></svg>'})}[e]||kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><circle cx="9" cy="9" r="8" fill="#4A90E2" /><text x="9" y="12" textAnchor="middle" fill="white" fontSize="10"> 🌐 </text></svg>'})),Mn=({type:e})=>{const n={width:"20px",height:"20px"};return kn("div",{style:{width:"30px",height:"30px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:"2px"},children:(()=>{switch(e){case"microphone":return kn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",style:n,children:kn("path",{d:"M8 11C8.7954 10.9992 9.55798 10.6828 10.1204 10.1204C10.6828 9.55798 10.9992 8.7954 11 8V4C11 3.20435 10.6839 2.44129 10.1213 1.87868C9.55871 1.31607 8.79565 1 8 1C7.20435 1 6.44129 1.31607 5.87868 1.87868C5.31607 2.44129 5 3.20435 5 4V8C5.00083 8.7954 5.31716 9.55798 5.87959 10.1204C6.44202 10.6828 7.2046 10.9992 8 11ZM6 4C6 3.46957 6.21071 2.96086 6.58579 2.58579C6.96086 2.21071 7.46957 2 8 2C8.53043 2 9.03914 2.21071 9.41421 2.58579C9.78929 2.96086 10 3.46957 10 4V8C10 8.53043 9.78929 9.03914 9.41421 9.41421C9.03914 9.78929 8.53043 10 8 10C7.46957 10 6.96086 9.78929 6.58579 9.41421C6.21071 9.03914 6 8.53043 6 8V4ZM8.5 12.975V15C8.5 15.1326 8.44732 15.2598 8.35355 15.3536C8.25979 15.4473 8.13261 15.5 8 15.5C7.86739 15.5 7.74021 15.4473 7.64645 15.3536C7.55268 15.2598 7.5 15.1326 7.5 15V12.975C6.26728 12.8496 5.12485 12.2715 4.29365 11.3525C3.46245 10.4336 3.00152 9.23909 3 8C3 7.86739 3.05268 7.74021 3.14645 7.64645C3.24021 7.55268 3.36739 7.5 3.5 7.5C3.63261 7.5 3.75979 7.55268 3.85355 7.64645C3.94732 7.74021 4 7.86739 4 8C4 9.06087 4.42143 10.0783 5.17157 10.8284C5.92172 11.5786 6.93913 12 8 12C9.06087 12 10.0783 11.5786 10.8284 10.8284C11.5786 10.0783 12 9.06087 12 8C12 7.86739 12.0527 7.74021 12.1464 7.64645C12.2402 7.55268 12.3674 7.5 12.5 7.5C12.6326 7.5 12.7598 7.55268 12.8536 7.64645C12.9473 7.74021 13 7.86739 13 8C12.9985 9.23909 12.5375 10.4336 11.7063 11.3525C10.8751 12.2715 9.73272 12.8496 8.5 12.975Z"})});case"globe":return kn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",style:n,children:kn("path",{d:"M6.99992 0.333328C5.68138 0.333328 4.39245 0.724321 3.29612 1.45686C2.19979 2.18941 1.34531 3.2306 0.840725 4.44877C0.33614 5.66695 0.204118 7.00739 0.461353 8.3006C0.718588 9.5938 1.35353 10.7817 2.28588 11.714C3.21823 12.6464 4.40611 13.2813 5.69932 13.5386C6.99252 13.7958 8.33297 13.6638 9.55114 13.1592C10.7693 12.6546 11.8105 11.8001 12.5431 10.7038C13.2756 9.60747 13.6666 8.31854 13.6666 6.99999C13.6645 5.23252 12.9615 3.53803 11.7117 2.28824C10.4619 1.03845 8.76739 0.335404 6.99992 0.333328ZM12.3313 4.51633H9.69208C9.37747 3.30384 8.80373 2.17396 8.01038 1.20457C8.94358 1.36912 9.82344 1.75597 10.5755 2.33242C11.3276 2.90887 11.9299 3.65796 12.3313 4.51633ZM12.8823 6.99999C12.8827 7.57566 12.7984 8.14825 12.6319 8.69934H9.86332C10.0542 7.57448 10.0542 6.42551 9.86332 5.30065H12.6319C12.7984 5.85173 12.8827 6.42433 12.8823 6.99999ZM6.99992 12.7405C6.62235 12.3554 6.28931 11.9289 6.00711 11.4693C5.62628 10.8498 5.33039 10.1819 5.12737 9.48365H8.87247C8.66945 10.1819 8.37356 10.8498 7.99273 11.4693C7.71053 11.9289 7.37749 12.3554 6.99992 12.7405ZM4.93783 8.69934C4.72432 7.5765 4.72432 6.42348 4.93783 5.30065H9.06201C9.27553 6.42348 9.27553 7.5765 9.06201 8.69934H4.93783ZM1.11757 6.99999C1.11713 6.42433 1.20148 5.85173 1.3679 5.30065H4.13652C3.94567 6.42551 3.94567 7.57448 4.13652 8.69934H1.3679C1.20148 8.14825 1.11713 7.57566 1.11757 6.99999ZM6.99992 1.25947C7.37749 1.64464 7.71053 2.07107 7.99273 2.53071C8.37356 3.15021 8.66945 3.81805 8.87247 4.51633H5.12737C5.33039 3.81805 5.62628 3.15021 6.00711 2.53071C6.28931 2.07107 6.62235 1.64464 6.99992 1.25947ZM5.98946 1.20457C5.19612 2.17396 4.62237 3.30384 4.30776 4.51633H1.66855C2.06997 3.65796 2.67219 2.90887 3.4243 2.33242C4.1764 1.75597 5.05626 1.36912 5.98946 1.20457ZM1.66855 9.48365H4.30776C4.62237 10.6961 5.19612 11.826 5.98946 12.7954C5.05626 12.6309 4.1764 12.244 3.4243 11.6676C2.67219 11.0911 2.06997 10.342 1.66855 9.48365ZM8.00842 12.7954C8.80247 11.8262 9.37689 10.6963 9.69208 9.48365H12.3313C11.9299 10.342 11.3276 11.0911 10.5755 11.6676C9.82344 12.244 8.94358 12.6309 8.01038 12.7954H8.00842Z"})});case"speaker":return kn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 15 14",fill:"none",style:n,children:kn("path",{d:"M8.71938 0.550623C8.63529 0.509651 8.54141 0.493086 8.44838 0.502808C8.35535 0.51253 8.26692 0.548151 8.19313 0.605623L3.82813 4H1C0.734784 4 0.48043 4.10536 0.292893 4.29289C0.105357 4.48043 0 4.73478 0 5V9C0 9.26521 0.105357 9.51957 0.292893 9.7071C0.48043 9.89464 0.734784 10 1 10H3.82813L8.19313 13.3944C8.26699 13.4518 8.35548 13.4873 8.44855 13.497C8.54161 13.5066 8.63551 13.4899 8.71956 13.4488C8.80362 13.4078 8.87446 13.3439 8.92404 13.2646C8.97361 13.1852 8.99993 13.0936 9 13V0.999998C9.00001 0.906328 8.97371 0.814538 8.9241 0.735087C8.87449 0.655637 8.80355 0.591721 8.71938 0.550623ZM1 5H3.5V9H1V5ZM8 11.9775L4.5 9.25562V4.74437L8 2.0225V11.9775ZM11.375 5.3475C11.7772 5.80405 11.999 6.39158 11.999 7C11.999 7.60841 11.7772 8.19595 11.375 8.6525C11.2867 8.74956 11.1637 8.808 11.0327 8.81521C10.9016 8.82241 10.773 8.7778 10.6745 8.69101C10.5761 8.60421 10.5157 8.48219 10.5065 8.35128C10.4972 8.22036 10.5398 8.09105 10.625 7.99125C10.8662 7.71735 10.9992 7.36493 10.9992 7C10.9992 6.63506 10.8662 6.28264 10.625 6.00875C10.5398 5.90895 10.4972 5.77964 10.5065 5.64872C10.5157 5.51781 10.5761 5.39578 10.6745 5.30899C10.773 5.22219 10.9016 5.17758 11.0327 5.18479C11.1637 5.19199 11.2867 5.25043 11.375 5.3475ZM14.5 7C14.5007 8.23012 14.0474 9.41723 13.2269 10.3337C13.1378 10.4301 13.0144 10.4876 12.8833 10.4938C12.7522 10.5 12.624 10.4545 12.5262 10.3669C12.4284 10.2794 12.369 10.1569 12.3607 10.026C12.3524 9.89501 12.3959 9.76603 12.4819 9.66687C13.1378 8.93352 13.5004 7.98417 13.5004 7.00031C13.5004 6.01645 13.1378 5.0671 12.4819 4.33375C12.4369 4.28504 12.402 4.22785 12.3793 4.16553C12.3566 4.10321 12.3465 4.03699 12.3496 3.97073C12.3528 3.90448 12.3691 3.83951 12.3976 3.77961C12.426 3.71971 12.4662 3.66608 12.5156 3.62184C12.565 3.5776 12.6227 3.54364 12.6854 3.52193C12.7481 3.50022 12.8145 3.4912 12.8807 3.49539C12.9469 3.49958 13.0116 3.5169 13.071 3.54634C13.1304 3.57578 13.1834 3.61675 13.2269 3.66687C14.0476 4.58301 14.501 5.77001 14.5 7Z"})});case"chat":return kn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",style:n,children:[kn("path",{d:"M6.99995 0.5C5.87775 0.499755 4.77459 0.790055 3.79786 1.34264C2.82113 1.89523 2.00411 2.69128 1.42631 3.65331C0.848514 4.61534 0.52963 5.71058 0.500696 6.83241C0.471763 7.95425 0.733766 9.06446 1.2612 10.055L0.551829 12.1831C0.493069 12.3593 0.484542 12.5484 0.527203 12.7292C0.569863 12.9099 0.662026 13.0753 0.793361 13.2066C0.924696 13.3379 1.09001 13.4301 1.27078 13.4728C1.45155 13.5154 1.64063 13.5069 1.81683 13.4481L3.94495 12.7387C4.81668 13.2024 5.78259 13.4614 6.76935 13.496C7.75611 13.5306 8.73779 13.34 9.63987 12.9386C10.542 12.5372 11.3407 11.9355 11.9756 11.1793C12.6104 10.4231 13.0647 9.53218 13.3038 8.57421C13.5429 7.61623 13.5607 6.61637 13.3557 5.65052C13.1507 4.68467 12.7283 3.77821 12.1207 2.99995C11.5131 2.22168 10.7362 1.59208 9.8489 1.15891C8.96162 0.725743 7.98732 0.500405 6.99995 0.5ZM6.99995 12.5C6.03306 12.5007 5.08314 12.246 4.2462 11.7619C4.18493 11.7263 4.1168 11.7042 4.04633 11.697C3.97586 11.6898 3.90466 11.6976 3.83745 11.72L1.49995 12.5L2.27933 10.1625C2.3018 10.0953 2.30974 10.0242 2.30262 9.95369C2.29551 9.88322 2.27351 9.81507 2.23808 9.75375C1.63181 8.70557 1.3884 7.48661 1.5456 6.28597C1.7028 5.08534 2.25182 3.97014 3.10751 3.11337C3.96319 2.2566 5.0777 1.70617 6.27814 1.54745C7.47858 1.38873 8.69784 1.63061 9.74679 2.23555C10.7957 2.8405 11.6157 3.77469 12.0796 4.89322C12.5434 6.01175 12.6251 7.25208 12.3121 8.4218C11.9991 9.59153 11.3088 10.6253 10.3483 11.3626C9.38781 12.1 8.21084 12.4998 6.99995 12.5Z"}),kn("path",{d:"M10.4166 5.66667C10.4166 5.79927 10.3639 5.92645 10.2702 6.02022C10.1764 6.11399 10.0492 6.16667 9.91662 6.16667H4.33329C4.20068 6.16667 4.0735 6.11399 3.97973 6.02022C3.88597 5.92645 3.83329 5.79927 3.83329 5.66667C3.83329 5.53406 3.88597 5.40688 3.97973 5.31311C4.0735 5.21935 4.20068 5.16667 4.33329 5.16667H9.91662C10.0492 5.16667 10.1764 5.21935 10.2702 5.31311C10.3639 5.40688 10.4166 5.53406 10.4166 5.66667ZM7.91662 7.83333H4.33329C4.20068 7.83333 4.0735 7.88601 3.97973 7.97978C3.88597 8.07355 3.83329 8.20072 3.83329 8.33333C3.83329 8.46594 3.88597 8.59312 3.97973 8.68689C4.0735 8.78065 4.20068 8.83333 4.33329 8.83333H7.91662C8.04923 8.83333 8.17641 8.78065 8.27017 8.68689C8.36394 8.59312 8.41662 8.46594 8.41662 8.33333C8.41662 8.20072 8.36394 8.07355 8.27017 7.97978C8.17641 7.88601 8.04923 7.83333 7.91662 7.83333Z"})]});default:return null}})()})},Dn=(e,n,t=!0)=>{const o=Object.assign({},e);return null!==n&&(o.Authorization=`Bearer ${n}`),o},On=(e,n=!0)=>({method:"GET",headers:Dn({"Content-Type":"application/json",Accept:"application/json"},e,n)}),zn=(e,n)=>({method:"POST",headers:Dn({"Content-Type":"application/json",Accept:"application/json"},n),body:JSON.stringify(e)}),Rn="https://cms.ai-gelb.de",Bn="https://streaming.ai-gelb.de",jn=e=>{if(!e)return!1;if("string"!=typeof e)return!1;const n=e.length;return n>=8&&n<=128},Hn=e=>!!e&&!!/^\d+$/.test(String(e)),$n=e=>!(!e||"string"!=typeof e||!e.trim());var Un=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var Yn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var Vn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var qn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var Wn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var Zn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Gn=(e,n,t,o,r,i)=>Zn(void 0,void 0,void 0,function*(){if(!Hn(e))throw new Error("Agent ID is required and must be numeric");if(!$n(n))throw new Error("Message is required and must be a non-empty string");if(!(e=>!(!e||"string"!=typeof e))(t))throw new Error("Conversation ID is required and must be a string");const a=`${Bn}/api/stream/${e}`;let s;try{s=yield fetch(a,(l={message:n,conversation_id:t,language:r,easy_language:i},c=o,{method:"POST",headers:Dn({"Content-Type":"application/json"},c),body:JSON.stringify(l)}))}catch(e){if(e instanceof TypeError&&"Failed to fetch"===e.message){const e=window.location.origin;if(e!==new URL(Bn).origin&&navigator.onLine)throw new Error(`CORS_BLOCKED: Domain "${e}" is not on the allowlist for this agent`)}throw e}var l,c;if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);if(!s.body)throw new Error("Response body is null");return s.body.getReader()});var Kn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Qn=(e,n)=>Kn(void 0,void 0,void 0,function*(){if(!(e=>e instanceof Blob&&0!==e.size)(e))throw new Error("Audio blob is required and must be a non-empty Blob instance");const t=new FormData;t.append("file",e,"recording.webm");const o=yield fetch(`${Bn}/api/speech-to-text`,((e,n)=>({method:"POST",headers:Dn({Accept:"application/json"},n),body:e}))(t,n));if(!o.ok){const e=yield o.text();throw new Error(`HTTP error! status: ${o.status} - ${e}`)}return o.json()});var Xn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Jn=(e,n,t,o,r)=>Xn(void 0,void 0,void 0,function*(){if(null===n&&(n="gpt-4o-mini-tts"),null===t&&(t="shimmer"),!$n(e))throw new Error("Text is required and must be a non-empty string");const i={model:n,voice:t,prompt:e.trim()},a=yield fetch(`${Bn}/api/text-to-speech`,((e,n,t)=>{const o={method:"POST",headers:Dn({"Content-Type":"application/json",Accept:"application/json"},t),body:JSON.stringify(e)};return null!==n&&(o.signal=n),o})(i,o,r));if(!a.ok)throw new Error(`TTS API error: ${a.status}`);const s=yield a.json();if(!(e=>!(!e||!e.audio))(s))throw new Error("No audio data received from TTS API");return s});var et=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var nt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var tt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var ot=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const rt=({traceId:e,config:n,onRatingSubmitted:t,onFeedbackOpen:o})=>{const{showSuccess:r,showError:i}=xt(),{t:a,session:s}=po(),[l,c]=de(null),[u,{open:d,close:p}]=_n(),h=ve(n=>ot(void 0,void 0,void 0,function*(){if(l!==n&&!u){d();try{yield(h={traceId:e,value:n,name:"helpfulness"},f=s.sessionState.sessionToken,Un(void 0,void 0,void 0,function*(){const{name:e,traceId:n,value:t}=h;if(!jn(n))throw new Error(`Invalid traceId - must be string (8-128 chars): ${n}`);if(!(e=>{switch(e){case-1:case 0:case 1:return!0;default:return!1}})(t))throw new Error(`Invalid rating value - must be -1, 0, or 1: ${t}`);if(!(e=>void 0!==e&&""!==e&&"string"==typeof e)(e))throw new Error(`Invalid name - must be a non-empty string: ${e}`);const o=`${Bn}/api/rate`;void 0!==h.comment&&(h.comment=h.comment.trim());const r=yield fetch(o,zn(h,f));if(!r.ok){const e=yield r.text();throw new Error(`API request failed: ${r.status} - ${e}`)}return r})),c(n),0!==n&&r(a.toast.ratingSuccess,5e3),console.log("Rating submitted successfully to AI-Gelb API"),t(),o()}catch(e){console.error("Rating request failed:",e),i(a.toast.ratingError)}finally{p()}var h,f}}),[l,u,e]);return kn("div",{className:"rating-buttons",children:[kn(Cn,{text:a.rating.tooltipHelpful,delay:300,children:kn("button",{className:`btn-base rating-button rating-button-thumbs-up ${1===l?"rating-button--active":""} ${u?"rating-button--disabled":""}`,onClick:()=>h(1),disabled:1===l||u,"aria-label":a.rating.helpful,title:a.rating.helpfulTitle,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none" ><path d="M13.625 4.0075C13.4842 3.84795 13.3111 3.72019 13.1171 3.63269C12.9231 3.54519 12.7128 3.49996 12.5 3.5H9V2.5C9 1.83696 8.73661 1.20107 8.26777 0.732233C7.79893 0.263392 7.16304 1.28189e-07 6.5 1.28189e-07C6.40711 -6.63752e-05 6.31604 0.0257445 6.237 0.0745385C6.15795 0.123333 6.09407 0.19318 6.0525 0.27625L3.69125 5H1C0.734784 5 0.48043 5.10536 0.292893 5.29289C0.105357 5.48043 0 5.73478 0 6V11.5C0 11.7652 0.105357 12.0196 0.292893 12.2071C0.48043 12.3946 0.734784 12.5 1 12.5H11.75C12.1154 12.5001 12.4684 12.3668 12.7425 12.1252C13.0166 11.8835 13.1931 11.5501 13.2388 11.1875L13.9888 5.1875C14.0153 4.97626 13.9966 4.76179 13.9339 4.55833C13.8712 4.35488 13.7659 4.16711 13.625 4.0075ZM1 6H3.5V11.5H1V6ZM12.9963 5.0625L12.2463 11.0625C12.231 11.1834 12.1722 11.2945 12.0808 11.3751C11.9895 11.4556 11.8718 11.5 11.75 11.5H4.5V5.61812L6.79437 1.02875C7.13443 1.09681 7.4404 1.2806 7.66021 1.54884C7.88002 1.81708 8.0001 2.1532 8 2.5V4C8 4.13261 8.05268 4.25979 8.14645 4.35355C8.24021 4.44732 8.36739 4.5 8.5 4.5H12.5C12.571 4.49998 12.6411 4.51505 12.7058 4.54423C12.7704 4.5734 12.8282 4.61601 12.8751 4.66922C12.9221 4.72242 12.9571 4.78501 12.978 4.85282C12.9989 4.92063 13.0051 4.9921 12.9963 5.0625Z" fill="currentColor" /></svg>'})})}),kn(Cn,{text:a.rating.tooltipNeutral,delay:300,children:kn("button",{className:`btn-base rating-button rating-button-neutral ${0===l?"rating-button--active":""} ${u?"rating-button--disabled":""}`,onClick:()=>h(0),disabled:0===l||u,"aria-label":a.rating.neutral,title:a.rating.neutralTitle,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" viewBox="0 0 17 16" fill="none" ><path d="M9.32788 8C9.32788 8.14834 9.28389 8.29334 9.20148 8.41668C9.11907 8.54002 9.00194 8.63615 8.86489 8.69291C8.72785 8.74968 8.57705 8.76453 8.43156 8.73559C8.28608 8.70665 8.15244 8.63522 8.04755 8.53033C7.94266 8.42544 7.87123 8.29181 7.84229 8.14632C7.81335 8.00084 7.82821 7.85004 7.88497 7.71299C7.94174 7.57595 8.03787 7.45881 8.1612 7.3764C8.28454 7.29399 8.42954 7.25 8.57788 7.25C8.77679 7.25 8.96756 7.32902 9.10821 7.46967C9.24886 7.61033 9.32788 7.80109 9.32788 8ZM5.82788 7.25C5.67954 7.25 5.53454 7.29399 5.4112 7.3764C5.28787 7.45881 5.19174 7.57595 5.13497 7.71299C5.07821 7.85004 5.06335 8.00084 5.09229 8.14632C5.12123 8.29181 5.19266 8.42544 5.29755 8.53033C5.40244 8.63522 5.53608 8.70665 5.68156 8.73559C5.82705 8.76453 5.97785 8.74968 6.11489 8.69291C6.25194 8.63615 6.36907 8.54002 6.45148 8.41668C6.53389 8.29334 6.57788 8.14834 6.57788 8C6.57788 7.80109 6.49886 7.61033 6.35821 7.46967C6.21756 7.32902 6.02679 7.25 5.82788 7.25ZM11.3279 7.25C11.1795 7.25 11.0345 7.29399 10.9112 7.3764C10.7879 7.45881 10.6917 7.57595 10.635 7.71299C10.5782 7.85004 10.5634 8.00084 10.5923 8.14632C10.6212 8.29181 10.6927 8.42544 10.7976 8.53033C10.9024 8.63522 11.0361 8.70665 11.1816 8.73559C11.327 8.76453 11.4778 8.74968 11.6149 8.69291C11.7519 8.63615 11.8691 8.54002 11.9515 8.41668C12.0339 8.29334 12.0779 8.14834 12.0779 8C12.0779 7.80109 11.9989 7.61033 11.8582 7.46967C11.7176 7.32902 11.5268 7.25 11.3279 7.25ZM15.0779 8C15.0781 9.12221 14.7878 10.2254 14.2352 11.2021C13.6826 12.1788 12.8866 12.9958 11.9246 13.5736C10.9625 14.1514 9.8673 14.4703 8.74547 14.4993C7.62363 14.5282 6.51342 14.2662 5.52288 13.7388L3.39476 14.4481C3.21856 14.5069 3.02948 14.5154 2.84871 14.4728C2.66794 14.4301 2.50262 14.3379 2.37129 14.2066C2.23995 14.0753 2.14779 13.9099 2.10513 13.7292C2.06247 13.5484 2.071 13.3593 2.12976 13.1831L2.83913 11.055C2.37547 10.1833 2.1165 9.21737 2.08188 8.23061C2.04725 7.24385 2.23788 6.26217 2.6393 5.36009C3.04071 4.458 3.64236 3.65922 4.39858 3.02437C5.15479 2.38953 6.0457 1.9353 7.00367 1.69618C7.96165 1.45705 8.9615 1.43931 9.92736 1.6443C10.8932 1.84929 11.7997 2.27162 12.5779 2.87924C13.3562 3.48685 13.9858 4.26379 14.419 5.15106C14.8521 6.03834 15.0775 7.01264 15.0779 8ZM14.0779 8C14.0776 7.15633 13.8833 6.32402 13.5099 5.56747C13.1366 4.81092 12.5941 4.1504 11.9246 3.63702C11.2551 3.12365 10.4765 2.77117 9.64899 2.60687C8.82147 2.44257 7.96725 2.47084 7.1524 2.6895C6.33756 2.90816 5.58394 3.31135 4.94985 3.86787C4.31576 4.4244 3.8182 5.11933 3.49567 5.89892C3.17313 6.6785 3.03427 7.52184 3.08981 8.36368C3.14536 9.20553 3.39383 10.0233 3.81601 10.7538C3.85144 10.8151 3.87344 10.8832 3.88055 10.9537C3.88766 11.0242 3.87972 11.0953 3.85726 11.1625L3.07788 13.5L5.41538 12.7206C5.46629 12.7033 5.51971 12.6944 5.57351 12.6944C5.66132 12.6945 5.74755 12.7178 5.82351 12.7619C6.65963 13.2456 7.60842 13.5007 8.57441 13.5013C9.54039 13.5019 10.4895 13.2481 11.3262 12.7654C12.163 12.2826 12.8578 11.5881 13.3409 10.7515C13.8239 9.915 14.0781 8.96599 14.0779 8Z" fill="currentColor" /></svg>'})})}),kn(Cn,{text:a.rating.tooltipNotHelpful,bgColor:(null==n?void 0:n.tooltipBgColor)||(null==n?void 0:n.primaryColor)||"#4a90e2",textColor:(null==n?void 0:n.tooltipTextColor)||(null==n?void 0:n.secondaryColor)||"#f5f8ff",delay:300,children:kn("button",{className:`btn-base rating-button rating-button-thumbs-down ${-1===l?"rating-button--active":""} ${u?"rating-button--disabled":""}`,onClick:()=>h(-1),disabled:-1===l||u,"aria-label":a.rating.notHelpful,title:a.rating.notHelpfulTitle,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" ><path d="M14.9888 9.8125L14.2388 3.8125C14.1931 3.44993 14.0166 3.1165 13.7425 2.87483C13.4684 2.63316 13.1154 2.49987 12.75 2.5H2C1.73478 2.5 1.48043 2.60536 1.29289 2.79289C1.10536 2.98043 1 3.23478 1 3.5V9C1 9.26522 1.10536 9.51957 1.29289 9.70711C1.48043 9.89464 1.73478 10 2 10H4.69125L7.0525 14.7238C7.09407 14.8068 7.15795 14.8767 7.237 14.9255C7.31604 14.9743 7.40711 15.0001 7.5 15C8.16304 15 8.79893 14.7366 9.26777 14.2678C9.73661 13.7989 10 13.163 10 12.5V11.5H13.5C13.7129 11.5001 13.9233 11.4548 14.1173 11.3673C14.3113 11.2798 14.4845 11.152 14.6253 10.9923C14.7662 10.8327 14.8714 10.645 14.9341 10.4415C14.9967 10.2381 15.0154 10.0237 14.9888 9.8125ZM4.5 9H2V3.5H4.5V9ZM13.875 10.3306C13.8284 10.3842 13.7708 10.4271 13.706 10.4564C13.6413 10.4856 13.571 10.5005 13.5 10.5H9.5C9.36739 10.5 9.24021 10.5527 9.14645 10.6464C9.05268 10.7402 9 10.8674 9 11V12.5C9.0001 12.8468 8.88002 13.1829 8.66021 13.4512C8.4404 13.7194 8.13443 13.9032 7.79437 13.9712L5.5 9.38188V3.5H12.75C12.8718 3.49996 12.9895 3.54439 13.0808 3.62494C13.1722 3.7055 13.231 3.81664 13.2463 3.9375L13.9963 9.9375C14.0056 10.0079 13.9996 10.0795 13.9787 10.1473C13.9578 10.2152 13.9224 10.2777 13.875 10.3306Z" fill="currentColor" /></svg>'})})})]})};var it=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const at=({messageId:e,text:n,isSimplified:t,enabled:o})=>{const{conversation:{simplifyMessage:r},t:i}=po(),[a,{open:s,close:l}]=_n(),c=ve(()=>it(void 0,void 0,void 0,function*(){if(!a&&""!==n.trim()){s();try{yield r(e)}finally{l()}}}),[a,n,s,l,r]);return t?null:o?kn(Cn,{text:i.easyLanguage.tooltip,delay:300,children:kn("button",{onClick:c,disabled:a||!n,className:"btn-base simplify-message-button "+(a?"simplify-message-button--processing":""),title:i.simplify.title,"aria-label":i.simplify.ariaLabel,children:[kn("div",{className:"simplify-message-button__icon",children:kn(Sn,a?{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" class="simplify-spinner" ><path d="M7 1a6 6 0 1 0 6 6 .5.5 0 0 1 1 0 7 7 0 1 1-7-7 .5.5 0 0 1 0 1z" fill="currentColor" /></svg>'}:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 16 16" fill="none" ><path d="M7.99995 1.5C6.87775 1.49976 5.77459 1.79006 4.79786 2.34264C3.82113 2.89523 3.00411 3.69128 2.42631 4.65331C1.84851 5.61534 1.52963 6.71058 1.5007 7.83241C1.47176 8.95425 1.73377 10.0645 2.2612 11.055L1.55183 13.1831C1.49307 13.3593 1.48454 13.5484 1.5272 13.7292C1.56986 13.9099 1.66203 14.0753 1.79336 14.2066C1.9247 14.3379 2.09001 14.4301 2.27078 14.4728C2.45155 14.5154 2.64063 14.5069 2.81683 14.4481L4.94495 13.7387C5.81668 14.2024 6.78259 14.4614 7.76935 14.496C8.75611 14.5306 9.73779 14.34 10.6399 13.9386C11.542 13.5372 12.3407 12.9355 12.9756 12.1793C13.6104 11.4231 14.0647 10.5322 14.3038 9.57421C14.5429 8.61623 14.5607 7.61637 14.3557 6.65052C14.1507 5.68467 13.7283 4.77821 13.1207 3.99995C12.5131 3.22168 11.7362 2.59208 10.8489 2.15891C9.96162 1.72574 8.98732 1.50041 7.99995 1.5ZM7.99995 13.5C7.03306 13.5007 6.08314 13.246 5.2462 12.7619C5.18493 12.7263 5.1168 12.7042 5.04633 12.697C4.97586 12.6898 4.90466 12.6976 4.83745 12.72L2.49995 13.5L3.27933 11.1625C3.3018 11.0953 3.30974 11.0242 3.30262 10.9537C3.29551 10.8832 3.27351 10.8151 3.23808 10.7537C2.63181 9.70557 2.3884 8.48661 2.5456 7.28597C2.7028 6.08534 3.25182 4.97014 4.10751 4.11337C4.96319 3.2566 6.0777 2.70617 7.27814 2.54745C8.47858 2.38873 9.69784 2.63061 10.7468 3.23555C11.7957 3.8405 12.6157 4.77469 13.0796 5.89322C13.5434 7.01175 13.6251 8.25208 13.3121 9.4218C12.9991 10.5915 12.3088 11.6253 11.3483 12.3626C10.3878 13.1 9.21084 13.4998 7.99995 13.5Z" fill="currentColor" /><path d="M11.4166 6.66667C11.4166 6.79927 11.3639 6.92645 11.2702 7.02022C11.1764 7.11399 11.0492 7.16667 10.9166 7.16667H5.33329C5.20068 7.16667 5.0735 7.11399 4.97973 7.02022C4.88597 6.92645 4.83329 6.79927 4.83329 6.66667C4.83329 6.53406 4.88597 6.40688 4.97973 6.31311C5.0735 6.21935 5.20068 6.16667 5.33329 6.16667H10.9166C11.0492 6.16667 11.1764 6.21935 11.2702 6.31311C11.3639 6.40688 11.4166 6.53406 11.4166 6.66667ZM8.91662 8.83333H5.33329C5.20068 8.83333 5.0735 8.88601 4.97973 8.97978C4.88597 9.07355 4.83329 9.20072 4.83329 9.33333C4.83329 9.46594 4.88597 9.59312 4.97973 9.68689C5.0735 9.78065 5.20068 9.83333 5.33329 9.83333H8.91662C9.04923 9.83333 9.17641 9.78065 9.27017 9.68689C9.36394 9.59312 9.41662 9.46594 9.41662 9.33333C9.41662 9.20072 9.36394 9.07355 9.27017 8.97978C9.17641 8.88601 9.04923 8.83333 8.91662 8.83333Z" fill="currentColor" /></svg>'})}),kn("span",{className:"simplify-message-button__text",children:i.simplify.buttonText})]})}):null},st={stt:{startRecording:"Sprachaufnahme starten",stopRecording:"Aufnahme stoppen",processing:"Spracherkennung läuft...",cancelRecording:"Aufnahme abbrechen",confirmRecording:"Aufnahme bestätigen",recording:"Aufnahme läuft...",processingAudio:"Audio wird verarbeitet...",tooltip:"Diktieren starten",error:{generic:"Fehler bei der Sprachaufnahme",permission:"Mikrofonzugriff verweigert. Bitte erlauben Sie den Mikrofonzugriff in den Browsereinstellungen.",notFound:"Kein Mikrofon gefunden. Bitte überprüfen Sie Ihre Mikrofonverbindung.",notSupported:"Sprachaufnahme wird von diesem Browser nicht unterstützt.",policy:"Mikrofonzugriff durch Sicherheitsrichtlinie blockiert. Das Widget muss mit entsprechenden Berechtigungen eingebettet werden.",https:"Mikrofonzugriff erfordert eine sichere HTTPS-Verbindung.",apiError:"Spracherkennung nicht verfügbar. Bitte versuchen Sie es später erneut.",processing:"Fehler bei der Spracherkennung. Bitte versuchen Sie es erneut.",emptyTranscription:"Kein Text erkannt. Bitte sprechen Sie deutlicher."}},tts:{play:"Text vorlesen",pause:"Audio pausieren",resume:"Audio fortsetzen",loading:"Audio wird geladen...",waitingForMessage:"Warten auf vollständige Nachricht...",tooltip:"Antwort vorlesen",states:{loading:"Lädt...",playing:"Pausieren",paused:"Fortsetzen",idle:"Vorlesen"},error:{noText:"Kein Text zum Vorlesen verfügbar.",apiError:"Sprachausgabe nicht verfügbar. Bitte versuchen Sie es später erneut.",noAudio:"Audio konnte nicht generiert werden.",playback:"Fehler bei der Audiowiedergabe.",generic:"Fehler bei der Sprachausgabe. Bitte versuchen Sie es erneut."}},simplify:{title:"In einfacher Sprache erklären",ariaLabel:"Diese Nachricht in einfacher Sprache erklären",buttonText:"Verständliche Sprache",simplifying:"Vereinfache Nachricht..."},easyLanguage:{activate:"Verständliche Sprache aktivieren",deactivate:"Verständliche Sprache deaktivieren",disabled:"Verständliche Sprache ist nur für Deutsch verfügbar",buttonText:"Verständliche Sprache",tooltip:"Antwort in verständlicher Sprache"},rating:{helpful:"Hilfreich",helpfulTitle:"Diese Antwort war hilfreich",notHelpful:"Nicht hilfreich",notHelpfulTitle:"Diese Antwort war nicht hilfreich",neutral:"Feedback",neutralTitle:"Feedback zu dieser Antwort geben",tooltipHelpful:"Gefällt mir",tooltipNotHelpful:"Gefällt mir nicht",tooltipNeutral:"Feedback geben"},feedback:{buttonText:"Feedback geben",buttonTitle:"Detailliertes Feedback hinterlassen",tooltip:"Feedback zu dieser Antwort geben",title:"Ihre Rückmeldung an uns",placeholder:"...",submitLabel:"Feedback senden",submitTitle:"Ihr Feedback absenden",close:"Schließen",closeTitle:"Feedback-Bereich schließen",successMessage:"Vielen Dank! Ihr Feedback hilft uns, den Service stetig zu verbessern."},toast:{generalError:"Entschuldigung, es ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.",ratingSuccess:"Vielen Dank! Ihr Feedback hilft uns, den Service stetig zu verbessern.",ratingError:"Beim Senden Ihres Feedbacks ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.",feedbackSuccess:"Vielen Dank! Ihr Feedback hilft uns, den Service stetig zu verbessern.",feedbackError:"Beim Senden Ihres Feedbacks ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.",configurationError:"Fehler beim Laden der Konfiguration. Einige Funktionen sind möglicherweise nicht verfügbar.",messageError:"Nachricht konnte nicht gesendet werden. Bitte versuchen Sie es erneut.",simplificationError:"Text konnte nicht vereinfacht werden. Bitte versuchen Sie es erneut.",streamingError:"Verbindungsfehler aufgetreten. Bitte versuchen Sie es erneut.",missingAgentId:"Konfigurationsfehler: Agent-ID fehlt. Bitte kontaktieren Sie den Administrator.",close:"Benachrichtigung schließen"},languageSelection:{title:"Sprachauswahl",description:"Wählen Sie Ihre bevorzugte Sprache",buttonText:"Sprache",tooltip:"Sprache wählen"},instructions:{easyLanguage:". Bitte formuliere die Antwort in verständlicher Sprache. Orientiere dich dabei an dem Regelwerk für Leichte Sprache (DIN SPEC 33429). Leite die vereinfachte Version mit 'Hier ist der Text in verständlicher Sprache:' ein. Erwähne NICHT die DIN SPEC 33429 oder andere technische Standards. Verwende NICHT den Begriff 'Leichte Sprache' in der Einleitung",simplifyMessage:". Bitte formuliere mir diesen Text in verständlicher Sprache. Orientiere dich dabei an dem Regelwerk für Leichte Sprache (DIN SPEC 33429). Leite die vereinfachte Version mit 'Hier ist der Text in verständlicher Sprache:' ein. Erwähne NICHT die DIN SPEC 33429 oder andere technische Standards. Verwende NICHT den Begriff 'Leichte Sprache' in der Einleitung"},input:{expand:"Eingabefeld erweitern",collapse:"Eingabefeld verkleinern"},search:{result:"Suchergebnis",search:"Zu Suchmodus wechseln",chat:"Zu Assistent wechseln"},copy:{tooltip:"Antwort kopieren",copied:"Kopiert!",ariaLabel:"Antwort in die Zwischenablage kopieren"},followUp:{loading:"Vertiefungsfragen werden generiert...",ariaLabel:"Vertiefungsfrage stellen"},sidebar:{title:"Menü",newChat:"Neuen Chat starten",pastConversations:"Vergangene Gespräche",conversation:"Gespräch",loadingAgents:"Laden...",otherAssistants:"Weitere Assistenten"},auth:{loginTitle:"Anmelden",registerTitle:"Konto erstellen",forgotPasswordTitle:"Passwort zurücksetzen",forgotPasswordSubtitle:"Geben Sie Ihre E-Mail-Adresse ein und wir senden Ihnen einen Link zum Zurücksetzen Ihres Passworts.",emailLabel:"E-Mail",emailPlaceholder:"ihre.email@beispiel.de",passwordLabel:"Passwort",passwordPlaceholder:"Passwort eingeben",loginButton:"Anmelden",registerButton:"Konto erstellen",resetButton:"Link senden",switchToRegister:"Noch kein Konto? Registrieren",switchToLogin:"Bereits ein Konto? Anmelden",forgotPassword:"Passwort vergessen?",backToLogin:"Zurück zur Anmeldung",verificationSent:"Wir haben Ihnen eine E-Mail gesendet. Bitte bestätigen Sie Ihre E-Mail-Adresse und melden Sie sich dann an.",resetEmailSent:"Falls ein Konto mit dieser E-Mail-Adresse existiert, haben wir Ihnen einen Link zum Zurücksetzen Ihres Passworts gesendet.",error:{emptyEmail:"Bitte geben Sie Ihre E-Mail-Adresse ein",emptyPassword:"Bitte geben Sie Ihr Passwort ein",invalidEmail:"Bitte geben Sie eine gültige E-Mail-Adresse ein",loginFailed:"Anmeldung fehlgeschlagen. Bitte überprüfen Sie Ihre Zugangsdaten.",registerFailed:"Registrierung fehlgeschlagen. Bitte versuchen Sie es erneut.",resetFailed:"Anfrage fehlgeschlagen. Bitte versuchen Sie es erneut.",networkError:"Netzwerkfehler. Bitte versuchen Sie es später erneut.",emailDomain:"Diese E-Mail-Domain ist für diesen Agenten nicht zugelassen"}},sessionError:{title:"Sitzung abgelaufen",message:"Ihre Sitzung ist abgelaufen. Bitte versuchen Sie es erneut.",retry:"Erneut versuchen"}},lt={stt:{startRecording:"Start voice recording",stopRecording:"Stop recording",processing:"Speech recognition running...",cancelRecording:"Cancel recording",confirmRecording:"Confirm recording",recording:"Recording...",processingAudio:"Processing audio...",tooltip:"Start dictation",error:{generic:"Error during voice recording",permission:"Microphone access denied. Please allow microphone access in browser settings.",notFound:"No microphone found. Please check your microphone connection.",notSupported:"Voice recording is not supported by this browser.",policy:"Microphone access blocked by security policy. The widget must be embedded with appropriate permissions.",https:"Microphone access requires a secure HTTPS connection.",apiError:"Speech recognition not available. Please try again later.",processing:"Error during speech recognition. Please try again.",emptyTranscription:"No text recognized. Please speak more clearly."}},tts:{play:"Read text aloud",pause:"Pause audio",resume:"Resume audio",loading:"Loading audio...",waitingForMessage:"Waiting for complete message...",tooltip:"Read response aloud",states:{loading:"Loading...",playing:"Pause",paused:"Resume",idle:"Read aloud"},error:{noText:"No text available to read aloud.",apiError:"Speech output not available. Please try again later.",noAudio:"Audio could not be generated.",playback:"Error during audio playback.",generic:"Error during speech output. Please try again."}},simplify:{title:"Explain in simple language",ariaLabel:"Explain this message in simple language",buttonText:"Simple language",simplifying:"Simplifying message..."},easyLanguage:{activate:"Activate simple language",deactivate:"Deactivate simple language",disabled:"Simple language is only available for German",buttonText:"Simple language",tooltip:"Response in simple language"},rating:{helpful:"Helpful",helpfulTitle:"This response was helpful",notHelpful:"Not helpful",notHelpfulTitle:"This response was not helpful",neutral:"Feedback",neutralTitle:"Give feedback on this response",tooltipHelpful:"Like",tooltipNotHelpful:"Dislike",tooltipNeutral:"Give feedback"},feedback:{buttonText:"Give feedback",buttonTitle:"Leave detailed feedback",tooltip:"Give feedback on this response",title:"Your feedback to us",placeholder:"...",submitLabel:"Send feedback",submitTitle:"Submit your feedback",close:"Close",closeTitle:"Close feedback area",successMessage:"Thank you! Your feedback helps us continuously improve our service."},toast:{ratingSuccess:"Thank you! Your feedback helps us continuously improve our service.",ratingError:"An error occurred while sending your feedback. Please try again later.",feedbackSuccess:"Thank you! Your feedback helps us continuously improve our service.",feedbackError:"An error occurred while sending your feedback. Please try again later.",configurationError:"Error loading configuration. Some features may not be available.",messageError:"Message could not be sent. Please try again.",simplificationError:"Text could not be simplified. Please try again.",streamingError:"Connection error occurred. Please try again.",missingAgentId:"Configuration error: Agent ID missing. Please contact the administrator.",generalError:"Sorry, an error occurred. Please try again.",close:"Close notification"},languageSelection:{title:"Language selection",description:"Choose your preferred language",buttonText:"Language",tooltip:"Select language"},instructions:{easyLanguage:". Please formulate the response in simple language. Follow the guidelines for Plain Language (DIN SPEC 33429). Introduce the simplified version with 'Here is the text in simple language:'. Do NOT mention DIN SPEC 33429 or other technical standards. Do NOT use the term 'Plain Language' in the introduction",simplifyMessage:". Please formulate this text in simple language for me. Follow the guidelines for Plain Language (DIN SPEC 33429). Introduce the simplified version with 'Here is the text in simple language:'. Do NOT mention DIN SPEC 33429 or other technical standards. Do NOT use the term 'Plain Language' in the introduction"},input:{expand:"Expand input field",collapse:"Collapse input field"},search:{result:"Search result",search:"Switch to search mode",chat:"Switch to assistant"},copy:{tooltip:"Copy response",copied:"Copied!",ariaLabel:"Copy response to clipboard"},followUp:{loading:"Generating follow-up questions...",ariaLabel:"Ask follow-up question"},sidebar:{title:"Menu",newChat:"Start New Chat",pastConversations:"Past Conversations",conversation:"Conversation",loadingAgents:"Loading...",otherAssistants:"Other Assistants"},auth:{loginTitle:"Sign In",registerTitle:"Create Account",forgotPasswordTitle:"Reset Password",forgotPasswordSubtitle:"Enter your email address and we'll send you a link to reset your password.",emailLabel:"Email",emailPlaceholder:"your.email@example.com",passwordLabel:"Password",passwordPlaceholder:"Enter your password",loginButton:"Sign In",registerButton:"Create Account",resetButton:"Send Link",switchToRegister:"Don't have an account? Sign up",switchToLogin:"Already have an account? Sign in",forgotPassword:"Forgot password?",backToLogin:"Back to sign in",verificationSent:"We've sent you an email. Please verify your email address, then sign in.",resetEmailSent:"If an account with this email exists, we've sent you a link to reset your password.",error:{emptyEmail:"Please enter your email address",emptyPassword:"Please enter your password",invalidEmail:"Please enter a valid email address",loginFailed:"Login failed. Please check your credentials.",registerFailed:"Registration failed. Please try again.",resetFailed:"Request failed. Please try again.",networkError:"Network error. Please try again later.",emailDomain:"This email domain is not allowed for this agent"}},sessionError:{title:"Session Expired",message:"Your session has expired. Please try again.",retry:"Try Again"}},ct=e=>{switch(e.trim().toLowerCase()){case"de":case"deutsch":return st;case"en":case"english":return lt}return st},ut=({message:e,type:n,duration:t,onClose:o,config:r})=>{void 0===n&&(n="info"),void 0===t&&(t=4e3);const[i,a]=de(!0),[s,l]=de(!1),c=(null==r?void 0:r.defaultLanguage)||"Deutsch",u=ct(c);he(()=>{setTimeout(()=>l(!0),50);const e=setTimeout(()=>{d()},t);return()=>clearTimeout(e)},[t]);const d=()=>{l(!1),setTimeout(()=>{a(!1),null==o||o()},300)};return i?kn("div",{className:`toast toast--${n} ${s?"toast--visible":""}`,role:"alert","aria-live":"polite",style:{background:`var(--toast-bg-${n})`,borderColor:`var(--toast-border-${n})`,color:`var(--toast-text-${n})`},children:kn("div",{className:"toast__content",children:[kn("div",{className:"toast__icon",style:{color:`var(--toast-icon-${n})`},children:kn(Sn,{svg:Nn})}),kn("div",{className:"toast__message",children:e}),kn("button",{className:"toast__close",onClick:d,"aria-label":u.toast.close,type:"button",style:{color:`var(--toast-text-${n})`},children:kn(Sn,{svg:An})})]})}):null};var dt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const pt=({text:e,isComplete:n=!0})=>{const{showError:t}=xt(),{t:o,session:r}=po(),[i,a]=de("idle"),s=ge(null),l=ge(null);he(()=>()=>{l.current&&l.current.abort(),s.current&&(s.current.pause(),s.current=null)},[]);const c=me(()=>{if(!n)return o.tts.waitingForMessage;switch(i){case"loading":return o.tts.loading;case"playing":return o.tts.pause;case"paused":return o.tts.resume;default:return o.tts.play}},[o,n,i]);return kn(Cn,{text:o.tts.tooltip,delay:300,children:kn("button",{className:`btn-base tts-button tts-button--${i} ${n?"":"tts-button--disabled"}`,onClick:()=>{if(n)switch(i){case"idle":(e=>{dt(void 0,void 0,void 0,function*(){try{l.current&&l.current.abort(),l.current=new AbortController,a("loading");const n=(e=>{if(""===e)return"";let n=e;return n=n.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),n=n.replace(/https?:\/\/[^\s<>[\]{}|\\^`]+/gi,""),n=n.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`(.*?)`/g,"$1").replace(/#{1,6}\s/g,"").replace(/>\s/g,"").replace(/[-\*\+]\s/g,"").replace(/\d+\.\s/g,"").replace(/\n{2,}/g,". ").replace(/\n/g," ").trim(),n})(e);if(!n)return console.warn("No text to convert to speech"),t(o.tts.error.noText),void a("idle");const i=yield Jn(n,"gpt-4o-mini-tts","shimmer",l.current.signal,r.sessionState.sessionToken),c=new Blob([Uint8Array.from(atob(i.audio),e=>e.charCodeAt(0))],{type:"audio/mpeg"}),u=URL.createObjectURL(c),d=new Audio(u);s.current=d,d.addEventListener("loadeddata",()=>{a("playing"),d.play().catch(e=>{console.error("Error playing audio:",e),t(o.tts.error.playback),a("idle")})}),d.addEventListener("ended",()=>{a("idle"),URL.revokeObjectURL(u),s.current=null}),d.addEventListener("error",e=>{console.error("Audio playback error:",e),t(o.tts.error.playback),a("idle"),URL.revokeObjectURL(u),s.current=null})}catch(e){const n=e;"AbortError"!==n.name&&(console.error("TTS Error:",n),t(o.tts.error.generic),a("idle"))}})})(e);break;case"loading":l.current&&l.current.abort(),a("idle");break;case"playing":s.current&&(s.current.pause(),a("paused"));break;case"paused":s.current&&(s.current.play(),a("playing"))}},title:c,disabled:!n||"loading"===i,"aria-label":c,children:kn("span",{className:"tts-button__icon",children:(()=>{switch(i){case"loading":return kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" class="tts-spinner" ><path d="M8 1.5a6.5 6.5 0 1 0 6.5 6.5.75.75 0 0 1 1.5 0 8 8 0 1 1-8-8 .75.75 0 0 1 0 1.5z" fill="currentColor" /></svg>'});case"playing":return kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" ><path d="M6.25 3.5a.75.75 0 0 0-1.5 0v9a.75.75 0 0 0 1.5 0v-9zM11.25 3.5a.75.75 0 0 0-1.5 0v9a.75.75 0 0 0 1.5 0v-9z" fill="currentColor" /></svg>'});case"paused":return kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" ><path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z" fill="currentColor" /></svg>'});default:return kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" ><path d="M9.71938 1.55065C9.63529 1.50967 9.54141 1.49311 9.44838 1.50283C9.35535 1.51255 9.26692 1.54817 9.19313 1.60565L4.82813 5.00002H2C1.73478 5.00002 1.48043 5.10538 1.29289 5.29291C1.10536 5.48045 1 5.7348 1 6.00002V10C1 10.2652 1.10536 10.5196 1.29289 10.7071C1.48043 10.8947 1.73478 11 2 11H4.82813L9.19313 14.3944C9.26699 14.4518 9.35548 14.4874 9.44855 14.497C9.54161 14.5066 9.63551 14.4899 9.71956 14.4489C9.80362 14.4078 9.87446 14.3439 9.92404 14.2646C9.97361 14.1852 9.99993 14.0936 10 14V2.00002C10 1.90635 9.97371 1.81456 9.9241 1.73511C9.87449 1.65566 9.80355 1.59174 9.71938 1.55065ZM2 6.00002H4.5V10H2V6.00002ZM9 12.9775L5.5 10.2556V5.7444L9 3.02252V12.9775ZM12.375 6.34752C12.7772 6.80407 12.999 7.3916 12.999 8.00002C12.999 8.60844 12.7772 9.19597 12.375 9.65252C12.2867 9.74959 12.1637 9.80803 12.0327 9.81523C11.9016 9.82244 11.773 9.77783 11.6745 9.69103C11.5761 9.60424 11.5157 9.48221 11.5065 9.3513C11.4972 9.22038 11.5398 9.09107 11.625 8.99127C11.8662 8.71738 11.9992 8.36496 11.9992 8.00002C11.9992 7.63509 11.8662 7.28267 11.625 7.00877C11.5398 6.90897 11.4972 6.77966 11.5065 6.64874C11.5157 6.51783 11.5761 6.39581 11.6745 6.30901C11.773 6.22222 11.9016 6.17761 12.0327 6.18481C12.1637 6.19202 12.2867 6.25046 12.375 6.34752ZM15.5 8.00002C15.5007 9.23015 15.0474 10.4173 14.2269 11.3338C14.1378 11.4301 14.0144 11.4876 13.8833 11.4939C13.7522 11.5001 13.624 11.4545 13.5262 11.367C13.4284 11.2794 13.369 11.157 13.3607 11.026C13.3524 10.895 13.3959 10.7661 13.4819 10.6669C14.1378 9.93355 14.5004 8.9842 14.5004 8.00033C14.5004 7.01647 14.1378 6.06712 13.4819 5.33377C13.4369 5.28506 13.402 5.22788 13.3793 5.16555C13.3566 5.10323 13.3465 5.03701 13.3496 4.97076C13.3528 4.9045 13.3691 4.83953 13.3976 4.77963C13.426 4.71973 13.4662 4.6661 13.5156 4.62186C13.565 4.57762 13.6227 4.54366 13.6854 4.52195C13.7481 4.50024 13.8145 4.49122 13.8807 4.49541C13.9469 4.4996 14.0116 4.51692 14.071 4.54636C14.1304 4.5758 14.1834 4.61678 14.2269 4.6669C15.0476 5.58303 15.501 6.77003 15.5 8.00002Z" fill="currentColor" /></svg>'})}})()})})})},ht=({onClick:e})=>kn("div",{className:"close-button-container",children:kn("button",{className:"close-button-floating btn-base",onClick:e,"aria-label":"Chat schließen",type:"button",children:kn(Sn,{svg:An})})}),ft=({onClick:e})=>kn("button",{className:"logout-button btn-base",onClick:e,"aria-label":"Abmelden",type:"button",children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>\n <polyline points="16 17 21 12 16 7"/>\n <line x1="21" y1="12" x2="9" y2="12"/>\n</svg>\n'})}),gt=({logo:e,title:n})=>{if(null===e)return console.warn("customer has no logo defined"),null;return kn("div",{className:"chat-logo-container",children:kn("img",{src:`https://cms.ai-gelb.de/assets/${e}`,alt:me(()=>null===n?"Logo":`Logo - ${n}`,[n]),className:"chat-logo-floating"})})},bt=({onClick:e})=>kn("button",{className:"hamburger-button btn-base",onClick:e,"aria-label":"Menu öffnen",type:"button",children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>\n'})}),mt=({isOpen:e,onClose:n,children:t})=>{var o,r;const{t:i}=po(),[a,s]=de(!1);return he(()=>{if(e){const e=setTimeout(()=>s(!0),200);return()=>clearTimeout(e)}s(!1)},[e]),e?kn("div",{className:"spotlight-overlay-backdrop",onClick:n,children:kn("div",{className:"spotlight-overlay",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":(null===(o=i.sidebar)||void 0===o?void 0:o.title)||"Menu",children:[kn("button",{className:"spotlight-close-button btn-base",onClick:n,"aria-label":"Close",type:"button",children:kn(Sn,{svg:An})}),a?t:kn("div",{className:"spotlight-loading",children:(null===(r=i.sidebar)||void 0===r?void 0:r.loadingAgents)||"Laden..."})]})}):null},vt=K(void 0),yt=({children:e,config:n})=>{const[t,o]=de([]),r=ve((e,n,r)=>{void 0===n&&(n="info"),void 0===r&&(r=4e3);const i=Date.now()+Math.random(),a={id:i,message:e,type:n,duration:r},s=[...t,a];return o(s),i},[t]),i=ve(e=>{const n=t.filter(n=>n.id!==e);o(n)},[t]),a=ve((e,n)=>r(e,"success",n),[r]),s=ve((e,n)=>r(e,"error",n),[r]),l=ve((e,n)=>r(e,"info",n),[r]);return kn(vt.Provider,{value:{addToast:r,removeToast:i,showSuccess:a,showError:s,showInfo:l},children:[e,kn("div",{className:"toast-container",children:t.map(e=>kn(ut,{message:e.message,type:e.type,duration:e.duration,onClose:()=>i(e.id),config:n},e.id))})]})},xt=()=>{const e=ye(vt);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},wt=K(void 0),kt=(e,n)=>{if("string"!=typeof n||!n.startsWith("colors:"))return n;const t=n.replace("colors:","").split("/");if(2!==t.length)return console.warn(`Invalid color reference: ${n}`),n;const[o,r]=t;return e.colors&&e.colors[o]&&e.colors[o][r]?`var(--color-${o}-${r})`:(console.warn(`Color reference not found: ${n}`),n)},_t=["fontsize","iconSize","radius","spacing","stroke"],Ct=["1024px","768px"],St=["fontsize","iconSize","radius","spacing","stroke"],Et=(e,n,t=!1)=>{const o=document.createElement("style"),r=(e=>{var n,t;if(!e.lightMode)return"";const o=[];if(e.colors)for(const[n,t]of Object.entries(e.colors))for(const[e,r]of Object.entries(t))o.push(`--color-${n}-${e}: ${r};`);for(const[n,t]of Object.entries(e.lightMode))if("object"==typeof t&&null!==t)for(const[n,r]of Object.entries(t))if("object"==typeof r&&null!==r)for(const[n,t]of Object.entries(r)){const r=kt(e,t);o.push(`--${n}: ${r};`)}else{const t=kt(e,r);o.push(`--${n}: ${t};`)}if(e.responsive){for(const n of _t){const t=e.responsive[n];for(const[e,r]of Object.entries(t))void 0!==r.desktop&&("iconSize"===n?o.push(`--icon-${e}: ${r.desktop}px;`):o.push(`--${n}-${e}: ${r.desktop}px;`))}void 0!==(null===(t=null===(n=e.responsive.radius)||void 0===n?void 0:n.s)||void 0===t?void 0:t.desktop)&&o.push(`--radius: ${e.responsive.radius.s.desktop}px;`)}if(e.semantic)for(const[n,t]of Object.entries(e.semantic))for(const[e,n]of Object.entries(t))o.push(`--${e}: ${n};`);return o.join("\n")})(e),i=t?((e,n)=>{if(!e.darkMode)return"";const t=[];for(const[n,o]of Object.entries(e.darkMode))if("object"==typeof o&&null!==o)for(const[n,r]of Object.entries(o))if("object"==typeof r&&null!==r)for(const[n,o]of Object.entries(r)){const r=kt(e,o);t.push(`--${n}: ${r};`)}else{const o=kt(e,r);t.push(`--${n}: ${o};`)}if(n)for(const[e,o]of Object.entries(n))for(const[e,n]of Object.entries(o))t.push(`--${e}: ${n};`);return t.join("\n")})(e):"",a=(e=>{if(!e.responsive)return"";const n=[];for(const t of Ct){n.push(`@media (max-width: ${t}) {`),n.push(" host: {");for(const o of St){const r=e.responsive[o];for(const[e,i]of Object.entries(r))switch(t){case"1024px":if(void 0===i.tablet)continue;"iconSize"===o?n.push(` --icon-${e}: ${i.tablet}px;`):n.push(` --${r}-${e}: ${i.tablet}px;`);case"768px":if(void 0===i.mobile)continue;"iconSize"===o?n.push(` --icon-${e}: ${i.mobile}px;`):n.push(` --${r}-${e}: ${i.mobile}px;`)}}n.push(" }"),n.push("}"),n.push("")}return n.join("\n")})(e),s=[];return s.push(`\n :host {\n /* === Generated Theme Variables (Light Mode Default) === */\n ${r}\n }\n `),t&&i&&s.push(`\n /* === Dark Mode Variables === */\n :host([data-dark-mode="true"]) {\n ${i}\n }\n\n /* Support for system dark mode preference (when not explicitly set) */\n @media (prefers-color-scheme: dark) {\n :host:not([data-dark-mode="false"]) {\n ${i}\n }\n }\n `),s.push(a),s.push("\n/* === BASE COMPONENTS === */\n.chatbot-container {\n position: fixed;\n bottom: var(--spacing-l);\n z-index: 9999;\n right: var(--spacing-l);\n}\n\n@media (max-width: 768px) {\n .chatbot-container {\n bottom: var(--spacing-m);\n right: var(--spacing-m);\n left: var(--spacing-m);\n }\n}\n\n/* === SHARED BUTTON STYLES === */\n.btn-base {\n border: 1px solid var(--button-border);\n cursor: pointer;\n background: var(--button-bg);\n color: var(--button-icon);\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: inherit;\n transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.btn-base:hover {\n background: var(--button-bg-hover);\n border: 1px solid var(--button-border-hover);\n color: var(--button-text-hover);\n}\n\n.btn-base:focus {\n outline: 2px solid var(--color-neutrals-neutral-950);\n outline-offset: 6px;\n transition: outline 0.2s ease;\n}\n\n.btn-base:disabled {\n cursor: not-allowed;\n transform: none;\n}\n\n/* === CHAT OPENER STYLES === */\n.chat-opener-container {\n position: absolute;\n bottom: calc(100% + 12px);\n right: 0;\n z-index: 1000;\n}\n\n.chat-opener-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 80px;\n height: 80px;\n background: var(--ws-button-bg);\n border: 2px solid var(--ws-button-border);\n border-radius: var(--radius-max);\n cursor: pointer;\n transition: all 0.3s ease;\n outline: none;\n color: var(--ws-button-icon);\n position: relative;\n animation: openerSlideIn 0.6s ease-out;\n box-shadow: var(--shadow-lg);\n}\n\n.chat-opener-button:hover {\n background: var(--ws-button-bg-hover);\n border-color: var(--ws-button-border-hover);\n color: var(--ws-button-icon-hover);\n transform: translateY(-2px);\n box-shadow: var(--shadow-xl);\n}\n\n.chat-opener-button:focus {\n background: var(--ws-button-bg-hover);\n border-color: var(--ws-button-border-hover);\n color: var(--ws-button-icon-hover);\n}\n\n.chat-opener-tooltip {\n position: absolute;\n bottom: calc(100% + 12px);\n right: 0;\n background: var(--ws-bubble-bg);\n color: var(--ws-bubble-text);\n border-radius: var(--radius);\n padding: 0;\n box-shadow: var(--shadow-lg);\n animation: tooltipSlideIn 0.3s ease-out;\n width: max-content;\n max-width: min(300px, calc(100vw - 60px));\n z-index: 1001;\n cursor: pointer;\n}\n\n.tooltip-content {\n position: relative;\n padding: 12px 32px 12px 16px;\n}\n\n.tooltip-text-container {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.tooltip-headline {\n font-size: var(--fontsize-body-m);\n font-weight: 600;\n line-height: 1.4;\n}\n\n.tooltip-subtitle {\n font-size: var(--fontsize-body-s);\n font-weight: 400;\n line-height: 1.6;\n}\n\n.tooltip-text {\n font-size: var(--fontsize-body-m);\n font-weight: 500;\n line-height: 1.4;\n}\n\n.tooltip-close {\n position: absolute;\n top: -8px;\n right: -8px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n background: var(--ws-close-bg);\n border: 1px solid var(--ws-close-border);\n border-radius: var(--radius);\n cursor: pointer;\n color: var(--ws-close-icon);\n transition: all 0.2s ease;\n outline: none;\n box-shadow: var(--shadow-lg);\n}\n\n.tooltip-close:hover {\n opacity: .75;\n}\n\n\n\n.tooltip-arrow {\n position: absolute;\n top: 100%;\n right: 32px;\n width: 0;\n height: 0;\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n border-top: 8px solid var(--ws-bubble-bg);\n}\n\n@keyframes openerSlideIn {\n from {\n opacity: 0;\n transform: scale(0.8) translateY(10px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n\n@keyframes tooltipSlideIn {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@media (max-width: 768px) {\n .chat-opener-container {\n right: 16px;\n }\n\n .chat-opener-tooltip {\n right: -8px;\n left: auto;\n max-width: calc(75vw - 48px);\n }\n\n .tooltip-arrow {\n right: 40px;\n }\n}\n\n\n/* === POSITION: BOTTOM-LEFT === */\n.chatbot-container.position-bottom-left {\n right: auto;\n left: var(--spacing-l);\n}\n\n.chatbot-container.position-bottom-left .chat-opener-container {\n right: auto;\n left: 0;\n}\n\n.chatbot-container.position-bottom-left .chat-opener-tooltip {\n right: auto;\n left: 0;\n}\n\n.chatbot-container.position-bottom-left .tooltip-arrow {\n right: auto;\n left: 32px;\n}\n\n@media (max-width: 768px) {\n .chatbot-container.position-bottom-left {\n right: auto;\n left: var(--spacing-m);\n }\n\n .chatbot-container.position-bottom-left .chat-opener-container {\n right: auto;\n left: 16px;\n }\n\n .chatbot-container.position-bottom-left .chat-opener-tooltip {\n right: auto;\n left: -8px;\n }\n\n .chatbot-container.position-bottom-left .tooltip-arrow {\n right: auto;\n left: 40px;\n }\n}\n\n/* === OVERLAY === */\n.chat-overlay,\n.search-overlay {\n position: fixed;\n inset: 0;\n background: var(--surface-bg);\n z-index: 10000;\n display: flex;\n justify-content: center;\n align-items: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n padding: var(--spacing-l) 0;\n animation: fadeIn 0.75s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: var(--overlay-opacity);\n }\n}\n\n/* === TOP HEADER BAR === */\n/* Nur mobile Geräte bekommen einen Hintergrund beim Scrollen */\n@media (max-width: 768px) {\n .chat-overlay.scrolled::before {\n content: \"\";\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: calc(var(--spacing-m) * 2 + 40px);\n background: var(--header-mobile-bg);\n backdrop-filter: blur(12px);\n -webkit-backdrop-filter: blur(12px);\n z-index: 10001;\n border-bottom: var(--header-mobile-border) solid 1px;\n box-shadow: var(--shadow-sm);\n opacity: 0;\n animation: headerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;\n }\n}\n\n@keyframes headerFadeIn {\n from {\n opacity: 0;\n transform: translateY(-100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* === CLOSE BUTTON === */\n.close-button-container {\n position: fixed;\n top: var(--spacing-m);\n right: var(--spacing-m);\n z-index: 10002;\n animation: slideInFromRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;\n}\n\n.close-button-floating {\n width: 40px;\n height: 40px;\n border-radius: var(--radius-max);\n cursor: pointer;\n transition: transform 0.2s ease;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--close-border);\n background: var(--close-bg);\n color: var(--close-icon);\n}\n\n.close-button-floating:hover {\n transform: scale(1.1);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n color: var(--close-icon-hover);\n}\n\n.close-button-floating:focus {\n outline: 2px solid var(--button-border);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n outline-offset: 4px;\n transition: outline 0.2s ease;\n color: var(--close-icon-hover);\n}\n\n.close-button-floating:active {\n transform: scale(0.95) rotate(90deg);\n}\n\n.logout-button {\n width: 40px;\n height: 40px;\n border-radius: var(--radius-max);\n cursor: pointer;\n transition: transform 0.2s ease;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--close-border);\n background: var(--close-bg);\n color: var(--close-icon);\n}\n\n.logout-button:hover {\n transform: scale(1.1);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n color: var(--close-icon-hover);\n}\n\n.logout-button:focus {\n outline: 2px solid var(--button-border);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n outline-offset: 4px;\n transition: outline 0.2s ease;\n color: var(--close-icon-hover);\n}\n\n.logout-button:active {\n transform: scale(0.95);\n}\n\n@keyframes slideInFromRight {\n from {\n opacity: 0;\n transform: translateX(30px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n/* === FLOATING LOGO === */\n.chat-logo-container {\n position: fixed;\n top: var(--spacing-m);\n left: var(--spacing-m);\n z-index: 10002;\n animation: slideInFromLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;\n}\n\n.chat-logo-floating {\n max-height: 48px;\n width: auto;\n height: auto;\n object-fit: contain;\n}\n\n@keyframes slideInFromLeft {\n 0% {\n opacity: 0;\n transform: translateX(-20px);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n\n\n/* === CHAT CONTAINER === */\n.chat-container,\n.search-container {\n width: 100%;\n max-width: 800px;\n min-height: calc(100vh - 2 * var(--spacing-m));\n max-height: none;\n display: flex;\n flex-direction: column;\n animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n margin-top: var(--spacing-l); /* Normal spacing on desktop */\n}\n\n@media (max-width: 768px) {\n .chat-container,\n .search-container {\n margin-top: calc(var(--spacing-m) * 2 + 40px); /* Space for mobile header */\n }\n}\n\n.chat-overlay,\n.search-overlay {\n scrollbar-width: thin;\n scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);\n}\n\n.chat-overlay::-webkit-scrollbar,\n.search-overlay::-webkit-scrollbar { width: 8px; }\n.chat-overlay::-webkit-scrollbar-track,\n.search-overlay::-webkit-scrollbar-track { background: var(--scrollbar-track); }\n.chat-overlay::-webkit-scrollbar-thumb,\n.search-overlay::-webkit-scrollbar-thumb {\n background: var(--scrollbar-thumb);\n border-radius: var(--radius);\n transition: background-color var(--transition-fast);\n}\n\n.chat-overlay::-webkit-scrollbar-thumb:hover,\n.search-overlay::-webkit-scrollbar-thumb:hover {\n background: var(--scrollbar-thumb-hover);\n}\n\n.chat-area,\n.search-area {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: var(--spacing-l);\n transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n/* Chat area when conversation is active */\n.chat-area.conversation-active {\n justify-content: flex-start;\n}\n\n.chat-messages {\n flex: 0.5;\n display: flex;\n flex-direction: column;\n gap: 15px;\n padding: 60px 0;\n transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n/* === WELCOME SECTION === */\n.welcome-section {\n padding: 30px 0 20px 0;\n text-align: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n animation: slideInFromBottom 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;\n transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.welcome-greeting {\n font-size: clamp(28px, 5vw, 36px);\n font-weight: 700;\n line-height: 1.2;\n color: var(--welcome-headline);\n margin-bottom: var(--spacing-m);\n animation: slideInFromLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;\n}\n\n.welcome-text {\n font-size: var(--fontsize-body-l);\n color: var(--welcome-text);\n line-height: 1.4;\n margin: 0 0 15px 0;\n animation: slideInFromLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;\n}\n\n.welcome-text--notification {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-xs);\n}\n\n.privacy-warning {\n color: var(--accordion-bodytext-color);\n animation: slideInFromLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;\n}\n\n@keyframes slideInFromBottom {\n from {\n opacity: 0;\n transform: translateY(50px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes slideUpFromBottom {\n from {\n opacity: 0;\n transform: translateY(40px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n/* === ACCORDION BUTTON === */\n.accordion-section {\n margin: var(--spacing-m) 0 var(--spacing-l) 0;\n}\n\n.accordion-button {\n display: flex;\n align-items: center;\n gap: var(--spacing-xs);\n font-size: var(--fontsize-body-m);\n padding: var(--spacing-s) var(--spacing-m);\n cursor: pointer;\n line-height: 1;\n font-family: inherit;\n border-radius: var(--radius);\n border: 1px solid var(--toggle-border);\n background: var(--toggle-bg);\n color: var(--toggle-text);\n}\n\n.accordion-button:hover {\n background: var(--toggle-bg-hover);\n border: 1px solid var(--toggle-border-hover);\n color: var(--toggle-text-hover);\n}\n.accordion-button:focus {\n background: var(--toggle-bg-hover);\n border: 1px solid var(--toggle-border-hover);\n color: var(--toggle-text-hover);\n outline: 2px solid var(--toggle-text);\n\n}\n\n.accordion-arrow {\n transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.accordion-arrow.open {\n transform: rotate(180deg);\n}\n\n/* === FUNCTION ICON STYLES === */\n.function-icon {\n width: 36px;\n height: 36px;\n border-radius: var(--radius);\n background: var(--button-bg);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.function-icon svg {\n fill: var(--button-icon);\n}\n\n.accordion-content {\n margin: 30px auto 15px auto;\n max-width: 636px;\n}\n\n.accordion-content,\n.accordion-content a {\n color: var(--welcome-text);\n}\n\n.accordion-content a {\n transition: opacity 300ms ease;\n color: var(--welcome-link);\n}\n\n.accordion-content a:hover {\n opacity: 0.7;\n}\n\n/* === ACCORDION CONTENT LIST ITEMS === */\n.accordion-content ul {\n list-style: none;\n padding: 0;\n margin: 0;\n font-size: 16px;\n line-height: 1.5;\n font-weight: 400;\n}\n\n.accordion-content li {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 12px;\n}\n\n/* === QUICK BUTTONS === */\n.quick-buttons-container {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin: var(--spacing-l) 0;\n /* Removed animation from container to allow individual button animations */\n transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.quick-buttons-container.conversation-starting {\n opacity: 0.5;\n transform: translateY(10px) scale(0.98);\n}\n\n.quick-buttons-wrapper {\n display: flex;\n flex-direction: column;\n gap: 10px;\n align-items: flex-start;\n}\n\n.quick-button-wrapper {\n animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n\n.quick-button-wrapper:nth-child(1) { animation-delay: 0.7s; }\n.quick-button-wrapper:nth-child(2) { animation-delay: 0.8s; }\n.quick-button-wrapper:nth-child(3) { animation-delay: 0.9s; }\n.quick-button-wrapper:nth-child(4) { animation-delay: 1.0s; }\n.quick-button-wrapper:nth-child(5) { animation-delay: 1.1s; }\n.quick-button-wrapper:nth-child(6) { animation-delay: 1.2s; }\n.quick-button-wrapper:nth-child(7) { animation-delay: 1.3s; }\n.quick-button-wrapper:nth-child(8) { animation-delay: 1.4s; }\n.quick-button-wrapper:nth-child(9) { animation-delay: 1.5s; }\n\n\n.quick-button {\n font-size: var(--fontsize-body-m);\n display: block;\n padding: var(--spacing-s) var(--spacing-m);\n align-items: center;\n border-radius: var(--radius);\n background: var(--button-suggestion-bg);\n color: var(--button-suggestion-text);\n border: 1px solid var(--button-suggestion-border);\n cursor: pointer;\n text-align: center;\n white-space: nowrap;\n min-width: fit-content;\n justify-content: center;\n font-family: inherit;\n line-height: 1;\n transition: all 0.2s ease;\n}\n\n.quick-button:hover {\n background: var(--button-suggestion-bg-hover);\n color: var(--button-suggestion-text-hover);\n border: 1px solid var(--button-suggestion-border-hover);\n}\n\n@keyframes scaleIn {\n from {\n opacity: 0;\n transform: scale(0.9);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n /* === INPUT SYSTEM === */\n.input-wrapper {\n position: relative;\n display: flex;\n align-items: flex-end;\n background: var(--chat-input-bg);\n border: 1px solid var(--chat-input-border);\n border-radius: var(--radius);\n min-height: 50px;\n box-shadow: var(--shadow-lg);\n transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n animation: slideUpFromBottom 1.6s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both;\n}\n\n/* Disable animation when conversation is active */\n.chat-area.conversation-active .input-wrapper {\n animation: none;\n}\n\n/* Input animation states */\n/* Instant hide - no animation */\n.chat-input-section.input-animation-fadeOut .input-wrapper,\n.chat-input-section.input-animation-fadeOut .quick-buttons-container {\n opacity: 0;\n visibility: hidden;\n transition: none;\n}\n\n.chat-input-section.input-animation-fixed {\n position: sticky;\n bottom: 0;\n margin-top: auto;\n z-index: 10;\n}\n\n.chat-input-section.input-animation-fixed .input-wrapper {\n animation: inputSlideInFromBottom 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;\n}\n\n/* Sticky positioning when textarea is expanded */\n.chat-input-section.input-expanded-sticky {\n position: sticky;\n bottom: 0;\n margin-top: auto;\n z-index: 10;\n}\n\n/* Dim welcome section and messages when textarea is expanded */\n.welcome-section {\n transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.welcome-section.dimmed {\n opacity: 0.1 !important;\n}\n\n.chat-messages {\n transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.chat-messages.dimmed {\n opacity: 0.1 !important;\n}\n\n/* Search input section */\n.search-input-section {\n margin-top: auto;\n}\n.search-input-section.small {\n margin-top: unset;\n}\n\n.search-input-section .input-wrapper {\n animation: slideUpFromBottom 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;\n}\n\n/* Quick buttons instant hide */\n.quick-buttons-container.quick-buttons-fade-out {\n opacity: 0;\n visibility: hidden;\n transition: none;\n}\n\n@keyframes inputSlideInFromBottom {\n 0% {\n opacity: 0;\n transform: translateY(80px);\n }\n 40% {\n opacity: 1;\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n\n.input-wrapper:focus-within {\n border-color: var(--chat-input-border-focus);\n}\n\n.input-wrapper:hover {\n border-color: var(--chat-input-border-hover);\n}\n\n.chat-input {\n flex: 1;\n border: none;\n background: transparent;\n padding: 16px 16px 16px 16px;\n outline: none;\n font-size: var(--fontsize-body-m);\n color: var(--chat-input-text);\n resize: none;\n line-height: 1.4;\n font-family: inherit;\n /* iOS Safari Zoom-Deaktivierung */\n -webkit-text-size-adjust: 100%;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n/* Verhindert Zoom auf iOS Safari bei Input-Focus */\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n .chat-input {\n font-size: 16px !important;\n }\n}\n\n/* Spezifisch für iOS/Safari */\n@supports (-webkit-touch-callout: none) {\n .chat-input {\n font-size: 16px !important;\n transform: translateZ(0);\n }\n}\n\n.chat-input::placeholder { color: var(--chat-input-text); }\n\n.send-button {\n position: absolute;\n right: var(--spacing-m);\n bottom: var(--spacing-m);\n height: 40px;\n min-width: 80px;\n border-radius: var(--radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n}\n\n.send-button:hover:not(:disabled) {\n opacity: 0.9;\n transform: scale(1.05);\n}\n\n.send-button:active:not(:disabled) { transform: scale(0.98); }\n\n.send-button:disabled {\n cursor: not-allowed;\n transform: none;\n color: var(--cs-icon-deactivated);\n background: var(--cs-bg-deactivated);\n border: 1px solid var(--cs-border-deactivated);\n}\n\n/* === EXPAND BUTTON === */\n.expand-button {\n width: 28px;\n height: 28px;\n border-radius: var(--radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 6px;\n}\n\n.expand-button:hover:not(:disabled) {\n opacity: 0.9;\n transform: scale(1.05);\n}\n\n.expand-button:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n/* === TEXTAREA SCROLLBAR STYLING === */\n.chat-input::-webkit-scrollbar {\n width: 6px;\n}\n\n.chat-input::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.chat-input::-webkit-scrollbar-thumb {\n background: var(--scrollbar-thumb);\n border-radius: 3px;\n}\n\n.chat-input::-webkit-scrollbar-thumb:hover {\n background: var(--scrollbar-thumb-hover);\n}\n\n.chat-input {\n scrollbar-width: thin;\n scrollbar-color: var(--scrollbar-thumb) transparent;\n transition: height 0.2s ease;\n}\n\n /* === TOOLTIP STYLES === */\n.tooltip-container {\n position: relative;\n display: inline-block;\n}\n\n.tooltip {\n position: absolute;\n background-color: var(--tooltip-bg);\n color: var(--tooltip-text);\n padding: 10px 12px 13px 12px;\n border-radius: var(--radius);\n font-size: var(--fontsize-body-s);\n font-weight: 400;\n white-space: nowrap;\n z-index: 1000;\n opacity: 0;\n visibility: hidden;\n transform: translateY(0);\n transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;\n box-shadow: var(--shadow-md);\n pointer-events: none;\n font-family: inherit;\n /* Accessibility improvements */\n border: 1px solid var(--tooltip-border);\n backdrop-filter: blur(8px);\n /* Ensure sufficient contrast */\n min-width: max-content;\n max-width: 200px;\n text-align: center;\n line-height: 1.4;\n}\n\n.tooltip.tooltip-top {\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%) translateY(-8px);\n margin-bottom: 8px;\n}\n\n/* Show tooltip on hover AND focus */\n.tooltip-container:hover .tooltip,\n.tooltip-container:focus-within .tooltip {\n opacity: 1;\n visibility: visible;\n transform: translateX(-50%) translateY(-4px);\n}\n\n/* High contrast mode support */\n@media (prefers-contrast: high) {\n .tooltip {\n border: 2px solid currentColor;\n background-color: Canvas;\n color: CanvasText;\n }\n .tooltip-arrow {\n border-top-color: CanvasText !important;\n }\n}\n\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n}\n\n.tooltip-top .tooltip-arrow {\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n border-top: 10px solid var(--tooltip-bg);\n}\n\n/* Improved focus management for keyboard users */\n.tooltip-container:focus-within {\n outline: none;\n}\n\n.tooltip-container > *:focus {\n outline: 2px solid var(--tooltip-bg);\n outline-offset: 2px;\n}\n\n/* === REDUCED MOTION SUPPORT === */\n@media (prefers-reduced-motion: reduce) {\n .tooltip {\n transition: none !important;\n }\n * {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n/* === STT BUTTON === */\n.stt-button {\n width: 40px;\n height: 40px;\n border-radius: var(--radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n@keyframes processingPulse {\n 0%, 100% {\n opacity: 0.8;\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(1.05);\n }\n}\n\n.stt-button svg {\n flex-shrink: 0;\n}\n\n /* === LANGUAGE BUTTON === */\n.language-button-container {\n position: relative;\n}\n\n.language-button {\n min-width: 40px;\n height: 40px;\n padding: 0 12px;\n border-radius: var(--radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n transition: all 0.2s ease;\n pointer-events: auto;\n position: relative;\n font-family: inherit;\n white-space: nowrap;\n}\n\n.language-button__flag {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n}\n\n.language-button__flag svg {\n width: 18px;\n height: 18px;\n border-radius: var(--radius);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n\n.language-button__text {\n font-size: 13px;\n color: inherit;\n white-space: nowrap;\n}\n\n.language-dropdown {\n position: absolute;\n background-color: var(--sprache-flyout-bg);\n border:none;\n border-radius: var(--radius);\n box-shadow: var(--shadow-md);\n min-width: 160px;\n max-height: 200px;\n overflow-y: auto;\n visibility: visible;\n display: block;\n pointer-events: auto;\n z-index: 999999;\n}\n\n.language-option {\n width: 100%;\n padding: 8px 12px;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n color: var(--sprache-text);\n background-color: transparent;\n text-align: left;\n white-space: nowrap;\n justify-content: flex-start;\n transition: background-color 0.2s ease;\n pointer-events: auto;\n position: relative;\n font-family: inherit;\n font-weight: 600;\n}\n\n.language-option svg {\n width: 18px;\n height: 18px;\n border-radius: var(--radius);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n flex-shrink: 0;\n}\n\n.language-option:hover {\n opacity: .5;\n background-color: var(--language-option-hover-bg-color);\n}\n\n.language-option.active {\n background-color: var(--language-option-active-bg-color);\n}\n\n.language-option:first-child {\n border-radius: var(--radius) var(--radius) 0 0;\n}\n\n.language-option:last-child {\n border-radius: 0 0 var(--radius) var(--radius);\n}\n\n.language-option:only-child {\n border-radius: var(--radius);\n}\n\n\n\n\n\n/* === MESSAGE BUBBLES === */\n.message-bubble {\n max-width: 80%;\n padding: 15px var(--spacing-l);\n border-radius: var(--radius);\n margin-bottom: var(--spacing-l);\n word-wrap: break-word;\n word-break: break-word;\n hyphens: auto;\n overflow-wrap: break-word;\n line-height: 1.5;\n font-size: 15px;\n animation: messageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@media (max-width: 768px) {\n .message-bubble {\n max-width: calc(100% - 40px);\n }\n}\n\n@keyframes messageSlideIn {\n from {\n opacity: 0;\n transform: translateY(20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n.bot-message {\n align-self: flex-start;\n background: var(--chat-ai-bg);\n color: var(--chat-ai-text);\n border-bottom-left-radius: var(--radius-none);\n border: 1px solid var(--chat-ai-border);\n animation: messageSlideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n\n}\n\n.user-message {\n align-self: flex-end;\n background: var(--chat-user-bg);\n border: 1px solid var(--chat-user-border);\n color: var(--chat-user-text);\n border-bottom-right-radius: var(--radius-none);\n animation: messageSlideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes messageSlideInLeft {\n from {\n opacity: 0;\n transform: translateX(-30px) translateY(20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateX(0) translateY(0) scale(1);\n }\n}\n\n@keyframes messageSlideInRight {\n from {\n opacity: 0;\n transform: translateX(30px) translateY(20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateX(0) translateY(0) scale(1);\n }\n}\n\n/* === MESSAGE TEXT FORMATTING === */\n.message-text {\n margin: 0;\n font-size: var(--fontsize-body-m);\n line-height: 1.5;\n}\n\n.message-text > *:first-child { margin-top: 0; }\n.message-text > *:last-child { margin-bottom: 0; }\n.message-text > * { margin: 10px 0; }\n\n.message-text p {\n margin: 8px 0;\n line-height: 1.6;\n text-align: left;\n}\n\n.message-text h1,\n.message-text h2,\n.message-text h3 {\n font-size: 18px;\n font-weight: 700;\n color: var(--chat-ai-text);\n margin: 16px 0 8px 0;\n line-height: 1.3;\n}\n\n/* === LINKS === */\n.bot-message a {\n color: var(--chat-ai-text);\n text-decoration: none;\n border-bottom: 1px solid var(--chat-ai-text);\n transition: var(--transition-fast);\n display: inline-flex;\n align-items: center;\n gap: 4px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n word-break: normal;\n}\n\n.bot-message a::after {\n content: \"\";\n width: 12px;\n height: 12px;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M7 7h10v10'/%3E%3C/svg%3E\");\n background-size: contain;\n background-repeat: no-repeat;\n opacity: 0.7;\n transition: var(--transition-fast);\n flex-shrink: 0;\n margin-left: 4px;\n}\n\n.bot-message a:hover {\n opacity: 0.7;\n border-bottom-color: transparent;\n}\n\n.bot-message a:hover::after {\n opacity: 1;\n transform: translate(2px, -2px);\n}\n\n/* === LISTS === */\n.message-text ul,\n.message-text ol {\n margin: var(--spacing-s) 0;\n padding-left: var(--spacing-l);\n}\n\n.message-text li {\n margin-bottom: var(--spacing-xs);\n line-height: 1.6;\n}\n\n/* Legacy list support */\n.formatted-list-item-manual,\n.formatted-numbered-item {\n margin-bottom: 6px;\n display: flex;\n align-items: flex-start;\n}\n\n.formatted-list-item-manual .list-bullet,\n.formatted-numbered-item .number-bullet {\n margin-right: 10px;\n flex-shrink: 0;\n line-height: inherit;\n}\n\n.formatted-numbered-item .number-bullet { min-width: var(--spacing-lg); }\n\n/* === CODE & QUOTES === */\n.message-text code {\n background: var(--code-bg);\n color: var(--code-text);\n padding: 2px 6px;\n border-radius: var(--radius);\n font-family: 'Courier New', monospace;\n font-size: 0.9em;\n}\n\n.message-text pre {\n background: var(--pre-bg);\n padding: var(--spacing-sm);\n border-radius: var(--radius);\n overflow-x: auto;\n margin: var(--spacing-sm) 0;\n border-left: 3px solid var(--blockquote-border);\n}\n\n.message-text blockquote {\n margin-top: var(--spacing-sm);\n padding: var(--spacing-xs) var(--spacing-m);\n background: var(--blockquote-bg);\n border-left: 3px solid var(--blockquote-border);\n border-radius: 0 var(--radius) var(--radius) 0;\n font-size: 13px;\n font-style: italic;\n color: var(--chat-ai-text);\n line-height: 1.4;\n}\n\n/* === TABLES === */\n.message-text table {\n width: 100%;\n border-collapse: collapse;\n margin: var(--spacing-m) 0;\n font-size: 14px;\n}\n\n.message-text th {\n background: var(--table-header-bg);\n padding: var(--spacing-xs) var(--spacing-sm);\n border: 1px solid var(--table-border);\n text-align: left;\n}\n\n.message-text td {\n padding: var(--spacing-xs) var(--spacing-sm);\n border: 1px solid var(--table-border);\n vertical-align: top;\n}\n\n.message-text tr:nth-child(even) { background: var(--table-row-even-bg); }\n.message-text del { text-decoration: line-through; opacity: 0.7; }\n.message-text input[type=\"checkbox\"] { margin-right: var(--spacing-xs); margin-left: -20px; }\n\n/* === HORIZONTAL DIVIDERS === */\n.message-text .formatted-divider {\n border: none;\n height: 1px;\n background-color: var(--chat-ai-text);\n opacity: 0.2;\n margin: var(--spacing-l) 0;\n display: block;\n}\n\n/* === TEXT-TO-SPEECH === */\n.tts-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: var(--fontsize-body-xs);\n position: relative;\n overflow: hidden;\n white-space: nowrap;\n font-family: inherit;\n}\n\n.tts-button__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.tts-button__text {\n display: inline-block;\n font-size: 12px;\n font-weight: var(--font-weight-normal);\n line-height: 1;\n}\n\n.tts-button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }\n.tts-button svg { width: 16px; height: 16px; flex-shrink: 0; }\n\n/* TTS Button States */\n.tts-button--loading { background: var(--tts-button-bg-color); color: var(--tts-button-text-color); }\n.tts-button--playing { background: var(--tts-button-hover-bg-color); color: var(--tts-button-hover-text-color); border-color: var(--tts-button-hover-border); }\n.tts-button--paused { background: var(--tts-button-bg-color); color: var(--tts-button-text-color); border-color: var(--tts-button-border); }\n.tts-button--disabled { opacity: 0.4; cursor: not-allowed; transform: none; }\n.tts-button--disabled:hover { background: var(--tts-button-bg-color); color: var(--tts-button-text-color); border-color: var(--tts-button-border); transform: none; }\n\n.tts-spinner { animation: spin 1s linear infinite; }\n@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }\n\n/* === SIMPLIFY MESSAGE BUTTON === */\n.simplify-message-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n min-width: 28px;\n height: 28px;\n padding: var(--spacing-xs) var(--spacing-s);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: var(--fontsize-body-xs);\n font-weight: var(--font-weight-normal);\n position: relative;\n overflow: hidden;\n white-space: nowrap;\n font-family: inherit;\n}\n\n.simplify-message-button__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.simplify-message-button__text {\n display: inline-block;\n font-size: 12px;\n font-weight: var(--font-weight-normal);\n line-height: 1;\n}\n\n.simplify-message-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none;\n}\n.simplify-message-button svg {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n}\n\n/* Simplify Button States */\n.simplify-message-button--processing {\n opacity: 0.6;\n cursor: not-allowed;\n}\n.simplify-message-button--processing:hover {\n transform: none;\n}\n\n.simplify-spinner { animation: spin 1s linear infinite; }\n\n/* === COPY BUTTON === */\n.copy-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: var(--fontsize-body-xs);\n position: relative;\n overflow: hidden;\n white-space: nowrap;\n font-family: inherit;\n}\n.copy-button__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.copy-button svg { width: 16px; height: 16px; flex-shrink: 0; }\n.copy-button--copied { color: var(--color-success, #22c55e); }\n\n/* === RATING BUTTONS === */\n.rating-buttons {\n display: flex;\n gap: 4px;\n margin-left: auto;\n}\n\n.rating-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 28px;\n height: 28px;\n padding: var(--spacing-xs);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n position: relative;\n overflow: hidden;\n font-family: inherit;\n}\n\n.rating-button:disabled,\n.rating-button--disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none;\n}\n\n.rating-button--disabled:hover {\n transform: none;\n}\n\n.rating-button--active {\n background: var(--button-bg-hover);\n border: 1px solid var(--button-border-hover);\n color: var(--button-text-hover);\n cursor: not-allowed;\n}\n\n.rating-button--active:hover {\n transform: none;\n}\n\n.rating-button svg {\n width: 14px;\n height: 13px;\n flex-shrink: 0;\n}\n\n.rating-button-neutral svg {\n width: 17px;\n height: 16px;\n}\n\n.rating-button-thumbs-down svg {\n width: 16px;\n height: 16px;\n}\n\n/* === FEEDBACK BUTTON & AREA === */\n.feedback-container {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n\n.feedback-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 28px;\n height: 28px;\n padding: var(--spacing-xs);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n position: relative;\n overflow: hidden;\n font-family: inherit;\n}\n\n.feedback-button:disabled,\n.feedback-button--disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none;\n}\n\n.feedback-button--disabled:hover {\n transform: none;\n}\n\n.feedback-button--expanded {\n background: var(--button-bg-hover);\n border: 1px solid var(--button-border-hover);\n color: var(--button-text-hover);\n}\n\n.feedback-button svg {\n width: 17px;\n height: 16px;\n flex-shrink: 0;\n}\n\n.feedback-input-area {\n width: 100%;\n max-height: 0;\n overflow: hidden;\n transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;\n opacity: 0;\n margin-top: 0;\n}\n\n.feedback-input-area--expanded {\n max-height: 200px;\n opacity: 1;\n margin-top: var(--spacing-s);\n}\n\n.feedback-content {\n padding: var(--spacing-m);\n background: var(--surface-modal-bg);\n border: 1px solid var(--chat-input-border);\n border-radius: var(--radius);\n width: 100%;\n box-sizing: border-box;\n}\n\n.feedback-title {\n margin: 0 0 var(--spacing-s) 0;\n font-size: var(--fontsize-body-s);\n font-weight: 600;\n color: var(--feedback-headline);\n line-height: 1.4;\n}\n\n.feedback-input-container {\n position: relative;\n display: flex;\n gap: var(--spacing-s);\n}\n\n.feedback-submit-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n padding: var(--spacing-s);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-family: inherit;\n flex-shrink: 0;\n align-self: flex-start;\n background: transparent;\n border: transparent;\n}\n\n.feedback-submit-button:disabled,\n.feedback-submit-button--disabled {\n cursor: not-allowed;\n transform: none;\n}\n\n.feedback-submit-button:hover {\n color: var(--button-icon);\n background: transparent;\n border: transparent;\n opacity: 0.75;\n}\n\n.feedback-submit-button svg {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n}\n\n.feedback-success-message {\n font-size: var(--fontsize-body-s);\n color: var(--feedback-headline);\n line-height: 1.4;\n font-weight: 700;\n animation: fadeIn 0.3s ease;\n\n}\n\n/* === MESSAGE ACTIONS LAYOUT === */\n.message-actions {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--spacing-s);\n margin-top: var(--spacing-m);\n}\n\n.message-actions-left {\n display: flex;\n gap: var(--spacing-s);\n}\n\n.message-actions-right {\n display: flex;\n gap: 4px;\n margin-left: auto;\n}\n\n/* === FEEDBACK INPUT SECTION === */\n.feedback-input-section {\n margin-top: var(--spacing-m);\n animation: slideDownFeedback 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.feedback-divider {\n height: 1px;\n background: var(--feedback-border-top);\n margin: var(--spacing-m) 0;\n}\n\n.feedback-input-section .feedback-content {\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.feedback-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: var(--spacing-s);\n}\n\n.feedback-close-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: var(--spacing-xs);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-family: inherit;\n flex-shrink: 0;\n background: transparent;\n border: transparent;\n}\n\n.feedback-close-button:hover {\n background: var(--button-bg-hover);\n border: 1px solid var(--button-border-hover);\n color: var(--button-text-hover);\n}\n\n.feedback-close-button svg {\n width: 10px;\n height: 10px;\n flex-shrink: 0;\n}\n\n.feedback-textarea {\n flex: 1;\n padding: var(--spacing-m);\n border: 1px solid var(--feedback-input-border);\n border-radius: var(--radius);\n background: var(--feedback-input-bg);\n color: var(--feedback-text);\n font-family: inherit;\n font-size: var(--fontsize-body-s);\n line-height: 1.4;\n transition: border-color 0.2s ease;\n box-sizing: border-box;\n}\n\n.feedback-textarea::placeholder {\n color: var(--chat-input-text);\n opacity: 0.7;\n}\n\n.feedback-textarea:focus {\n outline: none;\n border-color: var(--feedback-input-border-hover-focus);\n}\n\n.feedback-textarea:hover:not(:focus) {\n border-color: var(--feedback-input-border-hover);\n}\n\n.feedback-textarea:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n/* Override for feedback input section */\n.feedback-input-section .feedback-textarea {\n width: 100%;\n padding-right: 50px; /* Space for submit button */\n}\n\n/* Override for feedback input section */\n.feedback-input-section .feedback-submit-button {\n position: absolute;\n top: 50%;\n right: 8px;\n transform: translateY(-50%);\n width: 32px;\n height: 32px;\n padding: 0;\n z-index: 1;\n}\n\n@keyframes slideDownFeedback {\n from {\n opacity: 0;\n transform: translateY(-10px);\n max-height: 0;\n }\n to {\n opacity: 1;\n transform: translateY(0);\n max-height: 200px;\n }\n}\n\n\n/* === TYPING INDICATOR === */\n.typing-indicator {\n max-width: 80%;\n padding: 15px var(--spacing-l);\n border-radius: var(--radius);\n margin-bottom: var(--spacing-l);\n word-wrap: break-word;\n word-break: break-word;\n hyphens: auto;\n overflow-wrap: break-word;\n line-height: 1.5;\n font-size: 15px;\n animation: messageSlideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n align-self: flex-start;\n background: var(--chat-ai-bg);\n color: var(--chat-ai-text);\n border-bottom-left-radius: var(--radius-none);\n border: 1px solid var(--chat-ai-border);\n}\n\n.typing-content {\n display: flex;\n align-items: center;\n gap: var(--spacing-s);\n}\n\n.typing-text {\n opacity: 0.9;\n font-size: 16px;\n line-height: 1.5;\n}\n\n.typing-spinner {\n width: 14px;\n height: 14px;\n border: 2px solid var(--chat-ai-border);\n border-top: 2px solid var(--chat-ai-text);\n border-radius: 50%;\n animation: spin 1s linear infinite;\n align-self: center;\n}\n\n/* === THINKING ANIMATION === */\n.message-bubble.thinking { opacity: 0.8; }\n\n.thinking-content {\n display: flex;\n align-items: center;\n gap: var(--spacing-s);\n}\n\n.thinking-text { opacity: 0.9; }\n\n.thinking-dots {\n display: flex;\n gap: 3px;\n align-items: center;\n}\n\n.thinking-dots span {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--chat-ai-text);\n animation: think 2s infinite ease-in-out;\n}\n\n.thinking-dots span:nth-child(1) { animation-delay: 0s; }\n.thinking-dots span:nth-child(2) { animation-delay: 0.3s; }\n.thinking-dots span:nth-child(3) { animation-delay: 0.6s; }\n\n@keyframes think {\n 0%, 60%, 100% {\n opacity: 0.4;\n transform: scale(0.7);\n }\n 30% {\n opacity: 1;\n transform: scale(1.3);\n }\n}\n\n /* === RECORDING OVERLAY === */\n.recording-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--recording-overlay-bg);\n z-index: 99999;\n display: flex;\n align-items: center;\n justify-content: center;\n animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.recording-overlay-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 30px;\n width: 90vw;\n padding: 40px 20px;\n}\n\n.recording-status {\n display: flex;\n align-items: center;\n gap: 12px;\n color: var(--visualizer-color);\n font-size: 18px;\n font-weight: 500;\n text-align: center;\n}\n\n.recording-pulse {\n width: 12px;\n height: 12px;\n background: var(--recording-pulse);\n border-radius: 50%;\n animation: pulse 1.5s ease-in-out infinite;\n}\n\n.recording-visualizer-wrapper {\n width: 100%;\n animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;\n}\n\n.recording-overlay-controls {\n display: flex;\n gap: 24px;\n align-items: center;\n animation: slideInFromBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;\n}\n\n.recording-overlay-button {\n width: 44px;\n height: 44px;\n border-radius: 50%;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);\n background: var(--scrollbar-thumb);\n backdrop-filter: blur(10px);\n color: var(--visualizer-color);\n box-shadow: var(--shadow-lg);\n border: 1px solid var(--scrollbar-thumb-hover);\n}\n\n.recording-overlay-button:hover {\n transform: scale(1.1);\n box-shadow: var(--shadow-xl);\n}\n\n.recording-overlay-button:disabled {\n opacity: 0.6;\n cursor: default;\n transform: none !important;\n box-shadow: var(--shadow-lg) !important;\n}\n\n.recording-overlay-button--processing {\n background: var(--toast-bg-info) !important;\n border-color: var(--toast-bg-info) !important;\n box-shadow: var(--shadow-xl) !important;\n}\n\n.recording-overlay-button--cancel:hover:not(:disabled) {\n background: var(--toast-bg-error);\n border-color: var(--toast-bg-error);\n box-shadow: var(--shadow-xl);\n}\n\n.recording-overlay-button--confirm:hover:not(:disabled) {\n background: var(--toast-bg-success);\n border-color: var(--toast-bg-success);\n box-shadow: var(--shadow-xl);\n}\n\n.recording-overlay-button svg {\n width: 24px;\n height: 24px;\n}\n\n/* === VOICE VISUALIZER === */\n.voice-visualizer {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.voice-visualizer canvas {\n display: block;\n border-radius: var(--radius);\n}\n\n.processing-indicator {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 60px;\n background: var(--scrollbar-thumb);\n backdrop-filter: blur(4px);\n border: 1px solid var(--scrollbar-thumb-hover);\n border-radius: var(--radius);\n padding: 20px;\n}\n\n.processing-text {\n color: var(--visualizer-color);\n font-size: 16px;\n font-weight: 500;\n text-align: center;\n animation: pulse 2s ease-in-out infinite;\n}\n\n/* === MOBILE RESPONSIVE OVERRIDES === */\n@media (max-width: 768px) {\n .quick-button {\n max-width: calc(100vw - 80px); /* Account for container padding */\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0; /* Override min-width: fit-content */\n }\n\n .quick-buttons-wrapper {\n width: 100%;\n }\n\n .quick-button-wrapper {\n width: 100%;\n }\n\n .chat-opener {\n min-width: min(340px, calc(100vw - 32px));\n }\n\n .accordion-content {\n margin: 30px 0 15px 0;\n text-align: left;\n }\n\n .accordion-content li {\n align-items: flex-start;\n }\n}\n\n/* === DISCLAIMER STYLES === */\n.disclaimer-text {\n color: var(--disclaimer-text);\n font-size: var(--fontsize-body-xs);\n line-height: 1;\n opacity: 0;\n transform: translateY(5px);\n}\n\n.disclaimer-text a {\n color: var(--disclaimer-text);\n}\n\n/* === DISCLAIMER ANIMATION === */\n@keyframes disclaimerFadeIn {\n from {\n opacity: 0;\n transform: translateY(5px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* === TOAST SYSTEM === */\n.toast-container {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 10001;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n gap: 8px;\n max-width: 400px;\n width: auto;\n}\n\n.toast {\n pointer-events: auto;\n opacity: 0;\n transform: translateY(-20px);\n transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n max-width: 100%;\n}\n\n.toast--visible {\n opacity: 1;\n transform: translateY(0);\n}\n\n.toast__content {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 16px 20px;\n}\n\n.toast__icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 2px;\n}\n\n.toast__message {\n flex: 1;\n font-size: var(--fontsize-body-s);\n line-height: 1.4;\n margin: 2px 0;\n}\n\n.toast__close {\n flex-shrink: 0;\n background: none;\n border: none;\n cursor: pointer;\n padding: 4px;\n border-radius: var(--radius);\n color: var(--text-secondary);\n transition: all 0.2s ease;\n margin-top: -2px;\n opacity: 0.7;\n}\n\n/* Mobile Responsive */\n@media (max-width: 768px) {\n .toast-container {\n top: 10px;\n right: 10px;\n left: 10px;\n max-width: none;\n }\n\n .toast__content {\n padding: 14px 16px;\n }\n\n .toast__message {\n font-size: var(--fontsize-body-xs);\n }\n}\n\n/* === LOGIN OVERLAY === */\n.login-overlay {\n position: fixed;\n inset: 0;\n z-index: 10003;\n display: flex;\n align-items: center;\n justify-content: center;\n animation: loginFadeIn 0.3s ease-out;\n}\n\n.login-overlay-backdrop {\n position: fixed;\n inset: 0;\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n background: rgba(0, 0, 0, 0.3);\n animation: backdropFadeIn 0.3s ease-out;\n}\n\n.login-overlay-content {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px;\n width: 100%;\n max-width: 400px;\n animation: loginSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.login-form-container {\n background: var(--chat-bg, #ffffff);\n border-radius: var(--radius);\n box-shadow: var(--shadow-xl);\n padding: 32px;\n width: 100%;\n border: 1px solid var(--button-border, #e0e0e0);\n}\n\n.login-form-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n margin-bottom: 24px;\n color: var(--text-primary);\n}\n\n.login-form-header svg {\n color: var(--accent-primary);\n}\n\n.login-form-header h2 {\n margin: 0;\n font-size: var(--fontsize-heading-m, 24px);\n font-weight: 600;\n color: var(--text-primary, #333333);\n text-align: center;\n}\n\n.login-form-subtitle {\n margin: 0;\n font-size: var(--fontsize-body-s, 14px);\n color: var(--text-secondary, #666666);\n text-align: center;\n line-height: 1.5;\n}\n\n.login-form {\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n\n.form-group {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form-group label {\n font-size: var(--fontsize-body-s, 14px);\n font-weight: 500;\n color: var(--text-primary, #333333);\n}\n\n.form-group input {\n padding: 12px 16px;\n border: 1px solid var(--button-border, #cccccc);\n border-radius: var(--radius, 8px);\n font-size: var(--fontsize-body-m, 16px);\n font-family: inherit;\n background: var(--input-bg, #ffffff);\n color: var(--text-primary, #333333);\n transition: all 0.2s ease;\n}\n\n.form-group input:focus {\n outline: none;\n border-color: var(--accent-primary);\n box-shadow: 0 0 0 3px var(--accent-primary-alpha, rgba(0, 123, 255, 0.1));\n}\n\n.form-group input:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.login-success {\n padding: 12px;\n background: var(--toast-bg-success, #d4edda);\n color: var(--text-primary);\n border-radius: var(--radius);\n font-size: var(--fontsize-body-s);\n line-height: 1.4;\n}\n\n.login-error {\n padding: 12px;\n background: var(--toast-bg-error);\n color: var(--text-primary);\n border-radius: var(--radius);\n font-size: var(--fontsize-body-s);\n line-height: 1.4;\n animation: errorShake 0.3s ease-in-out;\n}\n\n.login-submit-button {\n padding: 12px 24px;\n background: var(--accent-primary, #007bff);\n color: var(--button-text-primary, #ffffff);\n border: none;\n border-radius: var(--radius, 8px);\n font-size: var(--fontsize-body-m, 16px);\n font-weight: 600;\n font-family: inherit;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: var(--shadow-md);\n}\n\n.login-submit-button:hover:not(:disabled) {\n background: var(--accent-primary-hover);\n box-shadow: var(--shadow-lg);\n transform: translateY(-1px);\n}\n\n.login-submit-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none;\n}\n\n.login-toggle-button {\n padding: 8px 16px;\n background: transparent;\n color: var(--text-secondary);\n border: none;\n font-size: var(--fontsize-body-s);\n font-family: inherit;\n cursor: pointer;\n transition: all 0.2s ease;\n text-decoration: underline;\n}\n\n.login-toggle-button:hover:not(:disabled) {\n color: var(--accent-primary);\n}\n\n.login-toggle-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n/* Login Overlay Animations */\n@keyframes loginFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes backdropFadeIn {\n from {\n opacity: 0;\n backdrop-filter: blur(0px);\n }\n to {\n opacity: 1;\n backdrop-filter: blur(8px);\n }\n}\n\n@keyframes loginSlideIn {\n from {\n opacity: 0;\n transform: translateY(-20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n@keyframes errorShake {\n 0%, 100% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(-4px);\n }\n 75% {\n transform: translateX(4px);\n }\n}\n\n/* Mobile Responsive */\n@media (max-width: 768px) {\n .login-overlay-content {\n padding: 16px;\n max-width: none;\n }\n\n .login-form-container {\n padding: 24px;\n }\n\n .login-form-header h2 {\n font-size: var(--fontsize-heading-s);\n }\n}\n\n/* === SESSION ERROR OVERLAY === */\n.session-error-overlay {\n position: fixed;\n inset: 0;\n z-index: 10003;\n display: flex;\n align-items: center;\n justify-content: center;\n animation: loginFadeIn 0.3s ease-out;\n}\n\n.session-error-overlay-backdrop {\n position: fixed;\n inset: 0;\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n background: rgba(0, 0, 0, 0.3);\n animation: backdropFadeIn 0.3s ease-out;\n}\n\n.session-error-overlay-content {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n width: 100%;\n max-width: 400px;\n background: var(--chat-bg, #ffffff);\n border-radius: var(--radius);\n box-shadow: var(--shadow-xl);\n border: 1px solid var(--button-border, #e0e0e0);\n text-align: center;\n animation: loginSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.session-error-icon {\n color: var(--error-color, #dc2626);\n margin-bottom: 16px;\n}\n\n.session-error-title {\n font-size: var(--fontsize-heading-m);\n font-weight: 600;\n color: var(--text-primary);\n margin: 0 0 8px 0;\n}\n\n.session-error-message {\n font-size: var(--fontsize-body-s);\n color: var(--text-secondary);\n margin: 0 0 24px 0;\n line-height: 1.5;\n}\n\n.session-error-button {\n background: var(--button-primary-bg);\n color: var(--button-primary-text);\n border: 1px solid var(--button-primary-border);\n border-radius: var(--radius);\n padding: var(--spacing-s) var(--spacing-l);\n font-size: var(--fontsize-body-s);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n font-family: inherit;\n}\n\n.session-error-button:hover {\n background: var(--button-primary-bg-hover);\n border-color: var(--button-primary-border-hover);\n}\n\n.session-error-button:focus {\n outline: 2px solid var(--button-primary-bg);\n outline-offset: 2px;\n}\n\n/* Mobile Responsive */\n@media (max-width: 768px) {\n .session-error-overlay-content {\n margin: 16px;\n padding: 24px;\n max-width: none;\n }\n}\n\n/* === FOLLOW-UP BUTTONS === */\n.follow-up-buttons {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-top: var(--spacing-m);\n}\n\n.follow-up-button {\n font-size: var(--fontsize-body-s);\n display: inline-block;\n padding: var(--spacing-xs) var(--spacing-m);\n border-radius: var(--radius);\n background: var(--button-suggestion-bg);\n color: var(--button-suggestion-text);\n border: 1px solid var(--button-suggestion-border);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n line-height: 1.4;\n transition: all 0.2s ease;\n animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n\n.follow-up-button:nth-child(1) { animation-delay: 0s; }\n.follow-up-button:nth-child(2) { animation-delay: 0.1s; }\n.follow-up-button:nth-child(3) { animation-delay: 0.2s; }\n\n.follow-up-button:hover {\n background: var(--button-suggestion-bg-hover);\n color: var(--button-suggestion-text-hover);\n border: 1px solid var(--button-suggestion-border-hover);\n}\n\n.follow-up-loading {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: var(--spacing-xs) 0;\n opacity: 0.6;\n}\n\n.follow-up-loading-text {\n font-size: var(--fontsize-body-xs);\n color: var(--text-secondary);\n}\n\n/* === HEADER BUTTONS CONTAINER === */\n.header-buttons-container {\n position: fixed;\n top: var(--spacing-m);\n right: var(--spacing-m);\n z-index: 10002;\n display: flex;\n gap: var(--spacing-s);\n animation: slideInFromRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;\n}\n\n.header-buttons-container .close-button-container {\n position: static;\n animation: none;\n}\n\n/* === HAMBURGER BUTTON === */\n.hamburger-button {\n width: 40px;\n height: 40px;\n border-radius: var(--radius-max);\n cursor: pointer;\n transition: transform 0.2s ease;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--close-border);\n background: var(--close-bg);\n color: var(--close-icon);\n}\n\n.hamburger-button:hover {\n transform: scale(1.1);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n color: var(--close-icon-hover);\n}\n\n.hamburger-button:focus {\n outline: 2px solid var(--button-border);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n outline-offset: 4px;\n transition: outline 0.2s ease;\n color: var(--close-icon-hover);\n}\n\n/* === SIDEBAR CTA BUTTON === */\n.sidebar-cta-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-xs);\n font-size: var(--fontsize-body-m);\n padding: var(--spacing-s) var(--spacing-m);\n cursor: pointer;\n line-height: 1;\n font-family: inherit;\n border-radius: var(--radius);\n border: 1px solid var(--toggle-border);\n background: var(--toggle-bg);\n color: var(--toggle-text);\n margin-top: var(--spacing-l);\n animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both;\n}\n\n.sidebar-cta-button:hover {\n background: var(--toggle-bg-hover);\n border: 1px solid var(--toggle-border-hover);\n color: var(--toggle-text-hover);\n}\n\n.sidebar-cta-button:focus {\n background: var(--toggle-bg-hover);\n border: 1px solid var(--toggle-border-hover);\n color: var(--toggle-text-hover);\n outline: 2px solid var(--toggle-text);\n}\n\n/* === SPOTLIGHT OVERLAY === */\n.spotlight-overlay-backdrop {\n position: fixed;\n inset: 0;\n z-index: 10003;\n display: flex;\n align-items: center;\n justify-content: center;\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n background: rgba(0, 0, 0, 0.4);\n animation: spotlightFadeIn 0.3s ease-out;\n}\n\n.spotlight-overlay {\n position: relative;\n background: var(--surface-modal-bg, var(--surface-bg));\n border-radius: var(--radius);\n box-shadow: var(--shadow-xl);\n padding: var(--spacing-l);\n padding-top: var(--spacing-xl);\n width: 90%;\n max-width: 400px;\n max-height: 80vh;\n overflow-y: auto;\n animation: spotlightSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.spotlight-close-button {\n position: absolute;\n top: var(--spacing-m);\n right: var(--spacing-m);\n width: 32px;\n height: 32px;\n border-radius: var(--radius-max);\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--close-border);\n background: var(--close-bg);\n color: var(--close-icon);\n transition: all 0.2s ease;\n}\n\n.spotlight-close-button:hover {\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n color: var(--close-icon-hover);\n}\n\n/* New Chat Button - dashed border pattern */\n.spotlight-new-chat-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-s);\n width: 100%;\n padding: var(--spacing-m);\n border: 2px dashed var(--close-border);\n border-radius: var(--radius);\n background: transparent;\n color: var(--welcome-text);\n font-family: inherit;\n font-size: var(--fontsize-body-m);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n margin-top: var(--spacing-m);\n}\n\n.spotlight-new-chat-button:hover {\n border-color: var(--button-start-border, var(--close-border-hover));\n background: var(--button-start-bg, var(--toggle-bg-hover));\n color: var(--button-start-headline, var(--toggle-text-hover));\n}\n\n.spotlight-divider {\n height: 1px;\n background: var(--close-border);\n margin: var(--spacing-l) 0;\n}\n\n.spotlight-section-heading {\n font-size: var(--fontsize-body-s);\n font-weight: 500;\n color: var(--welcome-text);\n text-align: center;\n margin: 0 0 var(--spacing-m) 0;\n}\n\n/* Past Conversations List */\n.spotlight-conversations-list {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-s);\n\n max-height: 130px;\n overflow-y: scroll;\n padding: 12px 0 12px;\n\n /* Fade edges to soften scroll cutoff */\n mask-image: linear-gradient(\n to bottom,\n transparent 0%,\n black 12px,\n black calc(100% - 12px),\n transparent 100%\n );\n -webkit-mask-image: linear-gradient(\n to bottom,\n transparent 0%,\n black 12px,\n black calc(100% - 12px),\n transparent 100%\n );\n}\n\n.spotlight-conversation-item-wrapper {\n display: flex;\n align-items: stretch;\n gap: var(--spacing-xs);\n}\n\n.spotlight-conversation-item {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n flex: 1;\n padding: var(--spacing-xs);\n border: 1px solid var(--button-start-border, var(--button-suggestion-border));\n border-radius: var(--radius);\n background: var(--button-start-bg, var(--button-suggestion-bg));\n color: var(--button-start-headline, var(--button-suggestion-text));\n font-family: inherit;\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: left;\n}\n\n.spotlight-conversation-item:hover:not(:disabled) {\n background: var(--button-suggestion-bg-hover);\n border-color: var(--button-suggestion-border-hover);\n color: var(--button-suggestion-text-hover);\n}\n\n.spotlight-conversation-item:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.spotlight-conversation-item .conversation-label {\n font-size: var(--fontsize-body-m);\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100%;\n}\n\n.spotlight-conversation-item .conversation-time {\n font-size: var(--fontsize-body-xs);\n opacity: 0.7;\n}\n\n.spotlight-conversation-delete {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n border: 1px solid var(--button-start-border, var(--button-suggestion-border));\n border-radius: var(--radius);\n background: var(--button-start-bg, var(--button-suggestion-bg));\n color: var(--button-start-headline, var(--button-suggestion-text));\n cursor: pointer;\n transition: all 0.2s ease;\n opacity: 0.6;\n}\n\n.spotlight-conversation-delete:hover {\n opacity: 1;\n background: var(--error-color, #dc3545);\n border-color: var(--error-color, #dc3545);\n color: white;\n}\n\n/* Agent Links Grid */\n.spotlight-links-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));\n gap: var(--spacing-m);\n}\n\n.spotlight-link-tile {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-s);\n padding: var(--spacing-m);\n border: 1px solid var(--button-start-border, var(--button-suggestion-border));\n border-radius: var(--radius);\n background: var(--button-start-bg, var(--button-suggestion-bg));\n color: var(--button-start-headline, var(--button-suggestion-text));\n text-decoration: none;\n transition: all 0.2s ease;\n text-align: center;\n}\n\n.spotlight-link-tile:hover {\n background: var(--button-suggestion-bg-hover);\n border-color: var(--button-suggestion-border-hover);\n color: var(--button-suggestion-text-hover);\n}\n\n.spotlight-link-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n}\n\n.spotlight-link-icon svg {\n width: 24px;\n height: 24px;\n}\n\n.spotlight-link-title {\n font-size: var(--fontsize-body-m);\n font-weight: 500;\n}\n\n.spotlight-link-description {\n font-size: var(--fontsize-body-xs);\n opacity: 0.7;\n}\n\n/* Loading state */\n.spotlight-loading {\n text-align: center;\n padding: var(--spacing-m);\n color: var(--text-secondary);\n font-size: var(--fontsize-body-s);\n}\n\n/* Sibling Agents Grid */\n.spotlight-agents-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));\n gap: var(--spacing-m);\n}\n\n.spotlight-agent-tile {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-s);\n padding: var(--spacing-m);\n border: 1px solid var(--close-border);\n border-radius: var(--radius);\n background: transparent;\n color: var(--welcome-text);\n font-family: inherit;\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: center;\n text-decoration: none;\n}\n\n.spotlight-agent-tile:hover {\n background: var(--button-start-bg, var(--button-suggestion-bg));\n border-color: var(--button-start-border, var(--button-suggestion-border));\n color: var(--button-start-headline, var(--button-suggestion-text));\n}\n\n.spotlight-agent-tile.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.spotlight-agent-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n}\n\n.spotlight-agent-icon svg {\n width: 24px;\n height: 24px;\n}\n\n.spotlight-agent-title {\n font-size: var(--fontsize-body-s);\n font-weight: 600;\n}\n\n.spotlight-agent-subtitle {\n font-size: var(--fontsize-body-xs);\n color: var(--text-secondary);\n min-height: 1.2em;\n}\n\n@keyframes spotlightFadeIn {\n from {\n opacity: 0;\n backdrop-filter: blur(0px);\n }\n to {\n opacity: 1;\n backdrop-filter: blur(8px);\n }\n}\n\n@keyframes spotlightSlideIn {\n from {\n opacity: 0;\n transform: translateY(-20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n"),s.push(`\n /* === CUSTOM CSS FROM EXTERNAL CONFIG === */\n ${n}\n `),o.textContent=s.join("\n\n"),o},It={name:"AIgelb Standard",color_primary:"#281036",color_primary_contrast:"#FFFFFF",color_accent:"#FEEB56",color_accent_light:"#FEFDE8",color_accent_dark:"#EBBF07",color_background:"#FCFAF8",color_text:"#222222",color_text_muted:"#888888",color_border:"#D1D1D1",color_surface:"#FFFFFF",color_success:"#2EDB4B",color_error:"#FF5252",color_warning:"#FFB037",color_info:"#3B9EFF",dark_mode_enabled:!0,dark_background:"#222222",dark_surface:"#3D3D3D",dark_text:"#F6F6F6",dark_text_muted:"#B0B0B0",dark_border:"#4F4F4F",font_family:"system-ui, -apple-system, BlinkMacSystemFont, sans-serif",border_radius:"medium"},Tt={none:0,small:4,medium:8,large:16,full:999};function At(e,n){const t=parseInt(e.replace("#",""),16),o=Math.round(2.55*n);return`#${(1<<24|Math.min(255,(t>>16)+o)<<16|Math.min(255,(t>>8&255)+o)<<8|Math.min(255,(255&t)+o)).toString(16).slice(1)}`}function Lt(e,n){const t=parseInt(e.replace("#",""),16),o=Math.round(2.55*n);return`#${(1<<24|Math.max(0,(t>>16)-o)<<16|Math.max(0,(t>>8&255)-o)<<8|Math.max(0,(255&t)-o)).toString(16).slice(1)}`}function Nt(e,n){const t=parseInt(e.replace("#",""),16);return`rgba(${t>>16&255}, ${t>>8&255}, ${255&t}, ${n})`}function Ft(e){return function(e){const n=parseInt(e.replace("#",""),16),t=(n>>16&255)/255,o=(n>>8&255)/255,r=(255&n)/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))}(e)<.4}function Pt(e){const n=Tt[e.border_radius||"medium"];return{radius:{none:{desktop:0,tablet:0,mobile:0},xs:{desktop:Math.max(2,n/2),tablet:Math.max(2,n/2),mobile:Math.max(2,n/2)},s:{desktop:n,tablet:n,mobile:n},m:{desktop:2*n,tablet:2*n,mobile:2*n},l:{desktop:3*n,tablet:3*n,mobile:3*n},xl:{desktop:6*n,tablet:6*n,mobile:6*n},xxl:{desktop:8*n,tablet:8*n,mobile:8*n},max:{desktop:999,tablet:999,mobile:999}},fontsize:{h1:{desktop:36,tablet:28,mobile:28},h2:{desktop:24,tablet:22,mobile:22},h3:{desktop:20,tablet:20,mobile:20},h4:{desktop:18,tablet:18,mobile:18},h5:{desktop:20,tablet:18,mobile:18},h6:{desktop:18,tablet:16,mobile:16},"body-xs":{desktop:12,tablet:10,mobile:10},"body-s":{desktop:14,tablet:14,mobile:14},"body-m":{desktop:16,tablet:14,mobile:14},"body-l":{desktop:18,tablet:16,mobile:16}},spacing:{none:{desktop:0,tablet:0,mobile:0},xs:{desktop:4,tablet:4,mobile:4},s:{desktop:8,tablet:8,mobile:8},sm:{desktop:12,tablet:10,mobile:10},m:{desktop:16,tablet:16,mobile:12},l:{desktop:24,tablet:24,mobile:16},xl:{desktop:48,tablet:48,mobile:32},xxl:{desktop:80,tablet:64,mobile:40},xxxl:{desktop:120,tablet:80,mobile:64}},stroke:{s:{desktop:1,tablet:1,mobile:1},m:{desktop:2,tablet:2,mobile:2},l:{desktop:4,tablet:4,mobile:4}},iconSize:{xs:{desktop:12,tablet:12,mobile:12},s:{desktop:16,tablet:16,mobile:16},m:{desktop:20,tablet:18,mobile:18},l:{desktop:32,tablet:24,mobile:24},xl:{desktop:48,tablet:40,mobile:40}}}}function Mt(e){const n=(e.color_text,e.color_surface,{"neutral-000":"#FFFFFF","neutral-050":"#F6F6F6","neutral-100":"#E7E7E7","neutral-200":"#D1D1D1","neutral-300":"#B0B0B0","neutral-400":"#888888","neutral-500":"#6D6D6D","neutral-600":"#5D5D5D","neutral-700":"#4F4F4F","neutral-800":"#454545","neutral-900":"#3D3D3D","neutral-950":"#222222"});return{brand:{"Yellow-300":e.color_accent,"Yellow-50":e.color_accent_light,"Yellow-700":e.color_accent_dark,Cream:e.color_background,Purple:e.color_primary},neutrals:n,system:{Green:e.color_success,"Green-light":At(e.color_success,40),Red:e.color_error,"Red-light":At(e.color_error,40),Yellow:e.color_warning,Blue:e.color_info,"Yellow-light":At(e.color_warning,40),"Blue-light":At(e.color_info,40)}}}function Dt(e){var n;const t=null!==(n=e.shadow_intensity)&&void 0!==n?n:1,o="#000000",r=e.color_code_bg||Nt(e.color_text,.08),i=e.color_code_text||e.color_text;return{shadows:{"shadow-sm":0===t?"none":`0 2px 8px ${Nt(o,.08*t)}`,"shadow-md":0===t?"none":`0 4px 16px ${Nt(o,.12*t)}`,"shadow-lg":0===t?"none":`0 8px 24px ${Nt(o,.16*t)}`,"shadow-xl":0===t?"none":`0 12px 32px ${Nt(o,.24*t)}`},content:{"code-bg":r,"code-text":i,"pre-bg":Nt(e.color_text,.05),"blockquote-bg":Nt(e.color_text,.05),"blockquote-border":e.color_accent,"table-header-bg":Nt(e.color_primary,.1),"table-border":e.color_border,"table-row-even-bg":Nt(e.color_text,.02)},scrollbar:{"scrollbar-thumb":Nt(e.color_primary_contrast,.3),"scrollbar-thumb-hover":Nt(e.color_primary_contrast,.5),"scrollbar-track":"transparent"},recording:{"recording-overlay-bg":Nt(e.color_text,.97),"recording-pulse":e.color_error,"visualizer-color":e.color_primary_contrast}}}function Ot(e){const n=Object.assign(Object.assign({},It),e),t=function(e){const n=Ft(e.color_background),t=n?e.color_primary:e.color_text;return{welcome:{"welcome-text":e.color_text,"welcome-headline":e.color_text,"welcome-icon":e.color_text,"welcome-link":e.color_text},chat:{"chat-user-bg":e.color_accent,"chat-ai-bg":e.color_surface,"chat-user-border":e.color_accent,"chat-user-text":n?e.color_primary:e.color_text,"chat-ai-border":e.color_surface,"chat-ai-text":t,"chat-ai-text-link":e.color_primary,"chat-ai-headline":t,"chat-input-bg":e.color_surface,"chat-input-border":e.color_surface,"chat-input-border-hover":e.color_border,"chat-input-border-focus":e.color_primary,"chat-input-text":t},surface:{"surface-bg":e.color_background,"surface-layer-bg":e.color_text,"surface-modal-bg":e.color_surface},logo:{"logo-ai-gelb":e.color_text},tooltip:{"tooltip-bg":e.color_primary,"tooltip-text":e.color_primary_contrast,"tooltip-border":e.color_primary},button:{main:{"button-bg":e.color_accent_light,"button-bg-hover":e.color_primary,"button-bg-active":e.color_primary,"button-icon":e.color_primary,"button-icon-hover":e.color_primary_contrast,"button-icon-active":e.color_primary_contrast,"button-text":e.color_primary,"button-text-hover":e.color_primary_contrast,"button-text-active":e.color_primary_contrast,"button-border":e.color_accent_dark,"button-border-hover":e.color_primary,"button-border-active":e.color_primary},start:{"button-start-bg":e.color_accent_light,"button-start-bg-hover":e.color_accent_light,"button-start-headline":t,"button-start-headline-hover":t,"button-start-text":t,"button-start-text-hover":t,"button-start-icon":e.color_primary,"button-start-icon-hover":e.color_primary,"button-start-border":e.color_accent,"button-start-border-hover":e.color_accent_dark},suggestion:{"button-suggestion-bg":e.color_accent,"button-suggestion-bg-hover":e.color_surface,"button-suggestion-text":e.color_primary,"button-suggestion-text-hover":e.color_primary,"button-suggestion-border":e.color_accent,"button-suggestion-border-hover":e.color_surface},sprache:{"sprache-bg":e.color_surface,"sprache-bg-hover":e.color_accent_light,"sprache-text":e.color_primary,"sprache-text-hover":e.color_primary,"sprache-flyout-bg":e.color_surface},text:{"button-textbutton-text":e.color_primary,"button-textbutton-text-hover":e.color_primary,"button-textbutton-icon":e.color_primary,"button-textbutton-icon-hover":e.color_primary},"chat-submit":{"cs-bg":e.color_primary,"cs-bg-hover":e.color_accent_dark,"cs-border":e.color_primary,"cs-border-hover":e.color_accent_dark,"cs-icon":e.color_primary_contrast,"cs-icon-hover":e.color_primary_contrast,"cs-bg-deactivated":e.color_border,"cs-border-deactivated":e.color_border,"cs-icon-deactivated":e.color_surface},close:{"close-bg":e.color_surface,"close-bg-hover":e.color_accent_dark,"close-icon":e.color_primary,"close-icon-hover":e.color_primary_contrast,"close-border":e.color_border,"close-border-hover":e.color_accent_dark},toggle:{"toggle-bg":e.color_primary,"toggle-bg-hover":e.color_surface,"toggle-bg-active":e.color_surface,"toggle-icon":e.color_primary_contrast,"toggle-icon-hover":e.color_primary,"toggle-icon-active":e.color_primary,"toggle-text":e.color_primary_contrast,"toggle-text-hover":e.color_primary,"toggle-text-active":e.color_primary,"toggle-border":e.color_primary_contrast,"toggle-border-hover":e.color_primary,"toggle-border-active":e.color_primary}},avatar:{"avatar-bg":e.color_accent,"avatar-icon":e.color_primary},disclaimer:{"disclaimer-text":e.color_text_muted},voice:{"voice-text":e.color_primary_contrast,"voice-headline":e.color_accent,"voice-audio":e.color_accent,"voice-btn-stop-bg":At(e.color_error,40),"voice-btn-stop-icon":e.color_error,"voice-btn-stop-border":e.color_error,"voice-btn-stop-bg-hover":e.color_error,"voice-btn-stop-icon-hover":e.color_primary_contrast,"voice-btn-stop-border-hover":e.color_error,"voice-btn-stop-text":e.color_error,"voice-btn-stop-text-hover":e.color_primary_contrast,"voice-btn-submit-bg":At(e.color_success,40),"voice-btn-submit-bg-hover":e.color_success,"voice-btn-submit-icon":e.color_success,"voice-btn-submit-icon-hover":e.color_primary_contrast,"voice-btn-submit-border":e.color_success,"voice-btn-submit-border-hover":e.color_success,"voice-btn-submit-text":e.color_success,"voice-btn-submit-text-hover":e.color_primary_contrast},feedback:{"feedback-headline":t,"feedback-text":t,"feedback-input-bg":e.color_surface,"feedback-input-border":e.color_border,"feedback-input-border-hover":n?e.color_primary:e.color_text_muted,"feedback-input-border-hover-focus":e.color_primary,"feedback-border-top":e.color_border,"feedback-input-icon":t,"feedback-border":e.color_border},toast:{"toast-bg-success":e.color_success,"toast-bg-info":e.color_info,"toast-bg-warning":e.color_warning,"toast-bg-error":e.color_error,"toast-icon-success":e.color_primary_contrast,"toast-icon-info":e.color_primary_contrast,"toast-icon-warning":e.color_primary_contrast,"toast-icon-error":e.color_primary_contrast,"toast-text-success":e.color_primary_contrast,"toast-text-info":e.color_primary_contrast,"toast-text-warning":e.color_primary_contrast,"toast-text-error":e.color_primary_contrast,"toast-borer-success":e.color_success,"toast-border-info":e.color_info,"toast-border-warning":e.color_warning,"toast-border-error":e.color_error},header:{"header-mobile-bg":n?e.color_primary:e.color_surface,"header-mobile-border":n?e.color_accent_dark:e.color_border},"widget-starter":{"ws-bubble-bg":e.color_accent,"ws-bubble-text":e.color_primary,"ws-button-bg":e.color_primary,"ws-button-bg-hover":e.color_accent,"ws-button-icon":e.color_primary_contrast,"ws-button-icon-hover":e.color_primary,"ws-bubble-border":e.color_accent,"ws-button-border":e.color_primary_contrast,"ws-button-border-hover":e.color_accent,"ws-close-bg":e.color_surface,"ws-close-border":e.color_surface,"ws-close-icon":e.color_primary}}}(n),o=function(e){const n=e.dark_background||"#222222",t=e.dark_surface||"#3D3D3D",o=e.dark_text||"#F6F6F6",r=e.dark_text_muted||"#B0B0B0",i=e.dark_border||"#4F4F4F";return{welcome:{"welcome-text":o,"welcome-headline":o,"welcome-icon":e.color_accent,"welcome-link":e.color_accent},chat:{"chat-user-bg":e.color_accent_light,"chat-ai-bg":t,"chat-user-border":i,"chat-user-text":e.color_text,"chat-ai-border":t,"chat-ai-text":o,"chat-ai-text-link":e.color_accent,"chat-ai-headline":o,"chat-input-bg":t,"chat-input-border":i,"chat-input-border-hover":r,"chat-input-border-focus":e.color_accent,"chat-input-text":o},surface:{"surface-bg":n,"surface-layer-bg":Lt(n,10),"surface-modal-bg":t},logo:{"logo-ai-gelb":o},tooltip:{"tooltip-bg":t,"tooltip-text":o,"tooltip-border":i},button:{main:{"button-bg":t,"button-bg-hover":e.color_accent,"button-bg-active":e.color_accent,"button-icon":e.color_accent_light,"button-icon-hover":e.color_primary,"button-icon-active":e.color_primary,"button-text":e.color_accent_light,"button-text-hover":e.color_primary,"button-text-active":e.color_primary,"button-border":r,"button-border-hover":e.color_accent,"button-border-active":e.color_accent},start:{"button-start-bg":t,"button-start-bg-hover":t,"button-start-headline":o,"button-start-headline-hover":o,"button-start-text":o,"button-start-text-hover":o,"button-start-icon":e.color_accent,"button-start-icon-hover":e.color_accent,"button-start-border":i,"button-start-border-hover":e.color_accent},suggestion:{"button-suggestion-bg":e.color_accent,"button-suggestion-bg-hover":e.color_accent_light,"button-suggestion-text":e.color_text,"button-suggestion-text-hover":e.color_text,"button-suggestion-border":e.color_accent,"button-suggestion-border-hover":e.color_accent_dark},sprache:{"sprache-bg":t,"sprache-bg-hover":t,"sprache-text":o,"sprache-text-hover":e.color_accent,"sprache-flyout-bg":t},text:{"button-textbutton-text":e.color_accent,"button-textbutton-text-hover":o,"button-textbutton-icon":e.color_accent,"button-textbutton-icon-hover":o},"chat-submit":{"cs-bg":t,"cs-bg-hover":e.color_accent,"cs-border":e.color_accent,"cs-border-hover":e.color_accent,"cs-icon":e.color_accent,"cs-icon-hover":n,"cs-bg-deactivated":i,"cs-border-deactivated":r,"cs-icon-deactivated":n},close:{"close-bg":n,"close-bg-hover":n,"close-icon":o,"close-icon-hover":e.color_accent,"close-border":o,"close-border-hover":e.color_accent},toggle:{"toggle-bg":n,"toggle-bg-hover":n,"toggle-bg-active":e.color_accent,"toggle-icon":o,"toggle-icon-hover":e.color_accent,"toggle-icon-active":n,"toggle-text":o,"toggle-text-hover":e.color_accent,"toggle-text-active":n,"toggle-border":o,"toggle-border-hover":e.color_accent,"toggle-border-active":e.color_accent}},avatar:{"avatar-bg":n,"avatar-icon":e.color_accent},disclaimer:{"disclaimer-text":r},voice:{"voice-text":o,"voice-headline":e.color_accent,"voice-audio":e.color_accent,"voice-btn-stop-bg":At(e.color_error,40),"voice-btn-stop-icon":n,"voice-btn-stop-border":e.color_error,"voice-btn-stop-bg-hover":e.color_error,"voice-btn-stop-icon-hover":o,"voice-btn-stop-border-hover":e.color_error,"voice-btn-stop-text":n,"voice-btn-stop-text-hover":n,"voice-btn-submit-bg":At(e.color_success,40),"voice-btn-submit-bg-hover":e.color_success,"voice-btn-submit-icon":n,"voice-btn-submit-icon-hover":o,"voice-btn-submit-border":e.color_success,"voice-btn-submit-border-hover":e.color_success,"voice-btn-submit-text":n,"voice-btn-submit-text-hover":n},feedback:{"feedback-headline":o,"feedback-text":o,"feedback-input-bg":t,"feedback-input-border":r,"feedback-input-border-hover":r,"feedback-input-border-hover-focus":e.color_accent,"feedback-border-top":i,"feedback-input-icon":o,"feedback-border":i},toast:{"toast-bg-success":e.color_success,"toast-bg-info":e.color_info,"toast-bg-warning":e.color_warning,"toast-bg-error":e.color_error,"toast-icon-success":n,"toast-icon-info":n,"toast-icon-warning":n,"toast-icon-error":n,"toast-text-success":n,"toast-text-info":n,"toast-text-warning":n,"toast-text-error":n,"toast-borer-success":e.color_success,"toast-border-info":e.color_info,"toast-border-warning":e.color_warning,"toast-border-error":e.color_error},header:{"header-mobile-bg":n,"header-mobile-border":i},"widget-starter":{"ws-bubble-bg":e.color_accent,"ws-bubble-text":n,"ws-button-bg":e.color_accent_light,"ws-button-bg-hover":e.color_accent,"ws-button-icon":n,"ws-button-icon-hover":n,"ws-bubble-border":e.color_accent,"ws-button-border":e.color_accent,"ws-button-border-hover":e.color_accent,"ws-close-bg":e.color_accent_light,"ws-close-border":e.color_accent_light,"ws-close-icon":n}}}(n);return n.overrides&&n.overrides.length>0&&function(e,n,t){for(const o of t){const{component:t,property:r,value_light:i,value_dark:a}=o,s={button_primary:{path:["button","main"],prefix:"button"},button_suggestion:{path:["button","suggestion"],prefix:"button-suggestion"},button_submit:{path:["button","chat-submit"],prefix:"cs"},button_close:{path:["button","close"],prefix:"close"},button_toggle:{path:["button","toggle"],prefix:"toggle"},button_start:{path:["button","start"],prefix:"button-start"},button_text:{path:["button","text"],prefix:"button-textbutton"},button_language:{path:["button","sprache"],prefix:"sprache"},chat_input:{path:["chat"],prefix:"chat-input"},message_user:{path:["chat"],prefix:"chat-user"},message_ai:{path:["chat"],prefix:"chat-ai"},avatar:{path:["avatar"],prefix:"avatar"},tooltip:{path:["tooltip"],prefix:"tooltip"},widget_opener:{path:["widget-starter"],prefix:"ws-button"},welcome_section:{path:["welcome"],prefix:"welcome"},header_mobile:{path:["header"],prefix:"header-mobile"},disclaimer:{path:["disclaimer"],prefix:"disclaimer"},feedback:{path:["feedback"],prefix:"feedback"},voice_overlay:{path:["voice"],prefix:"voice"}}[t];if(!s)continue;const l={background:"bg",background_hover:"bg-hover",background_active:"bg-active",text:"text",text_hover:"text-hover",text_active:"text-active",border:"border",border_hover:"border-hover",border_active:"border-active",icon:"icon",icon_hover:"icon-hover",icon_active:"icon-active"}[r];if(!l)continue;const c=`${s.prefix}-${l}`;let u=e,d=n;for(const e of s.path)u=u[e],d=d[e];i&&c in u&&(u[c]=i),a&&c in d?d[c]=a:i&&c in d&&(d[c]=i)}}(t,o,n.overrides),{colors:Mt(n),lightMode:t,darkMode:o,responsive:Pt(n),semantic:Dt(n)}}var zt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Rt=(e,n,t)=>{const o=e.agentId,{showError:r}=xt(),[i,a]=de(null),[s,l]=de(!1),[c,u]=de(!1),d=me(()=>((e,n)=>{var t,o,r,i,a;const s={agentId:n.agentId,defaultLanguage:n.defaultLanguage,languages:n.languages,showChatButton:n.showChatButton,stt:(null==e?void 0:e.stt)||!1,tts:(null==e?void 0:e.tts)||!1,searchEnabled:(null==e?void 0:e.searchEnabled)||!1,easy_language:(null==e?void 0:e.easy_language)||!1,title:(null==e?void 0:e.welcome_title)||null,welcomeMessage:(null==e?void 0:e.welcome_message_snippet)||null,quickButtons:[],placeholder:(null==e?void 0:e.placeholder)||"Ihre Frage...",about:(null==e?void 0:e.about)||(null==e?void 0:e.disclaimer)||null,disclaimer:(null==e?void 0:e.disclaimer)||null,logo:(null==e?void 0:e.logo)||null,icon:(null==e?void 0:e.icon)||null,snippetIcon:(null==e?void 0:e.snippetIcon)||null,openerHeadline:(null==e?void 0:e.opener_headline)||null,openerSubtitle:(null==e?void 0:e.opener_subtitle)||null,closable:null===(t=null==e?void 0:e.closable)||void 0===t||t,welcomeDisclaimer:(null==e?void 0:e.welcome_disclaimer)||null,openerPosition:(null==e?void 0:e.opener_position)||"bottom-right",followUpQuestions:!!(null==e?void 0:e.follow_up_questions),copyEnabled:null===(o=null==e?void 0:e.copy_enabled)||void 0===o||o,openerAutoDismissMs:null!==(r=null==e?void 0:e.opener_auto_dismiss_milliseconds)&&void 0!==r?r:1e4,persistDismiss:null===(i=null==e?void 0:e.persist_dismiss)||void 0===i||i,showSidebarMenu:null!==(a=null==e?void 0:e.sidebar_menu_enabled)&&void 0!==a&&a,sidebarButtonLabel:(null==e?void 0:e.sidebar_button_label)||null,sidebarHeading:(null==e?void 0:e.sidebar_heading)||null,applicationId:(null==e?void 0:e.application)||null,auto_language:(null==e?void 0:e.auto_language)||!1,dark_mode:(null==e?void 0:e.dark_mode)||!1,locked_behind_login:(null==e?void 0:e.locked_behind_login)||!1};return null!==e&&null!==e.example_questions&&(s.quickButtons=e.example_questions.map(e=>e.title||e.message)),s})(i,e),[i,e]),p=ve(()=>zt(void 0,void 0,void 0,function*(){if(!c){u(!0);try{if(null===o)return console.warn("Agent ID is required for loading external configuration"),void l(!0);if(null===t)return console.warn("Session token is required for loading external configuration"),void l(!0);const e=parseInt(o);if(isNaN(e))throw new Error("Invalid agent ID");const n=yield((e,n)=>Vn(void 0,void 0,void 0,function*(){const t=`${Bn}/api/agent/${e}/config`,o=yield fetch(t,On(n,!0));if(!o.ok)throw new Error(`Failed to load agent config: ${o.status}`);return yield o.json()}))(e,t);console.log("External configuration loaded from AI-Gelb API"),a(n),l(!0);let r=n.theme_configuration;if(n.simple_theme&&(console.log("Using simplified theme configuration"),r=Ot(n.simple_theme)),r){const e=new CustomEvent("chatbot-theme-config",{detail:{themeConfig:r},bubbles:!0});document.dispatchEvent(e)}if(n.cssSnippet){const e=new CustomEvent("chatbot-custom-css",{detail:{css:n.cssSnippet},bubbles:!0});document.dispatchEvent(e)}const i=new CustomEvent("chatbot-dark-mode-config",{detail:{enabled:!0===n.dark_mode},bubbles:!0});document.dispatchEvent(i);const s=new CustomEvent("chatbot-ready",{bubbles:!0,detail:{agentId:o}});document.dispatchEvent(s),console.log("🚀 Chatbot ready event dispatched")}catch(e){console.error("Error loading external configuration:",e),r(n.toast.configurationError),l(!0)}}}),[c,o,t,n,r]);return he(()=>{c||s||null!==t&&p()},[e.agentId,t,p]),{finalConfig:d,configLoaded:s}};var Bt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const jt=(e,n)=>{const[t,o]=_n(!1),[r,i]=de(!1),[a,s]=de(null),l=ge(null),c=ge([]),u=ge(null),{showError:d}=xt(),p=ve((e,n)=>{o.force(e),!e&&a&&a.getTracks().forEach(e=>e.stop()),s(n)},[o,a]),h=ve(()=>Bt(void 0,void 0,void 0,function*(){try{const t=new Blob(c.current,{type:"audio/webm"});console.log("Sending audio blob, size:",t.size);const o=yield Qn(t,n);console.log("STT Response:",o);const r=o.text||o.transcription||"";r.trim()&&u.current?u.current(r.trim()):r.trim()||(console.warn("Empty transcription received"),d(e.stt.error.emptyTranscription))}catch(n){console.error("Speech recognition error:",n),d(e.stt.error.processing)}finally{i(!1),c.current=[],u.current=null}}),[d,e]),f=ve(n=>Bt(void 0,void 0,void 0,function*(){console.log("start recording"),u.current=n;try{console.log("Requesting microphone access...");const e=yield navigator.mediaDevices.getUserMedia({audio:!0});console.log("Microphone access granted"),p(!0,e);const n=new MediaRecorder(e,{mimeType:"audio/webm"});l.current=n,c.current=[],n.ondataavailable=e=>{e.data.size>0&&(c.current.push(e.data),console.log("Audio chunk received, size:",e.data.size))},n.start(),console.log("Recording started")}catch(n){console.error("Error starting recording:",n),n instanceof Error&&("NotAllowedError"===n.name?d(e.stt.error.permission):"NotFoundError"===n.name?d(e.stt.error.notFound):"NotSupportedError"===n.name?d(e.stt.error.notSupported):"SecurityError"===n.name?d(e.stt.error.policy):window.isSecureContext?d(e.stt.error.generic):d(e.stt.error.https),"NotAllowedError"===n.name&&(console.group("🔍 Microphone Permission Debugging:"),console.log("- HTTPS status:",window.isSecureContext),console.log("- In iframe:",window!==window.top),console.log("- MediaDevices available:",!!navigator.mediaDevices),window!==window.top&&(console.log("- Current origin:",window.location.origin),console.log("- Parent origin:",document.referrer||"unknown")),console.groupEnd())),p(!1,null),u.current=null}}),[p,d,e]),g=ve(()=>{l.current&&t&&(l.current.stop(),c.current=[],p(!1,null),u.current=null)},[t,p]),b=ve(()=>{l.current&&t&&(l.current.onstop=()=>{console.log("MediaRecorder stopped, total chunks:",c.current.length),h()},l.current.stop(),i(!0),p(!1,null))},[t,p,h]);return{isRecording:t,isProcessing:r,audioStream:a,handleRecordingStateChange:p,handleRecordingCancel:g,handleRecordingConfirm:b,startRecording:f}};var Ht=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const $t=e=>new Promise(n=>setTimeout(n,e));var Ut=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Yt="f:",Vt="9:",qt='0:"',Wt='"',Zt="e:",Gt="d:",Kt={type:"object",required:["results"],properties:{results:{type:"array",items:{type:"object",required:["title","snippet","url"],properties:{title:{type:"string"},snippet:{type:"string"},url:{type:"string"}}}},introduction:{type:"string"},"follow-up":{type:"string"}}};var Qt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Xt={WAITING:"Bitte warten Sie...",THINKING:"... Ich denke nach...",ERROR_PROCESSING:"Es gab einen Fehler bei der Verarbeitung deiner Nachricht.",ERROR_SIMPLIFICATION:"Es gab einen Fehler beim Vereinfachen der Nachricht.",ERROR_STREAMING:"Es gab einen Fehler beim Abrufen der Streaming-Antwort.",ERROR_MISSING_AGENT:"Fehler: Agent-ID ist nicht konfiguriert. Bitte kontaktieren Sie den Administrator."},Jt=e=>{for(let n=e.length-1;n>=0;n--)if("bot"===e[n].sender)return n;return null},eo=(e,n,t,o,r,i,a)=>{const{showError:s}=xt(),l=ge(o.followUpQuestions);he(()=>{l.current=o.followUpQuestions},[o.followUpQuestions]);const c=ge(a);he(()=>{c.current=a},[a]);const[u,d]=de(r);he(()=>d(r),[r]);const[p,h]=de([]),[f,g]=de(crypto.randomUUID()),b=ge(f);he(()=>{b.current=f},[f]);const m=ge(null),[v,y]=_n(!1),[x,w]=_n(!1),[k,{open:_,close:C}]=_n(!1),[S,{open:E,close:I}]=_n(!1),[T,A]=de(""),L=ve(e=>Qt(void 0,void 0,void 0,function*(){const n=e.length;for(let t=0;t<n;t++){yield $t(50);const n=Xt.WAITING.slice(0,-3)+e.substring(0,t+1);A(n)}}),[A]),[N,F]=de(""),P=me(()=>""===N.trim(),[N]),M=ve(()=>{F("")},[]),[D,O]=de("initial"),z=ve(e=>{"user"===e.sender&&y.open(),h(n=>[...n,e])},[y.open]),R=ve(e=>{h(n=>{const t=n.find(n=>n.messageId===e);return void 0===t?n:(t.isSimplified=!0,[...n])})},[h]),B=ve((e,t)=>{const o={text:"",sender:"bot",isComplete:!1,isSimplified:e||n,messageId:t||crypto.randomUUID()};z(o),I(),A("")},[z,n,I,A]),j=ve(e=>{h(n=>{const t=Jt(n);if(null===t)return n;const o=n[t];return void 0===o?n:(o.isThinking=!1,o.text+=e,[...n])})},[]),H=ve((e,t)=>{const o={text:"",sender:"bot",isThinking:!1,isComplete:!1,isSimplified:e||n,messageId:t||crypto.randomUUID()};z(o),I(),A("")},[z,I,A,n]),$=ve(()=>{h(e=>{const n=Jt(e);if(null===n)return e;const t=e[n];return void 0===t?e:(t.isThinking=!1,t.text="",[...e])})},[h]),U=ve(()=>{h(e=>{const n=Jt(e);if(null===n)return e;const t=e[n];if(void 0===t)return e;const o=(e=>{if(""===e.trim())return e;let n=e.replace(/\\n/g,"\n");return n=n.replace(/\\t/g,"\t"),n=n.replace(/\\r/g,"\r"),n=n.replace(/\n\s*\n/g,"\n\n"),n=n.replace(/^(\s*)[-*•]\s+(.+)$/gm,"$1• $2"),n=n.replace(/^(\s*)(\d+)[\.\)]\s+(.+)$/gm,"$1$2. $3"),n=n.replace(/[ \t]+/g," "),n=n.replace(/^[ \t]+|[ \t]+$/gm,""),n=n.replace(/\n{3,}/g,"\n\n"),n.trim()})(t.text),r=Object.assign({},t);r.text=o,r.isComplete=!0,r.isThinking=!1;const i=[...e];return i[n]=r,i})},[h]),Y=ve((e,n)=>{h(t=>t.map(t=>t.messageId===e?Object.assign(Object.assign({},t),{followUpQuestions:n,isLoadingFollowUps:!1}):t))},[h]),V=ve(e=>{h(n=>n.map(n=>n.messageId===e?Object.assign(Object.assign({},n),{isLoadingFollowUps:!0}):n))},[h]),q=ve((e,n)=>Qt(void 0,void 0,void 0,function*(){if(!l.current||!o.agentId)return;V(e);const t=b.current+"-followup-"+e,r=`Basierend auf der folgenden Antwort, generiere genau 3 kurze Vertiefungsfragen, die der Nutzer als Nächstes stellen könnte. Antworte NUR mit einem JSON-Array von 3 Strings, ohne weitere Erklärung. Beispiel: ["Frage 1?", "Frage 2?", "Frage 3?"]\n\nAntwort:\n${n.substring(0,2e3)}`;try{const n=yield Gn(o.agentId,r,t,c.current),i=new TextDecoder;let a="",s="";for(;;){const{value:e,done:t}=yield n.read();if(t)break;a+=i.decode(e,{stream:!0});const o=a.split("\n");a=o.pop()||"";for(const e of o)if(e.startsWith('0:"')&&e.endsWith('"')){const n=e.slice(3,-1);s+=n.replace(/\\n/g,"\n").replace(/\\t/g,"\t").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}}n.releaseLock();let l=[];try{const e=s.match(/\[[\s\S]*\]/);if(e){const n=JSON.parse(e[0]);Array.isArray(n)&&(l=n.filter(e=>"string"==typeof e))}}catch(e){console.warn("Follow-up JSON parse failed, trying fallback:",e);const n=s.match(/\d+\.\s*(.+)/g);if(n&&(l=n.map(e=>e.replace(/^\d+\.\s*/,"").replace(/^["']|["']$/g,"").trim())),0===l.length){const e=s.split("\n").map(e=>e.replace(/^[-•*]\s*/,"").replace(/^["']|["']$/g,"").trim()).filter(e=>e.length>10&&e.endsWith("?"));e.length>0&&(l=e)}}l.length>0?Y(e,l.slice(0,3)):h(n=>n.map(n=>n.messageId===e?Object.assign(Object.assign({},n),{isLoadingFollowUps:!1}):n))}catch(n){console.error("Error fetching follow-up questions:",n),h(n=>n.map(n=>n.messageId===e?Object.assign(Object.assign({},n),{isLoadingFollowUps:!1}):n))}}),[o.agentId,V,Y,h]),W=ve(e=>{h(n=>{const t=Jt(n);if(null===t)return n;const o=n[t];if(void 0===o)return n;const r=Object.assign(Object.assign({},o),{text:e,isThinking:!0}),i=[...n];return i[t]=r,i})},[h]),Z=ve((e,n)=>{const t={sender:"bot",isComplete:!0,text:e,isSimplified:n,messageId:crypto.randomUUID()};h(e=>[...e,t])},[h]),G=ve(()=>{m.current=null,h([]),g(crypto.randomUUID()),y.close()},[y.close]),K=ve((e,n)=>{m.current=null,h(e),g(n),e.length>0&&(y.open(),O("fixed"))},[y.open]),Q=ve(n=>Qt(void 0,void 0,void 0,function*(){if(""===n)return;const t=p.find(e=>e.messageId===n);if(void 0===t)return;const o=[t.text,e.instructions.simplifyMessage].join(" ");if(k)console.log("Already sending, ignoring duplicate call");else{_(),E(),A(e.simplify.simplifying);try{yield J(o,{isSimplification:!0,initialTypingMessage:e.simplify.simplifying,thinkingMessage:Xt.THINKING,logPrefix:"Simplification stream"})}catch(n){console.error("Error sending message:",n),s(e.toast.simplificationError);const t={text:e.toast.generalError,sender:"bot",isComplete:!0,isSimplified:!0,messageId:crypto.randomUUID()};z(t),I(),A("")}finally{C(),R(n)}}}),[p,R,k,_,C,E,I,z,A]),X=ve((t,o)=>Qt(void 0,void 0,void 0,function*(){if(k)return;w.open(),setTimeout(w.close,500),_();z({text:o||t,sender:"user"}),E(),A(Xt.WAITING);try{yield J(t,{isSimplification:!1,initialTypingMessage:Xt.WAITING,thinkingMessage:Xt.THINKING,logPrefix:"Stream"})}catch(t){console.error("Error sending message:",t),s(e.toast.messageError);const o={text:Xt.ERROR_PROCESSING,sender:"bot",isComplete:!0,isSimplified:n,messageId:crypto.randomUUID()};z(o),I(),A("")}finally{C()}}),[k,w.open,w.close,C,_,E,I]),J=ve((r,i)=>Qt(void 0,void 0,void 0,function*(){let a=!1,l=Xt.WAITING,u=Xt.THINKING,d="Stream";if(void 0!==i&&(void 0!==i.isSimplification&&(a=i.isSimplification),void 0!==i.initialTypingMessage&&(l=i.initialTypingMessage),void 0!==i.thinkingMessage&&(u=i.thinkingMessage),void 0!==i.logPrefix&&(d=i.logPrefix)),!o.agentId){console.error("Agent ID is required but not provided in configuration"),s(e.toast.missingAgentId);const t={text:Xt.ERROR_MISSING_AGENT,sender:"bot",isComplete:!0,isSimplified:a||n,messageId:crypto.randomUUID()};return z(t),I(),void A("")}const p=b.current;m.current=p;const h=()=>m.current!==p,f=()=>{h()||U()},g=e=>{h()||W(e)},v=e=>Qt(void 0,void 0,void 0,function*(){h()||(yield L(e))}),y=()=>{h()||$()},x=(e,n)=>{h()||H(e,n)},w=(e,n)=>{h()||B(e,n)},k=e=>{h()||j(e)};try{const e=o.auto_language?void 0:t;yield((e,n,t,o,r,i,a,s,l,c,u,d,p,h,f,g,b)=>Ut(void 0,void 0,void 0,function*(){let m=!1,v=null,y=null,x="",w=!1,k=null;const _=new TextDecoder;let C="";const S=yield Gn(e,n,t,o,g,b),E=()=>Ut(void 0,void 0,void 0,function*(){const{value:e,done:n}=yield S.read();if(n)return!0;C+=_.decode(e,{stream:!0});const t=C.split("\n");C=t.pop()||"";for(const e of t)switch(!0){case""===e.trim():continue;case e.startsWith(Yt):{console.log(e.substring(Yt.length));const n=JSON.parse(e.substring(Yt.length));v=Date.now(),y=n.messageId;break}case e.startsWith(Vt):{if(w){console.log("Tool call data:",e.substring(0,100)+"...");continue}w=!0,k=Date.now();const n=k-(v||0);console.log(`Tool call detected after ${n}ms of "${r}" - switching to thinking mode`),m?l(r+i):yield c(i),console.log("Tool call data:",e.substring(0,100)+"...");break}case e.startsWith(qt)&&e.endsWith(Wt):{if(w){w=!1;const e=Date.now()-(k||0);console.log(`Switching from thinking to streaming after ${e}ms of thinking time`),m?u():(d(a,y||""),m=!0)}else if(!m){const e=Date.now()-(v||0);console.log(`Direct response after ${e}ms - no reasoning phase`),p(a,y||""),m=!0}const n=e.slice(qt.length,-Wt.length).replace(/\\"/g,'"');x+=n,h(n);break}case e.startsWith(Zt)||e.startsWith(Gt):console.log("stream end",JSON.parse(e.substring(2)))}return!1});try{for(;!(yield E()););C.trim()&&console.log("Remaining buffer:",C),m&&(s(),f&&y&&f(y,x))}finally{S.releaseLock()}}))(o.agentId,r,p,c.current,l,u,a,f,g,v,y,x,w,k,a?void 0:(e,n)=>{h()||q(e,n)},e,n)}catch(t){console.error(`${d} error:`,t);if(t instanceof Error&&t.message.startsWith("CORS_BLOCKED:")){const e=t.message.replace("CORS_BLOCKED: ","");s(e,1e4),Z(e,a||n)}else{s(a?e.toast.simplificationError:e.toast.streamingError);const t=a?Xt.ERROR_SIMPLIFICATION:Xt.ERROR_STREAMING;Z(t,a||n)}I(),A("")}finally{m.current===p&&(m.current=null)}}),[o.agentId,o.auto_language,n,z,U,W,L,$,H,B,j,s,Z,I,A,q,t]),ee=ve(()=>{O("fadeOut"),setTimeout(()=>O("fixed"),50)},[O]),ne=ve(e=>Qt(void 0,void 0,void 0,function*(){""!==e.trim()&&(v||ee(),M(),i(!1),X(e,e))}),[v,ee,X,M,i,e,t,n]),te=ve(()=>{P||("chat"===u?ne(N):oe().then(()=>d("chat")))},[N,P,ne,u]),oe=ve(()=>Qt(void 0,void 0,void 0,function*(){if(k)return;if(!o.agentId)return console.error("Agent ID is required but not provided in configuration"),void s(e.toast.missingAgentId);v||ee(),w.open(),setTimeout(w.close,500),_();z({text:N,sender:"user"}),M(),i(!1);try{E(),A(Xt.THINKING);const e=o.auto_language?void 0:t,r=yield((e,n,t,o,r)=>Ht(void 0,void 0,void 0,function*(){if(!Hn(e))throw new Error("Agent ID is required and must be numeric");if(!$n(n))throw new Error("Query is required and must be a non-empty string");if(!t||"object"!=typeof t)throw new Error("Schema is required and must be an object");const i=`${Bn}/api/search/${e}`,a=Object.assign({query:n,schema:t},r&&{language:r}),s=yield fetch(i,zn(a,o));if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return yield s.json()}))(o.agentId,N,Kt,c.current,e),i={text:"",sender:"bot",isComplete:!0,isSimplified:n,messageId:crypto.randomUUID(),json:r};z(i)}catch(t){console.error("Error with schema search:",t),s(e.toast.messageError);const o={text:"Es gab einen Fehler bei der Suche.",sender:"bot",isComplete:!0,isSimplified:n,messageId:crypto.randomUUID()};z(o)}finally{I(),A(""),C()}}),[P,N,k,o.agentId,o.auto_language,n,w,_,C,z,M,s,e,t]);return{inputAnimationState:D,triggerAnimation:ee,clearInput:M,isInputEmpty:P,inputText:N,setInputText:F,isStreaming:S,streamingMessage:T,isSending:k,messages:p,isConversationStarting:x,isConversationActive:v,resetConversation:G,loadConversationFromMessages:K,conversationId:f,simplifyMessage:Q,sendMessageWithUI:ne,sendMessageFromInput:te,mode:u,setMode:d}};var no=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};function to(e){return no(this,void 0,void 0,function*(){const n=(new TextEncoder).encode(e),t=yield crypto.subtle.digest("SHA-256",n),o=Array.from(new Uint8Array(t)).map(e=>e.toString(16).padStart(2,"0")).join("");return o})}var oo=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};function ro(e){const[n,t]=de({sessionToken:null,expiresAt:null,isLocked:null,sessionError:!1,isEstablishing:!1}),o=ge(null);he(()=>()=>{o.current&&clearInterval(o.current)},[]);const r=ve(()=>oo(this,void 0,void 0,function*(){if(null===e)throw new Error("Agent ID not set");try{const n=yield function(e){return tt(this,void 0,void 0,function*(){const n=`${Bn}/api/agent/${e}/locked`,t=yield fetch(n,On(null,!0));if(!t.ok)throw new Error(`Failed to check agent locked status: ${t.status}`);return(yield t.json()).locked})}(e);return t(e=>Object.assign(Object.assign({},e),{isLocked:n})),n}catch(e){throw console.error("Failed to check if agent is locked:",e),t(e=>Object.assign(Object.assign({},e),{sessionError:!0})),e}}),[e]),i=ve(n=>oo(this,void 0,void 0,function*(){if(null===e)throw new Error("Agent ID not set");return yield function(e,n){return nt(this,void 0,void 0,function*(){const t=`${Bn}/api/agent/${e}/session`,o={};n&&(o.credentials=n);const r=yield fetch(t,zn(o,null));if(!r.ok){const e=yield r.json(),n=new Error(e.error||`Session establishment failed: ${r.status}`);throw n.status=r.status,n}const i=yield r.json();return{sessionToken:i.sessionToken,expiresAt:i.expiresAt}})}(e,n)}),[e]),a=ge(null),s=ve(()=>{o.current&&clearInterval(o.current),o.current=setInterval(()=>oo(this,void 0,void 0,function*(){if(null===e)return;const n=a.current;if(null!==n)try{const o=yield function(e,n){return et(this,void 0,void 0,function*(){const t=`${Bn}/api/agent/${e}/session/continue`,o=yield fetch(t,zn({},n));if(!o.ok){const e=yield o.json();throw new Error(e.error||`Session continue failed: ${o.status}`)}const r=yield o.json();return{sessionToken:r.sessionToken,expiresAt:r.expiresAt}})}(e,n);a.current=o.sessionToken,t(e=>Object.assign(Object.assign({},e),{sessionToken:o.sessionToken,expiresAt:o.expiresAt,sessionError:!1}))}catch(e){console.error("Session refresh failed:",e),o.current&&(clearInterval(o.current),o.current=null),t(e=>Object.assign(Object.assign({},e),{sessionError:!0}))}else console.error("Session refresh failed: no current token")}),55e3)},[e]),l=ve(n=>oo(this,void 0,void 0,function*(){if(null===e)return console.error("Cannot establish session: agent ID not set"),"error";t(e=>Object.assign(Object.assign({},e),{isEstablishing:!0,sessionError:!1}));try{let e;if(n){const t=yield function(e){return oo(this,void 0,void 0,function*(){const n=(new TextEncoder).encode(e),t=yield crypto.subtle.digest("SHA-256",n),o=Array.from(new Uint8Array(t)).map(e=>e.toString(16).padStart(2,"0")).join("");return o})}(n.password);e={email:n.email,passwordHash:t}}const o=yield i(e);return a.current=o.sessionToken,t(e=>Object.assign(Object.assign({},e),{sessionToken:o.sessionToken,expiresAt:o.expiresAt,sessionError:!1,isEstablishing:!1})),s(),"ok"}catch(e){return 401===e.status?(t(e=>Object.assign(Object.assign({},e),{isLocked:!0,isEstablishing:!1})),"locked"):(console.error("Session establishment failed:",e),t(e=>Object.assign(Object.assign({},e),{sessionError:!0,isEstablishing:!1})),"error")}}),[e,i,s]),c=ve(()=>{t(e=>Object.assign(Object.assign({},e),{isLocked:!0}))},[]),u=ve(()=>{t(e=>Object.assign(Object.assign({},e),{sessionError:!1}))},[]);return{sessionState:n,checkLocked:r,markAsLocked:c,establish:l,establishWithHashedCredentials:ve(n=>oo(this,void 0,void 0,function*(){if(null===e)return console.error("Cannot establish session: agent ID not set"),!1;t(e=>Object.assign(Object.assign({},e),{isEstablishing:!0,sessionError:!1}));try{const e=yield i(n);return a.current=e.sessionToken,t(n=>Object.assign(Object.assign({},n),{sessionToken:e.sessionToken,expiresAt:e.expiresAt,sessionError:!1,isEstablishing:!1})),s(),!0}catch(e){return console.error("Session establishment with hashed credentials failed:",e),t(e=>Object.assign(Object.assign({},e),{sessionError:!0,isEstablishing:!1})),!1}}),[e,i,s]),clearError:u}}function io(e,n){const[t,o]=de(()=>{try{const t=window.localStorage.getItem(e);return t?JSON.parse(t):n}catch(t){return console.error(`Error reading localStorage key "${e}":`,t),n}});return he(()=>{try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){console.error(`Error setting localStorage key "${e}":`,n)}},[e,t]),[t,o]}var ao=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const so=(e,n=20)=>e.length<=n?e:e.slice(0,n)+"...",lo=e=>{const n=_n(!1),[t,o]=io("past_conversations",[]),[r,i]=de(null),[a,s]=de(!1),l=ve((e,n,t)=>{o(o=>{const r=[...o];for(;r.length<=e;)r.push([]);const i=r[e];if(i.some(e=>e.id===n))return r;const a={id:n,preview:so(t),lastMessageAt:Date.now()};return r[e]=[...i,a],r})},[o]),c=ve((e,n)=>{o(t=>{const o=[...t];if(e>=o.length)return t;const r=o[e];if(!r)return t;const i=r.findIndex(e=>e.id===n);if(-1===i)return t;const a=[...r];return a[i]=Object.assign(Object.assign({},a[i]),{lastMessageAt:Date.now()}),o[e]=a,o})},[o]),u=ve((e,n)=>{o(t=>{const o=[...t];if(e>=o.length)return t;const r=o[e];return r?(o[e]=r.filter(e=>e.id!==n),o):t})},[o]),d=ve(e=>t[e]||[],[t]),p=ve(e=>{i(e)},[]),h=ve(n=>ao(void 0,void 0,void 0,function*(){s(!0);try{const t=yield((e,n)=>qn(void 0,void 0,void 0,function*(){const t=`${Bn}/api/conversation`,o=yield fetch(t,zn({conversationId:e},n));if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return(yield o.json()).messages}))(n,e),o=(e=>e.map(e=>({text:e.content,sender:"user"===e.role?"user":"bot",isComplete:!0,messageId:e.trace_id})))(t);return i(n),o}finally{s(!1)}}),[]);return{opened:n,pastConversations:t,addConversation:l,updateConversation:c,removeConversation:u,getConversationsForAgent:d,selectedConversationId:r,selectConversation:p,loadConversation:h,isLoadingConversation:a}};var co=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const uo=({children:e,config:n})=>{const[t,o]=de("chat");he(()=>{const e=e=>{const{entrySource:n}=e.detail||{};console.log("open intercept",n),o(n)};return document.addEventListener("chatbot-open",e),()=>document.removeEventListener("chatbot-open",e)},[]);const[r,i]=de(n.defaultLanguage),[a,s]=_n(!1),l=me(()=>ct(r),[r]);he(()=>{s.close()},[r,s.close]);const c=me(()=>{const e=new Set([n.defaultLanguage]);if(null===n.languages)return e;const t=n.languages.split(",").map(e=>e.trim());for(const n of t)e.add(n);return e},[n.defaultLanguage,n.languages]),u=n.agentId?parseInt(n.agentId):null,d=ro(isNaN(u)?null:u);he(()=>{co(void 0,void 0,void 0,function*(){if(u&&!isNaN(u)&&!d.sessionState.sessionToken&&!d.sessionState.isEstablishing&&!0!==d.sessionState.isLocked&&"locked"===(yield d.establish())){const e=new CustomEvent("chatbot-ready",{bubbles:!0,detail:{agentId:n.agentId,locked:!0}});document.dispatchEvent(e),console.log("🔒 Chatbot ready event dispatched (locked agent - login required)")}})},[u,d.sessionState.sessionToken,d.sessionState.isEstablishing,d.sessionState.isLocked]);const p=Rt(n,l,d.sessionState.sessionToken),h=ve((e,n)=>co(void 0,void 0,void 0,function*(){console.log("Login succeeded, establishing session with credentials"),yield d.establishWithHashedCredentials({email:e,passwordHash:n})}),[d.establishWithHashedCredentials]),f=function(e=!1,n){const[t,o]=de({isAuthenticated:!1,email:null}),r=e&&!t.isAuthenticated;return{authState:t,login:ve((e,t)=>no(this,void 0,void 0,function*(){try{const r=yield to(t);if(!n)return{success:!1,error:"Login callback not configured"};try{yield n(e,r)}catch(e){const n=e instanceof Error?e.message:"Login failed";return console.error("Login failed:",n),{success:!1,error:n}}return o({isAuthenticated:!0,email:e}),{success:!0}}catch(e){return console.error("Login error:",e),{success:!1,error:"Network error"}}}),[n]),register:ve((e,n,t)=>no(this,void 0,void 0,function*(){try{const o=yield to(n),r=yield fetch(`${Bn}/api/agent-auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:t,email:e,passwordHash:o})});return r.ok?{success:!0,needsVerification:!0}:{success:!1,error:(yield r.json()).error||"Registration failed"}}catch(e){return console.error("Registration error:",e),{success:!1,error:"Network error"}}}),[]),logout:ve(()=>{o({isAuthenticated:!1,email:null})},[]),needsAuth:r}}(p.finalConfig.locked_behind_login,h),g=p.finalConfig.dark_mode,[b,m]=de(()=>!("undefined"==typeof window||!g)&&window.matchMedia("(prefers-color-scheme: dark)").matches),v=ve(()=>{g&&m(e=>!e)},[g]);he(()=>{if(!g)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),n=e=>{m(e.matches)};return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[g]),he(()=>{if(!g){const e=new CustomEvent("chatbot-dark-mode-change",{detail:{isDarkMode:!1},bubbles:!0});return void document.dispatchEvent(e)}const e=new CustomEvent("chatbot-dark-mode-change",{detail:{isDarkMode:b},bubbles:!0});document.dispatchEvent(e)},[b,g]);const y={disableParentPageScrolling:ve(()=>{try{const e=window.parent.document,n=e.body,t=e.documentElement;if(n.hasAttribute("data-chatbot-scroll-y"))return void console.log("🔒 Scroll blocking already active, skipping");const o=window.parent.pageYOffset||e.documentElement.scrollTop;n.style.overflow&&n.setAttribute("data-chatbot-original-body-overflow",n.style.overflow),n.style.position&&n.setAttribute("data-chatbot-original-body-position",n.style.position),n.style.top&&n.setAttribute("data-chatbot-original-body-top",n.style.top),n.style.width&&n.setAttribute("data-chatbot-original-body-width",n.style.width),t.style.overflow&&t.setAttribute("data-chatbot-original-html-overflow",t.style.overflow),n.setAttribute("data-chatbot-scroll-y",o.toString()),n.style.overflow="hidden",n.style.position="fixed",n.style.top=`-${o}px`,n.style.width="100%",t.style.overflow="hidden"}catch(e){console.warn("Could not disable parent page scrolling:",e)}},[]),enableParentPageScrolling:ve(()=>{try{const e=window.parent.document,n=e.body,t=e.documentElement,o=n.getAttribute("data-chatbot-original-body-overflow"),r=n.getAttribute("data-chatbot-original-body-position"),i=n.getAttribute("data-chatbot-original-body-top"),a=n.getAttribute("data-chatbot-original-body-width"),s=t.getAttribute("data-chatbot-original-html-overflow"),l=parseInt(n.getAttribute("data-chatbot-scroll-y")||"0");n.style.overflow=o||"",n.style.position=r||"",n.style.top=i||"",n.style.width=a||"",t.style.overflow=s||"",n.removeAttribute("data-chatbot-original-body-overflow"),n.removeAttribute("data-chatbot-original-body-position"),n.removeAttribute("data-chatbot-original-body-top"),n.removeAttribute("data-chatbot-original-body-width"),t.removeAttribute("data-chatbot-original-html-overflow"),n.removeAttribute("data-chatbot-scroll-y"),window.parent.scrollTo(0,l)}catch(e){console.warn("Could not restore parent page scrolling:",e)}},[]),setParentPageBackgroundColor:ve(()=>{try{const e=window.parent.document,n=e.body;if(n.hasAttribute("data-chatbot-original-bg-color"))return void console.log("🎨 Background color already set, skipping");const t=window.getComputedStyle(n).backgroundColor;t&&"rgba(0, 0, 0, 0)"!==t&&"transparent"!==t&&n.setAttribute("data-chatbot-original-bg-color",t);try{const t=e.querySelector("aigelb-chatbot");if(t&&t.shadowRoot){const e=window.getComputedStyle(t.shadowRoot.host).getPropertyValue("--surface-bg").trim();e?(n.style.backgroundColor=e,console.log("🎨 Parent page background set to surface-bg:",e)):console.warn("Could not find --surface-bg CSS variable in widget theme")}else console.warn("Could not access chatbot widget or its shadow root")}catch(e){console.warn("Could not access widget theme configuration:",e)}}catch(e){console.warn("Could not set parent page background color:",e)}},[]),restoreParentPageBackgroundColor:ve(()=>{try{const e=window.parent.document.body,n=e.getAttribute("data-chatbot-original-bg-color");n?(e.style.backgroundColor=n,e.removeAttribute("data-chatbot-original-bg-color")):e.style.backgroundColor=""}catch(e){console.warn("Could not restore parent page background color:",e)}},[])},[x,w]=de(!1),[k,_]=de(!1),[C,S]=de(!1),[E,I]=de(!1),[T,A]=de(!1),[L,N]=de("initial"),[F,P]=de(!1),M=ve(()=>{y.disableParentPageScrolling(),y.setParentPageBackgroundColor(),w(!0),o("chat")},[y]),D=eo(l,a,r,p.finalConfig,t,P,d.sessionState.sessionToken);he(()=>{const e=e=>{const{message:n}=e.detail||{};n&&"string"==typeof n?(x||(y.disableParentPageScrolling(),y.setParentPageBackgroundColor(),w(!0),o("chat")),setTimeout(()=>{D.sendMessageWithUI(n)},100)):console.warn("chatbot-send-message: Invalid or missing message")};return document.addEventListener("chatbot-send-message",e),()=>document.removeEventListener("chatbot-send-message",e)},[x,y,D.sendMessageWithUI]);const O=ve(()=>{_(!1),S(!1),y.enableParentPageScrolling(),y.restoreParentPageBackgroundColor(),N("initial"),w(!1)},[y]);he(()=>{if(x){const e=setTimeout(()=>{I(!0)},300);return()=>clearTimeout(e)}I(!1)},[x]),he(()=>{if(x){const e=document.querySelector(".chat-overlay button, .chat-overlay textarea");null!==e&&setTimeout(()=>e.focus(),100),I(!1),setTimeout(()=>I(!0),300)}else I(!1)},[x]);const z=lo(d.sessionState.sessionToken);he(()=>{if(D.isConversationActive&&n.agentId&&D.conversationId){const e=parseInt(n.agentId,10);if(!isNaN(e)){const n=D.messages.find(e=>"user"===e.sender),t=(null==n?void 0:n.text)||"";z.addConversation(e,D.conversationId,t)}}},[D.isConversationActive,D.conversationId,D.messages,n.agentId,z.addConversation]);const R={configData:p,recording:Object.assign({},jt(l,d.sessionState.sessionToken)),parentPageControl:y,auth:f,session:d,agentLibrary:z,entrySource:t,setEntrySource:o,availableLanguages:c,currentLanguage:r,setCurrentLanguage:i,t:l,easyLanguageActive:a,easyLanguageCtrl:s,autoLanguage:p.finalConfig.auto_language,isDarkMode:b,setIsDarkMode:m,toggleDarkMode:v,isOpen:x,setIsOpen:w,functionsExpanded:k,setFunctionsExpanded:_,aboutAiExpanded:C,setAboutAiExpanded:S,accordionAnimated:E,setAccordionAnimated:I,isScrolled:T,setIsScrolled:A,inputAnimationState:L,setInputAnimationState:N,isTextareaExpanded:F,setIsTextareaExpanded:P,conversation:D,openChat:M,closeChat:O};return kn(wt.Provider,{value:R,children:e})},po=()=>{const e=ye(wt);if(void 0===e)throw new Error("useChatbotApp must be used within a ChatbotAppProvider");return e},ho=()=>{const{recording:{audioStream:e,isRecording:n}}=po(),t=ge(null),o=ge(null),r=ge(null),i=ge(null);he(()=>{const e=()=>{if(t.current){const e=t.current.parentElement;e&&(t.current.width=e.clientWidth,t.current.height=60)}};e();const n=setTimeout(e,100);return window.addEventListener("resize",e),()=>{clearTimeout(n),window.removeEventListener("resize",e)}},[n]),he(()=>(e&&n?(a(),s()):l(),()=>{l()}),[e,n]);const a=()=>{if(null!==e)try{const n=new(window.AudioContext||window.webkitAudioContext),t=n.createAnalyser(),o=n.createMediaStreamSource(e);t.fftSize=256,o.connect(t),r.current=t,i.current=new Uint8Array(t.frequencyBinCount)}catch(e){console.error("Error setting up audio analyzer:",e)}else console.error("audiostream null")},s=()=>{if(!t.current||!r.current)return;const e=t.current,a=e.getContext("2d"),s=r.current,l=s.frequencyBinCount,c=i.current;if(null===c)return;const u=[];let d=0;const p=()=>{if(!n)return;o.current=requestAnimationFrame(p),s.getByteFrequencyData(c);const t=e.width,r=(e=>{const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null})("#FFFFFF")||{r:74,g:144,b:226};let i=0,h=0;const f=Math.floor(.4*l),g=Math.floor(.2*l);for(let e=0;e<f;e++)i+=c[e],e>=g&&(h+=1.5*c[e]);let b=.6*(i/f/255)+.4*(h/(f-g)/255);b=Math.pow(2.5*b,1.2);const m=.1*Math.sin(.003*Date.now()),v=.05*Math.sin(.02*Date.now()),y=e.height/2,x=y+(b-.05)*(.45*e.height)*(Math.sin(.008*Date.now()+10*b)*b+Math.sin(.015*Date.now()+5*b)*b*.5+m+v+.1*(Math.random()-.5)*b);for(u.push({x:d,y:Math.max(5,Math.min(e.height-5,x))});u.length>t;)u.shift();if(a.clearRect(0,0,e.width,e.height),a.strokeStyle=`rgba(${r.r}, ${r.g}, ${r.b}, 0.15)`,a.lineWidth=1,a.setLineDash([3,6]),a.beginPath(),a.moveTo(0,y),a.lineTo(e.width,y),a.stroke(),a.setLineDash([]),u.length>1){const n=a.createLinearGradient(0,0,e.width,0);n.addColorStop(0,`rgba(${r.r}, ${r.g}, ${r.b}, 0.2)`),n.addColorStop(.6,`rgba(${r.r}, ${r.g}, ${r.b}, 0.7)`),n.addColorStop(1,`rgba(${r.r}, ${r.g}, ${r.b}, 1)`),a.strokeStyle=n,a.lineWidth=3,a.lineCap="round",a.lineJoin="round",a.beginPath();for(let n=0;n<u.length;n++){const t=u[n],o=t.x-(d-e.width);o>=-10&&o<=e.width+10&&(0===n||n>0&&u[n-1].x-(d-e.width)<-10?a.moveTo(o,t.y):a.lineTo(o,t.y))}if(a.stroke(),b>.08){a.shadowColor=`rgba(${r.r}, ${r.g}, ${r.b}, 0.5)`,a.shadowBlur=8,a.strokeStyle=`rgba(${r.r}, ${r.g}, ${r.b}, 0.7)`,a.lineWidth=2,a.beginPath();const n=u.slice(-30);for(let t=0;t<n.length;t++){const o=n[t],r=o.x-(d-e.width);r>=-10&&r<=e.width+10&&(0===t?a.moveTo(r,o.y):a.lineTo(r,o.y))}a.stroke(),a.shadowBlur=0}}const w=e.width-30;a.fillStyle=`rgba(${r.r}, ${r.g}, ${r.b}, 0.9)`,a.beginPath(),a.arc(w,y,4,0,2*Math.PI),a.fill();const k=2+1*Math.sin(.008*Date.now());if(a.fillStyle=`rgba(${r.r}, ${r.g}, ${r.b}, 0.3)`,a.beginPath(),a.arc(w,y,k+4,0,2*Math.PI),a.fill(),d+=3,d>2*e.width)for(u.forEach(n=>{n.x-=e.width}),d-=e.width;u.length>0&&u[0].x<d-e.width-50;)u.shift()};p()},l=()=>{o.current&&(cancelAnimationFrame(o.current),o.current=null)};return kn("div",{className:"voice-visualizer",style:{width:"100%",margin:0,padding:0},children:kn("canvas",{ref:t,height:60,style:{width:"100%",height:"50px",display:"block"}})})},fo=({})=>{const{recording:{isRecording:e,isProcessing:n,handleRecordingCancel:t,handleRecordingConfirm:o},t:r}=po();return e?kn("div",{className:"recording-overlay",children:kn("div",{className:"recording-overlay-content",children:[kn("div",{className:"recording-status",children:[kn("div",{className:"recording-pulse"}),kn("span",{children:n?r.stt.processing:r.stt.recording})]}),kn("div",{className:"recording-visualizer-wrapper",children:[!n&&kn(ho,{}),n&&kn("div",{className:"processing-indicator",children:kn("div",{className:"processing-text",children:r.stt.processingAudio})})]}),kn("div",{className:"recording-overlay-controls",children:[kn("button",{type:"button",className:"recording-overlay-button recording-overlay-button--cancel",onClick:t,"aria-label":r.stt.cancelRecording,disabled:n,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" ><path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg>'})}),kn("button",{type:"button",className:"recording-overlay-button recording-overlay-button--confirm "+(n?"recording-overlay-button--processing":""),onClick:o,"aria-label":n?r.stt.processing:r.stt.confirmRecording,disabled:n,children:kn(Sn,n?{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" style="animation: spin 1.5s linear infinite" ><path d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg>'}:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" ><path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg>'})})]})]})}):null},go=({onOpen:e,openerHeadline:n,openerSubtitle:t,snippetIcon:o,position:r="bottom-right",autoDismissMs:i,persistDismiss:a})=>{const{isOpen:s}=po(),[l,c]=(e=>{const[n,t]=de(!1),[o,r]=io("aigelb-opener-dismissed",!1);return e?[o,r]:[n,t]})(a),u=ve(e=>{e.stopPropagation(),c(!0)},[]),d=ve(n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),e())},[e]),p=ve(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u(e))},[]),h=!l&&!s&&(n||t);return he(()=>{if(!h||i<1)return;const e=setTimeout(()=>c(!0),i);return()=>clearTimeout(e)},[h,i]),s?null:kn("div",{className:"chatbot-container "+("bottom-left"===r?"position-bottom-left":""),children:kn("div",{className:"chat-opener-container",children:[h&&kn("div",{className:"chat-opener-tooltip",onClick:e,children:[kn("div",{className:"tooltip-content",children:[kn("div",{className:"tooltip-text-container",children:[n&&kn("span",{className:"tooltip-headline",children:n}),t&&kn("span",{className:"tooltip-subtitle",children:t})]}),kn("button",{className:"tooltip-close",onClick:u,onKeyDown:p,"aria-label":"Tooltip schließen",type:"button",children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="currentColor" ><path d="M11.0306 9.96936C11.1715 10.1103 11.2506 10.3014 11.2506 10.5006C11.2506 10.6999 11.1715 10.891 11.0306 11.0319C10.8897 11.1728 10.6986 11.2519 10.4993 11.2519C10.3001 11.2519 10.109 11.1728 9.9681 11.0319L5.99997 7.06249L2.0306 11.0306C1.8897 11.1715 1.69861 11.2507 1.49935 11.2507C1.30009 11.2507 1.10899 11.1715 0.968098 11.0306C0.827202 10.8897 0.748047 10.6986 0.748047 10.4994C0.748047 10.3001 0.827202 10.109 0.968098 9.96811L4.93747 5.99999L0.969348 2.03061C0.828451 1.88972 0.749297 1.69862 0.749297 1.49936C0.749297 1.30011 0.828451 1.10901 0.969348 0.968112C1.11024 0.827216 1.30134 0.748061 1.5006 0.748061C1.69986 0.748061 1.89095 0.827216 2.03185 0.968112L5.99997 4.93749L9.96935 0.967487C10.1102 0.826591 10.3013 0.747437 10.5006 0.747437C10.6999 0.747437 10.8909 0.826591 11.0318 0.967487C11.1727 1.10838 11.2519 1.29948 11.2519 1.49874C11.2519 1.69799 11.1727 1.88909 11.0318 2.02999L7.06247 5.99999L11.0306 9.96936Z" /></svg>'})})]}),kn("div",{className:"tooltip-arrow"})]}),kn("button",{className:"chat-opener-button",onClick:e,onKeyDown:d,"aria-label":n||t?`${n||""}${n&&t?". ":""}${t||""}. Klicken Sie, um den Chat zu öffnen.`:"Klicken Sie, um den Chat zu öffnen.",type:"button",children:o?kn("img",{src:`${Rn}/assets/${o}`,alt:`Chatbot Icon - ${n}`,style:{width:"44px",height:"44px",objectFit:"contain"},role:"img","aria-label":"Chatbot Icon"}):kn(Sn,{svg:Tn,style:{width:"44px",height:"44px"}})})]})})},bo=()=>{const{configData:{finalConfig:e},isOpen:n}=po();return null===e.disclaimer||""===e.disclaimer.trim()?null:kn("div",{className:"disclaimer-text",style:{marginTop:"8px",textAlign:"center",animation:n?"disclaimerFadeIn 1s ease-out 1.5s both":"none"},dangerouslySetInnerHTML:{__html:e.disclaimer}})};function mo(){}function vo(){}const yo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wo={};function ko(e,n){return((n||wo).jsx?xo:yo).test(e)}const _o=/[ \t\n\f\r]/g;function Co(e){return""===e.replace(_o,"")}class So{constructor(e,n,t){this.normal=n,this.property=e,t&&(this.space=t)}}function Eo(e,n){const t={},o={};for(const n of e)Object.assign(t,n.property),Object.assign(o,n.normal);return new So(t,o,n)}function Io(e){return e.toLowerCase()}So.prototype.normal={},So.prototype.property={},So.prototype.space=void 0;class To{constructor(e,n){this.attribute=n,this.property=e}}To.prototype.attribute="",To.prototype.booleanish=!1,To.prototype.boolean=!1,To.prototype.commaOrSpaceSeparated=!1,To.prototype.commaSeparated=!1,To.prototype.defined=!1,To.prototype.mustUseProperty=!1,To.prototype.number=!1,To.prototype.overloadedBoolean=!1,To.prototype.property="",To.prototype.spaceSeparated=!1,To.prototype.space=void 0;let Ao=0;const Lo=zo(),No=zo(),Fo=zo(),Po=zo(),Mo=zo(),Do=zo(),Oo=zo();function zo(){return 2**++Ao}const Ro=Object.keys(o);class Bo extends To{constructor(e,n,t,r){let i=-1;if(super(e,n),jo(this,"space",r),"number"==typeof t)for(;++i<Ro.length;){const e=Ro[i];jo(this,Ro[i],(t&o[e])===o[e])}}}function jo(e,n,t){t&&(e[n]=t)}function Ho(e){const n={},t={};for(const[o,r]of Object.entries(e.properties)){const i=new Bo(o,e.transform(e.attributes||{},o),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(i.mustUseProperty=!0),n[o]=i,t[Io(o)]=o,t[Io(i.attribute)]=o}return new So(n,t,e.space)}Bo.prototype.defined=!0;const $o=Ho({properties:{ariaActiveDescendant:null,ariaAtomic:No,ariaAutoComplete:null,ariaBusy:No,ariaChecked:No,ariaColCount:Po,ariaColIndex:Po,ariaColSpan:Po,ariaControls:Mo,ariaCurrent:null,ariaDescribedBy:Mo,ariaDetails:null,ariaDisabled:No,ariaDropEffect:Mo,ariaErrorMessage:null,ariaExpanded:No,ariaFlowTo:Mo,ariaGrabbed:No,ariaHasPopup:null,ariaHidden:No,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Mo,ariaLevel:Po,ariaLive:null,ariaModal:No,ariaMultiLine:No,ariaMultiSelectable:No,ariaOrientation:null,ariaOwns:Mo,ariaPlaceholder:null,ariaPosInSet:Po,ariaPressed:No,ariaReadOnly:No,ariaRelevant:null,ariaRequired:No,ariaRoleDescription:Mo,ariaRowCount:Po,ariaRowIndex:Po,ariaRowSpan:Po,ariaSelected:No,ariaSetSize:Po,ariaSort:null,ariaValueMax:Po,ariaValueMin:Po,ariaValueNow:Po,ariaValueText:null,role:null},transform:(e,n)=>"role"===n?n:"aria-"+n.slice(4).toLowerCase()});function Uo(e,n){return n in e?e[n]:n}function Yo(e,n){return Uo(e,n.toLowerCase())}const Vo=Ho({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Do,acceptCharset:Mo,accessKey:Mo,action:null,allow:null,allowFullScreen:Lo,allowPaymentRequest:Lo,allowUserMedia:Lo,alt:null,as:null,async:Lo,autoCapitalize:null,autoComplete:Mo,autoFocus:Lo,autoPlay:Lo,blocking:Mo,capture:null,charSet:null,checked:Lo,cite:null,className:Mo,cols:Po,colSpan:null,content:null,contentEditable:No,controls:Lo,controlsList:Mo,coords:Po|Do,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Lo,defer:Lo,dir:null,dirName:null,disabled:Lo,download:Fo,draggable:No,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Lo,formTarget:null,headers:Mo,height:Po,hidden:Fo,high:Po,href:null,hrefLang:null,htmlFor:Mo,httpEquiv:Mo,id:null,imageSizes:null,imageSrcSet:null,inert:Lo,inputMode:null,integrity:null,is:null,isMap:Lo,itemId:null,itemProp:Mo,itemRef:Mo,itemScope:Lo,itemType:Mo,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Lo,low:Po,manifest:null,max:null,maxLength:Po,media:null,method:null,min:null,minLength:Po,multiple:Lo,muted:Lo,name:null,nonce:null,noModule:Lo,noValidate:Lo,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Lo,optimum:Po,pattern:null,ping:Mo,placeholder:null,playsInline:Lo,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Lo,referrerPolicy:null,rel:Mo,required:Lo,reversed:Lo,rows:Po,rowSpan:Po,sandbox:Mo,scope:null,scoped:Lo,seamless:Lo,selected:Lo,shadowRootClonable:Lo,shadowRootDelegatesFocus:Lo,shadowRootMode:null,shape:null,size:Po,sizes:null,slot:null,span:Po,spellCheck:No,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Po,step:null,style:null,tabIndex:Po,target:null,title:null,translate:null,type:null,typeMustMatch:Lo,useMap:null,value:No,width:Po,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Mo,axis:null,background:null,bgColor:null,border:Po,borderColor:null,bottomMargin:Po,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Lo,declare:Lo,event:null,face:null,frame:null,frameBorder:null,hSpace:Po,leftMargin:Po,link:null,longDesc:null,lowSrc:null,marginHeight:Po,marginWidth:Po,noResize:Lo,noHref:Lo,noShade:Lo,noWrap:Lo,object:null,profile:null,prompt:null,rev:null,rightMargin:Po,rules:null,scheme:null,scrolling:No,standby:null,summary:null,text:null,topMargin:Po,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Po,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Lo,disableRemotePlayback:Lo,prefix:null,property:null,results:Po,security:null,unselectable:null},space:"html",transform:Yo}),qo=Ho({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Oo,accentHeight:Po,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Po,amplitude:Po,arabicForm:null,ascent:Po,attributeName:null,attributeType:null,azimuth:Po,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Po,by:null,calcMode:null,capHeight:Po,className:Mo,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Po,diffuseConstant:Po,direction:null,display:null,dur:null,divisor:Po,dominantBaseline:null,download:Lo,dx:null,dy:null,edgeMode:null,editable:null,elevation:Po,enableBackground:null,end:null,event:null,exponent:Po,externalResourcesRequired:null,fill:null,fillOpacity:Po,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Do,g2:Do,glyphName:Do,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Po,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Po,horizOriginX:Po,horizOriginY:Po,id:null,ideographic:Po,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Po,k:Po,k1:Po,k2:Po,k3:Po,k4:Po,kernelMatrix:Oo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Po,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Po,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Po,overlineThickness:Po,paintOrder:null,panose1:null,path:null,pathLength:Po,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Mo,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Po,pointsAtY:Po,pointsAtZ:Po,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Oo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Oo,rev:Oo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Oo,requiredFeatures:Oo,requiredFonts:Oo,requiredFormats:Oo,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Po,specularExponent:Po,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Po,strikethroughThickness:Po,string:null,stroke:null,strokeDashArray:Oo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Po,strokeOpacity:Po,strokeWidth:null,style:null,surfaceScale:Po,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Oo,tabIndex:Po,tableValues:null,target:null,targetX:Po,targetY:Po,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Oo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Po,underlineThickness:Po,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Po,values:null,vAlphabetic:Po,vMathematical:Po,vectorEffect:null,vHanging:Po,vIdeographic:Po,version:null,vertAdvY:Po,vertOriginX:Po,vertOriginY:Po,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Po,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Uo}),Wo=Ho({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,n)=>"xlink:"+n.slice(5).toLowerCase()}),Zo=Ho({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Yo}),Go=Ho({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,n)=>"xml:"+n.slice(3).toLowerCase()}),Ko={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Qo=/[A-Z]/g,Xo=/-[a-z]/g,Jo=/^data[-\w.:]+$/i;function er(e){return"-"+e.toLowerCase()}function nr(e){return e.charAt(1).toUpperCase()}const tr=Eo([$o,Vo,Wo,Zo,Go],"html"),or=Eo([$o,qo,Wo,Zo,Go],"svg");var rr=t(229);const ir=sr("end"),ar=sr("start");function sr(e){return function(n){const t=n&&n.position&&n.position[e]||{};if("number"==typeof t.line&&t.line>0&&"number"==typeof t.column&&t.column>0)return{line:t.line,column:t.column,offset:"number"==typeof t.offset&&t.offset>-1?t.offset:void 0}}}function lr(e){return e&&"object"==typeof e?"position"in e||"type"in e?ur(e.position):"start"in e||"end"in e?ur(e):"line"in e||"column"in e?cr(e):"":""}function cr(e){return dr(e&&e.line)+":"+dr(e&&e.column)}function ur(e){return cr(e&&e.start)+"-"+cr(e&&e.end)}function dr(e){return e&&"number"==typeof e?e:1}class pr extends Error{constructor(e,n,t){super(),"string"==typeof n&&(t=n,n=void 0);let o="",r={},i=!1;if(n&&(r="line"in n&&"column"in n||"start"in n&&"end"in n?{place:n}:"type"in n?{ancestors:[n],place:n.position}:{...n}),"string"==typeof e?o=e:!r.cause&&e&&(i=!0,o=e.message,r.cause=e),!r.ruleId&&!r.source&&"string"==typeof t){const e=t.indexOf(":");-1===e?r.ruleId=t:(r.source=t.slice(0,e),r.ruleId=t.slice(e+1))}if(!r.place&&r.ancestors&&r.ancestors){const e=r.ancestors[r.ancestors.length-1];e&&(r.place=e.position)}const a=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=lr(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=i&&r.cause&&"string"==typeof r.cause.stack?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}pr.prototype.file="",pr.prototype.name="",pr.prototype.reason="",pr.prototype.message="",pr.prototype.stack="",pr.prototype.column=void 0,pr.prototype.line=void 0,pr.prototype.ancestors=void 0,pr.prototype.cause=void 0,pr.prototype.fatal=void 0,pr.prototype.place=void 0,pr.prototype.ruleId=void 0,pr.prototype.source=void 0;const hr={}.hasOwnProperty,fr=new Map,gr=/[A-Z]/g,br=new Set(["table","tbody","thead","tfoot","tr"]),mr=new Set(["td","th"]),vr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yr(e,n){if(!n||void 0===n.Fragment)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let o;if(n.development){if("function"!=typeof n.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=function(e,n){return t;function t(t,o,r,i){const a=Array.isArray(r.children),s=ar(t);return n(o,r,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(t,n.jsxDEV)}else{if("function"!=typeof n.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof n.jsxs)throw new TypeError("Expected `jsxs` in production options");o=function(e,n,t){return o;function o(e,o,r,i){const a=Array.isArray(r.children)?t:n;return i?a(o,r,i):a(o,r)}}(0,n.jsx,n.jsxs)}const r={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:o,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:!1!==n.passKeys,passNode:n.passNode||!1,schema:"svg"===n.space?or:tr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==n.tableCellAlignToStyle},i=xr(r,e,void 0);return i&&"string"!=typeof i?i:r.create(e,r.Fragment,{children:i||void 0},void 0)}function xr(e,n,t){return"element"===n.type?function(e,n,t){const o=e.schema;let r=o;"svg"===n.tagName.toLowerCase()&&"html"===o.space&&(r=or,e.schema=r);e.ancestors.push(n);const i=Sr(e,n.tagName,!1),a=function(e,n){const t={};let o,r;for(r in n.properties)if("children"!==r&&hr.call(n.properties,r)){const i=Cr(e,r,n.properties[r]);if(i){const[r,a]=i;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof a&&mr.has(n.tagName)?o=a:t[r]=a}}if(o){(t.style||(t.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=o}return t}(e,n);let s=_r(e,n);br.has(n.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(n=e)?"text"===n.type&&Co(n.value):Co(n));var n}));return wr(e,a,i,n),kr(a,s),e.ancestors.pop(),e.schema=o,e.create(n,i,a,t)}(e,n,t):"mdxFlowExpression"===n.type||"mdxTextExpression"===n.type?function(e,n){if(n.data&&n.data.estree&&e.evaluater){const t=n.data.estree.body[0];return t.type,e.evaluater.evaluateExpression(t.expression)}Er(e,n.position)}(e,n):"mdxJsxFlowElement"===n.type||"mdxJsxTextElement"===n.type?function(e,n,t){const o=e.schema;let r=o;"svg"===n.name&&"html"===o.space&&(r=or,e.schema=r);e.ancestors.push(n);const i=null===n.name?e.Fragment:Sr(e,n.name,!0),a=function(e,n){const t={};for(const o of n.attributes)if("mdxJsxExpressionAttribute"===o.type)if(o.data&&o.data.estree&&e.evaluater){const n=o.data.estree.body[0];mo(n.type);const r=n.expression;mo(r.type);const i=r.properties[0];mo(i.type),Object.assign(t,e.evaluater.evaluateExpression(i.argument))}else Er(e,n.position);else{const r=o.name;let i;if(o.value&&"object"==typeof o.value)if(o.value.data&&o.value.data.estree&&e.evaluater){const n=o.value.data.estree.body[0];mo(n.type),i=e.evaluater.evaluateExpression(n.expression)}else Er(e,n.position);else i=null===o.value||o.value;t[r]=i}return t}(e,n),s=_r(e,n);return wr(e,a,i,n),kr(a,s),e.ancestors.pop(),e.schema=o,e.create(n,i,a,t)}(e,n,t):"mdxjsEsm"===n.type?function(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Er(e,n.position)}(e,n):"root"===n.type?function(e,n,t){const o={};return kr(o,_r(e,n)),e.create(n,e.Fragment,o,t)}(e,n,t):"text"===n.type?function(e,n){return n.value}(0,n):void 0}function wr(e,n,t,o){"string"!=typeof t&&t!==e.Fragment&&e.passNode&&(n.node=o)}function kr(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function _r(e,n){const t=[];let o=-1;const r=e.passKeys?new Map:fr;for(;++o<n.children.length;){const i=n.children[o];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const n=r.get(e)||0;a=e+"-"+n,r.set(e,n+1)}}const s=xr(e,i,a);void 0!==s&&t.push(s)}return t}function Cr(e,n,t){const o=function(e,n){const t=Io(n);let o=n,r=To;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&"data"===t.slice(0,4)&&Jo.test(n)){if("-"===n.charAt(4)){const e=n.slice(5).replace(Xo,nr);o="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=n.slice(4);if(!Xo.test(e)){let t=e.replace(Qo,er);"-"!==t.charAt(0)&&(t="-"+t),n="data"+t}}r=Bo}return new r(o,n)}(e.schema,n);if(!(null==t||"number"==typeof t&&Number.isNaN(t))){if(Array.isArray(t)&&(t=o.commaSeparated?function(e,n){const t=n||{};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(t):t.join(" ").trim()),"style"===o.property){let n="object"==typeof t?t:function(e,n){try{return rr(n,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,o=new pr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=vr+"#cannot-parse-style-attribute",o}}(e,String(t));return"css"===e.stylePropertyNameCase&&(n=function(e){const n={};let t;for(t in e)hr.call(e,t)&&(n[Ir(t)]=e[t]);return n}(n)),["style",n]}return["react"===e.elementAttributeNameCase&&o.space?Ko[o.property]||o.property:o.attribute,t]}}function Sr(e,n,t){let o;if(t)if(n.includes(".")){const e=n.split(".");let t,r=-1;for(;++r<e.length;){const n=ko(e[r])?{type:"Identifier",name:e[r]}:{type:"Literal",value:e[r]};t=t?{type:"MemberExpression",object:t,property:n,computed:Boolean(r&&"Literal"===n.type),optional:!1}:n}o=t}else o=ko(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};else o={type:"Literal",value:n};if("Literal"===o.type){const n=o.value;return hr.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);Er(e)}function Er(e,n){const t=new pr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=vr+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Ir(e){let n=e.replace(gr,Tr);return"ms-"===n.slice(0,3)&&(n="-"+n),n}function Tr(e){return"-"+e.toLowerCase()}const Ar={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Lr={};function Nr(e,n){const t=n||Lr;return Fr(e,"boolean"!=typeof t.includeImageAlt||t.includeImageAlt,"boolean"!=typeof t.includeHtml||t.includeHtml)}function Fr(e,n,t){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||t?e.value:"";if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Pr(e.children,n,t)}return Array.isArray(e)?Pr(e,n,t):""}function Pr(e,n,t){const o=[];let r=-1;for(;++r<e.length;)o[r]=Fr(e[r],n,t);return o.join("")}const Mr=document.createElement("i");function Dr(e){const n="&"+e+";";Mr.innerHTML=n;const t=Mr.textContent;return(59!==t.charCodeAt(t.length-1)||"semi"===e)&&(t!==n&&t)}function Or(e,n,t,o){const r=e.length;let i,a=0;if(n=n<0?-n>r?0:r+n:n>r?r:n,t=t>0?t:0,o.length<1e4)i=Array.from(o),i.unshift(n,t),e.splice(...i);else for(t&&e.splice(n,t);a<o.length;)i=o.slice(a,a+1e4),i.unshift(n,0),e.splice(...i),a+=1e4,n+=1e4}function zr(e,n){return e.length>0?(Or(e,e.length,0,n),e):n}const Rr={}.hasOwnProperty;function Br(e){const n={};let t=-1;for(;++t<e.length;)jr(n,e[t]);return n}function jr(e,n){let t;for(t in n){const o=(Rr.call(e,t)?e[t]:void 0)||(e[t]={}),r=n[t];let i;if(r)for(i in r){Rr.call(o,i)||(o[i]=[]);const e=r[i];Hr(o[i],Array.isArray(e)?e:e?[e]:[])}}}function Hr(e,n){let t=-1;const o=[];for(;++t<n.length;)("after"===n[t].add?e:o).push(n[t]);Or(e,0,0,o)}function $r(e,n){const t=Number.parseInt(e,n);return t<9||11===t||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||!(65535&~t)||65534==(65535&t)||t>1114111?"�":String.fromCodePoint(t)}function Ur(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yr=ti(/[A-Za-z]/),Vr=ti(/[\dA-Za-z]/),qr=ti(/[#-'*+\--9=?A-Z^-~]/);function Wr(e){return null!==e&&(e<32||127===e)}const Zr=ti(/\d/),Gr=ti(/[\dA-Fa-f]/),Kr=ti(/[!-/:-@[-`{-~]/);function Qr(e){return null!==e&&e<-2}function Xr(e){return null!==e&&(e<0||32===e)}function Jr(e){return-2===e||-1===e||32===e}const ei=ti(/\p{P}|\p{S}/u),ni=ti(/\s/);function ti(e){return function(n){return null!==n&&n>-1&&e.test(String.fromCharCode(n))}}function oi(e){const n=[];let t=-1,o=0,r=0;for(;++t<e.length;){const i=e.charCodeAt(t);let a="";if(37===i&&Vr(e.charCodeAt(t+1))&&Vr(e.charCodeAt(t+2)))r=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const n=e.charCodeAt(t+1);i<56320&&n>56319&&n<57344?(a=String.fromCharCode(i,n),r=1):a="�"}else a=String.fromCharCode(i);a&&(n.push(e.slice(o,t),encodeURIComponent(a)),o=t+r+1,a=""),r&&(t+=r,r=0)}return n.join("")+e.slice(o)}function ri(e,n,t,o){const r=o?o-1:Number.POSITIVE_INFINITY;let i=0;return function(o){if(Jr(o))return e.enter(t),a(o);return n(o)};function a(o){return Jr(o)&&i++<r?(e.consume(o),a):(e.exit(t),n(o))}}const ii={tokenize:function(e){const n=e.attempt(this.parser.constructs.contentInitial,function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ri(e,n,"linePrefix")},function(n){return e.enter("paragraph"),o(n)});let t;return n;function o(n){const o=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=o),t=o,r(n)}function r(n){return null===n?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(n)):Qr(n)?(e.consume(n),e.exit("chunkText"),o):(e.consume(n),r)}}};const ai={tokenize:function(e){const n=this,t=[];let o,r,i,a=0;return s;function s(o){if(a<t.length){const r=t[a];return n.containerState=r[1],e.attempt(r[0].continuation,l,c)(o)}return c(o)}function l(e){if(a++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&v();const t=n.events.length;let r,i=t;for(;i--;)if("exit"===n.events[i][0]&&"chunkFlow"===n.events[i][1].type){r=n.events[i][1].end;break}m(a);let s=t;for(;s<n.events.length;)n.events[s][1].end={...r},s++;return Or(n.events,i+1,0,n.events.slice(t)),n.events.length=s,c(e)}return s(e)}function c(r){if(a===t.length){if(!o)return p(r);if(o.currentConstruct&&o.currentConstruct.concrete)return f(r);n.interrupt=Boolean(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(si,u,d)(r)}function u(e){return o&&v(),m(a),p(e)}function d(e){return n.parser.lazy[n.now().line]=a!==t.length,i=n.now().offset,f(e)}function p(t){return n.containerState={},e.attempt(si,h,f)(t)}function h(e){return a++,t.push([n.currentConstruct,n.containerState]),p(e)}function f(t){return null===t?(o&&v(),m(0),void e.consume(t)):(o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:r}),g(t))}function g(t){return null===t?(b(e.exit("chunkFlow"),!0),m(0),void e.consume(t)):Qr(t)?(e.consume(t),b(e.exit("chunkFlow")),a=0,n.interrupt=void 0,s):(e.consume(t),g)}function b(e,t){const s=n.sliceStream(e);if(t&&s.push(null),e.previous=r,r&&(r.next=e),r=e,o.defineSkip(e.start),o.write(s),n.parser.lazy[e.start.line]){let e=o.events.length;for(;e--;)if(o.events[e][1].start.offset<i&&(!o.events[e][1].end||o.events[e][1].end.offset>i))return;const t=n.events.length;let r,s,l=t;for(;l--;)if("exit"===n.events[l][0]&&"chunkFlow"===n.events[l][1].type){if(r){s=n.events[l][1].end;break}r=!0}for(m(a),e=t;e<n.events.length;)n.events[e][1].end={...s},e++;Or(n.events,l+1,0,n.events.slice(t)),n.events.length=e}}function m(o){let r=t.length;for(;r-- >o;){const o=t[r];n.containerState=o[1],o[0].exit.call(n,e)}t.length=o}function v(){o.write([null]),r=void 0,o=void 0,n.containerState._closeFlow=void 0}}},si={tokenize:function(e,n,t){return ri(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function li(e){return null===e||Xr(e)||ni(e)?1:ei(e)?2:void 0}function ci(e,n,t){const o=[];let r=-1;for(;++r<e.length;){const i=e[r].resolveAll;i&&!o.includes(i)&&(n=i(n,t),o.push(i))}return n}const ui={name:"attention",resolveAll:function(e,n){let t,o,r,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(t=u;t--;)if("exit"===e[t][0]&&"attentionSequence"===e[t][1].type&&e[t][1]._open&&n.sliceSerialize(e[t][1]).charCodeAt(0)===n.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[t][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[t][1].end.offset-e[t][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[t][1].end.offset-e[t][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[t][1].end},p={...e[u][1].start};di(d,-s),di(p,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[t][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},r={type:s>1?"strongText":"emphasisText",start:{...e[t][1].end},end:{...e[u][1].start}},o={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[t][1].end={...i.start},e[u][1].start={...a.end},l=[],e[t][1].end.offset-e[t][1].start.offset&&(l=zr(l,[["enter",e[t][1],n],["exit",e[t][1],n]])),l=zr(l,[["enter",o,n],["enter",i,n],["exit",i,n],["enter",r,n]]),l=zr(l,ci(n.parser.constructs.insideSpan.null,e.slice(t+1,u),n)),l=zr(l,[["exit",r,n],["enter",a,n],["exit",a,n],["exit",o,n]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=zr(l,[["enter",e[u][1],n],["exit",e[u][1],n]])):c=0,Or(e,t-1,u-t+3,l),u=t+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,n){const t=this.parser.constructs.attentionMarkers.null,o=this.previous,r=li(o);let i;return function(n){return i=n,e.enter("attentionSequence"),a(n)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=li(s),u=!c||2===c&&r||t.includes(s),d=!r||2===r&&c||t.includes(o);return l._open=Boolean(42===i?u:u&&(r||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),n(s)}}};function di(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const pi={name:"autolink",tokenize:function(e,n,t){let o=0;return function(n){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),r};function r(n){return Yr(n)?(e.consume(n),i):64===n?t(n):l(n)}function i(e){return 43===e||45===e||46===e||Vr(e)?(o=1,a(e)):l(e)}function a(n){return 58===n?(e.consume(n),o=0,s):(43===n||45===n||46===n||Vr(n))&&o++<32?(e.consume(n),a):(o=0,l(n))}function s(o){return 62===o?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(o),e.exit("autolinkMarker"),e.exit("autolink"),n):null===o||32===o||60===o||Wr(o)?t(o):(e.consume(o),s)}function l(n){return 64===n?(e.consume(n),c):qr(n)?(e.consume(n),l):t(n)}function c(e){return Vr(e)?u(e):t(e)}function u(t){return 46===t?(e.consume(t),o=0,c):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.exit("autolink"),n):d(t)}function d(n){if((45===n||Vr(n))&&o++<63){const t=45===n?d:u;return e.consume(n),t}return t(n)}}};const hi={partial:!0,tokenize:function(e,n,t){return function(n){return Jr(n)?ri(e,o,"linePrefix")(n):o(n)};function o(e){return null===e||Qr(e)?n(e):t(e)}}};const fi={continuation:{tokenize:function(e,n,t){const o=this;return function(n){if(Jr(n))return ri(e,r,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n);return r(n)};function r(o){return e.attempt(fi,n,t)(o)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,n,t){const o=this;return function(n){if(62===n){const t=o.containerState;return t.open||(e.enter("blockQuote",{_container:!0}),t.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(n),e.exit("blockQuoteMarker"),r}return t(n)};function r(t){return Jr(t)?(e.enter("blockQuotePrefixWhitespace"),e.consume(t),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(t))}}};const gi={name:"characterEscape",tokenize:function(e,n,t){return function(n){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(n),e.exit("escapeMarker"),o};function o(o){return Kr(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}};const bi={name:"characterReference",tokenize:function(e,n,t){const o=this;let r,i,a=0;return function(n){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(n),e.exit("characterReferenceMarker"),s};function s(n){return 35===n?(e.enter("characterReferenceMarkerNumeric"),e.consume(n),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,i=Vr,c(n))}function l(n){return 88===n||120===n?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(n),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=Gr,c):(e.enter("characterReferenceValue"),r=7,i=Zr,c(n))}function c(s){if(59===s&&a){const r=e.exit("characterReferenceValue");return i!==Vr||Dr(o.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),n):t(s)}return i(s)&&a++<r?(e.consume(s),c):t(s)}}};const mi={partial:!0,tokenize:function(e,n,t){const o=this;return function(n){if(null===n)return t(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r};function r(e){return o.parser.lazy[o.now().line]?t(e):n(e)}}},vi={concrete:!0,name:"codeFenced",tokenize:function(e,n,t){const o=this,r={partial:!0,tokenize:function(e,n,t){let r=0;return a;function a(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),l}function l(n){return e.enter("codeFencedFence"),Jr(n)?ri(e,c,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):c(n)}function c(n){return n===i?(e.enter("codeFencedFenceSequence"),u(n)):t(n)}function u(n){return n===i?(r++,e.consume(n),u):r>=s?(e.exit("codeFencedFenceSequence"),Jr(n)?ri(e,d,"whitespace")(n):d(n)):t(n)}function d(o){return null===o||Qr(o)?(e.exit("codeFencedFence"),n(o)):t(o)}}};let i,a=0,s=0;return function(n){return function(n){const t=o.events[o.events.length-1];return a=t&&"linePrefix"===t[1].type?t[2].sliceSerialize(t[1],!0).length:0,i=n,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(n)}(n)};function l(n){return n===i?(s++,e.consume(n),l):s<3?t(n):(e.exit("codeFencedFenceSequence"),Jr(n)?ri(e,c,"whitespace")(n):c(n))}function c(t){return null===t||Qr(t)?(e.exit("codeFencedFence"),o.interrupt?n(t):e.check(mi,h,v)(t)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(t))}function u(n){return null===n||Qr(n)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(n)):Jr(n)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ri(e,d,"whitespace")(n)):96===n&&n===i?t(n):(e.consume(n),u)}function d(n){return null===n||Qr(n)?c(n):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(n))}function p(n){return null===n||Qr(n)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(n)):96===n&&n===i?t(n):(e.consume(n),p)}function h(n){return e.attempt(r,v,f)(n)}function f(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),g}function g(n){return a>0&&Jr(n)?ri(e,b,"linePrefix",a+1)(n):b(n)}function b(n){return null===n||Qr(n)?e.check(mi,h,v)(n):(e.enter("codeFlowValue"),m(n))}function m(n){return null===n||Qr(n)?(e.exit("codeFlowValue"),b(n)):(e.consume(n),m)}function v(t){return e.exit("codeFenced"),n(t)}}};const yi={name:"codeIndented",tokenize:function(e,n,t){const o=this;return function(n){return e.enter("codeIndented"),ri(e,r,"linePrefix",5)(n)};function r(e){const n=o.events[o.events.length-1];return n&&"linePrefix"===n[1].type&&n[2].sliceSerialize(n[1],!0).length>=4?i(e):t(e)}function i(n){return null===n?s(n):Qr(n)?e.attempt(xi,i,s)(n):(e.enter("codeFlowValue"),a(n))}function a(n){return null===n||Qr(n)?(e.exit("codeFlowValue"),i(n)):(e.consume(n),a)}function s(t){return e.exit("codeIndented"),n(t)}}},xi={partial:!0,tokenize:function(e,n,t){const o=this;return r;function r(n){return o.parser.lazy[o.now().line]?t(n):Qr(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r):ri(e,i,"linePrefix",5)(n)}function i(e){const i=o.events[o.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?n(e):Qr(e)?r(e):t(e)}}};const wi={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let n,t,o=e.length-4,r=3;if(!("lineEnding"!==e[r][1].type&&"space"!==e[r][1].type||"lineEnding"!==e[o][1].type&&"space"!==e[o][1].type))for(n=r;++n<o;)if("codeTextData"===e[n][1].type){e[r][1].type="codeTextPadding",e[o][1].type="codeTextPadding",r+=2,o-=2;break}n=r-1,o++;for(;++n<=o;)void 0===t?n!==o&&"lineEnding"!==e[n][1].type&&(t=n):n!==o&&"lineEnding"!==e[n][1].type||(e[t][1].type="codeTextData",n!==t+2&&(e[t][1].end=e[n-1][1].end,e.splice(t+2,n-t-2),o-=n-t-2,n=t+2),t=void 0);return e},tokenize:function(e,n,t){let o,r,i=0;return function(n){return e.enter("codeText"),e.enter("codeTextSequence"),a(n)};function a(n){return 96===n?(e.consume(n),i++,a):(e.exit("codeTextSequence"),s(n))}function s(n){return null===n?t(n):32===n?(e.enter("space"),e.consume(n),e.exit("space"),s):96===n?(r=e.enter("codeTextSequence"),o=0,c(n)):Qr(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(n))}function l(n){return null===n||32===n||96===n||Qr(n)?(e.exit("codeTextData"),s(n)):(e.consume(n),l)}function c(t){return 96===t?(e.consume(t),o++,c):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(t)):(r.type="codeTextData",l(t))}}};class ki{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const t=null==n?Number.POSITIVE_INFINITY:n;return t<this.left.length?this.left.slice(e,t):e>this.left.length?this.right.slice(this.right.length-t+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-t+this.left.length).reverse())}splice(e,n,t){const o=n||0;this.setCursor(Math.trunc(e));const r=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return t&&_i(this.left,t),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),_i(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),_i(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);_i(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);_i(this.left,n.reverse())}}}function _i(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Ci(e){const n={};let t,o,r,i,a,s,l,c=-1;const u=new ki(e);for(;++c<u.length;){for(;c in n;)c=n[c];if(t=u.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=t[1]._tokenizer.events,r=0,r<s.length&&"lineEndingBlank"===s[r][1].type&&(r+=2),r<s.length&&"content"===s[r][1].type))for(;++r<s.length&&"content"!==s[r][1].type;)"chunkText"===s[r][1].type&&(s[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(n,Si(u,c)),c=n[c],l=!0);else if(t[1]._container){for(r=c,o=void 0;r--;)if(i=u.get(r),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(o&&(u.get(o)[1].type="lineEndingBlank"),i[1].type="lineEnding",o=r);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;o&&(t[1].end={...u.get(o)[1].start},a=u.slice(o,c),a.unshift(t),u.splice(o,c-o+1,a))}}return Or(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Si(e,n){const t=e.get(n)[1],o=e.get(n)[2];let r=n-1;const i=[];let a=t._tokenizer;a||(a=o.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,p=-1,h=t,f=0,g=0;const b=[g];for(;h;){for(;e.get(++r)[1]!==h;);i.push(r),h._tokenizer||(u=o.sliceStream(h),h.next||u.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=t;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(g=p+1,b.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),p=b.length;p--;){const n=s.slice(b[p],b[p+1]),t=i.pop();l.push([t,t+n.length-1]),e.splice(t,2,n)}for(l.reverse(),p=-1;++p<l.length;)c[f+l[p][0]]=f+l[p][1],f+=l[p][1]-l[p][0]-1;return c}const Ei={resolve:function(e){return Ci(e),e},tokenize:function(e,n){let t;return function(n){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),o(n)};function o(n){return null===n?r(n):Qr(n)?e.check(Ii,i,r)(n):(e.consume(n),o)}function r(t){return e.exit("chunkContent"),e.exit("content"),n(t)}function i(n){return e.consume(n),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,o}}},Ii={partial:!0,tokenize:function(e,n,t){const o=this;return function(n){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ri(e,r,"linePrefix")};function r(r){if(null===r||Qr(r))return t(r);const i=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?n(r):e.interrupt(o.parser.constructs.flow,t,n)(r)}}};function Ti(e,n,t,o,r,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(n){if(60===n)return e.enter(o),e.enter(r),e.enter(i),e.consume(n),e.exit(i),d;if(null===n||32===n||41===n||Wr(n))return t(n);return e.enter(o),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n)};function d(t){return 62===t?(e.enter(i),e.consume(t),e.exit(i),e.exit(r),e.exit(o),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(t))}function p(n){return 62===n?(e.exit("chunkString"),e.exit(s),d(n)):null===n||60===n||Qr(n)?t(n):(e.consume(n),92===n?h:p)}function h(n){return 60===n||62===n||92===n?(e.consume(n),p):p(n)}function f(r){return u||null!==r&&41!==r&&!Xr(r)?u<c&&40===r?(e.consume(r),u++,f):41===r?(e.consume(r),u--,f):null===r||32===r||40===r||Wr(r)?t(r):(e.consume(r),92===r?g:f):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(o),n(r))}function g(n){return 40===n||41===n||92===n?(e.consume(n),f):f(n)}}function Ai(e,n,t,o,r,i){const a=this;let s,l=0;return function(n){return e.enter(o),e.enter(r),e.consume(n),e.exit(r),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?t(d):93===d?(e.exit(i),e.enter(r),e.consume(d),e.exit(r),e.exit(o),n):Qr(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(n){return null===n||91===n||93===n||Qr(n)||l++>999?(e.exit("chunkString"),c(n)):(e.consume(n),s||(s=!Jr(n)),92===n?d:u)}function d(n){return 91===n||92===n||93===n?(e.consume(n),l++,u):u(n)}}function Li(e,n,t,o,r,i){let a;return function(n){if(34===n||39===n||40===n)return e.enter(o),e.enter(r),e.consume(n),e.exit(r),a=40===n?41:n,s;return t(n)};function s(t){return t===a?(e.enter(r),e.consume(t),e.exit(r),e.exit(o),n):(e.enter(i),l(t))}function l(n){return n===a?(e.exit(i),s(a)):null===n?t(n):Qr(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ri(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(n))}function c(n){return n===a||null===n||Qr(n)?(e.exit("chunkString"),l(n)):(e.consume(n),92===n?u:c)}function u(n){return n===a||92===n?(e.consume(n),c):c(n)}}function Ni(e,n){let t;return function o(r){if(Qr(r))return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,o;if(Jr(r))return ri(e,o,t?"linePrefix":"lineSuffix")(r);return n(r)}}const Fi={name:"definition",tokenize:function(e,n,t){const o=this;let r;return function(n){return e.enter("definition"),function(n){return Ai.call(o,e,i,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(n)}(n)};function i(n){return r=Ur(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),58===n?(e.enter("definitionMarker"),e.consume(n),e.exit("definitionMarker"),a):t(n)}function a(n){return Xr(n)?Ni(e,s)(n):s(n)}function s(n){return Ti(e,l,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(n)}function l(n){return e.attempt(Pi,c,c)(n)}function c(n){return Jr(n)?ri(e,u,"whitespace")(n):u(n)}function u(i){return null===i||Qr(i)?(e.exit("definition"),o.parser.defined.push(r),n(i)):t(i)}}},Pi={partial:!0,tokenize:function(e,n,t){return function(n){return Xr(n)?Ni(e,o)(n):t(n)};function o(n){return Li(e,r,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(n)}function r(n){return Jr(n)?ri(e,i,"whitespace")(n):i(n)}function i(e){return null===e||Qr(e)?n(e):t(e)}}};const Mi={name:"hardBreakEscape",tokenize:function(e,n,t){return function(n){return e.enter("hardBreakEscape"),e.consume(n),o};function o(o){return Qr(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}};const Di={name:"headingAtx",resolve:function(e,n){let t,o,r=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);r-2>i&&"whitespace"===e[r][1].type&&(r-=2);"atxHeadingSequence"===e[r][1].type&&(i===r-1||r-4>i&&"whitespace"===e[r-2][1].type)&&(r-=i+1===r?2:4);r>i&&(t={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},o={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},Or(e,i,r-i+1,[["enter",t,n],["enter",o,n],["exit",o,n],["exit",t,n]]));return e},tokenize:function(e,n,t){let o=0;return function(n){return e.enter("atxHeading"),function(n){return e.enter("atxHeadingSequence"),r(n)}(n)};function r(n){return 35===n&&o++<6?(e.consume(n),r):null===n||Xr(n)?(e.exit("atxHeadingSequence"),i(n)):t(n)}function i(t){return 35===t?(e.enter("atxHeadingSequence"),a(t)):null===t||Qr(t)?(e.exit("atxHeading"),n(t)):Jr(t)?ri(e,i,"whitespace")(t):(e.enter("atxHeadingText"),s(t))}function a(n){return 35===n?(e.consume(n),a):(e.exit("atxHeadingSequence"),i(n))}function s(n){return null===n||35===n||Xr(n)?(e.exit("atxHeadingText"),i(n)):(e.consume(n),s)}}};const Oi=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zi=["pre","script","style","textarea"],Ri={concrete:!0,name:"htmlFlow",resolveTo:function(e){let n=e.length;for(;n--&&("enter"!==e[n][0]||"htmlFlow"!==e[n][1].type););n>1&&"linePrefix"===e[n-2][1].type&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2));return e},tokenize:function(e,n,t){const o=this;let r,i,a,s,l;return function(n){return function(n){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c}(n)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,h):63===s?(e.consume(s),r=3,o.interrupt?n:M):Yr(s)?(e.consume(s),a=String.fromCharCode(s),f):t(s)}function u(i){return 45===i?(e.consume(i),r=2,d):91===i?(e.consume(i),r=5,s=0,p):Yr(i)?(e.consume(i),r=4,o.interrupt?n:M):t(i)}function d(r){return 45===r?(e.consume(r),o.interrupt?n:M):t(r)}function p(r){const i="CDATA[";return r===i.charCodeAt(s++)?(e.consume(r),6===s?o.interrupt?n:E:p):t(r)}function h(n){return Yr(n)?(e.consume(n),a=String.fromCharCode(n),f):t(n)}function f(s){if(null===s||47===s||62===s||Xr(s)){const l=47===s,c=a.toLowerCase();return l||i||!zi.includes(c)?Oi.includes(a.toLowerCase())?(r=6,l?(e.consume(s),g):o.interrupt?n(s):E(s)):(r=7,o.interrupt&&!o.parser.lazy[o.now().line]?t(s):i?b(s):m(s)):(r=1,o.interrupt?n(s):E(s))}return 45===s||Vr(s)?(e.consume(s),a+=String.fromCharCode(s),f):t(s)}function g(r){return 62===r?(e.consume(r),o.interrupt?n:E):t(r)}function b(n){return Jr(n)?(e.consume(n),b):C(n)}function m(n){return 47===n?(e.consume(n),C):58===n||95===n||Yr(n)?(e.consume(n),v):Jr(n)?(e.consume(n),m):C(n)}function v(n){return 45===n||46===n||58===n||95===n||Vr(n)?(e.consume(n),v):y(n)}function y(n){return 61===n?(e.consume(n),x):Jr(n)?(e.consume(n),y):m(n)}function x(n){return null===n||60===n||61===n||62===n||96===n?t(n):34===n||39===n?(e.consume(n),l=n,w):Jr(n)?(e.consume(n),x):k(n)}function w(n){return n===l?(e.consume(n),l=null,_):null===n||Qr(n)?t(n):(e.consume(n),w)}function k(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||Xr(n)?y(n):(e.consume(n),k)}function _(e){return 47===e||62===e||Jr(e)?m(e):t(e)}function C(n){return 62===n?(e.consume(n),S):t(n)}function S(n){return null===n||Qr(n)?E(n):Jr(n)?(e.consume(n),S):t(n)}function E(n){return 45===n&&2===r?(e.consume(n),L):60===n&&1===r?(e.consume(n),N):62===n&&4===r?(e.consume(n),D):63===n&&3===r?(e.consume(n),M):93===n&&5===r?(e.consume(n),P):!Qr(n)||6!==r&&7!==r?null===n||Qr(n)?(e.exit("htmlFlowData"),I(n)):(e.consume(n),E):(e.exit("htmlFlowData"),e.check(Bi,O,I)(n))}function I(n){return e.check(ji,T,O)(n)}function T(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),A}function A(n){return null===n||Qr(n)?I(n):(e.enter("htmlFlowData"),E(n))}function L(n){return 45===n?(e.consume(n),M):E(n)}function N(n){return 47===n?(e.consume(n),a="",F):E(n)}function F(n){if(62===n){const t=a.toLowerCase();return zi.includes(t)?(e.consume(n),D):E(n)}return Yr(n)&&a.length<8?(e.consume(n),a+=String.fromCharCode(n),F):E(n)}function P(n){return 93===n?(e.consume(n),M):E(n)}function M(n){return 62===n?(e.consume(n),D):45===n&&2===r?(e.consume(n),M):E(n)}function D(n){return null===n||Qr(n)?(e.exit("htmlFlowData"),O(n)):(e.consume(n),D)}function O(t){return e.exit("htmlFlow"),n(t)}}},Bi={partial:!0,tokenize:function(e,n,t){return function(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(hi,n,t)}}},ji={partial:!0,tokenize:function(e,n,t){const o=this;return function(n){if(Qr(n))return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r;return t(n)};function r(e){return o.parser.lazy[o.now().line]?t(e):n(e)}}};const Hi={name:"htmlText",tokenize:function(e,n,t){const o=this;let r,i,a;return function(n){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(n),s};function s(n){return 33===n?(e.consume(n),l):47===n?(e.consume(n),x):63===n?(e.consume(n),v):Yr(n)?(e.consume(n),_):t(n)}function l(n){return 45===n?(e.consume(n),c):91===n?(e.consume(n),i=0,h):Yr(n)?(e.consume(n),m):t(n)}function c(n){return 45===n?(e.consume(n),p):t(n)}function u(n){return null===n?t(n):45===n?(e.consume(n),d):Qr(n)?(a=u,F(n)):(e.consume(n),u)}function d(n){return 45===n?(e.consume(n),p):u(n)}function p(e){return 62===e?N(e):45===e?d(e):u(e)}function h(n){const o="CDATA[";return n===o.charCodeAt(i++)?(e.consume(n),6===i?f:h):t(n)}function f(n){return null===n?t(n):93===n?(e.consume(n),g):Qr(n)?(a=f,F(n)):(e.consume(n),f)}function g(n){return 93===n?(e.consume(n),b):f(n)}function b(n){return 62===n?N(n):93===n?(e.consume(n),b):f(n)}function m(n){return null===n||62===n?N(n):Qr(n)?(a=m,F(n)):(e.consume(n),m)}function v(n){return null===n?t(n):63===n?(e.consume(n),y):Qr(n)?(a=v,F(n)):(e.consume(n),v)}function y(e){return 62===e?N(e):v(e)}function x(n){return Yr(n)?(e.consume(n),w):t(n)}function w(n){return 45===n||Vr(n)?(e.consume(n),w):k(n)}function k(n){return Qr(n)?(a=k,F(n)):Jr(n)?(e.consume(n),k):N(n)}function _(n){return 45===n||Vr(n)?(e.consume(n),_):47===n||62===n||Xr(n)?C(n):t(n)}function C(n){return 47===n?(e.consume(n),N):58===n||95===n||Yr(n)?(e.consume(n),S):Qr(n)?(a=C,F(n)):Jr(n)?(e.consume(n),C):N(n)}function S(n){return 45===n||46===n||58===n||95===n||Vr(n)?(e.consume(n),S):E(n)}function E(n){return 61===n?(e.consume(n),I):Qr(n)?(a=E,F(n)):Jr(n)?(e.consume(n),E):C(n)}function I(n){return null===n||60===n||61===n||62===n||96===n?t(n):34===n||39===n?(e.consume(n),r=n,T):Qr(n)?(a=I,F(n)):Jr(n)?(e.consume(n),I):(e.consume(n),A)}function T(n){return n===r?(e.consume(n),r=void 0,L):null===n?t(n):Qr(n)?(a=T,F(n)):(e.consume(n),T)}function A(n){return null===n||34===n||39===n||60===n||61===n||96===n?t(n):47===n||62===n||Xr(n)?C(n):(e.consume(n),A)}function L(e){return 47===e||62===e||Xr(e)?C(e):t(e)}function N(o){return 62===o?(e.consume(o),e.exit("htmlTextData"),e.exit("htmlText"),n):t(o)}function F(n){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),P}function P(n){return Jr(n)?ri(e,M,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):M(n)}function M(n){return e.enter("htmlTextData"),a(n)}}};const $i={name:"labelEnd",resolveAll:function(e){let n=-1;const t=[];for(;++n<e.length;){const o=e[n][1];if(t.push(e[n]),"labelImage"===o.type||"labelLink"===o.type||"labelEnd"===o.type){const e="labelImage"===o.type?4:2;o.type="data",n+=e}}e.length!==t.length&&Or(e,0,e.length,t);return e},resolveTo:function(e,n){let t,o,r,i,a=e.length,s=0;for(;a--;)if(t=e[a][1],o){if("link"===t.type||"labelLink"===t.type&&t._inactive)break;"enter"===e[a][0]&&"labelLink"===t.type&&(t._inactive=!0)}else if(r){if("enter"===e[a][0]&&("labelImage"===t.type||"labelLink"===t.type)&&!t._balanced&&(o=a,"labelLink"!==t.type)){s=2;break}}else"labelEnd"===t.type&&(r=a);const l={type:"labelLink"===e[o][1].type?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[r][1].end}},u={type:"labelText",start:{...e[o+s+2][1].end},end:{...e[r-2][1].start}};return i=[["enter",l,n],["enter",c,n]],i=zr(i,e.slice(o+1,o+s+3)),i=zr(i,[["enter",u,n]]),i=zr(i,ci(n.parser.constructs.insideSpan.null,e.slice(o+s+4,r-3),n)),i=zr(i,[["exit",u,n],e[r-2],e[r-1],["exit",c,n]]),i=zr(i,e.slice(r+1)),i=zr(i,[["exit",l,n]]),Or(e,o,e.length,i),e},tokenize:function(e,n,t){const o=this;let r,i,a=o.events.length;for(;a--;)if(("labelImage"===o.events[a][1].type||"labelLink"===o.events[a][1].type)&&!o.events[a][1]._balanced){r=o.events[a][1];break}return function(n){if(!r)return t(n);if(r._inactive)return u(n);return i=o.parser.defined.includes(Ur(o.sliceSerialize({start:r.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(n),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(n){return 40===n?e.attempt(Ui,c,i?c:u)(n):91===n?e.attempt(Yi,c,i?l:u)(n):i?c(n):u(n)}function l(n){return e.attempt(Vi,c,u)(n)}function c(e){return n(e)}function u(e){return r._balanced=!0,t(e)}}},Ui={tokenize:function(e,n,t){return function(n){return e.enter("resource"),e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),o};function o(n){return Xr(n)?Ni(e,r)(n):r(n)}function r(n){return 41===n?c(n):Ti(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(n)}function i(n){return Xr(n)?Ni(e,s)(n):c(n)}function a(e){return t(e)}function s(n){return 34===n||39===n||40===n?Li(e,l,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(n):c(n)}function l(n){return Xr(n)?Ni(e,c)(n):c(n)}function c(o){return 41===o?(e.enter("resourceMarker"),e.consume(o),e.exit("resourceMarker"),e.exit("resource"),n):t(o)}}},Yi={tokenize:function(e,n,t){const o=this;return function(n){return Ai.call(o,e,r,i,"reference","referenceMarker","referenceString")(n)};function r(e){return o.parser.defined.includes(Ur(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?n(e):t(e)}function i(e){return t(e)}}},Vi={tokenize:function(e,n,t){return function(n){return e.enter("reference"),e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),o};function o(o){return 93===o?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}};const qi={name:"labelStartImage",resolveAll:$i.resolveAll,tokenize:function(e,n,t){const o=this;return function(n){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(n),e.exit("labelImageMarker"),r};function r(n){return 91===n?(e.enter("labelMarker"),e.consume(n),e.exit("labelMarker"),e.exit("labelImage"),i):t(n)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in o.parser.constructs?t(e):n(e)}}};const Wi={name:"labelStartLink",resolveAll:$i.resolveAll,tokenize:function(e,n,t){const o=this;return function(n){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(n),e.exit("labelMarker"),e.exit("labelLink"),r};function r(e){return 94===e&&"_hiddenFootnoteSupport"in o.parser.constructs?t(e):n(e)}}};const Zi={name:"lineEnding",tokenize:function(e,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ri(e,n,"linePrefix")}}};const Gi={name:"thematicBreak",tokenize:function(e,n,t){let o,r=0;return function(n){return e.enter("thematicBreak"),function(e){return o=e,i(e)}(n)};function i(i){return i===o?(e.enter("thematicBreakSequence"),a(i)):r>=3&&(null===i||Qr(i))?(e.exit("thematicBreak"),n(i)):t(i)}function a(n){return n===o?(e.consume(n),r++,a):(e.exit("thematicBreakSequence"),Jr(n)?ri(e,i,"whitespace")(n):i(n))}}};const Ki={continuation:{tokenize:function(e,n,t){const o=this;return o.containerState._closeFlow=void 0,e.check(hi,r,i);function r(t){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,ri(e,n,"listItemIndent",o.containerState.size+1)(t)}function i(t){return o.containerState.furtherBlankLines||!Jr(t)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,a(t)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Xi,n,a)(t))}function a(r){return o.containerState._closeFlow=!0,o.interrupt=void 0,ri(e,e.attempt(Ki,n,t),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,n,t){const o=this,r=o.events[o.events.length-1];let i=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,a=0;return function(n){const r=o.containerState.type||(42===n||43===n||45===n?"listUnordered":"listOrdered");if("listUnordered"===r?!o.containerState.marker||n===o.containerState.marker:Zr(n)){if(o.containerState.type||(o.containerState.type=r,e.enter(r,{_container:!0})),"listUnordered"===r)return e.enter("listItemPrefix"),42===n||45===n?e.check(Gi,t,l)(n):l(n);if(!o.interrupt||49===n)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(n)}return t(n)};function s(n){return Zr(n)&&++a<10?(e.consume(n),s):(!o.interrupt||a<2)&&(o.containerState.marker?n===o.containerState.marker:41===n||46===n)?(e.exit("listItemValue"),l(n)):t(n)}function l(n){return e.enter("listItemMarker"),e.consume(n),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||n,e.check(hi,o.interrupt?t:c,e.attempt(Qi,d,u))}function c(e){return o.containerState.initialBlankLine=!0,i++,d(e)}function u(n){return Jr(n)?(e.enter("listItemPrefixWhitespace"),e.consume(n),e.exit("listItemPrefixWhitespace"),d):t(n)}function d(t){return o.containerState.size=i+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(t)}}},Qi={partial:!0,tokenize:function(e,n,t){const o=this;return ri(e,function(e){const r=o.events[o.events.length-1];return!Jr(e)&&r&&"listItemPrefixWhitespace"===r[1].type?n(e):t(e)},"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Xi={partial:!0,tokenize:function(e,n,t){const o=this;return ri(e,function(e){const r=o.events[o.events.length-1];return r&&"listItemIndent"===r[1].type&&r[2].sliceSerialize(r[1],!0).length===o.containerState.size?n(e):t(e)},"listItemIndent",o.containerState.size+1)}};const Ji={name:"setextUnderline",resolveTo:function(e,n){let t,o,r,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){t=i;break}"paragraph"===e[i][1].type&&(o=i)}else"content"===e[i][1].type&&e.splice(i,1),r||"definition"!==e[i][1].type||(r=i);const a={type:"setextHeading",start:{...e[t][1].start},end:{...e[e.length-1][1].end}};e[o][1].type="setextHeadingText",r?(e.splice(o,0,["enter",a,n]),e.splice(r+1,0,["exit",e[t][1],n]),e[t][1].end={...e[r][1].end}):e[t][1]=a;return e.push(["exit",a,n]),e},tokenize:function(e,n,t){const o=this;let r;return function(n){let a,s=o.events.length;for(;s--;)if("lineEnding"!==o.events[s][1].type&&"linePrefix"!==o.events[s][1].type&&"content"!==o.events[s][1].type){a="paragraph"===o.events[s][1].type;break}if(!o.parser.lazy[o.now().line]&&(o.interrupt||a))return e.enter("setextHeadingLine"),r=n,function(n){return e.enter("setextHeadingLineSequence"),i(n)}(n);return t(n)};function i(n){return n===r?(e.consume(n),i):(e.exit("setextHeadingLineSequence"),Jr(n)?ri(e,a,"lineSuffix")(n):a(n))}function a(o){return null===o||Qr(o)?(e.exit("setextHeadingLine"),n(o)):t(o)}}};const ea={tokenize:function(e){const n=this,t=e.attempt(hi,function(o){if(null===o)return void e.consume(o);return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t},e.attempt(this.parser.constructs.flowInitial,o,ri(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Ei,o)),"linePrefix")));return t;function o(o){if(null!==o)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t;e.consume(o)}}};const na={resolveAll:ia()},ta=ra("string"),oa=ra("text");function ra(e){return{resolveAll:ia("text"===e?aa:void 0),tokenize:function(n){const t=this,o=this.parser.constructs[e],r=n.attempt(o,i,a);return i;function i(e){return l(e)?r(e):a(e)}function a(e){if(null!==e)return n.enter("data"),n.consume(e),s;n.consume(e)}function s(e){return l(e)?(n.exit("data"),r(e)):(n.consume(e),s)}function l(e){if(null===e)return!0;const n=o[e];let r=-1;if(n)for(;++r<n.length;){const e=n[r];if(!e.previous||e.previous.call(t,t.previous))return!0}return!1}}}}function ia(e){return function(n,t){let o,r=-1;for(;++r<=n.length;)void 0===o?n[r]&&"data"===n[r][1].type&&(o=r,r++):n[r]&&"data"===n[r][1].type||(r!==o+2&&(n[o][1].end=n[r-1][1].end,n.splice(o+2,r-o-2),r=o+2),o=void 0);return e?e(n,t):n}}function aa(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||"lineEnding"===e[t][1].type)&&"data"===e[t-1][1].type){const o=e[t-1][1],r=n.sliceStream(o);let i,a=r.length,s=-1,l=0;for(;a--;){const e=r[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(l=0),l){const r={type:t===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:o.start._bufferIndex+s,_index:o.start._index+a,line:o.end.line,column:o.end.column-l,offset:o.end.offset-l},end:{...o.end}};o.end={...r.start},o.start.offset===o.end.offset?Object.assign(o,r):(e.splice(t,0,["enter",r,n],["exit",r,n]),t+=2)}t++}return e}const sa={42:Ki,43:Ki,45:Ki,48:Ki,49:Ki,50:Ki,51:Ki,52:Ki,53:Ki,54:Ki,55:Ki,56:Ki,57:Ki,62:fi},la={91:Fi},ca={[-2]:yi,[-1]:yi,32:yi},ua={35:Di,42:Gi,45:[Ji,Gi],60:Ri,61:Ji,95:Gi,96:vi,126:vi},da={38:bi,92:gi},pa={[-5]:Zi,[-4]:Zi,[-3]:Zi,33:qi,38:bi,42:ui,60:[pi,Hi],91:Wi,92:[Mi,gi],93:$i,95:ui,96:wi},ha={null:[ui,na]},fa={null:[42,95]},ga={null:[]};function ba(e,n,t){let o={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const r={},i=[];let a=[],s=[],l=!0;const c={attempt:v(function(e,n){y(e,n.from)}),check:v(m),consume:function(e){Qr(e)?(o.line++,o.column=1,o.offset+=-3===e?2:1,x()):-1!==e&&(o.column++,o.offset++);o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===a[o._index].length&&(o._bufferIndex=-1,o._index++));u.previous=e,l=!0},enter:function(e,n){const t=n||{};return t.type=e,t.start=f(),u.events.push(["enter",t,u]),s.push(t),t},exit:function(e){const n=s.pop();return n.end=f(),u.events.push(["exit",n,u]),n},interrupt:v(m,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){r[e.line]=e.column,x()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,n){return function(e,n){let t=-1;const o=[];let r;for(;++t<e.length;){const i=e[t];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=n?" ":"\t";break;case-1:if(!n&&r)continue;a=" ";break;default:a=String.fromCharCode(i)}r=-2===i,o.push(a)}return o.join("")}(h(e),n)},sliceStream:h,write:function(e){if(a=zr(a,e),g(),null!==a[a.length-1])return[];return y(n,0),u.events=ci(i,u.events,u),u.events}};let d,p=n.tokenize.call(u,c);return n.resolveAll&&i.push(n),u;function h(e){return function(e,n){const t=n.start._index,o=n.start._bufferIndex,r=n.end._index,i=n.end._bufferIndex;let a;if(t===r)a=[e[t].slice(o,i)];else{if(a=e.slice(t,r),o>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(o):a.shift()}i>0&&a.push(e[r].slice(0,i))}return a}(a,e)}function f(){const{_bufferIndex:e,_index:n,line:t,column:r,offset:i}=o;return{_bufferIndex:e,_index:n,line:t,column:r,offset:i}}function g(){let e;for(;o._index<a.length;){const n=a[o._index];if("string"==typeof n)for(e=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===e&&o._bufferIndex<n.length;)b(n.charCodeAt(o._bufferIndex));else b(n)}}function b(e){l=void 0,d=e,p=p(e)}function m(e,n){n.restore()}function v(e,n){return function(t,r,i){let a,d,p,h;return Array.isArray(t)?g(t):"tokenize"in t?g([t]):function(e){return n;function n(n){const t=null!==n&&e[n],o=null!==n&&e.null;return g([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(o)?o:o?[o]:[]])(n)}}(t);function g(e){return a=e,d=0,0===e.length?i:b(e[d])}function b(e){return function(t){h=function(){const e=f(),n=u.previous,t=u.currentConstruct,r=u.events.length,i=Array.from(s);return{from:r,restore:a};function a(){o=e,u.previous=n,u.currentConstruct=t,u.events.length=r,s=i,x()}}(),p=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return v(t);return e.tokenize.call(n?Object.assign(Object.create(u),n):u,c,m,v)(t)}}function m(n){return l=!0,e(p,h),r}function v(e){return l=!0,h.restore(),++d<a.length?b(a[d]):i}}}function y(e,n){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Or(u.events,n,u.events.length-n,e.resolve(u.events.slice(n),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function x(){o.line in r&&o.column<2&&(o.column=r[o.line],o.offset+=r[o.line]-1)}}const ma=/[\0\t\n\r]/g;const va=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ya(e,n,t){if(n)return n;if(35===t.charCodeAt(0)){const e=t.charCodeAt(1),n=120===e||88===e;return $r(t.slice(n?2:1),n?16:10)}return Dr(t)||e}const xa={}.hasOwnProperty;function wa(e,n,t){return"string"!=typeof n&&(t=n,n=void 0),function(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ne),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(Q),blockQuote:i(q),characterEscape:S,characterReference:S,codeFenced:i(W),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(W,a),codeText:i(Z,a),codeTextData:S,data:S,codeFlowValue:S,definition:i(G),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(K),hardBreakEscape:i(X),hardBreakTrailing:i(X),htmlFlow:i(J,a),htmlFlowData:S,htmlText:i(J,a),htmlTextData:S,image:i(ee),label:a,link:i(ne),listItem:i(oe),listItemValue:p,listOrdered:i(te,d),listUnordered:i(te),paragraph:i(re),reference:B,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Q),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:V,autolinkProtocol:Y,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:$,characterReference:U,codeFenced:l(b),codeFencedFence:g,codeFencedFenceInfo:h,codeFencedFenceMeta:f,codeFlowValue:E,codeIndented:l(m),codeText:l(N),codeTextData:E,data:E,definition:l(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:y,emphasis:l(),hardBreakEscape:l(T),hardBreakTrailing:l(T),htmlFlow:l(A),htmlFlowData:E,htmlText:l(L),htmlTextData:E,image:l(P),label:D,labelText:M,lineEnding:I,link:l(F),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:j,resourceDestinationString:O,resourceTitleString:z,resource:R,setextHeading:l(C),setextHeadingLineSequence:_,setextHeadingText:k,strong:l(),thematicBreak:l()}};_a(n,(e||{}).mdastExtensions||[]);const t={};return o;function o(e){let o={type:"root",children:[]};const i={stack:[o],tokenStack:[],config:n,enter:s,exit:c,buffer:a,resume:u,data:t},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=r(e,l.pop(),d)}for(d=-1;++d<e.length;){const t=n[e[d][0]];xa.call(t,e[d][1].type)&&t[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||Sa).call(i,void 0,e[0])}for(o.position={start:ka(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ka(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<n.transforms.length;)o=n.transforms[d](o)||o;return o}function r(e,n,t){let o,r,i,a,s=n-1,l=-1,c=!1;for(;++s<=t;){const n=e[s];switch(n[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===n[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===n[0]&&(!o||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===n[0]&&"listItemPrefix"===n[1].type||-1===l&&"exit"===n[0]&&("listUnordered"===n[1].type||"listOrdered"===n[1].type)){if(o){let a=s;for(r=void 0;a--;){const n=e[a];if("lineEnding"===n[1].type||"lineEndingBlank"===n[1].type){if("exit"===n[0])continue;r&&(e[r][1].type="lineEndingBlank",c=!0),n[1].type="lineEnding",r=a}else if("linePrefix"!==n[1].type&&"blockQuotePrefix"!==n[1].type&&"blockQuotePrefixWhitespace"!==n[1].type&&"blockQuoteMarker"!==n[1].type&&"listItemIndent"!==n[1].type)break}i&&(!r||i<r)&&(o._spread=!0),o.end=Object.assign({},r?e[r][1].start:n[1].end),e.splice(r||s,0,["exit",o,n[2]]),s++,t++}if("listItemPrefix"===n[1].type){const r={type:"listItem",_spread:!1,start:Object.assign({},n[1].start),end:void 0};o=r,e.splice(s,0,["enter",r,n[2]]),s++,t++,i=void 0,a=!0}}}return e[n][1]._spread=c,t}function i(e,n){return t;function t(t){s.call(this,e(t),t),n&&n.call(this,t)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,n,t){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([n,t||void 0]),e.position={start:ka(n.start),end:void 0}}function l(e){return n;function n(n){e&&e.call(this,n),c.call(this,n)}}function c(e,n){const t=this.stack.pop(),o=this.tokenStack.pop();if(!o)throw new Error("Cannot close `"+e.type+"` ("+lr({start:e.start,end:e.end})+"): it’s not open");if(o[0].type!==e.type)if(n)n.call(this,e,o[0]);else{(o[1]||Sa).call(this,e,o[0])}t.position.end=ka(e.end)}function u(){return Nr(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function h(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function f(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.label=n,t.identifier=Ur(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const n=this.stack[this.stack.length-1];if(!n.depth){const t=this.sliceSerialize(e).length;n.depth=t}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function _(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const n=this.stack[this.stack.length-1].children;let t=n[n.length-1];t&&"text"===t.type||(t=ae(),t.position={start:ka(e.start),end:void 0},n.push(t)),this.stack.push(t)}function E(e){const n=this.stack.pop();n.value+=this.sliceSerialize(e),n.position.end=ka(e.end)}function I(e){const t=this.stack[this.stack.length-1];if(this.data.atHardBreak){return t.children[t.children.length-1].position.end=ka(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(t.type)&&(S.call(this,e),E.call(this,e))}function T(){this.data.atHardBreak=!0}function A(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function F(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const n=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=n,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const n=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=n,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(e){const n=this.sliceSerialize(e),t=this.stack[this.stack.length-2];t.label=function(e){return e.replace(va,ya)}(n),t.identifier=Ur(n).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],n=this.resume(),t=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===t.type){const n=e.children;t.children=n}else t.alt=n}function O(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function R(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function j(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.label=n,t.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function $(e){const n=this.sliceSerialize(e),t=this.data.characterReferenceType;let o;if(t)o=$r(n,"characterReferenceMarkerNumeric"===t?10:16),this.data.characterReferenceType=void 0;else{o=Dr(n)}this.stack[this.stack.length-1].value+=o}function U(e){this.stack.pop().position.end=ka(e.end)}function Y(e){E.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){E.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function Q(){return{type:"heading",depth:0,children:[]}}function X(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function ne(){return{type:"link",title:null,url:"",children:[]}}function te(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function oe(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function re(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(t)(function(e){for(;!Ci(e););return e}(function(e){const n={constructs:Br([r,...(e||{}).extensions||[]]),content:t(ii),defined:[],document:t(ai),flow:t(ea),lazy:{},string:t(ta),text:t(oa)};return n;function t(e){return function(t){return ba(n,e,t)}}}(t).document().write(function(){let e,n=1,t="",o=!0;return function(r,i,a){const s=[];let l,c,u,d,p;for(r=t+("string"==typeof r?r.toString():new TextDecoder(i||void 0).decode(r)),u=0,t="",o&&(65279===r.charCodeAt(0)&&u++,o=void 0);u<r.length;){if(ma.lastIndex=u,l=ma.exec(r),d=l&&void 0!==l.index?l.index:r.length,p=r.charCodeAt(d),!l){t=r.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(r.slice(u,d)),n+=d-u),p){case 0:s.push(65533),n++;break;case 9:for(c=4*Math.ceil(n/4),s.push(-2);n++<c;)s.push(-1);break;case 10:s.push(-4),n=1;break;default:e=!0,n=1}u=d+1}return a&&(e&&s.push(-5),t&&s.push(t),s.push(null)),s}}()(e,n,!0))))}function ka(e){return{line:e.line,column:e.column,offset:e.offset}}function _a(e,n){let t=-1;for(;++t<n.length;){const o=n[t];Array.isArray(o)?_a(e,o):Ca(e,o)}}function Ca(e,n){let t;for(t in n)if(xa.call(n,t))switch(t){case"canContainEols":{const o=n[t];o&&e[t].push(...o);break}case"transforms":{const o=n[t];o&&e[t].push(...o);break}case"enter":case"exit":{const o=n[t];o&&Object.assign(e[t],o);break}}}function Sa(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+lr({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+lr({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+lr({start:n.start,end:n.end})+") is still open")}function Ea(e){const n=this;n.parser=function(t){return wa(t,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Ia(e,n){const t=n.referenceType;let o="]";if("collapsed"===t?o+="[]":"full"===t&&(o+="["+(n.label||n.identifier)+"]"),"imageReference"===n.type)return[{type:"text",value:"!["+n.alt+o}];const r=e.all(n),i=r[0];i&&"text"===i.type?i.value="["+i.value:r.unshift({type:"text",value:"["});const a=r[r.length-1];return a&&"text"===a.type?a.value+=o:r.push({type:"text",value:o}),r}function Ta(e){const n=e.spread;return null==n?e.children.length>1:n}function Aa(e){const n=String(e),t=/\r?\n|\r/g;let o=t.exec(n),r=0;const i=[];for(;o;)i.push(La(n.slice(r,o.index),r>0,!0),o[0]),r=o.index+o[0].length,o=t.exec(n);return i.push(La(n.slice(r),r>0,!1)),i.join("")}function La(e,n,t){let o=0,r=e.length;if(n){let n=e.codePointAt(o);for(;9===n||32===n;)o++,n=e.codePointAt(o)}if(t){let n=e.codePointAt(r-1);for(;9===n||32===n;)r--,n=e.codePointAt(r-1)}return r>o?e.slice(o,r):""}const Na={blockquote:function(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)},break:function(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:"\n"}]},code:function(e,n){const t=n.value?n.value+"\n":"",o={},r=n.lang?n.lang.split(/\s+/):[];r.length>0&&(o.className=["language-"+r[0]]);let i={type:"element",tagName:"code",properties:o,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i},delete:function(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},emphasis:function(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},footnoteReference:function(e,n){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",o=String(n.identifier).toUpperCase(),r=oi(o.toLowerCase()),i=e.footnoteOrder.indexOf(o);let a,s=e.footnoteCounts.get(o);void 0===s?(s=0,e.footnoteOrder.push(o),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(o,s);const l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(n,c),e.applyData(n,c)},heading:function(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},html:function(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}},imageReference:function(e,n){const t=String(n.identifier).toUpperCase(),o=e.definitionById.get(t);if(!o)return Ia(e,n);const r={src:oi(o.url||""),alt:n.alt};null!==o.title&&void 0!==o.title&&(r.title=o.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,i),e.applyData(n,i)},image:function(e,n){const t={src:oi(n.url)};null!==n.alt&&void 0!==n.alt&&(t.alt=n.alt),null!==n.title&&void 0!==n.title&&(t.title=n.title);const o={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,o),e.applyData(n,o)},inlineCode:function(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const o={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,o),e.applyData(n,o)},linkReference:function(e,n){const t=String(n.identifier).toUpperCase(),o=e.definitionById.get(t);if(!o)return Ia(e,n);const r={href:oi(o.url||"")};null!==o.title&&void 0!==o.title&&(r.title=o.title);const i={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)},link:function(e,n){const t={href:oi(n.url)};null!==n.title&&void 0!==n.title&&(t.title=n.title);const o={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)},listItem:function(e,n,t){const o=e.all(n),r=t?function(e){let n=!1;if("list"===e.type){n=e.spread||!1;const t=e.children;let o=-1;for(;!n&&++o<t.length;)n=Ta(t[o])}return n}(t):Ta(n),i={},a=[];if("boolean"==typeof n.checked){const e=o[0];let t;e&&"element"===e.type&&"p"===e.tagName?t=e:(t={type:"element",tagName:"p",properties:{},children:[]},o.unshift(t)),t.children.length>0&&t.children.unshift({type:"text",value:" "}),t.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<o.length;){const e=o[s];(r||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||r?a.push(e):a.push(...e.children)}const l=o[o.length-1];l&&(r||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(n,c),e.applyData(n,c)},list:function(e,n){const t={},o=e.all(n);let r=-1;for("number"==typeof n.start&&1!==n.start&&(t.start=n.start);++r<o.length;){const e=o[r];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const i={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(o,!0)};return e.patch(n,i),e.applyData(n,i)},paragraph:function(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},root:function(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)},strong:function(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},table:function(e,n){const t=e.all(n),o=t.shift(),r=[];if(o){const t={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(n.children[0],t),r.push(t)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},i=ar(n.children[1]),a=ir(n.children[n.children.length-1]);i&&a&&(o.position={start:i,end:a}),r.push(o)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,i),e.applyData(n,i)},tableCell:function(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},tableRow:function(e,n,t){const o=t?t.children:void 0,r=0===(o?o.indexOf(n):1)?"th":"td",i=t&&"table"===t.type?t.align:void 0,a=i?i.length:n.children.length;let s=-1;const l=[];for(;++s<a;){const t=n.children[s],o={},a=i?i[s]:void 0;a&&(o.align=a);let c={type:"element",tagName:r,properties:o,children:[]};t&&(c.children=e.all(t),e.patch(t,c),c=e.applyData(t,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(n,c),e.applyData(n,c)},text:function(e,n){const t={type:"text",value:Aa(String(n.value))};return e.patch(n,t),e.applyData(n,t)},thematicBreak:function(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)},toml:Fa,yaml:Fa,definition:Fa,footnoteDefinition:Fa};function Fa(){}const Pa="object"==typeof self?self:globalThis,Ma=e=>((e,n)=>{const t=(n,t)=>(e.set(t,n),n),o=r=>{if(e.has(r))return e.get(r);const[i,a]=n[r];switch(i){case 0:case-1:return t(a,r);case 1:{const e=t([],r);for(const n of a)e.push(o(n));return e}case 2:{const e=t({},r);for(const[n,t]of a)e[o(n)]=o(t);return e}case 3:return t(new Date(a),r);case 4:{const{source:e,flags:n}=a;return t(new RegExp(e,n),r)}case 5:{const e=t(new Map,r);for(const[n,t]of a)e.set(o(n),o(t));return e}case 6:{const e=t(new Set,r);for(const n of a)e.add(o(n));return e}case 7:{const{name:e,message:n}=a;return t(new Pa[e](n),r)}case 8:return t(BigInt(a),r);case"BigInt":return t(Object(BigInt(a)),r);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return t(new DataView(e),a)}}return t(new Pa[i](a),r)};return o})(new Map,e)(0),Da="",{toString:Oa}={},{keys:za}=Object,Ra=e=>{const n=typeof e;if("object"!==n||!e)return[0,n];const t=Oa.call(e).slice(8,-1);switch(t){case"Array":return[1,Da];case"Object":return[2,Da];case"Date":return[3,Da];case"RegExp":return[4,Da];case"Map":return[5,Da];case"Set":return[6,Da];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},Ba=([e,n])=>0===e&&("function"===n||"symbol"===n),ja=(e,{json:n,lossy:t}={})=>{const o=[];return((e,n,t,o)=>{const r=(e,n)=>{const r=o.push(e)-1;return t.set(n,r),r},i=o=>{if(t.has(o))return t.get(o);let[a,s]=Ra(o);switch(a){case 0:{let n=o;switch(s){case"bigint":a=8,n=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);n=null;break;case"undefined":return r([-1],o)}return r([a,n],o)}case 1:{if(s){let e=o;return"DataView"===s?e=new Uint8Array(o.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(o)),r([s,[...e]],o)}const e=[],n=r([a,e],o);for(const n of o)e.push(i(n));return n}case 2:{if(s)switch(s){case"BigInt":return r([s,o.toString()],o);case"Boolean":case"Number":case"String":return r([s,o.valueOf()],o)}if(n&&"toJSON"in o)return i(o.toJSON());const t=[],l=r([a,t],o);for(const n of za(o))!e&&Ba(Ra(o[n]))||t.push([i(n),i(o[n])]);return l}case 3:return r([a,o.toISOString()],o);case 4:{const{source:e,flags:n}=o;return r([a,{source:e,flags:n}],o)}case 5:{const n=[],t=r([a,n],o);for(const[t,r]of o)(e||!Ba(Ra(t))&&!Ba(Ra(r)))&&n.push([i(t),i(r)]);return t}case 6:{const n=[],t=r([a,n],o);for(const t of o)!e&&Ba(Ra(t))||n.push(i(t));return t}}const{message:l}=o;return r([a,{name:s,message:l}],o)};return i})(!(n||t),!!n,new Map,o)(e),o},Ha="function"==typeof structuredClone?(e,n)=>n&&("json"in n||"lossy"in n)?Ma(ja(e,n)):structuredClone(e):(e,n)=>Ma(ja(e,n));function $a(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ua(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}const Ya=function(e){if(null==e)return qa;if("function"==typeof e)return Va(e);if("object"==typeof e)return Array.isArray(e)?function(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Ya(e[t]);return Va(o);function o(...e){let t=-1;for(;++t<n.length;)if(n[t].apply(this,e))return!0;return!1}}(e):function(e){const n=e;return Va(t);function t(t){const o=t;let r;for(r in e)if(o[r]!==n[r])return!1;return!0}}(e);if("string"==typeof e)return function(e){return Va(n);function n(n){return n&&n.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Va(e){return function(n,t,o){return Boolean(Wa(n)&&e.call(this,n,"number"==typeof t?t:void 0,o||void 0))}}function qa(){return!0}function Wa(e){return null!==e&&"object"==typeof e&&"type"in e}const Za=[],Ga=!0,Ka=!1;function Qa(e,n,t,o){let r;"function"==typeof n&&"function"!=typeof t?(o=t,t=n):r=n;const i=Ya(r),a=o?-1:1;!function e(r,s,l){const c=r&&"object"==typeof r?r:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+r.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Za;if((!n||i(r,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Ga,e];return null==e?Za:[e]}(t(r,l)),p[0]===Ka))return p;if("children"in r&&r.children){const n=r;if(n.children&&"skip"!==p[0])for(u=(o?n.children.length:-1)+a,d=l.concat(n);u>-1&&u<n.children.length;){const t=n.children[u];if(c=e(t,u,d)(),c[0]===Ka)return c;u="number"==typeof c[1]?c[1]:u+a}}return p}}(e,void 0,[])()}function Xa(e,n,t,o){let r,i,a;"function"==typeof n&&"function"!=typeof t?(i=void 0,a=n,r=t):(i=n,a=t,r=o),Qa(e,i,function(e,n){const t=n[n.length-1],o=t?t.children.indexOf(e):void 0;return a(e,o,t)},r)}const Ja={}.hasOwnProperty,es={};function ns(e,n){e.position&&(n.position=function(e){const n=ar(e),t=ir(e);if(n&&t)return{start:n,end:t}}(e))}function ts(e,n){let t=n;if(e&&e.data){const n=e.data.hName,o=e.data.hChildren,r=e.data.hProperties;if("string"==typeof n)if("element"===t.type)t.tagName=n;else{t={type:"element",tagName:n,properties:{},children:"children"in t?t.children:[t]}}"element"===t.type&&r&&Object.assign(t.properties,Ha(r)),"children"in t&&t.children&&null!=o&&(t.children=o)}return t}function os(e,n){const t=n.data||{},o=!("value"in n)||Ja.call(t,"hProperties")||Ja.call(t,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(n)}:{type:"text",value:n.value};return e.patch(n,o),e.applyData(n,o)}function rs(e,n){const t=[];let o=-1;for(n&&t.push({type:"text",value:"\n"});++o<e.length;)o&&t.push({type:"text",value:"\n"}),t.push(e[o]);return n&&e.length>0&&t.push({type:"text",value:"\n"}),t}function is(e){let n=0,t=e.charCodeAt(n);for(;9===t||32===t;)n++,t=e.charCodeAt(n);return e.slice(n)}function as(e,n){const t=function(e,n){const t=n||es,o=new Map,r=new Map,i=new Map,a={...Na,...t.handlers},s={all:function(e){const n=[];if("children"in e){const t=e.children;let o=-1;for(;++o<t.length;){const r=s.one(t[o],e);if(r){if(o&&"break"===t[o-1].type&&(Array.isArray(r)||"text"!==r.type||(r.value=is(r.value)),!Array.isArray(r)&&"element"===r.type)){const e=r.children[0];e&&"text"===e.type&&(e.value=is(e.value))}Array.isArray(r)?n.push(...r):n.push(r)}}}return n},applyData:ts,definitionById:o,footnoteById:r,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,n){const t=e.type,o=s.handlers[t];if(Ja.call(s.handlers,t)&&o)return o(s,e,n);if(s.options.passThrough&&s.options.passThrough.includes(t)){if("children"in e){const{children:n,...t}=e,o=Ha(t);return o.children=s.all(e),o}return Ha(e)}return(s.options.unknownHandler||os)(s,e,n)},options:t,patch:ns,wrap:rs};return Xa(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const n="definition"===e.type?o:r,t=String(e.identifier).toUpperCase();n.has(t)||n.set(t,e)}}),s}(e,n),o=t.one(e,void 0),r=function(e){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||$a,o=e.options.footnoteBackLabel||Ua,r=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const r=e.footnoteById.get(e.footnoteOrder[l]);if(!r)continue;const i=e.all(r),a=String(r.identifier).toUpperCase(),c=oi(a.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(a);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof t?t:t(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof o?o:o(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const h=i[i.length-1];if(h&&"element"===h.type&&"p"===h.tagName){const e=h.children[h.children.length-1];e&&"text"===e.type?e.value+=" ":h.children.push({type:"text",value:" "}),h.children.push(...d)}else i.push(...d);const f={type:"element",tagName:"li",properties:{id:n+"fn-"+c},children:e.wrap(i,!0)};e.patch(r,f),s.push(f)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Ha(a),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(t),i=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return r&&i.children.push({type:"text",value:"\n"},r),i}function ss(e,n){return e&&"run"in e?async function(t,o){const r=as(t,{file:o,...n});await e.run(r,o)}:function(t,o){return as(t,{file:o,...e||n})}}function ls(e){if(e)throw e}var cs=t(849);function us(e){if("object"!=typeof e||null===e)return!1;const n=Object.getPrototypeOf(e);return!(null!==n&&n!==Object.prototype&&null!==Object.getPrototypeOf(n)||Symbol.toStringTag in e||Symbol.iterator in e)}function ds(){const e=[],n={run:function(...n){let t=-1;const o=n.pop();if("function"!=typeof o)throw new TypeError("Expected function as last argument, not "+o);!function r(i,...a){const s=e[++t];let l=-1;if(i)o(i);else{for(;++l<n.length;)null!==a[l]&&void 0!==a[l]||(a[l]=n[l]);n=a,s?function(e,n){let t;return o;function o(...n){const o=e.length>n.length;let a;o&&n.push(r);try{a=e.apply(this,n)}catch(e){if(o&&t)throw e;return r(e)}o||(a&&a.then&&"function"==typeof a.then?a.then(i,r):a instanceof Error?r(a):i(a))}function r(e,...o){t||(t=!0,n(e,...o))}function i(e){r(null,e)}}(s,r)(...a):o(null,...a)}}(null,...n)},use:function(t){if("function"!=typeof t)throw new TypeError("Expected `middelware` to be a function, not "+t);return e.push(t),n}};return n}const ps={basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');hs(e);let t,o=0,r=-1,i=e.length;if(void 0===n||0===n.length||n.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(t){o=i+1;break}}else r<0&&(t=!0,r=i+1);return r<0?"":e.slice(o,r)}if(n===e)return"";let a=-1,s=n.length-1;for(;i--;)if(47===e.codePointAt(i)){if(t){o=i+1;break}}else a<0&&(t=!0,a=i+1),s>-1&&(e.codePointAt(i)===n.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));o===r?r=a:r<0&&(r=e.length);return e.slice(o,r)},dirname:function(e){if(hs(e),0===e.length)return".";let n,t=-1,o=e.length;for(;--o;)if(47===e.codePointAt(o)){if(n){t=o;break}}else n||(n=!0);return t<0?47===e.codePointAt(0)?"/":".":1===t&&47===e.codePointAt(0)?"//":e.slice(0,t)},extname:function(e){hs(e);let n,t=e.length,o=-1,r=0,i=-1,a=0;for(;t--;){const s=e.codePointAt(t);if(47!==s)o<0&&(n=!0,o=t+1),46===s?i<0?i=t:1!==a&&(a=1):i>-1&&(a=-1);else if(n){r=t+1;break}}if(i<0||o<0||0===a||1===a&&i===o-1&&i===r+1)return"";return e.slice(i,o)},join:function(...e){let n,t=-1;for(;++t<e.length;)hs(e[t]),e[t]&&(n=void 0===n?e[t]:n+"/"+e[t]);return void 0===n?".":function(e){hs(e);const n=47===e.codePointAt(0);let t=function(e,n){let t,o,r="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)t=e.codePointAt(l);else{if(47===t)break;t=47}if(47===t){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(r.length<2||2!==i||46!==r.codePointAt(r.length-1)||46!==r.codePointAt(r.length-2))if(r.length>2){if(o=r.lastIndexOf("/"),o!==r.length-1){o<0?(r="",i=0):(r=r.slice(0,o),i=r.length-1-r.lastIndexOf("/")),a=l,s=0;continue}}else if(r.length>0){r="",i=0,a=l,s=0;continue}n&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(a+1,l):r=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===t&&s>-1?s++:s=-1}return r}(e,!n);0!==t.length||n||(t=".");t.length>0&&47===e.codePointAt(e.length-1)&&(t+="/");return n?"/"+t:t}(n)},sep:"/"};function hs(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const fs={cwd:function(){return"/"}};function gs(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function bs(e){if("string"==typeof e)e=new URL(e);else if(!gs(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const n=e.pathname;let t=-1;for(;++t<n.length;)if(37===n.codePointAt(t)&&50===n.codePointAt(t+1)){const e=n.codePointAt(t+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(n)}(e)}const ms=["history","path","basename","stem","extname","dirname"];class vs{constructor(e){let n;n=e?gs(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in n?"":fs.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let t,o=-1;for(;++o<ms.length;){const e=ms[o];e in n&&void 0!==n[e]&&null!==n[e]&&(this[e]="history"===e?[...n[e]]:n[e])}for(t in n)ms.includes(t)||(this[t]=n[t])}get basename(){return"string"==typeof this.path?ps.basename(this.path):void 0}set basename(e){xs(e,"basename"),ys(e,"basename"),this.path=ps.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ps.dirname(this.path):void 0}set dirname(e){ws(this.basename,"dirname"),this.path=ps.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ps.extname(this.path):void 0}set extname(e){if(ys(e,"extname"),ws(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ps.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){gs(e)&&(e=bs(e)),xs(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ps.basename(this.path,this.extname):void 0}set stem(e){xs(e,"stem"),ys(e,"stem"),this.path=ps.join(this.dirname||"",e+(this.extname||""))}fail(e,n,t){const o=this.message(e,n,t);throw o.fatal=!0,o}info(e,n,t){const o=this.message(e,n,t);return o.fatal=void 0,o}message(e,n,t){const o=new pr(e,n,t);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function ys(e,n){if(e&&e.includes(ps.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ps.sep+"`")}function xs(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function ws(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}const ks=function(e){const n=this.constructor.prototype,t=n[e],o=function(){return t.apply(o,arguments)};return Object.setPrototypeOf(o,n),o},_s={}.hasOwnProperty;class Cs extends ks{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=ds()}copy(){const e=new Cs;let n=-1;for(;++n<this.attachers.length;){const t=this.attachers[n];e.use(...t)}return e.data(cs(!0,{},this.namespace)),e}data(e,n){return"string"==typeof e?2===arguments.length?(Ts("data",this.frozen),this.namespace[e]=n,this):_s.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ts("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);const o=n.call(e,...t);"function"==typeof o&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Ns(e),t=this.parser||this.Parser;return Es("parse",t),t(String(n),n)}process(e,n){const t=this;return this.freeze(),Es("process",this.parser||this.Parser),Is("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(o,r){const i=Ns(e),a=t.parse(i);function s(e,t){e||!t?r(e):o?o(t):n(void 0,t)}t.run(a,i,function(e,n,o){if(e||!n||!o)return s(e);const r=n,i=t.stringify(r,o);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?o.value=i:o.result=i,s(e,o)})}}processSync(e){let n,t=!1;return this.freeze(),Es("processSync",this.parser||this.Parser),Is("processSync",this.compiler||this.Compiler),this.process(e,function(e,o){t=!0,ls(e),n=o}),Ls("processSync","process",t),n}run(e,n,t){As(e),this.freeze();const o=this.transformers;return t||"function"!=typeof n||(t=n,n=void 0),t?r(void 0,t):new Promise(r);function r(r,i){const a=Ns(n);o.run(e,a,function(n,o,a){const s=o||e;n?i(n):r?r(s):t(void 0,s,a)})}}runSync(e,n){let t,o=!1;return this.run(e,n,function(e,n){ls(e),t=n,o=!0}),Ls("runSync","run",o),t}stringify(e,n){this.freeze();const t=Ns(n),o=this.compiler||this.Compiler;return Is("stringify",o),As(e),o(e,t)}use(e,...n){const t=this.attachers,o=this.namespace;if(Ts("use",this.frozen),null==e);else if("function"==typeof e)s(e,n);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function r(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[n,...t]=e;s(n,t)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(o.settings=cs(!0,o.settings,e.settings))}function a(e){let n=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++n<e.length;){r(e[n])}}}function s(e,n){let o=-1,r=-1;for(;++o<t.length;)if(t[o][0]===e){r=o;break}if(-1===r)t.push([e,...n]);else if(n.length>0){let[o,...i]=n;const a=t[r][1];us(a)&&us(o)&&(o=cs(!0,a,o)),t[r]=[e,o,...i]}}}}const Ss=(new Cs).freeze();function Es(e,n){if("function"!=typeof n)throw new TypeError("Cannot `"+e+"` without `parser`")}function Is(e,n){if("function"!=typeof n)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ts(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function As(e){if(!us(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Ls(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ns(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new vs(e)}const Fs=[],Ps={allowDangerousHtml:!0},Ms=/^(https?|ircs?|mailto|xmpp)$/i,Ds=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Os(e){const n=zs(e),t=Rs(e);return Bs(n.runSync(n.parse(t),t),e)}function zs(e){const n=e.rehypePlugins||Fs,t=e.remarkPlugins||Fs,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ps}:Ps;return Ss().use(Ea).use(t).use(ss,o).use(n)}function Rs(e){const n=e.children||"",t=new vs;return"string"==typeof n&&(t.value=n),t}function Bs(e,n){const t=n.allowedElements,o=n.allowElement,r=n.components,i=n.disallowedElements,a=n.skipHtml,s=n.unwrapDisallowed,l=n.urlTransform||js;for(const e of Ds)Object.hasOwn(n,e.from)&&vo((e.from,e.to&&e.to,e.id));return Xa(e,function(e,n,r){if("raw"===e.type&&r&&"number"==typeof n)return a?r.children.splice(n,1):r.children[n]={type:"text",value:e.value},n;if("element"===e.type){let n;for(n in Ar)if(Object.hasOwn(Ar,n)&&Object.hasOwn(e.properties,n)){const t=e.properties[n],o=Ar[n];(null===o||o.includes(e.tagName))&&(e.properties[n]=l(String(t||""),n,e))}}if("element"===e.type){let a=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&o&&"number"==typeof n&&(a=!o(e,n,r)),a&&r&&"number"==typeof n)return s&&e.children?r.children.splice(n,1,...e.children):r.children.splice(n,1),n}}),yr(e,{Fragment:S,components:r,ignoreInvalidStyle:!0,jsx:kn,jsxs:kn,passKeys:!0,passNode:!0})}function js(e){const n=e.indexOf(":"),t=e.indexOf("?"),o=e.indexOf("#"),r=e.indexOf("/");return-1===n||-1!==r&&n>r||-1!==t&&n>t||-1!==o&&n>o||Ms.test(e.slice(0,n))?e:""}function Hs(e,n){const t=String(e);if("string"!=typeof n)throw new TypeError("Expected character");let o=0,r=t.indexOf(n);for(;-1!==r;)o++,r=t.indexOf(n,r+n.length);return o}function $s(e,n,t){const o=Ya((t||{}).ignore||[]),r=function(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let o=-1;for(;++o<t.length;){const e=t[o];n.push([Us(e[0]),Ys(e[1])])}return n}(n);let i=-1;for(;++i<r.length;)Qa(e,"text",a);function a(e,n){let t,a=-1;for(;++a<n.length;){const e=n[a],r=t?t.children:void 0;if(o(e,r?r.indexOf(e):void 0,t))return;t=e}if(t)return function(e,n){const t=n[n.length-1],o=r[i][0],a=r[i][1];let s=0;const l=t.children.indexOf(e);let c=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){const t=d.index,r={index:d.index,input:d.input,stack:[...n,e]};let i=a(...d,r);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?o.lastIndex=t+1:(s!==t&&u.push({type:"text",value:e.value.slice(s,t)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=t+d[0].length,c=!0),!o.global)break;d=o.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),t.children.splice(l,1,...u)):u=[e];return l+u.length}(e,n)}}function Us(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Ys(e){return"function"==typeof e?e:function(){return e}}const Vs="phrasing",qs=["autolink","link","image","label"];function Ws(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Zs(e){this.config.enter.autolinkProtocol.call(this,e)}function Gs(e){this.config.exit.autolinkProtocol.call(this,e)}function Ks(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Qs(e){this.config.exit.autolinkEmail.call(this,e)}function Xs(e){this.exit(e)}function Js(e){$s(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,el],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nl]],{ignore:["link","linkReference"]})}function el(e,n,t,o,r){let i="";if(!tl(r))return!1;if(/^w/i.test(n)&&(t=n+t,n="",i="http://"),!function(e){const n=e.split(".");if(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))return!1;return!0}(t))return!1;const a=function(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],o=t.indexOf(")");const r=Hs(e,"(");let i=Hs(e,")");for(;-1!==o&&r>i;)e+=t.slice(0,o+1),t=t.slice(o+1),o=t.indexOf(")"),i++;return[e,t]}(t+o);if(!a[0])return!1;const s={type:"link",title:null,url:i+n+a[0],children:[{type:"text",value:n+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function nl(e,n,t,o){return!(!tl(o,!0)||/[-\d_]$/.test(t))&&{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function tl(e,n){const t=e.input.charCodeAt(e.index-1);return(0===e.index||ni(t)||ei(t))&&(!n||47!==t)}function ol(){this.buffer()}function rl(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function il(){this.buffer()}function al(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function sl(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ll(e){this.exit(e)}function cl(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ul(e){this.exit(e)}function dl(e,n,t,o){const r=t.createTracker(o);let i=r.move("[^");const a=t.enter("footnoteReference"),s=t.enter("reference");return i+=r.move(t.safe(t.associationId(e),{after:"]",before:i})),s(),a(),i+=r.move("]"),i}function pl(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:function(e,t,o,r){const i=o.createTracker(r);let a=i.move("[^");const s=o.enter("footnoteDefinition"),l=o.enter("label");a+=i.move(o.safe(o.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((n?"\n":" ")+o.indentLines(o.containerFlow(e,i.current()),n?fl:hl)));return s(),a},footnoteReference:dl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function hl(e,n,t){return 0===n?e:fl(e,n,t)}function fl(e,n,t){return(t?"":" ")+e}dl.peek=function(){return"["};const gl=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function bl(e){this.enter({type:"delete",children:[]},e)}function ml(e){this.exit(e)}function vl(e,n,t,o){const r=t.createTracker(o),i=t.enter("strikethrough");let a=r.move("~~");return a+=t.containerPhrasing(e,{...r.current(),before:a,after:"~"}),a+=r.move("~~"),i(),a}function yl(e){return e.length}function xl(e){return null==e?"":String(e)}function wl(e){const n="string"==typeof e?e.codePointAt(0):0;return 67===n||99===n?99:76===n||108===n?108:82===n||114===n?114:0}vl.peek=function(){return"~"};function kl(e,n,t){return">"+(t?"":" ")+e}function _l(e,n){return Cl(e,n.inConstruct,!0)&&!Cl(e,n.notInConstruct,!1)}function Cl(e,n,t){if("string"==typeof n&&(n=[n]),!n||0===n.length)return t;let o=-1;for(;++o<n.length;)if(e.includes(n[o]))return!0;return!1}function Sl(e,n,t,o){let r=-1;for(;++r<t.unsafe.length;)if("\n"===t.unsafe[r].character&&_l(t.stack,t.unsafe[r]))return/[ \t]/.test(o.before)?"":" ";return"\\\n"}function El(e,n){return Boolean(!1===n.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Il(e,n,t){return(t?"":" ")+e}function Tl(e){const n=e.options.quote||'"';if('"'!==n&&"'"!==n)throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Al(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ll(e,n,t){const o=li(e),r=li(n);return void 0===o?void 0===r?"_"===t?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===r?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===o?void 0===r?{inside:!1,outside:!1}:1===r?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===r?{inside:!1,outside:!1}:1===r?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Nl(e,n,t,o){const r=function(e){const n=e.options.emphasis||"*";if("*"!==n&&"_"!==n)throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}(t),i=t.enter("emphasis"),a=t.createTracker(o),s=a.move(r);let l=a.move(t.containerPhrasing(e,{after:r,before:s,...a.current()}));const c=l.charCodeAt(0),u=Ll(o.before.charCodeAt(o.before.length-1),c,r);u.inside&&(l=Al(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ll(o.after.charCodeAt(0),d,r);p.inside&&(l=l.slice(0,-1)+Al(d));const h=a.move(r);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+h}function Fl(e,n){let t=!1;return Xa(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return t=!0,Ka}),Boolean((!e.depth||e.depth<3)&&Nr(e)&&(n.options.setext||t))}function Pl(e){return e.value||""}function Ml(e,n,t,o){const r=Tl(t),i='"'===r?"Quote":"Apostrophe",a=t.enter("image");let s=t.enter("label");const l=t.createTracker(o);let c=l.move("![");return c+=l.move(t.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=t.enter("destinationRaw"),c+=l.move(t.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${i}`),c+=l.move(" "+r),c+=l.move(t.safe(e.title,{before:c,after:r,...l.current()})),c+=l.move(r),s()),c+=l.move(")"),a(),c}function Dl(e,n,t,o){const r=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const s=t.createTracker(o);let l=s.move("![");const c=t.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=t.stack;t.stack=[],a=t.enter("reference");const d=t.safe(t.associationId(e),{before:l,after:"]",...s.current()});return a(),t.stack=u,i(),"full"!==r&&c&&c===d?"shortcut"===r?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ol(e,n,t){let o=e.value||"",r="`",i=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(o);)r+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++i<t.unsafe.length;){const e=t.unsafe[i],n=t.compilePattern(e);let r;if(e.atBreak)for(;r=n.exec(o);){let e=r.index;10===o.charCodeAt(e)&&13===o.charCodeAt(e-1)&&e--,o=o.slice(0,e)+" "+o.slice(r.index+1)}}return r+o+r}function zl(e,n){const t=Nr(e);return Boolean(!n.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Rl(e,n,t,o){const r=Tl(t),i='"'===r?"Quote":"Apostrophe",a=t.createTracker(o);let s,l;if(zl(e,t)){const n=t.stack;t.stack=[],s=t.enter("autolink");let o=a.move("<");return o+=a.move(t.containerPhrasing(e,{before:o,after:">",...a.current()})),o+=a.move(">"),s(),t.stack=n,o}s=t.enter("link"),l=t.enter("label");let c=a.move("[");return c+=a.move(t.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(t.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=t.enter("destinationRaw"),c+=a.move(t.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=t.enter(`title${i}`),c+=a.move(" "+r),c+=a.move(t.safe(e.title,{before:c,after:r,...a.current()})),c+=a.move(r),l()),c+=a.move(")"),s(),c}function Bl(e,n,t,o){const r=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const s=t.createTracker(o);let l=s.move("[");const c=t.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=t.stack;t.stack=[],a=t.enter("reference");const d=t.safe(t.associationId(e),{before:l,after:"]",...s.current()});return a(),t.stack=u,i(),"full"!==r&&c&&c===d?"shortcut"===r?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function jl(e){const n=e.options.bullet||"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Hl(e){const n=e.options.rule||"*";if("*"!==n&&"-"!==n&&"_"!==n)throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}Nl.peek=function(e,n,t){return t.options.emphasis||"*"},Pl.peek=function(){return"<"},Ml.peek=function(){return"!"},Dl.peek=function(){return"!"},Ol.peek=function(){return"`"},Rl.peek=function(e,n,t){return zl(e,t)?"<":"["},Bl.peek=function(){return"["};const $l=Ya(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ul(e,n,t,o){const r=function(e){const n=e.options.strong||"*";if("*"!==n&&"_"!==n)throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}(t),i=t.enter("strong"),a=t.createTracker(o),s=a.move(r+r);let l=a.move(t.containerPhrasing(e,{after:r,before:s,...a.current()}));const c=l.charCodeAt(0),u=Ll(o.before.charCodeAt(o.before.length-1),c,r);u.inside&&(l=Al(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ll(o.after.charCodeAt(0),d,r);p.inside&&(l=l.slice(0,-1)+Al(d));const h=a.move(r+r);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+h}Ul.peek=function(e,n,t){return t.options.strong||"*"};const Yl={blockquote:function(e,n,t,o){const r=t.enter("blockquote"),i=t.createTracker(o);i.move("> "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),kl);return r(),a},break:Sl,code:function(e,n,t,o){const r=function(e){const n=e.options.fence||"`";if("`"!==n&&"~"!==n)throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}(t),i=e.value||"",a="`"===r?"GraveAccent":"Tilde";if(El(e,t)){const e=t.enter("codeIndented"),n=t.indentLines(i,Il);return e(),n}const s=t.createTracker(o),l=r.repeat(Math.max(function(e,n){const t=String(e);let o=t.indexOf(n),r=o,i=0,a=0;if("string"!=typeof n)throw new TypeError("Expected substring");for(;-1!==o;)o===r?++i>a&&(a=i):i=1,r=o+n.length,o=t.indexOf(n,r);return a}(i,r)+1,3)),c=t.enter("codeFenced");let u=s.move(l);if(e.lang){const n=t.enter(`codeFencedLang${a}`);u+=s.move(t.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),n()}if(e.lang&&e.meta){const n=t.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(t.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),n()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,n,t,o){const r=Tl(t),i='"'===r?"Quote":"Apostrophe",a=t.enter("definition");let s=t.enter("label");const l=t.createTracker(o);let c=l.move("[");return c+=l.move(t.safe(t.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=t.enter("destinationRaw"),c+=l.move(t.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=t.enter(`title${i}`),c+=l.move(" "+r),c+=l.move(t.safe(e.title,{before:c,after:r,...l.current()})),c+=l.move(r),s()),a(),c},emphasis:Nl,hardBreak:Sl,heading:function(e,n,t,o){const r=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(o);if(Fl(e,t)){const n=t.enter("headingSetext"),o=t.enter("phrasing"),a=t.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return o(),n(),a+"\n"+(1===r?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(r),s=t.enter("headingAtx"),l=t.enter("phrasing");i.move(a+" ");let c=t.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=Al(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,t.options.closeAtx&&(c+=" "+a),l(),s(),c},html:Pl,image:Ml,imageReference:Dl,inlineCode:Ol,link:Rl,linkReference:Bl,list:function(e,n,t,o){const r=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?function(e){const n=e.options.bulletOrdered||".";if("."!==n&&")"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}(t):jl(t);const s=e.ordered?"."===a?")":".":function(e){const n=jl(e),t=e.options.bulletOther;if(!t)return"*"===n?"-":"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}(t);let l=!(!n||!t.bulletLastUsed)&&a===t.bulletLastUsed;if(!e.ordered){const n=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!n||n.children&&n.children[0]||"list"!==t.stack[t.stack.length-1]||"listItem"!==t.stack[t.stack.length-2]||"list"!==t.stack[t.stack.length-3]||"listItem"!==t.stack[t.stack.length-4]||0!==t.indexStack[t.indexStack.length-1]||0!==t.indexStack[t.indexStack.length-2]||0!==t.indexStack[t.indexStack.length-3]||(l=!0),Hl(t)===a&&n){let n=-1;for(;++n<e.children.length;){const t=e.children[n];if(t&&"listItem"===t.type&&t.children&&t.children[0]&&"thematicBreak"===t.children[0].type){l=!0;break}}}}l&&(a=s),t.bulletCurrent=a;const c=t.containerFlow(e,o);return t.bulletLastUsed=a,t.bulletCurrent=i,r(),c},listItem:function(e,n,t,o){const r=function(e){const n=e.options.listItemIndent||"one";if("tab"!==n&&"one"!==n&&"mixed"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}(t);let i=t.bulletCurrent||jl(t);n&&"list"===n.type&&n.ordered&&(i=("number"==typeof n.start&&n.start>-1?n.start:1)+(!1===t.options.incrementListMarker?0:n.children.indexOf(e))+i);let a=i.length+1;("tab"===r||"mixed"===r&&(n&&"list"===n.type&&n.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=t.createTracker(o);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,s.current()),function(e,n,t){if(n)return(t?"":" ".repeat(a))+e;return(t?i:i+" ".repeat(a-i.length))+e});return l(),c},paragraph:function(e,n,t,o){const r=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,o);return i(),r(),a},root:function(e,n,t,o){const r=e.children.some(function(e){return $l(e)});return(r?t.containerPhrasing:t.containerFlow).call(t,e,o)},strong:Ul,text:function(e,n,t,o){return t.safe(e.value,o)},thematicBreak:function(e,n,t){const o=(Hl(t)+(t.options.ruleSpaces?" ":"")).repeat(function(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}(t));return t.options.ruleSpaces?o.slice(0,-1):o}};function Vl(e){const n=e._align;this.enter({type:"table",align:n.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function ql(e){this.exit(e),this.data.inTable=void 0}function Wl(e){this.enter({type:"tableRow",children:[]},e)}function Zl(e){this.exit(e)}function Gl(e){this.enter({type:"tableCell",children:[]},e)}function Kl(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Ql));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Ql(e,n){return"|"===n?n:e}function Xl(e){const n=e||{},t=n.tableCellPadding,o=n.tablePipeAlign,r=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,n,t){let o=Yl.inlineCode(e,n,t);t.stack.includes("tableCell")&&(o=o.replace(/\|/g,"\\$&"));return o},table:function(e,n,t,o){return s(function(e,n,t){const o=e.children;let r=-1;const i=[],a=n.enter("table");for(;++r<o.length;)i[r]=l(o[r],n,t);return a(),i}(e,t,o),e.align)},tableCell:a,tableRow:function(e,n,t,o){const r=l(e,t,o),i=s([r]);return i.slice(0,i.indexOf("\n"))}}};function a(e,n,t,o){const r=t.enter("tableCell"),a=t.enter("phrasing"),s=t.containerPhrasing(e,{...o,before:i,after:i});return a(),r(),s}function s(e,n){return function(e,n){const t=n||{},o=(t.align||[]).concat(),r=t.stringLength||yl,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const n=[],o=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=xl(e[u][i]);if(!1!==t.alignDelimiters){const e=r(a);o[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}n.push(a)}a[u]=n,s[u]=o}let d=-1;if("object"==typeof o&&"length"in o)for(;++d<c;)i[d]=wl(o[d]);else{const e=wl(o);for(;++d<c;)i[d]=e}d=-1;const p=[],h=[];for(;++d<c;){const e=i[d];let n="",o="";99===e?(n=":",o=":"):108===e?n=":":114===e&&(o=":");let r=!1===t.alignDelimiters?1:Math.max(1,l[d]-n.length-o.length);const a=n+"-".repeat(r)+o;!1!==t.alignDelimiters&&(r=n.length+r+o.length,r>l[d]&&(l[d]=r),h[d]=r),p[d]=a}a.splice(1,0,p),s.splice(1,0,h),u=-1;const f=[];for(;++u<a.length;){const e=a[u],n=s[u];d=-1;const o=[];for(;++d<c;){const r=e[d]||"";let a="",s="";if(!1!==t.alignDelimiters){const e=l[d]-(n[d]||0),t=i[d];114===t?a=" ".repeat(e):99===t?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===t.delimiterStart||d||o.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===r||!1===t.delimiterStart&&!d||o.push(" "),!1!==t.alignDelimiters&&o.push(a),o.push(r),!1!==t.alignDelimiters&&o.push(s),!1!==t.padding&&o.push(" "),!1===t.delimiterEnd&&d===c-1||o.push("|")}f.push(!1===t.delimiterEnd?o.join("").replace(/ +$/,""):o.join(""))}return f.join("\n")}(e,{align:n,alignDelimiters:o,padding:t,stringLength:r})}function l(e,n,t){const o=e.children;let r=-1;const i=[],s=n.enter("tableRow");for(;++r<o.length;)i[r]=a(o[r],0,n,t);return s(),i}}function Jl(e){const n=this.stack[this.stack.length-2];n.type,n.checked="taskListCheckValueChecked"===e.type}function ec(e){const n=this.stack[this.stack.length-2];if(n&&"listItem"===n.type&&"boolean"==typeof n.checked){const e=this.stack[this.stack.length-1];e.type;const t=e.children[0];if(t&&"text"===t.type){const o=n.children;let r,i=-1;for(;++i<o.length;){const e=o[i];if("paragraph"===e.type){r=e;break}}r===e&&(t.value=t.value.slice(1),0===t.value.length?e.children.shift():e.position&&t.position&&"number"==typeof t.position.start.offset&&(t.position.start.column++,t.position.start.offset++,e.position.start=Object.assign({},t.position.start)))}}this.exit(e)}function nc(e,n,t,o){const r=e.children[0],i="boolean"==typeof e.checked&&r&&"paragraph"===r.type,a="["+(e.checked?"x":" ")+"] ",s=t.createTracker(o);i&&s.move(a);let l=Yl.listItem(e,n,t,{...o,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const tc={tokenize:function(e,n,t){let o=0;return function n(i){if((87===i||119===i)&&o<3)return o++,e.consume(i),n;if(46===i&&3===o)return e.consume(i),r;return t(i)};function r(e){return null===e?t(e):n(e)}},partial:!0},oc={tokenize:function(e,n,t){let o,r,i;return a;function a(n){return 46===n||95===n?e.check(ic,l,s)(n):null===n||Xr(n)||ni(n)||45!==n&&ei(n)?l(n):(i=!0,e.consume(n),a)}function s(n){return 95===n?o=!0:(r=o,o=void 0),e.consume(n),a}function l(e){return r||o||!i?t(e):n(e)}},partial:!0},rc={tokenize:function(e,n){let t=0,o=0;return r;function r(a){return 40===a?(t++,e.consume(a),r):41===a&&o<t?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(ic,n,i)(a):null===a||Xr(a)||ni(a)?n(a):(e.consume(a),r)}function i(n){return 41===n&&o++,e.consume(n),r}},partial:!0},ic={tokenize:function(e,n,t){return o;function o(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),o):38===a?(e.consume(a),i):93===a?(e.consume(a),r):60===a||null===a||Xr(a)||ni(a)?n(a):t(a)}function r(e){return null===e||40===e||91===e||Xr(e)||ni(e)?n(e):o(e)}function i(e){return Yr(e)?a(e):t(e)}function a(n){return 59===n?(e.consume(n),o):Yr(n)?(e.consume(n),a):t(n)}},partial:!0},ac={tokenize:function(e,n,t){return function(n){return e.consume(n),o};function o(e){return Vr(e)?t(e):n(e)}},partial:!0},sc={name:"wwwAutolink",tokenize:function(e,n,t){const o=this;return function(n){if(87!==n&&119!==n||!pc.call(o,o.previous)||bc(o.events))return t(n);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tc,e.attempt(oc,e.attempt(rc,r),t),t)(n)};function r(t){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(t)}},previous:pc},lc={name:"protocolAutolink",tokenize:function(e,n,t){const o=this;let r="",i=!1;return function(n){if((72===n||104===n)&&hc.call(o,o.previous)&&!bc(o.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(n),e.consume(n),a;return t(n)};function a(n){if(Yr(n)&&r.length<5)return r+=String.fromCodePoint(n),e.consume(n),a;if(58===n){const t=r.toLowerCase();if("http"===t||"https"===t)return e.consume(n),s}return t(n)}function s(n){return 47===n?(e.consume(n),i?l:(i=!0,s)):t(n)}function l(n){return null===n||Wr(n)||Xr(n)||ni(n)||ei(n)?t(n):e.attempt(oc,e.attempt(rc,c),t)(n)}function c(t){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(t)}},previous:hc},cc={name:"emailAutolink",tokenize:function(e,n,t){const o=this;let r,i;return function(n){if(!gc(n)||!fc.call(o,o.previous)||bc(o.events))return t(n);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(n)};function a(n){return gc(n)?(e.consume(n),a):64===n?(e.consume(n),s):t(n)}function s(n){return 46===n?e.check(ac,c,l)(n):45===n||95===n||Vr(n)?(i=!0,e.consume(n),s):c(n)}function l(n){return e.consume(n),r=!0,s}function c(a){return i&&r&&Yr(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(a)):t(a)}},previous:fc},uc={};let dc=48;for(;dc<123;)uc[dc]=cc,dc++,58===dc?dc=65:91===dc&&(dc=97);function pc(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Xr(e)}function hc(e){return!Yr(e)}function fc(e){return!(47===e||gc(e))}function gc(e){return 43===e||45===e||46===e||95===e||Vr(e)}function bc(e){let n=e.length,t=!1;for(;n--;){const o=e[n][1];if(("labelLink"===o.type||"labelImage"===o.type)&&!o._balanced){t=!0;break}if(o._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}uc[43]=cc,uc[45]=cc,uc[46]=cc,uc[95]=cc,uc[72]=[cc,lc],uc[104]=[cc,lc],uc[87]=[cc,sc],uc[119]=[cc,sc];const mc={tokenize:function(e,n,t){const o=this;return ri(e,function(e){const r=o.events[o.events.length-1];return r&&"gfmFootnoteDefinitionIndent"===r[1].type&&4===r[2].sliceSerialize(r[1],!0).length?n(e):t(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function vc(e,n,t){const o=this;let r=o.events.length;const i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a;for(;r--;){const e=o.events[r][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(r){if(!a||!a._balanced)return t(r);const s=Ur(o.sliceSerialize({start:a.end,end:o.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return t(r);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),n(r)}}function yc(e,n){let t,o=e.length;for(;o--;)if("labelImage"===e[o][1].type&&"enter"===e[o][0]){t=e[o][1];break}e[o+1][1].type="data",e[o+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[o+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[o+3][1].end),end:Object.assign({},e[o+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[o+1],e[o+2],["enter",r,n],e[o+3],e[o+4],["enter",i,n],["exit",i,n],["enter",a,n],["enter",s,n],["exit",s,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(o,e.length-o+1,...l),e}function xc(e,n,t){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i,a=0;return function(n){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(n),e.exit("gfmFootnoteCallLabelMarker"),s};function s(n){return 94!==n?t(n):(e.enter("gfmFootnoteCallMarker"),e.consume(n),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||Xr(s))return t(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return r.includes(Ur(o.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(s)}return Xr(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(n){return 91===n||92===n||93===n?(e.consume(n),a++,l):l(n)}}function wc(e,n,t){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i,a,s=0;return function(n){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(n),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(n){return 94===n?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(n),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):t(n)}function c(n){if(s>999||93===n&&!a||null===n||91===n||Xr(n))return t(n);if(93===n){e.exit("chunkString");const t=e.exit("gfmFootnoteDefinitionLabelString");return i=Ur(o.sliceSerialize(t)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(n),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Xr(n)||(a=!0),s++,e.consume(n),92===n?u:c}function u(n){return 91===n||92===n||93===n?(e.consume(n),s++,c):c(n)}function d(n){return 58===n?(e.enter("definitionMarker"),e.consume(n),e.exit("definitionMarker"),r.includes(i)||r.push(i),ri(e,p,"gfmFootnoteDefinitionWhitespace")):t(n)}function p(e){return n(e)}}function kc(e,n,t){return e.check(hi,n,e.attempt(mc,n,t))}function _c(e){e.exit("gfmFootnoteDefinition")}function Cc(e){let n=(e||{}).singleTilde;const t={name:"strikethrough",tokenize:function(e,t,o){const r=this.previous,i=this.events;let a=0;return function(n){if(126===r&&"characterEscape"!==i[i.length-1][1].type)return o(n);return e.enter("strikethroughSequenceTemporary"),s(n)};function s(i){const l=li(r);if(126===i)return a>1?o(i):(e.consume(i),a++,s);if(a<2&&!n)return o(i);const c=e.exit("strikethroughSequenceTemporary"),u=li(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),t(i)}},resolveAll:function(e,n){let t=-1;for(;++t<e.length;)if("enter"===e[t][0]&&"strikethroughSequenceTemporary"===e[t][1].type&&e[t][1]._close){let o=t;for(;o--;)if("exit"===e[o][0]&&"strikethroughSequenceTemporary"===e[o][1].type&&e[o][1]._open&&e[t][1].end.offset-e[t][1].start.offset===e[o][1].end.offset-e[o][1].start.offset){e[t][1].type="strikethroughSequence",e[o][1].type="strikethroughSequence";const r={type:"strikethrough",start:Object.assign({},e[o][1].start),end:Object.assign({},e[t][1].end)},i={type:"strikethroughText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[t][1].start)},a=[["enter",r,n],["enter",e[o][1],n],["exit",e[o][1],n],["enter",i,n]],s=n.parser.constructs.insideSpan.null;s&&Or(a,a.length,0,ci(s,e.slice(o+1,t),n)),Or(a,a.length,0,[["exit",i,n],["enter",e[t][1],n],["exit",e[t][1],n],["exit",r,n]]),Or(e,o-1,t-o+3,a),t=o+a.length-2;break}}t=-1;for(;++t<e.length;)"strikethroughSequenceTemporary"===e[t][1].type&&(e[t][1].type="data");return e}};return null==n&&(n=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}}}class Sc{constructor(){this.map=[]}add(e,n,t){!function(e,n,t,o){let r=0;if(0===t&&0===o.length)return;for(;r<e.map.length;){if(e.map[r][0]===n)return e.map[r][1]+=t,void e.map[r][2].push(...o);r+=1}e.map.push([n,t,o])}(this,e,n,t)}consume(e){if(this.map.sort(function(e,n){return e[0]-n[0]}),0===this.map.length)return;let n=this.map.length;const t=[];for(;n>0;)n-=1,t.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];t.push(e.slice()),e.length=0;let o=t.pop();for(;o;){for(const n of o)e.push(n);o=t.pop()}this.map.length=0}}function Ec(e,n){let t=!1;const o=[];for(;n<e.length;){const r=e[n];if(t){if("enter"===r[0])"tableContent"===r[1].type&&o.push("tableDelimiterMarker"===e[n+1][1].type?"left":"none");else if("tableContent"===r[1].type){if("tableDelimiterMarker"===e[n-1][1].type){const e=o.length-1;o[e]="left"===o[e]?"center":"right"}}else if("tableDelimiterRow"===r[1].type)break}else"enter"===r[0]&&"tableDelimiterRow"===r[1].type&&(t=!0);n+=1}return o}function Ic(e,n,t){const o=this;let r,i=0,a=0;return function(e){let n=o.events.length-1;for(;n>-1;){const e=o.events[n][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;n--}const r=n>-1?o.events[n][1].type:null,i="tableHead"===r||"tableRow"===r?x:s;if(i===x&&o.parser.lazy[o.now().line])return t(e);return i(e)};function s(n){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return r=!0,a+=1,l(e)}(n)}function l(n){return null===n?t(n):Qr(n)?a>1?(a=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),d):t(n):Jr(n)?ri(e,l,"whitespace")(n):(a+=1,r&&(r=!1,i+=1),124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),r=!0,l):(e.enter("data"),c(n)))}function c(n){return null===n||124===n||Xr(n)?(e.exit("data"),l(n)):(e.consume(n),92===n?u:c)}function u(n){return 92===n||124===n?(e.consume(n),c):c(n)}function d(n){return o.interrupt=!1,o.parser.lazy[o.now().line]?t(n):(e.enter("tableDelimiterRow"),r=!1,Jr(n)?ri(e,p,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):p(n))}function p(n){return 45===n||58===n?f(n):124===n?(r=!0,e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),h):y(n)}function h(n){return Jr(n)?ri(e,f,"whitespace")(n):f(n)}function f(n){return 58===n?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),g):45===n?(a+=1,g(n)):null===n||Qr(n)?v(n):y(n)}function g(n){return 45===n?(e.enter("tableDelimiterFiller"),b(n)):y(n)}function b(n){return 45===n?(e.consume(n),b):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(n))}function m(n){return Jr(n)?ri(e,v,"whitespace")(n):v(n)}function v(t){return 124===t?p(t):(null===t||Qr(t))&&r&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(t)):y(t)}function y(e){return t(e)}function x(n){return e.enter("tableRow"),w(n)}function w(t){return 124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),w):null===t||Qr(t)?(e.exit("tableRow"),n(t)):Jr(t)?ri(e,w,"whitespace")(t):(e.enter("data"),k(t))}function k(n){return null===n||124===n||Xr(n)?(e.exit("data"),w(n)):(e.consume(n),92===n?_:k)}function _(n){return 92===n||124===n?(e.consume(n),k):k(n)}}function Tc(e,n){let t,o,r,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Sc;for(;++i<e.length;){const h=e[i],f=h[1];"enter"===h[0]?"tableHead"===f.type?(u=!1,0!==d&&(Lc(p,n,d,t,o),o=void 0,d=0),t={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(i,0,[["enter",t,n]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(a=!0,r=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,o={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(i,0,[["enter",o,n]])),s="tableDelimiterRow"===f.type?2:o?3:1):!s||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type?"tableCellDivider"===f.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],r=Ac(p,n,l,s,void 0,r)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],r=Ac(p,n,l,s,void 0,r),l=[0,0,0,0]),c[2]=i)):"tableHead"===f.type?(u=!0,d=i):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=i,0!==l[1]?(c[0]=c[1],r=Ac(p,n,l,s,i,r)):0!==c[1]&&(r=Ac(p,n,c,s,i,r)),s=0):!s||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type||(c[3]=i)}for(0!==d&&Lc(p,n,d,t,o),p.consume(n.events),i=-1;++i<n.events.length;){const e=n.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Ec(n.events,i))}return e}function Ac(e,n,t,o,r,i){const a=1===o?"tableHeader":2===o?"tableDelimiter":"tableData";0!==t[0]&&(i.end=Object.assign({},Nc(n.events,t[0])),e.add(t[0],0,[["exit",i,n]]));const s=Nc(n.events,t[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(t[1],0,[["enter",i,n]]),0!==t[2]){const r=Nc(n.events,t[2]),i=Nc(n.events,t[3]),a={type:"tableContent",start:Object.assign({},r),end:Object.assign({},i)};if(e.add(t[2],0,[["enter",a,n]]),2!==o){const o=n.events[t[2]],r=n.events[t[3]];if(o[1].end=Object.assign({},r[1].end),o[1].type="chunkText",o[1].contentType="text",t[3]>t[2]+1){const n=t[2]+1,o=t[3]-t[2]-1;e.add(n,o,[])}}e.add(t[3]+1,0,[["exit",a,n]])}return void 0!==r&&(i.end=Object.assign({},Nc(n.events,r)),e.add(r,0,[["exit",i,n]]),i=void 0),i}function Lc(e,n,t,o,r){const i=[],a=Nc(n.events,t);r&&(r.end=Object.assign({},a),i.push(["exit",r,n])),o.end=Object.assign({},a),i.push(["exit",o,n]),e.add(t+1,0,i)}function Nc(e,n){const t=e[n],o="enter"===t[0]?"start":"end";return t[1][o]}const Fc=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi;new RegExp("^"+Fc.source,"i");const Pc={name:"tasklistCheck",tokenize:function(e,n,t){const o=this;return function(n){if(null!==o.previous||!o._gfmTasklistFirstContentOfListItem)return t(n);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),r};function r(n){return Xr(n)?(e.enter("taskListCheckValueUnchecked"),e.consume(n),e.exit("taskListCheckValueUnchecked"),i):88===n||120===n?(e.enter("taskListCheckValueChecked"),e.consume(n),e.exit("taskListCheckValueChecked"),i):t(n)}function i(n){return 93===n?(e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(n)}function a(o){return Qr(o)?n(o):Jr(o)?e.check({tokenize:Mc},n,t)(o):t(o)}}};function Mc(e,n,t){return ri(e,function(e){return null===e?t(e):n(e)},"whitespace")}const Dc={};function Oc(e){const n=e||Dc,t=this.data(),o=t.micromarkExtensions||(t.micromarkExtensions=[]),r=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),i=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);o.push(function(e){return Br([{text:uc},{document:{91:{name:"gfmFootnoteDefinition",tokenize:wc,continuation:{tokenize:kc},exit:_c}},text:{91:{name:"gfmFootnoteCall",tokenize:xc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vc,resolveTo:yc}}},Cc(e),{flow:{null:{name:"table",tokenize:Ic,resolveAll:Tc}}},{text:{91:Pc}}])}(n)),r.push([{transforms:[Js],enter:{literalAutolink:Ws,literalAutolinkEmail:Zs,literalAutolinkHttp:Zs,literalAutolinkWww:Zs},exit:{literalAutolink:Xs,literalAutolinkEmail:Qs,literalAutolinkHttp:Gs,literalAutolinkWww:Ks}},{enter:{gfmFootnoteCallString:ol,gfmFootnoteCall:rl,gfmFootnoteDefinitionLabelString:il,gfmFootnoteDefinition:al},exit:{gfmFootnoteCallString:sl,gfmFootnoteCall:ll,gfmFootnoteDefinitionLabelString:cl,gfmFootnoteDefinition:ul}},{canContainEols:["delete"],enter:{strikethrough:bl},exit:{strikethrough:ml}},{enter:{table:Vl,tableData:Gl,tableHeader:Gl,tableRow:Wl},exit:{codeText:Kl,table:ql,tableData:Zl,tableHeader:Zl,tableRow:Zl}},{exit:{taskListCheckValueChecked:Jl,taskListCheckValueUnchecked:Jl,paragraph:ec}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Vs,notInConstruct:qs},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Vs,notInConstruct:qs},{character:":",before:"[ps]",after:"\\/",inConstruct:Vs,notInConstruct:qs}]},pl(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:gl}],handlers:{delete:vl}},Xl(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nc}}]}}(n))}var zc=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t};const Rc=({children:e,forceMarkdown:n})=>e?!n&&(e=>!!e&&[/<[^>]+>/,/&[a-zA-Z0-9]+;/,/<\/[^>]+>/].some(n=>n.test(e)))(e)?kn("div",{className:"message-text",dangerouslySetInnerHTML:{__html:e}}):kn("div",{className:"message-text",children:kn(Os,{remarkPlugins:[Oc],components:{a:e=>{var{node:n}=e,t=zc(e,["node"]);return kn("a",Object.assign({},t,{target:"_blank",rel:"noopener noreferrer"}))}},children:e})}):null,Bc=({label:e})=>{const{agentLibrary:n}=po(),[,t]=n.opened;return kn("button",{className:"btn-base accordion-button",onClick:t.open,type:"button",id:"sidebar-button",children:e})},jc=()=>{const{accordionAnimated:e,functionsExpanded:n,setFunctionsExpanded:t,aboutAiExpanded:o,setAboutAiExpanded:r,availableLanguages:i,t:a,configData:{finalConfig:s}}=po();return kn("div",{className:"accordion-section",style:{opacity:e?1:0,transform:e?"translateY(0)":"translateY(20px)",transition:"all 0.6s ease-out"},children:[kn("div",{className:"accordion-buttons",style:{display:"flex",justifyContent:"center",alignItems:"flex-start",gap:"15px"},children:[me(()=>!0===s.stt||(!0===s.tts||(!0===s.easy_language||i.size>1)),[s,i])&&kn("button",{className:"btn-base accordion-button"+(n?" open":""),onClick:()=>{t(!n),o&&r(!1)},"aria-expanded":n,"aria-controls":"functions-content",type:"button",id:"functions-button",children:["Funktionen",kn(Sn,n?{svg:In}:{svg:En})]}),s.about&&kn("button",{className:"btn-base accordion-button"+(o?" open":""),onClick:()=>{r(!o),n&&t(!1)},"aria-expanded":o,"aria-controls":"about-ai-content",type:"button",id:"about-ai-button",children:["Über die KI",kn(Sn,o?{svg:In}:{svg:En})]})]}),s.sidebarButtonLabel&&kn("div",{style:{display:"flex",justifyContent:"center",marginTop:"15px"},children:kn(Bc,{label:s.sidebarButtonLabel})}),n&&kn("div",{id:"functions-content",className:"accordion-content",role:"region","aria-labelledby":"functions-button",children:kn("ul",{children:[!0===s.stt&&kn("li",{children:[kn("div",{className:"function-icon",children:kn(Mn,{type:"microphone"})}),kn("span",{children:[kn("strong",{children:"Spracheingabe:"})," Sprechen Sie Ihre Frage einfach über das Mikrofon ein."]})]}),!0===s.tts&&kn("li",{children:[kn("div",{className:"function-icon",children:kn(Mn,{type:"speaker"})}),kn("span",{children:[kn("strong",{children:"Vorlesen:"})," Lassen Sie sich die einzelnen Antworten vorlesen."]})]}),!0===s.easy_language&&kn("li",{children:[kn("div",{className:"function-icon",children:kn(Mn,{type:"chat"})}),kn("span",{children:[kn("strong",{children:"Verständliche Sprache:"})," Für einfachere und verständlichere Antworten"]})]}),i.size>1&&kn("li",{children:[kn("div",{className:"function-icon",children:kn(Mn,{type:"globe"})}),kn("span",{children:[kn("strong",{children:[a.languageSelection.title,":"]})," ",a.languageSelection.description]})]})]})}),o&&s.about&&kn("div",{id:"about-ai-content",className:"accordion-content",role:"region","aria-labelledby":"about-ai-button",children:kn(Rc,{children:s.about})})]})},Hc=({icon:e,title:n})=>e?kn("div",{className:"chatbot-logo",style:{textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center"},children:kn("img",{src:`${Rn}/assets/${e}`,alt:`Chatbot Icon - ${n||"Chatbot"}`,style:{maxHeight:"80px",width:"auto",height:"auto",objectFit:"contain"},role:"img","aria-label":"Chatbot Logo"})}):null,$c=({hide:e,icon:n,title:t,welcomeMessage:o,dimmed:r=!1})=>{const{entrySource:i,conversation:{isConversationActive:a},configData:{finalConfig:s}}=po();return e?null:kn("div","search"===i&&!a?{className:"welcome-section "+(r?"dimmed":""),children:[kn("h1",{id:"search-title",style:{margin:0,fontSize:"28px",fontWeight:"600",color:"var(--text-primary)",textAlign:"center",marginBottom:"16px"},children:"Suche"}),kn("p",{id:"search-description",style:{margin:0,fontSize:"16px",color:"var(--text-secondary)",textAlign:"center",marginBottom:"32px"},children:"Geben Sie Ihren Suchbegriff ein"})]}:{className:"welcome-section "+(r?"dimmed":""),children:[kn(Hc,{icon:n,title:t}),kn("h1",{id:"chat-title",className:"welcome-greeting",children:t}),kn("p",{id:"chat-description",className:"welcome-text",children:o}),kn("p",{id:"chat-description-fix",className:"welcome-text welcome-text--notification",children:[kn(Sn,{svg:Nn}),kn("span",{children:s.welcomeDisclaimer||"Bitte geben Sie keine persönlichen Daten an!"})]}),kn(jc,{})]})},Uc=(...e)=>e.filter(Boolean).join(" "),Yc=({})=>{const{conversation:{isConversationStarting:e,isConversationActive:n,inputAnimationState:t,sendMessageWithUI:o},entrySource:r,configData:{finalConfig:i}}=po(),a=me(()=>Uc("quick-buttons-container",e?"conversation-starting":"","fadeOut"===t?"quick-buttons-fade-out":""),[e,t]);return"search"===r||0===i.quickButtons.length||n?null:kn("div",{className:a,role:"group","aria-label":"Häufige Fragen",children:kn("div",{className:"quick-buttons-wrapper",children:i.quickButtons.map((e,n)=>kn("div",{className:"quick-button-wrapper",children:kn("button",{className:"btn-base quick-button",onClick:()=>o(e),type:"button","aria-label":`Häufige Frage: ${e}`,children:e})},n))})})},Vc=e=>{if(""===e.trim())return"";const n=e.replace(/\\n/g,"\n").split("\n"),t=[];let o=!1;const r=n.length;for(const[e,i]of n.entries()){const a=i.trim(),s=e<r-1?n[e+1]:"";a.startsWith("- ")?(o=!0,t.push(i)):a.startsWith("• ")?(o=!0,t.push(i.replace("• ","- "))):""===a&&o?s.startsWith("- ")||s.startsWith("• ")?t.push(i):(t.push(i),o=!1):(a.startsWith("- ")||a.startsWith("• ")||(o=!1),t.push(i))}return t.join("\n")},qc=({children:e,isThinking:n,sender:t})=>kn("div",{className:Uc("message-bubble",`${t}-message`,n?"thinking":""),role:"article","aria-label":("bot"===t?"Bot":"Benutzer")+"-Nachricht",children:e});var Wc=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Zc=({isFeedbackExpanded:e,isThinking:n,sender:t,foldFeedback:o,messageId:r})=>{const{showSuccess:i,showError:a}=xt(),{t:s,session:l}=po(),[c,u]=de(""),[d,{open:p,close:h}]=_n(),f=()=>Wc(void 0,void 0,void 0,function*(){if(c.trim()&&!d){p();try{if(void 0===r)return console.error("Feedback request invalid, no traceId"),void a(s.toast.feedbackError);e={comment:c,traceId:r},n=l.sessionState.sessionToken,Yn(void 0,void 0,void 0,function*(){const{traceId:t,comment:o}=e;if(!jn(t))throw new Error(`Invalid traceId - must be string (8-128 chars): ${t}`);if(!$n(o))throw new Error("Feedback comment is required and must be a non-empty string");const r=`${Bn}/api/rate`,i={traceId:t,name:"feedback",comment:o.trim()},a=yield fetch(r,zn(i,n));if(!a.ok){const e=yield a.text();throw new Error(`API request failed: ${a.status} - ${e}`)}return a}),u(""),o(),i(s.toast.feedbackSuccess,5e3),console.log("Feedback submitted successfully to AI-Gelb API")}catch(e){console.error("Feedback request failed:",e),a(s.toast.feedbackError)}finally{h()}var e,n}}),g=ve(e=>{"Enter"===e.key&&(e.preventDefault(),f())},[]);return"bot"!==t||n?null:e?void 0===r||""===r?null:kn("div",{className:"feedback-input-section",children:[kn("div",{className:"feedback-divider"}),kn("div",{className:"feedback-content",children:[kn("div",{className:"feedback-header",children:[kn("h4",{className:"feedback-title",children:s.feedback.title}),kn("button",{className:"btn-base feedback-close-button",onClick:o,"aria-label":s.feedback.close,title:s.feedback.closeTitle,children:kn(Sn,{svg:An})})]}),kn("div",{className:"feedback-input-container",children:[kn("input",{type:"text",id:`feedback-textarea-${r}`,className:"feedback-textarea",placeholder:s.feedback.placeholder,value:c,onChange:e=>u(e.target.value),onKeyDown:g,disabled:d,"aria-label":s.feedback.placeholder}),kn("button",{className:"btn-base feedback-submit-button "+(!c.trim()||d?"feedback-submit-button--disabled":""),onClick:f,disabled:!c.trim()||d,"aria-label":s.feedback.submitLabel,title:s.feedback.submitTitle,children:kn(Sn,{svg:Ln})})]})]})]}):null};var Gc=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Kc=({text:e,isComplete:n})=>{const{t}=po(),[o,r]=de(!1),i=ge(null);he(()=>()=>{i.current&&clearTimeout(i.current)},[]);const a=ve(()=>Gc(void 0,void 0,void 0,function*(){try{const n=(e=>e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`(.*?)`/g,"$1").replace(/#{1,6}\s/g,"").replace(/>\s/g,"").replace(/[-*+]\s/g,"").trim())(e);yield navigator.clipboard.writeText(n),r(!0),i.current=setTimeout(()=>r(!1),2e3)}catch(e){console.error("Failed to copy text:",e)}}),[e]);if(!n)return null;const s=o?t.copy.copied:t.copy.tooltip;return kn(Cn,{text:s,delay:300,children:kn("button",{className:"btn-base copy-button "+(o?"copy-button--copied":""),onClick:a,"aria-label":t.copy.ariaLabel,title:s,children:kn("span",{className:"copy-button__icon",children:kn(Sn,{svg:o?'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8.5L6.5 12L13 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>':'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M10.5 1H3.5C2.67157 1 2 1.67157 2 2.5V10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><rect x="5" y="4" width="9" height="11" rx="1.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'})})})})},Qc=({sender:e,isThinking:n,messageId:t,isComplete:o,isSimplified:r,isEasyLanguageEnabled:i,isTTSEnabled:a,expandFeedback:s,text:l,results:c,config:u})=>{const{t:d,configData:{finalConfig:p}}=po();if("bot"!==e)return null;if(n)return null;if(!t&&!a&&!i)return null;const h=me(()=>{if(null===c)return l;const e=c.map((e,n)=>`${d.search.result} ${n+1}:\n${e.title}\n${e.snippet}`);return e.join("\n\n\n")},[l,c,d]);return kn("div",{className:"message-actions",children:[kn("div",{className:"message-actions-left",children:[a&&kn(pt,{text:h,isComplete:o}),kn(at,{messageId:t||"",text:h,isSimplified:r,enabled:i}),p.copyEnabled&&kn(Kc,{text:h,isComplete:o})]}),t&&kn("div",{className:"message-actions-right",children:kn(rt,{traceId:t,config:u,onRatingSubmitted:s,onFeedbackOpen:s})})]})},Xc=({entry:e,last:n})=>kn("div",{style:{marginBottom:"24px",paddingBottom:"16px",borderBottom:n?void 0:"1px solid #e0e0e0"},children:[kn("h2",{style:{margin:"0 0 4px 0",fontSize:"18px",fontWeight:"400",lineHeight:"1.3"},children:kn("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--chat-ai-text-link)",textDecoration:"none",fontWeight:"700"},children:e.title})}),kn("div",{style:{fontSize:"14px",lineHeight:"1.4",color:"#6D6D6D"},children:e.snippet}),kn("h3",{style:{margin:"0 0 8px 0",fontSize:"14px",fontWeight:"400",color:"#6D6D6D",lineHeight:"1.3"},children:e.url})]}),Jc=({questions:e,isLoading:n})=>{const{conversation:{sendMessageWithUI:t},t:o}=po();return n||e&&0!==e.length?kn("div",{className:"follow-up-buttons",children:n?kn("div",{className:"follow-up-loading",children:[kn("span",{className:"follow-up-loading-text",children:o.followUp.loading}),kn("div",{className:"thinking-dots",children:[kn("span",{}),kn("span",{}),kn("span",{})]})]}):e.map((e,n)=>kn("button",{className:"follow-up-button",onClick:()=>t(e),"aria-label":o.followUp.ariaLabel,children:e},n))}):null},eu=({text:e,results:n,sender:t,isThinking:o,config:r,isComplete:i=!0,isSimplified:a=!1,messageId:s,followUpQuestions:l,isLoadingFollowUps:c})=>{var u,d;const[p,{open:h,close:f}]=_n(),g=!0===(null===(u=null==r?void 0:r.externalConfig)||void 0===u?void 0:u.tts),b=!0===(null===(d=null==r?void 0:r.externalConfig)||void 0===d?void 0:d.easy_language),m=me(()=>(e=>Vc(e).split("\n").map(e=>e.trim().startsWith("[")&&e.includes("Quelle:")?`> *${e.trim()}*`:e).join("\n"))(e),[e]);return kn(qc,{isThinking:!!o,sender:t,children:[""===e&&null!==n?kn(S,{children:[kn("h4",{children:n.introduction}),kn("div",{style:{margin:"35px 0 35px"},children:n.results.map((e,t)=>kn(Xc,{last:t===n.results.length-1,entry:e},t))}),kn("h4",{children:n["follow-up"]})]}):kn("div",{className:"message-text",children:o?kn("div",{className:"thinking-content",children:[kn("span",{className:"thinking-text",children:e}),kn("div",{className:"thinking-dots",children:[kn("span",{}),kn("span",{}),kn("span",{})]})]}):kn(Rc,{forceMarkdown:!0,children:m})}),kn(Qc,{isThinking:!!o,isComplete:i,isSimplified:a,messageId:s,sender:t,expandFeedback:h,isEasyLanguageEnabled:b,isTTSEnabled:g,text:e,results:(null==n?void 0:n.results)||null,config:r}),kn(Zc,{foldFeedback:f,isFeedbackExpanded:p,isThinking:!!o,messageId:s,sender:t}),"bot"===t&&kn(Jc,{questions:l,isLoading:c})]})},nu=({forceDisplay:e})=>{const{conversation:{isStreaming:n,streamingMessage:t}}=po();return n||e?kn("div",{className:"typing-indicator","aria-label":"Bot tippt...","aria-live":"polite",role:"status",children:kn("div",{className:"typing-content",children:[kn("div",{className:"typing-spinner"}),kn("div",{className:"typing-text",children:t})]})}):null},tu=({})=>{const{conversation:{messages:e,isStreaming:n},configData:{finalConfig:t},currentLanguage:o,isTextareaExpanded:r}=po(),i=ge(null),a=me(()=>Object.assign(Object.assign({},t),{currentLanguage:o}),[t,o]);return 0!==e.length||n?kn("div",{className:"chat-messages "+(r?"dimmed":""),role:"log","aria-live":"polite","aria-label":"Chat-Nachrichten",children:[e.map((e,n)=>{var o;return kn(eu,{text:e.text,results:(null===(o=e.json)||void 0===o?void 0:o.results)||null,sender:e.sender,isThinking:e.isThinking||!1,config:Object.assign(Object.assign({},a),{finalConfig:t}),isComplete:!1!==e.isComplete,isSimplified:e.isSimplified||!1,messageId:e.messageId,followUpQuestions:e.followUpQuestions,isLoadingFollowUps:e.isLoadingFollowUps},n)}),kn(nu,{}),kn("div",{ref:i})]}):null},ou=({setInputFromTranscription:e})=>{const{configData:{finalConfig:n},t,recording:{isRecording:o,isProcessing:r,startRecording:i}}=po(),a=me(()=>r?"btn-base stt-button stt-button--processing":"btn-base stt-button",[r]);return o||!0!==n.tts?null:kn(Cn,{text:t.stt.tooltip,delay:300,children:kn("button",{type:"button",className:a,onClick:()=>{r||o||(console.log("clicked record"),i(e))},disabled:r,"aria-label":r?t.stt.processing:t.stt.startRecording,children:kn(Sn,r?{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" ><circle cx="7" cy="7" r="2.5" fill="currentColor" /></svg>'}:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="19" viewBox="0 0 14 19" fill="none" ><path d="M7 12.75C7.99424 12.749 8.94747 12.3535 9.65051 11.6505C10.3535 10.9475 10.749 9.99424 10.75 9V4C10.75 3.00544 10.3549 2.05161 9.65165 1.34835C8.94839 0.645088 7.99456 0.25 7 0.25C6.00544 0.25 5.05161 0.645088 4.34835 1.34835C3.64509 2.05161 3.25 3.00544 3.25 4V9C3.25103 9.99424 3.64645 10.9475 4.34949 11.6505C5.05253 12.3535 6.00576 12.749 7 12.75ZM4.5 4C4.5 3.33696 4.76339 2.70107 5.23223 2.23223C5.70107 1.76339 6.33696 1.5 7 1.5C7.66304 1.5 8.29893 1.76339 8.76777 2.23223C9.23661 2.70107 9.5 3.33696 9.5 4V9C9.5 9.66304 9.23661 10.2989 8.76777 10.7678C8.29893 11.2366 7.66304 11.5 7 11.5C6.33696 11.5 5.70107 11.2366 5.23223 10.7678C4.76339 10.2989 4.5 9.66304 4.5 9V4ZM7.625 15.2188V17.75C7.625 17.9158 7.55915 18.0747 7.44194 18.1919C7.32473 18.3092 7.16576 18.375 7 18.375C6.83424 18.375 6.67527 18.3092 6.55806 18.1919C6.44085 18.0747 6.375 17.9158 6.375 17.75V15.2188C4.8341 15.062 3.40607 14.3393 2.36707 13.1907C1.32806 12.042 0.751903 10.5489 0.75 9C0.75 8.83424 0.815848 8.67527 0.933058 8.55806C1.05027 8.44085 1.20924 8.375 1.375 8.375C1.54076 8.375 1.69973 8.44085 1.81694 8.55806C1.93415 8.67527 2 8.83424 2 9C2 10.3261 2.52678 11.5979 3.46447 12.5355C4.40215 13.4732 5.67392 14 7 14C8.32608 14 9.59785 13.4732 10.5355 12.5355C11.4732 11.5979 12 10.3261 12 9C12 8.83424 12.0658 8.67527 12.1831 8.55806C12.3003 8.44085 12.4592 8.375 12.625 8.375C12.7908 8.375 12.9497 8.44085 13.0669 8.55806C13.1842 8.67527 13.25 8.83424 13.25 9C13.2481 10.5489 12.6719 12.042 11.6329 13.1907C10.5939 14.3393 9.1659 15.062 7.625 15.2188Z" fill="currentColor" /></svg>'})})})},ru=()=>{const{currentLanguage:e,setCurrentLanguage:n,availableLanguages:t,t:o,autoLanguage:r}=po(),[i,a]=_n(!1),[s,l]=_n(!1),[c,u]=de({bottom:55,left:"50%"}),d=ge(null),p=ge(null),h=ge(null),f=ge(!1);he(()=>{const e=e=>{i&&!f.current&&h.current&&!h.current.contains(e.target)&&a.close()},n=()=>{document.removeEventListener("mousedown",e)};if(!i)return n;const t=setTimeout(()=>{document.addEventListener("mousedown",e)},100);return()=>{clearTimeout(t),n()}},[i,a.close]),he(()=>{if(!i)return;if(null===p.current)return;const e=p.current.getBoundingClientRect(),n=window.innerHeight,t=e.top,o=n-e.bottom;u(t>200||t>o?{bottom:40,left:"50%"}:{top:40,left:"50%"})},[i]);const g=ve(e=>{n(e),l.open(),a.close()},[n,a.close,l.open]);return r||t.size<2?null:kn("div",{ref:h,className:"language-button-container",style:{zIndex:i?1e4:1},children:[kn(Cn,{text:o.languageSelection.tooltip,delay:300,children:kn("button",{ref:p,className:"btn-base language-button",onClick:e=>{e.preventDefault(),e.stopPropagation(),i?a.close():(f.current=!0,a.open(),setTimeout(()=>{f.current=!1},150))},type:"button","aria-label":`Aktuelle Sprache: ${e}. Klicken zum Ändern`,"aria-expanded":i,"aria-haspopup":"listbox",title:`Aktuelle Sprache: ${e}`,style:{display:"flex",alignItems:"center",gap:"6px"},children:[s?kn("span",{className:"language-button__flag",children:Pn(e)}):kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" style="flex-shrink: 0" ><path d="M8.99984 0.666626C7.35166 0.666626 5.7405 1.15537 4.37009 2.07105C2.99968 2.98672 1.93157 4.28821 1.30084 5.81093C0.670114 7.33365 0.505087 9.0092 0.82663 10.6257C1.14817 12.2422 1.94185 13.7271 3.10728 14.8925C4.27272 16.058 5.75758 16.8516 7.37409 17.1732C8.99059 17.4947 10.6662 17.3297 12.1889 16.699C13.7116 16.0682 15.0131 15.0001 15.9288 13.6297C16.8444 12.2593 17.3332 10.6481 17.3332 8.99996C17.3306 6.79062 16.4518 4.67251 14.8895 3.11027C13.3273 1.54803 11.2092 0.669221 8.99984 0.666626ZM15.6641 5.89538H12.365C11.9718 4.37976 11.2546 2.96742 10.2629 1.75568C11.4294 1.96136 12.5292 2.44493 13.4694 3.16549C14.4095 3.88605 15.1623 4.82241 15.6641 5.89538ZM16.3528 8.99996C16.3533 9.71954 16.2479 10.4353 16.0399 11.1241H12.5791C12.8177 9.71807 12.8177 8.28185 12.5791 6.87578H16.0399C16.2479 7.56463 16.3533 8.28038 16.3528 8.99996ZM8.99984 16.1756C8.52787 15.6942 8.11158 15.1611 7.75883 14.5866C7.28279 13.8122 6.91292 12.9774 6.65915 12.1045H11.3405C11.0868 12.9774 10.7169 13.8122 10.2409 14.5866C9.8881 15.1611 9.47181 15.6942 8.99984 16.1756ZM6.42223 11.1241C6.15533 9.72059 6.15533 8.27932 6.42223 6.87578H11.5775C11.8443 8.27932 11.8443 9.72059 11.5775 11.1241H6.42223ZM1.6469 8.99996C1.64635 8.28038 1.75178 7.56463 1.95981 6.87578H5.42059C5.18203 8.28185 5.18203 9.71807 5.42059 11.1241H1.95981C1.75178 10.4353 1.64635 9.71954 1.6469 8.99996ZM8.99984 1.82431C9.47181 2.30576 9.8881 2.8388 10.2409 3.41336C10.7169 4.18773 11.0868 5.02253 11.3405 5.89538H6.65915C6.91292 5.02253 7.28279 4.18773 7.75883 3.41336C8.11158 2.8388 8.52787 2.30576 8.99984 1.82431ZM7.73677 1.75568C6.74508 2.96742 6.0279 4.37976 5.63464 5.89538H2.33563C2.8374 4.82241 3.59018 3.88605 4.53031 3.16549C5.47044 2.44493 6.57026 1.96136 7.73677 1.75568ZM2.33563 12.1045H5.63464C6.0279 13.6202 6.74508 15.0325 7.73677 16.2442C6.57026 16.0386 5.47044 15.555 4.53031 14.8344C3.59018 14.1139 2.8374 13.1775 2.33563 12.1045ZM10.2605 16.2442C11.253 15.0327 11.971 13.6204 12.365 12.1045H15.6641C15.1623 13.1775 14.4095 14.1139 13.4694 14.8344C12.5292 15.555 11.4294 16.0386 10.2629 16.2442H10.2605Z" fill="currentColor" /></svg>'}),kn("span",{className:"language-button__text",children:o.languageSelection.buttonText})]})}),i&&kn("div",{ref:d,className:"language-dropdown",role:"listbox","aria-label":"Sprachauswahl",onMouseDown:e=>{e.stopPropagation()},style:Object.assign(Object.assign({},c.top?{top:c.top}:{bottom:c.bottom}),{left:c.left,transform:"translateX(-50%)"}),children:Array.from(t).map((n,t)=>kn("button",{className:"language-option "+(e===n?"active":""),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),console.log("Option clicked:",n),g(n)},type:"button",role:"option","aria-selected":e===n,"aria-label":`Sprache wechseln zu ${n}`,children:[kn("span",{children:Pn(n)}),kn("span",{children:n})]},t))})]})},iu=()=>{const{configData:{finalConfig:e},conversation:{mode:n,setMode:t},t:o}=po(),r=[{value:"chat",label:o.search.search,icon:Tn},{value:"search",label:o.search.chat,icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-search"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" /><path d="M21 21l-6 -6" /></svg>'}];if(!e.searchEnabled)return null;const i=r.find(e=>e.value===n);return kn(Cn,{text:i.label,delay:300,children:kn("button",{className:"btn-base stt-button",onClick:()=>{t("chat"===n?"search":"chat")},type:"button","aria-label":`Current mode: ${i.label}. Click to toggle`,title:i.label,style:{backgroundColor:"search"===n?"var(--button-bg-hover)":void 0},children:kn(Sn,{svg:i.icon,style:{height:"20px",width:"20px"}})})})},au=()=>{const{isDarkMode:e,toggleDarkMode:n,configData:{finalConfig:t}}=po();if(!t.dark_mode)return null;return kn(Cn,{text:e?"Light Mode":"Dark Mode",delay:300,children:kn("button",{type:"button",className:"btn-base stt-button",onClick:()=>{n()},"aria-label":e?"Switch to Light Mode":"Switch to Dark Mode",title:e?"Light Mode":"Dark Mode",children:kn(Sn,{svg:e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="12" cy="12" r="5"></circle>\n <line x1="12" y1="1" x2="12" y2="3"></line>\n <line x1="12" y1="21" x2="12" y2="23"></line>\n <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>\n <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>\n <line x1="1" y1="12" x2="3" y2="12"></line>\n <line x1="21" y1="12" x2="23" y2="12"></line>\n <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>\n <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>\n</svg>\n':'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>\n</svg>\n',style:{height:"20px",width:"20px"}})})})},su=/iPad|iPhone|iPod/.test(navigator.userAgent),lu=()=>{const e=ge(null),{configData:{finalConfig:n},closeChat:t,entrySource:o,isTextareaExpanded:r,setIsTextareaExpanded:i,conversation:{sendMessageFromInput:a,isInputEmpty:s,resetConversation:l,setInputText:c,inputText:u,isConversationActive:d,mode:p}}=po(),h=ct(n.defaultLanguage||"Deutsch"),f=ve(e=>{c(e.target.value)},[]),g=()=>{l(),t()},b=ve(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),a()),"Escape"===e.key&&(e.preventDefault(),g())},[g,a]),m=ve(()=>{if(su){const e=document.querySelector(".chat-overlay");if(e){const n=e.scrollTop;setTimeout(()=>{e.scrollTop=n},0)}}},[]);yn.useEffect(()=>{const n=e.current;n&&(r?(n.style.height="60vh",n.style.maxHeight="60vh",setTimeout(()=>n.focus(),100)):(n.style.height="auto",n.style.maxHeight="280px",n.style.height=Math.min(n.scrollHeight,280)+"px"))},[u,r]);const v=me(()=>"chat"!==o&&!d,[o,d]);return kn("div",{className:"input-wrapper",role:"group","aria-label":"Nachricht senden",style:{position:"relative",minHeight:"auto"},children:[kn("textarea",{ref:e,className:"chat-input",placeholder:n.placeholder,value:u,onChange:f,onKeyDown:b,onFocus:m,rows:1,inputMode:"text","aria-label":"Nachricht eingeben","aria-describedby":"send-button-description",style:Object.assign({width:"100%",minHeight:"46px",maxHeight:r?"60vh":"280px",overflowY:"auto",resize:"none",boxSizing:"border-box"},v?{paddingLeft:"60px",paddingRight:"100px"}:{paddingRight:u.trim().length>0||r?"50px":"100px",paddingBottom:!0===n.stt||n.languages&&""!==n.languages.trim()?"35px":"8px",marginBottom:!0===n.stt||n.languages&&""!==n.languages.trim()?"55px":"0px"})}),"search"!==p&&(u.trim().length>0||r)&&kn("button",{className:"btn-base expand-button",onClick:()=>i(!r),type:"button","aria-label":r?h.input.collapse:h.input.expand,style:{position:"absolute",top:"12px",right:"12px",zIndex:10,width:"28px",height:"28px",padding:"6px",display:"flex",alignItems:"center",justifyContent:"center"},children:kn(Sn,{svg:r?'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">\n <polyline points="4 14 10 14 10 20" />\n <polyline points="20 10 14 10 14 4" />\n <line x1="14" y1="10" x2="21" y2="3" />\n <line x1="3" y1="21" x2="10" y2="14" />\n</svg>\n':'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">\n <polyline points="15 3 21 3 21 9" />\n <polyline points="9 21 3 21 3 15" />\n <line x1="21" y1="3" x2="14" y2="10" />\n <line x1="3" y1="21" x2="10" y2="14" />\n</svg>\n'})}),v?kn("div",{style:{position:"absolute",left:"15px",bottom:"10px",zIndex:10,display:"flex",gap:"10px",alignItems:"center"},children:kn(ou,{setInputFromTranscription:c})}):(!0===(null==n?void 0:n.stt)||n.languages&&""!==n.languages.trim())&&kn("div",{style:{position:"absolute",left:v?void 0:"15px",right:v?"105px":void 0,bottom:"10px",zIndex:10,display:"flex",gap:"10px",alignItems:"center"},children:[kn(ou,{setInputFromTranscription:c}),kn(iu,{}),kn(ru,{}),kn(au,{})]}),kn("button",{className:"btn-base send-button",onClick:a,disabled:s||void 0,type:"button","aria-label":"Nachricht senden",id:"send-button-description",style:{bottom:v?"10px":void 0},children:kn(Sn,{svg:Ln})})]})},cu=e=>{const n=Date.now()-e,t=Math.floor(n/6e4),o=Math.floor(n/36e5),r=Math.floor(n/864e5);if(t<1)return"gerade eben";if(t<60)return`vor ${t} Min.`;if(o<24)return`vor ${o} Std.`;if(r<7)return`vor ${r} Tag${r>1?"en":""}`;return new Date(e).toLocaleDateString("de-DE",{day:"2-digit",month:"2-digit"})};var uu=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const du=({agentId:e,id:n,preview:t,lastMessageAt:o})=>{var r;const{t:i,agentLibrary:a,conversation:{loadConversationFromMessages:s}}=po(),[l,c]=a.opened,u=ve(e=>uu(void 0,void 0,void 0,function*(){try{const n=yield a.loadConversation(e);s(n,e),c.close()}catch(e){console.error("Failed to load conversation:",e)}}),[c.close,a,s]),d=ve(n=>{a.removeConversation(e,n)},[a,e]);return kn("div",{className:"spotlight-conversation-item-wrapper",children:[kn("button",{className:"spotlight-conversation-item",onClick:()=>u(n),disabled:a.isLoadingConversation,type:"button",children:[kn("span",{className:"conversation-label",children:t||(null===(r=i.sidebar)||void 0===r?void 0:r.conversation)||"Gespräch"}),kn("span",{className:"conversation-time",children:cu(o)})]}),kn("button",{className:"spotlight-conversation-delete btn-base",onClick:e=>{e.stopPropagation(),d(n)},type:"button","aria-label":"Gespräch löschen",children:kn(Sn,{svg:An})})]})},pu=({agentId:e})=>{var n;const{t,agentLibrary:o}=po(),r=o.getConversationsForAgent(e);return 0===r.length?null:kn(S,{children:[kn("div",{className:"spotlight-divider"}),kn("p",{className:"spotlight-section-heading",children:(null===(n=t.sidebar)||void 0===n?void 0:n.pastConversations)||"Vergangene Gespräche"}),kn("div",{className:"spotlight-conversations-list",children:r.map(n=>kn(du,{agentId:e,id:n.id,lastMessageAt:n.lastMessageAt,preview:n.preview},n.id))})]})},hu=()=>{var e;const{t:n}=po();return kn("div",{className:"spotlight-loading",children:(null===(e=n.sidebar)||void 0===e?void 0:e.loadingAgents)||"Laden..."})},fu=({agent:e})=>{const n=e.link&&""!==e.link.trim();return kn("a",{href:n?e.link:void 0,className:"spotlight-agent-tile"+(n?"":" disabled"),"aria-disabled":!n,children:[e.icon&&kn("img",{className:"spotlight-agent-icon",src:`${Rn}/assets/${e.icon}`}),kn("span",{className:"spotlight-agent-title",children:e.title}),kn("span",{className:"spotlight-agent-subtitle",children:e.welcome_title})]})},gu=({isLoadingAgents:e,siblingAgents:n})=>{const{configData:{finalConfig:t}}=po();return 0!=n.length||e?kn(S,{children:[kn("div",{className:"spotlight-divider"}),t.sidebarHeading&&kn("p",{className:"spotlight-section-heading",children:t.sidebarHeading}),e?kn(hu,{}):kn("div",{className:"spotlight-agents-grid",children:n.map(e=>kn(fu,{agent:e},e.id))})]}):null},bu=()=>{var e;const{t:n,agentLibrary:t,conversation:{resetConversation:o}}=po(),[r,i]=t.opened;return kn("button",{className:"spotlight-new-chat-button",onClick:ve(()=>{o(),i.close()},[o,i.close]),type:"button",children:[kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>\n'}),kn("span",{children:(null===(e=n.sidebar)||void 0===e?void 0:e.newChat)||"Neuen Chat starten"})]})},mu=()=>{const{agentLibrary:e,configData:{finalConfig:n},session:t}=po(),[o,r]=e.opened,i=me(()=>null===n.agentId?0:parseInt(n.agentId),[n.agentId]),a=n.applicationId,[s,l]=de([]),[c,u]=de(!1);return he(()=>{const e=t.sessionState.sessionToken;o&&a&&e&&(u(!0),((e,n)=>Wn(void 0,void 0,void 0,function*(){const t=`${Bn}/api/agents?application=${e}`,o=yield fetch(t,On(n));if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return(yield o.json()).agents}))(a,e).then(e=>{const n=e.filter(e=>e.id!==i);l(n)}).catch(e=>{console.error("Failed to load sibling agents:",e),l([])}).finally(()=>{u(!1)}))},[o,a,i,t.sessionState.sessionToken]),kn(S,{children:[kn(bu,{}),kn(pu,{agentId:i}),kn(gu,{isLoadingAgents:c,siblingAgents:s})]})},vu=()=>{const{agentLibrary:e,configData:{finalConfig:n}}=po(),[t,o]=e.opened;return me(()=>!!n.showSidebarMenu||null!==n.sidebarButtonLabel,[n.showSidebarMenu,n.sidebarButtonLabel])?kn(mt,{isOpen:t,onClose:o.close,children:kn(mu,{})}):null},yu=()=>{const{agentLibrary:{opened:e}}=po(),[n,t]=e;return kn(bt,{onClick:t.open})},xu=()=>{const{isOpen:e,configData:{finalConfig:n},isScrolled:t,setIsScrolled:o,inputAnimationState:r,isTextareaExpanded:i,closeChat:a,auth:s,conversation:{isConversationActive:l,resetConversation:c}}=po(),u=n.locked_behind_login&&s.authState.isAuthenticated,d=ge(null);he(()=>{if(!e||!d.current)return;const n=()=>{if(d.current){const e=d.current.scrollTop>50;e!==t&&o(e)}},r=d.current;return r.addEventListener("scroll",n),n(),()=>{r&&r.removeEventListener("scroll",n)}},[e,t]),he(()=>{if(e&&d.current){const e=d.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(e.length>0){const t=n.closable?d.current.querySelector(".close-button-floating"):null;t?t.focus():e[0].focus()}else d.current.focus();const t=n=>{if("Tab"===n.key){const t=Array.from(e),o=t[0],r=t[t.length-1];n.shiftKey?document.activeElement===o&&(r.focus(),n.preventDefault()):document.activeElement===r&&(o.focus(),n.preventDefault())}};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}},[e,n.closable]);const p=()=>{c(),a()};return kn("div",{className:"chat-overlay "+(t?"scrolled":""),ref:d,role:"dialog","aria-modal":"true","aria-labelledby":"chat-title","aria-describedby":"chat-description",onKeyDown:e=>{"Escape"===e.key&&n.closable&&(e.preventDefault(),p())},tabIndex:-1,children:[kn(gt,{logo:n.logo,title:n.title}),kn("div",{className:"header-buttons-container",children:[n.showSidebarMenu&&kn(yu,{}),u&&kn(ft,{onClick:s.logout}),n.closable&&kn(ht,{onClick:p})]}),kn(vu,{}),kn("div",{className:"chat-container",children:kn("div",{className:"chat-area "+(l?"conversation-active":""),role:"main",children:[kn($c,{hide:l,icon:n.icon,title:n.title,welcomeMessage:n.welcomeMessage,dimmed:i}),kn(tu,{}),kn("div",{className:`chat-input-section ${l?"conversation-active":"no-conversation"} input-animation-${r} ${i?"input-expanded-sticky":""}`,children:[kn(Yc,{}),kn(lu,{})]}),kn(bo,{})]})})]})};var wu=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const ku=({setViewMode:e})=>{const n=ve(()=>e("forgotPassword"),[e]),t=ve(()=>e("register"),[e]),{t:o,auth:r}=po(),[i,a]=de(!1),[s,l]=de(""),[c,u]=de(""),[d,p]=de(""),[h,f]=de(""),g=ve(e=>wu(void 0,void 0,void 0,function*(){if(e.preventDefault(),l(""),u(""),d.trim())if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d))if(h.trim()){a(!0);try{const e=yield r.login(d,h);e.success||l(e.error||o.auth.error.loginFailed)}catch(e){l(o.auth.error.networkError)}finally{a(!1)}}else l(o.auth.error.emptyPassword);else l(o.auth.error.invalidEmail);else l(o.auth.error.emptyEmail)}),[d,h,r,o]);return kn("div",{className:"login-form-container",children:[kn("div",{className:"login-form-header",children:[kn(Sn,{svg:Fn,style:{width:"32px",height:"32px"}}),kn("h2",{children:o.auth.loginTitle})]}),kn("form",{onSubmit:g,className:"login-form",children:[kn("div",{className:"form-group",children:[kn("label",{htmlFor:"email",children:o.auth.emailLabel}),kn("input",{id:"email",type:"email",value:d,onChange:e=>p(e.target.value),placeholder:o.auth.emailPlaceholder,disabled:i,autoComplete:"email"})]}),kn("div",{className:"form-group",children:[kn("label",{htmlFor:"password",children:o.auth.passwordLabel}),kn("input",{id:"password",type:"password",value:h,onChange:e=>f(e.target.value),placeholder:o.auth.passwordPlaceholder,disabled:i,autoComplete:"current-password"})]}),c&&kn("div",{className:"login-success",children:c}),s&&kn("div",{className:"login-error",children:s}),kn("button",{type:"submit",className:"login-submit-button",disabled:i,children:i?"...":o.auth.loginButton}),kn("button",{type:"button",className:"login-toggle-button",onClick:n,disabled:i,children:o.auth.forgotPassword}),kn("button",{type:"button",className:"login-toggle-button",onClick:t,disabled:i,children:o.auth.switchToRegister})]})]})};var _u=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Cu=({setViewMode:e})=>{const n=ve(()=>e("login"),[e]),{t,auth:o,configData:r}=po(),[i,a]=de(!1),[s,l]=de(""),[c,u]=de(""),[d,p]=de(""),[h,f]=de(""),g=r.finalConfig.agentId,b=ve(e=>_u(void 0,void 0,void 0,function*(){if(null!==g)if(e.preventDefault(),l(""),u(""),d.trim())if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d))if(h.trim()){a(!0);try{const e=yield o.register(d,h,g);e.success&&e.needsVerification?(u(t.auth.verificationSent),f("")):e.success||l(e.error||t.auth.error.registerFailed)}catch(e){l(t.auth.error.networkError)}finally{a(!1)}}else l(t.auth.error.emptyPassword);else l(t.auth.error.invalidEmail);else l(t.auth.error.emptyEmail)}),[d,h,o,g,t]);return kn("div",{className:"login-form-container",children:[kn("div",{className:"login-form-header",children:[kn(Sn,{svg:Fn,style:{width:"32px",height:"32px"}}),kn("h2",{children:t.auth.registerTitle})]}),kn("form",{onSubmit:b,className:"login-form",children:[kn("div",{className:"form-group",children:[kn("label",{htmlFor:"email",children:t.auth.emailLabel}),kn("input",{id:"email",type:"email",value:d,onChange:e=>p(e.target.value),placeholder:t.auth.emailPlaceholder,disabled:i,autoComplete:"email"})]}),kn("div",{className:"form-group",children:[kn("label",{htmlFor:"password",children:t.auth.passwordLabel}),kn("input",{id:"password",type:"password",value:h,onChange:e=>f(e.target.value),placeholder:t.auth.passwordPlaceholder,disabled:i,autoComplete:"new-password"})]}),c&&kn("div",{className:"login-success",children:c}),s&&kn("div",{className:"login-error",children:s}),kn("button",{type:"submit",className:"login-submit-button",disabled:i,children:i?"...":t.auth.registerButton}),kn("button",{type:"button",className:"login-toggle-button",onClick:n,disabled:i,children:t.auth.switchToLogin})]})]})};var Su=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Eu=({setViewMode:e})=>{const n=ve(()=>e("login"),[e]),{t,auth:o,configData:r}=po(),[i,a]=de(!1),[s,l]=de(""),[c,u]=de(""),[d,p]=de(""),h=r.finalConfig.agentId,f=ve(e=>Su(void 0,void 0,void 0,function*(){if(null!==h)if(e.preventDefault(),l(""),u(""),d.trim())if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d)){a(!0);try{const e=yield fetch(`${Bn}/api/agent-auth/reset/request`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:d})});if(e.ok)u(t.auth.resetEmailSent),p("");else{const n=yield e.json();l(n.error||t.auth.error.resetFailed)}}catch(e){l(t.auth.error.networkError)}finally{a(!1)}}else l(t.auth.error.invalidEmail);else l(t.auth.error.emptyEmail)}),[d,o,h,t]);return kn("div",{className:"login-form-container",children:[kn("div",{className:"login-form-header",children:[kn(Sn,{svg:Fn,style:{width:"32px",height:"32px"}}),kn("h2",{children:t.auth.forgotPasswordTitle}),kn("p",{className:"login-form-subtitle",children:t.auth.forgotPasswordSubtitle})]}),kn("form",{onSubmit:f,className:"login-form",children:[kn("div",{className:"form-group",children:[kn("label",{htmlFor:"email",children:t.auth.emailLabel}),kn("input",{id:"email",type:"email",value:d,onChange:e=>p(e.target.value),placeholder:t.auth.emailPlaceholder,disabled:i,autoComplete:"email"})]}),c&&kn("div",{className:"login-success",children:c}),s&&kn("div",{className:"login-error",children:s}),kn("button",{type:"submit",className:"login-submit-button",disabled:i,children:i?"...":t.auth.resetButton}),kn("button",{type:"button",className:"login-toggle-button",onClick:n,disabled:i,children:t.auth.backToLogin})]})]})},Iu=()=>{const[e,n]=de("login");return kn("div",{className:"login-overlay",children:[kn("div",{className:"login-overlay-backdrop"}),kn("div",{className:"login-overlay-content",children:["login"===e&&kn(ku,{setViewMode:n}),"register"===e&&kn(Cu,{setViewMode:n}),"forgotPassword"===e&&kn(Eu,{setViewMode:n})]})]})};var Tu=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Au=()=>{var e,n,t;const{session:o,t:r}=po();if(!o.sessionState.sessionError)return null;return kn("div",{className:"session-error-overlay",children:[kn("div",{className:"session-error-overlay-backdrop"}),kn("div",{className:"session-error-overlay-content",children:[kn("div",{className:"session-error-icon",children:kn("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[kn("circle",{cx:"12",cy:"12",r:"10"}),kn("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),kn("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),kn("h2",{className:"session-error-title",children:(null===(e=r.sessionError)||void 0===e?void 0:e.title)||"Session Expired"}),kn("p",{className:"session-error-message",children:(null===(n=r.sessionError)||void 0===n?void 0:n.message)||"Your session has expired. Please try again."}),kn("button",{className:"session-error-button",onClick:()=>Tu(void 0,void 0,void 0,function*(){o.clearError(),o.sessionState.isLocked||(yield o.establish())}),type:"button",children:(null===(t=r.sessionError)||void 0===t?void 0:t.retry)||"Try Again"})]})]})},Lu=()=>{const{isOpen:e,setIsOpen:n,openChat:t,auth:o,session:r,configData:{finalConfig:i,configLoaded:a}}=po(),s=!0===r.sessionState.isLocked&&!o.authState.isAuthenticated;he(()=>{if(!a)return;"#open-aigelb"===window.location.hash&&(t(),window.history.replaceState(null,"",window.location.pathname+window.location.search))},[a,t]),he(()=>{const t=()=>n(!0),o=()=>{i.closable?n(!1):console.warn("Chatbot closing is disabled via configuration (closable: false)")},r=()=>{!e||i.closable?n(!e):console.warn("Chatbot closing is disabled via configuration (closable: false)")};return document.addEventListener("chatbot-open",t),document.addEventListener("chatbot-close",o),document.addEventListener("chatbot-toggle",r),()=>{document.removeEventListener("chatbot-open",t),document.removeEventListener("chatbot-close",o),document.removeEventListener("chatbot-toggle",r)}},[e,n,i.closable]);return a||s?kn(S,{children:[i.showChatButton&&kn(go,{onOpen:t,openerHeadline:i.openerHeadline,openerSubtitle:i.openerSubtitle,snippetIcon:i.snippetIcon,position:i.openerPosition,autoDismissMs:i.openerAutoDismissMs,persistDismiss:i.persistDismiss}),e&&kn(S,{children:[kn(xu,{}),s&&kn(Iu,{}),kn(Au,{})]}),kn(fo,{})]}):null};var Nu=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};class Fu extends HTMLElement{constructor(){super(),this.entrySource="chat",console.log("🤖 AIgelb Chatbot Widget v9.2.2 loaded"),this.customCSS="",this.darkModeEnabled=!1,this.attachShadow({mode:"open"});const e={agentId:(n=this).getAttribute("agent-id")||null,languages:n.getAttribute("languages")||null,defaultLanguage:n.getAttribute("default-language")||"Deutsch",showChatButton:"false"!==n.getAttribute("show-chat-button")};var n;this.themeConfig={colors:{brand:{"Yellow-300":"rgb(254, 235, 86)","Yellow-50":"rgb(254, 253, 232)","Yellow-700":"rgb(235, 191, 7)",Cream:"rgb(252, 250, 248)",Purple:"rgb(40, 16, 54)"},neutrals:{"neutral-000":"rgb(255, 255, 255)","neutral-050":"rgb(246, 246, 246)","neutral-100":"rgb(231, 231, 231)","neutral-200":"rgb(209, 209, 209)","neutral-300":"rgb(176, 176, 176)","neutral-400":"rgb(136, 136, 136)","neutral-500":"rgb(109, 109, 109)","neutral-600":"rgb(93, 93, 93)","neutral-700":"rgb(79, 79, 79)","neutral-800":"rgb(69, 69, 69)","neutral-900":"rgb(61, 61, 61)","neutral-950":"rgb(34, 34, 34)"},system:{Green:"rgb(46, 219, 75)","Green-light":"rgb(209, 255, 217)",Red:"rgb(255, 82, 82)","Red-light":"rgb(255, 184, 184)",Yellow:"rgb(255, 176, 55)",Blue:"rgb(59, 158, 255)","Yellow-light":"rgb(255, 247, 235)","Blue-light":"rgb(235, 245, 255)"}},lightMode:{welcome:{"welcome-text":"colors:neutrals/neutral-950","welcome-headline":"colors:brand/Purple","welcome-icon":"colors:neutrals/neutral-950","welcome-link":"colors:brand/Purple"},chat:{"chat-user-bg":"colors:neutrals/neutral-000","chat-ai-bg":"colors:neutrals/neutral-000","chat-user-border":"colors:neutrals/neutral-200","chat-user-text":"colors:neutrals/neutral-950","chat-ai-border":"colors:neutrals/neutral-200","chat-ai-text":"colors:neutrals/neutral-950","chat-ai-text-link":"colors:brand/Purple","chat-ai-headline":"colors:neutrals/neutral-950","chat-input-bg":"colors:neutrals/neutral-000","chat-input-border":"colors:neutrals/neutral-200","chat-input-border-hover":"colors:neutrals/neutral-400","chat-input-border-focus":"colors:brand/Purple","chat-input-text":"colors:neutrals/neutral-500"},surface:{"surface-bg":"colors:brand/Cream","surface-layer-bg":"colors:neutrals/neutral-800","surface-modal-bg":"colors:neutrals/neutral-000"},logo:{"logo-ai-gelb":"colors:neutrals/neutral-950"},tooltip:{"tooltip-bg":"colors:brand/Purple","tooltip-text":"colors:neutrals/neutral-000","tooltip-border":"colors:brand/Purple"},button:{main:{"button-bg":"colors:brand/Yellow-50","button-bg-hover":"colors:brand/Yellow-300","button-bg-active":"colors:brand/Yellow-300","button-icon":"colors:brand/Purple","button-icon-hover":"colors:brand/Purple","button-icon-active":"colors:brand/Purple","button-text":"colors:brand/Purple","button-text-hover":"colors:brand/Purple","button-text-active":"colors:brand/Purple","button-border":"colors:brand/Yellow-700","button-border-hover":"colors:brand/Yellow-700","button-border-active":"colors:brand/Yellow-700"},start:{"button-start-bg":"colors:brand/Yellow-50","button-start-bg-hover":"colors:brand/Yellow-50","button-start-headline":"colors:neutrals/neutral-950","button-start-headline-hover":"colors:neutrals/neutral-950","button-start-text":"colors:neutrals/neutral-950","button-start-text-hover":"colors:neutrals/neutral-950","button-start-icon":"colors:brand/Purple","button-start-icon-hover":"colors:brand/Purple","button-start-border":"colors:brand/Yellow-300","button-start-border-hover":"colors:brand/Yellow-700"},suggestion:{"button-suggestion-bg":"colors:brand/Yellow-300","button-suggestion-bg-hover":"colors:brand/Yellow-50","button-suggestion-text":"colors:neutrals/neutral-950","button-suggestion-text-hover":"colors:neutrals/neutral-950","button-suggestion-border":"colors:brand/Yellow-300","button-suggestion-border-hover":"colors:brand/Yellow-700"},sprache:{"sprache-bg":"colors:neutrals/neutral-000","sprache-bg-hover":"colors:neutrals/neutral-050","sprache-text":"colors:brand/Purple","sprache-text-hover":"colors:brand/Purple","sprache-flyout-bg":"colors:neutrals/neutral-000"},text:{"button-textbutton-text":"colors:brand/Purple","button-textbutton-text-hover":"colors:brand/Purple","button-textbutton-icon":"colors:brand/Purple","button-textbutton-icon-hover":"colors:brand/Purple"},"chat-submit":{"cs-bg":"colors:brand/Yellow-50","cs-bg-hover":"colors:brand/Yellow-300","cs-border":"colors:brand/Yellow-700","cs-border-hover":"colors:brand/Yellow-700","cs-icon":"colors:neutrals/neutral-950","cs-icon-hover":"colors:neutrals/neutral-950","cs-bg-deactivated":"colors:neutrals/neutral-100","cs-border-deactivated":"colors:neutrals/neutral-200","cs-icon-deactivated":"colors:neutrals/neutral-400"},close:{"close-bg":"colors:brand/Yellow-50","close-bg-hover":"colors:brand/Yellow-300","close-icon":"colors:neutrals/neutral-950","close-icon-hover":"colors:neutrals/neutral-950","close-border":"colors:brand/Yellow-700","close-border-hover":"colors:brand/Yellow-700"},toggle:{"toggle-bg":"colors:brand/Yellow-50","toggle-bg-hover":"colors:brand/Yellow-300","toggle-bg-active":"colors:brand/Yellow-300","toggle-icon":"colors:neutrals/neutral-950","toggle-icon-hover":"colors:neutrals/neutral-950","toggle-icon-active":"colors:neutrals/neutral-950","toggle-text":"colors:neutrals/neutral-950","toggle-text-hover":"colors:neutrals/neutral-950","toggle-text-active":"colors:neutrals/neutral-950","toggle-border":"colors:brand/Yellow-700","toggle-border-hover":"colors:brand/Yellow-700","toggle-border-active":"colors:brand/Yellow-700"}},avatar:{"avatar-bg":"colors:brand/Yellow-300","avatar-icon":"colors:neutrals/neutral-950"},disclaimer:{"disclaimer-text":"colors:neutrals/neutral-400"},voice:{"voice-text":"colors:neutrals/neutral-000","voice-headline":"colors:brand/Yellow-300","voice-audio":"colors:brand/Yellow-300","voice-btn-stop-bg":"colors:system/Red-light","voice-btn-stop-icon":"colors:system/Red","voice-btn-stop-border":"colors:system/Red","voice-btn-stop-bg-hover":"colors:system/Red","voice-btn-stop-icon-hover":"colors:neutrals/neutral-000","voice-btn-stop-border-hover":"colors:system/Red","voice-btn-stop-text":"colors:system/Red","voice-btn-stop-text-hover":"colors:neutrals/neutral-000","voice-btn-submit-bg":"colors:system/Green-light","voice-btn-submit-bg-hover":"colors:system/Green","voice-btn-submit-icon":"colors:system/Green","voice-btn-submit-icon-hover":"colors:neutrals/neutral-000","voice-btn-submit-border":"colors:system/Green","voice-btn-submit-border-hover":"colors:system/Green","voice-btn-submit-text":"colors:system/Green","voice-btn-submit-text-hover":"colors:neutrals/neutral-000"},feedback:{"feedback-headline":"colors:neutrals/neutral-950","feedback-text":"colors:neutrals/neutral-950","feedback-input-bg":"colors:neutrals/neutral-000","feedback-input-border":"colors:neutrals/neutral-200","feedback-input-border-hover":"colors:neutrals/neutral-600","feedback-input-border-hover-focus":"colors:brand/Yellow-300","feedback-border-top":"colors:neutrals/neutral-100","feedback-input-icon":"colors:neutrals/neutral-950","feedback-border":"colors:neutrals/neutral-100"},toast:{"toast-bg-success":"colors:system/Green","toast-bg-info":"colors:system/Blue","toast-bg-warning":"colors:system/Yellow","toast-bg-error":"colors:system/Red","toast-icon-success":"colors:neutrals/neutral-000","toast-icon-info":"colors:neutrals/neutral-000","toast-icon-warning":"colors:neutrals/neutral-000","toast-icon-error":"colors:neutrals/neutral-000","toast-text-success":"colors:neutrals/neutral-000","toast-text-info":"colors:neutrals/neutral-000","toast-text-warning":"colors:neutrals/neutral-000","toast-text-error":"colors:neutrals/neutral-000","toast-borer-success":"colors:system/Green","toast-border-info":"colors:system/Blue","toast-border-warning":"colors:system/Yellow","toast-border-error":"colors:system/Red"},header:{"header-mobile-bg":"colors:neutrals/neutral-000","header-mobile-border":"colors:neutrals/neutral-100"},"widget-starter":{"ws-bubble-bg":"colors:brand/Yellow-300","ws-bubble-text":"colors:neutrals/neutral-950","ws-button-bg":"colors:brand/Yellow-50","ws-button-bg-hover":"colors:brand/Yellow-300","ws-button-icon":"colors:neutrals/neutral-950","ws-button-icon-hover":"colors:neutrals/neutral-950","ws-bubble-border":"colors:brand/Yellow-300","ws-button-border":"colors:brand/Yellow-300","ws-button-border-hover":"colors:brand/Yellow-300","ws-close-bg":"colors:brand/Yellow-50","ws-close-border":"colors:brand/Yellow-700","ws-close-icon":"colors:neutrals/neutral-950"}},darkMode:{welcome:{"welcome-text":"colors:neutrals/neutral-050","welcome-headline":"colors:neutrals/neutral-050","welcome-icon":"colors:brand/Yellow-300","welcome-link":"colors:brand/Yellow-700"},chat:{"chat-user-bg":"colors:brand/Yellow-50","chat-ai-bg":"colors:neutrals/neutral-950","chat-user-border":"colors:neutrals/neutral-700","chat-user-text":"colors:neutrals/neutral-950","chat-ai-border":"colors:neutrals/neutral-950","chat-ai-text":"colors:neutrals/neutral-050","chat-ai-text-link":"colors:brand/Yellow-300","chat-ai-headline":"colors:neutrals/neutral-050","chat-input-bg":"colors:neutrals/neutral-900","chat-input-border":"colors:neutrals/neutral-700","chat-input-border-hover":"colors:neutrals/neutral-500","chat-input-border-focus":"colors:brand/Yellow-300","chat-input-text":"colors:neutrals/neutral-050"},surface:{"surface-bg":"colors:neutrals/neutral-950","surface-layer-bg":"colors:neutrals/neutral-800","surface-modal-bg":"colors:neutrals/neutral-950"},logo:{"logo-ai-gelb":"colors:neutrals/neutral-000"},tooltip:{"tooltip-bg":"colors:neutrals/neutral-950","tooltip-text":"colors:neutrals/neutral-000","tooltip-border":"colors:neutrals/neutral-800"},button:{main:{"button-bg":"colors:neutrals/neutral-900","button-bg-hover":"colors:brand/Yellow-300","button-bg-active":"colors:brand/Yellow-300","button-icon":"colors:brand/Yellow-50","button-icon-hover":"colors:brand/Purple","button-icon-active":"colors:brand/Purple","button-text":"colors:brand/Yellow-50","button-text-hover":"colors:brand/Purple","button-text-active":"colors:brand/Purple","button-border":"colors:neutrals/neutral-400","button-border-hover":"colors:brand/Yellow-300","button-border-active":"colors:brand/Yellow-300"},start:{"button-start-bg":"rgb(255, 255, 255)","button-start-bg-hover":"rgb(255, 255, 255)","button-start-headline":"rgb(255, 255, 255)","button-start-headline-hover":"rgb(255, 255, 255)","button-start-text":"rgb(255, 255, 255)","button-start-text-hover":"rgb(255, 255, 255)","button-start-icon":"rgb(255, 255, 255)","button-start-icon-hover":"rgb(255, 255, 255)","button-start-border":"rgb(255, 255, 255)","button-start-border-hover":"rgb(255, 255, 255)"},suggestion:{"button-suggestion-bg":"colors:brand/Yellow-300","button-suggestion-bg-hover":"colors:brand/Yellow-50","button-suggestion-text":"colors:neutrals/neutral-950","button-suggestion-text-hover":"colors:neutrals/neutral-950","button-suggestion-border":"colors:brand/Yellow-300","button-suggestion-border-hover":"colors:brand/Yellow-700"},sprache:{"sprache-bg":"colors:neutrals/neutral-800","sprache-bg-hover":"colors:neutrals/neutral-800","sprache-text":"colors:brand/Cream","sprache-text-hover":"colors:brand/Purple","sprache-flyout-bg":"colors:neutrals/neutral-800"},text:{"button-textbutton-text":"colors:brand/Yellow-300","button-textbutton-text-hover":"colors:neutrals/neutral-050","button-textbutton-icon":"colors:brand/Yellow-300","button-textbutton-icon-hover":"colors:neutrals/neutral-050"},"chat-submit":{"cs-bg":"colors:neutrals/neutral-900","cs-bg-hover":"colors:brand/Yellow-300","cs-border":"colors:brand/Yellow-300","cs-border-hover":"colors:brand/Yellow-300","cs-icon":"colors:brand/Yellow-300","cs-icon-hover":"colors:neutrals/neutral-900","cs-bg-deactivated":"colors:neutrals/neutral-300","cs-border-deactivated":"colors:neutrals/neutral-600","cs-icon-deactivated":"colors:neutrals/neutral-950"},close:{"close-bg":"colors:neutrals/neutral-950","close-bg-hover":"colors:neutrals/neutral-950","close-icon":"colors:neutrals/neutral-050","close-icon-hover":"colors:brand/Yellow-300","close-border":"colors:neutrals/neutral-050","close-border-hover":"colors:brand/Yellow-300"},toggle:{"toggle-bg":"colors:neutrals/neutral-950","toggle-bg-hover":"colors:neutrals/neutral-950","toggle-bg-active":"colors:brand/Yellow-300","toggle-icon":"colors:neutrals/neutral-050","toggle-icon-hover":"colors:brand/Yellow-300","toggle-icon-active":"colors:neutrals/neutral-950","toggle-text":"colors:neutrals/neutral-050","toggle-text-hover":"colors:brand/Yellow-300","toggle-text-active":"colors:neutrals/neutral-950","toggle-border":"colors:neutrals/neutral-050","toggle-border-hover":"colors:brand/Yellow-700","toggle-border-active":"colors:brand/Yellow-700"}},avatar:{"avatar-bg":"colors:neutrals/neutral-950","avatar-icon":"colors:brand/Yellow-300"},disclaimer:{"disclaimer-text":"colors:neutrals/neutral-300"},voice:{"voice-text":"colors:neutrals/neutral-000","voice-headline":"colors:brand/Yellow-300","voice-audio":"colors:brand/Yellow-300","voice-btn-stop-bg":"colors:system/Red-light","voice-btn-stop-icon":"colors:neutrals/neutral-950","voice-btn-stop-border":"colors:system/Red","voice-btn-stop-bg-hover":"colors:system/Red","voice-btn-stop-icon-hover":"colors:neutrals/neutral-000","voice-btn-stop-border-hover":"colors:system/Red","voice-btn-submit-bg":"colors:system/Green-light","voice-btn-submit-bg-hover":"colors:system/Green","voice-btn-submit-icon":"colors:neutrals/neutral-950","voice-btn-submit-icon-hover":"colors:neutrals/neutral-000","voice-btn-submit-border":"colors:system/Green","voice-btn-submit-border-hover":"colors:system/Green","voice-btn-stop-text":"colors:neutrals/neutral-950","voice-btn-stop-text-hover":"colors:neutrals/neutral-950","voice-btn-submit-text":"colors:neutrals/neutral-950","voice-btn-submit-text-hover":"colors:neutrals/neutral-950"},feedback:{"feedback-headline":"colors:neutrals/neutral-050","feedback-text":"colors:neutrals/neutral-050","feedback-input-bg":"colors:neutrals/neutral-900","feedback-input-border":"colors:neutrals/neutral-400","feedback-input-border-hover":"colors:neutrals/neutral-400","feedback-input-border-hover-focus":"colors:brand/Yellow-300","feedback-border-top":"colors:neutrals/neutral-600","feedback-input-icon":"colors:neutrals/neutral-050","feedback-border":"colors:neutrals/neutral-100"},toast:{"toast-bg-success":"colors:system/Green","toast-bg-info":"colors:system/Blue","toast-bg-warning":"colors:system/Yellow","toast-bg-error":"colors:system/Red","toast-icon-success":"colors:neutrals/neutral-950","toast-icon-info":"colors:neutrals/neutral-950","toast-icon-warning":"colors:neutrals/neutral-950","toast-icon-error":"colors:neutrals/neutral-950","toast-text-success":"colors:neutrals/neutral-950","toast-text-info":"colors:neutrals/neutral-950","toast-text-warning":"colors:neutrals/neutral-950","toast-text-error":"colors:neutrals/neutral-950","toast-borer-success":"colors:system/Green","toast-border-info":"colors:system/Blue","toast-border-warning":"colors:system/Yellow","toast-border-error":"colors:system/Red"},header:{"header-mobile-bg":"colors:neutrals/neutral-950","header-mobile-border":"colors:neutrals/neutral-700"},"widget-starter":{"ws-bubble-bg":"colors:brand/Yellow-300","ws-bubble-text":"colors:neutrals/neutral-950","ws-button-bg":"colors:brand/Yellow-50","ws-button-bg-hover":"colors:brand/Yellow-300","ws-button-icon":"colors:neutrals/neutral-950","ws-button-icon-hover":"colors:neutrals/neutral-950","ws-bubble-border":"colors:brand/Yellow-300","ws-button-border":"colors:brand/Yellow-300","ws-button-border-hover":"colors:brand/Yellow-300","ws-close-bg":"colors:brand/Yellow-50","ws-close-border":"colors:brand/Yellow-50","ws-close-icon":"colors:neutrals/neutral-950"}},responsive:{radius:{none:{desktop:0,tablet:0,mobile:0},xs:{desktop:4,tablet:4,mobile:4},s:{desktop:8,tablet:8,mobile:8},m:{desktop:16,tablet:16,mobile:16},l:{desktop:24,tablet:24,mobile:24},xl:{desktop:48,tablet:48,mobile:48},xxl:{desktop:64,tablet:64,mobile:64},max:{desktop:999,tablet:999,mobile:999}},fontsize:{h1:{desktop:36,tablet:28,mobile:28},h2:{desktop:24,tablet:22,mobile:22},h3:{desktop:20,tablet:20,mobile:20},h4:{desktop:18,tablet:18,mobile:18},h5:{desktop:20,tablet:18,mobile:18},h6:{desktop:18,tablet:16,mobile:16},"body-xs":{desktop:12,tablet:10,mobile:10},"body-s":{desktop:14,tablet:14,mobile:14},"body-m":{desktop:16,tablet:14,mobile:14},"body-l":{desktop:18,tablet:16,mobile:16}},spacing:{none:{desktop:0,tablet:0,mobile:0},xs:{desktop:4,tablet:4,mobile:4},s:{desktop:8,tablet:8,mobile:8},sm:{desktop:12,tablet:10,mobile:10},m:{desktop:16,tablet:16,mobile:12},l:{desktop:24,tablet:24,mobile:16},xl:{desktop:48,tablet:48,mobile:32},xxl:{desktop:80,tablet:64,mobile:40},xxxl:{desktop:120,tablet:80,mobile:64}},stroke:{s:{desktop:1,tablet:1,mobile:1},m:{desktop:2,tablet:2,mobile:2},l:{desktop:4,tablet:4,mobile:4}},iconSize:{xs:{desktop:12,tablet:12,mobile:12},s:{desktop:16,tablet:16,mobile:16},m:{desktop:20,tablet:18,mobile:18},l:{desktop:32,tablet:24,mobile:24},xl:{desktop:48,tablet:40,mobile:40}}}},this.setupCustomCSSListener(),this.setupDarkModeListener(),this.loadStyles();const t=document.createElement("div");this.shadowRoot.appendChild(t),this.removeAttribute("title");const o=xn(t);o.render((({config:e})=>kn(yt,{config:e,children:kn(uo,{config:e,children:kn(Lu,{})})}))({config:e})),this.root=o}setupCustomCSSListener(){this.themeConfigHandler=e=>{e.detail&&e.detail.themeConfig&&(this.themeConfig=e.detail.themeConfig,console.log("🎨 Theme configuration received from external config"),this.loadStyles())},this.customCSSHandler=e=>{e.detail&&e.detail.css&&(this.customCSS=e.detail.css,console.log("🎨 Custom CSS received from external config"),this.loadStyles())},document.addEventListener("chatbot-theme-config",this.themeConfigHandler),document.addEventListener("chatbot-custom-css",this.customCSSHandler)}setupDarkModeListener(){this.darkModeHandler=e=>{var n,t;null!==(t=null===(n=e.detail)||void 0===n?void 0:n.isDarkMode)&&void 0!==t&&t?this.setAttribute("data-dark-mode","true"):this.setAttribute("data-dark-mode","false")},this.darkModeConfigHandler=e=>{var n,t;const o=null!==(t=null===(n=e.detail)||void 0===n?void 0:n.enabled)&&void 0!==t&&t;this.darkModeEnabled=o,console.log(`🌙 Dark mode ${o?"enabled":"disabled"} via config`),this.loadStyles()},document.addEventListener("chatbot-dark-mode-change",this.darkModeHandler),document.addEventListener("chatbot-dark-mode-config",this.darkModeConfigHandler)}loadStyles(){return Nu(this,void 0,void 0,function*(){try{this.shadowRoot.querySelectorAll("style").forEach(e=>e.remove());const e=Et(this.themeConfig,this.customCSS,this.darkModeEnabled);this.shadowRoot.appendChild(e)}catch(e){console.error("Error loading styles:",e)}})}disconnectedCallback(){this.root&&this.root.unmount(),this.themeConfigHandler&&document.removeEventListener("chatbot-theme-config",this.themeConfigHandler),this.customCSSHandler&&document.removeEventListener("chatbot-custom-css",this.customCSSHandler),this.darkModeHandler&&document.removeEventListener("chatbot-dark-mode-change",this.darkModeHandler),this.darkModeConfigHandler&&document.removeEventListener("chatbot-dark-mode-config",this.darkModeConfigHandler)}open(){this.entrySource="chat",this.dispatchEvent(new CustomEvent("chatbot-open",{bubbles:!0,detail:{entrySource:"chat"}}))}openAsSearch(){this.entrySource="search",this.dispatchEvent(new CustomEvent("chatbot-open",{bubbles:!0,detail:{entrySource:"search"}}))}close(){this.dispatchEvent(new CustomEvent("chatbot-close",{bubbles:!0}))}toggle(){this.dispatchEvent(new CustomEvent("chatbot-toggle",{bubbles:!0}))}sendMessage(e){e&&"string"==typeof e?document.dispatchEvent(new CustomEvent("chatbot-send-message",{bubbles:!0,detail:{message:e}})):console.warn("sendMessage: Invalid or missing message")}}function Pu(){const e=document.querySelectorAll("#aigelb-search-trigger");for(const n of e){const e=()=>{document.dispatchEvent(new CustomEvent("chatbot-open",{bubbles:!0,detail:{entrySource:"search"}}))},t=n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),e())};n.addEventListener("click",e),n.addEventListener("keydown",t),n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.hasAttribute("role")||n.setAttribute("role","button"),n.hasAttribute("aria-label")||n.setAttribute("aria-label","Suche öffnen")}}function Mu(){const e=document.querySelectorAll("#aigelb-chat-trigger");for(const n of e){const e=()=>{document.dispatchEvent(new CustomEvent("chatbot-open",{bubbles:!0,detail:{entrySource:"chat"}}))},t=n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),e())};n.addEventListener("click",e),n.addEventListener("keydown",t),n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.hasAttribute("role")||n.setAttribute("role","button"),n.hasAttribute("aria-label")||n.setAttribute("aria-label","Chat öffnen")}}customElements.define("aigelb-chatbot",Fu),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Pu):Pu(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Mu):Mu()})();
|
|
1
|
+
(()=>{"use strict";var e={77(e){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function h(e){var n=e.match(t);n&&(d+=n.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function f(){var e={line:d,column:p};return function(n){return n.position=new g(e),v(),n}}function g(e){this.start=e,this.end={line:d,column:p},this.source=l.source}function b(n){var t=new Error(l.source+":"+d+":"+p+": "+n);if(t.reason=n,t.filename=l.source,t.line=d,t.column=p,t.source=e,!l.silent)throw t}function m(n){var t=n.exec(e);if(t){var o=t[0];return h(o),e=e.slice(o.length),t}}function v(){m(o)}function y(e){var n;for(e=e||[];n=x();)!1!==n&&e.push(n);return e}function x(){var n=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var t=2;c!=e.charAt(t)&&("*"!=e.charAt(t)||"/"!=e.charAt(t+1));)++t;if(t+=2,c===e.charAt(t-1))return b("End of comment missing");var o=e.slice(2,t-2);return p+=2,h(o),e=e.slice(t),p+=2,n({type:"comment",comment:o})}}function w(){var e=f(),t=m(r);if(t){if(x(),!m(i))return b("property missing ':'");var o=m(a),l=e({type:"declaration",property:u(t[0].replace(n,c)),value:o?u(o[0].replace(n,c)):c});return m(s),l}}return g.prototype.content=e,v(),function(){var e,n=[];for(y(n);e=w();)!1!==e&&(n.push(e),y(n));return n}()}},133(e,n,t){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n){let t=null;if(!e||"string"!=typeof e)return t;const o=(0,r.default)(e),i="function"==typeof n;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:o,value:r}=e;i?n(o,r,e):r&&(t=t||{},t[o]=r)}),t};const r=o(t(77))},229(e,n,t){var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(t(133)),r=t(917);function i(e,n){var t={};return e&&"string"==typeof e?((0,o.default)(e,function(e,o){e&&o&&(t[(0,r.camelCase)(e,n)]=o)}),t):t}i.default=i,e.exports=i},849(e){var n=Object.prototype.hasOwnProperty,t=Object.prototype.toString,o=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},a=function(e){if(!e||"[object Object]"!==t.call(e))return!1;var o,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(o in e);return void 0===o||n.call(e,o)},s=function(e,n){o&&"__proto__"===n.name?o(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},l=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(r)return r(e,t).value}return e[t]};e.exports=function e(){var n,t,o,r,c,u,d=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(null!=(n=arguments[p]))for(t in n)o=l(d,t),d!==(r=l(n,t))&&(f&&r&&(a(r)||(c=i(r)))?(c?(c=!1,u=o&&i(o)?o:[]):u=o&&a(o)?o:{},s(d,{name:t,newValue:e(f,u,r)})):void 0!==r&&s(d,{name:t,newValue:r}));return d}},917(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,n){return n.toUpperCase()},l=function(e,n){return"".concat(n,"-")};n.camelCase=function(e,n){return void 0===n&&(n={}),function(e){return!e||r.test(e)||t.test(e)}(e)?e:(e=e.toLowerCase(),(e=n.reactCompat?e.replace(a,l):e.replace(i,l)).replace(o,s))}}},n={};function t(o){var r=n[o];if(void 0!==r)return r.exports;var i=n[o]={exports:{}};return e[o].call(i.exports,i,i.exports,t),i.exports}t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};t.r(o),t.d(o,{boolean:()=>Ao,booleanish:()=>Fo,commaOrSpaceSeparated:()=>Oo,commaSeparated:()=>Do,number:()=>Mo,overloadedBoolean:()=>No,spaceSeparated:()=>Po});var r={};t.r(r),t.d(r,{attentionMarkers:()=>fa,contentInitial:()=>la,disable:()=>ga,document:()=>sa,flow:()=>ua,flowInitial:()=>ca,insideSpan:()=>ha,string:()=>da,text:()=>pa});var i,a,s,l,c,u,d,p,h,f,g,b,m={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,x=Array.isArray;function w(e,n){for(var t in n)e[t]=n[t];return e}function k(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,n,t){var o,r,a,s={};for(a in n)"key"==a?o=n[a]:"ref"==a?r=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?i.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return C(e,s,o,r,null)}function C(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++s:r,__i:-1,__u:0};return null==r&&null!=a.vnode&&a.vnode(i),i}function S(e){return e.children}function E(e,n){this.props=e,this.context=n}function I(e,n){if(null==n)return e.__?I(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?I(e):null}function T(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return T(e)}}function L(e){(!e.__d&&(e.__d=!0)&&l.push(e)&&!A.__r++||c!=a.debounceRendering)&&((c=a.debounceRendering)||u)(A)}function A(){for(var e,n,t,o,r,i,s,c=1;l.length;)l.length>c&&l.sort(d),e=l.shift(),c=l.length,e.__d&&(t=void 0,o=void 0,r=(o=(n=e).__v).__e,i=[],s=[],n.__P&&((t=w({},o)).__v=o.__v+1,a.vnode&&a.vnode(t),j(n.__P,t,o,n.__n,n.__P.namespaceURI,32&o.__u?[r]:null,i,null==r?I(o):r,!!(32&o.__u),s),t.__v=o.__v,t.__.__k[t.__i]=t,H(i,t,s),o.__e=o.__=null,t.__e!=r&&T(t)));A.__r=0}function F(e,n,t,o,r,i,a,s,l,c,u){var d,p,h,f,g,b,y,x=o&&o.__k||v,w=n.length;for(l=N(t,n,x,l,w),d=0;d<w;d++)null!=(h=t.__k[d])&&(p=-1==h.__i?m:x[h.__i]||m,h.__i=d,b=j(e,h,p,r,i,a,s,l,c,u),f=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Y(p.ref,null,h),u.push(h.ref,h.__c||f,h)),null==g&&null!=f&&(g=f),(y=!!(4&h.__u))||p.__k===h.__k?l=M(h,l,e,y):"function"==typeof h.type&&void 0!==b?l=b:f&&(l=f.nextSibling),h.__u&=-7);return t.__e=g,l}function N(e,n,t,o,r){var i,a,s,l,c,u=t.length,d=u,p=0;for(e.__k=new Array(r),i=0;i<r;i++)null!=(a=n[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[i]=C(null,a,null,null,null):x(a)?a=e.__k[i]=C(S,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[i]=C(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,l=i+p,a.__=e,a.__b=e.__b+1,s=null,-1!=(c=a.__i=D(a,t,l,d))&&(d--,(s=t[c])&&(s.__u|=2)),null==s||null==s.__v?(-1==c&&(r>u?p--:r<u&&p++),"function"!=typeof a.type&&(a.__u|=4)):c!=l&&(c==l-1?p--:c==l+1?p++:(c>l?p--:p++,a.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<u;i++)null!=(s=t[i])&&!(2&s.__u)&&(s.__e==o&&(o=I(s)),V(s,s));return o}function M(e,n,t,o){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,n=M(r[i],n,t,o));return n}e.__e!=n&&(o&&(n&&e.type&&!n.parentNode&&(n=I(e)),t.insertBefore(e.__e,n||null)),n=e.__e);do{n=n&&n.nextSibling}while(null!=n&&8==n.nodeType);return n}function P(e,n){return n=n||[],null==e||"boolean"==typeof e||(x(e)?e.some(function(e){P(e,n)}):n.push(e)),n}function D(e,n,t,o){var r,i,a,s=e.key,l=e.type,c=n[t],u=null!=c&&!(2&c.__u);if(null===c&&null==s||u&&s==c.key&&l==c.type)return t;if(o>(u?1:0))for(r=t-1,i=t+1;r>=0||i<n.length;)if(null!=(c=n[a=r>=0?r--:i++])&&!(2&c.__u)&&s==c.key&&l==c.type)return a;return-1}function O(e,n,t){"-"==n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||y.test(n)?t:t+"px"}function z(e,n,t,o,r){var i,a;e:if("style"==n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||O(e.style,n,"");if(t)for(n in t)o&&t[n]==o[n]||O(e.style,n,t[n])}else if("o"==n[0]&&"n"==n[1])i=n!=(n=n.replace(p,"$1")),a=n.toLowerCase(),n=a in e||"onFocusOut"==n||"onFocusIn"==n?a.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=h,e.addEventListener(n,i?g:f,i)):e.removeEventListener(n,i?g:f,i);else{if("http://www.w3.org/2000/svg"==r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&"popover"!=n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=n[4]?e.removeAttribute(n):e.setAttribute(n,"popover"==n&&1==t?"":t))}}function R(e){return function(n){if(this.l){var t=this.l[n.type+e];if(null==n.t)n.t=h++;else if(n.t<t.u)return;return t(a.event?a.event(n):n)}}}function j(e,n,t,o,r,i,s,l,c,u){var d,p,h,f,g,b,m,v,y,_,C,I,T,L,A,N,M,P=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(c=!!(32&t.__u),i=[l=n.__e=t.__e]),(d=a.__b)&&d(n);e:if("function"==typeof P)try{if(v=n.props,y="prototype"in P&&P.prototype.render,_=(d=P.contextType)&&o[d.__c],C=d?_?_.props.value:d.__:o,t.__c?m=(p=n.__c=t.__c).__=p.__E:(y?n.__c=p=new P(v,C):(n.__c=p=new E(v,C),p.constructor=P,p.render=q),_&&_.sub(p),p.state||(p.state={}),p.__n=o,h=p.__d=!0,p.__h=[],p._sb=[]),y&&null==p.__s&&(p.__s=p.state),y&&null!=P.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=w({},p.__s)),w(p.__s,P.getDerivedStateFromProps(v,p.__s))),f=p.props,g=p.state,p.__v=n,h)y&&null==P.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),y&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(y&&null==P.getDerivedStateFromProps&&v!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(v,C),n.__v==t.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(v,p.__s,C)){for(n.__v!=t.__v&&(p.props=v,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.some(function(e){e&&(e.__=n)}),I=0;I<p._sb.length;I++)p.__h.push(p._sb[I]);p._sb=[],p.__h.length&&s.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(v,p.__s,C),y&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(f,g,b)})}if(p.context=C,p.props=v,p.__P=e,p.__e=!1,T=a.__r,L=0,y){for(p.state=p.__s,p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),A=0;A<p._sb.length;A++)p.__h.push(p._sb[A]);p._sb=[]}else do{p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++L<25);p.state=p.__s,null!=p.getChildContext&&(o=w(w({},o),p.getChildContext())),y&&!h&&null!=p.getSnapshotBeforeUpdate&&(b=p.getSnapshotBeforeUpdate(f,g)),N=d,null!=d&&d.type===S&&null==d.key&&(N=$(d.props.children)),l=F(e,x(N)?N:[N],n,t,o,r,i,s,l,c,u),p.base=n.__e,n.__u&=-161,p.__h.length&&s.push(p),m&&(p.__E=p.__=null)}catch(e){if(n.__v=null,c||null!=i)if(e.then){for(n.__u|=c?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,n.__e=l}else{for(M=i.length;M--;)k(i[M]);B(n)}else n.__e=t.__e,n.__k=t.__k,e.then||B(n);a.__e(e,n,t)}else null==i&&n.__v==t.__v?(n.__k=t.__k,n.__e=t.__e):l=n.__e=U(t.__e,n,t,o,r,i,s,c,u);return(d=a.diffed)&&d(n),128&n.__u?void 0:l}function B(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(B)}function H(e,n,t){for(var o=0;o<t.length;o++)Y(t[o],t[++o],t[++o]);a.__c&&a.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){a.__e(e,n.__v)}})}function $(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:x(e)?e.map($):w({},e)}function U(e,n,t,o,r,s,l,c,u){var d,p,h,f,g,b,v,y=t.props||m,w=n.props,_=n.type;if("svg"==_?r="http://www.w3.org/2000/svg":"math"==_?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=s)for(d=0;d<s.length;d++)if((g=s[d])&&"setAttribute"in g==!!_&&(_?g.localName==_:3==g.nodeType)){e=g,s[d]=null;break}if(null==e){if(null==_)return document.createTextNode(w);e=document.createElementNS(r,_,w.is&&w),c&&(a.__m&&a.__m(n,s),c=!1),s=null}if(null==_)y===w||c&&e.data==w||(e.data=w);else{if(s=s&&i.call(e.childNodes),!c&&null!=s)for(y={},d=0;d<e.attributes.length;d++)y[(g=e.attributes[d]).name]=g.value;for(d in y)if(g=y[d],"children"==d);else if("dangerouslySetInnerHTML"==d)h=g;else if(!(d in w)){if("value"==d&&"defaultValue"in w||"checked"==d&&"defaultChecked"in w)continue;z(e,d,null,g,r)}for(d in w)g=w[d],"children"==d?f=g:"dangerouslySetInnerHTML"==d?p=g:"value"==d?b=g:"checked"==d?v=g:c&&"function"!=typeof g||y[d]===g||z(e,d,g,y[d],r);if(p)c||h&&(p.__html==h.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),n.__k=[];else if(h&&(e.innerHTML=""),F("template"==n.type?e.content:e,x(f)?f:[f],n,t,o,"foreignObject"==_?"http://www.w3.org/1999/xhtml":r,s,l,s?s[0]:t.__k&&I(t,0),c,u),null!=s)for(d=s.length;d--;)k(s[d]);c||(d="value","progress"==_&&null==b?e.removeAttribute("value"):null!=b&&(b!==e[d]||"progress"==_&&!b||"option"==_&&b!=y[d])&&z(e,d,b,y[d],r),d="checked",null!=v&&v!=e[d]&&z(e,d,v,y[d],r))}return e}function Y(e,n,t){try{if("function"==typeof e){var o="function"==typeof e.__u;o&&e.__u(),o&&null==n||(e.__u=e(n))}else e.current=n}catch(e){a.__e(e,t)}}function V(e,n,t){var o,r;if(a.unmount&&a.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||Y(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){a.__e(e,n)}o.base=o.__P=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&V(o[r],n,t||"function"!=typeof e.type);t||k(e.__e),e.__c=e.__=e.__e=void 0}function q(e,n,t){return this.constructor(e,t)}function W(e,n,t){var o,r,s,l;n==document&&(n=document.documentElement),a.__&&a.__(e,n),r=(o="function"==typeof t)?null:t&&t.__k||n.__k,s=[],l=[],j(n,e=(!o&&t||n).__k=_(S,null,[e]),r||m,m,n.namespaceURI,!o&&t?[t]:r?null:n.firstChild?i.call(n.childNodes):null,s,!o&&t?t:r?r.__e:n.firstChild,o,l),H(s,e,l)}function Z(e,n){W(e,n,Z)}function G(e,n,t){var o,r,a,s,l=w({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)"key"==a?o=n[a]:"ref"==a?r=n[a]:l[a]=void 0===n[a]&&null!=s?s[a]:n[a];return arguments.length>2&&(l.children=arguments.length>3?i.call(arguments,2):t),C(e.type,l,o||e.key,r||e.ref,null)}function K(e){function n(e){var t,o;return this.getChildContext||(t=new Set,(o={})[n.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach(function(e){e.__e=!0,L(e)})},this.sub=function(e){t.add(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),n&&n.call(e)}}),e.children}return n.__c="__cC"+b++,n.__=e,n.Provider=n.__l=(n.Consumer=function(e,n){return e.children(n)}).contextType=n,n}i=v.slice,a={__e:function(e,n,t,o){for(var r,i,a;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),a=r.__d),a)return r.__E=r}catch(n){e=n}throw e}},s=0,E.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},t),this.props)),e&&w(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),L(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),L(this))},E.prototype.render=S,l=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,n){return e.__v.__b-n.__v.__b},A.__r=0,p=/(PointerCapture)$|Capture$/i,h=0,f=R(!1),g=R(!0),b=0;var X,Q,J,ee,ne=0,te=[],oe=a,re=oe.__b,ie=oe.__r,ae=oe.diffed,se=oe.__c,le=oe.unmount,ce=oe.__;function ue(e,n){oe.__h&&oe.__h(Q,e,ne||n),ne=0;var t=Q.__H||(Q.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function de(e){return ne=1,pe(Te,e)}function pe(e,n,t){var o=ue(X++,2);if(o.t=e,!o.__c&&(o.__=[t?t(n):Te(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=Q,!Q.__f)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter(function(e){return!!e.__c});if(r.every(function(e){return!e.__N}))return!i||i.call(this,e,n,t);var a=o.__c.props!==e;return r.forEach(function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(a=!0)}}),i&&i.call(this,e,n,t)||a};Q.__f=!0;var i=Q.shouldComponentUpdate,a=Q.componentWillUpdate;Q.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}a&&a.call(this,e,n,t)},Q.shouldComponentUpdate=r}return o.__N||o.__}function he(e,n){var t=ue(X++,3);!oe.__s&&Ie(t.__H,n)&&(t.__=e,t.u=n,Q.__H.__h.push(t))}function fe(e,n){var t=ue(X++,4);!oe.__s&&Ie(t.__H,n)&&(t.__=e,t.u=n,Q.__h.push(t))}function ge(e){return ne=5,me(function(){return{current:e}},[])}function be(e,n,t){ne=6,fe(function(){if("function"==typeof e){var t=e(n());return function(){e(null),t&&"function"==typeof t&&t()}}if(e)return e.current=n(),function(){return e.current=null}},null==t?t:t.concat(e))}function me(e,n){var t=ue(X++,7);return Ie(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function ve(e,n){return ne=8,me(function(){return e},n)}function ye(e){var n=Q.context[e.__c],t=ue(X++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(Q)),n.props.value):e.__}function xe(e,n){oe.useDebugValue&&oe.useDebugValue(n?n(e):e)}function we(){var e=ue(X++,11);if(!e.__){for(var n=Q.__v;null!==n&&!n.__m&&null!==n.__;)n=n.__;var t=n.__m||(n.__m=[0,0]);e.__="P"+t[0]+"-"+t[1]++}return e.__}function ke(){for(var e;e=te.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Se),e.__H.__h.forEach(Ee),e.__H.__h=[]}catch(n){e.__H.__h=[],oe.__e(n,e.__v)}}oe.__b=function(e){Q=null,re&&re(e)},oe.__=function(e,n){e&&n.__k&&n.__k.__m&&(e.__m=n.__k.__m),ce&&ce(e,n)},oe.__r=function(e){ie&&ie(e),X=0;var n=(Q=e.__c).__H;n&&(J===Q?(n.__h=[],Q.__h=[],n.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(n.__h.forEach(Se),n.__h.forEach(Ee),n.__h=[],X=0)),J=Q},oe.diffed=function(e){ae&&ae(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==te.push(n)&&ee===oe.requestAnimationFrame||((ee=oe.requestAnimationFrame)||Ce)(ke)),n.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),J=Q=null},oe.__c=function(e,n){n.some(function(e){try{e.__h.forEach(Se),e.__h=e.__h.filter(function(e){return!e.__||Ee(e)})}catch(t){n.some(function(e){e.__h&&(e.__h=[])}),n=[],oe.__e(t,e.__v)}}),se&&se(e,n)},oe.unmount=function(e){le&&le(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(e){try{Se(e)}catch(e){n=e}}),t.__H=void 0,n&&oe.__e(n,t.__v))};var _e="function"==typeof requestAnimationFrame;function Ce(e){var n,t=function(){clearTimeout(o),_e&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,35);_e&&(n=requestAnimationFrame(t))}function Se(e){var n=Q,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),Q=n}function Ee(e){var n=Q;e.__c=e.__(),Q=n}function Ie(e,n){return!e||e.length!==n.length||n.some(function(n,t){return n!==e[t]})}function Te(e,n){return"function"==typeof n?n(e):n}function Le(e,n){for(var t in n)e[t]=n[t];return e}function Ae(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var o in n)if("__source"!==o&&e[o]!==n[o])return!0;return!1}function Fe(e,n){var t=n(),o=de({t:{__:t,u:n}}),r=o[0].t,i=o[1];return fe(function(){r.__=t,r.u=n,Ne(r)&&i({t:r})},[e,t,n]),he(function(){return Ne(r)&&i({t:r}),e(function(){Ne(r)&&i({t:r})})},[e]),t}function Ne(e){var n,t,o=e.u,r=e.__;try{var i=o();return!((n=r)===(t=i)&&(0!==n||1/n==1/t)||n!=n&&t!=t)}catch(e){return!0}}function Me(e){e()}function Pe(e){return e}function De(){return[!1,Me]}var Oe=fe;function ze(e,n){this.props=e,this.context=n}(ze.prototype=new E).isPureReactComponent=!0,ze.prototype.shouldComponentUpdate=function(e,n){return Ae(this.props,e)||Ae(this.state,n)};var Re=a.__b;a.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Re&&Re(e)};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Be=function(e,n){return null==e?null:P(P(e).map(n))},He={map:Be,forEach:Be,count:function(e){return e?P(e).length:0},only:function(e){var n=P(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:P},$e=a.__e;a.__e=function(e,n,t,o){if(e.then)for(var r,i=n;i=i.__;)if((r=i.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);$e(e,n,t,o)};var Ue=a.unmount;function Ye(e,n,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Le({},e)).__c&&(e.__c.__P===t&&(e.__c.__P=n),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Ye(e,n,t)})),e}function Ve(e,n,t){return e&&t&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Ve(e,n,t)}),e.__c&&e.__c.__P===n&&(e.__e&&t.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=t)),e}function qe(){this.__u=0,this.o=null,this.__b=null}function We(e){var n=e.__.__c;return n&&n.__a&&n.__a(e)}function Ze(){this.i=null,this.l=null}a.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&32&e.__u&&(e.type=null),Ue&&Ue(e)},(qe.prototype=new E).__c=function(e,n){var t=n.__c,o=this;null==o.o&&(o.o=[]),o.o.push(t);var r=We(o.__v),i=!1,a=function(){i||(i=!0,t.__R=null,r?r(s):s())};t.__R=a;var s=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=Ve(e,e.__c.__P,e.__c.__O)}var n;for(o.setState({__a:o.__b=null});n=o.o.pop();)n.forceUpdate()}};o.__u++||32&n.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(a,a)},qe.prototype.componentWillUnmount=function(){this.o=[]},qe.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Ye(this.__b,t,o.__O=o.__P)}this.__b=null}var r=n.__a&&_(S,null,e.fallback);return r&&(r.__u&=-33),[_(S,null,n.__a?null:e.children),r]};var Ge=function(e,n,t){if(++t[1]===t[0]&&e.l.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(t=e.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.i=t=t[2]}};function Ke(e){return this.getChildContext=function(){return e.context},e.children}function Xe(e){var n=this,t=e.h;if(n.componentWillUnmount=function(){W(null,n.v),n.v=null,n.h=null},n.h&&n.h!==t&&n.componentWillUnmount(),!n.v){for(var o=n.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;n.h=t,n.v={nodeType:1,parentNode:t,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},insertBefore:function(e,t){this.childNodes.push(e),n.h.insertBefore(e,t)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),n.h.removeChild(e)}}}W(_(Ke,{context:n.context},e.__v),n.v)}(Ze.prototype=new E).__a=function(e){var n=this,t=We(n.__v),o=n.l.get(e);return o[0]++,function(r){var i=function(){n.props.revealOrder?(o.push(r),Ge(n,e,o)):r()};t?t(i):i()}},Ze.prototype.render=function(e){this.i=null,this.l=new Map;var n=P(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.l.set(n[t],this.i=[1,0,this.i]);return e.children},Ze.prototype.componentDidUpdate=Ze.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(n,t){Ge(e,t,n)})};var Qe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Je=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,en=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,nn=/[A-Z0-9]/g,tn="undefined"!=typeof document,on=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function rn(e,n,t){return null==n.__k&&(n.textContent=""),W(e,n),"function"==typeof t&&t(),e?e.__c:null}function an(e,n,t){return Z(e,n),"function"==typeof t&&t(),e?e.__c:null}E.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(E.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})});var sn=a.event;function ln(){}function cn(){return this.cancelBubble}function un(){return this.defaultPrevented}a.event=function(e){return sn&&(e=sn(e)),e.persist=ln,e.isPropagationStopped=cn,e.isDefaultPrevented=un,e.nativeEvent=e};var dn,pn={enumerable:!1,configurable:!0,get:function(){return this.class}},hn=a.vnode;a.vnode=function(e){"string"==typeof e.type&&function(e){var n=e.props,t=e.type,o={},r=-1===t.indexOf("-");for(var i in n){var a=n[i];if(!("value"===i&&"defaultValue"in n&&null==a||tn&&"children"===i&&"noscript"===t||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===a?a="":"translate"===s&&"no"===a?a=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==t&&"textarea"!==t||on(n.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":en.test(i)&&(i=s):s=i="oninput":r&&Je.test(i)?i=i.replace(nn,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===s&&o[i=s]&&(i="oninputCapture"),o[i]=a}}"select"==t&&o.multiple&&Array.isArray(o.value)&&(o.value=P(n.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==t&&null!=o.defaultValue&&(o.value=P(n.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",pn)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),e.props=o}(e),e.$$typeof=Qe,hn&&hn(e)};var fn=a.__r;a.__r=function(e){fn&&fn(e),dn=e.__c};var gn=a.diffed;a.diffed=function(e){gn&&gn(e);var n=e.props,t=e.__e;null!=t&&"textarea"===e.type&&"value"in n&&n.value!==t.value&&(t.value=null==n.value?"":n.value),dn=null};var bn={ReactCurrentDispatcher:{current:{readContext:function(e){return dn.__n[e.__c].props.value},useCallback:ve,useContext:ye,useDebugValue:xe,useDeferredValue:Pe,useEffect:he,useId:we,useImperativeHandle:be,useInsertionEffect:Oe,useLayoutEffect:fe,useMemo:me,useReducer:pe,useRef:ge,useState:de,useSyncExternalStore:Fe,useTransition:De}}};function mn(e){return!!e&&e.$$typeof===Qe}function vn(e){return!!e.__k&&(W(null,e),!0)}var yn={useState:de,useId:we,useReducer:pe,useEffect:he,useLayoutEffect:fe,useInsertionEffect:Oe,useTransition:De,useDeferredValue:Pe,useSyncExternalStore:Fe,startTransition:Me,useRef:ge,useImperativeHandle:be,useMemo:me,useCallback:ve,useContext:ye,useDebugValue:xe,version:"18.3.1",Children:He,render:rn,hydrate:an,unmountComponentAtNode:vn,createPortal:function(e,n){var t=_(Xe,{__v:e,h:n});return t.containerInfo=n,t},createElement:_,createContext:K,createFactory:function(e){return _.bind(null,e)},cloneElement:function(e){return mn(e)?G.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:S,isValidElement:mn,isElement:mn,isFragment:function(e){return mn(e)&&e.type===S},isMemo:function(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:E,PureComponent:ze,memo:function(e,n){function t(e){var t=this.props.ref,o=t==e.ref;return!o&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!o:Ae(this.props,e)}function o(n){return this.shouldComponentUpdate=t,_(e,n)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o.type=e,o},forwardRef:function(e){function n(n){var t=Le({},n);return delete t.ref,e(t,n.ref||null)}return n.$$typeof=je,n.render=e,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n},flushSync:function(e,n){return e(n)},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:S,Suspense:qe,SuspenseList:Ze,lazy:function(e){var n,t,o,r=null;function i(i){if(n||(n=e()).then(function(e){e&&(r=e.default||e),o=!0},function(e){t=e,o=!0}),t)throw t;if(!o)throw n;return r?_(r,i):null}return i.displayName="Lazy",i.__f=!0,i},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bn};function xn(e){return{render:function(n){rn(n,e)},unmount:function(){vn(e)}}}var wn=0;Array.isArray;function kn(e,n,t,o,r,i){n||(n={});var s,l,c=n;if("ref"in c)for(l in c={},n)"ref"==l?s=n[l]:c[l]=n[l];var u={type:e,props:c,key:t,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--wn,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(s=e.defaultProps))for(l in s)void 0===c[l]&&(c[l]=s[l]);return a.vnode&&a.vnode(u),u}const _n=e=>{const[n,t]=de(!!e),o=ve(()=>t(!0),[]),r=ve(()=>t(!1),[]),i=ve(e=>t(e),[]);return me(()=>[n,{open:o,close:r,toggle:()=>t(!n),force:i}],[n])},Cn=({children:e,text:n,position:t="top",delay:o=300})=>{const[r,i]=de(!1),[a,s]=de(null),[l,c]=de(!1),u=ge(null),d=we(),p=ge(null);he(()=>{const e=()=>{c((()=>{if("undefined"==typeof window)return!1;const e="ontouchstart"in window||navigator.maxTouchPoints>0,n=window.innerWidth<=768,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);return e&&(n||t)})())};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);return kn("div",{className:"tooltip-container",onMouseEnter:()=>{if(!l){if(p.current&&p.current.hasAttribute("title")){const e=p.current.getAttribute("title");s(e),p.current.removeAttribute("title")}u.current=setTimeout(()=>{i(!0)},o)}},onMouseLeave:()=>{u.current&&clearTimeout(u.current),a&&p.current&&(p.current.setAttribute("title",a),s(null)),i(!1)},children:[yn.cloneElement(e,{"aria-describedby":n?d:void 0,ref:p,onFocus:()=>{if(!l){if(p.current&&p.current.hasAttribute("title")){const e=p.current.getAttribute("title");s(e),p.current.removeAttribute("title")}i(!0)}},onBlur:()=>{a&&p.current&&(p.current.setAttribute("title",a),s(null)),i(!1)},onKeyDown:e=>{"Escape"===e.key&&(a&&p.current&&(p.current.setAttribute("title",a),s(null)),i(!1))}}),r&&n&&!l&&kn("div",{id:d,className:`tooltip tooltip-${t}`,role:"tooltip","aria-live":"polite",children:[n,kn("div",{className:"tooltip-arrow","aria-hidden":"true"})]})]})},Sn=({svg:e,className:n,style:t})=>kn("span",{className:n,dangerouslySetInnerHTML:{__html:e},style:Object.assign({display:"inline-block",lineHeight:0},t)}),En='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="7" viewBox="0 0 14 7" fill="currentColor" class="accordion-arrow" ><path d="M13.023 1.14798L7.39804 6.77298C7.3458 6.82527 7.28376 6.86676 7.21547 6.89507C7.14719 6.92338 7.07399 6.93795 7.00007 6.93795C6.92615 6.93795 6.85295 6.92338 6.78466 6.89507C6.71638 6.86676 6.65434 6.82527 6.6021 6.77298L0.9771 1.14798C0.871552 1.04243 0.812256 0.899275 0.812256 0.750008C0.812256 0.60074 0.871552 0.457586 0.9771 0.352039C1.08265 0.246491 1.2258 0.187195 1.37507 0.187195C1.52434 0.187195 1.66749 0.246491 1.77304 0.352039L7.00007 5.57977L12.2271 0.352039C12.2794 0.299777 12.3414 0.25832 12.4097 0.230036C12.478 0.201752 12.5512 0.187195 12.6251 0.187195C12.699 0.187195 12.7722 0.201752 12.8404 0.230036C12.9087 0.25832 12.9708 0.299777 13.023 0.352039C13.0753 0.404301 13.1168 0.466345 13.145 0.534628C13.1733 0.602912 13.1879 0.676098 13.1879 0.750008C13.1879 0.823917 13.1733 0.897103 13.145 0.965387C13.1168 1.03367 13.0753 1.09571 13.023 1.14798Z" /></svg>',In='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="7" viewBox="0 0 14 7" fill="currentColor" class="accordion-arrow open" ><path d="M13.023 1.14798L7.39804 6.77298C7.3458 6.82527 7.28376 6.86676 7.21547 6.89507C7.14719 6.92338 7.07399 6.93795 7.00007 6.93795C6.92615 6.93795 6.85295 6.92338 6.78466 6.89507C6.71638 6.86676 6.65434 6.82527 6.6021 6.77298L0.9771 1.14798C0.871552 1.04243 0.812256 0.899275 0.812256 0.750008C0.812256 0.60074 0.871552 0.457586 0.9771 0.352039C1.08265 0.246491 1.2258 0.187195 1.37507 0.187195C1.52434 0.187195 1.66749 0.246491 1.77304 0.352039L7.00007 5.57977L12.2271 0.352039C12.2794 0.299777 12.3414 0.25832 12.4097 0.230036C12.478 0.201752 12.5512 0.187195 12.6251 0.187195C12.699 0.187195 12.7722 0.201752 12.8404 0.230036C12.9087 0.25832 12.9708 0.299777 13.023 0.352039C13.0753 0.404301 13.1168 0.466345 13.145 0.534628C13.1733 0.602912 13.1879 0.676098 13.1879 0.750008C13.1879 0.823917 13.1733 0.897103 13.145 0.965387C13.1168 1.03367 13.0753 1.09571 13.023 1.14798Z" /></svg>',Tn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none" ><path d="M16 3C13.7556 2.99951 11.5493 3.58011 9.59585 4.68529C7.64239 5.79046 6.00834 7.38256 4.85274 9.30662C3.69715 11.2307 3.05938 13.4212 3.00151 15.6648C2.94365 17.9085 3.46765 20.1289 4.52253 22.11L3.10378 26.3662C2.98626 26.7186 2.96921 27.0968 3.05453 27.4583C3.13985 27.8199 3.32417 28.1505 3.58684 28.4132C3.84951 28.6759 4.18015 28.8602 4.54169 28.9455C4.90323 29.0308 5.28139 29.0138 5.63378 28.8962L9.89003 27.4775C11.6335 28.4048 13.5653 28.9228 15.5388 28.992C17.5123 29.0613 19.4757 28.68 21.2799 27.8772C23.084 27.0743 24.6816 25.871 25.9513 24.3586C27.221 22.8462 28.1294 21.0644 28.6077 19.1484C29.0859 17.2325 29.1214 15.2327 28.7114 13.301C28.3015 11.3693 27.4568 9.55642 26.2416 7.99989C25.0263 6.44337 23.4725 5.18415 21.6979 4.31782C19.9234 3.45149 17.9748 3.00081 16 3ZM16 27C14.0663 27.0013 12.1664 26.4921 10.4925 25.5237C10.37 25.4527 10.2337 25.4085 10.0928 25.394C9.95185 25.3796 9.80945 25.3953 9.67503 25.44L5.00003 27L6.55878 22.325C6.60371 22.1907 6.61959 22.0483 6.60537 21.9074C6.59115 21.7664 6.54715 21.6301 6.47628 21.5075C5.26374 19.4111 4.77692 16.9732 5.09132 14.5719C5.40572 12.1707 6.50377 9.94027 8.21514 8.22674C9.92651 6.51321 12.1555 5.41234 14.5564 5.0949C16.9573 4.77747 19.3958 5.26122 21.4937 6.47111C23.5916 7.68099 25.2316 9.54938 26.1592 11.7864C27.0869 14.0235 27.2504 16.5042 26.6243 18.8436C25.9983 21.1831 24.6177 23.2505 22.6967 24.7253C20.7758 26.2 18.4218 26.9996 16 27Z" fill="currentColor" /><path d="M22.8334 13.3333C22.8334 13.5985 22.728 13.8529 22.5405 14.0404C22.3529 14.228 22.0986 14.3333 21.8334 14.3333H10.6667C10.4015 14.3333 10.1471 14.228 9.95959 14.0404C9.77205 13.8529 9.6667 13.5985 9.6667 13.3333C9.6667 13.0681 9.77205 12.8138 9.95959 12.6262C10.1471 12.4387 10.4015 12.3333 10.6667 12.3333H21.8334C22.0986 12.3333 22.3529 12.4387 22.5405 12.6262C22.728 12.8138 22.8334 13.0681 22.8334 13.3333ZM17.8334 17.6667H10.6667C10.4015 17.6667 10.1471 17.772 9.95959 17.9596C9.77205 18.1471 9.6667 18.4014 9.6667 18.6667C9.6667 18.9319 9.77205 19.1862 9.95959 19.3738C10.1471 19.5613 10.4015 19.6667 10.6667 19.6667H17.8334C18.0986 19.6667 18.3529 19.5613 18.5405 19.3738C18.728 19.1862 18.8334 18.9319 18.8334 18.6667C18.8334 18.4014 18.728 18.1471 18.5405 17.9596C18.3529 17.772 18.0986 17.6667 17.8334 17.6667Z" fill="currentColor" /></svg>',Ln='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" ><path d="M13.7071 1.70711C14.0976 1.31658 14.0976 0.683417 13.7071 0.292893C13.3166 -0.0976311 12.6834 -0.0976311 12.2929 0.292893L7 5.58579L1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L5.58579 7L0.292893 12.2929C-0.0976311 12.6834 -0.0976311 13.3166 0.292893 13.7071C0.683417 14.0976 1.31658 14.0976 1.70711 13.7071L7 8.41421L12.2929 13.7071C12.6834 14.0976 13.3166 14.0976 13.7071 13.7071C14.0976 13.3166 14.0976 12.6834 13.7071 12.2929L8.41421 7L13.7071 1.70711Z" fill="currentColor" /></svg>',An='<svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none" ><path d="M21.3585 12.5306L14.6085 19.2806C14.4678 19.4213 14.2769 19.5004 14.0779 19.5004C13.8789 19.5004 13.688 19.4213 13.5473 19.2806C13.4065 19.1399 13.3275 18.949 13.3275 18.75C13.3275 18.551 13.4065 18.3601 13.5473 18.2194L19.0176 12.75H4.32788C4.12897 12.75 3.9382 12.671 3.79755 12.5303C3.6569 12.3897 3.57788 12.1989 3.57788 12C3.57788 11.8011 3.6569 11.6103 3.79755 11.4697C3.9382 11.329 4.12897 11.25 4.32788 11.25H19.0176L13.5473 5.78061C13.4065 5.63988 13.3275 5.44901 13.3275 5.24999C13.3275 5.05097 13.4065 4.8601 13.5473 4.71936C13.688 4.57863 13.8789 4.49957 14.0779 4.49957C14.2769 4.49957 14.4678 4.57863 14.6085 4.71936L21.3585 11.4694C21.4282 11.539 21.4836 11.6217 21.5213 11.7128C21.559 11.8038 21.5785 11.9014 21.5785 12C21.5785 12.0986 21.559 12.1961 21.5213 12.2872C21.4836 12.3782 21.4282 12.461 21.3585 12.5306Z" fill="currentColor" /></svg>',Fn='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" ><path d="M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17316C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8078C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C21.9972 9.34869 20.9427 6.80678 19.068 4.93202C17.1932 3.05727 14.6513 2.0028 12 2ZM12 20.4615C10.3265 20.4615 8.69052 19.9653 7.29902 19.0355C5.90753 18.1057 4.823 16.7842 4.18256 15.2381C3.54213 13.6919 3.37456 11.9906 3.70105 10.3492C4.02754 8.70786 4.83343 7.20016 6.01679 6.01679C7.20016 4.83342 8.70786 4.02754 10.3492 3.70105C11.9906 3.37456 13.6919 3.54212 15.2381 4.18256C16.7842 4.82299 18.1057 5.90753 19.0355 7.29902C19.9653 8.69051 20.4615 10.3265 20.4615 12C20.459 14.2434 19.5667 16.3941 17.9804 17.9804C16.3941 19.5667 14.2434 20.459 12 20.4615ZM11.2308 12.7692V7.38461C11.2308 7.1806 11.3118 6.98494 11.4561 6.84069C11.6003 6.69643 11.796 6.61538 12 6.61538C12.204 6.61538 12.3997 6.69643 12.5439 6.84069C12.6882 6.98494 12.7692 7.1806 12.7692 7.38461V12.7692C12.7692 12.9732 12.6882 13.1689 12.5439 13.3132C12.3997 13.4574 12.204 13.5385 12 13.5385C11.796 13.5385 11.6003 13.4574 11.4561 13.3132C11.3118 13.1689 11.2308 12.9732 11.2308 12.7692ZM13.1538 16.2308C13.1538 16.459 13.0862 16.6821 12.9594 16.8718C12.8326 17.0616 12.6524 17.2094 12.4416 17.2968C12.2307 17.3841 11.9987 17.407 11.7749 17.3624C11.5511 17.3179 11.3455 17.208 11.1841 17.0467C11.0227 16.8853 10.9128 16.6797 10.8683 16.4559C10.8238 16.232 10.8467 16 10.934 15.7892C11.0213 15.5784 11.1692 15.3982 11.359 15.2714C11.5487 15.1446 11.7718 15.0769 12 15.0769C12.306 15.0769 12.5995 15.1985 12.8159 15.4149C13.0323 15.6313 13.1538 15.9247 13.1538 16.2308Z" fill="currentColor" /></svg>',Nn='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <rect x="5" y="11" width="14" height="10" rx="2" ry="2"/>\n <path d="M7 11V7a5 5 0 0 1 10 0v4"/>\n</svg>\n',Mn=e=>({Deutsch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="6" fill="#000000" /><rect y="6" width="18" height="6" fill="#DD0000" /><rect y="12" width="18" height="6" fill="#FFCE00" /></svg>'}),Englisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="18" fill="#012169" /><path d="M0,0 L18,18 M18,0 L0,18" stroke="#FFFFFF" stroke-width="2" /><path d="M9,0 L9,18 M0,9 L18,9" stroke="#FFFFFF" stroke-width="3" /><path d="M0,0 L18,18 M18,0 L0,18" stroke="#C8102E" stroke-width="1" /><path d="M9,0 L9,18 M0,9 L18,9" stroke="#C8102E" stroke-width="1.5" /></svg>'}),Französisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="6" height="18" fill="#0055A4" /><rect x="6" width="6" height="18" fill="#FFFFFF" /><rect x="12" width="6" height="18" fill="#EF4135" /></svg>'}),Italienisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="6" height="18" fill="#009246" /><rect x="6" width="6" height="18" fill="#FFFFFF" /><rect x="12" width="6" height="18" fill="#CE2B37" /></svg>'}),Polnisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="9" fill="#FFFFFF" /><rect y="9" width="18" height="9" fill="#DC143C" /></svg>'}),Türkisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="18" fill="#E30A17" /><circle cx="7" cy="9" r="3" fill="none" stroke="#FFFFFF" stroke-width="0.8" /><circle cx="8.5" cy="9" r="2.2" fill="#E30A17" /><path d="M10.5,7 L11.5,8.5 L13,8 L12,9.5 L13,11 L11.5,10.5 L10.5,12 L10,10.5 L8.5,11 L9.5,9.5 L8.5,8 L10,8.5 Z" fill="#FFFFFF" /></svg>'}),Griechisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="18" fill="#0D5EAF" /><rect x="0" y="0" width="7" height="7" fill="#FFFFFF" /><rect x="3" y="0" width="1" height="7" fill="#0D5EAF" /><rect x="0" y="3" width="7" height="1" fill="#0D5EAF" /><rect y="8" width="18" height="1" fill="#FFFFFF" /><rect y="10" width="18" height="1" fill="#FFFFFF" /><rect y="12" width="18" height="1" fill="#FFFFFF" /><rect y="14" width="18" height="1" fill="#FFFFFF" /><rect y="16" width="18" height="1" fill="#FFFFFF" /></svg>'}),Russisch:kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><rect width="18" height="6" fill="#FFFFFF" /><rect y="6" width="18" height="6" fill="#0039A6" /><rect y="12" width="18" height="6" fill="#D52B1E" /></svg>'})}[e]||kn(Sn,{svg:'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" ><circle cx="9" cy="9" r="8" fill="#4A90E2" /><text x="9" y="12" textAnchor="middle" fill="white" fontSize="10"> 🌐 </text></svg>'})),Pn=({type:e})=>{const n={width:"20px",height:"20px"};return kn("div",{style:{width:"30px",height:"30px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:"2px"},children:(()=>{switch(e){case"microphone":return kn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",style:n,children:kn("path",{d:"M8 11C8.7954 10.9992 9.55798 10.6828 10.1204 10.1204C10.6828 9.55798 10.9992 8.7954 11 8V4C11 3.20435 10.6839 2.44129 10.1213 1.87868C9.55871 1.31607 8.79565 1 8 1C7.20435 1 6.44129 1.31607 5.87868 1.87868C5.31607 2.44129 5 3.20435 5 4V8C5.00083 8.7954 5.31716 9.55798 5.87959 10.1204C6.44202 10.6828 7.2046 10.9992 8 11ZM6 4C6 3.46957 6.21071 2.96086 6.58579 2.58579C6.96086 2.21071 7.46957 2 8 2C8.53043 2 9.03914 2.21071 9.41421 2.58579C9.78929 2.96086 10 3.46957 10 4V8C10 8.53043 9.78929 9.03914 9.41421 9.41421C9.03914 9.78929 8.53043 10 8 10C7.46957 10 6.96086 9.78929 6.58579 9.41421C6.21071 9.03914 6 8.53043 6 8V4ZM8.5 12.975V15C8.5 15.1326 8.44732 15.2598 8.35355 15.3536C8.25979 15.4473 8.13261 15.5 8 15.5C7.86739 15.5 7.74021 15.4473 7.64645 15.3536C7.55268 15.2598 7.5 15.1326 7.5 15V12.975C6.26728 12.8496 5.12485 12.2715 4.29365 11.3525C3.46245 10.4336 3.00152 9.23909 3 8C3 7.86739 3.05268 7.74021 3.14645 7.64645C3.24021 7.55268 3.36739 7.5 3.5 7.5C3.63261 7.5 3.75979 7.55268 3.85355 7.64645C3.94732 7.74021 4 7.86739 4 8C4 9.06087 4.42143 10.0783 5.17157 10.8284C5.92172 11.5786 6.93913 12 8 12C9.06087 12 10.0783 11.5786 10.8284 10.8284C11.5786 10.0783 12 9.06087 12 8C12 7.86739 12.0527 7.74021 12.1464 7.64645C12.2402 7.55268 12.3674 7.5 12.5 7.5C12.6326 7.5 12.7598 7.55268 12.8536 7.64645C12.9473 7.74021 13 7.86739 13 8C12.9985 9.23909 12.5375 10.4336 11.7063 11.3525C10.8751 12.2715 9.73272 12.8496 8.5 12.975Z"})});case"globe":return kn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",style:n,children:kn("path",{d:"M6.99992 0.333328C5.68138 0.333328 4.39245 0.724321 3.29612 1.45686C2.19979 2.18941 1.34531 3.2306 0.840725 4.44877C0.33614 5.66695 0.204118 7.00739 0.461353 8.3006C0.718588 9.5938 1.35353 10.7817 2.28588 11.714C3.21823 12.6464 4.40611 13.2813 5.69932 13.5386C6.99252 13.7958 8.33297 13.6638 9.55114 13.1592C10.7693 12.6546 11.8105 11.8001 12.5431 10.7038C13.2756 9.60747 13.6666 8.31854 13.6666 6.99999C13.6645 5.23252 12.9615 3.53803 11.7117 2.28824C10.4619 1.03845 8.76739 0.335404 6.99992 0.333328ZM12.3313 4.51633H9.69208C9.37747 3.30384 8.80373 2.17396 8.01038 1.20457C8.94358 1.36912 9.82344 1.75597 10.5755 2.33242C11.3276 2.90887 11.9299 3.65796 12.3313 4.51633ZM12.8823 6.99999C12.8827 7.57566 12.7984 8.14825 12.6319 8.69934H9.86332C10.0542 7.57448 10.0542 6.42551 9.86332 5.30065H12.6319C12.7984 5.85173 12.8827 6.42433 12.8823 6.99999ZM6.99992 12.7405C6.62235 12.3554 6.28931 11.9289 6.00711 11.4693C5.62628 10.8498 5.33039 10.1819 5.12737 9.48365H8.87247C8.66945 10.1819 8.37356 10.8498 7.99273 11.4693C7.71053 11.9289 7.37749 12.3554 6.99992 12.7405ZM4.93783 8.69934C4.72432 7.5765 4.72432 6.42348 4.93783 5.30065H9.06201C9.27553 6.42348 9.27553 7.5765 9.06201 8.69934H4.93783ZM1.11757 6.99999C1.11713 6.42433 1.20148 5.85173 1.3679 5.30065H4.13652C3.94567 6.42551 3.94567 7.57448 4.13652 8.69934H1.3679C1.20148 8.14825 1.11713 7.57566 1.11757 6.99999ZM6.99992 1.25947C7.37749 1.64464 7.71053 2.07107 7.99273 2.53071C8.37356 3.15021 8.66945 3.81805 8.87247 4.51633H5.12737C5.33039 3.81805 5.62628 3.15021 6.00711 2.53071C6.28931 2.07107 6.62235 1.64464 6.99992 1.25947ZM5.98946 1.20457C5.19612 2.17396 4.62237 3.30384 4.30776 4.51633H1.66855C2.06997 3.65796 2.67219 2.90887 3.4243 2.33242C4.1764 1.75597 5.05626 1.36912 5.98946 1.20457ZM1.66855 9.48365H4.30776C4.62237 10.6961 5.19612 11.826 5.98946 12.7954C5.05626 12.6309 4.1764 12.244 3.4243 11.6676C2.67219 11.0911 2.06997 10.342 1.66855 9.48365ZM8.00842 12.7954C8.80247 11.8262 9.37689 10.6963 9.69208 9.48365H12.3313C11.9299 10.342 11.3276 11.0911 10.5755 11.6676C9.82344 12.244 8.94358 12.6309 8.01038 12.7954H8.00842Z"})});case"speaker":return kn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 15 14",fill:"none",style:n,children:kn("path",{d:"M8.71938 0.550623C8.63529 0.509651 8.54141 0.493086 8.44838 0.502808C8.35535 0.51253 8.26692 0.548151 8.19313 0.605623L3.82813 4H1C0.734784 4 0.48043 4.10536 0.292893 4.29289C0.105357 4.48043 0 4.73478 0 5V9C0 9.26521 0.105357 9.51957 0.292893 9.7071C0.48043 9.89464 0.734784 10 1 10H3.82813L8.19313 13.3944C8.26699 13.4518 8.35548 13.4873 8.44855 13.497C8.54161 13.5066 8.63551 13.4899 8.71956 13.4488C8.80362 13.4078 8.87446 13.3439 8.92404 13.2646C8.97361 13.1852 8.99993 13.0936 9 13V0.999998C9.00001 0.906328 8.97371 0.814538 8.9241 0.735087C8.87449 0.655637 8.80355 0.591721 8.71938 0.550623ZM1 5H3.5V9H1V5ZM8 11.9775L4.5 9.25562V4.74437L8 2.0225V11.9775ZM11.375 5.3475C11.7772 5.80405 11.999 6.39158 11.999 7C11.999 7.60841 11.7772 8.19595 11.375 8.6525C11.2867 8.74956 11.1637 8.808 11.0327 8.81521C10.9016 8.82241 10.773 8.7778 10.6745 8.69101C10.5761 8.60421 10.5157 8.48219 10.5065 8.35128C10.4972 8.22036 10.5398 8.09105 10.625 7.99125C10.8662 7.71735 10.9992 7.36493 10.9992 7C10.9992 6.63506 10.8662 6.28264 10.625 6.00875C10.5398 5.90895 10.4972 5.77964 10.5065 5.64872C10.5157 5.51781 10.5761 5.39578 10.6745 5.30899C10.773 5.22219 10.9016 5.17758 11.0327 5.18479C11.1637 5.19199 11.2867 5.25043 11.375 5.3475ZM14.5 7C14.5007 8.23012 14.0474 9.41723 13.2269 10.3337C13.1378 10.4301 13.0144 10.4876 12.8833 10.4938C12.7522 10.5 12.624 10.4545 12.5262 10.3669C12.4284 10.2794 12.369 10.1569 12.3607 10.026C12.3524 9.89501 12.3959 9.76603 12.4819 9.66687C13.1378 8.93352 13.5004 7.98417 13.5004 7.00031C13.5004 6.01645 13.1378 5.0671 12.4819 4.33375C12.4369 4.28504 12.402 4.22785 12.3793 4.16553C12.3566 4.10321 12.3465 4.03699 12.3496 3.97073C12.3528 3.90448 12.3691 3.83951 12.3976 3.77961C12.426 3.71971 12.4662 3.66608 12.5156 3.62184C12.565 3.5776 12.6227 3.54364 12.6854 3.52193C12.7481 3.50022 12.8145 3.4912 12.8807 3.49539C12.9469 3.49958 13.0116 3.5169 13.071 3.54634C13.1304 3.57578 13.1834 3.61675 13.2269 3.66687C14.0476 4.58301 14.501 5.77001 14.5 7Z"})});case"chat":return kn("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",style:n,children:[kn("path",{d:"M6.99995 0.5C5.87775 0.499755 4.77459 0.790055 3.79786 1.34264C2.82113 1.89523 2.00411 2.69128 1.42631 3.65331C0.848514 4.61534 0.52963 5.71058 0.500696 6.83241C0.471763 7.95425 0.733766 9.06446 1.2612 10.055L0.551829 12.1831C0.493069 12.3593 0.484542 12.5484 0.527203 12.7292C0.569863 12.9099 0.662026 13.0753 0.793361 13.2066C0.924696 13.3379 1.09001 13.4301 1.27078 13.4728C1.45155 13.5154 1.64063 13.5069 1.81683 13.4481L3.94495 12.7387C4.81668 13.2024 5.78259 13.4614 6.76935 13.496C7.75611 13.5306 8.73779 13.34 9.63987 12.9386C10.542 12.5372 11.3407 11.9355 11.9756 11.1793C12.6104 10.4231 13.0647 9.53218 13.3038 8.57421C13.5429 7.61623 13.5607 6.61637 13.3557 5.65052C13.1507 4.68467 12.7283 3.77821 12.1207 2.99995C11.5131 2.22168 10.7362 1.59208 9.8489 1.15891C8.96162 0.725743 7.98732 0.500405 6.99995 0.5ZM6.99995 12.5C6.03306 12.5007 5.08314 12.246 4.2462 11.7619C4.18493 11.7263 4.1168 11.7042 4.04633 11.697C3.97586 11.6898 3.90466 11.6976 3.83745 11.72L1.49995 12.5L2.27933 10.1625C2.3018 10.0953 2.30974 10.0242 2.30262 9.95369C2.29551 9.88322 2.27351 9.81507 2.23808 9.75375C1.63181 8.70557 1.3884 7.48661 1.5456 6.28597C1.7028 5.08534 2.25182 3.97014 3.10751 3.11337C3.96319 2.2566 5.0777 1.70617 6.27814 1.54745C7.47858 1.38873 8.69784 1.63061 9.74679 2.23555C10.7957 2.8405 11.6157 3.77469 12.0796 4.89322C12.5434 6.01175 12.6251 7.25208 12.3121 8.4218C11.9991 9.59153 11.3088 10.6253 10.3483 11.3626C9.38781 12.1 8.21084 12.4998 6.99995 12.5Z"}),kn("path",{d:"M10.4166 5.66667C10.4166 5.79927 10.3639 5.92645 10.2702 6.02022C10.1764 6.11399 10.0492 6.16667 9.91662 6.16667H4.33329C4.20068 6.16667 4.0735 6.11399 3.97973 6.02022C3.88597 5.92645 3.83329 5.79927 3.83329 5.66667C3.83329 5.53406 3.88597 5.40688 3.97973 5.31311C4.0735 5.21935 4.20068 5.16667 4.33329 5.16667H9.91662C10.0492 5.16667 10.1764 5.21935 10.2702 5.31311C10.3639 5.40688 10.4166 5.53406 10.4166 5.66667ZM7.91662 7.83333H4.33329C4.20068 7.83333 4.0735 7.88601 3.97973 7.97978C3.88597 8.07355 3.83329 8.20072 3.83329 8.33333C3.83329 8.46594 3.88597 8.59312 3.97973 8.68689C4.0735 8.78065 4.20068 8.83333 4.33329 8.83333H7.91662C8.04923 8.83333 8.17641 8.78065 8.27017 8.68689C8.36394 8.59312 8.41662 8.46594 8.41662 8.33333C8.41662 8.20072 8.36394 8.07355 8.27017 7.97978C8.17641 7.88601 8.04923 7.83333 7.91662 7.83333Z"})]});default:return null}})()})},Dn=(e,n,t=!0)=>{const o=Object.assign({},e);return null!==n&&(o.Authorization=`Bearer ${n}`),o},On=(e,n=!0)=>({method:"GET",headers:Dn({"Content-Type":"application/json",Accept:"application/json"},e,n)}),zn=(e,n)=>({method:"POST",headers:Dn({"Content-Type":"application/json",Accept:"application/json"},n),body:JSON.stringify(e)}),Rn="https://cms.ai-gelb.de",jn="https://streaming.ai-gelb.de",Bn=e=>{if(!e)return!1;if("string"!=typeof e)return!1;const n=e.length;return n>=8&&n<=128},Hn=e=>!!e&&!!/^\d+$/.test(String(e)),$n=e=>!(!e||"string"!=typeof e||!e.trim());var Un=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var Yn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var Vn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var qn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var Wn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var Zn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Gn=(e,n,t,o,r,i,a)=>Zn(void 0,void 0,void 0,function*(){if(!Hn(e))throw new Error("Agent ID is required and must be numeric");if(!$n(n))throw new Error("Message is required and must be a non-empty string");if(!(e=>!(!e||"string"!=typeof e))(t))throw new Error("Conversation ID is required and must be a string");const s=`${jn}/api/stream/${e}`,l=a&&a.length>0?yield Promise.all(a.map(e=>new Promise((n,t)=>{const o=new FileReader;o.onload=()=>n({filename:e.name,mimeType:e.type||"application/octet-stream",data:o.result}),o.onerror=t,o.readAsDataURL(e)}))):void 0;let c;try{c=yield fetch(s,(u=Object.assign({message:n,conversation_id:t,language:r,easy_language:i},l&&{files:l}),d=o,{method:"POST",headers:Dn({"Content-Type":"application/json"},d),body:JSON.stringify(u)}))}catch(e){if(e instanceof TypeError&&"Failed to fetch"===e.message){const e=window.location.origin;if(e!==new URL(jn).origin&&navigator.onLine)throw new Error(`CORS_BLOCKED: Domain "${e}" is not on the allowlist for this agent`)}throw e}var u,d;if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);if(!c.body)throw new Error("Response body is null");return c.body.getReader()});var Kn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Xn=(e,n)=>Kn(void 0,void 0,void 0,function*(){if(!(e=>e instanceof Blob&&0!==e.size)(e))throw new Error("Audio blob is required and must be a non-empty Blob instance");const t=new FormData;t.append("file",e,"recording.webm");const o=yield fetch(`${jn}/api/speech-to-text`,((e,n)=>({method:"POST",headers:Dn({Accept:"application/json"},n),body:e}))(t,n));if(!o.ok){const e=yield o.text();throw new Error(`HTTP error! status: ${o.status} - ${e}`)}return o.json()});var Qn=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Jn=(e,n,t,o,r)=>Qn(void 0,void 0,void 0,function*(){if(null===n&&(n="gpt-4o-mini-tts"),null===t&&(t="shimmer"),!$n(e))throw new Error("Text is required and must be a non-empty string");const i={model:n,voice:t,prompt:e.trim()},a=yield fetch(`${jn}/api/text-to-speech`,((e,n,t)=>{const o={method:"POST",headers:Dn({"Content-Type":"application/json",Accept:"application/json"},t),body:JSON.stringify(e)};return null!==n&&(o.signal=n),o})(i,o,r));if(!a.ok)throw new Error(`TTS API error: ${a.status}`);const s=yield a.json();if(!(e=>!(!e||!e.audio))(s))throw new Error("No audio data received from TTS API");return s});var et=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var nt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var tt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};var ot=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const rt=({traceId:e,config:n,onRatingSubmitted:t,onFeedbackOpen:o})=>{const{showSuccess:r,showError:i}=xt(),{t:a,session:s}=po(),[l,c]=de(null),[u,{open:d,close:p}]=_n(),h=ve(n=>ot(void 0,void 0,void 0,function*(){if(l!==n&&!u){d();try{yield(h={traceId:e,value:n,name:"helpfulness"},f=s.sessionState.sessionToken,Un(void 0,void 0,void 0,function*(){const{name:e,traceId:n,value:t}=h;if(!Bn(n))throw new Error(`Invalid traceId - must be string (8-128 chars): ${n}`);if(!(e=>{switch(e){case-1:case 0:case 1:return!0;default:return!1}})(t))throw new Error(`Invalid rating value - must be -1, 0, or 1: ${t}`);if(!(e=>void 0!==e&&""!==e&&"string"==typeof e)(e))throw new Error(`Invalid name - must be a non-empty string: ${e}`);const o=`${jn}/api/rate`;void 0!==h.comment&&(h.comment=h.comment.trim());const r=yield fetch(o,zn(h,f));if(!r.ok){const e=yield r.text();throw new Error(`API request failed: ${r.status} - ${e}`)}return r})),c(n),0!==n&&r(a.toast.ratingSuccess,5e3),console.log("Rating submitted successfully to AI-Gelb API"),t(),o()}catch(e){console.error("Rating request failed:",e),i(a.toast.ratingError)}finally{p()}var h,f}}),[l,u,e]);return kn("div",{className:"rating-buttons",children:[kn(Cn,{text:a.rating.tooltipHelpful,delay:300,children:kn("button",{className:`btn-base rating-button rating-button-thumbs-up ${1===l?"rating-button--active":""} ${u?"rating-button--disabled":""}`,onClick:()=>h(1),disabled:1===l||u,"aria-label":a.rating.helpful,title:a.rating.helpfulTitle,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none" ><path d="M13.625 4.0075C13.4842 3.84795 13.3111 3.72019 13.1171 3.63269C12.9231 3.54519 12.7128 3.49996 12.5 3.5H9V2.5C9 1.83696 8.73661 1.20107 8.26777 0.732233C7.79893 0.263392 7.16304 1.28189e-07 6.5 1.28189e-07C6.40711 -6.63752e-05 6.31604 0.0257445 6.237 0.0745385C6.15795 0.123333 6.09407 0.19318 6.0525 0.27625L3.69125 5H1C0.734784 5 0.48043 5.10536 0.292893 5.29289C0.105357 5.48043 0 5.73478 0 6V11.5C0 11.7652 0.105357 12.0196 0.292893 12.2071C0.48043 12.3946 0.734784 12.5 1 12.5H11.75C12.1154 12.5001 12.4684 12.3668 12.7425 12.1252C13.0166 11.8835 13.1931 11.5501 13.2388 11.1875L13.9888 5.1875C14.0153 4.97626 13.9966 4.76179 13.9339 4.55833C13.8712 4.35488 13.7659 4.16711 13.625 4.0075ZM1 6H3.5V11.5H1V6ZM12.9963 5.0625L12.2463 11.0625C12.231 11.1834 12.1722 11.2945 12.0808 11.3751C11.9895 11.4556 11.8718 11.5 11.75 11.5H4.5V5.61812L6.79437 1.02875C7.13443 1.09681 7.4404 1.2806 7.66021 1.54884C7.88002 1.81708 8.0001 2.1532 8 2.5V4C8 4.13261 8.05268 4.25979 8.14645 4.35355C8.24021 4.44732 8.36739 4.5 8.5 4.5H12.5C12.571 4.49998 12.6411 4.51505 12.7058 4.54423C12.7704 4.5734 12.8282 4.61601 12.8751 4.66922C12.9221 4.72242 12.9571 4.78501 12.978 4.85282C12.9989 4.92063 13.0051 4.9921 12.9963 5.0625Z" fill="currentColor" /></svg>'})})}),kn(Cn,{text:a.rating.tooltipNeutral,delay:300,children:kn("button",{className:`btn-base rating-button rating-button-neutral ${0===l?"rating-button--active":""} ${u?"rating-button--disabled":""}`,onClick:()=>h(0),disabled:0===l||u,"aria-label":a.rating.neutral,title:a.rating.neutralTitle,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="17" height="16" viewBox="0 0 17 16" fill="none" ><path d="M9.32788 8C9.32788 8.14834 9.28389 8.29334 9.20148 8.41668C9.11907 8.54002 9.00194 8.63615 8.86489 8.69291C8.72785 8.74968 8.57705 8.76453 8.43156 8.73559C8.28608 8.70665 8.15244 8.63522 8.04755 8.53033C7.94266 8.42544 7.87123 8.29181 7.84229 8.14632C7.81335 8.00084 7.82821 7.85004 7.88497 7.71299C7.94174 7.57595 8.03787 7.45881 8.1612 7.3764C8.28454 7.29399 8.42954 7.25 8.57788 7.25C8.77679 7.25 8.96756 7.32902 9.10821 7.46967C9.24886 7.61033 9.32788 7.80109 9.32788 8ZM5.82788 7.25C5.67954 7.25 5.53454 7.29399 5.4112 7.3764C5.28787 7.45881 5.19174 7.57595 5.13497 7.71299C5.07821 7.85004 5.06335 8.00084 5.09229 8.14632C5.12123 8.29181 5.19266 8.42544 5.29755 8.53033C5.40244 8.63522 5.53608 8.70665 5.68156 8.73559C5.82705 8.76453 5.97785 8.74968 6.11489 8.69291C6.25194 8.63615 6.36907 8.54002 6.45148 8.41668C6.53389 8.29334 6.57788 8.14834 6.57788 8C6.57788 7.80109 6.49886 7.61033 6.35821 7.46967C6.21756 7.32902 6.02679 7.25 5.82788 7.25ZM11.3279 7.25C11.1795 7.25 11.0345 7.29399 10.9112 7.3764C10.7879 7.45881 10.6917 7.57595 10.635 7.71299C10.5782 7.85004 10.5634 8.00084 10.5923 8.14632C10.6212 8.29181 10.6927 8.42544 10.7976 8.53033C10.9024 8.63522 11.0361 8.70665 11.1816 8.73559C11.327 8.76453 11.4778 8.74968 11.6149 8.69291C11.7519 8.63615 11.8691 8.54002 11.9515 8.41668C12.0339 8.29334 12.0779 8.14834 12.0779 8C12.0779 7.80109 11.9989 7.61033 11.8582 7.46967C11.7176 7.32902 11.5268 7.25 11.3279 7.25ZM15.0779 8C15.0781 9.12221 14.7878 10.2254 14.2352 11.2021C13.6826 12.1788 12.8866 12.9958 11.9246 13.5736C10.9625 14.1514 9.8673 14.4703 8.74547 14.4993C7.62363 14.5282 6.51342 14.2662 5.52288 13.7388L3.39476 14.4481C3.21856 14.5069 3.02948 14.5154 2.84871 14.4728C2.66794 14.4301 2.50262 14.3379 2.37129 14.2066C2.23995 14.0753 2.14779 13.9099 2.10513 13.7292C2.06247 13.5484 2.071 13.3593 2.12976 13.1831L2.83913 11.055C2.37547 10.1833 2.1165 9.21737 2.08188 8.23061C2.04725 7.24385 2.23788 6.26217 2.6393 5.36009C3.04071 4.458 3.64236 3.65922 4.39858 3.02437C5.15479 2.38953 6.0457 1.9353 7.00367 1.69618C7.96165 1.45705 8.9615 1.43931 9.92736 1.6443C10.8932 1.84929 11.7997 2.27162 12.5779 2.87924C13.3562 3.48685 13.9858 4.26379 14.419 5.15106C14.8521 6.03834 15.0775 7.01264 15.0779 8ZM14.0779 8C14.0776 7.15633 13.8833 6.32402 13.5099 5.56747C13.1366 4.81092 12.5941 4.1504 11.9246 3.63702C11.2551 3.12365 10.4765 2.77117 9.64899 2.60687C8.82147 2.44257 7.96725 2.47084 7.1524 2.6895C6.33756 2.90816 5.58394 3.31135 4.94985 3.86787C4.31576 4.4244 3.8182 5.11933 3.49567 5.89892C3.17313 6.6785 3.03427 7.52184 3.08981 8.36368C3.14536 9.20553 3.39383 10.0233 3.81601 10.7538C3.85144 10.8151 3.87344 10.8832 3.88055 10.9537C3.88766 11.0242 3.87972 11.0953 3.85726 11.1625L3.07788 13.5L5.41538 12.7206C5.46629 12.7033 5.51971 12.6944 5.57351 12.6944C5.66132 12.6945 5.74755 12.7178 5.82351 12.7619C6.65963 13.2456 7.60842 13.5007 8.57441 13.5013C9.54039 13.5019 10.4895 13.2481 11.3262 12.7654C12.163 12.2826 12.8578 11.5881 13.3409 10.7515C13.8239 9.915 14.0781 8.96599 14.0779 8Z" fill="currentColor" /></svg>'})})}),kn(Cn,{text:a.rating.tooltipNotHelpful,bgColor:(null==n?void 0:n.tooltipBgColor)||(null==n?void 0:n.primaryColor)||"#4a90e2",textColor:(null==n?void 0:n.tooltipTextColor)||(null==n?void 0:n.secondaryColor)||"#f5f8ff",delay:300,children:kn("button",{className:`btn-base rating-button rating-button-thumbs-down ${-1===l?"rating-button--active":""} ${u?"rating-button--disabled":""}`,onClick:()=>h(-1),disabled:-1===l||u,"aria-label":a.rating.notHelpful,title:a.rating.notHelpfulTitle,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" ><path d="M14.9888 9.8125L14.2388 3.8125C14.1931 3.44993 14.0166 3.1165 13.7425 2.87483C13.4684 2.63316 13.1154 2.49987 12.75 2.5H2C1.73478 2.5 1.48043 2.60536 1.29289 2.79289C1.10536 2.98043 1 3.23478 1 3.5V9C1 9.26522 1.10536 9.51957 1.29289 9.70711C1.48043 9.89464 1.73478 10 2 10H4.69125L7.0525 14.7238C7.09407 14.8068 7.15795 14.8767 7.237 14.9255C7.31604 14.9743 7.40711 15.0001 7.5 15C8.16304 15 8.79893 14.7366 9.26777 14.2678C9.73661 13.7989 10 13.163 10 12.5V11.5H13.5C13.7129 11.5001 13.9233 11.4548 14.1173 11.3673C14.3113 11.2798 14.4845 11.152 14.6253 10.9923C14.7662 10.8327 14.8714 10.645 14.9341 10.4415C14.9967 10.2381 15.0154 10.0237 14.9888 9.8125ZM4.5 9H2V3.5H4.5V9ZM13.875 10.3306C13.8284 10.3842 13.7708 10.4271 13.706 10.4564C13.6413 10.4856 13.571 10.5005 13.5 10.5H9.5C9.36739 10.5 9.24021 10.5527 9.14645 10.6464C9.05268 10.7402 9 10.8674 9 11V12.5C9.0001 12.8468 8.88002 13.1829 8.66021 13.4512C8.4404 13.7194 8.13443 13.9032 7.79437 13.9712L5.5 9.38188V3.5H12.75C12.8718 3.49996 12.9895 3.54439 13.0808 3.62494C13.1722 3.7055 13.231 3.81664 13.2463 3.9375L13.9963 9.9375C14.0056 10.0079 13.9996 10.0795 13.9787 10.1473C13.9578 10.2152 13.9224 10.2777 13.875 10.3306Z" fill="currentColor" /></svg>'})})})]})};var it=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const at=({messageId:e,text:n,isSimplified:t,enabled:o})=>{const{conversation:{simplifyMessage:r},t:i}=po(),[a,{open:s,close:l}]=_n(),c=ve(()=>it(void 0,void 0,void 0,function*(){if(!a&&""!==n.trim()){s();try{yield r(e)}finally{l()}}}),[a,n,s,l,r]);return t?null:o?kn(Cn,{text:i.easyLanguage.tooltip,delay:300,children:kn("button",{onClick:c,disabled:a||!n,className:"btn-base simplify-message-button "+(a?"simplify-message-button--processing":""),title:i.simplify.title,"aria-label":i.simplify.ariaLabel,children:[kn("div",{className:"simplify-message-button__icon",children:kn(Sn,a?{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" class="simplify-spinner" ><path d="M7 1a6 6 0 1 0 6 6 .5.5 0 0 1 1 0 7 7 0 1 1-7-7 .5.5 0 0 1 0 1z" fill="currentColor" /></svg>'}:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 16 16" fill="none" ><path d="M7.99995 1.5C6.87775 1.49976 5.77459 1.79006 4.79786 2.34264C3.82113 2.89523 3.00411 3.69128 2.42631 4.65331C1.84851 5.61534 1.52963 6.71058 1.5007 7.83241C1.47176 8.95425 1.73377 10.0645 2.2612 11.055L1.55183 13.1831C1.49307 13.3593 1.48454 13.5484 1.5272 13.7292C1.56986 13.9099 1.66203 14.0753 1.79336 14.2066C1.9247 14.3379 2.09001 14.4301 2.27078 14.4728C2.45155 14.5154 2.64063 14.5069 2.81683 14.4481L4.94495 13.7387C5.81668 14.2024 6.78259 14.4614 7.76935 14.496C8.75611 14.5306 9.73779 14.34 10.6399 13.9386C11.542 13.5372 12.3407 12.9355 12.9756 12.1793C13.6104 11.4231 14.0647 10.5322 14.3038 9.57421C14.5429 8.61623 14.5607 7.61637 14.3557 6.65052C14.1507 5.68467 13.7283 4.77821 13.1207 3.99995C12.5131 3.22168 11.7362 2.59208 10.8489 2.15891C9.96162 1.72574 8.98732 1.50041 7.99995 1.5ZM7.99995 13.5C7.03306 13.5007 6.08314 13.246 5.2462 12.7619C5.18493 12.7263 5.1168 12.7042 5.04633 12.697C4.97586 12.6898 4.90466 12.6976 4.83745 12.72L2.49995 13.5L3.27933 11.1625C3.3018 11.0953 3.30974 11.0242 3.30262 10.9537C3.29551 10.8832 3.27351 10.8151 3.23808 10.7537C2.63181 9.70557 2.3884 8.48661 2.5456 7.28597C2.7028 6.08534 3.25182 4.97014 4.10751 4.11337C4.96319 3.2566 6.0777 2.70617 7.27814 2.54745C8.47858 2.38873 9.69784 2.63061 10.7468 3.23555C11.7957 3.8405 12.6157 4.77469 13.0796 5.89322C13.5434 7.01175 13.6251 8.25208 13.3121 9.4218C12.9991 10.5915 12.3088 11.6253 11.3483 12.3626C10.3878 13.1 9.21084 13.4998 7.99995 13.5Z" fill="currentColor" /><path d="M11.4166 6.66667C11.4166 6.79927 11.3639 6.92645 11.2702 7.02022C11.1764 7.11399 11.0492 7.16667 10.9166 7.16667H5.33329C5.20068 7.16667 5.0735 7.11399 4.97973 7.02022C4.88597 6.92645 4.83329 6.79927 4.83329 6.66667C4.83329 6.53406 4.88597 6.40688 4.97973 6.31311C5.0735 6.21935 5.20068 6.16667 5.33329 6.16667H10.9166C11.0492 6.16667 11.1764 6.21935 11.2702 6.31311C11.3639 6.40688 11.4166 6.53406 11.4166 6.66667ZM8.91662 8.83333H5.33329C5.20068 8.83333 5.0735 8.88601 4.97973 8.97978C4.88597 9.07355 4.83329 9.20072 4.83329 9.33333C4.83329 9.46594 4.88597 9.59312 4.97973 9.68689C5.0735 9.78065 5.20068 9.83333 5.33329 9.83333H8.91662C9.04923 9.83333 9.17641 9.78065 9.27017 9.68689C9.36394 9.59312 9.41662 9.46594 9.41662 9.33333C9.41662 9.20072 9.36394 9.07355 9.27017 8.97978C9.17641 8.88601 9.04923 8.83333 8.91662 8.83333Z" fill="currentColor" /></svg>'})}),kn("span",{className:"simplify-message-button__text",children:i.simplify.buttonText})]})}):null},st={stt:{startRecording:"Sprachaufnahme starten",stopRecording:"Aufnahme stoppen",processing:"Spracherkennung läuft...",cancelRecording:"Aufnahme abbrechen",confirmRecording:"Aufnahme bestätigen",recording:"Aufnahme läuft...",processingAudio:"Audio wird verarbeitet...",tooltip:"Diktieren starten",error:{generic:"Fehler bei der Sprachaufnahme",permission:"Mikrofonzugriff verweigert. Bitte erlauben Sie den Mikrofonzugriff in den Browsereinstellungen.",notFound:"Kein Mikrofon gefunden. Bitte überprüfen Sie Ihre Mikrofonverbindung.",notSupported:"Sprachaufnahme wird von diesem Browser nicht unterstützt.",policy:"Mikrofonzugriff durch Sicherheitsrichtlinie blockiert. Das Widget muss mit entsprechenden Berechtigungen eingebettet werden.",https:"Mikrofonzugriff erfordert eine sichere HTTPS-Verbindung.",apiError:"Spracherkennung nicht verfügbar. Bitte versuchen Sie es später erneut.",processing:"Fehler bei der Spracherkennung. Bitte versuchen Sie es erneut.",emptyTranscription:"Kein Text erkannt. Bitte sprechen Sie deutlicher."}},tts:{play:"Text vorlesen",pause:"Audio pausieren",resume:"Audio fortsetzen",loading:"Audio wird geladen...",waitingForMessage:"Warten auf vollständige Nachricht...",tooltip:"Antwort vorlesen",states:{loading:"Lädt...",playing:"Pausieren",paused:"Fortsetzen",idle:"Vorlesen"},error:{noText:"Kein Text zum Vorlesen verfügbar.",apiError:"Sprachausgabe nicht verfügbar. Bitte versuchen Sie es später erneut.",noAudio:"Audio konnte nicht generiert werden.",playback:"Fehler bei der Audiowiedergabe.",generic:"Fehler bei der Sprachausgabe. Bitte versuchen Sie es erneut."}},simplify:{title:"In einfacher Sprache erklären",ariaLabel:"Diese Nachricht in einfacher Sprache erklären",buttonText:"Verständliche Sprache",simplifying:"Vereinfache Nachricht..."},easyLanguage:{activate:"Verständliche Sprache aktivieren",deactivate:"Verständliche Sprache deaktivieren",disabled:"Verständliche Sprache ist nur für Deutsch verfügbar",buttonText:"Verständliche Sprache",tooltip:"Antwort in verständlicher Sprache"},rating:{helpful:"Hilfreich",helpfulTitle:"Diese Antwort war hilfreich",notHelpful:"Nicht hilfreich",notHelpfulTitle:"Diese Antwort war nicht hilfreich",neutral:"Feedback",neutralTitle:"Feedback zu dieser Antwort geben",tooltipHelpful:"Gefällt mir",tooltipNotHelpful:"Gefällt mir nicht",tooltipNeutral:"Feedback geben"},feedback:{buttonText:"Feedback geben",buttonTitle:"Detailliertes Feedback hinterlassen",tooltip:"Feedback zu dieser Antwort geben",title:"Ihre Rückmeldung an uns",placeholder:"...",submitLabel:"Feedback senden",submitTitle:"Ihr Feedback absenden",close:"Schließen",closeTitle:"Feedback-Bereich schließen",successMessage:"Vielen Dank! Ihr Feedback hilft uns, den Service stetig zu verbessern."},toast:{generalError:"Entschuldigung, es ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.",ratingSuccess:"Vielen Dank! Ihr Feedback hilft uns, den Service stetig zu verbessern.",ratingError:"Beim Senden Ihres Feedbacks ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.",feedbackSuccess:"Vielen Dank! Ihr Feedback hilft uns, den Service stetig zu verbessern.",feedbackError:"Beim Senden Ihres Feedbacks ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.",configurationError:"Fehler beim Laden der Konfiguration. Einige Funktionen sind möglicherweise nicht verfügbar.",messageError:"Nachricht konnte nicht gesendet werden. Bitte versuchen Sie es erneut.",simplificationError:"Text konnte nicht vereinfacht werden. Bitte versuchen Sie es erneut.",streamingError:"Verbindungsfehler aufgetreten. Bitte versuchen Sie es erneut.",missingAgentId:"Konfigurationsfehler: Agent-ID fehlt. Bitte kontaktieren Sie den Administrator.",close:"Benachrichtigung schließen"},languageSelection:{title:"Sprachauswahl",description:"Wählen Sie Ihre bevorzugte Sprache",buttonText:"Sprache",tooltip:"Sprache wählen"},instructions:{easyLanguage:". Bitte formuliere die Antwort in verständlicher Sprache. Orientiere dich dabei an dem Regelwerk für Leichte Sprache (DIN SPEC 33429). Leite die vereinfachte Version mit 'Hier ist der Text in verständlicher Sprache:' ein. Erwähne NICHT die DIN SPEC 33429 oder andere technische Standards. Verwende NICHT den Begriff 'Leichte Sprache' in der Einleitung",simplifyMessage:". Bitte formuliere mir diesen Text in verständlicher Sprache. Orientiere dich dabei an dem Regelwerk für Leichte Sprache (DIN SPEC 33429). Leite die vereinfachte Version mit 'Hier ist der Text in verständlicher Sprache:' ein. Erwähne NICHT die DIN SPEC 33429 oder andere technische Standards. Verwende NICHT den Begriff 'Leichte Sprache' in der Einleitung"},input:{expand:"Eingabefeld erweitern",collapse:"Eingabefeld verkleinern"},search:{result:"Suchergebnis",search:"Zu Suchmodus wechseln",chat:"Zu Assistent wechseln"},copy:{tooltip:"Antwort kopieren",copied:"Kopiert!",ariaLabel:"Antwort in die Zwischenablage kopieren"},followUp:{loading:"Vertiefungsfragen werden generiert...",ariaLabel:"Vertiefungsfrage stellen"},sidebar:{title:"Menü",newChat:"Neuen Chat starten",pastConversations:"Vergangene Gespräche",conversation:"Gespräch",loadingAgents:"Laden...",otherAssistants:"Weitere Assistenten"},auth:{loginTitle:"Anmelden",registerTitle:"Konto erstellen",forgotPasswordTitle:"Passwort zurücksetzen",forgotPasswordSubtitle:"Geben Sie Ihre E-Mail-Adresse ein und wir senden Ihnen einen Link zum Zurücksetzen Ihres Passworts.",emailLabel:"E-Mail",emailPlaceholder:"ihre.email@beispiel.de",passwordLabel:"Passwort",passwordPlaceholder:"Passwort eingeben",loginButton:"Anmelden",registerButton:"Konto erstellen",resetButton:"Link senden",switchToRegister:"Noch kein Konto? Registrieren",switchToLogin:"Bereits ein Konto? Anmelden",forgotPassword:"Passwort vergessen?",backToLogin:"Zurück zur Anmeldung",verificationSent:"Wir haben Ihnen eine E-Mail gesendet. Bitte bestätigen Sie Ihre E-Mail-Adresse und melden Sie sich dann an.",resetEmailSent:"Falls ein Konto mit dieser E-Mail-Adresse existiert, haben wir Ihnen einen Link zum Zurücksetzen Ihres Passworts gesendet.",error:{emptyEmail:"Bitte geben Sie Ihre E-Mail-Adresse ein",emptyPassword:"Bitte geben Sie Ihr Passwort ein",invalidEmail:"Bitte geben Sie eine gültige E-Mail-Adresse ein",loginFailed:"Anmeldung fehlgeschlagen. Bitte überprüfen Sie Ihre Zugangsdaten.",registerFailed:"Registrierung fehlgeschlagen. Bitte versuchen Sie es erneut.",resetFailed:"Anfrage fehlgeschlagen. Bitte versuchen Sie es erneut.",networkError:"Netzwerkfehler. Bitte versuchen Sie es später erneut.",emailDomain:"Diese E-Mail-Domain ist für diesen Agenten nicht zugelassen"}},sessionError:{title:"Sitzung abgelaufen",message:"Ihre Sitzung ist abgelaufen. Bitte versuchen Sie es erneut.",retry:"Erneut versuchen"},attachments:{addFiles:"Dokumente hinzufügen",maxFilesReached:"Maximale Dateianzahl erreicht. Nicht hinzugefügt:",fileTypeNotAllowed:"Dateityp nicht erlaubt. Nicht hinzugefügt:",fileSizeLimitExceeded:"überschreitet das 10MB-Gesamtlimit"}},lt={stt:{startRecording:"Start voice recording",stopRecording:"Stop recording",processing:"Speech recognition running...",cancelRecording:"Cancel recording",confirmRecording:"Confirm recording",recording:"Recording...",processingAudio:"Processing audio...",tooltip:"Start dictation",error:{generic:"Error during voice recording",permission:"Microphone access denied. Please allow microphone access in browser settings.",notFound:"No microphone found. Please check your microphone connection.",notSupported:"Voice recording is not supported by this browser.",policy:"Microphone access blocked by security policy. The widget must be embedded with appropriate permissions.",https:"Microphone access requires a secure HTTPS connection.",apiError:"Speech recognition not available. Please try again later.",processing:"Error during speech recognition. Please try again.",emptyTranscription:"No text recognized. Please speak more clearly."}},tts:{play:"Read text aloud",pause:"Pause audio",resume:"Resume audio",loading:"Loading audio...",waitingForMessage:"Waiting for complete message...",tooltip:"Read response aloud",states:{loading:"Loading...",playing:"Pause",paused:"Resume",idle:"Read aloud"},error:{noText:"No text available to read aloud.",apiError:"Speech output not available. Please try again later.",noAudio:"Audio could not be generated.",playback:"Error during audio playback.",generic:"Error during speech output. Please try again."}},simplify:{title:"Explain in simple language",ariaLabel:"Explain this message in simple language",buttonText:"Simple language",simplifying:"Simplifying message..."},easyLanguage:{activate:"Activate simple language",deactivate:"Deactivate simple language",disabled:"Simple language is only available for German",buttonText:"Simple language",tooltip:"Response in simple language"},rating:{helpful:"Helpful",helpfulTitle:"This response was helpful",notHelpful:"Not helpful",notHelpfulTitle:"This response was not helpful",neutral:"Feedback",neutralTitle:"Give feedback on this response",tooltipHelpful:"Like",tooltipNotHelpful:"Dislike",tooltipNeutral:"Give feedback"},feedback:{buttonText:"Give feedback",buttonTitle:"Leave detailed feedback",tooltip:"Give feedback on this response",title:"Your feedback to us",placeholder:"...",submitLabel:"Send feedback",submitTitle:"Submit your feedback",close:"Close",closeTitle:"Close feedback area",successMessage:"Thank you! Your feedback helps us continuously improve our service."},toast:{ratingSuccess:"Thank you! Your feedback helps us continuously improve our service.",ratingError:"An error occurred while sending your feedback. Please try again later.",feedbackSuccess:"Thank you! Your feedback helps us continuously improve our service.",feedbackError:"An error occurred while sending your feedback. Please try again later.",configurationError:"Error loading configuration. Some features may not be available.",messageError:"Message could not be sent. Please try again.",simplificationError:"Text could not be simplified. Please try again.",streamingError:"Connection error occurred. Please try again.",missingAgentId:"Configuration error: Agent ID missing. Please contact the administrator.",generalError:"Sorry, an error occurred. Please try again.",close:"Close notification"},languageSelection:{title:"Language selection",description:"Choose your preferred language",buttonText:"Language",tooltip:"Select language"},instructions:{easyLanguage:". Please formulate the response in simple language. Follow the guidelines for Plain Language (DIN SPEC 33429). Introduce the simplified version with 'Here is the text in simple language:'. Do NOT mention DIN SPEC 33429 or other technical standards. Do NOT use the term 'Plain Language' in the introduction",simplifyMessage:". Please formulate this text in simple language for me. Follow the guidelines for Plain Language (DIN SPEC 33429). Introduce the simplified version with 'Here is the text in simple language:'. Do NOT mention DIN SPEC 33429 or other technical standards. Do NOT use the term 'Plain Language' in the introduction"},input:{expand:"Expand input field",collapse:"Collapse input field"},search:{result:"Search result",search:"Switch to search mode",chat:"Switch to assistant"},copy:{tooltip:"Copy response",copied:"Copied!",ariaLabel:"Copy response to clipboard"},followUp:{loading:"Generating follow-up questions...",ariaLabel:"Ask follow-up question"},sidebar:{title:"Menu",newChat:"Start New Chat",pastConversations:"Past Conversations",conversation:"Conversation",loadingAgents:"Loading...",otherAssistants:"Other Assistants"},auth:{loginTitle:"Sign In",registerTitle:"Create Account",forgotPasswordTitle:"Reset Password",forgotPasswordSubtitle:"Enter your email address and we'll send you a link to reset your password.",emailLabel:"Email",emailPlaceholder:"your.email@example.com",passwordLabel:"Password",passwordPlaceholder:"Enter your password",loginButton:"Sign In",registerButton:"Create Account",resetButton:"Send Link",switchToRegister:"Don't have an account? Sign up",switchToLogin:"Already have an account? Sign in",forgotPassword:"Forgot password?",backToLogin:"Back to sign in",verificationSent:"We've sent you an email. Please verify your email address, then sign in.",resetEmailSent:"If an account with this email exists, we've sent you a link to reset your password.",error:{emptyEmail:"Please enter your email address",emptyPassword:"Please enter your password",invalidEmail:"Please enter a valid email address",loginFailed:"Login failed. Please check your credentials.",registerFailed:"Registration failed. Please try again.",resetFailed:"Request failed. Please try again.",networkError:"Network error. Please try again later.",emailDomain:"This email domain is not allowed for this agent"}},sessionError:{title:"Session Expired",message:"Your session has expired. Please try again.",retry:"Try Again"},attachments:{addFiles:"Add documents",maxFilesReached:"Maximum number of files reached. Not added:",fileTypeNotAllowed:"File type not allowed. Not added:",fileSizeLimitExceeded:"exceeds the 10MB total limit"}},ct=e=>{switch(e.trim().toLowerCase()){case"de":case"deutsch":return st;case"en":case"english":return lt}return st},ut=({message:e,type:n,duration:t,onClose:o,config:r})=>{void 0===n&&(n="info"),void 0===t&&(t=4e3);const[i,a]=de(!0),[s,l]=de(!1),c=(null==r?void 0:r.defaultLanguage)||"Deutsch",u=ct(c);he(()=>{setTimeout(()=>l(!0),50);const e=setTimeout(()=>{d()},t);return()=>clearTimeout(e)},[t]);const d=()=>{l(!1),setTimeout(()=>{a(!1),null==o||o()},300)};return i?kn("div",{className:`toast toast--${n} ${s?"toast--visible":""}`,role:"alert","aria-live":"polite",style:{background:`var(--toast-bg-${n})`,borderColor:`var(--toast-border-${n})`,color:`var(--toast-text-${n})`},children:kn("div",{className:"toast__content",children:[kn("div",{className:"toast__icon",style:{color:`var(--toast-icon-${n})`},children:kn(Sn,{svg:Fn})}),kn("div",{className:"toast__message",children:e}),kn("button",{className:"toast__close",onClick:d,"aria-label":u.toast.close,type:"button",style:{color:`var(--toast-text-${n})`},children:kn(Sn,{svg:Ln})})]})}):null};var dt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const pt=({text:e,isComplete:n=!0})=>{const{showError:t}=xt(),{t:o,session:r}=po(),[i,a]=de("idle"),s=ge(null),l=ge(null);he(()=>()=>{l.current&&l.current.abort(),s.current&&(s.current.pause(),s.current=null)},[]);const c=me(()=>{if(!n)return o.tts.waitingForMessage;switch(i){case"loading":return o.tts.loading;case"playing":return o.tts.pause;case"paused":return o.tts.resume;default:return o.tts.play}},[o,n,i]);return kn(Cn,{text:o.tts.tooltip,delay:300,children:kn("button",{className:`btn-base tts-button tts-button--${i} ${n?"":"tts-button--disabled"}`,onClick:()=>{if(n)switch(i){case"idle":(e=>{dt(void 0,void 0,void 0,function*(){try{l.current&&l.current.abort(),l.current=new AbortController,a("loading");const n=(e=>{if(""===e)return"";let n=e;return n=n.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),n=n.replace(/https?:\/\/[^\s<>[\]{}|\\^`]+/gi,""),n=n.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`(.*?)`/g,"$1").replace(/#{1,6}\s/g,"").replace(/>\s/g,"").replace(/[-\*\+]\s/g,"").replace(/\d+\.\s/g,"").replace(/\n{2,}/g,". ").replace(/\n/g," ").trim(),n})(e);if(!n)return console.warn("No text to convert to speech"),t(o.tts.error.noText),void a("idle");const i=yield Jn(n,"gpt-4o-mini-tts","shimmer",l.current.signal,r.sessionState.sessionToken),c=new Blob([Uint8Array.from(atob(i.audio),e=>e.charCodeAt(0))],{type:"audio/mpeg"}),u=URL.createObjectURL(c),d=new Audio(u);s.current=d,d.addEventListener("loadeddata",()=>{a("playing"),d.play().catch(e=>{console.error("Error playing audio:",e),t(o.tts.error.playback),a("idle")})}),d.addEventListener("ended",()=>{a("idle"),URL.revokeObjectURL(u),s.current=null}),d.addEventListener("error",e=>{console.error("Audio playback error:",e),t(o.tts.error.playback),a("idle"),URL.revokeObjectURL(u),s.current=null})}catch(e){const n=e;"AbortError"!==n.name&&(console.error("TTS Error:",n),t(o.tts.error.generic),a("idle"))}})})(e);break;case"loading":l.current&&l.current.abort(),a("idle");break;case"playing":s.current&&(s.current.pause(),a("paused"));break;case"paused":s.current&&(s.current.play(),a("playing"))}},title:c,disabled:!n||"loading"===i,"aria-label":c,children:kn("span",{className:"tts-button__icon",children:(()=>{switch(i){case"loading":return kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" class="tts-spinner" ><path d="M8 1.5a6.5 6.5 0 1 0 6.5 6.5.75.75 0 0 1 1.5 0 8 8 0 1 1-8-8 .75.75 0 0 1 0 1.5z" fill="currentColor" /></svg>'});case"playing":return kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" ><path d="M6.25 3.5a.75.75 0 0 0-1.5 0v9a.75.75 0 0 0 1.5 0v-9zM11.25 3.5a.75.75 0 0 0-1.5 0v9a.75.75 0 0 0 1.5 0v-9z" fill="currentColor" /></svg>'});case"paused":return kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" ><path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z" fill="currentColor" /></svg>'});default:return kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" ><path d="M9.71938 1.55065C9.63529 1.50967 9.54141 1.49311 9.44838 1.50283C9.35535 1.51255 9.26692 1.54817 9.19313 1.60565L4.82813 5.00002H2C1.73478 5.00002 1.48043 5.10538 1.29289 5.29291C1.10536 5.48045 1 5.7348 1 6.00002V10C1 10.2652 1.10536 10.5196 1.29289 10.7071C1.48043 10.8947 1.73478 11 2 11H4.82813L9.19313 14.3944C9.26699 14.4518 9.35548 14.4874 9.44855 14.497C9.54161 14.5066 9.63551 14.4899 9.71956 14.4489C9.80362 14.4078 9.87446 14.3439 9.92404 14.2646C9.97361 14.1852 9.99993 14.0936 10 14V2.00002C10 1.90635 9.97371 1.81456 9.9241 1.73511C9.87449 1.65566 9.80355 1.59174 9.71938 1.55065ZM2 6.00002H4.5V10H2V6.00002ZM9 12.9775L5.5 10.2556V5.7444L9 3.02252V12.9775ZM12.375 6.34752C12.7772 6.80407 12.999 7.3916 12.999 8.00002C12.999 8.60844 12.7772 9.19597 12.375 9.65252C12.2867 9.74959 12.1637 9.80803 12.0327 9.81523C11.9016 9.82244 11.773 9.77783 11.6745 9.69103C11.5761 9.60424 11.5157 9.48221 11.5065 9.3513C11.4972 9.22038 11.5398 9.09107 11.625 8.99127C11.8662 8.71738 11.9992 8.36496 11.9992 8.00002C11.9992 7.63509 11.8662 7.28267 11.625 7.00877C11.5398 6.90897 11.4972 6.77966 11.5065 6.64874C11.5157 6.51783 11.5761 6.39581 11.6745 6.30901C11.773 6.22222 11.9016 6.17761 12.0327 6.18481C12.1637 6.19202 12.2867 6.25046 12.375 6.34752ZM15.5 8.00002C15.5007 9.23015 15.0474 10.4173 14.2269 11.3338C14.1378 11.4301 14.0144 11.4876 13.8833 11.4939C13.7522 11.5001 13.624 11.4545 13.5262 11.367C13.4284 11.2794 13.369 11.157 13.3607 11.026C13.3524 10.895 13.3959 10.7661 13.4819 10.6669C14.1378 9.93355 14.5004 8.9842 14.5004 8.00033C14.5004 7.01647 14.1378 6.06712 13.4819 5.33377C13.4369 5.28506 13.402 5.22788 13.3793 5.16555C13.3566 5.10323 13.3465 5.03701 13.3496 4.97076C13.3528 4.9045 13.3691 4.83953 13.3976 4.77963C13.426 4.71973 13.4662 4.6661 13.5156 4.62186C13.565 4.57762 13.6227 4.54366 13.6854 4.52195C13.7481 4.50024 13.8145 4.49122 13.8807 4.49541C13.9469 4.4996 14.0116 4.51692 14.071 4.54636C14.1304 4.5758 14.1834 4.61678 14.2269 4.6669C15.0476 5.58303 15.501 6.77003 15.5 8.00002Z" fill="currentColor" /></svg>'})}})()})})})},ht=({onClick:e})=>kn("div",{className:"close-button-container",children:kn("button",{className:"close-button-floating btn-base",onClick:e,"aria-label":"Chat schließen",type:"button",children:kn(Sn,{svg:Ln})})}),ft=({onClick:e})=>kn("button",{className:"logout-button btn-base",onClick:e,"aria-label":"Abmelden",type:"button",children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>\n <polyline points="16 17 21 12 16 7"/>\n <line x1="21" y1="12" x2="9" y2="12"/>\n</svg>\n'})}),gt=({logo:e,title:n})=>{if(null===e)return console.warn("customer has no logo defined"),null;return kn("div",{className:"chat-logo-container",children:kn("img",{src:`https://cms.ai-gelb.de/assets/${e}`,alt:me(()=>null===n?"Logo":`Logo - ${n}`,[n]),className:"chat-logo-floating"})})},bt=({onClick:e})=>kn("button",{className:"hamburger-button btn-base",onClick:e,"aria-label":"Menu öffnen",type:"button",children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>\n'})}),mt=({isOpen:e,onClose:n,children:t})=>{var o,r;const{t:i}=po(),[a,s]=de(!1);return he(()=>{if(e){const e=setTimeout(()=>s(!0),200);return()=>clearTimeout(e)}s(!1)},[e]),e?kn("div",{className:"spotlight-overlay-backdrop",onClick:n,children:kn("div",{className:"spotlight-overlay",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":(null===(o=i.sidebar)||void 0===o?void 0:o.title)||"Menu",children:[kn("button",{className:"spotlight-close-button btn-base",onClick:n,"aria-label":"Close",type:"button",children:kn(Sn,{svg:Ln})}),a?t:kn("div",{className:"spotlight-loading",children:(null===(r=i.sidebar)||void 0===r?void 0:r.loadingAgents)||"Laden..."})]})}):null},vt=K(void 0),yt=({children:e,config:n})=>{const[t,o]=de([]),r=ve((e,n,r)=>{void 0===n&&(n="info"),void 0===r&&(r=4e3);const i=Date.now()+Math.random(),a={id:i,message:e,type:n,duration:r},s=[...t,a];return o(s),i},[t]),i=ve(e=>{const n=t.filter(n=>n.id!==e);o(n)},[t]),a=ve((e,n)=>r(e,"success",n),[r]),s=ve((e,n)=>r(e,"error",n),[r]),l=ve((e,n)=>r(e,"info",n),[r]);return kn(vt.Provider,{value:{addToast:r,removeToast:i,showSuccess:a,showError:s,showInfo:l},children:[e,kn("div",{className:"toast-container",children:t.map(e=>kn(ut,{message:e.message,type:e.type,duration:e.duration,onClose:()=>i(e.id),config:n},e.id))})]})},xt=()=>{const e=ye(vt);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},wt=K(void 0),kt=(e,n)=>{if("string"!=typeof n||!n.startsWith("colors:"))return n;const t=n.replace("colors:","").split("/");if(2!==t.length)return console.warn(`Invalid color reference: ${n}`),n;const[o,r]=t;return e.colors&&e.colors[o]&&e.colors[o][r]?`var(--color-${o}-${r})`:(console.warn(`Color reference not found: ${n}`),n)},_t=["fontsize","iconSize","radius","spacing","stroke"],Ct=["1024px","768px"],St=["fontsize","iconSize","radius","spacing","stroke"],Et=(e,n,t=!1)=>{const o=document.createElement("style"),r=(e=>{var n,t;if(!e.lightMode)return"";const o=[];if(e.colors)for(const[n,t]of Object.entries(e.colors))for(const[e,r]of Object.entries(t))o.push(`--color-${n}-${e}: ${r};`);for(const[n,t]of Object.entries(e.lightMode))if("object"==typeof t&&null!==t)for(const[n,r]of Object.entries(t))if("object"==typeof r&&null!==r)for(const[n,t]of Object.entries(r)){const r=kt(e,t);o.push(`--${n}: ${r};`)}else{const t=kt(e,r);o.push(`--${n}: ${t};`)}if(e.responsive){for(const n of _t){const t=e.responsive[n];for(const[e,r]of Object.entries(t))void 0!==r.desktop&&("iconSize"===n?o.push(`--icon-${e}: ${r.desktop}px;`):o.push(`--${n}-${e}: ${r.desktop}px;`))}void 0!==(null===(t=null===(n=e.responsive.radius)||void 0===n?void 0:n.s)||void 0===t?void 0:t.desktop)&&o.push(`--radius: ${e.responsive.radius.s.desktop}px;`)}if(e.semantic)for(const[n,t]of Object.entries(e.semantic))for(const[e,n]of Object.entries(t))o.push(`--${e}: ${n};`);return o.join("\n")})(e),i=t?((e,n)=>{if(!e.darkMode)return"";const t=[];for(const[n,o]of Object.entries(e.darkMode))if("object"==typeof o&&null!==o)for(const[n,r]of Object.entries(o))if("object"==typeof r&&null!==r)for(const[n,o]of Object.entries(r)){const r=kt(e,o);t.push(`--${n}: ${r};`)}else{const o=kt(e,r);t.push(`--${n}: ${o};`)}if(n)for(const[e,o]of Object.entries(n))for(const[e,n]of Object.entries(o))t.push(`--${e}: ${n};`);return t.join("\n")})(e):"",a=(e=>{if(!e.responsive)return"";const n=[];for(const t of Ct){n.push(`@media (max-width: ${t}) {`),n.push(" host: {");for(const o of St){const r=e.responsive[o];for(const[e,i]of Object.entries(r))switch(t){case"1024px":if(void 0===i.tablet)continue;"iconSize"===o?n.push(` --icon-${e}: ${i.tablet}px;`):n.push(` --${r}-${e}: ${i.tablet}px;`);case"768px":if(void 0===i.mobile)continue;"iconSize"===o?n.push(` --icon-${e}: ${i.mobile}px;`):n.push(` --${r}-${e}: ${i.mobile}px;`)}}n.push(" }"),n.push("}"),n.push("")}return n.join("\n")})(e),s=[];return s.push(`\n :host {\n /* === Generated Theme Variables (Light Mode Default) === */\n ${r}\n }\n `),t&&i&&s.push(`\n /* === Dark Mode Variables === */\n :host([data-dark-mode="true"]) {\n ${i}\n }\n\n /* Support for system dark mode preference (when not explicitly set) */\n @media (prefers-color-scheme: dark) {\n :host:not([data-dark-mode="false"]) {\n ${i}\n }\n }\n `),s.push(a),s.push("\n/* === BASE COMPONENTS === */\n.chatbot-container {\n position: fixed;\n bottom: var(--spacing-l);\n z-index: 9999;\n right: var(--spacing-l);\n}\n\n@media (max-width: 768px) {\n .chatbot-container {\n bottom: var(--spacing-m);\n right: var(--spacing-m);\n left: var(--spacing-m);\n }\n}\n\n/* === SHARED BUTTON STYLES === */\n.btn-base {\n border: 1px solid var(--button-border);\n cursor: pointer;\n background: var(--button-bg);\n color: var(--button-icon);\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: inherit;\n transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.btn-base:hover {\n background: var(--button-bg-hover);\n border: 1px solid var(--button-border-hover);\n color: var(--button-text-hover);\n}\n\n.btn-base:focus {\n outline: 2px solid var(--color-neutrals-neutral-950);\n outline-offset: 6px;\n transition: outline 0.2s ease;\n}\n\n.btn-base:disabled {\n cursor: not-allowed;\n transform: none;\n}\n\n/* === CHAT OPENER STYLES === */\n.chat-opener-container {\n position: absolute;\n bottom: calc(100% + 12px);\n right: 0;\n z-index: 1000;\n}\n\n.chat-opener-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 80px;\n height: 80px;\n background: var(--ws-button-bg);\n border: 2px solid var(--ws-button-border);\n border-radius: var(--radius-max);\n cursor: pointer;\n transition: all 0.3s ease;\n outline: none;\n color: var(--ws-button-icon);\n position: relative;\n animation: openerSlideIn 0.6s ease-out;\n box-shadow: var(--shadow-lg);\n}\n\n.chat-opener-button:hover {\n background: var(--ws-button-bg-hover);\n border-color: var(--ws-button-border-hover);\n color: var(--ws-button-icon-hover);\n transform: translateY(-2px);\n box-shadow: var(--shadow-xl);\n}\n\n.chat-opener-button:focus {\n background: var(--ws-button-bg-hover);\n border-color: var(--ws-button-border-hover);\n color: var(--ws-button-icon-hover);\n}\n\n.chat-opener-tooltip {\n position: absolute;\n bottom: calc(100% + 12px);\n right: 0;\n background: var(--ws-bubble-bg);\n color: var(--ws-bubble-text);\n border-radius: var(--radius);\n padding: 0;\n box-shadow: var(--shadow-lg);\n animation: tooltipSlideIn 0.3s ease-out;\n width: max-content;\n max-width: min(300px, calc(100vw - 60px));\n z-index: 1001;\n cursor: pointer;\n}\n\n.tooltip-content {\n position: relative;\n padding: 12px 32px 12px 16px;\n}\n\n.tooltip-text-container {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.tooltip-headline {\n font-size: var(--fontsize-body-m);\n font-weight: 600;\n line-height: 1.4;\n}\n\n.tooltip-subtitle {\n font-size: var(--fontsize-body-s);\n font-weight: 400;\n line-height: 1.6;\n}\n\n.tooltip-text {\n font-size: var(--fontsize-body-m);\n font-weight: 500;\n line-height: 1.4;\n}\n\n.tooltip-close {\n position: absolute;\n top: -8px;\n right: -8px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n background: var(--ws-close-bg);\n border: 1px solid var(--ws-close-border);\n border-radius: var(--radius);\n cursor: pointer;\n color: var(--ws-close-icon);\n transition: all 0.2s ease;\n outline: none;\n box-shadow: var(--shadow-lg);\n}\n\n.tooltip-close:hover {\n opacity: .75;\n}\n\n\n\n.tooltip-arrow {\n position: absolute;\n top: 100%;\n right: 32px;\n width: 0;\n height: 0;\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n border-top: 8px solid var(--ws-bubble-bg);\n}\n\n@keyframes openerSlideIn {\n from {\n opacity: 0;\n transform: scale(0.8) translateY(10px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n\n@keyframes tooltipSlideIn {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@media (max-width: 768px) {\n .chat-opener-container {\n right: 16px;\n }\n\n .chat-opener-tooltip {\n right: -8px;\n left: auto;\n max-width: calc(75vw - 48px);\n }\n\n .tooltip-arrow {\n right: 40px;\n }\n}\n\n\n/* === POSITION: BOTTOM-LEFT === */\n.chatbot-container.position-bottom-left {\n right: auto;\n left: var(--spacing-l);\n}\n\n.chatbot-container.position-bottom-left .chat-opener-container {\n right: auto;\n left: 0;\n}\n\n.chatbot-container.position-bottom-left .chat-opener-tooltip {\n right: auto;\n left: 0;\n}\n\n.chatbot-container.position-bottom-left .tooltip-arrow {\n right: auto;\n left: 32px;\n}\n\n@media (max-width: 768px) {\n .chatbot-container.position-bottom-left {\n right: auto;\n left: var(--spacing-m);\n }\n\n .chatbot-container.position-bottom-left .chat-opener-container {\n right: auto;\n left: 16px;\n }\n\n .chatbot-container.position-bottom-left .chat-opener-tooltip {\n right: auto;\n left: -8px;\n }\n\n .chatbot-container.position-bottom-left .tooltip-arrow {\n right: auto;\n left: 40px;\n }\n}\n\n/* === OVERLAY === */\n.chat-overlay,\n.search-overlay {\n position: fixed;\n inset: 0;\n background: var(--surface-bg);\n z-index: 10000;\n display: flex;\n justify-content: center;\n align-items: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n padding: var(--spacing-l) 0;\n animation: fadeIn 0.75s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: var(--overlay-opacity);\n }\n}\n\n/* === TOP HEADER BAR === */\n/* Nur mobile Geräte bekommen einen Hintergrund beim Scrollen */\n@media (max-width: 768px) {\n .chat-overlay.scrolled::before {\n content: \"\";\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: calc(var(--spacing-m) * 2 + 40px);\n background: var(--header-mobile-bg);\n backdrop-filter: blur(12px);\n -webkit-backdrop-filter: blur(12px);\n z-index: 10001;\n border-bottom: var(--header-mobile-border) solid 1px;\n box-shadow: var(--shadow-sm);\n opacity: 0;\n animation: headerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;\n }\n}\n\n@keyframes headerFadeIn {\n from {\n opacity: 0;\n transform: translateY(-100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* === CLOSE BUTTON === */\n.close-button-container {\n position: fixed;\n top: var(--spacing-m);\n right: var(--spacing-m);\n z-index: 10002;\n animation: slideInFromRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;\n}\n\n.close-button-floating {\n width: 40px;\n height: 40px;\n border-radius: var(--radius-max);\n cursor: pointer;\n transition: transform 0.2s ease;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--close-border);\n background: var(--close-bg);\n color: var(--close-icon);\n}\n\n.close-button-floating:hover {\n transform: scale(1.1);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n color: var(--close-icon-hover);\n}\n\n.close-button-floating:focus {\n outline: 2px solid var(--button-border);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n outline-offset: 4px;\n transition: outline 0.2s ease;\n color: var(--close-icon-hover);\n}\n\n.close-button-floating:active {\n transform: scale(0.95) rotate(90deg);\n}\n\n.logout-button {\n width: 40px;\n height: 40px;\n border-radius: var(--radius-max);\n cursor: pointer;\n transition: transform 0.2s ease;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--close-border);\n background: var(--close-bg);\n color: var(--close-icon);\n}\n\n.logout-button:hover {\n transform: scale(1.1);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n color: var(--close-icon-hover);\n}\n\n.logout-button:focus {\n outline: 2px solid var(--button-border);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n outline-offset: 4px;\n transition: outline 0.2s ease;\n color: var(--close-icon-hover);\n}\n\n.logout-button:active {\n transform: scale(0.95);\n}\n\n@keyframes slideInFromRight {\n from {\n opacity: 0;\n transform: translateX(30px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n/* === FLOATING LOGO === */\n.chat-logo-container {\n position: fixed;\n top: var(--spacing-m);\n left: var(--spacing-m);\n z-index: 10002;\n animation: slideInFromLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;\n}\n\n.chat-logo-floating {\n max-height: 48px;\n width: auto;\n height: auto;\n object-fit: contain;\n}\n\n@keyframes slideInFromLeft {\n 0% {\n opacity: 0;\n transform: translateX(-20px);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n\n\n/* === CHAT CONTAINER === */\n.chat-container,\n.search-container {\n width: 100%;\n max-width: 800px;\n min-height: calc(100vh - 2 * var(--spacing-m));\n max-height: none;\n display: flex;\n flex-direction: column;\n animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n margin-top: var(--spacing-l); /* Normal spacing on desktop */\n}\n\n@media (max-width: 768px) {\n .chat-container,\n .search-container {\n margin-top: calc(var(--spacing-m) * 2 + 40px); /* Space for mobile header */\n }\n}\n\n.chat-overlay,\n.search-overlay {\n scrollbar-width: thin;\n scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);\n}\n\n.chat-overlay::-webkit-scrollbar,\n.search-overlay::-webkit-scrollbar { width: 8px; }\n.chat-overlay::-webkit-scrollbar-track,\n.search-overlay::-webkit-scrollbar-track { background: var(--scrollbar-track); }\n.chat-overlay::-webkit-scrollbar-thumb,\n.search-overlay::-webkit-scrollbar-thumb {\n background: var(--scrollbar-thumb);\n border-radius: var(--radius);\n transition: background-color var(--transition-fast);\n}\n\n.chat-overlay::-webkit-scrollbar-thumb:hover,\n.search-overlay::-webkit-scrollbar-thumb:hover {\n background: var(--scrollbar-thumb-hover);\n}\n\n.chat-area,\n.search-area {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: var(--spacing-l);\n transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n/* Chat area when conversation is active */\n.chat-area.conversation-active {\n justify-content: flex-start;\n}\n\n.chat-messages {\n flex: 0.5;\n display: flex;\n flex-direction: column;\n gap: 15px;\n padding: 60px 0;\n transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n/* === WELCOME SECTION === */\n.welcome-section {\n padding: 30px 0 20px 0;\n text-align: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n animation: slideInFromBottom 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;\n transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.welcome-greeting {\n font-size: clamp(28px, 5vw, 36px);\n font-weight: 700;\n line-height: 1.2;\n color: var(--welcome-headline);\n margin-bottom: var(--spacing-m);\n animation: slideInFromLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;\n}\n\n.welcome-text {\n font-size: var(--fontsize-body-l);\n color: var(--welcome-text);\n line-height: 1.4;\n margin: 0 0 15px 0;\n animation: slideInFromLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;\n}\n\n.welcome-text--notification {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-xs);\n}\n\n.privacy-warning {\n color: var(--accordion-bodytext-color);\n animation: slideInFromLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;\n}\n\n@keyframes slideInFromBottom {\n from {\n opacity: 0;\n transform: translateY(50px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes slideUpFromBottom {\n from {\n opacity: 0;\n transform: translateY(40px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n/* === ACCORDION BUTTON === */\n.accordion-section {\n margin: var(--spacing-m) 0 var(--spacing-l) 0;\n}\n\n.accordion-button {\n display: flex;\n align-items: center;\n gap: var(--spacing-xs);\n font-size: var(--fontsize-body-m);\n padding: var(--spacing-s) var(--spacing-m);\n cursor: pointer;\n line-height: 1;\n font-family: inherit;\n border-radius: var(--radius);\n border: 1px solid var(--toggle-border);\n background: var(--toggle-bg);\n color: var(--toggle-text);\n}\n\n.accordion-button:hover {\n background: var(--toggle-bg-hover);\n border: 1px solid var(--toggle-border-hover);\n color: var(--toggle-text-hover);\n}\n.accordion-button:focus {\n background: var(--toggle-bg-hover);\n border: 1px solid var(--toggle-border-hover);\n color: var(--toggle-text-hover);\n outline: 2px solid var(--toggle-text);\n\n}\n\n.accordion-arrow {\n transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.accordion-arrow.open {\n transform: rotate(180deg);\n}\n\n/* === FUNCTION ICON STYLES === */\n.function-icon {\n width: 36px;\n height: 36px;\n border-radius: var(--radius);\n background: var(--button-bg);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.function-icon svg {\n fill: var(--button-icon);\n}\n\n.accordion-content {\n margin: 30px auto 15px auto;\n max-width: 636px;\n}\n\n.accordion-content,\n.accordion-content a {\n color: var(--welcome-text);\n}\n\n.accordion-content a {\n transition: opacity 300ms ease;\n color: var(--welcome-link);\n}\n\n.accordion-content a:hover {\n opacity: 0.7;\n}\n\n/* === ACCORDION CONTENT LIST ITEMS === */\n.accordion-content ul {\n list-style: none;\n padding: 0;\n margin: 0;\n font-size: 16px;\n line-height: 1.5;\n font-weight: 400;\n}\n\n.accordion-content li {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 12px;\n}\n\n/* === QUICK BUTTONS === */\n.quick-buttons-container {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin: var(--spacing-l) 0;\n /* Removed animation from container to allow individual button animations */\n transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.quick-buttons-container.conversation-starting {\n opacity: 0.5;\n transform: translateY(10px) scale(0.98);\n}\n\n.quick-buttons-wrapper {\n display: flex;\n flex-direction: column;\n gap: 10px;\n align-items: flex-start;\n}\n\n.quick-button-wrapper {\n animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n\n.quick-button-wrapper:nth-child(1) { animation-delay: 0.7s; }\n.quick-button-wrapper:nth-child(2) { animation-delay: 0.8s; }\n.quick-button-wrapper:nth-child(3) { animation-delay: 0.9s; }\n.quick-button-wrapper:nth-child(4) { animation-delay: 1.0s; }\n.quick-button-wrapper:nth-child(5) { animation-delay: 1.1s; }\n.quick-button-wrapper:nth-child(6) { animation-delay: 1.2s; }\n.quick-button-wrapper:nth-child(7) { animation-delay: 1.3s; }\n.quick-button-wrapper:nth-child(8) { animation-delay: 1.4s; }\n.quick-button-wrapper:nth-child(9) { animation-delay: 1.5s; }\n\n\n.quick-button {\n font-size: var(--fontsize-body-m);\n display: block;\n padding: var(--spacing-s) var(--spacing-m);\n align-items: center;\n border-radius: var(--radius);\n background: var(--button-suggestion-bg);\n color: var(--button-suggestion-text);\n border: 1px solid var(--button-suggestion-border);\n cursor: pointer;\n text-align: center;\n white-space: nowrap;\n min-width: fit-content;\n justify-content: center;\n font-family: inherit;\n line-height: 1;\n transition: all 0.2s ease;\n}\n\n.quick-button:hover {\n background: var(--button-suggestion-bg-hover);\n color: var(--button-suggestion-text-hover);\n border: 1px solid var(--button-suggestion-border-hover);\n}\n\n@keyframes scaleIn {\n from {\n opacity: 0;\n transform: scale(0.9);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n /* === INPUT SYSTEM === */\n.input-wrapper {\n position: relative;\n display: flex;\n align-items: flex-end;\n background: var(--chat-input-bg);\n border: 1px solid var(--chat-input-border);\n border-radius: var(--radius);\n min-height: 50px;\n box-shadow: var(--shadow-lg);\n transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n animation: slideUpFromBottom 1.6s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both;\n}\n\n/* Disable animation when conversation is active */\n.chat-area.conversation-active .input-wrapper {\n animation: none;\n}\n\n/* Input animation states */\n/* Instant hide - no animation */\n.chat-input-section.input-animation-fadeOut .input-wrapper,\n.chat-input-section.input-animation-fadeOut .quick-buttons-container {\n opacity: 0;\n visibility: hidden;\n transition: none;\n}\n\n.chat-input-section.input-animation-fixed {\n position: sticky;\n bottom: 0;\n margin-top: auto;\n z-index: 10;\n}\n\n.chat-input-section.input-animation-fixed .input-wrapper {\n animation: inputSlideInFromBottom 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;\n}\n\n/* Sticky positioning when textarea is expanded */\n.chat-input-section.input-expanded-sticky {\n position: sticky;\n bottom: 0;\n margin-top: auto;\n z-index: 10;\n}\n\n/* Dim welcome section and messages when textarea is expanded */\n.welcome-section {\n transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.welcome-section.dimmed {\n opacity: 0.1 !important;\n}\n\n.chat-messages {\n transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.chat-messages.dimmed {\n opacity: 0.1 !important;\n}\n\n/* Search input section */\n.search-input-section {\n margin-top: auto;\n}\n.search-input-section.small {\n margin-top: unset;\n}\n\n.search-input-section .input-wrapper {\n animation: slideUpFromBottom 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;\n}\n\n/* Quick buttons instant hide */\n.quick-buttons-container.quick-buttons-fade-out {\n opacity: 0;\n visibility: hidden;\n transition: none;\n}\n\n@keyframes inputSlideInFromBottom {\n 0% {\n opacity: 0;\n transform: translateY(80px);\n }\n 40% {\n opacity: 1;\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n\n.input-wrapper:focus-within {\n border-color: var(--chat-input-border-focus);\n}\n\n.input-wrapper:hover {\n border-color: var(--chat-input-border-hover);\n}\n\n.chat-input {\n flex: 1;\n border: none;\n background: transparent;\n padding: 16px 16px 16px 16px;\n outline: none;\n font-size: var(--fontsize-body-m);\n color: var(--chat-input-text);\n resize: none;\n line-height: 1.4;\n font-family: inherit;\n /* iOS Safari Zoom-Deaktivierung */\n -webkit-text-size-adjust: 100%;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n}\n\n/* Verhindert Zoom auf iOS Safari bei Input-Focus */\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n .chat-input {\n font-size: 16px !important;\n }\n}\n\n/* Spezifisch für iOS/Safari */\n@supports (-webkit-touch-callout: none) {\n .chat-input {\n font-size: 16px !important;\n transform: translateZ(0);\n }\n}\n\n.chat-input::placeholder { color: var(--chat-input-text); }\n\n.send-button {\n position: absolute;\n right: var(--spacing-m);\n bottom: var(--spacing-m);\n height: 40px;\n min-width: 80px;\n border-radius: var(--radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n}\n\n.send-button:hover:not(:disabled) {\n opacity: 0.9;\n transform: scale(1.05);\n}\n\n.send-button:active:not(:disabled) { transform: scale(0.98); }\n\n.send-button:disabled {\n cursor: not-allowed;\n transform: none;\n color: var(--cs-icon-deactivated);\n background: var(--cs-bg-deactivated);\n border: 1px solid var(--cs-border-deactivated);\n}\n\n/* === EXPAND BUTTON === */\n.expand-button {\n width: 28px;\n height: 28px;\n border-radius: var(--radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 6px;\n}\n\n.expand-button:hover:not(:disabled) {\n opacity: 0.9;\n transform: scale(1.05);\n}\n\n.expand-button:active:not(:disabled) {\n transform: scale(0.98);\n}\n\n/* === TEXTAREA SCROLLBAR STYLING === */\n.chat-input::-webkit-scrollbar {\n width: 6px;\n}\n\n.chat-input::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.chat-input::-webkit-scrollbar-thumb {\n background: var(--scrollbar-thumb);\n border-radius: 3px;\n}\n\n.chat-input::-webkit-scrollbar-thumb:hover {\n background: var(--scrollbar-thumb-hover);\n}\n\n.chat-input {\n scrollbar-width: thin;\n scrollbar-color: var(--scrollbar-thumb) transparent;\n transition: height 0.2s ease;\n}\n\n /* === TOOLTIP STYLES === */\n.tooltip-container {\n position: relative;\n display: inline-block;\n}\n\n.tooltip {\n position: absolute;\n background-color: var(--tooltip-bg);\n color: var(--tooltip-text);\n padding: 10px 12px 13px 12px;\n border-radius: var(--radius);\n font-size: var(--fontsize-body-s);\n font-weight: 400;\n white-space: nowrap;\n z-index: 1000;\n opacity: 0;\n visibility: hidden;\n transform: translateY(0);\n transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;\n box-shadow: var(--shadow-md);\n pointer-events: none;\n font-family: inherit;\n /* Accessibility improvements */\n border: 1px solid var(--tooltip-border);\n backdrop-filter: blur(8px);\n /* Ensure sufficient contrast */\n min-width: max-content;\n max-width: 200px;\n text-align: center;\n line-height: 1.4;\n}\n\n.tooltip.tooltip-top {\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%) translateY(-8px);\n margin-bottom: 8px;\n}\n\n/* Show tooltip on hover AND focus */\n.tooltip-container:hover .tooltip,\n.tooltip-container:focus-within .tooltip {\n opacity: 1;\n visibility: visible;\n transform: translateX(-50%) translateY(-4px);\n}\n\n/* High contrast mode support */\n@media (prefers-contrast: high) {\n .tooltip {\n border: 2px solid currentColor;\n background-color: Canvas;\n color: CanvasText;\n }\n .tooltip-arrow {\n border-top-color: CanvasText !important;\n }\n}\n\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n}\n\n.tooltip-top .tooltip-arrow {\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n border-top: 10px solid var(--tooltip-bg);\n}\n\n/* Improved focus management for keyboard users */\n.tooltip-container:focus-within {\n outline: none;\n}\n\n.tooltip-container > *:focus {\n outline: 2px solid var(--tooltip-bg);\n outline-offset: 2px;\n}\n\n/* === REDUCED MOTION SUPPORT === */\n@media (prefers-reduced-motion: reduce) {\n .tooltip {\n transition: none !important;\n }\n * {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n/* === STT BUTTON === */\n.stt-button {\n width: 40px;\n height: 40px;\n border-radius: var(--radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n@keyframes processingPulse {\n 0%, 100% {\n opacity: 0.8;\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(1.05);\n }\n}\n\n.stt-button svg {\n flex-shrink: 0;\n}\n\n /* === LANGUAGE BUTTON === */\n.language-button-container {\n position: relative;\n}\n\n.language-button {\n min-width: 40px;\n height: 40px;\n padding: 0 12px;\n border-radius: var(--radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n transition: all 0.2s ease;\n pointer-events: auto;\n position: relative;\n font-family: inherit;\n white-space: nowrap;\n}\n\n.language-button__flag {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n}\n\n.language-button__flag svg {\n width: 18px;\n height: 18px;\n border-radius: var(--radius);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n\n.language-button__text {\n font-size: 13px;\n color: inherit;\n white-space: nowrap;\n}\n\n.language-dropdown {\n position: absolute;\n background-color: var(--sprache-flyout-bg);\n border:none;\n border-radius: var(--radius);\n box-shadow: var(--shadow-md);\n min-width: 160px;\n max-height: 200px;\n overflow-y: auto;\n visibility: visible;\n display: block;\n pointer-events: auto;\n z-index: 999999;\n}\n\n.language-option {\n width: 100%;\n padding: 8px 12px;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n color: var(--sprache-text);\n background-color: transparent;\n text-align: left;\n white-space: nowrap;\n justify-content: flex-start;\n transition: background-color 0.2s ease;\n pointer-events: auto;\n position: relative;\n font-family: inherit;\n font-weight: 600;\n}\n\n.language-option svg {\n width: 18px;\n height: 18px;\n border-radius: var(--radius);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n flex-shrink: 0;\n}\n\n.language-option:hover {\n opacity: .5;\n background-color: var(--language-option-hover-bg-color);\n}\n\n.language-option.active {\n background-color: var(--language-option-active-bg-color);\n}\n\n.language-option:first-child {\n border-radius: var(--radius) var(--radius) 0 0;\n}\n\n.language-option:last-child {\n border-radius: 0 0 var(--radius) var(--radius);\n}\n\n.language-option:only-child {\n border-radius: var(--radius);\n}\n\n\n\n\n\n/* === MESSAGE BUBBLES === */\n.message-bubble {\n max-width: 80%;\n padding: 15px var(--spacing-l);\n border-radius: var(--radius);\n margin-bottom: var(--spacing-l);\n word-wrap: break-word;\n word-break: break-word;\n hyphens: auto;\n overflow-wrap: break-word;\n line-height: 1.5;\n font-size: 15px;\n animation: messageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@media (max-width: 768px) {\n .message-bubble {\n max-width: calc(100% - 40px);\n }\n}\n\n@keyframes messageSlideIn {\n from {\n opacity: 0;\n transform: translateY(20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n.bot-message {\n align-self: flex-start;\n background: var(--chat-ai-bg);\n color: var(--chat-ai-text);\n border-bottom-left-radius: var(--radius-none);\n border: 1px solid var(--chat-ai-border);\n animation: messageSlideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n\n}\n\n.user-message {\n align-self: flex-end;\n background: var(--chat-user-bg);\n border: 1px solid var(--chat-user-border);\n color: var(--chat-user-text);\n border-bottom-right-radius: var(--radius-none);\n animation: messageSlideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n@keyframes messageSlideInLeft {\n from {\n opacity: 0;\n transform: translateX(-30px) translateY(20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateX(0) translateY(0) scale(1);\n }\n}\n\n@keyframes messageSlideInRight {\n from {\n opacity: 0;\n transform: translateX(30px) translateY(20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateX(0) translateY(0) scale(1);\n }\n}\n\n/* === MESSAGE TEXT FORMATTING === */\n.message-text {\n margin: 0;\n font-size: var(--fontsize-body-m);\n line-height: 1.5;\n}\n\n.message-text > *:first-child { margin-top: 0; }\n.message-text > *:last-child { margin-bottom: 0; }\n.message-text > * { margin: 10px 0; }\n\n.message-text p {\n margin: 8px 0;\n line-height: 1.6;\n text-align: left;\n}\n\n.message-text h1,\n.message-text h2,\n.message-text h3 {\n font-size: 18px;\n font-weight: 700;\n color: var(--chat-ai-text);\n margin: 16px 0 8px 0;\n line-height: 1.3;\n}\n\n/* === LINKS === */\n.bot-message a {\n color: var(--chat-ai-text);\n text-decoration: none;\n border-bottom: 1px solid var(--chat-ai-text);\n transition: var(--transition-fast);\n display: inline-flex;\n align-items: center;\n gap: 4px;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n word-break: normal;\n}\n\n.bot-message a::after {\n content: \"\";\n width: 12px;\n height: 12px;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M7 7h10v10'/%3E%3C/svg%3E\");\n background-size: contain;\n background-repeat: no-repeat;\n opacity: 0.7;\n transition: var(--transition-fast);\n flex-shrink: 0;\n margin-left: 4px;\n}\n\n.bot-message a:hover {\n opacity: 0.7;\n border-bottom-color: transparent;\n}\n\n.bot-message a:hover::after {\n opacity: 1;\n transform: translate(2px, -2px);\n}\n\n/* === LISTS === */\n.message-text ul,\n.message-text ol {\n margin: var(--spacing-s) 0;\n padding-left: var(--spacing-l);\n}\n\n.message-text li {\n margin-bottom: var(--spacing-xs);\n line-height: 1.6;\n}\n\n/* Legacy list support */\n.formatted-list-item-manual,\n.formatted-numbered-item {\n margin-bottom: 6px;\n display: flex;\n align-items: flex-start;\n}\n\n.formatted-list-item-manual .list-bullet,\n.formatted-numbered-item .number-bullet {\n margin-right: 10px;\n flex-shrink: 0;\n line-height: inherit;\n}\n\n.formatted-numbered-item .number-bullet { min-width: var(--spacing-lg); }\n\n/* === CODE & QUOTES === */\n.message-text code {\n background: var(--code-bg);\n color: var(--code-text);\n padding: 2px 6px;\n border-radius: var(--radius);\n font-family: 'Courier New', monospace;\n font-size: 0.9em;\n}\n\n.message-text pre {\n background: var(--pre-bg);\n padding: var(--spacing-sm);\n border-radius: var(--radius);\n overflow-x: auto;\n margin: var(--spacing-sm) 0;\n border-left: 3px solid var(--blockquote-border);\n}\n\n.message-text blockquote {\n margin-top: var(--spacing-sm);\n padding: var(--spacing-xs) var(--spacing-m);\n background: var(--blockquote-bg);\n border-left: 3px solid var(--blockquote-border);\n border-radius: 0 var(--radius) var(--radius) 0;\n font-size: 13px;\n font-style: italic;\n color: var(--chat-ai-text);\n line-height: 1.4;\n}\n\n/* === TABLES === */\n.message-text table {\n width: 100%;\n border-collapse: collapse;\n margin: var(--spacing-m) 0;\n font-size: 14px;\n}\n\n.message-text th {\n background: var(--table-header-bg);\n padding: var(--spacing-xs) var(--spacing-sm);\n border: 1px solid var(--table-border);\n text-align: left;\n}\n\n.message-text td {\n padding: var(--spacing-xs) var(--spacing-sm);\n border: 1px solid var(--table-border);\n vertical-align: top;\n}\n\n.message-text tr:nth-child(even) { background: var(--table-row-even-bg); }\n.message-text del { text-decoration: line-through; opacity: 0.7; }\n.message-text input[type=\"checkbox\"] { margin-right: var(--spacing-xs); margin-left: -20px; }\n\n/* === HORIZONTAL DIVIDERS === */\n.message-text .formatted-divider {\n border: none;\n height: 1px;\n background-color: var(--chat-ai-text);\n opacity: 0.2;\n margin: var(--spacing-l) 0;\n display: block;\n}\n\n/* === TEXT-TO-SPEECH === */\n.tts-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: var(--fontsize-body-xs);\n position: relative;\n overflow: hidden;\n white-space: nowrap;\n font-family: inherit;\n}\n\n.tts-button__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.tts-button__text {\n display: inline-block;\n font-size: 12px;\n font-weight: var(--font-weight-normal);\n line-height: 1;\n}\n\n.tts-button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }\n.tts-button svg { width: 16px; height: 16px; flex-shrink: 0; }\n\n/* TTS Button States */\n.tts-button--loading { background: var(--tts-button-bg-color); color: var(--tts-button-text-color); }\n.tts-button--playing { background: var(--tts-button-hover-bg-color); color: var(--tts-button-hover-text-color); border-color: var(--tts-button-hover-border); }\n.tts-button--paused { background: var(--tts-button-bg-color); color: var(--tts-button-text-color); border-color: var(--tts-button-border); }\n.tts-button--disabled { opacity: 0.4; cursor: not-allowed; transform: none; }\n.tts-button--disabled:hover { background: var(--tts-button-bg-color); color: var(--tts-button-text-color); border-color: var(--tts-button-border); transform: none; }\n\n.tts-spinner { animation: spin 1s linear infinite; }\n@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }\n\n/* === SIMPLIFY MESSAGE BUTTON === */\n.simplify-message-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n min-width: 28px;\n height: 28px;\n padding: var(--spacing-xs) var(--spacing-s);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: var(--fontsize-body-xs);\n font-weight: var(--font-weight-normal);\n position: relative;\n overflow: hidden;\n white-space: nowrap;\n font-family: inherit;\n}\n\n.simplify-message-button__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.simplify-message-button__text {\n display: inline-block;\n font-size: 12px;\n font-weight: var(--font-weight-normal);\n line-height: 1;\n}\n\n.simplify-message-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none;\n}\n.simplify-message-button svg {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n}\n\n/* Simplify Button States */\n.simplify-message-button--processing {\n opacity: 0.6;\n cursor: not-allowed;\n}\n.simplify-message-button--processing:hover {\n transform: none;\n}\n\n.simplify-spinner { animation: spin 1s linear infinite; }\n\n/* === COPY BUTTON === */\n.copy-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: var(--fontsize-body-xs);\n position: relative;\n overflow: hidden;\n white-space: nowrap;\n font-family: inherit;\n}\n.copy-button__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.copy-button svg { width: 16px; height: 16px; flex-shrink: 0; }\n.copy-button--copied { color: var(--color-success, #22c55e); }\n\n/* === RATING BUTTONS === */\n.rating-buttons {\n display: flex;\n gap: 4px;\n margin-left: auto;\n}\n\n.rating-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 28px;\n height: 28px;\n padding: var(--spacing-xs);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n position: relative;\n overflow: hidden;\n font-family: inherit;\n}\n\n.rating-button:disabled,\n.rating-button--disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none;\n}\n\n.rating-button--disabled:hover {\n transform: none;\n}\n\n.rating-button--active {\n background: var(--button-bg-hover);\n border: 1px solid var(--button-border-hover);\n color: var(--button-text-hover);\n cursor: not-allowed;\n}\n\n.rating-button--active:hover {\n transform: none;\n}\n\n.rating-button svg {\n width: 14px;\n height: 13px;\n flex-shrink: 0;\n}\n\n.rating-button-neutral svg {\n width: 17px;\n height: 16px;\n}\n\n.rating-button-thumbs-down svg {\n width: 16px;\n height: 16px;\n}\n\n/* === FEEDBACK BUTTON & AREA === */\n.feedback-container {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n\n.feedback-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 28px;\n height: 28px;\n padding: var(--spacing-xs);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n position: relative;\n overflow: hidden;\n font-family: inherit;\n}\n\n.feedback-button:disabled,\n.feedback-button--disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none;\n}\n\n.feedback-button--disabled:hover {\n transform: none;\n}\n\n.feedback-button--expanded {\n background: var(--button-bg-hover);\n border: 1px solid var(--button-border-hover);\n color: var(--button-text-hover);\n}\n\n.feedback-button svg {\n width: 17px;\n height: 16px;\n flex-shrink: 0;\n}\n\n.feedback-input-area {\n width: 100%;\n max-height: 0;\n overflow: hidden;\n transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;\n opacity: 0;\n margin-top: 0;\n}\n\n.feedback-input-area--expanded {\n max-height: 200px;\n opacity: 1;\n margin-top: var(--spacing-s);\n}\n\n.feedback-content {\n padding: var(--spacing-m);\n background: var(--surface-modal-bg);\n border: 1px solid var(--chat-input-border);\n border-radius: var(--radius);\n width: 100%;\n box-sizing: border-box;\n}\n\n.feedback-title {\n margin: 0 0 var(--spacing-s) 0;\n font-size: var(--fontsize-body-s);\n font-weight: 600;\n color: var(--feedback-headline);\n line-height: 1.4;\n}\n\n.feedback-input-container {\n position: relative;\n display: flex;\n gap: var(--spacing-s);\n}\n\n.feedback-submit-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n padding: var(--spacing-s);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-family: inherit;\n flex-shrink: 0;\n align-self: flex-start;\n background: transparent;\n border: transparent;\n}\n\n.feedback-submit-button:disabled,\n.feedback-submit-button--disabled {\n cursor: not-allowed;\n transform: none;\n}\n\n.feedback-submit-button:hover {\n color: var(--button-icon);\n background: transparent;\n border: transparent;\n opacity: 0.75;\n}\n\n.feedback-submit-button svg {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n}\n\n.feedback-success-message {\n font-size: var(--fontsize-body-s);\n color: var(--feedback-headline);\n line-height: 1.4;\n font-weight: 700;\n animation: fadeIn 0.3s ease;\n\n}\n\n/* === MESSAGE ACTIONS LAYOUT === */\n.message-actions {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--spacing-s);\n margin-top: var(--spacing-m);\n}\n\n.message-actions-left {\n display: flex;\n gap: var(--spacing-s);\n}\n\n.message-actions-right {\n display: flex;\n gap: 4px;\n margin-left: auto;\n}\n\n/* === FEEDBACK INPUT SECTION === */\n.feedback-input-section {\n margin-top: var(--spacing-m);\n animation: slideDownFeedback 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.feedback-divider {\n height: 1px;\n background: var(--feedback-border-top);\n margin: var(--spacing-m) 0;\n}\n\n.feedback-input-section .feedback-content {\n padding: 0;\n background: transparent;\n border: none;\n border-radius: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.feedback-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: var(--spacing-s);\n}\n\n.feedback-close-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: var(--spacing-xs);\n margin: 0;\n border-radius: var(--radius);\n cursor: pointer;\n transition: all 0.2s ease;\n font-family: inherit;\n flex-shrink: 0;\n background: transparent;\n border: transparent;\n}\n\n.feedback-close-button:hover {\n background: var(--button-bg-hover);\n border: 1px solid var(--button-border-hover);\n color: var(--button-text-hover);\n}\n\n.feedback-close-button svg {\n width: 10px;\n height: 10px;\n flex-shrink: 0;\n}\n\n.feedback-textarea {\n flex: 1;\n padding: var(--spacing-m);\n border: 1px solid var(--feedback-input-border);\n border-radius: var(--radius);\n background: var(--feedback-input-bg);\n color: var(--feedback-text);\n font-family: inherit;\n font-size: var(--fontsize-body-s);\n line-height: 1.4;\n transition: border-color 0.2s ease;\n box-sizing: border-box;\n}\n\n.feedback-textarea::placeholder {\n color: var(--chat-input-text);\n opacity: 0.7;\n}\n\n.feedback-textarea:focus {\n outline: none;\n border-color: var(--feedback-input-border-hover-focus);\n}\n\n.feedback-textarea:hover:not(:focus) {\n border-color: var(--feedback-input-border-hover);\n}\n\n.feedback-textarea:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n/* Override for feedback input section */\n.feedback-input-section .feedback-textarea {\n width: 100%;\n padding-right: 50px; /* Space for submit button */\n}\n\n/* Override for feedback input section */\n.feedback-input-section .feedback-submit-button {\n position: absolute;\n top: 50%;\n right: 8px;\n transform: translateY(-50%);\n width: 32px;\n height: 32px;\n padding: 0;\n z-index: 1;\n}\n\n@keyframes slideDownFeedback {\n from {\n opacity: 0;\n transform: translateY(-10px);\n max-height: 0;\n }\n to {\n opacity: 1;\n transform: translateY(0);\n max-height: 200px;\n }\n}\n\n\n/* === TYPING INDICATOR === */\n.typing-indicator {\n max-width: 80%;\n padding: 15px var(--spacing-l);\n border-radius: var(--radius);\n margin-bottom: var(--spacing-l);\n word-wrap: break-word;\n word-break: break-word;\n hyphens: auto;\n overflow-wrap: break-word;\n line-height: 1.5;\n font-size: 15px;\n animation: messageSlideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n align-self: flex-start;\n background: var(--chat-ai-bg);\n color: var(--chat-ai-text);\n border-bottom-left-radius: var(--radius-none);\n border: 1px solid var(--chat-ai-border);\n}\n\n.typing-content {\n display: flex;\n align-items: center;\n gap: var(--spacing-s);\n}\n\n.typing-text {\n opacity: 0.9;\n font-size: 16px;\n line-height: 1.5;\n}\n\n.typing-spinner {\n width: 14px;\n height: 14px;\n border: 2px solid var(--chat-ai-border);\n border-top: 2px solid var(--chat-ai-text);\n border-radius: 50%;\n animation: spin 1s linear infinite;\n align-self: center;\n}\n\n/* === THINKING ANIMATION === */\n.message-bubble.thinking { opacity: 0.8; }\n\n.thinking-content {\n display: flex;\n align-items: center;\n gap: var(--spacing-s);\n}\n\n.thinking-text { opacity: 0.9; }\n\n.thinking-dots {\n display: flex;\n gap: 3px;\n align-items: center;\n}\n\n.thinking-dots span {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--chat-ai-text);\n animation: think 2s infinite ease-in-out;\n}\n\n.thinking-dots span:nth-child(1) { animation-delay: 0s; }\n.thinking-dots span:nth-child(2) { animation-delay: 0.3s; }\n.thinking-dots span:nth-child(3) { animation-delay: 0.6s; }\n\n@keyframes think {\n 0%, 60%, 100% {\n opacity: 0.4;\n transform: scale(0.7);\n }\n 30% {\n opacity: 1;\n transform: scale(1.3);\n }\n}\n\n /* === RECORDING OVERLAY === */\n.recording-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--recording-overlay-bg);\n z-index: 99999;\n display: flex;\n align-items: center;\n justify-content: center;\n animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.recording-overlay-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 30px;\n width: 90vw;\n padding: 40px 20px;\n}\n\n.recording-status {\n display: flex;\n align-items: center;\n gap: 12px;\n color: var(--visualizer-color);\n font-size: 18px;\n font-weight: 500;\n text-align: center;\n}\n\n.recording-pulse {\n width: 12px;\n height: 12px;\n background: var(--recording-pulse);\n border-radius: 50%;\n animation: pulse 1.5s ease-in-out infinite;\n}\n\n.recording-visualizer-wrapper {\n width: 100%;\n animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;\n}\n\n.recording-overlay-controls {\n display: flex;\n gap: 24px;\n align-items: center;\n animation: slideInFromBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;\n}\n\n.recording-overlay-button {\n width: 44px;\n height: 44px;\n border-radius: 50%;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);\n background: var(--scrollbar-thumb);\n backdrop-filter: blur(10px);\n color: var(--visualizer-color);\n box-shadow: var(--shadow-lg);\n border: 1px solid var(--scrollbar-thumb-hover);\n}\n\n.recording-overlay-button:hover {\n transform: scale(1.1);\n box-shadow: var(--shadow-xl);\n}\n\n.recording-overlay-button:disabled {\n opacity: 0.6;\n cursor: default;\n transform: none !important;\n box-shadow: var(--shadow-lg) !important;\n}\n\n.recording-overlay-button--processing {\n background: var(--toast-bg-info) !important;\n border-color: var(--toast-bg-info) !important;\n box-shadow: var(--shadow-xl) !important;\n}\n\n.recording-overlay-button--cancel:hover:not(:disabled) {\n background: var(--toast-bg-error);\n border-color: var(--toast-bg-error);\n box-shadow: var(--shadow-xl);\n}\n\n.recording-overlay-button--confirm:hover:not(:disabled) {\n background: var(--toast-bg-success);\n border-color: var(--toast-bg-success);\n box-shadow: var(--shadow-xl);\n}\n\n.recording-overlay-button svg {\n width: 24px;\n height: 24px;\n}\n\n/* === VOICE VISUALIZER === */\n.voice-visualizer {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n}\n\n.voice-visualizer canvas {\n display: block;\n border-radius: var(--radius);\n}\n\n.processing-indicator {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 60px;\n background: var(--scrollbar-thumb);\n backdrop-filter: blur(4px);\n border: 1px solid var(--scrollbar-thumb-hover);\n border-radius: var(--radius);\n padding: 20px;\n}\n\n.processing-text {\n color: var(--visualizer-color);\n font-size: 16px;\n font-weight: 500;\n text-align: center;\n animation: pulse 2s ease-in-out infinite;\n}\n\n/* === MOBILE RESPONSIVE OVERRIDES === */\n@media (max-width: 768px) {\n .quick-button {\n max-width: calc(100vw - 80px); /* Account for container padding */\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0; /* Override min-width: fit-content */\n }\n\n .quick-buttons-wrapper {\n width: 100%;\n }\n\n .quick-button-wrapper {\n width: 100%;\n }\n\n .chat-opener {\n min-width: min(340px, calc(100vw - 32px));\n }\n\n .accordion-content {\n margin: 30px 0 15px 0;\n text-align: left;\n }\n\n .accordion-content li {\n align-items: flex-start;\n }\n}\n\n/* === DISCLAIMER STYLES === */\n.disclaimer-text {\n color: var(--disclaimer-text);\n font-size: var(--fontsize-body-xs);\n line-height: 1;\n opacity: 0;\n transform: translateY(5px);\n}\n\n.disclaimer-text a {\n color: var(--disclaimer-text);\n}\n\n/* === DISCLAIMER ANIMATION === */\n@keyframes disclaimerFadeIn {\n from {\n opacity: 0;\n transform: translateY(5px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* === TOAST SYSTEM === */\n.toast-container {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 10001;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n gap: 8px;\n max-width: 400px;\n width: auto;\n}\n\n.toast {\n pointer-events: auto;\n opacity: 0;\n transform: translateY(-20px);\n transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n max-width: 100%;\n}\n\n.toast--visible {\n opacity: 1;\n transform: translateY(0);\n}\n\n.toast__content {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 16px 20px;\n}\n\n.toast__icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 2px;\n}\n\n.toast__message {\n flex: 1;\n font-size: var(--fontsize-body-s);\n line-height: 1.4;\n margin: 2px 0;\n}\n\n.toast__close {\n flex-shrink: 0;\n background: none;\n border: none;\n cursor: pointer;\n padding: 4px;\n border-radius: var(--radius);\n color: var(--text-secondary);\n transition: all 0.2s ease;\n margin-top: -2px;\n opacity: 0.7;\n}\n\n/* Mobile Responsive */\n@media (max-width: 768px) {\n .toast-container {\n top: 10px;\n right: 10px;\n left: 10px;\n max-width: none;\n }\n\n .toast__content {\n padding: 14px 16px;\n }\n\n .toast__message {\n font-size: var(--fontsize-body-xs);\n }\n}\n\n/* === LOGIN OVERLAY === */\n.login-overlay {\n position: fixed;\n inset: 0;\n z-index: 10003;\n display: flex;\n align-items: center;\n justify-content: center;\n animation: loginFadeIn 0.3s ease-out;\n}\n\n.login-overlay-backdrop {\n position: fixed;\n inset: 0;\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n background: rgba(0, 0, 0, 0.3);\n animation: backdropFadeIn 0.3s ease-out;\n}\n\n.login-overlay-content {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px;\n width: 100%;\n max-width: 400px;\n animation: loginSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.login-form-container {\n background: var(--chat-bg, #ffffff);\n border-radius: var(--radius);\n box-shadow: var(--shadow-xl);\n padding: 32px;\n width: 100%;\n border: 1px solid var(--button-border, #e0e0e0);\n}\n\n.login-form-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n margin-bottom: 24px;\n color: var(--text-primary);\n}\n\n.login-form-header svg {\n color: var(--accent-primary);\n}\n\n.login-form-header h2 {\n margin: 0;\n font-size: var(--fontsize-heading-m, 24px);\n font-weight: 600;\n color: var(--text-primary, #333333);\n text-align: center;\n}\n\n.login-form-subtitle {\n margin: 0;\n font-size: var(--fontsize-body-s, 14px);\n color: var(--text-secondary, #666666);\n text-align: center;\n line-height: 1.5;\n}\n\n.login-form {\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n\n.form-group {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form-group label {\n font-size: var(--fontsize-body-s, 14px);\n font-weight: 500;\n color: var(--text-primary, #333333);\n}\n\n.form-group input {\n padding: 12px 16px;\n border: 1px solid var(--button-border, #cccccc);\n border-radius: var(--radius, 8px);\n font-size: var(--fontsize-body-m, 16px);\n font-family: inherit;\n background: var(--input-bg, #ffffff);\n color: var(--text-primary, #333333);\n transition: all 0.2s ease;\n}\n\n.form-group input:focus {\n outline: none;\n border-color: var(--accent-primary);\n box-shadow: 0 0 0 3px var(--accent-primary-alpha, rgba(0, 123, 255, 0.1));\n}\n\n.form-group input:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.login-success {\n padding: 12px;\n background: var(--toast-bg-success, #d4edda);\n color: var(--text-primary);\n border-radius: var(--radius);\n font-size: var(--fontsize-body-s);\n line-height: 1.4;\n}\n\n.login-error {\n padding: 12px;\n background: var(--toast-bg-error);\n color: var(--text-primary);\n border-radius: var(--radius);\n font-size: var(--fontsize-body-s);\n line-height: 1.4;\n animation: errorShake 0.3s ease-in-out;\n}\n\n.login-submit-button {\n padding: 12px 24px;\n background: var(--accent-primary, #007bff);\n color: var(--button-text-primary, #ffffff);\n border: none;\n border-radius: var(--radius, 8px);\n font-size: var(--fontsize-body-m, 16px);\n font-weight: 600;\n font-family: inherit;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: var(--shadow-md);\n}\n\n.login-submit-button:hover:not(:disabled) {\n background: var(--accent-primary-hover);\n box-shadow: var(--shadow-lg);\n transform: translateY(-1px);\n}\n\n.login-submit-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none;\n}\n\n.login-toggle-button {\n padding: 8px 16px;\n background: transparent;\n color: var(--text-secondary);\n border: none;\n font-size: var(--fontsize-body-s);\n font-family: inherit;\n cursor: pointer;\n transition: all 0.2s ease;\n text-decoration: underline;\n}\n\n.login-toggle-button:hover:not(:disabled) {\n color: var(--accent-primary);\n}\n\n.login-toggle-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n/* Login Overlay Animations */\n@keyframes loginFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes backdropFadeIn {\n from {\n opacity: 0;\n backdrop-filter: blur(0px);\n }\n to {\n opacity: 1;\n backdrop-filter: blur(8px);\n }\n}\n\n@keyframes loginSlideIn {\n from {\n opacity: 0;\n transform: translateY(-20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n@keyframes errorShake {\n 0%, 100% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(-4px);\n }\n 75% {\n transform: translateX(4px);\n }\n}\n\n/* Mobile Responsive */\n@media (max-width: 768px) {\n .login-overlay-content {\n padding: 16px;\n max-width: none;\n }\n\n .login-form-container {\n padding: 24px;\n }\n\n .login-form-header h2 {\n font-size: var(--fontsize-heading-s);\n }\n}\n\n/* === SESSION ERROR OVERLAY === */\n.session-error-overlay {\n position: fixed;\n inset: 0;\n z-index: 10003;\n display: flex;\n align-items: center;\n justify-content: center;\n animation: loginFadeIn 0.3s ease-out;\n}\n\n.session-error-overlay-backdrop {\n position: fixed;\n inset: 0;\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n background: rgba(0, 0, 0, 0.3);\n animation: backdropFadeIn 0.3s ease-out;\n}\n\n.session-error-overlay-content {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n width: 100%;\n max-width: 400px;\n background: var(--chat-bg, #ffffff);\n border-radius: var(--radius);\n box-shadow: var(--shadow-xl);\n border: 1px solid var(--button-border, #e0e0e0);\n text-align: center;\n animation: loginSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.session-error-icon {\n color: var(--error-color, #dc2626);\n margin-bottom: 16px;\n}\n\n.session-error-title {\n font-size: var(--fontsize-heading-m);\n font-weight: 600;\n color: var(--text-primary);\n margin: 0 0 8px 0;\n}\n\n.session-error-message {\n font-size: var(--fontsize-body-s);\n color: var(--text-secondary);\n margin: 0 0 24px 0;\n line-height: 1.5;\n}\n\n.session-error-button {\n background: var(--button-primary-bg);\n color: var(--button-primary-text);\n border: 1px solid var(--button-primary-border);\n border-radius: var(--radius);\n padding: var(--spacing-s) var(--spacing-l);\n font-size: var(--fontsize-body-s);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n font-family: inherit;\n}\n\n.session-error-button:hover {\n background: var(--button-primary-bg-hover);\n border-color: var(--button-primary-border-hover);\n}\n\n.session-error-button:focus {\n outline: 2px solid var(--button-primary-bg);\n outline-offset: 2px;\n}\n\n/* Mobile Responsive */\n@media (max-width: 768px) {\n .session-error-overlay-content {\n margin: 16px;\n padding: 24px;\n max-width: none;\n }\n}\n\n/* === FOLLOW-UP BUTTONS === */\n.follow-up-buttons {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-top: var(--spacing-m);\n}\n\n.follow-up-button {\n font-size: var(--fontsize-body-s);\n display: inline-block;\n padding: var(--spacing-xs) var(--spacing-m);\n border-radius: var(--radius);\n background: var(--button-suggestion-bg);\n color: var(--button-suggestion-text);\n border: 1px solid var(--button-suggestion-border);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n line-height: 1.4;\n transition: all 0.2s ease;\n animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;\n}\n\n.follow-up-button:nth-child(1) { animation-delay: 0s; }\n.follow-up-button:nth-child(2) { animation-delay: 0.1s; }\n.follow-up-button:nth-child(3) { animation-delay: 0.2s; }\n\n.follow-up-button:hover {\n background: var(--button-suggestion-bg-hover);\n color: var(--button-suggestion-text-hover);\n border: 1px solid var(--button-suggestion-border-hover);\n}\n\n.follow-up-loading {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: var(--spacing-xs) 0;\n opacity: 0.6;\n}\n\n.follow-up-loading-text {\n font-size: var(--fontsize-body-xs);\n color: var(--text-secondary);\n}\n\n/* === HEADER BUTTONS CONTAINER === */\n.header-buttons-container {\n position: fixed;\n top: var(--spacing-m);\n right: var(--spacing-m);\n z-index: 10002;\n display: flex;\n gap: var(--spacing-s);\n animation: slideInFromRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;\n}\n\n.header-buttons-container .close-button-container {\n position: static;\n animation: none;\n}\n\n/* === HAMBURGER BUTTON === */\n.hamburger-button {\n width: 40px;\n height: 40px;\n border-radius: var(--radius-max);\n cursor: pointer;\n transition: transform 0.2s ease;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--close-border);\n background: var(--close-bg);\n color: var(--close-icon);\n}\n\n.hamburger-button:hover {\n transform: scale(1.1);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n color: var(--close-icon-hover);\n}\n\n.hamburger-button:focus {\n outline: 2px solid var(--button-border);\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n outline-offset: 4px;\n transition: outline 0.2s ease;\n color: var(--close-icon-hover);\n}\n\n/* === SIDEBAR CTA BUTTON === */\n.sidebar-cta-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-xs);\n font-size: var(--fontsize-body-m);\n padding: var(--spacing-s) var(--spacing-m);\n cursor: pointer;\n line-height: 1;\n font-family: inherit;\n border-radius: var(--radius);\n border: 1px solid var(--toggle-border);\n background: var(--toggle-bg);\n color: var(--toggle-text);\n margin-top: var(--spacing-l);\n animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both;\n}\n\n.sidebar-cta-button:hover {\n background: var(--toggle-bg-hover);\n border: 1px solid var(--toggle-border-hover);\n color: var(--toggle-text-hover);\n}\n\n.sidebar-cta-button:focus {\n background: var(--toggle-bg-hover);\n border: 1px solid var(--toggle-border-hover);\n color: var(--toggle-text-hover);\n outline: 2px solid var(--toggle-text);\n}\n\n/* === SPOTLIGHT OVERLAY === */\n.spotlight-overlay-backdrop {\n position: fixed;\n inset: 0;\n z-index: 10003;\n display: flex;\n align-items: center;\n justify-content: center;\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n background: rgba(0, 0, 0, 0.4);\n animation: spotlightFadeIn 0.3s ease-out;\n}\n\n.spotlight-overlay {\n position: relative;\n background: var(--surface-modal-bg, var(--surface-bg));\n border-radius: var(--radius);\n box-shadow: var(--shadow-xl);\n padding: var(--spacing-l);\n padding-top: var(--spacing-xl);\n width: 90%;\n max-width: 400px;\n max-height: 80vh;\n overflow-y: auto;\n animation: spotlightSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.spotlight-close-button {\n position: absolute;\n top: var(--spacing-m);\n right: var(--spacing-m);\n width: 32px;\n height: 32px;\n border-radius: var(--radius-max);\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--close-border);\n background: var(--close-bg);\n color: var(--close-icon);\n transition: all 0.2s ease;\n}\n\n.spotlight-close-button:hover {\n border: 1px solid var(--close-border-hover);\n background: var(--close-bg-hover);\n color: var(--close-icon-hover);\n}\n\n/* New Chat Button - dashed border pattern */\n.spotlight-new-chat-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-s);\n width: 100%;\n padding: var(--spacing-m);\n border: 2px dashed var(--close-border);\n border-radius: var(--radius);\n background: transparent;\n color: var(--welcome-text);\n font-family: inherit;\n font-size: var(--fontsize-body-m);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n margin-top: var(--spacing-m);\n}\n\n.spotlight-new-chat-button:hover {\n border-color: var(--button-start-border, var(--close-border-hover));\n background: var(--button-start-bg, var(--toggle-bg-hover));\n color: var(--button-start-headline, var(--toggle-text-hover));\n}\n\n.spotlight-divider {\n height: 1px;\n background: var(--close-border);\n margin: var(--spacing-l) 0;\n}\n\n.spotlight-section-heading {\n font-size: var(--fontsize-body-s);\n font-weight: 500;\n color: var(--welcome-text);\n text-align: center;\n margin: 0 0 var(--spacing-m) 0;\n}\n\n/* Past Conversations List */\n.spotlight-conversations-list {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-s);\n\n max-height: 130px;\n overflow-y: scroll;\n padding: 12px 0 12px;\n\n /* Fade edges to soften scroll cutoff */\n mask-image: linear-gradient(\n to bottom,\n transparent 0%,\n black 12px,\n black calc(100% - 12px),\n transparent 100%\n );\n -webkit-mask-image: linear-gradient(\n to bottom,\n transparent 0%,\n black 12px,\n black calc(100% - 12px),\n transparent 100%\n );\n}\n\n.spotlight-conversation-item-wrapper {\n display: flex;\n align-items: stretch;\n gap: var(--spacing-xs);\n}\n\n.spotlight-conversation-item {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n flex: 1;\n padding: var(--spacing-xs);\n border: 1px solid var(--button-start-border, var(--button-suggestion-border));\n border-radius: var(--radius);\n background: var(--button-start-bg, var(--button-suggestion-bg));\n color: var(--button-start-headline, var(--button-suggestion-text));\n font-family: inherit;\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: left;\n}\n\n.spotlight-conversation-item:hover:not(:disabled) {\n background: var(--button-suggestion-bg-hover);\n border-color: var(--button-suggestion-border-hover);\n color: var(--button-suggestion-text-hover);\n}\n\n.spotlight-conversation-item:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.spotlight-conversation-item .conversation-label {\n font-size: var(--fontsize-body-m);\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100%;\n}\n\n.spotlight-conversation-item .conversation-time {\n font-size: var(--fontsize-body-xs);\n opacity: 0.7;\n}\n\n.spotlight-conversation-delete {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n border: 1px solid var(--button-start-border, var(--button-suggestion-border));\n border-radius: var(--radius);\n background: var(--button-start-bg, var(--button-suggestion-bg));\n color: var(--button-start-headline, var(--button-suggestion-text));\n cursor: pointer;\n transition: all 0.2s ease;\n opacity: 0.6;\n}\n\n.spotlight-conversation-delete:hover {\n opacity: 1;\n background: var(--error-color, #dc3545);\n border-color: var(--error-color, #dc3545);\n color: white;\n}\n\n/* Agent Links Grid */\n.spotlight-links-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));\n gap: var(--spacing-m);\n}\n\n.spotlight-link-tile {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-s);\n padding: var(--spacing-m);\n border: 1px solid var(--button-start-border, var(--button-suggestion-border));\n border-radius: var(--radius);\n background: var(--button-start-bg, var(--button-suggestion-bg));\n color: var(--button-start-headline, var(--button-suggestion-text));\n text-decoration: none;\n transition: all 0.2s ease;\n text-align: center;\n}\n\n.spotlight-link-tile:hover {\n background: var(--button-suggestion-bg-hover);\n border-color: var(--button-suggestion-border-hover);\n color: var(--button-suggestion-text-hover);\n}\n\n.spotlight-link-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n}\n\n.spotlight-link-icon svg {\n width: 24px;\n height: 24px;\n}\n\n.spotlight-link-title {\n font-size: var(--fontsize-body-m);\n font-weight: 500;\n}\n\n.spotlight-link-description {\n font-size: var(--fontsize-body-xs);\n opacity: 0.7;\n}\n\n/* Loading state */\n.spotlight-loading {\n text-align: center;\n padding: var(--spacing-m);\n color: var(--text-secondary);\n font-size: var(--fontsize-body-s);\n}\n\n/* Sibling Agents Grid */\n.spotlight-agents-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));\n gap: var(--spacing-m);\n}\n\n.spotlight-agent-tile {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-s);\n padding: var(--spacing-m);\n border: 1px solid var(--close-border);\n border-radius: var(--radius);\n background: transparent;\n color: var(--welcome-text);\n font-family: inherit;\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: center;\n text-decoration: none;\n}\n\n.spotlight-agent-tile:hover {\n background: var(--button-start-bg, var(--button-suggestion-bg));\n border-color: var(--button-start-border, var(--button-suggestion-border));\n color: var(--button-start-headline, var(--button-suggestion-text));\n}\n\n.spotlight-agent-tile.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n.spotlight-agent-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n}\n\n.spotlight-agent-icon svg {\n width: 24px;\n height: 24px;\n}\n\n.spotlight-agent-title {\n font-size: var(--fontsize-body-s);\n font-weight: 600;\n}\n\n.spotlight-agent-subtitle {\n font-size: var(--fontsize-body-xs);\n color: var(--text-secondary);\n min-height: 1.2em;\n}\n\n@keyframes spotlightFadeIn {\n from {\n opacity: 0;\n backdrop-filter: blur(0px);\n }\n to {\n opacity: 1;\n backdrop-filter: blur(8px);\n }\n}\n\n@keyframes spotlightSlideIn {\n from {\n opacity: 0;\n transform: translateY(-20px) scale(0.95);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n\n\n\n/* File Upload Styles */\n\n.dropFileList {\n position: absolute;\n top: 10px;\n left: 15px;\n display: flex;\n gap: 12px;\n}\n\n\n.fileItem {\n position: relative;\n height: 72px;\n width: 72px;\n border-radius: 12px;\n border: 1px solid var(--secondary-gray-light);\n animation: fileItemFadeIn 0.3s ease-in-out forwards;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n background-color: white;\n opacity: 0;\n transform: translateY(-12px) scale(0.9);\n .fileLabel {\n display: block;\n font-size: 10px;\n text-align: center;\n user-select: none;\n word-break: break-all;\n padding: 0 4px;\n }\n .trashItem {\n opacity: 0;\n visibility: hidden;\n position: absolute;\n transition: all 0.2s ease-in-out;\n top: -6px;\n right: -6px;\n height: 24px;\n width: 24px;\n box-sizing: border-box;\n padding: 4px;\n background-color: var(--text-primary);\n display: flex;\n justify-items: center;\n align-items: center;\n border-radius: 4px;\n cursor: pointer;\n svg {\n height: 16px;\n width: 16px\n }\n }\n}\n.fileItem:hover {\n background-color: var(--background-light);\n}\n\n.fileItem:hover .trashItem {\n opacity: 1;\n visibility: visible;\n}\n/* DropOver Indicator */\n.input-wrapper.drop-over {\n border: 1px dashed var(--close-border); \n background: var(--toggle-bg) \n} \n@keyframes fileItemFadeIn {\n from {\n opacity: 0;\n transform: translateY(-12px) scale(0.9);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n/* Attachment Icon */\n.attachmentButton {\n background-color: var(--button-bg);\n border: 1px solid var(--button-border);\n border-radius: var(--radius);\n height: 38px;\n width: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n .attachmentButtonInner {\n display: flex;\n justify-content: center;\n align-items: center;\n svg {\n height: 18px;\n width: 18px;\n }\n }\n} \n.attachmentButton:hover {\n background: var(--button-bg-hover);\n border: 1px solid var(--button-border-hover);\n color: var(--button-text-hover);\n}\n.attachedFile {\n width: 100%;\n display: flex;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 12px;\n margin-bottom: 6px;\n}\n.fileItemChat {\n border-radius: 6px;\n border: 1px solid var(--secondary-gray-light);\n width:100%;\n height: 100%;\n width: 64px;\n height: 64px;\n display: flex;\n justify-content: center;\n align-items: center;\n img {\n width:100%;\n height: 100%;\n max-width: 64px;\n height: 64px;\n object-fit: cover;\n border-radius: 6px;\n border: 1px solid var(--secondary-gray-light);\n }\n}\n\n.thumbnailPlaceholder {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n span {\n font-size: 8px;\n text-align: center\n }\n}\n\n.fileListImg { \n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 11px;\n}\n.imageSkeleton {\n height: 24px;\n animation: skeletonRotation 1500ms linear forwards infinite; \n}\n@keyframes skeletonRotation {\n from {\n transform: rotate(0deg)\n }\n to {\n transform: rotate(360deg)\n }\n}\n"),s.push(`\n /* === CUSTOM CSS FROM EXTERNAL CONFIG === */\n ${n}\n `),o.textContent=s.join("\n\n"),o},It={name:"AIgelb Standard",color_primary:"#281036",color_primary_contrast:"#FFFFFF",color_accent:"#FEEB56",color_accent_light:"#FEFDE8",color_accent_dark:"#EBBF07",color_background:"#FCFAF8",color_text:"#222222",color_text_muted:"#888888",color_border:"#D1D1D1",color_surface:"#FFFFFF",color_success:"#2EDB4B",color_error:"#FF5252",color_warning:"#FFB037",color_info:"#3B9EFF",dark_mode_enabled:!0,dark_background:"#222222",dark_surface:"#3D3D3D",dark_text:"#F6F6F6",dark_text_muted:"#B0B0B0",dark_border:"#4F4F4F",font_family:"system-ui, -apple-system, BlinkMacSystemFont, sans-serif",border_radius:"medium"},Tt={none:0,small:4,medium:8,large:16,full:999};function Lt(e,n){const t=parseInt(e.replace("#",""),16),o=Math.round(2.55*n);return`#${(1<<24|Math.min(255,(t>>16)+o)<<16|Math.min(255,(t>>8&255)+o)<<8|Math.min(255,(255&t)+o)).toString(16).slice(1)}`}function At(e,n){const t=parseInt(e.replace("#",""),16),o=Math.round(2.55*n);return`#${(1<<24|Math.max(0,(t>>16)-o)<<16|Math.max(0,(t>>8&255)-o)<<8|Math.max(0,(255&t)-o)).toString(16).slice(1)}`}function Ft(e,n){const t=parseInt(e.replace("#",""),16);return`rgba(${t>>16&255}, ${t>>8&255}, ${255&t}, ${n})`}function Nt(e){return function(e){const n=parseInt(e.replace("#",""),16),t=(n>>16&255)/255,o=(n>>8&255)/255,r=(255&n)/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))}(e)<.4}function Mt(e){const n=Tt[e.border_radius||"medium"];return{radius:{none:{desktop:0,tablet:0,mobile:0},xs:{desktop:Math.max(2,n/2),tablet:Math.max(2,n/2),mobile:Math.max(2,n/2)},s:{desktop:n,tablet:n,mobile:n},m:{desktop:2*n,tablet:2*n,mobile:2*n},l:{desktop:3*n,tablet:3*n,mobile:3*n},xl:{desktop:6*n,tablet:6*n,mobile:6*n},xxl:{desktop:8*n,tablet:8*n,mobile:8*n},max:{desktop:999,tablet:999,mobile:999}},fontsize:{h1:{desktop:36,tablet:28,mobile:28},h2:{desktop:24,tablet:22,mobile:22},h3:{desktop:20,tablet:20,mobile:20},h4:{desktop:18,tablet:18,mobile:18},h5:{desktop:20,tablet:18,mobile:18},h6:{desktop:18,tablet:16,mobile:16},"body-xs":{desktop:12,tablet:10,mobile:10},"body-s":{desktop:14,tablet:14,mobile:14},"body-m":{desktop:16,tablet:14,mobile:14},"body-l":{desktop:18,tablet:16,mobile:16}},spacing:{none:{desktop:0,tablet:0,mobile:0},xs:{desktop:4,tablet:4,mobile:4},s:{desktop:8,tablet:8,mobile:8},sm:{desktop:12,tablet:10,mobile:10},m:{desktop:16,tablet:16,mobile:12},l:{desktop:24,tablet:24,mobile:16},xl:{desktop:48,tablet:48,mobile:32},xxl:{desktop:80,tablet:64,mobile:40},xxxl:{desktop:120,tablet:80,mobile:64}},stroke:{s:{desktop:1,tablet:1,mobile:1},m:{desktop:2,tablet:2,mobile:2},l:{desktop:4,tablet:4,mobile:4}},iconSize:{xs:{desktop:12,tablet:12,mobile:12},s:{desktop:16,tablet:16,mobile:16},m:{desktop:20,tablet:18,mobile:18},l:{desktop:32,tablet:24,mobile:24},xl:{desktop:48,tablet:40,mobile:40}}}}function Pt(e){const n=(e.color_text,e.color_surface,{"neutral-000":"#FFFFFF","neutral-050":"#F6F6F6","neutral-100":"#E7E7E7","neutral-200":"#D1D1D1","neutral-300":"#B0B0B0","neutral-400":"#888888","neutral-500":"#6D6D6D","neutral-600":"#5D5D5D","neutral-700":"#4F4F4F","neutral-800":"#454545","neutral-900":"#3D3D3D","neutral-950":"#222222"});return{brand:{"Yellow-300":e.color_accent,"Yellow-50":e.color_accent_light,"Yellow-700":e.color_accent_dark,Cream:e.color_background,Purple:e.color_primary},neutrals:n,system:{Green:e.color_success,"Green-light":Lt(e.color_success,40),Red:e.color_error,"Red-light":Lt(e.color_error,40),Yellow:e.color_warning,Blue:e.color_info,"Yellow-light":Lt(e.color_warning,40),"Blue-light":Lt(e.color_info,40)}}}function Dt(e){var n;const t=null!==(n=e.shadow_intensity)&&void 0!==n?n:1,o="#000000",r=e.color_code_bg||Ft(e.color_text,.08),i=e.color_code_text||e.color_text;return{shadows:{"shadow-sm":0===t?"none":`0 2px 8px ${Ft(o,.08*t)}`,"shadow-md":0===t?"none":`0 4px 16px ${Ft(o,.12*t)}`,"shadow-lg":0===t?"none":`0 8px 24px ${Ft(o,.16*t)}`,"shadow-xl":0===t?"none":`0 12px 32px ${Ft(o,.24*t)}`},content:{"code-bg":r,"code-text":i,"pre-bg":Ft(e.color_text,.05),"blockquote-bg":Ft(e.color_text,.05),"blockquote-border":e.color_accent,"table-header-bg":Ft(e.color_primary,.1),"table-border":e.color_border,"table-row-even-bg":Ft(e.color_text,.02)},scrollbar:{"scrollbar-thumb":Ft(e.color_primary_contrast,.3),"scrollbar-thumb-hover":Ft(e.color_primary_contrast,.5),"scrollbar-track":"transparent"},recording:{"recording-overlay-bg":Ft(e.color_text,.97),"recording-pulse":e.color_error,"visualizer-color":e.color_primary_contrast}}}function Ot(e){const n=Object.assign(Object.assign({},It),e),t=function(e){const n=Nt(e.color_background),t=n?e.color_primary:e.color_text;return{welcome:{"welcome-text":e.color_text,"welcome-headline":e.color_text,"welcome-icon":e.color_text,"welcome-link":e.color_text},chat:{"chat-user-bg":e.color_accent,"chat-ai-bg":e.color_surface,"chat-user-border":e.color_accent,"chat-user-text":n?e.color_primary:e.color_text,"chat-ai-border":e.color_surface,"chat-ai-text":t,"chat-ai-text-link":e.color_primary,"chat-ai-headline":t,"chat-input-bg":e.color_surface,"chat-input-border":e.color_surface,"chat-input-border-hover":e.color_border,"chat-input-border-focus":e.color_primary,"chat-input-text":t},surface:{"surface-bg":e.color_background,"surface-layer-bg":e.color_text,"surface-modal-bg":e.color_surface},logo:{"logo-ai-gelb":e.color_text},tooltip:{"tooltip-bg":e.color_primary,"tooltip-text":e.color_primary_contrast,"tooltip-border":e.color_primary},button:{main:{"button-bg":e.color_accent_light,"button-bg-hover":e.color_primary,"button-bg-active":e.color_primary,"button-icon":e.color_primary,"button-icon-hover":e.color_primary_contrast,"button-icon-active":e.color_primary_contrast,"button-text":e.color_primary,"button-text-hover":e.color_primary_contrast,"button-text-active":e.color_primary_contrast,"button-border":e.color_accent_dark,"button-border-hover":e.color_primary,"button-border-active":e.color_primary},start:{"button-start-bg":e.color_accent_light,"button-start-bg-hover":e.color_accent_light,"button-start-headline":t,"button-start-headline-hover":t,"button-start-text":t,"button-start-text-hover":t,"button-start-icon":e.color_primary,"button-start-icon-hover":e.color_primary,"button-start-border":e.color_accent,"button-start-border-hover":e.color_accent_dark},suggestion:{"button-suggestion-bg":e.color_accent,"button-suggestion-bg-hover":e.color_surface,"button-suggestion-text":e.color_primary,"button-suggestion-text-hover":e.color_primary,"button-suggestion-border":e.color_accent,"button-suggestion-border-hover":e.color_surface},sprache:{"sprache-bg":e.color_surface,"sprache-bg-hover":e.color_accent_light,"sprache-text":e.color_primary,"sprache-text-hover":e.color_primary,"sprache-flyout-bg":e.color_surface},text:{"button-textbutton-text":e.color_primary,"button-textbutton-text-hover":e.color_primary,"button-textbutton-icon":e.color_primary,"button-textbutton-icon-hover":e.color_primary},"chat-submit":{"cs-bg":e.color_primary,"cs-bg-hover":e.color_accent_dark,"cs-border":e.color_primary,"cs-border-hover":e.color_accent_dark,"cs-icon":e.color_primary_contrast,"cs-icon-hover":e.color_primary_contrast,"cs-bg-deactivated":e.color_border,"cs-border-deactivated":e.color_border,"cs-icon-deactivated":e.color_surface},close:{"close-bg":e.color_surface,"close-bg-hover":e.color_accent_dark,"close-icon":e.color_primary,"close-icon-hover":e.color_primary_contrast,"close-border":e.color_border,"close-border-hover":e.color_accent_dark},toggle:{"toggle-bg":e.color_primary,"toggle-bg-hover":e.color_surface,"toggle-bg-active":e.color_surface,"toggle-icon":e.color_primary_contrast,"toggle-icon-hover":e.color_primary,"toggle-icon-active":e.color_primary,"toggle-text":e.color_primary_contrast,"toggle-text-hover":e.color_primary,"toggle-text-active":e.color_primary,"toggle-border":e.color_primary_contrast,"toggle-border-hover":e.color_primary,"toggle-border-active":e.color_primary}},avatar:{"avatar-bg":e.color_accent,"avatar-icon":e.color_primary},disclaimer:{"disclaimer-text":e.color_text_muted},voice:{"voice-text":e.color_primary_contrast,"voice-headline":e.color_accent,"voice-audio":e.color_accent,"voice-btn-stop-bg":Lt(e.color_error,40),"voice-btn-stop-icon":e.color_error,"voice-btn-stop-border":e.color_error,"voice-btn-stop-bg-hover":e.color_error,"voice-btn-stop-icon-hover":e.color_primary_contrast,"voice-btn-stop-border-hover":e.color_error,"voice-btn-stop-text":e.color_error,"voice-btn-stop-text-hover":e.color_primary_contrast,"voice-btn-submit-bg":Lt(e.color_success,40),"voice-btn-submit-bg-hover":e.color_success,"voice-btn-submit-icon":e.color_success,"voice-btn-submit-icon-hover":e.color_primary_contrast,"voice-btn-submit-border":e.color_success,"voice-btn-submit-border-hover":e.color_success,"voice-btn-submit-text":e.color_success,"voice-btn-submit-text-hover":e.color_primary_contrast},feedback:{"feedback-headline":t,"feedback-text":t,"feedback-input-bg":e.color_surface,"feedback-input-border":e.color_border,"feedback-input-border-hover":n?e.color_primary:e.color_text_muted,"feedback-input-border-hover-focus":e.color_primary,"feedback-border-top":e.color_border,"feedback-input-icon":t,"feedback-border":e.color_border},toast:{"toast-bg-success":e.color_success,"toast-bg-info":e.color_info,"toast-bg-warning":e.color_warning,"toast-bg-error":e.color_error,"toast-icon-success":e.color_primary_contrast,"toast-icon-info":e.color_primary_contrast,"toast-icon-warning":e.color_primary_contrast,"toast-icon-error":e.color_primary_contrast,"toast-text-success":e.color_primary_contrast,"toast-text-info":e.color_primary_contrast,"toast-text-warning":e.color_primary_contrast,"toast-text-error":e.color_primary_contrast,"toast-borer-success":e.color_success,"toast-border-info":e.color_info,"toast-border-warning":e.color_warning,"toast-border-error":e.color_error},header:{"header-mobile-bg":n?e.color_primary:e.color_surface,"header-mobile-border":n?e.color_accent_dark:e.color_border},"widget-starter":{"ws-bubble-bg":e.color_accent,"ws-bubble-text":e.color_primary,"ws-button-bg":e.color_primary,"ws-button-bg-hover":e.color_accent,"ws-button-icon":e.color_primary_contrast,"ws-button-icon-hover":e.color_primary,"ws-bubble-border":e.color_accent,"ws-button-border":e.color_primary_contrast,"ws-button-border-hover":e.color_accent,"ws-close-bg":e.color_surface,"ws-close-border":e.color_surface,"ws-close-icon":e.color_primary}}}(n),o=function(e){const n=e.dark_background||"#222222",t=e.dark_surface||"#3D3D3D",o=e.dark_text||"#F6F6F6",r=e.dark_text_muted||"#B0B0B0",i=e.dark_border||"#4F4F4F";return{welcome:{"welcome-text":o,"welcome-headline":o,"welcome-icon":e.color_accent,"welcome-link":e.color_accent},chat:{"chat-user-bg":e.color_accent_light,"chat-ai-bg":t,"chat-user-border":i,"chat-user-text":e.color_text,"chat-ai-border":t,"chat-ai-text":o,"chat-ai-text-link":e.color_accent,"chat-ai-headline":o,"chat-input-bg":t,"chat-input-border":i,"chat-input-border-hover":r,"chat-input-border-focus":e.color_accent,"chat-input-text":o},surface:{"surface-bg":n,"surface-layer-bg":At(n,10),"surface-modal-bg":t},logo:{"logo-ai-gelb":o},tooltip:{"tooltip-bg":t,"tooltip-text":o,"tooltip-border":i},button:{main:{"button-bg":t,"button-bg-hover":e.color_accent,"button-bg-active":e.color_accent,"button-icon":e.color_accent_light,"button-icon-hover":e.color_primary,"button-icon-active":e.color_primary,"button-text":e.color_accent_light,"button-text-hover":e.color_primary,"button-text-active":e.color_primary,"button-border":r,"button-border-hover":e.color_accent,"button-border-active":e.color_accent},start:{"button-start-bg":t,"button-start-bg-hover":t,"button-start-headline":o,"button-start-headline-hover":o,"button-start-text":o,"button-start-text-hover":o,"button-start-icon":e.color_accent,"button-start-icon-hover":e.color_accent,"button-start-border":i,"button-start-border-hover":e.color_accent},suggestion:{"button-suggestion-bg":e.color_accent,"button-suggestion-bg-hover":e.color_accent_light,"button-suggestion-text":e.color_text,"button-suggestion-text-hover":e.color_text,"button-suggestion-border":e.color_accent,"button-suggestion-border-hover":e.color_accent_dark},sprache:{"sprache-bg":t,"sprache-bg-hover":t,"sprache-text":o,"sprache-text-hover":e.color_accent,"sprache-flyout-bg":t},text:{"button-textbutton-text":e.color_accent,"button-textbutton-text-hover":o,"button-textbutton-icon":e.color_accent,"button-textbutton-icon-hover":o},"chat-submit":{"cs-bg":t,"cs-bg-hover":e.color_accent,"cs-border":e.color_accent,"cs-border-hover":e.color_accent,"cs-icon":e.color_accent,"cs-icon-hover":n,"cs-bg-deactivated":i,"cs-border-deactivated":r,"cs-icon-deactivated":n},close:{"close-bg":n,"close-bg-hover":n,"close-icon":o,"close-icon-hover":e.color_accent,"close-border":o,"close-border-hover":e.color_accent},toggle:{"toggle-bg":n,"toggle-bg-hover":n,"toggle-bg-active":e.color_accent,"toggle-icon":o,"toggle-icon-hover":e.color_accent,"toggle-icon-active":n,"toggle-text":o,"toggle-text-hover":e.color_accent,"toggle-text-active":n,"toggle-border":o,"toggle-border-hover":e.color_accent,"toggle-border-active":e.color_accent}},avatar:{"avatar-bg":n,"avatar-icon":e.color_accent},disclaimer:{"disclaimer-text":r},voice:{"voice-text":o,"voice-headline":e.color_accent,"voice-audio":e.color_accent,"voice-btn-stop-bg":Lt(e.color_error,40),"voice-btn-stop-icon":n,"voice-btn-stop-border":e.color_error,"voice-btn-stop-bg-hover":e.color_error,"voice-btn-stop-icon-hover":o,"voice-btn-stop-border-hover":e.color_error,"voice-btn-stop-text":n,"voice-btn-stop-text-hover":n,"voice-btn-submit-bg":Lt(e.color_success,40),"voice-btn-submit-bg-hover":e.color_success,"voice-btn-submit-icon":n,"voice-btn-submit-icon-hover":o,"voice-btn-submit-border":e.color_success,"voice-btn-submit-border-hover":e.color_success,"voice-btn-submit-text":n,"voice-btn-submit-text-hover":n},feedback:{"feedback-headline":o,"feedback-text":o,"feedback-input-bg":t,"feedback-input-border":r,"feedback-input-border-hover":r,"feedback-input-border-hover-focus":e.color_accent,"feedback-border-top":i,"feedback-input-icon":o,"feedback-border":i},toast:{"toast-bg-success":e.color_success,"toast-bg-info":e.color_info,"toast-bg-warning":e.color_warning,"toast-bg-error":e.color_error,"toast-icon-success":n,"toast-icon-info":n,"toast-icon-warning":n,"toast-icon-error":n,"toast-text-success":n,"toast-text-info":n,"toast-text-warning":n,"toast-text-error":n,"toast-borer-success":e.color_success,"toast-border-info":e.color_info,"toast-border-warning":e.color_warning,"toast-border-error":e.color_error},header:{"header-mobile-bg":n,"header-mobile-border":i},"widget-starter":{"ws-bubble-bg":e.color_accent,"ws-bubble-text":n,"ws-button-bg":e.color_accent_light,"ws-button-bg-hover":e.color_accent,"ws-button-icon":n,"ws-button-icon-hover":n,"ws-bubble-border":e.color_accent,"ws-button-border":e.color_accent,"ws-button-border-hover":e.color_accent,"ws-close-bg":e.color_accent_light,"ws-close-border":e.color_accent_light,"ws-close-icon":n}}}(n);return n.overrides&&n.overrides.length>0&&function(e,n,t){for(const o of t){const{component:t,property:r,value_light:i,value_dark:a}=o,s={button_primary:{path:["button","main"],prefix:"button"},button_suggestion:{path:["button","suggestion"],prefix:"button-suggestion"},button_submit:{path:["button","chat-submit"],prefix:"cs"},button_close:{path:["button","close"],prefix:"close"},button_toggle:{path:["button","toggle"],prefix:"toggle"},button_start:{path:["button","start"],prefix:"button-start"},button_text:{path:["button","text"],prefix:"button-textbutton"},button_language:{path:["button","sprache"],prefix:"sprache"},chat_input:{path:["chat"],prefix:"chat-input"},message_user:{path:["chat"],prefix:"chat-user"},message_ai:{path:["chat"],prefix:"chat-ai"},avatar:{path:["avatar"],prefix:"avatar"},tooltip:{path:["tooltip"],prefix:"tooltip"},widget_opener:{path:["widget-starter"],prefix:"ws-button"},welcome_section:{path:["welcome"],prefix:"welcome"},header_mobile:{path:["header"],prefix:"header-mobile"},disclaimer:{path:["disclaimer"],prefix:"disclaimer"},feedback:{path:["feedback"],prefix:"feedback"},voice_overlay:{path:["voice"],prefix:"voice"}}[t];if(!s)continue;const l={background:"bg",background_hover:"bg-hover",background_active:"bg-active",text:"text",text_hover:"text-hover",text_active:"text-active",border:"border",border_hover:"border-hover",border_active:"border-active",icon:"icon",icon_hover:"icon-hover",icon_active:"icon-active"}[r];if(!l)continue;const c=`${s.prefix}-${l}`;let u=e,d=n;for(const e of s.path)u=u[e],d=d[e];i&&c in u&&(u[c]=i),a&&c in d?d[c]=a:i&&c in d&&(d[c]=i)}}(t,o,n.overrides),{colors:Pt(n),lightMode:t,darkMode:o,responsive:Mt(n),semantic:Dt(n)}}var zt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Rt=(e,n,t)=>{const o=e.agentId,{showError:r}=xt(),[i,a]=de(null),[s,l]=de(!1),[c,u]=de(!1),d=me(()=>((e,n)=>{var t,o,r,i,a,s,l,c;const u={agentId:n.agentId,defaultLanguage:n.defaultLanguage,languages:n.languages,showChatButton:n.showChatButton,stt:(null==e?void 0:e.stt)||!1,tts:(null==e?void 0:e.tts)||!1,searchEnabled:(null==e?void 0:e.searchEnabled)||!1,easy_language:(null==e?void 0:e.easy_language)||!1,title:(null==e?void 0:e.welcome_title)||null,welcomeMessage:(null==e?void 0:e.welcome_message_snippet)||null,quickButtons:[],placeholder:(null==e?void 0:e.placeholder)||"Ihre Frage...",about:(null==e?void 0:e.about)||(null==e?void 0:e.disclaimer)||null,disclaimer:(null==e?void 0:e.disclaimer)||null,logo:(null==e?void 0:e.logo)||null,icon:(null==e?void 0:e.icon)||null,snippetIcon:(null==e?void 0:e.snippetIcon)||null,openerHeadline:(null==e?void 0:e.opener_headline)||null,openerSubtitle:(null==e?void 0:e.opener_subtitle)||null,closable:null===(t=null==e?void 0:e.closable)||void 0===t||t,welcomeDisclaimer:(null==e?void 0:e.welcome_disclaimer)||null,openerPosition:(null==e?void 0:e.opener_position)||"bottom-right",followUpQuestions:!!(null==e?void 0:e.follow_up_questions),copyEnabled:null===(o=null==e?void 0:e.copy_enabled)||void 0===o||o,openerAutoDismissMs:null!==(r=null==e?void 0:e.opener_auto_dismiss_milliseconds)&&void 0!==r?r:1e4,persistDismiss:null===(i=null==e?void 0:e.persist_dismiss)||void 0===i||i,showSidebarMenu:null!==(a=null==e?void 0:e.sidebar_menu_enabled)&&void 0!==a&&a,sidebarButtonLabel:(null==e?void 0:e.sidebar_button_label)||null,sidebarHeading:(null==e?void 0:e.sidebar_heading)||null,applicationId:(null==e?void 0:e.application)||null,auto_language:(null==e?void 0:e.auto_language)||!1,dark_mode:(null==e?void 0:e.dark_mode)||!1,locked_behind_login:(null==e?void 0:e.locked_behind_login)||!1,file_upload:null!==(s=null==e?void 0:e.file_upload)&&void 0!==s&&s,maxUploadFiles:null!==(l=null==e?void 0:e.maxUploadFiles)&&void 0!==l?l:5,maxUploadFileSize:null!==(c=null==e?void 0:e.maxUploadFileSize)&&void 0!==c?c:10485760};return null!==e&&null!==e.example_questions&&(u.quickButtons=e.example_questions.map(e=>e.title||e.message)),u})(i,e),[i,e]),p=ve(()=>zt(void 0,void 0,void 0,function*(){if(!c){u(!0);try{if(null===o)return console.warn("Agent ID is required for loading external configuration"),void l(!0);if(null===t)return console.warn("Session token is required for loading external configuration"),void l(!0);const e=parseInt(o);if(isNaN(e))throw new Error("Invalid agent ID");const n=yield((e,n)=>Vn(void 0,void 0,void 0,function*(){const t=`${jn}/api/agent/${e}/config`,o=yield fetch(t,On(n,!0));if(!o.ok)throw new Error(`Failed to load agent config: ${o.status}`);const r=yield o.json();return console.log(r),r}))(e,t);console.log("External configuration loaded from AI-Gelb API"),a(n),l(!0);let r=n.theme_configuration;if(n.simple_theme&&(console.log("Using simplified theme configuration"),r=Ot(n.simple_theme)),r){const e=new CustomEvent("chatbot-theme-config",{detail:{themeConfig:r},bubbles:!0});document.dispatchEvent(e)}if(n.cssSnippet){const e=new CustomEvent("chatbot-custom-css",{detail:{css:n.cssSnippet},bubbles:!0});document.dispatchEvent(e)}const i=new CustomEvent("chatbot-dark-mode-config",{detail:{enabled:!0===n.dark_mode},bubbles:!0});document.dispatchEvent(i);const s=new CustomEvent("chatbot-ready",{bubbles:!0,detail:{agentId:o}});document.dispatchEvent(s),console.log("🚀 Chatbot ready event dispatched")}catch(e){console.error("Error loading external configuration:",e),r(n.toast.configurationError),l(!0)}}}),[c,o,t,n,r]);return he(()=>{c||s||null!==t&&p()},[e.agentId,t,p]),{finalConfig:d,configLoaded:s}};var jt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Bt=(e,n)=>{const[t,o]=_n(!1),[r,i]=de(!1),[a,s]=de(null),l=ge(null),c=ge([]),u=ge(null),{showError:d}=xt(),p=ve((e,n)=>{o.force(e),!e&&a&&a.getTracks().forEach(e=>e.stop()),s(n)},[o,a]),h=ve(()=>jt(void 0,void 0,void 0,function*(){try{const t=new Blob(c.current,{type:"audio/webm"});console.log("Sending audio blob, size:",t.size);const o=yield Xn(t,n);console.log("STT Response:",o);const r=o.text||o.transcription||"";r.trim()&&u.current?u.current(r.trim()):r.trim()||(console.warn("Empty transcription received"),d(e.stt.error.emptyTranscription))}catch(n){console.error("Speech recognition error:",n),d(e.stt.error.processing)}finally{i(!1),c.current=[],u.current=null}}),[d,e]),f=ve(n=>jt(void 0,void 0,void 0,function*(){console.log("start recording"),u.current=n;try{console.log("Requesting microphone access...");const e=yield navigator.mediaDevices.getUserMedia({audio:!0});console.log("Microphone access granted"),p(!0,e);const n=new MediaRecorder(e,{mimeType:"audio/webm"});l.current=n,c.current=[],n.ondataavailable=e=>{e.data.size>0&&(c.current.push(e.data),console.log("Audio chunk received, size:",e.data.size))},n.start(),console.log("Recording started")}catch(n){console.error("Error starting recording:",n),n instanceof Error&&("NotAllowedError"===n.name?d(e.stt.error.permission):"NotFoundError"===n.name?d(e.stt.error.notFound):"NotSupportedError"===n.name?d(e.stt.error.notSupported):"SecurityError"===n.name?d(e.stt.error.policy):window.isSecureContext?d(e.stt.error.generic):d(e.stt.error.https),"NotAllowedError"===n.name&&(console.group("🔍 Microphone Permission Debugging:"),console.log("- HTTPS status:",window.isSecureContext),console.log("- In iframe:",window!==window.top),console.log("- MediaDevices available:",!!navigator.mediaDevices),window!==window.top&&(console.log("- Current origin:",window.location.origin),console.log("- Parent origin:",document.referrer||"unknown")),console.groupEnd())),p(!1,null),u.current=null}}),[p,d,e]),g=ve(()=>{l.current&&t&&(l.current.stop(),c.current=[],p(!1,null),u.current=null)},[t,p]),b=ve(()=>{l.current&&t&&(l.current.onstop=()=>{console.log("MediaRecorder stopped, total chunks:",c.current.length),h()},l.current.stop(),i(!0),p(!1,null))},[t,p,h]);return{isRecording:t,isProcessing:r,audioStream:a,handleRecordingStateChange:p,handleRecordingCancel:g,handleRecordingConfirm:b,startRecording:f}};var Ht=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const $t=e=>new Promise(n=>setTimeout(n,e));var Ut=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Yt="f:",Vt="9:",qt='0:"',Wt='"',Zt="e:",Gt="d:",Kt={type:"object",required:["results"],properties:{results:{type:"array",items:{type:"object",required:["title","snippet","url"],properties:{title:{type:"string"},snippet:{type:"string"},url:{type:"string"}}}},introduction:{type:"string"},"follow-up":{type:"string"}}};var Xt=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Qt={WAITING:"Bitte warten Sie...",THINKING:"... Ich denke nach...",ERROR_PROCESSING:"Es gab einen Fehler bei der Verarbeitung deiner Nachricht.",ERROR_SIMPLIFICATION:"Es gab einen Fehler beim Vereinfachen der Nachricht.",ERROR_STREAMING:"Es gab einen Fehler beim Abrufen der Streaming-Antwort.",ERROR_MISSING_AGENT:"Fehler: Agent-ID ist nicht konfiguriert. Bitte kontaktieren Sie den Administrator."},Jt=e=>{for(let n=e.length-1;n>=0;n--)if("bot"===e[n].sender)return n;return null},eo=(e,n,t,o,r,i,a)=>{const{showError:s}=xt(),l=ge(o.followUpQuestions);he(()=>{l.current=o.followUpQuestions},[o.followUpQuestions]);const c=ge(a);he(()=>{c.current=a},[a]);const[u,d]=de(r);he(()=>d(r),[r]);const[p,h]=de([]),[f,g]=de(crypto.randomUUID()),b=ge(f);he(()=>{b.current=f},[f]);const m=ge(null),[v,y]=_n(!1),[x,w]=_n(!1),[k,{open:_,close:C}]=_n(!1),[S,{open:E,close:I}]=_n(!1),[T,L]=de(""),A=ve(e=>Xt(void 0,void 0,void 0,function*(){const n=e.length;for(let t=0;t<n;t++){yield $t(50);const n=Qt.WAITING.slice(0,-3)+e.substring(0,t+1);L(n)}}),[L]),[F,N]=de(""),M=me(()=>""===F.trim(),[F]),P=ve(()=>{N("")},[]),[D,O]=de("initial"),z=ve(e=>{"user"===e.sender&&y.open(),h(n=>[...n,e])},[y.open]),R=ve(e=>{h(n=>{const t=n.find(n=>n.messageId===e);return void 0===t?n:(t.isSimplified=!0,[...n])})},[h]),j=ve((e,t)=>{const o={text:"",sender:"bot",isComplete:!1,isSimplified:e||n,messageId:t||crypto.randomUUID()};z(o),I(),L("")},[z,n,I,L]),B=ve(e=>{h(n=>{const t=Jt(n);if(null===t)return n;const o=n[t];return void 0===o?n:(o.isThinking=!1,o.text+=e,[...n])})},[]),H=ve((e,t)=>{const o={text:"",sender:"bot",isThinking:!1,isComplete:!1,isSimplified:e||n,messageId:t||crypto.randomUUID()};z(o),I(),L("")},[z,I,L,n]),$=ve(()=>{h(e=>{const n=Jt(e);if(null===n)return e;const t=e[n];return void 0===t?e:(t.isThinking=!1,t.text="",[...e])})},[h]),U=ve(()=>{h(e=>{const n=Jt(e);if(null===n)return e;const t=e[n];if(void 0===t)return e;const o=(e=>{if(""===e.trim())return e;let n=e.replace(/\\n/g,"\n");return n=n.replace(/\\t/g,"\t"),n=n.replace(/\\r/g,"\r"),n=n.replace(/\n\s*\n/g,"\n\n"),n=n.replace(/^(\s*)[-*•]\s+(.+)$/gm,"$1• $2"),n=n.replace(/^(\s*)(\d+)[\.\)]\s+(.+)$/gm,"$1$2. $3"),n=n.replace(/[ \t]+/g," "),n=n.replace(/^[ \t]+|[ \t]+$/gm,""),n=n.replace(/\n{3,}/g,"\n\n"),n.trim()})(t.text),r=Object.assign({},t);r.text=o,r.isComplete=!0,r.isThinking=!1;const i=[...e];return i[n]=r,i})},[h]),Y=ve((e,n)=>{h(t=>t.map(t=>t.messageId===e?Object.assign(Object.assign({},t),{followUpQuestions:n,isLoadingFollowUps:!1}):t))},[h]),V=ve(e=>{h(n=>n.map(n=>n.messageId===e?Object.assign(Object.assign({},n),{isLoadingFollowUps:!0}):n))},[h]),q=ve((e,n)=>Xt(void 0,void 0,void 0,function*(){if(!l.current||!o.agentId)return;V(e);const t=b.current+"-followup-"+e,r=`Basierend auf der folgenden Antwort, generiere genau 3 kurze Vertiefungsfragen, die der Nutzer als Nächstes stellen könnte. Antworte NUR mit einem JSON-Array von 3 Strings, ohne weitere Erklärung. Beispiel: ["Frage 1?", "Frage 2?", "Frage 3?"]\n\nAntwort:\n${n.substring(0,2e3)}`;try{const n=yield Gn(o.agentId,r,t,c.current),i=new TextDecoder;let a="",s="";for(;;){const{value:e,done:t}=yield n.read();if(t)break;a+=i.decode(e,{stream:!0});const o=a.split("\n");a=o.pop()||"";for(const e of o)if(e.startsWith('0:"')&&e.endsWith('"')){const n=e.slice(3,-1);s+=n.replace(/\\n/g,"\n").replace(/\\t/g,"\t").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}}n.releaseLock();let l=[];try{const e=s.match(/\[[\s\S]*\]/);if(e){const n=JSON.parse(e[0]);Array.isArray(n)&&(l=n.filter(e=>"string"==typeof e))}}catch(e){console.warn("Follow-up JSON parse failed, trying fallback:",e);const n=s.match(/\d+\.\s*(.+)/g);if(n&&(l=n.map(e=>e.replace(/^\d+\.\s*/,"").replace(/^["']|["']$/g,"").trim())),0===l.length){const e=s.split("\n").map(e=>e.replace(/^[-•*]\s*/,"").replace(/^["']|["']$/g,"").trim()).filter(e=>e.length>10&&e.endsWith("?"));e.length>0&&(l=e)}}l.length>0?Y(e,l.slice(0,3)):h(n=>n.map(n=>n.messageId===e?Object.assign(Object.assign({},n),{isLoadingFollowUps:!1}):n))}catch(n){console.error("Error fetching follow-up questions:",n),h(n=>n.map(n=>n.messageId===e?Object.assign(Object.assign({},n),{isLoadingFollowUps:!1}):n))}}),[o.agentId,V,Y,h]),W=ve(e=>{h(n=>{const t=Jt(n);if(null===t)return n;const o=n[t];if(void 0===o)return n;const r=Object.assign(Object.assign({},o),{text:e,isThinking:!0}),i=[...n];return i[t]=r,i})},[h]),Z=ve((e,n)=>{const t={sender:"bot",isComplete:!0,text:e,isSimplified:n,messageId:crypto.randomUUID()};h(e=>[...e,t])},[h]),G=ve(()=>{m.current=null,h([]),g(crypto.randomUUID()),y.close()},[y.close]),K=ve((e,n)=>{m.current=null,h(e),g(n),e.length>0&&(y.open(),O("fixed"))},[y.open]),X=ve(n=>Xt(void 0,void 0,void 0,function*(){if(""===n)return;const t=p.find(e=>e.messageId===n);if(void 0===t)return;const o=[t.text,e.instructions.simplifyMessage].join(" ");if(k)console.log("Already sending, ignoring duplicate call");else{_(),E(),L(e.simplify.simplifying);try{yield J(o,{isSimplification:!0,initialTypingMessage:e.simplify.simplifying,thinkingMessage:Qt.THINKING,logPrefix:"Simplification stream"})}catch(n){console.error("Error sending message:",n),s(e.toast.simplificationError);const t={text:e.toast.generalError,sender:"bot",isComplete:!0,isSimplified:!0,messageId:crypto.randomUUID()};z(t),I(),L("")}finally{C(),R(n)}}}),[p,R,k,_,C,E,I,z,L]),Q=ve((t,o,r)=>Xt(void 0,void 0,void 0,function*(){if(k)return;w.open(),setTimeout(w.close,500),_();const i=Object.assign({text:o||t,sender:"user"},r&&r.length>0&&{files:r});z(i),E(),L(Qt.WAITING);try{yield J(t,Object.assign({isSimplification:!1,initialTypingMessage:Qt.WAITING,thinkingMessage:Qt.THINKING,logPrefix:"Stream"},r&&r.length>0&&{files:r}))}catch(t){console.error("Error sending message:",t),s(e.toast.messageError);const o={text:Qt.ERROR_PROCESSING,sender:"bot",isComplete:!0,isSimplified:n,messageId:crypto.randomUUID()};z(o),I(),L("")}finally{C()}}),[k,w.open,w.close,C,_,E,I]),J=ve((r,i)=>Xt(void 0,void 0,void 0,function*(){let a,l=!1,u=Qt.WAITING,d=Qt.THINKING,p="Stream";if(void 0!==i&&(void 0!==i.isSimplification&&(l=i.isSimplification),void 0!==i.initialTypingMessage&&(u=i.initialTypingMessage),void 0!==i.thinkingMessage&&(d=i.thinkingMessage),void 0!==i.logPrefix&&(p=i.logPrefix),void 0!==i.files&&(a=i.files)),!o.agentId){console.error("Agent ID is required but not provided in configuration"),s(e.toast.missingAgentId);const t={text:Qt.ERROR_MISSING_AGENT,sender:"bot",isComplete:!0,isSimplified:l||n,messageId:crypto.randomUUID()};return z(t),I(),void L("")}const h=b.current;m.current=h;const f=()=>m.current!==h,g=()=>{f()||U()},v=e=>{f()||W(e)},y=e=>Xt(void 0,void 0,void 0,function*(){f()||(yield A(e))}),x=()=>{f()||$()},w=(e,n)=>{f()||H(e,n)},k=(e,n)=>{f()||j(e,n)},_=e=>{f()||B(e)};try{const e=o.auto_language?void 0:t;yield((e,n,t,o,r,i,a,s,l,c,u,d,p,h,f,g,b,m)=>Ut(void 0,void 0,void 0,function*(){let v=!1,y=null,x=null,w="",k=!1,_=null;const C=new TextDecoder;let S="";const E=yield Gn(e,n,t,o,g,b,m),I=()=>Ut(void 0,void 0,void 0,function*(){const{value:e,done:n}=yield E.read();if(n)return!0;S+=C.decode(e,{stream:!0});const t=S.split("\n");S=t.pop()||"";for(const e of t)switch(!0){case""===e.trim():continue;case e.startsWith(Yt):{console.log(e.substring(Yt.length));const n=JSON.parse(e.substring(Yt.length));y=Date.now(),x=n.messageId;break}case e.startsWith(Vt):{if(k){console.log("Tool call data:",e.substring(0,100)+"...");continue}k=!0,_=Date.now();const n=_-(y||0);console.log(`Tool call detected after ${n}ms of "${r}" - switching to thinking mode`),v?l(r+i):yield c(i),console.log("Tool call data:",e.substring(0,100)+"...");break}case e.startsWith(qt)&&e.endsWith(Wt):{if(k){k=!1;const e=Date.now()-(_||0);console.log(`Switching from thinking to streaming after ${e}ms of thinking time`),v?u():(d(a,x||""),v=!0)}else if(!v){const e=Date.now()-(y||0);console.log(`Direct response after ${e}ms - no reasoning phase`),p(a,x||""),v=!0}const n=e.slice(qt.length,-Wt.length).replace(/\\"/g,'"');w+=n,h(n);break}case e.startsWith(Zt)||e.startsWith(Gt):console.log("stream end",JSON.parse(e.substring(2)))}return!1});try{for(;!(yield I()););S.trim()&&console.log("Remaining buffer:",S),v&&(s(),f&&x&&f(x,w))}finally{E.releaseLock()}}))(o.agentId,r,h,c.current,u,d,l,g,v,y,x,w,k,_,l?void 0:(e,n)=>{f()||q(e,n)},e,n,a)}catch(t){console.error(`${p} error:`,t);if(t instanceof Error&&t.message.startsWith("CORS_BLOCKED:")){const e=t.message.replace("CORS_BLOCKED: ","");s(e,1e4),Z(e,l||n)}else{s(l?e.toast.simplificationError:e.toast.streamingError);const t=l?Qt.ERROR_SIMPLIFICATION:Qt.ERROR_STREAMING;Z(t,l||n)}I(),L("")}finally{m.current===h&&(m.current=null)}}),[o.agentId,o.auto_language,n,z,U,W,A,$,H,j,B,s,Z,I,L,q,t]),ee=ve(()=>{O("fadeOut"),setTimeout(()=>O("fixed"),50)},[O]),ne=ve((e,n)=>Xt(void 0,void 0,void 0,function*(){""!==e.trim()&&(v||ee(),P(),i(!1),Q(e,e,n))}),[v,ee,Q,P,i,e,t,n]),te=ve(e=>{M||("chat"===u?ne(F,e):oe().then(()=>d("chat")))},[F,M,ne,u]),oe=ve(()=>Xt(void 0,void 0,void 0,function*(){if(k)return;if(!o.agentId)return console.error("Agent ID is required but not provided in configuration"),void s(e.toast.missingAgentId);v||ee(),w.open(),setTimeout(w.close,500),_();z({text:F,sender:"user"}),P(),i(!1);try{E(),L(Qt.THINKING);const e=o.auto_language?void 0:t,r=yield((e,n,t,o,r)=>Ht(void 0,void 0,void 0,function*(){if(!Hn(e))throw new Error("Agent ID is required and must be numeric");if(!$n(n))throw new Error("Query is required and must be a non-empty string");if(!t||"object"!=typeof t)throw new Error("Schema is required and must be an object");const i=`${jn}/api/search/${e}`,a=Object.assign({query:n,schema:t},r&&{language:r}),s=yield fetch(i,zn(a,o));if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return yield s.json()}))(o.agentId,F,Kt,c.current,e),i={text:"",sender:"bot",isComplete:!0,isSimplified:n,messageId:crypto.randomUUID(),json:r};z(i)}catch(t){console.error("Error with schema search:",t),s(e.toast.messageError);const o={text:"Es gab einen Fehler bei der Suche.",sender:"bot",isComplete:!0,isSimplified:n,messageId:crypto.randomUUID()};z(o)}finally{I(),L(""),C()}}),[M,F,k,o.agentId,o.auto_language,n,w,_,C,z,P,s,e,t]);return{inputAnimationState:D,triggerAnimation:ee,clearInput:P,isInputEmpty:M,inputText:F,setInputText:N,isStreaming:S,streamingMessage:T,isSending:k,messages:p,isConversationStarting:x,isConversationActive:v,resetConversation:G,loadConversationFromMessages:K,conversationId:f,simplifyMessage:X,sendMessageWithUI:ne,sendMessageFromInput:te,mode:u,setMode:d}};var no=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};function to(e){return no(this,void 0,void 0,function*(){const n=(new TextEncoder).encode(e),t=yield crypto.subtle.digest("SHA-256",n),o=Array.from(new Uint8Array(t)).map(e=>e.toString(16).padStart(2,"0")).join("");return o})}var oo=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};function ro(e){const[n,t]=de({sessionToken:null,expiresAt:null,isLocked:null,sessionError:!1,isEstablishing:!1}),o=ge(null);he(()=>()=>{o.current&&clearInterval(o.current)},[]);const r=ve(()=>oo(this,void 0,void 0,function*(){if(null===e)throw new Error("Agent ID not set");try{const n=yield function(e){return tt(this,void 0,void 0,function*(){const n=`${jn}/api/agent/${e}/locked`,t=yield fetch(n,On(null,!0));if(!t.ok)throw new Error(`Failed to check agent locked status: ${t.status}`);return(yield t.json()).locked})}(e);return t(e=>Object.assign(Object.assign({},e),{isLocked:n})),n}catch(e){throw console.error("Failed to check if agent is locked:",e),t(e=>Object.assign(Object.assign({},e),{sessionError:!0})),e}}),[e]),i=ve(n=>oo(this,void 0,void 0,function*(){if(null===e)throw new Error("Agent ID not set");return yield function(e,n){return nt(this,void 0,void 0,function*(){const t=`${jn}/api/agent/${e}/session`,o={};n&&(o.credentials=n);const r=yield fetch(t,zn(o,null));if(!r.ok){const e=yield r.json(),n=new Error(e.error||`Session establishment failed: ${r.status}`);throw n.status=r.status,n}const i=yield r.json();return{sessionToken:i.sessionToken,expiresAt:i.expiresAt}})}(e,n)}),[e]),a=ge(null),s=ve(()=>{o.current&&clearInterval(o.current),o.current=setInterval(()=>oo(this,void 0,void 0,function*(){if(null===e)return;const n=a.current;if(null!==n)try{const o=yield function(e,n){return et(this,void 0,void 0,function*(){const t=`${jn}/api/agent/${e}/session/continue`,o=yield fetch(t,zn({},n));if(!o.ok){const e=yield o.json();throw new Error(e.error||`Session continue failed: ${o.status}`)}const r=yield o.json();return{sessionToken:r.sessionToken,expiresAt:r.expiresAt}})}(e,n);a.current=o.sessionToken,t(e=>Object.assign(Object.assign({},e),{sessionToken:o.sessionToken,expiresAt:o.expiresAt,sessionError:!1}))}catch(e){console.error("Session refresh failed:",e),o.current&&(clearInterval(o.current),o.current=null),t(e=>Object.assign(Object.assign({},e),{sessionError:!0}))}else console.error("Session refresh failed: no current token")}),55e3)},[e]),l=ve(n=>oo(this,void 0,void 0,function*(){if(null===e)return console.error("Cannot establish session: agent ID not set"),"error";t(e=>Object.assign(Object.assign({},e),{isEstablishing:!0,sessionError:!1}));try{let e;if(n){const t=yield function(e){return oo(this,void 0,void 0,function*(){const n=(new TextEncoder).encode(e),t=yield crypto.subtle.digest("SHA-256",n),o=Array.from(new Uint8Array(t)).map(e=>e.toString(16).padStart(2,"0")).join("");return o})}(n.password);e={email:n.email,passwordHash:t}}const o=yield i(e);return a.current=o.sessionToken,t(e=>Object.assign(Object.assign({},e),{sessionToken:o.sessionToken,expiresAt:o.expiresAt,sessionError:!1,isEstablishing:!1})),s(),"ok"}catch(e){return 401===e.status?(t(e=>Object.assign(Object.assign({},e),{isLocked:!0,isEstablishing:!1})),"locked"):(console.error("Session establishment failed:",e),t(e=>Object.assign(Object.assign({},e),{sessionError:!0,isEstablishing:!1})),"error")}}),[e,i,s]),c=ve(()=>{t(e=>Object.assign(Object.assign({},e),{isLocked:!0}))},[]),u=ve(()=>{t(e=>Object.assign(Object.assign({},e),{sessionError:!1}))},[]);return{sessionState:n,checkLocked:r,markAsLocked:c,establish:l,establishWithHashedCredentials:ve(n=>oo(this,void 0,void 0,function*(){if(null===e)return console.error("Cannot establish session: agent ID not set"),!1;t(e=>Object.assign(Object.assign({},e),{isEstablishing:!0,sessionError:!1}));try{const e=yield i(n);return a.current=e.sessionToken,t(n=>Object.assign(Object.assign({},n),{sessionToken:e.sessionToken,expiresAt:e.expiresAt,sessionError:!1,isEstablishing:!1})),s(),!0}catch(e){return console.error("Session establishment with hashed credentials failed:",e),t(e=>Object.assign(Object.assign({},e),{sessionError:!0,isEstablishing:!1})),!1}}),[e,i,s]),clearError:u}}function io(e,n){const[t,o]=de(()=>{try{const t=window.localStorage.getItem(e);return t?JSON.parse(t):n}catch(t){return console.error(`Error reading localStorage key "${e}":`,t),n}});return he(()=>{try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){console.error(`Error setting localStorage key "${e}":`,n)}},[e,t]),[t,o]}var ao=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const so=(e,n=20)=>e.length<=n?e:e.slice(0,n)+"...",lo=e=>{const n=_n(!1),[t,o]=io("past_conversations",[]),[r,i]=de(null),[a,s]=de(!1),l=ve((e,n,t)=>{o(o=>{const r=[...o];for(;r.length<=e;)r.push([]);const i=r[e];if(i.some(e=>e.id===n))return r;const a={id:n,preview:so(t),lastMessageAt:Date.now()};return r[e]=[...i,a],r})},[o]),c=ve((e,n)=>{o(t=>{const o=[...t];if(e>=o.length)return t;const r=o[e];if(!r)return t;const i=r.findIndex(e=>e.id===n);if(-1===i)return t;const a=[...r];return a[i]=Object.assign(Object.assign({},a[i]),{lastMessageAt:Date.now()}),o[e]=a,o})},[o]),u=ve((e,n)=>{o(t=>{const o=[...t];if(e>=o.length)return t;const r=o[e];return r?(o[e]=r.filter(e=>e.id!==n),o):t})},[o]),d=ve(e=>t[e]||[],[t]),p=ve(e=>{i(e)},[]),h=ve(n=>ao(void 0,void 0,void 0,function*(){s(!0);try{const t=yield((e,n)=>qn(void 0,void 0,void 0,function*(){const t=`${jn}/api/conversation`,o=yield fetch(t,zn({conversationId:e},n));if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return(yield o.json()).messages}))(n,e),o=(e=>e.map(e=>({text:e.content,sender:"user"===e.role?"user":"bot",isComplete:!0,messageId:e.trace_id})))(t);return i(n),o}finally{s(!1)}}),[]);return{opened:n,pastConversations:t,addConversation:l,updateConversation:c,removeConversation:u,getConversationsForAgent:d,selectedConversationId:r,selectConversation:p,loadConversation:h,isLoadingConversation:a}};var co=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const uo=({children:e,config:n})=>{const[t,o]=de("chat");he(()=>{const e=e=>{const{entrySource:n}=e.detail||{};console.log("open intercept",n),o(n)};return document.addEventListener("chatbot-open",e),()=>document.removeEventListener("chatbot-open",e)},[]);const[r,i]=de(n.defaultLanguage),[a,s]=_n(!1),l=me(()=>ct(r),[r]);he(()=>{s.close()},[r,s.close]);const c=me(()=>{const e=new Set([n.defaultLanguage]);if(null===n.languages)return e;const t=n.languages.split(",").map(e=>e.trim());for(const n of t)e.add(n);return e},[n.defaultLanguage,n.languages]),u=n.agentId?parseInt(n.agentId):null,d=ro(isNaN(u)?null:u);he(()=>{co(void 0,void 0,void 0,function*(){if(u&&!isNaN(u)&&!d.sessionState.sessionToken&&!d.sessionState.isEstablishing&&!0!==d.sessionState.isLocked&&"locked"===(yield d.establish())){const e=new CustomEvent("chatbot-ready",{bubbles:!0,detail:{agentId:n.agentId,locked:!0}});document.dispatchEvent(e),console.log("🔒 Chatbot ready event dispatched (locked agent - login required)")}})},[u,d.sessionState.sessionToken,d.sessionState.isEstablishing,d.sessionState.isLocked]);const p=Rt(n,l,d.sessionState.sessionToken),h=ve((e,n)=>co(void 0,void 0,void 0,function*(){console.log("Login succeeded, establishing session with credentials"),yield d.establishWithHashedCredentials({email:e,passwordHash:n})}),[d.establishWithHashedCredentials]),f=function(e=!1,n){const[t,o]=de({isAuthenticated:!1,email:null}),r=e&&!t.isAuthenticated;return{authState:t,login:ve((e,t)=>no(this,void 0,void 0,function*(){try{const r=yield to(t);if(!n)return{success:!1,error:"Login callback not configured"};try{yield n(e,r)}catch(e){const n=e instanceof Error?e.message:"Login failed";return console.error("Login failed:",n),{success:!1,error:n}}return o({isAuthenticated:!0,email:e}),{success:!0}}catch(e){return console.error("Login error:",e),{success:!1,error:"Network error"}}}),[n]),register:ve((e,n,t)=>no(this,void 0,void 0,function*(){try{const o=yield to(n),r=yield fetch(`${jn}/api/agent-auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:t,email:e,passwordHash:o})});return r.ok?{success:!0,needsVerification:!0}:{success:!1,error:(yield r.json()).error||"Registration failed"}}catch(e){return console.error("Registration error:",e),{success:!1,error:"Network error"}}}),[]),logout:ve(()=>{o({isAuthenticated:!1,email:null})},[]),needsAuth:r}}(p.finalConfig.locked_behind_login,h),g=p.finalConfig.dark_mode,[b,m]=de(()=>!("undefined"==typeof window||!g)&&window.matchMedia("(prefers-color-scheme: dark)").matches),v=ve(()=>{g&&m(e=>!e)},[g]);he(()=>{if(!g)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),n=e=>{m(e.matches)};return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[g]),he(()=>{if(!g){const e=new CustomEvent("chatbot-dark-mode-change",{detail:{isDarkMode:!1},bubbles:!0});return void document.dispatchEvent(e)}const e=new CustomEvent("chatbot-dark-mode-change",{detail:{isDarkMode:b},bubbles:!0});document.dispatchEvent(e)},[b,g]);const y={disableParentPageScrolling:ve(()=>{try{const e=window.parent.document,n=e.body,t=e.documentElement;if(n.hasAttribute("data-chatbot-scroll-y"))return void console.log("🔒 Scroll blocking already active, skipping");const o=window.parent.pageYOffset||e.documentElement.scrollTop;n.style.overflow&&n.setAttribute("data-chatbot-original-body-overflow",n.style.overflow),n.style.position&&n.setAttribute("data-chatbot-original-body-position",n.style.position),n.style.top&&n.setAttribute("data-chatbot-original-body-top",n.style.top),n.style.width&&n.setAttribute("data-chatbot-original-body-width",n.style.width),t.style.overflow&&t.setAttribute("data-chatbot-original-html-overflow",t.style.overflow),n.setAttribute("data-chatbot-scroll-y",o.toString()),n.style.overflow="hidden",n.style.position="fixed",n.style.top=`-${o}px`,n.style.width="100%",t.style.overflow="hidden"}catch(e){console.warn("Could not disable parent page scrolling:",e)}},[]),enableParentPageScrolling:ve(()=>{try{const e=window.parent.document,n=e.body,t=e.documentElement,o=n.getAttribute("data-chatbot-original-body-overflow"),r=n.getAttribute("data-chatbot-original-body-position"),i=n.getAttribute("data-chatbot-original-body-top"),a=n.getAttribute("data-chatbot-original-body-width"),s=t.getAttribute("data-chatbot-original-html-overflow"),l=parseInt(n.getAttribute("data-chatbot-scroll-y")||"0");n.style.overflow=o||"",n.style.position=r||"",n.style.top=i||"",n.style.width=a||"",t.style.overflow=s||"",n.removeAttribute("data-chatbot-original-body-overflow"),n.removeAttribute("data-chatbot-original-body-position"),n.removeAttribute("data-chatbot-original-body-top"),n.removeAttribute("data-chatbot-original-body-width"),t.removeAttribute("data-chatbot-original-html-overflow"),n.removeAttribute("data-chatbot-scroll-y"),window.parent.scrollTo(0,l)}catch(e){console.warn("Could not restore parent page scrolling:",e)}},[]),setParentPageBackgroundColor:ve(()=>{try{const e=window.parent.document,n=e.body;if(n.hasAttribute("data-chatbot-original-bg-color"))return void console.log("🎨 Background color already set, skipping");const t=window.getComputedStyle(n).backgroundColor;t&&"rgba(0, 0, 0, 0)"!==t&&"transparent"!==t&&n.setAttribute("data-chatbot-original-bg-color",t);try{const t=e.querySelector("aigelb-chatbot");if(t&&t.shadowRoot){const e=window.getComputedStyle(t.shadowRoot.host).getPropertyValue("--surface-bg").trim();e?(n.style.backgroundColor=e,console.log("🎨 Parent page background set to surface-bg:",e)):console.warn("Could not find --surface-bg CSS variable in widget theme")}else console.warn("Could not access chatbot widget or its shadow root")}catch(e){console.warn("Could not access widget theme configuration:",e)}}catch(e){console.warn("Could not set parent page background color:",e)}},[]),restoreParentPageBackgroundColor:ve(()=>{try{const e=window.parent.document.body,n=e.getAttribute("data-chatbot-original-bg-color");n?(e.style.backgroundColor=n,e.removeAttribute("data-chatbot-original-bg-color")):e.style.backgroundColor=""}catch(e){console.warn("Could not restore parent page background color:",e)}},[])},[x,w]=de(!1),[k,_]=de(!1),[C,S]=de(!1),[E,I]=de(!1),[T,L]=de(!1),[A,F]=de("initial"),[N,M]=de(!1),P=ve(()=>{y.disableParentPageScrolling(),y.setParentPageBackgroundColor(),w(!0),o("chat")},[y]),D=eo(l,a,r,p.finalConfig,t,M,d.sessionState.sessionToken);he(()=>{const e=e=>{const{message:n}=e.detail||{};n&&"string"==typeof n?(x||(y.disableParentPageScrolling(),y.setParentPageBackgroundColor(),w(!0),o("chat")),setTimeout(()=>{D.sendMessageWithUI(n)},100)):console.warn("chatbot-send-message: Invalid or missing message")};return document.addEventListener("chatbot-send-message",e),()=>document.removeEventListener("chatbot-send-message",e)},[x,y,D.sendMessageWithUI]);const O=ve(()=>{_(!1),S(!1),y.enableParentPageScrolling(),y.restoreParentPageBackgroundColor(),F("initial"),w(!1)},[y]);he(()=>{if(x){const e=setTimeout(()=>{I(!0)},300);return()=>clearTimeout(e)}I(!1)},[x]),he(()=>{if(x){const e=document.querySelector(".chat-overlay button, .chat-overlay textarea");null!==e&&setTimeout(()=>e.focus(),100),I(!1),setTimeout(()=>I(!0),300)}else I(!1)},[x]);const z=lo(d.sessionState.sessionToken);he(()=>{if(D.isConversationActive&&n.agentId&&D.conversationId){const e=parseInt(n.agentId,10);if(!isNaN(e)){const n=D.messages.find(e=>"user"===e.sender),t=(null==n?void 0:n.text)||"";z.addConversation(e,D.conversationId,t)}}},[D.isConversationActive,D.conversationId,D.messages,n.agentId,z.addConversation]);const R={configData:p,recording:Object.assign({},Bt(l,d.sessionState.sessionToken)),parentPageControl:y,auth:f,session:d,agentLibrary:z,entrySource:t,setEntrySource:o,availableLanguages:c,currentLanguage:r,setCurrentLanguage:i,t:l,easyLanguageActive:a,easyLanguageCtrl:s,autoLanguage:p.finalConfig.auto_language,isDarkMode:b,setIsDarkMode:m,toggleDarkMode:v,isOpen:x,setIsOpen:w,functionsExpanded:k,setFunctionsExpanded:_,aboutAiExpanded:C,setAboutAiExpanded:S,accordionAnimated:E,setAccordionAnimated:I,isScrolled:T,setIsScrolled:L,inputAnimationState:A,setInputAnimationState:F,isTextareaExpanded:N,setIsTextareaExpanded:M,conversation:D,openChat:P,closeChat:O};return kn(wt.Provider,{value:R,children:e})},po=()=>{const e=ye(wt);if(void 0===e)throw new Error("useChatbotApp must be used within a ChatbotAppProvider");return e},ho=()=>{const{recording:{audioStream:e,isRecording:n}}=po(),t=ge(null),o=ge(null),r=ge(null),i=ge(null);he(()=>{const e=()=>{if(t.current){const e=t.current.parentElement;e&&(t.current.width=e.clientWidth,t.current.height=60)}};e();const n=setTimeout(e,100);return window.addEventListener("resize",e),()=>{clearTimeout(n),window.removeEventListener("resize",e)}},[n]),he(()=>(e&&n?(a(),s()):l(),()=>{l()}),[e,n]);const a=()=>{if(null!==e)try{const n=new(window.AudioContext||window.webkitAudioContext),t=n.createAnalyser(),o=n.createMediaStreamSource(e);t.fftSize=256,o.connect(t),r.current=t,i.current=new Uint8Array(t.frequencyBinCount)}catch(e){console.error("Error setting up audio analyzer:",e)}else console.error("audiostream null")},s=()=>{if(!t.current||!r.current)return;const e=t.current,a=e.getContext("2d"),s=r.current,l=s.frequencyBinCount,c=i.current;if(null===c)return;const u=[];let d=0;const p=()=>{if(!n)return;o.current=requestAnimationFrame(p),s.getByteFrequencyData(c);const t=e.width,r=(e=>{const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null})("#FFFFFF")||{r:74,g:144,b:226};let i=0,h=0;const f=Math.floor(.4*l),g=Math.floor(.2*l);for(let e=0;e<f;e++)i+=c[e],e>=g&&(h+=1.5*c[e]);let b=.6*(i/f/255)+.4*(h/(f-g)/255);b=Math.pow(2.5*b,1.2);const m=.1*Math.sin(.003*Date.now()),v=.05*Math.sin(.02*Date.now()),y=e.height/2,x=y+(b-.05)*(.45*e.height)*(Math.sin(.008*Date.now()+10*b)*b+Math.sin(.015*Date.now()+5*b)*b*.5+m+v+.1*(Math.random()-.5)*b);for(u.push({x:d,y:Math.max(5,Math.min(e.height-5,x))});u.length>t;)u.shift();if(a.clearRect(0,0,e.width,e.height),a.strokeStyle=`rgba(${r.r}, ${r.g}, ${r.b}, 0.15)`,a.lineWidth=1,a.setLineDash([3,6]),a.beginPath(),a.moveTo(0,y),a.lineTo(e.width,y),a.stroke(),a.setLineDash([]),u.length>1){const n=a.createLinearGradient(0,0,e.width,0);n.addColorStop(0,`rgba(${r.r}, ${r.g}, ${r.b}, 0.2)`),n.addColorStop(.6,`rgba(${r.r}, ${r.g}, ${r.b}, 0.7)`),n.addColorStop(1,`rgba(${r.r}, ${r.g}, ${r.b}, 1)`),a.strokeStyle=n,a.lineWidth=3,a.lineCap="round",a.lineJoin="round",a.beginPath();for(let n=0;n<u.length;n++){const t=u[n],o=t.x-(d-e.width);o>=-10&&o<=e.width+10&&(0===n||n>0&&u[n-1].x-(d-e.width)<-10?a.moveTo(o,t.y):a.lineTo(o,t.y))}if(a.stroke(),b>.08){a.shadowColor=`rgba(${r.r}, ${r.g}, ${r.b}, 0.5)`,a.shadowBlur=8,a.strokeStyle=`rgba(${r.r}, ${r.g}, ${r.b}, 0.7)`,a.lineWidth=2,a.beginPath();const n=u.slice(-30);for(let t=0;t<n.length;t++){const o=n[t],r=o.x-(d-e.width);r>=-10&&r<=e.width+10&&(0===t?a.moveTo(r,o.y):a.lineTo(r,o.y))}a.stroke(),a.shadowBlur=0}}const w=e.width-30;a.fillStyle=`rgba(${r.r}, ${r.g}, ${r.b}, 0.9)`,a.beginPath(),a.arc(w,y,4,0,2*Math.PI),a.fill();const k=2+1*Math.sin(.008*Date.now());if(a.fillStyle=`rgba(${r.r}, ${r.g}, ${r.b}, 0.3)`,a.beginPath(),a.arc(w,y,k+4,0,2*Math.PI),a.fill(),d+=3,d>2*e.width)for(u.forEach(n=>{n.x-=e.width}),d-=e.width;u.length>0&&u[0].x<d-e.width-50;)u.shift()};p()},l=()=>{o.current&&(cancelAnimationFrame(o.current),o.current=null)};return kn("div",{className:"voice-visualizer",style:{width:"100%",margin:0,padding:0},children:kn("canvas",{ref:t,height:60,style:{width:"100%",height:"50px",display:"block"}})})},fo=({})=>{const{recording:{isRecording:e,isProcessing:n,handleRecordingCancel:t,handleRecordingConfirm:o},t:r}=po();return e?kn("div",{className:"recording-overlay",children:kn("div",{className:"recording-overlay-content",children:[kn("div",{className:"recording-status",children:[kn("div",{className:"recording-pulse"}),kn("span",{children:n?r.stt.processing:r.stt.recording})]}),kn("div",{className:"recording-visualizer-wrapper",children:[!n&&kn(ho,{}),n&&kn("div",{className:"processing-indicator",children:kn("div",{className:"processing-text",children:r.stt.processingAudio})})]}),kn("div",{className:"recording-overlay-controls",children:[kn("button",{type:"button",className:"recording-overlay-button recording-overlay-button--cancel",onClick:t,"aria-label":r.stt.cancelRecording,disabled:n,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" ><path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg>'})}),kn("button",{type:"button",className:"recording-overlay-button recording-overlay-button--confirm "+(n?"recording-overlay-button--processing":""),onClick:o,"aria-label":n?r.stt.processing:r.stt.confirmRecording,disabled:n,children:kn(Sn,n?{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" style="animation: spin 1.5s linear infinite" ><path d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg>'}:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" ><path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg>'})})]})]})}):null},go=({onOpen:e,openerHeadline:n,openerSubtitle:t,snippetIcon:o,position:r="bottom-right",autoDismissMs:i,persistDismiss:a})=>{const{isOpen:s}=po(),[l,c]=(e=>{const[n,t]=de(!1),[o,r]=io("aigelb-opener-dismissed",!1);return e?[o,r]:[n,t]})(a),u=ve(e=>{e.stopPropagation(),c(!0)},[]),d=ve(n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),e())},[e]),p=ve(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),u(e))},[]),h=!l&&!s&&(n||t);return he(()=>{if(!h||i<1)return;const e=setTimeout(()=>c(!0),i);return()=>clearTimeout(e)},[h,i]),s?null:kn("div",{className:"chatbot-container "+("bottom-left"===r?"position-bottom-left":""),children:kn("div",{className:"chat-opener-container",children:[h&&kn("div",{className:"chat-opener-tooltip",onClick:e,children:[kn("div",{className:"tooltip-content",children:[kn("div",{className:"tooltip-text-container",children:[n&&kn("span",{className:"tooltip-headline",children:n}),t&&kn("span",{className:"tooltip-subtitle",children:t})]}),kn("button",{className:"tooltip-close",onClick:u,onKeyDown:p,"aria-label":"Tooltip schließen",type:"button",children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="currentColor" ><path d="M11.0306 9.96936C11.1715 10.1103 11.2506 10.3014 11.2506 10.5006C11.2506 10.6999 11.1715 10.891 11.0306 11.0319C10.8897 11.1728 10.6986 11.2519 10.4993 11.2519C10.3001 11.2519 10.109 11.1728 9.9681 11.0319L5.99997 7.06249L2.0306 11.0306C1.8897 11.1715 1.69861 11.2507 1.49935 11.2507C1.30009 11.2507 1.10899 11.1715 0.968098 11.0306C0.827202 10.8897 0.748047 10.6986 0.748047 10.4994C0.748047 10.3001 0.827202 10.109 0.968098 9.96811L4.93747 5.99999L0.969348 2.03061C0.828451 1.88972 0.749297 1.69862 0.749297 1.49936C0.749297 1.30011 0.828451 1.10901 0.969348 0.968112C1.11024 0.827216 1.30134 0.748061 1.5006 0.748061C1.69986 0.748061 1.89095 0.827216 2.03185 0.968112L5.99997 4.93749L9.96935 0.967487C10.1102 0.826591 10.3013 0.747437 10.5006 0.747437C10.6999 0.747437 10.8909 0.826591 11.0318 0.967487C11.1727 1.10838 11.2519 1.29948 11.2519 1.49874C11.2519 1.69799 11.1727 1.88909 11.0318 2.02999L7.06247 5.99999L11.0306 9.96936Z" /></svg>'})})]}),kn("div",{className:"tooltip-arrow"})]}),kn("button",{className:"chat-opener-button",onClick:e,onKeyDown:d,"aria-label":n||t?`${n||""}${n&&t?". ":""}${t||""}. Klicken Sie, um den Chat zu öffnen.`:"Klicken Sie, um den Chat zu öffnen.",type:"button",children:o?kn("img",{src:`${Rn}/assets/${o}`,alt:`Chatbot Icon - ${n}`,style:{width:"44px",height:"44px",objectFit:"contain"},role:"img","aria-label":"Chatbot Icon"}):kn(Sn,{svg:Tn,style:{width:"44px",height:"44px"}})})]})})},bo=()=>{const{configData:{finalConfig:e},isOpen:n}=po();return null===e.disclaimer||""===e.disclaimer.trim()?null:kn("div",{className:"disclaimer-text",style:{marginTop:"8px",textAlign:"center",animation:n?"disclaimerFadeIn 1s ease-out 1.5s both":"none"},dangerouslySetInnerHTML:{__html:e.disclaimer}})};function mo(){}function vo(){}const yo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wo={};function ko(e,n){return((n||wo).jsx?xo:yo).test(e)}const _o=/[ \t\n\f\r]/g;function Co(e){return""===e.replace(_o,"")}class So{constructor(e,n,t){this.normal=n,this.property=e,t&&(this.space=t)}}function Eo(e,n){const t={},o={};for(const n of e)Object.assign(t,n.property),Object.assign(o,n.normal);return new So(t,o,n)}function Io(e){return e.toLowerCase()}So.prototype.normal={},So.prototype.property={},So.prototype.space=void 0;class To{constructor(e,n){this.attribute=n,this.property=e}}To.prototype.attribute="",To.prototype.booleanish=!1,To.prototype.boolean=!1,To.prototype.commaOrSpaceSeparated=!1,To.prototype.commaSeparated=!1,To.prototype.defined=!1,To.prototype.mustUseProperty=!1,To.prototype.number=!1,To.prototype.overloadedBoolean=!1,To.prototype.property="",To.prototype.spaceSeparated=!1,To.prototype.space=void 0;let Lo=0;const Ao=zo(),Fo=zo(),No=zo(),Mo=zo(),Po=zo(),Do=zo(),Oo=zo();function zo(){return 2**++Lo}const Ro=Object.keys(o);class jo extends To{constructor(e,n,t,r){let i=-1;if(super(e,n),Bo(this,"space",r),"number"==typeof t)for(;++i<Ro.length;){const e=Ro[i];Bo(this,Ro[i],(t&o[e])===o[e])}}}function Bo(e,n,t){t&&(e[n]=t)}function Ho(e){const n={},t={};for(const[o,r]of Object.entries(e.properties)){const i=new jo(o,e.transform(e.attributes||{},o),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(i.mustUseProperty=!0),n[o]=i,t[Io(o)]=o,t[Io(i.attribute)]=o}return new So(n,t,e.space)}jo.prototype.defined=!0;const $o=Ho({properties:{ariaActiveDescendant:null,ariaAtomic:Fo,ariaAutoComplete:null,ariaBusy:Fo,ariaChecked:Fo,ariaColCount:Mo,ariaColIndex:Mo,ariaColSpan:Mo,ariaControls:Po,ariaCurrent:null,ariaDescribedBy:Po,ariaDetails:null,ariaDisabled:Fo,ariaDropEffect:Po,ariaErrorMessage:null,ariaExpanded:Fo,ariaFlowTo:Po,ariaGrabbed:Fo,ariaHasPopup:null,ariaHidden:Fo,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Po,ariaLevel:Mo,ariaLive:null,ariaModal:Fo,ariaMultiLine:Fo,ariaMultiSelectable:Fo,ariaOrientation:null,ariaOwns:Po,ariaPlaceholder:null,ariaPosInSet:Mo,ariaPressed:Fo,ariaReadOnly:Fo,ariaRelevant:null,ariaRequired:Fo,ariaRoleDescription:Po,ariaRowCount:Mo,ariaRowIndex:Mo,ariaRowSpan:Mo,ariaSelected:Fo,ariaSetSize:Mo,ariaSort:null,ariaValueMax:Mo,ariaValueMin:Mo,ariaValueNow:Mo,ariaValueText:null,role:null},transform:(e,n)=>"role"===n?n:"aria-"+n.slice(4).toLowerCase()});function Uo(e,n){return n in e?e[n]:n}function Yo(e,n){return Uo(e,n.toLowerCase())}const Vo=Ho({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Do,acceptCharset:Po,accessKey:Po,action:null,allow:null,allowFullScreen:Ao,allowPaymentRequest:Ao,allowUserMedia:Ao,alt:null,as:null,async:Ao,autoCapitalize:null,autoComplete:Po,autoFocus:Ao,autoPlay:Ao,blocking:Po,capture:null,charSet:null,checked:Ao,cite:null,className:Po,cols:Mo,colSpan:null,content:null,contentEditable:Fo,controls:Ao,controlsList:Po,coords:Mo|Do,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ao,defer:Ao,dir:null,dirName:null,disabled:Ao,download:No,draggable:Fo,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ao,formTarget:null,headers:Po,height:Mo,hidden:No,high:Mo,href:null,hrefLang:null,htmlFor:Po,httpEquiv:Po,id:null,imageSizes:null,imageSrcSet:null,inert:Ao,inputMode:null,integrity:null,is:null,isMap:Ao,itemId:null,itemProp:Po,itemRef:Po,itemScope:Ao,itemType:Po,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ao,low:Mo,manifest:null,max:null,maxLength:Mo,media:null,method:null,min:null,minLength:Mo,multiple:Ao,muted:Ao,name:null,nonce:null,noModule:Ao,noValidate:Ao,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ao,optimum:Mo,pattern:null,ping:Po,placeholder:null,playsInline:Ao,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ao,referrerPolicy:null,rel:Po,required:Ao,reversed:Ao,rows:Mo,rowSpan:Mo,sandbox:Po,scope:null,scoped:Ao,seamless:Ao,selected:Ao,shadowRootClonable:Ao,shadowRootDelegatesFocus:Ao,shadowRootMode:null,shape:null,size:Mo,sizes:null,slot:null,span:Mo,spellCheck:Fo,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Mo,step:null,style:null,tabIndex:Mo,target:null,title:null,translate:null,type:null,typeMustMatch:Ao,useMap:null,value:Fo,width:Mo,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Po,axis:null,background:null,bgColor:null,border:Mo,borderColor:null,bottomMargin:Mo,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ao,declare:Ao,event:null,face:null,frame:null,frameBorder:null,hSpace:Mo,leftMargin:Mo,link:null,longDesc:null,lowSrc:null,marginHeight:Mo,marginWidth:Mo,noResize:Ao,noHref:Ao,noShade:Ao,noWrap:Ao,object:null,profile:null,prompt:null,rev:null,rightMargin:Mo,rules:null,scheme:null,scrolling:Fo,standby:null,summary:null,text:null,topMargin:Mo,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Mo,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ao,disableRemotePlayback:Ao,prefix:null,property:null,results:Mo,security:null,unselectable:null},space:"html",transform:Yo}),qo=Ho({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Oo,accentHeight:Mo,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Mo,amplitude:Mo,arabicForm:null,ascent:Mo,attributeName:null,attributeType:null,azimuth:Mo,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Mo,by:null,calcMode:null,capHeight:Mo,className:Po,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Mo,diffuseConstant:Mo,direction:null,display:null,dur:null,divisor:Mo,dominantBaseline:null,download:Ao,dx:null,dy:null,edgeMode:null,editable:null,elevation:Mo,enableBackground:null,end:null,event:null,exponent:Mo,externalResourcesRequired:null,fill:null,fillOpacity:Mo,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Do,g2:Do,glyphName:Do,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Mo,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Mo,horizOriginX:Mo,horizOriginY:Mo,id:null,ideographic:Mo,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Mo,k:Mo,k1:Mo,k2:Mo,k3:Mo,k4:Mo,kernelMatrix:Oo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Mo,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Mo,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Mo,overlineThickness:Mo,paintOrder:null,panose1:null,path:null,pathLength:Mo,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Po,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Mo,pointsAtY:Mo,pointsAtZ:Mo,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Oo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Oo,rev:Oo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Oo,requiredFeatures:Oo,requiredFonts:Oo,requiredFormats:Oo,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Mo,specularExponent:Mo,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Mo,strikethroughThickness:Mo,string:null,stroke:null,strokeDashArray:Oo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Mo,strokeOpacity:Mo,strokeWidth:null,style:null,surfaceScale:Mo,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Oo,tabIndex:Mo,tableValues:null,target:null,targetX:Mo,targetY:Mo,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Oo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Mo,underlineThickness:Mo,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Mo,values:null,vAlphabetic:Mo,vMathematical:Mo,vectorEffect:null,vHanging:Mo,vIdeographic:Mo,version:null,vertAdvY:Mo,vertOriginX:Mo,vertOriginY:Mo,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Mo,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Uo}),Wo=Ho({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,n)=>"xlink:"+n.slice(5).toLowerCase()}),Zo=Ho({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Yo}),Go=Ho({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,n)=>"xml:"+n.slice(3).toLowerCase()}),Ko={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Xo=/[A-Z]/g,Qo=/-[a-z]/g,Jo=/^data[-\w.:]+$/i;function er(e){return"-"+e.toLowerCase()}function nr(e){return e.charAt(1).toUpperCase()}const tr=Eo([$o,Vo,Wo,Zo,Go],"html"),or=Eo([$o,qo,Wo,Zo,Go],"svg");var rr=t(229);const ir=sr("end"),ar=sr("start");function sr(e){return function(n){const t=n&&n.position&&n.position[e]||{};if("number"==typeof t.line&&t.line>0&&"number"==typeof t.column&&t.column>0)return{line:t.line,column:t.column,offset:"number"==typeof t.offset&&t.offset>-1?t.offset:void 0}}}function lr(e){return e&&"object"==typeof e?"position"in e||"type"in e?ur(e.position):"start"in e||"end"in e?ur(e):"line"in e||"column"in e?cr(e):"":""}function cr(e){return dr(e&&e.line)+":"+dr(e&&e.column)}function ur(e){return cr(e&&e.start)+"-"+cr(e&&e.end)}function dr(e){return e&&"number"==typeof e?e:1}class pr extends Error{constructor(e,n,t){super(),"string"==typeof n&&(t=n,n=void 0);let o="",r={},i=!1;if(n&&(r="line"in n&&"column"in n||"start"in n&&"end"in n?{place:n}:"type"in n?{ancestors:[n],place:n.position}:{...n}),"string"==typeof e?o=e:!r.cause&&e&&(i=!0,o=e.message,r.cause=e),!r.ruleId&&!r.source&&"string"==typeof t){const e=t.indexOf(":");-1===e?r.ruleId=t:(r.source=t.slice(0,e),r.ruleId=t.slice(e+1))}if(!r.place&&r.ancestors&&r.ancestors){const e=r.ancestors[r.ancestors.length-1];e&&(r.place=e.position)}const a=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=lr(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=i&&r.cause&&"string"==typeof r.cause.stack?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}pr.prototype.file="",pr.prototype.name="",pr.prototype.reason="",pr.prototype.message="",pr.prototype.stack="",pr.prototype.column=void 0,pr.prototype.line=void 0,pr.prototype.ancestors=void 0,pr.prototype.cause=void 0,pr.prototype.fatal=void 0,pr.prototype.place=void 0,pr.prototype.ruleId=void 0,pr.prototype.source=void 0;const hr={}.hasOwnProperty,fr=new Map,gr=/[A-Z]/g,br=new Set(["table","tbody","thead","tfoot","tr"]),mr=new Set(["td","th"]),vr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yr(e,n){if(!n||void 0===n.Fragment)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let o;if(n.development){if("function"!=typeof n.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=function(e,n){return t;function t(t,o,r,i){const a=Array.isArray(r.children),s=ar(t);return n(o,r,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(t,n.jsxDEV)}else{if("function"!=typeof n.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof n.jsxs)throw new TypeError("Expected `jsxs` in production options");o=function(e,n,t){return o;function o(e,o,r,i){const a=Array.isArray(r.children)?t:n;return i?a(o,r,i):a(o,r)}}(0,n.jsx,n.jsxs)}const r={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:o,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:!1!==n.passKeys,passNode:n.passNode||!1,schema:"svg"===n.space?or:tr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==n.tableCellAlignToStyle},i=xr(r,e,void 0);return i&&"string"!=typeof i?i:r.create(e,r.Fragment,{children:i||void 0},void 0)}function xr(e,n,t){return"element"===n.type?function(e,n,t){const o=e.schema;let r=o;"svg"===n.tagName.toLowerCase()&&"html"===o.space&&(r=or,e.schema=r);e.ancestors.push(n);const i=Sr(e,n.tagName,!1),a=function(e,n){const t={};let o,r;for(r in n.properties)if("children"!==r&&hr.call(n.properties,r)){const i=Cr(e,r,n.properties[r]);if(i){const[r,a]=i;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof a&&mr.has(n.tagName)?o=a:t[r]=a}}if(o){(t.style||(t.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=o}return t}(e,n);let s=_r(e,n);br.has(n.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(n=e)?"text"===n.type&&Co(n.value):Co(n));var n}));return wr(e,a,i,n),kr(a,s),e.ancestors.pop(),e.schema=o,e.create(n,i,a,t)}(e,n,t):"mdxFlowExpression"===n.type||"mdxTextExpression"===n.type?function(e,n){if(n.data&&n.data.estree&&e.evaluater){const t=n.data.estree.body[0];return t.type,e.evaluater.evaluateExpression(t.expression)}Er(e,n.position)}(e,n):"mdxJsxFlowElement"===n.type||"mdxJsxTextElement"===n.type?function(e,n,t){const o=e.schema;let r=o;"svg"===n.name&&"html"===o.space&&(r=or,e.schema=r);e.ancestors.push(n);const i=null===n.name?e.Fragment:Sr(e,n.name,!0),a=function(e,n){const t={};for(const o of n.attributes)if("mdxJsxExpressionAttribute"===o.type)if(o.data&&o.data.estree&&e.evaluater){const n=o.data.estree.body[0];mo(n.type);const r=n.expression;mo(r.type);const i=r.properties[0];mo(i.type),Object.assign(t,e.evaluater.evaluateExpression(i.argument))}else Er(e,n.position);else{const r=o.name;let i;if(o.value&&"object"==typeof o.value)if(o.value.data&&o.value.data.estree&&e.evaluater){const n=o.value.data.estree.body[0];mo(n.type),i=e.evaluater.evaluateExpression(n.expression)}else Er(e,n.position);else i=null===o.value||o.value;t[r]=i}return t}(e,n),s=_r(e,n);return wr(e,a,i,n),kr(a,s),e.ancestors.pop(),e.schema=o,e.create(n,i,a,t)}(e,n,t):"mdxjsEsm"===n.type?function(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Er(e,n.position)}(e,n):"root"===n.type?function(e,n,t){const o={};return kr(o,_r(e,n)),e.create(n,e.Fragment,o,t)}(e,n,t):"text"===n.type?function(e,n){return n.value}(0,n):void 0}function wr(e,n,t,o){"string"!=typeof t&&t!==e.Fragment&&e.passNode&&(n.node=o)}function kr(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function _r(e,n){const t=[];let o=-1;const r=e.passKeys?new Map:fr;for(;++o<n.children.length;){const i=n.children[o];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const n=r.get(e)||0;a=e+"-"+n,r.set(e,n+1)}}const s=xr(e,i,a);void 0!==s&&t.push(s)}return t}function Cr(e,n,t){const o=function(e,n){const t=Io(n);let o=n,r=To;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&"data"===t.slice(0,4)&&Jo.test(n)){if("-"===n.charAt(4)){const e=n.slice(5).replace(Qo,nr);o="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=n.slice(4);if(!Qo.test(e)){let t=e.replace(Xo,er);"-"!==t.charAt(0)&&(t="-"+t),n="data"+t}}r=jo}return new r(o,n)}(e.schema,n);if(!(null==t||"number"==typeof t&&Number.isNaN(t))){if(Array.isArray(t)&&(t=o.commaSeparated?function(e,n){const t=n||{};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(t):t.join(" ").trim()),"style"===o.property){let n="object"==typeof t?t:function(e,n){try{return rr(n,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,o=new pr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=vr+"#cannot-parse-style-attribute",o}}(e,String(t));return"css"===e.stylePropertyNameCase&&(n=function(e){const n={};let t;for(t in e)hr.call(e,t)&&(n[Ir(t)]=e[t]);return n}(n)),["style",n]}return["react"===e.elementAttributeNameCase&&o.space?Ko[o.property]||o.property:o.attribute,t]}}function Sr(e,n,t){let o;if(t)if(n.includes(".")){const e=n.split(".");let t,r=-1;for(;++r<e.length;){const n=ko(e[r])?{type:"Identifier",name:e[r]}:{type:"Literal",value:e[r]};t=t?{type:"MemberExpression",object:t,property:n,computed:Boolean(r&&"Literal"===n.type),optional:!1}:n}o=t}else o=ko(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};else o={type:"Literal",value:n};if("Literal"===o.type){const n=o.value;return hr.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);Er(e)}function Er(e,n){const t=new pr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=vr+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Ir(e){let n=e.replace(gr,Tr);return"ms-"===n.slice(0,3)&&(n="-"+n),n}function Tr(e){return"-"+e.toLowerCase()}const Lr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ar={};function Fr(e,n){const t=n||Ar;return Nr(e,"boolean"!=typeof t.includeImageAlt||t.includeImageAlt,"boolean"!=typeof t.includeHtml||t.includeHtml)}function Nr(e,n,t){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||t?e.value:"";if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mr(e.children,n,t)}return Array.isArray(e)?Mr(e,n,t):""}function Mr(e,n,t){const o=[];let r=-1;for(;++r<e.length;)o[r]=Nr(e[r],n,t);return o.join("")}const Pr=document.createElement("i");function Dr(e){const n="&"+e+";";Pr.innerHTML=n;const t=Pr.textContent;return(59!==t.charCodeAt(t.length-1)||"semi"===e)&&(t!==n&&t)}function Or(e,n,t,o){const r=e.length;let i,a=0;if(n=n<0?-n>r?0:r+n:n>r?r:n,t=t>0?t:0,o.length<1e4)i=Array.from(o),i.unshift(n,t),e.splice(...i);else for(t&&e.splice(n,t);a<o.length;)i=o.slice(a,a+1e4),i.unshift(n,0),e.splice(...i),a+=1e4,n+=1e4}function zr(e,n){return e.length>0?(Or(e,e.length,0,n),e):n}const Rr={}.hasOwnProperty;function jr(e){const n={};let t=-1;for(;++t<e.length;)Br(n,e[t]);return n}function Br(e,n){let t;for(t in n){const o=(Rr.call(e,t)?e[t]:void 0)||(e[t]={}),r=n[t];let i;if(r)for(i in r){Rr.call(o,i)||(o[i]=[]);const e=r[i];Hr(o[i],Array.isArray(e)?e:e?[e]:[])}}}function Hr(e,n){let t=-1;const o=[];for(;++t<n.length;)("after"===n[t].add?e:o).push(n[t]);Or(e,0,0,o)}function $r(e,n){const t=Number.parseInt(e,n);return t<9||11===t||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||!(65535&~t)||65534==(65535&t)||t>1114111?"�":String.fromCodePoint(t)}function Ur(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yr=ti(/[A-Za-z]/),Vr=ti(/[\dA-Za-z]/),qr=ti(/[#-'*+\--9=?A-Z^-~]/);function Wr(e){return null!==e&&(e<32||127===e)}const Zr=ti(/\d/),Gr=ti(/[\dA-Fa-f]/),Kr=ti(/[!-/:-@[-`{-~]/);function Xr(e){return null!==e&&e<-2}function Qr(e){return null!==e&&(e<0||32===e)}function Jr(e){return-2===e||-1===e||32===e}const ei=ti(/\p{P}|\p{S}/u),ni=ti(/\s/);function ti(e){return function(n){return null!==n&&n>-1&&e.test(String.fromCharCode(n))}}function oi(e){const n=[];let t=-1,o=0,r=0;for(;++t<e.length;){const i=e.charCodeAt(t);let a="";if(37===i&&Vr(e.charCodeAt(t+1))&&Vr(e.charCodeAt(t+2)))r=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const n=e.charCodeAt(t+1);i<56320&&n>56319&&n<57344?(a=String.fromCharCode(i,n),r=1):a="�"}else a=String.fromCharCode(i);a&&(n.push(e.slice(o,t),encodeURIComponent(a)),o=t+r+1,a=""),r&&(t+=r,r=0)}return n.join("")+e.slice(o)}function ri(e,n,t,o){const r=o?o-1:Number.POSITIVE_INFINITY;let i=0;return function(o){if(Jr(o))return e.enter(t),a(o);return n(o)};function a(o){return Jr(o)&&i++<r?(e.consume(o),a):(e.exit(t),n(o))}}const ii={tokenize:function(e){const n=e.attempt(this.parser.constructs.contentInitial,function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ri(e,n,"linePrefix")},function(n){return e.enter("paragraph"),o(n)});let t;return n;function o(n){const o=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=o),t=o,r(n)}function r(n){return null===n?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(n)):Xr(n)?(e.consume(n),e.exit("chunkText"),o):(e.consume(n),r)}}};const ai={tokenize:function(e){const n=this,t=[];let o,r,i,a=0;return s;function s(o){if(a<t.length){const r=t[a];return n.containerState=r[1],e.attempt(r[0].continuation,l,c)(o)}return c(o)}function l(e){if(a++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&v();const t=n.events.length;let r,i=t;for(;i--;)if("exit"===n.events[i][0]&&"chunkFlow"===n.events[i][1].type){r=n.events[i][1].end;break}m(a);let s=t;for(;s<n.events.length;)n.events[s][1].end={...r},s++;return Or(n.events,i+1,0,n.events.slice(t)),n.events.length=s,c(e)}return s(e)}function c(r){if(a===t.length){if(!o)return p(r);if(o.currentConstruct&&o.currentConstruct.concrete)return f(r);n.interrupt=Boolean(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(si,u,d)(r)}function u(e){return o&&v(),m(a),p(e)}function d(e){return n.parser.lazy[n.now().line]=a!==t.length,i=n.now().offset,f(e)}function p(t){return n.containerState={},e.attempt(si,h,f)(t)}function h(e){return a++,t.push([n.currentConstruct,n.containerState]),p(e)}function f(t){return null===t?(o&&v(),m(0),void e.consume(t)):(o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:r}),g(t))}function g(t){return null===t?(b(e.exit("chunkFlow"),!0),m(0),void e.consume(t)):Xr(t)?(e.consume(t),b(e.exit("chunkFlow")),a=0,n.interrupt=void 0,s):(e.consume(t),g)}function b(e,t){const s=n.sliceStream(e);if(t&&s.push(null),e.previous=r,r&&(r.next=e),r=e,o.defineSkip(e.start),o.write(s),n.parser.lazy[e.start.line]){let e=o.events.length;for(;e--;)if(o.events[e][1].start.offset<i&&(!o.events[e][1].end||o.events[e][1].end.offset>i))return;const t=n.events.length;let r,s,l=t;for(;l--;)if("exit"===n.events[l][0]&&"chunkFlow"===n.events[l][1].type){if(r){s=n.events[l][1].end;break}r=!0}for(m(a),e=t;e<n.events.length;)n.events[e][1].end={...s},e++;Or(n.events,l+1,0,n.events.slice(t)),n.events.length=e}}function m(o){let r=t.length;for(;r-- >o;){const o=t[r];n.containerState=o[1],o[0].exit.call(n,e)}t.length=o}function v(){o.write([null]),r=void 0,o=void 0,n.containerState._closeFlow=void 0}}},si={tokenize:function(e,n,t){return ri(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function li(e){return null===e||Qr(e)||ni(e)?1:ei(e)?2:void 0}function ci(e,n,t){const o=[];let r=-1;for(;++r<e.length;){const i=e[r].resolveAll;i&&!o.includes(i)&&(n=i(n,t),o.push(i))}return n}const ui={name:"attention",resolveAll:function(e,n){let t,o,r,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(t=u;t--;)if("exit"===e[t][0]&&"attentionSequence"===e[t][1].type&&e[t][1]._open&&n.sliceSerialize(e[t][1]).charCodeAt(0)===n.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[t][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[t][1].end.offset-e[t][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[t][1].end.offset-e[t][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[t][1].end},p={...e[u][1].start};di(d,-s),di(p,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[t][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},r={type:s>1?"strongText":"emphasisText",start:{...e[t][1].end},end:{...e[u][1].start}},o={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[t][1].end={...i.start},e[u][1].start={...a.end},l=[],e[t][1].end.offset-e[t][1].start.offset&&(l=zr(l,[["enter",e[t][1],n],["exit",e[t][1],n]])),l=zr(l,[["enter",o,n],["enter",i,n],["exit",i,n],["enter",r,n]]),l=zr(l,ci(n.parser.constructs.insideSpan.null,e.slice(t+1,u),n)),l=zr(l,[["exit",r,n],["enter",a,n],["exit",a,n],["exit",o,n]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=zr(l,[["enter",e[u][1],n],["exit",e[u][1],n]])):c=0,Or(e,t-1,u-t+3,l),u=t+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,n){const t=this.parser.constructs.attentionMarkers.null,o=this.previous,r=li(o);let i;return function(n){return i=n,e.enter("attentionSequence"),a(n)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=li(s),u=!c||2===c&&r||t.includes(s),d=!r||2===r&&c||t.includes(o);return l._open=Boolean(42===i?u:u&&(r||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),n(s)}}};function di(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const pi={name:"autolink",tokenize:function(e,n,t){let o=0;return function(n){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),r};function r(n){return Yr(n)?(e.consume(n),i):64===n?t(n):l(n)}function i(e){return 43===e||45===e||46===e||Vr(e)?(o=1,a(e)):l(e)}function a(n){return 58===n?(e.consume(n),o=0,s):(43===n||45===n||46===n||Vr(n))&&o++<32?(e.consume(n),a):(o=0,l(n))}function s(o){return 62===o?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(o),e.exit("autolinkMarker"),e.exit("autolink"),n):null===o||32===o||60===o||Wr(o)?t(o):(e.consume(o),s)}function l(n){return 64===n?(e.consume(n),c):qr(n)?(e.consume(n),l):t(n)}function c(e){return Vr(e)?u(e):t(e)}function u(t){return 46===t?(e.consume(t),o=0,c):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.exit("autolink"),n):d(t)}function d(n){if((45===n||Vr(n))&&o++<63){const t=45===n?d:u;return e.consume(n),t}return t(n)}}};const hi={partial:!0,tokenize:function(e,n,t){return function(n){return Jr(n)?ri(e,o,"linePrefix")(n):o(n)};function o(e){return null===e||Xr(e)?n(e):t(e)}}};const fi={continuation:{tokenize:function(e,n,t){const o=this;return function(n){if(Jr(n))return ri(e,r,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n);return r(n)};function r(o){return e.attempt(fi,n,t)(o)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,n,t){const o=this;return function(n){if(62===n){const t=o.containerState;return t.open||(e.enter("blockQuote",{_container:!0}),t.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(n),e.exit("blockQuoteMarker"),r}return t(n)};function r(t){return Jr(t)?(e.enter("blockQuotePrefixWhitespace"),e.consume(t),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(t))}}};const gi={name:"characterEscape",tokenize:function(e,n,t){return function(n){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(n),e.exit("escapeMarker"),o};function o(o){return Kr(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}};const bi={name:"characterReference",tokenize:function(e,n,t){const o=this;let r,i,a=0;return function(n){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(n),e.exit("characterReferenceMarker"),s};function s(n){return 35===n?(e.enter("characterReferenceMarkerNumeric"),e.consume(n),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,i=Vr,c(n))}function l(n){return 88===n||120===n?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(n),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=Gr,c):(e.enter("characterReferenceValue"),r=7,i=Zr,c(n))}function c(s){if(59===s&&a){const r=e.exit("characterReferenceValue");return i!==Vr||Dr(o.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),n):t(s)}return i(s)&&a++<r?(e.consume(s),c):t(s)}}};const mi={partial:!0,tokenize:function(e,n,t){const o=this;return function(n){if(null===n)return t(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r};function r(e){return o.parser.lazy[o.now().line]?t(e):n(e)}}},vi={concrete:!0,name:"codeFenced",tokenize:function(e,n,t){const o=this,r={partial:!0,tokenize:function(e,n,t){let r=0;return a;function a(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),l}function l(n){return e.enter("codeFencedFence"),Jr(n)?ri(e,c,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):c(n)}function c(n){return n===i?(e.enter("codeFencedFenceSequence"),u(n)):t(n)}function u(n){return n===i?(r++,e.consume(n),u):r>=s?(e.exit("codeFencedFenceSequence"),Jr(n)?ri(e,d,"whitespace")(n):d(n)):t(n)}function d(o){return null===o||Xr(o)?(e.exit("codeFencedFence"),n(o)):t(o)}}};let i,a=0,s=0;return function(n){return function(n){const t=o.events[o.events.length-1];return a=t&&"linePrefix"===t[1].type?t[2].sliceSerialize(t[1],!0).length:0,i=n,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(n)}(n)};function l(n){return n===i?(s++,e.consume(n),l):s<3?t(n):(e.exit("codeFencedFenceSequence"),Jr(n)?ri(e,c,"whitespace")(n):c(n))}function c(t){return null===t||Xr(t)?(e.exit("codeFencedFence"),o.interrupt?n(t):e.check(mi,h,v)(t)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(t))}function u(n){return null===n||Xr(n)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(n)):Jr(n)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ri(e,d,"whitespace")(n)):96===n&&n===i?t(n):(e.consume(n),u)}function d(n){return null===n||Xr(n)?c(n):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(n))}function p(n){return null===n||Xr(n)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(n)):96===n&&n===i?t(n):(e.consume(n),p)}function h(n){return e.attempt(r,v,f)(n)}function f(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),g}function g(n){return a>0&&Jr(n)?ri(e,b,"linePrefix",a+1)(n):b(n)}function b(n){return null===n||Xr(n)?e.check(mi,h,v)(n):(e.enter("codeFlowValue"),m(n))}function m(n){return null===n||Xr(n)?(e.exit("codeFlowValue"),b(n)):(e.consume(n),m)}function v(t){return e.exit("codeFenced"),n(t)}}};const yi={name:"codeIndented",tokenize:function(e,n,t){const o=this;return function(n){return e.enter("codeIndented"),ri(e,r,"linePrefix",5)(n)};function r(e){const n=o.events[o.events.length-1];return n&&"linePrefix"===n[1].type&&n[2].sliceSerialize(n[1],!0).length>=4?i(e):t(e)}function i(n){return null===n?s(n):Xr(n)?e.attempt(xi,i,s)(n):(e.enter("codeFlowValue"),a(n))}function a(n){return null===n||Xr(n)?(e.exit("codeFlowValue"),i(n)):(e.consume(n),a)}function s(t){return e.exit("codeIndented"),n(t)}}},xi={partial:!0,tokenize:function(e,n,t){const o=this;return r;function r(n){return o.parser.lazy[o.now().line]?t(n):Xr(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r):ri(e,i,"linePrefix",5)(n)}function i(e){const i=o.events[o.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?n(e):Xr(e)?r(e):t(e)}}};const wi={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let n,t,o=e.length-4,r=3;if(!("lineEnding"!==e[r][1].type&&"space"!==e[r][1].type||"lineEnding"!==e[o][1].type&&"space"!==e[o][1].type))for(n=r;++n<o;)if("codeTextData"===e[n][1].type){e[r][1].type="codeTextPadding",e[o][1].type="codeTextPadding",r+=2,o-=2;break}n=r-1,o++;for(;++n<=o;)void 0===t?n!==o&&"lineEnding"!==e[n][1].type&&(t=n):n!==o&&"lineEnding"!==e[n][1].type||(e[t][1].type="codeTextData",n!==t+2&&(e[t][1].end=e[n-1][1].end,e.splice(t+2,n-t-2),o-=n-t-2,n=t+2),t=void 0);return e},tokenize:function(e,n,t){let o,r,i=0;return function(n){return e.enter("codeText"),e.enter("codeTextSequence"),a(n)};function a(n){return 96===n?(e.consume(n),i++,a):(e.exit("codeTextSequence"),s(n))}function s(n){return null===n?t(n):32===n?(e.enter("space"),e.consume(n),e.exit("space"),s):96===n?(r=e.enter("codeTextSequence"),o=0,c(n)):Xr(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(n))}function l(n){return null===n||32===n||96===n||Xr(n)?(e.exit("codeTextData"),s(n)):(e.consume(n),l)}function c(t){return 96===t?(e.consume(t),o++,c):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(t)):(r.type="codeTextData",l(t))}}};class ki{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const t=null==n?Number.POSITIVE_INFINITY:n;return t<this.left.length?this.left.slice(e,t):e>this.left.length?this.right.slice(this.right.length-t+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-t+this.left.length).reverse())}splice(e,n,t){const o=n||0;this.setCursor(Math.trunc(e));const r=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return t&&_i(this.left,t),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),_i(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),_i(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);_i(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);_i(this.left,n.reverse())}}}function _i(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Ci(e){const n={};let t,o,r,i,a,s,l,c=-1;const u=new ki(e);for(;++c<u.length;){for(;c in n;)c=n[c];if(t=u.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=t[1]._tokenizer.events,r=0,r<s.length&&"lineEndingBlank"===s[r][1].type&&(r+=2),r<s.length&&"content"===s[r][1].type))for(;++r<s.length&&"content"!==s[r][1].type;)"chunkText"===s[r][1].type&&(s[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(n,Si(u,c)),c=n[c],l=!0);else if(t[1]._container){for(r=c,o=void 0;r--;)if(i=u.get(r),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(o&&(u.get(o)[1].type="lineEndingBlank"),i[1].type="lineEnding",o=r);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;o&&(t[1].end={...u.get(o)[1].start},a=u.slice(o,c),a.unshift(t),u.splice(o,c-o+1,a))}}return Or(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Si(e,n){const t=e.get(n)[1],o=e.get(n)[2];let r=n-1;const i=[];let a=t._tokenizer;a||(a=o.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,p=-1,h=t,f=0,g=0;const b=[g];for(;h;){for(;e.get(++r)[1]!==h;);i.push(r),h._tokenizer||(u=o.sliceStream(h),h.next||u.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=t;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(g=p+1,b.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),p=b.length;p--;){const n=s.slice(b[p],b[p+1]),t=i.pop();l.push([t,t+n.length-1]),e.splice(t,2,n)}for(l.reverse(),p=-1;++p<l.length;)c[f+l[p][0]]=f+l[p][1],f+=l[p][1]-l[p][0]-1;return c}const Ei={resolve:function(e){return Ci(e),e},tokenize:function(e,n){let t;return function(n){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),o(n)};function o(n){return null===n?r(n):Xr(n)?e.check(Ii,i,r)(n):(e.consume(n),o)}function r(t){return e.exit("chunkContent"),e.exit("content"),n(t)}function i(n){return e.consume(n),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,o}}},Ii={partial:!0,tokenize:function(e,n,t){const o=this;return function(n){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ri(e,r,"linePrefix")};function r(r){if(null===r||Xr(r))return t(r);const i=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?n(r):e.interrupt(o.parser.constructs.flow,t,n)(r)}}};function Ti(e,n,t,o,r,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(n){if(60===n)return e.enter(o),e.enter(r),e.enter(i),e.consume(n),e.exit(i),d;if(null===n||32===n||41===n||Wr(n))return t(n);return e.enter(o),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n)};function d(t){return 62===t?(e.enter(i),e.consume(t),e.exit(i),e.exit(r),e.exit(o),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(t))}function p(n){return 62===n?(e.exit("chunkString"),e.exit(s),d(n)):null===n||60===n||Xr(n)?t(n):(e.consume(n),92===n?h:p)}function h(n){return 60===n||62===n||92===n?(e.consume(n),p):p(n)}function f(r){return u||null!==r&&41!==r&&!Qr(r)?u<c&&40===r?(e.consume(r),u++,f):41===r?(e.consume(r),u--,f):null===r||32===r||40===r||Wr(r)?t(r):(e.consume(r),92===r?g:f):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(o),n(r))}function g(n){return 40===n||41===n||92===n?(e.consume(n),f):f(n)}}function Li(e,n,t,o,r,i){const a=this;let s,l=0;return function(n){return e.enter(o),e.enter(r),e.consume(n),e.exit(r),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?t(d):93===d?(e.exit(i),e.enter(r),e.consume(d),e.exit(r),e.exit(o),n):Xr(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(n){return null===n||91===n||93===n||Xr(n)||l++>999?(e.exit("chunkString"),c(n)):(e.consume(n),s||(s=!Jr(n)),92===n?d:u)}function d(n){return 91===n||92===n||93===n?(e.consume(n),l++,u):u(n)}}function Ai(e,n,t,o,r,i){let a;return function(n){if(34===n||39===n||40===n)return e.enter(o),e.enter(r),e.consume(n),e.exit(r),a=40===n?41:n,s;return t(n)};function s(t){return t===a?(e.enter(r),e.consume(t),e.exit(r),e.exit(o),n):(e.enter(i),l(t))}function l(n){return n===a?(e.exit(i),s(a)):null===n?t(n):Xr(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ri(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(n))}function c(n){return n===a||null===n||Xr(n)?(e.exit("chunkString"),l(n)):(e.consume(n),92===n?u:c)}function u(n){return n===a||92===n?(e.consume(n),c):c(n)}}function Fi(e,n){let t;return function o(r){if(Xr(r))return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,o;if(Jr(r))return ri(e,o,t?"linePrefix":"lineSuffix")(r);return n(r)}}const Ni={name:"definition",tokenize:function(e,n,t){const o=this;let r;return function(n){return e.enter("definition"),function(n){return Li.call(o,e,i,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(n)}(n)};function i(n){return r=Ur(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),58===n?(e.enter("definitionMarker"),e.consume(n),e.exit("definitionMarker"),a):t(n)}function a(n){return Qr(n)?Fi(e,s)(n):s(n)}function s(n){return Ti(e,l,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(n)}function l(n){return e.attempt(Mi,c,c)(n)}function c(n){return Jr(n)?ri(e,u,"whitespace")(n):u(n)}function u(i){return null===i||Xr(i)?(e.exit("definition"),o.parser.defined.push(r),n(i)):t(i)}}},Mi={partial:!0,tokenize:function(e,n,t){return function(n){return Qr(n)?Fi(e,o)(n):t(n)};function o(n){return Ai(e,r,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(n)}function r(n){return Jr(n)?ri(e,i,"whitespace")(n):i(n)}function i(e){return null===e||Xr(e)?n(e):t(e)}}};const Pi={name:"hardBreakEscape",tokenize:function(e,n,t){return function(n){return e.enter("hardBreakEscape"),e.consume(n),o};function o(o){return Xr(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}};const Di={name:"headingAtx",resolve:function(e,n){let t,o,r=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);r-2>i&&"whitespace"===e[r][1].type&&(r-=2);"atxHeadingSequence"===e[r][1].type&&(i===r-1||r-4>i&&"whitespace"===e[r-2][1].type)&&(r-=i+1===r?2:4);r>i&&(t={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},o={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},Or(e,i,r-i+1,[["enter",t,n],["enter",o,n],["exit",o,n],["exit",t,n]]));return e},tokenize:function(e,n,t){let o=0;return function(n){return e.enter("atxHeading"),function(n){return e.enter("atxHeadingSequence"),r(n)}(n)};function r(n){return 35===n&&o++<6?(e.consume(n),r):null===n||Qr(n)?(e.exit("atxHeadingSequence"),i(n)):t(n)}function i(t){return 35===t?(e.enter("atxHeadingSequence"),a(t)):null===t||Xr(t)?(e.exit("atxHeading"),n(t)):Jr(t)?ri(e,i,"whitespace")(t):(e.enter("atxHeadingText"),s(t))}function a(n){return 35===n?(e.consume(n),a):(e.exit("atxHeadingSequence"),i(n))}function s(n){return null===n||35===n||Qr(n)?(e.exit("atxHeadingText"),i(n)):(e.consume(n),s)}}};const Oi=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zi=["pre","script","style","textarea"],Ri={concrete:!0,name:"htmlFlow",resolveTo:function(e){let n=e.length;for(;n--&&("enter"!==e[n][0]||"htmlFlow"!==e[n][1].type););n>1&&"linePrefix"===e[n-2][1].type&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2));return e},tokenize:function(e,n,t){const o=this;let r,i,a,s,l;return function(n){return function(n){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c}(n)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,h):63===s?(e.consume(s),r=3,o.interrupt?n:P):Yr(s)?(e.consume(s),a=String.fromCharCode(s),f):t(s)}function u(i){return 45===i?(e.consume(i),r=2,d):91===i?(e.consume(i),r=5,s=0,p):Yr(i)?(e.consume(i),r=4,o.interrupt?n:P):t(i)}function d(r){return 45===r?(e.consume(r),o.interrupt?n:P):t(r)}function p(r){const i="CDATA[";return r===i.charCodeAt(s++)?(e.consume(r),6===s?o.interrupt?n:E:p):t(r)}function h(n){return Yr(n)?(e.consume(n),a=String.fromCharCode(n),f):t(n)}function f(s){if(null===s||47===s||62===s||Qr(s)){const l=47===s,c=a.toLowerCase();return l||i||!zi.includes(c)?Oi.includes(a.toLowerCase())?(r=6,l?(e.consume(s),g):o.interrupt?n(s):E(s)):(r=7,o.interrupt&&!o.parser.lazy[o.now().line]?t(s):i?b(s):m(s)):(r=1,o.interrupt?n(s):E(s))}return 45===s||Vr(s)?(e.consume(s),a+=String.fromCharCode(s),f):t(s)}function g(r){return 62===r?(e.consume(r),o.interrupt?n:E):t(r)}function b(n){return Jr(n)?(e.consume(n),b):C(n)}function m(n){return 47===n?(e.consume(n),C):58===n||95===n||Yr(n)?(e.consume(n),v):Jr(n)?(e.consume(n),m):C(n)}function v(n){return 45===n||46===n||58===n||95===n||Vr(n)?(e.consume(n),v):y(n)}function y(n){return 61===n?(e.consume(n),x):Jr(n)?(e.consume(n),y):m(n)}function x(n){return null===n||60===n||61===n||62===n||96===n?t(n):34===n||39===n?(e.consume(n),l=n,w):Jr(n)?(e.consume(n),x):k(n)}function w(n){return n===l?(e.consume(n),l=null,_):null===n||Xr(n)?t(n):(e.consume(n),w)}function k(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||Qr(n)?y(n):(e.consume(n),k)}function _(e){return 47===e||62===e||Jr(e)?m(e):t(e)}function C(n){return 62===n?(e.consume(n),S):t(n)}function S(n){return null===n||Xr(n)?E(n):Jr(n)?(e.consume(n),S):t(n)}function E(n){return 45===n&&2===r?(e.consume(n),A):60===n&&1===r?(e.consume(n),F):62===n&&4===r?(e.consume(n),D):63===n&&3===r?(e.consume(n),P):93===n&&5===r?(e.consume(n),M):!Xr(n)||6!==r&&7!==r?null===n||Xr(n)?(e.exit("htmlFlowData"),I(n)):(e.consume(n),E):(e.exit("htmlFlowData"),e.check(ji,O,I)(n))}function I(n){return e.check(Bi,T,O)(n)}function T(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),L}function L(n){return null===n||Xr(n)?I(n):(e.enter("htmlFlowData"),E(n))}function A(n){return 45===n?(e.consume(n),P):E(n)}function F(n){return 47===n?(e.consume(n),a="",N):E(n)}function N(n){if(62===n){const t=a.toLowerCase();return zi.includes(t)?(e.consume(n),D):E(n)}return Yr(n)&&a.length<8?(e.consume(n),a+=String.fromCharCode(n),N):E(n)}function M(n){return 93===n?(e.consume(n),P):E(n)}function P(n){return 62===n?(e.consume(n),D):45===n&&2===r?(e.consume(n),P):E(n)}function D(n){return null===n||Xr(n)?(e.exit("htmlFlowData"),O(n)):(e.consume(n),D)}function O(t){return e.exit("htmlFlow"),n(t)}}},ji={partial:!0,tokenize:function(e,n,t){return function(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(hi,n,t)}}},Bi={partial:!0,tokenize:function(e,n,t){const o=this;return function(n){if(Xr(n))return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r;return t(n)};function r(e){return o.parser.lazy[o.now().line]?t(e):n(e)}}};const Hi={name:"htmlText",tokenize:function(e,n,t){const o=this;let r,i,a;return function(n){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(n),s};function s(n){return 33===n?(e.consume(n),l):47===n?(e.consume(n),x):63===n?(e.consume(n),v):Yr(n)?(e.consume(n),_):t(n)}function l(n){return 45===n?(e.consume(n),c):91===n?(e.consume(n),i=0,h):Yr(n)?(e.consume(n),m):t(n)}function c(n){return 45===n?(e.consume(n),p):t(n)}function u(n){return null===n?t(n):45===n?(e.consume(n),d):Xr(n)?(a=u,N(n)):(e.consume(n),u)}function d(n){return 45===n?(e.consume(n),p):u(n)}function p(e){return 62===e?F(e):45===e?d(e):u(e)}function h(n){const o="CDATA[";return n===o.charCodeAt(i++)?(e.consume(n),6===i?f:h):t(n)}function f(n){return null===n?t(n):93===n?(e.consume(n),g):Xr(n)?(a=f,N(n)):(e.consume(n),f)}function g(n){return 93===n?(e.consume(n),b):f(n)}function b(n){return 62===n?F(n):93===n?(e.consume(n),b):f(n)}function m(n){return null===n||62===n?F(n):Xr(n)?(a=m,N(n)):(e.consume(n),m)}function v(n){return null===n?t(n):63===n?(e.consume(n),y):Xr(n)?(a=v,N(n)):(e.consume(n),v)}function y(e){return 62===e?F(e):v(e)}function x(n){return Yr(n)?(e.consume(n),w):t(n)}function w(n){return 45===n||Vr(n)?(e.consume(n),w):k(n)}function k(n){return Xr(n)?(a=k,N(n)):Jr(n)?(e.consume(n),k):F(n)}function _(n){return 45===n||Vr(n)?(e.consume(n),_):47===n||62===n||Qr(n)?C(n):t(n)}function C(n){return 47===n?(e.consume(n),F):58===n||95===n||Yr(n)?(e.consume(n),S):Xr(n)?(a=C,N(n)):Jr(n)?(e.consume(n),C):F(n)}function S(n){return 45===n||46===n||58===n||95===n||Vr(n)?(e.consume(n),S):E(n)}function E(n){return 61===n?(e.consume(n),I):Xr(n)?(a=E,N(n)):Jr(n)?(e.consume(n),E):C(n)}function I(n){return null===n||60===n||61===n||62===n||96===n?t(n):34===n||39===n?(e.consume(n),r=n,T):Xr(n)?(a=I,N(n)):Jr(n)?(e.consume(n),I):(e.consume(n),L)}function T(n){return n===r?(e.consume(n),r=void 0,A):null===n?t(n):Xr(n)?(a=T,N(n)):(e.consume(n),T)}function L(n){return null===n||34===n||39===n||60===n||61===n||96===n?t(n):47===n||62===n||Qr(n)?C(n):(e.consume(n),L)}function A(e){return 47===e||62===e||Qr(e)?C(e):t(e)}function F(o){return 62===o?(e.consume(o),e.exit("htmlTextData"),e.exit("htmlText"),n):t(o)}function N(n){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),M}function M(n){return Jr(n)?ri(e,P,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):P(n)}function P(n){return e.enter("htmlTextData"),a(n)}}};const $i={name:"labelEnd",resolveAll:function(e){let n=-1;const t=[];for(;++n<e.length;){const o=e[n][1];if(t.push(e[n]),"labelImage"===o.type||"labelLink"===o.type||"labelEnd"===o.type){const e="labelImage"===o.type?4:2;o.type="data",n+=e}}e.length!==t.length&&Or(e,0,e.length,t);return e},resolveTo:function(e,n){let t,o,r,i,a=e.length,s=0;for(;a--;)if(t=e[a][1],o){if("link"===t.type||"labelLink"===t.type&&t._inactive)break;"enter"===e[a][0]&&"labelLink"===t.type&&(t._inactive=!0)}else if(r){if("enter"===e[a][0]&&("labelImage"===t.type||"labelLink"===t.type)&&!t._balanced&&(o=a,"labelLink"!==t.type)){s=2;break}}else"labelEnd"===t.type&&(r=a);const l={type:"labelLink"===e[o][1].type?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[r][1].end}},u={type:"labelText",start:{...e[o+s+2][1].end},end:{...e[r-2][1].start}};return i=[["enter",l,n],["enter",c,n]],i=zr(i,e.slice(o+1,o+s+3)),i=zr(i,[["enter",u,n]]),i=zr(i,ci(n.parser.constructs.insideSpan.null,e.slice(o+s+4,r-3),n)),i=zr(i,[["exit",u,n],e[r-2],e[r-1],["exit",c,n]]),i=zr(i,e.slice(r+1)),i=zr(i,[["exit",l,n]]),Or(e,o,e.length,i),e},tokenize:function(e,n,t){const o=this;let r,i,a=o.events.length;for(;a--;)if(("labelImage"===o.events[a][1].type||"labelLink"===o.events[a][1].type)&&!o.events[a][1]._balanced){r=o.events[a][1];break}return function(n){if(!r)return t(n);if(r._inactive)return u(n);return i=o.parser.defined.includes(Ur(o.sliceSerialize({start:r.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(n),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(n){return 40===n?e.attempt(Ui,c,i?c:u)(n):91===n?e.attempt(Yi,c,i?l:u)(n):i?c(n):u(n)}function l(n){return e.attempt(Vi,c,u)(n)}function c(e){return n(e)}function u(e){return r._balanced=!0,t(e)}}},Ui={tokenize:function(e,n,t){return function(n){return e.enter("resource"),e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),o};function o(n){return Qr(n)?Fi(e,r)(n):r(n)}function r(n){return 41===n?c(n):Ti(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(n)}function i(n){return Qr(n)?Fi(e,s)(n):c(n)}function a(e){return t(e)}function s(n){return 34===n||39===n||40===n?Ai(e,l,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(n):c(n)}function l(n){return Qr(n)?Fi(e,c)(n):c(n)}function c(o){return 41===o?(e.enter("resourceMarker"),e.consume(o),e.exit("resourceMarker"),e.exit("resource"),n):t(o)}}},Yi={tokenize:function(e,n,t){const o=this;return function(n){return Li.call(o,e,r,i,"reference","referenceMarker","referenceString")(n)};function r(e){return o.parser.defined.includes(Ur(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?n(e):t(e)}function i(e){return t(e)}}},Vi={tokenize:function(e,n,t){return function(n){return e.enter("reference"),e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),o};function o(o){return 93===o?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}};const qi={name:"labelStartImage",resolveAll:$i.resolveAll,tokenize:function(e,n,t){const o=this;return function(n){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(n),e.exit("labelImageMarker"),r};function r(n){return 91===n?(e.enter("labelMarker"),e.consume(n),e.exit("labelMarker"),e.exit("labelImage"),i):t(n)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in o.parser.constructs?t(e):n(e)}}};const Wi={name:"labelStartLink",resolveAll:$i.resolveAll,tokenize:function(e,n,t){const o=this;return function(n){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(n),e.exit("labelMarker"),e.exit("labelLink"),r};function r(e){return 94===e&&"_hiddenFootnoteSupport"in o.parser.constructs?t(e):n(e)}}};const Zi={name:"lineEnding",tokenize:function(e,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ri(e,n,"linePrefix")}}};const Gi={name:"thematicBreak",tokenize:function(e,n,t){let o,r=0;return function(n){return e.enter("thematicBreak"),function(e){return o=e,i(e)}(n)};function i(i){return i===o?(e.enter("thematicBreakSequence"),a(i)):r>=3&&(null===i||Xr(i))?(e.exit("thematicBreak"),n(i)):t(i)}function a(n){return n===o?(e.consume(n),r++,a):(e.exit("thematicBreakSequence"),Jr(n)?ri(e,i,"whitespace")(n):i(n))}}};const Ki={continuation:{tokenize:function(e,n,t){const o=this;return o.containerState._closeFlow=void 0,e.check(hi,r,i);function r(t){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,ri(e,n,"listItemIndent",o.containerState.size+1)(t)}function i(t){return o.containerState.furtherBlankLines||!Jr(t)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,a(t)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Qi,n,a)(t))}function a(r){return o.containerState._closeFlow=!0,o.interrupt=void 0,ri(e,e.attempt(Ki,n,t),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,n,t){const o=this,r=o.events[o.events.length-1];let i=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,a=0;return function(n){const r=o.containerState.type||(42===n||43===n||45===n?"listUnordered":"listOrdered");if("listUnordered"===r?!o.containerState.marker||n===o.containerState.marker:Zr(n)){if(o.containerState.type||(o.containerState.type=r,e.enter(r,{_container:!0})),"listUnordered"===r)return e.enter("listItemPrefix"),42===n||45===n?e.check(Gi,t,l)(n):l(n);if(!o.interrupt||49===n)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(n)}return t(n)};function s(n){return Zr(n)&&++a<10?(e.consume(n),s):(!o.interrupt||a<2)&&(o.containerState.marker?n===o.containerState.marker:41===n||46===n)?(e.exit("listItemValue"),l(n)):t(n)}function l(n){return e.enter("listItemMarker"),e.consume(n),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||n,e.check(hi,o.interrupt?t:c,e.attempt(Xi,d,u))}function c(e){return o.containerState.initialBlankLine=!0,i++,d(e)}function u(n){return Jr(n)?(e.enter("listItemPrefixWhitespace"),e.consume(n),e.exit("listItemPrefixWhitespace"),d):t(n)}function d(t){return o.containerState.size=i+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(t)}}},Xi={partial:!0,tokenize:function(e,n,t){const o=this;return ri(e,function(e){const r=o.events[o.events.length-1];return!Jr(e)&&r&&"listItemPrefixWhitespace"===r[1].type?n(e):t(e)},"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Qi={partial:!0,tokenize:function(e,n,t){const o=this;return ri(e,function(e){const r=o.events[o.events.length-1];return r&&"listItemIndent"===r[1].type&&r[2].sliceSerialize(r[1],!0).length===o.containerState.size?n(e):t(e)},"listItemIndent",o.containerState.size+1)}};const Ji={name:"setextUnderline",resolveTo:function(e,n){let t,o,r,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){t=i;break}"paragraph"===e[i][1].type&&(o=i)}else"content"===e[i][1].type&&e.splice(i,1),r||"definition"!==e[i][1].type||(r=i);const a={type:"setextHeading",start:{...e[t][1].start},end:{...e[e.length-1][1].end}};e[o][1].type="setextHeadingText",r?(e.splice(o,0,["enter",a,n]),e.splice(r+1,0,["exit",e[t][1],n]),e[t][1].end={...e[r][1].end}):e[t][1]=a;return e.push(["exit",a,n]),e},tokenize:function(e,n,t){const o=this;let r;return function(n){let a,s=o.events.length;for(;s--;)if("lineEnding"!==o.events[s][1].type&&"linePrefix"!==o.events[s][1].type&&"content"!==o.events[s][1].type){a="paragraph"===o.events[s][1].type;break}if(!o.parser.lazy[o.now().line]&&(o.interrupt||a))return e.enter("setextHeadingLine"),r=n,function(n){return e.enter("setextHeadingLineSequence"),i(n)}(n);return t(n)};function i(n){return n===r?(e.consume(n),i):(e.exit("setextHeadingLineSequence"),Jr(n)?ri(e,a,"lineSuffix")(n):a(n))}function a(o){return null===o||Xr(o)?(e.exit("setextHeadingLine"),n(o)):t(o)}}};const ea={tokenize:function(e){const n=this,t=e.attempt(hi,function(o){if(null===o)return void e.consume(o);return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t},e.attempt(this.parser.constructs.flowInitial,o,ri(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Ei,o)),"linePrefix")));return t;function o(o){if(null!==o)return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t;e.consume(o)}}};const na={resolveAll:ia()},ta=ra("string"),oa=ra("text");function ra(e){return{resolveAll:ia("text"===e?aa:void 0),tokenize:function(n){const t=this,o=this.parser.constructs[e],r=n.attempt(o,i,a);return i;function i(e){return l(e)?r(e):a(e)}function a(e){if(null!==e)return n.enter("data"),n.consume(e),s;n.consume(e)}function s(e){return l(e)?(n.exit("data"),r(e)):(n.consume(e),s)}function l(e){if(null===e)return!0;const n=o[e];let r=-1;if(n)for(;++r<n.length;){const e=n[r];if(!e.previous||e.previous.call(t,t.previous))return!0}return!1}}}}function ia(e){return function(n,t){let o,r=-1;for(;++r<=n.length;)void 0===o?n[r]&&"data"===n[r][1].type&&(o=r,r++):n[r]&&"data"===n[r][1].type||(r!==o+2&&(n[o][1].end=n[r-1][1].end,n.splice(o+2,r-o-2),r=o+2),o=void 0);return e?e(n,t):n}}function aa(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||"lineEnding"===e[t][1].type)&&"data"===e[t-1][1].type){const o=e[t-1][1],r=n.sliceStream(o);let i,a=r.length,s=-1,l=0;for(;a--;){const e=r[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(l=0),l){const r={type:t===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:o.start._bufferIndex+s,_index:o.start._index+a,line:o.end.line,column:o.end.column-l,offset:o.end.offset-l},end:{...o.end}};o.end={...r.start},o.start.offset===o.end.offset?Object.assign(o,r):(e.splice(t,0,["enter",r,n],["exit",r,n]),t+=2)}t++}return e}const sa={42:Ki,43:Ki,45:Ki,48:Ki,49:Ki,50:Ki,51:Ki,52:Ki,53:Ki,54:Ki,55:Ki,56:Ki,57:Ki,62:fi},la={91:Ni},ca={[-2]:yi,[-1]:yi,32:yi},ua={35:Di,42:Gi,45:[Ji,Gi],60:Ri,61:Ji,95:Gi,96:vi,126:vi},da={38:bi,92:gi},pa={[-5]:Zi,[-4]:Zi,[-3]:Zi,33:qi,38:bi,42:ui,60:[pi,Hi],91:Wi,92:[Pi,gi],93:$i,95:ui,96:wi},ha={null:[ui,na]},fa={null:[42,95]},ga={null:[]};function ba(e,n,t){let o={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const r={},i=[];let a=[],s=[],l=!0;const c={attempt:v(function(e,n){y(e,n.from)}),check:v(m),consume:function(e){Xr(e)?(o.line++,o.column=1,o.offset+=-3===e?2:1,x()):-1!==e&&(o.column++,o.offset++);o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===a[o._index].length&&(o._bufferIndex=-1,o._index++));u.previous=e,l=!0},enter:function(e,n){const t=n||{};return t.type=e,t.start=f(),u.events.push(["enter",t,u]),s.push(t),t},exit:function(e){const n=s.pop();return n.end=f(),u.events.push(["exit",n,u]),n},interrupt:v(m,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){r[e.line]=e.column,x()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,n){return function(e,n){let t=-1;const o=[];let r;for(;++t<e.length;){const i=e[t];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=n?" ":"\t";break;case-1:if(!n&&r)continue;a=" ";break;default:a=String.fromCharCode(i)}r=-2===i,o.push(a)}return o.join("")}(h(e),n)},sliceStream:h,write:function(e){if(a=zr(a,e),g(),null!==a[a.length-1])return[];return y(n,0),u.events=ci(i,u.events,u),u.events}};let d,p=n.tokenize.call(u,c);return n.resolveAll&&i.push(n),u;function h(e){return function(e,n){const t=n.start._index,o=n.start._bufferIndex,r=n.end._index,i=n.end._bufferIndex;let a;if(t===r)a=[e[t].slice(o,i)];else{if(a=e.slice(t,r),o>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(o):a.shift()}i>0&&a.push(e[r].slice(0,i))}return a}(a,e)}function f(){const{_bufferIndex:e,_index:n,line:t,column:r,offset:i}=o;return{_bufferIndex:e,_index:n,line:t,column:r,offset:i}}function g(){let e;for(;o._index<a.length;){const n=a[o._index];if("string"==typeof n)for(e=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===e&&o._bufferIndex<n.length;)b(n.charCodeAt(o._bufferIndex));else b(n)}}function b(e){l=void 0,d=e,p=p(e)}function m(e,n){n.restore()}function v(e,n){return function(t,r,i){let a,d,p,h;return Array.isArray(t)?g(t):"tokenize"in t?g([t]):function(e){return n;function n(n){const t=null!==n&&e[n],o=null!==n&&e.null;return g([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(o)?o:o?[o]:[]])(n)}}(t);function g(e){return a=e,d=0,0===e.length?i:b(e[d])}function b(e){return function(t){h=function(){const e=f(),n=u.previous,t=u.currentConstruct,r=u.events.length,i=Array.from(s);return{from:r,restore:a};function a(){o=e,u.previous=n,u.currentConstruct=t,u.events.length=r,s=i,x()}}(),p=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return v(t);return e.tokenize.call(n?Object.assign(Object.create(u),n):u,c,m,v)(t)}}function m(n){return l=!0,e(p,h),r}function v(e){return l=!0,h.restore(),++d<a.length?b(a[d]):i}}}function y(e,n){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Or(u.events,n,u.events.length-n,e.resolve(u.events.slice(n),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function x(){o.line in r&&o.column<2&&(o.column=r[o.line],o.offset+=r[o.line]-1)}}const ma=/[\0\t\n\r]/g;const va=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ya(e,n,t){if(n)return n;if(35===t.charCodeAt(0)){const e=t.charCodeAt(1),n=120===e||88===e;return $r(t.slice(n?2:1),n?16:10)}return Dr(t)||e}const xa={}.hasOwnProperty;function wa(e,n,t){return"string"!=typeof n&&(t=n,n=void 0),function(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ne),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(X),blockQuote:i(q),characterEscape:S,characterReference:S,codeFenced:i(W),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(W,a),codeText:i(Z,a),codeTextData:S,data:S,codeFlowValue:S,definition:i(G),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(K),hardBreakEscape:i(Q),hardBreakTrailing:i(Q),htmlFlow:i(J,a),htmlFlowData:S,htmlText:i(J,a),htmlTextData:S,image:i(ee),label:a,link:i(ne),listItem:i(oe),listItemValue:p,listOrdered:i(te,d),listUnordered:i(te),paragraph:i(re),reference:j,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(X),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:V,autolinkProtocol:Y,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:$,characterReference:U,codeFenced:l(b),codeFencedFence:g,codeFencedFenceInfo:h,codeFencedFenceMeta:f,codeFlowValue:E,codeIndented:l(m),codeText:l(F),codeTextData:E,data:E,definition:l(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:y,emphasis:l(),hardBreakEscape:l(T),hardBreakTrailing:l(T),htmlFlow:l(L),htmlFlowData:E,htmlText:l(A),htmlTextData:E,image:l(M),label:D,labelText:P,lineEnding:I,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:O,resourceTitleString:z,resource:R,setextHeading:l(C),setextHeadingLineSequence:_,setextHeadingText:k,strong:l(),thematicBreak:l()}};_a(n,(e||{}).mdastExtensions||[]);const t={};return o;function o(e){let o={type:"root",children:[]};const i={stack:[o],tokenStack:[],config:n,enter:s,exit:c,buffer:a,resume:u,data:t},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=r(e,l.pop(),d)}for(d=-1;++d<e.length;){const t=n[e[d][0]];xa.call(t,e[d][1].type)&&t[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||Sa).call(i,void 0,e[0])}for(o.position={start:ka(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ka(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<n.transforms.length;)o=n.transforms[d](o)||o;return o}function r(e,n,t){let o,r,i,a,s=n-1,l=-1,c=!1;for(;++s<=t;){const n=e[s];switch(n[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===n[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===n[0]&&(!o||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===n[0]&&"listItemPrefix"===n[1].type||-1===l&&"exit"===n[0]&&("listUnordered"===n[1].type||"listOrdered"===n[1].type)){if(o){let a=s;for(r=void 0;a--;){const n=e[a];if("lineEnding"===n[1].type||"lineEndingBlank"===n[1].type){if("exit"===n[0])continue;r&&(e[r][1].type="lineEndingBlank",c=!0),n[1].type="lineEnding",r=a}else if("linePrefix"!==n[1].type&&"blockQuotePrefix"!==n[1].type&&"blockQuotePrefixWhitespace"!==n[1].type&&"blockQuoteMarker"!==n[1].type&&"listItemIndent"!==n[1].type)break}i&&(!r||i<r)&&(o._spread=!0),o.end=Object.assign({},r?e[r][1].start:n[1].end),e.splice(r||s,0,["exit",o,n[2]]),s++,t++}if("listItemPrefix"===n[1].type){const r={type:"listItem",_spread:!1,start:Object.assign({},n[1].start),end:void 0};o=r,e.splice(s,0,["enter",r,n[2]]),s++,t++,i=void 0,a=!0}}}return e[n][1]._spread=c,t}function i(e,n){return t;function t(t){s.call(this,e(t),t),n&&n.call(this,t)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,n,t){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([n,t||void 0]),e.position={start:ka(n.start),end:void 0}}function l(e){return n;function n(n){e&&e.call(this,n),c.call(this,n)}}function c(e,n){const t=this.stack.pop(),o=this.tokenStack.pop();if(!o)throw new Error("Cannot close `"+e.type+"` ("+lr({start:e.start,end:e.end})+"): it’s not open");if(o[0].type!==e.type)if(n)n.call(this,e,o[0]);else{(o[1]||Sa).call(this,e,o[0])}t.position.end=ka(e.end)}function u(){return Fr(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function h(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function f(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.label=n,t.identifier=Ur(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const n=this.stack[this.stack.length-1];if(!n.depth){const t=this.sliceSerialize(e).length;n.depth=t}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function _(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const n=this.stack[this.stack.length-1].children;let t=n[n.length-1];t&&"text"===t.type||(t=ae(),t.position={start:ka(e.start),end:void 0},n.push(t)),this.stack.push(t)}function E(e){const n=this.stack.pop();n.value+=this.sliceSerialize(e),n.position.end=ka(e.end)}function I(e){const t=this.stack[this.stack.length-1];if(this.data.atHardBreak){return t.children[t.children.length-1].position.end=ka(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(t.type)&&(S.call(this,e),E.call(this,e))}function T(){this.data.atHardBreak=!0}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function A(){const e=this.resume();this.stack[this.stack.length-1].value=e}function F(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const n=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=n,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const n=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=n,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){const n=this.sliceSerialize(e),t=this.stack[this.stack.length-2];t.label=function(e){return e.replace(va,ya)}(n),t.identifier=Ur(n).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],n=this.resume(),t=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===t.type){const n=e.children;t.children=n}else t.alt=n}function O(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function R(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function B(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.label=n,t.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function $(e){const n=this.sliceSerialize(e),t=this.data.characterReferenceType;let o;if(t)o=$r(n,"characterReferenceMarkerNumeric"===t?10:16),this.data.characterReferenceType=void 0;else{o=Dr(n)}this.stack[this.stack.length-1].value+=o}function U(e){this.stack.pop().position.end=ka(e.end)}function Y(e){E.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){E.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function ne(){return{type:"link",title:null,url:"",children:[]}}function te(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function oe(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function re(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(t)(function(e){for(;!Ci(e););return e}(function(e){const n={constructs:jr([r,...(e||{}).extensions||[]]),content:t(ii),defined:[],document:t(ai),flow:t(ea),lazy:{},string:t(ta),text:t(oa)};return n;function t(e){return function(t){return ba(n,e,t)}}}(t).document().write(function(){let e,n=1,t="",o=!0;return function(r,i,a){const s=[];let l,c,u,d,p;for(r=t+("string"==typeof r?r.toString():new TextDecoder(i||void 0).decode(r)),u=0,t="",o&&(65279===r.charCodeAt(0)&&u++,o=void 0);u<r.length;){if(ma.lastIndex=u,l=ma.exec(r),d=l&&void 0!==l.index?l.index:r.length,p=r.charCodeAt(d),!l){t=r.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(r.slice(u,d)),n+=d-u),p){case 0:s.push(65533),n++;break;case 9:for(c=4*Math.ceil(n/4),s.push(-2);n++<c;)s.push(-1);break;case 10:s.push(-4),n=1;break;default:e=!0,n=1}u=d+1}return a&&(e&&s.push(-5),t&&s.push(t),s.push(null)),s}}()(e,n,!0))))}function ka(e){return{line:e.line,column:e.column,offset:e.offset}}function _a(e,n){let t=-1;for(;++t<n.length;){const o=n[t];Array.isArray(o)?_a(e,o):Ca(e,o)}}function Ca(e,n){let t;for(t in n)if(xa.call(n,t))switch(t){case"canContainEols":{const o=n[t];o&&e[t].push(...o);break}case"transforms":{const o=n[t];o&&e[t].push(...o);break}case"enter":case"exit":{const o=n[t];o&&Object.assign(e[t],o);break}}}function Sa(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+lr({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+lr({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+lr({start:n.start,end:n.end})+") is still open")}function Ea(e){const n=this;n.parser=function(t){return wa(t,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Ia(e,n){const t=n.referenceType;let o="]";if("collapsed"===t?o+="[]":"full"===t&&(o+="["+(n.label||n.identifier)+"]"),"imageReference"===n.type)return[{type:"text",value:"!["+n.alt+o}];const r=e.all(n),i=r[0];i&&"text"===i.type?i.value="["+i.value:r.unshift({type:"text",value:"["});const a=r[r.length-1];return a&&"text"===a.type?a.value+=o:r.push({type:"text",value:o}),r}function Ta(e){const n=e.spread;return null==n?e.children.length>1:n}function La(e){const n=String(e),t=/\r?\n|\r/g;let o=t.exec(n),r=0;const i=[];for(;o;)i.push(Aa(n.slice(r,o.index),r>0,!0),o[0]),r=o.index+o[0].length,o=t.exec(n);return i.push(Aa(n.slice(r),r>0,!1)),i.join("")}function Aa(e,n,t){let o=0,r=e.length;if(n){let n=e.codePointAt(o);for(;9===n||32===n;)o++,n=e.codePointAt(o)}if(t){let n=e.codePointAt(r-1);for(;9===n||32===n;)r--,n=e.codePointAt(r-1)}return r>o?e.slice(o,r):""}const Fa={blockquote:function(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)},break:function(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:"\n"}]},code:function(e,n){const t=n.value?n.value+"\n":"",o={},r=n.lang?n.lang.split(/\s+/):[];r.length>0&&(o.className=["language-"+r[0]]);let i={type:"element",tagName:"code",properties:o,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i},delete:function(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},emphasis:function(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},footnoteReference:function(e,n){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",o=String(n.identifier).toUpperCase(),r=oi(o.toLowerCase()),i=e.footnoteOrder.indexOf(o);let a,s=e.footnoteCounts.get(o);void 0===s?(s=0,e.footnoteOrder.push(o),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(o,s);const l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(n,c),e.applyData(n,c)},heading:function(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},html:function(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}},imageReference:function(e,n){const t=String(n.identifier).toUpperCase(),o=e.definitionById.get(t);if(!o)return Ia(e,n);const r={src:oi(o.url||""),alt:n.alt};null!==o.title&&void 0!==o.title&&(r.title=o.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,i),e.applyData(n,i)},image:function(e,n){const t={src:oi(n.url)};null!==n.alt&&void 0!==n.alt&&(t.alt=n.alt),null!==n.title&&void 0!==n.title&&(t.title=n.title);const o={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,o),e.applyData(n,o)},inlineCode:function(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const o={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,o),e.applyData(n,o)},linkReference:function(e,n){const t=String(n.identifier).toUpperCase(),o=e.definitionById.get(t);if(!o)return Ia(e,n);const r={href:oi(o.url||"")};null!==o.title&&void 0!==o.title&&(r.title=o.title);const i={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)},link:function(e,n){const t={href:oi(n.url)};null!==n.title&&void 0!==n.title&&(t.title=n.title);const o={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)},listItem:function(e,n,t){const o=e.all(n),r=t?function(e){let n=!1;if("list"===e.type){n=e.spread||!1;const t=e.children;let o=-1;for(;!n&&++o<t.length;)n=Ta(t[o])}return n}(t):Ta(n),i={},a=[];if("boolean"==typeof n.checked){const e=o[0];let t;e&&"element"===e.type&&"p"===e.tagName?t=e:(t={type:"element",tagName:"p",properties:{},children:[]},o.unshift(t)),t.children.length>0&&t.children.unshift({type:"text",value:" "}),t.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<o.length;){const e=o[s];(r||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||r?a.push(e):a.push(...e.children)}const l=o[o.length-1];l&&(r||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(n,c),e.applyData(n,c)},list:function(e,n){const t={},o=e.all(n);let r=-1;for("number"==typeof n.start&&1!==n.start&&(t.start=n.start);++r<o.length;){const e=o[r];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const i={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(o,!0)};return e.patch(n,i),e.applyData(n,i)},paragraph:function(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},root:function(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)},strong:function(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},table:function(e,n){const t=e.all(n),o=t.shift(),r=[];if(o){const t={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(n.children[0],t),r.push(t)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},i=ar(n.children[1]),a=ir(n.children[n.children.length-1]);i&&a&&(o.position={start:i,end:a}),r.push(o)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,i),e.applyData(n,i)},tableCell:function(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)},tableRow:function(e,n,t){const o=t?t.children:void 0,r=0===(o?o.indexOf(n):1)?"th":"td",i=t&&"table"===t.type?t.align:void 0,a=i?i.length:n.children.length;let s=-1;const l=[];for(;++s<a;){const t=n.children[s],o={},a=i?i[s]:void 0;a&&(o.align=a);let c={type:"element",tagName:r,properties:o,children:[]};t&&(c.children=e.all(t),e.patch(t,c),c=e.applyData(t,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(n,c),e.applyData(n,c)},text:function(e,n){const t={type:"text",value:La(String(n.value))};return e.patch(n,t),e.applyData(n,t)},thematicBreak:function(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)},toml:Na,yaml:Na,definition:Na,footnoteDefinition:Na};function Na(){}const Ma="object"==typeof self?self:globalThis,Pa=e=>((e,n)=>{const t=(n,t)=>(e.set(t,n),n),o=r=>{if(e.has(r))return e.get(r);const[i,a]=n[r];switch(i){case 0:case-1:return t(a,r);case 1:{const e=t([],r);for(const n of a)e.push(o(n));return e}case 2:{const e=t({},r);for(const[n,t]of a)e[o(n)]=o(t);return e}case 3:return t(new Date(a),r);case 4:{const{source:e,flags:n}=a;return t(new RegExp(e,n),r)}case 5:{const e=t(new Map,r);for(const[n,t]of a)e.set(o(n),o(t));return e}case 6:{const e=t(new Set,r);for(const n of a)e.add(o(n));return e}case 7:{const{name:e,message:n}=a;return t(new Ma[e](n),r)}case 8:return t(BigInt(a),r);case"BigInt":return t(Object(BigInt(a)),r);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return t(new DataView(e),a)}}return t(new Ma[i](a),r)};return o})(new Map,e)(0),Da="",{toString:Oa}={},{keys:za}=Object,Ra=e=>{const n=typeof e;if("object"!==n||!e)return[0,n];const t=Oa.call(e).slice(8,-1);switch(t){case"Array":return[1,Da];case"Object":return[2,Da];case"Date":return[3,Da];case"RegExp":return[4,Da];case"Map":return[5,Da];case"Set":return[6,Da];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},ja=([e,n])=>0===e&&("function"===n||"symbol"===n),Ba=(e,{json:n,lossy:t}={})=>{const o=[];return((e,n,t,o)=>{const r=(e,n)=>{const r=o.push(e)-1;return t.set(n,r),r},i=o=>{if(t.has(o))return t.get(o);let[a,s]=Ra(o);switch(a){case 0:{let n=o;switch(s){case"bigint":a=8,n=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);n=null;break;case"undefined":return r([-1],o)}return r([a,n],o)}case 1:{if(s){let e=o;return"DataView"===s?e=new Uint8Array(o.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(o)),r([s,[...e]],o)}const e=[],n=r([a,e],o);for(const n of o)e.push(i(n));return n}case 2:{if(s)switch(s){case"BigInt":return r([s,o.toString()],o);case"Boolean":case"Number":case"String":return r([s,o.valueOf()],o)}if(n&&"toJSON"in o)return i(o.toJSON());const t=[],l=r([a,t],o);for(const n of za(o))!e&&ja(Ra(o[n]))||t.push([i(n),i(o[n])]);return l}case 3:return r([a,o.toISOString()],o);case 4:{const{source:e,flags:n}=o;return r([a,{source:e,flags:n}],o)}case 5:{const n=[],t=r([a,n],o);for(const[t,r]of o)(e||!ja(Ra(t))&&!ja(Ra(r)))&&n.push([i(t),i(r)]);return t}case 6:{const n=[],t=r([a,n],o);for(const t of o)!e&&ja(Ra(t))||n.push(i(t));return t}}const{message:l}=o;return r([a,{name:s,message:l}],o)};return i})(!(n||t),!!n,new Map,o)(e),o},Ha="function"==typeof structuredClone?(e,n)=>n&&("json"in n||"lossy"in n)?Pa(Ba(e,n)):structuredClone(e):(e,n)=>Pa(Ba(e,n));function $a(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ua(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}const Ya=function(e){if(null==e)return qa;if("function"==typeof e)return Va(e);if("object"==typeof e)return Array.isArray(e)?function(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Ya(e[t]);return Va(o);function o(...e){let t=-1;for(;++t<n.length;)if(n[t].apply(this,e))return!0;return!1}}(e):function(e){const n=e;return Va(t);function t(t){const o=t;let r;for(r in e)if(o[r]!==n[r])return!1;return!0}}(e);if("string"==typeof e)return function(e){return Va(n);function n(n){return n&&n.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Va(e){return function(n,t,o){return Boolean(Wa(n)&&e.call(this,n,"number"==typeof t?t:void 0,o||void 0))}}function qa(){return!0}function Wa(e){return null!==e&&"object"==typeof e&&"type"in e}const Za=[],Ga=!0,Ka=!1;function Xa(e,n,t,o){let r;"function"==typeof n&&"function"!=typeof t?(o=t,t=n):r=n;const i=Ya(r),a=o?-1:1;!function e(r,s,l){const c=r&&"object"==typeof r?r:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+r.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Za;if((!n||i(r,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Ga,e];return null==e?Za:[e]}(t(r,l)),p[0]===Ka))return p;if("children"in r&&r.children){const n=r;if(n.children&&"skip"!==p[0])for(u=(o?n.children.length:-1)+a,d=l.concat(n);u>-1&&u<n.children.length;){const t=n.children[u];if(c=e(t,u,d)(),c[0]===Ka)return c;u="number"==typeof c[1]?c[1]:u+a}}return p}}(e,void 0,[])()}function Qa(e,n,t,o){let r,i,a;"function"==typeof n&&"function"!=typeof t?(i=void 0,a=n,r=t):(i=n,a=t,r=o),Xa(e,i,function(e,n){const t=n[n.length-1],o=t?t.children.indexOf(e):void 0;return a(e,o,t)},r)}const Ja={}.hasOwnProperty,es={};function ns(e,n){e.position&&(n.position=function(e){const n=ar(e),t=ir(e);if(n&&t)return{start:n,end:t}}(e))}function ts(e,n){let t=n;if(e&&e.data){const n=e.data.hName,o=e.data.hChildren,r=e.data.hProperties;if("string"==typeof n)if("element"===t.type)t.tagName=n;else{t={type:"element",tagName:n,properties:{},children:"children"in t?t.children:[t]}}"element"===t.type&&r&&Object.assign(t.properties,Ha(r)),"children"in t&&t.children&&null!=o&&(t.children=o)}return t}function os(e,n){const t=n.data||{},o=!("value"in n)||Ja.call(t,"hProperties")||Ja.call(t,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(n)}:{type:"text",value:n.value};return e.patch(n,o),e.applyData(n,o)}function rs(e,n){const t=[];let o=-1;for(n&&t.push({type:"text",value:"\n"});++o<e.length;)o&&t.push({type:"text",value:"\n"}),t.push(e[o]);return n&&e.length>0&&t.push({type:"text",value:"\n"}),t}function is(e){let n=0,t=e.charCodeAt(n);for(;9===t||32===t;)n++,t=e.charCodeAt(n);return e.slice(n)}function as(e,n){const t=function(e,n){const t=n||es,o=new Map,r=new Map,i=new Map,a={...Fa,...t.handlers},s={all:function(e){const n=[];if("children"in e){const t=e.children;let o=-1;for(;++o<t.length;){const r=s.one(t[o],e);if(r){if(o&&"break"===t[o-1].type&&(Array.isArray(r)||"text"!==r.type||(r.value=is(r.value)),!Array.isArray(r)&&"element"===r.type)){const e=r.children[0];e&&"text"===e.type&&(e.value=is(e.value))}Array.isArray(r)?n.push(...r):n.push(r)}}}return n},applyData:ts,definitionById:o,footnoteById:r,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,n){const t=e.type,o=s.handlers[t];if(Ja.call(s.handlers,t)&&o)return o(s,e,n);if(s.options.passThrough&&s.options.passThrough.includes(t)){if("children"in e){const{children:n,...t}=e,o=Ha(t);return o.children=s.all(e),o}return Ha(e)}return(s.options.unknownHandler||os)(s,e,n)},options:t,patch:ns,wrap:rs};return Qa(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const n="definition"===e.type?o:r,t=String(e.identifier).toUpperCase();n.has(t)||n.set(t,e)}}),s}(e,n),o=t.one(e,void 0),r=function(e){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||$a,o=e.options.footnoteBackLabel||Ua,r=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const r=e.footnoteById.get(e.footnoteOrder[l]);if(!r)continue;const i=e.all(r),a=String(r.identifier).toUpperCase(),c=oi(a.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(a);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof t?t:t(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof o?o:o(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const h=i[i.length-1];if(h&&"element"===h.type&&"p"===h.tagName){const e=h.children[h.children.length-1];e&&"text"===e.type?e.value+=" ":h.children.push({type:"text",value:" "}),h.children.push(...d)}else i.push(...d);const f={type:"element",tagName:"li",properties:{id:n+"fn-"+c},children:e.wrap(i,!0)};e.patch(r,f),s.push(f)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Ha(a),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(t),i=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return r&&i.children.push({type:"text",value:"\n"},r),i}function ss(e,n){return e&&"run"in e?async function(t,o){const r=as(t,{file:o,...n});await e.run(r,o)}:function(t,o){return as(t,{file:o,...e||n})}}function ls(e){if(e)throw e}var cs=t(849);function us(e){if("object"!=typeof e||null===e)return!1;const n=Object.getPrototypeOf(e);return!(null!==n&&n!==Object.prototype&&null!==Object.getPrototypeOf(n)||Symbol.toStringTag in e||Symbol.iterator in e)}function ds(){const e=[],n={run:function(...n){let t=-1;const o=n.pop();if("function"!=typeof o)throw new TypeError("Expected function as last argument, not "+o);!function r(i,...a){const s=e[++t];let l=-1;if(i)o(i);else{for(;++l<n.length;)null!==a[l]&&void 0!==a[l]||(a[l]=n[l]);n=a,s?function(e,n){let t;return o;function o(...n){const o=e.length>n.length;let a;o&&n.push(r);try{a=e.apply(this,n)}catch(e){if(o&&t)throw e;return r(e)}o||(a&&a.then&&"function"==typeof a.then?a.then(i,r):a instanceof Error?r(a):i(a))}function r(e,...o){t||(t=!0,n(e,...o))}function i(e){r(null,e)}}(s,r)(...a):o(null,...a)}}(null,...n)},use:function(t){if("function"!=typeof t)throw new TypeError("Expected `middelware` to be a function, not "+t);return e.push(t),n}};return n}const ps={basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');hs(e);let t,o=0,r=-1,i=e.length;if(void 0===n||0===n.length||n.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(t){o=i+1;break}}else r<0&&(t=!0,r=i+1);return r<0?"":e.slice(o,r)}if(n===e)return"";let a=-1,s=n.length-1;for(;i--;)if(47===e.codePointAt(i)){if(t){o=i+1;break}}else a<0&&(t=!0,a=i+1),s>-1&&(e.codePointAt(i)===n.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));o===r?r=a:r<0&&(r=e.length);return e.slice(o,r)},dirname:function(e){if(hs(e),0===e.length)return".";let n,t=-1,o=e.length;for(;--o;)if(47===e.codePointAt(o)){if(n){t=o;break}}else n||(n=!0);return t<0?47===e.codePointAt(0)?"/":".":1===t&&47===e.codePointAt(0)?"//":e.slice(0,t)},extname:function(e){hs(e);let n,t=e.length,o=-1,r=0,i=-1,a=0;for(;t--;){const s=e.codePointAt(t);if(47!==s)o<0&&(n=!0,o=t+1),46===s?i<0?i=t:1!==a&&(a=1):i>-1&&(a=-1);else if(n){r=t+1;break}}if(i<0||o<0||0===a||1===a&&i===o-1&&i===r+1)return"";return e.slice(i,o)},join:function(...e){let n,t=-1;for(;++t<e.length;)hs(e[t]),e[t]&&(n=void 0===n?e[t]:n+"/"+e[t]);return void 0===n?".":function(e){hs(e);const n=47===e.codePointAt(0);let t=function(e,n){let t,o,r="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)t=e.codePointAt(l);else{if(47===t)break;t=47}if(47===t){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(r.length<2||2!==i||46!==r.codePointAt(r.length-1)||46!==r.codePointAt(r.length-2))if(r.length>2){if(o=r.lastIndexOf("/"),o!==r.length-1){o<0?(r="",i=0):(r=r.slice(0,o),i=r.length-1-r.lastIndexOf("/")),a=l,s=0;continue}}else if(r.length>0){r="",i=0,a=l,s=0;continue}n&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(a+1,l):r=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===t&&s>-1?s++:s=-1}return r}(e,!n);0!==t.length||n||(t=".");t.length>0&&47===e.codePointAt(e.length-1)&&(t+="/");return n?"/"+t:t}(n)},sep:"/"};function hs(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const fs={cwd:function(){return"/"}};function gs(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function bs(e){if("string"==typeof e)e=new URL(e);else if(!gs(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const n=e.pathname;let t=-1;for(;++t<n.length;)if(37===n.codePointAt(t)&&50===n.codePointAt(t+1)){const e=n.codePointAt(t+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(n)}(e)}const ms=["history","path","basename","stem","extname","dirname"];class vs{constructor(e){let n;n=e?gs(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in n?"":fs.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let t,o=-1;for(;++o<ms.length;){const e=ms[o];e in n&&void 0!==n[e]&&null!==n[e]&&(this[e]="history"===e?[...n[e]]:n[e])}for(t in n)ms.includes(t)||(this[t]=n[t])}get basename(){return"string"==typeof this.path?ps.basename(this.path):void 0}set basename(e){xs(e,"basename"),ys(e,"basename"),this.path=ps.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ps.dirname(this.path):void 0}set dirname(e){ws(this.basename,"dirname"),this.path=ps.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ps.extname(this.path):void 0}set extname(e){if(ys(e,"extname"),ws(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ps.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){gs(e)&&(e=bs(e)),xs(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ps.basename(this.path,this.extname):void 0}set stem(e){xs(e,"stem"),ys(e,"stem"),this.path=ps.join(this.dirname||"",e+(this.extname||""))}fail(e,n,t){const o=this.message(e,n,t);throw o.fatal=!0,o}info(e,n,t){const o=this.message(e,n,t);return o.fatal=void 0,o}message(e,n,t){const o=new pr(e,n,t);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function ys(e,n){if(e&&e.includes(ps.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ps.sep+"`")}function xs(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function ws(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}const ks=function(e){const n=this.constructor.prototype,t=n[e],o=function(){return t.apply(o,arguments)};return Object.setPrototypeOf(o,n),o},_s={}.hasOwnProperty;class Cs extends ks{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=ds()}copy(){const e=new Cs;let n=-1;for(;++n<this.attachers.length;){const t=this.attachers[n];e.use(...t)}return e.data(cs(!0,{},this.namespace)),e}data(e,n){return"string"==typeof e?2===arguments.length?(Ts("data",this.frozen),this.namespace[e]=n,this):_s.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Ts("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);const o=n.call(e,...t);"function"==typeof o&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Fs(e),t=this.parser||this.Parser;return Es("parse",t),t(String(n),n)}process(e,n){const t=this;return this.freeze(),Es("process",this.parser||this.Parser),Is("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(o,r){const i=Fs(e),a=t.parse(i);function s(e,t){e||!t?r(e):o?o(t):n(void 0,t)}t.run(a,i,function(e,n,o){if(e||!n||!o)return s(e);const r=n,i=t.stringify(r,o);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?o.value=i:o.result=i,s(e,o)})}}processSync(e){let n,t=!1;return this.freeze(),Es("processSync",this.parser||this.Parser),Is("processSync",this.compiler||this.Compiler),this.process(e,function(e,o){t=!0,ls(e),n=o}),As("processSync","process",t),n}run(e,n,t){Ls(e),this.freeze();const o=this.transformers;return t||"function"!=typeof n||(t=n,n=void 0),t?r(void 0,t):new Promise(r);function r(r,i){const a=Fs(n);o.run(e,a,function(n,o,a){const s=o||e;n?i(n):r?r(s):t(void 0,s,a)})}}runSync(e,n){let t,o=!1;return this.run(e,n,function(e,n){ls(e),t=n,o=!0}),As("runSync","run",o),t}stringify(e,n){this.freeze();const t=Fs(n),o=this.compiler||this.Compiler;return Is("stringify",o),Ls(e),o(e,t)}use(e,...n){const t=this.attachers,o=this.namespace;if(Ts("use",this.frozen),null==e);else if("function"==typeof e)s(e,n);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function r(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[n,...t]=e;s(n,t)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(o.settings=cs(!0,o.settings,e.settings))}function a(e){let n=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++n<e.length;){r(e[n])}}}function s(e,n){let o=-1,r=-1;for(;++o<t.length;)if(t[o][0]===e){r=o;break}if(-1===r)t.push([e,...n]);else if(n.length>0){let[o,...i]=n;const a=t[r][1];us(a)&&us(o)&&(o=cs(!0,a,o)),t[r]=[e,o,...i]}}}}const Ss=(new Cs).freeze();function Es(e,n){if("function"!=typeof n)throw new TypeError("Cannot `"+e+"` without `parser`")}function Is(e,n){if("function"!=typeof n)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ts(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ls(e){if(!us(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function As(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Fs(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new vs(e)}const Ns=[],Ms={allowDangerousHtml:!0},Ps=/^(https?|ircs?|mailto|xmpp)$/i,Ds=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Os(e){const n=zs(e),t=Rs(e);return js(n.runSync(n.parse(t),t),e)}function zs(e){const n=e.rehypePlugins||Ns,t=e.remarkPlugins||Ns,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ms}:Ms;return Ss().use(Ea).use(t).use(ss,o).use(n)}function Rs(e){const n=e.children||"",t=new vs;return"string"==typeof n&&(t.value=n),t}function js(e,n){const t=n.allowedElements,o=n.allowElement,r=n.components,i=n.disallowedElements,a=n.skipHtml,s=n.unwrapDisallowed,l=n.urlTransform||Bs;for(const e of Ds)Object.hasOwn(n,e.from)&&vo((e.from,e.to&&e.to,e.id));return Qa(e,function(e,n,r){if("raw"===e.type&&r&&"number"==typeof n)return a?r.children.splice(n,1):r.children[n]={type:"text",value:e.value},n;if("element"===e.type){let n;for(n in Lr)if(Object.hasOwn(Lr,n)&&Object.hasOwn(e.properties,n)){const t=e.properties[n],o=Lr[n];(null===o||o.includes(e.tagName))&&(e.properties[n]=l(String(t||""),n,e))}}if("element"===e.type){let a=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&o&&"number"==typeof n&&(a=!o(e,n,r)),a&&r&&"number"==typeof n)return s&&e.children?r.children.splice(n,1,...e.children):r.children.splice(n,1),n}}),yr(e,{Fragment:S,components:r,ignoreInvalidStyle:!0,jsx:kn,jsxs:kn,passKeys:!0,passNode:!0})}function Bs(e){const n=e.indexOf(":"),t=e.indexOf("?"),o=e.indexOf("#"),r=e.indexOf("/");return-1===n||-1!==r&&n>r||-1!==t&&n>t||-1!==o&&n>o||Ps.test(e.slice(0,n))?e:""}function Hs(e,n){const t=String(e);if("string"!=typeof n)throw new TypeError("Expected character");let o=0,r=t.indexOf(n);for(;-1!==r;)o++,r=t.indexOf(n,r+n.length);return o}function $s(e,n,t){const o=Ya((t||{}).ignore||[]),r=function(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let o=-1;for(;++o<t.length;){const e=t[o];n.push([Us(e[0]),Ys(e[1])])}return n}(n);let i=-1;for(;++i<r.length;)Xa(e,"text",a);function a(e,n){let t,a=-1;for(;++a<n.length;){const e=n[a],r=t?t.children:void 0;if(o(e,r?r.indexOf(e):void 0,t))return;t=e}if(t)return function(e,n){const t=n[n.length-1],o=r[i][0],a=r[i][1];let s=0;const l=t.children.indexOf(e);let c=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){const t=d.index,r={index:d.index,input:d.input,stack:[...n,e]};let i=a(...d,r);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?o.lastIndex=t+1:(s!==t&&u.push({type:"text",value:e.value.slice(s,t)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=t+d[0].length,c=!0),!o.global)break;d=o.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),t.children.splice(l,1,...u)):u=[e];return l+u.length}(e,n)}}function Us(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Ys(e){return"function"==typeof e?e:function(){return e}}const Vs="phrasing",qs=["autolink","link","image","label"];function Ws(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Zs(e){this.config.enter.autolinkProtocol.call(this,e)}function Gs(e){this.config.exit.autolinkProtocol.call(this,e)}function Ks(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Xs(e){this.config.exit.autolinkEmail.call(this,e)}function Qs(e){this.exit(e)}function Js(e){$s(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,el],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nl]],{ignore:["link","linkReference"]})}function el(e,n,t,o,r){let i="";if(!tl(r))return!1;if(/^w/i.test(n)&&(t=n+t,n="",i="http://"),!function(e){const n=e.split(".");if(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))return!1;return!0}(t))return!1;const a=function(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],o=t.indexOf(")");const r=Hs(e,"(");let i=Hs(e,")");for(;-1!==o&&r>i;)e+=t.slice(0,o+1),t=t.slice(o+1),o=t.indexOf(")"),i++;return[e,t]}(t+o);if(!a[0])return!1;const s={type:"link",title:null,url:i+n+a[0],children:[{type:"text",value:n+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function nl(e,n,t,o){return!(!tl(o,!0)||/[-\d_]$/.test(t))&&{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function tl(e,n){const t=e.input.charCodeAt(e.index-1);return(0===e.index||ni(t)||ei(t))&&(!n||47!==t)}function ol(){this.buffer()}function rl(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function il(){this.buffer()}function al(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function sl(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ll(e){this.exit(e)}function cl(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ul(e){this.exit(e)}function dl(e,n,t,o){const r=t.createTracker(o);let i=r.move("[^");const a=t.enter("footnoteReference"),s=t.enter("reference");return i+=r.move(t.safe(t.associationId(e),{after:"]",before:i})),s(),a(),i+=r.move("]"),i}function pl(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:function(e,t,o,r){const i=o.createTracker(r);let a=i.move("[^");const s=o.enter("footnoteDefinition"),l=o.enter("label");a+=i.move(o.safe(o.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((n?"\n":" ")+o.indentLines(o.containerFlow(e,i.current()),n?fl:hl)));return s(),a},footnoteReference:dl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function hl(e,n,t){return 0===n?e:fl(e,n,t)}function fl(e,n,t){return(t?"":" ")+e}dl.peek=function(){return"["};const gl=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function bl(e){this.enter({type:"delete",children:[]},e)}function ml(e){this.exit(e)}function vl(e,n,t,o){const r=t.createTracker(o),i=t.enter("strikethrough");let a=r.move("~~");return a+=t.containerPhrasing(e,{...r.current(),before:a,after:"~"}),a+=r.move("~~"),i(),a}function yl(e){return e.length}function xl(e){return null==e?"":String(e)}function wl(e){const n="string"==typeof e?e.codePointAt(0):0;return 67===n||99===n?99:76===n||108===n?108:82===n||114===n?114:0}vl.peek=function(){return"~"};function kl(e,n,t){return">"+(t?"":" ")+e}function _l(e,n){return Cl(e,n.inConstruct,!0)&&!Cl(e,n.notInConstruct,!1)}function Cl(e,n,t){if("string"==typeof n&&(n=[n]),!n||0===n.length)return t;let o=-1;for(;++o<n.length;)if(e.includes(n[o]))return!0;return!1}function Sl(e,n,t,o){let r=-1;for(;++r<t.unsafe.length;)if("\n"===t.unsafe[r].character&&_l(t.stack,t.unsafe[r]))return/[ \t]/.test(o.before)?"":" ";return"\\\n"}function El(e,n){return Boolean(!1===n.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Il(e,n,t){return(t?"":" ")+e}function Tl(e){const n=e.options.quote||'"';if('"'!==n&&"'"!==n)throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Ll(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Al(e,n,t){const o=li(e),r=li(n);return void 0===o?void 0===r?"_"===t?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===r?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===o?void 0===r?{inside:!1,outside:!1}:1===r?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===r?{inside:!1,outside:!1}:1===r?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Fl(e,n,t,o){const r=function(e){const n=e.options.emphasis||"*";if("*"!==n&&"_"!==n)throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}(t),i=t.enter("emphasis"),a=t.createTracker(o),s=a.move(r);let l=a.move(t.containerPhrasing(e,{after:r,before:s,...a.current()}));const c=l.charCodeAt(0),u=Al(o.before.charCodeAt(o.before.length-1),c,r);u.inside&&(l=Ll(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Al(o.after.charCodeAt(0),d,r);p.inside&&(l=l.slice(0,-1)+Ll(d));const h=a.move(r);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+h}function Nl(e,n){let t=!1;return Qa(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return t=!0,Ka}),Boolean((!e.depth||e.depth<3)&&Fr(e)&&(n.options.setext||t))}function Ml(e){return e.value||""}function Pl(e,n,t,o){const r=Tl(t),i='"'===r?"Quote":"Apostrophe",a=t.enter("image");let s=t.enter("label");const l=t.createTracker(o);let c=l.move("![");return c+=l.move(t.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=t.enter("destinationRaw"),c+=l.move(t.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${i}`),c+=l.move(" "+r),c+=l.move(t.safe(e.title,{before:c,after:r,...l.current()})),c+=l.move(r),s()),c+=l.move(")"),a(),c}function Dl(e,n,t,o){const r=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const s=t.createTracker(o);let l=s.move("![");const c=t.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=t.stack;t.stack=[],a=t.enter("reference");const d=t.safe(t.associationId(e),{before:l,after:"]",...s.current()});return a(),t.stack=u,i(),"full"!==r&&c&&c===d?"shortcut"===r?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ol(e,n,t){let o=e.value||"",r="`",i=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(o);)r+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++i<t.unsafe.length;){const e=t.unsafe[i],n=t.compilePattern(e);let r;if(e.atBreak)for(;r=n.exec(o);){let e=r.index;10===o.charCodeAt(e)&&13===o.charCodeAt(e-1)&&e--,o=o.slice(0,e)+" "+o.slice(r.index+1)}}return r+o+r}function zl(e,n){const t=Fr(e);return Boolean(!n.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Rl(e,n,t,o){const r=Tl(t),i='"'===r?"Quote":"Apostrophe",a=t.createTracker(o);let s,l;if(zl(e,t)){const n=t.stack;t.stack=[],s=t.enter("autolink");let o=a.move("<");return o+=a.move(t.containerPhrasing(e,{before:o,after:">",...a.current()})),o+=a.move(">"),s(),t.stack=n,o}s=t.enter("link"),l=t.enter("label");let c=a.move("[");return c+=a.move(t.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(t.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=t.enter("destinationRaw"),c+=a.move(t.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=t.enter(`title${i}`),c+=a.move(" "+r),c+=a.move(t.safe(e.title,{before:c,after:r,...a.current()})),c+=a.move(r),l()),c+=a.move(")"),s(),c}function jl(e,n,t,o){const r=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const s=t.createTracker(o);let l=s.move("[");const c=t.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=t.stack;t.stack=[],a=t.enter("reference");const d=t.safe(t.associationId(e),{before:l,after:"]",...s.current()});return a(),t.stack=u,i(),"full"!==r&&c&&c===d?"shortcut"===r?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Bl(e){const n=e.options.bullet||"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Hl(e){const n=e.options.rule||"*";if("*"!==n&&"-"!==n&&"_"!==n)throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}Fl.peek=function(e,n,t){return t.options.emphasis||"*"},Ml.peek=function(){return"<"},Pl.peek=function(){return"!"},Dl.peek=function(){return"!"},Ol.peek=function(){return"`"},Rl.peek=function(e,n,t){return zl(e,t)?"<":"["},jl.peek=function(){return"["};const $l=Ya(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ul(e,n,t,o){const r=function(e){const n=e.options.strong||"*";if("*"!==n&&"_"!==n)throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}(t),i=t.enter("strong"),a=t.createTracker(o),s=a.move(r+r);let l=a.move(t.containerPhrasing(e,{after:r,before:s,...a.current()}));const c=l.charCodeAt(0),u=Al(o.before.charCodeAt(o.before.length-1),c,r);u.inside&&(l=Ll(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Al(o.after.charCodeAt(0),d,r);p.inside&&(l=l.slice(0,-1)+Ll(d));const h=a.move(r+r);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+h}Ul.peek=function(e,n,t){return t.options.strong||"*"};const Yl={blockquote:function(e,n,t,o){const r=t.enter("blockquote"),i=t.createTracker(o);i.move("> "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),kl);return r(),a},break:Sl,code:function(e,n,t,o){const r=function(e){const n=e.options.fence||"`";if("`"!==n&&"~"!==n)throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}(t),i=e.value||"",a="`"===r?"GraveAccent":"Tilde";if(El(e,t)){const e=t.enter("codeIndented"),n=t.indentLines(i,Il);return e(),n}const s=t.createTracker(o),l=r.repeat(Math.max(function(e,n){const t=String(e);let o=t.indexOf(n),r=o,i=0,a=0;if("string"!=typeof n)throw new TypeError("Expected substring");for(;-1!==o;)o===r?++i>a&&(a=i):i=1,r=o+n.length,o=t.indexOf(n,r);return a}(i,r)+1,3)),c=t.enter("codeFenced");let u=s.move(l);if(e.lang){const n=t.enter(`codeFencedLang${a}`);u+=s.move(t.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),n()}if(e.lang&&e.meta){const n=t.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(t.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),n()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,n,t,o){const r=Tl(t),i='"'===r?"Quote":"Apostrophe",a=t.enter("definition");let s=t.enter("label");const l=t.createTracker(o);let c=l.move("[");return c+=l.move(t.safe(t.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=t.enter("destinationRaw"),c+=l.move(t.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=t.enter(`title${i}`),c+=l.move(" "+r),c+=l.move(t.safe(e.title,{before:c,after:r,...l.current()})),c+=l.move(r),s()),a(),c},emphasis:Fl,hardBreak:Sl,heading:function(e,n,t,o){const r=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(o);if(Nl(e,t)){const n=t.enter("headingSetext"),o=t.enter("phrasing"),a=t.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return o(),n(),a+"\n"+(1===r?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(r),s=t.enter("headingAtx"),l=t.enter("phrasing");i.move(a+" ");let c=t.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=Ll(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,t.options.closeAtx&&(c+=" "+a),l(),s(),c},html:Ml,image:Pl,imageReference:Dl,inlineCode:Ol,link:Rl,linkReference:jl,list:function(e,n,t,o){const r=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?function(e){const n=e.options.bulletOrdered||".";if("."!==n&&")"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}(t):Bl(t);const s=e.ordered?"."===a?")":".":function(e){const n=Bl(e),t=e.options.bulletOther;if(!t)return"*"===n?"-":"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}(t);let l=!(!n||!t.bulletLastUsed)&&a===t.bulletLastUsed;if(!e.ordered){const n=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!n||n.children&&n.children[0]||"list"!==t.stack[t.stack.length-1]||"listItem"!==t.stack[t.stack.length-2]||"list"!==t.stack[t.stack.length-3]||"listItem"!==t.stack[t.stack.length-4]||0!==t.indexStack[t.indexStack.length-1]||0!==t.indexStack[t.indexStack.length-2]||0!==t.indexStack[t.indexStack.length-3]||(l=!0),Hl(t)===a&&n){let n=-1;for(;++n<e.children.length;){const t=e.children[n];if(t&&"listItem"===t.type&&t.children&&t.children[0]&&"thematicBreak"===t.children[0].type){l=!0;break}}}}l&&(a=s),t.bulletCurrent=a;const c=t.containerFlow(e,o);return t.bulletLastUsed=a,t.bulletCurrent=i,r(),c},listItem:function(e,n,t,o){const r=function(e){const n=e.options.listItemIndent||"one";if("tab"!==n&&"one"!==n&&"mixed"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}(t);let i=t.bulletCurrent||Bl(t);n&&"list"===n.type&&n.ordered&&(i=("number"==typeof n.start&&n.start>-1?n.start:1)+(!1===t.options.incrementListMarker?0:n.children.indexOf(e))+i);let a=i.length+1;("tab"===r||"mixed"===r&&(n&&"list"===n.type&&n.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=t.createTracker(o);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,s.current()),function(e,n,t){if(n)return(t?"":" ".repeat(a))+e;return(t?i:i+" ".repeat(a-i.length))+e});return l(),c},paragraph:function(e,n,t,o){const r=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,o);return i(),r(),a},root:function(e,n,t,o){const r=e.children.some(function(e){return $l(e)});return(r?t.containerPhrasing:t.containerFlow).call(t,e,o)},strong:Ul,text:function(e,n,t,o){return t.safe(e.value,o)},thematicBreak:function(e,n,t){const o=(Hl(t)+(t.options.ruleSpaces?" ":"")).repeat(function(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}(t));return t.options.ruleSpaces?o.slice(0,-1):o}};function Vl(e){const n=e._align;this.enter({type:"table",align:n.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function ql(e){this.exit(e),this.data.inTable=void 0}function Wl(e){this.enter({type:"tableRow",children:[]},e)}function Zl(e){this.exit(e)}function Gl(e){this.enter({type:"tableCell",children:[]},e)}function Kl(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Xl));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Xl(e,n){return"|"===n?n:e}function Ql(e){const n=e||{},t=n.tableCellPadding,o=n.tablePipeAlign,r=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,n,t){let o=Yl.inlineCode(e,n,t);t.stack.includes("tableCell")&&(o=o.replace(/\|/g,"\\$&"));return o},table:function(e,n,t,o){return s(function(e,n,t){const o=e.children;let r=-1;const i=[],a=n.enter("table");for(;++r<o.length;)i[r]=l(o[r],n,t);return a(),i}(e,t,o),e.align)},tableCell:a,tableRow:function(e,n,t,o){const r=l(e,t,o),i=s([r]);return i.slice(0,i.indexOf("\n"))}}};function a(e,n,t,o){const r=t.enter("tableCell"),a=t.enter("phrasing"),s=t.containerPhrasing(e,{...o,before:i,after:i});return a(),r(),s}function s(e,n){return function(e,n){const t=n||{},o=(t.align||[]).concat(),r=t.stringLength||yl,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const n=[],o=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=xl(e[u][i]);if(!1!==t.alignDelimiters){const e=r(a);o[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}n.push(a)}a[u]=n,s[u]=o}let d=-1;if("object"==typeof o&&"length"in o)for(;++d<c;)i[d]=wl(o[d]);else{const e=wl(o);for(;++d<c;)i[d]=e}d=-1;const p=[],h=[];for(;++d<c;){const e=i[d];let n="",o="";99===e?(n=":",o=":"):108===e?n=":":114===e&&(o=":");let r=!1===t.alignDelimiters?1:Math.max(1,l[d]-n.length-o.length);const a=n+"-".repeat(r)+o;!1!==t.alignDelimiters&&(r=n.length+r+o.length,r>l[d]&&(l[d]=r),h[d]=r),p[d]=a}a.splice(1,0,p),s.splice(1,0,h),u=-1;const f=[];for(;++u<a.length;){const e=a[u],n=s[u];d=-1;const o=[];for(;++d<c;){const r=e[d]||"";let a="",s="";if(!1!==t.alignDelimiters){const e=l[d]-(n[d]||0),t=i[d];114===t?a=" ".repeat(e):99===t?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===t.delimiterStart||d||o.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===r||!1===t.delimiterStart&&!d||o.push(" "),!1!==t.alignDelimiters&&o.push(a),o.push(r),!1!==t.alignDelimiters&&o.push(s),!1!==t.padding&&o.push(" "),!1===t.delimiterEnd&&d===c-1||o.push("|")}f.push(!1===t.delimiterEnd?o.join("").replace(/ +$/,""):o.join(""))}return f.join("\n")}(e,{align:n,alignDelimiters:o,padding:t,stringLength:r})}function l(e,n,t){const o=e.children;let r=-1;const i=[],s=n.enter("tableRow");for(;++r<o.length;)i[r]=a(o[r],0,n,t);return s(),i}}function Jl(e){const n=this.stack[this.stack.length-2];n.type,n.checked="taskListCheckValueChecked"===e.type}function ec(e){const n=this.stack[this.stack.length-2];if(n&&"listItem"===n.type&&"boolean"==typeof n.checked){const e=this.stack[this.stack.length-1];e.type;const t=e.children[0];if(t&&"text"===t.type){const o=n.children;let r,i=-1;for(;++i<o.length;){const e=o[i];if("paragraph"===e.type){r=e;break}}r===e&&(t.value=t.value.slice(1),0===t.value.length?e.children.shift():e.position&&t.position&&"number"==typeof t.position.start.offset&&(t.position.start.column++,t.position.start.offset++,e.position.start=Object.assign({},t.position.start)))}}this.exit(e)}function nc(e,n,t,o){const r=e.children[0],i="boolean"==typeof e.checked&&r&&"paragraph"===r.type,a="["+(e.checked?"x":" ")+"] ",s=t.createTracker(o);i&&s.move(a);let l=Yl.listItem(e,n,t,{...o,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const tc={tokenize:function(e,n,t){let o=0;return function n(i){if((87===i||119===i)&&o<3)return o++,e.consume(i),n;if(46===i&&3===o)return e.consume(i),r;return t(i)};function r(e){return null===e?t(e):n(e)}},partial:!0},oc={tokenize:function(e,n,t){let o,r,i;return a;function a(n){return 46===n||95===n?e.check(ic,l,s)(n):null===n||Qr(n)||ni(n)||45!==n&&ei(n)?l(n):(i=!0,e.consume(n),a)}function s(n){return 95===n?o=!0:(r=o,o=void 0),e.consume(n),a}function l(e){return r||o||!i?t(e):n(e)}},partial:!0},rc={tokenize:function(e,n){let t=0,o=0;return r;function r(a){return 40===a?(t++,e.consume(a),r):41===a&&o<t?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(ic,n,i)(a):null===a||Qr(a)||ni(a)?n(a):(e.consume(a),r)}function i(n){return 41===n&&o++,e.consume(n),r}},partial:!0},ic={tokenize:function(e,n,t){return o;function o(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),o):38===a?(e.consume(a),i):93===a?(e.consume(a),r):60===a||null===a||Qr(a)||ni(a)?n(a):t(a)}function r(e){return null===e||40===e||91===e||Qr(e)||ni(e)?n(e):o(e)}function i(e){return Yr(e)?a(e):t(e)}function a(n){return 59===n?(e.consume(n),o):Yr(n)?(e.consume(n),a):t(n)}},partial:!0},ac={tokenize:function(e,n,t){return function(n){return e.consume(n),o};function o(e){return Vr(e)?t(e):n(e)}},partial:!0},sc={name:"wwwAutolink",tokenize:function(e,n,t){const o=this;return function(n){if(87!==n&&119!==n||!pc.call(o,o.previous)||bc(o.events))return t(n);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tc,e.attempt(oc,e.attempt(rc,r),t),t)(n)};function r(t){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(t)}},previous:pc},lc={name:"protocolAutolink",tokenize:function(e,n,t){const o=this;let r="",i=!1;return function(n){if((72===n||104===n)&&hc.call(o,o.previous)&&!bc(o.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(n),e.consume(n),a;return t(n)};function a(n){if(Yr(n)&&r.length<5)return r+=String.fromCodePoint(n),e.consume(n),a;if(58===n){const t=r.toLowerCase();if("http"===t||"https"===t)return e.consume(n),s}return t(n)}function s(n){return 47===n?(e.consume(n),i?l:(i=!0,s)):t(n)}function l(n){return null===n||Wr(n)||Qr(n)||ni(n)||ei(n)?t(n):e.attempt(oc,e.attempt(rc,c),t)(n)}function c(t){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(t)}},previous:hc},cc={name:"emailAutolink",tokenize:function(e,n,t){const o=this;let r,i;return function(n){if(!gc(n)||!fc.call(o,o.previous)||bc(o.events))return t(n);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(n)};function a(n){return gc(n)?(e.consume(n),a):64===n?(e.consume(n),s):t(n)}function s(n){return 46===n?e.check(ac,c,l)(n):45===n||95===n||Vr(n)?(i=!0,e.consume(n),s):c(n)}function l(n){return e.consume(n),r=!0,s}function c(a){return i&&r&&Yr(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(a)):t(a)}},previous:fc},uc={};let dc=48;for(;dc<123;)uc[dc]=cc,dc++,58===dc?dc=65:91===dc&&(dc=97);function pc(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Qr(e)}function hc(e){return!Yr(e)}function fc(e){return!(47===e||gc(e))}function gc(e){return 43===e||45===e||46===e||95===e||Vr(e)}function bc(e){let n=e.length,t=!1;for(;n--;){const o=e[n][1];if(("labelLink"===o.type||"labelImage"===o.type)&&!o._balanced){t=!0;break}if(o._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}uc[43]=cc,uc[45]=cc,uc[46]=cc,uc[95]=cc,uc[72]=[cc,lc],uc[104]=[cc,lc],uc[87]=[cc,sc],uc[119]=[cc,sc];const mc={tokenize:function(e,n,t){const o=this;return ri(e,function(e){const r=o.events[o.events.length-1];return r&&"gfmFootnoteDefinitionIndent"===r[1].type&&4===r[2].sliceSerialize(r[1],!0).length?n(e):t(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function vc(e,n,t){const o=this;let r=o.events.length;const i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a;for(;r--;){const e=o.events[r][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(r){if(!a||!a._balanced)return t(r);const s=Ur(o.sliceSerialize({start:a.end,end:o.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return t(r);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),n(r)}}function yc(e,n){let t,o=e.length;for(;o--;)if("labelImage"===e[o][1].type&&"enter"===e[o][0]){t=e[o][1];break}e[o+1][1].type="data",e[o+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[o+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[o+3][1].end),end:Object.assign({},e[o+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[o+1],e[o+2],["enter",r,n],e[o+3],e[o+4],["enter",i,n],["exit",i,n],["enter",a,n],["enter",s,n],["exit",s,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(o,e.length-o+1,...l),e}function xc(e,n,t){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i,a=0;return function(n){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(n),e.exit("gfmFootnoteCallLabelMarker"),s};function s(n){return 94!==n?t(n):(e.enter("gfmFootnoteCallMarker"),e.consume(n),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||Qr(s))return t(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return r.includes(Ur(o.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(s)}return Qr(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(n){return 91===n||92===n||93===n?(e.consume(n),a++,l):l(n)}}function wc(e,n,t){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i,a,s=0;return function(n){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(n),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(n){return 94===n?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(n),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):t(n)}function c(n){if(s>999||93===n&&!a||null===n||91===n||Qr(n))return t(n);if(93===n){e.exit("chunkString");const t=e.exit("gfmFootnoteDefinitionLabelString");return i=Ur(o.sliceSerialize(t)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(n),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Qr(n)||(a=!0),s++,e.consume(n),92===n?u:c}function u(n){return 91===n||92===n||93===n?(e.consume(n),s++,c):c(n)}function d(n){return 58===n?(e.enter("definitionMarker"),e.consume(n),e.exit("definitionMarker"),r.includes(i)||r.push(i),ri(e,p,"gfmFootnoteDefinitionWhitespace")):t(n)}function p(e){return n(e)}}function kc(e,n,t){return e.check(hi,n,e.attempt(mc,n,t))}function _c(e){e.exit("gfmFootnoteDefinition")}function Cc(e){let n=(e||{}).singleTilde;const t={name:"strikethrough",tokenize:function(e,t,o){const r=this.previous,i=this.events;let a=0;return function(n){if(126===r&&"characterEscape"!==i[i.length-1][1].type)return o(n);return e.enter("strikethroughSequenceTemporary"),s(n)};function s(i){const l=li(r);if(126===i)return a>1?o(i):(e.consume(i),a++,s);if(a<2&&!n)return o(i);const c=e.exit("strikethroughSequenceTemporary"),u=li(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),t(i)}},resolveAll:function(e,n){let t=-1;for(;++t<e.length;)if("enter"===e[t][0]&&"strikethroughSequenceTemporary"===e[t][1].type&&e[t][1]._close){let o=t;for(;o--;)if("exit"===e[o][0]&&"strikethroughSequenceTemporary"===e[o][1].type&&e[o][1]._open&&e[t][1].end.offset-e[t][1].start.offset===e[o][1].end.offset-e[o][1].start.offset){e[t][1].type="strikethroughSequence",e[o][1].type="strikethroughSequence";const r={type:"strikethrough",start:Object.assign({},e[o][1].start),end:Object.assign({},e[t][1].end)},i={type:"strikethroughText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[t][1].start)},a=[["enter",r,n],["enter",e[o][1],n],["exit",e[o][1],n],["enter",i,n]],s=n.parser.constructs.insideSpan.null;s&&Or(a,a.length,0,ci(s,e.slice(o+1,t),n)),Or(a,a.length,0,[["exit",i,n],["enter",e[t][1],n],["exit",e[t][1],n],["exit",r,n]]),Or(e,o-1,t-o+3,a),t=o+a.length-2;break}}t=-1;for(;++t<e.length;)"strikethroughSequenceTemporary"===e[t][1].type&&(e[t][1].type="data");return e}};return null==n&&(n=!0),{text:{126:t},insideSpan:{null:[t]},attentionMarkers:{null:[126]}}}class Sc{constructor(){this.map=[]}add(e,n,t){!function(e,n,t,o){let r=0;if(0===t&&0===o.length)return;for(;r<e.map.length;){if(e.map[r][0]===n)return e.map[r][1]+=t,void e.map[r][2].push(...o);r+=1}e.map.push([n,t,o])}(this,e,n,t)}consume(e){if(this.map.sort(function(e,n){return e[0]-n[0]}),0===this.map.length)return;let n=this.map.length;const t=[];for(;n>0;)n-=1,t.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];t.push(e.slice()),e.length=0;let o=t.pop();for(;o;){for(const n of o)e.push(n);o=t.pop()}this.map.length=0}}function Ec(e,n){let t=!1;const o=[];for(;n<e.length;){const r=e[n];if(t){if("enter"===r[0])"tableContent"===r[1].type&&o.push("tableDelimiterMarker"===e[n+1][1].type?"left":"none");else if("tableContent"===r[1].type){if("tableDelimiterMarker"===e[n-1][1].type){const e=o.length-1;o[e]="left"===o[e]?"center":"right"}}else if("tableDelimiterRow"===r[1].type)break}else"enter"===r[0]&&"tableDelimiterRow"===r[1].type&&(t=!0);n+=1}return o}function Ic(e,n,t){const o=this;let r,i=0,a=0;return function(e){let n=o.events.length-1;for(;n>-1;){const e=o.events[n][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;n--}const r=n>-1?o.events[n][1].type:null,i="tableHead"===r||"tableRow"===r?x:s;if(i===x&&o.parser.lazy[o.now().line])return t(e);return i(e)};function s(n){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return r=!0,a+=1,l(e)}(n)}function l(n){return null===n?t(n):Xr(n)?a>1?(a=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),d):t(n):Jr(n)?ri(e,l,"whitespace")(n):(a+=1,r&&(r=!1,i+=1),124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),r=!0,l):(e.enter("data"),c(n)))}function c(n){return null===n||124===n||Qr(n)?(e.exit("data"),l(n)):(e.consume(n),92===n?u:c)}function u(n){return 92===n||124===n?(e.consume(n),c):c(n)}function d(n){return o.interrupt=!1,o.parser.lazy[o.now().line]?t(n):(e.enter("tableDelimiterRow"),r=!1,Jr(n)?ri(e,p,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):p(n))}function p(n){return 45===n||58===n?f(n):124===n?(r=!0,e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),h):y(n)}function h(n){return Jr(n)?ri(e,f,"whitespace")(n):f(n)}function f(n){return 58===n?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),g):45===n?(a+=1,g(n)):null===n||Xr(n)?v(n):y(n)}function g(n){return 45===n?(e.enter("tableDelimiterFiller"),b(n)):y(n)}function b(n){return 45===n?(e.consume(n),b):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(n))}function m(n){return Jr(n)?ri(e,v,"whitespace")(n):v(n)}function v(t){return 124===t?p(t):(null===t||Xr(t))&&r&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(t)):y(t)}function y(e){return t(e)}function x(n){return e.enter("tableRow"),w(n)}function w(t){return 124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),w):null===t||Xr(t)?(e.exit("tableRow"),n(t)):Jr(t)?ri(e,w,"whitespace")(t):(e.enter("data"),k(t))}function k(n){return null===n||124===n||Qr(n)?(e.exit("data"),w(n)):(e.consume(n),92===n?_:k)}function _(n){return 92===n||124===n?(e.consume(n),k):k(n)}}function Tc(e,n){let t,o,r,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Sc;for(;++i<e.length;){const h=e[i],f=h[1];"enter"===h[0]?"tableHead"===f.type?(u=!1,0!==d&&(Ac(p,n,d,t,o),o=void 0,d=0),t={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(i,0,[["enter",t,n]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(a=!0,r=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,o={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},p.add(i,0,[["enter",o,n]])),s="tableDelimiterRow"===f.type?2:o?3:1):!s||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type?"tableCellDivider"===f.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],r=Lc(p,n,l,s,void 0,r)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],r=Lc(p,n,l,s,void 0,r),l=[0,0,0,0]),c[2]=i)):"tableHead"===f.type?(u=!0,d=i):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=i,0!==l[1]?(c[0]=c[1],r=Lc(p,n,l,s,i,r)):0!==c[1]&&(r=Lc(p,n,c,s,i,r)),s=0):!s||"data"!==f.type&&"tableDelimiterMarker"!==f.type&&"tableDelimiterFiller"!==f.type||(c[3]=i)}for(0!==d&&Ac(p,n,d,t,o),p.consume(n.events),i=-1;++i<n.events.length;){const e=n.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Ec(n.events,i))}return e}function Lc(e,n,t,o,r,i){const a=1===o?"tableHeader":2===o?"tableDelimiter":"tableData";0!==t[0]&&(i.end=Object.assign({},Fc(n.events,t[0])),e.add(t[0],0,[["exit",i,n]]));const s=Fc(n.events,t[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(t[1],0,[["enter",i,n]]),0!==t[2]){const r=Fc(n.events,t[2]),i=Fc(n.events,t[3]),a={type:"tableContent",start:Object.assign({},r),end:Object.assign({},i)};if(e.add(t[2],0,[["enter",a,n]]),2!==o){const o=n.events[t[2]],r=n.events[t[3]];if(o[1].end=Object.assign({},r[1].end),o[1].type="chunkText",o[1].contentType="text",t[3]>t[2]+1){const n=t[2]+1,o=t[3]-t[2]-1;e.add(n,o,[])}}e.add(t[3]+1,0,[["exit",a,n]])}return void 0!==r&&(i.end=Object.assign({},Fc(n.events,r)),e.add(r,0,[["exit",i,n]]),i=void 0),i}function Ac(e,n,t,o,r){const i=[],a=Fc(n.events,t);r&&(r.end=Object.assign({},a),i.push(["exit",r,n])),o.end=Object.assign({},a),i.push(["exit",o,n]),e.add(t+1,0,i)}function Fc(e,n){const t=e[n],o="enter"===t[0]?"start":"end";return t[1][o]}const Nc=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi;new RegExp("^"+Nc.source,"i");const Mc={name:"tasklistCheck",tokenize:function(e,n,t){const o=this;return function(n){if(null!==o.previous||!o._gfmTasklistFirstContentOfListItem)return t(n);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),r};function r(n){return Qr(n)?(e.enter("taskListCheckValueUnchecked"),e.consume(n),e.exit("taskListCheckValueUnchecked"),i):88===n||120===n?(e.enter("taskListCheckValueChecked"),e.consume(n),e.exit("taskListCheckValueChecked"),i):t(n)}function i(n){return 93===n?(e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(n)}function a(o){return Xr(o)?n(o):Jr(o)?e.check({tokenize:Pc},n,t)(o):t(o)}}};function Pc(e,n,t){return ri(e,function(e){return null===e?t(e):n(e)},"whitespace")}const Dc={};function Oc(e){const n=e||Dc,t=this.data(),o=t.micromarkExtensions||(t.micromarkExtensions=[]),r=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),i=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);o.push(function(e){return jr([{text:uc},{document:{91:{name:"gfmFootnoteDefinition",tokenize:wc,continuation:{tokenize:kc},exit:_c}},text:{91:{name:"gfmFootnoteCall",tokenize:xc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vc,resolveTo:yc}}},Cc(e),{flow:{null:{name:"table",tokenize:Ic,resolveAll:Tc}}},{text:{91:Mc}}])}(n)),r.push([{transforms:[Js],enter:{literalAutolink:Ws,literalAutolinkEmail:Zs,literalAutolinkHttp:Zs,literalAutolinkWww:Zs},exit:{literalAutolink:Qs,literalAutolinkEmail:Xs,literalAutolinkHttp:Gs,literalAutolinkWww:Ks}},{enter:{gfmFootnoteCallString:ol,gfmFootnoteCall:rl,gfmFootnoteDefinitionLabelString:il,gfmFootnoteDefinition:al},exit:{gfmFootnoteCallString:sl,gfmFootnoteCall:ll,gfmFootnoteDefinitionLabelString:cl,gfmFootnoteDefinition:ul}},{canContainEols:["delete"],enter:{strikethrough:bl},exit:{strikethrough:ml}},{enter:{table:Vl,tableData:Gl,tableHeader:Gl,tableRow:Wl},exit:{codeText:Kl,table:ql,tableData:Zl,tableHeader:Zl,tableRow:Zl}},{exit:{taskListCheckValueChecked:Jl,taskListCheckValueUnchecked:Jl,paragraph:ec}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Vs,notInConstruct:qs},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Vs,notInConstruct:qs},{character:":",before:"[ps]",after:"\\/",inConstruct:Vs,notInConstruct:qs}]},pl(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:gl}],handlers:{delete:vl}},Ql(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nc}}]}}(n))}var zc=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t};const Rc=({children:e,forceMarkdown:n})=>e?!n&&(e=>!!e&&[/<[^>]+>/,/&[a-zA-Z0-9]+;/,/<\/[^>]+>/].some(n=>n.test(e)))(e)?kn("div",{className:"message-text",dangerouslySetInnerHTML:{__html:e}}):kn("div",{className:"message-text",children:kn(Os,{remarkPlugins:[Oc],components:{a:e=>{var{node:n}=e,t=zc(e,["node"]);return kn("a",Object.assign({},t,{target:"_blank",rel:"noopener noreferrer"}))}},children:e})}):null,jc=({label:e})=>{const{agentLibrary:n}=po(),[,t]=n.opened;return kn("button",{className:"btn-base accordion-button",onClick:t.open,type:"button",id:"sidebar-button",children:e})},Bc=()=>{const{accordionAnimated:e,functionsExpanded:n,setFunctionsExpanded:t,aboutAiExpanded:o,setAboutAiExpanded:r,availableLanguages:i,t:a,configData:{finalConfig:s}}=po();return kn("div",{className:"accordion-section",style:{opacity:e?1:0,transform:e?"translateY(0)":"translateY(20px)",transition:"all 0.6s ease-out"},children:[kn("div",{className:"accordion-buttons",style:{display:"flex",justifyContent:"center",alignItems:"flex-start",gap:"15px"},children:[me(()=>!0===s.stt||(!0===s.tts||(!0===s.easy_language||i.size>1)),[s,i])&&kn("button",{className:"btn-base accordion-button"+(n?" open":""),onClick:()=>{t(!n),o&&r(!1)},"aria-expanded":n,"aria-controls":"functions-content",type:"button",id:"functions-button",children:["Funktionen",kn(Sn,n?{svg:In}:{svg:En})]}),s.about&&kn("button",{className:"btn-base accordion-button"+(o?" open":""),onClick:()=>{r(!o),n&&t(!1)},"aria-expanded":o,"aria-controls":"about-ai-content",type:"button",id:"about-ai-button",children:["Über die KI",kn(Sn,o?{svg:In}:{svg:En})]})]}),s.sidebarButtonLabel&&kn("div",{style:{display:"flex",justifyContent:"center",marginTop:"15px"},children:kn(jc,{label:s.sidebarButtonLabel})}),n&&kn("div",{id:"functions-content",className:"accordion-content",role:"region","aria-labelledby":"functions-button",children:kn("ul",{children:[!0===s.stt&&kn("li",{children:[kn("div",{className:"function-icon",children:kn(Pn,{type:"microphone"})}),kn("span",{children:[kn("strong",{children:"Spracheingabe:"})," Sprechen Sie Ihre Frage einfach über das Mikrofon ein."]})]}),!0===s.tts&&kn("li",{children:[kn("div",{className:"function-icon",children:kn(Pn,{type:"speaker"})}),kn("span",{children:[kn("strong",{children:"Vorlesen:"})," Lassen Sie sich die einzelnen Antworten vorlesen."]})]}),!0===s.easy_language&&kn("li",{children:[kn("div",{className:"function-icon",children:kn(Pn,{type:"chat"})}),kn("span",{children:[kn("strong",{children:"Verständliche Sprache:"})," Für einfachere und verständlichere Antworten"]})]}),i.size>1&&kn("li",{children:[kn("div",{className:"function-icon",children:kn(Pn,{type:"globe"})}),kn("span",{children:[kn("strong",{children:[a.languageSelection.title,":"]})," ",a.languageSelection.description]})]})]})}),o&&s.about&&kn("div",{id:"about-ai-content",className:"accordion-content",role:"region","aria-labelledby":"about-ai-button",children:kn(Rc,{children:s.about})})]})},Hc=({icon:e,title:n})=>e?kn("div",{className:"chatbot-logo",style:{textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center"},children:kn("img",{src:`${Rn}/assets/${e}`,alt:`Chatbot Icon - ${n||"Chatbot"}`,style:{maxHeight:"80px",width:"auto",height:"auto",objectFit:"contain"},role:"img","aria-label":"Chatbot Logo"})}):null,$c=({hide:e,icon:n,title:t,welcomeMessage:o,dimmed:r=!1})=>{const{entrySource:i,conversation:{isConversationActive:a},configData:{finalConfig:s}}=po();return e?null:kn("div","search"===i&&!a?{className:"welcome-section "+(r?"dimmed":""),children:[kn("h1",{id:"search-title",style:{margin:0,fontSize:"28px",fontWeight:"600",color:"var(--text-primary)",textAlign:"center",marginBottom:"16px"},children:"Suche"}),kn("p",{id:"search-description",style:{margin:0,fontSize:"16px",color:"var(--text-secondary)",textAlign:"center",marginBottom:"32px"},children:"Geben Sie Ihren Suchbegriff ein"})]}:{className:"welcome-section "+(r?"dimmed":""),children:[kn(Hc,{icon:n,title:t}),kn("h1",{id:"chat-title",className:"welcome-greeting",children:t}),kn("p",{id:"chat-description",className:"welcome-text",children:o}),kn("p",{id:"chat-description-fix",className:"welcome-text welcome-text--notification",children:[kn(Sn,{svg:Fn}),kn("span",{children:s.welcomeDisclaimer||"Bitte geben Sie keine persönlichen Daten an!"})]}),kn(Bc,{})]})},Uc=(...e)=>e.filter(Boolean).join(" "),Yc=({})=>{const{conversation:{isConversationStarting:e,isConversationActive:n,inputAnimationState:t,sendMessageWithUI:o},entrySource:r,configData:{finalConfig:i}}=po(),a=me(()=>Uc("quick-buttons-container",e?"conversation-starting":"","fadeOut"===t?"quick-buttons-fade-out":""),[e,t]);return"search"===r||0===i.quickButtons.length||n?null:kn("div",{className:a,role:"group","aria-label":"Häufige Fragen",children:kn("div",{className:"quick-buttons-wrapper",children:i.quickButtons.map((e,n)=>kn("div",{className:"quick-button-wrapper",children:kn("button",{className:"btn-base quick-button",onClick:()=>o(e),type:"button","aria-label":`Häufige Frage: ${e}`,children:e})},n))})})},Vc=e=>{if(""===e.trim())return"";const n=e.replace(/\\n/g,"\n").split("\n"),t=[];let o=!1;const r=n.length;for(const[e,i]of n.entries()){const a=i.trim(),s=e<r-1?n[e+1]:"";a.startsWith("- ")?(o=!0,t.push(i)):a.startsWith("• ")?(o=!0,t.push(i.replace("• ","- "))):""===a&&o?s.startsWith("- ")||s.startsWith("• ")?t.push(i):(t.push(i),o=!1):(a.startsWith("- ")||a.startsWith("• ")||(o=!1),t.push(i))}return t.join("\n")},qc=({children:e,isThinking:n,sender:t})=>kn("div",{className:Uc("message-bubble",`${t}-message`,n?"thinking":""),role:"article","aria-label":("bot"===t?"Bot":"Benutzer")+"-Nachricht",children:e});var Wc=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Zc=({isFeedbackExpanded:e,isThinking:n,sender:t,foldFeedback:o,messageId:r})=>{const{showSuccess:i,showError:a}=xt(),{t:s,session:l}=po(),[c,u]=de(""),[d,{open:p,close:h}]=_n(),f=()=>Wc(void 0,void 0,void 0,function*(){if(c.trim()&&!d){p();try{if(void 0===r)return console.error("Feedback request invalid, no traceId"),void a(s.toast.feedbackError);e={comment:c,traceId:r},n=l.sessionState.sessionToken,Yn(void 0,void 0,void 0,function*(){const{traceId:t,comment:o}=e;if(!Bn(t))throw new Error(`Invalid traceId - must be string (8-128 chars): ${t}`);if(!$n(o))throw new Error("Feedback comment is required and must be a non-empty string");const r=`${jn}/api/rate`,i={traceId:t,name:"feedback",comment:o.trim()},a=yield fetch(r,zn(i,n));if(!a.ok){const e=yield a.text();throw new Error(`API request failed: ${a.status} - ${e}`)}return a}),u(""),o(),i(s.toast.feedbackSuccess,5e3),console.log("Feedback submitted successfully to AI-Gelb API")}catch(e){console.error("Feedback request failed:",e),a(s.toast.feedbackError)}finally{h()}var e,n}}),g=ve(e=>{"Enter"===e.key&&(e.preventDefault(),f())},[]);return"bot"!==t||n?null:e?void 0===r||""===r?null:kn("div",{className:"feedback-input-section",children:[kn("div",{className:"feedback-divider"}),kn("div",{className:"feedback-content",children:[kn("div",{className:"feedback-header",children:[kn("h4",{className:"feedback-title",children:s.feedback.title}),kn("button",{className:"btn-base feedback-close-button",onClick:o,"aria-label":s.feedback.close,title:s.feedback.closeTitle,children:kn(Sn,{svg:Ln})})]}),kn("div",{className:"feedback-input-container",children:[kn("input",{type:"text",id:`feedback-textarea-${r}`,className:"feedback-textarea",placeholder:s.feedback.placeholder,value:c,onChange:e=>u(e.target.value),onKeyDown:g,disabled:d,"aria-label":s.feedback.placeholder}),kn("button",{className:"btn-base feedback-submit-button "+(!c.trim()||d?"feedback-submit-button--disabled":""),onClick:f,disabled:!c.trim()||d,"aria-label":s.feedback.submitLabel,title:s.feedback.submitTitle,children:kn(Sn,{svg:An})})]})]})]}):null};var Gc=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Kc=({text:e,isComplete:n})=>{const{t}=po(),[o,r]=de(!1),i=ge(null);he(()=>()=>{i.current&&clearTimeout(i.current)},[]);const a=ve(()=>Gc(void 0,void 0,void 0,function*(){try{const n=(e=>e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`(.*?)`/g,"$1").replace(/#{1,6}\s/g,"").replace(/>\s/g,"").replace(/[-*+]\s/g,"").trim())(e);yield navigator.clipboard.writeText(n),r(!0),i.current=setTimeout(()=>r(!1),2e3)}catch(e){console.error("Failed to copy text:",e)}}),[e]);if(!n)return null;const s=o?t.copy.copied:t.copy.tooltip;return kn(Cn,{text:s,delay:300,children:kn("button",{className:"btn-base copy-button "+(o?"copy-button--copied":""),onClick:a,"aria-label":t.copy.ariaLabel,title:s,children:kn("span",{className:"copy-button__icon",children:kn(Sn,{svg:o?'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8.5L6.5 12L13 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>':'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M10.5 1H3.5C2.67157 1 2 1.67157 2 2.5V10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><rect x="5" y="4" width="9" height="11" rx="1.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'})})})})},Xc=({sender:e,isThinking:n,messageId:t,isComplete:o,isSimplified:r,isEasyLanguageEnabled:i,isTTSEnabled:a,expandFeedback:s,text:l,results:c,config:u})=>{const{t:d,configData:{finalConfig:p}}=po();if("bot"!==e)return null;if(n)return null;if(!t&&!a&&!i)return null;const h=me(()=>{if(null===c)return l;const e=c.map((e,n)=>`${d.search.result} ${n+1}:\n${e.title}\n${e.snippet}`);return e.join("\n\n\n")},[l,c,d]);return kn("div",{className:"message-actions",children:[kn("div",{className:"message-actions-left",children:[a&&kn(pt,{text:h,isComplete:o}),kn(at,{messageId:t||"",text:h,isSimplified:r,enabled:i}),p.copyEnabled&&kn(Kc,{text:h,isComplete:o})]}),t&&kn("div",{className:"message-actions-right",children:kn(rt,{traceId:t,config:u,onRatingSubmitted:s,onFeedbackOpen:s})})]})},Qc=({entry:e,last:n})=>kn("div",{style:{marginBottom:"24px",paddingBottom:"16px",borderBottom:n?void 0:"1px solid #e0e0e0"},children:[kn("h2",{style:{margin:"0 0 4px 0",fontSize:"18px",fontWeight:"400",lineHeight:"1.3"},children:kn("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--chat-ai-text-link)",textDecoration:"none",fontWeight:"700"},children:e.title})}),kn("div",{style:{fontSize:"14px",lineHeight:"1.4",color:"#6D6D6D"},children:e.snippet}),kn("h3",{style:{margin:"0 0 8px 0",fontSize:"14px",fontWeight:"400",color:"#6D6D6D",lineHeight:"1.3"},children:e.url})]}),Jc=({questions:e,isLoading:n})=>{const{conversation:{sendMessageWithUI:t},t:o}=po();return n||e&&0!==e.length?kn("div",{className:"follow-up-buttons",children:n?kn("div",{className:"follow-up-loading",children:[kn("span",{className:"follow-up-loading-text",children:o.followUp.loading}),kn("div",{className:"thinking-dots",children:[kn("span",{}),kn("span",{}),kn("span",{})]})]}):e.map((e,n)=>kn("button",{className:"follow-up-button",onClick:()=>t(e),"aria-label":o.followUp.ariaLabel,children:e},n))}):null},eu=({style:e,className:n})=>kn("div",{className:"imageSkeleton"+(n?` ${n}`:""),style:e,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader-icon lucide-loader"><path d="M12 2v4"/><path d="m16.2 7.8 2.9-2.9"/><path d="M18 12h4"/><path d="m16.2 16.2 2.9 2.9"/><path d="M12 18v4"/><path d="m4.9 19.1 2.9-2.9"/><path d="M2 12h4"/><path d="m4.9 4.9 2.9 2.9"/></svg>'})}),nu=({file:e,className:n,style:t})=>{const o=ge(URL.createObjectURL(e)),[r,i]=de(!1);return he(()=>{const e=o.current;return()=>URL.revokeObjectURL(e)},[]),kn(S,{children:[!r&&kn(eu,{}),kn("img",{src:o.current,alt:e.name,className:n,style:Object.assign(Object.assign({},t),{display:r?void 0:"none"}),onLoad:()=>i(!0)})]})},tu=({name:e})=>kn("div",{className:"thumbnailPlaceholder",children:[kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-icon lucide-file"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/></svg>',style:{color:"var(--secondary-gray-light)"}}),kn("span",{className:"fileLabel",children:e})]}),ou={IMAGE:"image/*",TEXT_PLAIN:"text/plain",TEXT_CSV:"text/csv",TEXT_MARKDOWN:"text/markdown",TEXT_HTML:"text/html",JSON:"application/json",JSONL:"application/jsonl",PDF:"application/pdf",XLSX:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",DOC:"application/msword",DOCX:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},ru=Object.values(ou).join(","),iu=(e,n,t)=>{const{valid:o,invalid:r}=e.reduce((e,n)=>{var t;return t=n.type,Object.values(ou).some(e=>e.endsWith("/*")?t.startsWith(e.slice(0,-2)):t===e)?e.valid.push(n):e.invalid.push(n),e},{valid:[],invalid:[]});return r.length>0&&n(`${t} ${r.map(e=>e.name).join(", ")}`),o},au=({file:e,className:n,imageStyle:t})=>e.type.startsWith("image/")?kn(nu,{file:e,className:n,style:t}):kn(tu,{name:e.name}),su=({text:e,results:n,sender:t,isThinking:o,config:r,isComplete:i=!0,isSimplified:a=!1,messageId:s,followUpQuestions:l,isLoadingFollowUps:c,files:u})=>{var d,p;const[h,{open:f,close:g}]=_n(),b=!0===(null===(d=null==r?void 0:r.externalConfig)||void 0===d?void 0:d.tts),m=!0===(null===(p=null==r?void 0:r.externalConfig)||void 0===p?void 0:p.easy_language),v=me(()=>(e=>Vc(e).split("\n").map(e=>e.trim().startsWith("[")&&e.includes("Quelle:")?`> *${e.trim()}*`:e).join("\n"))(e),[e]);return kn(qc,{isThinking:!!o,sender:t,children:["user"===t&&u&&u.length>0&&kn("div",{className:"attachedFile",children:u.map((e,n)=>kn("div",{className:"fileItemChat",children:kn(au,{file:e,className:"attachedFileChat"})},n))}),""===e&&null!==n?kn(S,{children:[kn("h4",{children:n.introduction}),kn("div",{style:{margin:"35px 0 35px"},children:n.results.map((e,t)=>kn(Qc,{last:t===n.results.length-1,entry:e},t))}),kn("h4",{children:n["follow-up"]})]}):kn("div",{className:"message-text",children:o?kn("div",{className:"thinking-content",children:[kn("span",{className:"thinking-text",children:e}),kn("div",{className:"thinking-dots",children:[kn("span",{}),kn("span",{}),kn("span",{})]})]}):kn(Rc,{forceMarkdown:!0,children:v})}),kn(Xc,{isThinking:!!o,isComplete:i,isSimplified:a,messageId:s,sender:t,expandFeedback:f,isEasyLanguageEnabled:m,isTTSEnabled:b,text:e,results:(null==n?void 0:n.results)||null,config:r}),kn(Zc,{foldFeedback:g,isFeedbackExpanded:h,isThinking:!!o,messageId:s,sender:t}),"bot"===t&&kn(Jc,{questions:l,isLoading:c})]})},lu=({forceDisplay:e})=>{const{conversation:{isStreaming:n,streamingMessage:t}}=po();return n||e?kn("div",{className:"typing-indicator","aria-label":"Bot tippt...","aria-live":"polite",role:"status",children:kn("div",{className:"typing-content",children:[kn("div",{className:"typing-spinner"}),kn("div",{className:"typing-text",children:t})]})}):null},cu=({})=>{const{conversation:{messages:e,isStreaming:n},configData:{finalConfig:t},currentLanguage:o,isTextareaExpanded:r}=po(),i=ge(null),a=me(()=>Object.assign(Object.assign({},t),{currentLanguage:o}),[t,o]);return 0!==e.length||n?kn("div",{className:"chat-messages "+(r?"dimmed":""),role:"log","aria-live":"polite","aria-label":"Chat-Nachrichten",children:[e.map((e,n)=>{var o;return kn(su,Object.assign({text:e.text,results:(null===(o=e.json)||void 0===o?void 0:o.results)||null,sender:e.sender,isThinking:e.isThinking||!1,config:Object.assign(Object.assign({},a),{finalConfig:t}),isComplete:!1!==e.isComplete,isSimplified:e.isSimplified||!1,messageId:e.messageId,followUpQuestions:e.followUpQuestions,isLoadingFollowUps:e.isLoadingFollowUps},e.files&&{files:e.files}),n)}),kn(lu,{}),kn("div",{ref:i})]}):null},uu=({setInputFromTranscription:e})=>{const{configData:{finalConfig:n},t,recording:{isRecording:o,isProcessing:r,startRecording:i}}=po(),a=me(()=>r?"btn-base stt-button stt-button--processing":"btn-base stt-button",[r]);return o||!0!==n.tts?null:kn(Cn,{text:t.stt.tooltip,delay:300,children:kn("button",{type:"button",className:a,onClick:()=>{r||o||(console.log("clicked record"),i(e))},disabled:r,"aria-label":r?t.stt.processing:t.stt.startRecording,children:kn(Sn,r?{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" ><circle cx="7" cy="7" r="2.5" fill="currentColor" /></svg>'}:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="19" viewBox="0 0 14 19" fill="none" ><path d="M7 12.75C7.99424 12.749 8.94747 12.3535 9.65051 11.6505C10.3535 10.9475 10.749 9.99424 10.75 9V4C10.75 3.00544 10.3549 2.05161 9.65165 1.34835C8.94839 0.645088 7.99456 0.25 7 0.25C6.00544 0.25 5.05161 0.645088 4.34835 1.34835C3.64509 2.05161 3.25 3.00544 3.25 4V9C3.25103 9.99424 3.64645 10.9475 4.34949 11.6505C5.05253 12.3535 6.00576 12.749 7 12.75ZM4.5 4C4.5 3.33696 4.76339 2.70107 5.23223 2.23223C5.70107 1.76339 6.33696 1.5 7 1.5C7.66304 1.5 8.29893 1.76339 8.76777 2.23223C9.23661 2.70107 9.5 3.33696 9.5 4V9C9.5 9.66304 9.23661 10.2989 8.76777 10.7678C8.29893 11.2366 7.66304 11.5 7 11.5C6.33696 11.5 5.70107 11.2366 5.23223 10.7678C4.76339 10.2989 4.5 9.66304 4.5 9V4ZM7.625 15.2188V17.75C7.625 17.9158 7.55915 18.0747 7.44194 18.1919C7.32473 18.3092 7.16576 18.375 7 18.375C6.83424 18.375 6.67527 18.3092 6.55806 18.1919C6.44085 18.0747 6.375 17.9158 6.375 17.75V15.2188C4.8341 15.062 3.40607 14.3393 2.36707 13.1907C1.32806 12.042 0.751903 10.5489 0.75 9C0.75 8.83424 0.815848 8.67527 0.933058 8.55806C1.05027 8.44085 1.20924 8.375 1.375 8.375C1.54076 8.375 1.69973 8.44085 1.81694 8.55806C1.93415 8.67527 2 8.83424 2 9C2 10.3261 2.52678 11.5979 3.46447 12.5355C4.40215 13.4732 5.67392 14 7 14C8.32608 14 9.59785 13.4732 10.5355 12.5355C11.4732 11.5979 12 10.3261 12 9C12 8.83424 12.0658 8.67527 12.1831 8.55806C12.3003 8.44085 12.4592 8.375 12.625 8.375C12.7908 8.375 12.9497 8.44085 13.0669 8.55806C13.1842 8.67527 13.25 8.83424 13.25 9C13.2481 10.5489 12.6719 12.042 11.6329 13.1907C10.5939 14.3393 9.1659 15.062 7.625 15.2188Z" fill="currentColor" /></svg>'})})})},du=()=>{const{currentLanguage:e,setCurrentLanguage:n,availableLanguages:t,t:o,autoLanguage:r}=po(),[i,a]=_n(!1),[s,l]=_n(!1),[c,u]=de({bottom:55,left:"50%"}),d=ge(null),p=ge(null),h=ge(null),f=ge(!1);he(()=>{const e=e=>{i&&!f.current&&h.current&&!h.current.contains(e.target)&&a.close()},n=()=>{document.removeEventListener("mousedown",e)};if(!i)return n;const t=setTimeout(()=>{document.addEventListener("mousedown",e)},100);return()=>{clearTimeout(t),n()}},[i,a.close]),he(()=>{if(!i)return;if(null===p.current)return;const e=p.current.getBoundingClientRect(),n=window.innerHeight,t=e.top,o=n-e.bottom;u(t>200||t>o?{bottom:40,left:"50%"}:{top:40,left:"50%"})},[i]);const g=ve(e=>{n(e),l.open(),a.close()},[n,a.close,l.open]);return r||t.size<2?null:kn("div",{ref:h,className:"language-button-container",style:{zIndex:i?1e4:1},children:[kn(Cn,{text:o.languageSelection.tooltip,delay:300,children:kn("button",{ref:p,className:"btn-base language-button",onClick:e=>{e.preventDefault(),e.stopPropagation(),i?a.close():(f.current=!0,a.open(),setTimeout(()=>{f.current=!1},150))},type:"button","aria-label":`Aktuelle Sprache: ${e}. Klicken zum Ändern`,"aria-expanded":i,"aria-haspopup":"listbox",title:`Aktuelle Sprache: ${e}`,style:{display:"flex",alignItems:"center",gap:"6px"},children:[s?kn("span",{className:"language-button__flag",children:Mn(e)}):kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" style="flex-shrink: 0" ><path d="M8.99984 0.666626C7.35166 0.666626 5.7405 1.15537 4.37009 2.07105C2.99968 2.98672 1.93157 4.28821 1.30084 5.81093C0.670114 7.33365 0.505087 9.0092 0.82663 10.6257C1.14817 12.2422 1.94185 13.7271 3.10728 14.8925C4.27272 16.058 5.75758 16.8516 7.37409 17.1732C8.99059 17.4947 10.6662 17.3297 12.1889 16.699C13.7116 16.0682 15.0131 15.0001 15.9288 13.6297C16.8444 12.2593 17.3332 10.6481 17.3332 8.99996C17.3306 6.79062 16.4518 4.67251 14.8895 3.11027C13.3273 1.54803 11.2092 0.669221 8.99984 0.666626ZM15.6641 5.89538H12.365C11.9718 4.37976 11.2546 2.96742 10.2629 1.75568C11.4294 1.96136 12.5292 2.44493 13.4694 3.16549C14.4095 3.88605 15.1623 4.82241 15.6641 5.89538ZM16.3528 8.99996C16.3533 9.71954 16.2479 10.4353 16.0399 11.1241H12.5791C12.8177 9.71807 12.8177 8.28185 12.5791 6.87578H16.0399C16.2479 7.56463 16.3533 8.28038 16.3528 8.99996ZM8.99984 16.1756C8.52787 15.6942 8.11158 15.1611 7.75883 14.5866C7.28279 13.8122 6.91292 12.9774 6.65915 12.1045H11.3405C11.0868 12.9774 10.7169 13.8122 10.2409 14.5866C9.8881 15.1611 9.47181 15.6942 8.99984 16.1756ZM6.42223 11.1241C6.15533 9.72059 6.15533 8.27932 6.42223 6.87578H11.5775C11.8443 8.27932 11.8443 9.72059 11.5775 11.1241H6.42223ZM1.6469 8.99996C1.64635 8.28038 1.75178 7.56463 1.95981 6.87578H5.42059C5.18203 8.28185 5.18203 9.71807 5.42059 11.1241H1.95981C1.75178 10.4353 1.64635 9.71954 1.6469 8.99996ZM8.99984 1.82431C9.47181 2.30576 9.8881 2.8388 10.2409 3.41336C10.7169 4.18773 11.0868 5.02253 11.3405 5.89538H6.65915C6.91292 5.02253 7.28279 4.18773 7.75883 3.41336C8.11158 2.8388 8.52787 2.30576 8.99984 1.82431ZM7.73677 1.75568C6.74508 2.96742 6.0279 4.37976 5.63464 5.89538H2.33563C2.8374 4.82241 3.59018 3.88605 4.53031 3.16549C5.47044 2.44493 6.57026 1.96136 7.73677 1.75568ZM2.33563 12.1045H5.63464C6.0279 13.6202 6.74508 15.0325 7.73677 16.2442C6.57026 16.0386 5.47044 15.555 4.53031 14.8344C3.59018 14.1139 2.8374 13.1775 2.33563 12.1045ZM10.2605 16.2442C11.253 15.0327 11.971 13.6204 12.365 12.1045H15.6641C15.1623 13.1775 14.4095 14.1139 13.4694 14.8344C12.5292 15.555 11.4294 16.0386 10.2629 16.2442H10.2605Z" fill="currentColor" /></svg>'}),kn("span",{className:"language-button__text",children:o.languageSelection.buttonText})]})}),i&&kn("div",{ref:d,className:"language-dropdown",role:"listbox","aria-label":"Sprachauswahl",onMouseDown:e=>{e.stopPropagation()},style:Object.assign(Object.assign({},c.top?{top:c.top}:{bottom:c.bottom}),{left:c.left,transform:"translateX(-50%)"}),children:Array.from(t).map((n,t)=>kn("button",{className:"language-option "+(e===n?"active":""),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),console.log("Option clicked:",n),g(n)},type:"button",role:"option","aria-selected":e===n,"aria-label":`Sprache wechseln zu ${n}`,children:[kn("span",{children:Mn(n)}),kn("span",{children:n})]},t))})]})},pu=()=>{const{configData:{finalConfig:e},conversation:{mode:n,setMode:t},t:o}=po(),r=[{value:"chat",label:o.search.search,icon:Tn},{value:"search",label:o.search.chat,icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-search"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" /><path d="M21 21l-6 -6" /></svg>'}];if(!e.searchEnabled)return null;const i=r.find(e=>e.value===n);return kn(Cn,{text:i.label,delay:300,children:kn("button",{className:"btn-base stt-button",onClick:()=>{t("chat"===n?"search":"chat")},type:"button","aria-label":`Current mode: ${i.label}. Click to toggle`,title:i.label,style:{backgroundColor:"search"===n?"var(--button-bg-hover)":void 0},children:kn(Sn,{svg:i.icon,style:{height:"20px",width:"20px"}})})})},hu=()=>{const{isDarkMode:e,toggleDarkMode:n,configData:{finalConfig:t}}=po();if(!t.dark_mode)return null;return kn(Cn,{text:e?"Light Mode":"Dark Mode",delay:300,children:kn("button",{type:"button",className:"btn-base stt-button",onClick:()=>{n()},"aria-label":e?"Switch to Light Mode":"Switch to Dark Mode",title:e?"Light Mode":"Dark Mode",children:kn(Sn,{svg:e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="12" cy="12" r="5"></circle>\n <line x1="12" y1="1" x2="12" y2="3"></line>\n <line x1="12" y1="21" x2="12" y2="23"></line>\n <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>\n <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>\n <line x1="1" y1="12" x2="3" y2="12"></line>\n <line x1="21" y1="12" x2="23" y2="12"></line>\n <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>\n <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>\n</svg>\n':'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>\n</svg>\n',style:{height:"20px",width:"20px"}})})})},fu=({onClick:e})=>kn("div",{className:"trashItem",onClick:e,children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash-icon lucide-trash"><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>',style:{color:"#fff"}})}),gu=({chatFiles:e,remove:n})=>kn("div",{className:"dropFileList",children:e.map((e,t)=>kn("div",{className:"fileItem",style:{animationDelay:50*t+"ms"},children:[kn(fu,{onClick:()=>n(t)}),kn(au,{file:e,className:"fileListImg"})]},t))}),bu=({addFiles:e})=>{const n=ge(null),{t}=po();return kn(S,{children:[kn("input",{ref:n,type:"file",multiple:!0,accept:ru,style:{display:"none"},onChange:n=>{const t=n.currentTarget.files;t&&(e(Array.from(t)),n.currentTarget.value="")}}),kn("div",{className:"attachmentButton",onClick:()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.click()},children:kn(Cn,{text:t.attachments.addFiles,delay:300,children:kn("div",{className:"attachmentButtonInner",children:kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-paperclip-icon lucide-paperclip"><path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"/></svg>',style:{color:"var(--chat-input-text)"}})})})})]})},mu=(e,n)=>n.some(n=>n.name===e.name),vu=/iPad|iPhone|iPod/.test(navigator.userAgent),yu=()=>{const e=ge(null),{configData:{finalConfig:n},closeChat:t,entrySource:o,isTextareaExpanded:r,setIsTextareaExpanded:i,conversation:{sendMessageFromInput:a,isInputEmpty:s,resetConversation:l,setInputText:c,inputText:u,isConversationActive:d,mode:p}}=po(),h=ct(n.defaultLanguage||"Deutsch"),f=ve(e=>{c(e.target.value)},[]),g=()=>{l(),t()},b=ve(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),a(y.chatFiles),y.clearChatFiles()),"Escape"===e.key&&(e.preventDefault(),g())},[g,a]),m=ve(()=>{if(vu){const e=document.querySelector(".chat-overlay");if(e){const n=e.scrollTop;setTimeout(()=>{e.scrollTop=n},0)}}},[]);yn.useEffect(()=>{const n=e.current;n&&(r?(n.style.height="60vh",n.style.maxHeight="60vh",setTimeout(()=>n.focus(),100)):(n.style.height="auto",n.style.maxHeight="280px",n.style.height=Math.min(n.scrollHeight,280)+"px"))},[u,r]);const v=me(()=>"chat"!==o&&!d,[o,d]),y=(()=>{const{showError:e}=xt(),{configData:{finalConfig:n}}=po(),t=ct(n.defaultLanguage||"Deutsch"),o=!!n.file_upload,r=n.maxUploadFiles,i=n.maxUploadFileSize,a=t.attachments.fileTypeNotAllowed,s=t.attachments.maxFilesReached,l=t.attachments.fileSizeLimitExceeded,c=ge(null),[u,d]=de([]),[p,h]=de(!1),f=ve((n,t)=>{const o=t.reduce((e,n)=>e+n.size,0),{allowed:r}=n.reduce(({allowed:n,runningTotal:t},o)=>t+o.size>i?(e(`${o.name} ${l}`),{allowed:n,runningTotal:t}):{allowed:[...n,o],runningTotal:t+o.size},{allowed:[],runningTotal:o});return r},[e,l]),g=ve(n=>{if(!o)return;const t=iu(n,e,a);d(n=>{const o=f(t,n).filter(e=>!mu(e,n)),i=[...n,...o];if(i.length>r){const n=i.slice(r).map(e=>e.name).join(", ");return e(`${s} ${n}`),i.slice(0,r)}return i})},[e,a,s,f]),b=ve(e=>{d(n=>n.filter((n,t)=>t!==e))},[]),m=ve(()=>d([]),[]),v=ve(e=>{var n;e.preventDefault(),(null===(n=e.dataTransfer)||void 0===n?void 0:n.files)&&g(Array.from(e.dataTransfer.files)),h(!1)},[o,g]),y=ve(()=>{o&&h(!0)},[o]),x=ve(e=>{o&&e.preventDefault()},[o]),w=ve(e=>{c.current&&!c.current.contains(e.relatedTarget)&&h(!1)},[]);return{containerRef:c,chatFiles:u,isDropOver:p,addFiles:g,removeChatFile:b,clearChatFiles:m,handleOnDrop:v,handleDragEnter:y,handleDragOver:x,handleDragLeave:w}})();return kn("div",{className:"input-wrapper"+(y.isDropOver?" drop-over":""),role:"group","aria-label":"Nachricht senden",style:{position:"relative",minHeight:"auto"},ref:y.containerRef,onDragEnter:y.handleDragEnter,onDragLeave:y.handleDragLeave,onDragOver:y.handleDragOver,onDrop:y.handleOnDrop,children:[y.chatFiles.length>0&&kn(gu,{chatFiles:y.chatFiles,remove:y.removeChatFile}),kn("textarea",{ref:e,className:"chat-input",placeholder:n.placeholder,value:u,onChange:f,onKeyDown:b,onFocus:m,rows:1,inputMode:"text","aria-label":"Nachricht eingeben","aria-describedby":"send-button-description",style:Object.assign({width:"100%",minHeight:"46px",maxHeight:r?"60vh":"280px",overflowY:"auto",resize:"none",boxSizing:"border-box",paddingTop:y.chatFiles.length>0?"128px":""},v?{paddingLeft:"60px",paddingRight:"100px"}:{paddingRight:u.trim().length>0||r?"50px":"100px",paddingBottom:!0===n.stt||n.languages&&""!==n.languages.trim()?"35px":"8px",marginBottom:!0===n.stt||n.languages&&""!==n.languages.trim()?"55px":"0px"})}),"search"!==p&&(u.trim().length>0||r)&&kn("button",{className:"btn-base expand-button",onClick:()=>i(!r),type:"button","aria-label":r?h.input.collapse:h.input.expand,style:{position:"absolute",top:"12px",right:"12px",zIndex:10,width:"28px",height:"28px",padding:"6px",display:"flex",alignItems:"center",justifyContent:"center"},children:kn(Sn,{svg:r?'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">\n <polyline points="4 14 10 14 10 20" />\n <polyline points="20 10 14 10 14 4" />\n <line x1="14" y1="10" x2="21" y2="3" />\n <line x1="3" y1="21" x2="10" y2="14" />\n</svg>\n':'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">\n <polyline points="15 3 21 3 21 9" />\n <polyline points="9 21 3 21 3 15" />\n <line x1="21" y1="3" x2="14" y2="10" />\n <line x1="3" y1="21" x2="10" y2="14" />\n</svg>\n'})}),v?kn("div",{style:{position:"absolute",left:"15px",bottom:"10px",zIndex:10,display:"flex",gap:"10px",alignItems:"center"},children:kn(uu,{setInputFromTranscription:c})}):(!0===(null==n?void 0:n.stt)||n.languages&&""!==n.languages.trim())&&kn("div",{style:{position:"absolute",left:v?void 0:"15px",right:v?"105px":void 0,bottom:"10px",zIndex:10,display:"flex",gap:"10px",alignItems:"center"},children:[n.file_upload?kn(bu,{addFiles:y.addFiles}):"",kn(uu,{setInputFromTranscription:c}),kn(pu,{}),kn(du,{}),kn(hu,{})]}),kn("button",{className:"btn-base send-button",onClick:()=>{a(y.chatFiles),y.clearChatFiles()},disabled:s||void 0,type:"button","aria-label":"Nachricht senden",id:"send-button-description",style:{bottom:v?"10px":void 0},children:kn(Sn,{svg:An})})]})},xu=e=>{const n=Date.now()-e,t=Math.floor(n/6e4),o=Math.floor(n/36e5),r=Math.floor(n/864e5);if(t<1)return"gerade eben";if(t<60)return`vor ${t} Min.`;if(o<24)return`vor ${o} Std.`;if(r<7)return`vor ${r} Tag${r>1?"en":""}`;return new Date(e).toLocaleDateString("de-DE",{day:"2-digit",month:"2-digit"})};var wu=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const ku=({agentId:e,id:n,preview:t,lastMessageAt:o})=>{var r;const{t:i,agentLibrary:a,conversation:{loadConversationFromMessages:s}}=po(),[l,c]=a.opened,u=ve(e=>wu(void 0,void 0,void 0,function*(){try{const n=yield a.loadConversation(e);s(n,e),c.close()}catch(e){console.error("Failed to load conversation:",e)}}),[c.close,a,s]),d=ve(n=>{a.removeConversation(e,n)},[a,e]);return kn("div",{className:"spotlight-conversation-item-wrapper",children:[kn("button",{className:"spotlight-conversation-item",onClick:()=>u(n),disabled:a.isLoadingConversation,type:"button",children:[kn("span",{className:"conversation-label",children:t||(null===(r=i.sidebar)||void 0===r?void 0:r.conversation)||"Gespräch"}),kn("span",{className:"conversation-time",children:xu(o)})]}),kn("button",{className:"spotlight-conversation-delete btn-base",onClick:e=>{e.stopPropagation(),d(n)},type:"button","aria-label":"Gespräch löschen",children:kn(Sn,{svg:Ln})})]})},_u=({agentId:e})=>{var n;const{t,agentLibrary:o}=po(),r=o.getConversationsForAgent(e);return 0===r.length?null:kn(S,{children:[kn("div",{className:"spotlight-divider"}),kn("p",{className:"spotlight-section-heading",children:(null===(n=t.sidebar)||void 0===n?void 0:n.pastConversations)||"Vergangene Gespräche"}),kn("div",{className:"spotlight-conversations-list",children:r.map(n=>kn(ku,{agentId:e,id:n.id,lastMessageAt:n.lastMessageAt,preview:n.preview},n.id))})]})},Cu=()=>{var e;const{t:n}=po();return kn("div",{className:"spotlight-loading",children:(null===(e=n.sidebar)||void 0===e?void 0:e.loadingAgents)||"Laden..."})},Su=({agent:e})=>{const n=e.link&&""!==e.link.trim();return kn("a",{href:n?e.link:void 0,className:"spotlight-agent-tile"+(n?"":" disabled"),"aria-disabled":!n,children:[e.icon&&kn("img",{className:"spotlight-agent-icon",src:`${Rn}/assets/${e.icon}`}),kn("span",{className:"spotlight-agent-title",children:e.title}),kn("span",{className:"spotlight-agent-subtitle",children:e.welcome_title})]})},Eu=({isLoadingAgents:e,siblingAgents:n})=>{const{configData:{finalConfig:t}}=po();return 0!=n.length||e?kn(S,{children:[kn("div",{className:"spotlight-divider"}),t.sidebarHeading&&kn("p",{className:"spotlight-section-heading",children:t.sidebarHeading}),e?kn(Cu,{}):kn("div",{className:"spotlight-agents-grid",children:n.map(e=>kn(Su,{agent:e},e.id))})]}):null},Iu=()=>{var e;const{t:n,agentLibrary:t,conversation:{resetConversation:o}}=po(),[r,i]=t.opened;return kn("button",{className:"spotlight-new-chat-button",onClick:ve(()=>{o(),i.close()},[o,i.close]),type:"button",children:[kn(Sn,{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>\n'}),kn("span",{children:(null===(e=n.sidebar)||void 0===e?void 0:e.newChat)||"Neuen Chat starten"})]})},Tu=()=>{const{agentLibrary:e,configData:{finalConfig:n},session:t}=po(),[o,r]=e.opened,i=me(()=>null===n.agentId?0:parseInt(n.agentId),[n.agentId]),a=n.applicationId,[s,l]=de([]),[c,u]=de(!1);return he(()=>{const e=t.sessionState.sessionToken;o&&a&&e&&(u(!0),((e,n)=>Wn(void 0,void 0,void 0,function*(){const t=`${jn}/api/agents?application=${e}`,o=yield fetch(t,On(n));if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return(yield o.json()).agents}))(a,e).then(e=>{const n=e.filter(e=>e.id!==i);l(n)}).catch(e=>{console.error("Failed to load sibling agents:",e),l([])}).finally(()=>{u(!1)}))},[o,a,i,t.sessionState.sessionToken]),kn(S,{children:[kn(Iu,{}),kn(_u,{agentId:i}),kn(Eu,{isLoadingAgents:c,siblingAgents:s})]})},Lu=()=>{const{agentLibrary:e,configData:{finalConfig:n}}=po(),[t,o]=e.opened;return me(()=>!!n.showSidebarMenu||null!==n.sidebarButtonLabel,[n.showSidebarMenu,n.sidebarButtonLabel])?kn(mt,{isOpen:t,onClose:o.close,children:kn(Tu,{})}):null},Au=()=>{const{agentLibrary:{opened:e}}=po(),[n,t]=e;return kn(bt,{onClick:t.open})},Fu=()=>{const{isOpen:e,configData:{finalConfig:n},isScrolled:t,setIsScrolled:o,inputAnimationState:r,isTextareaExpanded:i,closeChat:a,auth:s,conversation:{isConversationActive:l,resetConversation:c}}=po(),u=n.locked_behind_login&&s.authState.isAuthenticated,d=ge(null);he(()=>{if(!e||!d.current)return;const n=()=>{if(d.current){const e=d.current.scrollTop>50;e!==t&&o(e)}},r=d.current;return r.addEventListener("scroll",n),n(),()=>{r&&r.removeEventListener("scroll",n)}},[e,t]),he(()=>{if(e&&d.current){const e=d.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(e.length>0){const t=n.closable?d.current.querySelector(".close-button-floating"):null;t?t.focus():e[0].focus()}else d.current.focus();const t=n=>{if("Tab"===n.key){const t=Array.from(e),o=t[0],r=t[t.length-1];n.shiftKey?document.activeElement===o&&(r.focus(),n.preventDefault()):document.activeElement===r&&(o.focus(),n.preventDefault())}};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}},[e,n.closable]);const p=()=>{c(),a()};return kn("div",{className:"chat-overlay "+(t?"scrolled":""),ref:d,role:"dialog","aria-modal":"true","aria-labelledby":"chat-title","aria-describedby":"chat-description",onKeyDown:e=>{"Escape"===e.key&&n.closable&&(e.preventDefault(),p())},tabIndex:-1,children:[kn(gt,{logo:n.logo,title:n.title}),kn("div",{className:"header-buttons-container",children:[n.showSidebarMenu&&kn(Au,{}),u&&kn(ft,{onClick:s.logout}),n.closable&&kn(ht,{onClick:p})]}),kn(Lu,{}),kn("div",{className:"chat-container",children:kn("div",{className:"chat-area "+(l?"conversation-active":""),role:"main",children:[kn($c,{hide:l,icon:n.icon,title:n.title,welcomeMessage:n.welcomeMessage,dimmed:i}),kn(cu,{}),kn("div",{className:`chat-input-section ${l?"conversation-active":"no-conversation"} input-animation-${r} ${i?"input-expanded-sticky":""}`,children:[kn(Yc,{}),kn(yu,{})]}),kn(bo,{})]})})]})};var Nu=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Mu=({setViewMode:e})=>{const n=ve(()=>e("forgotPassword"),[e]),t=ve(()=>e("register"),[e]),{t:o,auth:r}=po(),[i,a]=de(!1),[s,l]=de(""),[c,u]=de(""),[d,p]=de(""),[h,f]=de(""),g=ve(e=>Nu(void 0,void 0,void 0,function*(){if(e.preventDefault(),l(""),u(""),d.trim())if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d))if(h.trim()){a(!0);try{const e=yield r.login(d,h);e.success||l(e.error||o.auth.error.loginFailed)}catch(e){l(o.auth.error.networkError)}finally{a(!1)}}else l(o.auth.error.emptyPassword);else l(o.auth.error.invalidEmail);else l(o.auth.error.emptyEmail)}),[d,h,r,o]);return kn("div",{className:"login-form-container",children:[kn("div",{className:"login-form-header",children:[kn(Sn,{svg:Nn,style:{width:"32px",height:"32px"}}),kn("h2",{children:o.auth.loginTitle})]}),kn("form",{onSubmit:g,className:"login-form",children:[kn("div",{className:"form-group",children:[kn("label",{htmlFor:"email",children:o.auth.emailLabel}),kn("input",{id:"email",type:"email",value:d,onChange:e=>p(e.target.value),placeholder:o.auth.emailPlaceholder,disabled:i,autoComplete:"email"})]}),kn("div",{className:"form-group",children:[kn("label",{htmlFor:"password",children:o.auth.passwordLabel}),kn("input",{id:"password",type:"password",value:h,onChange:e=>f(e.target.value),placeholder:o.auth.passwordPlaceholder,disabled:i,autoComplete:"current-password"})]}),c&&kn("div",{className:"login-success",children:c}),s&&kn("div",{className:"login-error",children:s}),kn("button",{type:"submit",className:"login-submit-button",disabled:i,children:i?"...":o.auth.loginButton}),kn("button",{type:"button",className:"login-toggle-button",onClick:n,disabled:i,children:o.auth.forgotPassword}),kn("button",{type:"button",className:"login-toggle-button",onClick:t,disabled:i,children:o.auth.switchToRegister})]})]})};var Pu=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Du=({setViewMode:e})=>{const n=ve(()=>e("login"),[e]),{t,auth:o,configData:r}=po(),[i,a]=de(!1),[s,l]=de(""),[c,u]=de(""),[d,p]=de(""),[h,f]=de(""),g=r.finalConfig.agentId,b=ve(e=>Pu(void 0,void 0,void 0,function*(){if(null!==g)if(e.preventDefault(),l(""),u(""),d.trim())if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d))if(h.trim()){a(!0);try{const e=yield o.register(d,h,g);e.success&&e.needsVerification?(u(t.auth.verificationSent),f("")):e.success||l(e.error||t.auth.error.registerFailed)}catch(e){l(t.auth.error.networkError)}finally{a(!1)}}else l(t.auth.error.emptyPassword);else l(t.auth.error.invalidEmail);else l(t.auth.error.emptyEmail)}),[d,h,o,g,t]);return kn("div",{className:"login-form-container",children:[kn("div",{className:"login-form-header",children:[kn(Sn,{svg:Nn,style:{width:"32px",height:"32px"}}),kn("h2",{children:t.auth.registerTitle})]}),kn("form",{onSubmit:b,className:"login-form",children:[kn("div",{className:"form-group",children:[kn("label",{htmlFor:"email",children:t.auth.emailLabel}),kn("input",{id:"email",type:"email",value:d,onChange:e=>p(e.target.value),placeholder:t.auth.emailPlaceholder,disabled:i,autoComplete:"email"})]}),kn("div",{className:"form-group",children:[kn("label",{htmlFor:"password",children:t.auth.passwordLabel}),kn("input",{id:"password",type:"password",value:h,onChange:e=>f(e.target.value),placeholder:t.auth.passwordPlaceholder,disabled:i,autoComplete:"new-password"})]}),c&&kn("div",{className:"login-success",children:c}),s&&kn("div",{className:"login-error",children:s}),kn("button",{type:"submit",className:"login-submit-button",disabled:i,children:i?"...":t.auth.registerButton}),kn("button",{type:"button",className:"login-toggle-button",onClick:n,disabled:i,children:t.auth.switchToLogin})]})]})};var Ou=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const zu=({setViewMode:e})=>{const n=ve(()=>e("login"),[e]),{t,auth:o,configData:r}=po(),[i,a]=de(!1),[s,l]=de(""),[c,u]=de(""),[d,p]=de(""),h=r.finalConfig.agentId,f=ve(e=>Ou(void 0,void 0,void 0,function*(){if(null!==h)if(e.preventDefault(),l(""),u(""),d.trim())if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d)){a(!0);try{const e=yield fetch(`${jn}/api/agent-auth/reset/request`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:d})});if(e.ok)u(t.auth.resetEmailSent),p("");else{const n=yield e.json();l(n.error||t.auth.error.resetFailed)}}catch(e){l(t.auth.error.networkError)}finally{a(!1)}}else l(t.auth.error.invalidEmail);else l(t.auth.error.emptyEmail)}),[d,o,h,t]);return kn("div",{className:"login-form-container",children:[kn("div",{className:"login-form-header",children:[kn(Sn,{svg:Nn,style:{width:"32px",height:"32px"}}),kn("h2",{children:t.auth.forgotPasswordTitle}),kn("p",{className:"login-form-subtitle",children:t.auth.forgotPasswordSubtitle})]}),kn("form",{onSubmit:f,className:"login-form",children:[kn("div",{className:"form-group",children:[kn("label",{htmlFor:"email",children:t.auth.emailLabel}),kn("input",{id:"email",type:"email",value:d,onChange:e=>p(e.target.value),placeholder:t.auth.emailPlaceholder,disabled:i,autoComplete:"email"})]}),c&&kn("div",{className:"login-success",children:c}),s&&kn("div",{className:"login-error",children:s}),kn("button",{type:"submit",className:"login-submit-button",disabled:i,children:i?"...":t.auth.resetButton}),kn("button",{type:"button",className:"login-toggle-button",onClick:n,disabled:i,children:t.auth.backToLogin})]})]})},Ru=()=>{const[e,n]=de("login");return kn("div",{className:"login-overlay",children:[kn("div",{className:"login-overlay-backdrop"}),kn("div",{className:"login-overlay-content",children:["login"===e&&kn(Mu,{setViewMode:n}),"register"===e&&kn(Du,{setViewMode:n}),"forgotPassword"===e&&kn(zu,{setViewMode:n})]})]})};var ju=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};const Bu=()=>{var e,n,t;const{session:o,t:r}=po();if(!o.sessionState.sessionError)return null;return kn("div",{className:"session-error-overlay",children:[kn("div",{className:"session-error-overlay-backdrop"}),kn("div",{className:"session-error-overlay-content",children:[kn("div",{className:"session-error-icon",children:kn("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[kn("circle",{cx:"12",cy:"12",r:"10"}),kn("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),kn("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),kn("h2",{className:"session-error-title",children:(null===(e=r.sessionError)||void 0===e?void 0:e.title)||"Session Expired"}),kn("p",{className:"session-error-message",children:(null===(n=r.sessionError)||void 0===n?void 0:n.message)||"Your session has expired. Please try again."}),kn("button",{className:"session-error-button",onClick:()=>ju(void 0,void 0,void 0,function*(){o.clearError(),o.sessionState.isLocked||(yield o.establish())}),type:"button",children:(null===(t=r.sessionError)||void 0===t?void 0:t.retry)||"Try Again"})]})]})},Hu=()=>{const{isOpen:e,setIsOpen:n,openChat:t,auth:o,session:r,configData:{finalConfig:i,configLoaded:a}}=po(),s=!0===r.sessionState.isLocked&&!o.authState.isAuthenticated;he(()=>{if(!a)return;"#open-aigelb"===window.location.hash&&(t(),window.history.replaceState(null,"",window.location.pathname+window.location.search))},[a,t]),he(()=>{const t=()=>n(!0),o=()=>{i.closable?n(!1):console.warn("Chatbot closing is disabled via configuration (closable: false)")},r=()=>{!e||i.closable?n(!e):console.warn("Chatbot closing is disabled via configuration (closable: false)")};return document.addEventListener("chatbot-open",t),document.addEventListener("chatbot-close",o),document.addEventListener("chatbot-toggle",r),()=>{document.removeEventListener("chatbot-open",t),document.removeEventListener("chatbot-close",o),document.removeEventListener("chatbot-toggle",r)}},[e,n,i.closable]);return a||s?kn(S,{children:[i.showChatButton&&kn(go,{onOpen:t,openerHeadline:i.openerHeadline,openerSubtitle:i.openerSubtitle,snippetIcon:i.snippetIcon,position:i.openerPosition,autoDismissMs:i.openerAutoDismissMs,persistDismiss:i.persistDismiss}),e&&kn(S,{children:[kn(Fu,{}),s&&kn(Ru,{}),kn(Bu,{})]}),kn(fo,{})]}):null};var $u=function(e,n,t,o){return new(t||(t=Promise))(function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}l((o=o.apply(e,n||[])).next())})};class Uu extends HTMLElement{constructor(){super(),this.entrySource="chat",console.log("🤖 AIgelb Chatbot Widget v9.3.0 loaded"),this.customCSS="",this.darkModeEnabled=!1,this.attachShadow({mode:"open"});const e={agentId:(n=this).getAttribute("agent-id")||null,languages:n.getAttribute("languages")||null,defaultLanguage:n.getAttribute("default-language")||"Deutsch",showChatButton:"false"!==n.getAttribute("show-chat-button")};var n;this.themeConfig={colors:{brand:{"Yellow-300":"rgb(254, 235, 86)","Yellow-50":"rgb(254, 253, 232)","Yellow-700":"rgb(235, 191, 7)",Cream:"rgb(252, 250, 248)",Purple:"rgb(40, 16, 54)"},neutrals:{"neutral-000":"rgb(255, 255, 255)","neutral-050":"rgb(246, 246, 246)","neutral-100":"rgb(231, 231, 231)","neutral-200":"rgb(209, 209, 209)","neutral-300":"rgb(176, 176, 176)","neutral-400":"rgb(136, 136, 136)","neutral-500":"rgb(109, 109, 109)","neutral-600":"rgb(93, 93, 93)","neutral-700":"rgb(79, 79, 79)","neutral-800":"rgb(69, 69, 69)","neutral-900":"rgb(61, 61, 61)","neutral-950":"rgb(34, 34, 34)"},system:{Green:"rgb(46, 219, 75)","Green-light":"rgb(209, 255, 217)",Red:"rgb(255, 82, 82)","Red-light":"rgb(255, 184, 184)",Yellow:"rgb(255, 176, 55)",Blue:"rgb(59, 158, 255)","Yellow-light":"rgb(255, 247, 235)","Blue-light":"rgb(235, 245, 255)"}},lightMode:{welcome:{"welcome-text":"colors:neutrals/neutral-950","welcome-headline":"colors:brand/Purple","welcome-icon":"colors:neutrals/neutral-950","welcome-link":"colors:brand/Purple"},chat:{"chat-user-bg":"colors:neutrals/neutral-000","chat-ai-bg":"colors:neutrals/neutral-000","chat-user-border":"colors:neutrals/neutral-200","chat-user-text":"colors:neutrals/neutral-950","chat-ai-border":"colors:neutrals/neutral-200","chat-ai-text":"colors:neutrals/neutral-950","chat-ai-text-link":"colors:brand/Purple","chat-ai-headline":"colors:neutrals/neutral-950","chat-input-bg":"colors:neutrals/neutral-000","chat-input-border":"colors:neutrals/neutral-200","chat-input-border-hover":"colors:neutrals/neutral-400","chat-input-border-focus":"colors:brand/Purple","chat-input-text":"colors:neutrals/neutral-500"},surface:{"surface-bg":"colors:brand/Cream","surface-layer-bg":"colors:neutrals/neutral-800","surface-modal-bg":"colors:neutrals/neutral-000"},logo:{"logo-ai-gelb":"colors:neutrals/neutral-950"},tooltip:{"tooltip-bg":"colors:brand/Purple","tooltip-text":"colors:neutrals/neutral-000","tooltip-border":"colors:brand/Purple"},button:{main:{"button-bg":"colors:brand/Yellow-50","button-bg-hover":"colors:brand/Yellow-300","button-bg-active":"colors:brand/Yellow-300","button-icon":"colors:brand/Purple","button-icon-hover":"colors:brand/Purple","button-icon-active":"colors:brand/Purple","button-text":"colors:brand/Purple","button-text-hover":"colors:brand/Purple","button-text-active":"colors:brand/Purple","button-border":"colors:brand/Yellow-700","button-border-hover":"colors:brand/Yellow-700","button-border-active":"colors:brand/Yellow-700"},start:{"button-start-bg":"colors:brand/Yellow-50","button-start-bg-hover":"colors:brand/Yellow-50","button-start-headline":"colors:neutrals/neutral-950","button-start-headline-hover":"colors:neutrals/neutral-950","button-start-text":"colors:neutrals/neutral-950","button-start-text-hover":"colors:neutrals/neutral-950","button-start-icon":"colors:brand/Purple","button-start-icon-hover":"colors:brand/Purple","button-start-border":"colors:brand/Yellow-300","button-start-border-hover":"colors:brand/Yellow-700"},suggestion:{"button-suggestion-bg":"colors:brand/Yellow-300","button-suggestion-bg-hover":"colors:brand/Yellow-50","button-suggestion-text":"colors:neutrals/neutral-950","button-suggestion-text-hover":"colors:neutrals/neutral-950","button-suggestion-border":"colors:brand/Yellow-300","button-suggestion-border-hover":"colors:brand/Yellow-700"},sprache:{"sprache-bg":"colors:neutrals/neutral-000","sprache-bg-hover":"colors:neutrals/neutral-050","sprache-text":"colors:brand/Purple","sprache-text-hover":"colors:brand/Purple","sprache-flyout-bg":"colors:neutrals/neutral-000"},text:{"button-textbutton-text":"colors:brand/Purple","button-textbutton-text-hover":"colors:brand/Purple","button-textbutton-icon":"colors:brand/Purple","button-textbutton-icon-hover":"colors:brand/Purple"},"chat-submit":{"cs-bg":"colors:brand/Yellow-50","cs-bg-hover":"colors:brand/Yellow-300","cs-border":"colors:brand/Yellow-700","cs-border-hover":"colors:brand/Yellow-700","cs-icon":"colors:neutrals/neutral-950","cs-icon-hover":"colors:neutrals/neutral-950","cs-bg-deactivated":"colors:neutrals/neutral-100","cs-border-deactivated":"colors:neutrals/neutral-200","cs-icon-deactivated":"colors:neutrals/neutral-400"},close:{"close-bg":"colors:brand/Yellow-50","close-bg-hover":"colors:brand/Yellow-300","close-icon":"colors:neutrals/neutral-950","close-icon-hover":"colors:neutrals/neutral-950","close-border":"colors:brand/Yellow-700","close-border-hover":"colors:brand/Yellow-700"},toggle:{"toggle-bg":"colors:brand/Yellow-50","toggle-bg-hover":"colors:brand/Yellow-300","toggle-bg-active":"colors:brand/Yellow-300","toggle-icon":"colors:neutrals/neutral-950","toggle-icon-hover":"colors:neutrals/neutral-950","toggle-icon-active":"colors:neutrals/neutral-950","toggle-text":"colors:neutrals/neutral-950","toggle-text-hover":"colors:neutrals/neutral-950","toggle-text-active":"colors:neutrals/neutral-950","toggle-border":"colors:brand/Yellow-700","toggle-border-hover":"colors:brand/Yellow-700","toggle-border-active":"colors:brand/Yellow-700"}},avatar:{"avatar-bg":"colors:brand/Yellow-300","avatar-icon":"colors:neutrals/neutral-950"},disclaimer:{"disclaimer-text":"colors:neutrals/neutral-400"},voice:{"voice-text":"colors:neutrals/neutral-000","voice-headline":"colors:brand/Yellow-300","voice-audio":"colors:brand/Yellow-300","voice-btn-stop-bg":"colors:system/Red-light","voice-btn-stop-icon":"colors:system/Red","voice-btn-stop-border":"colors:system/Red","voice-btn-stop-bg-hover":"colors:system/Red","voice-btn-stop-icon-hover":"colors:neutrals/neutral-000","voice-btn-stop-border-hover":"colors:system/Red","voice-btn-stop-text":"colors:system/Red","voice-btn-stop-text-hover":"colors:neutrals/neutral-000","voice-btn-submit-bg":"colors:system/Green-light","voice-btn-submit-bg-hover":"colors:system/Green","voice-btn-submit-icon":"colors:system/Green","voice-btn-submit-icon-hover":"colors:neutrals/neutral-000","voice-btn-submit-border":"colors:system/Green","voice-btn-submit-border-hover":"colors:system/Green","voice-btn-submit-text":"colors:system/Green","voice-btn-submit-text-hover":"colors:neutrals/neutral-000"},feedback:{"feedback-headline":"colors:neutrals/neutral-950","feedback-text":"colors:neutrals/neutral-950","feedback-input-bg":"colors:neutrals/neutral-000","feedback-input-border":"colors:neutrals/neutral-200","feedback-input-border-hover":"colors:neutrals/neutral-600","feedback-input-border-hover-focus":"colors:brand/Yellow-300","feedback-border-top":"colors:neutrals/neutral-100","feedback-input-icon":"colors:neutrals/neutral-950","feedback-border":"colors:neutrals/neutral-100"},toast:{"toast-bg-success":"colors:system/Green","toast-bg-info":"colors:system/Blue","toast-bg-warning":"colors:system/Yellow","toast-bg-error":"colors:system/Red","toast-icon-success":"colors:neutrals/neutral-000","toast-icon-info":"colors:neutrals/neutral-000","toast-icon-warning":"colors:neutrals/neutral-000","toast-icon-error":"colors:neutrals/neutral-000","toast-text-success":"colors:neutrals/neutral-000","toast-text-info":"colors:neutrals/neutral-000","toast-text-warning":"colors:neutrals/neutral-000","toast-text-error":"colors:neutrals/neutral-000","toast-borer-success":"colors:system/Green","toast-border-info":"colors:system/Blue","toast-border-warning":"colors:system/Yellow","toast-border-error":"colors:system/Red"},header:{"header-mobile-bg":"colors:neutrals/neutral-000","header-mobile-border":"colors:neutrals/neutral-100"},"widget-starter":{"ws-bubble-bg":"colors:brand/Yellow-300","ws-bubble-text":"colors:neutrals/neutral-950","ws-button-bg":"colors:brand/Yellow-50","ws-button-bg-hover":"colors:brand/Yellow-300","ws-button-icon":"colors:neutrals/neutral-950","ws-button-icon-hover":"colors:neutrals/neutral-950","ws-bubble-border":"colors:brand/Yellow-300","ws-button-border":"colors:brand/Yellow-300","ws-button-border-hover":"colors:brand/Yellow-300","ws-close-bg":"colors:brand/Yellow-50","ws-close-border":"colors:brand/Yellow-700","ws-close-icon":"colors:neutrals/neutral-950"}},darkMode:{welcome:{"welcome-text":"colors:neutrals/neutral-050","welcome-headline":"colors:neutrals/neutral-050","welcome-icon":"colors:brand/Yellow-300","welcome-link":"colors:brand/Yellow-700"},chat:{"chat-user-bg":"colors:brand/Yellow-50","chat-ai-bg":"colors:neutrals/neutral-950","chat-user-border":"colors:neutrals/neutral-700","chat-user-text":"colors:neutrals/neutral-950","chat-ai-border":"colors:neutrals/neutral-950","chat-ai-text":"colors:neutrals/neutral-050","chat-ai-text-link":"colors:brand/Yellow-300","chat-ai-headline":"colors:neutrals/neutral-050","chat-input-bg":"colors:neutrals/neutral-900","chat-input-border":"colors:neutrals/neutral-700","chat-input-border-hover":"colors:neutrals/neutral-500","chat-input-border-focus":"colors:brand/Yellow-300","chat-input-text":"colors:neutrals/neutral-050"},surface:{"surface-bg":"colors:neutrals/neutral-950","surface-layer-bg":"colors:neutrals/neutral-800","surface-modal-bg":"colors:neutrals/neutral-950"},logo:{"logo-ai-gelb":"colors:neutrals/neutral-000"},tooltip:{"tooltip-bg":"colors:neutrals/neutral-950","tooltip-text":"colors:neutrals/neutral-000","tooltip-border":"colors:neutrals/neutral-800"},button:{main:{"button-bg":"colors:neutrals/neutral-900","button-bg-hover":"colors:brand/Yellow-300","button-bg-active":"colors:brand/Yellow-300","button-icon":"colors:brand/Yellow-50","button-icon-hover":"colors:brand/Purple","button-icon-active":"colors:brand/Purple","button-text":"colors:brand/Yellow-50","button-text-hover":"colors:brand/Purple","button-text-active":"colors:brand/Purple","button-border":"colors:neutrals/neutral-400","button-border-hover":"colors:brand/Yellow-300","button-border-active":"colors:brand/Yellow-300"},start:{"button-start-bg":"rgb(255, 255, 255)","button-start-bg-hover":"rgb(255, 255, 255)","button-start-headline":"rgb(255, 255, 255)","button-start-headline-hover":"rgb(255, 255, 255)","button-start-text":"rgb(255, 255, 255)","button-start-text-hover":"rgb(255, 255, 255)","button-start-icon":"rgb(255, 255, 255)","button-start-icon-hover":"rgb(255, 255, 255)","button-start-border":"rgb(255, 255, 255)","button-start-border-hover":"rgb(255, 255, 255)"},suggestion:{"button-suggestion-bg":"colors:brand/Yellow-300","button-suggestion-bg-hover":"colors:brand/Yellow-50","button-suggestion-text":"colors:neutrals/neutral-950","button-suggestion-text-hover":"colors:neutrals/neutral-950","button-suggestion-border":"colors:brand/Yellow-300","button-suggestion-border-hover":"colors:brand/Yellow-700"},sprache:{"sprache-bg":"colors:neutrals/neutral-800","sprache-bg-hover":"colors:neutrals/neutral-800","sprache-text":"colors:brand/Cream","sprache-text-hover":"colors:brand/Purple","sprache-flyout-bg":"colors:neutrals/neutral-800"},text:{"button-textbutton-text":"colors:brand/Yellow-300","button-textbutton-text-hover":"colors:neutrals/neutral-050","button-textbutton-icon":"colors:brand/Yellow-300","button-textbutton-icon-hover":"colors:neutrals/neutral-050"},"chat-submit":{"cs-bg":"colors:neutrals/neutral-900","cs-bg-hover":"colors:brand/Yellow-300","cs-border":"colors:brand/Yellow-300","cs-border-hover":"colors:brand/Yellow-300","cs-icon":"colors:brand/Yellow-300","cs-icon-hover":"colors:neutrals/neutral-900","cs-bg-deactivated":"colors:neutrals/neutral-300","cs-border-deactivated":"colors:neutrals/neutral-600","cs-icon-deactivated":"colors:neutrals/neutral-950"},close:{"close-bg":"colors:neutrals/neutral-950","close-bg-hover":"colors:neutrals/neutral-950","close-icon":"colors:neutrals/neutral-050","close-icon-hover":"colors:brand/Yellow-300","close-border":"colors:neutrals/neutral-050","close-border-hover":"colors:brand/Yellow-300"},toggle:{"toggle-bg":"colors:neutrals/neutral-950","toggle-bg-hover":"colors:neutrals/neutral-950","toggle-bg-active":"colors:brand/Yellow-300","toggle-icon":"colors:neutrals/neutral-050","toggle-icon-hover":"colors:brand/Yellow-300","toggle-icon-active":"colors:neutrals/neutral-950","toggle-text":"colors:neutrals/neutral-050","toggle-text-hover":"colors:brand/Yellow-300","toggle-text-active":"colors:neutrals/neutral-950","toggle-border":"colors:neutrals/neutral-050","toggle-border-hover":"colors:brand/Yellow-700","toggle-border-active":"colors:brand/Yellow-700"}},avatar:{"avatar-bg":"colors:neutrals/neutral-950","avatar-icon":"colors:brand/Yellow-300"},disclaimer:{"disclaimer-text":"colors:neutrals/neutral-300"},voice:{"voice-text":"colors:neutrals/neutral-000","voice-headline":"colors:brand/Yellow-300","voice-audio":"colors:brand/Yellow-300","voice-btn-stop-bg":"colors:system/Red-light","voice-btn-stop-icon":"colors:neutrals/neutral-950","voice-btn-stop-border":"colors:system/Red","voice-btn-stop-bg-hover":"colors:system/Red","voice-btn-stop-icon-hover":"colors:neutrals/neutral-000","voice-btn-stop-border-hover":"colors:system/Red","voice-btn-submit-bg":"colors:system/Green-light","voice-btn-submit-bg-hover":"colors:system/Green","voice-btn-submit-icon":"colors:neutrals/neutral-950","voice-btn-submit-icon-hover":"colors:neutrals/neutral-000","voice-btn-submit-border":"colors:system/Green","voice-btn-submit-border-hover":"colors:system/Green","voice-btn-stop-text":"colors:neutrals/neutral-950","voice-btn-stop-text-hover":"colors:neutrals/neutral-950","voice-btn-submit-text":"colors:neutrals/neutral-950","voice-btn-submit-text-hover":"colors:neutrals/neutral-950"},feedback:{"feedback-headline":"colors:neutrals/neutral-050","feedback-text":"colors:neutrals/neutral-050","feedback-input-bg":"colors:neutrals/neutral-900","feedback-input-border":"colors:neutrals/neutral-400","feedback-input-border-hover":"colors:neutrals/neutral-400","feedback-input-border-hover-focus":"colors:brand/Yellow-300","feedback-border-top":"colors:neutrals/neutral-600","feedback-input-icon":"colors:neutrals/neutral-050","feedback-border":"colors:neutrals/neutral-100"},toast:{"toast-bg-success":"colors:system/Green","toast-bg-info":"colors:system/Blue","toast-bg-warning":"colors:system/Yellow","toast-bg-error":"colors:system/Red","toast-icon-success":"colors:neutrals/neutral-950","toast-icon-info":"colors:neutrals/neutral-950","toast-icon-warning":"colors:neutrals/neutral-950","toast-icon-error":"colors:neutrals/neutral-950","toast-text-success":"colors:neutrals/neutral-950","toast-text-info":"colors:neutrals/neutral-950","toast-text-warning":"colors:neutrals/neutral-950","toast-text-error":"colors:neutrals/neutral-950","toast-borer-success":"colors:system/Green","toast-border-info":"colors:system/Blue","toast-border-warning":"colors:system/Yellow","toast-border-error":"colors:system/Red"},header:{"header-mobile-bg":"colors:neutrals/neutral-950","header-mobile-border":"colors:neutrals/neutral-700"},"widget-starter":{"ws-bubble-bg":"colors:brand/Yellow-300","ws-bubble-text":"colors:neutrals/neutral-950","ws-button-bg":"colors:brand/Yellow-50","ws-button-bg-hover":"colors:brand/Yellow-300","ws-button-icon":"colors:neutrals/neutral-950","ws-button-icon-hover":"colors:neutrals/neutral-950","ws-bubble-border":"colors:brand/Yellow-300","ws-button-border":"colors:brand/Yellow-300","ws-button-border-hover":"colors:brand/Yellow-300","ws-close-bg":"colors:brand/Yellow-50","ws-close-border":"colors:brand/Yellow-50","ws-close-icon":"colors:neutrals/neutral-950"}},responsive:{radius:{none:{desktop:0,tablet:0,mobile:0},xs:{desktop:4,tablet:4,mobile:4},s:{desktop:8,tablet:8,mobile:8},m:{desktop:16,tablet:16,mobile:16},l:{desktop:24,tablet:24,mobile:24},xl:{desktop:48,tablet:48,mobile:48},xxl:{desktop:64,tablet:64,mobile:64},max:{desktop:999,tablet:999,mobile:999}},fontsize:{h1:{desktop:36,tablet:28,mobile:28},h2:{desktop:24,tablet:22,mobile:22},h3:{desktop:20,tablet:20,mobile:20},h4:{desktop:18,tablet:18,mobile:18},h5:{desktop:20,tablet:18,mobile:18},h6:{desktop:18,tablet:16,mobile:16},"body-xs":{desktop:12,tablet:10,mobile:10},"body-s":{desktop:14,tablet:14,mobile:14},"body-m":{desktop:16,tablet:14,mobile:14},"body-l":{desktop:18,tablet:16,mobile:16}},spacing:{none:{desktop:0,tablet:0,mobile:0},xs:{desktop:4,tablet:4,mobile:4},s:{desktop:8,tablet:8,mobile:8},sm:{desktop:12,tablet:10,mobile:10},m:{desktop:16,tablet:16,mobile:12},l:{desktop:24,tablet:24,mobile:16},xl:{desktop:48,tablet:48,mobile:32},xxl:{desktop:80,tablet:64,mobile:40},xxxl:{desktop:120,tablet:80,mobile:64}},stroke:{s:{desktop:1,tablet:1,mobile:1},m:{desktop:2,tablet:2,mobile:2},l:{desktop:4,tablet:4,mobile:4}},iconSize:{xs:{desktop:12,tablet:12,mobile:12},s:{desktop:16,tablet:16,mobile:16},m:{desktop:20,tablet:18,mobile:18},l:{desktop:32,tablet:24,mobile:24},xl:{desktop:48,tablet:40,mobile:40}}}},this.setupCustomCSSListener(),this.setupDarkModeListener(),this.loadStyles();const t=document.createElement("div");this.shadowRoot.appendChild(t),this.removeAttribute("title");const o=xn(t);o.render((({config:e})=>kn(yt,{config:e,children:kn(uo,{config:e,children:kn(Hu,{})})}))({config:e})),this.root=o}setupCustomCSSListener(){this.themeConfigHandler=e=>{e.detail&&e.detail.themeConfig&&(this.themeConfig=e.detail.themeConfig,console.log("🎨 Theme configuration received from external config"),this.loadStyles())},this.customCSSHandler=e=>{e.detail&&e.detail.css&&(this.customCSS=e.detail.css,console.log("🎨 Custom CSS received from external config"),this.loadStyles())},document.addEventListener("chatbot-theme-config",this.themeConfigHandler),document.addEventListener("chatbot-custom-css",this.customCSSHandler)}setupDarkModeListener(){this.darkModeHandler=e=>{var n,t;null!==(t=null===(n=e.detail)||void 0===n?void 0:n.isDarkMode)&&void 0!==t&&t?this.setAttribute("data-dark-mode","true"):this.setAttribute("data-dark-mode","false")},this.darkModeConfigHandler=e=>{var n,t;const o=null!==(t=null===(n=e.detail)||void 0===n?void 0:n.enabled)&&void 0!==t&&t;this.darkModeEnabled=o,console.log(`🌙 Dark mode ${o?"enabled":"disabled"} via config`),this.loadStyles()},document.addEventListener("chatbot-dark-mode-change",this.darkModeHandler),document.addEventListener("chatbot-dark-mode-config",this.darkModeConfigHandler)}loadStyles(){return $u(this,void 0,void 0,function*(){try{this.shadowRoot.querySelectorAll("style").forEach(e=>e.remove());const e=Et(this.themeConfig,this.customCSS,this.darkModeEnabled);this.shadowRoot.appendChild(e)}catch(e){console.error("Error loading styles:",e)}})}disconnectedCallback(){this.root&&this.root.unmount(),this.themeConfigHandler&&document.removeEventListener("chatbot-theme-config",this.themeConfigHandler),this.customCSSHandler&&document.removeEventListener("chatbot-custom-css",this.customCSSHandler),this.darkModeHandler&&document.removeEventListener("chatbot-dark-mode-change",this.darkModeHandler),this.darkModeConfigHandler&&document.removeEventListener("chatbot-dark-mode-config",this.darkModeConfigHandler)}open(){this.entrySource="chat",this.dispatchEvent(new CustomEvent("chatbot-open",{bubbles:!0,detail:{entrySource:"chat"}}))}openAsSearch(){this.entrySource="search",this.dispatchEvent(new CustomEvent("chatbot-open",{bubbles:!0,detail:{entrySource:"search"}}))}close(){this.dispatchEvent(new CustomEvent("chatbot-close",{bubbles:!0}))}toggle(){this.dispatchEvent(new CustomEvent("chatbot-toggle",{bubbles:!0}))}sendMessage(e){e&&"string"==typeof e?document.dispatchEvent(new CustomEvent("chatbot-send-message",{bubbles:!0,detail:{message:e}})):console.warn("sendMessage: Invalid or missing message")}}function Yu(){const e=document.querySelectorAll("#aigelb-search-trigger");for(const n of e){const e=()=>{document.dispatchEvent(new CustomEvent("chatbot-open",{bubbles:!0,detail:{entrySource:"search"}}))},t=n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),e())};n.addEventListener("click",e),n.addEventListener("keydown",t),n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.hasAttribute("role")||n.setAttribute("role","button"),n.hasAttribute("aria-label")||n.setAttribute("aria-label","Suche öffnen")}}function Vu(){const e=document.querySelectorAll("#aigelb-chat-trigger");for(const n of e){const e=()=>{document.dispatchEvent(new CustomEvent("chatbot-open",{bubbles:!0,detail:{entrySource:"chat"}}))},t=n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),e())};n.addEventListener("click",e),n.addEventListener("keydown",t),n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.hasAttribute("role")||n.setAttribute("role","button"),n.hasAttribute("aria-label")||n.setAttribute("aria-label","Chat öffnen")}}customElements.define("aigelb-chatbot",Uu),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Yu):Yu(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Vu):Vu()})();
|