@squadico/chatbot 1.5.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/{answer-Bi8GWLyA.cjs → answer-BO2Hs9k1.cjs} +2 -2
- package/dist/{answer-Bi8GWLyA.cjs.map → answer-BO2Hs9k1.cjs.map} +1 -1
- package/dist/{answer-BDuY6oLY.js → answer-DF91dBOx.js} +2 -2
- package/dist/{answer-BDuY6oLY.js.map → answer-DF91dBOx.js.map} +1 -1
- package/dist/chatbot-widgets.global.js +3 -3
- package/dist/chatbot-widgets.global.js.map +1 -1
- package/dist/chatbot.global.js +11 -11
- package/dist/chatbot.global.js.map +1 -1
- package/dist/components/AgentRail.d.ts +3 -3
- package/dist/components/AgentRail.d.ts.map +1 -1
- package/dist/components/ChatbotWidget.d.ts.map +1 -1
- package/dist/extras-BeCZR-6X.cjs +4 -0
- package/dist/extras-BeCZR-6X.cjs.map +1 -0
- package/dist/{extras-BSCTuiit.js → extras-D94278IT.js} +135 -112
- package/dist/extras-D94278IT.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/lib/client.d.ts +4 -0
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/conversation.d.ts +10 -4
- package/dist/lib/conversation.d.ts.map +1 -1
- package/dist/lib/useChat.d.ts +10 -2
- package/dist/lib/useChat.d.ts.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{src-B7GLD1Xs.js → src-Bm_aRvFA.js} +604 -539
- package/dist/src-Bm_aRvFA.js.map +1 -0
- package/dist/src-DcPZdalT.cjs +7 -0
- package/dist/src-DcPZdalT.cjs.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/widgets/approval/SqcApproval.d.ts.map +1 -1
- package/dist/widgets/extras-loader.d.ts +1 -1
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +2 -2
- package/package.json +1 -1
- package/dist/extras-BAqWS9pU.cjs +0 -4
- package/dist/extras-BAqWS9pU.cjs.map +0 -1
- package/dist/extras-BSCTuiit.js.map +0 -1
- package/dist/lib/rail.d.ts +0 -20
- package/dist/lib/rail.d.ts.map +0 -1
- package/dist/src-B7GLD1Xs.js.map +0 -1
- package/dist/src-DuYhMbNf.cjs +0 -7
- package/dist/src-DuYhMbNf.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){var e=`.approval{flex-direction:column;gap:8px;margin:11px 0 2px;display:flex}.actions{flex-wrap:wrap;gap:8px;display:flex}.request{color:var(--w-text);margin:0;font-size:13px}.args{border:1px solid var(--w-border);background:var(--w-surface);border-radius:12px;flex-direction:column;gap:4px;margin:0;padding:8px 10px;font-size:12px;display:flex}.arg{gap:8px;display:flex}.arg dt{color:var(--w-muted);flex:none;font-weight:500}.arg dd{overflow-wrap:anywhere;min-width:0;color:var(--w-text);margin:0}.approval button{border:1px solid var(--w-border);background:var(--w-bg);height:32px;color:var(--w-text);cursor:pointer;border-radius:12px;flex:auto;padding:0 12px;font-size:13px;font-weight:500}.approval .yes:not(:disabled){background:var(--w-accent);color:var(--w-on-accent);border-color:#0000;font-weight:600}.approval button:hover:not(:disabled){border-color:var(--w-border-strong);background:var(--w-surface)}.approval .yes:hover:not(:disabled){background:var(--w-accent-hover);border-color:#0000}.approval button:disabled{cursor:default}.approval button:disabled[aria-pressed=false]{opacity:.45}.approval button[aria-pressed=true]{border-color:var(--w-border-strong);background:var(--w-selected);color:var(--w-text);font-weight:600}`,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h={},g=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function x(e,n,r){var i,a,o,s={};for(o in n)o==`key`?i=n[o]:o==`ref`?a=n[o]:s[o]=n[o];if(arguments.length>2&&(s.children=arguments.length>3?t.call(arguments,2):r),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return S(e,s,i,a,null)}function S(e,t,i,a,o){var s={type:e,props:t,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++r,__i:-1,__u:0};return o==null&&n.vnode!=null&&n.vnode(s),s}function C(e){return e.children}function w(e,t){this.props=e,this.context=t}function T(e,t){if(t==null)return e.__?T(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?T(e):null}function E(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,i=[],a=[],o=y({},t);o.__v=t.__v+1,n.vnode&&n.vnode(o),ne(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,i,r??T(t),!!(32&t.__u),a),o.__v=t.__v,o.__.__k[o.__i]=o,ie(i,o,a),t.__e=t.__=null,o.__e!=r&&D(o)}}function D(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),D(e)}function O(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!k.__r++||a!=n.debounceRendering)&&((a=n.debounceRendering)||o)(k)}function k(){try{for(var e,t=1;i.length;)i.length>t&&i.sort(s),e=i.shift(),t=i.length,E(e)}finally{i.length=k.__r=0}}function ee(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,_,v,y=r&&r.__k||g,b=t.length;for(c=A(n,t,y,c,b),d=0;d<b;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&y[p.__i]||h,p.__i=d,v=ne(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&se(f.ref,null,p),u.push(p.ref,p.__c||m,p)),_==null&&m!=null&&(_=m),4&p.__u?(c=j(p,c,e),f.__e&&(f.__e=null)):typeof p.type==`function`&&v!==void 0?c=v:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=_,c}function A(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=S(null,o,null,null,null):v(o)?o=e.__k[a]=S(C,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=S(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=M(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=T(s)),ce(s,s));return r}function j(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=j(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=T(e)),t=n.insertBefore(e.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function M(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function N(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||_.test(t)?n:n+`px`}function P(e,t,n,r,i){var a,o;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||N(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||N(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(d,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n[u]=r[u]:(n[u]=f,e.addEventListener(t,a?m:p,a)):e.removeEventListener(t,a?m:p,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function te(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[l]==null)t[l]=f++;else if(t[l]<r[u])return;return r(n.event?n.event(t):t)}}}function ne(e,t,r,i,a,o,s,c,l,u){var d,f,p,m,h,_,x,S,E,D,O,k,A,j,M,N,P=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),o=[c=t.__e=r.__e]),(d=n.__b)&&d(t);n:if(typeof P==`function`){f=s.length;try{if(E=t.props,D=P.prototype&&P.prototype.render,O=(d=P.contextType)&&i[d.__c],k=d?O?O.props.value:d.__:i,r.__c?S=(p=t.__c=r.__c).__=p.__E:(D?t.__c=p=new P(E,k):(t.__c=p=new w(E,k),p.constructor=P,p.render=le),O&&O.sub(p),p.state||(p.state={}),p.__n=i,m=p.__d=!0,p.__h=[],p._sb=[]),D&&p.__s==null&&(p.__s=p.state),D&&P.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=y({},p.__s)),y(p.__s,P.getDerivedStateFromProps(E,p.__s))),h=p.props,_=p.state,p.__v=t,m)D&&P.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),D&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(D&&P.getDerivedStateFromProps==null&&E!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(E,k),t.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(E,p.__s,k)){t.__v!=r.__v&&(p.props=E,p.state=p.__s,p.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),g.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p),c=T(r);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(E,p.__s,k),D&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,_,x)})}if(p.context=k,p.props=E,p.__P=e,p.__e=!1,A=n.__r,j=0,D)p.state=p.__s,p.__d=!1,A&&A(t),d=p.render(p.props,p.state,p.context),g.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,A&&A(t),d=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++j<25);p.state=p.__s,p.getChildContext!=null&&(i=y(y({},i),p.getChildContext())),D&&!m&&p.getSnapshotBeforeUpdate!=null&&(x=p.getSnapshotBeforeUpdate(h,_)),M=d!=null&&d.type===C&&d.key==null?ae(d.props.children):d,c=ee(e,v(M)?M:[M],t,r,i,a,o,s,c,l,u),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),S&&(p.__E=p.__=null)}catch(e){if(s.length=f,t.__v=null,l||o!=null){if(e.then){for(t.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o!=null&&(o[o.indexOf(c)]=null),t.__e=c}else if(o!=null)for(N=o.length;N--;)b(o[N])}else t.__e=r.__e;t.__k??(t.__k=r.__k||[]),e.then||re(t),n.__e(e,t,r)}}else o==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):c=t.__e=oe(r.__e,t,r,i,a,o,s,l,u);return(d=n.diffed)&&d(t),128&t.__u?void 0:c}function re(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(re))}function ie(e,t,r){for(var i=0;i<r.length;i++)se(r[i],r[++i],r[++i]);n.__c&&n.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){n.__e(e,t.__v)}})}function ae(e){return typeof e!=`object`||!e||e.__b>0?e:v(e)?e.map(ae):e.constructor===void 0?y({},e):null}function oe(e,r,i,a,o,s,c,l,u){var d,f,p,m,g,_,y,x=i.props||h,S=r.props,C=r.type;if(C==`svg`?o=`http://www.w3.org/2000/svg`:C==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||(o=`http://www.w3.org/1999/xhtml`),s!=null){for(d=0;d<s.length;d++)if((g=s[d])&&`setAttribute`in g==!!C&&(C?g.localName==C:g.nodeType==3)){e=g,s[d]=null;break}}if(e==null){if(C==null)return document.createTextNode(S);e=document.createElementNS(o,C,S.is&&S),l&&(n.__m&&n.__m(r,s),l=!1),s=null}if(C==null)x===S||l&&e.data==S||(e.data=S);else{if(s=C==`textarea`&&S.defaultValue!=null?null:s&&t.call(e.childNodes),!l&&s!=null)for(x={},d=0;d<e.attributes.length;d++)x[(g=e.attributes[d]).name]=g.value;for(d in x)g=x[d],d==`dangerouslySetInnerHTML`?p=g:d==`children`||d in S||d==`value`&&`defaultValue`in S||d==`checked`&&`defaultChecked`in S||P(e,d,null,g,o);for(d in S)g=S[d],d==`children`?m=g:d==`dangerouslySetInnerHTML`?f=g:d==`value`?_=g:d==`checked`?y=g:l&&typeof g!=`function`||x[d]===g||P(e,d,g,x[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),r.__k=[];else if(p&&(e.innerHTML=``),ee(r.type==`template`?e.content:e,v(m)?m:[m],r,i,a,C==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:i.__k&&T(i,0),l,u),s!=null)for(d=s.length;d--;)b(s[d]);l&&C!=`textarea`||(d=`value`,C==`progress`&&_==null?e.removeAttribute(`value`):_!=null&&(_!==e[d]||C==`progress`&&!_||C==`option`&&_!=x[d])&&P(e,d,_,x[d],o),d=`checked`,y!=null&&y!=e[d]&&P(e,d,y,x[d],o))}return e}function se(e,t,r){try{if(typeof e==`function`){var i=typeof e.__u==`function`;i&&e.__u(),i&&t==null||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,r)}}function ce(e,t,r){var i,a;if(n.unmount&&n.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||se(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){n.__e(e,t)}i.base=i.__P=i.__n=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&ce(i[a],t,r||typeof e.type!=`function`);r||b(e.__e),e.__c=e.__=e.__e=void 0}function le(e,t,n){return this.constructor(e,n)}function ue(e,r,i){var a,o,s,c;r==document&&(r=document.documentElement),n.__&&n.__(e,r),o=(a=typeof i==`function`)?null:i&&i.__k||r.__k,s=[],c=[],ne(r,e=(!a&&i||r).__k=x(C,null,[e]),o||h,h,r.namespaceURI,!a&&i?[i]:o?null:r.firstChild?t.call(r.childNodes):null,s,!a&&i?i:o?o.__e:r.firstChild,a,c),ie(s,e,c),e.props.children=null}t=g.slice,n={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},r=0,w.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=y({},this.state);typeof e==`function`&&(e=e(y({},n),this.props)),e&&y(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),O(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),O(this))},w.prototype.render=C,i=[],o=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,c=Math.random().toString(8),l=`__d`+c,u=`__a`+c,d=/(PointerCapture)$|Capture$/i,f=0,p=te(!1),m=te(!0);var F,I,L,de,R=0,fe=[],z=n,pe=z.__b,me=z.__r,he=z.diffed,ge=z.__c,_e=z.unmount,ve=z.__;function B(e,t){z.__h&&z.__h(I,e,R||t),R=0;var n=I.__H||(I.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function V(e){return R=1,ye(Oe,e)}function ye(e,t,n){var r=B(F++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Oe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=I,!I.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};I.__f=!0;var a=I.shouldComponentUpdate,o=I.componentWillUpdate;I.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},I.shouldComponentUpdate=i}return r.__N||r.__}function be(e,t){var n=B(F++,3);!z.__s&&De(n.__H,t)&&(n.__=e,n.u=t,I.__H.__h.push(n))}function xe(e){return R=5,Se(function(){return{current:e}},[])}function Se(e,t){var n=B(F++,7);return De(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ce(){for(var e;e=fe.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(H),t.__h.some(Ee),t.__h=[]}catch(n){t.__h=[],z.__e(n,e.__v)}}}z.__b=function(e){I=null,pe&&pe(e)},z.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ve&&ve(e,t)},z.__r=function(e){me&&me(e),F=0;var t=(I=e.__c).__H;t&&(L===I?(t.__h=[],I.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(H),t.__h.some(Ee),t.__h=[],F=0)),L=I},z.diffed=function(e){he&&he(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fe.push(t)!==1&&de===z.requestAnimationFrame||((de=z.requestAnimationFrame)||Te)(Ce)),t.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),L=I=null},z.__c=function(e,t){t.some(function(e){try{e.__h.some(H),e.__h=e.__h.filter(function(e){return!e.__||Ee(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],z.__e(n,e.__v)}}),ge&&ge(e,t)},z.unmount=function(e){_e&&_e(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{H(e)}catch(e){t=e}}),n.__H=void 0,t&&z.__e(t,n.__v))};var we=typeof requestAnimationFrame==`function`;function Te(e){var t,n=function(){clearTimeout(r),we&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);we&&(t=requestAnimationFrame(n))}function H(e){var t=I,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),I=t}function Ee(e){var t=I;e.__c=e.__(),I=t}function De(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Oe(e,t){return typeof t==`function`?t(e):t}var ke={en:{heading:`Assistant`,subheading:`Squadico`,placeholder:`Ask your question…`,greeting:`Hello! I am your assistant. What would you like to do?`,hint:`The assistant proposes an action; nothing is applied without your confirmation.`,assistant:`Assistant`,typing:`The assistant is writing its answer`,activity:{knowledge:`Searching the knowledge base…`,skill:`Following a procedure…`,delegation:`Asking a colleague…`,tool:`Looking it up…`},newConversation:`New conversation`,close:`Close the assistant`,closeTitle:`Close`,history:{open:`Conversation history`,menu:`Previous conversations`,loading:`Loading…`,empty:`No previous conversation.`,untitled:`Conversation`},context:{region:`Context sent to the assistant`},approval:{group:`Write confirmation`,approve:`Yes, apply`,reject:`No, cancel`,request:`The agent wants to use {tool}.`,arguments:`With`,edit:`Change…`,correction:`What to change — e.g. “the due date is next Monday”`,correctionLabel:`Correction to make before approving`,send:`Send`},confirm:{group:`Confirmation`,yes:`Yes`,no:`No`,yesValue:`yes`,noValue:`no`,other:`Propose something else`},choices:`Suggested options`,table:{copy:`Copy`,copied:`Copied`,more:`{count} more rows`},form:{submit:`Send`,required:`Required`,email:`Enter a valid email address`,number:`Enter a number`},poweredBy:`Powered by Squadico`,handles:{picker:`Agents you can address`,unknown:`Nobody answers to that name here:`,instead:`You can address:`,rail:`Agents`},selection:{group:`Suggested choice`,single:`Pick one option.`,multiple:`Pick one or more options, then validate.`,validate:`Validate`},composer:{label:`Your message`,send:`Send the message`,sendTitle:`Send`,stop:`Stop the answer`,stopTitle:`Stop`,attach:`Attach a file`,attachTitle:`Attach`,remove:`Remove {name}`},attachments:{unsupported:`This kind of file cannot be attached to a message.`,tooLarge:`This file is too large.`,tooMany:`This message already carries as many files as it may.`,unreadable:`This file could not be read.`,failed:`This file could not be attached.`},error:`Something went wrong, the assistant could not answer. Try again in a moment.`,withHuman:`A member of the team will reply to you here.`},fr:{heading:`Assistant`,subheading:`Squadico`,placeholder:`Posez votre question…`,greeting:`Bonjour ! Je suis votre assistant. Que souhaitez-vous faire ?`,hint:`L'assistant propose une action ; rien n'est appliqué sans votre confirmation.`,assistant:`Assistant`,typing:`L'assistant rédige sa réponse`,activity:{knowledge:`Recherche dans la base de connaissances…`,skill:`Application d'une procédure…`,delegation:`Consultation d'un collègue…`,tool:`Recherche en cours…`},newConversation:`Nouvelle conversation`,close:`Fermer l'assistant`,closeTitle:`Fermer`,history:{open:`Historique des conversations`,menu:`Conversations précédentes`,loading:`Chargement…`,empty:`Aucune conversation précédente.`,untitled:`Conversation`},context:{region:`Contexte transmis à l'assistant`},approval:{group:`Validation de l'écriture`,approve:`Oui, appliquer`,reject:`Non, annuler`,request:`L'agent souhaite utiliser {tool}.`,arguments:`Avec`,edit:`Modifier…`,correction:`Ce qu'il faut changer — ex. « l'échéance est lundi prochain »`,correctionLabel:`Correction à apporter avant validation`,send:`Envoyer`},confirm:{group:`Confirmation`,yes:`Oui`,no:`Non`,yesValue:`oui`,noValue:`non`,other:`Proposer autre chose`},choices:`Options proposées`,table:{copy:`Copier`,copied:`Copié`,more:`{count} lignes de plus`},form:{submit:`Envoyer`,required:`Obligatoire`,email:`Saisissez une adresse e-mail valide`,number:`Saisissez un nombre`},poweredBy:`Propulsé par Squadico`,handles:{picker:`Agents que vous pouvez adresser`,unknown:`Personne ne répond à ce nom ici :`,instead:`Vous pouvez adresser :`,rail:`Agents`},selection:{group:`Choix proposé`,single:`Sélectionnez une option.`,multiple:`Sélectionnez une ou plusieurs options, puis validez.`,validate:`Valider`},composer:{label:`Votre message`,send:`Envoyer le message`,sendTitle:`Envoyer`,stop:`Interrompre la réponse`,stopTitle:`Interrompre`,attach:`Joindre un fichier`,attachTitle:`Joindre`,remove:`Retirer {name}`},attachments:{unsupported:`Ce format de fichier ne peut pas être joint à un message.`,tooLarge:`Ce fichier est trop volumineux.`,tooMany:`Ce message porte déjà autant de fichiers qu'il le peut.`,unreadable:`Ce fichier n'a pas pu être lu.`,failed:`Impossible de joindre ce fichier.`},error:`Une erreur est survenue, l'assistant n'a pas pu répondre. Réessayez dans un instant.`,withHuman:`Un membre de l'équipe va vous répondre ici.`},es:{heading:`Asistente`,subheading:`Squadico`,placeholder:`Haga su pregunta…`,greeting:`¡Hola! Soy su asistente. ¿Qué desea hacer?`,hint:`El asistente propone una acción; no se aplica nada sin su confirmación.`,assistant:`Asistente`,typing:`El asistente está redactando su respuesta`,activity:{knowledge:`Buscando en la base de conocimientos…`,skill:`Siguiendo un procedimiento…`,delegation:`Consultando a un compañero…`,tool:`Consultando…`},newConversation:`Nueva conversación`,close:`Cerrar el asistente`,closeTitle:`Cerrar`,history:{open:`Historial de conversaciones`,menu:`Conversaciones anteriores`,loading:`Cargando…`,empty:`Ninguna conversación anterior.`,untitled:`Conversación`},context:{region:`Contexto enviado al asistente`},approval:{group:`Validación de la escritura`,approve:`Sí, aplicar`,reject:`No, cancelar`,request:`El agente quiere usar {tool}.`,arguments:`Con`,edit:`Modificar…`,correction:`Lo que hay que cambiar — p. ej. «el vencimiento es el lunes»`,correctionLabel:`Corrección antes de validar`,send:`Enviar`},confirm:{group:`Confirmación`,yes:`Sí`,no:`No`,yesValue:`sí`,noValue:`no`,other:`Proponer otra cosa`},choices:`Opciones propuestas`,table:{copy:`Copiar`,copied:`Copiado`,more:`{count} filas más`},form:{submit:`Enviar`,required:`Obligatorio`,email:`Introduzca un correo electrónico válido`,number:`Introduzca un número`},poweredBy:`Con la tecnología de Squadico`,handles:{picker:`Agentes a los que puedes dirigirte`,unknown:`Nadie responde a ese nombre aquí:`,instead:`Puedes dirigirte a:`,rail:`Agentes`},selection:{group:`Opción propuesta`,single:`Seleccione una opción.`,multiple:`Seleccione una o varias opciones y valide.`,validate:`Validar`},composer:{label:`Su mensaje`,send:`Enviar el mensaje`,sendTitle:`Enviar`,stop:`Interrumpir la respuesta`,stopTitle:`Interrumpir`,attach:`Adjuntar un archivo`,attachTitle:`Adjuntar`,remove:`Quitar {name}`},attachments:{unsupported:`Este tipo de archivo no se puede adjuntar a un mensaje.`,tooLarge:`Este archivo es demasiado grande.`,tooMany:`Este mensaje ya lleva todos los archivos que puede llevar.`,unreadable:`No se ha podido leer este archivo.`,failed:`No se ha podido adjuntar este archivo.`},error:`Se ha producido un error, el asistente no ha podido responder. Inténtelo de nuevo.`,withHuman:`Un miembro del equipo le responderá aquí.`}},Ae={en:`en-GB`,fr:`fr-FR`,es:`es-ES`};function je(e){let t=e?.trim().toLowerCase().split(/[-_]/)[0];return t&&t in ke?t:void 0}function Me(){return typeof navigator>`u`?[]:navigator.languages?.length?navigator.languages:[navigator.language]}function Ne(e){let t=e?.trim(),n=(t?[t]:Me()).find(je),r=je(n)??`en`;return{code:r,tag:n?.includes(`-`)?n:Ae[r],t:ke[r]}}function Pe(e){return Ne(e).t}var Fe=/^(?:mcp|custom|a2a)_[0-9a-f]{8}_/;function Ie(e){let t=e.replace(Fe,``).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).trim().toLowerCase();return t?t.charAt(0).toUpperCase()+t.slice(1):e}var Le=0;Array.isArray;function U(e,t,r,i,a,o){t||(t={});var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Le,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return n.vnode&&n.vnode(u),u}function Re(e,t){let{confirm:n}=Pe(t);return e===!0?n.yes:e===!1?n.no:typeof e==`string`?e:JSON.stringify(e)??String(e)}function ze({call:e,locked:t,language:n}){let{approval:r}=Pe(n),[i,a]=V(null),o=xe(!1),s=!t&&i===null,c=e?Object.entries(e.arguments):[],l=(e,n)=>{t||o.current||(o.current=!0,a(e),n.currentTarget?.dispatchEvent(new CustomEvent(`sqc-decision`,{detail:{approved:e},bubbles:!0,composed:!0})))};return U(`div`,{class:`approval`,role:`group`,"aria-label":r.group,children:[e&&U(`p`,{class:`request`,children:r.request.replace(`{tool}`,Ie(e.tool))}),c.length>0&&U(`dl`,{class:`args`,children:c.map(([e,t])=>U(`div`,{class:`arg`,children:[U(`dt`,{children:Ie(e)}),U(`dd`,{class:`value`,children:Re(t,n)})]},e))}),U(`div`,{class:`actions`,children:[U(`button`,{type:`button`,class:`yes`,"aria-pressed":i===!0,disabled:!s,onClick:e=>l(!0,e),children:r.approve}),U(`button`,{type:`button`,class:`no`,"aria-pressed":i===!1,disabled:!s,onClick:e=>l(!1,e),children:r.reject})]})]})}var Be=`.name{color:var(--w-muted);font-size:12px}.chart{color:var(--w-text);background:var(--w-surface);border:1px solid var(--w-border);border-radius:12px;flex-direction:column;gap:8px;margin:0;padding:12px;font-size:13px;display:flex}.head{justify-content:space-between;align-items:flex-start;gap:8px;display:flex}figcaption{overflow-wrap:anywhere;font-weight:600}.download,.toggle{background:var(--w-bg);border:1px solid var(--w-border-strong);cursor:pointer;border-radius:8px;flex-shrink:0;padding:2px 8px;font-size:12px}.toggle{color:var(--w-muted);align-self:flex-start}.legend{color:var(--w-muted);flex-wrap:wrap;gap:4px 12px;margin:0;padding:0;font-size:12px;list-style:none;display:flex}.legend li{align-items:center;gap:4px;display:flex}.legend i{border-radius:2px;width:10px;height:10px}.plot{position:relative}svg{width:100%;height:auto;display:block}.tip{white-space:nowrap;pointer-events:none;color:var(--w-bg);background:var(--w-text);border-radius:6px;flex-direction:column;padding:4px 8px;font-size:12px;display:flex;position:absolute;transform:translate(-50%,calc(-100% - 8px))}.data{border:1px solid var(--w-border);border-radius:8px;max-height:192px;overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px}th,td{text-align:left;font-variant-numeric:tabular-nums;padding:4px 8px}th{color:var(--w-muted);background:var(--w-bg);font-weight:500}tbody tr{border-top:1px solid var(--w-border)}`,Ve=[`#2448cc`,`#0d7f78`,`#b86e00`,`#a92f73`,`#557c00`,`#5a6a80`];function W(e){let t=Math.min(e,Ve.length-1);return`var(--sqc-series-${t+1}, ${Ve[t]})`}function G(e,t,n,r){let i=t===e?0:(r-n)/(t-e);return t=>n+(t-e)*i}function He(e,t){e===t&&(--e,t+=1);let n=(t-e)/5,r=10**Math.floor(Math.log10(n)),i=[1,2,5,10].map(e=>e*r).find(e=>e>=n)??n,a=[];for(let n=Math.floor(e/i)*i;n<=t+i/2&&(a.push(Number(n.toPrecision(12))),!(n>=t));n+=i);return a}var Ue=e=>e.length>14?`${e.slice(0,13)}…`:e,K=`fill:var(--w-muted);font-size:11px`,We=`stroke:var(--w-border)`;function Ge(e){let{values:t,scale:n,axis:r,from:i,to:a,format:o}=e;return U(`g`,{children:t.map(e=>{let t=n(e);return r===`y`?U(`g`,{children:[U(`line`,{x1:i,x2:a,y1:t,y2:t,style:We}),U(`text`,{x:i-6,y:t+4,"text-anchor":`end`,style:K,children:o(e)})]},e):U(`g`,{children:[U(`line`,{y1:i,y2:a,x1:t,x2:t,style:We}),U(`text`,{y:a+16,x:t,"text-anchor":`middle`,style:K,children:o(e)})]},e)})})}function Ke({bottom:e,left:t}){return U(`g`,{style:K,children:[e&&U(`text`,{x:280,y:276,"text-anchor":`middle`,children:e}),t&&U(`text`,{transform:`translate(12 140) rotate(-90)`,"text-anchor":`middle`,children:t})]})}function qe(e,t,n,r,i,a){let o=Math.min(a-i,Math.PI*2-1e-4),s=i+o,c=+(o>Math.PI),l=(n,r)=>`${(e+n*Math.cos(r)).toFixed(2)} ${(t+n*Math.sin(r)).toFixed(2)}`,u=`M${l(n,i)}A${n} ${n} 0 ${c} 1 ${l(n,s)}`;return r>0?`${u}L${l(r,s)}A${r} ${r} 0 ${c} 0 ${l(r,i)}Z`:`${u}L${e} ${t}Z`}function Je({chart:e,format:t,onTip:n}){let r=280-(e.xLabel?44:28),i=(e,n)=>(e?`${e}: `:``)+t(n),a;if(e.type===`pie`){let t=e.series[0].values,r=t.reduce((e,t)=>e+Math.max(t,0),0)||1,o=-Math.PI/2;a=U(`g`,{class:`series`,style:`stroke:var(--w-bg);stroke-width:2`,children:e.categories.map((a,s)=>{let c=o;o+=Math.max(t[s],0)/r*Math.PI*2;let l=(c+o)/2;return U(`path`,{d:qe(280,140,130,e.donut?71.5:0,c,o),style:`fill:${W(s)}`,onMouseEnter:()=>n({x:280+65*Math.cos(l),y:140+65*Math.sin(l),title:a,line:i(e.series[0].name,t[s])})},s)})})}else if(e.type===`scatter`){let i=e.series.flatMap(e=>e.points),o=He(Math.min(...i.map(e=>e.x)),Math.max(...i.map(e=>e.x))),s=He(Math.min(...i.map(e=>e.y)),Math.max(...i.map(e=>e.y))),c=e.yLabel?60:44,l=G(o[0],o[o.length-1],c,548),u=G(s[0],s[s.length-1],r,10);a=U(C,{children:[U(Ge,{values:s,scale:u,axis:`y`,from:c,to:548,format:t}),U(Ge,{values:o,scale:l,axis:`x`,from:10,to:r,format:t}),e.series.map((r,i)=>U(`g`,{class:`series`,style:`fill:${W(i)}`,children:r.points.map((i,a)=>U(`circle`,{cx:l(i.x),cy:u(i.y),r:4,onMouseEnter:()=>n({x:l(i.x),y:u(i.y),title:r.name,line:`${e.xLabel||`x`}: ${t(i.x)}, ${e.yLabel||`y`}: ${t(i.y)}`})},a))},i)),U(Ke,{bottom:e.xLabel,left:e.yLabel})]})}else{let{categories:o,series:s}=e,c=e.stacked&&e.type!==`line`,l=e.type===`bar`&&e.horizontal,u=o.map(()=>0),d=o.map(()=>0),f=s.map(e=>e.values.map((e,t)=>{if(!c)return[0,e];let n=e>=0?u:d,r=n[t];return n[t]+=e,[r,n[t]]})),p=f.flat().map(([,e])=>e);e.type!==`line`&&p.push(0);let m=He(Math.min(...p),Math.max(...p)),h=m[0],g=m[m.length-1],_=l?e.xLabel?112:96:e.yLabel?60:44,v=l?[10,r]:[_,548],y=(v[1]-v[0])/o.length,b=e=>v[0]+y*(e+.5),x=l?G(h,g,_,548):G(h,g,r,10),S=Math.ceil(o.length/12),w=(e,t,r,a)=>()=>n({x:r,y:a,title:o[t],line:i(s[e].name,s[e].values[t])}),T;if(e.type===`bar`){let e=y*.8,t=c?e:e/s.length;T=s.map((e,n)=>U(`g`,{class:`series`,style:`fill:${W(n)}`,children:f[n].map(([e,r],i)=>{let a=v[0]+y*i+y*.1+(c?0:t*n),o=x(Math.min(e,r)),s=x(Math.max(e,r)),u=l?{x:o,y:a,width:s-o,height:t}:{x:a,y:s,width:t,height:o-s};return U(`rect`,{...u,onMouseEnter:w(n,i,u.x+u.width/2,u.y)},i)})},n))}else T=s.map((t,n)=>{let r=W(n),i=f[n].map(([,e],t)=>[b(t),x(e)]),a=i.map(([e,t],n)=>`${n?`L`:`M`}${e} ${t}`).join(``),o=i.map(([e],t)=>`L${e} ${x(f[n][t][0])}`).reverse().join(``);return U(`g`,{class:`series`,style:`stroke:${r};fill:${r}`,children:[e.type===`area`&&U(`path`,{d:`${a}${o}Z`,style:`stroke:none;fill-opacity:${c?.7:.2}`}),U(`path`,{d:a,style:`fill:none;stroke-width:2`}),i.map(([e,t],r)=>U(`circle`,{cx:e,cy:t,r:3,onMouseEnter:w(n,r,e,t)},r))]},n)});a=U(C,{children:[U(Ge,{values:m,scale:x,axis:l?`x`:`y`,from:l?10:_,to:l?r:548,format:t}),U(`g`,{style:K,children:o.map((e,t)=>t%S?null:l?U(`text`,{x:_-6,y:b(t)+4,"text-anchor":`end`,children:Ue(e)},t):U(`text`,{x:b(t),y:r+16,"text-anchor":`middle`,children:Ue(e)},t))}),T,U(Ke,{bottom:l?e.yLabel:e.xLabel,left:l?e.xLabel:e.yLabel})]})}return U(`svg`,{viewBox:`0 0 560 280`,role:`img`,"aria-label":e.title,style:`font-family:var(--w-font)`,onMouseLeave:()=>n(null),children:a})}var q=2;function Ye(e,t,n){let r=getComputedStyle(t),i=e.cloneNode(!0);i.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),i.setAttribute(`width`,`560`),i.setAttribute(`height`,`280`);let a=new XMLSerializer().serializeToString(i).replace(/var\((--[\w-]+)(?:,\s*([^()]*))?\)/g,(e,t,n)=>r.getPropertyValue(t).trim()||n?.trim()||e),o=new Image;o.onload=()=>{let e=document.createElement(`canvas`);e.width=560*q,e.height=280*q;let t=e.getContext(`2d`);t&&(t.scale(q,q),t.fillStyle=r.getPropertyValue(`--w-bg`).trim()||`#fff`,t.fillRect(0,0,560,280),t.drawImage(o,0,0,560,280),e.toBlob(e=>{if(!e)return;let t=URL.createObjectURL(e),r=document.createElement(`a`);r.href=t,r.download=n,r.click(),URL.revokeObjectURL(t)},`image/png`))},o.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(a)}`}var Xe=[`bar`,`line`,`area`,`pie`,`scatter`],Ze=e=>typeof e==`number`&&Number.isFinite(e),J=e=>typeof e==`string`?e:``,Y=(e,t)=>typeof e==`object`&&e?e[t]:void 0;function Qe(e,t){let n=[];for(let r of e){let e=Y(r,`values`);if(!Array.isArray(e)||e.length!==t||!e.every(Ze))return null;n.push({name:J(Y(r,`name`)),values:e})}return n}function $e(e){let t=[];for(let n of e){let e=Y(n,`points`);if(!Array.isArray(e)||!e.every(e=>Ze(Y(e,`x`))&&Ze(Y(e,`y`))))return null;t.push({name:J(Y(n,`name`)),points:e})}return t}function et(e){let t;try{t=JSON.parse(e)}catch{return null}let n=Y(t,`type`),r=Y(t,`series`);if(!Xe.includes(n)||!Array.isArray(r)||!r.length)return null;let i={title:J(Y(t,`title`)),xLabel:J(Y(t,`x_label`)),yLabel:J(Y(t,`y_label`)),stacked:Y(t,`stacked`)===!0,horizontal:Y(t,`horizontal`)===!0,donut:Y(t,`donut`)===!0};if(n===`scatter`){let e=$e(r);return e&&{...i,type:n,series:e}}let a=Y(t,`categories`);if(!Array.isArray(a))return null;let o=a.map(String),s=Qe(r,o.length);return s&&{...i,type:n,categories:o,series:s}}var tt={en:{download:`Download PNG`,show:`Show data`,hide:`Hide data`,category:`Category`,series:`Series`},fr:{download:`Télécharger en PNG`,show:`Afficher les données`,hide:`Masquer les données`,category:`Catégorie`,series:`Série`},es:{download:`Descargar PNG`,show:`Mostrar datos`,hide:`Ocultar datos`,category:`Categoría`,series:`Serie`}};function nt(e){return tt[e]??tt.en}function rt(e){let{chart:t,t:n,format:r}=e;return U(`div`,{class:`data`,children:U(`table`,{children:[U(`thead`,{children:t.type===`scatter`?U(`tr`,{children:[U(`th`,{children:n.series}),U(`th`,{children:t.xLabel||`x`}),U(`th`,{children:t.yLabel||`y`})]}):U(`tr`,{children:[U(`th`,{children:t.xLabel||n.category}),t.series.map((e,t)=>U(`th`,{children:e.name},t))]})}),U(`tbody`,{children:t.type===`scatter`?t.series.flatMap((e,t)=>e.points.map((n,i)=>U(`tr`,{children:[U(`td`,{children:e.name}),U(`td`,{children:r(n.x)}),U(`td`,{children:r(n.y)})]},`${t}-${i}`))):t.categories.map((e,n)=>U(`tr`,{children:[U(`td`,{children:e}),t.series.map((e,t)=>U(`td`,{children:r(e.values[n])},t))]},n))})]})})}function it(e){let{chart:t,body:n,filename:r=``,language:i}=e,a=nt(i),[o,s]=V(null),[c,l]=V(null),[u,d]=V(!1),f=xe(null),p=Se(()=>new Intl.NumberFormat(i),[i]),m=e=>p.format(e);be(()=>{if(t||!n)return;let e=!0;return Promise.resolve(n).then(t=>e&&s(et(t)),()=>e&&s(null)),()=>{e=!1}},[t,n]);let h=t??o;if(!h)return U(`span`,{class:`name`,children:r});let g=h.title||r,_=h.type===`pie`?h.categories:h.series.length>1?h.series.map(e=>e.name):[];return U(`figure`,{class:`chart`,children:[U(`div`,{class:`head`,children:[U(`figcaption`,{children:g}),U(`button`,{type:`button`,class:`download`,onClick:()=>{let e=f.current?.querySelector(`svg`),t=f.current?.getRootNode()?.host;e&&t&&Ye(e,t,`${g}.png`)},children:a.download})]}),_.length>0&&U(`ul`,{class:`legend`,children:_.map((e,t)=>U(`li`,{children:[U(`i`,{style:`background:${W(t)}`}),e]},t))}),U(`div`,{class:`plot`,ref:f,children:[U(Je,{chart:h,format:m,onTip:l}),c&&U(`div`,{class:`tip`,role:`tooltip`,style:`left:${c.x/560*100}%;top:${c.y/280*100}%`,children:[U(`strong`,{children:c.title}),U(`span`,{children:c.line})]})]}),U(`button`,{type:`button`,class:`toggle`,"aria-expanded":u,onClick:()=>d(!u),children:u?a.hide:a.show}),u&&U(rt,{chart:h,t:a,format:m})]})}function at(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function ot(e,t){at(e,t),t.add(e)}function X(e,t,n){at(e,t),t.set(e,n)}function Z(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function Q(e,t){return e.get(Z(e,t))}function st(e,t,n){return e.set(Z(e,t),n),n}var ct=new Map;function lt(e){if(ct.has(e))return ct.get(e)??null;let t;try{t=new CSSStyleSheet,t.replaceSync(e)}catch{t=null}return ct.set(e,t),t}function ut(e,t,n){let r=[...t,`locked`,`language`];var i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakSet;class l extends HTMLElement{constructor(){super(),ot(this,c),X(this,i,{locked:!1,language:`en`}),X(this,a,void 0),X(this,o,!1),X(this,s,e=>{Q(i,this).locked||(this.set(`locked`,!0),this.dispatchEvent(new CustomEvent(`sqc-reply`,{detail:{text:e},bubbles:!0,composed:!0})))});let e=this.attachShadow({mode:`open`}),t=lt(n);if(t)e.adoptedStyleSheets=[t];else{let t=document.createElement(`style`);t.textContent=n,e.append(t)}st(a,this,document.createElement(`div`)),e.append(Q(a,this));for(let e of r){if(!Object.hasOwn(this,e))continue;let t=this[e];delete this[e],this[e]=t}}connectedCallback(){st(o,this,!0),Z(c,this,u).call(this)}disconnectedCallback(){st(o,this,!1),ue(null,Q(a,this))}set(e,t){Q(i,this)[e]=t,Z(c,this,u).call(this)}get(e){return Q(i,this)[e]}}function u(){Q(o,this)&&ue(x(e,{...Q(i,this),reply:Q(s,this)}),Q(a,this))}for(let e of r)Object.defineProperty(l.prototype,e,{get(){return this.get(e)},set(t){this.set(e,t)},configurable:!0});return l}function dt(e,t){return e.fields.map(e=>[e.label,(t[e.name]??``).trim()]).filter(([,e])=>e).map(([e,t])=>`${e} : ${t}`).join(`
|
|
2
|
-
`)}var
|
|
3
|
-
`);function
|
|
1
|
+
(function(){var e=`.approval{flex-direction:column;gap:8px;margin:11px 0 2px;display:flex}.actions{flex-wrap:wrap;gap:8px;display:flex}.request{color:var(--w-text);margin:0;font-size:13px}.args{border:1px solid var(--w-border);background:var(--w-surface);border-radius:12px;flex-direction:column;margin:0;padding:2px 10px;font-size:12px;display:flex}.args .args{background:0 0;border:0;border-radius:0;padding:0}.arg{grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:8px;padding:6px 0;display:grid}.arg+.arg{border-top:1px solid var(--w-border)}.args .args .arg:first-child{padding-top:0}.args .args .arg:last-child{padding-bottom:0}.arg dt{color:var(--w-muted);overflow-wrap:anywhere;font-weight:500}.arg dd{overflow-wrap:anywhere;min-width:0;color:var(--w-text);margin:0}.approval button{border:1px solid var(--w-border);background:var(--w-bg);height:32px;color:var(--w-text);cursor:pointer;border-radius:12px;flex:auto;padding:0 12px;font-size:13px;font-weight:500}.approval .yes:not(:disabled){background:var(--w-accent);color:var(--w-on-accent);border-color:#0000;font-weight:600}.approval button:hover:not(:disabled){border-color:var(--w-border-strong);background:var(--w-surface)}.approval .yes:hover:not(:disabled){background:var(--w-accent-hover);border-color:#0000}.approval button:disabled{cursor:default}.approval button:disabled[aria-pressed=false]{opacity:.45}.approval button[aria-pressed=true]{border-color:var(--w-border-strong);background:var(--w-selected);color:var(--w-text);font-weight:600}`,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h={},g=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function x(e,n,r){var i,a,o,s={};for(o in n)o==`key`?i=n[o]:o==`ref`?a=n[o]:s[o]=n[o];if(arguments.length>2&&(s.children=arguments.length>3?t.call(arguments,2):r),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return S(e,s,i,a,null)}function S(e,t,i,a,o){var s={type:e,props:t,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++r,__i:-1,__u:0};return o==null&&n.vnode!=null&&n.vnode(s),s}function C(e){return e.children}function w(e,t){this.props=e,this.context=t}function T(e,t){if(t==null)return e.__?T(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?T(e):null}function E(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,i=[],a=[],o=y({},t);o.__v=t.__v+1,n.vnode&&n.vnode(o),ne(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,i,r??T(t),!!(32&t.__u),a),o.__v=t.__v,o.__.__k[o.__i]=o,ie(i,o,a),t.__e=t.__=null,o.__e!=r&&D(o)}}function D(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),D(e)}function O(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!k.__r++||a!=n.debounceRendering)&&((a=n.debounceRendering)||o)(k)}function k(){try{for(var e,t=1;i.length;)i.length>t&&i.sort(s),e=i.shift(),t=i.length,E(e)}finally{i.length=k.__r=0}}function ee(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,_,v,y=r&&r.__k||g,b=t.length;for(c=A(n,t,y,c,b),d=0;d<b;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&y[p.__i]||h,p.__i=d,v=ne(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&se(f.ref,null,p),u.push(p.ref,p.__c||m,p)),_==null&&m!=null&&(_=m),4&p.__u?(c=j(p,c,e),f.__e&&(f.__e=null)):typeof p.type==`function`&&v!==void 0?c=v:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=_,c}function A(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=S(null,o,null,null,null):v(o)?o=e.__k[a]=S(C,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=S(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=M(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=T(s)),ce(s,s));return r}function j(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=j(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=T(e)),t=n.insertBefore(e.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function M(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function N(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||_.test(t)?n:n+`px`}function P(e,t,n,r,i){var a,o;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||N(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||N(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(d,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n[u]=r[u]:(n[u]=f,e.addEventListener(t,a?m:p,a)):e.removeEventListener(t,a?m:p,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function te(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[l]==null)t[l]=f++;else if(t[l]<r[u])return;return r(n.event?n.event(t):t)}}}function ne(e,t,r,i,a,o,s,c,l,u){var d,f,p,m,h,_,x,S,E,D,O,k,A,j,M,N,P=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),o=[c=t.__e=r.__e]),(d=n.__b)&&d(t);n:if(typeof P==`function`){f=s.length;try{if(E=t.props,D=P.prototype&&P.prototype.render,O=(d=P.contextType)&&i[d.__c],k=d?O?O.props.value:d.__:i,r.__c?S=(p=t.__c=r.__c).__=p.__E:(D?t.__c=p=new P(E,k):(t.__c=p=new w(E,k),p.constructor=P,p.render=le),O&&O.sub(p),p.state||(p.state={}),p.__n=i,m=p.__d=!0,p.__h=[],p._sb=[]),D&&p.__s==null&&(p.__s=p.state),D&&P.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=y({},p.__s)),y(p.__s,P.getDerivedStateFromProps(E,p.__s))),h=p.props,_=p.state,p.__v=t,m)D&&P.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),D&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(D&&P.getDerivedStateFromProps==null&&E!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(E,k),t.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(E,p.__s,k)){t.__v!=r.__v&&(p.props=E,p.state=p.__s,p.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),g.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p),c=T(r);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(E,p.__s,k),D&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,_,x)})}if(p.context=k,p.props=E,p.__P=e,p.__e=!1,A=n.__r,j=0,D)p.state=p.__s,p.__d=!1,A&&A(t),d=p.render(p.props,p.state,p.context),g.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,A&&A(t),d=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++j<25);p.state=p.__s,p.getChildContext!=null&&(i=y(y({},i),p.getChildContext())),D&&!m&&p.getSnapshotBeforeUpdate!=null&&(x=p.getSnapshotBeforeUpdate(h,_)),M=d!=null&&d.type===C&&d.key==null?ae(d.props.children):d,c=ee(e,v(M)?M:[M],t,r,i,a,o,s,c,l,u),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),S&&(p.__E=p.__=null)}catch(e){if(s.length=f,t.__v=null,l||o!=null){if(e.then){for(t.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o!=null&&(o[o.indexOf(c)]=null),t.__e=c}else if(o!=null)for(N=o.length;N--;)b(o[N])}else t.__e=r.__e;t.__k??(t.__k=r.__k||[]),e.then||re(t),n.__e(e,t,r)}}else o==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):c=t.__e=oe(r.__e,t,r,i,a,o,s,l,u);return(d=n.diffed)&&d(t),128&t.__u?void 0:c}function re(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(re))}function ie(e,t,r){for(var i=0;i<r.length;i++)se(r[i],r[++i],r[++i]);n.__c&&n.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){n.__e(e,t.__v)}})}function ae(e){return typeof e!=`object`||!e||e.__b>0?e:v(e)?e.map(ae):e.constructor===void 0?y({},e):null}function oe(e,r,i,a,o,s,c,l,u){var d,f,p,m,g,_,y,x=i.props||h,S=r.props,C=r.type;if(C==`svg`?o=`http://www.w3.org/2000/svg`:C==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||(o=`http://www.w3.org/1999/xhtml`),s!=null){for(d=0;d<s.length;d++)if((g=s[d])&&`setAttribute`in g==!!C&&(C?g.localName==C:g.nodeType==3)){e=g,s[d]=null;break}}if(e==null){if(C==null)return document.createTextNode(S);e=document.createElementNS(o,C,S.is&&S),l&&(n.__m&&n.__m(r,s),l=!1),s=null}if(C==null)x===S||l&&e.data==S||(e.data=S);else{if(s=C==`textarea`&&S.defaultValue!=null?null:s&&t.call(e.childNodes),!l&&s!=null)for(x={},d=0;d<e.attributes.length;d++)x[(g=e.attributes[d]).name]=g.value;for(d in x)g=x[d],d==`dangerouslySetInnerHTML`?p=g:d==`children`||d in S||d==`value`&&`defaultValue`in S||d==`checked`&&`defaultChecked`in S||P(e,d,null,g,o);for(d in S)g=S[d],d==`children`?m=g:d==`dangerouslySetInnerHTML`?f=g:d==`value`?_=g:d==`checked`?y=g:l&&typeof g!=`function`||x[d]===g||P(e,d,g,x[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),r.__k=[];else if(p&&(e.innerHTML=``),ee(r.type==`template`?e.content:e,v(m)?m:[m],r,i,a,C==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:i.__k&&T(i,0),l,u),s!=null)for(d=s.length;d--;)b(s[d]);l&&C!=`textarea`||(d=`value`,C==`progress`&&_==null?e.removeAttribute(`value`):_!=null&&(_!==e[d]||C==`progress`&&!_||C==`option`&&_!=x[d])&&P(e,d,_,x[d],o),d=`checked`,y!=null&&y!=e[d]&&P(e,d,y,x[d],o))}return e}function se(e,t,r){try{if(typeof e==`function`){var i=typeof e.__u==`function`;i&&e.__u(),i&&t==null||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,r)}}function ce(e,t,r){var i,a;if(n.unmount&&n.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||se(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){n.__e(e,t)}i.base=i.__P=i.__n=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&ce(i[a],t,r||typeof e.type!=`function`);r||b(e.__e),e.__c=e.__=e.__e=void 0}function le(e,t,n){return this.constructor(e,n)}function ue(e,r,i){var a,o,s,c;r==document&&(r=document.documentElement),n.__&&n.__(e,r),o=(a=typeof i==`function`)?null:i&&i.__k||r.__k,s=[],c=[],ne(r,e=(!a&&i||r).__k=x(C,null,[e]),o||h,h,r.namespaceURI,!a&&i?[i]:o?null:r.firstChild?t.call(r.childNodes):null,s,!a&&i?i:o?o.__e:r.firstChild,a,c),ie(s,e,c),e.props.children=null}t=g.slice,n={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},r=0,w.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=y({},this.state);typeof e==`function`&&(e=e(y({},n),this.props)),e&&y(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),O(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),O(this))},w.prototype.render=C,i=[],o=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,c=Math.random().toString(8),l=`__d`+c,u=`__a`+c,d=/(PointerCapture)$|Capture$/i,f=0,p=te(!1),m=te(!0);var F,I,de,fe,L=0,pe=[],R=n,me=R.__b,he=R.__r,ge=R.diffed,_e=R.__c,ve=R.unmount,ye=R.__;function be(e,t){R.__h&&R.__h(I,e,L||t),L=0;var n=I.__H||(I.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function z(e){return L=1,xe(Ae,e)}function xe(e,t,n){var r=be(F++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ae(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=I,!I.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};I.__f=!0;var a=I.shouldComponentUpdate,o=I.componentWillUpdate;I.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},I.shouldComponentUpdate=i}return r.__N||r.__}function Se(e,t){var n=be(F++,3);!R.__s&&ke(n.__H,t)&&(n.__=e,n.u=t,I.__H.__h.push(n))}function Ce(e){return L=5,we(function(){return{current:e}},[])}function we(e,t){var n=be(F++,7);return ke(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Te(){for(var e;e=pe.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(B),t.__h.some(Oe),t.__h=[]}catch(n){t.__h=[],R.__e(n,e.__v)}}}R.__b=function(e){I=null,me&&me(e)},R.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ye&&ye(e,t)},R.__r=function(e){he&&he(e),F=0;var t=(I=e.__c).__H;t&&(de===I?(t.__h=[],I.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(B),t.__h.some(Oe),t.__h=[],F=0)),de=I},R.diffed=function(e){ge&&ge(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pe.push(t)!==1&&fe===R.requestAnimationFrame||((fe=R.requestAnimationFrame)||De)(Te)),t.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),de=I=null},R.__c=function(e,t){t.some(function(e){try{e.__h.some(B),e.__h=e.__h.filter(function(e){return!e.__||Oe(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],R.__e(n,e.__v)}}),_e&&_e(e,t)},R.unmount=function(e){ve&&ve(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{B(e)}catch(e){t=e}}),n.__H=void 0,t&&R.__e(t,n.__v))};var Ee=typeof requestAnimationFrame==`function`;function De(e){var t,n=function(){clearTimeout(r),Ee&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ee&&(t=requestAnimationFrame(n))}function B(e){var t=I,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),I=t}function Oe(e){var t=I;e.__c=e.__(),I=t}function ke(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Ae(e,t){return typeof t==`function`?t(e):t}var je={en:{heading:`Assistant`,subheading:`Squadico`,placeholder:`Ask your question…`,greeting:`Hello! I am your assistant. What would you like to do?`,hint:`The assistant proposes an action; nothing is applied without your confirmation.`,assistant:`Assistant`,typing:`The assistant is writing its answer`,activity:{knowledge:`Searching the knowledge base…`,skill:`Following a procedure…`,delegation:`Asking a colleague…`,tool:`Looking it up…`},newConversation:`New conversation`,close:`Close the assistant`,closeTitle:`Close`,history:{open:`Conversation history`,menu:`Previous conversations`,loading:`Loading…`,empty:`No previous conversation.`,untitled:`Conversation`},context:{region:`Context sent to the assistant`},approval:{group:`Write confirmation`,approve:`Yes, apply`,reject:`No, cancel`,request:`The agent wants to use {tool}.`,arguments:`With`,edit:`Change…`,correction:`What to change — e.g. “the due date is next Monday”`,correctionLabel:`Correction to make before approving`,send:`Send`},confirm:{group:`Confirmation`,yes:`Yes`,no:`No`,yesValue:`yes`,noValue:`no`,other:`Propose something else`},choices:`Suggested options`,table:{copy:`Copy`,copied:`Copied`,more:`{count} more rows`},form:{submit:`Send`,required:`Required`,email:`Enter a valid email address`,number:`Enter a number`},poweredBy:`Powered by Squadico`,handles:{picker:`Agents you can address`,unknown:`Nobody answers to that name here:`,instead:`You can address:`,rail:`Agents`},selection:{group:`Suggested choice`,single:`Pick one option.`,multiple:`Pick one or more options, then validate.`,validate:`Validate`},composer:{label:`Your message`,send:`Send the message`,sendTitle:`Send`,stop:`Stop the answer`,stopTitle:`Stop`,attach:`Attach a file`,attachTitle:`Attach`,remove:`Remove {name}`},attachments:{unsupported:`This kind of file cannot be attached to a message.`,tooLarge:`This file is too large.`,tooMany:`This message already carries as many files as it may.`,unreadable:`This file could not be read.`,failed:`This file could not be attached.`},error:`Something went wrong, the assistant could not answer. Try again in a moment.`,withHuman:`A member of the team will reply to you here.`},fr:{heading:`Assistant`,subheading:`Squadico`,placeholder:`Posez votre question…`,greeting:`Bonjour ! Je suis votre assistant. Que souhaitez-vous faire ?`,hint:`L'assistant propose une action ; rien n'est appliqué sans votre confirmation.`,assistant:`Assistant`,typing:`L'assistant rédige sa réponse`,activity:{knowledge:`Recherche dans la base de connaissances…`,skill:`Application d'une procédure…`,delegation:`Consultation d'un collègue…`,tool:`Recherche en cours…`},newConversation:`Nouvelle conversation`,close:`Fermer l'assistant`,closeTitle:`Fermer`,history:{open:`Historique des conversations`,menu:`Conversations précédentes`,loading:`Chargement…`,empty:`Aucune conversation précédente.`,untitled:`Conversation`},context:{region:`Contexte transmis à l'assistant`},approval:{group:`Validation de l'écriture`,approve:`Oui, appliquer`,reject:`Non, annuler`,request:`L'agent souhaite utiliser {tool}.`,arguments:`Avec`,edit:`Modifier…`,correction:`Ce qu'il faut changer — ex. « l'échéance est lundi prochain »`,correctionLabel:`Correction à apporter avant validation`,send:`Envoyer`},confirm:{group:`Confirmation`,yes:`Oui`,no:`Non`,yesValue:`oui`,noValue:`non`,other:`Proposer autre chose`},choices:`Options proposées`,table:{copy:`Copier`,copied:`Copié`,more:`{count} lignes de plus`},form:{submit:`Envoyer`,required:`Obligatoire`,email:`Saisissez une adresse e-mail valide`,number:`Saisissez un nombre`},poweredBy:`Propulsé par Squadico`,handles:{picker:`Agents que vous pouvez adresser`,unknown:`Personne ne répond à ce nom ici :`,instead:`Vous pouvez adresser :`,rail:`Agents`},selection:{group:`Choix proposé`,single:`Sélectionnez une option.`,multiple:`Sélectionnez une ou plusieurs options, puis validez.`,validate:`Valider`},composer:{label:`Votre message`,send:`Envoyer le message`,sendTitle:`Envoyer`,stop:`Interrompre la réponse`,stopTitle:`Interrompre`,attach:`Joindre un fichier`,attachTitle:`Joindre`,remove:`Retirer {name}`},attachments:{unsupported:`Ce format de fichier ne peut pas être joint à un message.`,tooLarge:`Ce fichier est trop volumineux.`,tooMany:`Ce message porte déjà autant de fichiers qu'il le peut.`,unreadable:`Ce fichier n'a pas pu être lu.`,failed:`Impossible de joindre ce fichier.`},error:`Une erreur est survenue, l'assistant n'a pas pu répondre. Réessayez dans un instant.`,withHuman:`Un membre de l'équipe va vous répondre ici.`},es:{heading:`Asistente`,subheading:`Squadico`,placeholder:`Haga su pregunta…`,greeting:`¡Hola! Soy su asistente. ¿Qué desea hacer?`,hint:`El asistente propone una acción; no se aplica nada sin su confirmación.`,assistant:`Asistente`,typing:`El asistente está redactando su respuesta`,activity:{knowledge:`Buscando en la base de conocimientos…`,skill:`Siguiendo un procedimiento…`,delegation:`Consultando a un compañero…`,tool:`Consultando…`},newConversation:`Nueva conversación`,close:`Cerrar el asistente`,closeTitle:`Cerrar`,history:{open:`Historial de conversaciones`,menu:`Conversaciones anteriores`,loading:`Cargando…`,empty:`Ninguna conversación anterior.`,untitled:`Conversación`},context:{region:`Contexto enviado al asistente`},approval:{group:`Validación de la escritura`,approve:`Sí, aplicar`,reject:`No, cancelar`,request:`El agente quiere usar {tool}.`,arguments:`Con`,edit:`Modificar…`,correction:`Lo que hay que cambiar — p. ej. «el vencimiento es el lunes»`,correctionLabel:`Corrección antes de validar`,send:`Enviar`},confirm:{group:`Confirmación`,yes:`Sí`,no:`No`,yesValue:`sí`,noValue:`no`,other:`Proponer otra cosa`},choices:`Opciones propuestas`,table:{copy:`Copiar`,copied:`Copiado`,more:`{count} filas más`},form:{submit:`Enviar`,required:`Obligatorio`,email:`Introduzca un correo electrónico válido`,number:`Introduzca un número`},poweredBy:`Con la tecnología de Squadico`,handles:{picker:`Agentes a los que puedes dirigirte`,unknown:`Nadie responde a ese nombre aquí:`,instead:`Puedes dirigirte a:`,rail:`Agentes`},selection:{group:`Opción propuesta`,single:`Seleccione una opción.`,multiple:`Seleccione una o varias opciones y valide.`,validate:`Validar`},composer:{label:`Su mensaje`,send:`Enviar el mensaje`,sendTitle:`Enviar`,stop:`Interrumpir la respuesta`,stopTitle:`Interrumpir`,attach:`Adjuntar un archivo`,attachTitle:`Adjuntar`,remove:`Quitar {name}`},attachments:{unsupported:`Este tipo de archivo no se puede adjuntar a un mensaje.`,tooLarge:`Este archivo es demasiado grande.`,tooMany:`Este mensaje ya lleva todos los archivos que puede llevar.`,unreadable:`No se ha podido leer este archivo.`,failed:`No se ha podido adjuntar este archivo.`},error:`Se ha producido un error, el asistente no ha podido responder. Inténtelo de nuevo.`,withHuman:`Un miembro del equipo le responderá aquí.`}},Me={en:`en-GB`,fr:`fr-FR`,es:`es-ES`};function Ne(e){let t=e?.trim().toLowerCase().split(/[-_]/)[0];return t&&t in je?t:void 0}function Pe(){return typeof navigator>`u`?[]:navigator.languages?.length?navigator.languages:[navigator.language]}function Fe(e){let t=e?.trim(),n=(t?[t]:Pe()).find(Ne),r=Ne(n)??`en`;return{code:r,tag:n?.includes(`-`)?n:Me[r],t:je[r]}}function Ie(e){return Fe(e).t}var Le=/^(?:mcp|custom|a2a)_[0-9a-f]{8}_/;function Re(e){let t=e.replace(Le,``).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).trim().toLowerCase();return t?t.charAt(0).toUpperCase()+t.slice(1):e}var ze=0;Array.isArray;function V(e,t,r,i,a,o){t||(t={});var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ze,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return n.vnode&&n.vnode(u),u}var Be=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Ve(e,t){let{confirm:n}=Ie(t);return e===!0?n.yes:e===!1?n.no:typeof e==`string`?e:JSON.stringify(e)??String(e)}function He({entries:e,labels:t,language:n}){return V(`dl`,{class:`args`,children:e.map(([e,r])=>{let i=typeof r==`string`?t[r]:void 0;return V(`div`,{class:`arg`,children:[V(`dt`,{children:i?Re(e).replace(/ id$/,``):Re(e)}),V(`dd`,{class:`value`,children:i??V(Ue,{value:r,labels:t,language:n})})]},e)})})}function Ue({value:e,labels:t,language:n}){return Be(e)?V(He,{entries:Object.entries(e),labels:t,language:n}):Array.isArray(e)&&e.some(Be)?V(C,{children:e.map((e,r)=>V(Ue,{value:e,labels:t,language:n},r))}):Array.isArray(e)?V(C,{children:e.map(e=>Ve(e,n)).join(`, `)}):V(C,{children:Ve(e,n)})}function We({call:e,locked:t,language:n}){let{approval:r}=Ie(n),[i,a]=z(null),o=Ce(!1),s=!t&&i===null,c=e?Object.entries(e.arguments):[],l=(e,n)=>{t||o.current||(o.current=!0,a(e),n.currentTarget?.dispatchEvent(new CustomEvent(`sqc-decision`,{detail:{approved:e},bubbles:!0,composed:!0})))};return V(`div`,{class:`approval`,role:`group`,"aria-label":r.group,children:[e&&V(`p`,{class:`request`,children:r.request.replace(`{tool}`,Re(e.tool))}),c.length>0&&V(He,{entries:c,labels:e?.labels??{},language:n}),V(`div`,{class:`actions`,children:[V(`button`,{type:`button`,class:`yes`,"aria-pressed":i===!0,disabled:!s,onClick:e=>l(!0,e),children:r.approve}),V(`button`,{type:`button`,class:`no`,"aria-pressed":i===!1,disabled:!s,onClick:e=>l(!1,e),children:r.reject})]})]})}var Ge=`.name{color:var(--w-muted);font-size:12px}.chart{color:var(--w-text);background:var(--w-surface);border:1px solid var(--w-border);border-radius:12px;flex-direction:column;gap:8px;margin:0;padding:12px;font-size:13px;display:flex}.head{justify-content:space-between;align-items:flex-start;gap:8px;display:flex}figcaption{overflow-wrap:anywhere;font-weight:600}.download,.toggle{background:var(--w-bg);border:1px solid var(--w-border-strong);cursor:pointer;border-radius:8px;flex-shrink:0;padding:2px 8px;font-size:12px}.toggle{color:var(--w-muted);align-self:flex-start}.legend{color:var(--w-muted);flex-wrap:wrap;gap:4px 12px;margin:0;padding:0;font-size:12px;list-style:none;display:flex}.legend li{align-items:center;gap:4px;display:flex}.legend i{border-radius:2px;width:10px;height:10px}.plot{position:relative}svg{width:100%;height:auto;display:block}.tip{white-space:nowrap;pointer-events:none;color:var(--w-bg);background:var(--w-text);border-radius:6px;flex-direction:column;padding:4px 8px;font-size:12px;display:flex;position:absolute;transform:translate(-50%,calc(-100% - 8px))}.data{border:1px solid var(--w-border);border-radius:8px;max-height:192px;overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px}th,td{text-align:left;font-variant-numeric:tabular-nums;padding:4px 8px}th{color:var(--w-muted);background:var(--w-bg);font-weight:500}tbody tr{border-top:1px solid var(--w-border)}`,Ke=[`#2448cc`,`#0d7f78`,`#b86e00`,`#a92f73`,`#557c00`,`#5a6a80`];function H(e){let t=Math.min(e,Ke.length-1);return`var(--sqc-series-${t+1}, ${Ke[t]})`}function U(e,t,n,r){let i=t===e?0:(r-n)/(t-e);return t=>n+(t-e)*i}function qe(e,t){e===t&&(--e,t+=1);let n=(t-e)/5,r=10**Math.floor(Math.log10(n)),i=[1,2,5,10].map(e=>e*r).find(e=>e>=n)??n,a=[];for(let n=Math.floor(e/i)*i;n<=t+i/2&&(a.push(Number(n.toPrecision(12))),!(n>=t));n+=i);return a}var Je=e=>e.length>14?`${e.slice(0,13)}…`:e,W=`fill:var(--w-muted);font-size:11px`,Ye=`stroke:var(--w-border)`;function Xe(e){let{values:t,scale:n,axis:r,from:i,to:a,format:o}=e;return V(`g`,{children:t.map(e=>{let t=n(e);return r===`y`?V(`g`,{children:[V(`line`,{x1:i,x2:a,y1:t,y2:t,style:Ye}),V(`text`,{x:i-6,y:t+4,"text-anchor":`end`,style:W,children:o(e)})]},e):V(`g`,{children:[V(`line`,{y1:i,y2:a,x1:t,x2:t,style:Ye}),V(`text`,{y:a+16,x:t,"text-anchor":`middle`,style:W,children:o(e)})]},e)})})}function Ze({bottom:e,left:t}){return V(`g`,{style:W,children:[e&&V(`text`,{x:280,y:276,"text-anchor":`middle`,children:e}),t&&V(`text`,{transform:`translate(12 140) rotate(-90)`,"text-anchor":`middle`,children:t})]})}function Qe(e,t,n,r,i,a){let o=Math.min(a-i,Math.PI*2-1e-4),s=i+o,c=+(o>Math.PI),l=(n,r)=>`${(e+n*Math.cos(r)).toFixed(2)} ${(t+n*Math.sin(r)).toFixed(2)}`,u=`M${l(n,i)}A${n} ${n} 0 ${c} 1 ${l(n,s)}`;return r>0?`${u}L${l(r,s)}A${r} ${r} 0 ${c} 0 ${l(r,i)}Z`:`${u}L${e} ${t}Z`}function $e({chart:e,format:t,onTip:n}){let r=280-(e.xLabel?44:28),i=(e,n)=>(e?`${e}: `:``)+t(n),a;if(e.type===`pie`){let t=e.series[0].values,r=t.reduce((e,t)=>e+Math.max(t,0),0)||1,o=-Math.PI/2;a=V(`g`,{class:`series`,style:`stroke:var(--w-bg);stroke-width:2`,children:e.categories.map((a,s)=>{let c=o;o+=Math.max(t[s],0)/r*Math.PI*2;let l=(c+o)/2;return V(`path`,{d:Qe(280,140,130,e.donut?71.5:0,c,o),style:`fill:${H(s)}`,onMouseEnter:()=>n({x:280+65*Math.cos(l),y:140+65*Math.sin(l),title:a,line:i(e.series[0].name,t[s])})},s)})})}else if(e.type===`scatter`){let i=e.series.flatMap(e=>e.points),o=qe(Math.min(...i.map(e=>e.x)),Math.max(...i.map(e=>e.x))),s=qe(Math.min(...i.map(e=>e.y)),Math.max(...i.map(e=>e.y))),c=e.yLabel?60:44,l=U(o[0],o[o.length-1],c,548),u=U(s[0],s[s.length-1],r,10);a=V(C,{children:[V(Xe,{values:s,scale:u,axis:`y`,from:c,to:548,format:t}),V(Xe,{values:o,scale:l,axis:`x`,from:10,to:r,format:t}),e.series.map((r,i)=>V(`g`,{class:`series`,style:`fill:${H(i)}`,children:r.points.map((i,a)=>V(`circle`,{cx:l(i.x),cy:u(i.y),r:4,onMouseEnter:()=>n({x:l(i.x),y:u(i.y),title:r.name,line:`${e.xLabel||`x`}: ${t(i.x)}, ${e.yLabel||`y`}: ${t(i.y)}`})},a))},i)),V(Ze,{bottom:e.xLabel,left:e.yLabel})]})}else{let{categories:o,series:s}=e,c=e.stacked&&e.type!==`line`,l=e.type===`bar`&&e.horizontal,u=o.map(()=>0),d=o.map(()=>0),f=s.map(e=>e.values.map((e,t)=>{if(!c)return[0,e];let n=e>=0?u:d,r=n[t];return n[t]+=e,[r,n[t]]})),p=f.flat().map(([,e])=>e);e.type!==`line`&&p.push(0);let m=qe(Math.min(...p),Math.max(...p)),h=m[0],g=m[m.length-1],_=l?e.xLabel?112:96:e.yLabel?60:44,v=l?[10,r]:[_,548],y=(v[1]-v[0])/o.length,b=e=>v[0]+y*(e+.5),x=l?U(h,g,_,548):U(h,g,r,10),S=Math.ceil(o.length/12),w=(e,t,r,a)=>()=>n({x:r,y:a,title:o[t],line:i(s[e].name,s[e].values[t])}),T;if(e.type===`bar`){let e=y*.8,t=c?e:e/s.length;T=s.map((e,n)=>V(`g`,{class:`series`,style:`fill:${H(n)}`,children:f[n].map(([e,r],i)=>{let a=v[0]+y*i+y*.1+(c?0:t*n),o=x(Math.min(e,r)),s=x(Math.max(e,r)),u=l?{x:o,y:a,width:s-o,height:t}:{x:a,y:s,width:t,height:o-s};return V(`rect`,{...u,onMouseEnter:w(n,i,u.x+u.width/2,u.y)},i)})},n))}else T=s.map((t,n)=>{let r=H(n),i=f[n].map(([,e],t)=>[b(t),x(e)]),a=i.map(([e,t],n)=>`${n?`L`:`M`}${e} ${t}`).join(``),o=i.map(([e],t)=>`L${e} ${x(f[n][t][0])}`).reverse().join(``);return V(`g`,{class:`series`,style:`stroke:${r};fill:${r}`,children:[e.type===`area`&&V(`path`,{d:`${a}${o}Z`,style:`stroke:none;fill-opacity:${c?.7:.2}`}),V(`path`,{d:a,style:`fill:none;stroke-width:2`}),i.map(([e,t],r)=>V(`circle`,{cx:e,cy:t,r:3,onMouseEnter:w(n,r,e,t)},r))]},n)});a=V(C,{children:[V(Xe,{values:m,scale:x,axis:l?`x`:`y`,from:l?10:_,to:l?r:548,format:t}),V(`g`,{style:W,children:o.map((e,t)=>t%S?null:l?V(`text`,{x:_-6,y:b(t)+4,"text-anchor":`end`,children:Je(e)},t):V(`text`,{x:b(t),y:r+16,"text-anchor":`middle`,children:Je(e)},t))}),T,V(Ze,{bottom:l?e.yLabel:e.xLabel,left:l?e.xLabel:e.yLabel})]})}return V(`svg`,{viewBox:`0 0 560 280`,role:`img`,"aria-label":e.title,style:`font-family:var(--w-font)`,onMouseLeave:()=>n(null),children:a})}var G=2;function et(e,t,n){let r=getComputedStyle(t),i=e.cloneNode(!0);i.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),i.setAttribute(`width`,`560`),i.setAttribute(`height`,`280`);let a=new XMLSerializer().serializeToString(i).replace(/var\((--[\w-]+)(?:,\s*([^()]*))?\)/g,(e,t,n)=>r.getPropertyValue(t).trim()||n?.trim()||e),o=new Image;o.onload=()=>{let e=document.createElement(`canvas`);e.width=560*G,e.height=280*G;let t=e.getContext(`2d`);t&&(t.scale(G,G),t.fillStyle=r.getPropertyValue(`--w-bg`).trim()||`#fff`,t.fillRect(0,0,560,280),t.drawImage(o,0,0,560,280),e.toBlob(e=>{if(!e)return;let t=URL.createObjectURL(e),r=document.createElement(`a`);r.href=t,r.download=n,r.click(),URL.revokeObjectURL(t)},`image/png`))},o.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(a)}`}var tt=[`bar`,`line`,`area`,`pie`,`scatter`],nt=e=>typeof e==`number`&&Number.isFinite(e),K=e=>typeof e==`string`?e:``,q=(e,t)=>typeof e==`object`&&e?e[t]:void 0;function rt(e,t){let n=[];for(let r of e){let e=q(r,`values`);if(!Array.isArray(e)||e.length!==t||!e.every(nt))return null;n.push({name:K(q(r,`name`)),values:e})}return n}function it(e){let t=[];for(let n of e){let e=q(n,`points`);if(!Array.isArray(e)||!e.every(e=>nt(q(e,`x`))&&nt(q(e,`y`))))return null;t.push({name:K(q(n,`name`)),points:e})}return t}function at(e){let t;try{t=JSON.parse(e)}catch{return null}let n=q(t,`type`),r=q(t,`series`);if(!tt.includes(n)||!Array.isArray(r)||!r.length)return null;let i={title:K(q(t,`title`)),xLabel:K(q(t,`x_label`)),yLabel:K(q(t,`y_label`)),stacked:q(t,`stacked`)===!0,horizontal:q(t,`horizontal`)===!0,donut:q(t,`donut`)===!0};if(n===`scatter`){let e=it(r);return e&&{...i,type:n,series:e}}let a=q(t,`categories`);if(!Array.isArray(a))return null;let o=a.map(String),s=rt(r,o.length);return s&&{...i,type:n,categories:o,series:s}}var ot={en:{download:`Download PNG`,show:`Show data`,hide:`Hide data`,category:`Category`,series:`Series`},fr:{download:`Télécharger en PNG`,show:`Afficher les données`,hide:`Masquer les données`,category:`Catégorie`,series:`Série`},es:{download:`Descargar PNG`,show:`Mostrar datos`,hide:`Ocultar datos`,category:`Categoría`,series:`Serie`}};function st(e){return ot[e]??ot.en}function ct(e){let{chart:t,t:n,format:r}=e;return V(`div`,{class:`data`,children:V(`table`,{children:[V(`thead`,{children:t.type===`scatter`?V(`tr`,{children:[V(`th`,{children:n.series}),V(`th`,{children:t.xLabel||`x`}),V(`th`,{children:t.yLabel||`y`})]}):V(`tr`,{children:[V(`th`,{children:t.xLabel||n.category}),t.series.map((e,t)=>V(`th`,{children:e.name},t))]})}),V(`tbody`,{children:t.type===`scatter`?t.series.flatMap((e,t)=>e.points.map((n,i)=>V(`tr`,{children:[V(`td`,{children:e.name}),V(`td`,{children:r(n.x)}),V(`td`,{children:r(n.y)})]},`${t}-${i}`))):t.categories.map((e,n)=>V(`tr`,{children:[V(`td`,{children:e}),t.series.map((e,t)=>V(`td`,{children:r(e.values[n])},t))]},n))})]})})}function lt(e){let{chart:t,body:n,filename:r=``,language:i}=e,a=st(i),[o,s]=z(null),[c,l]=z(null),[u,d]=z(!1),f=Ce(null),p=we(()=>new Intl.NumberFormat(i),[i]),m=e=>p.format(e);Se(()=>{if(t||!n)return;let e=!0;return Promise.resolve(n).then(t=>e&&s(at(t)),()=>e&&s(null)),()=>{e=!1}},[t,n]);let h=t??o;if(!h)return V(`span`,{class:`name`,children:r});let g=h.title||r,_=h.type===`pie`?h.categories:h.series.length>1?h.series.map(e=>e.name):[];return V(`figure`,{class:`chart`,children:[V(`div`,{class:`head`,children:[V(`figcaption`,{children:g}),V(`button`,{type:`button`,class:`download`,onClick:()=>{let e=f.current?.querySelector(`svg`),t=f.current?.getRootNode()?.host;e&&t&&et(e,t,`${g}.png`)},children:a.download})]}),_.length>0&&V(`ul`,{class:`legend`,children:_.map((e,t)=>V(`li`,{children:[V(`i`,{style:`background:${H(t)}`}),e]},t))}),V(`div`,{class:`plot`,ref:f,children:[V($e,{chart:h,format:m,onTip:l}),c&&V(`div`,{class:`tip`,role:`tooltip`,style:`left:${c.x/560*100}%;top:${c.y/280*100}%`,children:[V(`strong`,{children:c.title}),V(`span`,{children:c.line})]})]}),V(`button`,{type:`button`,class:`toggle`,"aria-expanded":u,onClick:()=>d(!u),children:u?a.hide:a.show}),u&&V(ct,{chart:h,t:a,format:m})]})}function ut(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function dt(e,t){ut(e,t),t.add(e)}function J(e,t,n){ut(e,t),t.set(e,n)}function Y(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function X(e,t){return e.get(Y(e,t))}function ft(e,t,n){return e.set(Y(e,t),n),n}var pt=new Map;function mt(e){if(pt.has(e))return pt.get(e)??null;let t;try{t=new CSSStyleSheet,t.replaceSync(e)}catch{t=null}return pt.set(e,t),t}function Z(e,t,n){let r=[...t,`locked`,`language`];var i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakSet;class l extends HTMLElement{constructor(){super(),dt(this,c),J(this,i,{locked:!1,language:`en`}),J(this,a,void 0),J(this,o,!1),J(this,s,e=>{X(i,this).locked||(this.set(`locked`,!0),this.dispatchEvent(new CustomEvent(`sqc-reply`,{detail:{text:e},bubbles:!0,composed:!0})))});let e=this.attachShadow({mode:`open`}),t=mt(n);if(t)e.adoptedStyleSheets=[t];else{let t=document.createElement(`style`);t.textContent=n,e.append(t)}ft(a,this,document.createElement(`div`)),e.append(X(a,this));for(let e of r){if(!Object.hasOwn(this,e))continue;let t=this[e];delete this[e],this[e]=t}}connectedCallback(){ft(o,this,!0),Y(c,this,u).call(this)}disconnectedCallback(){ft(o,this,!1),ue(null,X(a,this))}set(e,t){X(i,this)[e]=t,Y(c,this,u).call(this)}get(e){return X(i,this)[e]}}function u(){X(o,this)&&ue(x(e,{...X(i,this),reply:X(s,this)}),X(a,this))}for(let e of r)Object.defineProperty(l.prototype,e,{get(){return this.get(e)},set(t){this.set(e,t)},configurable:!0});return l}function ht(e,t){return e.fields.map(e=>[e.label,(t[e.name]??``).trim()]).filter(([,e])=>e).map(([e,t])=>`${e} : ${t}`).join(`
|
|
2
|
+
`)}var gt=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function _t(e,t,n){let r=t.trim();return r?e.type===`email`&&!gt.test(r)?n.email:e.type===`number`&&!Number.isFinite(Number(r))?n.number:null:e.required?n.required:null}function vt({form:e,locked:t,language:n,reply:r}){let i=Ie(n).form,[a,o]=z({}),s=e?.fields??[],c=e=>{o(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n})};return V(`form`,{class:`form`,noValidate:!0,onSubmit:n=>{if(n.preventDefault(),t||!e)return;let a=new FormData(n.currentTarget),c={},l={};for(let e of s){let t=a.get(e.name);c[e.name]=typeof t==`string`?t:``;let n=_t(e,c[e.name],i);n&&(l[e.name]=n)}o(l),Object.keys(l).length===0&&r(ht(e,c))},children:[e?.title&&V(`p`,{class:`title`,children:e.title}),s.map(e=>{let n=`f-${e.name}`,r=a[e.name],i={id:n,name:e.name,disabled:t,required:e.required,"aria-invalid":r?!0:void 0,"aria-describedby":r?`${n}-error`:void 0};return V(`div`,{class:`field`,children:[V(`label`,{for:n,children:[e.label,e.required&&V(`span`,{"aria-hidden":`true`,children:` *`})]}),e.type===`select`?V(`select`,{...i,onChange:()=>c(e.name),children:[V(`option`,{value:``}),(e.options??[]).map(e=>V(`option`,{value:e,children:e},e))]}):V(`input`,{...i,type:e.type,onInput:()=>c(e.name)}),r&&V(`span`,{class:`error`,id:`${n}-error`,children:r})]},e.name)}),V(`button`,{type:`submit`,class:`submit`,disabled:t,children:e?.submit||i.submit})]})}var yt=`.form{color:var(--w-text);background:var(--w-surface);border:1px solid var(--w-border);border-radius:12px;flex-direction:column;gap:10px;margin:10px 0 2px;padding:12px;font-size:13px;display:flex}.title{margin:0;font-weight:600}.field{flex-direction:column;gap:4px;display:flex}label{color:var(--w-muted);overflow-wrap:anywhere;font-size:12px}input,select{height:32px;font:inherit;color:var(--w-text);background:var(--w-bg);border:1px solid var(--w-border-strong);border-radius:8px;padding:0 9px}input:focus-visible{box-shadow:var(--w-focus);outline:none}select:focus-visible{box-shadow:var(--w-focus);outline:none}[aria-invalid=true]{border-color:#b42318}.error{color:#b42318;font-size:11.5px}input:disabled,select:disabled{opacity:.7}.submit{background:var(--w-accent);height:32px;color:var(--w-on-accent);cursor:pointer;border:0;border-radius:12px;align-self:flex-end;padding:0 14px;font-size:13px;font-weight:600}.submit:hover:not(:disabled){background:var(--w-accent-hover)}.submit:disabled{opacity:.4;cursor:default}`,Q={table:`sqc-table`,choices:`sqc-choices`,confirm:`sqc-confirm`,form:`sqc-form`,chart:`sqc-chart`,approval:`sqc-approval`},$=[`:host{--w-bg:var(--sqc-bg,#fff);--w-surface:var(--sqc-surface,#f8fafc);--w-selected:var(--sqc-selected,#f1f5f9);--w-border:var(--sqc-border,#e2e8f0);--w-border-strong:var(--sqc-border-strong,#cbd5e1);--w-text:var(--sqc-text,#0f172a);--w-muted:var(--sqc-text-muted,#64748b);--w-accent:var(--sqc-accent-color,var(--sqc-accent,#000));--w-on-accent:var(--sqc-on-accent,#fff);--w-accent-hover:var(--sqc-accent-hover,color-mix(in oklab, var(--w-accent) 84%, var(--w-on-accent)));--w-focus:var(--sqc-focus,0 0 0 2px #fff, 0 0 0 4px #0f172a4d);--w-font:var(--sqc-font-family,system-ui, sans-serif);font-family:var(--w-font);display:block}:host([hidden]){display:none}button{color:inherit;font-family:inherit}button:focus-visible{box-shadow:var(--w-focus);outline:none}`,yt,Ge,e].join(`
|
|
3
|
+
`);function bt(){typeof customElements>`u`||(customElements.get(Q.form)||customElements.define(Q.form,Z(vt,[`form`],$)),customElements.get(Q.chart)||customElements.define(Q.chart,Z(lt,[`chart`,`body`,`filename`],$)),customElements.get(Q.approval)||customElements.define(Q.approval,Z(We,[`call`],$)))}bt()})();
|
|
4
4
|
//# sourceMappingURL=chatbot-widgets.global.js.map
|