@ibiz-template-plugin/ai-chat 0.0.1
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/LICENSE +21 -0
- package/README.en.md +36 -0
- package/README.md +37 -0
- package/dist/assets/svg/AIChat.svg +1 -0
- package/dist/index.es.js +1655 -0
- package/dist/index.legacy.js +1 -0
- package/dist/polyfills.legacy.js +1 -0
- package/dist/style.css +1 -0
- package/dist/types/app.d.ts +1 -0
- package/dist/types/components/chat-container/chat-container.d.ts +59 -0
- package/dist/types/components/chat-input/chat-input.d.ts +12 -0
- package/dist/types/components/chat-message-item/chat-message-item.d.ts +23 -0
- package/dist/types/components/chat-message-item/error-message/error-message.d.ts +13 -0
- package/dist/types/components/chat-message-item/markdown-message/markdown-message.d.ts +22 -0
- package/dist/types/components/chat-message-item/unknown-message/unknown-message.d.ts +13 -0
- package/dist/types/components/chat-message-item/user-message/user-message.d.ts +13 -0
- package/dist/types/components/chat-messages/chat-messages.d.ts +12 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +78 -0
- package/dist/types/controller/chat/chat.controller.d.ts +51 -0
- package/dist/types/controller/index.d.ts +2 -0
- package/dist/types/entity/chat-message/chat-message.d.ts +28 -0
- package/dist/types/entity/index.d.ts +1 -0
- package/dist/types/global.d.ts +2 -0
- package/dist/types/icons/close-svg.d.ts +1 -0
- package/dist/types/icons/fill-svg.d.ts +1 -0
- package/dist/types/icons/index.d.ts +3 -0
- package/dist/types/icons/send-svg.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interface/i-chat-container/i-chat-container.d.ts +58 -0
- package/dist/types/interface/i-chat-message/i-chat-message.d.ts +83 -0
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +46 -0
- package/dist/types/interface/i-message-item-provider/i-message-item-provider.d.ts +18 -0
- package/dist/types/interface/i-portal-async-action/i-portal-async-action.d.ts +90 -0
- package/dist/types/interface/index.d.ts +4 -0
- package/dist/types/main.d.ts +1 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/namespace/namespace.d.ts +147 -0
- package/dist/types/utils/plugin-static-resource/plugin-static-resource.d.ts +63 -0
- package/dist/types/utils/util/util.d.ts +9 -0
- package/package.json +81 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}(t)||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 e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function r(t){var e=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(t){return!1}}();return function(){var n,r=i(t);if(e){var u=i(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return o(t)}(this,n)}}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function u(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function _(t,e,n,r){var i=e&&e.prototype instanceof g?e:g,u=Object.create(i.prototype),a=new T(r||[]);return o(u,"_invoke",{value:P(t,n,a)}),u}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=_;var p="suspendedStart",v="suspendedYield",d="executing",y="completed",m={};function g(){}function b(){}function w(){}var k={};f(k,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(C([])));S&&S!==n&&r.call(S,a)&&(k=S);var E=w.prototype=g.prototype=Object.create(k);function N(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,u,a){var c=h(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function P(e,n,r){var o=p;return function(i,u){if(o===d)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw u;return{value:t,done:!0}}for(r.method=i,r.arg=u;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var s=h(e,n,r);if("normal"===s.type){if(o=r.done?y:v,s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=y,r.method="throw",r.arg=s.arg)}}}function L(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var u=i.arg;return u?u.done?(n[e.resultName]=u.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function H(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(s(e)+" is not iterable")}return b.prototype=w,o(E,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},N(O.prototype),f(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var u=new O(_(t,n,r,o),i);return e.isGeneratorFunction(n)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},N(E),f(E,l,"Generator"),f(E,a,(function(){return this})),f(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=C,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(H),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return a.type="throw",a.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),s=r.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),H(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;H(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function a(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(s){return void n(s)}a.done?e(c):Promise.resolve(c).then(r,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){a(i,r,o,u,c,"next",t)}function c(t){a(i,r,o,u,c,"throw",t)}u(void 0)}))}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function _(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t,e,n){return(e=p(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}System.register(["interactjs","path-browserify","cherry-markdown"],(function(e,i){"use strict";var a,f;return{setters:[function(t){a=t.default},null,function(t){f=t.default}],execute:function(){var i,p,v,d,y,m,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(t,e){for(var n in e)t[n]=e[n];return t}function N(t){var e=t.parentNode;e&&e.removeChild(t)}function O(t,e,n){var r,o,u,a={};for(u in e)"key"==u?r=e[u]:"ref"==u?o=e[u]:a[u]=e[u];if(arguments.length>2&&(a.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(u in t.defaultProps)void 0===a[u]&&(a[u]=t.defaultProps[u]);return P(t,a,r,o,null)}function P(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++v:o};return null==o&&null!=p.vnode&&p.vnode(i),i}function L(t){return t.children}function A(t,e){this.props=t,this.context=e}function H(t,e){if(null==e)return t.__?H(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__d||n.__e;return"function"==typeof t.type?H(t):null}function T(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return T(t)}}function C(t){(!t.__d&&(t.__d=!0)&&y.push(t)&&!j.__r++||m!==p.debounceRendering)&&((m=p.debounceRendering)||g)(j)}function j(){var t,e,n,r,o,i,u,a,c;for(y.sort(b);t=y.shift();)t.__d&&(e=y.length,r=void 0,o=void 0,i=void 0,a=(u=(n=t).__v).__e,(c=n.__P)&&(r=[],o=[],(i=E({},u)).__v=u.__v+1,B(c,u,i,n.__n,void 0!==c.ownerSVGElement,null!=u.__h?[a]:null,r,null==a?H(u):a,u.__h,o),I(r,u,o),u.__e!=a&&T(u)),y.length>e&&y.sort(b));j.__r=0}function R(t,e,n,r,o,i,u,a,c,s,l){var f,_,h,p,v,d,y,m,g,b=0,x=r&&r.__k||k,E=x.length,N=E,O=e.length;for(n.__k=[],f=0;f<O;f++)null!=(p=n.__k[f]=null==(p=e[f])||"boolean"==typeof p||"function"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?P(null,p,null,null,p):S(p)?P(L,{children:p},null,null,null):p.__b>0?P(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)?(p.__=n,p.__b=n.__b+1,-1===(m=M(p,x,y=f+b,N))?h=w:(h=x[m]||w,x[m]=void 0,N--),B(t,p,h,o,i,u,a,c,s,l),v=p.__e,(_=p.ref)&&h.ref!=_&&(h.ref&&G(h.ref,null,p),l.push(_,p.__c||v,p)),null!=v&&(null==d&&(d=v),(g=h===w||null===h.__v)?-1==m&&b--:m!==y&&(m===y+1?b++:m>y?N>O-y?b+=m-y:b--:b=m<y&&m==y-1?m-y:0),y=f+b,"function"!=typeof p.type||m===y&&h.__k!==p.__k?"function"==typeof p.type||m===y&&!g?void 0!==p.__d?(c=p.__d,p.__d=void 0):c=v.nextSibling:c=F(t,v,c):c=U(p,c,t),"function"==typeof n.type&&(n.__d=c))):(h=x[f])&&null==h.key&&h.__e&&(h.__e==c&&(h.__=r,c=H(h)),q(h,h,!1),x[f]=null);for(n.__e=d,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),q(x[f],x[f]))}function U(t,e,n){for(var r,o=t.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=t,e="function"==typeof r.type?U(r,e,n):F(n,r.__e,e));return e}function z(t,e){return e=e||[],null==t||"boolean"==typeof t||(S(t)?t.some((function(t){z(t,e)})):e.push(t)),e}function F(t,e,n){return null==n||n.parentNode!==t?t.insertBefore(e,null):e==n&&null!=e.parentNode||t.insertBefore(e,n),e.nextSibling}function M(t,e,n,r){var o=t.key,i=t.type,u=n-1,a=n+1,c=e[n];if(null===c||c&&o==c.key&&i===c.type)return n;if(r>(null!=c?1:0))for(;u>=0||a<e.length;){if(u>=0){if((c=e[u])&&o==c.key&&i===c.type)return u;u--}if(a<e.length){if((c=e[a])&&o==c.key&&i===c.type)return a;a++}}return-1}function $(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||x.test(e)?n:n+"px"}function D(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||$(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||$(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n.u=r.u:(n.u=Date.now(),t.addEventListener(e,i?V:W,i)):t.removeEventListener(e,i?V:W,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function W(t){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(p.event?p.event(t):t)}function V(t){return this.l[t.type+!0](p.event?p.event(t):t)}function B(t,e,n,r,o,u,a,c,s,l){var f,_,h,v,d,y,m,g,b,k,x,O,P,T,C,j=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(s=n.__h,c=e.__e=n.__e,e.__h=null,u=[c]),(f=p.__b)&&f(e);t:if("function"==typeof j)try{if(g=e.props,b=(f=j.contextType)&&r[f.__c],k=f?b?b.props.value:f.__:r,n.__c?m=(_=e.__c=n.__c).__=_.__E:("prototype"in j&&j.prototype.render?e.__c=_=new j(g,k):(e.__c=_=new A(g,k),_.constructor=j,_.render=Y),b&&b.sub(_),_.props=g,_.state||(_.state={}),_.context=k,_.__n=r,h=_.__d=!0,_.__h=[],_._sb=[]),null==_.__s&&(_.__s=_.state),null!=j.getDerivedStateFromProps&&(_.__s==_.state&&(_.__s=E({},_.__s)),E(_.__s,j.getDerivedStateFromProps(g,_.__s))),v=_.props,d=_.state,_.__v=e,h)null==j.getDerivedStateFromProps&&null!=_.componentWillMount&&_.componentWillMount(),null!=_.componentDidMount&&_.__h.push(_.componentDidMount);else{if(null==j.getDerivedStateFromProps&&g!==v&&null!=_.componentWillReceiveProps&&_.componentWillReceiveProps(g,k),!_.__e&&(null!=_.shouldComponentUpdate&&!1===_.shouldComponentUpdate(g,_.__s,k)||e.__v===n.__v)){for(e.__v!==n.__v&&(_.props=g,_.state=_.__s,_.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),x=0;x<_._sb.length;x++)_.__h.push(_._sb[x]);_._sb=[],_.__h.length&&a.push(_);break t}null!=_.componentWillUpdate&&_.componentWillUpdate(g,_.__s,k),null!=_.componentDidUpdate&&_.__h.push((function(){_.componentDidUpdate(v,d,y)}))}if(_.context=k,_.props=g,_.__P=t,_.__e=!1,O=p.__r,P=0,"prototype"in j&&j.prototype.render){for(_.state=_.__s,_.__d=!1,O&&O(e),f=_.render(_.props,_.state,_.context),T=0;T<_._sb.length;T++)_.__h.push(_._sb[T]);_._sb=[]}else do{_.__d=!1,O&&O(e),f=_.render(_.props,_.state,_.context),_.state=_.__s}while(_.__d&&++P<25);_.state=_.__s,null!=_.getChildContext&&(r=E(E({},r),_.getChildContext())),h||null==_.getSnapshotBeforeUpdate||(y=_.getSnapshotBeforeUpdate(v,d)),R(t,S(C=null!=f&&f.type===L&&null==f.key?f.props.children:f)?C:[C],e,n,r,o,u,a,c,s,l),_.base=e.__e,e.__h=null,_.__h.length&&a.push(_),m&&(_.__E=_.__=null)}catch(t){e.__v=null,(s||null!=u)&&(e.__e=c,e.__h=!!s,u[u.indexOf(c)]=null),p.__e(t,e,n)}else null==u&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=function(t,e,n,r,o,u,a,c,s){var l,f,_,h=n.props,p=e.props,v=e.type,d=0;if("svg"===v&&(o=!0),null!=u)for(;d<u.length;d++)if((l=u[d])&&"setAttribute"in l==!!v&&(v?l.localName===v:3===l.nodeType)){t=l,u[d]=null;break}if(null==t){if(null===v)return document.createTextNode(p);t=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,p.is&&p),u=null,c=!1}if(null===v)h===p||c&&t.data===p||(t.data=p);else{if(u=u&&i.call(t.childNodes),f=(h=n.props||w).dangerouslySetInnerHTML,_=p.dangerouslySetInnerHTML,!c){if(null!=u)for(h={},d=0;d<t.attributes.length;d++)h[t.attributes[d].name]=t.attributes[d].value;(_||f)&&(_&&(f&&_.__html==f.__html||_.__html===t.innerHTML)||(t.innerHTML=_&&_.__html||""))}if(function(t,e,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in e||D(t,i,null,n[i],r);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||D(t,i,e[i],n[i],r)}(t,p,h,o,c),_)e.__k=[];else if(R(t,S(d=e.props.children)?d:[d],e,n,r,o&&"foreignObject"!==v,u,a,u?u[0]:n.__k&&H(n,0),c,s),null!=u)for(d=u.length;d--;)null!=u[d]&&N(u[d]);c||("value"in p&&void 0!==(d=p.value)&&(d!==t.value||"progress"===v&&!d||"option"===v&&d!==h.value)&&D(t,"value",d,h.value,!1),"checked"in p&&void 0!==(d=p.checked)&&d!==t.checked&&D(t,"checked",d,h.checked,!1))}return t}(n.__e,e,n,r,o,u,a,s,l);(f=p.diffed)&&f(e)}function I(t,e,n){for(var r=0;r<n.length;r++)G(n[r],n[++r],n[++r]);p.__c&&p.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){p.__e(t,e.__v)}}))}function G(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){p.__e(t,n)}}function q(t,e,n){var r,o;if(p.unmount&&p.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||G(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){p.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&q(r[o],e,n||"function"!=typeof t.type);n||null==t.__e||N(t.__e),t.__=t.__e=t.__d=void 0}function Y(t,e,n){return this.constructor(t,n)}function X(t,e,n){var r,o,u,a;p.__&&p.__(t,e),o=(r="function"==typeof n)?null:n&&n.__k||e.__k,u=[],a=[],B(e,t=(!r&&n||e).__k=O(L,null,[t]),o||w,w,void 0!==e.ownerSVGElement,!r&&n?[n]:o?null:e.firstChild?i.call(e.childNodes):null,u,!r&&n?n:o?o.__e:e.firstChild,r,a),I(u,t,a)}i=k.slice,p={__e:function(t,e,n,r){for(var o,i,u;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(t)),u=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,r||{}),u=o.__d),u)return o.__E=o}catch(e){t=e}throw t}},v=0,d=function(t){return null!=t&&void 0===t.constructor},A.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=E({},this.state),"function"==typeof t&&(t=t(E({},n),this.props)),t&&E(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),C(this))},A.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),C(this))},A.prototype.render=L,y=[],g="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(t,e){return t.__v.__b-e.__v.__b},j.__r=0;function Z(t,e,n,r,o){var i="".concat(t,"-").concat(e);return n&&(i+="-".concat(n)),r&&(i+="__".concat(r)),o&&(i+="--".concat(o)),i}var K=function(){function t(e,n){l(this,t),h(this,"namespace",void 0),this.block=e,this.namespace=n||"ibiz"}return _(t,[{key:"b",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Z(this.namespace,this.block,t,"","")}},{key:"e",value:function(t){return t?Z(this.namespace,this.block,"",t,""):""}},{key:"m",value:function(t){return t?Z(this.namespace,this.block,"","",t):""}},{key:"be",value:function(t,e){return t&&e?Z(this.namespace,this.block,t,e,""):""}},{key:"em",value:function(t,e){return t&&e?Z(this.namespace,this.block,"",t,e):""}},{key:"bm",value:function(t,e){return t&&e?Z(this.namespace,this.block,t,"",e):""}},{key:"bem",value:function(t,e,n){return t&&e&&n?Z(this.namespace,this.block,t,e,n):""}},{key:"is",value:function(t,e){return t&&e?"".concat("is-").concat(t):""}},{key:"cssVar",value:function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarName(n)]=t[n]);return e}},{key:"cssVarBlock",value:function(t){var e={};for(var n in t)t[n]&&(e[this.cssVarBlockName(n)]=t[n]);return e}},{key:"cssVarName",value:function(t){return"--".concat(this.namespace,"-").concat(t)}},{key:"cssVarBlockName",value:function(t){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(t)}}]),t}();function J(){return(65536*(1+Math.random())|0).toString(16).substring(1)}function Q(){return"".concat(J()+J(),"-").concat(J(),"-").concat(J(),"-").concat(J(),"-").concat(J()).concat(J()).concat(J())}var tt,et,nt,rt,ot=0,it=[],ut=[],at=p.__b,ct=p.__r,st=p.diffed,lt=p.__c,ft=p.unmount;function _t(t,e){p.__h&&p.__h(et,t,ot||e),ot=0;var n=et.__H||(et.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:ut}),n.__[t]}function ht(t,e){var n=_t(tt++,3);!p.__s&&kt(n.__H,e)&&(n.__=t,n.i=e,et.__H.__h.push(n))}function pt(t){return ot=5,vt((function(){return{current:t}}),[])}function vt(t,e){var n=_t(tt++,7);return kt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function dt(t,e){return ot=8,vt((function(){return t}),e)}function yt(){for(var t;t=it.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(bt),t.__H.__h.forEach(wt),t.__H.__h=[]}catch(Ve){t.__H.__h=[],p.__e(Ve,t.__v)}}p.__b=function(t){et=null,at&&at(t)},p.__r=function(t){ct&&ct(t),tt=0;var e=(et=t.__c).__H;e&&(nt===et?(e.__h=[],et.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=ut,t.__N=t.i=void 0}))):(e.__h.forEach(bt),e.__h.forEach(wt),e.__h=[],tt=0)),nt=et},p.diffed=function(t){st&&st(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==it.push(e)&&rt===p.requestAnimationFrame||((rt=p.requestAnimationFrame)||gt)(yt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==ut&&(t.__=t.__V),t.i=void 0,t.__V=ut}))),nt=et=null},p.__c=function(t,e){e.some((function(t){try{t.__h.forEach(bt),t.__h=t.__h.filter((function(t){return!t.__||wt(t)}))}catch(Tt){e.some((function(t){t.__h&&(t.__h=[])})),e=[],p.__e(Tt,t.__v)}})),lt&<(t,e)},p.unmount=function(t){ft&&ft(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{bt(t)}catch(t){e=t}})),n.__H=void 0,e&&p.__e(e,n.__v))};var mt="function"==typeof requestAnimationFrame;function gt(t){var e,n=function(){clearTimeout(r),mt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);mt&&(e=requestAnimationFrame(n))}function bt(t){var e=et,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),et=e}function wt(t){var e=et;t.__c=t.__(),et=e}function kt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function xt(){throw new Error("Cycle detected")}var St=Symbol.for("preact-signals");function Et(){if(At>1)At--;else{for(var t,e=!1;void 0!==Lt;){var n=Lt;for(Lt=void 0,Ht++;void 0!==n;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ut(n))try{n.c()}catch(n){e||(t=n,e=!0)}n=r}}if(Ht=0,At--,e)throw t}}var Nt,Ot,Pt=void 0,Lt=void 0,At=0,Ht=0,Tt=0;function Ct(t){if(void 0!==Pt){var e=t.n;if(void 0===e||e.t!==Pt)return e={i:0,S:t,p:Pt.s,n:void 0,t:Pt,e:void 0,x:void 0,r:e},void 0!==Pt.s&&(Pt.s.n=e),Pt.s=e,t.n=e,32&Pt.f&&t.S(e),e;if(-1===e.i)return e.i=0,void 0!==e.n&&(e.n.p=e.p,void 0!==e.p&&(e.p.n=e.n),e.p=Pt.s,e.n=void 0,Pt.s.n=e,Pt.s=e),e}}function jt(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}function Rt(t){return new jt(t)}function Ut(t){for(var e=t.s;void 0!==e;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function zt(t){for(var e=t.s;void 0!==e;e=e.n){var n=e.S.n;if(void 0!==n&&(e.r=n),e.S.n=e,e.i=-1,void 0===e.n){t.s=e;break}}}function Ft(t){for(var e=t.s,n=void 0;void 0!==e;){var r=e.p;-1===e.i?(e.S.U(e),void 0!==r&&(r.n=e.n),void 0!==e.n&&(e.n.p=r)):n=e,e.S.n=e.r,void 0!==e.r&&(e.r=void 0),e=r}t.s=n}function Mt(t){jt.call(this,void 0),this.x=t,this.s=void 0,this.g=Tt-1,this.f=4}function $t(t){return new Mt(t)}function Dt(t){var e=t.u;if(t.u=void 0,"function"==typeof e){At++;var n=Pt;Pt=void 0;try{e()}catch(e){throw t.f&=-2,t.f|=8,Wt(t),e}finally{Pt=n,Et()}}}function Wt(t){for(var e=t.s;void 0!==e;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Dt(t)}function Vt(t){if(Pt!==this)throw new Error("Out-of-order effect");Ft(this),Pt=t,this.f&=-2,8&this.f&&Wt(this),Et()}function Bt(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function It(t){var e=new Bt(t);try{e.c()}catch(t){throw e.d(),t}return e.d.bind(e)}function Gt(t,e){p[t]=e.bind(null,p[t]||function(){})}function qt(t){Ot&&Ot(),Ot=t&&t.S()}function Yt(t){var e=this,n=t.data,r=Zt(n);r.value=n;var o=vt((function(){for(var t=e.__v;t=t.__;)if(t.__c){t.__c.__$f|=4;break}return e.__$u.c=function(){var t;d(o.peek())||3!==(null==(t=e.base)?void 0:t.nodeType)?(e.__$f|=1,e.setState({})):e.base.data=o.peek()},$t((function(){var t=r.value.value;return 0===t?0:!0===t?"":t||""}))}),[]);return o.value}function Xt(t,e,n,r){var o=e in t&&void 0===t.ownerSVGElement,i=Rt(n);return{o:function(t,e){i.value=t,r=e},d:It((function(){var n=i.value.value;r[e]!==n&&(r[e]=n,o?t[e]=n:n?t.setAttribute(e,n):t.removeAttribute(e))}))}}function Zt(t){return vt((function(){return Rt(t)}),[])}function Kt(t){var e=pt(t);return e.current=t,Nt.__$f|=4,vt((function(){return $t((function(){return e.current()}))}),[])}jt.prototype.brand=St,jt.prototype.h=function(){return!0},jt.prototype.S=function(t){this.t!==t&&void 0===t.e&&(t.x=this.t,void 0!==this.t&&(this.t.e=t),this.t=t)},jt.prototype.U=function(t){if(void 0!==this.t){var e=t.e,n=t.x;void 0!==e&&(e.x=n,t.e=void 0),void 0!==n&&(n.e=e,t.x=void 0),t===this.t&&(this.t=n)}},jt.prototype.subscribe=function(t){var e=this;return It((function(){var n=e.value,r=32&this.f;this.f&=-33;try{t(n)}finally{this.f|=r}}))},jt.prototype.valueOf=function(){return this.value},jt.prototype.toString=function(){return this.value+""},jt.prototype.toJSON=function(){return this.value},jt.prototype.peek=function(){return this.v},Object.defineProperty(jt.prototype,"value",{get:function(){var t=Ct(this);return void 0!==t&&(t.i=this.i),this.v},set:function(t){if(Pt instanceof Mt&&function(){throw new Error("Computed cannot have side-effects")}(),t!==this.v){Ht>100&&xt(),this.v=t,this.i++,Tt++,At++;try{for(var e=this.t;void 0!==e;e=e.x)e.t.N()}finally{Et()}}}}),(Mt.prototype=new jt).h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Tt)return!0;if(this.g=Tt,this.f|=1,this.i>0&&!Ut(this))return this.f&=-2,!0;var t=Pt;try{zt(this),Pt=this;var e=this.x();(16&this.f||this.v!==e||0===this.i)&&(this.v=e,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return Pt=t,Ft(this),this.f&=-2,!0},Mt.prototype.S=function(t){if(void 0===this.t){this.f|=36;for(var e=this.s;void 0!==e;e=e.n)e.S.S(e)}jt.prototype.S.call(this,t)},Mt.prototype.U=function(t){if(void 0!==this.t&&(jt.prototype.U.call(this,t),void 0===this.t)){this.f&=-33;for(var e=this.s;void 0!==e;e=e.n)e.S.U(e)}},Mt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;void 0!==t;t=t.x)t.t.N()}},Mt.prototype.peek=function(){if(this.h()||xt(),16&this.f)throw this.v;return this.v},Object.defineProperty(Mt.prototype,"value",{get:function(){1&this.f&&xt();var t=Ct(this);if(this.h(),void 0!==t&&(t.i=this.i),16&this.f)throw this.v;return this.v}}),Bt.prototype.c=function(){var t=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var e=this.x();"function"==typeof e&&(this.u=e)}finally{t()}},Bt.prototype.S=function(){1&this.f&&xt(),this.f|=1,this.f&=-9,Dt(this),zt(this),At++;var t=Pt;return Pt=this,Vt.bind(this,t)},Bt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Lt,Lt=this)},Bt.prototype.d=function(){this.f|=8,1&this.f||Wt(this)},Yt.displayName="_st",Object.defineProperties(jt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Yt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Gt("__b",(function(t,e){if("string"==typeof e.type){var n,r=e.props;for(var o in r)if("children"!==o){var i=r[o];i instanceof jt&&(n||(e.__np=n={}),n[o]=i,r[o]=i.peek())}}t(e)})),Gt("__r",(function(t,e){qt();var n,r=e.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=n=function(t){var e;return It((function(){e=this})),e.c=function(){r.__$f|=1,r.setState({})},e}())),Nt=r,qt(n),t(e)})),Gt("__e",(function(t,e,n,r){qt(),Nt=void 0,t(e,n,r)})),Gt("diffed",(function(t,e){var n;if(qt(),Nt=void 0,"string"==typeof e.type&&(n=e.__e)){var r=e.__np,o=e.props;if(r){var i=n.U;if(i)for(var u in i){var a=i[u];void 0===a||u in r||(a.d(),i[u]=void 0)}else n.U=i={};for(var c in r){var s=i[c],l=r[c];void 0===s?(s=Xt(n,c,l,o),i[c]=s):s.o(l,o)}}}t(e)})),Gt("unmount",(function(t,e){if("string"==typeof e.type){var n=e.__e;if(n){var r=n.U;if(r)for(var o in n.U=void 0,r){var i=r[o];i&&i.d()}}}else{var u=e.__c;if(u){var a=u.__$u;a&&(u.__$u=void 0,a.d())}}t(e)})),Gt("__h",(function(t,e,n,r){(r<3||9===r)&&(e.__$f|=2),t(e,n,r)})),A.prototype.shouldComponentUpdate=function(t,e){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 e)return!0;for(var o in t)if("__source"!==o&&t[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in t))return!0;return!1};var Jt=0;function Qt(t,e,n,r,o,i){var u,a,c={};for(a in e)"ref"==a?u=e[a]:c[a]=e[a];var s={type:t,props:c,key:n,ref:u,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Jt,__source:o,__self:i};if("function"==typeof t&&(u=t.defaultProps))for(a in u)void 0===c[a]&&(c[a]=u[a]);return p.vnode&&p.vnode(s),s}var te=function(){return Qt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Qt("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"})})},ee=function(){return Qt("svg",{className:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Qt("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"})})},ne=function(){return Qt("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Qt("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"})})},re=new K("markdown-message"),oe=function(t){var e=t.message,n=t.size,r=Zt(Q()),o=Zt(null);ht((function(){n>=0&&o.value&&o.value.setMarkdown(e.content)}),[e,n]),ht((function(){o.value=new f({id:r,value:e.content,editor:{defaultModel:"previewOnly"}})}),[]);return Qt("div",{className:re.b(),children:[Qt("div",{className:re.b("header"),children:Qt("div",{className:re.be("header","caption"),children:"AI: "})}),Qt("div",{className:re.b("content"),children:Qt("div",{id:r})}),Qt("div",{className:re.b("footer"),children:Qt("div",{className:re.b("footer-action-wrapper"),children:Qt("div",{className:re.be("footer","action-item"),title:"回填当前回复",onClick:function(){t.controller.backfill(e)},children:Qt(ee,{})})})})]})},ie=new K("user-message"),ue=function(t){var e=Kt((function(){return t.message.content}));return Qt("div",{className:ie.b(),children:Qt("span",{className:ie.e("content"),children:e})})},ae=new K("error-message"),ce=function(t){var e=Kt((function(){return t.message.content}));return Qt("div",{className:ae.b(),children:Qt("span",{className:ae.e("content"),children:e})})},se=new K("unknown-message"),le=function(t){return Qt("div",{className:se.b(),children:Qt("span",{className:se.e("content"),children:["暂未支持的消息类型: ",t.message.type]})})},fe=new K("chat-message-item"),_e=function(t){var e=t.message,n=t.size,r=null;switch(e.type){case"DEFAULT":r="ASSISTANT"===e.role?oe:ue;break;case"ERROR":r=ce;break;default:r=le}return Qt("div",{className:fe.b(),children:O(r,{size:n,message:e,controller:t.controller})})},he=new K("chat-messages"),pe=function(t){var e=pt(null),n=t.controller.messages;return function(t){var e=pt(t);e.current=t,ht((function(){return It((function(){return e.current()}))}),[])}((function(){e.current&&n.value.length>0&&(e.current.scrollTop=e.current.scrollHeight)})),Qt("div",{ref:e,className:he.b(),children:n.value.map((function(e){var n,r=(null===(n=e.content)||void 0===n?void 0:n.length)||0;return Qt(_e,{message:e,size:r,controller:t.controller},e.messageid)}))})};function ve(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function de(t){this.props=t}(de.prototype=new A).isPureReactComponent=!0,de.prototype.shouldComponentUpdate=function(t,e){return ve(this.props,t)||ve(this.state,e)};var ye=p.__b;p.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ye&&ye(t)};var me=p.__e;p.__e=function(t,e,n,r){if(t.then)for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);me(t,e,n,r)};var ge=p.unmount;function be(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=function(t,e){for(var n in e)t[n]=e[n];return t}({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return be(t,e,n)}))),t}function we(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return we(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function ke(){this.__u=0,this.t=null,this.__b=null}function xe(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Se(){this.u=null,this.o=null}p.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),ge&&ge(t)},(ke.prototype=new A).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=xe(r.__v),i=!1,u=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=u;var a=function(){if(! --r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=we(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}},c=!0===e.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(u,u)},ke.prototype.componentWillUnmount=function(){this.t=[]},ke.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=be(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&O(L,null,t.fallback);return o&&(o.__h=null),[O(L,null,e.__a?null:t.children),o]};var Ee=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};(Se.prototype=new A).__a=function(t){var e=this,n=xe(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),Ee(e,t,r)):o()};n?n(i):i()}},Se.prototype.render=function(t){this.u=null,this.o=new Map;var e=z(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ee(t,n,e)}))};var Ne="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Oe=/^(?: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]/,Pe=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Le=/[A-Z0-9]/g,Ae="undefined"!=typeof document,He=function(t){return("undefined"!=typeof Symbol&&"symbol"==s(Symbol())?/fil|che|rad/:/fil|che|ra/).test(t)};A.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(A.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var Te=p.event;function Ce(){}function je(){return this.cancelBubble}function Re(){return this.defaultPrevented}p.event=function(t){return Te&&(t=Te(t)),t.persist=Ce,t.isPropagationStopped=je,t.isDefaultPrevented=Re,t.nativeEvent=t};var Ue={enumerable:!1,configurable:!0,get:function(){return this.class}},ze=p.vnode;p.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={};for(var o in e){var i=e[o];if(!("value"===o&&"defaultValue"in e&&null==i||Ae&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var u=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===i?i="":"ondoubleclick"===u?o="ondblclick":"onchange"!==u||"input"!==n&&"textarea"!==n||He(e.type)?"onfocus"===u?o="onfocusin":"onblur"===u?o="onfocusout":Pe.test(o)?o=u:-1===n.indexOf("-")&&Oe.test(o)?o=o.replace(Le,"-$&").toLowerCase():null===i&&(i=void 0):u=o="oninput","oninput"===u&&r[o=u]&&(o="oninputCapture"),r[o]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=z(e.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=z(e.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",Ue)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=Ne,ze&&ze(t)};var Fe=p.__r;p.__r=function(t){Fe&&Fe(t),t.__c};var Me=p.diffed;p.diffed=function(t){Me&&Me(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)};var $e=new Map;function De(t){var e=$e.get(t);e&&e.destroy()}function We(t){var e=$e.get(t);e&&e.update()}var Ve=null;"undefined"==typeof window?((Ve=function(t){return t}).destroy=function(t){return t},Ve.update=function(t){return t}):((Ve=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!$e.has(t)){var e,n=null,r=window.getComputedStyle(t),o=(e=t.value,function(){u({testForHeightReduction:""===e||!t.value.startsWith(e),restoreTextAlign:null}),e=t.value}),i=function(e){t.removeEventListener("autosize:destroy",i),t.removeEventListener("autosize:update",a),t.removeEventListener("input",o),window.removeEventListener("resize",a),Object.keys(e).forEach((function(n){return t.style[n]=e[n]})),$e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",i),t.addEventListener("autosize:update",a),t.addEventListener("input",o),window.addEventListener("resize",a),t.style.overflowX="hidden",t.style.wordWrap="break-word",$e.set(t,{destroy:i,update:a}),a()}function u(e){var o,i,a=e.restoreTextAlign,c=void 0===a?null:a,s=e.testForHeightReduction,l=void 0===s||s,f=r.overflowY;if(0!==t.scrollHeight&&("vertical"===r.resize?t.style.resize="none":"both"===r.resize&&(t.style.resize="horizontal"),l&&(o=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],n=t[1];e.style.scrollBehavior="auto",e.scrollTop=n,e.style.scrollBehavior=null}))}}(t),t.style.height=""),i="content-box"===r.boxSizing?t.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):t.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&i>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(t.style.overflow="scroll"),i=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(t.style.overflow="hidden"),t.style.height=i+"px",c&&(t.style.textAlign=c),o&&o(),n!==i&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),n=i),f!==r.overflow&&!c)){var _=r.textAlign;"hidden"===r.overflow&&(t.style.textAlign="start"===_?"end":"start"),u({restoreTextAlign:_,testForHeightReduction:!0})}}function a(){u({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],De),t},Ve.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],We),t});var Be=Ve,Ie=new K("chat-input"),Ge=function(t){var e=pt(null),n=t.controller.input,r=Zt(!1),o=dt((function(t){n.value=t.target.value}),[n]),i=Kt((function(){return n.value.length<=0||!0===r.value}));ht((function(){return e.current&&Be(e.current),function(){e.current&&Be.destroy(e.current)}}),[e]);var a=dt(c(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.value=!0,e.prev=1,e.next=4,t.controller.question(n.value);case 4:n.value="",e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error(e.t0);case 10:return e.prev=10,r.value=!1,e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[1,7,10,13]])}))),[n,r]);return Qt("div",{className:Ie.b(),children:[Qt("textarea",{className:Ie.e("textarea"),type:"text",wrap:"off",autoCorrect:"off",autoCapitalize:"off",autoComplete:"off",value:n,onInput:o,onKeyDown:function(t){"Enter"===t.code&&t.ctrlKey&&(t.stopPropagation(),a())},ref:e,disabled:r}),Qt("div",{className:Ie.b("action-wrapper"),children:Qt("div",{title:r?"思考中...":"发送消息",className:"".concat(Ie.be("action-wrapper","action-item")," ").concat(Ie.is("disabled",i.value)," ").concat(Ie.is("loading",r.value)),onClick:a,disabled:i,children:Qt(ne,{})})})]})},qe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}(i,t);var e=r(i);function i(){var t;l(this,i);for(var n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];return h(o(t=e.call.apply(e,[this].concat(r))),"ns",new K("chat-container")),h(o(t),"containerRef",{current:null}),h(o(t),"dragHandle",{current:null}),h(o(t),"data",{x:window.innerWidth-600-100,y:100,width:600,height:600,minWidth:300,minHeight:300}),t}return _(i,[{key:"calcStyle",value:function(){return{left:"".concat(this.data.x,"px"),top:"".concat(this.data.y,"px"),height:"".concat(this.data.height,"px"),width:"".concat(this.data.width,"px"),"z-index":"1000px"}}},{key:"setStyle",value:function(){Object.assign(this.containerRef.current.style,this.calcStyle())}},{key:"componentDidMount",value:function(){var t=this;this.setStyle();var e=this.data;a(this.dragHandle.current).draggable({modifiers:[a.modifiers.restrictRect({restriction:document.body,endOnly:!0})],cursorChecker:function(){return"move"},listeners:{move:function(n){e.x+=n.dx,e.y+=n.dy,t.setStyle()}}}),a(this.containerRef.current).resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},margin:6,modifiers:[a.modifiers.restrictEdges({outer:document.body}),a.modifiers.restrictSize({min:{width:e.minWidth,height:e.minHeight}})],inertia:!0,listeners:{move:function(n){e.x+=n.deltaRect.left,e.y+=n.deltaRect.top,e.width=n.rect.width,e.height=n.rect.height,t.setStyle()}}})}},{key:"close",value:function(){this.props.close()}},{key:"render",value:function(){return Qt("div",{className:this.ns.b(),ref:this.containerRef,children:[Qt("div",{ref:this.dragHandle,className:this.ns.b("header"),children:[Qt("div",{className:this.ns.b("header-caption"),children:"AIChat"}),Qt("div",{className:this.ns.b("header-action-wrapper"),children:Qt("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:Qt(te,{})})})]}),Qt("div",{className:this.ns.b("content"),children:Qt(pe,{controller:this.props.controller})}),Qt("div",{className:this.ns.b("footer"),children:Qt(Ge,{controller:this.props.controller})})]})}}]),i}(A);e("ChatContainer",qe);var Ye=function(){function t(e){l(this,t),this.msg=e}return _(t,[{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(t){t.content||(t.content=""),this.msg.content+=t.content}}]),t}(),Xe=function(){function e(t){l(this,e),h(this,"messages",Rt([])),h(this,"input",Rt("")),this.opts=t}var n;return _(e,[{key:"setInput",value:function(t){this.input.value=t||""}},{key:"addMessage",value:function(e){var n=this.messages.value.find((function(t){return t.messageid===e.messageid}));n?(n.update(e),this.messages.value=t(this.messages.value)):this.messages.value=[].concat(t(this.messages.value),[new Ye(e)])}},{key:"replaceMessage",value:function(e){var n=this.messages.value.findIndex((function(t){return t.messageid===e.messageid}));-1!==n?(this.messages.value[n]=new Ye(e),this.messages.value=t(this.messages.value)):this.messages.value=[].concat(t(this.messages.value),[new Ye(e)])}},{key:"question",value:(n=c(u().mark((function t(e){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.addMessage({state:30,messageid:Q(),role:"USER",type:"DEFAULT",content:e}),t.next=3,this.opts.question(this.messages.value.filter((function(t){return"ERROR"!==t.type})).map((function(t){return t._origin})));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"backfill",value:function(t){this.opts.action&&this.opts.action("backfill",t)}}]),e}(),Ze=function(){function t(){l(this,t),h(this,"container",void 0)}return _(t,[{key:"create",value:function(t){var e=this;this.container=document.createElement("div"),this.container.classList.add("ibiz-ai-chat"),document.body.appendChild(this.container);var n=new Xe(t);return X(O(qe,{controller:n,close:function(){e.close(),t.closed&&t.closed()}}),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&&(X(null,this.container),this.container.remove(),this.container=void 0)}}]),t}();e("chat",new Ze)}}}))}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(t){return t&&t.Math===Math&&t},e=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),n={},o=function(t){try{return!!t()}catch(r){return!0}},i=!o((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),c=u,a=Function.prototype.call,f=c?a.bind(a):function(){return a.apply(a,arguments)},s={},l={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,p=v&&!l.call({1:2},1);s.f=p?function(t){var r=v(this,t);return!!r&&r.enumerable}:l;var h,d,g=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},y=u,m=Function.prototype,b=m.call,w=y&&m.bind.bind(b,b),S=y?w:function(t){return function(){return b.apply(t,arguments)}},E=S,O=E({}.toString),x=E("".slice),j=function(t){return x(O(t),8,-1)},I=o,T=j,P=Object,R=S("".split),A=I((function(){return!P("z").propertyIsEnumerable(0)}))?function(t){return"String"===T(t)?R(t,""):P(t)}:P,C=function(t){return null==t},k=C,N=TypeError,L=function(t){if(k(t))throw new N("Can't call method on "+t);return t},M=A,F=L,_=function(t){return M(F(t))},D="object"==typeof document&&document.all,U={all:D,IS_HTMLDDA:void 0===D&&void 0!==D},$=U.all,G=U.IS_HTMLDDA?function(t){return"function"==typeof t||t===$}:function(t){return"function"==typeof t},z=G,W=U.all,B=U.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:z(t)||t===W}:function(t){return"object"==typeof t?null!==t:z(t)},H=e,V=G,J=function(t,r){return arguments.length<2?(e=H[t],V(e)?e:void 0):H[t]&&H[t][r];var e},K=S({}.isPrototypeOf),q="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Y=e,X=q,Q=Y.process,Z=Y.Deno,tt=Q&&Q.versions||Z&&Z.version,rt=tt&&tt.v8;rt&&(d=(h=rt.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!d&&X&&(!(h=X.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=X.match(/Chrome\/(\d+)/))&&(d=+h[1]);var et=d,nt=et,ot=o,it=e.String,ut=!!Object.getOwnPropertySymbols&&!ot((function(){var t=Symbol("symbol detection");return!it(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&nt&&nt<41})),ct=ut&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=J,ft=G,st=K,lt=Object,vt=ct?function(t){return"symbol"==typeof t}:function(t){var r=at("Symbol");return ft(r)&&st(r.prototype,lt(t))},pt=String,ht=function(t){try{return pt(t)}catch(r){return"Object"}},dt=G,gt=ht,yt=TypeError,mt=function(t){if(dt(t))return t;throw new yt(gt(t)+" is not a function")},bt=mt,wt=C,St=function(t,r){var e=t[r];return wt(e)?void 0:bt(e)},Et=f,Ot=G,xt=B,jt=TypeError,It=function(t,r){var e,n;if("string"===r&&Ot(e=t.toString)&&!xt(n=Et(e,t)))return n;if(Ot(e=t.valueOf)&&!xt(n=Et(e,t)))return n;if("string"!==r&&Ot(e=t.toString)&&!xt(n=Et(e,t)))return n;throw new jt("Can't convert object to primitive value")},Tt={exports:{}},Pt=e,Rt=Object.defineProperty,At=function(t,r){try{Rt(Pt,t,{value:r,configurable:!0,writable:!0})}catch(e){Pt[t]=r}return r},Ct=At,kt="__core-js_shared__",Nt=e[kt]||Ct(kt,{}),Lt=Nt;(Tt.exports=function(t,r){return Lt[t]||(Lt[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.33.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Mt=Tt.exports,Ft=L,_t=Object,Dt=function(t){return _t(Ft(t))},Ut=Dt,$t=S({}.hasOwnProperty),Gt=Object.hasOwn||function(t,r){return $t(Ut(t),r)},zt=S,Wt=0,Bt=Math.random(),Ht=zt(1..toString),Vt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Ht(++Wt+Bt,36)},Jt=Mt,Kt=Gt,qt=Vt,Yt=ut,Xt=ct,Qt=e.Symbol,Zt=Jt("wks"),tr=Xt?Qt.for||Qt:Qt&&Qt.withoutSetter||qt,rr=function(t){return Kt(Zt,t)||(Zt[t]=Yt&&Kt(Qt,t)?Qt[t]:tr("Symbol."+t)),Zt[t]},er=f,nr=B,or=vt,ir=St,ur=It,cr=TypeError,ar=rr("toPrimitive"),fr=function(t,r){if(!nr(t)||or(t))return t;var e,n=ir(t,ar);if(n){if(void 0===r&&(r="default"),e=er(n,t,r),!nr(e)||or(e))return e;throw new cr("Can't convert object to primitive value")}return void 0===r&&(r="number"),ur(t,r)},sr=fr,lr=vt,vr=function(t){var r=sr(t,"string");return lr(r)?r:r+""},pr=B,hr=e.document,dr=pr(hr)&&pr(hr.createElement),gr=function(t){return dr?hr.createElement(t):{}},yr=gr,mr=!i&&!o((function(){return 7!==Object.defineProperty(yr("div"),"a",{get:function(){return 7}}).a})),br=i,wr=f,Sr=s,Er=g,Or=_,xr=vr,jr=Gt,Ir=mr,Tr=Object.getOwnPropertyDescriptor;n.f=br?Tr:function(t,r){if(t=Or(t),r=xr(r),Ir)try{return Tr(t,r)}catch(e){}if(jr(t,r))return Er(!wr(Sr.f,t,r),t[r])};var Pr={},Rr=i&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ar=B,Cr=String,kr=TypeError,Nr=function(t){if(Ar(t))return t;throw new kr(Cr(t)+" is not an object")},Lr=i,Mr=mr,Fr=Rr,_r=Nr,Dr=vr,Ur=TypeError,$r=Object.defineProperty,Gr=Object.getOwnPropertyDescriptor,zr="enumerable",Wr="configurable",Br="writable";Pr.f=Lr?Fr?function(t,r,e){if(_r(t),r=Dr(r),_r(e),"function"==typeof t&&"prototype"===r&&"value"in e&&Br in e&&!e[Br]){var n=Gr(t,r);n&&n[Br]&&(t[r]=e.value,e={configurable:Wr in e?e[Wr]:n[Wr],enumerable:zr in e?e[zr]:n[zr],writable:!1})}return $r(t,r,e)}:$r:function(t,r,e){if(_r(t),r=Dr(r),_r(e),Mr)try{return $r(t,r,e)}catch(n){}if("get"in e||"set"in e)throw new Ur("Accessors not supported");return"value"in e&&(t[r]=e.value),t};var Hr=Pr,Vr=g,Jr=i?function(t,r,e){return Hr.f(t,r,Vr(1,e))}:function(t,r,e){return t[r]=e,t},Kr={exports:{}},qr=i,Yr=Gt,Xr=Function.prototype,Qr=qr&&Object.getOwnPropertyDescriptor,Zr=Yr(Xr,"name"),te={EXISTS:Zr,PROPER:Zr&&"something"===function(){}.name,CONFIGURABLE:Zr&&(!qr||qr&&Qr(Xr,"name").configurable)},re=G,ee=Nt,ne=S(Function.toString);re(ee.inspectSource)||(ee.inspectSource=function(t){return ne(t)});var oe,ie,ue,ce=ee.inspectSource,ae=G,fe=e.WeakMap,se=ae(fe)&&/native code/.test(String(fe)),le=Vt,ve=Mt("keys"),pe=function(t){return ve[t]||(ve[t]=le(t))},he={},de=se,ge=e,ye=B,me=Jr,be=Gt,we=Nt,Se=pe,Ee=he,Oe="Object already initialized",xe=ge.TypeError,je=ge.WeakMap;if(de||we.state){var Ie=we.state||(we.state=new je);Ie.get=Ie.get,Ie.has=Ie.has,Ie.set=Ie.set,oe=function(t,r){if(Ie.has(t))throw new xe(Oe);return r.facade=t,Ie.set(t,r),r},ie=function(t){return Ie.get(t)||{}},ue=function(t){return Ie.has(t)}}else{var Te=Se("state");Ee[Te]=!0,oe=function(t,r){if(be(t,Te))throw new xe(Oe);return r.facade=t,me(t,Te,r),r},ie=function(t){return be(t,Te)?t[Te]:{}},ue=function(t){return be(t,Te)}}var Pe={set:oe,get:ie,has:ue,enforce:function(t){return ue(t)?ie(t):oe(t,{})},getterFor:function(t){return function(r){var e;if(!ye(r)||(e=ie(r)).type!==t)throw new xe("Incompatible receiver, "+t+" required");return e}}},Re=S,Ae=o,Ce=G,ke=Gt,Ne=i,Le=te.CONFIGURABLE,Me=ce,Fe=Pe.enforce,_e=Pe.get,De=String,Ue=Object.defineProperty,$e=Re("".slice),Ge=Re("".replace),ze=Re([].join),We=Ne&&!Ae((function(){return 8!==Ue((function(){}),"length",{value:8}).length})),Be=String(String).split("String"),He=Kr.exports=function(t,r,e){"Symbol("===$e(De(r),0,7)&&(r="["+Ge(De(r),/^Symbol\(([^)]*)\)/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!ke(t,"name")||Le&&t.name!==r)&&(Ne?Ue(t,"name",{value:r,configurable:!0}):t.name=r),We&&e&&ke(e,"arity")&&t.length!==e.arity&&Ue(t,"length",{value:e.arity});try{e&&ke(e,"constructor")&&e.constructor?Ne&&Ue(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var n=Fe(t);return ke(n,"source")||(n.source=ze(Be,"string"==typeof r?r:"")),t};Function.prototype.toString=He((function(){return Ce(this)&&_e(this).source||Me(this)}),"toString");var Ve=Kr.exports,Je=G,Ke=Pr,qe=Ve,Ye=At,Xe=function(t,r,e,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:r;if(Je(e)&&qe(e,i,n),n.global)o?t[r]=e:Ye(r,e);else{try{n.unsafe?t[r]&&(o=!0):delete t[r]}catch(u){}o?t[r]=e:Ke.f(t,r,{value:e,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},Qe={},Ze=Math.ceil,tn=Math.floor,rn=Math.trunc||function(t){var r=+t;return(r>0?tn:Ze)(r)},en=function(t){var r=+t;return r!=r||0===r?0:rn(r)},nn=en,on=Math.max,un=Math.min,cn=function(t,r){var e=nn(t);return e<0?on(e+r,0):un(e,r)},an=en,fn=Math.min,sn=function(t){return t>0?fn(an(t),9007199254740991):0},ln=sn,vn=function(t){return ln(t.length)},pn=_,hn=cn,dn=vn,gn=function(t){return function(r,e,n){var o,i=pn(r),u=dn(i),c=hn(n,u);if(t&&e!=e){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===e)return t||c||0;return!t&&-1}},yn={includes:gn(!0),indexOf:gn(!1)},mn=Gt,bn=_,wn=yn.indexOf,Sn=he,En=S([].push),On=function(t,r){var e,n=bn(t),o=0,i=[];for(e in n)!mn(Sn,e)&&mn(n,e)&&En(i,e);for(;r.length>o;)mn(n,e=r[o++])&&(~wn(i,e)||En(i,e));return i},xn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jn=On,In=xn.concat("length","prototype");Qe.f=Object.getOwnPropertyNames||function(t){return jn(t,In)};var Tn={};Tn.f=Object.getOwnPropertySymbols;var Pn=J,Rn=Qe,An=Tn,Cn=Nr,kn=S([].concat),Nn=Pn("Reflect","ownKeys")||function(t){var r=Rn.f(Cn(t)),e=An.f;return e?kn(r,e(t)):r},Ln=Gt,Mn=Nn,Fn=n,_n=Pr,Dn=function(t,r,e){for(var n=Mn(r),o=_n.f,i=Fn.f,u=0;u<n.length;u++){var c=n[u];Ln(t,c)||e&&Ln(e,c)||o(t,c,i(r,c))}},Un=o,$n=G,Gn=/#|\.prototype\./,zn=function(t,r){var e=Bn[Wn(t)];return e===Vn||e!==Hn&&($n(r)?Un(r):!!r)},Wn=zn.normalize=function(t){return String(t).replace(Gn,".").toLowerCase()},Bn=zn.data={},Hn=zn.NATIVE="N",Vn=zn.POLYFILL="P",Jn=zn,Kn=e,qn=n.f,Yn=Jr,Xn=Xe,Qn=At,Zn=Dn,to=Jn,ro=function(t,r){var e,n,o,i,u,c=t.target,a=t.global,f=t.stat;if(e=a?Kn:f?Kn[c]||Qn(c,{}):(Kn[c]||{}).prototype)for(n in r){if(i=r[n],o=t.dontCallGetSet?(u=qn(e,n))&&u.value:e[n],!to(a?n:c+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Zn(i,o)}(t.sham||o&&o.sham)&&Yn(i,"sham",!0),Xn(e,n,i,t)}},eo=j,no=Array.isArray||function(t){return"Array"===eo(t)},oo=i,io=no,uo=TypeError,co=Object.getOwnPropertyDescriptor,ao=oo&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),fo=TypeError,so=function(t){if(t>9007199254740991)throw fo("Maximum allowed index exceeded");return t},lo=Dt,vo=vn,po=ao?function(t,r){if(io(t)&&!co(t,"length").writable)throw new uo("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r},ho=so;ro({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var r=lo(this),e=vo(r),n=arguments.length;ho(e+n);for(var o=0;o<n;o++)r[e]=arguments[o],e++;return po(r,e),e}});var go=ht,yo=TypeError,mo={};mo[rr("toStringTag")]="z";var bo="[object z]"===String(mo),wo=bo,So=G,Eo=j,Oo=rr("toStringTag"),xo=Object,jo="Arguments"===Eo(function(){return arguments}()),Io=wo?Eo:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(e){}}(r=xo(t),Oo))?e:jo?Eo(r):"Object"===(n=Eo(r))&&So(r.callee)?"Arguments":n},To=Io,Po=String,Ro=function(t){if("Symbol"===To(t))throw new TypeError("Cannot convert a Symbol value to a string");return Po(t)},Ao=vr,Co=Pr,ko=g,No=function(t,r,e){var n=Ao(r);n in t?Co.f(t,n,ko(0,e)):t[n]=e},Lo=cn,Mo=vn,Fo=No,_o=Array,Do=Math.max,Uo=function(t,r,e){for(var n=Mo(t),o=Lo(r,n),i=Lo(void 0===e?n:e,n),u=_o(Do(i-o,0)),c=0;o<i;o++,c++)Fo(u,c,t[o]);return u.length=c,u},$o=Uo,Go=Math.floor,zo=function(t,r){var e=t.length,n=Go(e/2);return e<8?Wo(t,r):Bo(t,zo($o(t,0,n),r),zo($o(t,n),r),r)},Wo=function(t,r){for(var e,n,o=t.length,i=1;i<o;){for(n=i,e=t[i];n&&r(t[n-1],e)>0;)t[n]=t[--n];n!==i++&&(t[n]=e)}return t},Bo=function(t,r,e,n){for(var o=r.length,i=e.length,u=0,c=0;u<o||c<i;)t[u+c]=u<o&&c<i?n(r[u],e[c])<=0?r[u++]:e[c++]:u<o?r[u++]:e[c++];return t},Ho=zo,Vo=o,Jo=function(t,r){var e=[][t];return!!e&&Vo((function(){e.call(null,r||function(){return 1},1)}))},Ko=q.match(/firefox\/(\d+)/i),qo=!!Ko&&+Ko[1],Yo=/MSIE|Trident/.test(q),Xo=q.match(/AppleWebKit\/(\d+)\./),Qo=!!Xo&&+Xo[1],Zo=ro,ti=S,ri=mt,ei=Dt,ni=vn,oi=function(t,r){if(!delete t[r])throw new yo("Cannot delete property "+go(r)+" of "+go(t))},ii=Ro,ui=o,ci=Ho,ai=Jo,fi=qo,si=Yo,li=et,vi=Qo,pi=[],hi=ti(pi.sort),di=ti(pi.push),gi=ui((function(){pi.sort(void 0)})),yi=ui((function(){pi.sort(null)})),mi=ai("sort"),bi=!ui((function(){if(li)return li<70;if(!(fi&&fi>3)){if(si)return!0;if(vi)return vi<603;var t,r,e,n,o="";for(t=65;t<76;t++){switch(r=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(n=0;n<47;n++)pi.push({k:r+n,v:e})}for(pi.sort((function(t,r){return r.v-t.v})),n=0;n<pi.length;n++)r=pi[n].k.charAt(0),o.charAt(o.length-1)!==r&&(o+=r);return"DGBEFHACIJK"!==o}}));Zo({target:"Array",proto:!0,forced:gi||!yi||!mi||!bi},{sort:function(t){void 0!==t&&ri(t);var r=ei(this);if(bi)return void 0===t?hi(r):hi(r,t);var e,n,o=[],i=ni(r);for(n=0;n<i;n++)n in r&&di(o,r[n]);for(ci(o,function(t){return function(r,e){return void 0===e?-1:void 0===r?1:void 0!==t?+t(r,e)||0:ii(r)>ii(e)?1:-1}}(t)),e=ni(o),n=0;n<e;)r[n]=o[n++];for(;n<i;)oi(r,n++);return r}});var wi=Io,Si=bo?{}.toString:function(){return"[object "+wi(this)+"]"};bo||Xe(Object.prototype,"toString",Si,{unsafe:!0});var Ei=K,Oi=TypeError,xi=function(t,r){if(Ei(r,t))return t;throw new Oi("Incorrect invocation")},ji=!o((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Ii=Gt,Ti=G,Pi=Dt,Ri=ji,Ai=pe("IE_PROTO"),Ci=Object,ki=Ci.prototype,Ni=Ri?Ci.getPrototypeOf:function(t){var r=Pi(t);if(Ii(r,Ai))return r[Ai];var e=r.constructor;return Ti(e)&&r instanceof e?e.prototype:r instanceof Ci?ki:null},Li={},Mi=On,Fi=xn,_i=Object.keys||function(t){return Mi(t,Fi)},Di=i,Ui=Rr,$i=Pr,Gi=Nr,zi=_,Wi=_i;Li.f=Di&&!Ui?Object.defineProperties:function(t,r){Gi(t);for(var e,n=zi(r),o=Wi(r),i=o.length,u=0;i>u;)$i.f(t,e=o[u++],n[e]);return t};var Bi,Hi=J("document","documentElement"),Vi=Nr,Ji=Li,Ki=xn,qi=he,Yi=Hi,Xi=gr,Qi="prototype",Zi="script",tu=pe("IE_PROTO"),ru=function(){},eu=function(t){return"<"+Zi+">"+t+"</"+Zi+">"},nu=function(t){t.write(eu("")),t.close();var r=t.parentWindow.Object;return t=null,r},ou=function(){try{Bi=new ActiveXObject("htmlfile")}catch(o){}var t,r,e;ou="undefined"!=typeof document?document.domain&&Bi?nu(Bi):(r=Xi("iframe"),e="java"+Zi+":",r.style.display="none",Yi.appendChild(r),r.src=String(e),(t=r.contentWindow.document).open(),t.write(eu("document.F=Object")),t.close(),t.F):nu(Bi);for(var n=Ki.length;n--;)delete ou[Qi][Ki[n]];return ou()};qi[tu]=!0;var iu,uu,cu,au=Object.create||function(t,r){var e;return null!==t?(ru[Qi]=Vi(t),e=new ru,ru[Qi]=null,e[tu]=t):e=ou(),void 0===r?e:Ji.f(e,r)},fu=o,su=G,lu=B,vu=Ni,pu=Xe,hu=rr("iterator"),du=!1;[].keys&&("next"in(cu=[].keys())?(uu=vu(vu(cu)))!==Object.prototype&&(iu=uu):du=!0);var gu=!lu(iu)||fu((function(){var t={};return iu[hu].call(t)!==t}));gu&&(iu={}),su(iu[hu])||pu(iu,hu,(function(){return this}));var yu={IteratorPrototype:iu,BUGGY_SAFARI_ITERATORS:du},mu=ro,bu=e,wu=xi,Su=G,Eu=Ni,Ou=Jr,xu=o,ju=Gt,Iu=yu.IteratorPrototype,Tu=rr("toStringTag"),Pu=TypeError,Ru=bu.Iterator,Au=!Su(Ru)||Ru.prototype!==Iu||!xu((function(){Ru({})})),Cu=function(){if(wu(this,Iu),Eu(this)===Iu)throw new Pu("Abstract class Iterator not directly constructable")};ju(Iu,Tu)||Ou(Iu,Tu,"Iterator"),!Au&&ju(Iu,"constructor")&&Iu.constructor!==Object||Ou(Iu,"constructor",Cu),Cu.prototype=Iu,mu({global:!0,constructor:!0,forced:Au},{Iterator:Cu});var ku=j,Nu=S,Lu=function(t){if("Function"===ku(t))return Nu(t)},Mu=mt,Fu=u,_u=Lu(Lu.bind),Du=function(t,r){return Mu(t),void 0===r?t:Fu?_u(t,r):function(){return t.apply(r,arguments)}},Uu={},$u=Uu,Gu=rr("iterator"),zu=Array.prototype,Wu=function(t){return void 0!==t&&($u.Array===t||zu[Gu]===t)},Bu=Io,Hu=St,Vu=C,Ju=Uu,Ku=rr("iterator"),qu=function(t){if(!Vu(t))return Hu(t,Ku)||Hu(t,"@@iterator")||Ju[Bu(t)]},Yu=f,Xu=mt,Qu=Nr,Zu=ht,tc=qu,rc=TypeError,ec=function(t,r){var e=arguments.length<2?tc(t):r;if(Xu(e))return Qu(Yu(e,t));throw new rc(Zu(t)+" is not iterable")},nc=f,oc=Nr,ic=St,uc=function(t,r,e){var n,o;oc(t);try{if(!(n=ic(t,"return"))){if("throw"===r)throw e;return e}n=nc(n,t)}catch(i){o=!0,n=i}if("throw"===r)throw e;if(o)throw n;return oc(n),e},cc=Du,ac=f,fc=Nr,sc=ht,lc=Wu,vc=vn,pc=K,hc=ec,dc=qu,gc=uc,yc=TypeError,mc=function(t,r){this.stopped=t,this.result=r},bc=mc.prototype,wc=function(t,r,e){var n,o,i,u,c,a,f,s=e&&e.that,l=!(!e||!e.AS_ENTRIES),v=!(!e||!e.IS_RECORD),p=!(!e||!e.IS_ITERATOR),h=!(!e||!e.INTERRUPTED),d=cc(r,s),g=function(t){return n&&gc(n,"normal",t),new mc(!0,t)},y=function(t){return l?(fc(t),h?d(t[0],t[1],g):d(t[0],t[1])):h?d(t,g):d(t)};if(v)n=t.iterator;else if(p)n=t;else{if(!(o=dc(t)))throw new yc(sc(t)+" is not iterable");if(lc(o)){for(i=0,u=vc(t);u>i;i++)if((c=y(t[i]))&&pc(bc,c))return c;return new mc(!1)}n=hc(t,o)}for(a=v?t.next:n.next;!(f=ac(a,n)).done;){try{c=y(f.value)}catch(m){gc(n,"throw",m)}if("object"==typeof c&&c&&pc(bc,c))return c}return new mc(!1)},Sc=function(t){return{iterator:t,next:t.next,done:!1}},Ec=wc,Oc=mt,xc=Nr,jc=Sc;ro({target:"Iterator",proto:!0,real:!0},{some:function(t){xc(this),Oc(t);var r=jc(this),e=0;return Ec(r,(function(r,n){if(t(r,e++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var Ic,Tc,Pc=Nr,Rc=function(){var t=Pc(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},Ac=o,Cc=e.RegExp,kc=Ac((function(){var t=Cc("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),Nc=kc||Ac((function(){return!Cc("a","y").sticky})),Lc=kc||Ac((function(){var t=Cc("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),Mc={BROKEN_CARET:Lc,MISSED_STICKY:Nc,UNSUPPORTED_Y:kc},Fc=o,_c=e.RegExp,Dc=Fc((function(){var t=_c(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),Uc=o,$c=e.RegExp,Gc=Uc((function(){var t=$c("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),zc=f,Wc=S,Bc=Ro,Hc=Rc,Vc=Mc,Jc=au,Kc=Pe.get,qc=Dc,Yc=Gc,Xc=Mt("native-string-replace",String.prototype.replace),Qc=RegExp.prototype.exec,Zc=Qc,ta=Wc("".charAt),ra=Wc("".indexOf),ea=Wc("".replace),na=Wc("".slice),oa=(Tc=/b*/g,zc(Qc,Ic=/a/,"a"),zc(Qc,Tc,"a"),0!==Ic.lastIndex||0!==Tc.lastIndex),ia=Vc.BROKEN_CARET,ua=void 0!==/()??/.exec("")[1];(oa||ua||ia||qc||Yc)&&(Zc=function(t){var r,e,n,o,i,u,c,a=this,f=Kc(a),s=Bc(t),l=f.raw;if(l)return l.lastIndex=a.lastIndex,r=zc(Zc,l,s),a.lastIndex=l.lastIndex,r;var v=f.groups,p=ia&&a.sticky,h=zc(Hc,a),d=a.source,g=0,y=s;if(p&&(h=ea(h,"y",""),-1===ra(h,"g")&&(h+="g"),y=na(s,a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==ta(s,a.lastIndex-1))&&(d="(?: "+d+")",y=" "+y,g++),e=new RegExp("^(?:"+d+")",h)),ua&&(e=new RegExp("^"+d+"$(?!\\s)",h)),oa&&(n=a.lastIndex),o=zc(Qc,p?e:a,y),p?o?(o.input=na(o.input,g),o[0]=na(o[0],g),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:oa&&o&&(a.lastIndex=a.global?o.index+o[0].length:n),ua&&o&&o.length>1&&zc(Xc,o[0],e,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&v)for(o.groups=u=Jc(null),i=0;i<v.length;i++)u[(c=v[i])[0]]=o[c[1]];return o});var ca=Zc;ro({target:"RegExp",proto:!0,forced:/./.exec!==ca},{exec:ca});var aa,fa,sa=ro,la=f,va=G,pa=Nr,ha=Ro,da=(aa=!1,(fa=/[ac]/).exec=function(){return aa=!0,/./.exec.apply(this,arguments)},!0===fa.test("abc")&&aa),ga=/./.test;sa({target:"RegExp",proto:!0,forced:!da},{test:function(t){var r=pa(this),e=ha(t),n=r.exec;if(!va(n))return la(ga,r,e);var o=la(n,r,e);return null!==o&&(pa(o),!0)}});var ya=u,ma=Function.prototype,ba=ma.apply,wa=ma.call,Sa="object"==typeof Reflect&&Reflect.apply||(ya?wa.bind(ba):function(){return wa.apply(ba,arguments)}),Ea=Lu,Oa=Xe,xa=ca,ja=o,Ia=rr,Ta=Jr,Pa=Ia("species"),Ra=RegExp.prototype,Aa=S,Ca=en,ka=Ro,Na=L,La=Aa("".charAt),Ma=Aa("".charCodeAt),Fa=Aa("".slice),_a=function(t){return function(r,e){var n,o,i=ka(Na(r)),u=Ca(e),c=i.length;return u<0||u>=c?t?"":void 0:(n=Ma(i,u))<55296||n>56319||u+1===c||(o=Ma(i,u+1))<56320||o>57343?t?La(i,u):n:t?Fa(i,u,u+2):o-56320+(n-55296<<10)+65536}},Da={codeAt:_a(!1),charAt:_a(!0)},Ua=Da.charAt,$a=S,Ga=Dt,za=Math.floor,Wa=$a("".charAt),Ba=$a("".replace),Ha=$a("".slice),Va=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ja=/\$([$&'`]|\d{1,2})/g,Ka=f,qa=Nr,Ya=G,Xa=j,Qa=ca,Za=TypeError,tf=Sa,rf=f,ef=S,nf=function(t,r,e,n){var o=Ia(t),i=!ja((function(){var r={};return r[o]=function(){return 7},7!==""[t](r)})),u=i&&!ja((function(){var r=!1,e=/a/;return"split"===t&&((e={}).constructor={},e.constructor[Pa]=function(){return e},e.flags="",e[o]=/./[o]),e.exec=function(){return r=!0,null},e[o](""),!r}));if(!i||!u||e){var c=Ea(/./[o]),a=r(o,""[t],(function(t,r,e,n,o){var u=Ea(t),a=r.exec;return a===xa||a===Ra.exec?i&&!o?{done:!0,value:c(r,e,n)}:{done:!0,value:u(e,r,n)}:{done:!1}}));Oa(String.prototype,t,a[0]),Oa(Ra,o,a[1])}n&&Ta(Ra[o],"sham",!0)},of=o,uf=Nr,cf=G,af=C,ff=en,sf=sn,lf=Ro,vf=L,pf=function(t,r,e){return r+(e?Ua(t,r).length:1)},hf=St,df=function(t,r,e,n,o,i){var u=e+t.length,c=n.length,a=Ja;return void 0!==o&&(o=Ga(o),a=Va),Ba(i,a,(function(i,a){var f;switch(Wa(a,0)){case"$":return"$";case"&":return t;case"`":return Ha(r,0,e);case"'":return Ha(r,u);case"<":f=o[Ha(a,1,-1)];break;default:var s=+a;if(0===s)return i;if(s>c){var l=za(s/10);return 0===l?i:l<=c?void 0===n[l-1]?Wa(a,1):n[l-1]+Wa(a,1):i}f=n[s-1]}return void 0===f?"":f}))},gf=function(t,r){var e=t.exec;if(Ya(e)){var n=Ka(e,t,r);return null!==n&&qa(n),n}if("RegExp"===Xa(t))return Ka(Qa,t,r);throw new Za("RegExp#exec called on incompatible receiver")},yf=rr("replace"),mf=Math.max,bf=Math.min,wf=ef([].concat),Sf=ef([].push),Ef=ef("".indexOf),Of=ef("".slice),xf="$0"==="a".replace(/./,"$0"),jf=!!/./[yf]&&""===/./[yf]("a","$0"),If=!of((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}));nf("replace",(function(t,r,e){var n=jf?"$":"$0";return[function(t,e){var n=vf(this),o=af(t)?void 0:hf(t,yf);return o?rf(o,t,n,e):rf(r,lf(n),t,e)},function(t,o){var i=uf(this),u=lf(t);if("string"==typeof o&&-1===Ef(o,n)&&-1===Ef(o,"$<")){var c=e(r,i,u,o);if(c.done)return c.value}var a=cf(o);a||(o=lf(o));var f,s=i.global;s&&(f=i.unicode,i.lastIndex=0);for(var l,v=[];null!==(l=gf(i,u))&&(Sf(v,l),s);){""===lf(l[0])&&(i.lastIndex=pf(u,sf(i.lastIndex),f))}for(var p,h="",d=0,g=0;g<v.length;g++){for(var y,m=lf((l=v[g])[0]),b=mf(bf(ff(l.index),u.length),0),w=[],S=1;S<l.length;S++)Sf(w,void 0===(p=l[S])?p:String(p));var E=l.groups;if(a){var O=wf([m],w,b,u);void 0!==E&&Sf(O,E),y=lf(tf(o,void 0,O))}else y=df(m,u,b,w,E,o);b>=d&&(h+=Of(u,d,b)+y,d=b+m.length)}return h+Of(u,d)}]}),!If||!xf||jf);var Tf=S,Pf=o,Rf=G,Af=Io,Cf=ce,kf=function(){},Nf=[],Lf=J("Reflect","construct"),Mf=/^\s*(?:class|function)\b/,Ff=Tf(Mf.exec),_f=!Mf.test(kf),Df=function(t){if(!Rf(t))return!1;try{return Lf(kf,Nf,t),!0}catch(r){return!1}},Uf=function(t){if(!Rf(t))return!1;switch(Af(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _f||!!Ff(Mf,Cf(t))}catch(r){return!0}};Uf.sham=!0;var $f=!Lf||Pf((function(){var t;return Df(Df.call)||!Df(Object)||!Df((function(){t=!0}))||t}))?Uf:Df,Gf=o,zf=et,Wf=rr("species"),Bf=function(t){return zf>=51||!Gf((function(){var r=[];return(r.constructor={})[Wf]=function(){return{foo:1}},1!==r[t](Boolean).foo}))},Hf=S([].slice),Vf=ro,Jf=no,Kf=$f,qf=B,Yf=cn,Xf=vn,Qf=_,Zf=No,ts=rr,rs=Hf,es=Bf("slice"),ns=ts("species"),os=Array,is=Math.max;Vf({target:"Array",proto:!0,forced:!es},{slice:function(t,r){var e,n,o,i=Qf(this),u=Xf(i),c=Yf(t,u),a=Yf(void 0===r?u:r,u);if(Jf(i)&&(e=i.constructor,(Kf(e)&&(e===os||Jf(e.prototype))||qf(e)&&null===(e=e[ns]))&&(e=void 0),e===os||void 0===e))return rs(i,c,a);for(n=new(void 0===e?os:e)(is(a-c,0)),o=0;c<a;c++,o++)c in i&&Zf(n,o,i[c]);return n.length=o,n}});var us=L,cs=Ro,as=/"/g,fs=S("".replace),ss=o,ls=function(t,r,e,n){var o=cs(us(t)),i="<"+r;return""!==e&&(i+=" "+e+'="'+fs(cs(n),as,""")+'"'),i+">"+o+"</"+r+">"},vs=function(t){return ss((function(){var r=""[t]('"');return r!==r.toLowerCase()||r.split('"').length>3}))};ro({target:"String",proto:!0,forced:vs("sub")},{sub:function(){return ls(this,"sub","","")}});var ps=wc,hs=mt,ds=Nr,gs=Sc;ro({target:"Iterator",proto:!0,real:!0},{forEach:function(t){ds(this),hs(t);var r=gs(this),e=0;ps(r,(function(r){t(r,e++)}),{IS_RECORD:!0})}});var ys={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ms=gr("span").classList,bs=ms&&ms.constructor&&ms.constructor.prototype,ws=bs===Object.prototype?void 0:bs,Ss=no,Es=$f,Os=B,xs=rr("species"),js=Array,Is=function(t){var r;return Ss(t)&&(r=t.constructor,(Es(r)&&(r===js||Ss(r.prototype))||Os(r)&&null===(r=r[xs]))&&(r=void 0)),void 0===r?js:r},Ts=function(t,r){return new(Is(t))(0===r?0:r)},Ps=Du,Rs=A,As=Dt,Cs=vn,ks=Ts,Ns=S([].push),Ls=function(t){var r=1===t,e=2===t,n=3===t,o=4===t,i=6===t,u=7===t,c=5===t||i;return function(a,f,s,l){for(var v,p,h=As(a),d=Rs(h),g=Ps(f,s),y=Cs(d),m=0,b=l||ks,w=r?b(a,y):e||u?b(a,0):void 0;y>m;m++)if((c||m in d)&&(p=g(v=d[m],m,h),t))if(r)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return v;case 6:return m;case 2:Ns(w,v)}else switch(t){case 4:return!1;case 7:Ns(w,v)}return i?-1:n||o?o:w}},Ms={forEach:Ls(0),map:Ls(1),filter:Ls(2),some:Ls(3),every:Ls(4),find:Ls(5),findIndex:Ls(6),filterReject:Ls(7)},Fs=Ms.forEach,_s=Jo("forEach")?[].forEach:function(t){return Fs(this,t,arguments.length>1?arguments[1]:void 0)},Ds=e,Us=ys,$s=ws,Gs=_s,zs=Jr,Ws=function(t){if(t&&t.forEach!==Gs)try{zs(t,"forEach",Gs)}catch(r){t.forEach=Gs}};for(var Bs in Us)Us[Bs]&&Ws(Ds[Bs]&&Ds[Bs].prototype);Ws($s);var Hs=Ve,Vs=Pr,Js=function(t,r,e){return e.get&&Hs(e.get,r,{getter:!0}),e.set&&Hs(e.set,r,{setter:!0}),Vs.f(t,r,e)},Ks=i,qs=te.EXISTS,Ys=S,Xs=Js,Qs=Function.prototype,Zs=Ys(Qs.toString),tl=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,rl=Ys(tl.exec);Ks&&!qs&&Xs(Qs,"name",{configurable:!0,get:function(){try{return rl(tl,Zs(this))[1]}catch(t){return""}}});var el,nl,ol,il,ul="process"===j(e.process),cl=S,al=mt,fl=G,sl=String,ll=TypeError,vl=function(t,r,e){try{return cl(al(Object.getOwnPropertyDescriptor(t,r)[e]))}catch(n){}},pl=Nr,hl=function(t){if("object"==typeof t||fl(t))return t;throw new ll("Can't set "+sl(t)+" as a prototype")},dl=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=vl(Object.prototype,"__proto__","set"))(e,[]),r=e instanceof Array}catch(n){}return function(e,n){return pl(e),hl(n),r?t(e,n):e.__proto__=n,e}}():void 0),gl=Pr.f,yl=Gt,ml=rr("toStringTag"),bl=function(t,r,e){t&&!e&&(t=t.prototype),t&&!yl(t,ml)&&gl(t,ml,{configurable:!0,value:r})},wl=J,Sl=Js,El=i,Ol=rr("species"),xl=function(t){var r=wl(t);El&&r&&!r[Ol]&&Sl(r,Ol,{configurable:!0,get:function(){return this}})},jl=$f,Il=ht,Tl=TypeError,Pl=function(t){if(jl(t))return t;throw new Tl(Il(t)+" is not a constructor")},Rl=Nr,Al=Pl,Cl=C,kl=rr("species"),Nl=TypeError,Ll=/(?:ipad|iphone|ipod).*applewebkit/i.test(q),Ml=e,Fl=Sa,_l=Du,Dl=G,Ul=Gt,$l=o,Gl=Hi,zl=Hf,Wl=gr,Bl=function(t,r){if(t<r)throw new Nl("Not enough arguments");return t},Hl=Ll,Vl=ul,Jl=Ml.setImmediate,Kl=Ml.clearImmediate,ql=Ml.process,Yl=Ml.Dispatch,Xl=Ml.Function,Ql=Ml.MessageChannel,Zl=Ml.String,tv=0,rv={},ev="onreadystatechange";$l((function(){el=Ml.location}));var nv=function(t){if(Ul(rv,t)){var r=rv[t];delete rv[t],r()}},ov=function(t){return function(){nv(t)}},iv=function(t){nv(t.data)},uv=function(t){Ml.postMessage(Zl(t),el.protocol+"//"+el.host)};Jl&&Kl||(Jl=function(t){Bl(arguments.length,1);var r=Dl(t)?t:Xl(t),e=zl(arguments,1);return rv[++tv]=function(){Fl(r,void 0,e)},nl(tv),tv},Kl=function(t){delete rv[t]},Vl?nl=function(t){ql.nextTick(ov(t))}:Yl&&Yl.now?nl=function(t){Yl.now(ov(t))}:Ql&&!Hl?(il=(ol=new Ql).port2,ol.port1.onmessage=iv,nl=_l(il.postMessage,il)):Ml.addEventListener&&Dl(Ml.postMessage)&&!Ml.importScripts&&el&&"file:"!==el.protocol&&!$l(uv)?(nl=uv,Ml.addEventListener("message",iv,!1)):nl=ev in Wl("script")?function(t){Gl.appendChild(Wl("script"))[ev]=function(){Gl.removeChild(this),nv(t)}}:function(t){setTimeout(ov(t),0)});var cv={set:Jl,clear:Kl},av=function(){this.head=null,this.tail=null};av.prototype={add:function(t){var r={item:t,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var fv,sv,lv,vv,pv,hv=av,dv=/ipad|iphone|ipod/i.test(q)&&"undefined"!=typeof Pebble,gv=/web0s(?!.*chrome)/i.test(q),yv=e,mv=Du,bv=n.f,wv=cv.set,Sv=hv,Ev=Ll,Ov=dv,xv=gv,jv=ul,Iv=yv.MutationObserver||yv.WebKitMutationObserver,Tv=yv.document,Pv=yv.process,Rv=yv.Promise,Av=bv(yv,"queueMicrotask"),Cv=Av&&Av.value;if(!Cv){var kv=new Sv,Nv=function(){var t,r;for(jv&&(t=Pv.domain)&&t.exit();r=kv.get();)try{r()}catch(e){throw kv.head&&fv(),e}t&&t.enter()};Ev||jv||xv||!Iv||!Tv?!Ov&&Rv&&Rv.resolve?((vv=Rv.resolve(void 0)).constructor=Rv,pv=mv(vv.then,vv),fv=function(){pv(Nv)}):jv?fv=function(){Pv.nextTick(Nv)}:(wv=mv(wv,yv),fv=function(){wv(Nv)}):(sv=!0,lv=Tv.createTextNode(""),new Iv(Nv).observe(lv,{characterData:!0}),fv=function(){lv.data=sv=!sv}),Cv=function(t){kv.head||fv(),kv.add(t)}}var Lv=Cv,Mv=function(t){try{return{error:!1,value:t()}}catch(r){return{error:!0,value:r}}},Fv=e.Promise,_v="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Dv=!_v&&!ul&&"object"==typeof window&&"object"==typeof document,Uv=e,$v=Fv,Gv=G,zv=Jn,Wv=ce,Bv=rr,Hv=Dv,Vv=_v,Jv=et;$v&&$v.prototype;var Kv=Bv("species"),qv=!1,Yv=Gv(Uv.PromiseRejectionEvent),Xv=zv("Promise",(function(){var t=Wv($v),r=t!==String($v);if(!r&&66===Jv)return!0;if(!Jv||Jv<51||!/native code/.test(t)){var e=new $v((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((e.constructor={})[Kv]=n,!(qv=e.then((function(){}))instanceof n))return!0}return!r&&(Hv||Vv)&&!Yv})),Qv={CONSTRUCTOR:Xv,REJECTION_EVENT:Yv,SUBCLASSING:qv},Zv={},tp=mt,rp=TypeError,ep=function(t){var r,e;this.promise=new t((function(t,n){if(void 0!==r||void 0!==e)throw new rp("Bad Promise constructor");r=t,e=n})),this.resolve=tp(r),this.reject=tp(e)};Zv.f=function(t){return new ep(t)};var np,op,ip,up=ro,cp=ul,ap=e,fp=f,sp=Xe,lp=dl,vp=bl,pp=xl,hp=mt,dp=G,gp=B,yp=xi,mp=function(t,r){var e,n=Rl(t).constructor;return void 0===n||Cl(e=Rl(n)[kl])?r:Al(e)},bp=cv.set,wp=Lv,Sp=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(e){}},Ep=Mv,Op=hv,xp=Pe,jp=Fv,Ip=Zv,Tp="Promise",Pp=Qv.CONSTRUCTOR,Rp=Qv.REJECTION_EVENT,Ap=Qv.SUBCLASSING,Cp=xp.getterFor(Tp),kp=xp.set,Np=jp&&jp.prototype,Lp=jp,Mp=Np,Fp=ap.TypeError,_p=ap.document,Dp=ap.process,Up=Ip.f,$p=Up,Gp=!!(_p&&_p.createEvent&&ap.dispatchEvent),zp="unhandledrejection",Wp=function(t){var r;return!(!gp(t)||!dp(r=t.then))&&r},Bp=function(t,r){var e,n,o,i=r.value,u=1===r.state,c=u?t.ok:t.fail,a=t.resolve,f=t.reject,s=t.domain;try{c?(u||(2===r.rejection&&qp(r),r.rejection=1),!0===c?e=i:(s&&s.enter(),e=c(i),s&&(s.exit(),o=!0)),e===t.promise?f(new Fp("Promise-chain cycle")):(n=Wp(e))?fp(n,e,a,f):a(e)):f(i)}catch(l){s&&!o&&s.exit(),f(l)}},Hp=function(t,r){t.notified||(t.notified=!0,wp((function(){for(var e,n=t.reactions;e=n.get();)Bp(e,t);t.notified=!1,r&&!t.rejection&&Jp(t)})))},Vp=function(t,r,e){var n,o;Gp?((n=_p.createEvent("Event")).promise=r,n.reason=e,n.initEvent(t,!1,!0),ap.dispatchEvent(n)):n={promise:r,reason:e},!Rp&&(o=ap["on"+t])?o(n):t===zp&&Sp("Unhandled promise rejection",e)},Jp=function(t){fp(bp,ap,(function(){var r,e=t.facade,n=t.value;if(Kp(t)&&(r=Ep((function(){cp?Dp.emit("unhandledRejection",n,e):Vp(zp,e,n)})),t.rejection=cp||Kp(t)?2:1,r.error))throw r.value}))},Kp=function(t){return 1!==t.rejection&&!t.parent},qp=function(t){fp(bp,ap,(function(){var r=t.facade;cp?Dp.emit("rejectionHandled",r):Vp("rejectionhandled",r,t.value)}))},Yp=function(t,r,e){return function(n){t(r,n,e)}},Xp=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=2,Hp(t,!0))},Qp=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new Fp("Promise can't be resolved itself");var n=Wp(r);n?wp((function(){var e={done:!1};try{fp(n,r,Yp(Qp,e,t),Yp(Xp,e,t))}catch(o){Xp(e,o,t)}})):(t.value=r,t.state=1,Hp(t,!1))}catch(o){Xp({done:!1},o,t)}}};if(Pp&&(Mp=(Lp=function(t){yp(this,Mp),hp(t),fp(np,this);var r=Cp(this);try{t(Yp(Qp,r),Yp(Xp,r))}catch(e){Xp(r,e)}}).prototype,(np=function(t){kp(this,{type:Tp,done:!1,notified:!1,parent:!1,reactions:new Op,rejection:!1,state:0,value:void 0})}).prototype=sp(Mp,"then",(function(t,r){var e=Cp(this),n=Up(mp(this,Lp));return e.parent=!0,n.ok=!dp(t)||t,n.fail=dp(r)&&r,n.domain=cp?Dp.domain:void 0,0===e.state?e.reactions.add(n):wp((function(){Bp(n,e)})),n.promise})),op=function(){var t=new np,r=Cp(t);this.promise=t,this.resolve=Yp(Qp,r),this.reject=Yp(Xp,r)},Ip.f=Up=function(t){return t===Lp||undefined===t?new op(t):$p(t)},dp(jp)&&Np!==Object.prototype)){ip=Np.then,Ap||sp(Np,"then",(function(t,r){var e=this;return new Lp((function(t,r){fp(ip,e,t,r)})).then(t,r)}),{unsafe:!0});try{delete Np.constructor}catch(ox){}lp&&lp(Np,Mp)}up({global:!0,constructor:!0,wrap:!0,forced:Pp},{Promise:Lp}),vp(Lp,Tp,!1),pp(Tp);var Zp=rr("iterator"),th=!1;try{var rh=0,eh={next:function(){return{done:!!rh++}},return:function(){th=!0}};eh[Zp]=function(){return this},Array.from(eh,(function(){throw 2}))}catch(ox){}var nh=function(t,r){try{if(!r&&!th)return!1}catch(ox){return!1}var e=!1;try{var n={};n[Zp]=function(){return{next:function(){return{done:e=!0}}}},t(n)}catch(ox){}return e},oh=Fv,ih=Qv.CONSTRUCTOR||!nh((function(t){oh.all(t).then(void 0,(function(){}))})),uh=f,ch=mt,ah=Zv,fh=Mv,sh=wc;ro({target:"Promise",stat:!0,forced:ih},{all:function(t){var r=this,e=ah.f(r),n=e.resolve,o=e.reject,i=fh((function(){var e=ch(r.resolve),i=[],u=0,c=1;sh(t,(function(t){var a=u++,f=!1;c++,uh(e,r,t).then((function(t){f||(f=!0,i[a]=t,--c||n(i))}),o)})),--c||n(i)}));return i.error&&o(i.value),e.promise}});var lh=ro,vh=Qv.CONSTRUCTOR,ph=Fv,hh=J,dh=G,gh=Xe,yh=ph&&ph.prototype;if(lh({target:"Promise",proto:!0,forced:vh,real:!0},{catch:function(t){return this.then(void 0,t)}}),dh(ph)){var mh=hh("Promise").prototype.catch;yh.catch!==mh&&gh(yh,"catch",mh,{unsafe:!0})}var bh=f,wh=mt,Sh=Zv,Eh=Mv,Oh=wc;ro({target:"Promise",stat:!0,forced:ih},{race:function(t){var r=this,e=Sh.f(r),n=e.reject,o=Eh((function(){var o=wh(r.resolve);Oh(t,(function(t){bh(o,r,t).then(e.resolve,n)}))}));return o.error&&n(o.value),e.promise}});var xh=f,jh=Zv;ro({target:"Promise",stat:!0,forced:Qv.CONSTRUCTOR},{reject:function(t){var r=jh.f(this);return xh(r.reject,void 0,t),r.promise}});var Ih=Nr,Th=B,Ph=Zv,Rh=ro,Ah=Qv.CONSTRUCTOR,Ch=function(t,r){if(Ih(t),Th(r)&&r.constructor===t)return r;var e=Ph.f(t);return(0,e.resolve)(r),e.promise};J("Promise"),Rh({target:"Promise",stat:!0,forced:Ah},{resolve:function(t){return Ch(this,t)}});var kh=ro,Nh=o,Lh=no,Mh=B,Fh=Dt,_h=vn,Dh=so,Uh=No,$h=Ts,Gh=Bf,zh=et,Wh=rr("isConcatSpreadable"),Bh=zh>=51||!Nh((function(){var t=[];return t[Wh]=!1,t.concat()[0]!==t})),Hh=function(t){if(!Mh(t))return!1;var r=t[Wh];return void 0!==r?!!r:Lh(t)};kh({target:"Array",proto:!0,arity:1,forced:!Bh||!Gh("concat")},{concat:function(t){var r,e,n,o,i,u=Fh(this),c=$h(u,0),a=0;for(r=-1,n=arguments.length;r<n;r++)if(Hh(i=-1===r?u:arguments[r]))for(o=_h(i),Dh(a+o),e=0;e<o;e++,a++)e in i&&Uh(c,a,i[e]);else Dh(a+1),Uh(c,a++,i);return c.length=a,c}});var Vh=f,Jh=Gt,Kh=K,qh=Rc,Yh=RegExp.prototype,Xh=te.PROPER,Qh=Xe,Zh=Nr,td=Ro,rd=o,ed=function(t){var r=t.flags;return void 0!==r||"flags"in Yh||Jh(t,"flags")||!Kh(Yh,t)?r:Vh(qh,t)},nd="toString",od=RegExp.prototype[nd],id=rd((function(){return"/a/b"!==od.call({source:"a",flags:"b"})})),ud=Xh&&od.name!==nd;(id||ud)&&Qh(RegExp.prototype,nd,(function(){var t=Zh(this);return"/"+td(t.source)+"/"+td(ed(t))}),{unsafe:!0});var cd=Ms.filter;ro({target:"Array",proto:!0,forced:!Bf("filter")},{filter:function(t){return cd(this,t,arguments.length>1?arguments[1]:void 0)}});var ad=Xe,fd=function(t,r,e){for(var n in r)ad(t,n,r[n],e);return t},sd=function(t,r){return{value:t,done:r}},ld=f,vd=au,pd=Jr,hd=fd,dd=Pe,gd=St,yd=yu.IteratorPrototype,md=sd,bd=uc,wd=rr("toStringTag"),Sd="IteratorHelper",Ed="WrapForValidIterator",Od=dd.set,xd=function(t){var r=dd.getterFor(t?Ed:Sd);return hd(vd(yd),{next:function(){var e=r(this);if(t)return e.nextHandler();try{var n=e.done?void 0:e.nextHandler();return md(n,e.done)}catch(ox){throw e.done=!0,ox}},return:function(){var e=r(this),n=e.iterator;if(e.done=!0,t){var o=gd(n,"return");return o?ld(o,n):md(void 0,!0)}if(e.inner)try{bd(e.inner.iterator,"normal")}catch(ox){return bd(n,"throw",ox)}return bd(n,"normal"),md(void 0,!0)}})},jd=xd(!0),Id=xd(!1);pd(Id,wd,"Iterator Helper");var Td=function(t,r){var e=function(e,n){n?(n.iterator=e.iterator,n.next=e.next):n=e,n.type=r?Ed:Sd,n.nextHandler=t,n.counter=0,n.done=!1,Od(this,n)};return e.prototype=r?jd:Id,e},Pd=Nr,Rd=uc,Ad=function(t,r,e,n){try{return n?r(Pd(e)[0],e[1]):r(e)}catch(ox){Rd(t,"throw",ox)}},Cd=ro,kd=f,Nd=mt,Ld=Nr,Md=Sc,Fd=Ad,_d=Td((function(){for(var t,r,e=this.iterator,n=this.predicate,o=this.next;;){if(t=Ld(kd(o,e)),this.done=!!t.done)return;if(r=t.value,Fd(e,n,[r,this.counter++],!0))return r}}));Cd({target:"Iterator",proto:!0,real:!0,forced:false},{filter:function(t){return Ld(this),Nd(t),new _d(Md(this),{predicate:t})}});var Dd=Pr.f,Ud=G,$d=B,Gd=dl,zd=function(t,r,e){var n,o;return Gd&&Ud(n=r.constructor)&&n!==e&&$d(o=n.prototype)&&o!==e.prototype&&Gd(t,o),t},Wd=Ro,Bd=B,Hd=Jr,Vd=Error,Jd=S("".replace),Kd=String(new Vd("zxcasd").stack),qd=/\n\s*at [^:]*:[^\n]*/,Yd=qd.test(Kd),Xd=g,Qd=!o((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Xd(1,7)),7!==t.stack)})),Zd=Jr,tg=function(t,r){if(Yd&&"string"==typeof t&&!Vd.prepareStackTrace)for(;r--;)t=Jd(t,qd,"");return t},rg=Qd,eg=Error.captureStackTrace,ng=J,og=Gt,ig=Jr,ug=K,cg=dl,ag=Dn,fg=function(t,r,e){e in t||Dd(t,e,{configurable:!0,get:function(){return r[e]},set:function(t){r[e]=t}})},sg=zd,lg=function(t,r){return void 0===t?arguments.length<2?"":r:Wd(t)},vg=function(t,r){Bd(r)&&"cause"in r&&Hd(t,"cause",r.cause)},pg=function(t,r,e,n){rg&&(eg?eg(t,r):Zd(t,"stack",tg(e,n)))},hg=i,dg=ro,gg=Sa,yg=function(t,r,e,n){var o="stackTraceLimit",i=n?2:1,u=t.split("."),c=u[u.length-1],a=ng.apply(null,u);if(a){var f=a.prototype;if(og(f,"cause")&&delete f.cause,!e)return a;var s=ng("Error"),l=r((function(t,r){var e=lg(n?r:t,void 0),o=n?new a(t):new a;return void 0!==e&&ig(o,"message",e),pg(o,l,o.stack,2),this&&ug(f,this)&&sg(o,this,l),arguments.length>i&&vg(o,arguments[i]),o}));l.prototype=f,"Error"!==c?cg?cg(l,s):ag(l,s,{name:!0}):hg&&o in a&&(fg(l,a,o),fg(l,a,"prepareStackTrace")),ag(l,a);try{f.name!==c&&ig(f,"name",c),f.constructor=l}catch(ox){}return l}},mg="WebAssembly",bg=e[mg],wg=7!==new Error("e",{cause:7}).cause,Sg=function(t,r){var e={};e[t]=yg(t,r,wg),dg({global:!0,constructor:!0,arity:1,forced:wg},e)},Eg=function(t,r){if(bg&&bg[t]){var e={};e[t]=yg(mg+"."+t,r,wg),dg({target:mg,stat:!0,constructor:!0,arity:1,forced:wg},e)}};Sg("Error",(function(t){return function(r){return gg(t,this,arguments)}})),Sg("EvalError",(function(t){return function(r){return gg(t,this,arguments)}})),Sg("RangeError",(function(t){return function(r){return gg(t,this,arguments)}})),Sg("ReferenceError",(function(t){return function(r){return gg(t,this,arguments)}})),Sg("SyntaxError",(function(t){return function(r){return gg(t,this,arguments)}})),Sg("TypeError",(function(t){return function(r){return gg(t,this,arguments)}})),Sg("URIError",(function(t){return function(r){return gg(t,this,arguments)}})),Eg("CompileError",(function(t){return function(r){return gg(t,this,arguments)}})),Eg("LinkError",(function(t){return function(r){return gg(t,this,arguments)}})),Eg("RuntimeError",(function(t){return function(r){return gg(t,this,arguments)}}));var Og={},xg=j,jg=_,Ig=Qe.f,Tg=Uo,Pg="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Og.f=function(t){return Pg&&"Window"===xg(t)?function(t){try{return Ig(t)}catch(ox){return Tg(Pg)}}(t):Ig(jg(t))};var Rg={},Ag=rr;Rg.f=Ag;var Cg=e,kg=Cg,Ng=Gt,Lg=Rg,Mg=Pr.f,Fg=function(t){var r=kg.Symbol||(kg.Symbol={});Ng(r,t)||Mg(r,t,{value:Lg.f(t)})},_g=f,Dg=J,Ug=rr,$g=Xe,Gg=function(){var t=Dg("Symbol"),r=t&&t.prototype,e=r&&r.valueOf,n=Ug("toPrimitive");r&&!r[n]&&$g(r,n,(function(t){return _g(e,this)}),{arity:1})},zg=ro,Wg=e,Bg=f,Hg=S,Vg=i,Jg=ut,Kg=o,qg=Gt,Yg=K,Xg=Nr,Qg=_,Zg=vr,ty=Ro,ry=g,ey=au,ny=_i,oy=Qe,iy=Og,uy=Tn,cy=n,ay=Pr,fy=Li,sy=s,ly=Xe,vy=Js,py=Mt,hy=he,dy=Vt,gy=rr,yy=Rg,my=Fg,by=Gg,wy=bl,Sy=Pe,Ey=Ms.forEach,Oy=pe("hidden"),xy="Symbol",jy="prototype",Iy=Sy.set,Ty=Sy.getterFor(xy),Py=Object[jy],Ry=Wg.Symbol,Ay=Ry&&Ry[jy],Cy=Wg.RangeError,ky=Wg.TypeError,Ny=Wg.QObject,Ly=cy.f,My=ay.f,Fy=iy.f,_y=sy.f,Dy=Hg([].push),Uy=py("symbols"),$y=py("op-symbols"),Gy=py("wks"),zy=!Ny||!Ny[jy]||!Ny[jy].findChild,Wy=function(t,r,e){var n=Ly(Py,r);n&&delete Py[r],My(t,r,e),n&&t!==Py&&My(Py,r,n)},By=Vg&&Kg((function(){return 7!==ey(My({},"a",{get:function(){return My(this,"a",{value:7}).a}})).a}))?Wy:My,Hy=function(t,r){var e=Uy[t]=ey(Ay);return Iy(e,{type:xy,tag:t,description:r}),Vg||(e.description=r),e},Vy=function(t,r,e){t===Py&&Vy($y,r,e),Xg(t);var n=Zg(r);return Xg(e),qg(Uy,n)?(e.enumerable?(qg(t,Oy)&&t[Oy][n]&&(t[Oy][n]=!1),e=ey(e,{enumerable:ry(0,!1)})):(qg(t,Oy)||My(t,Oy,ry(1,{})),t[Oy][n]=!0),By(t,n,e)):My(t,n,e)},Jy=function(t,r){Xg(t);var e=Qg(r),n=ny(e).concat(Xy(e));return Ey(n,(function(r){Vg&&!Bg(Ky,e,r)||Vy(t,r,e[r])})),t},Ky=function(t){var r=Zg(t),e=Bg(_y,this,r);return!(this===Py&&qg(Uy,r)&&!qg($y,r))&&(!(e||!qg(this,r)||!qg(Uy,r)||qg(this,Oy)&&this[Oy][r])||e)},qy=function(t,r){var e=Qg(t),n=Zg(r);if(e!==Py||!qg(Uy,n)||qg($y,n)){var o=Ly(e,n);return!o||!qg(Uy,n)||qg(e,Oy)&&e[Oy][n]||(o.enumerable=!0),o}},Yy=function(t){var r=Fy(Qg(t)),e=[];return Ey(r,(function(t){qg(Uy,t)||qg(hy,t)||Dy(e,t)})),e},Xy=function(t){var r=t===Py,e=Fy(r?$y:Qg(t)),n=[];return Ey(e,(function(t){!qg(Uy,t)||r&&!qg(Py,t)||Dy(n,Uy[t])})),n};Jg||(Ry=function(){if(Yg(Ay,this))throw new ky("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?ty(arguments[0]):void 0,r=dy(t),e=function(t){this===Py&&Bg(e,$y,t),qg(this,Oy)&&qg(this[Oy],r)&&(this[Oy][r]=!1);var n=ry(1,t);try{By(this,r,n)}catch(ox){if(!(ox instanceof Cy))throw ox;Wy(this,r,n)}};return Vg&&zy&&By(Py,r,{configurable:!0,set:e}),Hy(r,t)},ly(Ay=Ry[jy],"toString",(function(){return Ty(this).tag})),ly(Ry,"withoutSetter",(function(t){return Hy(dy(t),t)})),sy.f=Ky,ay.f=Vy,fy.f=Jy,cy.f=qy,oy.f=iy.f=Yy,uy.f=Xy,yy.f=function(t){return Hy(gy(t),t)},Vg&&(vy(Ay,"description",{configurable:!0,get:function(){return Ty(this).description}}),ly(Py,"propertyIsEnumerable",Ky,{unsafe:!0}))),zg({global:!0,constructor:!0,wrap:!0,forced:!Jg,sham:!Jg},{Symbol:Ry}),Ey(ny(Gy),(function(t){my(t)})),zg({target:xy,stat:!0,forced:!Jg},{useSetter:function(){zy=!0},useSimple:function(){zy=!1}}),zg({target:"Object",stat:!0,forced:!Jg,sham:!Vg},{create:function(t,r){return void 0===r?ey(t):Jy(ey(t),r)},defineProperty:Vy,defineProperties:Jy,getOwnPropertyDescriptor:qy}),zg({target:"Object",stat:!0,forced:!Jg},{getOwnPropertyNames:Yy}),by(),wy(Ry,xy),hy[Oy]=!0;var Qy=ut&&!!Symbol.for&&!!Symbol.keyFor,Zy=ro,tm=J,rm=Gt,em=Ro,nm=Mt,om=Qy,im=nm("string-to-symbol-registry"),um=nm("symbol-to-string-registry");Zy({target:"Symbol",stat:!0,forced:!om},{for:function(t){var r=em(t);if(rm(im,r))return im[r];var e=tm("Symbol")(r);return im[r]=e,um[e]=r,e}});var cm=ro,am=Gt,fm=vt,sm=ht,lm=Qy,vm=Mt("symbol-to-string-registry");cm({target:"Symbol",stat:!0,forced:!lm},{keyFor:function(t){if(!fm(t))throw new TypeError(sm(t)+" is not a symbol");if(am(vm,t))return vm[t]}});var pm=no,hm=G,dm=j,gm=Ro,ym=S([].push),mm=ro,bm=J,wm=Sa,Sm=f,Em=S,Om=o,xm=G,jm=vt,Im=Hf,Tm=function(t){if(hm(t))return t;if(pm(t)){for(var r=t.length,e=[],n=0;n<r;n++){var o=t[n];"string"==typeof o?ym(e,o):"number"!=typeof o&&"Number"!==dm(o)&&"String"!==dm(o)||ym(e,gm(o))}var i=e.length,u=!0;return function(t,r){if(u)return u=!1,r;if(pm(this))return r;for(var n=0;n<i;n++)if(e[n]===t)return r}}},Pm=ut,Rm=String,Am=bm("JSON","stringify"),Cm=Em(/./.exec),km=Em("".charAt),Nm=Em("".charCodeAt),Lm=Em("".replace),Mm=Em(1..toString),Fm=/[\uD800-\uDFFF]/g,_m=/^[\uD800-\uDBFF]$/,Dm=/^[\uDC00-\uDFFF]$/,Um=!Pm||Om((function(){var t=bm("Symbol")("stringify detection");return"[null]"!==Am([t])||"{}"!==Am({a:t})||"{}"!==Am(Object(t))})),$m=Om((function(){return'"\\udf06\\ud834"'!==Am("\udf06\ud834")||'"\\udead"'!==Am("\udead")})),Gm=function(t,r){var e=Im(arguments),n=Tm(r);if(xm(n)||void 0!==t&&!jm(t))return e[1]=function(t,r){if(xm(n)&&(r=Sm(n,this,Rm(t),r)),!jm(r))return r},wm(Am,null,e)},zm=function(t,r,e){var n=km(e,r-1),o=km(e,r+1);return Cm(_m,t)&&!Cm(Dm,o)||Cm(Dm,t)&&!Cm(_m,n)?"\\u"+Mm(Nm(t,0),16):t};Am&&mm({target:"JSON",stat:!0,arity:3,forced:Um||$m},{stringify:function(t,r,e){var n=Im(arguments),o=wm(Um?Gm:Am,null,n);return $m&&"string"==typeof o?Lm(o,Fm,zm):o}});var Wm=Tn,Bm=Dt;ro({target:"Object",stat:!0,forced:!ut||o((function(){Wm.f(1)}))},{getOwnPropertySymbols:function(t){var r=Wm.f;return r?r(Bm(t)):[]}});var Hm=ro,Vm=i,Jm=S,Km=Gt,qm=G,Ym=K,Xm=Ro,Qm=Js,Zm=Dn,tb=e.Symbol,rb=tb&&tb.prototype;if(Vm&&qm(tb)&&(!("description"in rb)||void 0!==tb().description)){var eb={},nb=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:Xm(arguments[0]),r=Ym(rb,this)?new tb(t):void 0===t?tb():tb(t);return""===t&&(eb[r]=!0),r};Zm(nb,tb),nb.prototype=rb,rb.constructor=nb;var ob="Symbol(description detection)"===String(tb("description detection")),ib=Jm(rb.valueOf),ub=Jm(rb.toString),cb=/^Symbol\((.*)\)[^)]+$/,ab=Jm("".replace),fb=Jm("".slice);Qm(rb,"description",{configurable:!0,get:function(){var t=ib(this);if(Km(eb,t))return"";var r=ub(t),e=ob?fb(r,7,-1):ab(r,cb,"$1");return""===e?void 0:e}}),Hm({global:!0,constructor:!0,forced:!0},{Symbol:nb})}var sb=f;ro({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return sb(URL.prototype.toString,this)}});var lb=Ms.map;ro({target:"Array",proto:!0,forced:!Bf("map")},{map:function(t){return lb(this,t,arguments.length>1?arguments[1]:void 0)}});var vb=f,pb=mt,hb=Nr,db=Sc,gb=Ad,yb=Td((function(){var t=this.iterator,r=hb(vb(this.next,t));if(!(this.done=!!r.done))return gb(t,this.mapper,[r.value,this.counter++],!0)}));ro({target:"Iterator",proto:!0,real:!0,forced:false},{map:function(t){return hb(this),pb(t),new yb(db(this),{mapper:t})}});var mb=rr,bb=au,wb=Pr.f,Sb=mb("unscopables"),Eb=Array.prototype;void 0===Eb[Sb]&&wb(Eb,Sb,{configurable:!0,value:bb(null)});var Ob=function(t){Eb[Sb][t]=!0},xb=yu.IteratorPrototype,jb=au,Ib=g,Tb=bl,Pb=Uu,Rb=function(){return this},Ab=ro,Cb=f,kb=G,Nb=function(t,r,e,n){var o=r+" Iterator";return t.prototype=jb(xb,{next:Ib(+!n,e)}),Tb(t,o,!1),Pb[o]=Rb,t},Lb=Ni,Mb=dl,Fb=bl,_b=Jr,Db=Xe,Ub=Uu,$b=te.PROPER,Gb=te.CONFIGURABLE,zb=yu.IteratorPrototype,Wb=yu.BUGGY_SAFARI_ITERATORS,Bb=rr("iterator"),Hb="keys",Vb="values",Jb="entries",Kb=function(){return this},qb=function(t,r,e,n,o,i,u){Nb(e,r,n);var c,a,f,s=function(t){if(t===o&&d)return d;if(!Wb&&t&&t in p)return p[t];switch(t){case Hb:case Vb:case Jb:return function(){return new e(this,t)}}return function(){return new e(this)}},l=r+" Iterator",v=!1,p=t.prototype,h=p[Bb]||p["@@iterator"]||o&&p[o],d=!Wb&&h||s(o),g="Array"===r&&p.entries||h;if(g&&(c=Lb(g.call(new t)))!==Object.prototype&&c.next&&(Lb(c)!==zb&&(Mb?Mb(c,zb):kb(c[Bb])||Db(c,Bb,Kb)),Fb(c,l,!0)),$b&&o===Vb&&h&&h.name!==Vb&&(Gb?_b(p,"name",Vb):(v=!0,d=function(){return Cb(h,this)})),o)if(a={values:s(Vb),keys:i?d:s(Hb),entries:s(Jb)},u)for(f in a)(Wb||v||!(f in p))&&Db(p,f,a[f]);else Ab({target:r,proto:!0,forced:Wb||v},a);return p[Bb]!==d&&Db(p,Bb,d,{name:o}),Ub[r]=d,a},Yb=_,Xb=Ob,Qb=Uu,Zb=Pe,tw=Pr.f,rw=qb,ew=sd,nw=i,ow="Array Iterator",iw=Zb.set,uw=Zb.getterFor(ow),cw=rw(Array,"Array",(function(t,r){iw(this,{type:ow,target:Yb(t),index:0,kind:r})}),(function(){var t=uw(this),r=t.target,e=t.kind,n=t.index++;if(!r||n>=r.length)return t.target=void 0,ew(void 0,!0);switch(e){case"keys":return ew(n,!1);case"values":return ew(r[n],!1)}return ew([n,r[n]],!1)}),"values"),aw=Qb.Arguments=Qb.Array;if(Xb("keys"),Xb("values"),Xb("entries"),nw&&"values"!==aw.name)try{tw(aw,"name",{value:"values"})}catch(ox){}var fw={exports:{}},sw=o((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),lw=o,vw=B,pw=j,hw=sw,dw=Object.isExtensible,gw=lw((function(){dw(1)}))||hw?function(t){return!!vw(t)&&((!hw||"ArrayBuffer"!==pw(t))&&(!dw||dw(t)))}:dw,yw=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),mw=ro,bw=S,ww=he,Sw=B,Ew=Gt,Ow=Pr.f,xw=Qe,jw=Og,Iw=gw,Tw=yw,Pw=!1,Rw=Vt("meta"),Aw=0,Cw=function(t){Ow(t,Rw,{value:{objectID:"O"+Aw++,weakData:{}}})},kw=fw.exports={enable:function(){kw.enable=function(){},Pw=!0;var t=xw.f,r=bw([].splice),e={};e[Rw]=1,t(e).length&&(xw.f=function(e){for(var n=t(e),o=0,i=n.length;o<i;o++)if(n[o]===Rw){r(n,o,1);break}return n},mw({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:jw.f}))},fastKey:function(t,r){if(!Sw(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Ew(t,Rw)){if(!Iw(t))return"F";if(!r)return"E";Cw(t)}return t[Rw].objectID},getWeakData:function(t,r){if(!Ew(t,Rw)){if(!Iw(t))return!0;if(!r)return!1;Cw(t)}return t[Rw].weakData},onFreeze:function(t){return Tw&&Pw&&Iw(t)&&!Ew(t,Rw)&&Cw(t),t}};ww[Rw]=!0;var Nw=fw.exports,Lw=ro,Mw=e,Fw=S,_w=Jn,Dw=Xe,Uw=Nw,$w=wc,Gw=xi,zw=G,Ww=C,Bw=B,Hw=o,Vw=nh,Jw=bl,Kw=zd,qw=au,Yw=Js,Xw=fd,Qw=Du,Zw=xi,tS=C,rS=wc,eS=qb,nS=sd,oS=xl,iS=i,uS=Nw.fastKey,cS=Pe.set,aS=Pe.getterFor,fS={getConstructor:function(t,r,e,n){var o=t((function(t,o){Zw(t,i),cS(t,{type:r,index:qw(null),first:void 0,last:void 0,size:0}),iS||(t.size=0),tS(o)||rS(o,t[n],{that:t,AS_ENTRIES:e})})),i=o.prototype,u=aS(r),c=function(t,r,e){var n,o,i=u(t),c=a(t,r);return c?c.value=e:(i.last=c={index:o=uS(r,!0),key:r,value:e,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=c),n&&(n.next=c),iS?i.size++:t.size++,"F"!==o&&(i.index[o]=c)),t},a=function(t,r){var e,n=u(t),o=uS(r);if("F"!==o)return n.index[o];for(e=n.first;e;e=e.next)if(e.key===r)return e};return Xw(i,{clear:function(){for(var t=u(this),r=t.index,e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=void 0),delete r[e.index],e=e.next;t.first=t.last=void 0,iS?t.size=0:this.size=0},delete:function(t){var r=this,e=u(r),n=a(r,t);if(n){var o=n.next,i=n.previous;delete e.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),e.first===n&&(e.first=o),e.last===n&&(e.last=i),iS?e.size--:r.size--}return!!n},forEach:function(t){for(var r,e=u(this),n=Qw(t,arguments.length>1?arguments[1]:void 0);r=r?r.next:e.first;)for(n(r.value,r.key,this);r&&r.removed;)r=r.previous},has:function(t){return!!a(this,t)}}),Xw(i,e?{get:function(t){var r=a(this,t);return r&&r.value},set:function(t,r){return c(this,0===t?0:t,r)}}:{add:function(t){return c(this,t=0===t?0:t,t)}}),iS&&Yw(i,"size",{configurable:!0,get:function(){return u(this).size}}),o},setStrong:function(t,r,e){var n=r+" Iterator",o=aS(r),i=aS(n);eS(t,r,(function(t,r){cS(this,{type:n,target:t,state:o(t),kind:r,last:void 0})}),(function(){for(var t=i(this),r=t.kind,e=t.last;e&&e.removed;)e=e.previous;return t.target&&(t.last=e=e?e.next:t.state.first)?nS("keys"===r?e.key:"values"===r?e.value:[e.key,e.value],!1):(t.target=void 0,nS(void 0,!0))}),e?"entries":"values",!e,!0),oS(r)}};(function(t,r,e){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",u=Mw[t],c=u&&u.prototype,a=u,f={},s=function(t){var r=Fw(c[t]);Dw(c,t,"add"===t?function(t){return r(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!Bw(t))&&r(this,0===t?0:t)}:"get"===t?function(t){return o&&!Bw(t)?void 0:r(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!Bw(t))&&r(this,0===t?0:t)}:function(t,e){return r(this,0===t?0:t,e),this})};if(_w(t,!zw(u)||!(o||c.forEach&&!Hw((function(){(new u).entries().next()})))))a=e.getConstructor(r,t,n,i),Uw.enable();else if(_w(t,!0)){var l=new a,v=l[i](o?{}:-0,1)!==l,p=Hw((function(){l.has(1)})),h=Vw((function(t){new u(t)})),d=!o&&Hw((function(){for(var t=new u,r=5;r--;)t[i](r,r);return!t.has(-0)}));h||((a=r((function(t,r){Gw(t,c);var e=Kw(new u,t,a);return Ww(r)||$w(r,e[i],{that:e,AS_ENTRIES:n}),e}))).prototype=c,c.constructor=a),(p||d)&&(s("delete"),s("has"),n&&s("get")),(d||v)&&s(i),o&&c.clear&&delete c.clear}f[t]=a,Lw({global:!0,constructor:!0,forced:a!==u},f),Jw(a,t),o||e.setStrong(a,t,n)})("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),fS);var sS=Da.charAt,lS=Ro,vS=Pe,pS=qb,hS=sd,dS="String Iterator",gS=vS.set,yS=vS.getterFor(dS);pS(String,"String",(function(t){gS(this,{type:dS,string:lS(t),index:0})}),(function(){var t,r=yS(this),e=r.string,n=r.index;return n>=e.length?hS(void 0,!0):(t=sS(e,n),r.index+=t.length,hS(t,!1))}));var mS=e,bS=ys,wS=ws,SS=cw,ES=Jr,OS=rr,xS=OS("iterator"),jS=OS("toStringTag"),IS=SS.values,TS=function(t,r){if(t){if(t[xS]!==IS)try{ES(t,xS,IS)}catch(ox){t[xS]=IS}if(t[jS]||ES(t,jS,r),bS[r])for(var e in SS)if(t[e]!==SS[e])try{ES(t,e,SS[e])}catch(ox){t[e]=SS[e]}}};for(var PS in bS)TS(mS[PS]&&mS[PS].prototype,PS);TS(wS,"DOMTokenList");var RS,AS=B,CS=j,kS=rr("match"),NS=function(t){var r;return AS(t)&&(void 0!==(r=t[kS])?!!r:"RegExp"===CS(t))},LS=TypeError,MS=rr("match"),FS=ro,_S=Lu,DS=n.f,US=sn,$S=Ro,GS=function(t){if(NS(t))throw new LS("The method doesn't accept regular expressions");return t},zS=L,WS=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[MS]=!1,"/./"[t](r)}catch(n){}}return!1},BS=_S("".startsWith),HS=_S("".slice),VS=Math.min,JS=WS("startsWith");FS({target:"String",proto:!0,forced:!!(JS||(RS=DS(String.prototype,"startsWith"),!RS||RS.writable))&&!JS},{startsWith:function(t){var r=$S(zS(this));GS(t);var e=US(VS(arguments.length>1?arguments[1]:void 0,r.length)),n=$S(t);return BS?BS(r,n,e):HS(r,e,e+n.length)===n}});var KS=Dt,qS=_i;ro({target:"Object",stat:!0,forced:o((function(){qS(1)}))},{keys:function(t){return qS(KS(t))}});var YS=i,XS=S,QS=f,ZS=o,tE=_i,rE=Tn,eE=s,nE=Dt,oE=A,iE=Object.assign,uE=Object.defineProperty,cE=XS([].concat),aE=!iE||ZS((function(){if(YS&&1!==iE({b:1},iE(uE({},"a",{enumerable:!0,get:function(){uE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},e=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[e]=7,n.split("").forEach((function(t){r[t]=t})),7!==iE({},t)[e]||tE(iE({},r)).join("")!==n}))?function(t,r){for(var e=nE(t),n=arguments.length,o=1,i=rE.f,u=eE.f;n>o;)for(var c,a=oE(arguments[o++]),f=i?cE(tE(a),i(a)):tE(a),s=f.length,l=0;s>l;)c=f[l++],YS&&!QS(u,a,c)||(e[c]=a[c]);return e}:iE,fE=aE;ro({target:"Object",stat:!0,arity:2,forced:Object.assign!==fE},{assign:fE});var sE=ro,lE=Ms.find,vE=Ob,pE="find",hE=!0;pE in[]&&Array(1)[pE]((function(){hE=!1})),sE({target:"Array",proto:!0,forced:hE},{find:function(t){return lE(this,t,arguments.length>1?arguments[1]:void 0)}}),vE(pE);var dE=wc,gE=mt,yE=Nr,mE=Sc;ro({target:"Iterator",proto:!0,real:!0},{find:function(t){yE(this),gE(t);var r=mE(this),e=0;return dE(r,(function(r,n){if(t(r,e++))return n(r)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}});var bE=ro,wE=Ms.findIndex,SE=Ob,EE="findIndex",OE=!0;EE in[]&&Array(1)[EE]((function(){OE=!1})),bE({target:"Array",proto:!0,forced:OE},{findIndex:function(t){return wE(this,t,arguments.length>1?arguments[1]:void 0)}}),SE(EE);var xE=Gg;Fg("toPrimitive"),xE();var jE=Nr,IE=It,TE=TypeError,PE=Gt,RE=Xe,AE=function(t){if(jE(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new TE("Incorrect hint");return IE(this,t)},CE=rr("toPrimitive"),kE=Date.prototype;PE(kE,CE)||RE(kE,CE,AE);var NE=S(1..valueOf),LE=L,ME=Ro,FE="\t\n\v\f\r \u2028\u2029\ufeff",_E=S("".replace),DE=RegExp("^["+FE+"]+"),UE=RegExp("(^|[^"+FE+"])["+FE+"]+$"),$E=function(t){return function(r){var e=ME(LE(r));return 1&t&&(e=_E(e,DE,"")),2&t&&(e=_E(e,UE,"$1")),e}},GE={start:$E(1),end:$E(2),trim:$E(3)},zE=ro,WE=i,BE=e,HE=Cg,VE=S,JE=Jn,KE=Gt,qE=zd,YE=K,XE=vt,QE=fr,ZE=o,tO=Qe.f,rO=n.f,eO=Pr.f,nO=NE,oO=GE.trim,iO="Number",uO=BE[iO];HE[iO];var cO=uO.prototype,aO=BE.TypeError,fO=VE("".slice),sO=VE("".charCodeAt),lO=function(t){var r,e,n,o,i,u,c,a,f=QE(t,"number");if(XE(f))throw new aO("Cannot convert a Symbol value to a number");if("string"==typeof f&&f.length>2)if(f=oO(f),43===(r=sO(f,0))||45===r){if(88===(e=sO(f,2))||120===e)return NaN}else if(48===r){switch(sO(f,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+f}for(u=(i=fO(f,2)).length,c=0;c<u;c++)if((a=sO(i,c))<48||a>o)return NaN;return parseInt(i,n)}return+f},vO=JE(iO,!uO(" 0o1")||!uO("0b1")||uO("+0x1")),pO=function(t){var r,e=arguments.length<1?0:uO(function(t){var r=QE(t,"number");return"bigint"==typeof r?r:lO(r)}(t));return YE(cO,r=this)&&ZE((function(){nO(r)}))?qE(Object(e),this,pO):e};pO.prototype=cO,vO&&(cO.constructor=pO),zE({global:!0,constructor:!0,wrap:!0,forced:vO},{Number:pO});vO&&function(t,r){for(var e,n=WE?tO(r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)KE(r,e=n[o])&&!KE(t,e)&&eO(t,e,rO(r,e))}(HE[iO],uO),Fg("iterator"),Fg("asyncIterator");var hO=J,dO=bl;Fg("toStringTag"),dO(hO("Symbol"),"Symbol"),bl(e.JSON,"JSON",!0),bl(Math,"Math",!0);var gO=Dt,yO=Ni,mO=ji;ro({target:"Object",stat:!0,forced:o((function(){yO(1)})),sham:!mO},{getPrototypeOf:function(t){return yO(gO(t))}});var bO=e,wO=bl;ro({global:!0},{Reflect:{}}),wO(bO.Reflect,"Reflect",!0);var SO=S,EO=mt,OO=B,xO=Gt,jO=Hf,IO=u,TO=Function,PO=SO([].concat),RO=SO([].join),AO={},CO=IO?TO.bind:function(t){var r=EO(this),e=r.prototype,n=jO(arguments,1),o=function(){var e=PO(n,jO(arguments));return this instanceof o?function(t,r,e){if(!xO(AO,r)){for(var n=[],o=0;o<r;o++)n[o]="a["+o+"]";AO[r]=TO("C,a","return new C("+RO(n,",")+")")}return AO[r](t,e)}(r,e.length,e):r.apply(t,e)};return OO(e)&&(o.prototype=e),o},kO=ro,NO=Sa,LO=CO,MO=Pl,FO=Nr,_O=B,DO=au,UO=o,$O=J("Reflect","construct"),GO=Object.prototype,zO=[].push,WO=UO((function(){function t(){}return!($O((function(){}),[],t)instanceof t)})),BO=!UO((function(){$O((function(){}))})),HO=WO||BO;kO({target:"Reflect",stat:!0,forced:HO,sham:HO},{construct:function(t,r){MO(t),FO(r);var e=arguments.length<3?t:MO(arguments[2]);if(BO&&!WO)return $O(t,r,e);if(t===e){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var n=[null];return NO(zO,n,r),new(NO(LO,t,n))}var o=e.prototype,i=DO(_O(o)?o:GO),u=NO(t,i,r);return _O(u)?u:i}});var VO=Du,JO=f,KO=Dt,qO=Ad,YO=Wu,XO=$f,QO=vn,ZO=No,tx=ec,rx=qu,ex=Array,nx=function(t){var r=KO(t),e=XO(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=VO(o,n>2?arguments[2]:void 0));var u,c,a,f,s,l,v=rx(r),p=0;if(!v||this===ex&&YO(v))for(u=QO(r),c=e?new this(u):ex(u);u>p;p++)l=i?o(r[p],p):r[p],ZO(c,p,l);else for(s=(f=tx(r,v)).next,c=e?new this:[];!(a=JO(s,f)).done;p++)l=i?qO(f,o,[a.value,p],!0):a.value,ZO(c,p,l);return c.length=p,c};ro({target:"Array",stat:!0,forced:!nh((function(t){Array.from(t)}))},{from:nx}),function(){function r(t,r){return(r||"")+" (SystemJS https://github.com/systemjs/systemjs/blob/main/docs/errors.md#"+t+")"}function e(t,r){if(-1!==t.indexOf("\\")&&(t=t.replace(x,"/")),"/"===t[0]&&"/"===t[1])return r.slice(0,r.indexOf(":")+1)+t;if("."===t[0]&&("/"===t[1]||"."===t[1]&&("/"===t[2]||2===t.length&&(t+="/"))||1===t.length&&(t+="/"))||"/"===t[0]){var e,n=r.slice(0,r.indexOf(":")+1);if(e="/"===r[n.length+1]?"file:"!==n?(e=r.slice(n.length+2)).slice(e.indexOf("/")+1):r.slice(8):r.slice(n.length+("/"===r[n.length])),"/"===t[0])return r.slice(0,r.length-e.length-1)+t;for(var o=e.slice(0,e.lastIndexOf("/")+1)+t,i=[],u=-1,c=0;c<o.length;c++)-1!==u?"/"===o[c]&&(i.push(o.slice(u,c+1)),u=-1):"."===o[c]?"."!==o[c+1]||"/"!==o[c+2]&&c+2!==o.length?"/"===o[c+1]||c+1===o.length?c+=1:u=c:(i.pop(),c+=2):u=c;return-1!==u&&i.push(o.slice(u)),r.slice(0,r.length-e.length)+i.join("")}}function n(t,r){return e(t,r)||(-1!==t.indexOf(":")?t:e("./"+t,r))}function o(t,r,n,o,i){for(var u in t){var c=e(u,n)||u,s=t[u];if("string"==typeof s){var l=f(o,e(s,n)||s,i);l?r[c]=l:a("W1",u,s)}}}function i(t,r,e){var i;for(i in t.imports&&o(t.imports,e.imports,r,e,null),t.scopes||{}){var u=n(i,r);o(t.scopes[i],e.scopes[u]||(e.scopes[u]={}),r,e,u)}for(i in t.depcache||{})e.depcache[n(i,r)]=t.depcache[i];for(i in t.integrity||{})e.integrity[n(i,r)]=t.integrity[i]}function u(t,r){if(r[t])return t;var e=t.length;do{var n=t.slice(0,e+1);if(n in r)return n}while(-1!==(e=t.lastIndexOf("/",e-1)))}function c(t,r){var e=u(t,r);if(e){var n=r[e];if(null===n)return;if(!(t.length>e.length&&"/"!==n[n.length-1]))return n+t.slice(e.length);a("W2",e,n)}}function a(t,e,n){console.warn(r(t,[n,e].join(", ")))}function f(t,r,e){for(var n=t.scopes,o=e&&u(e,n);o;){var i=c(r,n[o]);if(i)return i;o=u(o.slice(0,o.lastIndexOf("/")),n)}return c(r,t.imports)||-1!==r.indexOf(":")&&r}function s(){this[I]={}}function l(t,e,n,o){var i=t[I][e];if(i)return i;var u=[],c=Object.create(null);j&&Object.defineProperty(c,j,{value:"Module"});var a=Promise.resolve().then((function(){return t.instantiate(e,n,o)})).then((function(n){if(!n)throw Error(r(2,e));var o=n[1]((function(t,r){i.h=!0;var e=!1;if("string"==typeof t)t in c&&c[t]===r||(c[t]=r,e=!0);else{for(var n in t)r=t[n],n in c&&c[n]===r||(c[n]=r,e=!0);t&&t.__esModule&&(c.__esModule=t.__esModule)}if(e)for(var o=0;o<u.length;o++){var a=u[o];a&&a(c)}return r}),2===n[1].length?{import:function(r,n){return t.import(r,e,n)},meta:t.createContext(e)}:void 0);return i.e=o.execute||function(){},[n[0],o.setters||[],n[2]||[]]}),(function(t){throw i.e=null,i.er=t,t})),f=a.then((function(r){return Promise.all(r[0].map((function(n,o){var i=r[1][o],u=r[2][o];return Promise.resolve(t.resolve(n,e)).then((function(r){var n=l(t,r,e,u);return Promise.resolve(n.I).then((function(){return i&&(n.i.push(i),!n.h&&n.I||i(n.n)),n}))}))}))).then((function(t){i.d=t}))}));return i=t[I][e]={id:e,i:u,n:c,m:o,I:a,L:f,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0,p:void 0}}function v(t,r,e,n){if(!n[r.id])return n[r.id]=!0,Promise.resolve(r.L).then((function(){return r.p&&null!==r.p.e||(r.p=e),Promise.all(r.d.map((function(r){return v(t,r,e,n)})))})).catch((function(t){if(r.er)throw t;throw r.e=null,t}))}function p(t,r){return r.C=v(t,r,r,{}).then((function(){return h(t,r,{})})).then((function(){return r.n}))}function h(t,r,e){function n(){try{var t=i.call(P);if(t)return t=t.then((function(){r.C=r.n,r.E=null}),(function(t){throw r.er=t,r.E=null,t})),r.E=t;r.C=r.n,r.L=r.I=void 0}catch(e){throw r.er=e,e}}if(!e[r.id]){if(e[r.id]=!0,!r.e){if(r.er)throw r.er;return r.E?r.E:void 0}var o,i=r.e;return r.e=null,r.d.forEach((function(n){try{var i=h(t,n,e);i&&(o=o||[]).push(i)}catch(c){throw r.er=c,c}})),o?Promise.all(o).then(n):n()}}function d(){[].forEach.call(document.querySelectorAll("script"),(function(t){if(!t.sp)if("systemjs-module"===t.type){if(t.sp=!0,!t.src)return;System.import("import:"===t.src.slice(0,7)?t.src.slice(7):n(t.src,g)).catch((function(r){if(r.message.indexOf("https://github.com/systemjs/systemjs/blob/main/docs/errors.md#3")>-1){var e=document.createEvent("Event");e.initEvent("error",!1,!1),t.dispatchEvent(e)}return Promise.reject(r)}))}else if("systemjs-importmap"===t.type){t.sp=!0;var e=t.src?(System.fetch||fetch)(t.src,{integrity:t.integrity,passThrough:!0}).then((function(t){if(!t.ok)throw Error(t.status);return t.text()})).catch((function(e){return e.message=r("W4",t.src)+"\n"+e.message,console.warn(e),"function"==typeof t.onerror&&t.onerror(),"{}"})):t.innerHTML;C=C.then((function(){return e})).then((function(e){!function(t,e,n){var o={};try{o=JSON.parse(e)}catch(c){console.warn(Error(r("W5")))}i(o,n,t)}(k,e,t.src||g)}))}}))}var g,y="undefined"!=typeof Symbol,m="undefined"!=typeof self,b="undefined"!=typeof document,w=m?self:t;if(b){var S=document.querySelector("base[href]");S&&(g=S.href)}if(!g&&"undefined"!=typeof location){var E=(g=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==E&&(g=g.slice(0,E+1))}var O,x=/\\/g,j=y&&Symbol.toStringTag,I=y?Symbol():"@",T=s.prototype;T.import=function(t,r,e){var n=this;return r&&"object"==typeof r&&(e=r,r=void 0),Promise.resolve(n.prepareImport()).then((function(){return n.resolve(t,r,e)})).then((function(t){var r=l(n,t,void 0,e);return r.C||p(n,r)}))},T.createContext=function(t){var r=this;return{url:t,resolve:function(e,n){return Promise.resolve(r.resolve(e,n||t))}}},T.register=function(t,r,e){O=[t,r,e]},T.getRegister=function(){var t=O;return O=void 0,t};var P=Object.freeze(Object.create(null));w.System=new s;var R,A,C=Promise.resolve(),k={imports:{},scopes:{},depcache:{},integrity:{}},N=b;if(T.prepareImport=function(t){return(N||t)&&(d(),N=!1),C},b&&(d(),window.addEventListener("DOMContentLoaded",d)),T.addImportMap=function(t,r){i(t,r||g,k)},b){window.addEventListener("error",(function(t){M=t.filename,F=t.error}));var L=location.origin}T.createScript=function(t){var r=document.createElement("script");r.async=!0,t.indexOf(L+"/")&&(r.crossOrigin="anonymous");var e=k.integrity[t];return e&&(r.integrity=e),r.src=t,r};var M,F,_={},D=T.register;T.register=function(t,r){if(b&&"loading"===document.readyState&&"string"!=typeof t){var e=document.querySelectorAll("script[src]"),n=e[e.length-1];if(n){R=t;var o=this;A=setTimeout((function(){_[n.src]=[t,r],o.import(n.src)}))}}else R=void 0;return D.call(this,t,r)},T.instantiate=function(t,e){var n=_[t];if(n)return delete _[t],n;var o=this;return Promise.resolve(T.createScript(t)).then((function(n){return new Promise((function(i,u){n.addEventListener("error",(function(){u(Error(r(3,[t,e].join(", "))))})),n.addEventListener("load",(function(){if(document.head.removeChild(n),M===t)u(F);else{var r=o.getRegister(t);r&&r[0]===R&&clearTimeout(A),i(r)}})),document.head.appendChild(n)}))}))},T.shouldFetch=function(){return!1},"undefined"!=typeof fetch&&(T.fetch=fetch);var U=T.instantiate,$=/^(text|application)\/(x-)?javascript(;|$)/;T.instantiate=function(t,e,n){var o=this;return this.shouldFetch(t,e,n)?this.fetch(t,{credentials:"same-origin",integrity:k.integrity[t],meta:n}).then((function(n){if(!n.ok)throw Error(r(7,[n.status,n.statusText,t,e].join(", ")));var i=n.headers.get("content-type");if(!i||!$.test(i))throw Error(r(4,i));return n.text().then((function(r){return r.indexOf("//# sourceURL=")<0&&(r+="\n//# sourceURL="+t),(0,eval)(r),o.getRegister(t)}))})):U.apply(this,arguments)},T.resolve=function(t,n){return f(k,e(t,n=n||g)||t,n)||function(t,e){throw Error(r(8,[t,e].join(", ")))}(t,n)};var G=T.instantiate;T.instantiate=function(t,r,e){var n=k.depcache[t];if(n)for(var o=0;o<n.length;o++)l(this,this.resolve(n[o],t),t);return G.call(this,t,r,e)},m&&"function"==typeof importScripts&&(T.instantiate=function(t){var r=this;return Promise.resolve().then((function(){return importScripts(t),r.getRegister(t)}))})}()}();
|
package/dist/style.css
ADDED
|
@@ -0,0 +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-header{display:flex}.ibiz-markdown-message-header__caption{flex-grow:1;padding:6px;font-size:14px;font-weight:800;color:var(--ibiz-ai-chat-color)}.ibiz-markdown-message-footer{display:flex;justify-content:flex-end}.ibiz-markdown-message-footer-wrapper{display:flex;gap:6px;align-items:center;padding:6px;color:var(--ibiz-ai-chat-color)}.ibiz-markdown-message-footer{margin-top:6px}.ibiz-markdown-message-footer__action-item{padding:6px;font-size:12px;border:1px solid var(--ibiz-ai-chat-border-color);border-radius:15px}.ibiz-markdown-message-footer__action-item:hover{color:var(--ibiz-ai-chat-hover-color);cursor:pointer;background-color:var(--ibiz-ai-chat-hover-background-color)}.ibiz-markdown-message-footer__action-item.is-disabled{color:var(--ibiz-ai-chat-disabled-color);pointer-events:none}.ibiz-markdown-message-footer__action-item.is-loading{pointer-events:none;animation:loading-change .8s infinite}.ibiz-user-message{padding:6px 10px;text-align:right}.ibiz-user-message__content{padding:6px;color:#fff;background:linear-gradient(to right,#009fff,#ec2f4b);border-radius:var(--ibiz-ai-chat-border-radius)}.ibiz-error-message{padding:6px 10px;text-align:right}.ibiz-error-message__content{padding:6px;color:#fff;background-color:red;border-radius:var(--ibiz-ai-chat-border-radius)}.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:36px;border-bottom:1px solid var(--ibiz-ai-chat-border-color)}.ibiz-chat-container-header-caption{padding:0 6px;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)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function App(): import("preact").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Component } from 'preact';
|
|
2
|
+
import { Namespace } from '../../utils';
|
|
3
|
+
import { AiChatController } from '../../controller';
|
|
4
|
+
export interface ChatContainerProps {
|
|
5
|
+
/**
|
|
6
|
+
* 单实例聊天总控
|
|
7
|
+
*
|
|
8
|
+
* @author chitanda
|
|
9
|
+
* @date 2023-10-13 17:10:43
|
|
10
|
+
* @type {AiChatController}
|
|
11
|
+
*/
|
|
12
|
+
controller: AiChatController;
|
|
13
|
+
/**
|
|
14
|
+
* 关闭聊天窗口
|
|
15
|
+
*
|
|
16
|
+
* @author chitanda
|
|
17
|
+
* @date 2023-10-15 19:10:35
|
|
18
|
+
*/
|
|
19
|
+
close: () => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 聊天窗口容器,可拖拽,可缩放
|
|
23
|
+
*
|
|
24
|
+
* @author chitanda
|
|
25
|
+
* @date 2023-10-13 17:10:37
|
|
26
|
+
* @export
|
|
27
|
+
* @class ChatContainer
|
|
28
|
+
* @extends {Component<ChatContainerProps>}
|
|
29
|
+
*/
|
|
30
|
+
export declare class ChatContainer extends Component<ChatContainerProps> {
|
|
31
|
+
ns: Namespace;
|
|
32
|
+
containerRef: import("preact").RefObject<HTMLDivElement>;
|
|
33
|
+
dragHandle: import("preact").RefObject<HTMLDivElement>;
|
|
34
|
+
data: {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
minWidth: number;
|
|
40
|
+
minHeight: number;
|
|
41
|
+
};
|
|
42
|
+
calcStyle(): {
|
|
43
|
+
left: string;
|
|
44
|
+
top: string;
|
|
45
|
+
height: string;
|
|
46
|
+
width: string;
|
|
47
|
+
'z-index': string;
|
|
48
|
+
};
|
|
49
|
+
setStyle(): void;
|
|
50
|
+
componentDidMount(): void;
|
|
51
|
+
/**
|
|
52
|
+
* 关闭聊天窗口
|
|
53
|
+
*
|
|
54
|
+
* @author chitanda
|
|
55
|
+
* @date 2023-10-15 19:10:31
|
|
56
|
+
*/
|
|
57
|
+
close(): void;
|
|
58
|
+
render(): import("preact").JSX.Element;
|
|
59
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AiChatController } from '../../controller';
|
|
2
|
+
export interface ChatInputProps {
|
|
3
|
+
/**
|
|
4
|
+
* 单实例聊天总控
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2023-10-13 17:10:43
|
|
8
|
+
* @type {AiChatController}
|
|
9
|
+
*/
|
|
10
|
+
controller: AiChatController;
|
|
11
|
+
}
|
|
12
|
+
export declare const ChatInput: (props: ChatInputProps) => import("preact/compat").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import { IChatMessage } from '../../interface';
|
|
3
|
+
import { AiChatController } from '../../controller';
|
|
4
|
+
export interface ChatMessageItemProps {
|
|
5
|
+
/**
|
|
6
|
+
* 单实例聊天总控
|
|
7
|
+
*
|
|
8
|
+
* @author chitanda
|
|
9
|
+
* @date 2023-10-13 17:10:43
|
|
10
|
+
* @type {AiChatController}
|
|
11
|
+
*/
|
|
12
|
+
controller: AiChatController;
|
|
13
|
+
message: IChatMessage;
|
|
14
|
+
/**
|
|
15
|
+
* 内容大小,用于更新绘制
|
|
16
|
+
*
|
|
17
|
+
* @author chitanda
|
|
18
|
+
* @date 2023-10-15 21:10:22
|
|
19
|
+
* @type {number}
|
|
20
|
+
*/
|
|
21
|
+
size: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const ChatMessageItem: (props: ChatMessageItemProps) => h.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IChatMessage } from '../../../interface';
|
|
2
|
+
export interface ErrorMessageProps {
|
|
3
|
+
message: IChatMessage;
|
|
4
|
+
/**
|
|
5
|
+
* 内容大小,用于更新绘制
|
|
6
|
+
*
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2023-10-15 21:10:22
|
|
9
|
+
* @type {number}
|
|
10
|
+
*/
|
|
11
|
+
size: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const ErrorMessage: (props: ErrorMessageProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IChatMessage } from '../../../interface';
|
|
2
|
+
import { AiChatController } from '../../../controller';
|
|
3
|
+
export interface MarkdownMessageProps {
|
|
4
|
+
/**
|
|
5
|
+
* 单实例聊天总控
|
|
6
|
+
*
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2023-10-13 17:10:43
|
|
9
|
+
* @type {AiChatController}
|
|
10
|
+
*/
|
|
11
|
+
controller: AiChatController;
|
|
12
|
+
message: IChatMessage;
|
|
13
|
+
/**
|
|
14
|
+
* 内容大小,用于更新绘制
|
|
15
|
+
*
|
|
16
|
+
* @author chitanda
|
|
17
|
+
* @date 2023-10-15 21:10:22
|
|
18
|
+
* @type {number}
|
|
19
|
+
*/
|
|
20
|
+
size: number;
|
|
21
|
+
}
|
|
22
|
+
export declare const MarkdownMessage: (props: MarkdownMessageProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IChatMessage } from '../../../interface';
|
|
2
|
+
export interface UnknownMessageProps {
|
|
3
|
+
message: IChatMessage;
|
|
4
|
+
/**
|
|
5
|
+
* 内容大小,用于更新绘制
|
|
6
|
+
*
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2023-10-15 21:10:22
|
|
9
|
+
* @type {number}
|
|
10
|
+
*/
|
|
11
|
+
size: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const UnknownMessage: (props: UnknownMessageProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IChatMessage } from '../../../interface';
|
|
2
|
+
export interface UserMessageProps {
|
|
3
|
+
message: IChatMessage;
|
|
4
|
+
/**
|
|
5
|
+
* 内容大小,用于更新绘制
|
|
6
|
+
*
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2023-10-15 21:10:22
|
|
9
|
+
* @type {number}
|
|
10
|
+
*/
|
|
11
|
+
size: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const UserMessage: (props: UserMessageProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AiChatController } from '../../controller';
|
|
2
|
+
export interface ChatMessageProps {
|
|
3
|
+
/**
|
|
4
|
+
* 单实例聊天总控
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2023-10-13 17:10:43
|
|
8
|
+
* @type {AiChatController}
|
|
9
|
+
*/
|
|
10
|
+
controller: AiChatController;
|
|
11
|
+
}
|
|
12
|
+
export declare const ChatMessages: (props: ChatMessageProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChatContainer } from './chat-container/chat-container';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Signal } from '@preact/signals';
|
|
2
|
+
import { ChatMessage } from '../../entity';
|
|
3
|
+
import { IChatMessage, IChatOptions } from '../../interface';
|
|
4
|
+
/**
|
|
5
|
+
* 聊天逻辑控制器
|
|
6
|
+
*
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2023-10-09 15:10:51
|
|
9
|
+
* @export
|
|
10
|
+
* @class AiChatController
|
|
11
|
+
*/
|
|
12
|
+
export declare class AiChatController {
|
|
13
|
+
readonly opts: IChatOptions;
|
|
14
|
+
/**
|
|
15
|
+
* 聊天记录
|
|
16
|
+
*
|
|
17
|
+
* @author chitanda
|
|
18
|
+
* @date 2023-10-16 16:10:29
|
|
19
|
+
* @type {Signal<ChatMessage[]>}
|
|
20
|
+
*/
|
|
21
|
+
readonly messages: Signal<ChatMessage[]>;
|
|
22
|
+
/**
|
|
23
|
+
* 聊天框输入值
|
|
24
|
+
*
|
|
25
|
+
* @author chitanda
|
|
26
|
+
* @date 2023-10-16 15:10:43
|
|
27
|
+
* @type {Signal<string>}
|
|
28
|
+
*/
|
|
29
|
+
readonly input: Signal<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Creates an instance of AiChatController.
|
|
32
|
+
*
|
|
33
|
+
* @author chitanda
|
|
34
|
+
* @date 2023-10-15 19:10:34
|
|
35
|
+
* @param {IChatOptions} opts 聊天配置
|
|
36
|
+
*/
|
|
37
|
+
constructor(opts: IChatOptions);
|
|
38
|
+
/**
|
|
39
|
+
* 设置聊天框值
|
|
40
|
+
*
|
|
41
|
+
* @author chitanda
|
|
42
|
+
* @date 2023-10-16 16:10:21
|
|
43
|
+
* @param {string} input
|
|
44
|
+
*/
|
|
45
|
+
setInput(input: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* 新增聊天记录
|
|
48
|
+
*
|
|
49
|
+
* @author chitanda
|
|
50
|
+
* @date 2023-10-09 15:10:15
|
|
51
|
+
* @param {IMessage} data
|
|
52
|
+
*/
|
|
53
|
+
addMessage(data: IChatMessage): void;
|
|
54
|
+
/**
|
|
55
|
+
* 替换已经存在的聊天消息
|
|
56
|
+
*
|
|
57
|
+
* @author chitanda
|
|
58
|
+
* @date 2023-10-16 22:10:49
|
|
59
|
+
* @param {IChatMessage} data
|
|
60
|
+
*/
|
|
61
|
+
replaceMessage(data: IChatMessage): void;
|
|
62
|
+
/**
|
|
63
|
+
* 提问
|
|
64
|
+
*
|
|
65
|
+
* @author chitanda
|
|
66
|
+
* @date 2023-10-09 20:10:43
|
|
67
|
+
* @return {*} {Promise<void>}
|
|
68
|
+
*/
|
|
69
|
+
question(input: string): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* 回填选中的消息
|
|
72
|
+
*
|
|
73
|
+
* @author chitanda
|
|
74
|
+
* @date 2023-10-16 18:10:19
|
|
75
|
+
* @param {IChatMessage} message
|
|
76
|
+
*/
|
|
77
|
+
backfill(message: IChatMessage): void;
|
|
78
|
+
}
|