@ibiz-template-plugin/ai-chat 0.0.5 → 0.0.6
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/index.es.js +4 -3
- package/dist/index.legacy.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1285,7 +1285,7 @@ const S = new U("markdown-message"), cn = (t) => {
|
|
|
1285
1285
|
})]
|
|
1286
1286
|
})]
|
|
1287
1287
|
}), u("div", {
|
|
1288
|
-
className: S.b("content"),
|
|
1288
|
+
className: "".concat(S.b("content"), " pre-wrap-container"),
|
|
1289
1289
|
children: u("div", {
|
|
1290
1290
|
id: i
|
|
1291
1291
|
})
|
|
@@ -1320,6 +1320,7 @@ const O = new U("user-message-question"), un = (t) => {
|
|
|
1320
1320
|
className: O.em("content", "body"),
|
|
1321
1321
|
children: u("p", {
|
|
1322
1322
|
dir: "auto",
|
|
1323
|
+
className: "pre-wrap-container",
|
|
1323
1324
|
children: e
|
|
1324
1325
|
})
|
|
1325
1326
|
})
|
|
@@ -1376,7 +1377,7 @@ const x = new U("error-message"), _n = (t) => {
|
|
|
1376
1377
|
})]
|
|
1377
1378
|
})]
|
|
1378
1379
|
}), u("div", {
|
|
1379
|
-
className: x.e("content"),
|
|
1380
|
+
className: "".concat(x.e("content"), " pre-wrap-container"),
|
|
1380
1381
|
children: u("span", {
|
|
1381
1382
|
children: e
|
|
1382
1383
|
})
|
|
@@ -1386,7 +1387,7 @@ const x = new U("error-message"), _n = (t) => {
|
|
|
1386
1387
|
const tt = new U("unknown-message"), fn = (t) => u("div", {
|
|
1387
1388
|
className: tt.b(),
|
|
1388
1389
|
children: u("span", {
|
|
1389
|
-
className: tt.e("content"),
|
|
1390
|
+
className: "".concat(tt.e("content"), " pre-wrap-container"),
|
|
1390
1391
|
children: ["暂未支持的消息类型: ", t.message.type]
|
|
1391
1392
|
})
|
|
1392
1393
|
}), hn = new U("chat-message-item"), dn = (t) => {
|
package/dist/index.legacy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=o(e);if(t){var a=o(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}(this,n)}}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new H(r||[]);return i(a,"_invoke",{value:A(e,n,s)}),a}function _(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",v="suspendedYield",p="executing",m="completed",y={};function g(){}function b(){}function w(){}var k={};f(k,s,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(T([])));S&&S!==n&&r.call(S,s)&&(k=S);var E=w.prototype=g.prototype=Object.create(k);function N(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,o,a,s){var c=_(e[i],e,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==l(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function A(t,n,r){var i=d;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(s,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=_(t,n,r);if("normal"===l.type){if(i=r.done?m:v,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=_(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function H(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(l(t)+" is not iterable")}return b.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},N(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(h(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(E),f(E,u,"Generator"),f(E,s,(function(){return this})),f(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,H.prototype={constructor:H,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function s(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){s(o,r,i,a,c,"next",e)}function c(e){s(o,r,i,a,c,"throw",e)}a(void 0)}))}}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){var t=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===l(t)?t:String(t)}System.register(["interactjs","cherry-markdown"],(function(t,o){"use strict";var s,f;return{setters:[function(e){s=e.default},function(e){f=e.default}],execute:function(){var o,d,v,p,m,y,g,b,w={},k=[],x=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function E(e,t){for(var n in t)e[n]=t[n];return e}function N(e){var t=e.parentNode;t&&t.removeChild(e)}function C(e,t,n){var r,i,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?i=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return A(e,s,r,i,null)}function A(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++v:i};return null==i&&null!=d.vnode&&d.vnode(o),o}function O(e){return e.children}function L(e,t){this.props=e,this.context=t}function P(e,t){if(null==t)return e.__?P(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__d||n.__e;return"function"==typeof e.type?P(e):null}function H(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return H(e)}}function T(e){(!e.__d&&(e.__d=!0)&&m.push(e)&&!z.__r++||y!==d.debounceRendering)&&((y=d.debounceRendering)||g)(z)}function z(){var e,t,n,r,i,o,a,s,c;for(m.sort(b);e=m.shift();)e.__d&&(t=m.length,r=void 0,i=void 0,o=void 0,s=(a=(n=e).__v).__e,(c=n.__P)&&(r=[],i=[],(o=E({},a)).__v=a.__v+1,$(c,a,o,n.__n,void 0!==c.ownerSVGElement,null!=a.__h?[s]:null,r,null==s?P(a):s,a.__h,i),D(r,a,i),a.__e!=s&&H(a)),m.length>t&&m.sort(b));z.__r=0}function M(e,t,n,r,i,o,a,s,c,l,u){var f,h,_,d,v,p,m,y,g,b=0,x=r&&r.__k||k,E=x.length,N=E,C=t.length;for(n.__k=[],f=0;f<C;f++)null!=(d=n.__k[f]=null==(d=t[f])||"boolean"==typeof d||"function"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?A(null,d,null,null,d):S(d)?A(O,{children:d},null,null,null):d.__b>0?A(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)?(d.__=n,d.__b=n.__b+1,-1===(y=U(d,x,m=f+b,N))?_=w:(_=x[y]||w,x[y]=void 0,N--),$(e,d,_,i,o,a,s,c,l,u),v=d.__e,(h=d.ref)&&_.ref!=h&&(_.ref&&q(_.ref,null,d),u.push(h,d.__c||v,d)),null!=v&&(null==p&&(p=v),(g=_===w||null===_.__v)?-1==y&&b--:y!==m&&(y===m+1?b++:y>m?N>C-m?b+=y-m:b--:b=y<m&&y==m-1?y-m:0),m=f+b,"function"!=typeof d.type||y===m&&_.__k!==d.__k?"function"==typeof d.type||y===m&&!g?void 0!==d.__d?(c=d.__d,d.__d=void 0):c=v.nextSibling:c=F(e,v,c):c=R(d,c,e),"function"==typeof n.type&&(n.__d=c))):(_=x[f])&&null==_.key&&_.__e&&(_.__e==c&&(_.__=r,c=P(_)),G(_,_,!1),x[f]=null);for(n.__e=p,f=E;f--;)null!=x[f]&&("function"==typeof n.type&&null!=x[f].__e&&x[f].__e==n.__d&&(n.__d=x[f].__e.nextSibling),G(x[f],x[f]))}function R(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?R(r,t,n):F(n,r.__e,t));return t}function j(e,t){return t=t||[],null==e||"boolean"==typeof e||(S(e)?e.some((function(e){j(e,t)})):t.push(e)),t}function F(e,t,n){return null==n||n.parentNode!==e?e.insertBefore(t,null):t==n&&null!=t.parentNode||e.insertBefore(t,n),t.nextSibling}function U(e,t,n,r){var i=e.key,o=e.type,a=n-1,s=n+1,c=t[n];if(null===c||c&&i==c.key&&o===c.type)return n;if(r>(null!=c?1:0))for(;a>=0||s<t.length;){if(a>=0){if((c=t[a])&&i==c.key&&o===c.type)return a;a--}if(s<t.length){if((c=t[s])&&i==c.key&&o===c.type)return s;s++}}return-1}function V(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||x.test(t)?n:n+"px"}function W(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||V(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||V(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?I:B,o)):e.removeEventListener(t,o?I:B,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function B(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(d.event?d.event(e):e)}function I(e){return this.l[e.type+!0](d.event?d.event(e):e)}function $(e,t,n,r,i,a,s,c,l,u){var f,h,_,v,p,m,y,g,b,k,x,C,A,H,T,z=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,c=t.__e=n.__e,t.__h=null,a=[c]),(f=d.__b)&&f(t);e:if("function"==typeof z)try{if(g=t.props,b=(f=z.contextType)&&r[f.__c],k=f?b?b.props.value:f.__:r,n.__c?y=(h=t.__c=n.__c).__=h.__E:("prototype"in z&&z.prototype.render?t.__c=h=new z(g,k):(t.__c=h=new L(g,k),h.constructor=z,h.render=Y),b&&b.sub(h),h.props=g,h.state||(h.state={}),h.context=k,h.__n=r,_=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=z.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=E({},h.__s)),E(h.__s,z.getDerivedStateFromProps(g,h.__s))),v=h.props,p=h.state,h.__v=t,_)null==z.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==z.getDerivedStateFromProps&&g!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,k),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,k)||t.__v===n.__v)){for(t.__v!==n.__v&&(h.props=g,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),x=0;x<h._sb.length;x++)h.__h.push(h._sb[x]);h._sb=[],h.__h.length&&s.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,k),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(v,p,m)}))}if(h.context=k,h.props=g,h.__P=e,h.__e=!1,C=d.__r,A=0,"prototype"in z&&z.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(t),f=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,C&&C(t),f=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(r=E(E({},r),h.getChildContext())),_||null==h.getSnapshotBeforeUpdate||(m=h.getSnapshotBeforeUpdate(v,p)),M(e,S(T=null!=f&&f.type===O&&null==f.key?f.props.children:f)?T:[T],t,n,r,i,a,s,c,l,u),h.base=t.__e,t.__h=null,h.__h.length&&s.push(h),y&&(h.__E=h.__=null)}catch(e){t.__v=null,(l||null!=a)&&(t.__e=c,t.__h=!!l,a[a.indexOf(c)]=null),d.__e(e,t,n)}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,a,s,c,l){var u,f,h,_=n.props,d=t.props,v=t.type,p=0;if("svg"===v&&(i=!0),null!=a)for(;p<a.length;p++)if((u=a[p])&&"setAttribute"in u==!!v&&(v?u.localName===v:3===u.nodeType)){e=u,a[p]=null;break}if(null==e){if(null===v)return document.createTextNode(d);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,d.is&&d),a=null,c=!1}if(null===v)_===d||c&&e.data===d||(e.data=d);else{if(a=a&&o.call(e.childNodes),f=(_=n.props||w).dangerouslySetInnerHTML,h=d.dangerouslySetInnerHTML,!c){if(null!=a)for(_={},p=0;p<e.attributes.length;p++)_[e.attributes[p].name]=e.attributes[p].value;(h||f)&&(h&&(f&&h.__html==f.__html||h.__html===e.innerHTML)||(e.innerHTML=h&&h.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||W(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||W(e,o,t[o],n[o],r)}(e,d,_,i,c),h)t.__k=[];else if(M(e,S(p=t.props.children)?p:[p],t,n,r,i&&"foreignObject"!==v,a,s,a?a[0]:n.__k&&P(n,0),c,l),null!=a)for(p=a.length;p--;)null!=a[p]&&N(a[p]);c||("value"in d&&void 0!==(p=d.value)&&(p!==e.value||"progress"===v&&!p||"option"===v&&p!==_.value)&&W(e,"value",p,_.value,!1),"checked"in d&&void 0!==(p=d.checked)&&p!==e.checked&&W(e,"checked",p,_.checked,!1))}return e}(n.__e,t,n,r,i,a,s,l,u);(f=d.diffed)&&f(t)}function D(e,t,n){for(var r=0;r<n.length;r++)q(n[r],n[++r],n[++r]);d.__c&&d.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){d.__e(e,t.__v)}}))}function q(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){d.__e(e,n)}}function G(e,t,n){var r,i;if(d.unmount&&d.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||q(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){d.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&G(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||N(e.__e),e.__=e.__e=e.__d=void 0}function Y(e,t,n){return this.constructor(e,n)}function J(e,t,n){var r,i,a,s;d.__&&d.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],s=[],$(t,e=(!r&&n||t).__k=C(O,null,[e]),i||w,w,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?o.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,s),D(a,e,s)}o=k.slice,d={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},v=0,p=function(e){return null!=e&&void 0===e.constructor},L.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=E({},this.state),"function"==typeof e&&(e=e(E({},n),this.props)),e&&E(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),T(this))},L.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},L.prototype.render=O,m=[],g="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},z.__r=0;function X(e,t,n,r,i){var o="".concat(e,"-").concat(t);return n&&(o+="-".concat(n)),r&&(o+="__".concat(r)),i&&(o+="--".concat(i)),o}var Z=function(){function e(t,n){u(this,e),_(this,"namespace",void 0),this.block=t,this.namespace=n||"ibiz"}return h(e,[{key:"b",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return X(this.namespace,this.block,e,"","")}},{key:"e",value:function(e){return e?X(this.namespace,this.block,"",e,""):""}},{key:"m",value:function(e){return e?X(this.namespace,this.block,"","",e):""}},{key:"be",value:function(e,t){return e&&t?X(this.namespace,this.block,e,t,""):""}},{key:"em",value:function(e,t){return e&&t?X(this.namespace,this.block,"",e,t):""}},{key:"bm",value:function(e,t){return e&&t?X(this.namespace,this.block,e,"",t):""}},{key:"bem",value:function(e,t,n){return e&&t&&n?X(this.namespace,this.block,e,t,n):""}},{key:"is",value:function(e,t){return e&&t?"".concat("is-").concat(e):""}},{key:"cssVar",value:function(e){var t={};for(var n in e)e[n]&&(t[this.cssVarName(n)]=e[n]);return t}},{key:"cssVarBlock",value:function(e){var t={};for(var n in e)e[n]&&(t[this.cssVarBlockName(n)]=e[n]);return t}},{key:"cssVarName",value:function(e){return"--".concat(this.namespace,"-").concat(e)}},{key:"cssVarBlockName",value:function(e){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(e)}}]),e}();function K(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Q(e,t){for(var n,r="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),o=s,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,s):r=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var ee={resolve:function(){for(var e,t="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var i;r>=0?i=arguments[r]:(void 0===e&&(e=process.cwd()),i=e),K(i),0!==i.length&&(t=i+"/"+t,n=47===i.charCodeAt(0))}return t=Q(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(K(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=Q(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return K(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];K(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":ee.normalize(e)},relative:function(e,t){if(K(e),K(t),e===t)return"";if((e=ee.resolve(e))===(t=ee.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var r=e.length,i=r-n,o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var a=t.length-o,s=i<a?i:a,c=-1,l=0;l<=s;++l){if(l===s){if(a>s){if(47===t.charCodeAt(o+l))return t.slice(o+l+1);if(0===l)return t.slice(o+l)}else i>s&&(47===e.charCodeAt(n+l)?c=l:0===l&&(c=0));break}var u=e.charCodeAt(n+l);if(u!==t.charCodeAt(o+l))break;47===u&&(c=l)}var f="";for(l=n+c+1;l<=r;++l)l!==r&&47!==e.charCodeAt(l)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(o+c):(o+=c,47===t.charCodeAt(o)&&++o,t.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(K(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');K(e);var n,r=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(c===t.charCodeAt(a)?-1==--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){K(e);for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!==l(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+l(e));return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){K(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),i=47===r;i?(t.root="/",n=1):n=0;for(var o=-1,a=0,s=-1,c=!0,l=e.length-1,u=0;l>=n;--l)if(47!==(r=e.charCodeAt(l)))-1===s&&(c=!1,s=l+1),46===r?-1===o?o=l:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){a=l+1;break}return-1===o||-1===s||0===u||1===u&&o===s-1&&o===a+1?-1!==s&&(t.base=t.name=0===a&&i?e.slice(1,s):e.slice(a,s)):(0===a&&i?(t.name=e.slice(1,o),t.base=e.slice(1,s)):(t.name=e.slice(a,o),t.base=e.slice(a,s)),t.ext=e.slice(o,s)),a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};function te(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function ne(){return"".concat(te()+te(),"-").concat(te(),"-").concat(te(),"-").concat(te(),"-").concat(te()).concat(te()).concat(te())}ee.posix=ee;var re=function(){function e(){u(this,e)}return h(e,null,[{key:"copy",value:function(e){return this.inputElement||(this.inputElement=document.createElement("input"),this.inputElement.style.position="absolute",this.inputElement.style.left="-9999px",document.body.appendChild(this.inputElement)),this.inputElement.value=e,this.inputElement.select(),document.execCommand("copy")}}]),e}();_(re,"inputElement",null);var ie,oe,ae,se,ce=0,le=[],ue=[],fe=d.__b,he=d.__r,_e=d.diffed,de=d.__c,ve=d.unmount;function pe(e,t){d.__h&&d.__h(oe,e,ce||t),ce=0;var n=oe.__H||(oe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ue}),n.__[e]}function me(e,t){var n=pe(ie++,3);!d.__s&&Ne(n.__H,t)&&(n.__=e,n.i=t,oe.__H.__h.push(n))}function ye(e){return ce=5,ge((function(){return{current:e}}),[])}function ge(e,t){var n=pe(ie++,7);return Ne(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function be(e,t){return ce=8,ge((function(){return e}),t)}function we(){for(var e;e=le.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Se),e.__H.__h.forEach(Ee),e.__H.__h=[]}catch(Kt){e.__H.__h=[],d.__e(Kt,e.__v)}}d.__b=function(e){oe=null,fe&&fe(e)},d.__r=function(e){he&&he(e),ie=0;var t=(oe=e.__c).__H;t&&(ae===oe?(t.__h=[],oe.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ue,e.__N=e.i=void 0}))):(t.__h.forEach(Se),t.__h.forEach(Ee),t.__h=[],ie=0)),ae=oe},d.diffed=function(e){_e&&_e(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==le.push(t)&&se===d.requestAnimationFrame||((se=d.requestAnimationFrame)||xe)(we)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ue&&(e.__=e.__V),e.i=void 0,e.__V=ue}))),ae=oe=null},d.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Se),e.__h=e.__h.filter((function(e){return!e.__||Ee(e)}))}catch(Re){t.some((function(e){e.__h&&(e.__h=[])})),t=[],d.__e(Re,e.__v)}})),de&&de(e,t)},d.unmount=function(e){ve&&ve(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Se(e)}catch(e){t=e}})),n.__H=void 0,t&&d.__e(t,n.__v))};var ke="function"==typeof requestAnimationFrame;function xe(e){var t,n=function(){clearTimeout(r),ke&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ke&&(t=requestAnimationFrame(n))}function Se(e){var t=oe,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),oe=t}function Ee(e){var t=oe;e.__c=e.__(),oe=t}function Ne(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ce(){throw new Error("Cycle detected")}var Ae=Symbol.for("preact-signals");function Oe(){if(ze>1)ze--;else{for(var e,t=!1;void 0!==Te;){var n=Te;for(Te=void 0,Me++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ve(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(Me=0,ze--,t)throw e}}var Le,Pe,He=void 0,Te=void 0,ze=0,Me=0,Re=0;function je(e){if(void 0!==He){var t=e.n;if(void 0===t||t.t!==He)return t={i:0,S:e,p:He.s,n:void 0,t:He,e:void 0,x:void 0,r:t},void 0!==He.s&&(He.s.n=t),He.s=t,e.n=t,32&He.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=He.s,t.n=void 0,He.s.n=t,He.s=t),t}}function Fe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function Ue(e){return new Fe(e)}function Ve(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function We(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Be(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function Ie(e){Fe.call(this,void 0),this.x=e,this.s=void 0,this.g=Re-1,this.f=4}function $e(e){return new Ie(e)}function De(e){var t=e.u;if(e.u=void 0,"function"==typeof t){ze++;var n=He;He=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,qe(e),t}finally{He=n,Oe()}}}function qe(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,De(e)}function Ge(e){if(He!==this)throw new Error("Out-of-order effect");Be(this),He=e,this.f&=-2,8&this.f&&qe(this),Oe()}function Ye(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Je(e){var t=new Ye(e);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function Xe(e,t){d[e]=t.bind(null,d[e]||function(){})}function Ze(e){Pe&&Pe(),Pe=e&&e.S()}function Ke(e){var t=this,n=e.data,r=et(n);r.value=n;var i=ge((function(){for(var e=t.__v;e=e.__;)if(e.__c){e.__c.__$f|=4;break}return t.__$u.c=function(){var e;p(i.peek())||3!==(null==(e=t.base)?void 0:e.nodeType)?(t.__$f|=1,t.setState({})):t.base.data=i.peek()},$e((function(){var e=r.value.value;return 0===e?0:!0===e?"":e||""}))}),[]);return i.value}function Qe(e,t,n,r){var i=t in e&&void 0===e.ownerSVGElement,o=Ue(n);return{o:function(e,t){o.value=e,r=t},d:Je((function(){var n=o.value.value;r[t]!==n&&(r[t]=n,i?e[t]=n:n?e.setAttribute(t,n):e.removeAttribute(t))}))}}function et(e){return ge((function(){return Ue(e)}),[])}function tt(e){var t=ye(e);return t.current=e,Le.__$f|=4,ge((function(){return $e((function(){return t.current()}))}),[])}Fe.prototype.brand=Ae,Fe.prototype.h=function(){return!0},Fe.prototype.S=function(e){this.t!==e&&void 0===e.e&&(e.x=this.t,void 0!==this.t&&(this.t.e=e),this.t=e)},Fe.prototype.U=function(e){if(void 0!==this.t){var t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},Fe.prototype.subscribe=function(e){var t=this;return Je((function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}}))},Fe.prototype.valueOf=function(){return this.value},Fe.prototype.toString=function(){return this.value+""},Fe.prototype.toJSON=function(){return this.value},Fe.prototype.peek=function(){return this.v},Object.defineProperty(Fe.prototype,"value",{get:function(){var e=je(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(He instanceof Ie&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Me>100&&Ce(),this.v=e,this.i++,Re++,ze++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{Oe()}}}}),(Ie.prototype=new Fe).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Re)return!0;if(this.g=Re,this.f|=1,this.i>0&&!Ve(this))return this.f&=-2,!0;var e=He;try{We(this),He=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return He=e,Be(this),this.f&=-2,!0},Ie.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}Fe.prototype.S.call(this,e)},Ie.prototype.U=function(e){if(void 0!==this.t&&(Fe.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},Ie.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Ie.prototype.peek=function(){if(this.h()||Ce(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ie.prototype,"value",{get:function(){1&this.f&&Ce();var e=je(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Ye.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.u=t)}finally{e()}},Ye.prototype.S=function(){1&this.f&&Ce(),this.f|=1,this.f&=-9,De(this),We(this),ze++;var e=He;return He=this,Ge.bind(this,e)},Ye.prototype.N=function(){2&this.f||(this.f|=2,this.o=Te,Te=this)},Ye.prototype.d=function(){this.f|=8,1&this.f||qe(this)},Ke.displayName="_st",Object.defineProperties(Fe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Ke},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Xe("__b",(function(e,t){if("string"==typeof t.type){var n,r=t.props;for(var i in r)if("children"!==i){var o=r[i];o instanceof Fe&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)})),Xe("__r",(function(e,t){Ze();var n,r=t.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=n=function(e){var t;return Je((function(){t=this})),t.c=function(){r.__$f|=1,r.setState({})},t}())),Le=r,Ze(n),e(t)})),Xe("__e",(function(e,t,n,r){Ze(),Le=void 0,e(t,n,r)})),Xe("diffed",(function(e,t){var n;if(Ze(),Le=void 0,"string"==typeof t.type&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var a in o){var s=o[a];void 0===s||a in r||(s.d(),o[a]=void 0)}else n.U=o={};for(var c in r){var l=o[c],u=r[c];void 0===l?(l=Qe(n,c,u,i),o[c]=l):l.o(u,i)}}}e(t)})),Xe("unmount",(function(e,t){if("string"==typeof t.type){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var o=r[i];o&&o.d()}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)})),Xe("__h",(function(e,t,n,r){(r<3||9===r)&&(t.__$f|=2),e(t,n,r)})),L.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&void 0!==n.s||4&this.__$f))return!0;if(3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if("__source"!==i&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};var nt=0;function rt(e,t,n,r,i,o){var a,s,c={};for(s in t)"ref"==s?a=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--nt,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===c[s]&&(c[s]=a[s]);return d.vnode&&d.vnode(l),l}var it=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M843.904 783.573333 783.573333 843.904 512.042667 572.373333 240.512 843.904 180.181333 783.573333 451.712 512.042667 180.181333 240.512 240.512 180.181333 512.042667 451.712 783.573333 180.181333 843.904 240.512 572.373333 512.042667 843.904 783.573333Z"})})},ot=function(){return rt("svg",{className:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M900.64 379.808l-263.072-256.032c-36.448-35.328-105.76-35.392-142.304 0.096l-327.04 319.904c-56.416 54.72-70.72 76.704-70.72 150.976l0 143.936c0 132.768 26.976 192 186.912 192l131.872 0c81.12 0 128.448-46.656 193.952-111.264l290.016-297.696c18.592-17.984 29.248-43.968 29.248-71.264C929.504 423.36 918.976 397.6 900.64 379.808zM323.008 786.752c-52.928 0-96-43.072-96-96s43.072-96 96-96 96 43.072 96 96S375.936 786.752 323.008 786.752z"})})},at=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})},st=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z"})})},ct=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z"})})},lt=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M891.072 822.144V167.36a34.432 34.432 0 0 0-34.432-34.432H201.856C201.856 94.848 232.704 64 270.784 64h620.288C929.152 64 960 94.848 960 132.928v620.288c0 38.08-30.848 68.928-68.928 68.928z m-68.928-551.36v620.288c0 38.08-30.848 68.928-68.928 68.928H132.928A68.928 68.928 0 0 1 64 891.072V270.784c0-38.08 30.848-68.928 68.928-68.928h620.288c38.08 0 68.928 30.848 68.928 68.928z m-137.856 137.856H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z m0 206.72H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z"})})},ut=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M547.4 197.4v46l200.3 0.1L546.1 444l32.4 32.6 201.9-200.7v200.9h46V197.5zM471.4 584.4l-32.6-32.6L243.6 747V547.9h-46v278.7h279v-46H275z"})})},ft=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M544 480V282.944h52.224l0.064 107.968L763.072 224l36.928 36.928-166.976 166.976 108.032-0.128V480H544zM260.928 800l-36.928-36.928 166.912-166.784-107.968-0.064V544H480v197.056h-52.224l0.064-107.968L260.928 800z"})})},ht=new Z("markdown-message"),_t=function(e){var t=e.message,n=e.size,r=et(ne()),i=et(null);me((function(){n>=0&&i.value&&i.value.setMarkdown(t.content)}),[t,n]),me((function(){i.value=new f({id:r,value:t.content,editor:{defaultModel:"previewOnly"}})}),[]);return rt("div",{className:"".concat(ht.b()," ").concat(ht.is("loading",20===t.state)),children:[rt("div",{className:ht.b("header"),children:[rt("div",{className:ht.be("header","caption"),children:"AI "}),rt("div",{className:ht.b("header-action-wrapper"),children:[rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.backfill(t)},children:[rt(ot,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"回填"})]}),rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.refreshMessage(t)},children:[rt(ct,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"刷新"})]}),rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.deleteMessage(t)},children:[rt(st,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"删除"})]}),rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.copyMessage(t)},children:[rt(lt,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"复制"})]})]})]}),rt("div",{className:ht.b("content"),children:rt("div",{id:r})}),rt("div",{className:ht.b("footer")})]})},dt=new Z("user-message-question"),vt=function(e){var t=tt((function(){return e.message.content}));return rt("div",{className:dt.b(),children:[rt("div",{className:dt.e("user-header"),children:[rt("div",{className:dt.e("user-action"),onClick:function(){e.controller.refreshMessage(e.message,!0)},children:[rt(ct,{}),rt("span",{className:dt.em("user-action","title"),children:"刷新"})]}),rt("div",{className:dt.e("user"),children:"我"})]}),rt("div",{className:dt.e("content"),children:rt("div",{dir:"auto",className:dt.em("content","body"),children:rt("p",{dir:"auto",children:t})})})]})},pt=new Z("error-message"),mt=function(e){var t=tt((function(){return e.message.content}));return rt("div",{className:pt.b(),children:[rt("div",{className:pt.b("header"),children:[rt("div",{className:pt.be("header","caption"),children:"AI "}),rt("div",{className:pt.b("header-action-wrapper"),children:[rt("div",{className:pt.be("header","action-item"),onClick:function(){e.controller.backfill(e.message)},children:[rt(ot,{}),rt("span",{className:pt.bem("header","action-item","title"),children:"回填"})]}),rt("div",{className:pt.be("header","action-item"),onClick:function(){e.controller.refreshMessage(e.message)},children:[rt(ct,{}),rt("span",{className:pt.bem("header","action-item","title"),children:"刷新"})]}),rt("div",{className:pt.be("header","action-item"),onClick:function(){e.controller.deleteMessage(e.message)},children:[rt(st,{}),rt("span",{className:pt.bem("header","action-item","title"),children:"删除"})]}),rt("div",{className:pt.be("header","action-item"),onClick:function(){e.controller.copyMessage(e.message)},children:[rt(lt,{}),rt("span",{className:pt.bem("header","action-item","title"),children:"复制"})]})]})]}),rt("div",{className:pt.e("content"),children:rt("span",{children:t})})]})},yt=new Z("unknown-message"),gt=function(e){return rt("div",{className:yt.b(),children:rt("span",{className:yt.e("content"),children:["暂未支持的消息类型: ",e.message.type]})})},bt=new Z("chat-message-item"),wt=function(e){var t=e.message,n=e.size,r=null;switch(t.type){case"DEFAULT":r="ASSISTANT"===t.role?_t:vt;break;case"ERROR":r=mt;break;default:r=gt}return rt("div",{className:bt.b(),children:C(r,{size:n,message:t,controller:e.controller})})},kt=new Z("chat-messages"),xt=function(e){var t=ye(null),n=e.controller.messages;return function(e){var t=ye(e);t.current=e,me((function(){return Je((function(){return t.current()}))}),[])}((function(){t.current&&n.value.length>0&&(t.current.scrollTop=t.current.scrollHeight)})),rt("div",{ref:t,className:kt.b(),children:n.value.map((function(t){var n,r=(null===(n=t.content)||void 0===n?void 0:n.length)||0;return rt(wt,{message:t,size:r,controller:e.controller},t.messageid)}))})};function St(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Et(e){this.props=e}(Et.prototype=new L).isPureReactComponent=!0,Et.prototype.shouldComponentUpdate=function(e,t){return St(this.props,e)||St(this.state,t)};var Nt=d.__b;d.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Nt&&Nt(e)};var Ct=d.__e;d.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Ct(e,t,n,r)};var At=d.unmount;function Ot(e,t,n){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=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ot(e,t,n)}))),e}function Lt(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Lt(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Pt(){this.__u=0,this.t=null,this.__b=null}function Ht(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Tt(){this.u=null,this.o=null}d.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),At&&At(e)},(Pt.prototype=new L).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Ht(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Lt(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Pt.prototype.componentWillUnmount=function(){this.t=[]},Pt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ot(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&C(O,null,e.fallback);return i&&(i.__h=null),[C(O,null,t.__a?null:e.children),i]};var zt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(Tt.prototype=new L).__a=function(e){var t=this,n=Ht(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),zt(t,e,r)):i()};n?n(o):o()}},Tt.prototype.render=function(e){this.u=null,this.o=new Map;var t=j(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Tt.prototype.componentDidUpdate=Tt.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){zt(e,n,t)}))};var Mt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Rt=/^(?: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]/,jt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ft=/[A-Z0-9]/g,Ut="undefined"!=typeof document,Vt=function(e){return("undefined"!=typeof Symbol&&"symbol"==l(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};L.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(L.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Wt=d.event;function Bt(){}function It(){return this.cancelBubble}function $t(){return this.defaultPrevented}d.event=function(e){return Wt&&(e=Wt(e)),e.persist=Bt,e.isPropagationStopped=It,e.isDefaultPrevented=$t,e.nativeEvent=e};var Dt={enumerable:!1,configurable:!0,get:function(){return this.class}},qt=d.vnode;d.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||Ut&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Vt(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":jt.test(i)?i=a:-1===n.indexOf("-")&&Rt.test(i)?i=i.replace(Ft,"-$&").toLowerCase():null===o&&(o=void 0):a=i="oninput","oninput"===a&&r[i=a]&&(i="oninputCapture"),r[i]=o}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=j(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=j(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Dt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Mt,qt&&qt(e)};var Gt=d.__r;d.__r=function(e){Gt&&Gt(e),e.__c};var Yt=d.diffed;d.diffed=function(e){Yt&&Yt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var Jt=new Map;function Xt(e){var t=Jt.get(e);t&&t.destroy()}function Zt(e){var t=Jt.get(e);t&&t.update()}var Kt=null;"undefined"==typeof window?((Kt=function(e){return e}).destroy=function(e){return e},Kt.update=function(e){return e}):((Kt=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!Jt.has(e)){var t,n=null,r=window.getComputedStyle(e),i=(t=e.value,function(){a({testForHeightReduction:""===t||!e.value.startsWith(t),restoreTextAlign:null}),t=e.value}),o=function(t){e.removeEventListener("autosize:destroy",o),e.removeEventListener("autosize:update",s),e.removeEventListener("input",i),window.removeEventListener("resize",s),Object.keys(t).forEach((function(n){return e.style[n]=t[n]})),Jt.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,textAlign:e.style.textAlign,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",o),e.addEventListener("autosize:update",s),e.addEventListener("input",i),window.addEventListener("resize",s),e.style.overflowX="hidden",e.style.wordWrap="break-word",Jt.set(e,{destroy:o,update:s}),s()}function a(t){var i,o,s=t.restoreTextAlign,c=void 0===s?null:s,l=t.testForHeightReduction,u=void 0===l||l,f=r.overflowY;if(0!==e.scrollHeight&&("vertical"===r.resize?e.style.resize="none":"both"===r.resize&&(e.style.resize="horizontal"),u&&(i=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach((function(e){var t=e[0],n=e[1];t.style.scrollBehavior="auto",t.scrollTop=n,t.style.scrollBehavior=null}))}}(e),e.style.height=""),o="content-box"===r.boxSizing?e.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):e.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&o>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(e.style.overflow="scroll"),o=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(e.style.overflow="hidden"),e.style.height=o+"px",c&&(e.style.textAlign=c),i&&i(),n!==o&&(e.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),n=o),f!==r.overflow&&!c)){var h=r.textAlign;"hidden"===r.overflow&&(e.style.textAlign="start"===h?"end":"start"),a({restoreTextAlign:h,testForHeightReduction:!0})}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Xt),e},Kt.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Zt),e});var Qt=Kt,en=new Z("chat-input"),tn=function(e){var t=ye(null),n=e.controller.input,r=et(!1),i=be((function(e){n.value=e.target.value}),[n]),o=tt((function(){return n.value.length<=0||!0===r.value}));me((function(){return t.current&&Qt(t.current),function(){t.current&&Qt.destroy(t.current)}}),[t]);var s=be(c(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.value=!0,t.prev=1,t.next=4,e.controller.question(n.value);case 4:n.value="",t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:return t.prev=10,r.value=!1,t.finish(10);case 13:case"end":return t.stop()}}),t,null,[[1,7,10,13]])}))),[n,r]);return rt("div",{className:en.b(),children:[rt("textarea",{className:en.e("textarea"),type:"text",rows:6,autoCorrect:"off",autoCapitalize:"off",autoComplete:"off",value:n,onInput:i,onKeyDown:function(e){"Enter"===e.code&&(e.stopPropagation(),!1===e.shiftKey&&s())},ref:t,disabled:r}),rt("div",{className:en.b("action-wrapper"),children:rt("div",{title:r?"思考中...":"发送消息",className:"".concat(en.be("action-wrapper","action-item")," ").concat(en.is("disabled",o.value)," ").concat(en.is("loading",r.value)),onClick:s,disabled:o,children:rt(at,{})})})]})},nn=function(e){return e.STYLE_CACHE="ai-chat-style-cache",e}(nn||{}),rn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}(o,e);var t=r(o);function o(e){var n;return u(this,o),_(i(n=t.call(this,e)),"ns",new Z("chat-container")),_(i(n),"containerRef",{current:null}),_(i(n),"dragHandle",{current:null}),_(i(n),"data",{x:window.innerWidth-600-100,y:100,width:600,height:600,minWidth:300,minHeight:300}),n.state={isFullScreen:!1},n}return h(o,[{key:"calcStyle",value:function(){return{right:"0px",top:"0px",height:"100vh",width:"".concat(this.data.width,"px"),"z-index":"1000"}}},{key:"setStyle",value:function(){Object.assign(this.containerRef.current.style,this.calcStyle())}},{key:"componentDidMount",value:function(){var e=this,t=localStorage.getItem(nn.STYLE_CACHE);t&&(this.data=JSON.parse(t),this.data.x>window.innerWidth&&(this.data.x=window.innerWidth-100),this.data.y>window.innerHeight&&(this.data.y=window.innerHeight-100)),this.setStyle();var n=this.data;s(this.containerRef.current).resizable({edges:{top:!1,right:!0,bottom:!1,left:!0},margin:6,modifiers:[s.modifiers.restrictEdges({outer:document.body}),s.modifiers.restrictSize({min:{width:n.minWidth,height:n.minHeight}})],inertia:!0,listeners:{move:function(t){n.x+=t.deltaRect.left,n.y+=t.deltaRect.top,n.width=t.rect.width,n.height=t.rect.height,e.setStyle()}}})}},{key:"componentWillUnmount",value:function(){localStorage.setItem(nn.STYLE_CACHE,JSON.stringify(this.data))}},{key:"close",value:function(){this.props.close()}},{key:"fullScreen",value:function(){var e=this.containerRef.current;e&&(e.requestFullscreen(),this.setState({isFullScreen:!0}),this.props.fullscreen(!0))}},{key:"closeFullScreen",value:function(){var e;this.state.isFullScreen&&(null===(e=document)||void 0===e||e.exitFullscreen(),this.setState({isFullScreen:!1}),this.props.fullscreen(!1))}},{key:"render",value:function(){return rt("div",{className:"\n ".concat(this.ns.b(),"\n ").concat(this.ns.is("full-screen",this.state.isFullScreen)),ref:this.containerRef,children:[rt("div",{ref:this.dragHandle,className:this.ns.b("header"),children:[rt("div",{className:this.ns.b("header-caption"),children:this.props.caption||"AIChart"}),rt("div",{className:this.ns.b("header-action-wrapper"),children:[this.state.isFullScreen?rt("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","close-full-screen")),onClick:this.closeFullScreen.bind(this),children:rt(ft,{})}):rt("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","full-screen")),onClick:this.fullScreen.bind(this),children:rt(ut,{})}),rt("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","action-close")),onClick:this.close.bind(this),children:rt(it,{})})]})]}),rt("div",{className:this.ns.b("content"),children:rt(xt,{controller:this.props.controller})}),rt("div",{className:this.ns.b("footer"),children:rt(tn,{controller:this.props.controller})})]})}}]),o}(L);t("ChatContainer",rn);var on=function(){function e(t){u(this,e),this.msg=t}return h(e,[{key:"messageid",get:function(){return this.msg.messageid}},{key:"state",get:function(){return this.msg.state}},{key:"role",get:function(){return this.msg.role}},{key:"type",get:function(){return this.msg.type}},{key:"content",get:function(){return this.msg.content}},{key:"_origin",get:function(){return this.msg}},{key:"update",value:function(e){e.content||(e.content=""),this.msg.content+=e.content}}]),e}(),an=function(){function t(e){u(this,t),_(this,"messages",Ue([])),_(this,"input",Ue("")),this.opts=e}var n,r;return h(t,[{key:"setInput",value:function(e){this.input.value=e||""}},{key:"addMessage",value:function(t){var n=this.messages.value.find((function(e){return e.messageid===t.messageid}));n?(n.update(t),this.messages.value=e(this.messages.value)):this.messages.value=[].concat(e(this.messages.value),[new on(t)])}},{key:"replaceMessage",value:function(t){var n=this.messages.value.findIndex((function(e){return e.messageid===t.messageid}));-1!==n?(this.messages.value[n]=new on(t),this.messages.value=e(this.messages.value)):this.messages.value=[].concat(e(this.messages.value),[new on(t)])}},{key:"question",value:(r=c(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.addMessage({state:30,messageid:ne(),role:"USER",type:"DEFAULT",content:t}),e.next=3,this.opts.question(this.messages.value.filter((function(e){return"ERROR"!==e.type})).map((function(e){return e._origin})));case 3:this.opts.action&&this.opts.action("question",t);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"backfill",value:function(e){this.opts.action&&this.opts.action("backfill",e)}},{key:"deleteMessage",value:function(t){var n=this.messages.value.findIndex((function(e){return e.messageid===t.messageid}));-1!==n&&(this.messages.value.splice(n,1),this.messages.value=e(this.messages.value)),this.opts.action&&this.opts.action("deletemsg",t)}},{key:"refreshMessage",value:(n=c(a().mark((function t(n){var r,i,o,s=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=s.length>1&&void 0!==s[1]&&s[1],i=this.messages.value.findIndex((function(e){return e.messageid===n.messageid})),!r){t.next=9;break}return this.messages.value.splice(i+1,this.messages.value.length-i-1),this.messages.value=e(this.messages.value),t.next=7,this.opts.question(this.messages.value.filter((function(e){return"ERROR"!==e.type})).map((function(e){return e._origin})));case 7:t.next=19;break;case 9:if(i!==this.messages.value.length-1){t.next=16;break}return this.messages.value.pop(),this.messages.value=e(this.messages.value),t.next=14,this.opts.question(this.messages.value.filter((function(e){return"ERROR"!==e.type})).map((function(e){return e._origin})));case 14:t.next=19;break;case 16:o=this.messages.value[i-1].content,this.messages.value.splice(i-1,2),this.question(o);case 19:this.opts.action&&this.opts.action("refreshmsg",n);case 20:case"end":return t.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"copyMessage",value:function(e){var t=e.content;re.copy(t),this.opts.action&&this.opts.action("copymsg",e)}}]),t}(),sn=function(){function e(){u(this,e),_(this,"container",void 0)}return h(e,[{key:"create",value:function(e){var t=this;this.close(),this.container=document.createElement("div"),this.container.classList.add("ibiz-ai-chat"),document.body.appendChild(this.container);var n=new an(e);return J(C(rn,{controller:n,caption:e.caption,close:function(){t.close(),e.closed&&e.closed()},fullscreen:function(t){e.fullscreen&&e.fullscreen(t)}}),this.container),n}},{key:"hidden",value:function(){this.container&&(this.container.style.display="none")}},{key:"show",value:function(){this.container&&(this.container.style.display="flex")}},{key:"close",value:function(){this.container&&(J(null,this.container),this.container.remove(),this.container=void 0)}}]),e}();t("chat",new sn)}}}))}();
|
|
1
|
+
!function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=o(e);if(t){var a=o(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)}(this,n)}}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new H(r||[]);return i(a,"_invoke",{value:A(e,n,s)}),a}function _(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",v="suspendedYield",p="executing",m="completed",y={};function g(){}function b(){}function w(){}var k={};f(k,s,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(T([])));S&&S!==n&&r.call(S,s)&&(k=S);var E=w.prototype=g.prototype=Object.create(k);function N(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,o,a,s){var c=_(e[i],e,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==l(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function A(t,n,r){var i=d;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=O(s,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=_(t,n,r);if("normal"===l.type){if(i=r.done?m:v,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=_(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function H(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(l(t)+" is not iterable")}return b.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,f(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},N(C.prototype),f(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(h(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},N(E),f(E,u,"Generator"),f(E,s,(function(){return this})),f(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,H.prototype={constructor:H,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function s(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){s(o,r,i,a,c,"next",e)}function c(e){s(o,r,i,a,c,"throw",e)}a(void 0)}))}}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){var t=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===l(t)?t:String(t)}System.register(["interactjs","cherry-markdown"],(function(t,o){"use strict";var s,f;return{setters:[function(e){s=e.default},function(e){f=e.default}],execute:function(){var o,d,v,p,m,y,g,b,w={},k=[],x=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function E(e,t){for(var n in t)e[n]=t[n];return e}function N(e){var t=e.parentNode;t&&t.removeChild(e)}function C(e,t,n){var r,i,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?i=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return A(e,s,r,i,null)}function A(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++v:i};return null==i&&null!=d.vnode&&d.vnode(o),o}function O(e){return e.children}function L(e,t){this.props=e,this.context=t}function P(e,t){if(null==t)return e.__?P(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__d||n.__e;return"function"==typeof e.type?P(e):null}function H(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return H(e)}}function T(e){(!e.__d&&(e.__d=!0)&&m.push(e)&&!z.__r++||y!==d.debounceRendering)&&((y=d.debounceRendering)||g)(z)}function z(){var e,t,n,r,i,o,a,s,c;for(m.sort(b);e=m.shift();)e.__d&&(t=m.length,r=void 0,i=void 0,o=void 0,s=(a=(n=e).__v).__e,(c=n.__P)&&(r=[],i=[],(o=E({},a)).__v=a.__v+1,$(c,a,o,n.__n,void 0!==c.ownerSVGElement,null!=a.__h?[s]:null,r,null==s?P(a):s,a.__h,i),D(r,a,i),a.__e!=s&&H(a)),m.length>t&&m.sort(b));z.__r=0}function M(e,t,n,r,i,o,a,s,c,l,u){var f,h,_,d,v,p,m,y,g,b=0,x=r&&r.__k||k,E=x.length,N=E,C=t.length;for(n.__k=[],f=0;f<C;f++)null!=(d=n.__k[f]=null==(d=t[f])||"boolean"==typeof d||"function"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?A(null,d,null,null,d):S(d)?A(O,{children:d},null,null,null):d.__b>0?A(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)?(d.__=n,d.__b=n.__b+1,-1===(y=U(d,x,m=f+b,N))?_=w:(_=x[y]||w,x[y]=void 0,N--),$(e,d,_,i,o,a,s,c,l,u),v=d.__e,(h=d.ref)&&_.ref!=h&&(_.ref&&q(_.ref,null,d),u.push(h,d.__c||v,d)),null!=v&&(null==p&&(p=v),(g=_===w||null===_.__v)?-1==y&&b--:y!==m&&(y===m+1?b++:y>m?N>C-m?b+=y-m:b--:b=y<m&&y==m-1?y-m:0),m=f+b,"function"!=typeof d.type||y===m&&_.__k!==d.__k?"function"==typeof d.type||y===m&&!g?void 0!==d.__d?(c=d.__d,d.__d=void 0):c=v.nextSibling:c=F(e,v,c):c=R(d,c,e),"function"==typeof n.type&&(n.__d=c))):(_=x[f])&&null==_.key&&_.__e&&(_.__e==c&&(_.__=r,c=P(_)),G(_,_,!1),x[f]=null);for(n.__e=p,f=E;f--;)null!=x[f]&&("function"==typeof n.type&&null!=x[f].__e&&x[f].__e==n.__d&&(n.__d=x[f].__e.nextSibling),G(x[f],x[f]))}function R(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?R(r,t,n):F(n,r.__e,t));return t}function j(e,t){return t=t||[],null==e||"boolean"==typeof e||(S(e)?e.some((function(e){j(e,t)})):t.push(e)),t}function F(e,t,n){return null==n||n.parentNode!==e?e.insertBefore(t,null):t==n&&null!=t.parentNode||e.insertBefore(t,n),t.nextSibling}function U(e,t,n,r){var i=e.key,o=e.type,a=n-1,s=n+1,c=t[n];if(null===c||c&&i==c.key&&o===c.type)return n;if(r>(null!=c?1:0))for(;a>=0||s<t.length;){if(a>=0){if((c=t[a])&&i==c.key&&o===c.type)return a;a--}if(s<t.length){if((c=t[s])&&i==c.key&&o===c.type)return s;s++}}return-1}function V(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||x.test(t)?n:n+"px"}function W(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||V(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||V(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?I:B,o)):e.removeEventListener(t,o?I:B,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function B(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(d.event?d.event(e):e)}function I(e){return this.l[e.type+!0](d.event?d.event(e):e)}function $(e,t,n,r,i,a,s,c,l,u){var f,h,_,v,p,m,y,g,b,k,x,C,A,H,T,z=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,c=t.__e=n.__e,t.__h=null,a=[c]),(f=d.__b)&&f(t);e:if("function"==typeof z)try{if(g=t.props,b=(f=z.contextType)&&r[f.__c],k=f?b?b.props.value:f.__:r,n.__c?y=(h=t.__c=n.__c).__=h.__E:("prototype"in z&&z.prototype.render?t.__c=h=new z(g,k):(t.__c=h=new L(g,k),h.constructor=z,h.render=Y),b&&b.sub(h),h.props=g,h.state||(h.state={}),h.context=k,h.__n=r,_=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=z.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=E({},h.__s)),E(h.__s,z.getDerivedStateFromProps(g,h.__s))),v=h.props,p=h.state,h.__v=t,_)null==z.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==z.getDerivedStateFromProps&&g!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,k),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,k)||t.__v===n.__v)){for(t.__v!==n.__v&&(h.props=g,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),x=0;x<h._sb.length;x++)h.__h.push(h._sb[x]);h._sb=[],h.__h.length&&s.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,k),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(v,p,m)}))}if(h.context=k,h.props=g,h.__P=e,h.__e=!1,C=d.__r,A=0,"prototype"in z&&z.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(t),f=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,C&&C(t),f=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(r=E(E({},r),h.getChildContext())),_||null==h.getSnapshotBeforeUpdate||(m=h.getSnapshotBeforeUpdate(v,p)),M(e,S(T=null!=f&&f.type===O&&null==f.key?f.props.children:f)?T:[T],t,n,r,i,a,s,c,l,u),h.base=t.__e,t.__h=null,h.__h.length&&s.push(h),y&&(h.__E=h.__=null)}catch(e){t.__v=null,(l||null!=a)&&(t.__e=c,t.__h=!!l,a[a.indexOf(c)]=null),d.__e(e,t,n)}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,a,s,c,l){var u,f,h,_=n.props,d=t.props,v=t.type,p=0;if("svg"===v&&(i=!0),null!=a)for(;p<a.length;p++)if((u=a[p])&&"setAttribute"in u==!!v&&(v?u.localName===v:3===u.nodeType)){e=u,a[p]=null;break}if(null==e){if(null===v)return document.createTextNode(d);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,d.is&&d),a=null,c=!1}if(null===v)_===d||c&&e.data===d||(e.data=d);else{if(a=a&&o.call(e.childNodes),f=(_=n.props||w).dangerouslySetInnerHTML,h=d.dangerouslySetInnerHTML,!c){if(null!=a)for(_={},p=0;p<e.attributes.length;p++)_[e.attributes[p].name]=e.attributes[p].value;(h||f)&&(h&&(f&&h.__html==f.__html||h.__html===e.innerHTML)||(e.innerHTML=h&&h.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||W(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||W(e,o,t[o],n[o],r)}(e,d,_,i,c),h)t.__k=[];else if(M(e,S(p=t.props.children)?p:[p],t,n,r,i&&"foreignObject"!==v,a,s,a?a[0]:n.__k&&P(n,0),c,l),null!=a)for(p=a.length;p--;)null!=a[p]&&N(a[p]);c||("value"in d&&void 0!==(p=d.value)&&(p!==e.value||"progress"===v&&!p||"option"===v&&p!==_.value)&&W(e,"value",p,_.value,!1),"checked"in d&&void 0!==(p=d.checked)&&p!==e.checked&&W(e,"checked",p,_.checked,!1))}return e}(n.__e,t,n,r,i,a,s,l,u);(f=d.diffed)&&f(t)}function D(e,t,n){for(var r=0;r<n.length;r++)q(n[r],n[++r],n[++r]);d.__c&&d.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){d.__e(e,t.__v)}}))}function q(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){d.__e(e,n)}}function G(e,t,n){var r,i;if(d.unmount&&d.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||q(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){d.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&G(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||N(e.__e),e.__=e.__e=e.__d=void 0}function Y(e,t,n){return this.constructor(e,n)}function J(e,t,n){var r,i,a,s;d.__&&d.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],s=[],$(t,e=(!r&&n||t).__k=C(O,null,[e]),i||w,w,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?o.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,s),D(a,e,s)}o=k.slice,d={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},v=0,p=function(e){return null!=e&&void 0===e.constructor},L.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=E({},this.state),"function"==typeof e&&(e=e(E({},n),this.props)),e&&E(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),T(this))},L.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},L.prototype.render=O,m=[],g="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},z.__r=0;function X(e,t,n,r,i){var o="".concat(e,"-").concat(t);return n&&(o+="-".concat(n)),r&&(o+="__".concat(r)),i&&(o+="--".concat(i)),o}var Z=function(){function e(t,n){u(this,e),_(this,"namespace",void 0),this.block=t,this.namespace=n||"ibiz"}return h(e,[{key:"b",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return X(this.namespace,this.block,e,"","")}},{key:"e",value:function(e){return e?X(this.namespace,this.block,"",e,""):""}},{key:"m",value:function(e){return e?X(this.namespace,this.block,"","",e):""}},{key:"be",value:function(e,t){return e&&t?X(this.namespace,this.block,e,t,""):""}},{key:"em",value:function(e,t){return e&&t?X(this.namespace,this.block,"",e,t):""}},{key:"bm",value:function(e,t){return e&&t?X(this.namespace,this.block,e,"",t):""}},{key:"bem",value:function(e,t,n){return e&&t&&n?X(this.namespace,this.block,e,t,n):""}},{key:"is",value:function(e,t){return e&&t?"".concat("is-").concat(e):""}},{key:"cssVar",value:function(e){var t={};for(var n in e)e[n]&&(t[this.cssVarName(n)]=e[n]);return t}},{key:"cssVarBlock",value:function(e){var t={};for(var n in e)e[n]&&(t[this.cssVarBlockName(n)]=e[n]);return t}},{key:"cssVarName",value:function(e){return"--".concat(this.namespace,"-").concat(e)}},{key:"cssVarBlockName",value:function(e){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(e)}}]),e}();function K(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Q(e,t){for(var n,r="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),o=s,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,s):r=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var ee={resolve:function(){for(var e,t="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var i;r>=0?i=arguments[r]:(void 0===e&&(e=process.cwd()),i=e),K(i),0!==i.length&&(t=i+"/"+t,n=47===i.charCodeAt(0))}return t=Q(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(K(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=Q(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return K(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];K(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":ee.normalize(e)},relative:function(e,t){if(K(e),K(t),e===t)return"";if((e=ee.resolve(e))===(t=ee.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var r=e.length,i=r-n,o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var a=t.length-o,s=i<a?i:a,c=-1,l=0;l<=s;++l){if(l===s){if(a>s){if(47===t.charCodeAt(o+l))return t.slice(o+l+1);if(0===l)return t.slice(o+l)}else i>s&&(47===e.charCodeAt(n+l)?c=l:0===l&&(c=0));break}var u=e.charCodeAt(n+l);if(u!==t.charCodeAt(o+l))break;47===u&&(c=l)}var f="";for(l=n+c+1;l<=r;++l)l!==r&&47!==e.charCodeAt(l)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(o+c):(o+=c,47===t.charCodeAt(o)&&++o,t.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(K(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');K(e);var n,r=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(c===t.charCodeAt(a)?-1==--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){K(e);for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!==l(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+l(e));return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){K(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),i=47===r;i?(t.root="/",n=1):n=0;for(var o=-1,a=0,s=-1,c=!0,l=e.length-1,u=0;l>=n;--l)if(47!==(r=e.charCodeAt(l)))-1===s&&(c=!1,s=l+1),46===r?-1===o?o=l:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){a=l+1;break}return-1===o||-1===s||0===u||1===u&&o===s-1&&o===a+1?-1!==s&&(t.base=t.name=0===a&&i?e.slice(1,s):e.slice(a,s)):(0===a&&i?(t.name=e.slice(1,o),t.base=e.slice(1,s)):(t.name=e.slice(a,o),t.base=e.slice(a,s)),t.ext=e.slice(o,s)),a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};function te(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function ne(){return"".concat(te()+te(),"-").concat(te(),"-").concat(te(),"-").concat(te(),"-").concat(te()).concat(te()).concat(te())}ee.posix=ee;var re=function(){function e(){u(this,e)}return h(e,null,[{key:"copy",value:function(e){return this.inputElement||(this.inputElement=document.createElement("input"),this.inputElement.style.position="absolute",this.inputElement.style.left="-9999px",document.body.appendChild(this.inputElement)),this.inputElement.value=e,this.inputElement.select(),document.execCommand("copy")}}]),e}();_(re,"inputElement",null);var ie,oe,ae,se,ce=0,le=[],ue=[],fe=d.__b,he=d.__r,_e=d.diffed,de=d.__c,ve=d.unmount;function pe(e,t){d.__h&&d.__h(oe,e,ce||t),ce=0;var n=oe.__H||(oe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ue}),n.__[e]}function me(e,t){var n=pe(ie++,3);!d.__s&&Ne(n.__H,t)&&(n.__=e,n.i=t,oe.__H.__h.push(n))}function ye(e){return ce=5,ge((function(){return{current:e}}),[])}function ge(e,t){var n=pe(ie++,7);return Ne(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function be(e,t){return ce=8,ge((function(){return e}),t)}function we(){for(var e;e=le.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Se),e.__H.__h.forEach(Ee),e.__H.__h=[]}catch(Kt){e.__H.__h=[],d.__e(Kt,e.__v)}}d.__b=function(e){oe=null,fe&&fe(e)},d.__r=function(e){he&&he(e),ie=0;var t=(oe=e.__c).__H;t&&(ae===oe?(t.__h=[],oe.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ue,e.__N=e.i=void 0}))):(t.__h.forEach(Se),t.__h.forEach(Ee),t.__h=[],ie=0)),ae=oe},d.diffed=function(e){_e&&_e(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==le.push(t)&&se===d.requestAnimationFrame||((se=d.requestAnimationFrame)||xe)(we)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ue&&(e.__=e.__V),e.i=void 0,e.__V=ue}))),ae=oe=null},d.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Se),e.__h=e.__h.filter((function(e){return!e.__||Ee(e)}))}catch(Re){t.some((function(e){e.__h&&(e.__h=[])})),t=[],d.__e(Re,e.__v)}})),de&&de(e,t)},d.unmount=function(e){ve&&ve(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Se(e)}catch(e){t=e}})),n.__H=void 0,t&&d.__e(t,n.__v))};var ke="function"==typeof requestAnimationFrame;function xe(e){var t,n=function(){clearTimeout(r),ke&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ke&&(t=requestAnimationFrame(n))}function Se(e){var t=oe,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),oe=t}function Ee(e){var t=oe;e.__c=e.__(),oe=t}function Ne(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ce(){throw new Error("Cycle detected")}var Ae=Symbol.for("preact-signals");function Oe(){if(ze>1)ze--;else{for(var e,t=!1;void 0!==Te;){var n=Te;for(Te=void 0,Me++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ve(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(Me=0,ze--,t)throw e}}var Le,Pe,He=void 0,Te=void 0,ze=0,Me=0,Re=0;function je(e){if(void 0!==He){var t=e.n;if(void 0===t||t.t!==He)return t={i:0,S:e,p:He.s,n:void 0,t:He,e:void 0,x:void 0,r:t},void 0!==He.s&&(He.s.n=t),He.s=t,e.n=t,32&He.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=He.s,t.n=void 0,He.s.n=t,He.s=t),t}}function Fe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function Ue(e){return new Fe(e)}function Ve(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function We(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Be(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function Ie(e){Fe.call(this,void 0),this.x=e,this.s=void 0,this.g=Re-1,this.f=4}function $e(e){return new Ie(e)}function De(e){var t=e.u;if(e.u=void 0,"function"==typeof t){ze++;var n=He;He=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,qe(e),t}finally{He=n,Oe()}}}function qe(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,De(e)}function Ge(e){if(He!==this)throw new Error("Out-of-order effect");Be(this),He=e,this.f&=-2,8&this.f&&qe(this),Oe()}function Ye(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Je(e){var t=new Ye(e);try{t.c()}catch(e){throw t.d(),e}return t.d.bind(t)}function Xe(e,t){d[e]=t.bind(null,d[e]||function(){})}function Ze(e){Pe&&Pe(),Pe=e&&e.S()}function Ke(e){var t=this,n=e.data,r=et(n);r.value=n;var i=ge((function(){for(var e=t.__v;e=e.__;)if(e.__c){e.__c.__$f|=4;break}return t.__$u.c=function(){var e;p(i.peek())||3!==(null==(e=t.base)?void 0:e.nodeType)?(t.__$f|=1,t.setState({})):t.base.data=i.peek()},$e((function(){var e=r.value.value;return 0===e?0:!0===e?"":e||""}))}),[]);return i.value}function Qe(e,t,n,r){var i=t in e&&void 0===e.ownerSVGElement,o=Ue(n);return{o:function(e,t){o.value=e,r=t},d:Je((function(){var n=o.value.value;r[t]!==n&&(r[t]=n,i?e[t]=n:n?e.setAttribute(t,n):e.removeAttribute(t))}))}}function et(e){return ge((function(){return Ue(e)}),[])}function tt(e){var t=ye(e);return t.current=e,Le.__$f|=4,ge((function(){return $e((function(){return t.current()}))}),[])}Fe.prototype.brand=Ae,Fe.prototype.h=function(){return!0},Fe.prototype.S=function(e){this.t!==e&&void 0===e.e&&(e.x=this.t,void 0!==this.t&&(this.t.e=e),this.t=e)},Fe.prototype.U=function(e){if(void 0!==this.t){var t=e.e,n=e.x;void 0!==t&&(t.x=n,e.e=void 0),void 0!==n&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},Fe.prototype.subscribe=function(e){var t=this;return Je((function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}}))},Fe.prototype.valueOf=function(){return this.value},Fe.prototype.toString=function(){return this.value+""},Fe.prototype.toJSON=function(){return this.value},Fe.prototype.peek=function(){return this.v},Object.defineProperty(Fe.prototype,"value",{get:function(){var e=je(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(He instanceof Ie&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Me>100&&Ce(),this.v=e,this.i++,Re++,ze++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{Oe()}}}}),(Ie.prototype=new Fe).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Re)return!0;if(this.g=Re,this.f|=1,this.i>0&&!Ve(this))return this.f&=-2,!0;var e=He;try{We(this),He=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return He=e,Be(this),this.f&=-2,!0},Ie.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}Fe.prototype.S.call(this,e)},Ie.prototype.U=function(e){if(void 0!==this.t&&(Fe.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},Ie.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Ie.prototype.peek=function(){if(this.h()||Ce(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ie.prototype,"value",{get:function(){1&this.f&&Ce();var e=je(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Ye.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.u=t)}finally{e()}},Ye.prototype.S=function(){1&this.f&&Ce(),this.f|=1,this.f&=-9,De(this),We(this),ze++;var e=He;return He=this,Ge.bind(this,e)},Ye.prototype.N=function(){2&this.f||(this.f|=2,this.o=Te,Te=this)},Ye.prototype.d=function(){this.f|=8,1&this.f||qe(this)},Ke.displayName="_st",Object.defineProperties(Fe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Ke},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Xe("__b",(function(e,t){if("string"==typeof t.type){var n,r=t.props;for(var i in r)if("children"!==i){var o=r[i];o instanceof Fe&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)})),Xe("__r",(function(e,t){Ze();var n,r=t.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=n=function(e){var t;return Je((function(){t=this})),t.c=function(){r.__$f|=1,r.setState({})},t}())),Le=r,Ze(n),e(t)})),Xe("__e",(function(e,t,n,r){Ze(),Le=void 0,e(t,n,r)})),Xe("diffed",(function(e,t){var n;if(Ze(),Le=void 0,"string"==typeof t.type&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var a in o){var s=o[a];void 0===s||a in r||(s.d(),o[a]=void 0)}else n.U=o={};for(var c in r){var l=o[c],u=r[c];void 0===l?(l=Qe(n,c,u,i),o[c]=l):l.o(u,i)}}}e(t)})),Xe("unmount",(function(e,t){if("string"==typeof t.type){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var o=r[i];o&&o.d()}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)})),Xe("__h",(function(e,t,n,r){(r<3||9===r)&&(t.__$f|=2),e(t,n,r)})),L.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&void 0!==n.s||4&this.__$f))return!0;if(3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if("__source"!==i&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};var nt=0;function rt(e,t,n,r,i,o){var a,s,c={};for(s in t)"ref"==s?a=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--nt,__source:i,__self:o};if("function"==typeof e&&(a=e.defaultProps))for(s in a)void 0===c[s]&&(c[s]=a[s]);return d.vnode&&d.vnode(l),l}var it=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M843.904 783.573333 783.573333 843.904 512.042667 572.373333 240.512 843.904 180.181333 783.573333 451.712 512.042667 180.181333 240.512 240.512 180.181333 512.042667 451.712 783.573333 180.181333 843.904 240.512 572.373333 512.042667 843.904 783.573333Z"})})},ot=function(){return rt("svg",{className:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M900.64 379.808l-263.072-256.032c-36.448-35.328-105.76-35.392-142.304 0.096l-327.04 319.904c-56.416 54.72-70.72 76.704-70.72 150.976l0 143.936c0 132.768 26.976 192 186.912 192l131.872 0c81.12 0 128.448-46.656 193.952-111.264l290.016-297.696c18.592-17.984 29.248-43.968 29.248-71.264C929.504 423.36 918.976 397.6 900.64 379.808zM323.008 786.752c-52.928 0-96-43.072-96-96s43.072-96 96-96 96 43.072 96 96S375.936 786.752 323.008 786.752z"})})},at=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-0.9 3.7-0.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 0.7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-0.8 4.2-2.6 5-5 1.4-4.2-0.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})},st=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M962 197.61H747v-60c0-55.14-44.86-100-100-100H377c-55.14 0-100 44.86-100 100v60H62c-11.05 0-20 8.95-20 20s8.95 20 20 20h60v630.57c0 66.17 53.83 120 120 120h540c66.17 0 120-53.83 120-120V237.61h60c11.05 0 20-8.95 20-20s-8.95-20-20-20zM637.34 457.66v260c0 12.01-10.72 21.63-23.06 19.77-9.84-1.48-16.94-10.25-16.94-20.2V458.09c0-9.95 7.1-18.72 16.94-20.2 12.34-1.86 23.06 7.76 23.06 19.77z m-210.68 0v260c0 11-9 20-20 20s-20-9-20-20v-260c0-11 9-20 20-20s20 9 20 20zM317 137.61c0-33.08 26.92-60 60-60h270c33.08 0 60 26.92 60 60v60H317v-60z"})})},ct=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M511.582491 63.413262C265.134543 63.413262 64.62588 263.921925 64.62588 510.369873s200.508663 446.957635 446.957635 446.957635 446.957635-200.508663 446.957635-446.957635S758.031463 63.413262 511.582491 63.413262zM509.001713 751.859903c-98.517781 0-182.467775-62.623269-214.771505-150.056598l0.327458-0.134053c-2.007727-4.036943-3.38305-8.422833-3.38305-13.237489 0-16.647145 13.494339-30.142507 30.142507-30.142507 13.389962 0 24.358781 8.877181 28.2893 20.955264l0.422625-0.172939c23.269983 65.442478 85.645612 112.503307 158.972665 112.503307 93.106538 0 168.845523-75.738985 168.845523-168.845523s-75.738985-168.845523-168.845523-168.845523c-20.432355 0-39.874149 3.980661-58.013275 10.66899l21.248953 40.742936c2.486634 2.677992 4.0175 6.2831 4.0175 10.243295 0 8.417717-8.404414 14.921851-15.365966 15.07023-0.102331 0-0.206708 0-0.309038 0-0.220011 0-0.427742 0-0.647753-0.013303l-150.579507-6.463202c-5.372358-0.234337-10.229992-3.310396-12.716626-8.093329-2.486634-4.76963-2.236947-10.509355 0.647753-15.055904l80.890308-127.179564c2.8847-4.533246 8.006348-7.151887 13.365402-6.960529 5.372358 0.234337 10.227945 3.312442 12.71458 8.095375l18.580171 35.625382c26.629497-10.855232 55.683207-16.963347 86.168522-16.963347 126.338407 0 229.130537 102.791108 229.130537 229.130537S635.340119 751.859903 509.001713 751.859903z"})})},lt=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M891.072 822.144V167.36a34.432 34.432 0 0 0-34.432-34.432H201.856C201.856 94.848 232.704 64 270.784 64h620.288C929.152 64 960 94.848 960 132.928v620.288c0 38.08-30.848 68.928-68.928 68.928z m-68.928-551.36v620.288c0 38.08-30.848 68.928-68.928 68.928H132.928A68.928 68.928 0 0 1 64 891.072V270.784c0-38.08 30.848-68.928 68.928-68.928h620.288c38.08 0 68.928 30.848 68.928 68.928z m-137.856 137.856H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z m0 206.72H201.856a34.432 34.432 0 0 0 0 68.864h482.432a34.432 34.432 0 0 0 0-68.864z"})})},ut=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M547.4 197.4v46l200.3 0.1L546.1 444l32.4 32.6 201.9-200.7v200.9h46V197.5zM471.4 584.4l-32.6-32.6L243.6 747V547.9h-46v278.7h279v-46H275z"})})},ft=function(){return rt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:rt("path",{d:"M544 480V282.944h52.224l0.064 107.968L763.072 224l36.928 36.928-166.976 166.976 108.032-0.128V480H544zM260.928 800l-36.928-36.928 166.912-166.784-107.968-0.064V544H480v197.056h-52.224l0.064-107.968L260.928 800z"})})},ht=new Z("markdown-message"),_t=function(e){var t=e.message,n=e.size,r=et(ne()),i=et(null);me((function(){n>=0&&i.value&&i.value.setMarkdown(t.content)}),[t,n]),me((function(){i.value=new f({id:r,value:t.content,editor:{defaultModel:"previewOnly"}})}),[]);return rt("div",{className:"".concat(ht.b()," ").concat(ht.is("loading",20===t.state)),children:[rt("div",{className:ht.b("header"),children:[rt("div",{className:ht.be("header","caption"),children:"AI "}),rt("div",{className:ht.b("header-action-wrapper"),children:[rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.backfill(t)},children:[rt(ot,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"回填"})]}),rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.refreshMessage(t)},children:[rt(ct,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"刷新"})]}),rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.deleteMessage(t)},children:[rt(st,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"删除"})]}),rt("div",{className:ht.be("header","action-item"),onClick:function(){e.controller.copyMessage(t)},children:[rt(lt,{}),rt("span",{className:ht.bem("header","action-item","title"),children:"复制"})]})]})]}),rt("div",{className:"".concat(ht.b("content")," pre-wrap-container"),children:rt("div",{id:r})}),rt("div",{className:ht.b("footer")})]})},dt=new Z("user-message-question"),vt=function(e){var t=tt((function(){return e.message.content}));return rt("div",{className:dt.b(),children:[rt("div",{className:dt.e("user-header"),children:[rt("div",{className:dt.e("user-action"),onClick:function(){e.controller.refreshMessage(e.message,!0)},children:[rt(ct,{}),rt("span",{className:dt.em("user-action","title"),children:"刷新"})]}),rt("div",{className:dt.e("user"),children:"我"})]}),rt("div",{className:dt.e("content"),children:rt("div",{dir:"auto",className:dt.em("content","body"),children:rt("p",{dir:"auto",className:"pre-wrap-container",children:t})})})]})},pt=new Z("error-message"),mt=function(e){var t=tt((function(){return e.message.content}));return rt("div",{className:pt.b(),children:[rt("div",{className:pt.b("header"),children:[rt("div",{className:pt.be("header","caption"),children:"AI "}),rt("div",{className:pt.b("header-action-wrapper"),children:[rt("div",{className:pt.be("header","action-item"),onClick:function(){e.controller.backfill(e.message)},children:[rt(ot,{}),rt("span",{className:pt.bem("header","action-item","title"),children:"回填"})]}),rt("div",{className:pt.be("header","action-item"),onClick:function(){e.controller.refreshMessage(e.message)},children:[rt(ct,{}),rt("span",{className:pt.bem("header","action-item","title"),children:"刷新"})]}),rt("div",{className:pt.be("header","action-item"),onClick:function(){e.controller.deleteMessage(e.message)},children:[rt(st,{}),rt("span",{className:pt.bem("header","action-item","title"),children:"删除"})]}),rt("div",{className:pt.be("header","action-item"),onClick:function(){e.controller.copyMessage(e.message)},children:[rt(lt,{}),rt("span",{className:pt.bem("header","action-item","title"),children:"复制"})]})]})]}),rt("div",{className:"".concat(pt.e("content")," pre-wrap-container"),children:rt("span",{children:t})})]})},yt=new Z("unknown-message"),gt=function(e){return rt("div",{className:yt.b(),children:rt("span",{className:"".concat(yt.e("content")," pre-wrap-container"),children:["暂未支持的消息类型: ",e.message.type]})})},bt=new Z("chat-message-item"),wt=function(e){var t=e.message,n=e.size,r=null;switch(t.type){case"DEFAULT":r="ASSISTANT"===t.role?_t:vt;break;case"ERROR":r=mt;break;default:r=gt}return rt("div",{className:bt.b(),children:C(r,{size:n,message:t,controller:e.controller})})},kt=new Z("chat-messages"),xt=function(e){var t=ye(null),n=e.controller.messages;return function(e){var t=ye(e);t.current=e,me((function(){return Je((function(){return t.current()}))}),[])}((function(){t.current&&n.value.length>0&&(t.current.scrollTop=t.current.scrollHeight)})),rt("div",{ref:t,className:kt.b(),children:n.value.map((function(t){var n,r=(null===(n=t.content)||void 0===n?void 0:n.length)||0;return rt(wt,{message:t,size:r,controller:e.controller},t.messageid)}))})};function St(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Et(e){this.props=e}(Et.prototype=new L).isPureReactComponent=!0,Et.prototype.shouldComponentUpdate=function(e,t){return St(this.props,e)||St(this.state,t)};var Nt=d.__b;d.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Nt&&Nt(e)};var Ct=d.__e;d.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Ct(e,t,n,r)};var At=d.unmount;function Ot(e,t,n){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=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ot(e,t,n)}))),e}function Lt(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Lt(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Pt(){this.__u=0,this.t=null,this.__b=null}function Ht(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Tt(){this.u=null,this.o=null}d.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),At&&At(e)},(Pt.prototype=new L).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Ht(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Lt(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Pt.prototype.componentWillUnmount=function(){this.t=[]},Pt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ot(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&C(O,null,e.fallback);return i&&(i.__h=null),[C(O,null,t.__a?null:e.children),i]};var zt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(Tt.prototype=new L).__a=function(e){var t=this,n=Ht(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),zt(t,e,r)):i()};n?n(o):o()}},Tt.prototype.render=function(e){this.u=null,this.o=new Map;var t=j(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Tt.prototype.componentDidUpdate=Tt.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){zt(e,n,t)}))};var Mt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Rt=/^(?: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]/,jt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ft=/[A-Z0-9]/g,Ut="undefined"!=typeof document,Vt=function(e){return("undefined"!=typeof Symbol&&"symbol"==l(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};L.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(L.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Wt=d.event;function Bt(){}function It(){return this.cancelBubble}function $t(){return this.defaultPrevented}d.event=function(e){return Wt&&(e=Wt(e)),e.persist=Bt,e.isPropagationStopped=It,e.isDefaultPrevented=$t,e.nativeEvent=e};var Dt={enumerable:!1,configurable:!0,get:function(){return this.class}},qt=d.vnode;d.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||Ut&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Vt(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":jt.test(i)?i=a:-1===n.indexOf("-")&&Rt.test(i)?i=i.replace(Ft,"-$&").toLowerCase():null===o&&(o=void 0):a=i="oninput","oninput"===a&&r[i=a]&&(i="oninputCapture"),r[i]=o}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=j(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=j(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Dt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Mt,qt&&qt(e)};var Gt=d.__r;d.__r=function(e){Gt&&Gt(e),e.__c};var Yt=d.diffed;d.diffed=function(e){Yt&&Yt(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var Jt=new Map;function Xt(e){var t=Jt.get(e);t&&t.destroy()}function Zt(e){var t=Jt.get(e);t&&t.update()}var Kt=null;"undefined"==typeof window?((Kt=function(e){return e}).destroy=function(e){return e},Kt.update=function(e){return e}):((Kt=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!Jt.has(e)){var t,n=null,r=window.getComputedStyle(e),i=(t=e.value,function(){a({testForHeightReduction:""===t||!e.value.startsWith(t),restoreTextAlign:null}),t=e.value}),o=function(t){e.removeEventListener("autosize:destroy",o),e.removeEventListener("autosize:update",s),e.removeEventListener("input",i),window.removeEventListener("resize",s),Object.keys(t).forEach((function(n){return e.style[n]=t[n]})),Jt.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,textAlign:e.style.textAlign,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",o),e.addEventListener("autosize:update",s),e.addEventListener("input",i),window.addEventListener("resize",s),e.style.overflowX="hidden",e.style.wordWrap="break-word",Jt.set(e,{destroy:o,update:s}),s()}function a(t){var i,o,s=t.restoreTextAlign,c=void 0===s?null:s,l=t.testForHeightReduction,u=void 0===l||l,f=r.overflowY;if(0!==e.scrollHeight&&("vertical"===r.resize?e.style.resize="none":"both"===r.resize&&(e.style.resize="horizontal"),u&&(i=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach((function(e){var t=e[0],n=e[1];t.style.scrollBehavior="auto",t.scrollTop=n,t.style.scrollBehavior=null}))}}(e),e.style.height=""),o="content-box"===r.boxSizing?e.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):e.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&o>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(e.style.overflow="scroll"),o=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(e.style.overflow="hidden"),e.style.height=o+"px",c&&(e.style.textAlign=c),i&&i(),n!==o&&(e.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),n=o),f!==r.overflow&&!c)){var h=r.textAlign;"hidden"===r.overflow&&(e.style.textAlign="start"===h?"end":"start"),a({restoreTextAlign:h,testForHeightReduction:!0})}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Xt),e},Kt.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Zt),e});var Qt=Kt,en=new Z("chat-input"),tn=function(e){var t=ye(null),n=e.controller.input,r=et(!1),i=be((function(e){n.value=e.target.value}),[n]),o=tt((function(){return n.value.length<=0||!0===r.value}));me((function(){return t.current&&Qt(t.current),function(){t.current&&Qt.destroy(t.current)}}),[t]);var s=be(c(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.value=!0,t.prev=1,t.next=4,e.controller.question(n.value);case 4:n.value="",t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:return t.prev=10,r.value=!1,t.finish(10);case 13:case"end":return t.stop()}}),t,null,[[1,7,10,13]])}))),[n,r]);return rt("div",{className:en.b(),children:[rt("textarea",{className:en.e("textarea"),type:"text",rows:6,autoCorrect:"off",autoCapitalize:"off",autoComplete:"off",value:n,onInput:i,onKeyDown:function(e){"Enter"===e.code&&(e.stopPropagation(),!1===e.shiftKey&&s())},ref:t,disabled:r}),rt("div",{className:en.b("action-wrapper"),children:rt("div",{title:r?"思考中...":"发送消息",className:"".concat(en.be("action-wrapper","action-item")," ").concat(en.is("disabled",o.value)," ").concat(en.is("loading",r.value)),onClick:s,disabled:o,children:rt(at,{})})})]})},nn=function(e){return e.STYLE_CACHE="ai-chat-style-cache",e}(nn||{}),rn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}(o,e);var t=r(o);function o(e){var n;return u(this,o),_(i(n=t.call(this,e)),"ns",new Z("chat-container")),_(i(n),"containerRef",{current:null}),_(i(n),"dragHandle",{current:null}),_(i(n),"data",{x:window.innerWidth-600-100,y:100,width:600,height:600,minWidth:300,minHeight:300}),n.state={isFullScreen:!1},n}return h(o,[{key:"calcStyle",value:function(){return{right:"0px",top:"0px",height:"100vh",width:"".concat(this.data.width,"px"),"z-index":"1000"}}},{key:"setStyle",value:function(){Object.assign(this.containerRef.current.style,this.calcStyle())}},{key:"componentDidMount",value:function(){var e=this,t=localStorage.getItem(nn.STYLE_CACHE);t&&(this.data=JSON.parse(t),this.data.x>window.innerWidth&&(this.data.x=window.innerWidth-100),this.data.y>window.innerHeight&&(this.data.y=window.innerHeight-100)),this.setStyle();var n=this.data;s(this.containerRef.current).resizable({edges:{top:!1,right:!0,bottom:!1,left:!0},margin:6,modifiers:[s.modifiers.restrictEdges({outer:document.body}),s.modifiers.restrictSize({min:{width:n.minWidth,height:n.minHeight}})],inertia:!0,listeners:{move:function(t){n.x+=t.deltaRect.left,n.y+=t.deltaRect.top,n.width=t.rect.width,n.height=t.rect.height,e.setStyle()}}})}},{key:"componentWillUnmount",value:function(){localStorage.setItem(nn.STYLE_CACHE,JSON.stringify(this.data))}},{key:"close",value:function(){this.props.close()}},{key:"fullScreen",value:function(){var e=this.containerRef.current;e&&(e.requestFullscreen(),this.setState({isFullScreen:!0}),this.props.fullscreen(!0))}},{key:"closeFullScreen",value:function(){var e;this.state.isFullScreen&&(null===(e=document)||void 0===e||e.exitFullscreen(),this.setState({isFullScreen:!1}),this.props.fullscreen(!1))}},{key:"render",value:function(){return rt("div",{className:"\n ".concat(this.ns.b(),"\n ").concat(this.ns.is("full-screen",this.state.isFullScreen)),ref:this.containerRef,children:[rt("div",{ref:this.dragHandle,className:this.ns.b("header"),children:[rt("div",{className:this.ns.b("header-caption"),children:this.props.caption||"AIChart"}),rt("div",{className:this.ns.b("header-action-wrapper"),children:[this.state.isFullScreen?rt("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","close-full-screen")),onClick:this.closeFullScreen.bind(this),children:rt(ft,{})}):rt("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","full-screen")),onClick:this.fullScreen.bind(this),children:rt(ut,{})}),rt("div",{className:"".concat(this.ns.be("header-action-wrapper","action-item")," ").concat(this.ns.be("header-action-wrapper","action-close")),onClick:this.close.bind(this),children:rt(it,{})})]})]}),rt("div",{className:this.ns.b("content"),children:rt(xt,{controller:this.props.controller})}),rt("div",{className:this.ns.b("footer"),children:rt(tn,{controller:this.props.controller})})]})}}]),o}(L);t("ChatContainer",rn);var on=function(){function e(t){u(this,e),this.msg=t}return h(e,[{key:"messageid",get:function(){return this.msg.messageid}},{key:"state",get:function(){return this.msg.state}},{key:"role",get:function(){return this.msg.role}},{key:"type",get:function(){return this.msg.type}},{key:"content",get:function(){return this.msg.content}},{key:"_origin",get:function(){return this.msg}},{key:"update",value:function(e){e.content||(e.content=""),this.msg.content+=e.content}}]),e}(),an=function(){function t(e){u(this,t),_(this,"messages",Ue([])),_(this,"input",Ue("")),this.opts=e}var n,r;return h(t,[{key:"setInput",value:function(e){this.input.value=e||""}},{key:"addMessage",value:function(t){var n=this.messages.value.find((function(e){return e.messageid===t.messageid}));n?(n.update(t),this.messages.value=e(this.messages.value)):this.messages.value=[].concat(e(this.messages.value),[new on(t)])}},{key:"replaceMessage",value:function(t){var n=this.messages.value.findIndex((function(e){return e.messageid===t.messageid}));-1!==n?(this.messages.value[n]=new on(t),this.messages.value=e(this.messages.value)):this.messages.value=[].concat(e(this.messages.value),[new on(t)])}},{key:"question",value:(r=c(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.addMessage({state:30,messageid:ne(),role:"USER",type:"DEFAULT",content:t}),e.next=3,this.opts.question(this.messages.value.filter((function(e){return"ERROR"!==e.type})).map((function(e){return e._origin})));case 3:this.opts.action&&this.opts.action("question",t);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"backfill",value:function(e){this.opts.action&&this.opts.action("backfill",e)}},{key:"deleteMessage",value:function(t){var n=this.messages.value.findIndex((function(e){return e.messageid===t.messageid}));-1!==n&&(this.messages.value.splice(n,1),this.messages.value=e(this.messages.value)),this.opts.action&&this.opts.action("deletemsg",t)}},{key:"refreshMessage",value:(n=c(a().mark((function t(n){var r,i,o,s=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=s.length>1&&void 0!==s[1]&&s[1],i=this.messages.value.findIndex((function(e){return e.messageid===n.messageid})),!r){t.next=9;break}return this.messages.value.splice(i+1,this.messages.value.length-i-1),this.messages.value=e(this.messages.value),t.next=7,this.opts.question(this.messages.value.filter((function(e){return"ERROR"!==e.type})).map((function(e){return e._origin})));case 7:t.next=19;break;case 9:if(i!==this.messages.value.length-1){t.next=16;break}return this.messages.value.pop(),this.messages.value=e(this.messages.value),t.next=14,this.opts.question(this.messages.value.filter((function(e){return"ERROR"!==e.type})).map((function(e){return e._origin})));case 14:t.next=19;break;case 16:o=this.messages.value[i-1].content,this.messages.value.splice(i-1,2),this.question(o);case 19:this.opts.action&&this.opts.action("refreshmsg",n);case 20:case"end":return t.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"copyMessage",value:function(e){var t=e.content;re.copy(t),this.opts.action&&this.opts.action("copymsg",e)}}]),t}(),sn=function(){function e(){u(this,e),_(this,"container",void 0)}return h(e,[{key:"create",value:function(e){var t=this;this.close(),this.container=document.createElement("div"),this.container.classList.add("ibiz-ai-chat"),document.body.appendChild(this.container);var n=new an(e);return J(C(rn,{controller:n,caption:e.caption,close:function(){t.close(),e.closed&&e.closed()},fullscreen:function(t){e.fullscreen&&e.fullscreen(t)}}),this.container),n}},{key:"hidden",value:function(){this.container&&(this.container.style.display="none")}},{key:"show",value:function(){this.container&&(this.container.style.display="flex")}},{key:"close",value:function(){this.container&&(J(null,this.container),this.container.remove(),this.container=void 0)}}]),e}();t("chat",new sn)}}}))}();
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.ibiz-markdown-message{border-radius:5px}.ibiz-markdown-message .cherry{border-radius:var(--ibiz-ai-chat-border-radius);box-shadow:none}.ibiz-markdown-message .cherry-previewer{padding:8px;border:0}.ibiz-markdown-message .anchor{display:none!important}.ibiz-markdown-message.is-loading .ibiz-markdown-message-header .ibiz-markdown-message-header__caption{font-size:0}.ibiz-markdown-message.is-loading .ibiz-markdown-message-header .ibiz-markdown-message-header__caption:after{display:block;width:11px;height:11px;content:"";border:3px solid #3b3b3b;border-top-color:transparent;border-radius:100%;animation:circle infinite .75s linear}.ibiz-markdown-message-header{display:flex;margin-bottom:8px}.ibiz-markdown-message-header__caption{flex:0;width:auto;min-width:32px;min-height:32px;padding:6px;margin-right:2px;font-size:14px;font-weight:800;color:var(--ibiz-ai-chat-color)}.ibiz-markdown-message-header__action-item{width:32px;height:32px;padding:6px;margin-left:6px;overflow:hidden;font-size:12px;white-space:nowrap;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px;transition:all .3s ease}.ibiz-markdown-message-header__action-item--title{margin-left:8px;font-size:14px;vertical-align:middle}.ibiz-markdown-message-header__action-item svg{vertical-align:baseline}.ibiz-markdown-message-header__action-item:hover{width:68px}.ibiz-markdown-message-header__action-item:nth-child(1){margin-left:0}.ibiz-markdown-message-header__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-markdown-message-header__action-item.is-disabled{color:var(--ibiz-ai-chat-disabled-color);pointer-events:none}.ibiz-markdown-message-header__action-item.is-loading{pointer-events:none;animation:loading-change .8s infinite}.ibiz-markdown-message-header-action-wrapper{display:flex;align-items:center}@keyframes circle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ibiz-user-message-question{padding:6px 10px}.ibiz-user-message-question__content{position:relative;box-sizing:border-box;display:flex;justify-content:end;max-width:100%;padding:10px;font-size:14px;text-align:left;word-break:break-word;user-select:text;transition:all .3s ease}.ibiz-user-message-question__content--body{width:fit-content;padding:0 10px;margin:0;font-size:14px;line-height:1.5;color:var(--color-fg-default);word-wrap:break-word;background:#E7F8FF;border-radius:var(--ibiz-ai-chat-border-radius);text-size-adjust:100%}.ibiz-user-message-question__content--body:before{display:table;content:""}.ibiz-user-message-question__content--body:after{display:table;clear:both;content:""}.ibiz-user-message-question__content--body>p{margin:8px}.ibiz-user-message-question__user-header{display:flex;align-items:center;justify-content:end;width:100%;height:32px}.ibiz-user-message-question__user-action{width:32px;height:32px;padding:6px;margin-right:6px;overflow:hidden;font-size:12px;white-space:nowrap;cursor:pointer;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px;transition:all .3s ease}.ibiz-user-message-question__user-action:hover{width:68px}.ibiz-user-message-question__user-action--title{margin-left:8px;font-size:14px;vertical-align:middle}.ibiz-user-message-question__user-action svg{vertical-align:baseline}.ibiz-user-message-question__user{padding:6px;font-size:14px;font-weight:800}.ibiz-error-message{padding:6px 10px;text-align:left}.ibiz-error-message__content{width:fit-content;padding:6px;color:#fff;background-color:red;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-error-message .ibiz-error-message-header{display:flex;margin-bottom:8px}.ibiz-error-message-header__caption{flex:0;width:auto;min-width:32px;min-height:32px;padding:6px;margin-right:2px;font-size:14px;font-weight:800;color:var(--ibiz-ai-chat-color)}.ibiz-error-message-header__action-item{width:32px;height:32px;padding:6px;margin-left:6px;overflow:hidden;font-size:12px;white-space:nowrap;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px;transition:all .3s ease}.ibiz-error-message-header__action-item--title{margin-left:8px;font-size:14px;vertical-align:middle}.ibiz-error-message-header__action-item svg{vertical-align:baseline}.ibiz-error-message-header__action-item:hover{width:68px}.ibiz-error-message-header__action-item:nth-child(1){margin-left:0}.ibiz-error-message-header__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-error-message .ibiz-error-message-header-action-wrapper{display:flex;align-items:center}.ibiz-chat-message-item{padding:6px 0}.ibiz-unknown-message{padding:6px 10px;text-align:right}.ibiz-unknown-message__content{padding:6px;color:#000;background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-messages{width:100%;height:100%;padding:6px;overflow-x:hidden;overflow-y:auto}.ibiz-chat-messages::-webkit-scrollbar{width:6px}.ibiz-chat-messages::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input{display:flex;align-items:center;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input__textarea{flex-grow:1;max-height:6em;overflow-x:hidden!important;overflow-y:auto;resize:none;background-color:var(--ibiz-ai-chat-background-color);border:none;outline:none}.ibiz-chat-input__textarea::-webkit-scrollbar{width:6px}.ibiz-chat-input__textarea::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}@keyframes loading-change{0%{opacity:1}25%{opacity:.5}50%{opacity:.1}75%{opacity:.5}to{opacity:1}}.ibiz-chat-input-action-wrapper{display:flex;gap:6px;align-items:center;padding:6px;color:var(--ibiz-ai-chat-color)}.ibiz-chat-input-action-wrapper__action-item{padding:3px;font-size:12px;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input-action-wrapper__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-chat-input-action-wrapper__action-item.is-disabled{color:var(--ibiz-ai-chat-disabled-color);pointer-events:none}.ibiz-chat-input-action-wrapper__action-item.is-loading{pointer-events:none;animation:loading-change .8s infinite}.ibiz-chat-container{--ibiz-ai-chat-color: #3b3b3b;--ibiz-ai-chat-icon-color: #3b3b3b;--ibiz-ai-chat-border-color: #e5e5e5;--ibiz-ai-chat-background-color: #fff;--ibiz-ai-chat-disabled-color: rgba(59, 59, 59, .6);--ibiz-ai-chat-hover-color: #3b3b3b;--ibiz-ai-chat-hover-background-color: rgba(184, 184, 184, .31);--ibiz-ai-chat-hover-border-color: #e5e5e5;--ibiz-ai-chat-border-radius: 5px;position:absolute;z-index:1000;display:flex;flex-direction:column;background-color:var(--ibiz-ai-chat-background-color);border:1px solid var(--ibiz-ai-chat-border-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-container *{box-sizing:border-box}.ibiz-chat-container svg{display:inline-block;width:1em;height:1em;font-size:1.5em;vertical-align:middle;fill:currentcolor}.ibiz-chat-container-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;height:60px;border-bottom:1px solid var(--ibiz-ai-chat-border-color)}.ibiz-chat-container-header-caption{padding:0 6px 0 16px;font-size:18px;font-weight:800}.ibiz-chat-container-header-action-wrapper{display:flex;gap:6px;align-items:center;height:100%;padding:0 6px}.ibiz-chat-container-header-action-wrapper__action-item{flex-shrink:0;padding:3px;font-size:12px;color:var(--ibiz-ai-chat-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-container-header-action-wrapper__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-chat-container-content{flex-grow:1;overflow:hidden}.ibiz-chat-container-footer{flex-shrink:0;padding:3px 6px;border-top:1px solid var(--ibiz-ai-chat-border-color)}
|
|
1
|
+
@charset "UTF-8";.ibiz-markdown-message{border-radius:5px}.ibiz-markdown-message .cherry{border-radius:var(--ibiz-ai-chat-border-radius);box-shadow:none}.ibiz-markdown-message .cherry-previewer{padding:8px;border:0}.ibiz-markdown-message .anchor{display:none!important}.ibiz-markdown-message.is-loading .ibiz-markdown-message-header .ibiz-markdown-message-header__caption{font-size:0}.ibiz-markdown-message.is-loading .ibiz-markdown-message-header .ibiz-markdown-message-header__caption:after{display:block;width:11px;height:11px;content:"";border:3px solid #3b3b3b;border-top-color:transparent;border-radius:100%;animation:circle infinite .75s linear}.ibiz-markdown-message-header{display:flex;margin-bottom:8px}.ibiz-markdown-message-header__caption{flex:0;width:auto;min-width:32px;min-height:32px;padding:6px;margin-right:2px;font-size:14px;font-weight:800;color:var(--ibiz-ai-chat-color)}.ibiz-markdown-message-header__action-item{width:32px;height:32px;padding:6px;margin-left:6px;overflow:hidden;font-size:12px;white-space:nowrap;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px;transition:all .3s ease}.ibiz-markdown-message-header__action-item--title{margin-left:8px;font-size:14px;vertical-align:middle}.ibiz-markdown-message-header__action-item svg{vertical-align:baseline}.ibiz-markdown-message-header__action-item:hover{width:68px}.ibiz-markdown-message-header__action-item:nth-child(1){margin-left:0}.ibiz-markdown-message-header__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-markdown-message-header__action-item.is-disabled{color:var(--ibiz-ai-chat-disabled-color);pointer-events:none}.ibiz-markdown-message-header__action-item.is-loading{pointer-events:none;animation:loading-change .8s infinite}.ibiz-markdown-message-header-action-wrapper{display:flex;align-items:center}@keyframes circle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ibiz-user-message-question{padding:6px 10px}.ibiz-user-message-question__content{position:relative;box-sizing:border-box;display:flex;justify-content:end;max-width:100%;padding:10px;font-size:14px;text-align:left;word-break:break-word;user-select:text;transition:all .3s ease}.ibiz-user-message-question__content--body{width:fit-content;padding:0 10px;margin:0;font-size:14px;line-height:1.5;color:var(--color-fg-default);word-wrap:break-word;background:#E7F8FF;border-radius:var(--ibiz-ai-chat-border-radius);text-size-adjust:100%}.ibiz-user-message-question__content--body:before{display:table;content:""}.ibiz-user-message-question__content--body:after{display:table;clear:both;content:""}.ibiz-user-message-question__content--body>p{margin:8px}.ibiz-user-message-question__user-header{display:flex;align-items:center;justify-content:end;width:100%;height:32px}.ibiz-user-message-question__user-action{width:32px;height:32px;padding:6px;margin-right:6px;overflow:hidden;font-size:12px;white-space:nowrap;cursor:pointer;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px;transition:all .3s ease}.ibiz-user-message-question__user-action:hover{width:68px}.ibiz-user-message-question__user-action--title{margin-left:8px;font-size:14px;vertical-align:middle}.ibiz-user-message-question__user-action svg{vertical-align:baseline}.ibiz-user-message-question__user{padding:6px;font-size:14px;font-weight:800}.ibiz-error-message{padding:6px 10px;text-align:left}.ibiz-error-message__content{width:fit-content;padding:6px;color:#fff;background-color:red;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-error-message .ibiz-error-message-header{display:flex;margin-bottom:8px}.ibiz-error-message-header__caption{flex:0;width:auto;min-width:32px;min-height:32px;padding:6px;margin-right:2px;font-size:14px;font-weight:800;color:var(--ibiz-ai-chat-color)}.ibiz-error-message-header__action-item{width:32px;height:32px;padding:6px;margin-left:6px;overflow:hidden;font-size:12px;white-space:nowrap;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px;transition:all .3s ease}.ibiz-error-message-header__action-item--title{margin-left:8px;font-size:14px;vertical-align:middle}.ibiz-error-message-header__action-item svg{vertical-align:baseline}.ibiz-error-message-header__action-item:hover{width:68px}.ibiz-error-message-header__action-item:nth-child(1){margin-left:0}.ibiz-error-message-header__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-error-message .ibiz-error-message-header-action-wrapper{display:flex;align-items:center}.ibiz-chat-message-item{padding:6px 0}.ibiz-chat-message-item .pre-wrap-container{word-wrap:break-word;white-space:pre-wrap}.ibiz-unknown-message{padding:6px 10px;text-align:right}.ibiz-unknown-message__content{padding:6px;color:#000;background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-messages{width:100%;height:100%;padding:6px;overflow-x:hidden;overflow-y:auto}.ibiz-chat-messages::-webkit-scrollbar{width:6px}.ibiz-chat-messages::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input{display:flex;align-items:center;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input__textarea{flex-grow:1;max-height:6em;overflow-x:hidden!important;overflow-y:auto;resize:none;background-color:var(--ibiz-ai-chat-background-color);border:none;outline:none}.ibiz-chat-input__textarea::-webkit-scrollbar{width:6px}.ibiz-chat-input__textarea::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:var(--ibiz-ai-chat-border-radius)}@keyframes loading-change{0%{opacity:1}25%{opacity:.5}50%{opacity:.1}75%{opacity:.5}to{opacity:1}}.ibiz-chat-input-action-wrapper{display:flex;gap:6px;align-items:center;padding:6px;color:var(--ibiz-ai-chat-color)}.ibiz-chat-input-action-wrapper__action-item{padding:3px;font-size:12px;border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-input-action-wrapper__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-chat-input-action-wrapper__action-item.is-disabled{color:var(--ibiz-ai-chat-disabled-color);pointer-events:none}.ibiz-chat-input-action-wrapper__action-item.is-loading{pointer-events:none;animation:loading-change .8s infinite}.ibiz-chat-container{--ibiz-ai-chat-color: #3b3b3b;--ibiz-ai-chat-icon-color: #3b3b3b;--ibiz-ai-chat-border-color: #e5e5e5;--ibiz-ai-chat-background-color: #fff;--ibiz-ai-chat-disabled-color: rgba(59, 59, 59, .6);--ibiz-ai-chat-hover-color: #3b3b3b;--ibiz-ai-chat-hover-background-color: rgba(184, 184, 184, .31);--ibiz-ai-chat-hover-border-color: #e5e5e5;--ibiz-ai-chat-border-radius: 5px;position:absolute;z-index:1000;display:flex;flex-direction:column;background-color:var(--ibiz-ai-chat-background-color);border:1px solid var(--ibiz-ai-chat-border-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-container *{box-sizing:border-box}.ibiz-chat-container svg{display:inline-block;width:1em;height:1em;font-size:1.5em;vertical-align:middle;fill:currentcolor}.ibiz-chat-container-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;height:60px;border-bottom:1px solid var(--ibiz-ai-chat-border-color)}.ibiz-chat-container-header-caption{padding:0 6px 0 16px;font-size:18px;font-weight:800}.ibiz-chat-container-header-action-wrapper{display:flex;gap:6px;align-items:center;height:100%;padding:0 6px}.ibiz-chat-container-header-action-wrapper__action-item{flex-shrink:0;padding:3px;font-size:12px;color:var(--ibiz-ai-chat-color);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-chat-container-header-action-wrapper__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-chat-container-content{flex-grow:1;overflow:hidden}.ibiz-chat-container-footer{flex-shrink:0;padding:3px 6px;border-top:1px solid var(--ibiz-ai-chat-border-color)}
|