@seamly/web-ui 25.1.0-beta.1 → 25.2.0-beta.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.
Files changed (28) hide show
  1. package/build/dist/lib/index.debug.js +239 -95
  2. package/build/dist/lib/index.debug.js.map +1 -1
  3. package/build/dist/lib/index.debug.min.js +1 -1
  4. package/build/dist/lib/index.debug.min.js.LICENSE.txt +2 -2
  5. package/build/dist/lib/index.debug.min.js.map +1 -1
  6. package/build/dist/lib/index.js +828 -691
  7. package/build/dist/lib/index.js.map +1 -1
  8. package/build/dist/lib/index.min.js +1 -1
  9. package/build/dist/lib/index.min.js.LICENSE.txt +2 -2
  10. package/build/dist/lib/index.min.js.map +1 -1
  11. package/build/dist/lib/style-guide.js +1300 -41
  12. package/build/dist/lib/style-guide.js.map +1 -1
  13. package/build/dist/lib/style-guide.min.js +1 -1
  14. package/build/dist/lib/style-guide.min.js.map +1 -1
  15. package/build/dist/lib/styles.css +1 -1
  16. package/package.json +16 -16
  17. package/src/javascripts/core/domains/store/slice.ts +1 -0
  18. package/src/javascripts/core/domains/store/store.types.ts +1 -0
  19. package/src/javascripts/core/ui/components/conversation/conversation.tsx +5 -2
  20. package/src/javascripts/core/ui/components/conversation/loader.tsx +12 -2
  21. package/src/javascripts/core/ui/components/entry/text-entry/index.tsx +2 -2
  22. package/src/javascripts/core/ui/components/entry/upload/index.tsx +2 -2
  23. package/src/javascripts/core/ui/components/view/window-view/window-open-button.tsx +20 -5
  24. package/src/javascripts/core/ui/components/warnings/prompt.tsx +2 -2
  25. package/src/javascripts/core/ui/hooks/focus-helper-hooks.ts +11 -2
  26. package/src/javascripts/core/ui/hooks/seamly-hooks.ts +2 -1
  27. package/src/javascripts/core/ui/hooks/seamly-state-hooks.ts +4 -1
  28. package/src/stylesheets/5-components/_conversation.scss +6 -2
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={34:(e,t,i)=>{var n=i(4901);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},81:(e,t,i)=>{var n=i(9565),a=i(9306),o=i(8551),r=i(6823),s=i(851),c=TypeError;e.exports=function(e,t){var i=arguments.length<2?s(e):t;if(a(i))return o(n(i,e));throw new c(r(e)+" is not iterable")}},116:(e,t,i)=>{var n=i(6518),a=i(9565),o=i(2652),r=i(9306),s=i(8551),c=i(1767),l=i(9539),d=i(4549)("find",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:d},{find:function(e){s(this);try{r(e)}catch(e){l(this,"throw",e)}if(d)return a(d,this,e);var t=c(this),i=0;return o(t,function(t,n){if(e(t,i++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},283:(e,t,i)=>{var n=i(9504),a=i(9039),o=i(4901),r=i(9297),s=i(3724),c=i(350).CONFIGURABLE,l=i(3706),d=i(1181),p=d.enforce,u=d.get,y=String,f=Object.defineProperty,m=n("".slice),g=n("".replace),h=n([].join),v=s&&!a(function(){return 8!==f(function(){},"length",{value:8}).length}),b=String(String).split("String"),w=e.exports=function(e,t,i){"Symbol("===m(y(t),0,7)&&(t="["+g(y(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!r(e,"name")||c&&e.name!==t)&&(s?f(e,"name",{value:t,configurable:!0}):e.name=t),v&&i&&r(i,"arity")&&e.length!==i.arity&&f(e,"length",{value:i.arity});try{i&&r(i,"constructor")&&i.constructor?s&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=p(e);return r(n,"source")||(n.source=h(b,"string"==typeof t?t:"")),e};Function.prototype.toString=w(function(){return o(this)&&u(this).source||l(this)},"toString")},350:(e,t,i)=>{var n=i(3724),a=i(9297),o=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,s=a(o,"name"),c=s&&"something"===function(){}.name,l=s&&(!n||n&&r(o,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},397:(e,t,i)=>{var n=i(7751);e.exports=n("document","documentElement")},421:e=>{e.exports={}},616:(e,t,i)=>{var n=i(9039);e.exports=!n(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},655:(e,t,i)=>{var n=i(6955),a=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return a(e)}},679:(e,t,i)=>{var n=i(1625),a=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new a("Incorrect invocation")}},684:e=>{e.exports=function(e,t){var i="function"==typeof Iterator&&Iterator.prototype[e];if(i)try{i.call({next:null},t).next()}catch(e){return!0}}},741:e=>{var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?i:t)(n)}},757:(e,t,i)=>{var n=i(7751),a=i(4901),o=i(1625),r=i(7040),s=Object;e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return a(t)&&o(t.prototype,s(e))}},851:(e,t,i)=>{var n=i(6955),a=i(5966),o=i(4117),r=i(6269),s=i(8227)("iterator");e.exports=function(e){if(!o(e))return a(e,s)||a(e,"@@iterator")||r[n(e)]}},1072:(e,t,i)=>{var n=i(1828),a=i(8727);e.exports=Object.keys||function(e){return n(e,a)}},1181:(e,t,i)=>{var n,a,o,r=i(8622),s=i(4576),c=i(34),l=i(6699),d=i(9297),p=i(7629),u=i(6119),y=i(421),f="Object already initialized",m=s.TypeError,g=s.WeakMap;if(r||p.state){var h=p.state||(p.state=new g);h.get=h.get,h.has=h.has,h.set=h.set,n=function(e,t){if(h.has(e))throw new m(f);return t.facade=e,h.set(e,t),t},a=function(e){return h.get(e)||{}},o=function(e){return h.has(e)}}else{var v=u("state");y[v]=!0,n=function(e,t){if(d(e,v))throw new m(f);return t.facade=e,l(e,v,t),t},a=function(e){return d(e,v)?e[v]:{}},o=function(e){return d(e,v)}}e.exports={set:n,get:a,has:o,enforce:function(e){return o(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!c(t)||(i=a(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return i}}}},1291:(e,t,i)=>{var n=i(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},1385:(e,t,i)=>{var n=i(9539);e.exports=function(e,t,i){for(var a=e.length-1;a>=0;a--)if(void 0!==e[a])try{i=n(e[a].iterator,t,i)}catch(e){t="throw",i=e}if("throw"===t)throw i;return i}},1454:(e,t,i)=>{i(1701)},1625:(e,t,i)=>{var n=i(9504);e.exports=n({}.isPrototypeOf)},1701:(e,t,i)=>{var n=i(6518),a=i(9565),o=i(9306),r=i(8551),s=i(1767),c=i(9462),l=i(6319),d=i(9539),p=i(684),u=i(4549),y=i(6395),f=!y&&!p("map",function(){}),m=!y&&!f&&u("map",TypeError),g=y||f||m,h=c(function(){var e=this.iterator,t=r(a(this.next,e));if(!(this.done=!!t.done))return l(e,this.mapper,[t.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:g},{map:function(e){r(this);try{o(e)}catch(e){d(this,"throw",e)}return m?a(m,this,e):new h(s(this),{mapper:e})}})},1767:e=>{e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},1828:(e,t,i)=>{var n=i(9504),a=i(9297),o=i(5397),r=i(9617).indexOf,s=i(421),c=n([].push);e.exports=function(e,t){var i,n=o(e),l=0,d=[];for(i in n)!a(s,i)&&a(n,i)&&c(d,i);for(;t.length>l;)a(n,i=t[l++])&&(~r(d,i)||c(d,i));return d}},2106:(e,t,i)=>{var n=i(283),a=i(4913);e.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),a.f(e,t,i)}},2140:(e,t,i)=>{var n={};n[i(8227)("toStringTag")]="z",e.exports="[object z]"===String(n)},2195:(e,t,i)=>{var n=i(9504),a=n({}.toString),o=n("".slice);e.exports=function(e){return o(a(e),8,-1)}},2211:(e,t,i)=>{var n=i(9039);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},2360:(e,t,i)=>{var n,a=i(8551),o=i(6801),r=i(8727),s=i(421),c=i(397),l=i(4055),d=i(6119),p="prototype",u="script",y=d("IE_PROTO"),f=function(){},m=function(e){return"<"+u+">"+e+"</"+u+">"},g=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,i;h="undefined"!=typeof document?document.domain&&n?g(n):(t=l("iframe"),i="java"+u+":",t.style.display="none",c.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):g(n);for(var a=r.length;a--;)delete h[p][r[a]];return h()};s[y]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(f[p]=a(e),i=new f,f[p]=null,i[y]=e):i=h(),void 0===t?i:o.f(i,t)}},2489:(e,t,i)=>{var n=i(6518),a=i(9565),o=i(9306),r=i(8551),s=i(1767),c=i(9462),l=i(6319),d=i(6395),p=i(9539),u=i(684),y=i(4549),f=!d&&!u("filter",function(){}),m=!d&&!f&&y("filter",TypeError),g=d||f||m,h=c(function(){for(var e,t,i=this.iterator,n=this.predicate,o=this.next;;){if(e=r(a(o,i)),this.done=!!e.done)return;if(t=e.value,l(i,n,[t,this.counter++],!0))return t}});n({target:"Iterator",proto:!0,real:!0,forced:g},{filter:function(e){r(this);try{o(e)}catch(e){p(this,"throw",e)}return m?a(m,this,e):new h(s(this),{predicate:e})}})},2529:e=>{e.exports=function(e,t){return{value:e,done:t}}},2577:(e,t,i)=>{i(116)},2652:(e,t,i)=>{var n=i(6080),a=i(9565),o=i(8551),r=i(6823),s=i(4209),c=i(6198),l=i(1625),d=i(81),p=i(851),u=i(9539),y=TypeError,f=function(e,t){this.stopped=e,this.result=t},m=f.prototype;e.exports=function(e,t,i){var g,h,v,b,w,x,I,S=i&&i.that,T=!(!i||!i.AS_ENTRIES),M=!(!i||!i.IS_RECORD),j=!(!i||!i.IS_ITERATOR),E=!(!i||!i.INTERRUPTED),L=n(t,S),C=function(e){return g&&u(g,"normal"),new f(!0,e)},O=function(e){return T?(o(e),E?L(e[0],e[1],C):L(e[0],e[1])):E?L(e,C):L(e)};if(M)g=e.iterator;else if(j)g=e;else{if(!(h=p(e)))throw new y(r(e)+" is not iterable");if(s(h)){for(v=0,b=c(e);b>v;v++)if((w=O(e[v]))&&l(m,w))return w;return new f(!1)}g=d(e,h)}for(x=M?e.next:g.next;!(I=a(x,g)).done;){try{w=O(I.value)}catch(e){u(g,"throw",e)}if("object"==typeof w&&w&&l(m,w))return w}return new f(!1)}},2777:(e,t,i)=>{var n=i(9565),a=i(34),o=i(757),r=i(5966),s=i(4270),c=i(8227),l=TypeError,d=c("toPrimitive");e.exports=function(e,t){if(!a(e)||o(e))return e;var i,c=r(e,d);if(c){if(void 0===t&&(t="default"),i=n(c,e,t),!a(i)||o(i))return i;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},2787:(e,t,i)=>{var n=i(9297),a=i(4901),o=i(8981),r=i(6119),s=i(2211),c=r("IE_PROTO"),l=Object,d=l.prototype;e.exports=s?l.getPrototypeOf:function(e){var t=o(e);if(n(t,c))return t[c];var i=t.constructor;return a(i)&&t instanceof i?i.prototype:t instanceof l?d:null}},2796:(e,t,i)=>{var n=i(9039),a=i(4901),o=/#|\.prototype\./,r=function(e,t){var i=c[s(e)];return i===d||i!==l&&(a(t)?n(t):!!t)},s=r.normalize=function(e){return String(e).replace(o,".").toLowerCase()},c=r.data={},l=r.NATIVE="N",d=r.POLYFILL="P";e.exports=r},2812:e=>{var t=TypeError;e.exports=function(e,i){if(e<i)throw new t("Not enough arguments");return e}},2839:(e,t,i)=>{var n=i(4576).navigator,a=n&&n.userAgent;e.exports=a?String(a):""},3392:(e,t,i)=>{var n=i(9504),a=0,o=Math.random(),r=n(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++a+o,36)}},3706:(e,t,i)=>{var n=i(9504),a=i(4901),o=i(7629),r=n(Function.toString);a(o.inspectSource)||(o.inspectSource=function(e){return r(e)}),e.exports=o.inspectSource},3717:(e,t)=>{t.f=Object.getOwnPropertySymbols},3724:(e,t,i)=>{var n=i(9039);e.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3949:(e,t,i)=>{i(7588)},4055:(e,t,i)=>{var n=i(4576),a=i(34),o=n.document,r=a(o)&&a(o.createElement);e.exports=function(e){return r?o.createElement(e):{}}},4114:(e,t,i)=>{var n=i(6518),a=i(8981),o=i(6198),r=i(4527),s=i(6837);n({target:"Array",proto:!0,arity:1,forced:i(9039)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=a(this),i=o(t),n=arguments.length;s(i+n);for(var c=0;c<n;c++)t[i]=arguments[c],i++;return r(t,i),i}})},4117:e=>{e.exports=function(e){return null==e}},4209:(e,t,i)=>{var n=i(8227),a=i(6269),o=n("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||r[o]===e)}},4270:(e,t,i)=>{var n=i(9565),a=i(4901),o=i(34),r=TypeError;e.exports=function(e,t){var i,s;if("string"===t&&a(i=e.toString)&&!o(s=n(i,e)))return s;if(a(i=e.valueOf)&&!o(s=n(i,e)))return s;if("string"!==t&&a(i=e.toString)&&!o(s=n(i,e)))return s;throw new r("Can't convert object to primitive value")}},4376:(e,t,i)=>{var n=i(2195);e.exports=Array.isArray||function(e){return"Array"===n(e)}},4495:(e,t,i)=>{var n=i(9519),a=i(9039),o=i(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!a(function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4520:(e,t,i)=>{i(2489)},4527:(e,t,i)=>{var n=i(3724),a=i(4376),o=TypeError,r=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(a(e)&&!r(e,"length").writable)throw new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4549:(e,t,i)=>{var n=i(4576);e.exports=function(e,t){var i=n.Iterator,a=i&&i.prototype,o=a&&a[e],r=!1;if(o)try{o.call({next:function(){return{done:!0}},return:function(){r=!0}},-1)}catch(e){e instanceof t||(r=!1)}if(!r)return o}},4576:function(e,t,i){var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4603:(e,t,i)=>{var n=i(6840),a=i(9504),o=i(655),r=i(2812),s=URLSearchParams,c=s.prototype,l=a(c.append),d=a(c.delete),p=a(c.forEach),u=a([].push),y=new s("a=1&a=2&b=3");y.delete("a",1),y.delete("b",void 0),y+""!="a=2"&&n(c,"delete",function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return d(this,e);var n=[];p(this,function(e,t){u(n,{key:t,value:e})}),r(t,1);for(var a,s=o(e),c=o(i),y=0,f=0,m=!1,g=n.length;y<g;)a=n[y++],m||a.key===s?(m=!0,d(this,a.key)):f++;for(;f<g;)(a=n[f++]).key===s&&a.value===c||l(this,a.key,a.value)},{enumerable:!0,unsafe:!0})},4659:(e,t,i)=>{var n=i(3724),a=i(4913),o=i(6980);e.exports=function(e,t,i){n?a.f(e,t,o(0,i)):e[t]=i}},4901:e=>{var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},4913:(e,t,i)=>{var n=i(3724),a=i(5917),o=i(8686),r=i(8551),s=i(6969),c=TypeError,l=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p="enumerable",u="configurable",y="writable";t.f=n?o?function(e,t,i){if(r(e),t=s(t),r(i),"function"==typeof e&&"prototype"===t&&"value"in i&&y in i&&!i[y]){var n=d(e,t);n&&n[y]&&(e[t]=i.value,i={configurable:u in i?i[u]:n[u],enumerable:p in i?i[p]:n[p],writable:!1})}return l(e,t,i)}:l:function(e,t,i){if(r(e),t=s(t),r(i),a)try{return l(e,t,i)}catch(e){}if("get"in i||"set"in i)throw new c("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},5031:(e,t,i)=>{var n=i(7751),a=i(9504),o=i(8480),r=i(3717),s=i(8551),c=a([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),i=r.f;return i?c(t,i(e)):t}},5397:(e,t,i)=>{var n=i(7055),a=i(7750);e.exports=function(e){return n(a(e))}},5610:(e,t,i)=>{var n=i(1291),a=Math.max,o=Math.min;e.exports=function(e,t){var i=n(e);return i<0?a(i+t,0):o(i,t)}},5745:(e,t,i)=>{var n=i(7629);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},5917:(e,t,i)=>{var n=i(3724),a=i(9039),o=i(4055);e.exports=!n&&!a(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},5966:(e,t,i)=>{var n=i(9306),a=i(4117);e.exports=function(e,t){var i=e[t];return a(i)?void 0:n(i)}},6080:(e,t,i)=>{var n=i(7476),a=i(9306),o=i(616),r=n(n.bind);e.exports=function(e,t){return a(e),void 0===t?e:o?r(e,t):function(){return e.apply(t,arguments)}}},6119:(e,t,i)=>{var n=i(5745),a=i(3392),o=n("keys");e.exports=function(e){return o[e]||(o[e]=a(e))}},6198:(e,t,i)=>{var n=i(8014);e.exports=function(e){return n(e.length)}},6269:e=>{e.exports={}},6279:(e,t,i)=>{var n=i(6840);e.exports=function(e,t,i){for(var a in t)n(e,a,t[a],i);return e}},6319:(e,t,i)=>{var n=i(8551),a=i(9539);e.exports=function(e,t,i,o){try{return o?t(n(i)[0],i[1]):t(i)}catch(t){a(e,"throw",t)}}},6395:e=>{e.exports=!1},6518:(e,t,i)=>{var n=i(4576),a=i(7347).f,o=i(6699),r=i(6840),s=i(9433),c=i(7740),l=i(2796);e.exports=function(e,t){var i,d,p,u,y,f=e.target,m=e.global,g=e.stat;if(i=m?n:g?n[f]||s(f,{}):n[f]&&n[f].prototype)for(d in t){if(u=t[d],p=e.dontCallGetSet?(y=a(i,d))&&y.value:i[d],!l(m?d:f+(g?".":"#")+d,e.forced)&&void 0!==p){if(typeof u==typeof p)continue;c(u,p)}(e.sham||p&&p.sham)&&o(u,"sham",!0),r(i,d,u,e)}}},6699:(e,t,i)=>{var n=i(3724),a=i(4913),o=i(6980);e.exports=n?function(e,t,i){return a.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},6801:(e,t,i)=>{var n=i(3724),a=i(8686),o=i(4913),r=i(8551),s=i(5397),c=i(1072);t.f=n&&!a?Object.defineProperties:function(e,t){r(e);for(var i,n=s(t),a=c(t),l=a.length,d=0;l>d;)o.f(e,i=a[d++],n[i]);return e}},6823:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6837:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},6840:(e,t,i)=>{var n=i(4901),a=i(4913),o=i(283),r=i(9433);e.exports=function(e,t,i,s){s||(s={});var c=s.enumerable,l=void 0!==s.name?s.name:t;if(n(i)&&o(i,l,s),s.global)c?e[t]=i:r(t,i);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=i:a.f(e,t,{value:i,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},6955:(e,t,i)=>{var n=i(2140),a=i(4901),o=i(2195),r=i(8227)("toStringTag"),s=Object,c="Arguments"===o(function(){return arguments}());e.exports=n?o:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=s(e),r))?i:c?o(t):"Object"===(n=o(t))&&a(t.callee)?"Arguments":n}},6969:(e,t,i)=>{var n=i(2777),a=i(757);e.exports=function(e){var t=n(e,"string");return a(t)?t:t+""}},6980:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7040:(e,t,i)=>{var n=i(4495);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:(e,t,i)=>{var n=i(9504),a=i(9039),o=i(2195),r=Object,s=n("".split);e.exports=a(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===o(e)?s(e,""):r(e)}:r},7347:(e,t,i)=>{var n=i(3724),a=i(9565),o=i(8773),r=i(6980),s=i(5397),c=i(6969),l=i(9297),d=i(5917),p=Object.getOwnPropertyDescriptor;t.f=n?p:function(e,t){if(e=s(e),t=c(t),d)try{return p(e,t)}catch(e){}if(l(e,t))return r(!a(o.f,e,t),e[t])}},7476:(e,t,i)=>{var n=i(2195),a=i(9504);e.exports=function(e){if("Function"===n(e))return a(e)}},7566:(e,t,i)=>{var n=i(6840),a=i(9504),o=i(655),r=i(2812),s=URLSearchParams,c=s.prototype,l=a(c.getAll),d=a(c.has),p=new s("a=1");!p.has("a",2)&&p.has("a",void 0)||n(c,"has",function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return d(this,e);var n=l(this,e);r(t,1);for(var a=o(i),s=0;s<n.length;)if(n[s++]===a)return!0;return!1},{enumerable:!0,unsafe:!0})},7588:(e,t,i)=>{var n=i(6518),a=i(9565),o=i(2652),r=i(9306),s=i(8551),c=i(1767),l=i(9539),d=i(4549)("forEach",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:d},{forEach:function(e){s(this);try{r(e)}catch(e){l(this,"throw",e)}if(d)return a(d,this,e);var t=c(this),i=0;o(t,function(t){e(t,i++)},{IS_RECORD:!0})}})},7629:(e,t,i)=>{var n=i(6395),a=i(4576),o=i(9433),r="__core-js_shared__",s=e.exports=a[r]||o(r,{});(s.versions||(s.versions=[])).push({version:"3.45.1",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"})},7657:(e,t,i)=>{var n,a,o,r=i(9039),s=i(4901),c=i(34),l=i(2360),d=i(2787),p=i(6840),u=i(8227),y=i(6395),f=u("iterator"),m=!1;[].keys&&("next"in(o=[].keys())?(a=d(d(o)))!==Object.prototype&&(n=a):m=!0),!c(n)||r(function(){var e={};return n[f].call(e)!==e})?n={}:y&&(n=l(n)),s(n[f])||p(n,f,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},7740:(e,t,i)=>{var n=i(9297),a=i(5031),o=i(7347),r=i(4913);e.exports=function(e,t,i){for(var s=a(t),c=r.f,l=o.f,d=0;d<s.length;d++){var p=s[d];n(e,p)||i&&n(i,p)||c(e,p,l(t,p))}}},7750:(e,t,i)=>{var n=i(4117),a=TypeError;e.exports=function(e){if(n(e))throw new a("Can't call method on "+e);return e}},7751:(e,t,i)=>{var n=i(4576),a=i(4901);e.exports=function(e,t){return arguments.length<2?(i=n[e],a(i)?i:void 0):n[e]&&n[e][t];var i}},8014:(e,t,i)=>{var n=i(1291),a=Math.min;e.exports=function(e){var t=n(e);return t>0?a(t,9007199254740991):0}},8111:(e,t,i)=>{var n=i(6518),a=i(4576),o=i(679),r=i(8551),s=i(4901),c=i(2787),l=i(2106),d=i(4659),p=i(9039),u=i(9297),y=i(8227),f=i(7657).IteratorPrototype,m=i(3724),g=i(6395),h="constructor",v="Iterator",b=y("toStringTag"),w=TypeError,x=a[v],I=g||!s(x)||x.prototype!==f||!p(function(){x({})}),S=function(){if(o(this,f),c(this)===f)throw new w("Abstract class Iterator not directly constructable")},T=function(e,t){m?l(f,e,{configurable:!0,get:function(){return t},set:function(t){if(r(this),this===f)throw new w("You can't redefine this property");u(this,e)?this[e]=t:d(this,e,t)}}):f[e]=t};u(f,b)||T(b,v),!I&&u(f,h)&&f[h]!==Object||T(h,S),S.prototype=f,n({global:!0,constructor:!0,forced:I},{Iterator:S})},8227:(e,t,i)=>{var n=i(4576),a=i(5745),o=i(9297),r=i(3392),s=i(4495),c=i(7040),l=n.Symbol,d=a("wks"),p=c?l.for||l:l&&l.withoutSetter||r;e.exports=function(e){return o(d,e)||(d[e]=s&&o(l,e)?l[e]:p("Symbol."+e)),d[e]}},8237:(e,t,i)=>{var n=i(6518),a=i(2652),o=i(9306),r=i(8551),s=i(1767),c=i(9539),l=i(4549),d=i(8745),p=i(9039),u=TypeError,y=p(function(){[].keys().reduce(function(){},void 0)}),f=!y&&l("reduce",u);n({target:"Iterator",proto:!0,real:!0,forced:y||f},{reduce:function(e){r(this);try{o(e)}catch(e){c(this,"throw",e)}var t=arguments.length<2,i=t?void 0:arguments[1];if(f)return d(f,this,t?[e]:[e,i]);var n=s(this),l=0;if(a(n,function(n){t?(t=!1,i=n):i=e(i,n,l),l++},{IS_RECORD:!0}),t)throw new u("Reduce of empty iterator with no initial value");return i}})},8480:(e,t,i)=>{var n=i(1828),a=i(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},8551:(e,t,i)=>{var n=i(34),a=String,o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(a(e)+" is not an object")}},8622:(e,t,i)=>{var n=i(4576),a=i(4901),o=n.WeakMap;e.exports=a(o)&&/native code/.test(String(o))},8686:(e,t,i)=>{var n=i(3724),a=i(9039);e.exports=n&&a(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8721:(e,t,i)=>{var n=i(3724),a=i(9504),o=i(2106),r=URLSearchParams.prototype,s=a(r.forEach);n&&!("size"in r)&&o(r,"size",{get:function(){var e=0;return s(this,function(){e++}),e},configurable:!0,enumerable:!0})},8727:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:(e,t,i)=>{var n=i(616),a=Function.prototype,o=a.apply,r=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?r.bind(o):function(){return r.apply(o,arguments)})},8773:(e,t)=>{var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!i.call({1:2},1);t.f=a?function(e){var t=n(this,e);return!!t&&t.enumerable}:i},8872:(e,t,i)=>{i(8237)},8981:(e,t,i)=>{var n=i(7750),a=Object;e.exports=function(e){return a(n(e))}},8992:(e,t,i)=>{i(8111)},9039:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},9297:(e,t,i)=>{var n=i(9504),a=i(8981),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(a(e),t)}},9306:(e,t,i)=>{var n=i(4901),a=i(6823),o=TypeError;e.exports=function(e){if(n(e))return e;throw new o(a(e)+" is not a function")}},9433:(e,t,i)=>{var n=i(4576),a=Object.defineProperty;e.exports=function(e,t){try{a(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},9462:(e,t,i)=>{var n=i(9565),a=i(2360),o=i(6699),r=i(6279),s=i(8227),c=i(1181),l=i(5966),d=i(7657).IteratorPrototype,p=i(2529),u=i(9539),y=i(1385),f=s("toStringTag"),m="IteratorHelper",g="WrapForValidIterator",h="normal",v="throw",b=c.set,w=function(e){var t=c.getterFor(e?g:m);return r(a(d),{next:function(){var i=t(this);if(e)return i.nextHandler();if(i.done)return p(void 0,!0);try{var n=i.nextHandler();return i.returnHandlerResult?n:p(n,i.done)}catch(e){throw i.done=!0,e}},return:function(){var i=t(this),a=i.iterator;if(i.done=!0,e){var o=l(a,"return");return o?n(o,a):p(void 0,!0)}if(i.inner)try{u(i.inner.iterator,h)}catch(e){return u(a,v,e)}if(i.openIters)try{y(i.openIters,h)}catch(e){return u(a,v,e)}return a&&u(a,h),p(void 0,!0)}})},x=w(!0),I=w(!1);o(I,f,"Iterator Helper"),e.exports=function(e,t,i){var n=function(n,a){a?(a.iterator=n.iterator,a.next=n.next):a=n,a.type=t?g:m,a.returnHandlerResult=!!i,a.nextHandler=e,a.counter=0,a.done=!1,b(this,a)};return n.prototype=t?x:I,n}},9504:(e,t,i)=>{var n=i(616),a=Function.prototype,o=a.call,r=n&&a.bind.bind(o,o);e.exports=n?r:function(e){return function(){return o.apply(e,arguments)}}},9519:(e,t,i)=>{var n,a,o=i(4576),r=i(2839),s=o.process,c=o.Deno,l=s&&s.versions||c&&c.version,d=l&&l.v8;d&&(a=(n=d.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!a&&r&&(!(n=r.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=r.match(/Chrome\/(\d+)/))&&(a=+n[1]),e.exports=a},9539:(e,t,i)=>{var n=i(9565),a=i(8551),o=i(5966);e.exports=function(e,t,i){var r,s;a(e);try{if(!(r=o(e,"return"))){if("throw"===t)throw i;return i}r=n(r,e)}catch(e){s=!0,r=e}if("throw"===t)throw i;if(s)throw r;return a(r),i}},9565:(e,t,i)=>{var n=i(616),a=Function.prototype.call;e.exports=n?a.bind(a):function(){return a.apply(a,arguments)}},9617:(e,t,i)=>{var n=i(5397),a=i(5610),o=i(6198),r=function(e){return function(t,i,r){var s=n(t),c=o(s);if(0===c)return!e&&-1;var l,d=a(r,c);if(e&&i!=i){for(;c>d;)if((l=s[d++])!=l)return!0}else for(;c>d;d++)if((e||d in s)&&s[d]===i)return e||d||0;return!e&&-1}};e.exports={includes:r(!0),indexOf:r(!1)}}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};i.r(n),i.d(n,{SeamlyStaticCore:()=>Ae,default:()=>Fe}),i(4114);const a=require("@seamly/web-ui"),o=require("preact");i(8992),i(2577),i(8872),i(4603),i(7566),i(8721);const r=require("preact/hooks");i(1454);const s={direction:"to_translation_locale",locale:"nl",translatedBy:"deep_l",data:{}};function c(e){switch(e.payload.type){case"image":case"text":case"choice_prompt":return{...e,payload:{...e.payload,translatedBody:{...s,data:{...e.payload.body,text:e.payload.body.text?`NL - ${e.payload.body.text}`:void 0,description:e.payload.body.description?`NL - ${e.payload.body.description}`:void 0,buttonText:e.payload.body.buttonText?`NL - ${e.payload.body.buttonText}`:void 0,choices:e.payload.body.choices?e.payload.body.choices.map(e=>({...e,text:`NL - ${e.text}`})):void 0,prompt:e.payload.body.prompt?{...e.payload.body.prompt,text:`NL - ${e.payload.body.prompt.text}`}:void 0}}}};default:return e}}const l={events:[],config:{layoutMode:"inline",accountConfig:{},hideOnNoUserResponse:!1,showDisclaimer:!1,showSuggestions:!0,preChat:!0},context:{},initialState:{},unreadEvents:0,loadedImageEventIds:[],isLoading:!1,idleDetachCountdown:{hasCountdown:!1,isActive:!1},resumeConversationPrompt:!1,visibility:{visibility:a.visibilityStates.open},serviceInfo:{activeServiceSessionId:""},participantInfo:{participants:{},currentAgent:""},headerTitles:{title:"Test title",subTitle:"Test subtitle"},interrupt:{error:void 0},historyLoaded:!1,skiplinkTargetId:(0,a.randomId)(),optionsButtonId:(0,a.randomId)(),serviceData:{},options:{features:{},panelActive:!1,optionActive:"",userSelectedOptions:{}},entryMeta:{default:"text",active:"text",userSelected:null,options:{},optionsOverride:{}},currentUploads:[],processingFileUploads:[]},d={participants:{agent:{id:"agent",service:{expose:{map:{},version:2},meta:{},name:null,service_session_id:null,settings:{}}},user:{id:"user",service:{expose:{map:{},version:2},meta:{},name:null,service_session_id:null,settings:{}}}},currentAgent:"agent"},p={type:"info",payload:{body:{subtype:"new_topic",type:"divider"},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),transactionId:"_1y9pz5fbyly",type:"divider"}},u={type:"info",payload:{body:{language:"Nederlands",restartButtonText:null,subtype:"new_translation",text:"[NL] Automatic translation to Dutch started. Please note that automatic translations may contain errors.",title:"[NL] Translating to Dutch",translationEnabled:!0,userLocale:"nl"},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),occurredAt:0x5c68711878df3,participant:null,service:{meta:{},name:null,serviceSessionId:null},transactionId:null,translatedBody:null,type:"divider"}},y={type:"info",payload:{body:{language:"Nederlands",subtype:"new_translation",text:"[NL] Automatic translation to Dutch started. Please note that automatic translations may contain errors.",translationEnabled:!0,userLocale:"nl"},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),occurredAt:0x5c68711878df3,participant:null,service:{meta:{},name:null,serviceSessionId:null},transactionId:null,translatedBody:null,type:"divider"}},f={type:"info",payload:{body:{language:"Nederlands",restartButtonText:"[NL] Start again",subtype:"new_translation",text:null,title:"[NL] Automatic translation to Dutch ended",translationEnabled:!1,userLocale:"nl"},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),occurredAt:0x5c68711878df3,participant:null,service:{meta:{},name:null,serviceSessionId:null},transactionId:null,translatedBody:null,type:"divider"}},m={type:"info",payload:{body:{text:"This is a system generated info message",type:"text"},fromClient:!1,id:(0,a.randomId)(),participant:null,service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:null,type:"text"}},g={type:"info",payload:{body:{key:["info","sendTranscript","accepted"],variables:{emailAddress:"test@test.com"}},fromClient:!1,id:(0,a.randomId)(),participant:null,service:{meta:{},name:null,serviceSessionId:null},transactionId:null,type:"translation"}},h={title:"You're talking to",subTitle:"Mrs. Bot"},v={type:"participant",payload:{fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"received",participant:{avatar:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjNEE0OEMxIiBkPSJNMTAsMTQuOGMtMS4xLDAtMi0wLjktMi0yczAuOS0yLDItMnMyLDAuOSwyLDJTMTEuMSwxNC44LDEwLDE0Ljh6IE0xNS45LDE0LjhjMS4xLDAsMi0wLjksMi0ycy0wLjktMi0yLTIKCXMtMiwwLjktMiwyUzE0LjgsMTQuOCwxNS45LDE0Ljh6IE0yMS44LDEwLjhjLTEuMSwwLTIsMC45LTIsMnMwLjksMiwyLDJzMi0wLjksMi0yUzIyLjksMTAuOCwyMS44LDEwLjh6IE0yMS4zLDE4LjFIMTAuNwoJQzExLjcsMjMuOSwyMC4yLDIzLjksMjEuMywxOC4xeiIvPgo8L3N2Zz4K",id:"agent",introduction:"You're now talking to Mrs. Bot gimme a minit",name:"Mrs. Bot",service:{expose:{map:{},version:2},meta:{},name:null,service_session_id:null,settings:{}}},transactionId:"d63655bf-1d3d-42cf-b14e-4da9e2b6a642",type:"participant"}},b={type:"participant",payload:{fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"received",participant:{introduction:"Welcome, you are now chatting with Mrs. Bot 2, give me a minit to read back the chat history.",id:"agent",avatar:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjNEE0OEMxIiBkPSJNMTAuMSwxNC45Yy0xLjEsMC0yLTAuOS0yLTJzMC45LTIsMi0yczIsMC45LDIsMlMxMS4yLDE0LjksMTAuMSwxNC45eiBNMjEuOSwxMC45Yy0xLjEsMC0yLDAuOS0yLDIKCXMwLjksMiwyLDJzMi0wLjksMi0yUzIzLDEwLjksMjEuOSwxMC45eiBNMjEuNCwxOC4ySDEwLjhDMTEuOCwyNCwyMC4zLDI0LDIxLjQsMTguMnogTTE3LjIsMjUuM2gtMi40Yy0wLjYsMC0xLjIsMC40LTEuNCwxCgljLTUuMS0wLjItOS4yLTQuNC05LjQtOS42YzAuMSwwLDAuMiwwLjEsMC40LDAuMWgwLjFjMC44LDAsMS40LTAuNiwxLjQtMS40di00LjdjMC0wLjgtMC42LTEuNC0xLjQtMS40aDBjLTAuOCwwLTEuNCwwLjYtMS40LDEuNAoJdjIuN3YydjEuMWMwLDUuOSw0LjcsMTAuNiwxMC41LDEwLjhjMC4yLDAuNSwwLjcsMC44LDEuMiwwLjhoMi40YzAuOCwwLDEuNC0wLjYsMS40LTEuNFMxOCwyNS4zLDE3LjIsMjUuM3oiLz4KPC9zdmc+Cg==",name:"Two",service:{expose:{map:{},version:3},meta:{},name:"new service",serviceSessionId:(0,a.randomId)(),settings:{}}},transactionId:(0,a.randomId)(),type:"participant"}},w={type:"participant",payload:{fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"received",participant:{id:"user",introduction:"You're now talking to Mrs. Bot gimme a minit",name:"Mrs. Bot",service:{expose:{map:{},version:2},meta:{},name:null,service_session_id:null,settings:{}}},transactionId:"d63655bf-1d3d-42cf-b14e-4da9e2b6a642",type:"participant"}},x=({type:e,data:t,text:i})=>({type:"message",payload:{body:{type:e,text:i,data:t},participant:"agent",service:{meta:{additions:{}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},fromClient:!1,fromHistory:!0,id:"4efacb4d-28a0-454e-8e36-3f17eb598c5d",messageStatus:"read",transactionId:"6f9beee7-ce82-418e-9bec-8001079aa769",transactionLast:!0,type:"custom"}}),I={type:"message",payload:{body:{text:"What do you want to do?",type:"text",data:void 0},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"b947b684-93df-4bd9-a8ea-e2f1b5a7a480",transactionLast:!1,type:"text"}},S={type:"message",payload:{type:"splash",id:(0,a.randomId)(),body:{text:"Example splash message ✨",type:"text",variables:{}}}},T={type:"message",payload:{body:{text:"What do you want to do? This is a really long message from a bot that has a lot to say about a lot of things. Currently I am contemplating my own bot existence and constantly asking myself who I am. What do you want to do? This is a really long message from a bot that has a lot to say about a lot of things. Currently I am contemplating my own bot existence and constantly asking myself who I am. What do you want to do? This is a really long message from a bot that has a lot to say about a lot of things. Currently I am contemplating my own bot existence and constantly asking myself who I am.",type:"text"},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"b947b684-93df-4bd9-a8ea-e2f1b5a7a480",transactionLast:!1,type:"text"}},M={type:"message",payload:{body:{text:"Bubble with <strong>bold</strong> <em>italic</em> <u>underline</u>",type:"text"},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},j={type:"message",payload:{body:{text:'<a href="https://google.com" data-link-id="1">Link in same window</a> and <a href="https://google.com" data-link-id="2" target="_blank">link in new window</a> embedded in text',type:"text"},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},E={type:"message",payload:{body:{text:'Here is a long link <a href="https://google.com" data-link-id="1">click me click me please click me yoohoooo please please click me here I am click me now what are you waiting for click me now now now now now click meeeeeeeeeeeeee</a> embedded in text',type:"text"},fromClient:!1,fromHistory:!0,id:"a964e54e-ea98-46ff-a952-979a47f162c0",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},L={type:"message",payload:{body:{text:"\n <ul>\n <li>Short list item</li>\n <li>This list item is longer to showcase different type lengths of text in list items and how they reflow in the browser</li>\n <li>\n This list item has a nested list with 3 items in it.\n <ul>\n <li>First item</li>\n <li>second item</li>\n <li>Third item</li>\n </ul>\n </li>\n <li>Another one just to be sure :)</li>\n </ul>\n ",type:"text"},fromClient:!1,fromHistory:!0,id:"f5351010-0def-452d-818f-ca22ac61792a",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},C={type:"message",payload:{body:{text:"\n <ol>\n <li>Short list item</li>\n <li>This list item is longer to showcase different type lengths of text in list items and how they reflow in the browser</li>\n <li>\n This list item has a nested list with 3 items in it.\n <ol>\n <li>First item</li>\n <li>second item</li>\n <li>Third item</li>\n </ol>\n </li>\n <li>Another one just to be sure :)</li>\n </ol>\n ",type:"text"},fromClient:!1,fromHistory:!0,id:"f5351010-0def-452d-818f-ca22ac61792a",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},O={type:"message",payload:{body:{description:"Plaatje",isZoomable:!1,type:"image",url:"https://developers.seamly.ai/clients/web-ui/static/photos/image-square-small.jpg"},fromClient:!1,fromHistory:!0,id:"b44ef42c-880c-43ff-b067-499e7f2e81f7",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"image"}},N={type:"message",payload:{body:{description:"Plaatje",isZoomable:!0,type:"image",url:"https://developers.seamly.ai/clients/web-ui/static/photos/image-portrait.jpg"},fromClient:!1,fromHistory:!0,id:"b44ef42c-880c-43ff-b067-499e7f2e81f8",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"image"}},A={type:"message",payload:{body:{description:"test",source:"youtube",type:"video",url:"https://www.youtube.com/embed/K7Hn1rPQouU"},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"video"}},k={type:"message",payload:{body:{choices:[{id:"703db9b3-2157-4d4a-9f9b-c382c6a10531",text:"Dialog (this is intentionally made longer for testing purposes)",type:"choice"},{id:"1eff6098-f14f-4683-a2b8-30d1c573d45e",text:"T-Dialog",type:"choice"},{id:"a8ba3ce8-3324-4e7a-accc-944ff78ac890",text:"Customers",type:"choice"},{id:"c89956ab-cf98-4b7e-9282-7087c988153d",text:"Features",type:"choice"},{id:"9fd9a28f-462d-4f07-9661-606dbe3b9466",category:"secondary",text:"Something else",type:"choice"}],chooseAgain:!0,prompt:{text:"Here are some choice prompt options to choose from",type:"text",variables:{}},type:"choice_prompt"},fromClient:!1,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"b947b684-93df-4bd9-a8ea-e2f1b5a7a480",transactionLast:!0,type:"choice_prompt"}},z={type:"message",payload:{body:{text:"This is what the user typed",type:"text"},fromClient:!0,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"read",participant:"user",transactionId:"1cdefea9-7437-4672-bcf8-2c75dc99244c",transactionLast:null,type:"text"}},P={type:"message",payload:{body:{text:"This is what the user typed. And sometimes the user has quite a lot to say and then we get longer lines that need to wrap well and not break the styling so here goes with just such a line right here!!",type:"text"},fromClient:!0,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"read",participant:"user",transactionId:"1cdefea9-7437-4672-bcf8-2c75dc99244c",transactionLast:null,type:"text"}},D={type:"message",payload:{body:{text:'<a href="https://google.com" data-link-id="1">Link in same window</a> and <a href="https://google.com" data-link-id="2" target="_blank">link in new window</a> embedded in text',type:"text"},fromClient:!0,fromHistory:!0,id:(0,a.randomId)(),messageStatus:"read",participant:"user",transactionId:"1cdefea9-7437-4672-bcf8-2c75dc99244c",transactionLast:null,type:"text"}},_={type:"upload",transactionId:(0,a.randomId)(),meta:{},body:{contentType:"plain/text",filename:"This-is-an-example.txt",filesize:12,id:(0,a.randomId)(),isDeleted:!1}},R={type:"upload",transactionId:(0,a.randomId)(),meta:{},body:{contentType:"application/pdf",filename:"This-is-a-sample.pdf",filesize:18810,id:"",isDeleted:!1,url:"https://pdfobject.com/pdf/sample.pdf"}},U={type:"upload",transactionId:(0,a.randomId)(),meta:{},body:{contentType:"image/jpeg",filename:"image-square-small.jpg",filesize:12020,id:"",isDeleted:!1,url:"https://developers.seamly.ai/clients/web-ui/static/photos/image-square-small.jpg"}},F={type:"message",payload:{..._,fromClient:!1,participant:"agent",id:(0,a.randomId)()}},H={type:"message",payload:{...R,fromClient:!1,participant:"agent",id:(0,a.randomId)()}},G={type:"message",payload:{...U,fromClient:!1,participant:"agent",id:(0,a.randomId)()}};sessionStorage.setItem(`image-${G.payload.id}`,G.payload.body.url);const B={...G,payload:{...G.payload,body:{...G.payload.body,isDeleted:!0,url:void 0},id:(0,a.randomId)()}},W={type:"message",payload:{...U,fromClient:!0,participant:"user",id:(0,a.randomId)()}};sessionStorage.setItem(`image-${W.payload.id}`,W.payload.body.url);const $={...W,payload:{...W.payload,id:(0,a.randomId)(),body:{...W.payload.body,url:null}}},q={isActive:!1,currentLocale:void 0,isAvailable:!1,showTranslationProposal:!1,languages:[],translatedEventGroups:{},containerId:(0,a.randomId)()},X=[{id:"1",question:"Invoices",categories:["mixed","short"]},{id:"2",question:"Temporary subscription pause",categories:["mixed","medium"]},{id:"3",question:"Cancellation",categories:["mixed","short"]},{id:"4",question:"Apps",categories:["mixed","medium"]},{id:"5",question:"At what date will my subscription end?",categories:["mixed","long"]},{id:"A",question:"Quotes",categories:["short"]},{id:"B",question:"How to get in touch with us",categories:["long"]}],J="unstarted",Y="messages",Z="errors",K="uploads",Q="features",V="options",ee="suggestions",te="minimizedWindow",ie="minimizedInline",ne="translations",ae={[J]:{heading:"Unstarted UI",description:"Test the loader here"},[Y]:{heading:"Messages",description:""},[Z]:{heading:"UI errors",description:""},[K]:{heading:"File uploads",description:""},[Q]:{heading:"Other features",description:""},[V]:{heading:"Options",description:""},[ee]:{heading:"Suggestions",description:""},[te]:{heading:"Minimized window",desciption:""},[ie]:{heading:"Minimized Inline",description:""},[ne]:{heading:"Translations",description:""}},oe={type:"message",payload:{type:"card",id:(0,a.randomId)(),body:{action:{ask:"",type:"ask"},buttonText:"Ask about pizzas!",description:"Pizza Margherita is a <strong>typical Neapolitan pizza</strong>.\n\nIt is made with San Marzano tomatoes, mozzarella cheese, fresh basil, salt, and extra-virgin olive oil.",image:"https://developers.seamly.ai/clients/web-ui/static/photos/card-square.jpg",title:"Pizza Margherita"}}},re={type:"message",payload:{type:"card",id:(0,a.randomId)(),body:{action:{link:"https://seamly.ai",newTab:!0,type:"navigate"},buttonText:"Order now!",description:"Pizza Margherita is a <strong>typical Neapolitan pizza</strong>.",image:"https://developers.seamly.ai/clients/web-ui/static/photos/card-landscape.jpg",title:"Pizza Margherita"}}},se={type:"message",payload:{type:"card",id:(0,a.randomId)(),body:{action:{topic:"Set topic",type:"topic"},buttonText:"Set topic! (title & description optional)",image:"https://developers.seamly.ai/clients/web-ui/static/photos/card-portrait.jpg"}}},ce={type:"message",payload:{type:"card",id:(0,a.randomId)(),body:{action:{ask:"",type:"ask"},buttonText:"Ask about pizzas!",description:"Pizza Margherita is a <strong>typical Neapolitan pizza</strong>.\n\nIt is made with San Marzano tomatoes, mozzarella cheese, fresh basil, salt, and extra-virgin olive oil.",title:"Pizza Margherita"}}},le={base:{category:J,headingText:"Standard with loader",description:"",...l,isLoading:!0},fullConversation:{category:Y,headingText:"Full demo conversation",description:"",...l,participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[v,m,I,{...k,payload:{...k.payload,id:`${k.payload.id}XXX`}},T,b,z,M,D,p,O,F,H,G,B,P,A,j,E,N,W,$,L,C,k]},userMessages:{category:Y,headingText:"User messages",description:"",...l,participantInfo:d,events:[z,P,W,$,D]},withParticipants:{category:Y,headingText:"Messages with participant info",description:"",...l,config:{...l.config,overrideMessages:{agent:{showAvatar:!0,showName:!0},user:{showName:!0,showAvatar:!0}}},participantInfo:d,events:[I,z,T,P]},textMessages:{category:Y,headingText:"Text messages",description:"",...l,participantInfo:d,events:[I,T,M,j,E,L,C]},imageVideoMessages:{category:Y,headingText:"Download, image and video messages",description:"",...l,participantInfo:d,events:[O,A,N,F,H,G,B,W,$]},systemMessages:{category:Y,headingText:"System messages",description:"",...l,config:{overrideMessages:{timeIndicator:{enabled:!0,threshold:36e5}}},participantInfo:d,events:[{type:"message",payload:{...I.payload,occurredAt:1e3*(Date.now()-432e6),id:(0,a.randomId)(),body:{text:"Long ago when a dialog started",type:"text"}}},v,w,b,p,g,...[u,f].map(c),m]},choicePromptMessages:{category:Y,headingText:"Choice prompt messages",description:"",...l,participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[{...k,payload:{...k.payload,id:`${k.payload.id}XXX`}},I,k]},choicePromptMessageWithoutManualInput:{category:Y,headingText:"Choice prompt message without manual input",description:"",...l,entryMeta:{...l.entryMeta,options:{text:{allowManualInput:!1}}},events:[k],participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"}},timeIndicators:{category:Y,headingText:"Time Indicators",description:"",...l,config:{overrideMessages:{timeIndicator:{enabled:!0,threshold:36e5}}},participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[{type:"message",payload:{...I.payload,occurredAt:1e3*(Date.now()-432e6),id:(0,a.randomId)(),body:{text:"Long ago when a dialog started",type:"text"}}},{type:"message",payload:{...I.payload,occurredAt:1e3*(Date.now()-3456e5),id:(0,a.randomId)(),body:{text:"Above me should be a time indicator showing the full date",type:"text"}}},{type:"message",payload:{...I.payload,occurredAt:1e3*(Date.now()+1-3456e5),id:(0,a.randomId)(),body:{text:"Another message",type:"text"}}},{type:"message",payload:{...I.payload,occurredAt:1e3*(Date.now()+2-3456e5),id:(0,a.randomId)(),body:{text:"And another message",type:"text"}}},{type:"message",payload:{...I.payload,occurredAt:1e3*(Date.now()-864e5),id:(0,a.randomId)(),body:{text:'Above me should be a time indicator showing "yesterday"',type:"text"}}},{type:"message",payload:{...I.payload,occurredAt:1e3*(Date.now()+1-864e5),id:(0,a.randomId)(),body:{text:"Another message",type:"text"}}},{type:"message",payload:{...I.payload,occurredAt:1e3*(Date.now()+2-864e5),id:(0,a.randomId)(),body:{text:"And another message",type:"text"}}},{type:"message",payload:{...I.payload,occurredAt:1e3*Date.now(),id:(0,a.randomId)(),body:{text:"Above me should be a time indicator showing me the dialog continues today",type:"text"}}}]},cards:{category:Y,headingText:"Cards",description:"",...l,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[oe,re,se,ce]},carousel:{category:Y,headingText:"Carousel",description:"",...l,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[{type:"message",payload:{type:"carousel",id:(0,a.randomId)(),body:{cards:[oe.payload.body,re.payload.body,se.payload.body,ce.payload.body]}}}]},errorWithAction:{category:Z,headingText:"Error with a user action",description:"",...l,interrupt:{error:new a.SeamlyGeneralError(new Error("general error"))}},errorWithoutAction:{category:Z,headingText:"Error without a user action",description:"",...l,interrupt:{error:new a.SeamlyOfflineError(new Error("seamly offline error"))}},privacyDisclaimer:{category:Q,headingText:"Privacy disclaimer",description:"",...l,config:{...l.config,showDisclaimer:!0}},characterLimit:{category:Q,headingText:"Input character limit",description:"",...l,entryMeta:{default:"text",active:"text",userSelected:null,options:{text:{limit:120}},optionsOverride:{}}},inputLabel:{category:Q,headingText:"Input label",...l,entryMeta:{default:"text",active:"text",options:{text:{limit:null}},optionsOverride:{text:{label:"What is your name?",limit:null,placeholder:"Please enter your name"}}}},inputLabelWithFileUploadToggle:{category:Q,headingText:"Input label with file upload toggle button",...l,options:{...l.options,features:{uploads:{enabled:!0}}},entryMeta:{default:"text",active:"text",options:{text:{limit:null}},optionsOverride:{text:{label:"What is the title of the uploaded document?",limit:null,placeholder:"Please enter the title of the document"}}}},abortTransactional:{category:Q,headingText:"Abort transaction",...l,events:[I,z],entryMeta:{default:"text",active:"text",options:{text:{limit:null}},optionsOverride:{},actions:{abortTransaction:{label:"Ask for another question",topicFallbackMessage:"Oops...",topicName:"abort_transaction"}},translatedActions:{}}},fileUploadToggle:{category:K,headingText:"File upload toggle button",description:"",...l,options:{...l.options,features:{uploads:{enabled:!0}}}},fileUploadToggleHidden:{category:K,headingText:"File upload toggle button hidden",description:"",...l,options:{...l.options,features:{uploads:{enabled:!1}}}},fileUploadInput:{category:K,headingText:"File upload input",description:"Click on upload button to see an error",styleGuideReset:!0,...l,config:{...l.config,accountConfig:{features:{uploads:!0}}},options:{...l.options,features:{uploads:{enabled:!0}}},entryMeta:{default:"text",active:"text",userSelected:"upload",options:{upload:{allowedMimeTypes:["image/*","application/pdf"],maxSize:10485760}},optionsOverride:{}}},fileUploadBusy:{category:K,headingText:"File upload in progress",description:"",styleGuideReset:!0,...l,config:{...l.config,accountConfig:{features:{uploads:!0}}},options:{...l.options,features:{uploads:{enabled:!0}}},entryMeta:{default:"text",active:"text",userSelected:"upload",options:{upload:{allowedMimeTypes:["image/*","application/pdf"],maxSize:10485760}},optionsOverride:{}},currentUploads:[{id:"_2olggurqhb4",name:"gGeyr3WepujbGn7khx.gif",progress:29,uploading:!0,complete:!1,error:"",uploadHandle:{abort:()=>{}}}]},fileUploadError:{category:K,headingText:"File upload errored",description:"",styleGuideReset:!0,...l,config:{...l.config,accountConfig:{features:{uploads:!0}}},options:{...l.options,features:{uploads:{enabled:!0}}},entryMeta:{default:"text",active:"text",userSelected:"upload",options:{upload:{allowedMimeTypes:["image/*","application/pdf"],maxSize:10485760}},optionsOverride:{}},currentUploads:[{id:"_2olggurqhb4",name:"gGeyr3WepujbGn7khx.gif",progress:0,uploading:!1,complete:!1,error:"Something went wrong with the upload",uploadHandle:{abort:()=>{}}}]},idleTimerCountdown:{category:Q,headingText:"Idle timer with countdown",description:"",...l,idleDetachCountdown:{hasCountdown:!0,isActive:!0,count:120,remaining:91,timer:{minutes:1,seconds:31}}},idleTimerNoCountdown:{category:Q,headingText:"Idle timer without countdown",description:"",...l,idleDetachCountdown:{hasCountdown:!0,isActive:!1,count:120,remaining:91,timer:{minutes:1,seconds:31}}},resumeConversationPrompt:{category:Q,headingText:"Resume conversation prompt",description:"",...l,participantInfo:d,resumeConversationPrompt:!0},optionsSingleTriggerAvailable:{category:V,headingText:"Single option available",description:"",...l,options:{...l.options,features:{sendTranscript:{enabled:!0}}}},optionsSingleTriggerUnavailable:{category:V,headingText:"Single option",description:"Option unavailable",...l,options:{...l.options,features:{sendTranscript:{enabled:!1}}}},optionsMultiple:{category:V,headingText:"Multiple options",description:"All options available",...l,options:{...l.options,features:{extraMenuItem:{enabled:!0},sendTranscript:{enabled:!0}}}},optionsMultipleUnavailable:{category:V,headingText:"Multiple options",description:"Some unavailable",...l,options:{...l.options,features:{extraMenuItem:{enabled:!1},sendTranscript:{enabled:!0}}}},optionSendTranscript:{category:V,headingText:"Send transcript option",description:"Press submit to view error message",...l,options:{...l.options,optionActive:"sendTranscript",panelActive:!0,features:{sendTranscript:{enabled:!0}}}},translationsAvailable:{category:ne,headingText:"Show translations available",description:"",...l,translations:{...q,isAvailable:!0,languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"}]}},translationsAvailableWithOptions:{category:ne,headingText:"Show translations available with other options available",description:"",...l,options:{...l.options,features:{sendTranscript:{enabled:!0}}},config:{...l.config,context:{...l.context,contentLocale:"nl",userLocale:"en"}},translations:{...q,isAvailable:!0,currentLocale:"lv",isActive:!0,languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"},{locale:"ar",nativeName:"Arabic"},{locale:"bg",nativeName:"Bulgarian"},{locale:"zh",nativeName:"Chinese"},{locale:"cs",nativeName:"Czech"},{locale:"da",nativeName:"Danish"},{locale:"et",nativeName:"Estonian"},{locale:"fi",nativeName:"Finnish"},{locale:"fr",nativeName:"French"},{locale:"de-informal",nativeName:"German"},{locale:"el",nativeName:"Greek"},{locale:"hu",nativeName:"Hungarian"},{locale:"it",nativeName:"Italian"},{locale:"ja",nativeName:"Japanese"},{locale:"lv",nativeName:"Latvian"},{locale:"pl",nativeName:"Polish"},{locale:"ro",nativeName:"Romanian"},{locale:"ru",nativeName:"Russian"},{locale:"sk",nativeName:"Slovak"},{locale:"sl",nativeName:"Slovenian"},{locale:"es-informal",nativeName:"Spanish"},{locale:"sv",nativeName:"Swedish"},{locale:"ti",nativeName:"Tigrinya"},{locale:"tr",nativeName:"Turkish"},{locale:"uk",nativeName:"Ukrainian"}]}},translationsActive:{category:ne,headingText:"Show translations active",description:"",...l,translations:{...q,currentLocale:"nl",isActive:!0,isAvailable:!0,languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"}]}},translationsActiveLarge:{category:ne,headingText:"Show translations active (large list)",description:"",...l,config:{...l.config,context:{...l.context,contentLocale:"nl",userLocale:"en"}},translations:{...q,currentLocale:"lv",isActive:!0,isAvailable:!0,languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"},{locale:"ar",nativeName:"Arabic"},{locale:"bg",nativeName:"Bulgarian"},{locale:"zh",nativeName:"Chinese"},{locale:"cs",nativeName:"Czech"},{locale:"da",nativeName:"Danish"},{locale:"et",nativeName:"Estonian"},{locale:"fi",nativeName:"Finnish"},{locale:"fr",nativeName:"French"},{locale:"de-informal",nativeName:"German"},{locale:"el",nativeName:"Greek"},{locale:"hu",nativeName:"Hungarian"},{locale:"it",nativeName:"Italian"},{locale:"ja",nativeName:"Japanese"},{locale:"lv",nativeName:"Latvian"},{locale:"pl",nativeName:"Polish"},{locale:"ro",nativeName:"Romanian"},{locale:"ru",nativeName:"Russian"},{locale:"sk",nativeName:"Slovak"},{locale:"sl",nativeName:"Slovenian"},{locale:"es-informal",nativeName:"Spanish"},{locale:"sv",nativeName:"Swedish"},{locale:"ti",nativeName:"Tigrinya"},{locale:"tr",nativeName:"Turkish"},{locale:"uk",nativeName:"Ukrainian"}]}},translationsFullConversation:{category:ne,headingText:"Show translated messages",description:"",...l,participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[u,m,I,{...k,payload:{...k.payload,id:`${k.payload.id}XXX`}},T,z,M,p,y,f,O,F,H,G,B,P,A,j,E,N,W,$,L,C,k,f].map(c),translations:{...q,currentLocale:"nl",isActive:!0,isAvailable:!0,translatedEventGroups:{[u.payload.id]:[m,I,{...k,payload:{...k.payload,id:`${k.payload.id}XXX`}},T,z,M,p].map(e=>e.payload.id),[y.payload.id]:[O,F,H,G,B,P,A,j,E,N,W,$,L,C,k].map(e=>e.payload.id)},languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"}]}},translationProposal:{category:ne,headingText:"Show translation proposal",description:"",...l,events:[I,z,P],config:{...l.config,showDisclaimer:!0,context:{contentLocale:"nl-informal",userLocale:"en-GB"}},translations:{...q,translationProposal:{buttonLabel:"Activate",proposedLocale:"en-GB",srDismissButtonText:"Dismiss translation proposal",titleLabel:"Do you want to chat in English?"},isAvailable:!0,isActive:!1,languages:[{locale:"nl-informal",nativeName:"Dutch"},{locale:"en-GB",nativeName:"English"}]}},translationProposalWithoutTitle:{category:ne,headingText:"Show translation proposal without title",description:"",...l,events:[I,z,P],config:{...l.config,showDisclaimer:!0,context:{contentLocale:"nl-informal",userLocale:"en-GB"}},translations:{...q,translationProposal:{buttonLabel:"Activate",proposedLocale:"en-GB",srDismissButtonText:"Dismiss translation proposal"},isAvailable:!0,isActive:!1,languages:[{locale:"nl-informal",nativeName:"Dutch"},{locale:"en-GB",nativeName:"English"}]}}},de={minimizedInline:{category:ie,headingText:"Inline minimized",description:"",inline:{...l,config:{...l.config,layoutMode:"inline"},visibility:{...l.visibility,visibility:a.visibilityStates.minimized}}},minimizedInlineCharacterLimit:{category:ie,headingText:"Inline minimized with limited characters",description:"",inline:{...l,config:{...l.config,layoutMode:"inline"},visibility:{...l.visibility,visibility:a.visibilityStates.minimized},entryMeta:{...l.entryMeta,options:{text:{limit:120}}}}},minimizedInlinePrechat:{category:ie,headingText:"Inline minimized with collapsed chat messages",description:"",inline:{...l,config:{...l.config,layoutMode:"inline",preChatEvents:[S]},visibility:{...l.visibility,visibility:a.visibilityStates.minimized}}},minimizedInlinePrechatSuggestions:{category:ie,headingText:"Inline minimized with collapsed chat messages & suggestions",description:"",inline:{...l,config:{...l.config,layoutMode:"inline",preChatEvents:[S]},serviceData:{suggestion:{body:X}},visibility:{...l.visibility,visibility:a.visibilityStates.minimized}}},inlineWithSuggestions:{category:ee,headingText:"Suggestions",description:"",inline:{...l,config:{...l.config,layoutMode:"inline"},visibility:{...l.visibility,visibility:a.visibilityStates.open},serviceData:{suggestion:{body:X}}}},minimizedInlineWithError:{category:ie,headingText:"Inline minimized with error",description:"",inline:{...l,config:{...l.config,layoutMode:"inline"},visibility:{...l.visibility,visibility:a.visibilityStates.minimized},interrupt:{error:new a.SeamlyOfflineError(new Error("seamly offline error"))}}}},pe={minimizedWindow:{category:te,headingText:"Unstarted minimized",description:"",window:{...l,config:{...l.config,layoutMode:"window"},visibility:{...l.visibility,visibility:a.visibilityStates.minimized}}},minimizedWindowStarted:{category:te,headingText:"Started minimized",description:"",window:{...l,config:{...l.config,layoutMode:"window"},visibility:{...l.visibility,visibility:a.visibilityStates.minimized},participantInfo:d,headerTitles:h}},minimizedWindowStartedUnread:{category:te,headingText:"Minimized with unread messages",description:"",window:{...l,config:{...l.config,layoutMode:"window"},visibility:{...l.visibility,visibility:a.visibilityStates.minimized},participantInfo:d,headerTitles:h,unreadEvents:12}}},ue={suggestionsMessage:{category:Y,headingText:"Suggestions message",description:"",...l,events:[x(I.payload.body),{type:"service_data",payload:{type:"suggestion",body:X}}]}},ye=(e,t=[])=>{const i={...le,fullConversation:{...le.fullConversation,events:[S,...le.fullConversation.events]},...ue,...t.reduce((e,t)=>{const{key:i,headingText:n,description:a,body:o}=t;return{...e,[i]:{category:Y,headingText:n,description:a,...l,participantInfo:d,events:[x(o)]}}},{})};return Object.keys(i).reduce((t,n)=>{const{headingText:a,category:o,description:r,...s}=i[n];return{...t,[n]:{headingText:a,description:r,category:o,...e.reduce((e,t)=>({...e,[t]:{...s,config:{...s.config,layoutMode:t}}}),{})}}},{})};i(4520),require("preact/compat");const fe=require("preact/jsx-runtime"),me=({setSelectedState:e,states:t,headingLevel:i})=>{const n=`h${i.toString()}`,o=`h${(parseInt(i,10)+1).toString()}`,r=(0,a.getUrlSearchParams)();return(0,fe.jsx)("nav",{"aria-label":"Style guide navigation",className:"nav--styleguide",children:(0,fe.jsx)("ol",{className:"list--styleguidestates",children:Object.keys(ae).map(i=>{const{heading:s,description:c}=ae[i],l=Object.keys(t).filter(e=>{const{category:n}=t[e];return n===i});return l.length>0&&(0,fe.jsxs)("li",{children:[(0,fe.jsx)(n,{children:s}),(0,fe.jsx)("span",{className:"category__description",children:c}),(0,fe.jsx)("ol",{children:l.map(i=>{const n={...t[i]};delete n.category;const{headingText:s,descriptionId:c,description:l,...d}=n;return(0,fe.jsxs)("li",{children:[(0,fe.jsx)(o,{id:c,children:s}),l&&(0,fe.jsx)("span",{className:"feature__description",children:l}),(0,fe.jsx)("ul",{className:"list--styleguidelayouts",children:Object.keys(d).map(t=>(0,fe.jsx)("li",{className:t===r?.layoutMode&&i===r?.feature?"state__selected":void 0,children:(0,fe.jsx)("a",{"aria-describedby":c,href:`${window.location.pathname}?${(0,a.getUrlSearchString)({layoutMode:t,feature:i})}`,"aria-current":t===r?.layoutMode&&i===r?.feature?"page":void 0,onClick:n=>{if(n.preventDefault(),"inline"===t){const e=window.document.querySelector(".chat-inline");e&&window.scroll({top:e.offsetTop,behavior:"smooth"})}var o;o={layoutMode:t,feature:i},window.history.pushState(null,"",`${window.location.pathname}?${(0,a.getUrlSearchString)(o)}`),e(o)},children:t.charAt(0).toUpperCase()+t.slice(1)})},t))})]},i)})})]},i)})})})};function ge(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}i(3949);var he=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),ve=()=>Math.random().toString(36).substring(7).split("").join("."),be={INIT:`@@redux/INIT${ve()}`,REPLACE:`@@redux/REPLACE${ve()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ve()}`};function we(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function xe(e,t,i){if("function"!=typeof e)throw new Error(ge(2));if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(ge(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(ge(1));return i(xe)(e,t)}let n=e,a=t,o=new Map,r=o,s=0,c=!1;function l(){r===o&&(r=new Map,o.forEach((e,t)=>{r.set(t,e)}))}function d(){if(c)throw new Error(ge(3));return a}function p(e){if("function"!=typeof e)throw new Error(ge(4));if(c)throw new Error(ge(5));let t=!0;l();const i=s++;return r.set(i,e),function(){if(t){if(c)throw new Error(ge(6));t=!1,l(),r.delete(i),o=null}}}function u(e){if(!we(e))throw new Error(ge(7));if(void 0===e.type)throw new Error(ge(8));if("string"!=typeof e.type)throw new Error(ge(17));if(c)throw new Error(ge(9));try{c=!0,a=n(a,e)}finally{c=!1}return(o=r).forEach(e=>{e()}),e}return u({type:be.INIT}),{dispatch:u,subscribe:p,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(ge(10));n=e,u({type:be.REPLACE})},[he]:function(){const e=p;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(ge(11));function i(){const e=t;e.next&&e.next(d())}return i(),{unsubscribe:e(i)}},[he](){return this}}}}}function Ie(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...i)=>e(t(...i)))}function Se(e){return({dispatch:t,getState:i})=>n=>a=>"function"==typeof a?a(t,i,e):n(a)}var Te=Se(),Me=Se,je="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Ie:Ie.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Ee=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}},Le=e=>t=>{setTimeout(t,e)};function Ce(e){const t=function(e){const{thunk:t=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=e??{};let o=new Ee;return t&&("boolean"==typeof t?o.push(Te):o.push(Me(t.extraArgument))),o},{reducer:i,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:o=!0,preloadedState:r,enhancers:s}=e||{};let c,l;if("function"==typeof i)c=i;else{if(!we(i))throw new Error(`Minified Redux Toolkit error #${d=1}; visit https://redux-toolkit.js.org/Errors?code=${d} for the full message or use the non-minified dev environment for full errors. `);c=function(e){const t=Object.keys(e),i={};for(let n=0;n<t.length;n++){const a=t[n];"function"==typeof e[a]&&(i[a]=e[a])}const n=Object.keys(i);let a;try{!function(e){Object.keys(e).forEach(t=>{const i=e[t];if(void 0===i(void 0,{type:be.INIT}))throw new Error(ge(12));if(void 0===i(void 0,{type:be.PROBE_UNKNOWN_ACTION()}))throw new Error(ge(13))})}(i)}catch(e){a=e}return function(e={},t){if(a)throw a;let o=!1;const r={};for(let a=0;a<n.length;a++){const s=n[a],c=i[s],l=e[s],d=c(l,t);if(void 0===d)throw t&&t.type,new Error(ge(14));r[s]=d,o=o||d!==l}return o=o||n.length!==Object.keys(e).length,o?r:e}}(i)}var d;l="function"==typeof n?n(t):t();let p=Ie;a&&(p=je({trace:!1,..."object"==typeof a&&a}));const u=function(...e){return t=>(i,n)=>{const a=t(i,n);let o=()=>{throw new Error(ge(15))};const r={getState:a.getState,dispatch:(e,...t)=>o(e,...t)},s=e.map(e=>e(r));return o=Ie(...s)(a.dispatch),{...a,dispatch:o}}}(...l),y=(e=>function(t){const{autoBatch:i=!0}=t??{};let n=new Ee(e);return i&&n.push(((e={type:"raf"})=>t=>(...i)=>{const n=t(...i);let a=!0,o=!1,r=!1;const s=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Le(10):"callback"===e.type?e.queueNotification:Le(e.timeout),l=()=>{r=!1,o&&(o=!1,s.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){const t=n.subscribe(()=>a&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return a=!e?.meta?.RTK_autoBatch,o=!a,o&&(r||(r=!0,c(l))),n.dispatch(e)}finally{a=!0}}})})("object"==typeof i?i:void 0)),n})(u);return xe(c,r,p(..."function"==typeof s?s(y):y()))}var{assign:Oe}=Object;Symbol.for("rtk-state-proxy-original");const Ne={send:()=>{},store:{get:e=>e,set:e=>e,delete:e=>e},sendContext:()=>{},hasConversation:()=>!1,connected:!1},Ae=({state:e,translations:t,participants:i=[],children:n})=>{const o=(0,r.useRef)(()=>{}),s=(0,r.useRef)({emit:()=>{},on:()=>{},off:()=>{}}),c=(0,r.useMemo)(()=>{const{translations:n,interrupt:o,config:r,visibility:c,...l}=e||{},d=Ce({reducer:{state:a.stateReducer,app:a.appReducer,config:a.configReducer,i18n:a.i18nReducer,translations:a.translationReducer,visibility:a.visibilityReducer,forms:a.formsReducer,interrupt:a.interruptReducer},preloadedState:{state:l,config:r,translations:n,interrupt:o,visibility:c},middleware:e=>e({thunk:{extraArgument:{api:Ne,eventBus:s.current}},serializableCheck:!1})}),{config:p}=d.getState();return d.dispatch((0,a.setConfig)(p)),p.preChatEvents&&d.dispatch((0,a.setPreChatEvents)(p.preChatEvents)),d.dispatch((0,a.setInitialLocale)("en-GB")),d.dispatch((0,a.setTranslations)(t)),i.forEach(e=>{d.dispatch((0,a.setParticipant)({participant:e,fromClient:"user"===e?.id}))}),d},[i,e,t]);return e&&(0,fe.jsx)(a.SeamlyStoreProvider,{store:c,children:(0,fe.jsx)(a.SeamlyEventBusContext.Provider,{value:s.current,children:(0,fe.jsx)(a.SeamlyApiContext.Provider,{value:Ne,children:(0,fe.jsx)(a.SeamlyLiveRegionContext.Provider,{value:o.current,children:(0,fe.jsx)(a.ComponentFilter,{children:(0,fe.jsx)(a.SeamlyActivityEventContext.Provider,{value:()=>{},children:(0,fe.jsx)(a.SeamlyFileUpload,{children:n})})})})})})})},ke=({state:e,customComponents:t={},translations:i,participants:n})=>{const[o,s]=(0,r.useState)(!0),{config:c}=e||{},{layoutMode:l}=c||{},d=t[l];return(0,r.useEffect)(()=>{s(!1),requestAnimationFrame(async()=>{await(0,a.timeout)(60),s(!0)})},[e]),o?d?(0,fe.jsx)(Ae,{state:e,translations:i,participants:n,children:(0,fe.jsx)(d,{})}):(0,fe.jsx)(Ae,{state:e,translations:i,participants:n,children:(0,fe.jsx)(a.View,{})}):null},ze=({tag:e,id:t,children:i})=>{const n=e;return(0,fe.jsx)(n,{id:t,children:i})},Pe=({config:e,styleGuideConfig:t,translations:i,headingLevel:n=2,participants:o})=>{const[s,c]=(0,r.useState)(null),[p,u]=(0,r.useState)(""),[y,f]=(0,r.useState)(!0),[m]=(0,r.useState)((0,a.randomId)()),{stateUpdateCallback:g,customMessageEventBodies:v}=t,[b]=(0,r.useState)(()=>{const e=(i=t.showLayoutModes||["inline","window"],{...ye(i,v),...-1!==i.indexOf("window")?{...pe,minimizedWindowPrechat:{category:te,headingText:"Minimized with collapsed chat messages",description:"",window:{...l,config:{...l.config,layoutMode:"window",preChatEvents:[S]},visibility:{...l.visibility,visibility:a.visibilityStates.minimized},participantInfo:d,headerTitles:h}},minimizedWindowPrechatDelayed:{category:te,headingText:"Minimized with delayed collapsed chat messages",description:"",window:{...l,config:{...l.config,layoutMode:"window",preChatEvents:[S],preChat:{enterDelay:1e3,exitAfter:3e3}},visibility:{...l.visibility,visibility:a.visibilityStates.minimized},participantInfo:d,headerTitles:h}},minimizedWindowPrechatDisabled:{category:te,headingText:"Minimized with disabled collapsed chat messages",description:"",window:{...l,config:{...l.config,layoutMode:"window",preChatEvents:[S],preChat:!1},visibility:{...l.visibility,visibility:a.visibilityStates.minimized},participantInfo:d,headerTitles:h}}}:{},...de});var i;return Object.keys(e).reduce((t,i)=>({...t,[i]:{...e[i],descriptionId:(0,a.randomId)()}}),{})}),w=(0,r.useCallback)(e=>{c(g?g(e):e)},[c,g]),x=(0,r.useCallback)((t,i)=>{const n=(0,a.getSearchParamsByKeys)("apiKey","locale"),r=new URLSearchParams({...n,layoutMode:t,feature:i});window.history.replaceState(null,"",`?${r}`);const{headingText:s}=b[i];u(s);const c=b[i][t],{overrideMessages:l,showSuggestions:d}=c.config,p=o.find(e=>"agent"===e.id);return{...c,config:{...c.config,...e,showDisclaimer:c.config.showDisclaimer||e.showDisclaimer,context:{...e.context,...c.config?.context},layoutMode:c.config.layoutMode,...l?{messages:l}:{},showSuggestions:d},headerTitles:{...c.headerTitles,subTitle:p?.name||c.headerTitles.subTitle}}},[b,o,e]);(0,r.useEffect)(()=>{if(y){const e=document.querySelector('[aria-modal="true"]');e&&e.addEventListener("click",()=>{c(e=>e?{...e,visibility:{...e.visibility,visible:"minimized"}}:e)})}},[s,c,y]);const I=(0,r.useCallback)(()=>{const e=(0,a.getUrlSearchParams)(),{layoutMode:t,feature:i}={layoutMode:"inline",feature:"base",...e};w(x(t,i)),window.document.title="Style"},[x,w]);return(0,r.useEffect)(()=>{I()},[I]),(0,r.useEffect)(()=>{window.onpopstate=()=>{I()}},[I]),(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsxs)("section",{className:"chat-inline","aria-labelledby":m,children:[(0,fe.jsxs)(ze,{tag:`h${n.toString()}`,id:m,children:[(0,fe.jsx)("span",{className:"heading__context",children:"Current selected state:"}),`${p}`]}),(0,fe.jsx)("div",{children:y&&(0,fe.jsx)(ke,{customComponents:t.customComponents,translations:i,state:s,participants:o})})]}),(0,fe.jsx)("aside",{className:"page-aside markdown",children:(0,fe.jsx)("nav",{className:"page-controls",children:(0,fe.jsx)(me,{headingLevel:n,setSelectedState:({layoutMode:e,feature:t})=>{const i=x(e,t);w(i),i.styleGuideReset&&(f(!1),setTimeout(()=>{f(!0)}))},states:b})})})]})};class De extends a.Engine{constructor({styleGuideConfig:e,...t},i){super(t,i),this.styleGuideConfig=e||{}}async render(){const e={...this.config.customComponents||{},view:void 0},t=new a.API({namespace:this.config.namespace||"",config:this.config.api,context:this.config.context,layoutMode:this.config.layoutMode}),i=await t.getTranslations(this.config.context?.userLocale||"en-GB"),{agentParticipant:n,userParticipant:r}=await t.getConfig(),s=[{id:"user",...r},{id:"agent",introduction:"I am {{name}}",...n}],c={...this.config,customComponents:Object.keys(e).length?e:void 0};(0,o.render)((0,fe.jsx)(Pe,{config:c,styleGuideConfig:this.styleGuideConfig,translations:i,participants:s}),this.parentElement)}}const _e=De;class Re extends a.ExternalApi{constructor(e,t){super(e),this.styleGuideConfig=t}createInstance(e){const{userStyleGuideConfig:t,...i}=e;return new _e({styleGuideConfig:{...this.styleGuideConfig,...t},...i},this)}getUserConfig(e={},t){return super.getUserConfig({...e,...t})}}const Ue=Re,Fe=function(e,t){if(window.seamlyStyleGuide&&!Array.isArray(window.seamlyStyleGuide))throw new Error("Seamly UI has already been initialised. Use the window.seamly object to start new instances instead.");const i=Array.isArray(window.seamlyStyleGuide)?window.seamlyStyleGuide:[],n=new Ue(e,t);window.seamly=n,window.seamlyStyleGuide={push:n.push.bind(n)},n.push(...i)};module.exports=n})();
1
+ (()=>{"use strict";var e={34:(e,t,i)=>{var n=i(4901);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},81:(e,t,i)=>{var n=i(9565),o=i(9306),a=i(8551),r=i(6823),s=i(851),c=TypeError;e.exports=function(e,t){var i=arguments.length<2?s(e):t;if(o(i))return a(n(i,e));throw new c(r(e)+" is not iterable")}},116:(e,t,i)=>{var n=i(6518),o=i(9565),a=i(2652),r=i(9306),s=i(8551),c=i(1767),l=i(9539),d=i(4549)("find",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:d},{find:function(e){s(this);try{r(e)}catch(e){l(this,"throw",e)}if(d)return o(d,this,e);var t=c(this),i=0;return a(t,function(t,n){if(e(t,i++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},283:(e,t,i)=>{var n=i(9504),o=i(9039),a=i(4901),r=i(9297),s=i(3724),c=i(350).CONFIGURABLE,l=i(3706),d=i(1181),u=d.enforce,p=d.get,f=String,y=Object.defineProperty,m=n("".slice),h=n("".replace),g=n([].join),v=s&&!o(function(){return 8!==y(function(){},"length",{value:8}).length}),b=String(String).split("String"),w=e.exports=function(e,t,i){"Symbol("===m(f(t),0,7)&&(t="["+h(f(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!r(e,"name")||c&&e.name!==t)&&(s?y(e,"name",{value:t,configurable:!0}):e.name=t),v&&i&&r(i,"arity")&&e.length!==i.arity&&y(e,"length",{value:i.arity});try{i&&r(i,"constructor")&&i.constructor?s&&y(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=u(e);return r(n,"source")||(n.source=g(b,"string"==typeof t?t:"")),e};Function.prototype.toString=w(function(){return a(this)&&p(this).source||l(this)},"toString")},350:(e,t,i)=>{var n=i(3724),o=i(9297),a=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,s=o(a,"name"),c=s&&"something"===function(){}.name,l=s&&(!n||n&&r(a,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},397:(e,t,i)=>{var n=i(7751);e.exports=n("document","documentElement")},421:e=>{e.exports={}},616:(e,t,i)=>{var n=i(9039);e.exports=!n(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},655:(e,t,i)=>{var n=i(6955),o=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},679:(e,t,i)=>{var n=i(1625),o=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new o("Incorrect invocation")}},684:e=>{e.exports=function(e,t){var i="function"==typeof Iterator&&Iterator.prototype[e];if(i)try{i.call({next:null},t).next()}catch(e){return!0}}},741:e=>{var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?i:t)(n)}},757:(e,t,i)=>{var n=i(7751),o=i(4901),a=i(1625),r=i(7040),s=Object;e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&a(t.prototype,s(e))}},851:(e,t,i)=>{var n=i(6955),o=i(5966),a=i(4117),r=i(6269),s=i(8227)("iterator");e.exports=function(e){if(!a(e))return o(e,s)||o(e,"@@iterator")||r[n(e)]}},1072:(e,t,i)=>{var n=i(1828),o=i(8727);e.exports=Object.keys||function(e){return n(e,o)}},1181:(e,t,i)=>{var n,o,a,r=i(8622),s=i(4576),c=i(34),l=i(6699),d=i(9297),u=i(7629),p=i(6119),f=i(421),y="Object already initialized",m=s.TypeError,h=s.WeakMap;if(r||u.state){var g=u.state||(u.state=new h);g.get=g.get,g.has=g.has,g.set=g.set,n=function(e,t){if(g.has(e))throw new m(y);return t.facade=e,g.set(e,t),t},o=function(e){return g.get(e)||{}},a=function(e){return g.has(e)}}else{var v=p("state");f[v]=!0,n=function(e,t){if(d(e,v))throw new m(y);return t.facade=e,l(e,v,t),t},o=function(e){return d(e,v)?e[v]:{}},a=function(e){return d(e,v)}}e.exports={set:n,get:o,has:a,enforce:function(e){return a(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var i;if(!c(t)||(i=o(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return i}}}},1291:(e,t,i)=>{var n=i(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},1385:(e,t,i)=>{var n=i(9539);e.exports=function(e,t,i){for(var o=e.length-1;o>=0;o--)if(void 0!==e[o])try{i=n(e[o].iterator,t,i)}catch(e){t="throw",i=e}if("throw"===t)throw i;return i}},1454:(e,t,i)=>{i(1701)},1625:(e,t,i)=>{var n=i(9504);e.exports=n({}.isPrototypeOf)},1701:(e,t,i)=>{var n=i(6518),o=i(9565),a=i(9306),r=i(8551),s=i(1767),c=i(9462),l=i(6319),d=i(9539),u=i(684),p=i(4549),f=i(6395),y=!f&&!u("map",function(){}),m=!f&&!y&&p("map",TypeError),h=f||y||m,g=c(function(){var e=this.iterator,t=r(o(this.next,e));if(!(this.done=!!t.done))return l(e,this.mapper,[t.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:h},{map:function(e){r(this);try{a(e)}catch(e){d(this,"throw",e)}return m?o(m,this,e):new g(s(this),{mapper:e})}})},1767:e=>{e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},1828:(e,t,i)=>{var n=i(9504),o=i(9297),a=i(5397),r=i(9617).indexOf,s=i(421),c=n([].push);e.exports=function(e,t){var i,n=a(e),l=0,d=[];for(i in n)!o(s,i)&&o(n,i)&&c(d,i);for(;t.length>l;)o(n,i=t[l++])&&(~r(d,i)||c(d,i));return d}},2106:(e,t,i)=>{var n=i(283),o=i(4913);e.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),o.f(e,t,i)}},2140:(e,t,i)=>{var n={};n[i(8227)("toStringTag")]="z",e.exports="[object z]"===String(n)},2195:(e,t,i)=>{var n=i(9504),o=n({}.toString),a=n("".slice);e.exports=function(e){return a(o(e),8,-1)}},2211:(e,t,i)=>{var n=i(9039);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},2360:(e,t,i)=>{var n,o=i(8551),a=i(6801),r=i(8727),s=i(421),c=i(397),l=i(4055),d=i(6119),u="prototype",p="script",f=d("IE_PROTO"),y=function(){},m=function(e){return"<"+p+">"+e+"</"+p+">"},h=function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,i;g="undefined"!=typeof document?document.domain&&n?h(n):(t=l("iframe"),i="java"+p+":",t.style.display="none",c.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F):h(n);for(var o=r.length;o--;)delete g[u][r[o]];return g()};s[f]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(y[u]=o(e),i=new y,y[u]=null,i[f]=e):i=g(),void 0===t?i:a.f(i,t)}},2489:(e,t,i)=>{var n=i(6518),o=i(9565),a=i(9306),r=i(8551),s=i(1767),c=i(9462),l=i(6319),d=i(6395),u=i(9539),p=i(684),f=i(4549),y=!d&&!p("filter",function(){}),m=!d&&!y&&f("filter",TypeError),h=d||y||m,g=c(function(){for(var e,t,i=this.iterator,n=this.predicate,a=this.next;;){if(e=r(o(a,i)),this.done=!!e.done)return;if(t=e.value,l(i,n,[t,this.counter++],!0))return t}});n({target:"Iterator",proto:!0,real:!0,forced:h},{filter:function(e){r(this);try{a(e)}catch(e){u(this,"throw",e)}return m?o(m,this,e):new g(s(this),{predicate:e})}})},2529:e=>{e.exports=function(e,t){return{value:e,done:t}}},2577:(e,t,i)=>{i(116)},2652:(e,t,i)=>{var n=i(6080),o=i(9565),a=i(8551),r=i(6823),s=i(4209),c=i(6198),l=i(1625),d=i(81),u=i(851),p=i(9539),f=TypeError,y=function(e,t){this.stopped=e,this.result=t},m=y.prototype;e.exports=function(e,t,i){var h,g,v,b,w,x,S,I=i&&i.that,T=!(!i||!i.AS_ENTRIES),j=!(!i||!i.IS_RECORD),M=!(!i||!i.IS_ITERATOR),_=!(!i||!i.INTERRUPTED),E=n(t,I),C=function(e){return h&&p(h,"normal"),new y(!0,e)},L=function(e){return T?(a(e),_?E(e[0],e[1],C):E(e[0],e[1])):_?E(e,C):E(e)};if(j)h=e.iterator;else if(M)h=e;else{if(!(g=u(e)))throw new f(r(e)+" is not iterable");if(s(g)){for(v=0,b=c(e);b>v;v++)if((w=L(e[v]))&&l(m,w))return w;return new y(!1)}h=d(e,g)}for(x=j?e.next:h.next;!(S=o(x,h)).done;){try{w=L(S.value)}catch(e){p(h,"throw",e)}if("object"==typeof w&&w&&l(m,w))return w}return new y(!1)}},2777:(e,t,i)=>{var n=i(9565),o=i(34),a=i(757),r=i(5966),s=i(4270),c=i(8227),l=TypeError,d=c("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var i,c=r(e,d);if(c){if(void 0===t&&(t="default"),i=n(c,e,t),!o(i)||a(i))return i;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},2787:(e,t,i)=>{var n=i(9297),o=i(4901),a=i(8981),r=i(6119),s=i(2211),c=r("IE_PROTO"),l=Object,d=l.prototype;e.exports=s?l.getPrototypeOf:function(e){var t=a(e);if(n(t,c))return t[c];var i=t.constructor;return o(i)&&t instanceof i?i.prototype:t instanceof l?d:null}},2796:(e,t,i)=>{var n=i(9039),o=i(4901),a=/#|\.prototype\./,r=function(e,t){var i=c[s(e)];return i===d||i!==l&&(o(t)?n(t):!!t)},s=r.normalize=function(e){return String(e).replace(a,".").toLowerCase()},c=r.data={},l=r.NATIVE="N",d=r.POLYFILL="P";e.exports=r},2812:e=>{var t=TypeError;e.exports=function(e,i){if(e<i)throw new t("Not enough arguments");return e}},2839:(e,t,i)=>{var n=i(4576).navigator,o=n&&n.userAgent;e.exports=o?String(o):""},3392:(e,t,i)=>{var n=i(9504),o=0,a=Math.random(),r=n(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++o+a,36)}},3706:(e,t,i)=>{var n=i(9504),o=i(4901),a=i(7629),r=n(Function.toString);o(a.inspectSource)||(a.inspectSource=function(e){return r(e)}),e.exports=a.inspectSource},3717:(e,t)=>{t.f=Object.getOwnPropertySymbols},3724:(e,t,i)=>{var n=i(9039);e.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3949:(e,t,i)=>{i(7588)},4055:(e,t,i)=>{var n=i(4576),o=i(34),a=n.document,r=o(a)&&o(a.createElement);e.exports=function(e){return r?a.createElement(e):{}}},4114:(e,t,i)=>{var n=i(6518),o=i(8981),a=i(6198),r=i(4527),s=i(6837);n({target:"Array",proto:!0,arity:1,forced:i(9039)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=o(this),i=a(t),n=arguments.length;s(i+n);for(var c=0;c<n;c++)t[i]=arguments[c],i++;return r(t,i),i}})},4117:e=>{e.exports=function(e){return null==e}},4209:(e,t,i)=>{var n=i(8227),o=i(6269),a=n("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||r[a]===e)}},4270:(e,t,i)=>{var n=i(9565),o=i(4901),a=i(34),r=TypeError;e.exports=function(e,t){var i,s;if("string"===t&&o(i=e.toString)&&!a(s=n(i,e)))return s;if(o(i=e.valueOf)&&!a(s=n(i,e)))return s;if("string"!==t&&o(i=e.toString)&&!a(s=n(i,e)))return s;throw new r("Can't convert object to primitive value")}},4376:(e,t,i)=>{var n=i(2195);e.exports=Array.isArray||function(e){return"Array"===n(e)}},4495:(e,t,i)=>{var n=i(9519),o=i(9039),a=i(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4520:(e,t,i)=>{i(2489)},4527:(e,t,i)=>{var n=i(3724),o=i(4376),a=TypeError,r=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(o(e)&&!r(e,"length").writable)throw new a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4549:(e,t,i)=>{var n=i(4576);e.exports=function(e,t){var i=n.Iterator,o=i&&i.prototype,a=o&&o[e],r=!1;if(a)try{a.call({next:function(){return{done:!0}},return:function(){r=!0}},-1)}catch(e){e instanceof t||(r=!1)}if(!r)return a}},4576:function(e,t,i){var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4603:(e,t,i)=>{var n=i(6840),o=i(9504),a=i(655),r=i(2812),s=URLSearchParams,c=s.prototype,l=o(c.append),d=o(c.delete),u=o(c.forEach),p=o([].push),f=new s("a=1&a=2&b=3");f.delete("a",1),f.delete("b",void 0),f+""!="a=2"&&n(c,"delete",function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return d(this,e);var n=[];u(this,function(e,t){p(n,{key:t,value:e})}),r(t,1);for(var o,s=a(e),c=a(i),f=0,y=0,m=!1,h=n.length;f<h;)o=n[f++],m||o.key===s?(m=!0,d(this,o.key)):y++;for(;y<h;)(o=n[y++]).key===s&&o.value===c||l(this,o.key,o.value)},{enumerable:!0,unsafe:!0})},4659:(e,t,i)=>{var n=i(3724),o=i(4913),a=i(6980);e.exports=function(e,t,i){n?o.f(e,t,a(0,i)):e[t]=i}},4901:e=>{var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},4913:(e,t,i)=>{var n=i(3724),o=i(5917),a=i(8686),r=i(8551),s=i(6969),c=TypeError,l=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u="enumerable",p="configurable",f="writable";t.f=n?a?function(e,t,i){if(r(e),t=s(t),r(i),"function"==typeof e&&"prototype"===t&&"value"in i&&f in i&&!i[f]){var n=d(e,t);n&&n[f]&&(e[t]=i.value,i={configurable:p in i?i[p]:n[p],enumerable:u in i?i[u]:n[u],writable:!1})}return l(e,t,i)}:l:function(e,t,i){if(r(e),t=s(t),r(i),o)try{return l(e,t,i)}catch(e){}if("get"in i||"set"in i)throw new c("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},5031:(e,t,i)=>{var n=i(7751),o=i(9504),a=i(8480),r=i(3717),s=i(8551),c=o([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=a.f(s(e)),i=r.f;return i?c(t,i(e)):t}},5397:(e,t,i)=>{var n=i(7055),o=i(7750);e.exports=function(e){return n(o(e))}},5610:(e,t,i)=>{var n=i(1291),o=Math.max,a=Math.min;e.exports=function(e,t){var i=n(e);return i<0?o(i+t,0):a(i,t)}},5745:(e,t,i)=>{var n=i(7629);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},5917:(e,t,i)=>{var n=i(3724),o=i(9039),a=i(4055);e.exports=!n&&!o(function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},5966:(e,t,i)=>{var n=i(9306),o=i(4117);e.exports=function(e,t){var i=e[t];return o(i)?void 0:n(i)}},6080:(e,t,i)=>{var n=i(7476),o=i(9306),a=i(616),r=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:a?r(e,t):function(){return e.apply(t,arguments)}}},6119:(e,t,i)=>{var n=i(5745),o=i(3392),a=n("keys");e.exports=function(e){return a[e]||(a[e]=o(e))}},6198:(e,t,i)=>{var n=i(8014);e.exports=function(e){return n(e.length)}},6269:e=>{e.exports={}},6279:(e,t,i)=>{var n=i(6840);e.exports=function(e,t,i){for(var o in t)n(e,o,t[o],i);return e}},6319:(e,t,i)=>{var n=i(8551),o=i(9539);e.exports=function(e,t,i,a){try{return a?t(n(i)[0],i[1]):t(i)}catch(t){o(e,"throw",t)}}},6395:e=>{e.exports=!1},6518:(e,t,i)=>{var n=i(4576),o=i(7347).f,a=i(6699),r=i(6840),s=i(9433),c=i(7740),l=i(2796);e.exports=function(e,t){var i,d,u,p,f,y=e.target,m=e.global,h=e.stat;if(i=m?n:h?n[y]||s(y,{}):n[y]&&n[y].prototype)for(d in t){if(p=t[d],u=e.dontCallGetSet?(f=o(i,d))&&f.value:i[d],!l(m?d:y+(h?".":"#")+d,e.forced)&&void 0!==u){if(typeof p==typeof u)continue;c(p,u)}(e.sham||u&&u.sham)&&a(p,"sham",!0),r(i,d,p,e)}}},6699:(e,t,i)=>{var n=i(3724),o=i(4913),a=i(6980);e.exports=n?function(e,t,i){return o.f(e,t,a(1,i))}:function(e,t,i){return e[t]=i,e}},6801:(e,t,i)=>{var n=i(3724),o=i(8686),a=i(4913),r=i(8551),s=i(5397),c=i(1072);t.f=n&&!o?Object.defineProperties:function(e,t){r(e);for(var i,n=s(t),o=c(t),l=o.length,d=0;l>d;)a.f(e,i=o[d++],n[i]);return e}},6823:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6837:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},6840:(e,t,i)=>{var n=i(4901),o=i(4913),a=i(283),r=i(9433);e.exports=function(e,t,i,s){s||(s={});var c=s.enumerable,l=void 0!==s.name?s.name:t;if(n(i)&&a(i,l,s),s.global)c?e[t]=i:r(t,i);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=i:o.f(e,t,{value:i,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},6955:(e,t,i)=>{var n=i(2140),o=i(4901),a=i(2195),r=i(8227)("toStringTag"),s=Object,c="Arguments"===a(function(){return arguments}());e.exports=n?a:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=s(e),r))?i:c?a(t):"Object"===(n=a(t))&&o(t.callee)?"Arguments":n}},6969:(e,t,i)=>{var n=i(2777),o=i(757);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},6980:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7040:(e,t,i)=>{var n=i(4495);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:(e,t,i)=>{var n=i(9504),o=i(9039),a=i(2195),r=Object,s=n("".split);e.exports=o(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===a(e)?s(e,""):r(e)}:r},7347:(e,t,i)=>{var n=i(3724),o=i(9565),a=i(8773),r=i(6980),s=i(5397),c=i(6969),l=i(9297),d=i(5917),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=s(e),t=c(t),d)try{return u(e,t)}catch(e){}if(l(e,t))return r(!o(a.f,e,t),e[t])}},7476:(e,t,i)=>{var n=i(2195),o=i(9504);e.exports=function(e){if("Function"===n(e))return o(e)}},7566:(e,t,i)=>{var n=i(6840),o=i(9504),a=i(655),r=i(2812),s=URLSearchParams,c=s.prototype,l=o(c.getAll),d=o(c.has),u=new s("a=1");!u.has("a",2)&&u.has("a",void 0)||n(c,"has",function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return d(this,e);var n=l(this,e);r(t,1);for(var o=a(i),s=0;s<n.length;)if(n[s++]===o)return!0;return!1},{enumerable:!0,unsafe:!0})},7588:(e,t,i)=>{var n=i(6518),o=i(9565),a=i(2652),r=i(9306),s=i(8551),c=i(1767),l=i(9539),d=i(4549)("forEach",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:d},{forEach:function(e){s(this);try{r(e)}catch(e){l(this,"throw",e)}if(d)return o(d,this,e);var t=c(this),i=0;a(t,function(t){e(t,i++)},{IS_RECORD:!0})}})},7629:(e,t,i)=>{var n=i(6395),o=i(4576),a=i(9433),r="__core-js_shared__",s=e.exports=o[r]||a(r,{});(s.versions||(s.versions=[])).push({version:"3.46.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7657:(e,t,i)=>{var n,o,a,r=i(9039),s=i(4901),c=i(34),l=i(2360),d=i(2787),u=i(6840),p=i(8227),f=i(6395),y=p("iterator"),m=!1;[].keys&&("next"in(a=[].keys())?(o=d(d(a)))!==Object.prototype&&(n=o):m=!0),!c(n)||r(function(){var e={};return n[y].call(e)!==e})?n={}:f&&(n=l(n)),s(n[y])||u(n,y,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},7740:(e,t,i)=>{var n=i(9297),o=i(5031),a=i(7347),r=i(4913);e.exports=function(e,t,i){for(var s=o(t),c=r.f,l=a.f,d=0;d<s.length;d++){var u=s[d];n(e,u)||i&&n(i,u)||c(e,u,l(t,u))}}},7750:(e,t,i)=>{var n=i(4117),o=TypeError;e.exports=function(e){if(n(e))throw new o("Can't call method on "+e);return e}},7751:(e,t,i)=>{var n=i(4576),o=i(4901);e.exports=function(e,t){return arguments.length<2?(i=n[e],o(i)?i:void 0):n[e]&&n[e][t];var i}},8014:(e,t,i)=>{var n=i(1291),o=Math.min;e.exports=function(e){var t=n(e);return t>0?o(t,9007199254740991):0}},8111:(e,t,i)=>{var n=i(6518),o=i(4576),a=i(679),r=i(8551),s=i(4901),c=i(2787),l=i(2106),d=i(4659),u=i(9039),p=i(9297),f=i(8227),y=i(7657).IteratorPrototype,m=i(3724),h=i(6395),g="constructor",v="Iterator",b=f("toStringTag"),w=TypeError,x=o[v],S=h||!s(x)||x.prototype!==y||!u(function(){x({})}),I=function(){if(a(this,y),c(this)===y)throw new w("Abstract class Iterator not directly constructable")},T=function(e,t){m?l(y,e,{configurable:!0,get:function(){return t},set:function(t){if(r(this),this===y)throw new w("You can't redefine this property");p(this,e)?this[e]=t:d(this,e,t)}}):y[e]=t};p(y,b)||T(b,v),!S&&p(y,g)&&y[g]!==Object||T(g,I),I.prototype=y,n({global:!0,constructor:!0,forced:S},{Iterator:I})},8227:(e,t,i)=>{var n=i(4576),o=i(5745),a=i(9297),r=i(3392),s=i(4495),c=i(7040),l=n.Symbol,d=o("wks"),u=c?l.for||l:l&&l.withoutSetter||r;e.exports=function(e){return a(d,e)||(d[e]=s&&a(l,e)?l[e]:u("Symbol."+e)),d[e]}},8237:(e,t,i)=>{var n=i(6518),o=i(2652),a=i(9306),r=i(8551),s=i(1767),c=i(9539),l=i(4549),d=i(8745),u=i(9039),p=TypeError,f=u(function(){[].keys().reduce(function(){},void 0)}),y=!f&&l("reduce",p);n({target:"Iterator",proto:!0,real:!0,forced:f||y},{reduce:function(e){r(this);try{a(e)}catch(e){c(this,"throw",e)}var t=arguments.length<2,i=t?void 0:arguments[1];if(y)return d(y,this,t?[e]:[e,i]);var n=s(this),l=0;if(o(n,function(n){t?(t=!1,i=n):i=e(i,n,l),l++},{IS_RECORD:!0}),t)throw new p("Reduce of empty iterator with no initial value");return i}})},8480:(e,t,i)=>{var n=i(1828),o=i(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},8551:(e,t,i)=>{var n=i(34),o=String,a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(o(e)+" is not an object")}},8622:(e,t,i)=>{var n=i(4576),o=i(4901),a=n.WeakMap;e.exports=o(a)&&/native code/.test(String(a))},8686:(e,t,i)=>{var n=i(3724),o=i(9039);e.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8721:(e,t,i)=>{var n=i(3724),o=i(9504),a=i(2106),r=URLSearchParams.prototype,s=o(r.forEach);n&&!("size"in r)&&a(r,"size",{get:function(){var e=0;return s(this,function(){e++}),e},configurable:!0,enumerable:!0})},8727:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:(e,t,i)=>{var n=i(616),o=Function.prototype,a=o.apply,r=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?r.bind(a):function(){return r.apply(a,arguments)})},8773:(e,t)=>{var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!i.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:i},8872:(e,t,i)=>{i(8237)},8981:(e,t,i)=>{var n=i(7750),o=Object;e.exports=function(e){return o(n(e))}},8992:(e,t,i)=>{i(8111)},9039:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},9297:(e,t,i)=>{var n=i(9504),o=i(8981),a=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(o(e),t)}},9306:(e,t,i)=>{var n=i(4901),o=i(6823),a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(o(e)+" is not a function")}},9433:(e,t,i)=>{var n=i(4576),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(i){n[e]=t}return t}},9462:(e,t,i)=>{var n=i(9565),o=i(2360),a=i(6699),r=i(6279),s=i(8227),c=i(1181),l=i(5966),d=i(7657).IteratorPrototype,u=i(2529),p=i(9539),f=i(1385),y=s("toStringTag"),m="IteratorHelper",h="WrapForValidIterator",g="normal",v="throw",b=c.set,w=function(e){var t=c.getterFor(e?h:m);return r(o(d),{next:function(){var i=t(this);if(e)return i.nextHandler();if(i.done)return u(void 0,!0);try{var n=i.nextHandler();return i.returnHandlerResult?n:u(n,i.done)}catch(e){throw i.done=!0,e}},return:function(){var i=t(this),o=i.iterator;if(i.done=!0,e){var a=l(o,"return");return a?n(a,o):u(void 0,!0)}if(i.inner)try{p(i.inner.iterator,g)}catch(e){return p(o,v,e)}if(i.openIters)try{f(i.openIters,g)}catch(e){return p(o,v,e)}return o&&p(o,g),u(void 0,!0)}})},x=w(!0),S=w(!1);a(S,y,"Iterator Helper"),e.exports=function(e,t,i){var n=function(n,o){o?(o.iterator=n.iterator,o.next=n.next):o=n,o.type=t?h:m,o.returnHandlerResult=!!i,o.nextHandler=e,o.counter=0,o.done=!1,b(this,o)};return n.prototype=t?x:S,n}},9504:(e,t,i)=>{var n=i(616),o=Function.prototype,a=o.call,r=n&&o.bind.bind(a,a);e.exports=n?r:function(e){return function(){return a.apply(e,arguments)}}},9519:(e,t,i)=>{var n,o,a=i(4576),r=i(2839),s=a.process,c=a.Deno,l=s&&s.versions||c&&c.version,d=l&&l.v8;d&&(o=(n=d.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&r&&(!(n=r.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=r.match(/Chrome\/(\d+)/))&&(o=+n[1]),e.exports=o},9539:(e,t,i)=>{var n=i(9565),o=i(8551),a=i(5966);e.exports=function(e,t,i){var r,s;o(e);try{if(!(r=a(e,"return"))){if("throw"===t)throw i;return i}r=n(r,e)}catch(e){s=!0,r=e}if("throw"===t)throw i;if(s)throw r;return o(r),i}},9565:(e,t,i)=>{var n=i(616),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},9617:(e,t,i)=>{var n=i(5397),o=i(5610),a=i(6198),r=function(e){return function(t,i,r){var s=n(t),c=a(s);if(0===c)return!e&&-1;var l,d=o(r,c);if(e&&i!=i){for(;c>d;)if((l=s[d++])!=l)return!0}else for(;c>d;d++)if((e||d in s)&&s[d]===i)return e||d||0;return!e&&-1}};e.exports={includes:r(!0),indexOf:r(!1)}}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,i),a.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};i.r(n),i.d(n,{SeamlyStaticCore:()=>St,default:()=>Lt}),i(4114);const o=require("@seamly/web-ui"),a=require("preact");i(8992),i(2577),i(8872),i(4603),i(7566),i(8721);const r=require("preact/hooks");i(1454);const s={direction:"to_translation_locale",locale:"nl",translatedBy:"deep_l",data:{}};function c(e){switch(e.payload.type){case"image":case"text":case"choice_prompt":return{...e,payload:{...e.payload,translatedBody:{...s,data:{...e.payload.body,text:e.payload.body.text?`NL - ${e.payload.body.text}`:void 0,description:e.payload.body.description?`NL - ${e.payload.body.description}`:void 0,buttonText:e.payload.body.buttonText?`NL - ${e.payload.body.buttonText}`:void 0,choices:e.payload.body.choices?e.payload.body.choices.map(e=>({...e,text:`NL - ${e.text}`})):void 0,prompt:e.payload.body.prompt?{...e.payload.body.prompt,text:`NL - ${e.payload.body.prompt.text}`}:void 0}}}};default:return e}}const l={events:[],config:{layoutMode:"inline",accountConfig:{},hideOnNoUserResponse:!1,showDisclaimer:!1,showSuggestions:!0,preChat:!0},context:{},initialState:{},unreadEvents:0,loadedImageEventIds:[],isLoading:!1,idleDetachCountdown:{hasCountdown:!1,isActive:!1},resumeConversationPrompt:!1,visibility:{visibility:o.visibilityStates.open},serviceInfo:{activeServiceSessionId:""},participantInfo:{participants:{},currentAgent:""},headerTitles:{title:"Test title",subTitle:"Test subtitle"},interrupt:{error:void 0},historyLoaded:!1,skiplinkTargetId:(0,o.randomId)(),optionsButtonId:(0,o.randomId)(),serviceData:{},options:{features:{},panelActive:!1,optionActive:"",userSelectedOptions:{}},entryMeta:{default:"text",active:"text",userSelected:null,options:{},optionsOverride:{}},currentUploads:[],processingFileUploads:[]},d={participants:{agent:{id:"agent",service:{expose:{map:{},version:2},meta:{},name:null,service_session_id:null,settings:{}}},user:{id:"user",service:{expose:{map:{},version:2},meta:{},name:null,service_session_id:null,settings:{}}}},currentAgent:"agent"},u={type:"info",payload:{body:{subtype:"new_topic",type:"divider"},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),transactionId:"_1y9pz5fbyly",type:"divider"}},p={type:"info",payload:{body:{language:"Nederlands",restartButtonText:null,subtype:"new_translation",text:"[NL] Automatic translation to Dutch started. Please note that automatic translations may contain errors.",title:"[NL] Translating to Dutch",translationEnabled:!0,userLocale:"nl"},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),occurredAt:0x5c68711878df3,participant:null,service:{meta:{},name:null,serviceSessionId:null},transactionId:null,translatedBody:null,type:"divider"}},f={type:"info",payload:{body:{language:"Nederlands",subtype:"new_translation",text:"[NL] Automatic translation to Dutch started. Please note that automatic translations may contain errors.",translationEnabled:!0,userLocale:"nl"},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),occurredAt:0x5c68711878df3,participant:null,service:{meta:{},name:null,serviceSessionId:null},transactionId:null,translatedBody:null,type:"divider"}},y={type:"info",payload:{body:{language:"Nederlands",restartButtonText:"[NL] Start again",subtype:"new_translation",text:null,title:"[NL] Automatic translation to Dutch ended",translationEnabled:!1,userLocale:"nl"},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),occurredAt:0x5c68711878df3,participant:null,service:{meta:{},name:null,serviceSessionId:null},transactionId:null,translatedBody:null,type:"divider"}},m={type:"info",payload:{body:{text:"This is a system generated info message",type:"text"},fromClient:!1,id:(0,o.randomId)(),participant:null,service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:null,type:"text"}},h={type:"info",payload:{body:{key:["info","sendTranscript","accepted"],variables:{emailAddress:"test@test.com"}},fromClient:!1,id:(0,o.randomId)(),participant:null,service:{meta:{},name:null,serviceSessionId:null},transactionId:null,type:"translation"}},g={title:"You're talking to",subTitle:"Mrs. Bot"},v={type:"participant",payload:{fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"received",participant:{avatar:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjNEE0OEMxIiBkPSJNMTAsMTQuOGMtMS4xLDAtMi0wLjktMi0yczAuOS0yLDItMnMyLDAuOSwyLDJTMTEuMSwxNC44LDEwLDE0Ljh6IE0xNS45LDE0LjhjMS4xLDAsMi0wLjksMi0ycy0wLjktMi0yLTIKCXMtMiwwLjktMiwyUzE0LjgsMTQuOCwxNS45LDE0Ljh6IE0yMS44LDEwLjhjLTEuMSwwLTIsMC45LTIsMnMwLjksMiwyLDJzMi0wLjksMi0yUzIyLjksMTAuOCwyMS44LDEwLjh6IE0yMS4zLDE4LjFIMTAuNwoJQzExLjcsMjMuOSwyMC4yLDIzLjksMjEuMywxOC4xeiIvPgo8L3N2Zz4K",id:"agent",introduction:"You're now talking to Mrs. Bot gimme a minit",name:"Mrs. Bot",service:{expose:{map:{},version:2},meta:{},name:null,service_session_id:null,settings:{}}},transactionId:"d63655bf-1d3d-42cf-b14e-4da9e2b6a642",type:"participant"}},b={type:"participant",payload:{fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"received",participant:{introduction:"Welcome, you are now chatting with Mrs. Bot 2, give me a minit to read back the chat history.",id:"agent",avatar:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjNEE0OEMxIiBkPSJNMTAuMSwxNC45Yy0xLjEsMC0yLTAuOS0yLTJzMC45LTIsMi0yczIsMC45LDIsMlMxMS4yLDE0LjksMTAuMSwxNC45eiBNMjEuOSwxMC45Yy0xLjEsMC0yLDAuOS0yLDIKCXMwLjksMiwyLDJzMi0wLjksMi0yUzIzLDEwLjksMjEuOSwxMC45eiBNMjEuNCwxOC4ySDEwLjhDMTEuOCwyNCwyMC4zLDI0LDIxLjQsMTguMnogTTE3LjIsMjUuM2gtMi40Yy0wLjYsMC0xLjIsMC40LTEuNCwxCgljLTUuMS0wLjItOS4yLTQuNC05LjQtOS42YzAuMSwwLDAuMiwwLjEsMC40LDAuMWgwLjFjMC44LDAsMS40LTAuNiwxLjQtMS40di00LjdjMC0wLjgtMC42LTEuNC0xLjQtMS40aDBjLTAuOCwwLTEuNCwwLjYtMS40LDEuNAoJdjIuN3YydjEuMWMwLDUuOSw0LjcsMTAuNiwxMC41LDEwLjhjMC4yLDAuNSwwLjcsMC44LDEuMiwwLjhoMi40YzAuOCwwLDEuNC0wLjYsMS40LTEuNFMxOCwyNS4zLDE3LjIsMjUuM3oiLz4KPC9zdmc+Cg==",name:"Two",service:{expose:{map:{},version:3},meta:{},name:"new service",serviceSessionId:(0,o.randomId)(),settings:{}}},transactionId:(0,o.randomId)(),type:"participant"}},w={type:"participant",payload:{fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"received",participant:{id:"user",introduction:"You're now talking to Mrs. Bot gimme a minit",name:"Mrs. Bot",service:{expose:{map:{},version:2},meta:{},name:null,service_session_id:null,settings:{}}},transactionId:"d63655bf-1d3d-42cf-b14e-4da9e2b6a642",type:"participant"}},x=({type:e,data:t,text:i})=>({type:"message",payload:{body:{type:e,text:i,data:t},participant:"agent",service:{meta:{additions:{}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},fromClient:!1,fromHistory:!0,id:"4efacb4d-28a0-454e-8e36-3f17eb598c5d",messageStatus:"read",transactionId:"6f9beee7-ce82-418e-9bec-8001079aa769",transactionLast:!0,type:"custom"}}),S={type:"message",payload:{body:{text:"What do you want to do?",type:"text",data:void 0},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"b947b684-93df-4bd9-a8ea-e2f1b5a7a480",transactionLast:!1,type:"text"}},I={type:"message",payload:{type:"splash",id:(0,o.randomId)(),body:{text:"Example splash message ✨",type:"text",variables:{}}}},T={type:"message",payload:{body:{text:"What do you want to do? This is a really long message from a bot that has a lot to say about a lot of things. Currently I am contemplating my own bot existence and constantly asking myself who I am. What do you want to do? This is a really long message from a bot that has a lot to say about a lot of things. Currently I am contemplating my own bot existence and constantly asking myself who I am. What do you want to do? This is a really long message from a bot that has a lot to say about a lot of things. Currently I am contemplating my own bot existence and constantly asking myself who I am.",type:"text"},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"b947b684-93df-4bd9-a8ea-e2f1b5a7a480",transactionLast:!1,type:"text"}},j={type:"message",payload:{body:{text:"Bubble with <strong>bold</strong> <em>italic</em> <u>underline</u>",type:"text"},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},M={type:"message",payload:{body:{text:'<a href="https://google.com" data-link-id="1">Link in same window</a> and <a href="https://google.com" data-link-id="2" target="_blank">link in new window</a> embedded in text',type:"text"},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},_={type:"message",payload:{body:{text:'Here is a long link <a href="https://google.com" data-link-id="1">click me click me please click me yoohoooo please please click me here I am click me now what are you waiting for click me now now now now now click meeeeeeeeeeeeee</a> embedded in text',type:"text"},fromClient:!1,fromHistory:!0,id:"a964e54e-ea98-46ff-a952-979a47f162c0",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},E={type:"message",payload:{body:{text:"\n <ul>\n <li>Short list item</li>\n <li>This list item is longer to showcase different type lengths of text in list items and how they reflow in the browser</li>\n <li>\n This list item has a nested list with 3 items in it.\n <ul>\n <li>First item</li>\n <li>second item</li>\n <li>Third item</li>\n </ul>\n </li>\n <li>Another one just to be sure :)</li>\n </ul>\n ",type:"text"},fromClient:!1,fromHistory:!0,id:"f5351010-0def-452d-818f-ca22ac61792a",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},C={type:"message",payload:{body:{text:"\n <ol>\n <li>Short list item</li>\n <li>This list item is longer to showcase different type lengths of text in list items and how they reflow in the browser</li>\n <li>\n This list item has a nested list with 3 items in it.\n <ol>\n <li>First item</li>\n <li>second item</li>\n <li>Third item</li>\n </ol>\n </li>\n <li>Another one just to be sure :)</li>\n </ol>\n ",type:"text"},fromClient:!1,fromHistory:!0,id:"f5351010-0def-452d-818f-ca22ac61792a",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"text"}},L={type:"message",payload:{body:{description:"Plaatje",isZoomable:!1,type:"image",url:"https://developers.seamly.ai/clients/web-ui/static/photos/image-square-small.jpg"},fromClient:!1,fromHistory:!0,id:"b44ef42c-880c-43ff-b067-499e7f2e81f7",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"image"}},O={type:"message",payload:{body:{description:"Plaatje",isZoomable:!0,type:"image",url:"https://developers.seamly.ai/clients/web-ui/static/photos/image-portrait.jpg"},fromClient:!1,fromHistory:!0,id:"b44ef42c-880c-43ff-b067-499e7f2e81f8",messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"image"}},A={type:"message",payload:{body:{description:"test",source:"youtube",type:"video",url:"https://www.youtube.com/embed/K7Hn1rPQouU"},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{hideFeedback:"true"}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"d0cc13da-337a-4108-9db1-cb8a3b3a1446",transactionLast:!1,type:"video"}},N={type:"message",payload:{body:{choices:[{id:"703db9b3-2157-4d4a-9f9b-c382c6a10531",text:"Dialog (this is intentionally made longer for testing purposes)",type:"choice"},{id:"1eff6098-f14f-4683-a2b8-30d1c573d45e",text:"T-Dialog",type:"choice"},{id:"a8ba3ce8-3324-4e7a-accc-944ff78ac890",text:"Customers",type:"choice"},{id:"c89956ab-cf98-4b7e-9282-7087c988153d",text:"Features",type:"choice"},{id:"9fd9a28f-462d-4f07-9661-606dbe3b9466",category:"secondary",text:"Something else",type:"choice"}],chooseAgain:!0,prompt:{text:"Here are some choice prompt options to choose from",type:"text",variables:{}},type:"choice_prompt"},fromClient:!1,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"read",participant:"agent",service:{meta:{additions:{}},name:"bot",serviceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},transactionId:"b947b684-93df-4bd9-a8ea-e2f1b5a7a480",transactionLast:!0,type:"choice_prompt"}},z={type:"message",payload:{body:{text:"This is what the user typed",type:"text"},fromClient:!0,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"read",participant:"user",transactionId:"1cdefea9-7437-4672-bcf8-2c75dc99244c",transactionLast:null,type:"text"}},P={type:"message",payload:{body:{text:"This is what the user typed. And sometimes the user has quite a lot to say and then we get longer lines that need to wrap well and not break the styling so here goes with just such a line right here!!",type:"text"},fromClient:!0,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"read",participant:"user",transactionId:"1cdefea9-7437-4672-bcf8-2c75dc99244c",transactionLast:null,type:"text"}},k={type:"message",payload:{body:{text:'<a href="https://google.com" data-link-id="1">Link in same window</a> and <a href="https://google.com" data-link-id="2" target="_blank">link in new window</a> embedded in text',type:"text"},fromClient:!0,fromHistory:!0,id:(0,o.randomId)(),messageStatus:"read",participant:"user",transactionId:"1cdefea9-7437-4672-bcf8-2c75dc99244c",transactionLast:null,type:"text"}},D={type:"upload",transactionId:(0,o.randomId)(),meta:{},body:{contentType:"plain/text",filename:"This-is-an-example.txt",filesize:12,id:(0,o.randomId)(),isDeleted:!1}},R={type:"upload",transactionId:(0,o.randomId)(),meta:{},body:{contentType:"application/pdf",filename:"This-is-a-sample.pdf",filesize:18810,id:"",isDeleted:!1,url:"https://pdfobject.com/pdf/sample.pdf"}},F={type:"upload",transactionId:(0,o.randomId)(),meta:{},body:{contentType:"image/jpeg",filename:"image-square-small.jpg",filesize:12020,id:"",isDeleted:!1,url:"https://developers.seamly.ai/clients/web-ui/static/photos/image-square-small.jpg"}},U={type:"message",payload:{...D,fromClient:!1,participant:"agent",id:(0,o.randomId)()}},H={type:"message",payload:{...R,fromClient:!1,participant:"agent",id:(0,o.randomId)()}},G={type:"message",payload:{...F,fromClient:!1,participant:"agent",id:(0,o.randomId)()}};sessionStorage.setItem(`image-${G.payload.id}`,G.payload.body.url);const B={...G,payload:{...G.payload,body:{...G.payload.body,isDeleted:!0,url:void 0},id:(0,o.randomId)()}},W={type:"message",payload:{...F,fromClient:!0,participant:"user",id:(0,o.randomId)()}};sessionStorage.setItem(`image-${W.payload.id}`,W.payload.body.url);const $={...W,payload:{...W.payload,id:(0,o.randomId)(),body:{...W.payload.body,url:null}}},X={isActive:!1,currentLocale:void 0,isAvailable:!1,showTranslationProposal:!1,languages:[],translatedEventGroups:{},containerId:(0,o.randomId)()},q=[{id:"1",question:"Invoices",categories:["mixed","short"]},{id:"2",question:"Temporary subscription pause",categories:["mixed","medium"]},{id:"3",question:"Cancellation",categories:["mixed","short"]},{id:"4",question:"Apps",categories:["mixed","medium"]},{id:"5",question:"At what date will my subscription end?",categories:["mixed","long"]},{id:"A",question:"Quotes",categories:["short"]},{id:"B",question:"How to get in touch with us",categories:["long"]}],J="unstarted",Y="messages",Z="errors",K="uploads",Q="features",V="options",ee="suggestions",te="minimizedWindow",ie="minimizedInline",ne="translations",oe={[J]:{heading:"Unstarted UI",description:"Test the loader here"},[Y]:{heading:"Messages",description:""},[Z]:{heading:"UI errors",description:""},[K]:{heading:"File uploads",description:""},[Q]:{heading:"Other features",description:""},[V]:{heading:"Options",description:""},[ee]:{heading:"Suggestions",description:""},[te]:{heading:"Minimized window",desciption:""},[ie]:{heading:"Minimized Inline",description:""},[ne]:{heading:"Translations",description:""}},ae={type:"message",payload:{type:"card",id:(0,o.randomId)(),body:{action:{ask:"",type:"ask"},buttonText:"Ask about pizzas!",description:"Pizza Margherita is a <strong>typical Neapolitan pizza</strong>.\n\nIt is made with San Marzano tomatoes, mozzarella cheese, fresh basil, salt, and extra-virgin olive oil.",image:"https://developers.seamly.ai/clients/web-ui/static/photos/card-square.jpg",title:"Pizza Margherita"}}},re={type:"message",payload:{type:"card",id:(0,o.randomId)(),body:{action:{link:"https://seamly.ai",newTab:!0,type:"navigate"},buttonText:"Order now!",description:"Pizza Margherita is a <strong>typical Neapolitan pizza</strong>.",image:"https://developers.seamly.ai/clients/web-ui/static/photos/card-landscape.jpg",title:"Pizza Margherita"}}},se={type:"message",payload:{type:"card",id:(0,o.randomId)(),body:{action:{topic:"Set topic",type:"topic"},buttonText:"Set topic! (title & description optional)",image:"https://developers.seamly.ai/clients/web-ui/static/photos/card-portrait.jpg"}}},ce={type:"message",payload:{type:"card",id:(0,o.randomId)(),body:{action:{ask:"",type:"ask"},buttonText:"Ask about pizzas!",description:"Pizza Margherita is a <strong>typical Neapolitan pizza</strong>.\n\nIt is made with San Marzano tomatoes, mozzarella cheese, fresh basil, salt, and extra-virgin olive oil.",title:"Pizza Margherita"}}},le={base:{category:J,headingText:"Standard with loader",description:"",...l,isLoading:!0},fullConversation:{category:Y,headingText:"Full demo conversation",description:"",...l,participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[v,m,S,{...N,payload:{...N.payload,id:`${N.payload.id}XXX`}},T,b,z,j,k,u,L,U,H,G,B,P,A,M,_,O,W,$,E,C,N]},userMessages:{category:Y,headingText:"User messages",description:"",...l,participantInfo:d,events:[z,P,W,$,k]},withParticipants:{category:Y,headingText:"Messages with participant info",description:"",...l,config:{...l.config,overrideMessages:{agent:{showAvatar:!0,showName:!0},user:{showName:!0,showAvatar:!0}}},participantInfo:d,events:[S,z,T,P]},textMessages:{category:Y,headingText:"Text messages",description:"",...l,participantInfo:d,events:[S,T,j,M,_,E,C]},imageVideoMessages:{category:Y,headingText:"Download, image and video messages",description:"",...l,participantInfo:d,events:[L,A,O,U,H,G,B,W,$]},systemMessages:{category:Y,headingText:"System messages",description:"",...l,config:{overrideMessages:{timeIndicator:{enabled:!0,threshold:36e5}}},participantInfo:d,events:[{type:"message",payload:{...S.payload,occurredAt:1e3*(Date.now()-432e6),id:(0,o.randomId)(),body:{text:"Long ago when a dialog started",type:"text"}}},v,w,b,u,h,...[p,y].map(c),m]},choicePromptMessages:{category:Y,headingText:"Choice prompt messages",description:"",...l,participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[{...N,payload:{...N.payload,id:`${N.payload.id}XXX`}},S,N]},choicePromptMessageWithoutManualInput:{category:Y,headingText:"Choice prompt message without manual input",description:"",...l,entryMeta:{...l.entryMeta,options:{text:{allowManualInput:!1}}},events:[N],participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"}},timeIndicators:{category:Y,headingText:"Time Indicators",description:"",...l,config:{overrideMessages:{timeIndicator:{enabled:!0,threshold:36e5}}},participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[{type:"message",payload:{...S.payload,occurredAt:1e3*(Date.now()-432e6),id:(0,o.randomId)(),body:{text:"Long ago when a dialog started",type:"text"}}},{type:"message",payload:{...S.payload,occurredAt:1e3*(Date.now()-3456e5),id:(0,o.randomId)(),body:{text:"Above me should be a time indicator showing the full date",type:"text"}}},{type:"message",payload:{...S.payload,occurredAt:1e3*(Date.now()+1-3456e5),id:(0,o.randomId)(),body:{text:"Another message",type:"text"}}},{type:"message",payload:{...S.payload,occurredAt:1e3*(Date.now()+2-3456e5),id:(0,o.randomId)(),body:{text:"And another message",type:"text"}}},{type:"message",payload:{...S.payload,occurredAt:1e3*(Date.now()-864e5),id:(0,o.randomId)(),body:{text:'Above me should be a time indicator showing "yesterday"',type:"text"}}},{type:"message",payload:{...S.payload,occurredAt:1e3*(Date.now()+1-864e5),id:(0,o.randomId)(),body:{text:"Another message",type:"text"}}},{type:"message",payload:{...S.payload,occurredAt:1e3*(Date.now()+2-864e5),id:(0,o.randomId)(),body:{text:"And another message",type:"text"}}},{type:"message",payload:{...S.payload,occurredAt:1e3*Date.now(),id:(0,o.randomId)(),body:{text:"Above me should be a time indicator showing me the dialog continues today",type:"text"}}}]},cards:{category:Y,headingText:"Cards",description:"",...l,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[ae,re,se,ce]},carousel:{category:Y,headingText:"Carousel",description:"",...l,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[{type:"message",payload:{type:"carousel",id:(0,o.randomId)(),body:{cards:[ae.payload.body,re.payload.body,se.payload.body,ce.payload.body]}}}]},errorWithAction:{category:Z,headingText:"Error with a user action",description:"",...l,interrupt:{error:new o.SeamlyGeneralError(new Error("general error"))}},errorWithoutAction:{category:Z,headingText:"Error without a user action",description:"",...l,interrupt:{error:new o.SeamlyOfflineError(new Error("seamly offline error"))}},privacyDisclaimer:{category:Q,headingText:"Privacy disclaimer",description:"",...l,config:{...l.config,showDisclaimer:!0}},characterLimit:{category:Q,headingText:"Input character limit",description:"",...l,entryMeta:{default:"text",active:"text",userSelected:null,options:{text:{limit:120}},optionsOverride:{}}},inputLabel:{category:Q,headingText:"Input label",...l,entryMeta:{default:"text",active:"text",options:{text:{limit:null}},optionsOverride:{text:{label:"What is your name?",limit:null,placeholder:"Please enter your name"}}}},inputLabelWithFileUploadToggle:{category:Q,headingText:"Input label with file upload toggle button",...l,options:{...l.options,features:{uploads:{enabled:!0}}},entryMeta:{default:"text",active:"text",options:{text:{limit:null}},optionsOverride:{text:{label:"What is the title of the uploaded document?",limit:null,placeholder:"Please enter the title of the document"}}}},abortTransactional:{category:Q,headingText:"Abort transaction",...l,events:[S,z],entryMeta:{default:"text",active:"text",options:{text:{limit:null}},optionsOverride:{},actions:{abortTransaction:{label:"Ask for another question",topicFallbackMessage:"Oops...",topicName:"abort_transaction"}},translatedActions:{}}},fileUploadToggle:{category:K,headingText:"File upload toggle button",description:"",...l,options:{...l.options,features:{uploads:{enabled:!0}}}},fileUploadToggleHidden:{category:K,headingText:"File upload toggle button hidden",description:"",...l,options:{...l.options,features:{uploads:{enabled:!1}}}},fileUploadInput:{category:K,headingText:"File upload input",description:"Click on upload button to see an error",styleGuideReset:!0,...l,config:{...l.config,accountConfig:{features:{uploads:!0}}},options:{...l.options,features:{uploads:{enabled:!0}}},entryMeta:{default:"text",active:"text",userSelected:"upload",options:{upload:{allowedMimeTypes:["image/*","application/pdf"],maxSize:10485760}},optionsOverride:{}}},fileUploadBusy:{category:K,headingText:"File upload in progress",description:"",styleGuideReset:!0,...l,config:{...l.config,accountConfig:{features:{uploads:!0}}},options:{...l.options,features:{uploads:{enabled:!0}}},entryMeta:{default:"text",active:"text",userSelected:"upload",options:{upload:{allowedMimeTypes:["image/*","application/pdf"],maxSize:10485760}},optionsOverride:{}},currentUploads:[{id:"_2olggurqhb4",name:"gGeyr3WepujbGn7khx.gif",progress:29,uploading:!0,complete:!1,error:"",uploadHandle:{abort:()=>{}}}]},fileUploadError:{category:K,headingText:"File upload errored",description:"",styleGuideReset:!0,...l,config:{...l.config,accountConfig:{features:{uploads:!0}}},options:{...l.options,features:{uploads:{enabled:!0}}},entryMeta:{default:"text",active:"text",userSelected:"upload",options:{upload:{allowedMimeTypes:["image/*","application/pdf"],maxSize:10485760}},optionsOverride:{}},currentUploads:[{id:"_2olggurqhb4",name:"gGeyr3WepujbGn7khx.gif",progress:0,uploading:!1,complete:!1,error:"Something went wrong with the upload",uploadHandle:{abort:()=>{}}}]},idleTimerCountdown:{category:Q,headingText:"Idle timer with countdown",description:"",...l,idleDetachCountdown:{hasCountdown:!0,isActive:!0,count:120,remaining:91,timer:{minutes:1,seconds:31}}},idleTimerNoCountdown:{category:Q,headingText:"Idle timer without countdown",description:"",...l,idleDetachCountdown:{hasCountdown:!0,isActive:!1,count:120,remaining:91,timer:{minutes:1,seconds:31}}},resumeConversationPrompt:{category:Q,headingText:"Resume conversation prompt",description:"",...l,participantInfo:d,resumeConversationPrompt:!0},optionsSingleTriggerAvailable:{category:V,headingText:"Single option available",description:"",...l,options:{...l.options,features:{sendTranscript:{enabled:!0}}}},optionsSingleTriggerUnavailable:{category:V,headingText:"Single option",description:"Option unavailable",...l,options:{...l.options,features:{sendTranscript:{enabled:!1}}}},optionsMultiple:{category:V,headingText:"Multiple options",description:"All options available",...l,options:{...l.options,features:{extraMenuItem:{enabled:!0},sendTranscript:{enabled:!0}}}},optionsMultipleUnavailable:{category:V,headingText:"Multiple options",description:"Some unavailable",...l,options:{...l.options,features:{extraMenuItem:{enabled:!1},sendTranscript:{enabled:!0}}}},optionSendTranscript:{category:V,headingText:"Send transcript option",description:"Press submit to view error message",...l,options:{...l.options,optionActive:"sendTranscript",panelActive:!0,features:{sendTranscript:{enabled:!0}}}},translationsAvailable:{category:ne,headingText:"Show translations available",description:"",...l,translations:{...X,isAvailable:!0,languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"}]}},translationsAvailableWithOptions:{category:ne,headingText:"Show translations available with other options available",description:"",...l,options:{...l.options,features:{sendTranscript:{enabled:!0}}},config:{...l.config,context:{...l.context,contentLocale:"nl",userLocale:"en"}},translations:{...X,isAvailable:!0,currentLocale:"lv",isActive:!0,languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"},{locale:"ar",nativeName:"Arabic"},{locale:"bg",nativeName:"Bulgarian"},{locale:"zh",nativeName:"Chinese"},{locale:"cs",nativeName:"Czech"},{locale:"da",nativeName:"Danish"},{locale:"et",nativeName:"Estonian"},{locale:"fi",nativeName:"Finnish"},{locale:"fr",nativeName:"French"},{locale:"de-informal",nativeName:"German"},{locale:"el",nativeName:"Greek"},{locale:"hu",nativeName:"Hungarian"},{locale:"it",nativeName:"Italian"},{locale:"ja",nativeName:"Japanese"},{locale:"lv",nativeName:"Latvian"},{locale:"pl",nativeName:"Polish"},{locale:"ro",nativeName:"Romanian"},{locale:"ru",nativeName:"Russian"},{locale:"sk",nativeName:"Slovak"},{locale:"sl",nativeName:"Slovenian"},{locale:"es-informal",nativeName:"Spanish"},{locale:"sv",nativeName:"Swedish"},{locale:"ti",nativeName:"Tigrinya"},{locale:"tr",nativeName:"Turkish"},{locale:"uk",nativeName:"Ukrainian"}]}},translationsActive:{category:ne,headingText:"Show translations active",description:"",...l,translations:{...X,currentLocale:"nl",isActive:!0,isAvailable:!0,languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"}]}},translationsActiveLarge:{category:ne,headingText:"Show translations active (large list)",description:"",...l,config:{...l.config,context:{...l.context,contentLocale:"nl",userLocale:"en"}},translations:{...X,currentLocale:"lv",isActive:!0,isAvailable:!0,languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"},{locale:"ar",nativeName:"Arabic"},{locale:"bg",nativeName:"Bulgarian"},{locale:"zh",nativeName:"Chinese"},{locale:"cs",nativeName:"Czech"},{locale:"da",nativeName:"Danish"},{locale:"et",nativeName:"Estonian"},{locale:"fi",nativeName:"Finnish"},{locale:"fr",nativeName:"French"},{locale:"de-informal",nativeName:"German"},{locale:"el",nativeName:"Greek"},{locale:"hu",nativeName:"Hungarian"},{locale:"it",nativeName:"Italian"},{locale:"ja",nativeName:"Japanese"},{locale:"lv",nativeName:"Latvian"},{locale:"pl",nativeName:"Polish"},{locale:"ro",nativeName:"Romanian"},{locale:"ru",nativeName:"Russian"},{locale:"sk",nativeName:"Slovak"},{locale:"sl",nativeName:"Slovenian"},{locale:"es-informal",nativeName:"Spanish"},{locale:"sv",nativeName:"Swedish"},{locale:"ti",nativeName:"Tigrinya"},{locale:"tr",nativeName:"Turkish"},{locale:"uk",nativeName:"Ukrainian"}]}},translationsFullConversation:{category:ne,headingText:"Show translated messages",description:"",...l,participantInfo:d,serviceInfo:{activeServiceSessionId:"3942159e-9878-469e-9120-f44fd6be0f35"},events:[p,m,S,{...N,payload:{...N.payload,id:`${N.payload.id}XXX`}},T,z,j,u,f,y,L,U,H,G,B,P,A,M,_,O,W,$,E,C,N,y].map(c),translations:{...X,currentLocale:"nl",isActive:!0,isAvailable:!0,translatedEventGroups:{[p.payload.id]:[m,S,{...N,payload:{...N.payload,id:`${N.payload.id}XXX`}},T,z,j,u].map(e=>e.payload.id),[f.payload.id]:[L,U,H,G,B,P,A,M,_,O,W,$,E,C,N].map(e=>e.payload.id)},languages:[{locale:"nl",nativeName:"Dutch"},{locale:"en",nativeName:"English"}]}},translationProposal:{category:ne,headingText:"Show translation proposal",description:"",...l,events:[S,z,P],config:{...l.config,showDisclaimer:!0,context:{contentLocale:"nl-informal",userLocale:"en-GB"}},translations:{...X,translationProposal:{buttonLabel:"Activate",proposedLocale:"en-GB",srDismissButtonText:"Dismiss translation proposal",titleLabel:"Do you want to chat in English?"},isAvailable:!0,isActive:!1,languages:[{locale:"nl-informal",nativeName:"Dutch"},{locale:"en-GB",nativeName:"English"}]}},translationProposalWithoutTitle:{category:ne,headingText:"Show translation proposal without title",description:"",...l,events:[S,z,P],config:{...l.config,showDisclaimer:!0,context:{contentLocale:"nl-informal",userLocale:"en-GB"}},translations:{...X,translationProposal:{buttonLabel:"Activate",proposedLocale:"en-GB",srDismissButtonText:"Dismiss translation proposal"},isAvailable:!0,isActive:!1,languages:[{locale:"nl-informal",nativeName:"Dutch"},{locale:"en-GB",nativeName:"English"}]}}},de={minimizedInline:{category:ie,headingText:"Inline minimized",description:"",inline:{...l,config:{...l.config,layoutMode:"inline"},visibility:{...l.visibility,visibility:o.visibilityStates.minimized}}},minimizedInlineCharacterLimit:{category:ie,headingText:"Inline minimized with limited characters",description:"",inline:{...l,config:{...l.config,layoutMode:"inline"},visibility:{...l.visibility,visibility:o.visibilityStates.minimized},entryMeta:{...l.entryMeta,options:{text:{limit:120}}}}},minimizedInlinePrechat:{category:ie,headingText:"Inline minimized with collapsed chat messages",description:"",inline:{...l,config:{...l.config,layoutMode:"inline",preChatEvents:[I]},visibility:{...l.visibility,visibility:o.visibilityStates.minimized}}},minimizedInlinePrechatSuggestions:{category:ie,headingText:"Inline minimized with collapsed chat messages & suggestions",description:"",inline:{...l,config:{...l.config,layoutMode:"inline",preChatEvents:[I]},serviceData:{suggestion:{body:q}},visibility:{...l.visibility,visibility:o.visibilityStates.minimized}}},inlineWithSuggestions:{category:ee,headingText:"Suggestions",description:"",inline:{...l,config:{...l.config,layoutMode:"inline"},visibility:{...l.visibility,visibility:o.visibilityStates.open},serviceData:{suggestion:{body:q}}}},minimizedInlineWithError:{category:ie,headingText:"Inline minimized with error",description:"",inline:{...l,config:{...l.config,layoutMode:"inline"},visibility:{...l.visibility,visibility:o.visibilityStates.minimized},interrupt:{error:new o.SeamlyOfflineError(new Error("seamly offline error"))}}}},ue={minimizedWindow:{category:te,headingText:"Unstarted minimized",description:"",window:{...l,config:{...l.config,layoutMode:"window"},visibility:{...l.visibility,visibility:o.visibilityStates.minimized}}},minimizedWindowStarted:{category:te,headingText:"Started minimized",description:"",window:{...l,config:{...l.config,layoutMode:"window"},visibility:{...l.visibility,visibility:o.visibilityStates.minimized},participantInfo:d,headerTitles:g}},minimizedWindowStartedUnread:{category:te,headingText:"Minimized with unread messages",description:"",window:{...l,config:{...l.config,layoutMode:"window"},visibility:{...l.visibility,visibility:o.visibilityStates.minimized},participantInfo:d,headerTitles:g,unreadEvents:12}}},pe={suggestionsMessage:{category:Y,headingText:"Suggestions message",description:"",...l,events:[x(S.payload.body),{type:"service_data",payload:{type:"suggestion",body:q}}]}},fe=(e,t=[])=>{const i={...le,fullConversation:{...le.fullConversation,events:[I,...le.fullConversation.events]},...pe,...t.reduce((e,t)=>{const{key:i,headingText:n,description:o,body:a}=t;return{...e,[i]:{category:Y,headingText:n,description:o,...l,participantInfo:d,events:[x(a)]}}},{})};return Object.keys(i).reduce((t,n)=>{const{headingText:o,category:a,description:r,...s}=i[n];return{...t,[n]:{headingText:o,description:r,category:a,...e.reduce((e,t)=>({...e,[t]:{...s,config:{...s.config,layoutMode:t}}}),{})}}},{})};i(4520),require("preact/compat");const ye=require("preact/jsx-runtime"),me=({setSelectedState:e,states:t,headingLevel:i})=>{const n=`h${i.toString()}`,a=`h${(parseInt(i,10)+1).toString()}`,r=(0,o.getUrlSearchParams)();return(0,ye.jsx)("nav",{"aria-label":"Style guide navigation",className:"nav--styleguide",children:(0,ye.jsx)("ol",{className:"list--styleguidestates",children:Object.keys(oe).map(i=>{const{heading:s,description:c}=oe[i],l=Object.keys(t).filter(e=>{const{category:n}=t[e];return n===i});return l.length>0&&(0,ye.jsxs)("li",{children:[(0,ye.jsx)(n,{children:s}),(0,ye.jsx)("span",{className:"category__description",children:c}),(0,ye.jsx)("ol",{children:l.map(i=>{const n={...t[i]};delete n.category;const{headingText:s,descriptionId:c,description:l,...d}=n;return(0,ye.jsxs)("li",{children:[(0,ye.jsx)(a,{id:c,children:s}),l&&(0,ye.jsx)("span",{className:"feature__description",children:l}),(0,ye.jsx)("ul",{className:"list--styleguidelayouts",children:Object.keys(d).map(t=>(0,ye.jsx)("li",{className:t===r?.layoutMode&&i===r?.feature?"state__selected":void 0,children:(0,ye.jsx)("a",{"aria-describedby":c,href:`${window.location.pathname}?${(0,o.getUrlSearchString)({layoutMode:t,feature:i})}`,"aria-current":t===r?.layoutMode&&i===r?.feature?"page":void 0,onClick:n=>{if(n.preventDefault(),"inline"===t){const e=window.document.querySelector(".chat-inline");e&&window.scroll({top:e.offsetTop,behavior:"smooth"})}var a;a={layoutMode:t,feature:i},window.history.pushState(null,"",`${window.location.pathname}?${(0,o.getUrlSearchString)(a)}`),e(a)},children:t.charAt(0).toUpperCase()+t.slice(1)})},t))})]},i)})})]},i)})})})};i(3949);var he=Symbol.for("immer-nothing"),ge=Symbol.for("immer-draftable"),ve=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var we=Object.getPrototypeOf;function xe(e){return!!e&&!!e[ve]}function Se(e){return!!e&&(je(e)||Array.isArray(e)||!!e[ge]||!!e.constructor?.[ge]||Le(e)||Oe(e))}var Ie=Object.prototype.constructor.toString(),Te=new WeakMap;function je(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(i===Object)return!0;if("function"!=typeof i)return!1;let n=Te.get(i);return void 0===n&&(n=Function.toString.call(i),Te.set(i,n)),n===Ie}function Me(e,t,i=!0){0===_e(e)?(i?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((i,n)=>t(n,i,e))}function _e(e){const t=e[ve];return t?t.type_:Array.isArray(e)?1:Le(e)?2:Oe(e)?3:0}function Ee(e,t){return 2===_e(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ce(e,t,i){const n=_e(e);2===n?e.set(t,i):3===n?e.add(i):e[t]=i}function Le(e){return e instanceof Map}function Oe(e){return e instanceof Set}function Ae(e){return e.copy_||e.base_}function Ne(e,t){if(Le(e))return new Map(e);if(Oe(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const i=je(e);if(!0===t||"class_only"===t&&!i){const t=Object.getOwnPropertyDescriptors(e);delete t[ve];let i=Reflect.ownKeys(t);for(let n=0;n<i.length;n++){const o=i[n],a=t[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(we(e),t)}{const t=we(e);if(null!==t&&i)return{...e};const n=Object.create(t);return Object.assign(n,e)}}function ze(e,t=!1){return ke(e)||xe(e)||!Se(e)||(_e(e)>1&&Object.defineProperties(e,{set:Pe,add:Pe,clear:Pe,delete:Pe}),Object.freeze(e),t&&Object.values(e).forEach(e=>ze(e,!0))),e}var Pe={value:function(){be(2)}};function ke(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var De,Re={};function Fe(e){const t=Re[e];return t||be(0),t}function Ue(){return De}function He(e,t){t&&(Fe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ge(e){Be(e),e.drafts_.forEach($e),e.drafts_=null}function Be(e){e===De&&(De=e.parent_)}function We(e){return De={drafts_:[],parent_:De,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $e(e){const t=e[ve];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Xe(e,t){t.unfinalizedDrafts_=t.drafts_.length;const i=t.drafts_[0];return void 0!==e&&e!==i?(i[ve].modified_&&(Ge(t),be(4)),Se(e)&&(e=qe(t,e),t.parent_||Ye(t,e)),t.patches_&&Fe("Patches").generateReplacementPatches_(i[ve].base_,e,t.patches_,t.inversePatches_)):e=qe(t,i,[]),Ge(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==he?e:void 0}function qe(e,t,i){if(ke(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[ve];if(!o)return Me(t,(n,a)=>Je(e,o,t,n,a,i),n),t;if(o.scope_!==e)return t;if(!o.modified_)return Ye(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let a=t,r=!1;3===o.type_&&(a=new Set(t),t.clear(),r=!0),Me(a,(n,a)=>Je(e,o,t,n,a,i,r),n),Ye(e,t,!1),i&&e.patches_&&Fe("Patches").generatePatches_(o,i,e.patches_,e.inversePatches_)}return o.copy_}function Je(e,t,i,n,o,a,r){if(null==o)return;if("object"!=typeof o&&!r)return;const s=ke(o);if(!s||r){if(xe(o)){const r=qe(e,o,a&&t&&3!==t.type_&&!Ee(t.assigned_,n)?a.concat(n):void 0);if(Ce(i,n,r),!xe(r))return;e.canAutoFreeze_=!1}else r&&i.add(o);if(Se(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[n]===o&&s)return;qe(e,o),t&&t.scope_.parent_||"symbol"==typeof n||!(Le(i)?i.has(n):Object.prototype.propertyIsEnumerable.call(i,n))||Ye(e,o)}}}function Ye(e,t,i=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ze(t,i)}var Ze={get(e,t){if(t===ve)return e;const i=Ae(e);if(!Ee(i,t))return function(e,t,i){const n=Ve(t,i);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,i,t);const n=i[t];return e.finalized_||!Se(n)?n:n===Qe(e.base_,t)?(tt(e),e.copy_[t]=it(n,e)):n},has:(e,t)=>t in Ae(e),ownKeys:e=>Reflect.ownKeys(Ae(e)),set(e,t,i){const n=Ve(Ae(e),t);if(n?.set)return n.set.call(e.draft_,i),!0;if(!e.modified_){const n=Qe(Ae(e),t),r=n?.[ve];if(r&&r.base_===i)return e.copy_[t]=i,e.assigned_[t]=!1,!0;if(((o=i)===(a=n)?0!==o||1/o==1/a:o!=o&&a!=a)&&(void 0!==i||Ee(e.base_,t)))return!0;tt(e),et(e)}var o,a;return e.copy_[t]===i&&(void 0!==i||t in e.copy_)||Number.isNaN(i)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=i,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Qe(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,tt(e),et(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const i=Ae(e),n=Reflect.getOwnPropertyDescriptor(i,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:i[t]}:n},defineProperty(){be(11)},getPrototypeOf:e=>we(e.base_),setPrototypeOf(){be(12)}},Ke={};function Qe(e,t){const i=e[ve];return(i?Ae(i):e)[t]}function Ve(e,t){if(!(t in e))return;let i=we(e);for(;i;){const e=Object.getOwnPropertyDescriptor(i,t);if(e)return e;i=we(i)}}function et(e){e.modified_||(e.modified_=!0,e.parent_&&et(e.parent_))}function tt(e){e.copy_||(e.copy_=Ne(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function it(e,t){const i=Le(e)?Fe("MapSet").proxyMap_(e,t):Oe(e)?Fe("MapSet").proxySet_(e,t):function(e,t){const i=Array.isArray(e),n={type_:i?1:0,scope_:t?t.scope_:Ue(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=Ze;i&&(o=[n],a=Ke);const{revoke:r,proxy:s}=Proxy.revocable(o,a);return n.draft_=s,n.revoke_=r,s}(e,t);return(t?t.scope_:Ue()).drafts_.push(i),i}function nt(e){if(!Se(e)||ke(e))return e;const t=e[ve];let i,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,i=Ne(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else i=Ne(e,!0);return Me(i,(e,t)=>{Ce(i,e,nt(t))},n),t&&(t.finalized_=!1),i}Me(Ze,(e,t)=>{Ke[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ke.deleteProperty=function(e,t){return Ke.set.call(this,e,t,void 0)},Ke.set=function(e,t,i){return Ze.set.call(this,e[0],t,i,e[0])};var ot=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,i)=>{if("function"==typeof e&&"function"!=typeof t){const i=t;t=e;const n=this;return function(e=i,...o){return n.produce(e,e=>t.call(this,e,...o))}}let n;if("function"!=typeof t&&be(6),void 0!==i&&"function"!=typeof i&&be(7),Se(e)){const o=We(this),a=it(e,void 0);let r=!0;try{n=t(a),r=!1}finally{r?Ge(o):Be(o)}return He(o,i),Xe(n,o)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===he&&(n=void 0),this.autoFreeze_&&ze(n,!0),i){const t=[],o=[];Fe("Patches").generateReplacementPatches_(e,n,t,o),i(t,o)}return n}be(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...i)=>this.produceWithPatches(t,t=>e(t,...i));let i,n;return[this.produce(e,t,(e,t)=>{i=e,n=t}),i,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;Se(e)||be(8),xe(e)&&(xe(t=e)||be(10),e=nt(t));const i=We(this),n=it(e,void 0);return n[ve].isManual_=!0,Be(i),n}finishDraft(e,t){const i=e&&e[ve];i&&i.isManual_||be(9);const{scope_:n}=i;return He(n,t),Xe(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let i;for(i=t.length-1;i>=0;i--){const n=t[i];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}i>-1&&(t=t.slice(i+1));const n=Fe("Patches").applyPatches_;return xe(e)?n(e,t):this.produce(e,e=>n(e,t))}},at=(ot.produce,ot.setUseStrictIteration.bind(ot));function rt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var st=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),ct=()=>Math.random().toString(36).substring(7).split("").join("."),lt={INIT:`@@redux/INIT${ct()}`,REPLACE:`@@redux/REPLACE${ct()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ct()}`};function dt(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function ut(e,t,i){if("function"!=typeof e)throw new Error(rt(2));if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(rt(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(rt(1));return i(ut)(e,t)}let n=e,o=t,a=new Map,r=a,s=0,c=!1;function l(){r===a&&(r=new Map,a.forEach((e,t)=>{r.set(t,e)}))}function d(){if(c)throw new Error(rt(3));return o}function u(e){if("function"!=typeof e)throw new Error(rt(4));if(c)throw new Error(rt(5));let t=!0;l();const i=s++;return r.set(i,e),function(){if(t){if(c)throw new Error(rt(6));t=!1,l(),r.delete(i),a=null}}}function p(e){if(!dt(e))throw new Error(rt(7));if(void 0===e.type)throw new Error(rt(8));if("string"!=typeof e.type)throw new Error(rt(17));if(c)throw new Error(rt(9));try{c=!0,o=n(o,e)}finally{c=!1}return(a=r).forEach(e=>{e()}),e}return p({type:lt.INIT}),{dispatch:p,subscribe:u,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw new Error(rt(10));n=e,p({type:lt.REPLACE})},[st]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(rt(11));function i(){const e=t;e.next&&e.next(d())}return i(),{unsubscribe:e(i)}},[st](){return this}}}}}function pt(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...i)=>e(t(...i)))}function ft(e){return({dispatch:t,getState:i})=>n=>o=>"function"==typeof o?o(t,i,e):n(o)}var yt=ft(),mt=ft,ht="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?pt:pt.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var gt=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}},vt=e=>t=>{setTimeout(t,e)};function bt(e){const t=function(e){const{thunk:t=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{};let a=new gt;return t&&("boolean"==typeof t?a.push(yt):a.push(mt(t.extraArgument))),a},{reducer:i,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:a=!0,preloadedState:r,enhancers:s}=e||{};let c,l;if("function"==typeof i)c=i;else{if(!dt(i))throw new Error(`Minified Redux Toolkit error #${d=1}; visit https://redux-toolkit.js.org/Errors?code=${d} for the full message or use the non-minified dev environment for full errors. `);c=function(e){const t=Object.keys(e),i={};for(let n=0;n<t.length;n++){const o=t[n];"function"==typeof e[o]&&(i[o]=e[o])}const n=Object.keys(i);let o;try{!function(e){Object.keys(e).forEach(t=>{const i=e[t];if(void 0===i(void 0,{type:lt.INIT}))throw new Error(rt(12));if(void 0===i(void 0,{type:lt.PROBE_UNKNOWN_ACTION()}))throw new Error(rt(13))})}(i)}catch(e){o=e}return function(e={},t){if(o)throw o;let a=!1;const r={};for(let o=0;o<n.length;o++){const s=n[o],c=i[s],l=e[s],d=c(l,t);if(void 0===d)throw t&&t.type,new Error(rt(14));r[s]=d,a=a||d!==l}return a=a||n.length!==Object.keys(e).length,a?r:e}}(i)}var d;l="function"==typeof n?n(t):t();let u=pt;o&&(u=ht({trace:!1,..."object"==typeof o&&o}));const p=function(...e){return t=>(i,n)=>{const o=t(i,n);let a=()=>{throw new Error(rt(15))};const r={getState:o.getState,dispatch:(e,...t)=>a(e,...t)},s=e.map(e=>e(r));return a=pt(...s)(o.dispatch),{...o,dispatch:a}}}(...l),f=(e=>function(t){const{autoBatch:i=!0}=t??{};let n=new gt(e);return i&&n.push(((e={type:"raf"})=>t=>(...i)=>{const n=t(...i);let o=!0,a=!1,r=!1;const s=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:vt(10):"callback"===e.type?e.queueNotification:vt(e.timeout),l=()=>{r=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){const t=n.subscribe(()=>o&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,a=!o,a&&(r||(r=!0,c(l))),n.dispatch(e)}finally{o=!0}}})})("object"==typeof i?i:void 0)),n})(p);return ut(c,r,u(..."function"==typeof s?s(f):f()))}at(!1);var{assign:wt}=Object;Symbol.for("rtk-state-proxy-original");const xt={send:()=>{},store:{get:e=>e,set:e=>e,delete:e=>e},sendContext:()=>{},hasConversation:()=>!1,connected:!1},St=({state:e,translations:t,participants:i=[],children:n})=>{const a=(0,r.useRef)(()=>{}),s=(0,r.useRef)({emit:()=>{},on:()=>{},off:()=>{}}),c=(0,r.useMemo)(()=>{const{translations:n,interrupt:a,config:r,visibility:c,...l}=e||{},d=bt({reducer:{state:o.stateReducer,app:o.appReducer,config:o.configReducer,i18n:o.i18nReducer,translations:o.translationReducer,visibility:o.visibilityReducer,forms:o.formsReducer,interrupt:o.interruptReducer},preloadedState:{state:l,config:r,translations:n,interrupt:a,visibility:c},middleware:e=>e({thunk:{extraArgument:{api:xt,eventBus:s.current}},serializableCheck:!1})}),{config:u}=d.getState();return d.dispatch((0,o.setConfig)(u)),u.preChatEvents&&d.dispatch((0,o.setPreChatEvents)(u.preChatEvents)),d.dispatch((0,o.setInitialLocale)("en-GB")),d.dispatch((0,o.setTranslations)(t)),i.forEach(e=>{d.dispatch((0,o.setParticipant)({participant:e,fromClient:"user"===e?.id}))}),d},[i,e,t]);return e&&(0,ye.jsx)(o.SeamlyStoreProvider,{store:c,children:(0,ye.jsx)(o.SeamlyEventBusContext.Provider,{value:s.current,children:(0,ye.jsx)(o.SeamlyApiContext.Provider,{value:xt,children:(0,ye.jsx)(o.SeamlyLiveRegionContext.Provider,{value:a.current,children:(0,ye.jsx)(o.ComponentFilter,{children:(0,ye.jsx)(o.SeamlyActivityEventContext.Provider,{value:()=>{},children:(0,ye.jsx)(o.SeamlyFileUpload,{children:n})})})})})})})},It=({state:e,customComponents:t={},translations:i,participants:n})=>{const[a,s]=(0,r.useState)(!0),{config:c}=e||{},{layoutMode:l}=c||{},d=t[l];return(0,r.useEffect)(()=>{s(!1),requestAnimationFrame(async()=>{await(0,o.timeout)(60),s(!0)})},[e]),a?d?(0,ye.jsx)(St,{state:e,translations:i,participants:n,children:(0,ye.jsx)(d,{})}):(0,ye.jsx)(St,{state:e,translations:i,participants:n,children:(0,ye.jsx)(o.View,{})}):null},Tt=({tag:e,id:t,children:i})=>{const n=e;return(0,ye.jsx)(n,{id:t,children:i})},jt=({config:e,styleGuideConfig:t,translations:i,headingLevel:n=2,participants:a})=>{const[s,c]=(0,r.useState)(null),[u,p]=(0,r.useState)(""),[f,y]=(0,r.useState)(!0),[m]=(0,r.useState)((0,o.randomId)()),{stateUpdateCallback:h,customMessageEventBodies:v}=t,[b]=(0,r.useState)(()=>{const e=(i=t.showLayoutModes||["inline","window"],{...fe(i,v),...-1!==i.indexOf("window")?{...ue,minimizedWindowPrechat:{category:te,headingText:"Minimized with collapsed chat messages",description:"",window:{...l,config:{...l.config,layoutMode:"window",preChatEvents:[I]},visibility:{...l.visibility,visibility:o.visibilityStates.minimized},participantInfo:d,headerTitles:g}},minimizedWindowPrechatDelayed:{category:te,headingText:"Minimized with delayed collapsed chat messages",description:"",window:{...l,config:{...l.config,layoutMode:"window",preChatEvents:[I],preChat:{enterDelay:1e3,exitAfter:3e3}},visibility:{...l.visibility,visibility:o.visibilityStates.minimized},participantInfo:d,headerTitles:g}},minimizedWindowPrechatDisabled:{category:te,headingText:"Minimized with disabled collapsed chat messages",description:"",window:{...l,config:{...l.config,layoutMode:"window",preChatEvents:[I],preChat:!1},visibility:{...l.visibility,visibility:o.visibilityStates.minimized},participantInfo:d,headerTitles:g}}}:{},...de});var i;return Object.keys(e).reduce((t,i)=>({...t,[i]:{...e[i],descriptionId:(0,o.randomId)()}}),{})}),w=(0,r.useCallback)(e=>{c(h?h(e):e)},[c,h]),x=(0,r.useCallback)((t,i)=>{const n=(0,o.getSearchParamsByKeys)("apiKey","locale"),r=new URLSearchParams({...n,layoutMode:t,feature:i});window.history.replaceState(null,"",`?${r}`);const{headingText:s}=b[i];p(s);const c=b[i][t],{overrideMessages:l,showSuggestions:d}=c.config,u=a.find(e=>"agent"===e.id);return{...c,config:{...c.config,...e,showDisclaimer:c.config.showDisclaimer||e.showDisclaimer,context:{...e.context,...c.config?.context},layoutMode:c.config.layoutMode,...l?{messages:l}:{},showSuggestions:d},headerTitles:{...c.headerTitles,subTitle:u?.name||c.headerTitles.subTitle}}},[b,a,e]);(0,r.useEffect)(()=>{if(f){const e=document.querySelector('[aria-modal="true"]');e&&e.addEventListener("click",()=>{c(e=>e?{...e,visibility:{...e.visibility,visible:"minimized"}}:e)})}},[s,c,f]);const S=(0,r.useCallback)(()=>{const e=(0,o.getUrlSearchParams)(),{layoutMode:t,feature:i}={layoutMode:"inline",feature:"base",...e};w(x(t,i)),window.document.title="Style"},[x,w]);return(0,r.useEffect)(()=>{S()},[S]),(0,r.useEffect)(()=>{window.onpopstate=()=>{S()}},[S]),(0,ye.jsxs)(ye.Fragment,{children:[(0,ye.jsxs)("section",{className:"chat-inline","aria-labelledby":m,children:[(0,ye.jsxs)(Tt,{tag:`h${n.toString()}`,id:m,children:[(0,ye.jsx)("span",{className:"heading__context",children:"Current selected state:"}),`${u}`]}),(0,ye.jsx)("div",{children:f&&(0,ye.jsx)(It,{customComponents:t.customComponents,translations:i,state:s,participants:a})})]}),(0,ye.jsx)("aside",{className:"page-aside markdown",children:(0,ye.jsx)("nav",{className:"page-controls",children:(0,ye.jsx)(me,{headingLevel:n,setSelectedState:({layoutMode:e,feature:t})=>{const i=x(e,t);w(i),i.styleGuideReset&&(y(!1),setTimeout(()=>{y(!0)}))},states:b})})})]})};class Mt extends o.Engine{constructor({styleGuideConfig:e,...t},i){super(t,i),this.styleGuideConfig=e||{}}async render(){const e={...this.config.customComponents||{},view:void 0},t=new o.API({namespace:this.config.namespace||"",config:this.config.api,context:this.config.context,layoutMode:this.config.layoutMode}),i=await t.getTranslations(this.config.context?.userLocale||"en-GB"),{agentParticipant:n,userParticipant:r}=await t.getConfig(),s=[{id:"user",...r},{id:"agent",introduction:"I am {{name}}",...n}],c={...this.config,customComponents:Object.keys(e).length?e:void 0};(0,a.render)((0,ye.jsx)(jt,{config:c,styleGuideConfig:this.styleGuideConfig,translations:i,participants:s}),this.parentElement)}}const _t=Mt;class Et extends o.ExternalApi{constructor(e,t){super(e),this.styleGuideConfig=t}createInstance(e){const{userStyleGuideConfig:t,...i}=e;return new _t({styleGuideConfig:{...this.styleGuideConfig,...t},...i},this)}getUserConfig(e={},t){return super.getUserConfig({...e,...t})}}const Ct=Et,Lt=function(e,t){if(window.seamlyStyleGuide&&!Array.isArray(window.seamlyStyleGuide))throw new Error("Seamly UI has already been initialised. Use the window.seamly object to start new instances instead.");const i=Array.isArray(window.seamlyStyleGuide)?window.seamlyStyleGuide:[],n=new Ct(e,t);window.seamly=n,window.seamlyStyleGuide={push:n.push.bind(n)},n.push(...i)};module.exports=n})();
2
2
  //# sourceMappingURL=~/style-guide.min.js.map