@evelan/jexity-widget 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +162 -16
- package/dist/index.mjs +1046 -731
- package/dist/index.mjs.map +1 -1
- package/dist/react.mjs +20 -11
- package/dist/react.mjs.map +1 -1
- package/dist/types/entries/esm.d.ts +4 -0
- package/dist/types/entries/esm.d.ts.map +1 -0
- package/dist/types/{react.d.ts → entries/react.d.ts} +1 -1
- package/dist/types/entries/react.d.ts.map +1 -0
- package/dist/types/features/chat/components/BotMessage.d.ts +6 -0
- package/dist/types/features/chat/components/BotMessage.d.ts.map +1 -0
- package/dist/types/features/chat/components/ChatInput.d.ts +3 -0
- package/dist/types/features/chat/components/ChatInput.d.ts.map +1 -0
- package/dist/types/features/chat/components/ChatScreen.d.ts +8 -0
- package/dist/types/features/chat/components/ChatScreen.d.ts.map +1 -0
- package/dist/types/features/chat/components/MessageList.d.ts +3 -0
- package/dist/types/features/chat/components/MessageList.d.ts.map +1 -0
- package/dist/types/features/chat/components/TypingIndicator.d.ts +2 -0
- package/dist/types/features/chat/components/TypingIndicator.d.ts.map +1 -0
- package/dist/types/features/chat/components/UserMessage.d.ts +6 -0
- package/dist/types/features/chat/components/UserMessage.d.ts.map +1 -0
- package/dist/types/features/chat/lib/chat.d.ts +13 -0
- package/dist/types/features/chat/lib/chat.d.ts.map +1 -0
- package/dist/types/features/home/components/HomeScreen.d.ts +14 -0
- package/dist/types/features/home/components/HomeScreen.d.ts.map +1 -0
- package/dist/types/features/selection/components/SelectionScreen.d.ts +7 -0
- package/dist/types/features/selection/components/SelectionScreen.d.ts.map +1 -0
- package/dist/types/features/ticket/components/ConfirmationScreen.d.ts +7 -0
- package/dist/types/features/ticket/components/ConfirmationScreen.d.ts.map +1 -0
- package/dist/types/features/ticket/components/FormScreen.d.ts +3 -0
- package/dist/types/features/ticket/components/FormScreen.d.ts.map +1 -0
- package/dist/types/i18n/config.d.ts +10 -0
- package/dist/types/i18n/config.d.ts.map +1 -0
- package/dist/types/i18n/index.d.ts +6 -1
- package/dist/types/i18n/index.d.ts.map +1 -1
- package/dist/types/i18n/locales/de.d.ts.map +1 -1
- package/dist/types/i18n/locales/en.d.ts +19 -0
- package/dist/types/i18n/locales/en.d.ts.map +1 -1
- package/dist/types/i18n/resolve-widget-locale.d.ts +10 -7
- package/dist/types/i18n/resolve-widget-locale.d.ts.map +1 -1
- package/dist/types/module/screens/ScreenRouter.d.ts +8 -0
- package/dist/types/module/screens/ScreenRouter.d.ts.map +1 -0
- package/dist/types/module/screens/screens.state.d.ts +26 -0
- package/dist/types/module/screens/screens.state.d.ts.map +1 -0
- package/dist/types/module/shell/AppShell.d.ts +8 -0
- package/dist/types/module/shell/AppShell.d.ts.map +1 -0
- package/dist/types/module/shell/mount.d.ts +13 -0
- package/dist/types/module/shell/mount.d.ts.map +1 -0
- package/dist/types/module/shell/shell.state.d.ts +2 -0
- package/dist/types/module/shell/shell.state.d.ts.map +1 -0
- package/dist/types/module/visitor/visitor.state.d.ts +21 -0
- package/dist/types/module/visitor/visitor.state.d.ts.map +1 -0
- package/dist/types/shared/icons/BotIcon.d.ts +4 -0
- package/dist/types/shared/icons/BotIcon.d.ts.map +1 -0
- package/dist/types/shared/icons/CloseIcon.d.ts +4 -0
- package/dist/types/shared/icons/CloseIcon.d.ts.map +1 -0
- package/dist/types/shared/icons/MessageIcon.d.ts +4 -0
- package/dist/types/shared/icons/MessageIcon.d.ts.map +1 -0
- package/dist/types/shared/icons/SendIcon.d.ts +4 -0
- package/dist/types/shared/icons/SendIcon.d.ts.map +1 -0
- package/dist/types/shared/icons/SparklesIcon.d.ts +5 -0
- package/dist/types/shared/icons/SparklesIcon.d.ts.map +1 -0
- package/dist/types/shared/icons/ZapIcon.d.ts +4 -0
- package/dist/types/shared/icons/ZapIcon.d.ts.map +1 -0
- package/dist/types/shared/theme/build-theme.d.ts +5 -0
- package/dist/types/shared/theme/build-theme.d.ts.map +1 -0
- package/dist/types/shared/theme/inject-styles.d.ts +10 -0
- package/dist/types/shared/theme/inject-styles.d.ts.map +1 -0
- package/dist/types/shared/ui/ErrorScreen.d.ts +9 -0
- package/dist/types/shared/ui/ErrorScreen.d.ts.map +1 -0
- package/dist/types/shared/ui/FAB.d.ts +9 -0
- package/dist/types/shared/ui/FAB.d.ts.map +1 -0
- package/dist/types/shared/ui/Footer.d.ts +3 -0
- package/dist/types/shared/ui/Footer.d.ts.map +1 -0
- package/dist/types/shared/ui/Header.d.ts +7 -0
- package/dist/types/shared/ui/Header.d.ts.map +1 -0
- package/dist/types/shared/ui/LoadingScreen.d.ts +7 -0
- package/dist/types/shared/ui/LoadingScreen.d.ts.map +1 -0
- package/dist/types/types.d.ts +11 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/widget.js +1 -2
- package/dist/widget.js.map +1 -1
- package/package.json +6 -4
- package/dist/types/app.d.ts +0 -6
- package/dist/types/app.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/react.d.ts.map +0 -1
- package/dist/types/widget-state.d.ts +0 -7
- package/dist/types/widget-state.d.ts.map +0 -1
package/dist/types/types.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface JexityTheme {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
export interface JexityChatOptions {
|
|
41
|
-
|
|
41
|
+
orgSlug: string;
|
|
42
42
|
container?: HTMLElement | string;
|
|
43
43
|
position?: 'bottom-right' | 'bottom-left';
|
|
44
44
|
/** Force color scheme. Defaults to 'auto' (follows system preference). */
|
|
@@ -62,6 +62,16 @@ export interface JexityChatOptions {
|
|
|
62
62
|
* Set to `'https://dashboard.jexity.com'` when embedding in the dashboard iframe.
|
|
63
63
|
*/
|
|
64
64
|
parentOrigin?: string;
|
|
65
|
+
accentColor?: string;
|
|
66
|
+
fontFamily?: string;
|
|
67
|
+
fontSize?: number;
|
|
68
|
+
borderRadius?: string;
|
|
69
|
+
windowWidth?: number;
|
|
70
|
+
windowHeight?: number;
|
|
71
|
+
triggerIcon?: 'chat' | 'bot' | 'sparkles';
|
|
72
|
+
triggerRadius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
73
|
+
triggerLabel?: string;
|
|
74
|
+
hideBranding?: boolean;
|
|
65
75
|
}
|
|
66
76
|
export interface JexityChatInstance {
|
|
67
77
|
open: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE;QACH,wCAAwC;QACxC,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,iCAAiC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,qCAAqC;QACrC,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,oCAAoC;QACpC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,6BAA6B;QAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,6BAA6B;QAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,IAAI,CAAC,EAAE;QACL,iCAAiC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,8BAA8B;QAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,6BAA6B;QAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,8BAA8B;QAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,iCAAiC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,MAAM,CAAC,EAAE;QACP,+BAA+B;QAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,+BAA+B;QAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE;QACH,wCAAwC;QACxC,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,iCAAiC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,qCAAqC;QACrC,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,oCAAoC;QACpC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,6BAA6B;QAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,6BAA6B;QAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,IAAI,CAAC,EAAE;QACL,iCAAiC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,8BAA8B;QAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,6BAA6B;QAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,8BAA8B;QAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,iCAAiC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,MAAM,CAAC,EAAE;QACP,+BAA+B;QAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,+BAA+B;QAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;IAChC,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,CAAA;IACzC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IACvC;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAGrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,UAAU,CAAA;IACzC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAA;IACpD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,IAAI,CAAA;CACzD"}
|
package/dist/widget.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.jex-widget{--jex-primary: #115A62;--jex-primary-hover: #0e4e55;--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: #1693a0;--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9)}@media(prefers-color-scheme:dark){:root:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: #1693a0;--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9)}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}.jex-floating-button{width:56px;height:56px;border-radius:28px;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:380px;height:600px;max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:24px;box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message{max-width:80%;padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{align-self:flex-start;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-chat-input{padding:16px;border-top:1px solid var(--jex-border-window);display:flex;gap:8px}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s cubic-bezier(.175,.885,.32,1.275)}.jex-send-btn:hover{transform:scale(1.05);background:var(--jex-primary-hover)}.jex-send-btn:active{transform:scale(.95)}.jex-widget-footer{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005}.dark .jex-widget .jex-widget-footer,.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:root:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.dark .jex-widget .jex-locale-select:hover,.dark .jex-widget .jex-locale-select:focus-visible,.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.dark .jex-widget .jex-locale-select option,.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:root:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:root:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:root:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
(function(){"use strict";var Q,d,$e,Se,L,Ce,Ne,je,Ae,le,ue,ce,I={},Ee=[],mt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,F=Array.isArray;function N(t,e){for(var n in e)t[n]=e[n];return t}function fe(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function W(t,e,n){var i,r,o,s={};for(o in e)o=="key"?i=e[o]:o=="ref"?r=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Q.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Y(t,s,i,r,null)}function Y(t,e,n,i,r){var o={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++$e,__i:-1,__u:0};return r==null&&d.vnode!=null&&d.vnode(o),o}function B(t){return t.children}function q(t,e){this.props=t,this.context=e}function T(t,e){if(e==null)return t.__?T(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?T(t):null}function Le(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Le(t)}}function Pe(t){(!t.__d&&(t.__d=!0)&&L.push(t)&&!X.__r++||Ce!=d.debounceRendering)&&((Ce=d.debounceRendering)||Ne)(X)}function X(){for(var t,e,n,i,r,o,s,l=1;L.length;)L.length>l&&L.sort(je),t=L.shift(),l=L.length,t.__d&&(n=void 0,i=void 0,r=(i=(e=t).__v).__e,o=[],s=[],e.__P&&((n=N({},i)).__v=i.__v+1,d.vnode&&d.vnode(n),he(e.__P,n,i,e.__n,e.__P.namespaceURI,32&i.__u?[r]:null,o,r??T(i),!!(32&i.__u),s),n.__v=i.__v,n.__.__k[n.__i]=n,De(o,n,s),i.__e=i.__=null,n.__e!=r&&Le(n)));X.__r=0}function Te(t,e,n,i,r,o,s,l,u,a,h){var _,f,c,w,$,x,y,m=i&&i.__k||Ee,A=e.length;for(u=gt(n,e,m,u,A),_=0;_<A;_++)(c=n.__k[_])!=null&&(f=c.__i==-1?I:m[c.__i]||I,c.__i=_,x=he(t,c,f,r,o,s,l,u,a,h),w=c.__e,c.ref&&f.ref!=c.ref&&(f.ref&&ve(f.ref,null,c),h.push(c.ref,c.__c||w,c)),$==null&&w!=null&&($=w),(y=!!(4&c.__u))||f.__k===c.__k?u=Ue(c,u,t,y):typeof c.type=="function"&&x!==void 0?u=x:w&&(u=w.nextSibling),c.__u&=-7);return n.__e=$,u}function gt(t,e,n,i,r){var o,s,l,u,a,h=n.length,_=h,f=0;for(t.__k=new Array(r),o=0;o<r;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(u=o+f,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Y(null,s,null,null,null):F(s)?Y(B,{children:s},null,null,null):s.constructor==null&&s.__b>0?Y(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,l=null,(a=s.__i=bt(s,n,u,_))!=-1&&(_--,(l=n[a])&&(l.__u|=2)),l==null||l.__v==null?(a==-1&&(r>h?f--:r<h&&f++),typeof s.type!="function"&&(s.__u|=4)):a!=u&&(a==u-1?f--:a==u+1?f++:(a>u?f--:f++,s.__u|=4))):t.__k[o]=null;if(_)for(o=0;o<h;o++)(l=n[o])!=null&&(2&l.__u)==0&&(l.__e==i&&(i=T(l)),Fe(l,l));return i}function Ue(t,e,n,i){var r,o;if(typeof t.type=="function"){for(r=t.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=t,e=Ue(r[o],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=T(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function He(t,e){return e=e||[],t==null||typeof t=="boolean"||(F(t)?t.some(function(n){He(n,e)}):e.push(t)),e}function bt(t,e,n,i){var r,o,s,l=t.key,u=t.type,a=e[n],h=a!=null&&(2&a.__u)==0;if(a===null&&t.key==null||h&&l==a.key&&u==a.type)return n;if(i>(h?1:0)){for(r=n-1,o=n+1;r>=0||o<e.length;)if((a=e[s=r>=0?r--:o++])!=null&&(2&a.__u)==0&&l==a.key&&u==a.type)return s}return-1}function Me(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||mt.test(e)?n:n+"px"}function ee(t,e,n,i,r){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||Me(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||Me(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Ae,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?i?n.u=i.u:(n.u=le,t.addEventListener(e,o?ce:ue,o)):t.removeEventListener(e,o?ce:ue,o);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Oe(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=le++;else if(e.t<n.u)return;return n(d.event?d.event(e):e)}}}function he(t,e,n,i,r,o,s,l,u,a){var h,_,f,c,w,$,x,y,m,A,E,se,J,yt,ae,K,ke,C=e.type;if(e.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),o=[l=e.__e=n.__e]),(h=d.__b)&&h(e);e:if(typeof C=="function")try{if(y=e.props,m="prototype"in C&&C.prototype.render,A=(h=C.contextType)&&i[h.__c],E=h?A?A.props.value:h.__:i,n.__c?x=(_=e.__c=n.__c).__=_.__E:(m?e.__c=_=new C(y,E):(e.__c=_=new q(y,E),_.constructor=C,_.render=xt),A&&A.sub(_),_.props=y,_.state||(_.state={}),_.context=E,_.__n=i,f=_.__d=!0,_.__h=[],_._sb=[]),m&&_.__s==null&&(_.__s=_.state),m&&C.getDerivedStateFromProps!=null&&(_.__s==_.state&&(_.__s=N({},_.__s)),N(_.__s,C.getDerivedStateFromProps(y,_.__s))),c=_.props,w=_.state,_.__v=e,f)m&&C.getDerivedStateFromProps==null&&_.componentWillMount!=null&&_.componentWillMount(),m&&_.componentDidMount!=null&&_.__h.push(_.componentDidMount);else{if(m&&C.getDerivedStateFromProps==null&&y!==c&&_.componentWillReceiveProps!=null&&_.componentWillReceiveProps(y,E),!_.__e&&_.shouldComponentUpdate!=null&&_.shouldComponentUpdate(y,_.__s,E)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(_.props=y,_.state=_.__s,_.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(D){D&&(D.__=e)}),se=0;se<_._sb.length;se++)_.__h.push(_._sb[se]);_._sb=[],_.__h.length&&s.push(_);break e}_.componentWillUpdate!=null&&_.componentWillUpdate(y,_.__s,E),m&&_.componentDidUpdate!=null&&_.__h.push(function(){_.componentDidUpdate(c,w,$)})}if(_.context=E,_.props=y,_.__P=t,_.__e=!1,J=d.__r,yt=0,m){for(_.state=_.__s,_.__d=!1,J&&J(e),h=_.render(_.props,_.state,_.context),ae=0;ae<_._sb.length;ae++)_.__h.push(_._sb[ae]);_._sb=[]}else do _.__d=!1,J&&J(e),h=_.render(_.props,_.state,_.context),_.state=_.__s;while(_.__d&&++yt<25);_.state=_.__s,_.getChildContext!=null&&(i=N(N({},i),_.getChildContext())),m&&!f&&_.getSnapshotBeforeUpdate!=null&&($=_.getSnapshotBeforeUpdate(c,w)),K=h,h!=null&&h.type===B&&h.key==null&&(K=Ie(h.props.children)),l=Te(t,F(K)?K:[K],e,n,i,r,o,s,l,u,a),_.base=e.__e,e.__u&=-161,_.__h.length&&s.push(_),x&&(_.__E=_.__=null)}catch(D){if(e.__v=null,u||o!=null)if(D.then){for(e.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;o[o.indexOf(l)]=null,e.__e=l}else{for(ke=o.length;ke--;)fe(o[ke]);de(e)}else e.__e=n.__e,e.__k=n.__k,D.then||de(e);d.__e(D,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=wt(n.__e,e,n,i,r,o,s,u,a);return(h=d.diffed)&&h(e),128&e.__u?void 0:l}function de(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(de)}function De(t,e,n){for(var i=0;i<n.length;i++)ve(n[i],n[++i],n[++i]);d.__c&&d.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(o){o.call(r)})}catch(o){d.__e(o,r.__v)}})}function Ie(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:F(t)?t.map(Ie):N({},t)}function wt(t,e,n,i,r,o,s,l,u){var a,h,_,f,c,w,$,x=n.props,y=e.props,m=e.type;if(m=="svg"?r="http://www.w3.org/2000/svg":m=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),o!=null){for(a=0;a<o.length;a++)if((c=o[a])&&"setAttribute"in c==!!m&&(m?c.localName==m:c.nodeType==3)){t=c,o[a]=null;break}}if(t==null){if(m==null)return document.createTextNode(y);t=document.createElementNS(r,m,y.is&&y),l&&(d.__m&&d.__m(e,o),l=!1),o=null}if(m==null)x===y||l&&t.data==y||(t.data=y);else{if(o=o&&Q.call(t.childNodes),x=n.props||I,!l&&o!=null)for(x={},a=0;a<t.attributes.length;a++)x[(c=t.attributes[a]).name]=c.value;for(a in x)if(c=x[a],a!="children"){if(a=="dangerouslySetInnerHTML")_=c;else if(!(a in y)){if(a=="value"&&"defaultValue"in y||a=="checked"&&"defaultChecked"in y)continue;ee(t,a,null,c,r)}}for(a in y)c=y[a],a=="children"?f=c:a=="dangerouslySetInnerHTML"?h=c:a=="value"?w=c:a=="checked"?$=c:l&&typeof c!="function"||x[a]===c||ee(t,a,c,x[a],r);if(h)l||_&&(h.__html==_.__html||h.__html==t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(_&&(t.innerHTML=""),Te(e.type=="template"?t.content:t,F(f)?f:[f],e,n,i,m=="foreignObject"?"http://www.w3.org/1999/xhtml":r,o,s,o?o[0]:n.__k&&T(n,0),l,u),o!=null)for(a=o.length;a--;)fe(o[a]);l||(a="value",m=="progress"&&w==null?t.removeAttribute("value"):w!=null&&(w!==t[a]||m=="progress"&&!w||m=="option"&&w!=x[a])&&ee(t,a,w,x[a],r),a="checked",$!=null&&$!=t[a]&&ee(t,a,$,x[a],r))}return t}function ve(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(r){d.__e(r,n)}}function Fe(t,e,n){var i,r;if(d.unmount&&d.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||ve(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(o){d.__e(o,e)}i.base=i.__P=null}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&Fe(i[r],e,n||typeof t.type!="function");n||fe(t.__e),t.__c=t.__=t.__e=void 0}function xt(t,e,n){return this.constructor(t,n)}function We(t,e,n){var i,r,o,s;e==document&&(e=document.documentElement),d.__&&d.__(t,e),r=(i=!1)?null:e.__k,o=[],s=[],he(e,t=e.__k=W(B,null,[t]),r||I,I,e.namespaceURI,r?null:e.firstChild?Q.call(e.childNodes):null,o,r?r.__e:e.firstChild,i,s),De(o,t,s)}Q=Ee.slice,d={__e:function(t,e,n,i){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&o.getDerivedStateFromError!=null&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,i||{}),s=r.__d),s)return r.__E=r}catch(l){t=l}throw t}},$e=0,Se=function(t){return t!=null&&t.constructor==null},q.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=N({},this.state),typeof t=="function"&&(t=t(N({},n),this.props)),t&&N(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Pe(this))},q.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Pe(this))},q.prototype.render=B,L=[],Ne=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,je=function(t,e){return t.__v.__b-e.__v.__b},X.__r=0,Ae=/(PointerCapture)$|Capture$/i,le=0,ue=Oe(!1),ce=Oe(!0);var kt=0;function p(t,e,n,i,r,o){e||(e={});var s,l,u=e;if("ref"in u)for(l in u={},e)l=="ref"?s=e[l]:u[l]=e[l];var a={type:t,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--kt,__i:-1,__u:0,__source:r,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(l in s)u[l]===void 0&&(u[l]=s[l]);return d.vnode&&d.vnode(a),a}var z,g,pe,Be,ye=0,qe=[],b=d,ze=b.__b,Re=b.__r,Ge=b.diffed,Ve=b.__c,Ze=b.unmount,Je=b.__;function me(t,e){b.__h&&b.__h(g,t,ye||e),ye=0;var n=g.__H||(g.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Ke(t){return ye=1,$t(tt,t)}function $t(t,e,n){var i=me(z++,2);if(i.t=t,!i.__c&&(i.__=[tt(void 0,e),function(l){var u=i.__N?i.__N[0]:i.__[0],a=i.t(u,l);u!==a&&(i.__N=[a,i.__[1]],i.__c.setState({}))}],i.__c=g,!g.__f)){var r=function(l,u,a){if(!i.__c.__H)return!0;var h=i.__c.__H.__.filter(function(f){return!!f.__c});if(h.every(function(f){return!f.__N}))return!o||o.call(this,l,u,a);var _=i.__c.props!==l;return h.forEach(function(f){if(f.__N){var c=f.__[0];f.__=f.__N,f.__N=void 0,c!==f.__[0]&&(_=!0)}}),o&&o.call(this,l,u,a)||_};g.__f=!0;var o=g.shouldComponentUpdate,s=g.componentWillUpdate;g.componentWillUpdate=function(l,u,a){if(this.__e){var h=o;o=void 0,r(l,u,a),o=h}s&&s.call(this,l,u,a)},g.shouldComponentUpdate=r}return i.__N||i.__}function Qe(t,e){var n=me(z++,3);!b.__s&&et(n.__H,e)&&(n.__=t,n.u=e,g.__H.__h.push(n))}function Ye(t,e){var n=me(z++,7);return et(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function St(){for(var t;t=qe.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(te),t.__H.__h.forEach(ge),t.__H.__h=[]}catch(e){t.__H.__h=[],b.__e(e,t.__v)}}b.__b=function(t){g=null,ze&&ze(t)},b.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Je&&Je(t,e)},b.__r=function(t){Re&&Re(t),z=0;var e=(g=t.__c).__H;e&&(pe===g?(e.__h=[],g.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(te),e.__h.forEach(ge),e.__h=[],z=0)),pe=g},b.diffed=function(t){Ge&&Ge(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(qe.push(e)!==1&&Be===b.requestAnimationFrame||((Be=b.requestAnimationFrame)||Ct)(St)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),pe=g=null},b.__c=function(t,e){e.some(function(n){try{n.__h.forEach(te),n.__h=n.__h.filter(function(i){return!i.__||ge(i)})}catch(i){e.some(function(r){r.__h&&(r.__h=[])}),e=[],b.__e(i,n.__v)}}),Ve&&Ve(t,e)},b.unmount=function(t){Ze&&Ze(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(i){try{te(i)}catch(r){e=r}}),n.__H=void 0,e&&b.__e(e,n.__v))};var Xe=typeof requestAnimationFrame=="function";function Ct(t){var e,n=function(){clearTimeout(i),Xe&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);Xe&&(e=requestAnimationFrame(n))}function te(t){var e=g,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),g=e}function ge(t){var e=g;t.__c=t.__(),g=e}function et(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function tt(t,e){return typeof e=="function"?e(t):e}const Nt=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();const nt=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const jt=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase());const it=t=>{const e=jt(t);return e.charAt(0).toUpperCase()+e.slice(1)};var At={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};const Et=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const Lt=({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:i,children:r,iconNode:o,class:s="",...l})=>W("svg",{...At,width:String(e),height:e,stroke:t,"stroke-width":i?Number(n)*24/Number(e):n,class:["lucide",s].join(" "),...!r&&!Et(l)&&{"aria-hidden":"true"},...l},[...o.map(([u,a])=>W(u,a)),...He(r)]);const U=(t,e)=>{const n=({class:i="",className:r="",children:o,...s})=>W(Lt,{...s,iconNode:e,class:Nt(`lucide-${nt(it(t))}`,`lucide-${nt(t)}`,i,r)},o);return n.displayName=it(t),n};const Pt=U("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);const Tt=U("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Ut=U("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);const Ht=U("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const Mt=U("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const Ot=U("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var Dt=Symbol.for("preact-signals");function ne(){if(j>1)j--;else{for(var t,e=!1;R!==void 0;){var n=R;for(R=void 0,be++;n!==void 0;){var i=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&_t(n))try{n.c()}catch(r){e||(t=r,e=!0)}n=i}}if(be=0,j--,e)throw t}}function It(t){if(j>0)return t();j++;try{return t()}finally{ne()}}var v=void 0;function rt(t){var e=v;v=void 0;try{return t()}finally{v=e}}var R=void 0,j=0,be=0,ie=0;function ot(t){if(v!==void 0){var e=t.n;if(e===void 0||e.t!==v)return e={i:0,S:t,p:v.s,n:void 0,t:v,e:void 0,x:void 0,r:e},v.s!==void 0&&(v.s.n=e),v.s=e,t.n=e,32&v.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=v.s,e.n=void 0,v.s.n=e,v.s=e),e}}function k(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}k.prototype.brand=Dt,k.prototype.h=function(){return!0},k.prototype.S=function(t){var e=this,n=this.t;n!==t&&t.e===void 0&&(t.x=n,this.t=t,n!==void 0?n.e=t:rt(function(){var i;(i=e.W)==null||i.call(e)}))},k.prototype.U=function(t){var e=this;if(this.t!==void 0){var n=t.e,i=t.x;n!==void 0&&(n.x=i,t.e=void 0),i!==void 0&&(i.e=n,t.x=void 0),t===this.t&&(this.t=i,i===void 0&&rt(function(){var r;(r=e.Z)==null||r.call(e)}))}},k.prototype.subscribe=function(t){var e=this;return G(function(){var n=e.value,i=v;v=void 0;try{t(n)}finally{v=i}},{name:"sub"})},k.prototype.valueOf=function(){return this.value},k.prototype.toString=function(){return this.value+""},k.prototype.toJSON=function(){return this.value},k.prototype.peek=function(){var t=v;v=void 0;try{return this.value}finally{v=t}},Object.defineProperty(k.prototype,"value",{get:function(){var t=ot(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(be>100)throw new Error("Cycle detected");this.v=t,this.i++,ie++,j++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{ne()}}}});function re(t,e){return new k(t,e)}function _t(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function st(t){for(var e=t.s;e!==void 0;e=e.n){var n=e.S.n;if(n!==void 0&&(e.r=n),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function at(t){for(var e=t.s,n=void 0;e!==void 0;){var i=e.p;e.i===-1?(e.S.U(e),i!==void 0&&(i.n=e.n),e.n!==void 0&&(e.n.p=i)):n=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=i}t.s=n}function P(t,e){k.call(this,void 0),this.x=t,this.s=void 0,this.g=ie-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}P.prototype=new k,P.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===ie))return!0;if(this.g=ie,this.f|=1,this.i>0&&!_t(this))return this.f&=-2,!0;var t=v;try{st(this),v=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return v=t,at(this),this.f&=-2,!0},P.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}k.prototype.S.call(this,t)},P.prototype.U=function(t){if(this.t!==void 0&&(k.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},P.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(P.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=ot(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function lt(t,e){return new P(t,e)}function ut(t){var e=t.u;if(t.u=void 0,typeof e=="function"){j++;var n=v;v=void 0;try{e()}catch(i){throw t.f&=-2,t.f|=8,we(t),i}finally{v=n,ne()}}}function we(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ut(t)}function Ft(t){if(v!==this)throw new Error("Out-of-order effect");at(this),v=t,this.f&=-2,8&this.f&&we(this),ne()}function H(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}H.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},H.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ut(this),st(this),j++;var t=v;return v=this,Ft.bind(this,t)},H.prototype.N=function(){2&this.f||(this.f|=2,this.o=R,R=this)},H.prototype.d=function(){this.f|=8,1&this.f||we(this)},H.prototype.dispose=function(){this.d()};function G(t,e){var n=new H(t,e);try{n.c()}catch(r){throw n.d(),r}var i=n.d.bind(n);return i[Symbol.dispose]=i,i}var ct,oe,Wt=typeof window<"u"&&!!window.__PREACT_SIGNALS_DEVTOOLS__,ft=[];G(function(){ct=this.N})();function M(t,e){d[t]=e.bind(null,d[t]||function(){})}function _e(t){if(oe){var e=oe;oe=void 0,e()}oe=t&&t.S()}function ht(t){var e=this,n=t.data,i=qt(n);i.value=n;var r=Ye(function(){for(var l=e,u=e.__v;u=u.__;)if(u.__c){u.__c.__$f|=4;break}var a=lt(function(){var c=i.value.value;return c===0?0:c===!0?"":c||""}),h=lt(function(){return!Array.isArray(a.value)&&!Se(a.value)}),_=G(function(){if(this.N=dt,h.value){var c=a.value;l.__v&&l.__v.__e&&l.__v.__e.nodeType===3&&(l.__v.__e.data=c)}}),f=e.__$u.d;return e.__$u.d=function(){_(),f.call(this)},[h,a]},[]),o=r[0],s=r[1];return o.value?s.peek():s.value}ht.displayName="ReactiveTextNode",Object.defineProperties(k.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ht},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),M("__b",function(t,e){if(typeof e.type=="string"){var n,i=e.props;for(var r in i)if(r!=="children"){var o=i[r];o instanceof k&&(n||(e.__np=n={}),n[r]=o,i[r]=o.peek())}}t(e)}),M("__r",function(t,e){if(t(e),e.type!==B){_e();var n,i=e.__c;i&&(i.__$f&=-2,(n=i.__$u)===void 0&&(i.__$u=n=(function(r,o){var s;return G(function(){s=this},{name:o}),s.c=r,s})(function(){var r;Wt&&((r=n.y)==null||r.call(n)),i.__$f|=1,i.setState({})},typeof e.type=="function"?e.type.displayName||e.type.name:""))),_e(n)}}),M("__e",function(t,e,n,i){_e(),t(e,n,i)}),M("diffed",function(t,e){_e();var n;if(typeof e.type=="string"&&(n=e.__e)){var i=e.__np,r=e.props;if(i){var o=n.U;if(o)for(var s in o){var l=o[s];l!==void 0&&!(s in i)&&(l.d(),o[s]=void 0)}else o={},n.U=o;for(var u in i){var a=o[u],h=i[u];a===void 0?(a=Bt(n,u,h,r),o[u]=a):a.o(h,r)}}}t(e)});function Bt(t,e,n,i){var r=e in t&&t.ownerSVGElement===void 0,o=re(n);return{o:function(s,l){o.value=s,i=l},d:G(function(){this.N=dt;var s=o.value.value;i[e]!==s&&(i[e]=s,r?t[e]=s:s!=null&&(s!==!1||e[4]==="-")?t.setAttribute(e,s):t.removeAttribute(e))})}}M("unmount",function(t,e){if(typeof e.type=="string"){var n=e.__e;if(n){var i=n.U;if(i){n.U=void 0;for(var r in i){var o=i[r];o&&o.d()}}}}else{var s=e.__c;if(s){var l=s.__$u;l&&(s.__$u=void 0,l.d())}}t(e)}),M("__h",function(t,e,n,i){(i<3||i===9)&&(e.__$f|=2),t(e,n,i)}),q.prototype.shouldComponentUpdate=function(t,e){if(this.__R)return!0;var n=this.__$u,i=n&&n.s!==void 0;for(var r in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var o=2&this.__$f;if(!(i||o||4&this.__$f)||1&this.__$f)return!0}else if(!(i||4&this.__$f)||3&this.__$f)return!0;for(var s in t)if(s!=="__source"&&t[s]!==this.props[s])return!0;for(var l in this.props)if(!(l in t))return!0;return!1};function qt(t,e){return Ye(function(){return re(t,e)},[])}var zt=function(t){queueMicrotask(function(){queueMicrotask(t)})};function Rt(){It(function(){for(var t;t=ft.shift();)ct.call(t)})}function dt(){ft.push(this)===1&&(d.requestAnimationFrame||zt)(Rt)}const S=re(!1),V=re("de"),Gt=["en","de"],Vt="de",Zt="jex-locale";function xe(t){if(!t)return null;const e=(t.split("-")[0]??"").toLowerCase();return Gt.includes(e)?e:null}function Jt(t){try{const n=xe(localStorage.getItem(Zt));if(n)return n}catch{}if(typeof navigator<"u"){const n=xe(navigator.language);if(n)return n}const e=xe(t);return e||Vt}const vt={title:"Assistant",statusOnline:"Online · Responds in seconds",inputPlaceholder:"Type a message…",sendAriaLabel:"Send message",openChatAriaLabel:"Open chat",closeChatAriaLabel:"Close chat",errorNetwork:"Network error. Please try again.",errorQuota:"Message limit reached. Please try again later.",localeLabelDe:"DE",localeLabelEn:"EN"},Kt={en:vt,de:{title:"Assistent",statusOnline:"Online · Antwortet in Sekunden",inputPlaceholder:"Nachricht eingeben…",sendAriaLabel:"Nachricht senden",openChatAriaLabel:"Chat öffnen",closeChatAriaLabel:"Chat schließen",errorNetwork:"Netzwerkfehler. Bitte versuche es erneut.",errorQuota:"Nachrichtenlimit erreicht. Bitte versuche es später erneut.",localeLabelDe:"DE",localeLabelEn:"EN"}};function Qt(){return Kt[V.value]??vt}function Yt(t){V.value=t;try{localStorage.setItem("jex-locale",t)}catch{}}function Xt(t){const e={},{primaryColor:n,theme:i}=t;if(n&&(e["--jex-primary"]=n,e["--jex-bg-trigger"]=n,e["--jex-bg-header"]=n,e["--jex-bg-msg-user"]=n,e["--jex-bg-send-btn"]=n),i?.bg){const r=i.bg;r.trigger&&(e["--jex-bg-trigger"]=r.trigger),r.header&&(e["--jex-bg-header"]=r.header),r.msgUser&&(e["--jex-bg-msg-user"]=r.msgUser),r.msgBot&&(e["--jex-bg-msg-bot"]=r.msgBot),r.window&&(e["--jex-bg-window"]=r.window),r.sendBtn&&(e["--jex-bg-send-btn"]=r.sendBtn)}if(i?.text){const r=i.text;r.header&&(e["--jex-text-header"]=r.header),r.msgUser&&(e["--jex-text-msg-user"]=r.msgUser),r.msgBot&&(e["--jex-text-msg-bot"]=r.msgBot),r.main&&(e["--jex-text-main"]=r.main),r.muted&&(e["--jex-text-muted"]=r.muted)}if(i?.border){const r=i.border;r.window&&(e["--jex-border-window"]=r.window),r.input&&(e["--jex-border-input"]=r.input)}return Object.keys(e).length>0?e:void 0}function en(){return p("div",{className:"jex-widget-footer",children:[p("a",{href:"https://jexity.com",target:"_blank",rel:"noopener noreferrer",className:"jex-branding",children:[p(Ot,{size:14,className:"jex-branding-icon"}),p("span",{children:["Powered by ",p("strong",{children:"Jexity"})]})]}),p("div",{className:"jex-locale-select-wrapper",children:[p("select",{className:"jex-locale-select",value:V.value,onChange:t=>Yt(t.currentTarget.value),"aria-label":"Select language",children:[p("option",{value:"de",children:"🇩🇪 Deutsch"}),p("option",{value:"en",children:"🇬🇧 English"})]}),p(Tt,{size:14,className:"jex-locale-chevron"})]})]})}function tn({options:t}){const e=Qt(),[n,i]=Ke(""),[r,o]=Ke([{id:1,text:t.greeting??`Hi there! This is ${t.orgId} assistant. How can I help you today?`,sender:"bot"}]),s=t.position==="bottom-left",l=t.locale;Qe(()=>{V.value=Jt(l)},[l]),Qe(()=>{function f(c){const w=t.parentOrigin??window.location.origin;if(c.origin!==w||c.data?.type!=="jexity:config")return;const{locale:$}=c.data.payload;($==="en"||$==="de")&&(V.value=$)}return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[t.parentOrigin]);const u=()=>{if(!n.trim())return;const f={id:Date.now(),text:n,sender:"user"};o([...r,f]),i(""),setTimeout(()=>{o(c=>[...c,{id:Date.now()+1,text:`You said: "${n}". This is a demo of the Jexity Chat Widget!`,sender:"bot"}])},1e3)},a=Xt(t),h=t.colorScheme;return p("div",{className:`jex-widget ${h==="dark"||h==="light"?h:""}`.trim(),style:a,children:p("div",{className:`jex-container${s?" jex-pos-left":""}`,children:[S.value&&p("div",{className:"jex-chat-window",children:[p("header",{className:"jex-chat-header",children:[p(Pt,{size:24}),p("div",{className:"jex-header-info",children:[p("h3",{children:t.title??e.title}),p("p",{children:e.statusOnline})]})]}),p("div",{className:"jex-chat-messages",children:r.map(f=>p("div",{className:`jex-message ${f.sender}`,children:f.text},f.id))}),p("div",{className:"jex-chat-input",children:[p("input",{type:"text",placeholder:e.inputPlaceholder,value:n,onInput:f=>i(f.currentTarget.value),onKeyDown:f=>f.key==="Enter"&&u()}),p("button",{className:"jex-send-btn",onClick:u,"aria-label":e.sendAriaLabel,children:p(Ht,{size:18})})]}),p(en,{})]}),p("button",{className:"jex-floating-button",onClick:()=>S.value=!S.value,"aria-label":S.value?e.closeChatAriaLabel:e.openChatAriaLabel,children:S.value?p(Mt,{size:28}):p(Ut,{size:28})})]})})}let Z=null;function nn(t){Z&&Z.shutdown();let e;t.container?e=typeof t.container=="string"?document.querySelector(t.container):t.container:(e=document.createElement("div"),e.id="jexity-chat-widget",document.body.appendChild(e)),We(W(tn,{options:t}),e);const n=new Set,i=S.subscribe(o=>{for(const s of n)s(o)}),r={shutdown(){i(),n.clear(),We(null,e),t.container||e.remove(),Z===r&&(Z=null)},open(){S.value=!0},close(){S.value=!1},toggle(){S.value=!S.value},get isOpen(){return S.value},subscribe(o){return n.add(o),()=>n.delete(o)}};return Z=r,r}function O(t,e){return t.getAttribute(e)??void 0}function pt(){const t=document.currentScript??document.querySelector("script[data-org-id]")??document.querySelector("script[org_id]");if(!t)return;const n={orgId:t.getAttribute("data-org-id")??t.getAttribute("org_id")??"default-org",position:O(t,"data-position")??void 0,theme:O(t,"data-theme")??void 0,greeting:O(t,"data-greeting"),title:O(t,"data-title"),primaryColor:O(t,"data-primary-color"),locale:O(t,"data-locale")};window.JexityChat=nn(n)}document.readyState==="complete"?pt():window.addEventListener("load",pt)})();
|
|
1
|
+
(function(){"use strict";var re,_,He,Ie,H,Re,Pe,Me,Ue,xe,ve,ge,q={},De=[],$t=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ne=Array.isArray;function E(t,e){for(var r in e)t[r]=e[r];return t}function me(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function At(t,e,r){var n,i,o,s={};for(o in e)o=="key"?n=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?re.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return ie(t,s,n,i,null)}function ie(t,e,r,n,i){var o={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++He,__i:-1,__u:0};return i==null&&_.vnode!=null&&_.vnode(o),o}function P(t){return t.children}function G(t,e){this.props=t,this.context=e}function M(t,e){if(e==null)return t.__?M(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?M(t):null}function We(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return We(t)}}function Be(t){(!t.__d&&(t.__d=!0)&&H.push(t)&&!oe.__r++||Re!=_.debounceRendering)&&((Re=_.debounceRendering)||Pe)(oe)}function oe(){for(var t,e,r,n,i,o,s,c=1;H.length;)H.length>c&&H.sort(Me),t=H.shift(),c=H.length,t.__d&&(r=void 0,n=void 0,i=(n=(e=t).__v).__e,o=[],s=[],e.__P&&((r=E({},n)).__v=n.__v+1,_.vnode&&_.vnode(r),be(e.__P,r,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,o,i??M(n),!!(32&n.__u),s),r.__v=n.__v,r.__.__k[r.__i]=r,Ve(o,r,s),n.__e=n.__=null,r.__e!=i&&We(r)));oe.__r=0}function Oe(t,e,r,n,i,o,s,c,d,u,p){var l,h,f,y,S,m,g,v=n&&n.__k||De,$=e.length;for(d=Et(r,e,v,d,$),l=0;l<$;l++)(f=r.__k[l])!=null&&(h=f.__i==-1?q:v[f.__i]||q,f.__i=l,m=be(t,f,h,i,o,s,c,d,u,p),y=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&ye(h.ref,null,f),p.push(f.ref,f.__c||y,f)),S==null&&y!=null&&(S=y),(g=!!(4&f.__u))||h.__k===f.__k?d=Fe(f,d,t,g):typeof f.type=="function"&&m!==void 0?d=m:y&&(d=y.nextSibling),f.__u&=-7);return r.__e=S,d}function Et(t,e,r,n,i){var o,s,c,d,u,p=r.length,l=p,h=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(d=o+h,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?ie(null,s,null,null,null):ne(s)?ie(P,{children:s},null,null,null):s.constructor==null&&s.__b>0?ie(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,c=null,(u=s.__i=Nt(s,r,d,l))!=-1&&(l--,(c=r[u])&&(c.__u|=2)),c==null||c.__v==null?(u==-1&&(i>p?h--:i<p&&h++),typeof s.type!="function"&&(s.__u|=4)):u!=d&&(u==d-1?h--:u==d+1?h++:(u>d?h--:h++,s.__u|=4))):t.__k[o]=null;if(l)for(o=0;o<p;o++)(c=r[o])!=null&&(2&c.__u)==0&&(c.__e==n&&(n=M(c)),Je(c,c));return n}function Fe(t,e,r,n){var i,o;if(typeof t.type=="function"){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=Fe(i[o],e,r,n));return e}t.__e!=e&&(n&&(e&&t.type&&!e.parentNode&&(e=M(t)),r.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Nt(t,e,r,n){var i,o,s,c=t.key,d=t.type,u=e[r],p=u!=null&&(2&u.__u)==0;if(u===null&&t.key==null||p&&c==u.key&&d==u.type)return r;if(n>(p?1:0)){for(i=r-1,o=r+1;i>=0||o<e.length;)if((u=e[s=i>=0?i--:o++])!=null&&(2&u.__u)==0&&c==u.key&&d==u.type)return s}return-1}function qe(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||$t.test(e)?r:r+"px"}function ae(t,e,r,n,i){var o,s;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||qe(t.style,e,"");if(r)for(e in r)n&&r[e]==n[e]||qe(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Ue,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=r,r?n?r.u=n.u:(r.u=xe,t.addEventListener(e,o?ge:ve,o)):t.removeEventListener(e,o?ge:ve,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Ge(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=xe++;else if(e.t<r.u)return;return r(_.event?_.event(e):e)}}}function be(t,e,r,n,i,o,s,c,d,u){var p,l,h,f,y,S,m,g,v,$,L,he,ee,Ct,_e,te,Le,A=e.type;if(e.constructor!=null)return null;128&r.__u&&(d=!!(32&r.__u),o=[c=e.__e=r.__e]),(p=_.__b)&&p(e);e:if(typeof A=="function")try{if(g=e.props,v="prototype"in A&&A.prototype.render,$=(p=A.contextType)&&n[p.__c],L=p?$?$.props.value:p.__:n,r.__c?m=(l=e.__c=r.__c).__=l.__E:(v?e.__c=l=new A(g,L):(e.__c=l=new G(g,L),l.constructor=A,l.render=zt),$&&$.sub(l),l.props=g,l.state||(l.state={}),l.context=L,l.__n=n,h=l.__d=!0,l.__h=[],l._sb=[]),v&&l.__s==null&&(l.__s=l.state),v&&A.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=E({},l.__s)),E(l.__s,A.getDerivedStateFromProps(g,l.__s))),f=l.props,y=l.state,l.__v=e,h)v&&A.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),v&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(v&&A.getDerivedStateFromProps==null&&g!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(g,L),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(g,l.__s,L)===!1||e.__v==r.__v){for(e.__v!=r.__v&&(l.props=g,l.state=l.__s,l.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(F){F&&(F.__=e)}),he=0;he<l._sb.length;he++)l.__h.push(l._sb[he]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(g,l.__s,L),v&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,y,S)})}if(l.context=L,l.props=g,l.__P=t,l.__e=!1,ee=_.__r,Ct=0,v){for(l.state=l.__s,l.__d=!1,ee&&ee(e),p=l.render(l.props,l.state,l.context),_e=0;_e<l._sb.length;_e++)l.__h.push(l._sb[_e]);l._sb=[]}else do l.__d=!1,ee&&ee(e),p=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++Ct<25);l.state=l.__s,l.getChildContext!=null&&(n=E(E({},n),l.getChildContext())),v&&!h&&l.getSnapshotBeforeUpdate!=null&&(S=l.getSnapshotBeforeUpdate(f,y)),te=p,p!=null&&p.type===P&&p.key==null&&(te=Ye(p.props.children)),c=Oe(t,ne(te)?te:[te],e,r,n,i,o,s,c,d,u),l.base=e.__e,e.__u&=-161,l.__h.length&&s.push(l),m&&(l.__E=l.__=null)}catch(F){if(e.__v=null,d||o!=null)if(F.then){for(e.__u|=d?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,e.__e=c}else{for(Le=o.length;Le--;)me(o[Le]);je(e)}else e.__e=r.__e,e.__k=r.__k,F.then||je(e);_.__e(F,e,r)}else o==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):c=e.__e=Tt(r.__e,e,r,n,i,o,s,d,u);return(p=_.diffed)&&p(e),128&e.__u?void 0:c}function je(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(je)}function Ve(t,e,r){for(var n=0;n<r.length;n++)ye(r[n],r[++n],r[++n]);_.__c&&_.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){_.__e(o,i.__v)}})}function Ye(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:ne(t)?t.map(Ye):E({},t)}function Tt(t,e,r,n,i,o,s,c,d){var u,p,l,h,f,y,S,m=r.props,g=e.props,v=e.type;if(v=="svg"?i="http://www.w3.org/2000/svg":v=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((f=o[u])&&"setAttribute"in f==!!v&&(v?f.localName==v:f.nodeType==3)){t=f,o[u]=null;break}}if(t==null){if(v==null)return document.createTextNode(g);t=document.createElementNS(i,v,g.is&&g),c&&(_.__m&&_.__m(e,o),c=!1),o=null}if(v==null)m===g||c&&t.data==g||(t.data=g);else{if(o=o&&re.call(t.childNodes),m=r.props||q,!c&&o!=null)for(m={},u=0;u<t.attributes.length;u++)m[(f=t.attributes[u]).name]=f.value;for(u in m)if(f=m[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=f;else if(!(u in g)){if(u=="value"&&"defaultValue"in g||u=="checked"&&"defaultChecked"in g)continue;ae(t,u,null,f,i)}}for(u in g)f=g[u],u=="children"?h=f:u=="dangerouslySetInnerHTML"?p=f:u=="value"?y=f:u=="checked"?S=f:c&&typeof f!="function"||m[u]===f||ae(t,u,f,m[u],i);if(p)c||l&&(p.__html==l.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(l&&(t.innerHTML=""),Oe(e.type=="template"?t.content:t,ne(h)?h:[h],e,r,n,v=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:r.__k&&M(r,0),c,d),o!=null)for(u=o.length;u--;)me(o[u]);c||(u="value",v=="progress"&&y==null?t.removeAttribute("value"):y!=null&&(y!==t[u]||v=="progress"&&!y||v=="option"&&y!=m[u])&&ae(t,u,y,m[u],i),u="checked",S!=null&&S!=t[u]&&ae(t,u,S,m[u],i))}return t}function ye(t,e,r){try{if(typeof t=="function"){var n=typeof t.__u=="function";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(i){_.__e(i,r)}}function Je(t,e,r){var n,i;if(_.unmount&&_.unmount(t),(n=t.ref)&&(n.current&&n.current!=t.__e||ye(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){_.__e(o,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&Je(n[i],e,r||typeof t.type!="function");r||me(t.__e),t.__c=t.__=t.__e=void 0}function zt(t,e,r){return this.constructor(t,r)}function Ze(t,e,r){var n,i,o,s;e==document&&(e=document.documentElement),_.__&&_.__(t,e),i=(n=!1)?null:e.__k,o=[],s=[],be(e,t=e.__k=At(P,null,[t]),i||q,q,e.namespaceURI,i?null:e.firstChild?re.call(e.childNodes):null,o,i?i.__e:e.firstChild,n,s),Ve(o,t,s)}re=De.slice,_={__e:function(t,e,r,n){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,n||{}),s=i.__d),s)return i.__E=i}catch(c){t=c}throw t}},He=0,Ie=function(t){return t!=null&&t.constructor==null},G.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=E({},this.state),typeof t=="function"&&(t=t(E({},r),this.props)),t&&E(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Be(this))},G.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Be(this))},G.prototype.render=P,H=[],Pe=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Me=function(t,e){return t.__v.__b-e.__v.__b},oe.__r=0,Ue=/(PointerCapture)$|Capture$/i,xe=0,ve=Ge(!1),ge=Ge(!0);var Lt=0;function a(t,e,r,n,i,o){e||(e={});var s,c,d=e;if("ref"in d)for(c in d={},e)c=="ref"?s=e[c]:d[c]=e[c];var u={type:t,props:d,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Lt,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(c in s)d[c]===void 0&&(d[c]=s[c]);return _.vnode&&_.vnode(u),u}var V,b,we,Ke,le=0,Xe=[],j=_,Qe=j.__b,et=j.__r,tt=j.diffed,rt=j.__c,nt=j.unmount,it=j.__;function ke(t,e){j.__h&&j.__h(b,t,le||e),le=0;var r=b.__H||(b.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function U(t){return le=1,Ht(lt,t)}function Ht(t,e,r){var n=ke(V++,2);if(n.t=t,!n.__c&&(n.__=[lt(void 0,e),function(c){var d=n.__N?n.__N[0]:n.__[0],u=n.t(d,c);d!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=b,!b.__f)){var i=function(c,d,u){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(h){return!!h.__c});if(p.every(function(h){return!h.__N}))return!o||o.call(this,c,d,u);var l=n.__c.props!==c;return p.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(l=!0)}}),o&&o.call(this,c,d,u)||l};b.__f=!0;var o=b.shouldComponentUpdate,s=b.componentWillUpdate;b.componentWillUpdate=function(c,d,u){if(this.__e){var p=o;o=void 0,i(c,d,u),o=p}s&&s.call(this,c,d,u)},b.shouldComponentUpdate=i}return n.__N||n.__}function D(t,e){var r=ke(V++,3);!j.__s&&at(r.__H,e)&&(r.__=t,r.u=e,b.__H.__h.push(r))}function It(t){return le=5,Se(function(){return{current:t}},[])}function Se(t,e){var r=ke(V++,7);return at(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function Rt(){for(var t;t=Xe.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(se),t.__H.__h.forEach(Ce),t.__H.__h=[]}catch(e){t.__H.__h=[],j.__e(e,t.__v)}}j.__b=function(t){b=null,Qe&&Qe(t)},j.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),it&&it(t,e)},j.__r=function(t){et&&et(t),V=0;var e=(b=t.__c).__H;e&&(we===b?(e.__h=[],b.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.forEach(se),e.__h.forEach(Ce),e.__h=[],V=0)),we=b},j.diffed=function(t){tt&&tt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Xe.push(e)!==1&&Ke===j.requestAnimationFrame||((Ke=j.requestAnimationFrame)||Pt)(Rt)),e.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),we=b=null},j.__c=function(t,e){e.some(function(r){try{r.__h.forEach(se),r.__h=r.__h.filter(function(n){return!n.__||Ce(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],j.__e(n,r.__v)}}),rt&&rt(t,e)},j.unmount=function(t){nt&&nt(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{se(n)}catch(i){e=i}}),r.__H=void 0,e&&j.__e(e,r.__v))};var ot=typeof requestAnimationFrame=="function";function Pt(t){var e,r=function(){clearTimeout(n),ot&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,35);ot&&(e=requestAnimationFrame(r))}function se(t){var e=b,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),b=e}function Ce(t){var e=b;t.__c=t.__(),b=e}function at(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function lt(t,e){return typeof e=="function"?e(t):e}var Mt=Symbol.for("preact-signals");function ce(){if(z>1)z--;else{for(var t,e=!1;Y!==void 0;){var r=Y;for(Y=void 0,$e++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ut(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=n}}if($e=0,z--,e)throw t}}function Ut(t){if(z>0)return t();z++;try{return t()}finally{ce()}}var x=void 0;function st(t){var e=x;x=void 0;try{return t()}finally{x=e}}var Y=void 0,z=0,$e=0,ue=0;function ct(t){if(x!==void 0){var e=t.n;if(e===void 0||e.t!==x)return e={i:0,S:t,p:x.s,n:void 0,t:x,e:void 0,x:void 0,r:e},x.s!==void 0&&(x.s.n=e),x.s=e,t.n=e,32&x.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=x.s,e.n=void 0,x.s.n=e,x.s=e),e}}function w(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}w.prototype.brand=Mt,w.prototype.h=function(){return!0},w.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:st(function(){var n;(n=e.W)==null||n.call(e)}))},w.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,n=t.x;r!==void 0&&(r.x=n,t.e=void 0),n!==void 0&&(n.e=r,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&st(function(){var i;(i=e.Z)==null||i.call(e)}))}},w.prototype.subscribe=function(t){var e=this;return J(function(){var r=e.value,n=x;x=void 0;try{t(r)}finally{x=n}},{name:"sub"})},w.prototype.valueOf=function(){return this.value},w.prototype.toString=function(){return this.value+""},w.prototype.toJSON=function(){return this.value},w.prototype.peek=function(){var t=x;x=void 0;try{return this.value}finally{x=t}},Object.defineProperty(w.prototype,"value",{get:function(){var t=ct(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if($e>100)throw new Error("Cycle detected");this.v=t,this.i++,ue++,z++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{ce()}}}});function C(t,e){return new w(t,e)}function ut(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function dt(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function ft(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function I(t,e){w.call(this,void 0),this.x=t,this.s=void 0,this.g=ue-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}I.prototype=new w,I.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===ue))return!0;if(this.g=ue,this.f|=1,this.i>0&&!ut(this))return this.f&=-2,!0;var t=x;try{dt(this),x=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return x=t,ft(this),this.f&=-2,!0},I.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}w.prototype.S.call(this,t)},I.prototype.U=function(t){if(this.t!==void 0&&(w.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},I.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(I.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=ct(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function pt(t,e){return new I(t,e)}function ht(t){var e=t.u;if(t.u=void 0,typeof e=="function"){z++;var r=x;x=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,Ae(t),n}finally{x=r,ce()}}}function Ae(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ht(t)}function Dt(t){if(x!==this)throw new Error("Out-of-order effect");ft(this),x=t,this.f&=-2,8&this.f&&Ae(this),ce()}function W(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}W.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},W.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ht(this),dt(this),z++;var t=x;return x=this,Dt.bind(this,t)},W.prototype.N=function(){2&this.f||(this.f|=2,this.o=Y,Y=this)},W.prototype.d=function(){this.f|=8,1&this.f||Ae(this)},W.prototype.dispose=function(){this.d()};function J(t,e){var r=new W(t,e);try{r.c()}catch(i){throw r.d(),i}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}var _t,de,Wt=typeof window<"u"&&!!window.__PREACT_SIGNALS_DEVTOOLS__,xt=[];J(function(){_t=this.N})();function B(t,e){_[t]=e.bind(null,_[t]||function(){})}function fe(t){if(de){var e=de;de=void 0,e()}de=t&&t.S()}function vt(t){var e=this,r=t.data,n=gt(r);n.value=r;var i=Se(function(){for(var c=e,d=e.__v;d=d.__;)if(d.__c){d.__c.__$f|=4;break}var u=pt(function(){var f=n.value.value;return f===0?0:f===!0?"":f||""}),p=pt(function(){return!Array.isArray(u.value)&&!Ie(u.value)}),l=J(function(){if(this.N=mt,p.value){var f=u.value;c.__v&&c.__v.__e&&c.__v.__e.nodeType===3&&(c.__v.__e.data=f)}}),h=e.__$u.d;return e.__$u.d=function(){l(),h.call(this)},[p,u]},[]),o=i[0],s=i[1];return o.value?s.peek():s.value}vt.displayName="ReactiveTextNode",Object.defineProperties(w.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:vt},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),B("__b",function(t,e){if(typeof e.type=="string"){var r,n=e.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof w&&(r||(e.__np=r={}),r[i]=o,n[i]=o.peek())}}t(e)}),B("__r",function(t,e){if(t(e),e.type!==P){fe();var r,n=e.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(i,o){var s;return J(function(){s=this},{name:o}),s.c=i,s})(function(){var i;Wt&&((i=r.y)==null||i.call(r)),n.__$f|=1,n.setState({})},typeof e.type=="function"?e.type.displayName||e.type.name:""))),fe(r)}}),B("__e",function(t,e,r,n){fe(),t(e,r,n)}),B("diffed",function(t,e){fe();var r;if(typeof e.type=="string"&&(r=e.__e)){var n=e.__np,i=e.props;if(n){var o=r.U;if(o)for(var s in o){var c=o[s];c!==void 0&&!(s in n)&&(c.d(),o[s]=void 0)}else o={},r.U=o;for(var d in n){var u=o[d],p=n[d];u===void 0?(u=Bt(r,d,p,i),o[d]=u):u.o(p,i)}}}t(e)});function Bt(t,e,r,n){var i=e in t&&t.ownerSVGElement===void 0,o=C(r);return{o:function(s,c){o.value=s,n=c},d:J(function(){this.N=mt;var s=o.value.value;n[e]!==s&&(n[e]=s,i?t[e]=s:s!=null&&(s!==!1||e[4]==="-")?t.setAttribute(e,s):t.removeAttribute(e))})}}B("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var s=e.__c;if(s){var c=s.__$u;c&&(s.__$u=void 0,c.d())}}t(e)}),B("__h",function(t,e,r,n){(n<3||n===9)&&(e.__$f|=2),t(e,r,n)}),G.prototype.shouldComponentUpdate=function(t,e){if(this.__R)return!0;var r=this.__$u,n=r&&r.s!==void 0;for(var i in e)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var o=2&this.__$f;if(!(n||o||4&this.__$f)||1&this.__$f)return!0}else if(!(n||4&this.__$f)||3&this.__$f)return!0;for(var s in t)if(s!=="__source"&&t[s]!==this.props[s])return!0;for(var c in this.props)if(!(c in t))return!0;return!1};function gt(t,e){return Se(function(){return C(t,e)},[])}var Ot=function(t){queueMicrotask(function(){queueMicrotask(t)})};function Ft(){Ut(function(){for(var t;t=xt.shift();)_t.call(t)})}function mt(){xt.push(this)===1&&(_.requestAnimationFrame||Ot)(Ft)}const k=C(!1),bt="jex-session-ref",Ee="jex-session-active",Z=C(null),pe=C(!1);function qt(){return"JEX-"+Math.random().toString(36).slice(2,8).toUpperCase()}function Gt(){try{const t=sessionStorage.getItem(bt),e=sessionStorage.getItem(Ee);Z.value=t??null,pe.value=t!==null&&e==="true"}catch{Z.value=null,pe.value=!1}}function Vt(){const t=qt();Z.value=t,pe.value=!1;try{sessionStorage.setItem(bt,t),sessionStorage.removeItem(Ee)}catch{}return t}function Yt(){if(Z.value){pe.value=!0;try{sessionStorage.setItem(Ee,"true")}catch{}}}const jt={title:"Assistant",statusOnline:"Online · Responds in seconds",inputPlaceholder:"Type a message…",sendAriaLabel:"Send message",openChatAriaLabel:"Open chat",closeChatAriaLabel:"Close chat",errorNetwork:"Network error. Please try again.",errorQuota:"Message limit reached. Please try again later.",localeLabelDe:"DE",localeLabelEn:"EN",resumeConversation:"Resume conversation",startNewConversation:"Start new conversation",chatWith:"Chat with {title}",haveReferenceNumber:"Have a reference number?",referencePlaceholder:"e.g. JEX-A3B7C2",resume:"Resume",howCanWeHelp:"How can we help?",getInstantHelp:"Get instant help",submitTicket:"Submit a ticket",replyByEmail:"We'll reply by email",ticketSubmitted:"Ticket submitted",yourReferenceNumber:"Your reference number:",sentToEmailHint:"We've sent it to your email. Use this number to follow up.",done:"Done",submittingTicket:"Submitting your ticket…",yourName:"Your name",yourEmail:"Your email",submit:"Submit",back:"Go back"},Jt={title:"Assistent",statusOnline:"Online · Antwortet in Sekunden",inputPlaceholder:"Nachricht eingeben…",sendAriaLabel:"Nachricht senden",openChatAriaLabel:"Chat öffnen",closeChatAriaLabel:"Chat schließen",errorNetwork:"Netzwerkfehler. Bitte versuche es erneut.",errorQuota:"Nachrichtenlimit erreicht. Bitte versuche es später erneut.",localeLabelDe:"DE",localeLabelEn:"EN",resumeConversation:"Gespräch fortsetzen",startNewConversation:"Neues Gespräch beginnen",chatWith:"Chatte mit {title}",haveReferenceNumber:"Hast du eine Referenznummer?",referencePlaceholder:"z.B. JEX-A3B7C2",resume:"Fortsetzen",howCanWeHelp:"Wie können wir helfen?",getInstantHelp:"Soforthilfe erhalten",submitTicket:"Ticket einreichen",replyByEmail:"Wir antworten per E-Mail",ticketSubmitted:"Ticket eingereicht",yourReferenceNumber:"Deine Referenznummer:",sentToEmailHint:"Wir haben sie an deine E-Mail gesendet. Verwende diese Nummer für Rückfragen.",done:"Fertig",submittingTicket:"Dein Ticket wird übermittelt…",yourName:"Dein Name",yourEmail:"Deine E-Mail",submit:"Absenden",back:"Zurück"},yt=[{value:"de",label:"Deutsch",flag:"🇩🇪"},{value:"en",label:"English",flag:"🇬🇧"}],Zt="de",Kt="jex-locale",Ne=C("de"),Xt={en:jt,de:Jt};function R(){return Xt[Ne.value]??jt}function Te(t){if(!t)return null;const e=(t.split("-")[0]??"").toLowerCase();return yt.some(n=>n.value===e)?e:null}function Qt(t){const e=Te(t);if(e)return e;try{const r=Te(localStorage.getItem(Kt));if(r)return r}catch{}if(typeof navigator<"u"){const r=Te(navigator.language);if(r)return r}return Zt}function er(t){const e={},{primaryColor:r,theme:n}=t;if(r&&(e["--jex-primary"]=r,e["--jex-bg-trigger"]=r,e["--jex-bg-header"]=r,e["--jex-bg-msg-user"]=r,e["--jex-bg-send-btn"]=r),t.accentColor&&(e["--jex-accent"]=t.accentColor),n?.bg){const i=n.bg;i.trigger&&(e["--jex-bg-trigger"]=i.trigger),i.header&&(e["--jex-bg-header"]=i.header),i.msgUser&&(e["--jex-bg-msg-user"]=i.msgUser),i.msgBot&&(e["--jex-bg-msg-bot"]=i.msgBot),i.window&&(e["--jex-bg-window"]=i.window),i.sendBtn&&(e["--jex-bg-send-btn"]=i.sendBtn)}if(n?.text){const i=n.text;i.header&&(e["--jex-text-header"]=i.header),i.msgUser&&(e["--jex-text-msg-user"]=i.msgUser),i.msgBot&&(e["--jex-text-msg-bot"]=i.msgBot),i.main&&(e["--jex-text-main"]=i.main),i.muted&&(e["--jex-text-muted"]=i.muted)}if(n?.border){const i=n.border;i.window&&(e["--jex-border-window"]=i.window),i.input&&(e["--jex-border-input"]=i.input)}return t.fontFamily&&(e["--jex-font-family"]=t.fontFamily),t.fontSize&&(e["--jex-font-size"]=`${t.fontSize}px`),t.borderRadius&&(e["--jex-radius"]=t.borderRadius),t.windowWidth&&(e["--jex-window-width"]=`${t.windowWidth}px`),t.windowHeight&&(e["--jex-window-height"]=`${t.windowHeight}px`),Object.keys(e).length>0?e:void 0}const N=C([{id:"home"}]);function K(t){N.value=[...N.value,t]}function wt(){N.value.length>1&&(N.value=N.value.slice(0,-1))}function ze(t){N.value=[...N.value.slice(0,-1),t]}function kt({size:t=24}){return a("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[a("path",{d:"M12 8V4H8"}),a("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),a("path",{d:"M2 14h2"}),a("path",{d:"M20 14h2"}),a("path",{d:"M15 13v2"}),a("path",{d:"M9 13v2"})]})}function tr({title:t}){const e=R(),r=N.value.length>1;return a("header",{class:"jex-chat-header",children:[r&&a("button",{class:"jex-header-back",onClick:wt,"aria-label":e.back||"Go back",children:a("svg",{width:20,height:20,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:a("path",{d:"m15 18-6-6 6-6"})})}),!r&&a(kt,{size:24}),a("div",{class:"jex-header-info",children:[a("h3",{children:t}),a("p",{children:e.statusOnline})]})]})}function rr({size:t=14}){return a("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:a("path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"})})}function nr(){return a("div",{class:"jex-widget-footer",children:a("a",{href:"https://jexity.com",target:"_blank",rel:"noopener noreferrer",class:"jex-branding",children:[a(rr,{size:14}),a("span",{children:["Powered by ",a("strong",{children:"Jexity"})]})]})})}function ir({size:t=28}){return a("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:a("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function or({size:t=28}){return a("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[a("path",{d:"M18 6 6 18"}),a("path",{d:"m6 6 12 12"})]})}function ar({size:t=24,...e}){return a("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e,children:a("path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"})})}const lr={chat:a(ir,{size:28}),bot:a(kt,{size:28}),sparkles:a(ar,{size:28})},sr={none:"0px",sm:"0.5rem",md:"0.75rem",lg:"1.25rem",full:"9999px"};function cr({radius:t="full",iconOption:e="chat",label:r="Chatte mit uns"}){const n=R(),i=r!=="";return a("button",{class:`jex-floating-button ${!k.value&&i?"jex-has-label":""}`,style:{borderRadius:sr[t]??"9999px"},onClick:()=>{k.value=!k.value},"aria-label":k.value?n.closeChatAriaLabel:n.openChatAriaLabel,children:k.value?a(or,{size:28}):a("div",{class:"jex-fab-inner",children:[lr[e],i&&a("span",{class:"jex-fab-label",children:r})]})})}const T=C([]),X=C(!1),ur=C(null);function dr(){T.value=[],X.value=!1,ur.value=null}function fr({greeting:t,title:e}){const r=R(),n=Z.value,[i,o]=U(!1),[s,c]=U("");function d(){Vt(),dr(),K({id:"chat"})}function u(){K({id:"chat"})}function p(l){l.preventDefault(),s.trim()&&K({id:"chat"})}return a("div",{class:"jex-home",children:[a("div",{class:"jex-home-greeting",children:t}),n?a("div",{class:"jex-home-actions",children:[a("button",{class:"jex-home-start-btn",onClick:u,children:r.resumeConversation}),a("button",{class:"jex-home-new-btn",onClick:d,children:r.startNewConversation})]}):a("div",{class:"jex-home-actions",children:[a("button",{class:"jex-home-start-btn",onClick:d,children:r.chatWith.replace("{title}",e)}),!i&&a("button",{class:"jex-home-lookup-link",onClick:()=>{o(!0)},children:r.haveReferenceNumber}),i&&a("form",{class:"jex-home-lookup",onSubmit:p,children:[a("input",{class:"jex-home-lookup-input",type:"text",placeholder:r.referencePlaceholder,value:s,autoFocus:!0,onInput:l=>{c(l.currentTarget.value)}}),a("button",{class:"jex-home-lookup-submit",type:"submit",children:r.resume})]})]})]})}function pr({title:t}){const e=R();return a("div",{class:"jex-selection",children:[a("h2",{class:"jex-selection-title",children:e.howCanWeHelp}),a("div",{class:"jex-selection-options",children:[a("button",{class:"jex-selection-option",onClick:()=>K({id:"chat"}),children:[a("span",{class:"jex-selection-icon",children:"💬"}),a("span",{class:"jex-selection-label",children:e.chatWith.replace("{title}",t)}),a("span",{class:"jex-selection-sub",children:e.getInstantHelp})]}),a("button",{class:"jex-selection-option",onClick:()=>K({id:"form"}),children:[a("span",{class:"jex-selection-icon",children:"📝"}),a("span",{class:"jex-selection-label",children:e.submitTicket}),a("span",{class:"jex-selection-sub",children:e.replyByEmail})]})]})]})}function hr({text:t}){return a("div",{class:"jex-message bot",children:t})}function _r({text:t}){return a("div",{class:"jex-message user",children:t})}function xr(){return a("div",{class:"jex-typing",children:[a("span",{}),a("span",{}),a("span",{})]})}function vr(){const t=It(null);return D(()=>{t.current?.scrollIntoView({behavior:"smooth"})},[T.value.length,X.value]),a("div",{class:"jex-chat-messages",children:[T.value.map(e=>e.sender==="bot"?a(hr,{text:e.text},e.id):a(_r,{text:e.text},e.id)),X.value&&a(xr,{}),a("div",{ref:t})]})}function gr({size:t=18}){return a("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[a("path",{d:"M22 2 11 13"}),a("path",{d:"M22 2 15 22 11 13 2 9l20-7z"})]})}function mr(){const t=R(),e=gt("");function r(){const n=e.value.trim();n&&(Yt(),T.value=[...T.value,{id:Date.now(),text:n,sender:"user"}],e.value="",X.value=!0,setTimeout(()=>{X.value=!1,T.value=[...T.value,{id:Date.now()+1,text:`You said: "${n}". This is a demo of the Jexity Chat Widget!`,sender:"bot"}]},1e3))}return a("div",{class:"jex-chat-input",children:[a("input",{type:"text","aria-label":t.inputPlaceholder,placeholder:t.inputPlaceholder,value:e.value,onInput:n=>{e.value=n.currentTarget.value},onKeyDown:n=>{n.key==="Enter"&&r()}}),a("button",{class:"jex-send-btn",onClick:r,"aria-label":t.sendAriaLabel,children:a(gr,{size:18})})]})}function br({greeting:t}){return D(()=>{T.value.length===0&&(T.value=[{id:Date.now(),text:t,sender:"bot"}])},[t]),a(P,{children:[a(vr,{}),a(mr,{})]})}function jr(){const t=R(),[e,r]=U(""),[n,i]=U(""),[o,s]=U("");async function c(d){d.preventDefault(),ze({id:"loading",message:t.submittingTicket}),await new Promise(p=>{setTimeout(p,1200)});const u="JEX-"+Math.random().toString(36).slice(2,8).toUpperCase();ze({id:"confirmation",ref:u})}return a("div",{class:"jex-form-screen",children:[a("h2",{class:"jex-form-title",children:t.submitTicket}),a("form",{class:"jex-form",onSubmit:d=>{c(d)},children:[a("input",{class:"jex-form-input",type:"text",placeholder:t.yourName,value:e,required:!0,onInput:d=>{r(d.currentTarget.value)}}),a("input",{class:"jex-form-input",type:"email",placeholder:t.yourEmail,value:n,required:!0,onInput:d=>{i(d.currentTarget.value)}}),a("textarea",{class:"jex-form-textarea",placeholder:t.howCanWeHelp,value:o,required:!0,onInput:d=>{s(d.currentTarget.value)}}),a("button",{class:"jex-form-submit",type:"submit",children:t.submit})]})]})}function yr({ticketRef:t}){const e=R();return a("div",{class:"jex-confirmation",children:[a("div",{class:"jex-confirmation-icon","aria-hidden":"true",children:"✓"}),a("h2",{class:"jex-confirmation-title",children:e.ticketSubmitted}),a("p",{class:"jex-confirmation-body",children:e.yourReferenceNumber}),a("div",{class:"jex-confirmation-ref",children:t}),a("p",{class:"jex-confirmation-hint",children:e.sentToEmailHint}),a("button",{class:"jex-confirmation-done",onClick:()=>{k.value=!1},children:e.done})]})}function wr({message:t}){return a("div",{class:"jex-overlay jex-loading",children:[a("div",{class:"jex-loading-spinner","aria-hidden":"true"}),t&&a("p",{class:"jex-loading-message",children:t})]})}function kr({message:t,onRetry:e,onBack:r}){return a("div",{class:"jex-overlay jex-error",children:[a("p",{class:"jex-error-message",children:t}),a("div",{class:"jex-error-actions",children:[e&&a("button",{class:"jex-error-retry",onClick:e,children:"Try again"}),r&&a("button",{class:"jex-error-back",onClick:r,children:"Go back"})]})]})}function Sr({greeting:t,title:e}){const r=N.value,n=r[r.length-1],i=r.findLast(o=>o.id==="confirmation");return a("div",{class:"jex-screen-container",children:[n.id==="home"&&a(fr,{greeting:t,title:e}),n.id==="selection"&&a(pr,{title:e}),n.id==="form"&&a(jr,{}),n.id==="confirmation"&&i&&a(yr,{ticketRef:i.ref}),n.id==="chat"&&a(br,{greeting:t}),n.id==="loading"&&a(wr,{message:n.message}),n.id==="error"&&a(kr,{message:n.message,onRetry:()=>ze({id:"loading"}),onBack:wt})]})}function Cr({options:t}){const[e,r]=U(null);D(()=>{},[t.orgSlug]);const n=t.title??e?.title??"Assistant",i=t.greeting??e?.welcomeMessage??`Hi! I'm ${n}. How can I help?`,o=t.locale??e?.locale,s=t.position??e?.position,c=t.colorScheme??e?.colorScheme,d=t.hideBranding??e?.hideBranding??!1,u=t.triggerIcon??e?.triggerIcon??"chat",p=t.triggerRadius??e?.triggerRadius??"full",l=t.triggerLabel??e?.triggerLabel??"Chatte mit uns",h=s==="bottom-left",f=c==="dark"||c==="light"?c:"",y=er({...t,primaryColor:t.primaryColor??e?.primaryColor,accentColor:t.accentColor??e?.accentColor,fontFamily:t.fontFamily??e?.fontFamily,fontSize:t.fontSize??e?.fontSize,borderRadius:t.borderRadius??e?.borderRadius,windowWidth:t.windowWidth??e?.windowWidth,windowHeight:t.windowHeight??e?.windowHeight});return D(()=>{Gt()},[]),D(()=>{Ne.value=Qt(o)},[o]),D(()=>{function S(m){const g=t.parentOrigin??window.location.origin;if(m.origin!==g||m.data?.type!=="jexity:config")return;const{locale:v}=m.data.payload;v&&yt.some($=>$.value===v)&&(Ne.value=v)}return window.addEventListener("message",S),()=>{window.removeEventListener("message",S)}},[t.parentOrigin]),a("div",{class:`jex-widget ${f}`.trim(),style:y,children:a("div",{class:`jex-container${h?" jex-pos-left":""}`,children:[k.value&&a("div",{class:"jex-chat-window",children:[a(tr,{title:n}),a(Sr,{greeting:i,title:n}),!d&&a(nr,{})]}),a(cr,{iconOption:u,radius:p,label:l})]})})}const $r='.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9)}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9)}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:16px;padding:20px;font-size:15px;line-height:1.5;color:var(--jex-text-main)}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s;width:100%}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px)}.jex-home-start-btn:active{transform:translateY(0)}.jex-home-actions{display:flex;flex-direction:column;gap:8px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message{max-width:80%;padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{align-self:flex-start;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-chat-input{padding:16px;border-top:1px solid var(--jex-border-window);display:flex;gap:8px;flex-shrink:0}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s cubic-bezier(.175,.885,.32,1.275);flex-shrink:0}.jex-send-btn:hover{transform:scale(1.05);background:var(--jex-primary-hover)}.jex-send-btn:active{transform:scale(.95)}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:6px;width:100%}.jex-home-lookup-input{flex:1;padding:8px 10px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:13px;outline:none}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:8px 14px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer}';function Ar(t){const e=document.createElement("style");e.textContent=$r,t.appendChild(e)}function Er(t,e){const r=t.shadowRoot??t.attachShadow({mode:"open"});for(;r.firstChild;)r.removeChild(r.firstChild);Ar(r);const n=document.createElement("div");return r.appendChild(n),Ze(a(Cr,{options:e}),n),function(){Ze(null,n),k.value=!1}}function Nr(t,e,r){const n=Er(t,e),i=new Set,o=k.subscribe(c=>{for(const d of i)d(c)});return{shutdown(){o(),i.clear(),n(),r&&r()},open(){k.value=!0},close(){k.value=!1},toggle(){k.value=!k.value},get isOpen(){return k.value},subscribe(c){return i.add(c),()=>{i.delete(c)}}}}let Q=null;function Tr(t){Q&&Q.shutdown();let e;t.container?e=typeof t.container=="string"?document.querySelector(t.container):t.container:(e=document.createElement("div"),e.id="jexity-chat-widget",document.body.appendChild(e));const r=Nr(e,t,()=>{t.container||e.remove(),Q===r&&(Q=null)});return Q=r,r}function O(t,e){return t.getAttribute(e)??void 0}function St(){const t=document.currentScript??document.querySelector("script[data-org-slug]")??document.querySelector("script[data-org-id]");if(!t)return;const r={orgSlug:t.getAttribute("data-org-slug")??t.getAttribute("data-org-id")??"default-org",position:O(t,"data-position")??void 0,theme:O(t,"data-theme")??void 0,greeting:O(t,"data-greeting"),title:O(t,"data-title"),primaryColor:O(t,"data-primary-color"),locale:O(t,"data-locale")};window.JexityChat=Tr(r)}document.readyState==="complete"?St():window.addEventListener("load",St)})();
|
|
3
2
|
//# sourceMappingURL=widget.js.map
|