@botfabrik/engine-webclient 4.93.1 → 4.93.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/index-BwGiWG8Z.js +351 -0
- package/dist/client/assets/index-BwGiWG8Z.js.map +1 -0
- package/dist/client/index.html +1 -1
- package/dist/createSessionInfo.test.js +1 -6
- package/dist/embed/bundle.js +17 -14
- package/dist/index.d.ts +0 -6
- package/dist/index.js +15 -80
- package/dist/requestSessionData.d.ts +1 -0
- package/dist/requestSessionData.js +5 -0
- package/dist/requestSessionData.test.js +16 -9
- package/package.json +2 -4
- package/dist/client/assets/index-J_X7d2_u.js +0 -119
- package/dist/client/assets/index-J_X7d2_u.js.map +0 -1
package/dist/client/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<meta name="theme-color" content="#000000" />
|
|
14
14
|
<meta name="google" content="notranslate" />
|
|
15
15
|
<title>Bubble Chat Client</title>
|
|
16
|
-
<script type="module" crossorigin src="./assets/index-
|
|
16
|
+
<script type="module" crossorigin src="./assets/index-BwGiWG8Z.js"></script>
|
|
17
17
|
<link rel="stylesheet" crossorigin href="./assets/index-CQifi_K_.css">
|
|
18
18
|
</head>
|
|
19
19
|
|
|
@@ -6,9 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const globals_1 = require("@jest/globals");
|
|
7
7
|
const createSessionInfo_1 = __importDefault(require("./createSessionInfo"));
|
|
8
8
|
(0, globals_1.describe)('create session info', () => {
|
|
9
|
-
const props = {
|
|
10
|
-
sessionTokenSecret: 'some-secret',
|
|
11
|
-
};
|
|
12
9
|
const querystrings = {};
|
|
13
10
|
const headers = {
|
|
14
11
|
host: 'fluance-chatbot.scapp.io',
|
|
@@ -46,7 +43,7 @@ const createSessionInfo_1 = __importDefault(require("./createSessionInfo"));
|
|
|
46
43
|
environment: 'PROD',
|
|
47
44
|
};
|
|
48
45
|
(0, globals_1.it)('without user payload', async () => {
|
|
49
|
-
const sessionInfo = await (0, createSessionInfo_1.default)(socket, 'my-client', 'TEST', defaultSessionInfo, 'my-user-id', 'de_DE', { email: 'hans@example.com' },
|
|
46
|
+
const sessionInfo = await (0, createSessionInfo_1.default)(socket, 'my-client', 'TEST', defaultSessionInfo, 'my-user-id', 'de_DE', { email: 'hans@example.com' }, {})();
|
|
50
47
|
// client
|
|
51
48
|
(0, globals_1.expect)(sessionInfo.client.name).toBe('my-client');
|
|
52
49
|
(0, globals_1.expect)(sessionInfo.client.type).toBe('webclient');
|
|
@@ -73,7 +70,6 @@ const createSessionInfo_1 = __importDefault(require("./createSessionInfo"));
|
|
|
73
70
|
};
|
|
74
71
|
const props = {
|
|
75
72
|
requestUserInfos,
|
|
76
|
-
sessionTokenSecret: 'some-secret',
|
|
77
73
|
};
|
|
78
74
|
const sessionInfo = await (0, createSessionInfo_1.default)(socket, 'my-client', 'TEST', defaultSessionInfo, 'my-user-id', 'de_DE', {}, props)();
|
|
79
75
|
(0, globals_1.expect)(sessionInfo.user.id).toBe('hans.muster@PRIMARY');
|
|
@@ -88,7 +84,6 @@ const createSessionInfo_1 = __importDefault(require("./createSessionInfo"));
|
|
|
88
84
|
};
|
|
89
85
|
const props = {
|
|
90
86
|
requestUserInfos,
|
|
91
|
-
sessionTokenSecret: 'some-secret',
|
|
92
87
|
};
|
|
93
88
|
const sessionInfo = await (0, createSessionInfo_1.default)(socket, 'my-client', 'TEST', defaultSessionInfo, 'my-user-id', 'de_DE', {}, props)();
|
|
94
89
|
(0, globals_1.expect)(sessionInfo.user.id).toBe('my-user-id');
|
package/dist/embed/bundle.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Tt=Object.defineProperty;var Ot=(B,p,y)=>p in B?Tt(B,p,{enumerable:!0,configurable:!0,writable:!0,value:y}):B[p]=y;var k=(B,p,y)=>Ot(B,typeof p!="symbol"?p+"":p,y);(function(){"use strict";function B(){}function p(e,t,n,o,s){e.__svelte_meta={loc:{file:t,line:n,column:o,char:s}}}function y(e){return e()}function Ee(){return Object.create(null)}function C(e){e.forEach(y)}function q(e){return typeof e=="function"}function K(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let W;function j(e,t){return e===t?!0:(W||(W=document.createElement("a")),W.href=t,e===W.href)}function Ye(e){return Object.keys(e).length===0}const Xe=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Le(e,t){e.appendChild(t)}function $(e,t,n){const o=qe(e);if(!o.getElementById(t)){const s=g("style");s.id=t,s.textContent=n,Ke(o,s)}}function qe(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Ke(e,t){return Le(e.head||e,t),t.sheet}function $e(e,t,n){e.insertBefore(t,n||null)}function xe(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e){return document.createElement(e)}function E(e){return document.createTextNode(e)}function ee(){return E(" ")}function et(){return E("")}function tt(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function nt(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ot(e){return Array.from(e.childNodes)}function Se(e,t,n){e.classList.toggle(t,!!n)}function st(e,t,{bubbles:n=!1,cancelable:o=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:o})}let R;function I(e){R=e}function rt(){if(!R)throw new Error("Function called outside component initialization");return R}function A(e){rt().$$.on_mount.push(e)}const D=[],ve=[];let N=[];const ye=[],it=Promise.resolve();let te=!1;function ct(){te||(te=!0,it.then(De))}function ne(e){N.push(e)}const oe=new Set;let _=0;function De(){if(_!==0)return;const e=R;do{try{for(;_<D.length;){const t=D[_];_++,I(t),at(t.$$)}}catch(t){throw D.length=0,_=0,t}for(I(null),D.length=0,_=0;ve.length;)ve.pop()();for(let t=0;t<N.length;t+=1){const n=N[t];oe.has(n)||(oe.add(n),n())}N.length=0}while(D.length);for(;ye.length;)ye.pop()();te=!1,oe.clear(),I(e)}function at(e){if(e.fragment!==null){e.update(),C(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ne)}}function lt(e){const t=[],n=[];N.forEach(o=>e.indexOf(o)===-1?t.push(o):n.push(o)),n.forEach(o=>o()),N=t}const z=new Set;let dt;function se(e,t){e&&e.i&&(z.delete(e),e.i(t))}function Ne(e,t,n,o){if(e&&e.o){if(z.has(e))return;z.add(e),dt.c.push(()=>{z.delete(e)}),e.o(t)}}function _e(e){e&&e.c()}function re(e,t,n){const{fragment:o,after_update:s}=e.$$;o&&o.m(t,n),ne(()=>{const r=e.$$.on_mount.map(y).filter(q);e.$$.on_destroy?e.$$.on_destroy.push(...r):C(r),e.$$.on_mount=[]}),s.forEach(ne)}function ie(e,t){const n=e.$$;n.fragment!==null&&(lt(n.after_update),C(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ut(e,t){e.$$.dirty[0]===-1&&(D.push(e),ct(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ce(e,t,n,o,s,r,c=null,i=[-1]){const a=R;I(e);const d=e.$$={fragment:null,ctx:[],props:r,update:B,not_equal:s,bound:Ee(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:Ee(),dirty:i,skip_bound:!1,root:t.target||a.$$.root};c&&c(d.root);let u=!1;if(d.ctx=n?n(e,t.props||{},(h,Q,...m)=>{const l=m.length?m[0]:Q;return d.ctx&&s(d.ctx[h],d.ctx[h]=l)&&(!d.skip_bound&&d.bound[h]&&d.bound[h](l),u&&ut(e,h)),Q}):[],d.update(),u=!0,C(d.before_update),d.fragment=o?o(d.ctx):!1,t.target){if(t.hydrate){const h=ot(t.target);d.fragment&&d.fragment.l(h),h.forEach(xe)}else d.fragment&&d.fragment.c();t.intro&&se(e.$$.fragment),re(e,t.target,t.anchor),De()}I(a)}class ft{constructor(){k(this,"$$");k(this,"$$set")}$destroy(){ie(this,1),this.$destroy=B}$on(t,n){if(!q(n))return B;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const s=o.indexOf(n);s!==-1&&o.splice(s,1)}}$set(t){this.$$set&&!Ye(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Qt="4.2.19",ht="4";function w(e,t){document.dispatchEvent(st(e,{version:Qt,...t},{bubbles:!0}))}function F(e,t){w("SvelteDOMInsert",{target:e,node:t}),Le(e,t)}function S(e,t,n){w("SvelteDOMInsert",{target:e,node:t,anchor:n}),$e(e,t,n)}function L(e){w("SvelteDOMRemove",{node:e}),xe(e)}function ke(e,t,n,o,s,r,c){const i=[];w("SvelteDOMAddEventListener",{node:e,event:t,handler:n,modifiers:i});const a=tt(e,t,n,o);return()=>{w("SvelteDOMRemoveEventListener",{node:e,event:t,handler:n,modifiers:i}),a()}}function U(e,t,n){nt(e,t,n),n==null?w("SvelteDOMRemoveAttribute",{node:e,attribute:t}):w("SvelteDOMSetAttribute",{node:e,attribute:t,value:n})}function ae(e,t,n){for(const o of Object.keys(t))~n.indexOf(o)||console.warn(`<${e}> received an unexpected slot "${o}".`)}class le extends ft{constructor(n){if(!n||!n.target&&!n.$$inline)throw new Error("'target' is a required option");super();k(this,"$$prop_def");k(this,"$$events_def");k(this,"$$slot_def")}$destroy(){super.$destroy(),this.$destroy=()=>{console.warn("Component was already destroyed")}}$capture_state(){}$inject_state(){}}typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ht);const x="src/Iframe.svelte";function Ut(e){$(e,"svelte-icor79",`.svelte-icor79,.svelte-icor79:before,.svelte-icor79:after{box-sizing:border-box}.bot-border.svelte-icor79{position:fixed;display:flex;flex-direction:column;top:0;bottom:env(safe-area-inset-bottom);height:100%;max-height:100vh;width:100%;border-width:0;border-radius:var(--window-border-radius, 8px);box-shadow:rgba(0, 0, 0, 0.24) 0px 16px 40px;background:transparent;opacity:1;transition:transform 200ms,
|
|
2
2
|
opacity 100ms 100ms,
|
|
3
|
-
all 150ms;z-index:2147483647}.bot-border.closed.svelte-icor79{transform:translateY(100vh);opacity:0}.bot.svelte-icor79{display:block;width:100%;flex:1 0 auto;margin:0}@media screen and (min-width: 768px){#chat-frame.svelte-icor79{border-radius:var(--window-border-radius, 8px)}.bot-border.svelte-icor79{height:var(--window-height, 43em);max-height:calc(100vh - 2em);width:var(--window-width, 25em);top:auto;right:1em;bottom:1em;left:auto;border-radius:var(--window-border-radius, 8px)}.bot-border.closed.svelte-icor79{transform:translateY(var(--window-height, 43em));opacity:0}}p.svelte-icor79,pre.svelte-icor79{max-width:300px}pre.svelte-icor79{font-size:0.6em;line-height:0.5}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
all 150ms;z-index:2147483647}.bot-border.closed.svelte-icor79{transform:translateY(100vh);opacity:0}.bot.svelte-icor79{display:block;width:100%;flex:1 0 auto;margin:0}@media screen and (min-width: 768px){#chat-frame.svelte-icor79{border-radius:var(--window-border-radius, 8px)}.bot-border.svelte-icor79{height:var(--window-height, 43em);max-height:calc(100vh - 2em);width:var(--window-width, 25em);top:auto;right:1em;bottom:1em;left:auto;border-radius:var(--window-border-radius, 8px)}.bot-border.closed.svelte-icor79{transform:translateY(var(--window-height, 43em));opacity:0}}p.svelte-icor79,pre.svelte-icor79{max-width:300px}pre.svelte-icor79{font-size:0.6em;line-height:0.5}
|
|
4
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSWZyYW1lLnN2ZWx0ZSIsIm1hcHBpbmdzIjoiQUF1REUsY0FBQyxDQUNELGNBQUMsT0FBTyxDQUNSLGNBQUMsTUFBTyxDQUNOLFVBQVUsQ0FBRSxVQUNkLENBQ0EseUJBQVksQ0FDVixRQUFRLENBQUUsS0FBSyxDQUNmLE9BQU8sQ0FBRSxJQUFJLENBQ2IsY0FBYyxDQUFFLE1BQU0sQ0FDdEIsR0FBRyxDQUFFLENBQUMsQ0FDTixNQUFNLENBQUUsSUFBSSxzQkFBc0IsQ0FBQyxDQUNuQyxNQUFNLENBQUUsSUFBSSxDQUNaLFVBQVUsQ0FBRSxLQUFLLENBQ2pCLEtBQUssQ0FBRSxJQUFJLENBQ1gsWUFBWSxDQUFFLENBQUMsQ0FDZixhQUFhLENBQUUsSUFBSSxzQkFBc0IsQ0FBQyxJQUFJLENBQUMsQ0FDL0MsVUFBVSxDQUFFLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQzdDLFVBQVUsQ0FBRSxXQUFXLENBQ3ZCLE9BQU8sQ0FBRSxDQUFDLENBQ1YsVUFBVSxDQUNSLFNBQVMsQ0FBQyxLQUFLO0FBQ3JCLE1BQU0sT0FBTyxDQUFDLEtBQUssQ0FBQyxLQUFLO0FBQ3pCLE1BQU0sR0FBRyxDQUFDLEtBQUssQ0FDWCxPQUFPLENBQUUsVUFDWCxDQUVBLFdBQVcscUJBQVEsQ0FDakIsU0FBUyxDQUFFLFdBQVcsS0FBSyxDQUFDLENBQzVCLE9BQU8sQ0FBRSxDQUNYLENBRUEsa0JBQUssQ0FDSCxPQUFPLENBQUUsS0FBSyxDQUNkLEtBQUssQ0FBRSxJQUFJLENBQ1gsSUFBSSxDQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUNkLE1BQU0sQ0FBRSxDQUNWLENBRUEsT0FBTyxNQUFNLENBQUMsR0FBRyxDQUFDLFlBQVksS0FBSyxDQUFFLENBQ25DLHlCQUFZLENBQ1YsYUFBYSxDQUFFLElBQUksc0JBQXNCLENBQUMsSUFBSSxDQUNoRCxDQUVBLHlCQUFZLENBQ1YsTUFBTSxDQUFFLElBQUksZUFBZSxDQUFDLEtBQUssQ0FBQyxDQUNsQyxVQUFVLENBQUUsS0FBSyxLQUFLLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUM3QixLQUFLLENBQUUsSUFBSSxjQUFjLENBQUMsS0FBSyxDQUFDLENBQ2hDLEdBQUcsQ0FBRSxJQUFJLENBQ1QsS0FBSyxDQUFFLEdBQUcsQ0FDVixNQUFNLENBQUUsR0FBRyxDQUNYLElBQUksQ0FBRSxJQUFJLENBQ1YsYUFBYSxDQUFFLElBQUksc0JBQXNCLENBQUMsSUFBSSxDQUNoRCxDQUVBLFdBQVcscUJBQVEsQ0FDakIsU0FBUyxDQUFFLFdBQVcsSUFBSSxlQUFlLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FDakQsT0FBTyxDQUFFLENBQ1gsQ0FDRixDQUNBLGVBQUMsQ0FDRCxpQkFBSSxDQUNGLFNBQVMsQ0FBRSxLQUNiLENBQ0EsaUJBQUksQ0FDRixTQUFTLENBQUUsS0FBSyxDQUNoQixXQUFXLENBQUUsR0FDZiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOlsiSWZyYW1lLnN2ZWx0ZSJdfQ== */`)}function Ce(e){let t,n,o,s,r,c,i,a,d,u,h,Q,m,l,b;const M={c:function(){t=g("p"),t.textContent=`Please make sure that the script tag has 'id="chatbot"' and the attribute
|
|
5
|
+
'data-server' with the full qualified URL to the chatbot-server.`,n=ee(),o=g("pre"),s=E(" "),r=g("code"),c=E(`
|
|
6
|
+
<script
|
|
7
|
+
`),i=g("br"),a=E(`
|
|
8
|
+
id="chatbot"
|
|
9
|
+
`),d=g("br"),u=E(`
|
|
10
|
+
data-server="https://server.com/webclient"
|
|
11
|
+
`),h=g("br"),Q=E(`
|
|
11
12
|
defer
|
|
12
|
-
|
|
13
|
-
src
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
box-shadow 100ms}.chat-button.svelte-6wt8q2:hover{box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px)}
|
|
13
|
+
`),m=g("br"),l=E(`
|
|
14
|
+
src="https://server.com/webclient/embed/bundle.js"> <\/script>
|
|
15
|
+
`),b=E(`
|
|
16
|
+
`),U(t,"class","svelte-icor79"),p(t,x,35,2,743),U(i,"class","svelte-icor79"),p(i,x,42,6,943),U(d,"class","svelte-icor79"),p(d,x,44,6,975),U(h,"class","svelte-icor79"),p(h,x,46,6,1037),U(m,"class","svelte-icor79"),p(m,x,48,6,1062),U(r,"class","svelte-icor79"),p(r,x,40,4,913),U(o,"class","svelte-icor79"),p(o,x,39,2,903)},m:function(v,V){S(v,t,V),S(v,n,V),S(v,o,V),F(o,s),F(o,r),F(r,c),F(r,i),F(r,a),F(r,d),F(r,u),F(r,h),F(r,Q),F(r,m),F(r,l),F(o,b)},p:B,d:function(v){v&&(L(t),L(n),L(o))}};return w("SvelteRegisterBlock",{block:M,id:Ce.name,type:"else",source:"(31:0) {:else}",ctx:e}),M}function Re(e){let t,n,o,s;const r={c:function(){t=g("div"),n=g("iframe"),U(n,"id","chat-frame"),U(n,"title","Chat"),U(n,"class","bot svelte-icor79"),j(n.src,o=`${e[0]}${e[0].indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(e[1]??"")}`)||U(n,"src",o),U(n,"frameborder","0"),U(n,"allow","microphone; clipboard-write"),n.allowFullscreen=!0,p(n,x,24,4,445),U(t,"class","bot-border svelte-icor79"),U(t,"aria-hidden",s=e[2]?"false":"true"),Se(t,"closed",!e[2]),p(t,x,19,2,342)},m:function(i,a){S(i,t,a),F(t,n)},p:function(i,a){a&3&&!j(n.src,o=`${i[0]}${i[0].indexOf("?")===-1?"?":"&"}referrer=${encodeURIComponent(i[1]??"")}`)&&U(n,"src",o),a&4&&s!==(s=i[2]?"false":"true")&&U(t,"aria-hidden",s),a&4&&Se(t,"closed",!i[2])},d:function(i){i&&L(t)}};return w("SvelteRegisterBlock",{block:r,id:Re.name,type:"if",source:"(15:0) {#if server}",ctx:e}),r}function de(e){let t;function n(c,i){return c[0]?Re:Ce}let o=n(e),s=o(e);const r={c:function(){s.c(),t=et()},l:function(i){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(i,a){s.m(i,a),S(i,t,a)},p:function(i,[a]){o===(o=n(i))&&s?s.p(i,a):(s.d(1),s=o(i),s&&(s.c(),s.m(t.parentNode,t)))},i:B,o:B,d:function(i){i&&L(t),s.d(i)}};return w("SvelteRegisterBlock",{block:r,id:de.name,type:"component",source:"",ctx:e}),r}function mt(e,t,n){let{$$slots:o={},$$scope:s}=t;ae("Iframe",o,[]);let{server:r}=t,{referrer:c}=t,{open:i}=t,{assetsUrl:a}=t,{chatStarted:d}=t,{onToggle:u}=t,{onRestartChat:h}=t,{onLoad:Q}=t;A(()=>{var l;(l=document.getElementById("chat-frame"))==null||l.addEventListener("load",Q)}),e.$$.on_mount.push(function(){r===void 0&&!("server"in t||e.$$.bound[e.$$.props.server])&&console.warn("<Iframe> was created without expected prop 'server'"),c===void 0&&!("referrer"in t||e.$$.bound[e.$$.props.referrer])&&console.warn("<Iframe> was created without expected prop 'referrer'"),i===void 0&&!("open"in t||e.$$.bound[e.$$.props.open])&&console.warn("<Iframe> was created without expected prop 'open'"),a===void 0&&!("assetsUrl"in t||e.$$.bound[e.$$.props.assetsUrl])&&console.warn("<Iframe> was created without expected prop 'assetsUrl'"),d===void 0&&!("chatStarted"in t||e.$$.bound[e.$$.props.chatStarted])&&console.warn("<Iframe> was created without expected prop 'chatStarted'"),u===void 0&&!("onToggle"in t||e.$$.bound[e.$$.props.onToggle])&&console.warn("<Iframe> was created without expected prop 'onToggle'"),h===void 0&&!("onRestartChat"in t||e.$$.bound[e.$$.props.onRestartChat])&&console.warn("<Iframe> was created without expected prop 'onRestartChat'"),Q===void 0&&!("onLoad"in t||e.$$.bound[e.$$.props.onLoad])&&console.warn("<Iframe> was created without expected prop 'onLoad'")});const m=["server","referrer","open","assetsUrl","chatStarted","onToggle","onRestartChat","onLoad"];return Object.keys(t).forEach(l=>{!~m.indexOf(l)&&l.slice(0,2)!=="$$"&&l!=="slot"&&console.warn(`<Iframe> was created with unknown prop '${l}'`)}),e.$$set=l=>{"server"in l&&n(0,r=l.server),"referrer"in l&&n(1,c=l.referrer),"open"in l&&n(2,i=l.open),"assetsUrl"in l&&n(3,a=l.assetsUrl),"chatStarted"in l&&n(4,d=l.chatStarted),"onToggle"in l&&n(5,u=l.onToggle),"onRestartChat"in l&&n(6,h=l.onRestartChat),"onLoad"in l&&n(7,Q=l.onLoad)},e.$capture_state=()=>({onMount:A,server:r,referrer:c,open:i,assetsUrl:a,chatStarted:d,onToggle:u,onRestartChat:h,onLoad:Q}),e.$inject_state=l=>{"server"in l&&n(0,r=l.server),"referrer"in l&&n(1,c=l.referrer),"open"in l&&n(2,i=l.open),"assetsUrl"in l&&n(3,a=l.assetsUrl),"chatStarted"in l&&n(4,d=l.chatStarted),"onToggle"in l&&n(5,u=l.onToggle),"onRestartChat"in l&&n(6,h=l.onRestartChat),"onLoad"in l&&n(7,Q=l.onLoad)},t&&"$$inject"in t&&e.$inject_state(t.$$inject),[r,c,i,a,d,u,h,Q]}class Ie extends le{constructor(t){super(t),ce(this,t,mt,de,K,{server:0,referrer:1,open:2,assetsUrl:3,chatStarted:4,onToggle:5,onRestartChat:6,onLoad:7},Ut),w("SvelteRegisterComponent",{component:this,tagName:"Iframe",options:t,id:de.name})}get server(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set server(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get referrer(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set referrer(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get open(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set open(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get assetsUrl(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set assetsUrl(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get chatStarted(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set chatStarted(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get onToggle(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set onToggle(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get onRestartChat(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set onRestartChat(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get onLoad(){throw new Error("<Iframe>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set onLoad(t){throw new Error("<Iframe>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}}const Te="src/OpenButton.svelte";function pt(e){$(e,"svelte-6wt8q2",`.svelte-6wt8q2,.svelte-6wt8q2:before,.svelte-6wt8q2:after{box-sizing:border-box}.chat-button-wrapper.svelte-6wt8q2{position:fixed;top:var(--fab-top-mobile, var(--fab-top, auto));right:var(--fab-right-mobile, var(--fab-right, 1.5em));bottom:var(--fab-bottom-mobile, var(--fab-bottom, 1.5em));left:var(--fab-left-mobile, var(--fab-left, auto));width:var(--fab-size-mobile, var(--fab-size, 5em));height:var(--fab-size-mobile, var(--fab-size, 5em));z-index:999}@media screen and (min-width: 768px){.chat-button-wrapper.svelte-6wt8q2{top:var(--fab-top, auto);right:var(--fab-right, 1.5em);bottom:var(--fab-bottom, 1.5em);left:var(--fab-left, auto);width:var(--fab-size, 6em);height:var(--fab-size, 6em)}}.chat-button.svelte-6wt8q2{display:block;height:100%;cursor:pointer;border-radius:50%;box-shadow:9px 9px 16px rgba(0, 0, 0, 0.25);transition:transform 100ms,
|
|
17
|
+
box-shadow 100ms}.chat-button.svelte-6wt8q2:hover{box-shadow:16px 16px 16px rgba(0, 0, 0, 0.2);transform:translateY(-2px)}
|
|
18
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3BlbkJ1dHRvbi5zdmVsdGUiLCJtYXBwaW5ncyI6IkFBa0NBLGNBQUMsQ0FDRCxjQUFDLE9BQU8sQ0FDUixjQUFDLE1BQU8sQ0FDTixVQUFVLENBQUUsVUFDZCxDQUNBLGtDQUFxQixDQUNuQixRQUFRLENBQUUsS0FBSyxDQUVmLEdBQUcsQ0FBRSxJQUFJLGdCQUFnQixDQUFDLHFCQUFxQixDQUFDLENBQ2hELEtBQUssQ0FBRSxJQUFJLGtCQUFrQixDQUFDLHdCQUF3QixDQUFDLENBQ3ZELE1BQU0sQ0FBRSxJQUFJLG1CQUFtQixDQUFDLHlCQUF5QixDQUFDLENBQzFELElBQUksQ0FBRSxJQUFJLGlCQUFpQixDQUFDLHNCQUFzQixDQUFDLENBRW5ELEtBQUssQ0FBRSxJQUFJLGlCQUFpQixDQUFDLHFCQUFxQixDQUFDLENBQ25ELE1BQU0sQ0FBRSxJQUFJLGlCQUFpQixDQUFDLHFCQUFxQixDQUFDLENBRXBELE9BQU8sQ0FBRSxHQUNYLENBR0EsT0FBTyxNQUFNLENBQUMsR0FBRyxDQUFDLFlBQVksS0FBSyxDQUFFLENBQ25DLGtDQUFxQixDQUNuQixHQUFHLENBQUUsSUFBSSxTQUFTLENBQUMsS0FBSyxDQUFDLENBQ3pCLEtBQUssQ0FBRSxJQUFJLFdBQVcsQ0FBQyxNQUFNLENBQUMsQ0FDOUIsTUFBTSxDQUFFLElBQUksWUFBWSxDQUFDLE1BQU0sQ0FBQyxDQUNoQyxJQUFJLENBQUUsSUFBSSxVQUFVLENBQUMsS0FBSyxDQUFDLENBRTNCLEtBQUssQ0FBRSxJQUFJLFVBQVUsQ0FBQyxJQUFJLENBQUMsQ0FDM0IsTUFBTSxDQUFFLElBQUksVUFBVSxDQUFDLElBQUksQ0FDN0IsQ0FDRixDQUVBLDBCQUFhLENBQ1gsT0FBTyxDQUFFLEtBQUssQ0FDZCxNQUFNLENBQUUsSUFBSSxDQUNaLE1BQU0sQ0FBRSxPQUFPLENBQ2YsYUFBYSxDQUFFLEdBQUcsQ0FDbEIsVUFBVSxDQUFFLEdBQUcsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQzVDLFVBQVUsQ0FDUixTQUFTLENBQUMsS0FBSztBQUNuQixJQUFJLFVBQVUsQ0FBQyxLQUNmLENBQ0EsMEJBQVksTUFBTyxDQUNqQixVQUFVLENBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FDN0MsU0FBUyxDQUFFLFdBQVcsSUFBSSxDQUM1QiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOlsiT3BlbkJ1dHRvbi5zdmVsdGUiXX0= */`)}function ue(e){let t,n,o,s,r,c;const i={c:function(){t=g("div"),n=g("img"),U(n,"class","chat-button svelte-6wt8q2"),U(n,"alt","Open chat window"),j(n.src,o=`${e[0]}/fab.svg`)||U(n,"src",o),p(n,Te,30,0,488),U(t,"class","chat-button-wrapper svelte-6wt8q2"),U(t,"tabindex","0"),U(t,"role","button"),U(t,"aria-label","Open chat window"),U(t,"aria-expanded",s=e[2]?"true":"false"),p(t,Te,21,0,305)},l:function(d){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(d,u){S(d,t,u),F(t,n),r||(c=[ke(t,"click",function(){q(e[1])&&e[1].apply(this,arguments)},!1),ke(t,"keydown",e[3],!1)],r=!0)},p:function(d,[u]){e=d,u&1&&!j(n.src,o=`${e[0]}/fab.svg`)&&U(n,"src",o),u&4&&s!==(s=e[2]?"true":"false")&&U(t,"aria-expanded",s)},i:B,o:B,d:function(d){d&&L(t),r=!1,C(c)}};return w("SvelteRegisterBlock",{block:i,id:ue.name,type:"component",source:"",ctx:e}),i}function Ft(e,t,n){let{$$slots:o={},$$scope:s}=t;ae("OpenButton",o,[]);let{assetsUrl:r}=t,{onToggle:c}=t,{open:i}=t;function a(u){const h=u.key;(h==="ArrowDown"||h==="ArrowRight"||h==="Enter"||h===" "||h==="Space")&&(u.stopPropagation(),c())}e.$$.on_mount.push(function(){r===void 0&&!("assetsUrl"in t||e.$$.bound[e.$$.props.assetsUrl])&&console.warn("<OpenButton> was created without expected prop 'assetsUrl'"),c===void 0&&!("onToggle"in t||e.$$.bound[e.$$.props.onToggle])&&console.warn("<OpenButton> was created without expected prop 'onToggle'"),i===void 0&&!("open"in t||e.$$.bound[e.$$.props.open])&&console.warn("<OpenButton> was created without expected prop 'open'")});const d=["assetsUrl","onToggle","open"];return Object.keys(t).forEach(u=>{!~d.indexOf(u)&&u.slice(0,2)!=="$$"&&u!=="slot"&&console.warn(`<OpenButton> was created with unknown prop '${u}'`)}),e.$$set=u=>{"assetsUrl"in u&&n(0,r=u.assetsUrl),"onToggle"in u&&n(1,c=u.onToggle),"open"in u&&n(2,i=u.open)},e.$capture_state=()=>({assetsUrl:r,onToggle:c,open:i,handleOnKeyDown:a}),e.$inject_state=u=>{"assetsUrl"in u&&n(0,r=u.assetsUrl),"onToggle"in u&&n(1,c=u.onToggle),"open"in u&&n(2,i=u.open)},t&&"$$inject"in t&&e.$inject_state(t.$$inject),[r,c,i,a]}class Oe extends le{constructor(t){super(t),ce(this,t,Ft,ue,K,{assetsUrl:0,onToggle:1,open:2},pt),w("SvelteRegisterComponent",{component:this,tagName:"OpenButton",options:t,id:ue.name})}get assetsUrl(){throw new Error("<OpenButton>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set assetsUrl(t){throw new Error("<OpenButton>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get onToggle(){throw new Error("<OpenButton>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set onToggle(t){throw new Error("<OpenButton>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get open(){throw new Error("<OpenButton>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set open(t){throw new Error("<OpenButton>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}}let Me=!1;function wt(e){Me=e}function Bt(){return Me}/*! js-cookie v3.0.5 | MIT */function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var gt={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function fe(e,t){function n(s,r,c){if(!(typeof document>"u")){c=H({},t,c),typeof c.expires=="number"&&(c.expires=new Date(Date.now()+c.expires*864e5)),c.expires&&(c.expires=c.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var a in c)c[a]&&(i+="; "+a,c[a]!==!0&&(i+="="+c[a].split(";")[0]));return document.cookie=s+"="+e.write(r,s)+i}}function o(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var r=document.cookie?document.cookie.split("; "):[],c={},i=0;i<r.length;i++){var a=r[i].split("="),d=a.slice(1).join("=");try{var u=decodeURIComponent(a[0]);if(c[u]=e.read(d,u),s===u)break}catch{}}return s?c[s]:c}}return Object.create({set:n,get:o,remove:function(s,r){n(s,"",H({},r,{expires:-1}))},withAttributes:function(s){return fe(this.converter,H({},this.attributes,s))},withConverter:function(s){return fe(H({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Je=fe(gt,{path:"/"});const Ve="bubble-chat-window-state",Qe=()=>{switch(Je.get(Ve)){case"open":return!0;case"closed":return!1;default:return}},Pe=e=>{const t=new Date(new Date().getTime()+288e5);Je.set(Ve,e,{expires:t})},he=[];let Ue=Qe();function Z(){Ue=!0,Pe("open"),he.forEach(function(e){e.call(window,!0)})}function T(){Ue=!1,Pe("closed"),he.forEach(function(e){e.call(window,!1)})}function G(){Ue?T():Z()}function me(){pe({type:"RESTART_CHAT"})}function bt(e){pe({type:"CHAT_MESSAGE_FROM_GUEST",text:e})}function Et(e){pe({type:"TRIGGER_STORY",story:e})}function pe(e){var n;const t=document.getElementById("chat-frame");(n=t==null?void 0:t.contentWindow)==null||n.postMessage(e,"*")}function Fe(e,t){switch(e){case"ON_CHAT_WINDOW_STATE_CHANGE":he.push(t);break;default:throw new Error("Unsupported event "+e)}}const Lt=Object.freeze(Object.defineProperty({__proto__:null,closeChatWindow:T,enterGuestMessage:bt,isChatbotLoaded:Bt,openChatWindow:Z,restartChat:me,subscribe:Fe,toggleChatWindow:G,triggerStory:Et},Symbol.toStringTag,{value:"Module"}));function xt(){return navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}const We=()=>{xt()&&document.querySelectorAll("html, body").forEach(e=>{e.classList.add("iOS-device")})},St=e=>{"gtag"in window&&typeof window.gtag=="function"?window.gtag("event","",e):"dataLayer"in window&&Array.isArray(window.dataLayer)&&window.dataLayer.push(e)},je=(e,t,n,o,s)=>{window.addEventListener("message",r=>{const c=r.data;switch(c.type){case"webclient.chat.started":e();break;case"webclient.chat.ended":t();break;case"webclient.window.expand":n(c.devices,c.initial);break;case"webclient.window.close":o();break;case"webclient.change.url":s(c.url);break;case"google.tag.event":St(c.payload);break}},!1)},Ae=e=>new Promise(t=>{const n=document.getElementById(e);n?(n.onload=()=>{t(!0)},n.onerror=()=>{console.error("Failed to load CSS file: custom.css"),t(!1)}):(console.error("No custom.css file found"),t(!1))}),{document:vt}=Xe,ze="src/App.svelte";function yt(e){$(e,"svelte-4k2y00",`.bubble-chat.svelte-4k2y00{font-size:16px;visibility:hidden;opacity:0}.bubble-chat.chatbot-ready.svelte-4k2y00{visibility:visible;opacity:1}
|
|
19
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwLnN2ZWx0ZSIsIm1hcHBpbmdzIjoiQUFnSEUsMEJBQWEsQ0FDWCxTQUFTLENBQUUsSUFBSSxDQUNmLFVBQVUsQ0FBRSxNQUFNLENBQ2xCLE9BQU8sQ0FBRSxDQUNYLENBQ0EsWUFBWSw0QkFBZSxDQUN6QixVQUFVLENBQUUsT0FBTyxDQUNuQixPQUFPLENBQUUsQ0FDWCIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOlsiQXBwLnN2ZWx0ZSJdfQ== */`)}function we(e){let t,n,o,s,r,c,i,a,d;r=new Oe({props:{assetsUrl:e[3],open:e[6],onToggle:G},$$inline:!0}),i=new Ie({props:{server:e[1],referrer:e[2],assetsUrl:e[3],open:e[6],chatStarted:e[0],onToggle:G,onRestartChat:me,onLoad:e[7]},$$inline:!0});const u={c:function(){t=g("link"),o=ee(),s=g("div"),_e(r.$$.fragment),c=ee(),_e(i.$$.fragment),U(t,"id",Be),U(t,"rel","stylesheet"),U(t,"href",n=`${e[3]}/custom.css`),p(t,ze,94,2,2311),U(s,"class",a="bubble-chat "+(e[4]&&e[5]?"chatbot-ready":"")+" svelte-4k2y00"),p(s,ze,97,0,2413)},l:function(Q){throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option")},m:function(Q,m){F(vt.head,t),S(Q,o,m),S(Q,s,m),re(r,s,null),F(s,c),re(i,s,null),d=!0},p:function(Q,[m]){(!d||m&8&&n!==(n=`${Q[3]}/custom.css`))&&U(t,"href",n);const l={};m&8&&(l.assetsUrl=Q[3]),m&64&&(l.open=Q[6]),r.$set(l);const b={};m&2&&(b.server=Q[1]),m&4&&(b.referrer=Q[2]),m&8&&(b.assetsUrl=Q[3]),m&64&&(b.open=Q[6]),m&1&&(b.chatStarted=Q[0]),i.$set(b),(!d||m&48&&a!==(a="bubble-chat "+(Q[4]&&Q[5]?"chatbot-ready":"")+" svelte-4k2y00"))&&U(s,"class",a)},i:function(Q){d||(se(r.$$.fragment,Q),se(i.$$.fragment,Q),d=!0)},o:function(Q){Ne(r.$$.fragment,Q),Ne(i.$$.fragment,Q),d=!1},d:function(Q){Q&&(L(o),L(s)),L(t),ie(r),ie(i)}};return w("SvelteRegisterBlock",{block:u,id:we.name,type:"component",source:"",ctx:e}),u}const Be="chatbot-style";function Dt(e,t,n){let{$$slots:o={},$$scope:s}=t;ae("App",o,[]);let{server:r}=t,{referrer:c}=t,{assetsUrl:i=r?r.split("?")[0]:void 0}=t,{linkHandling:a="default"}=t,{chatStarted:d=!1}=t,u=!1,h=!1;We();let Q=Qe();Fe("ON_CHAT_WINDOW_STATE_CHANGE",function(P){n(6,Q=P)});function m(){n(0,d=!0)}function l(){n(0,d=!1)}function b(f,P){const X=window.innerWidth,ge=f==null||f==="all",be=f==="desktop"&&X>=768,It=f==="mobile"&&X<768;(P?Q!==!1:!0)&&(ge||be||It)&&Z()}function M(){T()}function J(f){const P=window.innerWidth,X=window.location.hostname,ge=new URL(f).hostname,be=X===ge;P<768&&T(),a==="new-tab"?window.open(f,"_blank"):a==="existing-tab"||be?document.location.href=f:window.open(f,"_blank")}function v(){n(5,h=!0)}je(m,l,b,M,J),A(async()=>{n(4,u=await Ae(Be))}),e.$$.on_mount.push(function(){r===void 0&&!("server"in t||e.$$.bound[e.$$.props.server])&&console.warn("<App> was created without expected prop 'server'"),c===void 0&&!("referrer"in t||e.$$.bound[e.$$.props.referrer])&&console.warn("<App> was created without expected prop 'referrer'")});const V=["server","referrer","assetsUrl","linkHandling","chatStarted"];return Object.keys(t).forEach(f=>{!~V.indexOf(f)&&f.slice(0,2)!=="$$"&&f!=="slot"&&console.warn(`<App> was created with unknown prop '${f}'`)}),e.$$set=f=>{"server"in f&&n(1,r=f.server),"referrer"in f&&n(2,c=f.referrer),"assetsUrl"in f&&n(3,i=f.assetsUrl),"linkHandling"in f&&n(8,a=f.linkHandling),"chatStarted"in f&&n(0,d=f.chatStarted)},e.$capture_state=()=>({onMount:A,Iframe:Ie,OpenButton:Oe,closeChatWindow:T,openChatWindow:Z,restartChat:me,subscribe:Fe,toggleChatWindow:G,iPhoneHack:We,registerChatbotEvents:je,waitTillCustomCssLoaded:Ae,getWindowState:Qe,server:r,referrer:c,assetsUrl:i,linkHandling:a,chatStarted:d,CUSTOM_CSS_ELEMENT_ID:Be,isCustomCssLoaded:u,isIframeLoaded:h,open:Q,onChatStartedEvent:m,onChatEndedEvent:l,onExpandWindowEvent:b,onCloseWindowEvent:M,onChangeUrlEvent:J,handleOnIframeLoad:v}),e.$inject_state=f=>{"server"in f&&n(1,r=f.server),"referrer"in f&&n(2,c=f.referrer),"assetsUrl"in f&&n(3,i=f.assetsUrl),"linkHandling"in f&&n(8,a=f.linkHandling),"chatStarted"in f&&n(0,d=f.chatStarted),"isCustomCssLoaded"in f&&n(4,u=f.isCustomCssLoaded),"isIframeLoaded"in f&&n(5,h=f.isIframeLoaded),"open"in f&&n(6,Q=f.open)},t&&"$$inject"in t&&e.$inject_state(t.$$inject),[d,r,c,i,u,h,Q,v,a]}class Nt extends le{constructor(t){super(t),ce(this,t,Dt,we,K,{server:1,referrer:2,assetsUrl:3,linkHandling:8,chatStarted:0},yt),w("SvelteRegisterComponent",{component:this,tagName:"App",options:t,id:we.name})}get server(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set server(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get referrer(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set referrer(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get assetsUrl(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set assetsUrl(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get linkHandling(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set linkHandling(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}get chatStarted(){throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}set chatStarted(t){throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'")}}const _t=e=>e.replace(/\/embed\/bundle\.js/,""),kt=e=>{var t;return(t=e.dataset)==null?void 0:t.server},Ct=e=>{if(e&&"src"in e&&typeof e.src=="string")return kt(e)||_t(e.src)},O=document.querySelector("script#chatbot"),He=Ct(O),Rt=O!=null&&O.getAttribute("link-handling")?O.getAttribute("link-handling"):"default";window.chatbot=Lt;const Ze=()=>{console.log("Chatbot is loading from",He),new Nt({target:document.body,props:{server:He,referrer:window.location.href,linkHandling:Rt}}),wt(!0)},Ge=(e=0)=>{e>=3||document.readyState==="complete"?setTimeout(Ze,500):setTimeout(()=>{Ge(e+1)},500)};Ge();const Y=document.getElementById("chatbot");Y&&"src"in Y&&typeof Y.src=="string"&&Y.src.indexOf("caller=bookmarklet")>0&&setTimeout(Ze,500)})();
|
package/dist/index.d.ts
CHANGED
|
@@ -13,12 +13,6 @@ export interface WebClientProps {
|
|
|
13
13
|
speech?: SpeechToTextProps | undefined;
|
|
14
14
|
expandChatWindowAtStart?: Devices;
|
|
15
15
|
fabVisible?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* A secret key used to generate and verify session tokens (e.g. HMAC).
|
|
18
|
-
* Should be long, random, and stored securely (e.g. via environment variable).
|
|
19
|
-
* Used for signing tokens that identify sessions over insecure channels like WebSocket.
|
|
20
|
-
*/
|
|
21
|
-
sessionTokenSecret: string;
|
|
22
16
|
/**
|
|
23
17
|
* Displays a start screen before a new chat begins, useful for user opt-in (e.g., terms acceptance).
|
|
24
18
|
* Contains a text (`start-screen.intro` in Markdown), form fields, and a start button (`start-screen.start-chat`).
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.CLIENT_TYPE = exports.Devices = void 0;
|
|
7
7
|
const engine_domain_1 = require("@botfabrik/engine-domain");
|
|
8
8
|
const engine_transcript_export_1 = require("@botfabrik/engine-transcript-export");
|
|
9
|
-
const cookie_parser_1 = __importDefault(require("cookie-parser"));
|
|
10
|
-
const crypto_1 = require("crypto");
|
|
11
9
|
const express_1 = require("express");
|
|
10
|
+
const node_crypto_1 = require("node:crypto");
|
|
12
11
|
const package_json_1 = require("../package.json");
|
|
13
12
|
const createSessionInfo_1 = __importDefault(require("./createSessionInfo"));
|
|
14
13
|
const extractLocale_1 = __importDefault(require("./extractLocale"));
|
|
@@ -19,6 +18,8 @@ const requestSessionData_1 = __importDefault(require("./requestSessionData"));
|
|
|
19
18
|
const setTranslations_1 = __importDefault(require("./setTranslations"));
|
|
20
19
|
const speechToText_1 = __importDefault(require("./speechToText"));
|
|
21
20
|
const views_1 = __importDefault(require("./views"));
|
|
21
|
+
const SESSION_ID_COOKIE_NAME = 'session-id';
|
|
22
|
+
const USER_ID_COOKIE_NAME = 'user-id';
|
|
22
23
|
var Devices;
|
|
23
24
|
(function (Devices) {
|
|
24
25
|
Devices["All"] = "all";
|
|
@@ -26,15 +27,11 @@ var Devices;
|
|
|
26
27
|
Devices["Desktop"] = "desktop";
|
|
27
28
|
Devices["None"] = "none";
|
|
28
29
|
})(Devices || (exports.Devices = Devices = {}));
|
|
29
|
-
const SESSION_ID_COOKIE_NAME = 'session-id';
|
|
30
|
-
const USER_ID_COOKIE_NAME = 'user-id';
|
|
31
30
|
exports.default = (clientName, environment, props) => async (bot) => {
|
|
32
31
|
const logger = bot.logger.child({ clientType: exports.CLIENT_TYPE, clientName });
|
|
33
|
-
bot.webserver.express.use((0, cookie_parser_1.default)());
|
|
34
32
|
// serve transcript pdf
|
|
35
|
-
bot.webserver.express.
|
|
36
|
-
const
|
|
37
|
-
const sessionId = cookies[SESSION_ID_COOKIE_NAME];
|
|
33
|
+
bot.webserver.express.use('/transcript-pdf/:sessionId', async (req, res) => {
|
|
34
|
+
const sessionId = req.params['sessionId'];
|
|
38
35
|
if (sessionId?.length) {
|
|
39
36
|
const session = await bot.createSession(sessionId);
|
|
40
37
|
const pdf = await (0, engine_transcript_export_1.getPdf)(session);
|
|
@@ -67,25 +64,19 @@ exports.default = (clientName, environment, props) => async (bot) => {
|
|
|
67
64
|
});
|
|
68
65
|
}
|
|
69
66
|
bot.webserver.express.use(`/${clientName}/embed`, (0, express_1.static)(__dirname + '/embed', serveStaticOptions));
|
|
67
|
+
// TODO: remove in future versions
|
|
70
68
|
bot.webserver.express.get(`/${clientName}/me/session`, (req, res) => {
|
|
69
|
+
logger.info('Old client access get token');
|
|
71
70
|
const cookies = req.cookies || {};
|
|
72
|
-
const sessionId = cookies[SESSION_ID_COOKIE_NAME] || (0,
|
|
71
|
+
const sessionId = cookies[SESSION_ID_COOKIE_NAME] || (0, node_crypto_1.randomUUID)();
|
|
73
72
|
const userId = cookies[USER_ID_COOKIE_NAME] ||
|
|
74
73
|
cookies['bubble-chat-user-id'] || // TODO: remove in future versions
|
|
75
|
-
(0,
|
|
76
|
-
|
|
77
|
-
const userIdToken = generateSignedToken(userId, props.sessionTokenSecret);
|
|
78
|
-
res.cookie(SESSION_ID_COOKIE_NAME, sessionId, {
|
|
79
|
-
...buildCookieOptions(clientName, bot),
|
|
80
|
-
maxAge: 24 * 60 * 60 * 1000, // 1 day
|
|
81
|
-
});
|
|
82
|
-
if (!cookies[USER_ID_COOKIE_NAME]) {
|
|
83
|
-
res.cookie(USER_ID_COOKIE_NAME, userId, buildCookieOptions(clientName, bot));
|
|
84
|
-
}
|
|
85
|
-
res.status(201).json({ sessionIdToken, userIdToken });
|
|
74
|
+
(0, node_crypto_1.randomUUID)();
|
|
75
|
+
res.status(201).json({ sessionIdToken: sessionId, userIdToken: userId });
|
|
86
76
|
});
|
|
77
|
+
// TODO: remove in future versions
|
|
87
78
|
bot.webserver.express.delete(`/${clientName}/me/session`, (_req, res) => {
|
|
88
|
-
|
|
79
|
+
logger.info('Old client access delete token');
|
|
89
80
|
res.sendStatus(204);
|
|
90
81
|
});
|
|
91
82
|
bot.webserver.express.get(`/${clientName}/logo.svg`, (_req, res) => {
|
|
@@ -143,29 +134,13 @@ const onTerminateSession = (socket, bot) => async ({ sessionId, // passed if the
|
|
|
143
134
|
socket.leave(sessionId);
|
|
144
135
|
await session.dispatch(engine_domain_1.Actions.guestDisconnected(sessionId));
|
|
145
136
|
};
|
|
146
|
-
const onStartChat = (socket, props, bot, clientName, environment, logger) => async ({
|
|
147
|
-
userIdToken, querystrings, }) => {
|
|
137
|
+
const onStartChat = (socket, props, bot, clientName, environment, logger) => async ({ sessionId: sessionIdFromClient, userId: defaultUserId, querystrings, sessionIdToken, userIdToken, }) => {
|
|
148
138
|
const locale = (0, extractLocale_1.default)(querystrings, socket.request.headers['accept-language']);
|
|
149
|
-
let sessionId = verifySignedToken(sessionIdToken, props.sessionTokenSecret);
|
|
150
|
-
let userId = verifySignedToken(userIdToken, props.sessionTokenSecret);
|
|
151
|
-
// TODO: remove temporary code in future versions
|
|
152
|
-
// this code is relevant for old clients
|
|
153
|
-
if (!sessionId && oldSessionId) {
|
|
154
|
-
logger.info(`Received an old session ID from client: ${oldSessionId}. It will be replaced with a new one.`);
|
|
155
|
-
sessionId = oldSessionId;
|
|
156
|
-
}
|
|
157
|
-
if (!userId) {
|
|
158
|
-
userId = (0, crypto_1.randomUUID)();
|
|
159
|
-
}
|
|
160
|
-
if (!sessionId || !userId) {
|
|
161
|
-
logger.error(`Invalid session ID token received from client: ${sessionIdToken}`);
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
139
|
const sessionsCollection = bot.store.db.collection('sessions');
|
|
165
|
-
const { sessionInfo: defaultSessionInfo, isNew } = await (0, requestSessionData_1.default)(
|
|
140
|
+
const { sessionId, sessionInfo: defaultSessionInfo, isNew, } = await (0, requestSessionData_1.default)(sessionIdFromClient || sessionIdToken, querystrings, sessionsCollection, clientName, props);
|
|
166
141
|
// create a channel for each session
|
|
167
142
|
socket.join(sessionId);
|
|
168
|
-
const sessionInfo = await (0, createSessionInfo_1.default)(socket, clientName, environment, defaultSessionInfo,
|
|
143
|
+
const sessionInfo = await (0, createSessionInfo_1.default)(socket, clientName, environment, defaultSessionInfo, defaultUserId || userIdToken, locale, querystrings, props)();
|
|
169
144
|
const session = await bot.createSession(sessionId, sessionInfo);
|
|
170
145
|
sendConfigurationToClient(socket, props, bot, clientName);
|
|
171
146
|
// sending persisted state to client
|
|
@@ -242,44 +217,4 @@ const sendConfigurationToClient = (socket, props, bot, clientName) => {
|
|
|
242
217
|
});
|
|
243
218
|
}
|
|
244
219
|
};
|
|
245
|
-
const buildCookieOptions = (clientName, bot) => {
|
|
246
|
-
const isLocalhost = bot.webserver.baseUrl === 'http://localhost:3000';
|
|
247
|
-
return {
|
|
248
|
-
httpOnly: true, // 🔒 Not accessible via JS
|
|
249
|
-
secure: !isLocalhost, // ✅ true only for HTTPS
|
|
250
|
-
sameSite: 'lax', // 🔄 CORS protection (or 'Strict' / 'None')
|
|
251
|
-
path: `/${clientName}`, // Path for the cookie
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
/**
|
|
255
|
-
* Generates a signed token.
|
|
256
|
-
*
|
|
257
|
-
* @param payload
|
|
258
|
-
* @param secret
|
|
259
|
-
* @returns token in the format "payload.signature"
|
|
260
|
-
*/
|
|
261
|
-
const generateSignedToken = (payload, secret) => {
|
|
262
|
-
const signature = (0, crypto_1.createHmac)('sha256', secret).update(payload).digest('hex');
|
|
263
|
-
return `${payload}.${signature}`;
|
|
264
|
-
};
|
|
265
|
-
/**
|
|
266
|
-
* Verifies a signed token.
|
|
267
|
-
*
|
|
268
|
-
* @param token in the format "payload.signature"
|
|
269
|
-
* @param secret
|
|
270
|
-
* @returns payload if the token is valid, otherwise null.
|
|
271
|
-
*/
|
|
272
|
-
const verifySignedToken = (token, secret) => {
|
|
273
|
-
if (!token)
|
|
274
|
-
return null;
|
|
275
|
-
const [payload, signature] = token.split('.');
|
|
276
|
-
if (!payload || !signature)
|
|
277
|
-
return null;
|
|
278
|
-
const expectedSignature = (0, crypto_1.createHmac)('sha256', secret)
|
|
279
|
-
.update(payload)
|
|
280
|
-
.digest('hex');
|
|
281
|
-
if (signature !== expectedSignature)
|
|
282
|
-
return null;
|
|
283
|
-
return payload;
|
|
284
|
-
};
|
|
285
220
|
exports.CLIENT_TYPE = 'webclient';
|
|
@@ -2,6 +2,7 @@ import type { SessionInfo } from '@botfabrik/engine-domain';
|
|
|
2
2
|
import { type WebClientProps } from './index';
|
|
3
3
|
import type { SessionInfoClientPayload, SessionInfoUserPayload } from './types';
|
|
4
4
|
interface SessionData {
|
|
5
|
+
sessionId: string;
|
|
5
6
|
sessionInfo: SessionInfo<SessionInfoClientPayload, SessionInfoUserPayload>;
|
|
6
7
|
isNew: boolean;
|
|
7
8
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const crypto_1 = require("crypto");
|
|
3
4
|
const index_1 = require("./index");
|
|
4
5
|
const requestSessionData = async (sessionId, querystrings, sessionsCollection, clientName, props) => {
|
|
5
6
|
const baseQuery = {
|
|
@@ -21,13 +22,16 @@ const requestSessionData = async (sessionId, querystrings, sessionsCollection, c
|
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
const sessionRecord = await sessionsCollection.findOne(findSessionRecordQuery, { _id: 1, sessionInfo: 1 });
|
|
25
|
+
let sesId;
|
|
24
26
|
let sessionInfo;
|
|
25
27
|
let isNew;
|
|
26
28
|
if (sessionRecord) {
|
|
29
|
+
sesId = sessionRecord._id;
|
|
27
30
|
sessionInfo = sessionRecord.sessionInfo;
|
|
28
31
|
isNew = false;
|
|
29
32
|
}
|
|
30
33
|
else {
|
|
34
|
+
sesId = (0, crypto_1.randomUUID)();
|
|
31
35
|
sessionInfo = {
|
|
32
36
|
client: {},
|
|
33
37
|
user: {},
|
|
@@ -36,6 +40,7 @@ const requestSessionData = async (sessionId, querystrings, sessionsCollection, c
|
|
|
36
40
|
isNew = true;
|
|
37
41
|
}
|
|
38
42
|
return {
|
|
43
|
+
sessionId: sesId,
|
|
39
44
|
sessionInfo,
|
|
40
45
|
isNew,
|
|
41
46
|
};
|
|
@@ -5,13 +5,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const globals_1 = require("@jest/globals");
|
|
7
7
|
const requestSessionData_1 = __importDefault(require("./requestSessionData"));
|
|
8
|
+
globals_1.jest.mock('crypto', () => {
|
|
9
|
+
const original = globals_1.jest.requireActual('crypto');
|
|
10
|
+
return {
|
|
11
|
+
v4: globals_1.jest.fn(() => 'uuid'),
|
|
12
|
+
...original,
|
|
13
|
+
randomUUID: globals_1.jest.fn(() => 'some-uuid'),
|
|
14
|
+
};
|
|
15
|
+
});
|
|
8
16
|
(0, globals_1.describe)('request session id', () => {
|
|
9
17
|
(0, globals_1.beforeEach)(() => {
|
|
10
18
|
globals_1.jest.clearAllMocks();
|
|
11
19
|
});
|
|
12
|
-
const props = {
|
|
13
|
-
sessionTokenSecret: 'some-secret',
|
|
14
|
-
};
|
|
15
20
|
const querystrings = {
|
|
16
21
|
accessToken: 'access-token',
|
|
17
22
|
};
|
|
@@ -21,13 +26,14 @@ const requestSessionData_1 = __importDefault(require("./requestSessionData"));
|
|
|
21
26
|
const sessionsCollection = {
|
|
22
27
|
findOne,
|
|
23
28
|
};
|
|
24
|
-
const { isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot',
|
|
29
|
+
const { sessionId, isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', {});
|
|
25
30
|
(0, globals_1.expect)(findOne).toHaveBeenCalledTimes(1);
|
|
26
31
|
(0, globals_1.expect)(findOne).toHaveBeenCalledWith({
|
|
27
32
|
_id: 'session-id',
|
|
28
33
|
'sessionInfo.client.name': 'test-bot',
|
|
29
34
|
'sessionInfo.client.type': 'webclient',
|
|
30
35
|
}, { _id: 1, sessionInfo: 1 });
|
|
36
|
+
(0, globals_1.expect)(sessionId).toBe('some-uuid');
|
|
31
37
|
(0, globals_1.expect)(isNew).toBe(true);
|
|
32
38
|
});
|
|
33
39
|
(0, globals_1.it)('when sessionId has been passed by query param and exists in db', async () => {
|
|
@@ -36,13 +42,14 @@ const requestSessionData_1 = __importDefault(require("./requestSessionData"));
|
|
|
36
42
|
const sessionsCollection = {
|
|
37
43
|
findOne,
|
|
38
44
|
};
|
|
39
|
-
const { isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot',
|
|
45
|
+
const { sessionId, isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', {});
|
|
40
46
|
(0, globals_1.expect)(findOne).toHaveBeenCalledTimes(1);
|
|
41
47
|
(0, globals_1.expect)(findOne).toHaveBeenCalledWith({
|
|
42
48
|
_id: 'session-id',
|
|
43
49
|
'sessionInfo.client.name': 'test-bot',
|
|
44
50
|
'sessionInfo.client.type': 'webclient',
|
|
45
51
|
}, { _id: 1, sessionInfo: 1 });
|
|
52
|
+
(0, globals_1.expect)(sessionId).toBe('session-id');
|
|
46
53
|
(0, globals_1.expect)(isNew).toBe(false);
|
|
47
54
|
});
|
|
48
55
|
(0, globals_1.it)('when requestSessionRecordQuery has been passed as webclient property but no such session exists in db', async () => {
|
|
@@ -54,10 +61,9 @@ const requestSessionData_1 = __importDefault(require("./requestSessionData"));
|
|
|
54
61
|
const requestSessionRecordQuery = globals_1.jest.fn();
|
|
55
62
|
const props = {
|
|
56
63
|
requestSessionRecordQuery,
|
|
57
|
-
sessionTokenSecret: 'some-secret',
|
|
58
64
|
};
|
|
59
65
|
requestSessionRecordQuery.mockReturnValueOnce(Promise.resolve({ 'sessionInfo.user.id': 'hans@apptiva.ch' }));
|
|
60
|
-
const { isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', props);
|
|
66
|
+
const { sessionId, isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', props);
|
|
61
67
|
(0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledTimes(1);
|
|
62
68
|
(0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledWith({
|
|
63
69
|
querystrings,
|
|
@@ -69,6 +75,7 @@ const requestSessionData_1 = __importDefault(require("./requestSessionData"));
|
|
|
69
75
|
'sessionInfo.client.type': 'webclient',
|
|
70
76
|
'sessionInfo.user.id': 'hans@apptiva.ch',
|
|
71
77
|
}, { _id: 1, sessionInfo: 1 });
|
|
78
|
+
(0, globals_1.expect)(sessionId).toBe('some-uuid');
|
|
72
79
|
(0, globals_1.expect)(isNew).toBe(true);
|
|
73
80
|
});
|
|
74
81
|
(0, globals_1.it)('when requestSessionRecordQuery has been passed as webclient property and session exists in db', async () => {
|
|
@@ -80,10 +87,9 @@ const requestSessionData_1 = __importDefault(require("./requestSessionData"));
|
|
|
80
87
|
const requestSessionRecordQuery = globals_1.jest.fn();
|
|
81
88
|
const props = {
|
|
82
89
|
requestSessionRecordQuery,
|
|
83
|
-
sessionTokenSecret: 'some-secret',
|
|
84
90
|
};
|
|
85
91
|
requestSessionRecordQuery.mockReturnValueOnce(Promise.resolve({ 'sessionInfo.user.id': 'hans@apptiva.ch' }));
|
|
86
|
-
const { isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', props);
|
|
92
|
+
const { sessionId, isNew } = await (0, requestSessionData_1.default)('session-id', querystrings, sessionsCollection, 'test-bot', props);
|
|
87
93
|
(0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledTimes(1);
|
|
88
94
|
(0, globals_1.expect)(requestSessionRecordQuery).toHaveBeenCalledWith({
|
|
89
95
|
querystrings,
|
|
@@ -95,6 +101,7 @@ const requestSessionData_1 = __importDefault(require("./requestSessionData"));
|
|
|
95
101
|
'sessionInfo.client.type': 'webclient',
|
|
96
102
|
'sessionInfo.user.id': 'hans@apptiva.ch',
|
|
97
103
|
}, { _id: 1, sessionInfo: 1 });
|
|
104
|
+
(0, globals_1.expect)(sessionId).toBe('session-id');
|
|
98
105
|
(0, globals_1.expect)(isNew).toBe(false);
|
|
99
106
|
});
|
|
100
107
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botfabrik/engine-webclient",
|
|
3
|
-
"version": "4.93.
|
|
3
|
+
"version": "4.93.3",
|
|
4
4
|
"description": "Webclient for Botfabriks Bot Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,13 +25,11 @@
|
|
|
25
25
|
"@botfabrik/engine-utils": "^4.90.6",
|
|
26
26
|
"@google-cloud/speech": "^7.1.0",
|
|
27
27
|
"accept-language-parser": "^1.5.0",
|
|
28
|
-
"cookie-parser": "^1.4.7",
|
|
29
28
|
"express": "^5.1.0",
|
|
30
29
|
"uuid": "^11.1.0"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
|
33
32
|
"@types/accept-language-parser": "^1.5.8",
|
|
34
|
-
"@types/cookie-parser": "^1.4.9",
|
|
35
33
|
"@types/express": "^5.0.3",
|
|
36
34
|
"@types/serve-static": "^1.15.8",
|
|
37
35
|
"@types/ua-parser-js": "^0.7.39",
|
|
@@ -41,5 +39,5 @@
|
|
|
41
39
|
"tsx": "^4.20.1",
|
|
42
40
|
"typescript": "5.8.3"
|
|
43
41
|
},
|
|
44
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0a885ea70adab1a92106546b0cbca1ec86d7c368"
|
|
45
43
|
}
|