@seamly/web-ui 24.5.0 → 25.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/lib/index.debug.js +2129 -1810
- package/build/dist/lib/index.debug.js.map +1 -1
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.LICENSE.txt +49 -7
- package/build/dist/lib/index.debug.min.js.map +1 -1
- package/build/dist/lib/index.js +732 -398
- package/build/dist/lib/index.js.map +1 -1
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.LICENSE.txt +16 -1
- package/build/dist/lib/index.min.js.map +1 -1
- package/build/dist/lib/style-guide.js +305 -93
- package/build/dist/lib/style-guide.js.map +1 -1
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/style-guide.min.js.map +1 -1
- package/build/dist/lib/styles-default-implementation.css +1 -1
- package/build/dist/lib/styles.css +1 -1
- package/package.json +27 -38
- package/src/javascripts/core/api/api.types.ts +3 -0
- package/src/javascripts/core/api/asyncapi.types.ts +292 -69
- package/src/javascripts/core/api/channel.types.ts +301 -69
- package/src/javascripts/core/api/conversation-connector.ts +1 -3
- package/src/javascripts/core/api/errors/seamly-api-error.ts +0 -1
- package/src/javascripts/core/api/errors/seamly-base-error.ts +1 -1
- package/src/javascripts/core/api/index.ts +7 -7
- package/src/javascripts/core/api/utils.ts +0 -1
- package/src/javascripts/core/domains/app/actions.ts +1 -1
- package/src/javascripts/core/domains/app/hooks.ts +1 -1
- package/src/javascripts/core/domains/config/hooks.ts +1 -1
- package/src/javascripts/core/domains/config/selectors.ts +1 -1
- package/src/javascripts/core/domains/config/slice.ts +2 -2
- package/src/javascripts/core/domains/forms/context.ts +1 -1
- package/src/javascripts/core/domains/forms/hooks.ts +12 -12
- package/src/javascripts/core/domains/forms/provider.tsx +9 -9
- package/src/javascripts/core/domains/i18n/actions.ts +1 -1
- package/src/javascripts/core/domains/i18n/hooks.ts +3 -3
- package/src/javascripts/core/domains/interrupt/hooks.ts +1 -1
- package/src/javascripts/core/domains/store/index.ts +2 -2
- package/src/javascripts/core/domains/store/slice.ts +47 -34
- package/src/javascripts/core/domains/store/store.types.ts +3 -7
- package/src/javascripts/core/domains/translations/components/options-button.tsx +2 -2
- package/src/javascripts/core/domains/translations/components/options-dialog/index.tsx +1 -1
- package/src/javascripts/core/domains/translations/components/options-dialog/translation-option.tsx +1 -1
- package/src/javascripts/core/domains/translations/components/options-dialog/translation-options.tsx +2 -2
- package/src/javascripts/core/domains/translations/components/translation-status.tsx +1 -1
- package/src/javascripts/core/domains/translations/hooks.ts +2 -2
- package/src/javascripts/core/domains/translations/middleware.ts +4 -2
- package/src/javascripts/core/domains/visibility/actions.ts +2 -2
- package/src/javascripts/core/domains/visibility/hooks.ts +5 -5
- package/src/javascripts/core/lib/debug.ts +1 -1
- package/src/javascripts/core/lib/engine/index.tsx +5 -5
- package/src/javascripts/core/lib/external-api/index.ts +6 -6
- package/src/javascripts/core/lib/mutex.ts +0 -1
- package/src/javascripts/core/lib/split-url-params.ts +1 -1
- package/src/javascripts/core/lib/store/index.ts +0 -1
- package/src/javascripts/core/lib/store/providers/app-storage.js +4 -7
- package/src/javascripts/core/lib/store/providers/app-storage.ts +4 -6
- package/src/javascripts/core/ui/components/app-options/index.tsx +1 -1
- package/src/javascripts/core/ui/components/chat-status/index.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/component-filter.tsx +1 -3
- package/src/javascripts/core/ui/components/conversation/conversation.tsx +9 -11
- package/src/javascripts/core/ui/components/conversation/event/card-component.tsx +3 -3
- package/src/javascripts/core/ui/components/conversation/event/carousel-component/components/pagination.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/event/carousel-component/index.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-provider.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/event/choice-prompt.tsx +5 -5
- package/src/javascripts/core/ui/components/conversation/event/conversation-suggestions.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/event/divider/variants/new-translation.tsx +3 -3
- package/src/javascripts/core/ui/components/conversation/event/divider/variants/time-indicator.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/event/event-participant.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/event/event.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/event/image-lightbox.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/event/image.tsx +2 -2
- package/src/javascripts/core/ui/components/conversation/event/participant.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/event/splash.tsx +0 -1
- package/src/javascripts/core/ui/components/conversation/event/text.tsx +2 -2
- package/src/javascripts/core/ui/components/conversation/event/upload.tsx +3 -3
- package/src/javascripts/core/ui/components/conversation/event/video.tsx +2 -2
- package/src/javascripts/core/ui/components/conversation/event-divider.tsx +1 -1
- package/src/javascripts/core/ui/components/conversation/message-container.tsx +2 -4
- package/src/javascripts/core/ui/components/conversation/use-chat-scroll.ts +3 -3
- package/src/javascripts/core/ui/components/core/seamly-activity-monitor.tsx +1 -1
- package/src/javascripts/core/ui/components/core/seamly-api-context.ts +1 -1
- package/src/javascripts/core/ui/components/core/seamly-core.tsx +3 -3
- package/src/javascripts/core/ui/components/core/seamly-event-subscriber.ts +9 -7
- package/src/javascripts/core/ui/components/core/seamly-file-upload.tsx +2 -3
- package/src/javascripts/core/ui/components/core/seamly-initializer.tsx +1 -1
- package/src/javascripts/core/ui/components/core/seamly-instance-functions-loader.ts +3 -3
- package/src/javascripts/core/ui/components/core/seamly-live-region.tsx +1 -1
- package/src/javascripts/core/ui/components/core/seamly-new-notifications.ts +1 -1
- package/src/javascripts/core/ui/components/core/seamly-read-state.ts +1 -1
- package/src/javascripts/core/ui/components/entry/entry-container.tsx +8 -3
- package/src/javascripts/core/ui/components/entry/text-entry/hooks.ts +21 -14
- package/src/javascripts/core/ui/components/entry/text-entry/index.tsx +1 -1
- package/src/javascripts/core/ui/components/entry/text-entry/text-entry-form.tsx +1 -1
- package/src/javascripts/core/ui/components/entry/upload/file-upload-form.tsx +1 -1
- package/src/javascripts/core/ui/components/entry/upload/index.tsx +1 -1
- package/src/javascripts/core/ui/components/entry/upload-toggle.tsx +2 -1
- package/src/javascripts/core/ui/components/form-controls/error.tsx +1 -1
- package/src/javascripts/core/ui/components/form-controls/file-input.tsx +1 -1
- package/src/javascripts/core/ui/components/form-controls/input.tsx +1 -1
- package/src/javascripts/core/ui/components/form-controls/wrapper.tsx +1 -1
- package/src/javascripts/core/ui/components/layout/agent-info.tsx +1 -1
- package/src/javascripts/core/ui/components/layout/chat-frame.tsx +1 -1
- package/src/javascripts/core/ui/components/layout/chat.tsx +8 -6
- package/src/javascripts/core/ui/components/layout/continue-chat-messages.tsx +1 -1
- package/src/javascripts/core/ui/components/layout/header.tsx +1 -1
- package/src/javascripts/core/ui/components/layout/interrupt.tsx +1 -1
- package/src/javascripts/core/ui/components/layout/pre-chat-messages.tsx +1 -1
- package/src/javascripts/core/ui/components/options/options-button.tsx +1 -3
- package/src/javascripts/core/ui/components/options/options-frame.tsx +1 -1
- package/src/javascripts/core/ui/components/options/transcript/index.tsx +1 -1
- package/src/javascripts/core/ui/components/suggestions/index.tsx +2 -2
- package/src/javascripts/core/ui/components/suggestions/suggestions-list.tsx +1 -1
- package/src/javascripts/core/ui/components/view/index.tsx +3 -3
- package/src/javascripts/core/ui/components/view/window-view/collapse-button.tsx +10 -1
- package/src/javascripts/core/ui/components/view/window-view/window-open-button.tsx +9 -3
- package/src/javascripts/core/ui/components/widgets/in-out-transition.tsx +2 -2
- package/src/javascripts/core/ui/components/widgets/lightbox.tsx +1 -1
- package/src/javascripts/core/ui/hooks/file-upload-hooks.ts +1 -1
- package/src/javascripts/core/ui/hooks/focus-helper-hooks.ts +6 -1
- package/src/javascripts/core/ui/hooks/seamly-entry-hooks.ts +1 -1
- package/src/javascripts/core/ui/hooks/seamly-option-hooks.ts +1 -1
- package/src/javascripts/core/ui/hooks/seamly-state-hooks.ts +9 -4
- package/src/javascripts/core/ui/hooks/use-debounce.ts +1 -1
- package/src/javascripts/core/ui/hooks/use-interval.ts +0 -1
- package/src/javascripts/core/ui/hooks/use-notifications.ts +2 -3
- package/src/javascripts/core/ui/hooks/use-seamly-chat.ts +2 -2
- package/src/javascripts/core/ui/hooks/use-seamly-commands.ts +2 -2
- package/src/javascripts/core/ui/hooks/use-seamly-conversation.ts +1 -1
- package/src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts +15 -10
- package/src/javascripts/core/ui/hooks/use-session-expired-command.ts +1 -1
- package/src/javascripts/core/ui/hooks/use-single-file-upload.ts +1 -1
- package/src/javascripts/core/ui/hooks/utility-hooks.ts +1 -2
- package/src/javascripts/core/ui/utils/seamly-utils.ts +0 -2
- package/src/javascripts/core/ui/utils/validations.ts +1 -2
- package/src/javascripts/style-guide/components/app.tsx +2 -2
- package/src/javascripts/style-guide/components/static-core.tsx +2 -2
- package/src/javascripts/style-guide/components/view.tsx +1 -1
- package/src/javascripts/style-guide/state-helpers/index.ts +0 -2
- package/src/javascripts/style-guide/states.ts +5 -42
- package/src/javascripts/style-guide/style-guide-engine.tsx +1 -1
- package/src/stylesheets/5-components/_message-body.scss +0 -10
- package/src/stylesheets/6-default-implementation/_hover.scss +0 -7
- package/src/stylesheets/styles.scss +0 -1
- package/webpack/config.common.js +4 -11
- package/webpack/config.dev.js +0 -1
- package/webpack/config.package.js +5 -7
- package/webpack/config.site.js +2 -4
- package/webpack/config.test.js +1 -2
- package/webpack/defaults.js +0 -1
- package/webpack/parts/babel-loader-browser-plugins.js +0 -1
- package/webpack/parts/dev-server.js +0 -1
- package/src/javascripts/core/ui/components/conversation/event/cta.tsx +0 -54
- package/src/stylesheets/5-components/_message-cta.scss +0 -17
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see index.debug.min.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={"./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ReducerType:()=>ne,SHOULD_AUTOBATCH:()=>O,TaskAbortError:()=>Te,Tuple:()=>y,__DO_NOT_USE__ActionTypes:()=>r.__DO_NOT_USE__ActionTypes,addListener:()=>We,applyMiddleware:()=>r.applyMiddleware,asyncThunkCreator:()=>oe,autoBatchEnhancer:()=>L,bindActionCreators:()=>r.bindActionCreators,buildCreateSlice:()=>ie,clearAllListeners:()=>Ke,combineReducers:()=>r.combineReducers,combineSlices:()=>it,compose:()=>r.compose,configureStore:()=>M,createAction:()=>d,createActionCreatorInvariantMiddleware:()=>h,createAsyncThunk:()=>te,createDraftSafeSelector:()=>c,createDraftSafeSelectorCreator:()=>i,createDynamicMiddleware:()=>Ze,createEntityAdapter:()=>be,createImmutableStateInvariantMiddleware:()=>S,createListenerMiddleware:()=>Xe,createNextState:()=>o.produce,createReducer:()=>F,createSelector:()=>n.createSelector,createSelectorCreator:()=>n.createSelectorCreator,createSerializableStateInvariantMiddleware:()=>T,createSlice:()=>le,createStore:()=>r.createStore,current:()=>o.current,findNonSerializableValue:()=>C,formatProdErrorMessage:()=>ct,freeze:()=>o.freeze,isAction:()=>r.isAction,isActionCreator:()=>p,isAllOf:()=>B,isAnyOf:()=>z,isAsyncThunkAction:()=>K,isDraft:()=>o.isDraft,isFluxStandardAction:()=>m,isFulfilled:()=>W,isImmutableDefault:()=>b,isPending:()=>H,isPlain:()=>k,isPlainObject:()=>r.isPlainObject,isRejected:()=>G,isRejectedWithValue:()=>q,legacy_createStore:()=>r.legacy_createStore,lruMemoize:()=>n.lruMemoize,miniSerializeError:()=>Z,nanoid:()=>J,original:()=>o.original,prepareAutoBatched:()=>A,removeListener:()=>Je,unwrapResult:()=>se,weakMapMemoize:()=>n.weakMapMemoize});var r=s("./node_modules/redux/dist/redux.mjs"),o=s("./node_modules/immer/dist/immer.mjs"),n=s("./node_modules/reselect/dist/reselect.mjs"),a=s("./node_modules/redux-thunk/dist/redux-thunk.mjs"),i=(...e)=>{const t=(0,n.createSelectorCreator)(...e),s=Object.assign(((...e)=>{const s=t(...e),r=(e,...t)=>s((0,o.isDraft)(e)?(0,o.current)(e):e,...t);return Object.assign(r,s),r}),{withTypes:()=>s});return s},c=i(n.weakMapMemoize),l="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?r.compose:r.compose.apply(null,arguments)},u=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function d(e,t){function s(...s){if(t){let r=t(...s);if(!r)throw new Error("prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:s[0]}}return s.toString=()=>`${e}`,s.type=e,s.match=t=>(0,r.isAction)(t)&&t.type===e,s}function p(e){return"function"==typeof e&&"type"in e&&u(e)}function m(e){return(0,r.isAction)(e)&&Object.keys(e).every(f)}function f(e){return["type","payload","error","meta"].indexOf(e)>-1}function h(e={}){const{isActionCreator:t=p}=e;return()=>e=>s=>(t(s)&&console.warn(function(e){const t=e?`${e}`.split("/"):[],s=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \`dispatch(${s}())\` instead of \`dispatch(${s})\`. This is necessary even if the action has no payload.`}(s.type)),e(s))}function v(e,t){let s=0;return{measureTime(e){const t=Date.now();try{return e()}finally{const e=Date.now();s+=e-t}},warnIfExceeded(){s>e&&console.warn(`${t} took ${s}ms, which is more than the warning threshold of ${e}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)}}}var y=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function j(e){return(0,o.isDraftable)(e)?(0,o.produce)(e,(()=>{})):e}function g(e,t,s){return e.has(t)?e.get(t):e.set(t,s(t)).get(t)}function b(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function x(e,t,s){const r=_(e,t,s);return{detectMutations:()=>w(e,t,r,s)}}function _(e,t=[],s,r="",o=new Set){const n={value:s};if(!e(s)&&!o.has(s)){o.add(s),n.children={};for(const o in s){const a=r?r+"."+o:o;t.length&&-1!==t.indexOf(a)||(n.children[o]=_(e,t,s[o],a))}}return n}function w(e,t=[],s,r,o=!1,n=""){const a=s?s.value:void 0,i=a===r;if(o&&!i&&!Number.isNaN(r))return{wasMutated:!0,path:n};if(e(a)||e(r))return{wasMutated:!1};const c={};for(let e in s.children)c[e]=!0;for(let e in r)c[e]=!0;const l=t.length>0;for(let o in c){const a=n?n+"."+o:o;if(l&&t.some((e=>e instanceof RegExp?e.test(a):a===e)))continue;const c=w(e,t,s.children[o],r[o],i,a);if(c.wasMutated)return c}return{wasMutated:!1}}function S(e={}){{let t=function(e,t,r,o){return JSON.stringify(e,s(t,o),r)},s=function(e,t){let s=[],r=[];return t||(t=function(e,t){return s[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,s.indexOf(t)).join(".")+"]"}),function(o,n){if(s.length>0){var a=s.indexOf(this);~a?s.splice(a+1):s.push(this),~a?r.splice(a,1/0,o):r.push(o),~s.indexOf(n)&&(n=t.call(this,o,n))}else s.push(n);return null==e?n:e.call(this,o,n)}},{isImmutable:r=b,ignoredPaths:o,warnAfter:n=32}=e;const a=x.bind(null,r,o);return({getState:e})=>{let s,r=e(),o=a(r);return i=>c=>{const l=v(n,"ImmutableStateInvariantMiddleware");l.measureTime((()=>{if(r=e(),s=o.detectMutations(),o=a(r),s.wasMutated)throw new Error(`A state mutation was detected between dispatches, in the path '${s.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}));const u=i(c);return l.measureTime((()=>{if(r=e(),s=o.detectMutations(),o=a(r),s.wasMutated)throw new Error(`A state mutation was detected inside a dispatch, in the path: ${s.path||""}. Take a look at the reducer(s) handling the action ${t(c)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)})),l.warnIfExceeded(),u}}}}function k(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||(0,r.isPlainObject)(e)}function C(e,t="",s=k,r,o=[],n){let a;if(!s(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(n?.has(e))return!1;const i=null!=r?r(e):Object.entries(e),c=o.length>0;for(const[e,l]of i){const i=t?t+"."+e:e;if(!c||!o.some((e=>e instanceof RegExp?e.test(i):i===e))){if(!s(l))return{keyPath:i,value:l};if("object"==typeof l&&(a=C(l,i,s,r,o,n),a))return a}}return n&&E(e)&&n.add(e),!1}function E(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!E(t))return!1;return!0}function T(e={}){{const{isSerializable:t=k,getEntries:s,ignoredActions:o=[],ignoredActionPaths:n=["meta.arg","meta.baseQueryMeta"],ignoredPaths:a=[],warnAfter:i=32,ignoreState:c=!1,ignoreActions:l=!1,disableCache:u=!1}=e,d=!u&&WeakSet?new WeakSet:void 0;return e=>u=>p=>{if(!(0,r.isAction)(p))return u(p);const m=u(p),f=v(i,"SerializableStateInvariantMiddleware");return l||o.length&&-1!==o.indexOf(p.type)||f.measureTime((()=>{const e=C(p,"",t,s,n,d);if(e){const{keyPath:t,value:s}=e;console.error(`A non-serializable value was detected in an action, in the path: \`${t}\`. Value:`,s,"\nTake a look at the logic that dispatched this action: ",p,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}})),c||(f.measureTime((()=>{const r=C(e.getState(),"",t,s,a,d);if(r){const{keyPath:e,value:t}=r;console.error(`A non-serializable value was detected in the state, in the path: \`${e}\`. Value:`,t,`\nTake a look at the reducer(s) handling this action type: ${p.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}})),f.warnIfExceeded()),m}}}function N(e){return"boolean"==typeof e}var I=()=>function(e){const{thunk:t=!0,immutableCheck:s=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let n=new y;if(t&&(N(t)?n.push(a.thunk):n.push((0,a.withExtraArgument)(t.extraArgument))),s){let e={};N(s)||(e=s),n.unshift(S(e))}if(r){let e={};N(r)||(e=r),n.push(T(e))}if(o){let e={};N(o)||(e=o),n.unshift(h(e))}return n},O="RTK_autoBatch",A=()=>e=>({payload:e,meta:{[O]:!0}}),P=e=>t=>{setTimeout(t,e)},L=(e={type:"raf"})=>t=>(...s)=>{const r=t(...s);let o=!0,n=!1,a=!1;const i=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:P(10):"callback"===e.type?e.queueNotification:P(e.timeout),l=()=>{a=!1,n&&(n=!1,i.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>o&&e()));return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return o=!e?.meta?.[O],n=!o,n&&(a||(a=!0,c(l))),r.dispatch(e)}finally{o=!0}}})},R=e=>function(t){const{autoBatch:s=!0}=t??{};let r=new y(e);return s&&r.push(L("object"==typeof s?s:void 0)),r};function M(e){const t=I(),{reducer:s,middleware:o,devTools:n=!0,duplicateMiddlewareCheck:a=!0,preloadedState:i,enhancers:c}=e||{};let u,d;if("function"==typeof s)u=s;else{if(!(0,r.isPlainObject)(s))throw new Error("`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");u=(0,r.combineReducers)(s)}if(o&&"function"!=typeof o)throw new Error("`middleware` field must be a callback");if("function"==typeof o){if(d=o(t),!Array.isArray(d))throw new Error("when using a middleware builder function, an array of middleware must be returned")}else d=t();if(d.some((e=>"function"!=typeof e)))throw new Error("each middleware provided to configureStore must be a function");if(a){let e=new Set;d.forEach((t=>{if(e.has(t))throw new Error("Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");e.add(t)}))}let p=r.compose;n&&(p=l({trace:!0,..."object"==typeof n&&n}));const m=(0,r.applyMiddleware)(...d),f=R(m);if(c&&"function"!=typeof c)throw new Error("`enhancers` field must be a callback");let h="function"==typeof c?c(f):f();if(!Array.isArray(h))throw new Error("`enhancers` callback must return an array");if(h.some((e=>"function"!=typeof e)))throw new Error("each enhancer provided to configureStore must be a function");d.length&&!h.includes(m)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=p(...h);return(0,r.createStore)(u,i,v)}function D(e){const t={},s=[];let r;const o={addCase(e,n){if(s.length>0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");const a="string"==typeof e?e:e.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error(`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=n,o},addMatcher(e,t){if(r)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return s.push({matcher:e,reducer:t}),o},addDefaultCase(e){if(r)throw new Error("`builder.addDefaultCase` can only be called once");return r=e,o}};return e(o),[t,s,r]}function F(e,t){if("object"==typeof t)throw new Error("The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let s,[r,n,a]=D(t);if("function"==typeof e)s=()=>j(e());else{const t=j(e);s=()=>t}function i(e=s(),t){let i=[r[t.type],...n.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[a]),i.reduce(((e,s)=>{if(s){if((0,o.isDraft)(e)){const r=s(e,t);return void 0===r?e:r}if((0,o.isDraftable)(e))return(0,o.produce)(e,(e=>s(e,t)));{const r=s(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return i.getInitialState=s,i}var U=(e,t)=>u(e)?e.match(t):e(t);function z(...e){return t=>e.some((e=>U(e,t)))}function B(...e){return t=>e.every((e=>U(e,t)))}function V(e,t){if(!e||!e.meta)return!1;const s="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return s&&r}function $(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function H(...e){return 0===e.length?e=>V(e,["pending"]):$(e)?z(...e.map((e=>e.pending))):H()(e[0])}function G(...e){return 0===e.length?e=>V(e,["rejected"]):$(e)?z(...e.map((e=>e.rejected))):G()(e[0])}function q(...e){return 0===e.length||$(e)?B(G(...e),(e=>e&&e.meta&&e.meta.rejectedWithValue)):q()(e[0])}function W(...e){return 0===e.length?e=>V(e,["fulfilled"]):$(e)?z(...e.map((e=>e.fulfilled))):W()(e[0])}function K(...e){return 0===e.length?e=>V(e,["pending","fulfilled","rejected"]):$(e)?z(...e.flatMap((e=>[e.pending,e.rejected,e.fulfilled]))):K()(e[0])}var J=(e=21)=>{let t="",s=e;for(;s--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},Y=["name","message","stack","code"],X=class{constructor(e,t){this.payload=e,this.meta=t}_type},Q=class{constructor(e,t){this.payload=e,this.meta=t}_type},Z=e=>{if("object"==typeof e&&null!==e){const t={};for(const s of Y)"string"==typeof e[s]&&(t[s]=e[s]);return t}return{message:String(e)}},ee="External signal was aborted",te=(()=>{function e(e,t,s){const r=d(e+"/fulfilled",((e,t,s,r)=>({payload:e,meta:{...r||{},arg:s,requestId:t,requestStatus:"fulfilled"}}))),o=d(e+"/pending",((e,t,s)=>({payload:void 0,meta:{...s||{},arg:t,requestId:e,requestStatus:"pending"}}))),n=d(e+"/rejected",((e,t,r,o,n)=>({payload:o,error:(s&&s.serializeError||Z)(e||"Rejected"),meta:{...n||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}})));return Object.assign((function(e,{signal:a}={}){return(i,c,l)=>{const u=s?.idGenerator?s.idGenerator(e):J(),d=new AbortController;let p,m;function f(e){m=e,d.abort()}a&&(a.aborted?f(ee):a.addEventListener("abort",(()=>f(ee)),{once:!0}));const h=async function(){let a;try{let n=s?.condition?.(e,{getState:c,extra:l});if(null!==(h=n)&&"object"==typeof h&&"function"==typeof h.then&&(n=await n),!1===n||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const v=new Promise(((e,t)=>{p=()=>{t({name:"AbortError",message:m||"Aborted"})},d.signal.addEventListener("abort",p)}));i(o(u,e,s?.getPendingMeta?.({requestId:u,arg:e},{getState:c,extra:l}))),a=await Promise.race([v,Promise.resolve(t(e,{dispatch:i,getState:c,extra:l,requestId:u,signal:d.signal,abort:f,rejectWithValue:(e,t)=>new X(e,t),fulfillWithValue:(e,t)=>new Q(e,t)})).then((t=>{if(t instanceof X)throw t;return t instanceof Q?r(t.payload,u,e,t.meta):r(t,u,e)}))])}catch(t){a=t instanceof X?n(null,u,e,t.payload,t.meta):n(t,u,e)}finally{p&&d.signal.removeEventListener("abort",p)}var h;return s&&!s.dispatchConditionRejection&&n.match(a)&&a.meta.condition||i(a),a}();return Object.assign(h,{abort:f,requestId:u,arg:e,unwrap:()=>h.then(se)})}}),{pending:o,rejected:n,fulfilled:r,settled:z(n,r),typePrefix:e})}return e.withTypes=()=>e,e})();function se(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var re=Symbol.for("rtk-slice-createasyncthunk"),oe={[re]:te},ne=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(ne||{});function ae(e,t){return`${e}/${t}`}function ie({creators:e}={}){const t=e?.asyncThunk?.[re];return function(e){const{name:s,reducerPath:r=s}=e;if(!s)throw new Error("`name` is a required option for createSlice");"undefined"!=typeof process&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},n=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},i={addCase(e,t){const s="string"==typeof e?e:e.type;if(!s)throw new Error("`context.addCase` cannot be called with an empty action type");if(s in a.sliceCaseReducersByType)throw new Error("`context.addCase` cannot be called with two reducers for the same action type: "+s);return a.sliceCaseReducersByType[s]=t,i},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),i),exposeAction:(e,t)=>(a.actionCreators[e]=t,i),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,i)};function c(){if("object"==typeof e.extraReducers)throw new Error("The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},s=[],r]="function"==typeof e.extraReducers?D(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return F(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of s)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}n.forEach((r=>{const n=o[r],a={reducerName:r,type:ae(s,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(n)?function({type:e,reducerName:t,createNotation:s},r,o){let n,a;if("reducer"in r){if(s&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");n=r.reducer,a=r.prepare}else n=r;o.addCase(e,n).exposeCaseReducer(t,n).exposeAction(t,a?d(e,a):d(e))}(a,n,i):function({type:e,reducerName:t},s,r,o){if(!o)throw new Error("Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:n,fulfilled:a,pending:i,rejected:c,settled:l,options:u}=s,d=o(e,n,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),i&&r.addCase(d.pending,i),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||ue,pending:i||ue,rejected:c||ue,settled:l||ue})}(a,n,i,t)}));const l=e=>e,u=new Map,p=new WeakMap;let m;function f(e,t){return m||(m=c()),m(e,t)}function h(){return m||(m=c()),m.getInitialState()}function v(t,s=!1){function r(e){let o=e[t];if(void 0===o){if(!s)throw new Error("selectSlice returned undefined for an uninjected slice reducer");o=g(p,r,h)}return o}function o(t=l){const r=g(u,s,(()=>new WeakMap));return g(r,t,(()=>{const r={};for(const[o,n]of Object.entries(e.selectors??{}))r[o]=ce(n,t,(()=>g(p,t,h)),s);return r}))}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const y={name:s,reducer:f,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...v(r),injectInto(e,{reducerPath:t,...s}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},s),{...y,...v(o,!0)}}};return y}}function ce(e,t,s,r){function o(o,...n){let a=t(o);if(void 0===a){if(!r)throw new Error("selectState returned undefined for an uninjected slice reducer");a=s()}return e(a,...n)}return o.unwrapped=e,o}var le=ie();function ue(){}var de=o.isDraft;function pe(e){const t=me(((t,s)=>e(s)));return function(e){return t(e,void 0)}}function me(e){return function(t,s){const r=t=>{m(s)?e(s.payload,t):e(s,t)};return de(t)?(r(t),t):(0,o.produce)(t,r)}}function fe(e,t){const s=t(e);return void 0===s&&console.warn("The entity passed to the `selectId` implementation returned undefined.","You should probably provide your own `selectId` implementation.","The entity that was passed:",e,"The `selectId` implementation:",t.toString()),s}function he(e){return Array.isArray(e)||(e=Object.values(e)),e}function ve(e){return(0,o.isDraft)(e)?(0,o.current)(e):e}function ye(e,t,s){e=he(e);const r=ve(s.ids),o=new Set(r),n=[],a=new Set([]),i=[];for(const s of e){const e=fe(s,t);o.has(e)||a.has(e)?i.push({id:e,changes:s}):(a.add(e),n.push(s))}return[n,i,r]}function je(e){function t(t,s){const r=fe(t,e);r in s.entities||(s.ids.push(r),s.entities[r]=t)}function s(e,s){e=he(e);for(const r of e)t(r,s)}function r(t,s){const r=fe(t,e);r in s.entities||s.ids.push(r),s.entities[r]=t}function o(e,t){let s=!1;e.forEach((e=>{e in t.entities&&(delete t.entities[e],s=!0)})),s&&(t.ids=t.ids.filter((e=>e in t.entities)))}function n(t,s){const r={},o={};if(t.forEach((e=>{e.id in s.entities&&(o[e.id]={id:e.id,changes:{...o[e.id]?.changes,...e.changes}})})),(t=Object.values(o)).length>0){const o=t.filter((t=>function(t,s,r){const o=r.entities[s.id];if(void 0===o)return!1;const n=Object.assign({},o,s.changes),a=fe(n,e),i=a!==s.id;return i&&(t[s.id]=a,delete r.entities[s.id]),r.entities[a]=n,i}(r,t,s))).length>0;o&&(s.ids=Object.values(s.entities).map((t=>fe(t,e))))}}function a(t,r){const[o,a]=ye(t,e,r);s(o,r),n(a,r)}return{removeAll:pe((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:me(t),addMany:me(s),setOne:me(r),setMany:me((function(e,t){e=he(e);for(const s of e)r(s,t)})),setAll:me((function(e,t){e=he(e),t.ids=[],t.entities={},s(e,t)})),updateOne:me((function(e,t){return n([e],t)})),updateMany:me(n),upsertOne:me((function(e,t){return a([e],t)})),upsertMany:me(a),removeOne:me((function(e,t){return o([e],t)})),removeMany:me(o)}}function ge(e,t,s){const r=function(e,t,s){let r=0,o=e.length;for(;r<o;){let n=r+o>>>1;s(t,e[n])>=0?r=n+1:o=n}return r}(e,t,s);return e.splice(r,0,t),e}function be(e={}){const{selectId:t,sortComparer:s}={sortComparer:!1,selectId:e=>e.id,...e},r=s?function(e,t){const{removeOne:s,removeMany:r,removeAll:o}=je(e);function n(t,s,r){t=he(t);const o=new Set(r??ve(s.ids)),n=t.filter((t=>!o.has(fe(t,e))));0!==n.length&&l(s,n)}function a(t,s){if(0!==(t=he(t)).length){for(const r of t)delete s.entities[e(r)];l(s,t)}}function i(t,s){let r=!1,o=!1;for(let n of t){const t=s.entities[n.id];if(!t)continue;r=!0,Object.assign(t,n.changes);const a=e(t);if(n.id!==a){o=!0,delete s.entities[n.id];const e=s.ids.indexOf(n.id);s.ids[e]=a,s.entities[a]=t}}r&&l(s,[],r,o)}function c(t,s){const[r,o,a]=ye(t,e,s);r.length&&n(r,s,a),o.length&&i(o,s)}const l=(s,r,o,n)=>{const a=ve(s.entities),i=ve(s.ids),c=s.entities;let l=i;n&&(l=new Set(i));let u=[];for(const e of l){const t=a[e];t&&u.push(t)}const d=0===u.length;for(const s of r)c[e(s)]=s,d||ge(u,s,t);d?u=r.slice().sort(t):o&&u.sort(t);const p=u.map(e);(function(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0})(i,p)||(s.ids=p)};return{removeOne:s,removeMany:r,removeAll:o,addOne:me((function(e,t){return n([e],t)})),updateOne:me((function(e,t){return i([e],t)})),upsertOne:me((function(e,t){return c([e],t)})),setOne:me((function(e,t){return a([e],t)})),setMany:me(a),setAll:me((function(e,t){e=he(e),t.entities={},t.ids=[],n(e,t,[])})),addMany:me(n),updateMany:me(i),upsertMany:me(c)}}(t,s):je(t),o=function(e){return{getInitialState:function(t={},s){const r=Object.assign({ids:[],entities:{}},t);return s?e.setAll(r,s):r}}}(r),n={getSelectors:function(e,t={}){const{createSelector:s=c}=t,r=e=>e.ids,o=e=>e.entities,n=s(r,o,((e,t)=>e.map((e=>t[e])))),a=(e,t)=>t,i=(e,t)=>e[t],l=s(r,(e=>e.length));if(!e)return{selectIds:r,selectEntities:o,selectAll:n,selectTotal:l,selectById:s(o,a,i)};const u=s(e,o);return{selectIds:s(e,r),selectEntities:u,selectAll:s(e,n),selectTotal:s(e,l),selectById:s(u,a,i)}}};return{selectId:t,sortComparer:s,...o,...n,...r}}var xe="listener",_e="completed",we="cancelled",Se=`task-${we}`,ke=`task-${_e}`,Ce=`${xe}-${we}`,Ee=`${xe}-${_e}`,Te=class{constructor(e){this.code=e,this.message=`task ${we} (reason: ${e})`}name="TaskAbortError";message},Ne=(e,t)=>{if("function"!=typeof e)throw new TypeError(`${t} is not a function`)},Ie=()=>{},Oe=(e,t=Ie)=>(e.catch(t),e),Ae=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Pe=(e,t)=>{const s=e.signal;s.aborted||("reason"in s||Object.defineProperty(s,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Le=e=>{if(e.aborted){const{reason:t}=e;throw new Te(t)}};function Re(e,t){let s=Ie;return new Promise(((r,o)=>{const n=()=>o(new Te(e.reason));e.aborted?n():(s=Ae(e,n),t.finally((()=>s())).then(r,o))})).finally((()=>{s=Ie}))}var Me=e=>t=>Oe(Re(e,t).then((t=>(Le(e),t)))),De=e=>{const t=Me(e);return e=>t(new Promise((t=>setTimeout(t,e))))},{assign:Fe}=Object,Ue={},ze="listenerMiddleware",Be=(e,t)=>(s,r)=>{Ne(s,"taskExecutor");const o=new AbortController;var n;n=o,Ae(e,(()=>Pe(n,e.reason)));const a=(async()=>{try{return await Promise.resolve(),{status:"ok",value:await(async()=>{Le(e),Le(o.signal);const t=await s({pause:Me(o.signal),delay:De(o.signal),signal:o.signal});return Le(o.signal),t})()}}catch(e){return{status:e instanceof Te?"cancelled":"rejected",error:e}}finally{Pe(o,ke)}})();return r?.autoJoin&&t.push(a.catch(Ie)),{result:Me(e)(a),cancel(){Pe(o,Se)}}},Ve=e=>{let{type:t,actionCreator:s,matcher:r,predicate:o,effect:n}=e;if(t)o=d(t).match;else if(s)t=s.type,o=s.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return Ne(n,"options.listener"),{predicate:o,type:t,effect:n}},$e=Fe((e=>{const{type:t,predicate:s,effect:r}=Ve(e);return{id:J(),effect:r,type:t,predicate:s,pending:new Set,unsubscribe:()=>{throw new Error("Unsubscribe not initialized")}}}),{withTypes:()=>$e}),He=(e,t)=>{const{type:s,effect:r,predicate:o}=Ve(t);return Array.from(e.values()).find((e=>("string"==typeof s?e.type===s:e.predicate===o)&&e.effect===r))},Ge=e=>{e.pending.forEach((e=>{Pe(e,Ce)}))},qe=(e,t,s)=>{try{e(t,s)}catch(e){setTimeout((()=>{throw e}),0)}},We=Fe(d(`${ze}/add`),{withTypes:()=>We}),Ke=d(`${ze}/removeAll`),Je=Fe(d(`${ze}/remove`),{withTypes:()=>Je}),Ye=(...e)=>{console.error(`${ze}/error`,...e)},Xe=(e={})=>{const t=new Map,{extra:s,onError:o=Ye}=e;Ne(o,"onError");const n=e=>{return(s=He(t,e)??$e(e)).unsubscribe=()=>t.delete(s.id),t.set(s.id,s),e=>{s.unsubscribe(),e?.cancelActive&&Ge(s)};var s};Fe(n,{withTypes:()=>n});const a=e=>{const s=He(t,e);return s&&(s.unsubscribe(),e.cancelActive&&Ge(s)),!!s};Fe(a,{withTypes:()=>a});const i=async(e,r,a,i)=>{const c=new AbortController,l=((e,t)=>(s,r)=>Oe((async(s,r)=>{Le(t);let o=()=>{};const n=[new Promise(((t,r)=>{let n=e({predicate:s,effect:(e,s)=>{s.unsubscribe(),t([e,s.getState(),s.getOriginalState()])}});o=()=>{n(),r()}}))];null!=r&&n.push(new Promise((e=>setTimeout(e,r,null))));try{const e=await Re(t,Promise.race(n));return Le(t),e}finally{o()}})(s,r)))(n,c.signal),u=[];try{e.pending.add(c),await Promise.resolve(e.effect(r,Fe({},a,{getOriginalState:i,condition:(e,t)=>l(e,t).then(Boolean),take:l,delay:De(c.signal),pause:Me(c.signal),extra:s,signal:c.signal,fork:Be(c.signal,u),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach(((e,t,s)=>{e!==c&&(Pe(e,Ce),s.delete(e))}))},cancel:()=>{Pe(c,Ce),e.pending.delete(c)},throwIfCancelled:()=>{Le(c.signal)}})))}catch(e){e instanceof Te||qe(o,e,{raisedBy:"effect"})}finally{await Promise.all(u),Pe(c,Ee),e.pending.delete(c)}},c=(e=>()=>{e.forEach(Ge),e.clear()})(t);return{middleware:e=>s=>l=>{if(!(0,r.isAction)(l))return s(l);if(We.match(l))return n(l.payload);if(Ke.match(l))return void c();if(Je.match(l))return a(l.payload);let u=e.getState();const d=()=>{if(u===Ue)throw new Error(`${ze}: getOriginalState can only be called synchronously`);return u};let p;try{if(p=s(l),t.size>0){const s=e.getState(),r=Array.from(t.values());for(const t of r){let r=!1;try{r=t.predicate(l,s,u)}catch(e){r=!1,qe(o,e,{raisedBy:"predicate"})}r&&i(t,l,e,d)}}}finally{u=Ue}return p},startListening:n,stopListening:a,clearListeners:c}},Qe=e=>({middleware:e,applied:new Map}),Ze=()=>{const e=J(),t=new Map,s=Object.assign(d("dynamicMiddleware/add",((...t)=>({payload:t,meta:{instanceId:e}}))),{withTypes:()=>s}),o=Object.assign((function(...e){e.forEach((e=>{g(t,e,Qe)}))}),{withTypes:()=>o}),n=B(s,(e=>t=>t?.meta?.instanceId===e)(e));return{middleware:e=>s=>a=>n(a)?(o(...a.payload),e.dispatch):(e=>{const s=Array.from(t.values()).map((t=>g(t.applied,e,t.middleware)));return(0,r.compose)(...s)})(e)(s)(a),addMiddleware:o,withMiddleware:s,instanceId:e}},et=e=>e.flatMap((e=>{return"reducerPath"in(t=e)&&"string"==typeof t.reducerPath?[[e.reducerPath,e.reducer]]:Object.entries(e);var t})),tt=Symbol.for("rtk-state-proxy-original"),st=new WeakMap,rt=(e,t,s)=>g(st,e,(()=>new Proxy(e,{get:(e,r,o)=>{if(r===tt)return e;const n=Reflect.get(e,r,o);if(void 0===n){const e=s[r];if(void 0!==e)return e;const o=t[r];if(o){const e=o(void 0,{type:J()});if(void 0===e)throw new Error(`The slice reducer for key "${r.toString()}" returned undefined when called for selector(). If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);return s[r]=e,e}}return n}}))),ot=e=>{if(!(t=e)||!t[tt])throw new Error("original must be used on state Proxy");var t;return e[tt]},nt={},at=(e=nt)=>e;function it(...e){const t=Object.fromEntries(et(e)),s=()=>Object.keys(t).length?(0,r.combineReducers)(t):at;let o=s();function n(e,t){return o(e,t)}n.withLazyLoadedSlices=()=>n;const a={},i=Object.assign((function(e,s){return function(r,...o){return e(rt(s?s(r,...o):r,t,a),...o)}}),{original:ot});return Object.assign(n,{inject:(e,r={})=>{const{reducerPath:i,reducer:c}=e,l=t[i];return!r.overrideExisting&&l&&l!==c?("undefined"!=typeof process&&console.error(`called \`inject\` to override already-existing reducer ${i} without specifying \`overrideExisting: true\``),n):(r.overrideExisting&&l!==c&&delete a[i],t[i]=c,o=s(),n)},selector:i})}function ct(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}},"./node_modules/@ultraq/function-utils/function-utils.js":(e,t,s)=>{"use strict";function r(e){const t={};return function(...s){let r=s.length?s.map((e=>null===e?"null":void 0===e?"undefined":"function"==typeof e?e.toString():e instanceof Date?e.toISOString():JSON.stringify(e))).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(t,r))return t[r];let o=e(...s);return t[r]=o,o}}s.r(t),s.d(t,{memoize:()=>r})},"./node_modules/@ultraq/icu-message-formatter/dist/icu-message-formatter.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{MessageFormatter:()=>c,findClosingBracket:()=>n,parseCases:()=>o,pluralTypeHandler:()=>f,selectTypeHandler:()=>v,splitFormattedArgument:()=>a});var r=s("./node_modules/@ultraq/function-utils/function-utils.js");function o(e=""){const t=e=>/\s/.test(e),s=[],r={};let o=0,a=null,i=!1,c=0;for(;c<e.length;){if(i&&(t(e[c])||"{"===e[c]))i=!1,a=e.slice(o,c),"{"===e[c]&&c--;else if(!i&&!t(e[c])){const t="{"===e[c];if(a&&t){const t=n(e,c);if(-1===t)throw new Error(`Unbalanced curly braces in string: "${e}"`);r[a]=e.slice(c+1,t),c=t,a=null}else a&&(s.push(a),a=null),i=!0,o=c}c++}return i&&(a=e.slice(o)),a&&s.push(a),{args:s,cases:r}}function n(e,t){let s=0;for(let r=t+1;r<e.length;r++){let t=e.charAt(r);if("}"===t){if(0===s)return r;s--}else"{"===t&&s++}return-1}function a(e){return i(e.slice(1,-1),",",3)}function i(e,t,s,r=[]){if(!e)return r;if(1===s)return r.push(e),r;let o=e.indexOf(t);if(-1===o)return r.push(e),r;let n=e.substring(0,o).trim(),a=e.substring(o+t.length+1).trim();return r.push(n),i(a,t,s-1,r)}class c{constructor(e,t={}){this.locale=e,this.typeHandlers=t}format=(0,r.memoize)(((e,t={})=>this.process(e,t).flat(1/0).join("")));process(e,t={}){if(!e)return[];let s=e.indexOf("{");if(-1!==s){let r=n(e,s);if(-1===r)throw new Error(`Unbalanced curly braces in string: "${e}"`);{let o=e.substring(s,r+1);if(o){let n=[],i=e.substring(0,s);i&&n.push(i);let[c,l,u]=a(o),d=t[c];null==d&&(d="");let p=l&&this.typeHandlers[l];n.push(p?p(d,u,this.locale,t,this.process.bind(this)):d);let m=e.substring(r+1);return m&&n.push(this.process(m,t)),n}}}return[e]}}let l,u=0;const d="one",p="other";function m(e,t){let s=0,r="",o=0;const n={};for(;s<e.length;){if("#"!==e[s]||o)r+=e[s];else{let e="__hashToken"+u++;r+=`{${e}, number}`,n[e]=t}"{"===e[s]?o++:"}"===e[s]&&o--,s++}return{caseBody:r,numberValues:n}}function f(e,t,s,r,n){const{args:a,cases:i}=o(t);let c=parseInt(e);a.forEach((e=>{e.startsWith("offset:")&&(c-=parseInt(e.slice(7)))}));const u=[];if("PluralRules"in Intl){void 0!==l&&l.resolvedOptions().locale===s||(l=new Intl.PluralRules(s));const e=l.select(c);e!==p&&u.push(e)}1===c&&u.push(d),u.push(`=${c}`,p);for(let e=0;e<u.length;e++){const t=u[e];if(t in i){const{caseBody:e,numberValues:s}=m(i[t],c);return n(e,{...r,...s})}}return e}const h="other";function v(e,t,s,r,n){const{cases:a}=o(t);return e in a?n(a[e],r):h in a?n(a[h],r):e}},"./node_modules/core-js/es/array/at.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.array.at.js");var r=s("./node_modules/core-js/internals/entry-unbind.js");e.exports=r("Array","at")},"./node_modules/core-js/internals/a-callable.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-callable.js"),o=s("./node_modules/core-js/internals/try-to-string.js"),n=TypeError;e.exports=function(e){if(r(e))return e;throw new n(o(e)+" is not a function")}},"./node_modules/core-js/internals/a-set.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/set-helpers.js").has;e.exports=function(e){return r(e),e}},"./node_modules/core-js/internals/add-to-unscopables.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/well-known-symbol.js"),o=s("./node_modules/core-js/internals/object-create.js"),n=s("./node_modules/core-js/internals/object-define-property.js").f,a=r("unscopables"),i=Array.prototype;void 0===i[a]&&n(i,a,{configurable:!0,value:o(null)}),e.exports=function(e){i[a][e]=!0}},"./node_modules/core-js/internals/an-instance.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/object-is-prototype-of.js"),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new o("Incorrect invocation")}},"./node_modules/core-js/internals/an-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-object.js"),o=String,n=TypeError;e.exports=function(e){if(r(e))return e;throw new n(o(e)+" is not an object")}},"./node_modules/core-js/internals/array-includes.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-indexed-object.js"),o=s("./node_modules/core-js/internals/to-absolute-index.js"),n=s("./node_modules/core-js/internals/length-of-array-like.js"),a=function(e){return function(t,s,a){var i=r(t),c=n(i);if(0===c)return!e&&-1;var l,u=o(a,c);if(e&&s!=s){for(;c>u;)if((l=i[u++])!=l)return!0}else for(;c>u;u++)if((e||u in i)&&i[u]===s)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"./node_modules/core-js/internals/array-set-length.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/is-array.js"),n=TypeError,a=Object.getOwnPropertyDescriptor,i=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=i?function(e,t){if(o(e)&&!a(e,"length").writable)throw new n("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/an-object.js"),o=s("./node_modules/core-js/internals/iterator-close.js");e.exports=function(e,t,s,n){try{return n?t(r(s)[0],s[1]):t(s)}catch(t){o(e,"throw",t)}}},"./node_modules/core-js/internals/classof-raw.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=r({}.toString),n=r("".slice);e.exports=function(e){return n(o(e),8,-1)}},"./node_modules/core-js/internals/classof.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-string-tag-support.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/classof-raw.js"),a=s("./node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),i=Object,c="Arguments"===n(function(){return arguments}());e.exports=r?n:function(e){var t,s,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(t=i(e),a))?s:c?n(t):"Object"===(r=n(t))&&o(t.callee)?"Arguments":r}},"./node_modules/core-js/internals/copy-constructor-properties.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/has-own-property.js"),o=s("./node_modules/core-js/internals/own-keys.js"),n=s("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),a=s("./node_modules/core-js/internals/object-define-property.js");e.exports=function(e,t,s){for(var i=o(t),c=a.f,l=n.f,u=0;u<i.length;u++){var d=i[u];r(e,d)||s&&r(s,d)||c(e,d,l(t,d))}}},"./node_modules/core-js/internals/correct-prototype-getter.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/fails.js");e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},"./node_modules/core-js/internals/create-iter-result-object.js":e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},"./node_modules/core-js/internals/create-non-enumerable-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/object-define-property.js"),n=s("./node_modules/core-js/internals/create-property-descriptor.js");e.exports=r?function(e,t,s){return o.f(e,t,n(1,s))}:function(e,t,s){return e[t]=s,e}},"./node_modules/core-js/internals/create-property-descriptor.js":e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"./node_modules/core-js/internals/create-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/object-define-property.js"),n=s("./node_modules/core-js/internals/create-property-descriptor.js");e.exports=function(e,t,s){r?o.f(e,t,n(0,s)):e[t]=s}},"./node_modules/core-js/internals/define-built-in-accessor.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/make-built-in.js"),o=s("./node_modules/core-js/internals/object-define-property.js");e.exports=function(e,t,s){return s.get&&r(s.get,t,{getter:!0}),s.set&&r(s.set,t,{setter:!0}),o.f(e,t,s)}},"./node_modules/core-js/internals/define-built-in.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-callable.js"),o=s("./node_modules/core-js/internals/object-define-property.js"),n=s("./node_modules/core-js/internals/make-built-in.js"),a=s("./node_modules/core-js/internals/define-global-property.js");e.exports=function(e,t,s,i){i||(i={});var c=i.enumerable,l=void 0!==i.name?i.name:t;if(r(s)&&n(s,l,i),i.global)c?e[t]=s:a(t,s);else{try{i.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=s:o.f(e,t,{value:s,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e}},"./node_modules/core-js/internals/define-built-ins.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/define-built-in.js");e.exports=function(e,t,s){for(var o in t)r(e,o,t[o],s);return e}},"./node_modules/core-js/internals/define-global-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(s){r[e]=t}return t}},"./node_modules/core-js/internals/descriptors.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/fails.js");e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"./node_modules/core-js/internals/document-create-element.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/is-object.js"),n=r.document,a=o(n)&&o(n.createElement);e.exports=function(e){return a?n.createElement(e):{}}},"./node_modules/core-js/internals/does-not-exceed-safe-integer.js":e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},"./node_modules/core-js/internals/entry-unbind.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/function-uncurry-this.js");e.exports=function(e,t){return o(r[e].prototype[t])}},"./node_modules/core-js/internals/enum-bug-keys.js":e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"./node_modules/core-js/internals/environment-user-agent.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js").navigator,o=r&&r.userAgent;e.exports=o?String(o):""},"./node_modules/core-js/internals/environment-v8-version.js":(e,t,s)=>{"use strict";var r,o,n=s("./node_modules/core-js/internals/global-this.js"),a=s("./node_modules/core-js/internals/environment-user-agent.js"),i=n.process,c=n.Deno,l=i&&i.versions||c&&c.version,u=l&&l.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},"./node_modules/core-js/internals/export.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,n=s("./node_modules/core-js/internals/create-non-enumerable-property.js"),a=s("./node_modules/core-js/internals/define-built-in.js"),i=s("./node_modules/core-js/internals/define-global-property.js"),c=s("./node_modules/core-js/internals/copy-constructor-properties.js"),l=s("./node_modules/core-js/internals/is-forced.js");e.exports=function(e,t){var s,u,d,p,m,f=e.target,h=e.global,v=e.stat;if(s=h?r:v?r[f]||i(f,{}):r[f]&&r[f].prototype)for(u in t){if(p=t[u],d=e.dontCallGetSet?(m=o(s,u))&&m.value:s[u],!l(h?u:f+(v?".":"#")+u,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;c(p,d)}(e.sham||d&&d.sham)&&n(p,"sham",!0),a(s,u,p,e)}}},"./node_modules/core-js/internals/fails.js":e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},"./node_modules/core-js/internals/function-apply.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype,n=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(n):function(){return a.apply(n,arguments)})},"./node_modules/core-js/internals/function-bind-context.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this-clause.js"),o=s("./node_modules/core-js/internals/a-callable.js"),n=s("./node_modules/core-js/internals/function-bind-native.js"),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:n?a(e,t):function(){return e.apply(t,arguments)}}},"./node_modules/core-js/internals/function-bind-native.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/fails.js");e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},"./node_modules/core-js/internals/function-call.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},"./node_modules/core-js/internals/function-name.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/has-own-property.js"),n=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,i=o(n,"name"),c=i&&"something"===function(){}.name,l=i&&(!r||r&&a(n,"name").configurable);e.exports={EXISTS:i,PROPER:c,CONFIGURABLE:l}},"./node_modules/core-js/internals/function-uncurry-this-accessor.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/a-callable.js");e.exports=function(e,t,s){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[s]))}catch(e){}}},"./node_modules/core-js/internals/function-uncurry-this-clause.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/classof-raw.js"),o=s("./node_modules/core-js/internals/function-uncurry-this.js");e.exports=function(e){if("Function"===r(e))return o(e)}},"./node_modules/core-js/internals/function-uncurry-this.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype,n=o.call,a=r&&o.bind.bind(n,n);e.exports=r?a:function(e){return function(){return n.apply(e,arguments)}}},"./node_modules/core-js/internals/get-built-in.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/is-callable.js");e.exports=function(e,t){return arguments.length<2?(s=r[e],o(s)?s:void 0):r[e]&&r[e][t];var s}},"./node_modules/core-js/internals/get-iterator-direct.js":e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},"./node_modules/core-js/internals/get-iterator-method.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/classof.js"),o=s("./node_modules/core-js/internals/get-method.js"),n=s("./node_modules/core-js/internals/is-null-or-undefined.js"),a=s("./node_modules/core-js/internals/iterators.js"),i=s("./node_modules/core-js/internals/well-known-symbol.js")("iterator");e.exports=function(e){if(!n(e))return o(e,i)||o(e,"@@iterator")||a[r(e)]}},"./node_modules/core-js/internals/get-iterator.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/a-callable.js"),n=s("./node_modules/core-js/internals/an-object.js"),a=s("./node_modules/core-js/internals/try-to-string.js"),i=s("./node_modules/core-js/internals/get-iterator-method.js"),c=TypeError;e.exports=function(e,t){var s=arguments.length<2?i(e):t;if(o(s))return n(r(s,e));throw new c(a(e)+" is not iterable")}},"./node_modules/core-js/internals/get-method.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-callable.js"),o=s("./node_modules/core-js/internals/is-null-or-undefined.js");e.exports=function(e,t){var s=e[t];return o(s)?void 0:r(s)}},"./node_modules/core-js/internals/get-set-record.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-callable.js"),o=s("./node_modules/core-js/internals/an-object.js"),n=s("./node_modules/core-js/internals/function-call.js"),a=s("./node_modules/core-js/internals/to-integer-or-infinity.js"),i=s("./node_modules/core-js/internals/get-iterator-direct.js"),c="Invalid size",l=RangeError,u=TypeError,d=Math.max,p=function(e,t){this.set=e,this.size=d(t,0),this.has=r(e.has),this.keys=r(e.keys)};p.prototype={getIterator:function(){return i(o(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},e.exports=function(e){o(e);var t=+e.size;if(t!=t)throw new u(c);var s=a(t);if(s<0)throw new l(c);return new p(e,s)}},"./node_modules/core-js/internals/global-this.js":function(e,t,s){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof s.g&&s.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},"./node_modules/core-js/internals/has-own-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/to-object.js"),n=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return n(o(e),t)}},"./node_modules/core-js/internals/hidden-keys.js":e=>{"use strict";e.exports={}},"./node_modules/core-js/internals/html.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/get-built-in.js");e.exports=r("document","documentElement")},"./node_modules/core-js/internals/ie8-dom-define.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/document-create-element.js");e.exports=!r&&!o((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))},"./node_modules/core-js/internals/indexed-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/classof-raw.js"),a=Object,i=r("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?i(e,""):a(e)}:a},"./node_modules/core-js/internals/inspect-source.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/shared-store.js"),a=r(Function.toString);o(n.inspectSource)||(n.inspectSource=function(e){return a(e)}),e.exports=n.inspectSource},"./node_modules/core-js/internals/internal-state.js":(e,t,s)=>{"use strict";var r,o,n,a=s("./node_modules/core-js/internals/weak-map-basic-detection.js"),i=s("./node_modules/core-js/internals/global-this.js"),c=s("./node_modules/core-js/internals/is-object.js"),l=s("./node_modules/core-js/internals/create-non-enumerable-property.js"),u=s("./node_modules/core-js/internals/has-own-property.js"),d=s("./node_modules/core-js/internals/shared-store.js"),p=s("./node_modules/core-js/internals/shared-key.js"),m=s("./node_modules/core-js/internals/hidden-keys.js"),f="Object already initialized",h=i.TypeError,v=i.WeakMap;if(a||d.state){var y=d.state||(d.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,r=function(e,t){if(y.has(e))throw new h(f);return t.facade=e,y.set(e,t),t},o=function(e){return y.get(e)||{}},n=function(e){return y.has(e)}}else{var j=p("state");m[j]=!0,r=function(e,t){if(u(e,j))throw new h(f);return t.facade=e,l(e,j,t),t},o=function(e){return u(e,j)?e[j]:{}},n=function(e){return u(e,j)}}e.exports={set:r,get:o,has:n,enforce:function(e){return n(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var s;if(!c(t)||(s=o(t)).type!==e)throw new h("Incompatible receiver, "+e+" required");return s}}}},"./node_modules/core-js/internals/is-array-iterator-method.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/well-known-symbol.js"),o=s("./node_modules/core-js/internals/iterators.js"),n=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[n]===e)}},"./node_modules/core-js/internals/is-array.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/classof-raw.js");e.exports=Array.isArray||function(e){return"Array"===r(e)}},"./node_modules/core-js/internals/is-callable.js":e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},"./node_modules/core-js/internals/is-forced.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/fails.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=/#|\.prototype\./,a=function(e,t){var s=c[i(e)];return s===u||s!==l&&(o(t)?r(t):!!t)},i=a.normalize=function(e){return String(e).replace(n,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},"./node_modules/core-js/internals/is-null-or-undefined.js":e=>{"use strict";e.exports=function(e){return null==e}},"./node_modules/core-js/internals/is-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-callable.js");e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},"./node_modules/core-js/internals/is-pure.js":e=>{"use strict";e.exports=!1},"./node_modules/core-js/internals/is-symbol.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/get-built-in.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/object-is-prototype-of.js"),a=s("./node_modules/core-js/internals/use-symbol-as-uid.js"),i=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&n(t.prototype,i(e))}},"./node_modules/core-js/internals/iterate-simple.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js");e.exports=function(e,t,s){for(var o,n,a=s?e:e.iterator,i=e.next;!(o=r(i,a)).done;)if(void 0!==(n=t(o.value)))return n}},"./node_modules/core-js/internals/iterate.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-bind-context.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/an-object.js"),a=s("./node_modules/core-js/internals/try-to-string.js"),i=s("./node_modules/core-js/internals/is-array-iterator-method.js"),c=s("./node_modules/core-js/internals/length-of-array-like.js"),l=s("./node_modules/core-js/internals/object-is-prototype-of.js"),u=s("./node_modules/core-js/internals/get-iterator.js"),d=s("./node_modules/core-js/internals/get-iterator-method.js"),p=s("./node_modules/core-js/internals/iterator-close.js"),m=TypeError,f=function(e,t){this.stopped=e,this.result=t},h=f.prototype;e.exports=function(e,t,s){var v,y,j,g,b,x,_,w=s&&s.that,S=!(!s||!s.AS_ENTRIES),k=!(!s||!s.IS_RECORD),C=!(!s||!s.IS_ITERATOR),E=!(!s||!s.INTERRUPTED),T=r(t,w),N=function(e){return v&&p(v,"normal",e),new f(!0,e)},I=function(e){return S?(n(e),E?T(e[0],e[1],N):T(e[0],e[1])):E?T(e,N):T(e)};if(k)v=e.iterator;else if(C)v=e;else{if(!(y=d(e)))throw new m(a(e)+" is not iterable");if(i(y)){for(j=0,g=c(e);g>j;j++)if((b=I(e[j]))&&l(h,b))return b;return new f(!1)}v=u(e,y)}for(x=k?e.next:v.next;!(_=o(x,v)).done;){try{b=I(_.value)}catch(e){p(v,"throw",e)}if("object"==typeof b&&b&&l(h,b))return b}return new f(!1)}},"./node_modules/core-js/internals/iterator-close.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/an-object.js"),n=s("./node_modules/core-js/internals/get-method.js");e.exports=function(e,t,s){var a,i;o(e);try{if(!(a=n(e,"return"))){if("throw"===t)throw s;return s}a=r(a,e)}catch(e){i=!0,a=e}if("throw"===t)throw s;if(i)throw a;return o(a),s}},"./node_modules/core-js/internals/iterator-create-proxy.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/object-create.js"),n=s("./node_modules/core-js/internals/create-non-enumerable-property.js"),a=s("./node_modules/core-js/internals/define-built-ins.js"),i=s("./node_modules/core-js/internals/well-known-symbol.js"),c=s("./node_modules/core-js/internals/internal-state.js"),l=s("./node_modules/core-js/internals/get-method.js"),u=s("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,d=s("./node_modules/core-js/internals/create-iter-result-object.js"),p=s("./node_modules/core-js/internals/iterator-close.js"),m=i("toStringTag"),f="IteratorHelper",h="WrapForValidIterator",v=c.set,y=function(e){var t=c.getterFor(e?h:f);return a(o(u),{next:function(){var s=t(this);if(e)return s.nextHandler();if(s.done)return d(void 0,!0);try{var r=s.nextHandler();return s.returnHandlerResult?r:d(r,s.done)}catch(e){throw s.done=!0,e}},return:function(){var s=t(this),o=s.iterator;if(s.done=!0,e){var n=l(o,"return");return n?r(n,o):d(void 0,!0)}if(s.inner)try{p(s.inner.iterator,"normal")}catch(e){return p(o,"throw",e)}return o&&p(o,"normal"),d(void 0,!0)}})},j=y(!0),g=y(!1);n(g,m,"Iterator Helper"),e.exports=function(e,t,s){var r=function(r,o){o?(o.iterator=r.iterator,o.next=r.next):o=r,o.type=t?h:f,o.returnHandlerResult=!!s,o.nextHandler=e,o.counter=0,o.done=!1,v(this,o)};return r.prototype=t?j:g,r}},"./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js");e.exports=function(e,t){var s=r.Iterator,o=s&&s.prototype,n=o&&o[e],a=!1;if(n)try{n.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(e){e instanceof t||(a=!1)}if(!a)return n}},"./node_modules/core-js/internals/iterators-core.js":(e,t,s)=>{"use strict";var r,o,n,a=s("./node_modules/core-js/internals/fails.js"),i=s("./node_modules/core-js/internals/is-callable.js"),c=s("./node_modules/core-js/internals/is-object.js"),l=s("./node_modules/core-js/internals/object-create.js"),u=s("./node_modules/core-js/internals/object-get-prototype-of.js"),d=s("./node_modules/core-js/internals/define-built-in.js"),p=s("./node_modules/core-js/internals/well-known-symbol.js"),m=s("./node_modules/core-js/internals/is-pure.js"),f=p("iterator"),h=!1;[].keys&&("next"in(n=[].keys())?(o=u(u(n)))!==Object.prototype&&(r=o):h=!0),!c(r)||a((function(){var e={};return r[f].call(e)!==e}))?r={}:m&&(r=l(r)),i(r[f])||d(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},"./node_modules/core-js/internals/iterators.js":e=>{"use strict";e.exports={}},"./node_modules/core-js/internals/length-of-array-like.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-length.js");e.exports=function(e){return r(e.length)}},"./node_modules/core-js/internals/make-built-in.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/is-callable.js"),a=s("./node_modules/core-js/internals/has-own-property.js"),i=s("./node_modules/core-js/internals/descriptors.js"),c=s("./node_modules/core-js/internals/function-name.js").CONFIGURABLE,l=s("./node_modules/core-js/internals/inspect-source.js"),u=s("./node_modules/core-js/internals/internal-state.js"),d=u.enforce,p=u.get,m=String,f=Object.defineProperty,h=r("".slice),v=r("".replace),y=r([].join),j=i&&!o((function(){return 8!==f((function(){}),"length",{value:8}).length})),g=String(String).split("String"),b=e.exports=function(e,t,s){"Symbol("===h(m(t),0,7)&&(t="["+v(m(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),s&&s.getter&&(t="get "+t),s&&s.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(i?f(e,"name",{value:t,configurable:!0}):e.name=t),j&&s&&a(s,"arity")&&e.length!==s.arity&&f(e,"length",{value:s.arity});try{s&&a(s,"constructor")&&s.constructor?i&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=d(e);return a(r,"source")||(r.source=y(g,"string"==typeof t?t:"")),e};Function.prototype.toString=b((function(){return n(this)&&p(this).source||l(this)}),"toString")},"./node_modules/core-js/internals/math-trunc.js":e=>{"use strict";var t=Math.ceil,s=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?s:t)(r)}},"./node_modules/core-js/internals/object-create.js":(e,t,s)=>{"use strict";var r,o=s("./node_modules/core-js/internals/an-object.js"),n=s("./node_modules/core-js/internals/object-define-properties.js"),a=s("./node_modules/core-js/internals/enum-bug-keys.js"),i=s("./node_modules/core-js/internals/hidden-keys.js"),c=s("./node_modules/core-js/internals/html.js"),l=s("./node_modules/core-js/internals/document-create-element.js"),u=s("./node_modules/core-js/internals/shared-key.js"),d="prototype",p="script",m=u("IE_PROTO"),f=function(){},h=function(e){return"<"+p+">"+e+"</"+p+">"},v=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,s;y="undefined"!=typeof document?document.domain&&r?v(r):(t=l("iframe"),s="java"+p+":",t.style.display="none",c.appendChild(t),t.src=String(s),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):v(r);for(var o=a.length;o--;)delete y[d][a[o]];return y()};i[m]=!0,e.exports=Object.create||function(e,t){var s;return null!==e?(f[d]=o(e),s=new f,f[d]=null,s[m]=e):s=y(),void 0===t?s:n.f(s,t)}},"./node_modules/core-js/internals/object-define-properties.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/v8-prototype-define-bug.js"),n=s("./node_modules/core-js/internals/object-define-property.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/to-indexed-object.js"),c=s("./node_modules/core-js/internals/object-keys.js");t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var s,r=i(t),o=c(t),l=o.length,u=0;l>u;)n.f(e,s=o[u++],r[s]);return e}},"./node_modules/core-js/internals/object-define-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/ie8-dom-define.js"),n=s("./node_modules/core-js/internals/v8-prototype-define-bug.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/to-property-key.js"),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",m="writable";t.f=r?n?function(e,t,s){if(a(e),t=i(t),a(s),"function"==typeof e&&"prototype"===t&&"value"in s&&m in s&&!s[m]){var r=u(e,t);r&&r[m]&&(e[t]=s.value,s={configurable:p in s?s[p]:r[p],enumerable:d in s?s[d]:r[d],writable:!1})}return l(e,t,s)}:l:function(e,t,s){if(a(e),t=i(t),a(s),o)try{return l(e,t,s)}catch(e){}if("get"in s||"set"in s)throw new c("Accessors not supported");return"value"in s&&(e[t]=s.value),e}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=s("./node_modules/core-js/internals/create-property-descriptor.js"),i=s("./node_modules/core-js/internals/to-indexed-object.js"),c=s("./node_modules/core-js/internals/to-property-key.js"),l=s("./node_modules/core-js/internals/has-own-property.js"),u=s("./node_modules/core-js/internals/ie8-dom-define.js"),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=i(e),t=c(t),u)try{return d(e,t)}catch(e){}if(l(e,t))return a(!o(n.f,e,t),e[t])}},"./node_modules/core-js/internals/object-get-own-property-names.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/object-keys-internal.js"),o=s("./node_modules/core-js/internals/enum-bug-keys.js").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/has-own-property.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/to-object.js"),a=s("./node_modules/core-js/internals/shared-key.js"),i=s("./node_modules/core-js/internals/correct-prototype-getter.js"),c=a("IE_PROTO"),l=Object,u=l.prototype;e.exports=i?l.getPrototypeOf:function(e){var t=n(e);if(r(t,c))return t[c];var s=t.constructor;return o(s)&&t instanceof s?s.prototype:t instanceof l?u:null}},"./node_modules/core-js/internals/object-is-prototype-of.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js");e.exports=r({}.isPrototypeOf)},"./node_modules/core-js/internals/object-keys-internal.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/has-own-property.js"),n=s("./node_modules/core-js/internals/to-indexed-object.js"),a=s("./node_modules/core-js/internals/array-includes.js").indexOf,i=s("./node_modules/core-js/internals/hidden-keys.js"),c=r([].push);e.exports=function(e,t){var s,r=n(e),l=0,u=[];for(s in r)!o(i,s)&&o(r,s)&&c(u,s);for(;t.length>l;)o(r,s=t[l++])&&(~a(u,s)||c(u,s));return u}},"./node_modules/core-js/internals/object-keys.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/object-keys-internal.js"),o=s("./node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(e){return r(e,o)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":(e,t)=>{"use strict";var s={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!s.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:s},"./node_modules/core-js/internals/ordinary-to-primitive.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/is-object.js"),a=TypeError;e.exports=function(e,t){var s,i;if("string"===t&&o(s=e.toString)&&!n(i=r(s,e)))return i;if(o(s=e.valueOf)&&!n(i=r(s,e)))return i;if("string"!==t&&o(s=e.toString)&&!n(i=r(s,e)))return i;throw new a("Can't convert object to primitive value")}},"./node_modules/core-js/internals/own-keys.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/get-built-in.js"),o=s("./node_modules/core-js/internals/function-uncurry-this.js"),n=s("./node_modules/core-js/internals/object-get-own-property-names.js"),a=s("./node_modules/core-js/internals/object-get-own-property-symbols.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=n.f(i(e)),s=a.f;return s?c(t,s(e)):t}},"./node_modules/core-js/internals/require-object-coercible.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-null-or-undefined.js"),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},"./node_modules/core-js/internals/set-clone.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/set-helpers.js"),o=s("./node_modules/core-js/internals/set-iterate.js"),n=r.Set,a=r.add;e.exports=function(e){var t=new n;return o(e,(function(e){a(t,e)})),t}},"./node_modules/core-js/internals/set-difference.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js"),n=s("./node_modules/core-js/internals/set-clone.js"),a=s("./node_modules/core-js/internals/set-size.js"),i=s("./node_modules/core-js/internals/get-set-record.js"),c=s("./node_modules/core-js/internals/set-iterate.js"),l=s("./node_modules/core-js/internals/iterate-simple.js"),u=o.has,d=o.remove;e.exports=function(e){var t=r(this),s=i(e),o=n(t);return a(t)<=s.size?c(t,(function(e){s.includes(e)&&d(o,e)})):l(s.getIterator(),(function(e){u(t,e)&&d(o,e)})),o}},"./node_modules/core-js/internals/set-helpers.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=Set.prototype;e.exports={Set,add:r(o.add),has:r(o.has),remove:r(o.delete),proto:o}},"./node_modules/core-js/internals/set-intersection.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js"),n=s("./node_modules/core-js/internals/set-size.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/set-iterate.js"),c=s("./node_modules/core-js/internals/iterate-simple.js"),l=o.Set,u=o.add,d=o.has;e.exports=function(e){var t=r(this),s=a(e),o=new l;return n(t)>s.size?c(s.getIterator(),(function(e){d(t,e)&&u(o,e)})):i(t,(function(e){s.includes(e)&&u(o,e)})),o}},"./node_modules/core-js/internals/set-is-disjoint-from.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js").has,n=s("./node_modules/core-js/internals/set-size.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/set-iterate.js"),c=s("./node_modules/core-js/internals/iterate-simple.js"),l=s("./node_modules/core-js/internals/iterator-close.js");e.exports=function(e){var t=r(this),s=a(e);if(n(t)<=s.size)return!1!==i(t,(function(e){if(s.includes(e))return!1}),!0);var u=s.getIterator();return!1!==c(u,(function(e){if(o(t,e))return l(u,"normal",!1)}))}},"./node_modules/core-js/internals/set-is-subset-of.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-size.js"),n=s("./node_modules/core-js/internals/set-iterate.js"),a=s("./node_modules/core-js/internals/get-set-record.js");e.exports=function(e){var t=r(this),s=a(e);return!(o(t)>s.size)&&!1!==n(t,(function(e){if(!s.includes(e))return!1}),!0)}},"./node_modules/core-js/internals/set-is-superset-of.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js").has,n=s("./node_modules/core-js/internals/set-size.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/iterate-simple.js"),c=s("./node_modules/core-js/internals/iterator-close.js");e.exports=function(e){var t=r(this),s=a(e);if(n(t)<s.size)return!1;var l=s.getIterator();return!1!==i(l,(function(e){if(!o(t,e))return c(l,"normal",!1)}))}},"./node_modules/core-js/internals/set-iterate.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/iterate-simple.js"),n=s("./node_modules/core-js/internals/set-helpers.js"),a=n.Set,i=n.proto,c=r(i.forEach),l=r(i.keys),u=l(new a).next;e.exports=function(e,t,s){return s?o({iterator:l(e),next:u},t):c(e,t)}},"./node_modules/core-js/internals/set-method-accept-set-like.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/get-built-in.js"),o=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},n=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var s=r("Set");try{(new s)[e](o(0));try{return(new s)[e](o(-1)),!1}catch(r){if(!t)return!0;try{return(new s)[e](n(-1/0)),!1}catch(r){var a=new s;return a.add(1),a.add(2),t(a[e](n(1/0)))}}}catch(e){return!1}}},"./node_modules/core-js/internals/set-size.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this-accessor.js"),o=s("./node_modules/core-js/internals/set-helpers.js");e.exports=r(o.proto,"size","get")||function(e){return e.size}},"./node_modules/core-js/internals/set-symmetric-difference.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js"),n=s("./node_modules/core-js/internals/set-clone.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/iterate-simple.js"),c=o.add,l=o.has,u=o.remove;e.exports=function(e){var t=r(this),s=a(e).getIterator(),o=n(t);return i(s,(function(e){l(t,e)?u(o,e):c(o,e)})),o}},"./node_modules/core-js/internals/set-union.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js").add,n=s("./node_modules/core-js/internals/set-clone.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/iterate-simple.js");e.exports=function(e){var t=r(this),s=a(e).getIterator(),c=n(t);return i(s,(function(e){o(c,e)})),c}},"./node_modules/core-js/internals/shared-key.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/shared.js"),o=s("./node_modules/core-js/internals/uid.js"),n=r("keys");e.exports=function(e){return n[e]||(n[e]=o(e))}},"./node_modules/core-js/internals/shared-store.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-pure.js"),o=s("./node_modules/core-js/internals/global-this.js"),n=s("./node_modules/core-js/internals/define-global-property.js"),a="__core-js_shared__",i=e.exports=o[a]||n(a,{});(i.versions||(i.versions=[])).push({version:"3.42.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"./node_modules/core-js/internals/shared.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/shared-store.js");e.exports=function(e,t){return r[e]||(r[e]=t||{})}},"./node_modules/core-js/internals/symbol-constructor-detection.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/environment-v8-version.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/global-this.js").String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"./node_modules/core-js/internals/to-absolute-index.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-integer-or-infinity.js"),o=Math.max,n=Math.min;e.exports=function(e,t){var s=r(e);return s<0?o(s+t,0):n(s,t)}},"./node_modules/core-js/internals/to-indexed-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/indexed-object.js"),o=s("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return r(o(e))}},"./node_modules/core-js/internals/to-integer-or-infinity.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/math-trunc.js");e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},"./node_modules/core-js/internals/to-length.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-integer-or-infinity.js"),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/require-object-coercible.js"),o=Object;e.exports=function(e){return o(r(e))}},"./node_modules/core-js/internals/to-primitive.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/is-object.js"),n=s("./node_modules/core-js/internals/is-symbol.js"),a=s("./node_modules/core-js/internals/get-method.js"),i=s("./node_modules/core-js/internals/ordinary-to-primitive.js"),c=s("./node_modules/core-js/internals/well-known-symbol.js"),l=TypeError,u=c("toPrimitive");e.exports=function(e,t){if(!o(e)||n(e))return e;var s,c=a(e,u);if(c){if(void 0===t&&(t="default"),s=r(c,e,t),!o(s)||n(s))return s;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),i(e,t)}},"./node_modules/core-js/internals/to-property-key.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-primitive.js"),o=s("./node_modules/core-js/internals/is-symbol.js");e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},"./node_modules/core-js/internals/to-string-tag-support.js":(e,t,s)=>{"use strict";var r={};r[s("./node_modules/core-js/internals/well-known-symbol.js")("toStringTag")]="z",e.exports="[object z]"===String(r)},"./node_modules/core-js/internals/try-to-string.js":e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},"./node_modules/core-js/internals/uid.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=0,n=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+n,36)}},"./node_modules/core-js/internals/use-symbol-as-uid.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/symbol-constructor-detection.js");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"./node_modules/core-js/internals/v8-prototype-define-bug.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/fails.js");e.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},"./node_modules/core-js/internals/weak-map-basic-detection.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=r.WeakMap;e.exports=o(n)&&/native code/.test(String(n))},"./node_modules/core-js/internals/well-known-symbol.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/shared.js"),n=s("./node_modules/core-js/internals/has-own-property.js"),a=s("./node_modules/core-js/internals/uid.js"),i=s("./node_modules/core-js/internals/symbol-constructor-detection.js"),c=s("./node_modules/core-js/internals/use-symbol-as-uid.js"),l=r.Symbol,u=o("wks"),d=c?l.for||l:l&&l.withoutSetter||a;e.exports=function(e){return n(u,e)||(u[e]=i&&n(l,e)?l[e]:d("Symbol."+e)),u[e]}},"./node_modules/core-js/modules/es.array.at.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/to-object.js"),n=s("./node_modules/core-js/internals/length-of-array-like.js"),a=s("./node_modules/core-js/internals/to-integer-or-infinity.js"),i=s("./node_modules/core-js/internals/add-to-unscopables.js");r({target:"Array",proto:!0},{at:function(e){var t=o(this),s=n(t),r=a(e),i=r>=0?r:s+r;return i<0||i>=s?void 0:t[i]}}),i("at")},"./node_modules/core-js/modules/es.array.push.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/to-object.js"),n=s("./node_modules/core-js/internals/length-of-array-like.js"),a=s("./node_modules/core-js/internals/array-set-length.js"),i=s("./node_modules/core-js/internals/does-not-exceed-safe-integer.js");r({target:"Array",proto:!0,arity:1,forced:s("./node_modules/core-js/internals/fails.js")((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=o(this),s=n(t),r=arguments.length;i(s+r);for(var c=0;c<r;c++)t[s]=arguments[c],s++;return a(t,s),s}})},"./node_modules/core-js/modules/es.iterator.constructor.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/global-this.js"),n=s("./node_modules/core-js/internals/an-instance.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/is-callable.js"),c=s("./node_modules/core-js/internals/object-get-prototype-of.js"),l=s("./node_modules/core-js/internals/define-built-in-accessor.js"),u=s("./node_modules/core-js/internals/create-property.js"),d=s("./node_modules/core-js/internals/fails.js"),p=s("./node_modules/core-js/internals/has-own-property.js"),m=s("./node_modules/core-js/internals/well-known-symbol.js"),f=s("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,h=s("./node_modules/core-js/internals/descriptors.js"),v=s("./node_modules/core-js/internals/is-pure.js"),y="constructor",j="Iterator",g=m("toStringTag"),b=TypeError,x=o[j],_=v||!i(x)||x.prototype!==f||!d((function(){x({})})),w=function(){if(n(this,f),c(this)===f)throw new b("Abstract class Iterator not directly constructable")},S=function(e,t){h?l(f,e,{configurable:!0,get:function(){return t},set:function(t){if(a(this),this===f)throw new b("You can't redefine this property");p(this,e)?this[e]=t:u(this,e,t)}}):f[e]=t};p(f,g)||S(g,j),!_&&p(f,y)&&f[y]!==Object||S(y,w),w.prototype=f,r({global:!0,constructor:!0,forced:_},{Iterator:w})},"./node_modules/core-js/modules/es.iterator.every.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/iterate.js"),a=s("./node_modules/core-js/internals/a-callable.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=s("./node_modules/core-js/internals/get-iterator-direct.js"),l=s("./node_modules/core-js/internals/iterator-close.js"),u=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js")("every",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{every:function(e){i(this);try{a(e)}catch(e){l(this,"throw",e)}if(u)return o(u,this,e);var t=c(this),s=0;return!n(t,(function(t,r){if(!e(t,s++))return r()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},"./node_modules/core-js/modules/es.iterator.filter.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/a-callable.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/get-iterator-direct.js"),c=s("./node_modules/core-js/internals/iterator-create-proxy.js"),l=s("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),u=s("./node_modules/core-js/internals/is-pure.js"),d=s("./node_modules/core-js/internals/iterator-close.js"),p=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js"),m=!u&&p("filter",TypeError),f=c((function(){for(var e,t,s=this.iterator,r=this.predicate,n=this.next;;){if(e=a(o(n,s)),this.done=!!e.done)return;if(t=e.value,l(s,r,[t,this.counter++],!0))return t}}));r({target:"Iterator",proto:!0,real:!0,forced:u||m},{filter:function(e){a(this);try{n(e)}catch(e){d(this,"throw",e)}return m?o(m,this,e):new f(i(this),{predicate:e})}})},"./node_modules/core-js/modules/es.iterator.find.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/iterate.js"),a=s("./node_modules/core-js/internals/a-callable.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=s("./node_modules/core-js/internals/get-iterator-direct.js"),l=s("./node_modules/core-js/internals/iterator-close.js"),u=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js")("find",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{find:function(e){i(this);try{a(e)}catch(e){l(this,"throw",e)}if(u)return o(u,this,e);var t=c(this),s=0;return n(t,(function(t,r){if(e(t,s++))return r(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},"./node_modules/core-js/modules/es.iterator.for-each.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/iterate.js"),a=s("./node_modules/core-js/internals/a-callable.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=s("./node_modules/core-js/internals/get-iterator-direct.js"),l=s("./node_modules/core-js/internals/iterator-close.js"),u=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js")("forEach",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{forEach:function(e){i(this);try{a(e)}catch(e){l(this,"throw",e)}if(u)return o(u,this,e);var t=c(this),s=0;n(t,(function(t){e(t,s++)}),{IS_RECORD:!0})}})},"./node_modules/core-js/modules/es.iterator.map.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/a-callable.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/get-iterator-direct.js"),c=s("./node_modules/core-js/internals/iterator-create-proxy.js"),l=s("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),u=s("./node_modules/core-js/internals/iterator-close.js"),d=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js"),p=s("./node_modules/core-js/internals/is-pure.js"),m=!p&&d("map",TypeError),f=c((function(){var e=this.iterator,t=a(o(this.next,e));if(!(this.done=!!t.done))return l(e,this.mapper,[t.value,this.counter++],!0)}));r({target:"Iterator",proto:!0,real:!0,forced:p||m},{map:function(e){a(this);try{n(e)}catch(e){u(this,"throw",e)}return m?o(m,this,e):new f(i(this),{mapper:e})}})},"./node_modules/core-js/modules/es.iterator.reduce.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/iterate.js"),n=s("./node_modules/core-js/internals/a-callable.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/get-iterator-direct.js"),c=s("./node_modules/core-js/internals/iterator-close.js"),l=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js"),u=s("./node_modules/core-js/internals/function-apply.js"),d=s("./node_modules/core-js/internals/fails.js"),p=TypeError,m=d((function(){[].keys().reduce((function(){}),void 0)})),f=!m&&l("reduce",p);r({target:"Iterator",proto:!0,real:!0,forced:m||f},{reduce:function(e){a(this);try{n(e)}catch(e){c(this,"throw",e)}var t=arguments.length<2,s=t?void 0:arguments[1];if(f)return u(f,this,t?[e]:[e,s]);var r=i(this),l=0;if(o(r,(function(r){t?(t=!1,s=r):s=e(s,r,l),l++}),{IS_RECORD:!0}),t)throw new p("Reduce of empty iterator with no initial value");return s}})},"./node_modules/core-js/modules/es.iterator.some.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/iterate.js"),a=s("./node_modules/core-js/internals/a-callable.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=s("./node_modules/core-js/internals/get-iterator-direct.js"),l=s("./node_modules/core-js/internals/iterator-close.js"),u=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js")("some",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{some:function(e){i(this);try{a(e)}catch(e){l(this,"throw",e)}if(u)return o(u,this,e);var t=c(this),s=0;return n(t,(function(t,r){if(e(t,s++))return r()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},"./node_modules/core-js/modules/es.set.difference.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-difference.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("difference",(function(e){return 0===e.size}))},{difference:o})},"./node_modules/core-js/modules/es.set.intersection.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/set-intersection.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("intersection",(function(e){return 2===e.size&&e.has(1)&&e.has(2)}))||o((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:n})},"./node_modules/core-js/modules/es.set.is-disjoint-from.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-is-disjoint-from.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("isDisjointFrom",(function(e){return!e}))},{isDisjointFrom:o})},"./node_modules/core-js/modules/es.set.is-subset-of.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-is-subset-of.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("isSubsetOf",(function(e){return e}))},{isSubsetOf:o})},"./node_modules/core-js/modules/es.set.is-superset-of.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-is-superset-of.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("isSupersetOf",(function(e){return!e}))},{isSupersetOf:o})},"./node_modules/core-js/modules/es.set.symmetric-difference.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-symmetric-difference.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("symmetricDifference")},{symmetricDifference:o})},"./node_modules/core-js/modules/es.set.union.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-union.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("union")},{union:o})},"./node_modules/core-js/modules/esnext.iterator.constructor.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.constructor.js")},"./node_modules/core-js/modules/esnext.iterator.every.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.every.js")},"./node_modules/core-js/modules/esnext.iterator.filter.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.filter.js")},"./node_modules/core-js/modules/esnext.iterator.find.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.find.js")},"./node_modules/core-js/modules/esnext.iterator.for-each.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.for-each.js")},"./node_modules/core-js/modules/esnext.iterator.map.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.map.js")},"./node_modules/core-js/modules/esnext.iterator.reduce.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.reduce.js")},"./node_modules/core-js/modules/esnext.iterator.some.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.some.js")},"./node_modules/core-js/modules/esnext.set.difference.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.difference.v2.js")},"./node_modules/core-js/modules/esnext.set.intersection.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.intersection.v2.js")},"./node_modules/core-js/modules/esnext.set.is-disjoint-from.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.is-disjoint-from.v2.js")},"./node_modules/core-js/modules/esnext.set.is-subset-of.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.is-subset-of.v2.js")},"./node_modules/core-js/modules/esnext.set.is-superset-of.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.is-superset-of.v2.js")},"./node_modules/core-js/modules/esnext.set.symmetric-difference.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.symmetric-difference.v2.js")},"./node_modules/core-js/modules/esnext.set.union.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.union.v2.js")},"./node_modules/focus-trap/dist/focus-trap.esm.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createFocusTrap:()=>h});var r=s("./node_modules/tabbable/dist/index.esm.js");function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=Array(t);s<t;s++)r[s]=e[s];return r}function n(e,t,s){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var s=t.call(e,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function a(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function i(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?a(Object(s),!0).forEach((function(t){n(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):a(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var c=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},l=function(e){return c(e)&&!e.shiftKey},u=function(e){return c(e)&&e.shiftKey},d=function(e){return setTimeout(e,0)},p=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),r=1;r<t;r++)s[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,s):e},m=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},f=[],h=function(e,t){var s,n=(null==t?void 0:t.document)||document,a=(null==t?void 0:t.trapStack)||f,h=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:l,isKeyBackward:u},t),v={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},y=function(e,t,s){return e&&void 0!==e[t]?e[t]:h[s||t]},j=function(e,t){var s="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return v.containerGroups.findIndex((function(t){var r=t.container,o=t.tabbableNodes;return r.contains(e)||(null==s?void 0:s.includes(r))||o.find((function(t){return t===e}))}))},g=function(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=s.hasFallback,a=void 0!==r&&r,i=s.params,c=void 0===i?[]:i,l=h[e];if("function"==typeof l&&(l=l.apply(void 0,function(e){if(Array.isArray(e))return o(e)}(t=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?o(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),!0===l&&(l=void 0),!l){if(void 0===l||!1===l)return l;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var u=l;if("string"==typeof l){try{u=n.querySelector(l)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!u&&!a)throw new Error("`".concat(e,"` as selector refers to no known node"))}return u},b=function(){var e=g("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!(0,r.isFocusable)(e,h.tabbableOptions))if(j(n.activeElement)>=0)e=n.activeElement;else{var t=v.tabbableGroups[0];e=t&&t.firstTabbableNode||g("fallbackFocus")}else null===e&&(e=g("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},x=function(){if(v.containerGroups=v.containers.map((function(e){var t=(0,r.tabbable)(e,h.tabbableOptions),s=(0,r.focusable)(e,h.tabbableOptions),o=t.length>0?t[0]:void 0,n=t.length>0?t[t.length-1]:void 0,a=s.find((function(e){return(0,r.isTabbable)(e)})),i=s.slice().reverse().find((function(e){return(0,r.isTabbable)(e)})),c=!!t.find((function(e){return(0,r.getTabIndex)(e)>0}));return{container:e,tabbableNodes:t,focusableNodes:s,posTabIndexesFound:c,firstTabbableNode:o,lastTabbableNode:n,firstDomTabbableNode:a,lastDomTabbableNode:i,nextTabbableNode:function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.indexOf(e);return n<0?o?s.slice(s.indexOf(e)+1).find((function(e){return(0,r.isTabbable)(e)})):s.slice(0,s.indexOf(e)).reverse().find((function(e){return(0,r.isTabbable)(e)})):t[n+(o?1:-1)]}}})),v.tabbableGroups=v.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),v.tabbableGroups.length<=0&&!g("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(v.containerGroups.find((function(e){return e.posTabIndexesFound}))&&v.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},_=function(e){var t=e.activeElement;if(t)return t.shadowRoot&&null!==t.shadowRoot.activeElement?_(t.shadowRoot):t},w=function(e){!1!==e&&e!==_(document)&&(e&&e.focus?(e.focus({preventScroll:!!h.preventScroll}),v.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(b()))},S=function(e){var t=g("setReturnFocus",{params:[e]});return t||!1!==t&&e},k=function(e){var t=e.target,s=e.event,o=e.isBackward,n=void 0!==o&&o;t=t||m(s),x();var a=null;if(v.tabbableGroups.length>0){var i=j(t,s),l=i>=0?v.containerGroups[i]:void 0;if(i<0)a=n?v.tabbableGroups[v.tabbableGroups.length-1].lastTabbableNode:v.tabbableGroups[0].firstTabbableNode;else if(n){var u=v.tabbableGroups.findIndex((function(e){var s=e.firstTabbableNode;return t===s}));if(u<0&&(l.container===t||(0,r.isFocusable)(t,h.tabbableOptions)&&!(0,r.isTabbable)(t,h.tabbableOptions)&&!l.nextTabbableNode(t,!1))&&(u=i),u>=0){var d=0===u?v.tabbableGroups.length-1:u-1,p=v.tabbableGroups[d];a=(0,r.getTabIndex)(t)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else c(s)||(a=l.nextTabbableNode(t,!1))}else{var f=v.tabbableGroups.findIndex((function(e){var s=e.lastTabbableNode;return t===s}));if(f<0&&(l.container===t||(0,r.isFocusable)(t,h.tabbableOptions)&&!(0,r.isTabbable)(t,h.tabbableOptions)&&!l.nextTabbableNode(t))&&(f=i),f>=0){var y=f===v.tabbableGroups.length-1?0:f+1,b=v.tabbableGroups[y];a=(0,r.getTabIndex)(t)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else c(s)||(a=l.nextTabbableNode(t))}}else a=g("fallbackFocus");return a},C=function(e){var t=m(e);j(t,e)>=0||(p(h.clickOutsideDeactivates,e)?s.deactivate({returnFocus:h.returnFocusOnDeactivate}):p(h.allowOutsideClick,e)||e.preventDefault())},E=function(e){var t=m(e),s=j(t,e)>=0;if(s||t instanceof Document)s&&(v.mostRecentlyFocusedNode=t);else{var o;e.stopImmediatePropagation();var n=!0;if(v.mostRecentlyFocusedNode)if((0,r.getTabIndex)(v.mostRecentlyFocusedNode)>0){var a=j(v.mostRecentlyFocusedNode),i=v.containerGroups[a].tabbableNodes;if(i.length>0){var c=i.findIndex((function(e){return e===v.mostRecentlyFocusedNode}));c>=0&&(h.isKeyForward(v.recentNavEvent)?c+1<i.length&&(o=i[c+1],n=!1):c-1>=0&&(o=i[c-1],n=!1))}}else v.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return(0,r.getTabIndex)(e)>0}))}))||(n=!1);else n=!1;n&&(o=k({target:v.mostRecentlyFocusedNode,isBackward:h.isKeyBackward(v.recentNavEvent)})),w(o||v.mostRecentlyFocusedNode||b())}v.recentNavEvent=void 0},T=function(e){(h.isKeyForward(e)||h.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];v.recentNavEvent=e;var s=k({event:e,isBackward:t});s&&(c(e)&&e.preventDefault(),w(s))}(e,h.isKeyBackward(e))},N=function(e){var t;"Escape"!==(null==(t=e)?void 0:t.key)&&"Esc"!==(null==t?void 0:t.key)&&27!==(null==t?void 0:t.keyCode)||!1===p(h.escapeDeactivates,e)||(e.preventDefault(),s.deactivate())},I=function(e){var t=m(e);j(t,e)>=0||p(h.clickOutsideDeactivates,e)||p(h.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},O=function(){if(v.active)return function(e,t){if(e.length>0){var s=e[e.length-1];s!==t&&s._setPausedState(!0)}var r=e.indexOf(t);-1===r||e.splice(r,1),e.push(t)}(a,s),v.delayInitialFocusTimer=h.delayInitialFocus?d((function(){w(b())})):w(b()),n.addEventListener("focusin",E,!0),n.addEventListener("mousedown",C,{capture:!0,passive:!1}),n.addEventListener("touchstart",C,{capture:!0,passive:!1}),n.addEventListener("click",I,{capture:!0,passive:!1}),n.addEventListener("keydown",T,{capture:!0,passive:!1}),n.addEventListener("keydown",N),s},A=function(){if(v.active)return n.removeEventListener("focusin",E,!0),n.removeEventListener("mousedown",C,!0),n.removeEventListener("touchstart",C,!0),n.removeEventListener("click",I,!0),n.removeEventListener("keydown",T,!0),n.removeEventListener("keydown",N),s},P="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===v.mostRecentlyFocusedNode}))}))&&w(b())})):void 0,L=function(){P&&(P.disconnect(),v.active&&!v.paused&&v.containers.map((function(e){P.observe(e,{subtree:!0,childList:!0})})))};return s={get active(){return v.active},get paused(){return v.paused},activate:function(e){if(v.active)return this;var t=y(e,"onActivate"),s=y(e,"onPostActivate"),r=y(e,"checkCanFocusTrap");r||x(),v.active=!0,v.paused=!1,v.nodeFocusedBeforeActivation=n.activeElement,null==t||t();var o=function(){r&&x(),O(),L(),null==s||s()};return r?(r(v.containers.concat()).then(o,o),this):(o(),this)},deactivate:function(e){if(!v.active)return this;var t=i({onDeactivate:h.onDeactivate,onPostDeactivate:h.onPostDeactivate,checkCanReturnFocus:h.checkCanReturnFocus},e);clearTimeout(v.delayInitialFocusTimer),v.delayInitialFocusTimer=void 0,A(),v.active=!1,v.paused=!1,L(),function(e,t){var s=e.indexOf(t);-1!==s&&e.splice(s,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}(a,s);var r=y(t,"onDeactivate"),o=y(t,"onPostDeactivate"),n=y(t,"checkCanReturnFocus"),c=y(t,"returnFocus","returnFocusOnDeactivate");null==r||r();var l=function(){d((function(){c&&w(S(v.nodeFocusedBeforeActivation)),null==o||o()}))};return c&&n?(n(S(v.nodeFocusedBeforeActivation)).then(l,l),this):(l(),this)},pause:function(e){return v.active?(v.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return v.active?(v.manuallyPaused=!1,a[a.length-1]!==this?this:this._setPausedState(!1,e)):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return v.containers=t.map((function(e){return"string"==typeof e?n.querySelector(e):e})),v.active&&x(),L(),this}},Object.defineProperties(s,{_isManuallyPaused:{value:function(){return v.manuallyPaused}},_setPausedState:{value:function(e,t){if(v.paused===e)return this;if(v.paused=e,e){var s=y(t,"onPause"),r=y(t,"onPostPause");null==s||s(),A(),L(),null==r||r()}else{var o=y(t,"onUnpause"),n=y(t,"onPostUnpause");null==o||o(),x(),O(),L(),null==n||n()}return this}}}),s.updateContainerElements(e),s}},"./node_modules/immer/dist/immer.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Immer:()=>q,applyPatches:()=>re,castDraft:()=>ae,castImmutable:()=>ie,createDraft:()=>oe,current:()=>K,enableMapSet:()=>X,enablePatches:()=>Y,finishDraft:()=>ne,freeze:()=>w,immerable:()=>o,isDraft:()=>l,isDraftable:()=>u,nothing:()=>r,original:()=>m,produce:()=>Z,produceWithPatches:()=>ee,setAutoFreeze:()=>te,setUseStrictShallowCopy:()=>se});var r=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),n=Symbol.for("immer-state"),a=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}];function i(e,...t){{const s=a[e],r="function"==typeof s?s.apply(null,t):s;throw new Error(`[Immer] ${r}`)}}var c=Object.getPrototypeOf;function l(e){return!!e&&!!e[n]}function u(e){return!!e&&(p(e)||Array.isArray(e)||!!e[o]||!!e.constructor?.[o]||g(e)||b(e))}var d=Object.prototype.constructor.toString();function p(e){if(!e||"object"!=typeof e)return!1;const t=c(e);if(null===t)return!0;const s=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return s===Object||"function"==typeof s&&Function.toString.call(s)===d}function m(e){return l(e)||i(15,e),e[n].base_}function f(e,t){0===h(e)?Reflect.ownKeys(e).forEach((s=>{t(s,e[s],e)})):e.forEach(((s,r)=>t(r,s,e)))}function h(e){const t=e[n];return t?t.type_:Array.isArray(e)?1:g(e)?2:b(e)?3:0}function v(e,t){return 2===h(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function y(e,t){return 2===h(e)?e.get(t):e[t]}function j(e,t,s){const r=h(e);2===r?e.set(t,s):3===r?e.add(s):e[t]=s}function g(e){return e instanceof Map}function b(e){return e instanceof Set}function x(e){return e.copy_||e.base_}function _(e,t){if(g(e))return new Map(e);if(b(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=p(e);if(!0===t||"class_only"===t&&!s){const t=Object.getOwnPropertyDescriptors(e);delete t[n];let s=Reflect.ownKeys(t);for(let r=0;r<s.length;r++){const o=s[r],n=t[o];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(t[o]={configurable:!0,writable:!0,enumerable:n.enumerable,value:e[o]})}return Object.create(c(e),t)}{const t=c(e);if(null!==t&&s)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function w(e,t=!1){return k(e)||l(e)||!u(e)||(h(e)>1&&(e.set=e.add=e.clear=e.delete=S),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>w(t,!0)))),e}function S(){i(2)}function k(e){return Object.isFrozen(e)}var C,E={};function T(e){const t=E[e];return t||i(0,e),t}function N(e,t){E[e]||(E[e]=t)}function I(){return C}function O(e,t){t&&(T("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function A(e){P(e),e.drafts_.forEach(R),e.drafts_=null}function P(e){e===C&&(C=e.parent_)}function L(e){return C={drafts_:[],parent_:C,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function R(e){const t=e[n];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function M(e,t){t.unfinalizedDrafts_=t.drafts_.length;const s=t.drafts_[0];return void 0!==e&&e!==s?(s[n].modified_&&(A(t),i(4)),u(e)&&(e=D(t,e),t.parent_||U(t,e)),t.patches_&&T("Patches").generateReplacementPatches_(s[n].base_,e,t.patches_,t.inversePatches_)):e=D(t,s,[]),A(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r?e:void 0}function D(e,t,s){if(k(t))return t;const r=t[n];if(!r)return f(t,((o,n)=>F(e,r,t,o,n,s))),t;if(r.scope_!==e)return t;if(!r.modified_)return U(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,n=!1;3===r.type_&&(o=new Set(t),t.clear(),n=!0),f(o,((o,a)=>F(e,r,t,o,a,s,n))),U(e,t,!1),s&&e.patches_&&T("Patches").generatePatches_(r,s,e.patches_,e.inversePatches_)}return r.copy_}function F(e,t,s,r,o,n,a){if(o===s&&i(5),l(o)){const a=D(e,o,n&&t&&3!==t.type_&&!v(t.assigned_,r)?n.concat(r):void 0);if(j(s,r,a),!l(a))return;e.canAutoFreeze_=!1}else a&&s.add(o);if(u(o)&&!k(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;D(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(s,r)||U(e,o)}}function U(e,t,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&w(t,s)}var z={get(e,t){if(t===n)return e;const s=x(e);if(!v(s,t))return function(e,t,s){const r=$(t,s);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,s,t);const r=s[t];return e.finalized_||!u(r)?r:r===V(e.base_,t)?(G(e),e.copy_[t]=W(r,e)):r},has:(e,t)=>t in x(e),ownKeys:e=>Reflect.ownKeys(x(e)),set(e,t,s){const r=$(x(e),t);if(r?.set)return r.set.call(e.draft_,s),!0;if(!e.modified_){const r=V(x(e),t),i=r?.[n];if(i&&i.base_===s)return e.copy_[t]=s,e.assigned_[t]=!1,!0;if(((o=s)===(a=r)?0!==o||1/o==1/a:o!=o&&a!=a)&&(void 0!==s||v(e.base_,t)))return!0;G(e),H(e)}var o,a;return e.copy_[t]===s&&(void 0!==s||t in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=s,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==V(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,G(e),H(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const s=x(e),r=Reflect.getOwnPropertyDescriptor(s,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:s[t]}:r},defineProperty(){i(11)},getPrototypeOf:e=>c(e.base_),setPrototypeOf(){i(12)}},B={};function V(e,t){const s=e[n];return(s?x(s):e)[t]}function $(e,t){if(!(t in e))return;let s=c(e);for(;s;){const e=Object.getOwnPropertyDescriptor(s,t);if(e)return e;s=c(s)}}function H(e){e.modified_||(e.modified_=!0,e.parent_&&H(e.parent_))}function G(e){e.copy_||(e.copy_=_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}f(z,((e,t)=>{B[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),B.deleteProperty=function(e,t){return isNaN(parseInt(t))&&i(13),B.set.call(this,e,t,void 0)},B.set=function(e,t,s){return"length"!==t&&isNaN(parseInt(t))&&i(14),z.set.call(this,e[0],t,s,e[0])};var q=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,s)=>{if("function"==typeof e&&"function"!=typeof t){const s=t;t=e;const r=this;return function(e=s,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let o;if("function"!=typeof t&&i(6),void 0!==s&&"function"!=typeof s&&i(7),u(e)){const r=L(this),n=W(e,void 0);let a=!0;try{o=t(n),a=!1}finally{a?A(r):P(r)}return O(r,s),M(o,r)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===r&&(o=void 0),this.autoFreeze_&&w(o,!0),s){const t=[],r=[];T("Patches").generateReplacementPatches_(e,o,t,r),s(t,r)}return o}i(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...s)=>this.produceWithPatches(t,(t=>e(t,...s)));let s,r;return[this.produce(e,t,((e,t)=>{s=e,r=t})),s,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){u(e)||i(8),l(e)&&(e=K(e));const t=L(this),s=W(e,void 0);return s[n].isManual_=!0,P(t),s}finishDraft(e,t){const s=e&&e[n];s&&s.isManual_||i(9);const{scope_:r}=s;return O(r,t),M(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let s;for(s=t.length-1;s>=0;s--){const r=t[s];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}s>-1&&(t=t.slice(s+1));const r=T("Patches").applyPatches_;return l(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function W(e,t){const s=g(e)?T("MapSet").proxyMap_(e,t):b(e)?T("MapSet").proxySet_(e,t):function(e,t){const s=Array.isArray(e),r={type_:s?1:0,scope_:t?t.scope_:I(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,n=z;s&&(o=[r],n=B);const{revoke:a,proxy:i}=Proxy.revocable(o,n);return r.draft_=i,r.revoke_=a,i}(e,t);return(t?t.scope_:I()).drafts_.push(s),s}function K(e){return l(e)||i(10,e),J(e)}function J(e){if(!u(e)||k(e))return e;const t=e[n];let s;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,s=_(e,t.scope_.immer_.useStrictShallowCopy_)}else s=_(e,!0);return f(s,((e,t)=>{j(s,e,J(t))})),t&&(t.finalized_=!1),s}function Y(){a.push('Sets cannot have "replace" patches.',(function(e){return"Unsupported patch operation: "+e}),(function(e){return"Cannot apply patch, path doesn't resolve: "+e}),"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const e="replace",t="add",s="remove";function n(e){if(!u(e))return e;if(Array.isArray(e))return e.map(n);if(g(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,n(t)])));if(b(e))return new Set(Array.from(e).map(n));const t=Object.create(c(e));for(const s in e)t[s]=n(e[s]);return v(e,o)&&(t[o]=e[o]),t}function d(e){return l(e)?n(e):e}N("Patches",{applyPatches_:function(r,o){return o.forEach((o=>{const{path:a,op:c}=o;let l=r;for(let e=0;e<a.length-1;e++){const t=h(l);let s=a[e];"string"!=typeof s&&"number"!=typeof s&&(s=""+s),0!==t&&1!==t||"__proto__"!==s&&"constructor"!==s||i(19),"function"==typeof l&&"prototype"===s&&i(19),l=y(l,s),"object"!=typeof l&&i(18,a.join("/"))}const u=h(l),d=n(o.value),p=a[a.length-1];switch(c){case e:switch(u){case 2:return l.set(p,d);case 3:i(16);default:return l[p]=d}case t:switch(u){case 1:return"-"===p?l.push(d):l.splice(p,0,d);case 2:return l.set(p,d);case 3:return l.add(d);default:return l[p]=d}case s:switch(u){case 1:return l.splice(p,1);case 2:return l.delete(p);case 3:return l.delete(o.value);default:return delete l[p]}default:i(17,c)}})),r},generatePatches_:function(r,o,n,a){switch(r.type_){case 0:case 2:return function(r,o,n,a){const{base_:i,copy_:c}=r;f(r.assigned_,((r,l)=>{const u=y(i,r),p=y(c,r),m=l?v(i,r)?e:t:s;if(u===p&&m===e)return;const f=o.concat(r);n.push(m===s?{op:m,path:f}:{op:m,path:f,value:p}),a.push(m===t?{op:s,path:f}:m===s?{op:t,path:f,value:d(u)}:{op:e,path:f,value:d(u)})}))}(r,o,n,a);case 1:return function(r,o,n,a){let{base_:i,assigned_:c}=r,l=r.copy_;l.length<i.length&&([i,l]=[l,i],[n,a]=[a,n]);for(let t=0;t<i.length;t++)if(c[t]&&l[t]!==i[t]){const s=o.concat([t]);n.push({op:e,path:s,value:d(l[t])}),a.push({op:e,path:s,value:d(i[t])})}for(let e=i.length;e<l.length;e++){const s=o.concat([e]);n.push({op:t,path:s,value:d(l[e])})}for(let e=l.length-1;i.length<=e;--e){const t=o.concat([e]);a.push({op:s,path:t})}}(r,o,n,a);case 3:return function(e,r,o,n){let{base_:a,copy_:i}=e,c=0;a.forEach((e=>{if(!i.has(e)){const a=r.concat([c]);o.push({op:s,path:a,value:e}),n.unshift({op:t,path:a,value:e})}c++})),c=0,i.forEach((e=>{if(!a.has(e)){const a=r.concat([c]);o.push({op:t,path:a,value:e}),n.unshift({op:s,path:a,value:e})}c++}))}(r,o,n,a)}},generateReplacementPatches_:function(t,s,o,n){o.push({op:e,path:[],value:s===r?void 0:s}),n.push({op:e,path:[],value:t})}})}function X(){class e extends Map{constructor(e,t){super(),this[n]={type_:2,parent_:t,scope_:t?t.scope_:I(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:e,draft_:this,isManual_:!1,revoked_:!1}}get size(){return x(this[n]).size}has(e){return x(this[n]).has(e)}set(e,s){const r=this[n];return o(r),x(r).has(e)&&x(r).get(e)===s||(t(r),H(r),r.assigned_.set(e,!0),r.copy_.set(e,s),r.assigned_.set(e,!0)),this}delete(e){if(!this.has(e))return!1;const s=this[n];return o(s),t(s),H(s),s.base_.has(e)?s.assigned_.set(e,!1):s.assigned_.delete(e),s.copy_.delete(e),!0}clear(){const e=this[n];o(e),x(e).size&&(t(e),H(e),e.assigned_=new Map,f(e.base_,(t=>{e.assigned_.set(t,!1)})),e.copy_.clear())}forEach(e,t){x(this[n]).forEach(((s,r,o)=>{e.call(t,this.get(r),r,this)}))}get(e){const s=this[n];o(s);const r=x(s).get(e);if(s.finalized_||!u(r))return r;if(r!==s.base_.get(e))return r;const a=W(r,s);return t(s),s.copy_.set(e,a),a}keys(){return x(this[n]).keys()}values(){const e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){const e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const t=e.next();if(t.done)return t;const s=this.get(t.value);return{done:!1,value:[t.value,s]}}}}[Symbol.iterator](){return this.entries()}}function t(e){e.copy_||(e.assigned_=new Map,e.copy_=new Map(e.base_))}class s extends Set{constructor(e,t){super(),this[n]={type_:3,parent_:t,scope_:t?t.scope_:I(),modified_:!1,finalized_:!1,copy_:void 0,base_:e,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return x(this[n]).size}has(e){const t=this[n];return o(t),t.copy_?!!t.copy_.has(e)||!(!t.drafts_.has(e)||!t.copy_.has(t.drafts_.get(e))):t.base_.has(e)}add(e){const t=this[n];return o(t),this.has(e)||(r(t),H(t),t.copy_.add(e)),this}delete(e){if(!this.has(e))return!1;const t=this[n];return o(t),r(t),H(t),t.copy_.delete(e)||!!t.drafts_.has(e)&&t.copy_.delete(t.drafts_.get(e))}clear(){const e=this[n];o(e),x(e).size&&(r(e),H(e),e.copy_.clear())}values(){const e=this[n];return o(e),r(e),e.copy_.values()}entries(){const e=this[n];return o(e),r(e),e.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(e,t){const s=this.values();let r=s.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=s.next()}}function r(e){e.copy_||(e.copy_=new Set,e.base_.forEach((t=>{if(u(t)){const s=W(t,e);e.drafts_.set(t,s),e.copy_.add(s)}else e.copy_.add(t)})))}function o(e){e.revoked_&&i(3,JSON.stringify(x(e)))}N("MapSet",{proxyMap_:function(t,s){return new e(t,s)},proxySet_:function(e,t){return new s(e,t)}})}var Q=new q,Z=Q.produce,ee=Q.produceWithPatches.bind(Q),te=Q.setAutoFreeze.bind(Q),se=Q.setUseStrictShallowCopy.bind(Q),re=Q.applyPatches.bind(Q),oe=Q.createDraft.bind(Q),ne=Q.finishDraft.bind(Q);function ae(e){return e}function ie(e){return e}},"./node_modules/js-cookie/dist/js.cookie.mjs":(e,t,s)=>{"use strict";function r(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)e[r]=s[r]}return e}s.r(t),s.d(t,{default:()=>o});var o=function e(t,s){function o(e,o,n){if("undefined"!=typeof document){"number"==typeof(n=r({},s,n)).expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var i in n)n[i]&&(a+="; "+i,!0!==n[i]&&(a+="="+n[i].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+a}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var s=document.cookie?document.cookie.split("; "):[],r={},o=0;o<s.length;o++){var n=s[o].split("="),a=n.slice(1).join("=");try{var i=decodeURIComponent(n[0]);if(r[i]=t.read(a,i),e===i)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){o(e,"",r({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,r({},this.attributes,t))},withConverter:function(t){return e(r({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},"./node_modules/minivents/dist/minivents.commonjs.min.js":e=>{e.exports=function(e){var t={},s=[];(e=e||this).on=function(s,r,o){return(t[s]=t[s]||[]).push([r,o]),e},e.off=function(r,o){r||(t={});for(var n=t[r]||s,a=n.length=o?n.length:0;a--;)o==n[a][0]&&n.splice(a,1);return e},e.emit=function(r){for(var o,n=t[r]||s,a=n.length>0?n.slice(0,n.length):n,i=0;o=a[i++];)o[0].apply(o[1],s.slice.call(arguments,1));return e}}},"./node_modules/preact/compat/dist/compat.module.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Children:()=>b,Component:()=>r.Component,Fragment:()=>r.Fragment,PureComponent:()=>f,StrictMode:()=>ie,Suspense:()=>k,SuspenseList:()=>T,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Y,cloneElement:()=>se,createContext:()=>r.createContext,createElement:()=>r.createElement,createFactory:()=>Q,createPortal:()=>A,createRef:()=>r.createRef,default:()=>le,findDOMNode:()=>oe,flushSync:()=>ae,forwardRef:()=>j,hydrate:()=>z,isElement:()=>ce,isFragment:()=>ee,isMemo:()=>te,isValidElement:()=>Z,lazy:()=>E,memo:()=>h,render:()=>U,startTransition:()=>u,unmountComponentAtNode:()=>re,unstable_batchedUpdates:()=>ne,useDeferredValue:()=>d,useInsertionEffect:()=>m,useSyncExternalStore:()=>c,useTransition:()=>p,version:()=>X});var r=s("preact"),o=s("preact/hooks"),n={};for(const e in o)["default","Component","Fragment","createContext","createElement","createRef","Children","PureComponent","StrictMode","Suspense","SuspenseList","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","createFactory","createPortal","findDOMNode","flushSync","forwardRef","hydrate","isElement","isFragment","isMemo","isValidElement","lazy","memo","render","startTransition","unmountComponentAtNode","unstable_batchedUpdates","useDeferredValue","useInsertionEffect","useSyncExternalStore","useTransition","version"].indexOf(e)<0&&(n[e]=()=>o[e]);function a(e,t){for(var s in t)e[s]=t[s];return e}function i(e,t){for(var s in e)if("__source"!==s&&!(s in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function c(e,t){var s=t(),r=(0,o.useState)({t:{__:s,u:t}}),n=r[0].t,a=r[1];return(0,o.useLayoutEffect)((function(){n.__=s,n.u=t,l(n)&&a({t:n})}),[e,s,t]),(0,o.useEffect)((function(){return l(n)&&a({t:n}),e((function(){l(n)&&a({t:n})}))}),[e]),s}function l(e){var t,s,r=e.u,o=e.__;try{var n=r();return!((t=o)===(s=n)&&(0!==t||1/t==1/s)||t!=t&&s!=s)}catch(e){return!0}}function u(e){e()}function d(e){return e}function p(){return[!1,u]}s.d(t,n);var m=o.useLayoutEffect;function f(e,t){this.props=e,this.context=t}function h(e,t){function s(e){var s=this.props.ref,r=s==e.ref;return!r&&s&&(s.call?s(null):s.current=null),t?!t(this.props,e)||!r:i(this.props,e)}function o(t){return this.shouldComponentUpdate=s,(0,r.createElement)(e,t)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(f.prototype=new r.Component).isPureReactComponent=!0,f.prototype.shouldComponentUpdate=function(e,t){return i(this.props,e)||i(this.state,t)};var v=r.options.__b;r.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),v&&v(e)};var y="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function j(e){function t(t){var s=a({},t);return delete s.ref,e(s,t.ref||null)}return t.$$typeof=y,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var g=function(e,t){return null==e?null:(0,r.toChildArray)((0,r.toChildArray)(e).map(t))},b={map:g,forEach:g,count:function(e){return e?(0,r.toChildArray)(e).length:0},only:function(e){var t=(0,r.toChildArray)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:r.toChildArray},x=r.options.__e;r.options.__e=function(e,t,s,r){if(e.then)for(var o,n=t;n=n.__;)if((o=n.__c)&&o.__c)return null==t.__e&&(t.__e=s.__e,t.__k=s.__k),o.__c(e,t);x(e,t,s,r)};var _=r.options.unmount;function w(e,t,s){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=a({},e)).__c&&(e.__c.__P===s&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return w(e,t,s)}))),e}function S(e,t,s){return e&&s&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return S(e,t,s)})),e.__c&&e.__c.__P===t&&(e.__e&&s.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=s)),e}function k(){this.__u=0,this.o=null,this.__b=null}function C(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function E(e){var t,s,o;function n(n){if(t||(t=e()).then((function(e){s=e.default||e}),(function(e){o=e})),o)throw o;if(!s)throw t;return(0,r.createElement)(s,n)}return n.displayName="Lazy",n.__f=!0,n}function T(){this.i=null,this.l=null}r.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),_&&_(e)},(k.prototype=new r.Component).__c=function(e,t){var s=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(s);var o=C(r.__v),n=!1,a=function(){n||(n=!0,s.__R=null,o?o(i):i())};s.__R=a;var i=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=S(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},k.prototype.componentWillUnmount=function(){this.o=[]},k.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var s=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=w(this.__b,s,o.__O=o.__P)}this.__b=null}var n=t.__a&&(0,r.createElement)(r.Fragment,null,e.fallback);return n&&(n.__u&=-33),[(0,r.createElement)(r.Fragment,null,t.__a?null:e.children),n]};var N=function(e,t,s){if(++s[1]===s[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(s=e.i;s;){for(;s.length>3;)s.pop()();if(s[1]<s[0])break;e.i=s=s[2]}};function I(e){return this.getChildContext=function(){return e.context},e.children}function O(e){var t=this,s=e.h;if(t.componentWillUnmount=function(){(0,r.render)(null,t.v),t.v=null,t.h=null},t.h&&t.h!==s&&t.componentWillUnmount(),!t.v){for(var o=t.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;t.h=s,t.v={nodeType:1,parentNode:s,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.h.appendChild(e)},insertBefore:function(e,s){this.childNodes.push(e),t.h.insertBefore(e,s)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}(0,r.render)((0,r.createElement)(I,{context:t.context},e.__v),t.v)}function A(e,t){var s=(0,r.createElement)(O,{__v:e,h:t});return s.containerInfo=t,s}(T.prototype=new r.Component).__a=function(e){var t=this,s=C(t.__v),r=t.l.get(e);return r[0]++,function(o){var n=function(){t.props.revealOrder?(r.push(o),N(t,e,r)):o()};s?s(n):n()}},T.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,r.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var s=t.length;s--;)this.l.set(t[s],this.i=[1,0,this.i]);return e.children},T.prototype.componentDidUpdate=T.prototype.componentDidMount=function(){var e=this;this.l.forEach((function(t,s){N(e,s,t)}))};var P="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,L=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,R=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,M=/[A-Z0-9]/g,D="undefined"!=typeof document,F=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function U(e,t,s){return null==t.__k&&(t.textContent=""),(0,r.render)(e,t),"function"==typeof s&&s(),e?e.__c:null}function z(e,t,s){return(0,r.hydrate)(e,t),"function"==typeof s&&s(),e?e.__c:null}r.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(r.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var B=r.options.event;function V(){}function $(){return this.cancelBubble}function H(){return this.defaultPrevented}r.options.event=function(e){return B&&(e=B(e)),e.persist=V,e.isPropagationStopped=$,e.isDefaultPrevented=H,e.nativeEvent=e};var G,q={enumerable:!1,configurable:!0,get:function(){return this.class}},W=r.options.vnode;r.options.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,s=e.type,o={},n=-1===s.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||D&&"children"===a&&"noscript"===s||"class"===a||"className"===a)){var c=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===c&&"no"===i?i=!1:"o"===c[0]&&"n"===c[1]?"ondoubleclick"===c?a="ondblclick":"onchange"!==c||"input"!==s&&"textarea"!==s||F(t.type)?"onfocus"===c?a="onfocusin":"onblur"===c?a="onfocusout":R.test(a)&&(a=c):c=a="oninput":n&&L.test(a)?a=a.replace(M,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===c&&o[a=c]&&(a="oninputCapture"),o[a]=i}}"select"==s&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,r.toChildArray)(t.children).forEach((function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)}))),"select"==s&&null!=o.defaultValue&&(o.value=(0,r.toChildArray)(t.children).forEach((function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",q)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=P,W&&W(e)};var K=r.options.__r;r.options.__r=function(e){K&&K(e),G=e.__c};var J=r.options.diffed;r.options.diffed=function(e){J&&J(e);var t=e.props,s=e.__e;null!=s&&"textarea"===e.type&&"value"in t&&t.value!==s.value&&(s.value=null==t.value?"":t.value),G=null};var Y={ReactCurrentDispatcher:{current:{readContext:function(e){return G.__n[e.__c].props.value},useCallback:o.useCallback,useContext:o.useContext,useDebugValue:o.useDebugValue,useDeferredValue:d,useEffect:o.useEffect,useId:o.useId,useImperativeHandle:o.useImperativeHandle,useInsertionEffect:m,useLayoutEffect:o.useLayoutEffect,useMemo:o.useMemo,useReducer:o.useReducer,useRef:o.useRef,useState:o.useState,useSyncExternalStore:c,useTransition:p}}},X="18.3.1";function Q(e){return r.createElement.bind(null,e)}function Z(e){return!!e&&e.$$typeof===P}function ee(e){return Z(e)&&e.type===r.Fragment}function te(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function se(e){return Z(e)?r.cloneElement.apply(null,arguments):e}function re(e){return!!e.__k&&((0,r.render)(null,e),!0)}function oe(e){return e&&(e.base||1===e.nodeType&&e)||null}var ne=function(e,t){return e(t)},ae=function(e,t){return e(t)},ie=r.Fragment,ce=Z,le={useState:o.useState,useId:o.useId,useReducer:o.useReducer,useEffect:o.useEffect,useLayoutEffect:o.useLayoutEffect,useInsertionEffect:m,useTransition:p,useDeferredValue:d,useSyncExternalStore:c,startTransition:u,useRef:o.useRef,useImperativeHandle:o.useImperativeHandle,useMemo:o.useMemo,useCallback:o.useCallback,useContext:o.useContext,useDebugValue:o.useDebugValue,version:"18.3.1",Children:b,render:U,hydrate:z,unmountComponentAtNode:re,createPortal:A,createElement:r.createElement,createContext:r.createContext,createFactory:Q,cloneElement:se,createRef:r.createRef,Fragment:r.Fragment,isValidElement:Z,isElement:ce,isFragment:ee,isMemo:te,findDOMNode:oe,Component:r.Component,PureComponent:f,memo:h,forwardRef:j,flushSync:ae,unstable_batchedUpdates:ne,StrictMode:ie,Suspense:k,SuspenseList:T,lazy:E,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Y}},"./node_modules/preact/compat/jsx-runtime.mjs":(e,t,s)=>{"use strict";s.r(t),s("preact/compat");var r=s("preact/jsx-runtime"),o={};for(const e in r)"default"!==e&&(o[e]=()=>r[e]);s.d(t,o)},"./node_modules/react-redux/dist/react-redux.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Provider:()=>le,ReactReduxContext:()=>re,batch:()=>ge,connect:()=>ce,createDispatchHook:()=>fe,createSelectorHook:()=>ye,createStoreHook:()=>pe,shallowEqual:()=>B,useDispatch:()=>he,useSelector:()=>je,useStore:()=>me});var r=s("./node_modules/preact/compat/dist/compat.module.js"),o=s("./node_modules/use-sync-external-store/with-selector.js"),n=r.version.startsWith("19"),a=Symbol.for(n?"react.transitional.element":"react.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),g=Symbol.for("react.client.reference"),b=m,x=v;function _(e){return"string"==typeof e||"function"==typeof e||e===c||e===u||e===l||e===f||e===h||e===j||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===p||e.$$typeof===d||e.$$typeof===m||e.$$typeof===g||void 0!==e.getModuleId)}function w(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case a:switch(e=e.type){case c:case u:case l:case f:case h:return e;default:switch(e=e&&e.$$typeof){case p:case m:case y:case v:case d:return e;default:return t}}case i:return t}}}function S(e){return n?w(e)===d:w(e)===p}function k(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function C(e,t){if(!e)throw new Error(`Unexpected value for ${t} in connect.`);"mapStateToProps"!==t&&"mapDispatchToProps"!==t||Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||k(`The selector for ${t} of connect did not specify a value for dependsOnOwnProps.`)}function E(e,t,s,r,{areStatesEqual:o,areOwnPropsEqual:n,areStatePropsEqual:a}){let i,c,l,u,d,p=!1;return function(m,f){return p?function(p,m){const f=!n(m,c),h=!o(p,i,m,c);return i=p,c=m,f&&h?(l=e(i,c),t.dependsOnOwnProps&&(u=t(r,c)),d=s(l,u,c),d):f?(e.dependsOnOwnProps&&(l=e(i,c)),t.dependsOnOwnProps&&(u=t(r,c)),d=s(l,u,c),d):h?function(){const t=e(i,c),r=!a(t,l);return l=t,r&&(d=s(l,u,c)),d}():d}(m,f):(i=m,c=f,l=e(i,c),u=t(r,c),d=s(l,u,c),p=!0,d)}}function T(e,t,s){(function(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;let s=t;for(;null!==Object.getPrototypeOf(s);)s=Object.getPrototypeOf(s);return t===s})(e)||k(`${s}() in ${t} must return a plain object. Instead received ${e}.`)}function N(e){return function(t){const s=e(t);function r(){return s}return r.dependsOnOwnProps=!1,r}}function I(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function O(e,t){return function(s,{displayName:r}){const o=function(e,t){return o.dependsOnOwnProps?o.mapToProps(e,t):o.mapToProps(e,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,n){o.mapToProps=e,o.dependsOnOwnProps=I(e);let a=o(s,n);return"function"==typeof a&&(o.mapToProps=a,o.dependsOnOwnProps=I(a),a=o(s,n)),T(a,r,t),a},o}}function A(e,t){return(s,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function P(e,t,s){return{...s,...e,...t}}function L(e){e()}var R={notify(){},get:()=>[]};function M(e,t){let s,r=R,o=0,n=!1;function a(){l.onStateChange&&l.onStateChange()}function i(){o++,s||(s=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){L((()=>{let t=e;for(;t;)t.callback(),t=t.next}))},get(){const t=[];let s=e;for(;s;)t.push(s),s=s.next;return t},subscribe(s){let r=!0;const o=t={callback:s,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function c(){o--,s&&0===o&&(s(),s=void 0,r.clear(),r=R)}const l={addNestedSub:function(e){i();const t=r.subscribe(e);let s=!1;return()=>{s||(s=!0,t(),c())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return n},trySubscribe:function(){n||(n=!0,i())},tryUnsubscribe:function(){n&&(n=!1,c())},getListeners:()=>r};return l}var D=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),F=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),U=(()=>D||F?r.useLayoutEffect:r.useEffect)();function z(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function B(e,t){if(z(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const s=Object.keys(e),r=Object.keys(t);if(s.length!==r.length)return!1;for(let r=0;r<s.length;r++)if(!Object.prototype.hasOwnProperty.call(t,s[r])||!z(e[s[r]],t[s[r]]))return!1;return!0}var V={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},H={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},G={[b]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[x]:H};function q(e){return w(e)===v?H:G[e.$$typeof]||V}var W=Object.defineProperty,K=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,X=Object.getPrototypeOf,Q=Object.prototype;function Z(e,t){if("string"!=typeof t){if(Q){const s=X(t);s&&s!==Q&&Z(e,s)}let s=K(t);J&&(s=s.concat(J(t)));const r=q(e),o=q(t);for(let n=0;n<s.length;++n){const a=s[n];if(!($[a]||o&&o[a]||r&&r[a])){const s=Y(t,a);try{W(e,a,s)}catch(e){}}}}return e}var ee=Symbol.for("react-redux-context"),te="undefined"!=typeof globalThis?globalThis:{};function se(){if(!r.createContext)return{};const e=te[ee]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),t.displayName="ReactRedux",e.set(r.createContext,t)),t}var re=se(),oe=[null,null];function ne(e,t,s,r,o,n){e.current=r,s.current=!1,o.current&&(o.current=null,n())}function ae(e,t){return e===t}var ie=!1,ce=function(e,t,s,{pure:o,areStatesEqual:n=ae,areOwnPropsEqual:a=B,areStatePropsEqual:i=B,areMergedPropsEqual:c=B,forwardRef:l=!1,context:u=re}={}){void 0===o||ie||(ie=!0,k('The `pure` option has been removed. `connect` is now always a "pure/memoized" component'));const d=u,p=function(e){return e?"function"==typeof e?O(e,"mapStateToProps"):A(e,"mapStateToProps"):N((()=>({})))}(e),m=function(e){return e&&"object"==typeof e?N((t=>function(e,t){const s={};for(const r in e){const o=e[r];"function"==typeof o&&(s[r]=(...e)=>t(o(...e)))}return s}(e,t))):e?"function"==typeof e?O(e,"mapDispatchToProps"):A(e,"mapDispatchToProps"):N((e=>({dispatch:e})))}(t),f=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:s,areMergedPropsEqual:r}){let o,n=!1;return function(t,a,i){const c=e(t,a,i);return n?r(c,o)||(o=c):(n=!0,o=c,T(o,s,"mergeProps")),o}}}(e):A(e,"mergeProps"):()=>P}(s),h=Boolean(e);return e=>{if(!_(e))throw new Error(`You must pass a component to the function returned by connect. Instead received ${(e=>{try{return JSON.stringify(e)}catch(t){return String(e)}})(e)}`);const t=e.displayName||e.name||"Component",s=`Connect(${t})`,o={shouldHandleStateChanges:h,displayName:s,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:m,initMergeProps:f,areStatesEqual:n,areStatePropsEqual:i,areOwnPropsEqual:a,areMergedPropsEqual:c};function u(t){const[n,a,i]=r.useMemo((()=>{const{reactReduxForwardedRef:e,...s}=t;return[t.context,e,s]}),[t]),c=r.useMemo((()=>{let e=d;if(n?.Consumer){if(!S(r.createElement(n.Consumer,null)))throw new Error("You must pass a valid React context consumer as `props.context`");e=n}return e}),[n,d]),l=r.useContext(c),u=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),p=Boolean(l)&&Boolean(l.store);if(!u&&!p)throw new Error(`Could not find "store" in the context of "${s}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${s} in connect options.`);const m=u?t.store:l.store,f=p?l.getServerState:m.getState,v=r.useMemo((()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:s,initMergeProps:r,...o}){const n=t(e,o),a=s(e,o),i=r(e,o);return function(e,t,s){C(e,"mapStateToProps"),C(t,"mapDispatchToProps"),C(s,"mergeProps")}(n,a,i),E(n,a,i,e,o)}(m.dispatch,o)),[m]),[y,j]=r.useMemo((()=>{if(!h)return oe;const e=M(m,u?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[m,u,l]),g=r.useMemo((()=>u?l:{...l,subscription:y}),[u,l,y]),b=r.useRef(void 0),x=r.useRef(i),_=r.useRef(void 0),w=r.useRef(!1),k=r.useRef(!1),T=r.useRef(void 0);U((()=>(k.current=!0,()=>{k.current=!1})),[]);const N=r.useMemo((()=>()=>_.current&&i===x.current?_.current:v(m.getState(),i)),[m,i]),I=r.useMemo((()=>e=>y?function(e,t,s,r,o,n,a,i,c,l,u){if(!e)return()=>{};let d=!1,p=null;const m=()=>{if(d||!i.current)return;const e=t.getState();let s,m;try{s=r(e,o.current)}catch(e){m=e,p=e}m||(p=null),s===n.current?a.current||l():(n.current=s,c.current=s,a.current=!0,u())};return s.onStateChange=m,s.trySubscribe(),m(),()=>{if(d=!0,s.tryUnsubscribe(),s.onStateChange=null,p)throw p}}(h,m,y,v,x,b,w,k,_,j,e):()=>{}),[y]);var O,A;let P;O=ne,A=[x,b,w,i,_,j],U((()=>O(...A)),undefined);try{P=r.useSyncExternalStore(I,N,f?()=>v(f(),i):N)}catch(e){throw T.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${T.current.stack}\n\n`),e}U((()=>{T.current=void 0,_.current=void 0,b.current=P}));const L=r.useMemo((()=>r.createElement(e,{...P,ref:a})),[a,e,P]);return r.useMemo((()=>h?r.createElement(c.Provider,{value:g},L):L),[c,L,g])}const v=r.memo(u);if(v.WrappedComponent=e,v.displayName=u.displayName=s,l){const t=r.forwardRef((function(e,t){return r.createElement(v,{...e,reactReduxForwardedRef:t})}));return t.displayName=s,t.WrappedComponent=e,Z(t,e)}return Z(v,e)}},le=function(e){const{children:t,context:s,serverState:o,store:n}=e,a=r.useMemo((()=>{const t=M(n),s={store:n,subscription:t,getServerState:o?()=>o:void 0};{const{identityFunctionCheck:t="once",stabilityCheck:r="once"}=e;return Object.assign(s,{stabilityCheck:r,identityFunctionCheck:t})}}),[n,o]),i=r.useMemo((()=>n.getState()),[n]);U((()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),i!==n.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[a,i]);const c=s||re;return r.createElement(c.Provider,{value:a},t)};function ue(e=re){return function(){const t=r.useContext(e);if(!t)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return t}}var de=ue();function pe(e=re){const t=e===re?de:ue(e),s=()=>{const{store:e}=t();return e};return Object.assign(s,{withTypes:()=>s}),s}var me=pe();function fe(e=re){const t=e===re?me:pe(e),s=()=>t().dispatch;return Object.assign(s,{withTypes:()=>s}),s}var he=fe(),ve=(e,t)=>e===t;function ye(e=re){const t=e===re?de:ue(e),s=(e,s={})=>{const{equalityFn:n=ve}="function"==typeof s?{equalityFn:s}:s;if(!e)throw new Error("You must pass a selector to useSelector");if("function"!=typeof e)throw new Error("You must pass a function as a selector to useSelector");if("function"!=typeof n)throw new Error("You must pass a function as an equality function to useSelector");const a=t(),{store:i,subscription:c,getServerState:l}=a,u=r.useRef(!0),d=r.useCallback({[e.name](t){const r=e(t);{const{devModeChecks:o={}}="function"==typeof s?{}:s,{identityFunctionCheck:i,stabilityCheck:c}=a,{identityFunctionCheck:l,stabilityCheck:d}={stabilityCheck:c,identityFunctionCheck:i,...o};if("always"===d||"once"===d&&u.current){const s=e(t);if(!n(r,s)){let o;try{throw new Error}catch(e){({stack:o}=e)}console.warn("Selector "+(e.name||"unknown")+" returned a different result when called with the same parameters. This can lead to unnecessary rerenders.\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization",{state:t,selected:r,selected2:s,stack:o})}}if(("always"===l||"once"===l&&u.current)&&r===t){let t;try{throw new Error}catch(e){({stack:t}=e)}console.warn("Selector "+(e.name||"unknown")+" returned the root state when called. This can lead to unnecessary rerenders.\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.",{stack:t})}u.current&&(u.current=!1)}return r}}[e.name],[e]),p=(0,o.useSyncExternalStoreWithSelector)(c.addNestedSub,i.getState,l||i.getState,d,n);return r.useDebugValue(p),p};return Object.assign(s,{withTypes:()=>s}),s}var je=ye(),ge=L},"./node_modules/reconnecting-websocket/dist/reconnecting-websocket-mjs.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},r(e,t)};function o(e,t){function s(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}function n(e,t){var s="function"==typeof Symbol&&e[Symbol.iterator];if(!s)return e;var r,o,n=s.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=n.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}}return a}var a=function(e,t){this.target=t,this.type=e},i=function(e){function t(t,s){var r=e.call(this,"error",s)||this;return r.message=t.message,r.error=t,r}return o(t,e),t}(a),c=function(e){function t(t,s,r){void 0===t&&(t=1e3),void 0===s&&(s="");var o=e.call(this,"close",r)||this;return o.wasClean=!0,o.code=t,o.reason=s,o}return o(t,e),t}(a),l=function(){if("undefined"!=typeof WebSocket)return WebSocket},u={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+4e3*Math.random(),minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1};const d=function(){function e(e,t,s){var r=this;void 0===s&&(s={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(e){r._debug("open event");var t=r._options.minUptime,s=void 0===t?u.minUptime:t;clearTimeout(r._connectTimeout),r._uptimeTimeout=setTimeout((function(){return r._acceptOpen()}),s),r._ws.binaryType=r._binaryType,r._messageQueue.forEach((function(e){return r._ws.send(e)})),r._messageQueue=[],r.onopen&&r.onopen(e),r._listeners.open.forEach((function(t){return r._callEventListener(e,t)}))},this._handleMessage=function(e){r._debug("message event"),r.onmessage&&r.onmessage(e),r._listeners.message.forEach((function(t){return r._callEventListener(e,t)}))},this._handleError=function(e){r._debug("error event",e.message),r._disconnect(void 0,"TIMEOUT"===e.message?"timeout":void 0),r.onerror&&r.onerror(e),r._debug("exec error listeners"),r._listeners.error.forEach((function(t){return r._callEventListener(e,t)})),r._connect()},this._handleClose=function(e){r._debug("close event"),r._clearTimeouts(),r._shouldReconnect&&r._connect(),r.onclose&&r.onclose(e),r._listeners.close.forEach((function(t){return r._callEventListener(e,t)}))},this._url=e,this._protocols=t,this._options=s,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){return this._messageQueue.reduce((function(e,t){return"string"==typeof t?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e}),0)+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(e,t){void 0===e&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),this._ws?this._ws.readyState!==this.CLOSED?this._ws.close(e,t):this._debug("close: already closed"):this._debug("close enqueued: no ws instance")},e.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,this._ws&&this._ws.readyState!==this.CLOSED?(this._disconnect(e,t),this._connect()):this._connect()},e.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,s=void 0===t?u.maxEnqueuedMessages:t;this._messageQueue.length<s&&(this._debug("enqueue",e),this._messageQueue.push(e))}},e.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},e.prototype.dispatchEvent=function(e){var t,s,r=this._listeners[e.type];if(r)try{for(var o=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],s=0;return t?t.call(e):{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}}}(r),n=o.next();!n.done;n=o.next()){var a=n.value;this._callEventListener(e,a)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(s=o.return)&&s.call(o)}finally{if(t)throw t.error}}return!0},e.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((function(e){return e!==t})))},e.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e}(["RWS>"],e))},e.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,s=void 0===t?u.reconnectionDelayGrowFactor:t,r=e.minReconnectionDelay,o=void 0===r?u.minReconnectionDelay:r,n=e.maxReconnectionDelay,a=void 0===n?u.maxReconnectionDelay:n,i=0;return this._retryCount>0&&(i=o*Math.pow(s,this._retryCount-1))>a&&(i=a),this._debug("next delay",i),i},e.prototype._wait=function(){var e=this;return new Promise((function(t){setTimeout(t,e._getNextDelay())}))},e.prototype._getNextUrl=function(e){if("string"==typeof e)return Promise.resolve(e);if("function"==typeof e){var t=e();if("string"==typeof t)return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},e.prototype._connect=function(){var e=this;if(!this._connectLock&&this._shouldReconnect){this._connectLock=!0;var t=this._options,s=t.maxRetries,r=void 0===s?u.maxRetries:s,o=t.connectionTimeout,n=void 0===o?u.connectionTimeout:o,a=t.WebSocket,i=void 0===a?l():a;if(this._retryCount>=r)this._debug("max retries reached",this._retryCount,">=",r);else{if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),void 0===(c=i)||!c||2!==c.CLOSING)throw Error("No valid WebSocket class provided");var c;this._wait().then((function(){return e._getNextUrl(e._url)})).then((function(t){e._closeCalled||(e._debug("connect",{url:t,protocols:e._protocols}),e._ws=e._protocols?new i(t,e._protocols):new i(t),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout((function(){return e._handleTimeout()}),n))}))}}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new i(Error("TIMEOUT"),this))},e.prototype._disconnect=function(e,t){if(void 0===e&&(e=1e3),this._clearTimeouts(),this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new c(e,t,this))}catch(e){}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},e}()},"./node_modules/redux-thunk/dist/redux-thunk.mjs":(e,t,s)=>{"use strict";function r(e){return({dispatch:t,getState:s})=>r=>o=>"function"==typeof o?o(t,s,e):r(o)}s.r(t),s.d(t,{thunk:()=>o,withExtraArgument:()=>n});var o=r(),n=r},"./node_modules/redux/dist/redux.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{__DO_NOT_USE__ActionTypes:()=>n,applyMiddleware:()=>h,bindActionCreators:()=>m,combineReducers:()=>d,compose:()=>f,createStore:()=>c,isAction:()=>v,isPlainObject:()=>a,legacy_createStore:()=>l});var r=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),o=()=>Math.random().toString(36).substring(7).split("").join("."),n={INIT:`@@redux/INIT${o()}`,REPLACE:`@@redux/REPLACE${o()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${o()}`};function a(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function i(e){let t=typeof e;return t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const s=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(s){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return s}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}(e),t}function c(e,t,s){if("function"!=typeof e)throw new Error(`Expected the root reducer to be a function. Instead, received: '${i(e)}'`);if("function"==typeof t&&"function"==typeof s||"function"==typeof s&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===s&&(s=t,t=void 0),void 0!==s){if("function"!=typeof s)throw new Error(`Expected the enhancer to be a function. Instead, received: '${i(s)}'`);return s(c)(e,t)}let o=e,l=t,u=new Map,d=u,p=0,m=!1;function f(){d===u&&(d=new Map,u.forEach(((e,t)=>{d.set(t,e)})))}function h(){if(m)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function v(e){if("function"!=typeof e)throw new Error(`Expected the listener to be a function. Instead, received: '${i(e)}'`);if(m)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;f();const s=p++;return d.set(s,e),function(){if(t){if(m)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,f(),d.delete(s),u=null}}}function y(e){if(!a(e))throw new Error(`Actions must be plain objects. Instead, the actual type was: '${i(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error(`Action "type" property must be a string. Instead, the actual type was: '${i(e.type)}'. Value was: '${e.type}' (stringified)`);if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,l=o(l,e)}finally{m=!1}return(u=d).forEach((e=>{e()})),e}return y({type:n.INIT}),{dispatch:y,subscribe:v,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error(`Expected the nextReducer to be a function. Instead, received: '${i(e)}`);o=e,y({type:n.REPLACE})},[r]:function(){const e=v;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(`Expected the observer to be an object. Instead, received: '${i(t)}'`);function s(){const e=t;e.next&&e.next(h())}return s(),{unsubscribe:e(s)}},[r](){return this}}}}}function l(e,t,s){return c(e,t,s)}function u(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function d(e){const t=Object.keys(e),s={};for(let r=0;r<t.length;r++){const o=t[r];void 0===e[o]&&u(`No reducer provided for key "${o}"`),"function"==typeof e[o]&&(s[o]=e[o])}const r=Object.keys(s);let o,c;o={};try{!function(e){Object.keys(e).forEach((t=>{const s=e[t];if(void 0===s(void 0,{type:n.INIT}))throw new Error(`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===s(void 0,{type:n.PROBE_UNKNOWN_ACTION()}))throw new Error(`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${n.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)}))}(s)}catch(e){c=e}return function(e={},t){if(c)throw c;{const r=function(e,t,s,r){const o=Object.keys(t),c=s&&s.type===n.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!a(e))return`The ${c} has unexpected type of "${i(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const l=Object.keys(e).filter((e=>!t.hasOwnProperty(e)&&!r[e]));return l.forEach((e=>{r[e]=!0})),s&&s.type===n.REPLACE?void 0:l.length>0?`Unexpected ${l.length>1?"keys":"key"} "${l.join('", "')}" found in ${c}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,s,t,o);r&&u(r)}let l=!1;const d={};for(let o=0;o<r.length;o++){const n=r[o],a=s[n],i=e[n],c=a(i,t);if(void 0===c){const e=t&&t.type;throw new Error(`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${n}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}d[n]=c,l=l||c!==i}return l=l||r.length!==Object.keys(e).length,l?d:e}}function p(e,t){return function(...s){return t(e.apply(this,s))}}function m(e,t){if("function"==typeof e)return p(e,t);if("object"!=typeof e||null===e)throw new Error(`bindActionCreators expected an object or a function, but instead received: '${i(e)}'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);const s={};for(const r in e){const o=e[r];"function"==typeof o&&(s[r]=p(o,t))}return s}function f(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...s)=>e(t(...s))))}function h(...e){return t=>(s,r)=>{const o=t(s,r);let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(e,...t)=>n(e,...t)},i=e.map((e=>e(a)));return n=f(...i)(o.dispatch),{...o,dispatch:n}}}function v(e){return a(e)&&"type"in e&&"string"==typeof e.type}},"./node_modules/reselect/dist/reselect.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createSelector:()=>V,createSelectorCreator:()=>B,createStructuredSelector:()=>$,lruMemoize:()=>L,referenceEqualityCheck:()=>A,setGlobalDevModeChecks:()=>a,unstable_autotrackMemoize:()=>R,weakMapMemoize:()=>z});var r=(e,t,s)=>{if(1===t.length&&t[0]===s){let t=!1;try{const s={};e(s)===s&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},o=(e,t,s)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:n,inputSelectorResultsCopy:a}=e,i=r((()=>({})),...o);if(i.apply(null,n)!==i.apply(null,a)){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:s,firstInputs:n,secondInputs:a,stack:e})}},n={inputStabilityCheck:"once",identityFunctionCheck:"once"},a=e=>{Object.assign(n,e)},i=Symbol("NOT_FOUND");function c(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}var l=e=>Array.isArray(e)?e:[e];function u(e,t){const s=[],{length:r}=e;for(let o=0;o<r;o++)s.push(e[o].apply(null,t));return s}var d=(e,t)=>{const{identityFunctionCheck:s,inputStabilityCheck:a}={...n,...t};return{identityFunctionCheck:{shouldRun:"always"===s||"once"===s&&e,run:r},inputStabilityCheck:{shouldRun:"always"===a||"once"===a&&e,run:o}}},p=0,m=null,f=class{revision=p;_value;_lastValue;_isEqual=h;constructor(e,t=h){this._value=this._lastValue=e,this._isEqual=t}get value(){return m?.add(this),this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++p)}};function h(e,t){return e===t}var v=class{_cachedValue;_cachedRevision=-1;_deps=[];hits=0;fn;constructor(e){this.fn=e}clear(){this._cachedValue=void 0,this._cachedRevision=-1,this._deps=[],this.hits=0}get value(){if(this.revision>this._cachedRevision){const{fn:e}=this,t=new Set,s=m;m=t,this._cachedValue=e(),m=s,this.hits++,this._deps=Array.from(t),this._cachedRevision=this.revision}return m?.add(this),this._cachedValue}get revision(){return Math.max(...this._deps.map((e=>e.revision)),0)}};function y(e){return e instanceof f||console.warn("Not a valid cell! ",e),e.value}var j=(e,t)=>!1;function g(){return function(e,t=h){return new f(null,t)}(0,j)}function b(e,t){!function(e,t){if(!(e instanceof f))throw new TypeError("setValue must be passed a tracked store created with `createStorage`.");e.value=e._lastValue=t}(e,t)}var x=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=g()),y(t)},_=e=>{const t=e.collectionTag;null!==t&&b(t,null)},w=(Symbol(),0),S=Object.getPrototypeOf({}),k=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,C);tag=g();tags={};children={};collectionTag=null;id=w++},C={get:(e,t)=>function(){const{value:s}=e,r=Reflect.get(s,t);if("symbol"==typeof t)return r;if(t in S)return r;if("object"==typeof r&&null!==r){let s=e.children[t];return void 0===s&&(s=e.children[t]=N(r)),s.tag&&y(s.tag),s.proxy}{let s=e.tags[t];return void 0===s&&(s=e.tags[t]=g(),s.value=r),y(s),r}}(),ownKeys:e=>(x(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},E=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],T);tag=g();tags={};children={};collectionTag=null;id=w++},T={get:([e],t)=>("length"===t&&x(e),C.get(e,t)),ownKeys:([e])=>C.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>C.getOwnPropertyDescriptor(e,t),has:([e],t)=>C.has(e,t)};function N(e){return Array.isArray(e)?new E(e):new k(e)}function I(e,t){const{value:s,tags:r,children:o}=e;if(e.value=t,Array.isArray(s)&&Array.isArray(t)&&s.length!==t.length)_(e);else if(s!==t){let r=0,o=0,n=!1;for(const e in s)r++;for(const e in t)if(o++,!(e in s)){n=!0;break}(n||r!==o)&&_(e)}for(const o in r){const n=s[o],a=t[o];n!==a&&(_(e),b(r[o],a)),"object"==typeof a&&null!==a&&delete r[o]}for(const e in o){const s=o[e],r=t[e];s.value!==r&&("object"==typeof r&&null!==r?I(s,r):(O(s),delete o[e]))}}function O(e){e.tag&&b(e.tag,null),_(e);for(const t in e.tags)b(e.tags[t],null);for(const t in e.children)O(e.children[t])}var A=(e,t)=>e===t;function P(e){return function(t,s){if(null===t||null===s||t.length!==s.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],s[o]))return!1;return!0}}function L(e,t){const s="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=A,maxSize:o=1,resultEqualityCheck:n}=s,a=P(r);let c=0;const l=o<=1?function(e){let t;return{get:s=>t&&e(t.key,s)?t.value:i,put(e,s){t={key:e,value:s}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(a):function(e,t){let s=[];function r(e){const r=s.findIndex((s=>t(e,s.key)));if(r>-1){const e=s[r];return r>0&&(s.splice(r,1),s.unshift(e)),e.value}return i}return{get:r,put:function(t,o){r(t)===i&&(s.unshift({key:t,value:o}),s.length>e&&s.pop())},getEntries:function(){return s},clear:function(){s=[]}}}(o,a);function u(){let t=l.get(arguments);if(t===i){if(t=e.apply(null,arguments),c++,n){const e=l.getEntries().find((e=>n(e.value,t)));e&&(t=e.value,0!==c&&c--)}l.put(arguments,t)}return t}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>c,u.resetResultsCount=()=>{c=0},u}function R(e){const t=N([]);let s=null;const r=P(A),o=(c(n=()=>e.apply(null,t.proxy),"the first parameter to `createCache` must be a function"),new v(n));var n;function a(){return r(s,arguments)||(I(t,arguments),s=arguments),o.value}return a.clearCache=()=>o.clear(),a}var M="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}},D=0,F=1;function U(){return{s:D,v:void 0,o:null,p:null}}function z(e,t={}){let s=U();const{resultEqualityCheck:r}=t;let o,n=0;function a(){let t=s;const{length:a}=arguments;for(let e=0,s=a;e<s;e++){const s=arguments[e];if("function"==typeof s||"object"==typeof s&&null!==s){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(s);void 0===r?(t=U(),e.set(s,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(s);void 0===r?(t=U(),e.set(s,t)):t=r}}const i=t;let c;if(t.s===F)c=t.v;else if(c=e.apply(null,arguments),n++,r){const e=o?.deref?.()??o;null!=e&&r(e,c)&&(c=e,0!==n&&n--),o="object"==typeof c&&null!==c||"function"==typeof c?new M(c):c}return i.s=F,i.v=c,c}return a.clearCache=()=>{s=U(),a.resetResultsCount()},a.resultsCount=()=>n,a.resetResultsCount=()=>{n=0},a}function B(e,...t){const s="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,n={},a=e.pop();"object"==typeof a&&(n=a,a=e.pop()),c(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const i={...s,...n},{memoize:p,memoizeOptions:m=[],argsMemoize:f=z,argsMemoizeOptions:h=[],devModeChecks:v={}}=i,y=l(m),j=l(h),g=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const s=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${s}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),b=p((function(){return r++,a.apply(null,arguments)}),...y);let x=!0;const _=f((function(){o++;const e=u(g,arguments);t=b.apply(null,e);{const{identityFunctionCheck:s,inputStabilityCheck:r}=d(x,v);if(s.shouldRun&&s.run(a,e,t),r.shouldRun){const t=u(g,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:p,memoizeOptions:y},arguments)}x&&(x=!1)}return t}),...j);return Object.assign(_,{resultFunc:a,memoizedResultFunc:b,dependencies:g,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:p,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var V=B(z),$=Object.assign(((e,t=V)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const s=Object.keys(e);return t(s.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[s[r]]=t,e)),{})))}),{withTypes:()=>$})},"./node_modules/tabbable/dist/index.esm.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{focusable:()=>x,getTabIndex:()=>p,isFocusable:()=>S,isTabbable:()=>_,tabbable:()=>b});var r=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],o=r.join(","),n="undefined"==typeof Element,a=n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=!n&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},c=function e(t,s){var r;void 0===s&&(s=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||s&&t&&e(t.parentNode)},l=function(e,t,s){if(c(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(o));return t&&a.call(e,o)&&r.unshift(e),r.filter(s)},u=function e(t,s,r){for(var n=[],i=Array.from(t);i.length;){var l=i.shift();if(!c(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),d=e(u.length?u:l.children,!0,r);r.flatten?n.push.apply(n,d):n.push({scopeParent:l,candidates:d})}else{a.call(l,o)&&r.filter(l)&&(s||!t.includes(l))&&n.push(l);var p=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),m=!c(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(p&&m){var f=e(!0===p?l.children:p.children,!0,r);r.flatten?n.push.apply(n,f):n.push({scopeParent:l,candidates:f})}else i.unshift.apply(i,l.children)}}return n},d=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},p=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,s=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===s||"true"===s}(e))&&!d(e)?0:e.tabIndex},m=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},f=function(e){return"INPUT"===e.tagName},h=function(e){var t=e.getBoundingClientRect(),s=t.width,r=t.height;return 0===s&&0===r},v=function(e,t){return!(t.disabled||c(t)||function(e){return f(e)&&"hidden"===e.type}(t)||function(e,t){var s=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=a.call(e,"details>summary:first-of-type")?e.parentElement:e;if(a.call(o,"details:not([open]) *"))return!0;if(s&&"full"!==s&&"legacy-full"!==s){if("non-zero-area"===s)return h(e)}else{if("function"==typeof r){for(var n=e;e;){var c=e.parentElement,l=i(e);if(c&&!c.shadowRoot&&!0===r(c))return h(e);e=e.assignedSlot?e.assignedSlot:c||l===e.ownerDocument?c:l.host}e=n}if(function(e){var t,s,r,o,n=e&&i(e),a=null===(t=n)||void 0===t?void 0:t.host,c=!1;if(n&&n!==e)for(c=!!(null!==(s=a)&&void 0!==s&&null!==(r=s.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!c&&a;){var l,u,d;c=!(null===(u=a=null===(l=n=i(a))||void 0===l?void 0:l.host)||void 0===u||null===(d=u.ownerDocument)||void 0===d||!d.contains(a))}return c}(e))return!e.getClientRects().length;if("legacy-full"!==s)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var s=0;s<t.children.length;s++){var r=t.children.item(s);if("LEGEND"===r.tagName)return!!a.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},y=function(e,t){return!(function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,s=e.form||i(e),r=function(e){return s.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var s=0;s<e.length;s++)if(e[s].checked&&e[s].form===t)return e[s]}(t,e.form);return!o||o===e}(e)}(t)||p(t)<0||!v(e,t))},j=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},g=function e(t){var s=[],r=[];return t.forEach((function(t,o){var n=!!t.scopeParent,a=n?t.scopeParent:t,i=function(e,t){var s=p(e);return s<0&&t&&!d(e)?0:s}(a,n),c=n?e(t.candidates):a;0===i?n?s.push.apply(s,c):s.push(a):r.push({documentOrder:o,tabIndex:i,item:t,isScope:n,content:c})})),r.sort(m).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(s)},b=function(e,t){var s;return s=(t=t||{}).getShadowRoot?u([e],t.includeContainer,{filter:y.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:j}):l(e,t.includeContainer,y.bind(null,t)),g(s)},x=function(e,t){return(t=t||{}).getShadowRoot?u([e],t.includeContainer,{filter:v.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):l(e,t.includeContainer,v.bind(null,t))},_=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==a.call(e,o)&&y(t,e)},w=r.concat("iframe").join(","),S=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==a.call(e,w)&&v(t,e)}},"./node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js":(e,t,s)=>{"use strict";!function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=s("./node_modules/preact/compat/dist/compat.module.js"),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=e.useSyncExternalStore,n=e.useRef,a=e.useEffect,i=e.useMemo,c=e.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,s,l,u){var d=n(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=i((function(){function e(e){if(!a){if(a=!0,o=e,e=l(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return n=t}return n=e}if(t=n,r(o,e))return t;var s=l(e);return void 0!==u&&u(t,s)?(o=e,t):(o=e,n=s)}var o,n,a=!1,i=void 0===s?null:s;return[function(){return e(t())},null===i?void 0:function(){return e(i())}]}),[t,s,l,u]);var m=o(e,d[0],d[1]);return a((function(){p.hasValue=!0,p.value=m}),[m]),c(m),m},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()},"./node_modules/use-sync-external-store/with-selector.js":(e,t,s)=>{"use strict";e.exports=s("./node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js")},"./src/icons/avatar_bot-32.svg":e=>{"use strict";e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">\n<path fill="#4A48C1" d="M10,14.8c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S11.1,14.8,10,14.8z M15.9,14.8c1.1,0,2-0.9,2-2s-0.9-2-2-2\n\ts-2,0.9-2,2S14.8,14.8,15.9,14.8z M21.8,10.8c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S22.9,10.8,21.8,10.8z M21.3,18.1H10.7\n\tC11.7,23.9,20.2,23.9,21.3,18.1z"/>\n</svg>\n'},"./src/icons/icon_arrow_left-16.svg":e=>{"use strict";e.exports='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">\n<path fill="#5053A4" d="M13.6,8c0,0.6-0.4,1-1,1h-7l2.2,2.5c0.4,0.4,0.3,1-0.1,1.4c-0.2,0.2-0.4,0.2-0.7,0.2c-0.3,0-0.6-0.1-0.8-0.3\n\tL2.6,8.6c0,0-0.1-0.1-0.1-0.2c0,0-0.1-0.1-0.1-0.1c0-0.1-0.1-0.2-0.1-0.3c0,0,0,0,0,0c0,0,0,0,0,0c0-0.1,0-0.3,0.1-0.4\n\tc0,0,0.1-0.1,0.1-0.1c0-0.1,0.1-0.1,0.1-0.2l3.7-4.1c0.4-0.4,1-0.4,1.4-0.1c0.4,0.4,0.4,1,0.1,1.4L5.6,7h7C13.2,7,13.6,7.4,13.6,8z"\n\t/>\n</svg>\n'},"./src/icons/icon_arrow_right-16.svg":e=>{"use strict";e.exports='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">\n<path fill="#5053A4" d="M2.4,8.1c0-0.6,0.4-1,1-1h7L8.1,4.5c-0.4-0.4-0.3-1,0.1-1.4c0.2-0.2,0.4-0.2,0.7-0.2c0.3,0,0.6,0.1,0.8,0.3\n\tl3.7,4.2c0,0,0.1,0.1,0.1,0.2c0,0,0.1,0.1,0.1,0.1c0,0.1,0.1,0.2,0.1,0.3c0,0,0,0,0,0c0,0,0,0,0,0c0,0.1,0,0.3-0.1,0.4\n\tc0,0-0.1,0.1-0.1,0.1c0,0.1-0.1,0.1-0.1,0.2l-3.7,4.1c-0.4,0.4-1,0.4-1.4,0.1c-0.4-0.4-0.4-1-0.1-1.4l2.2-2.4h-7\n\tC2.8,9.1,2.4,8.6,2.4,8.1z"/>\n</svg>\n'},"./src/icons/icon_balloon-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M24,10.824v10.375c0,1.104-0.896,2-2,2h-4.694l-4.931,3.625v-3.625H10c-1.104,0-2-0.896-2-2V10.824\tc0-1.104,0.896-2,2-2h12C23.104,8.824,24,9.719,24,10.824z"/></svg>'},"./src/icons/icon_check-16.svg":e=>{"use strict";e.exports='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="16px"\n height="16px"\n x="0px"\n y="0px"\n viewBox="0 0 16 16"\n>\n <path\n fill="currentColor"\n d="M11.6,4.3l-5,5L4.9,7.5C4.4,7,3.7,7,3.2,7.5l0,0C2.8,8,2.8,8.7,3.2,9.2l1.7,1.7l0,0l0.8,0.8\n\tc0.5,0.5,1.2,0.5,1.7,0l0.8-0.8l5-5c0.5-0.5,0.5-1.2,0-1.7l0,0C12.8,3.8,12.1,3.8,11.6,4.3z"\n />\n</svg>\n'},"./src/icons/icon_check-32.svg":e=>{"use strict";e.exports='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="32px"\n height="32px"\n x="0px"\n y="0px"\n viewBox="0 0 32 32"\n>\n <path\n fill="currentColor"\n d="M22.9,9.3l-9.3,9.3l-3.2-3.2c-0.9-0.9-2.3-0.9-3.2,0l0,0c-0.9,0.9-0.9,2.3,0,3.2l3.2,3.2l0,0l1.6,1.6\n\tc0.9,0.9,2.3,0.9,3.2,0l1.6-1.6l9.3-9.3c0.9-0.9,0.9-2.3,0-3.2l0,0C25.2,8.4,23.7,8.4,22.9,9.3z"\n />\n</svg>\n'},"./src/icons/icon_chevron_down-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M16,20.425c-0.782,0-1.563-0.291-2.159-0.874l-6.541-6.408c-0.395-0.387-0.401-1.02-0.015-1.414\tc0.387-0.394,1.021-0.4,1.414-0.015l6.541,6.408c0.42,0.409,1.102,0.409,1.52-0.001l6.541-6.407c0.396-0.386,1.028-0.38,1.414,0.015\tc0.387,0.395,0.381,1.027-0.014,1.414l-6.541,6.407C17.563,20.133,16.782,20.425,16,20.425z"/></svg>'},"./src/icons/icon_chevron_down-8.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M-0.001,2.876c0-0.247,0.091-0.494,0.273-0.688c0.38-0.401,1.013-0.418,1.414-0.039l1.938,1.834\tc0.199,0.188,0.547,0.188,0.746,0L6.31,2.15c0.401-0.379,1.034-0.362,1.414,0.04c0.379,0.401,0.361,1.034-0.04,1.414L5.745,5.437\tC4.782,6.35,3.213,6.35,2.249,5.436L0.311,3.603C0.103,3.406-0.001,3.142-0.001,2.876z"/></svg>'},"./src/icons/icon_chevron_right-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#4A48C1" d="M6.5,13c-0.247,0-0.494-0.091-0.687-0.273c-0.401-0.38-0.419-1.013-0.04-1.414L8.22,8.727\tc0.373-0.394,0.373-1.06,0-1.454L5.773,4.687c-0.379-0.401-0.362-1.034,0.04-1.414c0.4-0.378,1.034-0.362,1.414,0.04l2.446,2.586\tc1.096,1.159,1.096,3.043,0,4.203l-2.446,2.586C7.03,12.896,6.765,13,6.5,13z"/></svg>'},"./src/icons/icon_chevron_right-8.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M2.875,7.998c-0.247,0-0.494-0.091-0.688-0.273c-0.401-0.38-0.418-1.013-0.039-1.414l1.834-1.938\tc0.188-0.199,0.188-0.547,0-0.746l-1.835-1.94c-0.379-0.401-0.362-1.034,0.04-1.414s1.034-0.361,1.414,0.04l1.834,1.939\tc0.913,0.963,0.913,2.532-0.001,3.496L3.601,7.686C3.405,7.894,3.14,7.998,2.875,7.998z"/></svg>'},"./src/icons/icon_close-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#4A48C1" d="M12.709,11.295L9.411,7.982l3.262-3.276c0.39-0.392,0.388-1.024-0.004-1.414\tc-0.39-0.39-1.023-0.388-1.414,0.003L8,6.564L4.746,3.295C4.357,2.904,3.724,2.903,3.332,3.292C2.94,3.682,2.939,4.315,3.329,4.707\tl3.261,3.275l-3.298,3.313c-0.39,0.391-0.388,1.024,0.003,1.414C3.49,12.903,3.745,13,4,13c0.257,0,0.513-0.099,0.708-0.295L8,9.399\tl3.291,3.306C11.486,12.901,11.743,13,12,13c0.255,0,0.511-0.097,0.705-0.291C13.097,12.319,13.099,11.686,12.709,11.295z"/></svg>'},"./src/icons/icon_close-8.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M7.705,7.729C7.511,7.923,7.255,8.02,7,8.02c-0.257,0-0.514-0.099-0.709-0.295L4,5.423L1.709,7.725\tC1.513,7.921,1.257,8.02,1,8.02c-0.255,0-0.51-0.097-0.706-0.291c-0.391-0.39-0.393-1.022-0.003-1.414l2.298-2.309l-2.27-2.28\tC-0.07,1.334-0.068,0.701,0.323,0.311c0.392-0.389,1.024-0.387,1.415,0.003L4,2.587l2.263-2.274C6.653-0.077,7.287-0.079,7.677,0.31\tC8.068,0.7,8.07,1.333,7.681,1.725l-2.27,2.281l2.298,2.309C8.099,6.705,8.097,7.339,7.705,7.729z"/></svg>'},"./src/icons/icon_download-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#FFF" d="M3.175,7.726c-0.413-0.367-0.45-0.999-0.083-1.412c0.367-0.413,0.999-0.45,1.412-0.083L7,8.45V1.5\tc0-0.552,0.448-1,1-1c0.553,0,1,0.448,1,1v6.95l2.496-2.219c0.412-0.367,1.044-0.331,1.411,0.083\tc0.367,0.413,0.33,1.045-0.083,1.412l-4.16,3.698c-0.047,0.041-0.103,0.062-0.154,0.094c-0.047,0.028-0.089,0.064-0.141,0.085\tC8.25,11.649,8.125,11.677,8,11.677c-0.126,0-0.25-0.027-0.369-0.074c-0.05-0.021-0.09-0.055-0.136-0.083\tc-0.053-0.031-0.111-0.053-0.159-0.096L3.175,7.726z M12.018,13.5H3.983c-0.552,0-1,0.447-1,1s0.448,1,1,1h8.035\tc0.553,0,1-0.447,1-1S12.57,13.5,12.018,13.5z"/></svg>'},"./src/icons/icon_enlarge-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M24,9v6.5c0,0.552-0.447,1-1,1s-1-0.448-1-1v-4.086L11.414,22H15.5c0.552,0,1,0.447,1,1s-0.448,1-1,1H9\tc-0.13,0-0.26-0.026-0.382-0.077c-0.245-0.102-0.439-0.296-0.541-0.541C8.026,23.26,8,23.13,8,23v-6.5c0-0.552,0.448-1,1-1\ts1,0.448,1,1v4.085L20.586,10H16.5c-0.552,0-1-0.448-1-1s0.448-1,1-1H23c0.13,0,0.26,0.026,0.382,0.077\tc0.245,0.102,0.439,0.296,0.541,0.541C23.974,8.74,24,8.87,24,9z"/></svg>'},"./src/icons/icon_error-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#ad001f" d="M15.744,13.104L9.097,1.47c-0.604-1.055-1.59-1.055-2.193,0L0.256,13.104\tc-0.604,1.056-0.102,1.919,1.113,1.919H14.63C15.847,15.022,16.348,14.159,15.744,13.104z M7,5.045c0-0.552,0.448-1,1-1s1,0.448,1,1\tv3.656c0,0.552-0.448,1-1,1s-1-0.448-1-1V5.045z M8,13.212c-0.748,0-1.354-0.607-1.354-1.354c0-0.748,0.606-1.354,1.354-1.354\ts1.354,0.606,1.354,1.354C9.354,12.604,8.748,13.212,8,13.212z"/></svg>'},"./src/icons/icon_file-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" x="0px" y="0px" version="1.1" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,28.5c-3.6,0-6.5-3-6.5-6.6V9.6c0-0.6,0.4-1,1-1s1,0.4,1,1v12.3c0,2.5,2,4.6,4.5,4.6\tc2.5,0,4.5-2.1,4.5-4.6V8.3c0-1.5-1.2-2.8-2.7-2.8c-1.5,0-2.7,1.3-2.7,2.8v13.5c0,0.6,0.5,1.1,1,1.1c0.6,0,1-0.5,1-1.1v-10\tc0-0.6,0.4-1,1-1s1,0.4,1,1v10c0,1.7-1.4,3.1-3,3.1s-3-1.4-3-3.1V8.3c0-2.6,2.1-4.8,4.7-4.8c2.6,0,4.7,2.2,4.7,4.8v13.6\tC22.5,25.5,19.6,28.5,16,28.5z"/></svg>'},"./src/icons/icon_newtopic-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,8.593l2.407,4.573l5.093,0.876l-3.604,3.702l0.74,5.115L16,20.574l-4.634,2.285l0.739-5.115L8.5,14.042\tl5.094-0.876L16,8.593z"/></svg>'},"./src/icons/icon_newtranslation-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path fill="#4A48C1" d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M14.1,7.1h-1.4c-0.1-1.5-0.4-2.9-1-4\tC13,4,13.9,5.4,14.1,7.1z M7.1,2.1v5H5C5.2,4.7,6.1,2.9,7.1,2.1z M7.1,8.9v5c-1-0.7-1.9-2.5-2.1-5H7.1z M8.9,13.9v-5H11\tC10.8,11.3,9.9,13.2,8.9,13.9z M8.9,7.1v-5c1,0.7,1.9,2.5,2.1,5H8.9z M4.2,3.1c-0.5,1.1-0.9,2.5-1,4H1.9C2.1,5.4,3,4,4.2,3.1z M1.9,8.9h1.4c0.1,1.5,0.4,2.9,1,4C3,12,2.1,10.5,1.9,8.9z M11.8,12.9c0.5-1.1,0.9-2.5,1-4h1.4C13.9,10.5,13,12,11.8,12.9z"/></svg>'},"./src/icons/icon_newtranslation-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,7c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4.1,9-9S20.9,7,16,7z M22.9,15h-1.6c-0.1-1.7-0.5-3.3-1.1-4.5\tC21.6,11.5,22.6,13.1,22.9,15z M15,9.4V15h-2.3C12.9,12.3,13.9,10.2,15,9.4z M15,17v5.6c-1.1-0.8-2.1-2.9-2.3-5.6H15z M17,22.6V17\th2.3C19.1,19.8,18.1,21.8,17,22.6z M17,15V9.4c1.1,0.8,2.1,2.9,2.3,5.6H17z M11.8,10.4c-0.6,1.3-1,2.8-1.1,4.5H9.1\tC9.4,13.1,10.4,11.5,11.8,10.4z M9.1,17h1.6c0.1,1.7,0.5,3.3,1.1,4.5C10.4,20.5,9.4,18.9,9.1,17z M20.2,21.5c0.6-1.3,1-2.8,1.1-4.5\th1.6C22.6,18.8,21.6,20.5,20.2,21.5z"/></svg>'},"./src/icons/icon_options-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M26.1,21.383c0.334-0.625,0.602-1.279,0.812-1.949L32,18.609V13.51l-5.058-0.846\tc-0.208-0.67-0.468-1.325-0.795-1.956l3.009-4.145l-3.604-3.634L21.38,5.903c-0.626-0.333-1.276-0.602-1.948-0.81L18.609,0\tl-5.098,0.001l-0.847,5.061c-0.669,0.203-1.326,0.465-1.957,0.794L6.562,2.847L2.929,6.449l2.973,4.171\tC5.569,11.247,5.3,11.9,5.091,12.569L0,13.373v5.099l5.06,0.866c0.204,0.669,0.467,1.324,0.796,1.955l-3.009,4.146l3.601,3.635\tl4.171-2.975c0.627,0.335,1.282,0.603,1.951,0.811L13.372,32h5.118l0.849-5.057c0.668-0.207,1.323-0.469,1.953-0.795l4.144,3.01\tl3.639-3.604L26.1,21.383z M19.01,19.035c-1.675,1.663-4.381,1.652-6.041-0.025c-1.662-1.675-1.649-4.381,0.024-6.042\tc1.676-1.661,4.382-1.648,6.043,0.025C20.699,14.67,20.686,17.377,19.01,19.035z"/></svg>'},"./src/icons/icon_send-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M6.714,14.985l17.837-7.906c0.681-0.302,1.414,0.301,1.25,1.027L22.273,23.59\tc-0.13,0.566-0.751,0.865-1.275,0.613l-3.623-1.752l-2.334,2.287c-0.572,0.562-1.538,0.156-1.538-0.645V21.01\tc0-0.217,0.078-0.43,0.222-0.594l7.676-8.841l-10.414,7.472l-4.351-2.445C5.987,16.236,6.033,15.287,6.714,14.985L6.714,14.985z"/></svg>'},"./src/icons/icon_upload-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M9.488,13.481c-0.391-0.391-0.391-1.023,0-1.414l5.805-5.805c0.026-0.026,0.06-0.036,0.088-0.058\tc0.073-0.06,0.146-0.119,0.235-0.156c0.246-0.103,0.522-0.103,0.769,0c0.093,0.039,0.171,0.101,0.249,0.165\tc0.023,0.02,0.053,0.027,0.074,0.049l5.805,5.805c0.391,0.391,0.391,1.023,0,1.414c-0.195,0.195-0.451,0.293-0.707,0.293\ts-0.512-0.098-0.707-0.293L17,9.383V20.33c0,0.553-0.447,1-1,1c-0.552,0-1-0.447-1-1V9.383l-4.098,4.098\tC10.512,13.872,9.879,13.872,9.488,13.481z M22.819,24.031H9.181c-0.552,0-1,0.447-1,1s0.448,1,1,1h13.639c0.553,0,1-0.447,1-1\tS23.372,24.031,22.819,24.031z"/></svg>'},"./src/javascripts/core/api/conversation-connector.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.set.difference.v2.js"),s("./node_modules/core-js/modules/esnext.set.intersection.v2.js"),s("./node_modules/core-js/modules/esnext.set.is-disjoint-from.v2.js"),s("./node_modules/core-js/modules/esnext.set.is-subset-of.v2.js"),s("./node_modules/core-js/modules/esnext.set.is-superset-of.v2.js"),s("./node_modules/core-js/modules/esnext.set.symmetric-difference.v2.js"),s("./node_modules/core-js/modules/esnext.set.union.v2.js");var r=s("./node_modules/reconnecting-websocket/dist/reconnecting-websocket-mjs.js"),o=s("./src/javascripts/core/lib/split-url-params.ts");const n=new Set;class a{#e=[];#t=null;#s=null;#r=e=>{const t=JSON.parse(e.data);this.#t&&clearInterval(this.#t),this.#t=setInterval((()=>{this.socket?.readyState===r.default.OPEN&&this.socket?.send(JSON.stringify({type:"ping"}))}),3e4);try{if("attach_channel_response"===t.type){if(!t.payload.success)return void this.#o({connected:!0,ready:!1,currentState:"attach_channel_erred"});this.#o({connected:!0,ready:!0,currentState:"attach_channel_response"})}}catch(e){console.warn(e)}};#n=()=>{this.#o({connected:!1,ready:!1,currentState:"socket_closed"})};#a=()=>{this.#o({connected:!1,ready:!1,currentState:"socket_join_error"})};accessToken="";channelName="";channelTopic="";url="";async connect(e,t,s,n){this.url=e,this.accessToken=n,this.channelName=t,this.channelTopic=s;const{url:a}=(0,o.default)(this.url);this.socket=new r.default(a,[],{maxReconnectionDelay:1e4,minReconnectionDelay:500,reconnectionDelayGrowFactor:2});const i={type:"attach_channel",payload:{accessToken:this.accessToken,channelName:this.channelName}};this.#s=()=>{this.socket?.send(JSON.stringify(i)),this.#o({connected:!0,ready:!1,currentState:"socket_connected"})},this.socket?.addEventListener("open",this.#s),this.socket?.addEventListener("message",this.#r),this.socket?.addEventListener("close",this.#n),this.socket?.addEventListener("error",this.#a)}disconnect(){this.socket?.close(),this.#s&&this.socket?.removeEventListener("open",this.#s),this.socket?.removeEventListener("message",this.#r),this.socket?.removeEventListener("close",this.#n),this.socket?.removeEventListener("error",this.#a),this.#e=[]}onOpen=e=>{this?.socket?.addEventListener("open",e)};onError=e=>{this?.socket?.addEventListener("error",e)};addListener=(e,t)=>{this?.socket?.addEventListener(e,(e=>t(JSON.parse(e.data))))};onMessage=e=>{this?.socket&&(this.socket.onmessage=t=>e(JSON.parse(t.data)))};removeListener=(e,t)=>{this.socket?.removeEventListener(e,t)};onConnection(e){this.#e.push(e)}#o(e){this.#e=this.#e.filter((t=>!t(e))),n.forEach((e=>e()))}pushToChannel(e,t){this.socket?.send(JSON.stringify({type:e,payload:t}))}static subscribe(e){return n.add(e),()=>n.delete(e)}}},"./src/javascripts/core/api/errors/seamly-api-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});class r extends Error{constructor(e,t){super(e,{cause:t?.cause}),this.status=t?.status}}},"./src/javascripts/core/api/errors/seamly-base-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});class r extends Error{action="";langKey="";constructor(e,...t){if(super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,Object.getPrototypeOf(this)),this.originalError=e,e?.payload&&(this.originalEvent=e,this.originalError=e.payload.error,this.message=`Event of type ${e.payload.type} encountered`),!this.message&&e?.message){const t=function(e){try{return JSON.parse(e).error}catch(t){return e}}(e.message);this.message=t}e?.error&&(this.originalError=e.error)}}},"./src/javascripts/core/api/errors/seamly-configuration-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyConfigurationError",this.langKey="errors.configError"}}},"./src/javascripts/core/api/errors/seamly-general-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyGeneralError",this.langKey="errors.general",this.action="reset"}}},"./src/javascripts/core/api/errors/seamly-offline-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyOfflineError",this.langKey="errors.seamlyOffline"}}},"./src/javascripts/core/api/errors/seamly-session-expired-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlySessionExpiredError",this.action="reset"}}},"./src/javascripts/core/api/errors/seamly-unauthorized-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyUnauthorizedError",this.langKey="errors.general",this.action="reset"}}},"./src/javascripts/core/api/errors/seamly-unavailable-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyUnavailableError",this.langKey="errors.seamlyUnavailable"}}},"./src/javascripts/core/api/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h});var r=s("./src/javascripts/core/api/conversation-connector.ts"),o=s("./src/javascripts/core/api/errors/seamly-api-error.ts"),n=s("./src/javascripts/core/api/errors/seamly-configuration-error.ts"),a=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),i=s("./src/javascripts/core/api/errors/seamly-session-expired-error.ts"),c=s("./src/javascripts/core/api/errors/seamly-unauthorized-error.ts"),l=s("./src/javascripts/core/lib/debug.ts"),u=s("./src/javascripts/core/lib/store/index.ts"),d=s("./src/javascripts/core/lib/store/providers/session-storage.ts"),p=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),m=s("./src/javascripts/core/api/utils.ts");const f=(0,l.default)("seamly");class h{#i;#c;#l;#u="window";#d;#p="new";URLS={};locale="";conversation=new r.default;constructor({layoutMode:e,namespace:t,config:s,context:r}){this.store=(0,u.objectStore)(`${t}.connection${r.userLocale?`.${r.userLocale}`:""}`,s.storageProvider||d.default),this.connectionInfo={apiKey:s.key,domain:s.domain||"api.seamly-app.com",secure:!1!==s.secure&&(s.secure||!0)},this.#d={...s,sendEnvironment:s.sendEnvironment??!0,context:{...r,channelName:r.channelName||"web"}},this.#i=!1,this.connected=!1,this.configReady=!1,s.externalId&&(this.#c=s.externalId),this.#u=e,this.userResponded=!1,this.URLS={translations:{href:`/channels/api/v2/client/${this.connectionInfo.apiKey}/translations/{version}/{locale}.json`,templated:!0},config:{href:`/channels/api/v2/client/${this.connectionInfo.apiKey}/configs`,templated:!0}},window.addEventListener("pageshow",(e=>{e.persisted&&this.connected&&this.connect()}))}getAccessToken(){return this.store.get("accessToken")}setAccessToken(e){this.store.set("accessToken",e)}getConversationUrl(){return this.store.get("conversationUrl")}setConversationUrl(e){this.store.set("conversationUrl",e?.href)}hasConversation(){return!!this.getConversationUrl()}getChannelTopic(){return this.store.get("channelTopic")||this.store.get("channelName")}getLocale=e=>e||this.locale;#m({_links:{self:e,...t}}){this.URLS={...this.URLS,...t}}clearStore(){this.store.delete("accessToken"),this.store.delete("conversationUrl"),this.store.delete("channelName"),this.store.delete("channelTopic")}#f(e){return`${this.connectionInfo.secure?`${e}s`:e}://${this.connectionInfo.domain}`}async getTranslations(e){try{if(!this.URLS.translations?.href)throw new n.default;const t=`${this.#f("http")}${this.URLS.translations.href}`.replace("{version}",String(4)).replace("{locale}",this.getLocale(e)),s=await(0,m.fetchApi)(t,{method:"GET"});return(await s.json()).translations}catch(e){if(e.status>=500)throw new a.default(e);throw new o.default(e)}}getContext(e){const{source:t,userLocale:s,variables:r}=e;if(t&&"string"!=typeof t)throw new Error("Source must be a string");if(s){if("string"!=typeof s)throw new Error("Locale must be a string");this.#h(e,s)}if(r&&"object"!=typeof r)throw new Error("Variables must be an object");if(0===Object.keys(e).length&&e.constructor===Object)return;const o=this.#d.context?.userLocale;return{...o?{userLocale:o}:{},...e}}async downloadFile(e,t){try{const s=await(0,m.fetchApi)(`${this.#f("http")}${this.URLS.uploads.href}/${e}`,{method:"GET",headers:{Authorization:`Bearer ${this.getAccessToken()}`}}),r=document.createElement("a"),o=URL.createObjectURL(await s.blob());r.href=o,void 0!==r.download&&(r.download=t),r.click(),setTimeout((()=>{URL.revokeObjectURL(o)}),6e4)}catch(e){}}uploadFile(e,t,s,r){const o=new FormData;o.append("upload",e);const n=new XMLHttpRequest;return n.open("POST",`${this.#f("http")}${this.URLS.uploads.href}`),n.setRequestHeader("Authorization",`Bearer ${this.getAccessToken()}`),n.upload.onprogress=e=>{if("function"==typeof t){const s=Math.ceil(e.loaded/e.total*100);t(s)}},n.onloadend=()=>{if(0!==n.status)if(200!==n.status&&201!==n.status||!s){if(!r)throw new Error(n.response);try{r(JSON.parse(n.response))}catch(e){r(n.response)}}else try{s(JSON.parse(n.response))}catch(e){s(n.response)}},n.send(o),n}async createConversation(){try{"function"==typeof this.#d?.getConversationAuthToken&&(this.#l=await this.#d.getConversationAuthToken());const e=await(0,m.fetchApi)(`${this.#f("http")}${this.URLS.conversations?.href}`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({externalId:this.#l?void 0:this.#c,token:this.#l})}),t=await e.json(),{conversation:s}=t,r={...s};return this.setAccessToken(s.accessToken),this.#m(t),this.URLS.conversation&&this.setConversationUrl(this.URLS.conversation),this.locale=s.context.userLocale,this.userResponded=s.userResponded,this.#p=s.status,r}catch(e){if(e.status>=500)throw new a.default(e);if(400===e.status)throw new c.default(e);if(404===e.status)throw new n.default(e);throw e}}async getConfig(){try{const e={channelName:this.#d.context.channelName,contentLocale:this.#d.context.contentLocale,environment:!0===this.#d.sendEnvironment?this.getEnvironment():this.#d.sendEnvironment,userLocale:this.#d.context.userLocale,variables:this.#d.context.variables},t=await(0,m.fetchApi)(`${this.#f("http")}${this.URLS.config?.href}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})}),s=await t.json();return this.#m(s),this.configReady=!0,s.config}catch(e){if(404===e.status)throw new n.default(e);if(e.status>=500)throw new a.default(e);throw e}}async fetchConversation(){if(!this.hasConversation())return null;try{const e=await(0,m.fetchApi)(`${this.#f("http")}${this.getConversationUrl()}`,{method:"GET",headers:{Authorization:`Bearer ${this.getAccessToken()}`}}),t=await e.json();return this.#p=t.conversation.status,this.#m(t),t.conversation}catch(e){if(401===e.status)throw new c.default(e);if(404===e.status)throw new i.default(e);if(e.status>=500)throw new a.default(e);throw e}}async getConversation(){return this.hasConversation()?this.fetchConversation():null}async getConversationIntitialState(){return this.fetchConversation()}async disconnect(){this.conversation?.disconnect&&this.conversation.disconnect(),this.connected=!1,this.configReady=!1}async connect(){this.connected=!1;const e=this.hasConversation()?void 0:await this.createConversation();return this.URLS.socket&&(this.conversation.connect(`${this.#f("ws")}${this.URLS.socket.href}`,this.#d.context.channelName||"",this.getChannelTopic(),this.getAccessToken()),this.conversation.onConnection((({connected:e,ready:t})=>{this.connected=e,this.#i=t})),this.send("context",this.#v())),e}send(e,t=void 0){this.connected&&this.#i?(f("[SEND]",e,t),this.conversation.pushToChannel(e,(0,m.buildPayload)(e,t))):this.conversation?.onConnection((({connected:s,ready:r})=>(this.connected=s,this.#i=r,!!r&&(this.send(e,t),!0))))}sendContext(e){const t=this.getContext(e);t&&this.send("context",t)}#v(){const e=!0===this.#d.sendEnvironment?this.getEnvironment():void 0,t="string"==typeof this.#d.context?.source?this.#d.context?.source:void 0,s=this.#d.context?.variables;return{contentLocale:"started"!==this.#p?this.#d.context?.contentLocale:void 0,environment:e,source:t,userLocale:"started"!==this.#p?this.#d.context?.userLocale:void 0,variables:s}}#h(e,t){e.source||t==this.#d.context?.userLocale||(e.source=p.sourceTypes.windowApi)}getEnvironment(){return{clientName:"@seamly/web-ui",clientVariant:this.#u,clientVersion:"24.5.0",currentUrl:window.location.toString(),screenResolution:`${window.screen.width}x${window.screen.height}`,timezone:(0,m.getTimeZone)(),userAgent:navigator.userAgent,preferredLocale:navigator.language}}}},"./src/javascripts/core/api/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{buildPayload:()=>n,fetchApi:()=>a,getTimeZone:()=>i});var r=s("./src/javascripts/core/lib/id.ts"),o=s("./src/javascripts/core/api/errors/seamly-api-error.ts");function n(e,t){if("message"!==e)return t;const{type:s,body:o}=t;let{transactionId:n}=t;return n||(n=(0,r.randomId)()),{type:s,body:o,transactionId:n}}const a=async(e,t)=>{const s=new URL(e),r=await fetch(s.href,{mode:"cors",...t});if(!r.ok)throw new o.default(r.statusText||`Request failed with status: ${r.status}`,{status:r.status});return r};function i(){if(!Intl||"undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return;const e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return;const t=e.resolvedOptions().timeZone;return t&&(t.indexOf("/")>-1||"UTC"===t)?t:void 0}},"./src/javascripts/core/config.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CSS_NAME:()=>r,activitySendDelay:()=>c,defaultConfig:()=>m,defaultTransitionTimeMs:()=>d,maxCharacterSrDebounceDelay:()=>u,maxCharacterWarningLimit:()=>l,newMessageScreenReaderWait:()=>a,screenReaderDebounceDelaySeconds:()=>i,typingTimeout:()=>p,unreadScreenReaderWait:()=>n,userParticipantId:()=>o});const r="cvco",o="seamly-client-participant",n=2e3,a=1e3,i=10,c=15e3,l=50,u=300,d=300,p=2e3,m={namespace:"default",layoutMode:"window",messages:{agent:{showAvatar:!1,showName:!1},user:{showAvatar:!1,showName:!1},timeIndicator:{enabled:!1,threshold:36e5}}}},"./src/javascripts/core/domains/app/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{initializeApp:()=>u,resetApp:()=>d});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/api/errors/seamly-session-expired-error.ts"),n=s("./src/javascripts/core/api/errors/seamly-unavailable-error.ts"),a=s("./src/javascripts/core/domains/config/actions.ts"),i=s("./src/javascripts/core/domains/redux/create-debounced-async-thunk.ts"),c=s("./src/javascripts/core/domains/visibility/actions.ts"),l=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const u=(0,r.createAsyncThunk)("initializeApp",(async(e,{extra:{api:t,config:s},rejectWithValue:r})=>{const a=s?.context?.contentLocale,i=s?.context?.userLocale;try{return t.hasConversation()?{initialState:await t.getConversationIntitialState(),contentLocale:a,userLocale:i,config:s}:(s?.context?.topic&&t.send("action",{type:l.actionTypes.setTopic,body:{name:s.context.topic,fallbackMessage:s.context.topic}}),{initialState:void 0,contentLocale:a,userLocale:i,config:s})}catch(e){if(e instanceof o.default){const e=new o.default;return r({name:e.name,message:e.message,originalEvent:e.originalEvent,originalError:e.originalError,action:e.action})}const t=new n.default;return r({name:t.name,message:t.message,langKey:t.langKey})}})),d=(0,i.default)("resetApp",(async(e,{dispatch:t,extra:{api:s}})=>{await s.disconnect(),s.clearStore(),t((0,a.resetConfig)()),await t((0,a.initializeConfig)()),await t(u()),t((0,c.initializeVisibility)())}),{wait:2e3,leading:!0})},"./src/javascripts/core/domains/app/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useUserHasResponded:()=>n});var r=s("./node_modules/react-redux/dist/react-redux.mjs"),o=s("./src/javascripts/core/domains/app/selectors.ts");const n=()=>(0,r.useSelector)(o.selectUserHasResponded)},"./src/javascripts/core/domains/app/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectUserHasResponded:()=>r});const r=(0,s("./node_modules/reselect/dist/reselect.mjs").createSelector)((({app:e})=>e),(({userHasResponded:e})=>e))},"./src/javascripts/core/domains/app/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{appSlice:()=>a,default:()=>c,setHasResponded:()=>i});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts");const n={userHasResponded:!1},a=(0,r.createSlice)({name:"app",initialState:n,reducers:{setHasResponded:(e,{payload:t})=>{e.userHasResponded=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,(()=>n)).addCase(o.initializeApp.fulfilled,((e,{payload:t})=>{t.initialState&&"userResponded"in t.initialState&&(e.userHasResponded=t.initialState.userResponded||!1)}))}}),{setHasResponded:i}=a.actions,c=a.reducer},"./src/javascripts/core/domains/config/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{initializeConfig:()=>o,resetConfig:()=>n});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs");const o=(0,r.createAsyncThunk)("initializeConfig",(async(e,{extra:{api:t,config:s},rejectWithValue:r})=>{try{const{features:e,preChat:r,agentParticipant:o,defaultContentLocale:n,defaultUserLocale:a,userParticipant:i,startChatIcon:c}=await t.getConfig(),{connectWhenInView:l}=s;return{features:e,preChat:r,agentParticipant:o,userParticipant:i,startChatIcon:c,defaultUserLocale:s?.context?.userLocale||a,defaultContentLocale:s?.context?.contentLocale||n,connectWhenInView:l}}catch(e){return r(e)}})),n=(0,r.createAsyncThunk)("resetConfig",(async(e,{extra:{config:t}})=>t))},"./src/javascripts/core/domains/config/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useConfig:()=>n,useParticipants:()=>a,useStartChatIcon:()=>i});var r=s("./node_modules/react-redux/dist/react-redux.mjs"),o=s("./src/javascripts/core/domains/config/selectors.ts");const n=()=>(0,r.useSelector)(o.selectConfig);function a(){const{agentParticipant:e,userParticipant:t}=n();return{agent:e,user:t}}function i(){const{startChatIcon:e}=n();return e}},"./src/javascripts/core/domains/config/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectConfig:()=>n});var r=s("./node_modules/reselect/dist/reselect.mjs"),o=s("./src/javascripts/core/domains/visibility/constants.ts");const n=(0,r.createSelector)((({config:e})=>e),(e=>{let t={visible:"inline"===e?.layoutMode?o.visibilityStates.open:o.visibilityStates.minimized,appContainerClassNames:e?.appContainerClassNames||[],...e};return"function"==typeof t.appContainerClassNames&&(t={...t,appContainerClassNames:t.appContainerClassNames(t)}),t}))},"./src/javascripts/core/domains/config/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{configSlice:()=>u,default:()=>f,initialConfigState:()=>i,setConfig:()=>d,setPreChatEvents:()=>m,updateConfig:()=>p}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/config.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/ui/utils/general-utils.ts");const i={...o.defaultConfig,alwaysShowEntryLabel:!1,api:{domain:"",key:"",secure:!0,sendEnvironment:!0},context:{},notificationAudioURL:void 0,hideOnNoUserResponse:!1,connectWhenInView:!0,showDisclaimer:!1,showSuggestions:!0,preChat:{enterDelay:1e3,exitAfter:4e3},continueChat:{enterDelay:0,exitAfter:2e3},customComponents:{},defaults:{visible:null},preChatEvents:[],parentElement:void 0,layoutMode:"window"},c=["alwaysShowEntryLabel","hideOnNoUserResponse","connectWhenInView","showDisclaimer","showSuggestions","continueChat","preChat","namespace","customComponents","defaults","layoutMode","api","zIndex","context","appContainerClassNames","messages","visible","visibilityCallback","errorCallback","agentParticipant","userParticipant","startChatIcon","notificationAudioURL"],l=(e,t)=>{const{messages:s,...r}=(0,a.pick)(t,c);let o=e;return Object.keys(r).length>0&&(o={...o,...r}),s&&(o={...o,messages:{...o.messages,...s}}),o},u=(0,r.createSlice)({name:"config",initialState:i,reducers:{setConfig:(e,{payload:t})=>l(e,t),updateConfig:(e,{payload:t})=>l(e,t),setPreChatEvents:(e,{payload:t})=>{e.preChatEvents=t}},extraReducers:e=>{e.addCase(n.resetConfig.fulfilled,(e=>e)).addCase(n.initializeConfig.fulfilled,((e,{payload:{preChat:t,agentParticipant:s,userParticipant:r,startChatIcon:o,defaultContentLocale:n,defaultUserLocale:a}})=>{e.preChatEvents=t.map((e=>({type:"message",payload:e}))),e.context.contentLocale=n,e.context.userLocale=a,e.agentParticipant=s,e.userParticipant=r,e.startChatIcon=o||""}))}}),{setConfig:d,updateConfig:p,setPreChatEvents:m}=u.actions,f=u.reducer},"./src/javascripts/core/domains/errors/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{catchError:()=>m,createErrorsMiddleware:()=>f});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/api/errors/seamly-base-error.ts"),n=s("./src/javascripts/core/api/errors/seamly-configuration-error.ts"),a=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),i=s("./src/javascripts/core/api/errors/seamly-offline-error.ts"),c=s("./src/javascripts/core/api/errors/seamly-session-expired-error.ts"),l=s("./src/javascripts/core/api/errors/seamly-unauthorized-error.ts"),u=s("./src/javascripts/core/api/errors/seamly-unavailable-error.ts"),d=s("./src/javascripts/core/domains/config/selectors.ts");const p={SeamlyGeneralError:a.default,SeamlyConfigurationError:n.default,SeamlySessionExpiredError:c.default,SeamlyOfflineError:i.default,SeamlyUnauthorizedError:l.default,SeamlyUnavailableError:u.default},m=(0,r.createAction)("catch-error",(e=>({payload:e})));function f({api:e}){return({getState:t})=>{const s=s=>{const{errorCallback:r,namespace:n,api:a,layoutMode:i}=(0,d.selectConfig)(t()),{error:c,type:l}=s,u=p[c?.name]?new p[c.name](c):new o.default(c);r?.(u,{namespace:n,api:a,layoutMode:i,conversationUrl:e.getConversationUrl(),action:l?s:void 0})};return e=>t=>{try{return t.payload?.originalEvent?.payload?s({error:t.payload,type:t.payload?.originalEvent?.payload?.type}):t.payload?.originalError&&s({error:t.payload,type:void 0}),e(t)}catch(e){throw s({error:e}),e}}}}},"./src/javascripts/core/domains/forms/context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Consumer:()=>n,Provider:()=>o,default:()=>a});const r=(0,s("preact").createContext)({handleSubmit:()=>{},isSubmitted:!1,isValid:!1,updateControlValue:()=>{},updateControlTouched:()=>{},errors:void 0}),{Provider:o,Consumer:n}=r,a=r},"./src/javascripts/core/domains/forms/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useForm:()=>d,useFormContext:()=>u,useFormControl:()=>m,useValidations:()=>p});var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/forms/selectors.ts"),a=s("./src/javascripts/core/domains/forms/slice.ts"),i=s("./src/javascripts/core/domains/store/index.ts"),c=s("./src/javascripts/core/domains/forms/context.ts"),l=s("./src/javascripts/core/domains/forms/utils.ts");function u(){return(0,r.useContext)(c.default)}function d(){const{handleSubmit:e,isSubmitted:t,isValid:s}=u();return{handleSubmit:e,isSubmitted:t,isValid:s}}function p(e,t){const s=(0,r.useMemo)((()=>(0,l.validate)(e,t)),[e,t]);return{isValid:0===Object.keys(s).length,errors:s}}function m(e){const t=(0,i.useAppDispatch)(),{formId:s,updateControlValue:c,updateControlTouched:l,errors:d}=u(),p=!!(0,o.useSelector)((e=>(0,n.getFormById)(e,{formId:s}))),m=(0,o.useSelector)((t=>(0,n.getControlValueByName)(t,{formId:s,name:e}))),f=(0,o.useSelector)((t=>(0,n.getControlTouchedByName)(t,{formId:s,name:e}))),h=d?.[e],v=!h;(0,r.useEffect)((()=>{p&&t((0,a.registerControl)({formId:s,name:e}))}),[p,s,e,t]),(0,r.useLayoutEffect)((()=>()=>{t((0,a.deregisterControl)({formId:s,name:e}))}),[p,s,e,t]);const y=(0,r.useCallback)((t=>c(e,t.target.value)),[e,c]),j=(0,r.useCallback)((()=>{l(e,!0)}),[l,e]);return[(0,r.useMemo)((()=>({name:e,onInput:y,onBlur:j,value:m})),[e,y,j,m]),(0,r.useMemo)((()=>({isValid:v,error:h,touched:f})),[v,h,f])]}},"./src/javascripts/core/domains/forms/provider.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/app/slice.ts"),a=s("./src/javascripts/core/domains/forms/context.ts"),i=s("./src/javascripts/core/domains/forms/hooks.ts"),c=s("./src/javascripts/core/domains/forms/selectors.ts"),l=s("./src/javascripts/core/domains/forms/slice.ts"),u=s("./src/javascripts/core/domains/store/index.ts"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=({children:e,formId:t,persistData:s=!1,onError:p,onSubmit:m,validationSchema:f={},...h})=>{const v=(0,u.useAppDispatch)(),y=(0,o.useSelector)((e=>(0,c.getFormValuesByFormId)(e,{formId:t}))),[j,g]=(0,r.useState)(!1),[b,x]=(0,r.useState)({}),{isValid:_,errors:w}=(0,i.useValidations)(y,f),S=(0,r.useMemo)((()=>({...w,...b})),[w,b]);(0,r.useLayoutEffect)((()=>{v((0,l.registerForm)({formId:t,persistData:s}))}),[t,s,v]),(0,r.useEffect)((()=>()=>{v((0,l.deregisterForm)({formId:t}))}),[t,s,v]);const k=(0,r.useCallback)(((e,s)=>{v((0,l.updateControlValue)({formId:t,name:e,value:s}))}),[t,v]),C=(0,r.useCallback)(((e,s)=>{v((0,l.updateControlTouched)({formId:t,name:e,touched:s}))}),[v,t]),E=(0,r.useCallback)(((e,t)=>{x((s=>({...s,[e]:t})))}),[x]),T=(0,r.useCallback)((e=>{e.preventDefault();const t="true"===e.submitter.getAttribute("aria-disabled");g(!t),!t&&_&&(v((0,n.setHasResponded)(!0)),m(y,{updateControlValue:k,setError:E}))}),[_,v,m,y,k,E]);(0,r.useEffect)((()=>{p&&p({errors:S,isSubmitted:j,isValid:0===Object.keys(S).length})}),[j,S,p]);const N=(0,r.useMemo)((()=>({formId:t,values:y,errors:S,isValid:0===Object.keys(S).length,isSubmitted:j,handleSubmit:T,validationSchema:f,updateControlValue:k,updateControlTouched:C})),[t,y,S,j,T,f,k,C]);return t?m?(0,d.jsx)(a.Provider,{...h,value:N,children:e}):(console.error('"onSubmit" is required.'),null):(console.error('"formId" is required.'),null)}},"./src/javascripts/core/domains/forms/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getControlTouchedByName:()=>c,getControlValueByName:()=>i,getFormById:()=>o,getFormValuesByFormId:()=>a}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js");var r=s("./node_modules/reselect/dist/reselect.mjs");const o=(0,r.createSelector)([({forms:e})=>e,(e,{formId:t})=>t],((e,t)=>e[t])),n=(0,r.createSelector)(o,(e=>e?.controls||{})),a=(0,r.createSelector)(n,(e=>{const t={};return Object.entries(e).forEach((([e,{value:s}])=>{t[e]=s})),t})),i=(0,r.createSelector)([n,(e,{name:t})=>t],((e,t)=>e[t]?.value)),c=(0,r.createSelector)([n,(e,{name:t})=>t],((e,t)=>e[t]?.touched))},"./src/javascripts/core/domains/forms/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h,deregisterControl:()=>p,deregisterForm:()=>u,formsSlice:()=>c,registerControl:()=>d,registerForm:()=>l,updateControlTouched:()=>f,updateControlValue:()=>m});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts");const n={controls:{}},a={touched:!1},i={controls:a},c=(0,r.createSlice)({name:"forms",initialState:i,reducers:{registerForm:(e,{payload:{persistData:t,formId:s}})=>{const r=t?e[s]??{...n,persistData:t}:{...n,persistData:t};e[s]=r},deregisterForm:(e,{payload:{formId:t}})=>(e[t]?.persistData||delete e[t],e),registerControl:(e,{payload:{name:t,formId:s}})=>{e[s].controls={[t]:a}},deregisterControl:(e,{payload:{name:t,formId:s}})=>{const r=e[s];if(!r)return e;if(r.persistData)return e;const o={...r.controls};return delete o[t],{...e,[s]:{...r,controls:o}}},updateControlValue:(e,{payload:{formId:t,name:s,value:r}})=>{e[t]?.controls&&(e[t].controls[s].value=r)},updateControlTouched:(e,{payload:{formId:t,name:s,touched:r}})=>{e[t]?.controls[s]&&(e[t].controls[s].touched=r)}},extraReducers:e=>{e.addCase(o.resetApp.pending,(()=>i))}}),{registerForm:l,deregisterForm:u,registerControl:d,deregisterControl:p,updateControlValue:m,updateControlTouched:f}=c.actions,h=c.reducer},"./src/javascripts/core/domains/forms/utils.ts":(e,t,s)=>{"use strict";function r(e,t={}){return Object.entries(t).reduce(((t,[s,r])=>{const o=Array.isArray(r)?r:[r];for(let r=0;r<o.length;r++)if(!o[r].fn(e[s],o[r].compareValue)){t[s]=o[r].errorText;break}return t}),{})}s.r(t),s.d(t,{validate:()=>r}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js")},"./src/javascripts/core/domains/i18n/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{setLocale:()=>r});const r=(0,s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs").createAsyncThunk)("setLocale",(async(e,{extra:{api:t},rejectWithValue:s})=>{try{return{translations:await t.getTranslations(e),userLocale:e}}catch(e){return s(e)}}),{condition:(e,{getState:t})=>{const{i18n:{isLoading:s,userLocale:r}}=t();return e!==r&&!s}})},"./src/javascripts/core/domains/i18n/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useI18n:()=>c});var r=s("./node_modules/@ultraq/icu-message-formatter/dist/icu-message-formatter.js"),o=s("preact/hooks"),n=s("./node_modules/react-redux/dist/react-redux.mjs"),a=s("./src/javascripts/core/domains/i18n/selectors.ts");const i=new r.MessageFormatter("en-GB",{plural:r.pluralTypeHandler,select:r.selectTypeHandler});function c(){const e=(0,n.useSelector)(a.selectTranslations),t=(0,n.useSelector)(a.selectLocale),s=(0,n.useSelector)(a.selectInitialLocale),r=(0,n.useSelector)(a.selectIsLoading);return{t:(0,o.useCallback)(((s,o={})=>{if(!e)return"";const n=e[s];return n?i.format(n,o):(r||console.warn(`Translation key: ${s} is missing in locale: ${t}`),"")}),[e,t,r]),userLocale:t,initialLocale:s}}},"./src/javascripts/core/domains/i18n/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectInitialLocale:()=>n,selectIsLoading:()=>i,selectLocale:()=>a,selectTranslations:()=>o});var r=s("./node_modules/reselect/dist/reselect.mjs");const o=(0,r.createSelector)((({i18n:e})=>e),(({translations:e})=>e)),n=(0,r.createSelector)((({i18n:e})=>e),(({initialLocale:e})=>e)),a=(0,r.createSelector)((({i18n:e})=>e),(({userLocale:e})=>e)),i=(0,r.createSelector)((({i18n:e})=>e),(({isLoading:e})=>e))},"./src/javascripts/core/domains/i18n/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d,i18nSlice:()=>c,setInitialLocale:()=>l,setTranslations:()=>u}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/domains/i18n/actions.ts");const i={translations:{"errors.configError.message":"We are sorry this happened, please retry at a later time.","errors.configError.srText":"A chat configuration error occurred. Our apologies, please retry at a later time.","errors.configError.title":"Chat configuration error.","errors.general.buttonText":"Restart chat","errors.general.message":"Do you want to start a new chat session?","errors.general.srText":"Something went wrong with the chat session. You can restart the chat.","errors.general.title":"Something went wrong","errors.seamlyOffline.message":"There might be a problem with your or our network connection. The chat session should resume as soon the connection is available again.","errors.seamlyOffline.srText":"The chat has connection issues. There might be a problem with your or our network connection. The chat session should resume as soon as the connection is available again.","errors.seamlyOffline.title":"Connection issues","errors.seamlyUnavailable.buttonText":"Try again","errors.seamlyUnavailable.message":"The server could not be reached. Try again in a little while.","errors.seamlyUnavailable.srText":"The chat server could not be reached. Try again in a little while.","errors.seamlyUnavailable.title":"Server unavailable"},isLoading:!1,initialLocale:void 0,userLocale:void 0},c=(0,r.createSlice)({name:"app",initialState:i,reducers:{setInitialLocale:(e,t)=>{e.initialLocale=t.payload},setTranslations:(e,{payload:t})=>{e.translations=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,(()=>i)).addCase(n.initializeConfig.fulfilled,((e,{payload:t})=>{e.initialLocale=t.defaultUserLocale})).addCase(a.setLocale.pending,(e=>{e.isLoading=!0})).addCase(a.setLocale.rejected,(e=>{e.isLoading=!1})).addCase(a.setLocale.fulfilled,((e,{payload:t})=>{e.isLoading=!1,t?.translations&&(e.userLocale=t.userLocale,e.translations=Object.keys(t.translations).sort().reduce(((e,s)=>{if(!t.translations)return e;const r=t.translations[s];return e[s]=r,e}),{}))}))}}),{setInitialLocale:l,setTranslations:u}=c.actions,d=c.reducer},"./src/javascripts/core/domains/interrupt/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useInterrupt:()=>i});var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/interrupt/selectors.ts");function i(){const{t:e}=(0,n.useI18n)(),t=(0,o.useSelector)(a.selectError);return{hasError:(0,o.useSelector)(a.selectHasError),meta:(0,r.useMemo)((()=>{if(!t)return{title:void 0,message:void 0,srText:void 0,buttonText:void 0,originalError:void 0,action:void 0};const{langKey:s,action:r}=t,o=e(`${s}.title`),n=e(`${s}.message`),a=e(`${s}.srText`),i=r?e(`${s}.buttonText`):null;return{...s?{title:o,message:n,srText:a}:{},...r?{action:r}:{},...r&&s?{buttonText:i}:{},originalError:t}}),[t,e]),error:t}}},"./src/javascripts/core/domains/interrupt/middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),o=s("./src/javascripts/core/domains/interrupt/slice.ts");const n=["SeamlyGeneralError","SeamlyConfigurationError","SeamlySessionExpiredError","SeamlyOfflineError","SeamlyUnauthorizedError","SeamlyUnavailableError"];function a({api:e}){return()=>t=>s=>{const{payload:a,type:i}=s;if(i===o.setInterrupt.type){if(!n.includes(a.name))throw new r.default(a);"reset"===a.action&&e.disconnect().then((()=>{e.clearStore()}))}return t(s)}}},"./src/javascripts/core/domains/interrupt/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectError:()=>o,selectHasError:()=>n});var r=s("./node_modules/reselect/dist/reselect.mjs");const o=(0,r.createSelector)((({interrupt:e})=>e),(({error:e})=>e)),n=(0,r.createSelector)(o,(e=>Boolean(e)))},"./src/javascripts/core/domains/interrupt/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{clearInterrupt:()=>p,default:()=>m,interruptSlice:()=>u,setInterrupt:()=>d});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/domains/i18n/actions.ts"),i=s("./src/javascripts/core/domains/store/actions.ts"),c=s("./src/javascripts/core/domains/visibility/actions.ts");const l={error:void 0},u=(0,r.createSlice)({name:"interrupt",initialState:l,reducers:{setInterrupt:(e,t)=>{e.error=t.payload},clearInterrupt:()=>l},extraReducers:e=>{e.addCase(n.initializeConfig.pending,(()=>l)).addMatcher((0,r.isAnyOf)(o.initializeApp.rejected,n.initializeConfig.rejected,a.setLocale.rejected,c.setVisibility.rejected,c.initializeVisibility.rejected,i.getConversation.rejected),((e,{payload:t})=>{e.error=t}))}}),{setInterrupt:d,clearInterrupt:p}=u.actions,m=u.reducer},"./src/javascripts/core/domains/options/middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/domains/store/slice.ts");function o({api:e}){return()=>t=>s=>{const o=t(s);switch(s.type){case r.setUserSelectedOptions.toString():e.store.set("options",s.payload);break;case r.setUserSelectedOption.toString():e.store.set("options",{...e.store.get("options")||{},[s.payload.option]:s.payload.value})}return o}}},"./src/javascripts/core/domains/redux/create-debounced-async-thunk.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs");const o=(e,t,s)=>{const{wait:o=300,maxWait:n=0,leading:a=!1}=s??{};let i,c=null,l=null;const u=()=>{l&&clearTimeout(l),l=void 0,i&&(i(!0),i=void 0)};return(0,r.createAsyncThunk)(e,t,{condition:()=>{const e=a&&!c;return c&&clearTimeout(c),c=setTimeout((()=>{u(),c=null}),o),!!e||(i&&(i(!1),i=void 0),n&&!l&&(l=setTimeout(u,n)),new Promise((e=>{i=e})))}})}},"./src/javascripts/core/domains/store/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getConversation:()=>r});const r=(0,s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs").createAsyncThunk)("getConversation",(async(e,{extra:{api:t},rejectWithValue:s})=>{try{const e=await t.getConversation();if(!e)throw new Error("No conversation found");return e}catch(e){return s({name:e?.name,message:e?.message,langKey:e?.langKey,action:e?.action,originalEvent:e?.originalEvent,originalError:e?.originalError})}}),{condition(e,{getState:t}){const{state:{events:s}}=t(),r=s.at(-1);return r&&("lastEvent"in e?e?.lastEvent?.id:e?.body?.lastEvent?.id)!==r.payload.id}})},"./src/javascripts/core/domains/store/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createStore:()=>g,useAppDispatch:()=>b});var r=s("./node_modules/redux/dist/redux.mjs"),o=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),n=s("./node_modules/react-redux/dist/react-redux.mjs"),a=s("./src/javascripts/core/domains/app/slice.ts"),i=s("./src/javascripts/core/domains/config/slice.ts"),c=s("./src/javascripts/core/domains/errors/index.ts"),l=s("./src/javascripts/core/domains/forms/slice.ts"),u=s("./src/javascripts/core/domains/i18n/slice.ts"),d=s("./src/javascripts/core/domains/interrupt/middleware.ts"),p=s("./src/javascripts/core/domains/interrupt/slice.ts"),m=s("./src/javascripts/core/domains/options/middleware.ts"),f=s("./src/javascripts/core/domains/store/slice.ts"),h=s("./src/javascripts/core/domains/translations/middleware.ts"),v=s("./src/javascripts/core/domains/translations/slice.ts"),y=s("./src/javascripts/core/domains/visibility/slice.ts");const j=(0,r.combineReducers)({state:f.default,app:a.default,config:i.default,i18n:u.default,translations:v.default,visibility:y.default,forms:l.default,interrupt:p.default});function g({initialState:e,api:t,eventBus:s,config:r}){return(0,o.configureStore)({reducer:j,preloadedState:e,middleware:e=>e({thunk:{extraArgument:{api:t,eventBus:s,config:r}},serializableCheck:!1}).concat((0,c.createErrorsMiddleware)({api:t}),(0,d.default)({api:t}),(0,m.default)({api:t}),h.default)})}const b=n.useDispatch},"./src/javascripts/core/domains/store/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectLastUnreadEvent:()=>c,selectShowNotifications:()=>u,selectUnreadEventIds:()=>l,selectUnreadEvents:()=>i}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/reselect/dist/reselect.mjs"),o=s("./src/javascripts/core/domains/store/slice.ts"),n=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),a=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const i=(0,r.createSelector)(n.selectEvents,(e=>e.filter((e=>(0,o.isUnreadMessage)(e)&&"service_data"!==e.type&&e.payload?.messageStatus===a.readStates.received)))),c=(0,r.createSelector)([i],(e=>e.filter((e=>"participant"!==e.type)).at(-1))),l=(0,r.createSelector)(i,(e=>e.filter((({payload:e})=>e?.id)).map((({payload:e})=>e.id)))),u=(0,r.createSelector)((({state:e})=>e.options.features?.webNotifications),(e=>e?.enabled))},"./src/javascripts/core/domains/store/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addEvent:()=>v,calculateNewEntryMeta:()=>m,clearAbortTransaction:()=>G,clearAllUploads:()=>j,clearEvents:()=>g,clearFeatures:()=>b,clearIdleDetachCountdown:()=>x,clearResumeConversationPrompt:()=>_,decrementIdleDetachCountdownCounter:()=>w,default:()=>re,doneProcessingImage:()=>Y,hideOption:()=>S,initIdleDetachCountdown:()=>k,initResumeConversationPrompt:()=>C,initialStoreState:()=>f,isUnreadMessage:()=>l,mergeEvents:()=>d,orderEvents:()=>u,registerUpload:()=>E,setActiveEntryType:()=>T,setActiveService:()=>N,setBlockAutoEntrySwitch:()=>I,setEvents:()=>D,setEventsRead:()=>O,setFeatureEnabledState:()=>A,setFeatures:()=>L,setHeaderSubTitle:()=>R,setHeaderTitle:()=>M,setInitialState:()=>F,setIsLoading:()=>U,setLoadedImageEventIds:()=>z,setParticipant:()=>B,setProactiveMessages:()=>se,setSeamlyContainerElement:()=>V,setServiceDataItem:()=>$,setServiceEntryMetadata:()=>H,setUploadComplete:()=>q,setUploadError:()=>W,setUploadProgress:()=>K,setUserEntryType:()=>X,setUserSelectedOption:()=>Q,setUserSelectedOptions:()=>Z,showOption:()=>ee,startProcessingImage:()=>J,stopIdleDetachCountdownCounter:()=>te,storeSlice:()=>h,updateEvent:()=>y,updateFeatures:()=>P}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.find.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/lib/id.ts"),i=s("./src/javascripts/core/ui/utils/general-utils.ts"),c=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const l=({type:e,payload:t})=>"hidden"===document.visibilityState||e===c.eventTypes.message&&!t.fromClient||e===c.eventTypes.info&&t.type===c.payloadTypes.text,u=e=>e.sort((({payload:{occurredAt:e=0}},{payload:{occurredAt:t=0}})=>e-t)),d=(e,t)=>{const s=e.filter((e=>"message"===e.type&&!e.payload.optimisticallyInjected&&!t.some((t=>t.payload?.id===e.payload.id)))),r=t.filter((({type:e,payload:t})=>!("participant"===e&&!t?.participant?.introduction))).reverse();return u([...r,...s])},p=(e,t)=>{if(!e)return{participants:{},currentAgent:""};const{participants:s}=e||{participants:{}},{id:r,avatar:o,name:n,introduction:a}=t.participant,i=s[r],c={...s,[r]:i?{...i,...o?{avatar:o}:{},...n?{name:n}:{},...a?{introduction:a}:{}}:t.participant};return{...e,participants:c,currentAgent:e.currentAgent===r||t.fromClient?e.currentAgent:r}},m=(e,t)=>{if(!0===t?.payload?.fromClient)return e;const s="message"===t?.type?t?.payload.translatedEntry||t?.payload.entry:{options:void 0,type:void 0},{blockAutoEntrySwitch:r}=e,o=t?.payload?.actions||{},n=t?.payload?.translatedActions||{};if(!s)return{...e,actions:o,optionsOverride:{},translatedActions:n};const{type:a,options:i}=s||{};let c=e.active;return r||a===e.userSelected||(c=a),{...e,active:c,optionsOverride:{...a?{[a]:i}:{}},actions:o,translatedActions:n}},f={events:[],isLastEventFromClient:!1,initialState:{userResponded:!1,context:{contentLocale:"",translationActive:!1,userLocale:""}},unreadEvents:0,userHasResponded:!1,loadedImageEventIds:[],isLoading:!1,idleDetachCountdown:{hasCountdown:!1,isActive:!1,remaining:void 0,wasStopped:void 0,count:void 0,timer:void 0},resumeConversationPrompt:!1,serviceInfo:{activeServiceSessionId:"",proactiveMessages:!1},participantInfo:{participants:{},currentAgent:""},headerTitles:{title:null,subTitle:""},historyLoaded:!1,skiplinkTargetId:(0,a.randomId)(),optionsButtonId:(0,a.randomId)(),headerCollapseButtonId:(0,a.randomId)(),serviceData:{},options:{features:{webNotifications:{enabled:!1}},panelActive:!1,optionActive:"",userSelectedOptions:{}},showFileUpload:!1,currentUploads:[],processingFileUploads:[],entryMeta:{default:c.entryTypes.text,optionsOverride:{},defaultEntry:c.entryTypes.text,active:c.entryTypes.text,userSelected:null,blockAutoEntrySwitch:!1,options:{},actions:{},translatedActions:{}},seamlyContainerElement:null},h=(0,r.createSlice)({name:"store",initialState:f,reducers:{addEvent:(e,t)=>{const{type:s,payload:r}=t.payload,o=e.options.features.hasOwnProperty(c.featureKeys.uploads);let n={...e.options};if(o&&(s===c.eventTypes.message||s===c.eventTypes.participant)&&!r.fromClient){const e="message"===s?r.entry?.type:void 0;n={...n,features:{...n.features,uploads:{enabled:n.features.uploads?.enabled||!1,...n.features?.uploads||{},enabledFromEntry:e===c.entryTypes.upload}}}}const i=l(t.payload);if(!e.events.find((e=>e.payload.id===r.id))){if(!e.events.find((e=>"transactionId"in e.payload&&"transactionId"in r&&e.payload.transactionId===r.transactionId&&(!t.payload.type||e.type===t.payload.type)&&r.fromClient))){const l=m(e.entryMeta,t.payload);e.entryMeta=o||l.active!==c.entryTypes.upload?l:{...e.entryMeta},e.options=n,i&&(e.unreadEvents+=1,"service_data"!==s&&(t.payload.payload.messageStatus=r.fromClient?c.readStates.read:c.readStates.received)),t.payload.payload.key=(0,a.randomId)(),e.events.push(t.payload),e.events=u(e.events)}r.fromClient&&(e.isLastEventFromClient=r.fromClient)}},updateEvent:(e,{payload:t})=>{const s=e.events.find((e=>"service_data"!==e.type&&"service_data"!==t.type&&e.payload.transactionId===t.payload.transactionId));s?(s.payload.id=t.payload.id,s.payload.occurredAt=t.payload.occurredAt):e.events.push(t),e.events=u(e.events)},clearEvents:e=>{e.unreadEvents=0,e.loadedImageEventIds=[],e.events=[]},setEventsRead:(e,{payload:t})=>{e.unreadEvents=0,e.events.forEach((e=>(e.payload.id&&-1!==t.indexOf(e.payload.id)&&(e.payload={...e.payload,..."service_data"!==e.type&&e.payload.messageStatus===c.readStates.received&&{messageStatus:c.readStates.read}}),e)))},setLoadedImageEventIds:(e,{payload:t})=>{e.loadedImageEventIds.push(t)},setEvents:(e,{payload:{messages:t,unreadMessageCount:s,userResponded:r,participants:o,service:n,serviceData:a,ui:i}})=>{const l=d(e.events,t),u=Object.fromEntries(Object.entries(o).map((([e,t])=>[t.id,t]))),f=t.find((e=>"participant"===e.type)),h=f?.payload?.participant?.id,{entry:v}=n?.settings||{},y=m({...e.entryMeta,...v,active:v?.default||c.payloadTypes.text,options:{...v?.options?v.options:{}}},l[l.length-1]);let j={...e.options.features};const g=t.find((e=>!e.payload.fromClient&&["message","participant"].includes(e.type))),b=j.hasOwnProperty(c.featureKeys.uploads);if(b&&"message"===g?.type){const e=g.payload.entry?.type||"";j={...j,uploads:{enabled:j.uploads?.enabled||!1,enabledFromEntry:e===c.entryTypes.upload}}}e.unreadEvents=s,e.userHasResponded=r,e.events=l.filter((e=>"participant"!==e.type||!!e.payload.participant?.introduction)),e.participantInfo={...e.participantInfo,...h?p(e.participantInfo,{participant:u[h]}):{},participants:u},e.historyLoaded=!0,e.serviceInfo={...e.serviceInfo,proactiveMessages:n?.settings?.proactiveMessages?.enabled||!1,activeServiceSessionId:n?.sessionId},e.serviceData={...e.serviceData,...a},e.options={...e.options,features:j},e.entryMeta=b||y.active!==c.entryTypes.upload?y:{...e.entryMeta},e.resumeConversationPrompt=i.resumeConversationPrompt||!1,h&&(e.headerTitles.subTitle=u[h]?.name)},setIsLoading:(e,{payload:t})=>{e.isLoading=t},initIdleDetachCountdown:(e,{payload:t})=>{const{delaySeconds:s,delayTime:r}=t;e.idleDetachCountdown={hasCountdown:!0,isActive:!0,wasStopped:!1,count:s,remaining:s,timer:r}},decrementIdleDetachCountdownCounter:e=>{const{idleDetachCountdown:t}=e,{remaining:s=0}=t,r=s-1;e.idleDetachCountdown.remaining=r,e.idleDetachCountdown.timer=(0,i.getTimeFromSeconds)(r)},stopIdleDetachCountdownCounter:e=>{e.idleDetachCountdown.isActive=!1,e.idleDetachCountdown.wasStopped=!0},clearIdleDetachCountdown:e=>{e.idleDetachCountdown.hasCountdown=!1,e.idleDetachCountdown.isActive=!1},initResumeConversationPrompt:e=>{e.resumeConversationPrompt=!0},clearResumeConversationPrompt:e=>{e.resumeConversationPrompt=!1},setParticipant:(e,{payload:t})=>{e.participantInfo=p(e.participantInfo,{participant:t.participant,fromClient:t.fromClient})},setActiveService:(e,{payload:t})=>{e.serviceInfo.activeServiceSessionId!==t&&(e.serviceInfo.activeServiceSessionId=t)},setHeaderTitle:(e,{payload:t})=>{e.headerTitles.title=t},setHeaderSubTitle:(e,{payload:t})=>{e.headerTitles.subTitle=t},setInitialState:(e,{payload:t})=>{e.initialState=t,e.unreadEvents=f.unreadEvents},setServiceDataItem:(e,{payload:t})=>{e.serviceData[t.type]=t},setFeatures:(e,{payload:t})=>{t.features&&(e.options.features=t.features)},updateFeatures:(e,{payload:t})=>{Object.entries(t).forEach((([t,s])=>{e.options.features[t]=s}))},setFeatureEnabledState:(e,{payload:t})=>{e.options.features.hasOwnProperty(t.key)&&(e.options.features[t.key].enabled=t.enabled)},clearFeatures:e=>{e.options.features={webNotifications:e.options.features.webNotifications}},showOption:(e,{payload:t})=>{e.options.panelActive=!0,e.options.optionActive=t},hideOption:e=>{e.options.panelActive=!1,e.options.optionActive=""},setUserSelectedOptions:(e,{payload:t})=>{e.options.userSelectedOptions=t},setUserSelectedOption:(e,{payload:t})=>{const{option:s,value:r}=t;e.options.userSelectedOptions[s]=r},setBlockAutoEntrySwitch:(e,{payload:t})=>{e.entryMeta.blockAutoEntrySwitch=t},setServiceEntryMetadata:(e,{payload:t})=>{e.entryMeta.active=t.default,e.entryMeta.options=t.options||{},e.entryMeta.optionsOverride={},e.entryMeta.actions={},e.entryMeta.translatedActions={}},setActiveEntryType:(e,{payload:t})=>{e.entryMeta.active=t},setUserEntryType:(e,{payload:t})=>{e.entryMeta.userSelected=t},clearAbortTransaction:e=>{e.entryMeta.actions={}},registerUpload:(e,{payload:t})=>{e.currentUploads.push({id:t.fileId,name:t.fileName,progress:1,uploading:!0,complete:!1,error:"",uploadHandle:t.uploadHandle})},setUploadProgress:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map((e=>e.id===t.fileId?{...e,progress:t.progress,uploading:100!==t.progress,uploadHandle:100===t.progress?null:e.uploadHandle}:e))},startProcessingImage:(e,{payload:t})=>{e.processingFileUploads.push(t)},doneProcessingImage:(e,{payload:t})=>{e.processingFileUploads=e.processingFileUploads.filter((e=>e!==t))},setUploadError:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map((e=>e.id===t.fileId?{...e,error:t.errorText,progress:0,uploading:!1,uploadHandle:null}:e))},setUploadComplete:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map((e=>e.id===t?{...e,complete:!0}:e))},clearAllUploads:e=>{e.currentUploads=[]},setSeamlyContainerElement:(e,{payload:t})=>{e.seamlyContainerElement=t},setProactiveMessages:(e,{payload:t})=>{e.serviceInfo.proactiveMessages=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,(()=>f)).addCase(o.initializeApp.pending,(e=>{e.isLoading=!0})).addCase(n.initializeConfig.fulfilled,((e,{payload:t})=>{e.headerTitles.subTitle=t.agentParticipant?.name||"",t.features&&(e.options.features=t.features)})).addCase(o.initializeApp.fulfilled,((e,{payload:t,type:s})=>{if(e.isLoading=!1,!t.initialState)return;e.initialState=t.initialState,"messages"in t.initialState&&h.caseReducers.setEvents(e,{payload:t.initialState,type:s});const{initialState:{service:r}}=t;r?.settings?.entry?.options?.upload&&h.caseReducers.setFeatureEnabledState(e,{payload:{key:c.featureKeys.uploads,enabled:r.settings.entry.options.upload.enabled||!1},type:s})})).addMatcher((0,r.isAnyOf)(k,C),(e=>{e.isLastEventFromClient=!1}))}}),{addEvent:v,updateEvent:y,clearAllUploads:j,clearEvents:g,clearFeatures:b,clearIdleDetachCountdown:x,clearResumeConversationPrompt:_,decrementIdleDetachCountdownCounter:w,hideOption:S,initIdleDetachCountdown:k,initResumeConversationPrompt:C,registerUpload:E,setActiveEntryType:T,setActiveService:N,setBlockAutoEntrySwitch:I,setEventsRead:O,setFeatureEnabledState:A,updateFeatures:P,setFeatures:L,setHeaderSubTitle:R,setHeaderTitle:M,setEvents:D,setInitialState:F,setIsLoading:U,setLoadedImageEventIds:z,setParticipant:B,setSeamlyContainerElement:V,setServiceDataItem:$,setServiceEntryMetadata:H,clearAbortTransaction:G,setUploadComplete:q,setUploadError:W,setUploadProgress:K,startProcessingImage:J,doneProcessingImage:Y,setUserEntryType:X,setUserSelectedOption:Q,setUserSelectedOptions:Z,showOption:ee,stopIdleDetachCountdownCounter:te,setProactiveMessages:se}=h.actions,re=h.reducer},"./src/javascripts/core/domains/translations/components/options-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./src/javascripts/core/ui/utils/general-utils.ts"),c=s("./src/javascripts/core/domains/translations/components/options-dialog/index.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");function u({children:e,position:t={horizontal:"left",vertical:"top"},classNames:s=[]}){const[u,d]=(0,r.useState)(!1),p=(0,r.useRef)(null),m=(0,a.useGeneratedId)();return(0,l.jsxs)("div",{className:(0,o.className)("translations__container"),onKeyDown:e=>{u&&(0,i.getKey)(e)===i.keyNames.Escape&&(d(!1),(0,i.focusElement)(p.current))},children:[(0,l.jsx)(n.default,{transitionStartState:n.transitionStartStates.notRendered,isActive:u,children:(0,l.jsx)("div",{className:(0,o.className)("options__dialog"),role:"dialog",children:(0,l.jsx)(c.default,{onClose:()=>{d(!1)},position:t})})}),(0,l.jsx)("button",{type:"button",className:(0,o.className)(["button","chat__options__button",...s]),id:m,onClick:()=>{d(!u)},onKeyDown:e=>{(0,i.getKey)(e)===i.keyNames.ArrowDown&&(d(!0),e.preventDefault())},ref:p,"aria-haspopup":"dialog","aria-expanded":u,children:e})]})}},"./src/javascripts/core/domains/translations/components/options-dialog/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/translations/components/options-dialog/translation-options.tsx"),n=s("./src/javascripts/core/ui/components/options/options-frame.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=function({onClose:e,position:t}){const{t:s}=(0,r.useI18n)(),c=(0,a.useGeneratedId)();return(0,i.jsx)(n.default,{onCancel:e,headingText:s("translations.menu.title"),cancelButtonText:s("translations.settings.cancelButtonText"),description:s("translations.menu.description"),descriptionId:c,position:t,disableButtonFocusing:!0,children:(0,i.jsx)(o.default,{describedById:c,onChange:e})})}},"./src/javascripts/core/domains/translations/components/options-dialog/translation-option.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/layout/icon.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({label:e,checked:t,description:s,onChange:a,id:i,itemClassName:c})=>(0,n.jsxs)("li",{className:(0,r.className)([c||"","translation-options__item"]),"aria-selected":t,role:"option",tabIndex:0,onClick:a,onKeyDown:e=>{"Space"!==e.code&&"Enter"!==e.code||(e.preventDefault(),a())},id:i,children:[(0,n.jsx)(o.default,{name:"check",size:"16",alt:""}),e," ",s&&(0,n.jsxs)("span",{children:["(",s,")"]})]})},"./src/javascripts/core/domains/translations/components/options-dialog/translation-options.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("preact/compat"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/translations/components/options-dialog/translation-option.tsx"),i=s("./src/javascripts/core/domains/translations/hooks.ts"),c=s("./src/javascripts/core/lib/css.ts"),l=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),u=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=({onChange:e,describedById:t})=>{const{context:{contentLocale:s}}=(0,o.useConfig)(),{t:p}=(0,n.useI18n)(),{languages:m,currentLocale:f,enableTranslations:h,disableTranslations:v}=(0,i.useTranslations)(),y=(0,l.useSkiplinkTargetFocusing)(),j=t=>()=>{t&&(t===f||s===t?v():h(t,u.sourceTypes.translationChoice),e(),y())},{primaryLanguages:g,remainingLanguages:b}=(0,r.useMemo)((()=>m.reduce(((e,t)=>{const r=t.locale===s,o=((e,t,s)=>t===e.locale||!t&&s)(t,f,r);t.locale!==s&&e.remainingLanguages.push({...t,checked:o,isOriginal:r});const n=e.remainingLanguages.findIndex((e=>e.locale===f));return(r||o&&n>4)&&e.primaryLanguages.push({...t,checked:o,isOriginal:r}),e}),{primaryLanguages:[],remainingLanguages:[]})),[f,s,m]);return(0,d.jsxs)("ul",{"aria-describedby":t,role:"listbox",tabIndex:-1,className:(0,c.className)("translation-options"),children:[g.map((({locale:e,nativeName:t,checked:s,isOriginal:r},o)=>(0,d.jsx)(a.default,{id:e,label:t,checked:s,description:r?p("translations.settings.original"):void 0,onChange:j(e),itemClassName:(0,c.className)({"translation-options__item--original":r,"translation-options__item--selected":s&&0!==o})},e))),b.map((({locale:e,nativeName:t,checked:s,isOriginal:r})=>(0,d.jsx)(a.default,{id:e,label:t,checked:s,description:r?p("translations.settings.original"):void 0,onChange:j(e)},e)))]})}},"./src/javascripts/core/domains/translations/components/translation-status.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./node_modules/react-redux/dist/react-redux.mjs"),o=s("./src/javascripts/core/domains/interrupt/selectors.ts"),n=s("./src/javascripts/core/domains/translations/hooks.ts"),a=s("./src/javascripts/core/ui/components/translation-proposal/index.tsx"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");function c(){const e=(0,r.useSelector)(o.selectHasError),{isActive:t}=(0,n.useTranslations)();return e||t?null:(0,i.jsx)(a.default,{})}},"./src/javascripts/core/domains/translations/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useLocaleNativeName:()=>j,useTranslatedEventData:()=>h,useTranslatedParticipantData:()=>v,useTranslationProposal:()=>g,useTranslations:()=>f,useTranslationsContainer:()=>y}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.find.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/config/hooks.ts"),a=s("./src/javascripts/core/domains/i18n/hooks.ts"),i=s("./src/javascripts/core/domains/store/index.ts"),c=s("./src/javascripts/core/domains/visibility/hooks.ts"),l=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),d=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),p=s("./src/javascripts/core/domains/translations/selectors.ts"),m=s("./src/javascripts/core/domains/translations/slice.ts");function f(){const{sendContext:e}=(0,u.default)(),t=(0,i.useAppDispatch)(),s=(0,n.useConfig)(),a=(0,r.useCallback)(((t,s)=>{e({userLocale:t,source:s})}),[e]),c=(0,r.useCallback)((()=>{e({userLocale:s.context?.contentLocale}),t((0,m.disableTranslation)())}),[s.context?.contentLocale,t,e]),{languages:l,isActive:d,isAvailable:p,currentLocale:f}=(0,o.useSelector)((({translations:e})=>e));return{languages:l,isActive:d,isAvailable:p,currentLocale:f,enableTranslations:a,disableTranslations:c}}const h=e=>{const t=(0,o.useSelector)((0,p.selectIsTranslated)(e));if(!e?.payload)return{body:void 0,hasTranslation:!1,isTranslated:!1,locale:""};const s=e.payload?.translatedBody&&"data"in e.payload.translatedBody?e.payload?.translatedBody.data:e.payload.translatedBody,{translation:r,body:n}={body:e.payload?.body,translation:e.payload?.translation},a=!!s;return{body:t&&a?s:n,hasTranslation:a,isTranslated:t&&a,locale:r?.locale}},v=e=>{const{translatedBody:t,translation:s,body:r}={body:e.payload?.participant?.introduction,translatedBody:e.payload?.participant?.translatedIntroduction,translation:e.payload?.participant?.translation},n=!!t,a=(0,o.useSelector)((0,p.selectIsTranslated)(e));return{body:a&&n?t:r,hasTranslation:n,isTranslated:a&&n,userLocale:s?.locale}};function y(){const e=(0,o.useSelector)((({translations:e})=>e.containerId));return{id:e,focusContainer:(0,l.useElementFocusingById)(e)}}function j(e){const{languages:t}=f();return(0,r.useMemo)((()=>t?.find((t=>t.locale===e))?.nativeName),[e,t])}const g=()=>{const{isActive:e,languages:t}=f(),s=(0,i.useAppDispatch)(),{sendAction:n}=(0,u.default)(),{translationProposal:l}=(0,o.useSelector)((e=>e.translations)),{enableTranslations:p}=f(),{isOpen:h}=(0,c.useVisibility)(),{userLocale:v}=(0,a.useI18n)(),y=l?.proposedLocale,g=j(y),b=(0,r.useMemo)((()=>null!==l&&!e&&h&&v!==y&&t.some((e=>e.locale===y))),[l,e,h,v,y,t]);return{activateTranslationProposal:()=>{l?.proposedLocale&&p(l.proposedLocale,d.sourceTypes.translationProposal)},dismissTranslationProposal:()=>{n({type:d.actionTypes.dismiss,body:{type:d.TRANSLATION_PROPOSAL}}),s((0,m.disableTranslationProposalPrompt)())},proposedLocale:y,proposedLocaleNativeName:g,showProposal:b,translationProposal:l}}},"./src/javascripts/core/domains/translations/middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/app/actions.ts"),o=s("./src/javascripts/core/domains/config/actions.ts"),n=s("./src/javascripts/core/domains/i18n/actions.ts"),a=s("./src/javascripts/core/domains/store/slice.ts");const i=({dispatch:e})=>t=>s=>{const i=t(s);if(o.initializeConfig.fulfilled.match(s)&&s.payload.defaultUserLocale)return e((0,n.setLocale)(s.payload.defaultUserLocale)),i;if(r.initializeApp.fulfilled.match(s))return s.payload.userLocale&&e((0,n.setLocale)(s.payload.userLocale)),i;if(a.addEvent.match(s)&&"info"===s.payload.type&&s.payload.payload.body&&"subtype"in s.payload.payload.body&&"new_translation"===s.payload.payload.body.subtype){const{body:t}=s.payload.payload;if(t.translationLocale&&t.translationEnabled)return e((0,n.setLocale)(t.translationLocale)),i}return i}},"./src/javascripts/core/domains/translations/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectIsTranslated:()=>o}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.every.js");var r=s("./node_modules/reselect/dist/reselect.mjs");const o=e=>(0,r.createSelector)((e=>e.translations.translatedEventGroups),(t=>Object.values(t).every((t=>e?.payload?.id&&!t.includes(e.payload.id)))))},"./src/javascripts/core/domains/translations/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y,disableEventsTranslation:()=>f,disableTranslation:()=>p,disableTranslationProposalPrompt:()=>v,enableEventsTranslation:()=>m,enableTranslation:()=>d,setTranslationProposalPrompt:()=>h,translationSlice:()=>u,translationsInitialState:()=>c}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/domains/i18n/actions.ts"),i=s("./src/javascripts/core/domains/store/slice.ts");const c={isActive:!1,currentLocale:void 0,isAvailable:!1,languages:[],containerId:(0,r.nanoid)(),translatedEventGroups:{},translationProposal:null},l=(e,t)=>{const s=[...e].reduce(((e,{payload:s,type:r},o,n)=>{if(e[t]&&s.id){if("info"===r&&"divider"===s?.type&&s?.body?.translationEnabled)return n.splice(0),e;e[t].push(s.id)}return s.id===t&&(e[t]=[]),e}),{}),[[r,o]]=Object.entries(s);return{lastGroupId:e.filter((e=>"divider"===e.payload?.type)).map((e=>e.payload.id)).at(-1),groupId:r,eventIds:o}},u=(0,r.createSlice)({name:"translation",initialState:c,reducers:{enableTranslation:(e,{payload:t})=>{e.isActive=!0,e.currentLocale=t},disableTranslation:e=>{e.isActive=!1,e.currentLocale=void 0},enableEventsTranslation:(e,{payload:{events:t,id:s}})=>{delete e.translatedEventGroups[s];const{lastGroupId:r}=l(t,s);e.lastGroupId=r},disableEventsTranslation:(e,{payload:{events:t,id:s}})=>{const{lastGroupId:r,groupId:o,eventIds:n}=l(t,s);e.lastGroupId=r,e.translatedEventGroups[o]=n},disableTranslationProposalPrompt:e=>{e.translationProposal=null},setTranslationProposalPrompt:(e,{payload:t})=>{e.translationProposal=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,(()=>c)).addCase(n.initializeConfig.fulfilled,((e,{payload:t})=>{const s=t?.features?.translation;s?.languages&&(e.isAvailable=!0===s.enabled,e.languages=[...s.languages].sort(((e,s)=>e.locale===t.defaultUserLocale?-1:s.locale===t.defaultUserLocale?1:e.nativeName?.localeCompare(s.nativeName||"",void 0,{sensitivity:"base"})||0)))})).addCase(a.setLocale.fulfilled,((e,{payload:t})=>{e.currentLocale=t.userLocale})).addCase(i.addEvent,((e,{payload:t})=>{t.payload.id&&e.lastGroupId&&e.translatedEventGroups[e.lastGroupId]&&e.translatedEventGroups[e.lastGroupId].push(t.payload.id)})).addCase(i.setEvents,((e,{payload:t})=>{e.translationProposal=t?.ui?.translationProposal})).addCase(o.initializeApp.fulfilled,((e,{payload:t})=>{e.translationProposal=t.initialState?.ui?.translationProposal}))}}),{enableTranslation:d,disableTranslation:p,enableEventsTranslation:m,disableEventsTranslation:f,setTranslationProposalPrompt:h,disableTranslationProposalPrompt:v}=u.actions,y=u.reducer},"./src/javascripts/core/domains/visibility/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{initializeVisibility:()=>p,setVisibility:()=>d});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/selectors.ts"),n=s("./src/javascripts/core/domains/config/selectors.ts"),a=s("./src/javascripts/core/domains/visibility/utils.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),c=s("./src/javascripts/core/domains/visibility/constants.ts"),l=s("./src/javascripts/core/domains/visibility/selectors.ts");const u=[c.visibilityStates.open,c.visibilityStates.minimized,c.visibilityStates.hidden],d=(0,r.createAsyncThunk)("setVisibility",((e,{getState:t,extra:{api:s,eventBus:r}})=>{const d=t(),p=e.visibility,m=l.selectVisibility(d),f=(0,o.selectUserHasResponded)(d),h=s.hasConversation(),v=n.selectConfig(d),{visibilityCallback:y=a.calculateVisibility,layoutMode:j}=v,{unreadEvents:g}=(0,i.selectState)(d),b=y({hasResponded:f,previousVisibility:m,requestedVisibility:p,config:v});if(b&&!u.includes(b))return console.error('The visibilityCallback function should return "open", "minimized" or "hidden".'),{visibility:null,setInputFocus:e.setInputFocus};if(m===b)return{visibility:null,setInputFocus:e.setInputFocus};const x=s.store.get(c.StoreKey);return s.store.set(c.StoreKey,{...x||{},[j]:p}),p&&r.emit("ui.visible",p,{visibility:p,hasConversation:h,hasResponded:f,unreadMessageCount:g}),{visibility:b,setInputFocus:e.setInputFocus}})),p=(0,r.createAsyncThunk)("initialize",(async(e,{dispatch:t,getState:s,extra:{api:r}})=>{const{layoutMode:o}=n.selectConfig(s()),a=r.store.get(c.StoreKey)?.[o]||c.visibilityStates.initialize;return t(d({visibility:a})),a}))},"./src/javascripts/core/domains/visibility/constants.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{StoreKey:()=>r,visibilityStates:()=>o});const r="visibility",o={hidden:"hidden",minimized:"minimized",open:"open",initialize:null}},"./src/javascripts/core/domains/visibility/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useIntersect:()=>m,useShowInlineView:()=>f,useVisibility:()=>p});var r=s("preact"),o=s("preact/hooks"),n=s("./node_modules/react-redux/dist/react-redux.mjs"),a=s("./src/javascripts/core/domains/config/hooks.ts"),i=s("./src/javascripts/core/domains/store/index.ts"),c=s("./src/javascripts/core/domains/visibility/actions.ts"),l=s("./src/javascripts/core/domains/visibility/slice.ts"),u=s("./src/javascripts/core/domains/visibility/constants.ts"),d=s("./src/javascripts/core/domains/visibility/selectors.ts");const p=()=>{const e=(0,i.useAppDispatch)(),t=(0,n.useSelector)(d.selectVisibility),s=(0,n.useSelector)(d.selectSetInputFocus),r=!!t&&t!==u.visibilityStates.hidden,a=t===u.visibilityStates.open,l=t===u.visibilityStates.minimized,p=(0,o.useCallback)((t=>{e("string"==typeof t||null===t?(0,c.setVisibility)({visibility:t,setInputFocus:!1}):(0,c.setVisibility)(t))}),[e]);return{isVisible:r,isOpen:a,isMinimized:l,visible:t,setVisibility:p,openChat:()=>{p({visibility:u.visibilityStates.open})},closeChat:()=>{p({visibility:u.visibilityStates.minimized})},setInputFocus:s}},m=({freezeOnceVisible:e=!1,enabled:t=!0,containerRef:s=(0,r.createRef)()})=>{const[n,a]=(0,o.useState)(null),i=!!n?.isIntersecting||!t,c=i&&e,l=([e])=>a(e);return(0,o.useEffect)((()=>{const e=s?.current,r=!!window.IntersectionObserver;if(e||console.error("containerRef must be set on a DOM element. check the component where useIntersect is being used."),!r||c||!e||!t)return()=>{};const o=new IntersectionObserver(l,{threshold:0,root:null,rootMargin:"0%"});return o.observe(e),()=>o.disconnect()}),[s,t,c]),{isVisible:i,containerRef:s}},f=()=>{const e=(0,i.useAppDispatch)(),{connectWhenInView:t}=(0,a.useConfig)(),s=(0,n.useSelector)(d.selectShowInlineView),{containerRef:r,isVisible:c}=m({enabled:t,freezeOnceVisible:!0});return(0,o.useEffect)((()=>{c&&e((0,l.setShowInlineView)())}),[e,c]),{containerRef:r,showInlineView:s}}},"./src/javascripts/core/domains/visibility/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectSetInputFocus:()=>a,selectShowInlineView:()=>n,selectVisibility:()=>o});var r=s("./node_modules/reselect/dist/reselect.mjs");const o=(0,r.createSelector)((({visibility:e})=>e),(e=>e.visibility)),n=(0,r.createSelector)((({visibility:e})=>e),(e=>e.showInlineView)),a=(0,r.createSelector)((({visibility:e})=>e),(e=>e.setInputFocus))},"./src/javascripts/core/domains/visibility/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l,setShowInlineView:()=>c,visibilitySlice:()=>i});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/config/actions.ts"),n=s("./src/javascripts/core/domains/visibility/actions.ts");const a={visibility:s("./src/javascripts/core/domains/visibility/constants.ts").visibilityStates.initialize,showInlineView:!1,setInputFocus:!1},i=(0,r.createSlice)({name:"visibility",initialState:a,reducers:{setShowInlineView:e=>{e.showInlineView=!0}},extraReducers:e=>{e.addCase(n.setVisibility.fulfilled,((e,{payload:{visibility:t,setInputFocus:s}})=>{t&&(e.visibility=t,e.setInputFocus=Boolean(s))})).addCase(o.initializeConfig.fulfilled,((e,{payload:t})=>{t.connectWhenInView||(e.showInlineView=!t.connectWhenInView)}))}}),{setShowInlineView:c}=i.actions,l=i.reducer},"./src/javascripts/core/domains/visibility/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{calculateVisibility:()=>o});var r=s("./src/javascripts/core/domains/visibility/constants.ts");const o=({hasResponded:e,previousVisibility:t,requestedVisibility:s,config:o})=>{const{defaults:n,layoutMode:a,hideOnNoUserResponse:i}=o,{visible:c}=n||{};if("app"===a&&!t)return r.visibilityStates.open;if("window"===a&&i&&s!==r.visibilityStates.open)return e?s||t||r.visibilityStates.open:r.visibilityStates.hidden;if("inline"===a&&e&&!s)return t||r.visibilityStates.open;const l=r.visibilityStates.minimized;return s||t||c||l}},"./src/javascripts/core/lib/css.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{className:()=>o}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/config.ts");const o=(...e)=>e.flat().map((e=>"object"==typeof e?Object.entries(e).map((([e,t])=>t?e:"")).join(" "):e)).filter((e=>"string"==typeof e)).map((e=>e?.split(" "))).flat().filter((e=>e&&e.length)).map((e=>e&&e.indexOf(r.CSS_NAME)>-1?e:[r.CSS_NAME,e].join("-"))).join(" ")},"./src/javascripts/core/lib/debug.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=e=>(...t)=>console.debug(e,...t)},"./src/javascripts/core/lib/engine/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js");var r=s("./node_modules/minivents/dist/minivents.commonjs.min.js"),o=s.n(r),n=s("preact"),a=s("./src/javascripts/core/api/index.ts"),i=s("./src/javascripts/core/domains/app/actions.ts"),c=s("./src/javascripts/core/domains/config/actions.ts"),l=s("./src/javascripts/core/domains/config/slice.ts"),u=s("./src/javascripts/core/domains/store/index.ts"),d=s("./src/javascripts/core/domains/visibility/actions.ts"),p=s("./src/javascripts/core/ui/components/chat-app.tsx"),m=s("./src/javascripts/core/ui/components/core/seamly-core.tsx"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");class h{constructor(e,t){const{namespace:s="",parentElement:r,...n}=e;this.config={...n,namespace:s},this.namespace=s,this.parentElement=r,this.externalApi=t,this.api=new a.default({layoutMode:e.layoutMode,namespace:e.namespace,config:e.api,context:e.context}),this.eventBus=new(o()),this.functions={},this.registerFunctions({on:this.eventBus.on,off:this.eventBus.off}),this.eventBus.on("function.register",((e,t)=>this.registerFunction(e,t))),this.eventBus.on("function.unregister",((e,t)=>this.unregisterFunction(e,t)))}async render(){const{view:e,...t}=this.config.customComponents||{},s={...this.config,parentElement:this.parentElement,customComponents:Object.keys(t).length?t:void 0},r=(0,u.createStore)({api:this.api,eventBus:this.eventBus,config:s,initialState:void 0});r.dispatch((0,l.setConfig)(s)),await r.dispatch((0,c.initializeConfig)()),await r.dispatch((0,i.initializeApp)()),r.dispatch((0,d.initializeVisibility)()),e?(0,n.render)((0,f.jsx)(m.default,{eventBus:this.eventBus,store:r,api:this.api,children:(0,f.jsx)(e,{})}),this.parentElement):(0,n.render)((0,f.jsx)(p.default,{config:s,eventBus:this.eventBus,store:r,api:this.api}),this.parentElement)}destroy(){(0,n.render)(null,this.parentElement),this.eventBus.off(),this.api.disconnect(),this.functions={}}registerFunctions(e){Object.entries(e).forEach((([e,t])=>{this.registerFunction(e,t)}))}registerFunction(e,t){this.functions[e]=this.functions[e]||[],this.functions[e].push(t),this.externalApi.handleActions()}unregisterFunction(e,t){const s=this.functions[e];s&&s.length&&(this.functions[e]=s.filter((e=>e!==t)))}execFunction(e,...t){const s=this.functions[e];return!(!s||!s.length||(s.forEach((s=>{try{s(...t)}catch(t){console.error(`Action(${e}) failed: `,t)}})),0))}}},"./src/javascripts/core/lib/external-api/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("./src/javascripts/core/lib/engine/index.tsx"),o=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const n=e=>"object"==typeof e&&"action"in e,a=e=>({...e,args:Array.isArray(e.args)?e.args:[e.args]}),i=class{constructor(e){this._waitingActions=[],this._instances={},this.timeouts={},this.appConfig=e,this.context={}}push(...e){(e=e.filter(n).map(a)).length&&(this._waitingActions.push(...e),this.handleActions())}handleActions(){const e=this._waitingActions;this._waitingActions=[],e.forEach((e=>{switch(e.action){case"init":this.handleInit(e);break;case"destroy":this.handleDestroy(e);break;default:this.handleAction(e)||this.setContext(e.action,...e.args)||this._waitingActions.push(e)}}))}instanceInitializing(e){const t=Object.keys(this._instances);return!e&&t.length>0||t.includes(e)}setContext(e,t){const{instance:s}=t;if(this.instanceInitializing(s))return!1;switch(e){case"setTopic":const{name:e}=t;return e&&(this.context.topic=e),!0;case"setTranslation":const{enabled:s,locale:r}=t;return s&&r&&(this.context.userLocale=r,this.context.source=o.sourceTypes.windowApi),!0;case"setContext":const{userLocale:n,contentLocale:a}=t;return this.context.userLocale=n,this.context.contentLocale=a,n&&n!=this.appConfig?.userLocale&&(this.context.source=o.sourceTypes.windowApi),!0;case"setVariables":return Object.keys(t).length>0&&(this.context.variables={...t}),!0;default:return!1}}handleInit(e){const t=this.getUserConfig(...e.args),s=this.getCombinedConfig(t),{parentElement:r,namespace:o}=s||t;if(o?Object.values(this._instances).forEach((e=>{e.parentElement!==r&&e.namespace!==o||this.destroy(e)})):this.destroy(),s){const e=this.createInstance(s);this._instances[s.namespace]=e,this.context={},this.debouncedRender(e,s.namespace)}}handleDestroy(e){this.destroy(e.instance)}handleAction(e){const{action:t,instance:s,args:r}=e,o=Object.values(this._instances);return!s&&o.length>1&&console.warn(`Multiple instances detected. Due to potential race conditions, it is recommended to target a specific instance with the action: ${t}`),o.map((e=>(!s||e.namespace===s)&&e.execFunction(t,...r))).some(Boolean)}createInstance(e){return new r.default(e,this)}debouncedRender(e,t){window.clearTimeout(this.timeouts[t]),this.timeouts[t]=window.setTimeout((()=>{e.render()}),100)}destroy(e){e?("string"==typeof e&&(e=this._instances[e]),e&&(e.destroy(),delete this._instances[e.namespace])):Object.entries(this._instances).forEach((([e,t])=>{t.destroy(),delete this._instances[e]}))}getUserConfig(e={}){return e}getCombinedConfig(e){const t={...e.context||this.appConfig.context,...this.context},s=this.getMergedVariables(e);Object.keys(s).length>0&&(t.variables=s);const r={...this.appConfig.defaults,...e.defaults},o={...this.appConfig,...e,api:{...this.appConfig.api,...e.api},context:Object.keys(t).length?t:void 0,defaults:Object.keys(r).length?r:void 0};return"function"==typeof this.appConfig?this.appConfig(o):o}getMergedVariables(e){return{...this.appConfig.context?.variables||{},...e.context?.variables||{},...this.context.variables||{}}}}},"./src/javascripts/core/lib/external-api/initialize-api.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/lib/external-api/index.ts");function o(e){if(window.seamly&&!Array.isArray(window.seamly))throw new Error("Seamly UI has already been initialised. Use the window.seamly object to start new instances instead.");const t=Array.isArray(window.seamly)?window.seamly:[],s=new r.default(e);window.seamly={push:s.push.bind(s)},s.push(...t)}},"./src/javascripts/core/lib/id.ts":(e,t,s)=>{"use strict";function r(){return`_${(Number(String(Math.random()).slice(2))+Date.now()+Math.round(performance.now())).toString(36)}`}s.r(t),s.d(t,{randomId:()=>r})},"./src/javascripts/core/lib/split-url-params.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");const r=e=>{const t=e.indexOf("?");return t<0?{url:e,params:{}}:{url:e.slice(0,t),params:e.slice(t+1).split("&").reduce((function(e,t){const[s,r]=t.split("=");return{...e,[s]:decodeURIComponent(r)}}),{})}}},"./src/javascripts/core/lib/store/index.ts":(e,t,s)=>{"use strict";function r(e,t){const s=t(e),r=s.get()||{};return{get:e=>void 0===e?r:r[e],set:(e,t)=>(r[e]=t,s.set(r),t),delete(e){const t=this.get(e);return delete r[e],s.set(r),t}}}s.r(t),s.d(t,{objectStore:()=>r})},"./src/javascripts/core/lib/store/providers/app-storage.ts":(e,t,s)=>{"use strict";function r(){return{get:()=>{if(window.hasOwnProperty("SeamlyBridge"))try{return JSON.parse(SeamlyBridge.getData())}catch(e){return console.error("Unexpected or malformed data retrieved from bridge",e),{}}return window.seamlyBridgeData},set:e=>{window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.seamlyBridge&&window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(e)),window.hasOwnProperty("SeamlyBridge")&&SeamlyBridge.setData(JSON.stringify(e)),window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify(e))}}}s.r(t),s.d(t,{default:()=>r})},"./src/javascripts/core/lib/store/providers/cookie-storage.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/js-cookie/dist/js.cookie.mjs");function o(e={}){return function(t){const s=`cvco.${t}`;return{get(){const e=r.default.get(s);return e?JSON.parse(e):null},set(t){t&&r.default.set(s,JSON.stringify(t),e)}}}}},"./src/javascripts/core/lib/store/providers/session-storage.ts":(e,t,s)=>{"use strict";function r(e){const t=`cvco.${e}`;return{get(){const e=[t,t.split(".").slice(0,-1).join(".")];let s;do{s=sessionStorage.getItem(e[0])}while(e.shift()&&!s);return s?JSON.parse(s):{}},set(e){e&&sessionStorage.setItem(t,JSON.stringify(e))}}}s.r(t),s.d(t,{default:()=>r})},"./src/javascripts/core/lib/url-helpers.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getSearchParamsByKeys:()=>n,getUrlSearchParams:()=>r,getUrlSearchString:()=>o,initResetSearchParams:()=>u,removeSearchParam:()=>c,replaceSearchParams:()=>l,setSearchParam:()=>a,setSearchParams:()=>i}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");const r=()=>{const e=new URLSearchParams(window.location.search);return Array.from(e.entries()).reduce(((e,[t,s])=>({...e,[t]:s})),{})},o=e=>new URLSearchParams(e).toString(),n=(...e)=>{const t=new URL(window.location.href);return e.reduce(((e,s)=>{const r=t.searchParams.get(s)||sessionStorage.getItem(s);return r&&(e[s]=r),e}),{})},a=(e,t)=>{const s=new URL(window.location.href),{searchParams:r}=s;r.set(e,t),s.search=r.toString(),window.location.href=s.toString()},i=e=>{const t=new URL(window.location.href),{searchParams:s}=t;Object.entries(e).forEach((([e,t])=>{s.set(e,t)})),t.search=s.toString(),window.location.href=t.toString()},c=(...e)=>{const t=new URL(window.location.href),{searchParams:s}=t;e.forEach((e=>s.delete(e))),t.search=s.toString(),window.history.replaceState({},"",t)},l=(...e)=>{const t=new URL(window.location.href),s=e.reduce(((e,s)=>{const r=t.searchParams.get(s),o=r||sessionStorage.getItem(s);return r&&sessionStorage.setItem(s,r),o?(e.set(s,o),e):e}),new URLSearchParams),r=new URLSearchParams({...Object.fromEntries(t.searchParams),...Object.fromEntries(s)});return r.toString()&&window.history.replaceState(null,"",`?${r}`),n(...s.keys())},u=(...e)=>{const t=document.querySelector("[data-reset-search-params]");t&&t.addEventListener("click",(t=>{t.preventDefault();const s=new URL(window.location.href);e.forEach((e=>{sessionStorage.removeItem(e),s.searchParams.delete(e)})),window.location.href=s.toString()}))}},"./src/javascripts/core/ui/components/app-options/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var r=s("./node_modules/react-redux/dist/react-redux.mjs"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/interrupt/selectors.ts"),a=s("./src/javascripts/core/domains/translations/components/options-button.tsx"),i=s("./src/javascripts/core/domains/translations/hooks.ts"),c=s("./src/javascripts/core/lib/css.ts"),l=s("./src/javascripts/core/ui/components/layout/icon.tsx"),u=s("./src/javascripts/core/ui/components/options/options-button.tsx"),d=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),p=s("./node_modules/preact/compat/jsx-runtime.mjs");function m(){const{menuOptions:e,allowOptionSelection:t}=(0,d.useSeamlyOptions)(),{isAvailable:s}=(0,i.useTranslations)(),m=(0,r.useSelector)(n.selectHasError),{t:f,userLocale:h}=(0,o.useI18n)(),v=(0,i.useLocaleNativeName)(h);if(!s&&(!t||!e.length)||m)return null;const y=f("translations.settings.openButtonText",{hasLanguage:!!v,language:v});return(0,p.jsxs)("div",{className:(0,c.className)("chat__options"),children:[s&&(0,p.jsx)("div",{className:(0,c.className)("chat__options-item","chat__options-item--left"),children:(0,p.jsxs)(a.default,{classNames:["button--secondary"],children:[(0,p.jsx)(l.default,{alt:y,name:"newTranslation",size:"16"}),(0,p.jsx)("span",{className:(0,c.className)("button__text"),children:y})]})}),t&&(0,p.jsx)("div",{className:(0,c.className)("chat__options-item","chat__options-item--right"),children:(0,p.jsx)(u.default,{})})]})}},"./src/javascripts/core/ui/components/chat-app.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/ui/components/core/seamly-core.tsx"),o=s("./src/javascripts/core/ui/components/view/index.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=e=>(0,n.jsx)(r.default,{...e,children:(0,n.jsx)(o.default,{})})},"./src/javascripts/core/ui/components/chat-status/chat-status-action.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/layout/icon.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({handleClick:e,icon:t,title:s,srButtonText:a})=>(0,n.jsxs)("button",{type:"button",onClick:e,className:(0,r.className)("button","button--primary","chat-status__button"),children:[(0,n.jsx)(o.default,{name:t,size:"16",alt:""}),s,a&&(0,n.jsx)("span",{className:(0,r.className)("visually-hidden"),children:a})]})},"./src/javascripts/core/ui/components/chat-status/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/layout/icon.tsx"),n=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=({children:e,handleClose:t,title:s,closeButtonText:i,srCloseButtonText:c,id:l})=>{const u=(0,n.useGeneratedId)();return(0,a.jsxs)("section",{tabIndex:-1,id:l,"aria-labelledby":s?u:void 0,className:(0,r.className)("chat-status",s?void 0:"chat-status--condensed"),children:[(0,a.jsxs)("div",{className:(0,r.className)("chat-status__body"),children:[s?(0,a.jsx)("h2",{className:(0,r.className)("chat-status__title"),id:u,children:s}):null,e]}),"function"==typeof t&&(0,a.jsxs)("button",{type:"button",onClick:t,className:(0,r.className)("button","button--tertiary","chat-status__close"),children:[i||(0,a.jsx)(o.default,{name:"close",size:"16",alt:""}),c&&(0,a.jsx)("span",{className:(0,r.className)("visually-hidden"),children:c})]})]})}},"./src/javascripts/core/ui/components/conversation/component-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=(0,s("preact").createContext)(null)},"./src/javascripts/core/ui/components/conversation/component-filter.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/ui/components/conversation/component-context.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/card-message.tsx"),i=s("./src/javascripts/core/ui/components/conversation/event/carousel-message/index.tsx"),c=s("./src/javascripts/core/ui/components/conversation/event/choice-prompt.tsx"),l=s("./src/javascripts/core/ui/components/conversation/event/conversation-suggestions.tsx"),u=s("./src/javascripts/core/ui/components/conversation/event/cta.tsx"),d=s("./src/javascripts/core/ui/components/conversation/event/divider/index.tsx"),p=s("./src/javascripts/core/ui/components/conversation/event/divider/variants/time-indicator.tsx"),m=s("./src/javascripts/core/ui/components/conversation/event/image.tsx"),f=s("./src/javascripts/core/ui/components/conversation/event/participant.tsx"),h=s("./src/javascripts/core/ui/components/conversation/event/splash.tsx"),v=s("./src/javascripts/core/ui/components/conversation/event/text.tsx"),y=s("./src/javascripts/core/ui/components/conversation/event/translation.tsx"),j=s("./src/javascripts/core/ui/components/conversation/event/upload.tsx"),g=s("./src/javascripts/core/ui/components/conversation/event/video.tsx"),b=s("./node_modules/preact/compat/jsx-runtime.mjs");const x={message:{choice_prompt:c.default,text:v.default,image:m.default,splash:h.default,video:g.default,upload:j.default,cta:u.default,carousel:i.default,card:a.default},info:{text:v.default,divider:d.default,translation:y.default,timeIndicator:p.default},participant:{participant:f.default},service_data:{suggestion:l.default}},_=({children:e})=>{const{customComponents:t}=(0,o.useConfig)(),s=(0,r.useMemo)((()=>Object.keys(x).reduce(((e,s)=>(e[s]={...x[s],...t?t[s]:{}},e)),{fallback:v.default})),[t]);return(0,b.jsx)(n.default.Provider,{value:s,children:e})}},"./src/javascripts/core/ui/components/conversation/conversation.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/layout/privacy-disclaimer.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/use-debounce.ts"),u=s("./src/javascripts/core/ui/components/entry/abort-transaction-button/abort-transaction-button.tsx"),d=s("./src/javascripts/core/ui/components/conversation/component-filter.tsx"),p=s("./src/javascripts/core/ui/components/conversation/event/event.tsx"),m=s("./src/javascripts/core/ui/components/conversation/loader.tsx"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");const h=()=>{const e=(0,c.useEvents)();let t;return(0,f.jsx)(f.Fragment,{children:e.map((e=>{const{type:s,payload:r}=e;let o=!1;if("info"===s||"message"===s){const{participant:s,fromClient:n}=r,a=n?"seamly-client-participant":s;"info"!==e.type&&t!==a&&(o=!0),t=a}return(0,f.jsx)(p.default,{event:e,newParticipant:o},e.payload.key||e.payload.id)}))})},v=()=>{const{t:e}=(0,r.useI18n)(),t=(0,i.useSeamlyIsLoading)(),s=(0,l.default)(t,t?0:20),{isOpen:c}=(0,o.useVisibility)(),p=(0,i.useSkiplink)(),v=(0,i.useSkiplinkTargetFocusing)();return(0,f.jsxs)(f.Fragment,{children:[c&&(0,f.jsx)("a",{className:(0,n.className)("skip-link"),href:`#${p}`,onClick:e=>{e.preventDefault(),v()},children:e("skiplinkText")}),(0,f.jsx)("div",{className:(0,n.className)("chat__body"),children:(0,f.jsxs)("div",{className:(0,n.className)("conversation__container"),children:[(0,f.jsx)(a.default,{}),(0,f.jsxs)("ol",{className:(0,n.className)("conversation"),role:"log","aria-label":e("chat.srLabel"),children:[(0,f.jsx)(d.default,{children:(0,f.jsx)(h,{})}),s?(0,f.jsx)(m.default,{}):null,(0,f.jsx)(u.default,{})]})]})})]})}},"./src/javascripts/core/ui/components/conversation/event-divider.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/layout/icon.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({children:e,className:t,graphicSrc:s,graphicType:a="icon",iconName:i,iconSize:c,iconClassName:l,dividerType:u,title:d,description:p})=>{const m=Boolean(i||s);return(0,n.jsxs)("div",{className:(0,r.className)("divider",u&&`divider--type-${u}`,t),children:[m&&(0,n.jsx)("span",{className:(0,r.className)("divider__graphic"),children:i?(0,n.jsx)(o.default,{name:i,size:c,className:l,alt:""}):(0,n.jsx)("img",{src:s||void 0,className:(0,r.className)({icon:"icon"===a,avatar:"avatar"===a},l)})}),(0,n.jsxs)("div",{className:(0,r.className)("divider__body"),children:[d?(0,n.jsx)("h2",{className:(0,r.className)("divider__title"),dangerouslySetInnerHTML:{__html:d}}):null,p?(0,n.jsx)("p",{className:(0,r.className)("divider__description"),dangerouslySetInnerHTML:{__html:p}}):null,e]})]})}},"./src/javascripts/core/ui/components/conversation/event/card-component.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),a=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({id:e,action:t,buttonText:s,description:c,hasFocus:l,image:u,title:d,isCarouselItem:p})=>{const m=(0,r.useRef)(null),{sendMessage:f,sendAction:h,emitEvent:v}=(0,n.useSeamlyCommands)(),y=(0,n.useGeneratedId)(),j=(0,r.useRef)(!1),g=t?.type===a.cardTypes.navigate?"a":"button",b=(0,r.useCallback)((()=>v(`action.${a.actionTypes.clickCard}`,{type:a.actionTypes.clickCta,originMessage:e,action:t})),[v,e,t]),x=(0,r.useCallback)((()=>{if(b(),t?.type===a.cardTypes.ask)f({body:t?.ask});else if(t?.type===a.cardTypes.topic){const{topic:e,fallbackMessage:s}=t;h({type:a.actionTypes.setTopic,body:{name:e,fallbackMessage:s}})}}),[f,t,h,b]),_=(0,r.useMemo)((()=>t?.type===a.cardTypes.navigate?{href:t?.link,rel:"noopener noreferrer",target:t?.newTab?"_blank":"_self",onClick:b}:{onClick:x}),[t,x,b]);return(0,r.useEffect)((()=>{p&&(l&&j.current?window.requestAnimationFrame((()=>m.current?.focus())):m.current?.blur()),j.current=!0}),[l,p]),(0,i.jsxs)("div",{className:(0,o.className)("card__wrapper"),id:e,tabIndex:-1,ref:m,children:[u?(0,i.jsx)("img",{className:(0,o.className)("card__image"),src:u,alt:""}):null,(0,i.jsxs)("div",{className:(0,o.className)("card__content"),id:e,children:[d&&(0,i.jsx)("h2",{className:(0,o.className)("card__title"),children:d}),c&&(0,i.jsx)("div",{className:(0,o.className)("card__description"),dangerouslySetInnerHTML:{__html:c}}),(0,i.jsx)(g,{tabIndex:p&&!l?-1:void 0,className:(0,o.className)("button","button--primary"),"aria-describedby":y,..._,children:s})]})]})}},"./src/javascripts/core/ui/components/conversation/event/card-message.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/card-component.tsx"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({event:e})=>{const{body:t}=(0,r.useTranslatedEventData)(e),s=(0,n.useGeneratedId)();return(0,i.jsx)(o.default,{type:"card",event:e,children:(0,i.jsx)(a.default,{id:s,...t})})}},"./src/javascripts/core/ui/components/conversation/event/carousel-component/components/controls.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/layout/icon.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i({items:e,currentIndex:t,onChange:s,children:i}){const{t:c}=(0,r.useI18n)(),l=e.length;return(0,a.jsxs)("div",{className:(0,o.className)("carousel-controls"),children:[(0,a.jsx)("button",{className:(0,o.className)("button","button--previous"),"aria-label":c("carousel.controls.previous"),onClick:()=>{s((t-1+l)%l)},children:(0,a.jsx)(n.default,{name:"arrowLeft",size:"16",alt:""})}),i,(0,a.jsx)("button",{className:(0,o.className)("button","button--next"),"aria-label":c("carousel.controls.next"),onClick:()=>{s((t+1)%l)},children:(0,a.jsx)(n.default,{name:"arrowRight",size:"16",alt:""})})]})}},"./src/javascripts/core/ui/components/conversation/event/carousel-component/components/pagination.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");function a({items:e,currentIndex:t,onChange:s,getItemKey:a,getItemLabel:i}){const c=e.length,l=(0,r.useCallback)((e=>{const r=Number(e.target.dataset.item||"0"),o=Math.min(c-1,Math.max(0,r));o!==t&&s(o)}),[c,t,s]);return(0,n.jsx)("div",{className:(0,o.className)("carousel-pagination__wrapper"),role:"group",children:(0,n.jsx)("ul",{className:(0,o.className)("carousel-pagination"),children:e.map(((e,s)=>{const r=t===s;return(0,n.jsx)("li",{className:(0,o.className)("carousel-pagination__item",r?"is-active":void 0),children:(0,n.jsx)("button",{className:(0,o.className)("carousel-pagination__button"),type:"button",onClick:l,"data-item":s,"aria-disabled":r?"true":void 0,"aria-label":i(e,s)})},a(e,s,"pagination-item-"))}))})})}},"./src/javascripts/core/ui/components/conversation/event/carousel-component/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("preact"),o=s("preact/hooks"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/carousel-message/components/slide.tsx"),i=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),c=s("./src/javascripts/core/ui/components/conversation/event/carousel-component/components/controls.tsx"),l=s("./src/javascripts/core/ui/components/conversation/event/carousel-component/components/pagination.tsx"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=(e,t,s)=>`${s}${t}`,p=e=>e.label,m=({target:e})=>{e.scrollLeft=0};function f({currentIndex:e=0,onChange:t=()=>{},getItemKey:s=d,getItemLabel:f=p,items:h}){const v=(0,i.useGeneratedId)(),y=h.length,[j,g]=(0,o.useState)(Number(e||0));(0,o.useEffect)((()=>{g(Number(e||0))}),[g,e]);const b=(0,o.useRef)([]);b.current=(0,o.useMemo)((()=>Array(y).fill(1).map((()=>(0,r.createRef)()))),[y]);const x=(0,o.useRef)(!0),_=(0,o.useRef)(null);return _.current=t,(0,o.useEffect)((()=>{x.current?x.current=!1:_.current&&_.current(j)}),[j]),(0,u.jsxs)("div",{className:(0,n.className)("carousel"),role:"group","aria-roledescription":"carousel",children:[(0,u.jsx)("div",{className:(0,n.className)("carousel__slides-wrapper"),onScroll:m,children:(0,u.jsx)("div",{id:v,className:(0,n.className)("carousel__slides"),style:{width:100*y+"%",left:-100*j+"%"},"aria-live":"polite","aria-atomic":"false",children:h.map(((e,t)=>{const r=j===t;return(0,u.jsx)("div",{ref:b.current[t],className:(0,n.className)("carousel__slide",r?"is-active":void 0),"aria-hidden":r?void 0:"true",children:(0,u.jsx)(a.default,{item:e,items:h,index:t,isActive:r})},s(e,t,"item-"))}))})}),(0,u.jsx)("div",{className:(0,n.className)("carousel__controls"),children:(0,u.jsx)(c.default,{currentIndex:j,items:h,onChange:g,children:(0,u.jsx)("div",{className:(0,n.className)("carousel__pagination"),children:(0,u.jsx)(l.default,{currentIndex:j,items:h,onChange:g,getItemKey:s,getItemLabel:f})})})})]})}},"./src/javascripts/core/ui/components/conversation/event/carousel-message/components/slide.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/conversation/event/card-component.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i({item:e,items:t,index:s,isActive:i}){const{t:c}=(0,r.useI18n)();return(0,a.jsx)("div",{className:(0,o.className)("carousel-item",`carousel-item--${e.type}`),role:"group","aria-roledescription":"slide","aria-label":c("carousel.slide.label",{index:s+1,total:t.length}),children:(0,a.jsx)(n.default,{...e,isCarouselItem:!0,hasFocus:i})})}},"./src/javascripts/core/ui/components/conversation/event/carousel-message/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/event/carousel-component/index.tsx"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=(e,t,s="")=>`${s}${e.title}:${t}`,c=e=>e.title,l=({event:e})=>{const{body:t}=(0,r.useTranslatedEventData)(e),s=t.cards;return(0,a.jsx)(n.default,{event:e,modifiers:"type-carousel",children:(0,a.jsx)(o.default,{items:s,getItemKey:i,getItemLabel:c})})}},"./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i,useChatScrollContext:()=>a});var r=s("preact"),o=s("preact/hooks");const n=(0,r.createContext)(null),a=()=>{const e=(0,o.useContext)(n);if(!e)throw new Error("useChatScrollContext has to be used within <ChatScrollContext.Provider>");return e},i=n},"./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-provider.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("preact"),o=s("preact/hooks"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-context.ts"),i=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/unread-messages-button.tsx"),c=s("./src/javascripts/core/ui/components/conversation/use-chat-scroll.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=({children:e})=>{const t=(0,l.useEvents)(),s=(0,o.useMemo)((()=>t.reduce(((e,t)=>t.payload.id?(e[t.payload.id]=(0,r.createRef)(),e):e),{})),[t]),{scrollToRef:d,scrollToBottom:p,containerRef:m,unreadIds:f}=(0,c.default)(s);return(0,u.jsx)(a.default.Provider,{value:{eventRefs:s,unreadIds:f,scrollToRef:d,scrollToBottom:p,containerRef:m},children:(0,u.jsxs)("div",{className:(0,n.className)("chat__container"),children:[(0,u.jsx)("div",{className:(0,n.className)("chat__container__scroll-area"),ref:m,children:e}),(0,u.jsx)(i.default,{})]})})}},"./src/javascripts/core/ui/components/conversation/event/chat-scroll/unread-messages-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-context.ts"),i=s("./src/javascripts/core/ui/components/layout/icon.tsx"),c=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=()=>{const{scrollToRef:e,unreadIds:t}=(0,a.useChatScrollContext)(),{isMinimized:s}=(0,o.useVisibility)(),{t:u}=(0,r.useI18n)();return(0,l.jsx)(c.default,{isActive:!!t.length&&!s,children:(0,l.jsx)("div",{className:(0,n.className)("unread-messages"),children:(0,l.jsxs)("button",{type:"button",className:(0,n.className)("button","button--primary"),onClick:e,children:[u("message.unreadMessagesCount",{unreadCount:t.length}),(0,l.jsx)(i.default,{name:"chevronDown",size:"32",alt:""})]})})})}},"./src/javascripts/core/ui/components/conversation/event/choice-prompt.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y,useChoicePrompt:()=>v}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("preact"),o=s("preact/hooks"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/translations/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("./src/javascripts/core/lib/id.ts"),l=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),u=s("./src/javascripts/core/ui/components/layout/icon.tsx"),d=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),m=s("./src/javascripts/core/ui/utils/general-utils.ts"),f=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),h=s("./node_modules/preact/compat/jsx-runtime.mjs");const v=e=>{const{payload:t}=e,[s,r]=(0,o.useState)(!1),{addMessageBubble:n,emitEvent:i,sendAction:l}=(0,p.useSeamlyCommands)(),u=(0,d.useSeamlyHasConversation)(),{activeServiceSessionId:m}=(0,p.useSeamlyServiceInfo)(),h=(0,p.useLastMessageEventId)(),{body:v}=(0,a.useTranslatedEventData)(e),{service:y}=t,j=(0,o.useMemo)((()=>{if("choice_prompt"===e.payload.type)return{...e,payload:{...e.payload,body:e.payload.body?.prompt,translatedBody:e.payload.translatedBody&&{...e.payload.translatedBody,data:e.payload.translatedBody?.prompt}}}}),[e]),g=v?.chooseAgain&&m===y?.serviceSessionId&&t.id!==h;return(0,o.useEffect)((()=>{r(t.id===h)}),[t,h]),{body:v,subEvent:j,showOptions:s,chooseAgain:g,onChoiceClickHandler:e=>{if(!u())return;const s=(0,c.randomId)(),o={type:f.actionTypes.pickChoice,originMessage:t.id,choice:{chooseAgain:g,id:e.id},transactionId:s};n(e.text,s),l(o),r(!1),i(`action.${o.type}`,{...o,choice:{...o.choice,text:e.text}})},onChooseAgainClickHandler:()=>{r((e=>!e))}}},y=({event:e,children:t,...s})=>{const{t:o}=(0,n.useI18n)(),a=(0,p.useGeneratedId)(),{body:c,subEvent:d,showOptions:f,chooseAgain:y,onChoiceClickHandler:j,onChooseAgainClickHandler:g}=v(e);return(0,h.jsxs)(h.Fragment,{children:[(0,r.toChildArray)(t).filter(m.childIsVNode).map((e=>(e.props={...e.props,event:d,descriptorId:a,showTranslationToggle:!1},e))),y&&(0,h.jsxs)("button",{type:"button",className:(0,i.className)("button","button--secondary","button--choose-again"),"aria-expanded":f?"true":"false",onClick:g,"aria-describedby":a,children:[o(f?"message.choicePrompts.cancelChooseAgain":"message.choicePrompts.chooseAgain"),(0,h.jsx)(u.default,{name:"chevronDown",size:"8",alt:""})]}),f&&(0,h.jsx)(l.default,{type:"choice-prompt",showParticipant:!1,event:e,...s,children:(0,h.jsx)("ul",{className:(0,i.className)("choice-prompt","choice-prompt--many"),children:c?.choices?.map((e=>(0,h.jsx)("li",{className:(0,i.className)("choice-prompt__item",{[`choice-prompt__item--${e?.category}`]:!!e.category}),children:(0,h.jsx)("button",{type:"button",className:(0,i.className)("button","button--primary"),onClick:()=>{j(e)},children:e.text})},e.id)))})})]})}},"./src/javascripts/core/ui/components/conversation/event/conversation-suggestions.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g,useSuggestions:()=>j}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/app/hooks.ts"),n=s("./src/javascripts/core/domains/app/slice.ts"),a=s("./src/javascripts/core/domains/config/hooks.ts"),i=s("./src/javascripts/core/domains/i18n/hooks.ts"),c=s("./src/javascripts/core/domains/store/index.ts"),l=s("./src/javascripts/core/domains/translations/hooks.ts"),u=s("./src/javascripts/core/lib/css.ts"),d=s("./src/javascripts/core/lib/id.ts"),p=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),m=s("./src/javascripts/core/ui/components/suggestions/suggestions-list.tsx"),f=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),h=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),v=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),y=s("./node_modules/preact/compat/jsx-runtime.mjs");const j=e=>{const{payload:t}=e,{body:s}=(0,l.useTranslatedEventData)(e);return{suggestions:s,payload:t}},g=({event:e,...t})=>{const[s,l]=(0,r.useState)(!0),g=(0,c.useAppDispatch)(),b=(0,o.useUserHasResponded)(),{addMessageBubble:x,emitEvent:_,sendAction:w}=(0,h.useSeamlyCommands)(),S=(0,f.useSeamlyHasConversation)(),{suggestions:k,payload:C}=j(e),{showSuggestions:E}=(0,a.useConfig)(),T=(0,h.useEvents)(),{t:N}=(0,i.useI18n)(),I=N("suggestions.headingText"),O=N("suggestions.footerText"),A=(0,r.useMemo)((()=>T.some((({payload:e,type:t})=>"message"===t&&e?.transactionLast))),[T]),P=(0,r.useCallback)((({id:e,question:t})=>{if(!S())return;l(!1),g((0,n.setHasResponded)(!0));const s=(0,d.randomId)(),r={type:v.actionTypes.custom,originMessage:C.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:t}},transactionId:s};w(r),x(t,s),_(`action.${r.type}`,r)}),[x,g,_,S,C.id,w]);return s&&!b&&A&&E?(0,y.jsxs)("div",{className:(0,u.className)("suggestions","suggestions--conversation"),children:[I&&(0,y.jsx)("p",{className:(0,u.className)("suggestions__heading"),children:I}),(0,y.jsxs)(p.default,{type:"suggestions",showParticipant:!1,event:e,...t,children:[(0,y.jsx)(m.default,{className:"suggestions__list--conversation",onClickSuggestion:P,suggestions:k}),O&&(0,y.jsx)("p",{className:(0,u.className)("suggestions__footer"),children:O})]})]}):null}},"./src/javascripts/core/ui/components/conversation/event/cta.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/translations/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),l=s("./src/javascripts/core/ui/components/conversation/event/hooks/use-event-link-click-handler.ts"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=({event:e})=>{const{body:t}=(0,o.useTranslatedEventData)(e),s=(0,l.default)({originMessage:e.payload.id,transactionId:e.payload.transactionId}),{emitEvent:d}=(0,i.useSeamlyCommands)(),p=(0,i.useGeneratedId)(),m=(0,r.useCallback)((()=>d(`action.${c.actionTypes.clickCta}`,{type:c.actionTypes.clickCta,originMessage:e.payload.id,link:{url:t?.buttonLink}})),[d,t,e]);return(0,u.jsxs)(a.default,{type:"cta",event:e,children:[(0,u.jsx)("div",{className:(0,n.className)("cta__content"),id:p,dangerouslySetInnerHTML:t?.description?{__html:t.description}:void 0,onClick:s}),(0,u.jsx)("a",{className:(0,n.className)("button","button--primary"),"aria-describedby":p,href:t?.buttonLink,rel:"noreferrer",target:t?.buttonNewTab?"_blank":"_self",onClick:m,children:t?.buttonText})]})}},"./src/javascripts/core/ui/components/conversation/event/divider/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),o=s("./src/javascripts/core/ui/components/conversation/event/divider/variants/default.tsx"),n=s("./src/javascripts/core/ui/components/conversation/event/divider/variants/new-translation.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i={default:o.default,[r.dividerKeys.new_translation]:n.default},c=({event:e,...t})=>{const s=i[r.dividerKeys[e.payload.body.subtype]]||i.default;return(0,a.jsx)(s,{event:e,...t})}},"./src/javascripts/core/ui/components/conversation/event/divider/variants/default.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/event-divider.tsx"),n=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i={[n.dividerKeys.new_topic]:"new-topic"},c=({event:e})=>{const{t}=(0,r.useI18n)(),{subtype:s}=e.payload.body,c=i[n.dividerKeys[s]];return n.dividerKeys[s]?(0,a.jsx)(o.default,{dividerType:c,iconName:n.dividerKeys[s],title:t(`dividerKeys.${n.dividerKeys[s]}`)}):null}},"./src/javascripts/core/ui/components/conversation/event/divider/variants/new-translation.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/store/index.ts"),i=s("./src/javascripts/core/domains/translations/slice.ts"),c=s("./src/javascripts/core/lib/css.ts"),l=s("./src/javascripts/core/ui/components/conversation/event-divider.tsx"),u=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=({event:e})=>{const{t}=(0,n.useI18n)(),s=(0,u.useEvents)(),{body:{translationEnabled:p,text:m,title:f},id:h}=e.payload,v=(0,o.useSelector)((e=>e.translations.translatedEventGroups)),y=(0,a.useAppDispatch)(),j=(0,r.useCallback)((()=>{v[h]?y((0,i.enableEventsTranslation)({events:s,id:h})):y((0,i.disableEventsTranslation)({events:s,id:h}))}),[y,s,h,v]);return(0,d.jsx)(l.default,{iconName:"newTranslation",dividerType:"new-translation",title:f,description:m,children:p?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("button",{className:(0,c.className)("button","button--secondary"),onClick:j,children:t(v[h]?"translations.toggle.showTranslationsButtonText":"translations.toggle.hideTranslationsButtonText")})}):null})}},"./src/javascripts/core/ui/components/conversation/event/divider/variants/time-indicator.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/conversation/event/hooks/use-formatted-date.ts"),a=s("./src/javascripts/core/ui/components/conversation/event-divider.tsx"),i=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),c=s("./src/javascripts/core/ui/utils/general-utils.ts"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=({event:e})=>{const t=(0,i.useForceUpdate)(),{date:s,time:u,timeUntilMidnight:d,srText:p}=(0,n.useFormattedDate)((0,c.microsecondsToMilliseconds)(e.payload.timeIndicator));return(0,r.useEffect)((()=>{const e=setTimeout((()=>{t()}),d);return()=>{clearTimeout(e)}}),[t,d]),(0,l.jsxs)(a.default,{dividerType:"time-indicator",children:[(0,l.jsxs)("h2",{className:(0,o.className)("divider__time"),"aria-hidden":"true",children:[(0,l.jsx)("span",{className:(0,o.className)("divider__time--date"),children:s}),(0,l.jsx)("span",{className:(0,o.className)("divider__time--time"),children:u})]}),(0,l.jsx)("p",{className:(0,o.className)("visually-hidden"),children:p})]})}},"./src/javascripts/core/ui/components/conversation/event/event-participant.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({eventPayload:e})=>{const{t}=(0,o.useI18n)(),{fromClient:s,participant:c}=e,l=(0,a.useSeamlyParticipant)(c)||{},{messages:u}=(0,r.useConfig)(),d=s?t("participants.user.name"):l&&l.name,{showAvatar:p,showName:m}=u&&u[s?"user":"agent"]||{};if(!p&&!m)return null;const f=[];return p&&d&&l.avatar&&f.push((0,i.jsx)("span",{className:(0,n.className)("message__avatar"),children:(0,i.jsx)("img",{src:l.avatar,className:(0,n.className)("avatar"),alt:""})})),m&&d&&f.push((0,i.jsx)("span",{className:(0,n.className)("message__author-name"),children:d})),f.length>0?(0,i.jsx)("div",{className:(0,n.className)("message__author"),children:f}):null}},"./src/javascripts/core/ui/components/conversation/event/event.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("preact/compat"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/store/slice.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-context.ts"),l=s("./src/javascripts/core/ui/components/conversation/event/divider/variants/time-indicator.tsx"),u=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),d=s("./src/javascripts/core/ui/hooks/use-event-component-mapping.ts"),p=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),m=s("./node_modules/preact/compat/jsx-runtime.mjs");const f=({event:e,newParticipant:t})=>{const{eventRefs:s,unreadIds:f}=(0,c.useChatScrollContext)(),{sendAction:h}=(0,u.useSeamlyCommands)(),v=e.payload.id?s[e.payload.id]:void 0,{containerRef:y,isVisible:j}=(0,a.useIntersect)({containerRef:v,freezeOnceVisible:!0}),g=(0,o.useAppDispatch)(),[b,x]=(0,d.default)(e);if((0,r.useEffect)((()=>{if(j&&f?.includes(e.payload.id)){const t=f.reduce(((t,s)=>e?.payload?.id&&s&&!t.includes(e.payload.id)?t.concat(s):t),[]);g((0,n.setEventsRead)(t)),h({type:p.actionTypes.read,events:t})}}),[g,e.payload.id,j,h,f]),!b)return null;const _=["conversation__item"];return"info"===e.type?_.push("conversation__item--source-info"):e.payload.fromClient?_.push("conversation__item--source-user"):_.push("conversation__item--source-agent"),t&&_.push("conversation__item--new-participant"),(0,m.jsxs)("li",{className:(0,i.className)(_),ref:y,children:[e.payload.timeIndicator&&(0,m.jsx)(l.default,{event:e}),(0,m.jsx)(b,{event:e,children:(0,m.jsx)(x,{event:e})})]})}},"./src/javascripts/core/ui/components/conversation/event/hooks/use-event-link-click-handler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),o=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const n=({originMessage:e,transactionId:t})=>{const{emitEvent:s,sendAction:n}=(0,r.useSeamlyCommands)();return r=>{if(r.target&&r.target.dataset.linkId){const a={type:o.actionTypes.navigate,originMessage:e,transactionId:t,link:{id:r.target.dataset.linkId,url:r.target.getAttribute("href")}};n(a),s(`action.${a.type}`,a)}}}},"./src/javascripts/core/ui/components/conversation/event/hooks/use-formatted-date.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useFormattedDate:()=>c});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/ui/utils/general-utils.ts");const a={month:"long",day:"numeric",year:"numeric"},i={hour:"numeric",minute:"numeric"},c=e=>{const{t}=(0,o.useI18n)(),s=(0,r.useConfig)(),c=s?.context?.userLocale??[],l=new Date(e),u=new Date,d=new Date(u);d.setHours(24,0,0,0);const p=d.valueOf()-u.valueOf(),m=l.toString(),f=new Intl.DateTimeFormat(c,i).format(l);let h=(0,n.getRelativeDate)(l,u);switch(h){case"today":h=t("dateTime.today");break;case"yesterday":h=t("dateTime.yesterday");break;default:h=new Intl.DateTimeFormat(c,a).format(l)}return{date:h,srText:t("dateTime.srText",{date:h,time:f}),time:f,fullDateTime:m,timeUntilMidnight:p}}},"./src/javascripts/core/ui/components/conversation/event/image-lightbox.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/layout/icon.tsx"),i=s("./src/javascripts/core/ui/components/widgets/lightbox.tsx"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=({description:e,url:t})=>{const{t:s}=(0,o.useI18n)(),[l,u]=(0,r.useState)(!1);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("button",{type:"button",className:(0,n.className)("modal__enlarge"),onClick:()=>{u(!0)},children:[s("message.image.srTextEnlargeButtonLabel",{description:e}),(0,c.jsx)(a.default,{name:"enlarge",size:"32",alt:""})]}),l&&(0,c.jsx)(i.default,{url:t,description:e,onClose:()=>{u(!1)}})]})}},"./src/javascripts/core/ui/components/conversation/event/image.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/store/slice.ts"),a=s("./src/javascripts/core/domains/translations/hooks.ts"),i=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),c=s("./src/javascripts/core/ui/components/conversation/event/image-lightbox.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=({event:e,descriptorId:t,...s})=>{const{body:u}=(0,a.useTranslatedEventData)(e),[d,p]=(0,r.useState)(!1),m=(0,o.useAppDispatch)();return(0,l.jsxs)(i.default,{event:e,type:"image",...s,children:[(0,l.jsx)("img",{src:u?.url,id:t,alt:u?.description||void 0,onLoad:()=>{m((0,n.setLoadedImageEventIds)(e.payload.id)),p(!0)}}),u?.isZoomable&&d&&(0,l.jsx)(c.default,{description:u?.description,url:u?.url})]})}},"./src/javascripts/core/ui/components/conversation/event/participant.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/event-divider.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({event:e})=>{const{participant:t}=e.payload,{body:s}=(0,r.useTranslatedParticipantData)(e);return s?(0,n.jsx)(o.default,{graphicSrc:t?.avatar,graphicType:t?.avatar?"avatar":void 0,iconName:t?.avatar?void 0:"balloon",dividerType:"participant",title:s}):null}},"./src/javascripts/core/ui/components/conversation/event/splash.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/event/hooks/use-event-link-click-handler.ts"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=({event:e,...t})=>{const{payload:s}=e,{body:i}=(0,r.useTranslatedEventData)(e),c=(0,o.default)({originMessage:s.id,transactionId:s.transactionId});return(0,a.jsx)(n.default,{type:"splash",event:e,onClick:c,...t,bodyProps:{dangerouslySetInnerHTML:{__html:i?.text||""}}})}},"./src/javascripts/core/ui/components/conversation/event/text.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/translations/hooks.ts"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./src/javascripts/core/ui/components/conversation/event/hooks/use-event-link-click-handler.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({event:e,...t})=>{const{body:s}=(0,o.useTranslatedEventData)(e),c=(0,a.default)({originMessage:e.payload.id,transactionId:e.payload.transactionId}),l=(0,r.useMemo)((()=>e.payload.optimisticallyInjected?{children:(0,i.jsx)("p",{children:s?.text})}:{bodyProps:{dangerouslySetInnerHTML:{__html:s?.text||""}}}),[s,e]);return(0,i.jsx)(n.default,{type:"text",event:e,onClick:c,...t,...l})}},"./src/javascripts/core/ui/components/conversation/event/translation.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/translations/hooks.ts"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=({event:e,...t})=>{const{t:s}=(0,r.useI18n)(),{body:i}=(0,o.useTranslatedEventData)(e);return(0,a.jsx)(n.default,{type:"text",event:e,...t,children:s(i.key.join("."),i.variables)})}},"./src/javascripts/core/ui/components/conversation/event/upload.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/translations/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),l=s("./src/javascripts/core/ui/components/layout/icon.tsx"),u=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p="PROCESSING_IMAGE",m=({img:e,filename:t})=>{const{t:s}=(0,n.useI18n)(),r=s("fileUpload.srFileUploadedText",{fileName:t});return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("span",{className:(0,i.className)(["download","download--preview"]),children:[(0,d.jsx)("img",{src:e,alt:r}),(0,d.jsx)("span",{"aria-hidden":"true",className:(0,i.className)("file-download"),children:t})]})})},f=({children:e,fileId:t,isDeleted:s,onClickHandler:r,url:o,target:n})=>t&&!s?(0,d.jsx)("button",{type:"button",onClick:r,className:(0,i.className)(["download","download-link"]),children:e}):o?(0,d.jsx)("a",{href:o,download:!0,target:n,className:(0,i.className)(["download","download-link"]),children:e}):(0,d.jsx)("span",{className:(0,i.className)("download"),children:e}),h=({event:e,...t})=>{const{t:s}=(0,n.useI18n)(),{body:h}=(0,a.useTranslatedEventData)(e),{fromClient:v,id:y}=e.payload,{filename:j,id:g,isDeleted:b,url:x}=h,_=(0,u.useSeamlyApiContext)(),w=(e=>{const{processingFileUploads:t}=(0,o.useSelector)((({state:e})=>e));return(0,r.useMemo)((()=>{if(t.some((t=>t===e)))return p;try{return sessionStorage.getItem(`image-${e}`)}catch(e){return}}),[e,t])})(y),S=(0,r.useMemo)((()=>s(b||!x&&!g?"fileUpload.srFileUploadedText":"fileUpload.srFileDownloadText",{fileName:j})),[x,g,j,b,s]);return(0,d.jsx)(c.default,{event:e,type:"upload",...t,children:w&&w!==p?(0,d.jsx)(m,{img:w,filename:j}):(0,d.jsxs)(f,{fileId:g,isDeleted:b,onClickHandler:()=>{g&&j&&_.downloadFile(g,j)},url:x,target:v?void 0:"_blank",children:[(0,d.jsx)(l.default,{name:"download",size:"16",alt:S}),(0,d.jsx)("span",{"aria-hidden":"true",className:(0,i.className)("file-download"),children:j})]})})}},"./src/javascripts/core/ui/components/conversation/event/video.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({event:e,descriptorId:t,...s})=>{const{body:c}=(0,r.useTranslatedEventData)(e);return(0,a.useSeamlyMessageContainerClassNames)(e).push("message--type-video"),(0,i.jsxs)(n.default,{event:e,type:"video",...s,children:[(0,i.jsx)("div",{id:t,className:(0,o.className)("visually-hidden"),children:c?.description}),(0,i.jsx)("iframe",{title:c?.description||"",src:c?.url,allow:"autoplay; encrypted-media",allowFullScreen:!0})]})}},"./src/javascripts/core/ui/components/conversation/loader.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),n=s("./src/javascripts/core/ui/components/conversation/event/event-participant.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=()=>{const{id:e}=(0,o.useSeamlyCurrentAgent)()||{};return(0,a.jsx)("li",{className:(0,r.className)("conversation__item","conversation__item--source-agent"),children:(0,a.jsxs)("div",{className:(0,r.className)("message","message--source-agent","message--type-loading"),children:[(0,a.jsx)(n.default,{eventPayload:{fromClient:!1,participant:e}}),(0,a.jsx)("div",{className:(0,r.className)("message__body"),children:(0,a.jsxs)("span",{className:(0,r.className)("loader"),children:[(0,a.jsx)("span",{className:(0,r.className)("loader__part","one")}),(0,a.jsx)("span",{className:(0,r.className)("loader__part","two")}),(0,a.jsx)("span",{className:(0,r.className)("loader__part","three")}),(0,a.jsx)("span",{className:(0,r.className)("loader__part","four")})]})})]})})}},"./src/javascripts/core/ui/components/conversation/message-container.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js");var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/hooks/component-helper-hooks.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/event-participant.tsx"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({showParticipant:e=!0,event:t,type:s,modifiers:c,children:l,bodyProps:u={},info:d,...p})=>{const m=(0,n.useSeamlyMessageContainerClassNames)(t),{hasTranslation:f,isTranslated:h,locale:v}=(0,r.useTranslatedEventData)(t);return s&&m.push(`message--type-${s}`),c&&("string"==typeof c&&(c=c.split(" ").filter((e=>e.length))),c.forEach((e=>{m.push(`message--${e}`)}))),h&&m.push("message--is-translated"),f&&m.push("message--has-translation"),h&&(u={...u,lang:v}),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:(0,o.className)(m),...p,children:[e&&(0,i.jsx)(a.default,{eventPayload:t.payload}),(0,i.jsx)("div",{className:(0,o.className)("message__body"),...u,children:l}),d&&(0,i.jsx)("div",{"aria-hidden":"true",className:(0,o.className)("message__info"),children:d})]})})}},"./src/javascripts/core/ui/components/conversation/use-chat-scroll.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/store/selectors.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const l=e=>{const t=(0,r.useRef)(null),[s,l]=(0,r.useState)(!0),u=(0,o.useSelector)(n.selectUnreadEventIds),d=(0,c.useEvents)(),p=(0,c.useSeamlyIsLoading)(),{isOpen:m}=(0,a.useVisibility)(),f=(0,c.useLoadedImageEventIds)(),{processingFileUploads:h,isLastEventFromClient:v}=(0,o.useSelector)((({state:e})=>e));(0,r.useEffect)((()=>{const e=t.current;if(!e)return()=>{};const s=()=>{const{scrollHeight:t,scrollTop:s,clientHeight:r}=e,o=Math.abs(t-s-r)>10;l(!o)};return e.addEventListener("scroll",s),()=>e.removeEventListener("scroll",s)}),[]);const y=(0,r.useCallback)((()=>{requestAnimationFrame((async()=>{await(0,i.timeout)(30),t.current?.scrollTo({top:t.current?.scrollHeight,left:0,behavior:"auto"})}))}),[]);return(0,r.useEffect)((()=>{v&&y()}),[v,y]),(0,r.useEffect)((()=>{s&&y()}),[s,u,d,p,m,f,h,y]),{containerRef:t,unreadIds:u,scrollToRef:()=>{const s=u.at(0);if(void 0!==s){const r=e[s]?.current;t.current?.scrollTo({top:r?.offsetTop,behavior:"auto",left:0})}},scrollToBottom:y}}},"./src/javascripts/core/ui/components/core/seamly-activity-event-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=(0,s("preact").createContext)(null)},"./src/javascripts/core/ui/components/core/seamly-activity-monitor.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("preact/hooks"),o=s("./src/javascripts/core/config.ts"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),l=s("./src/javascripts/core/ui/components/core/seamly-activity-event-context.ts"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=({children:e})=>{const{isMinimized:t}=(0,n.useVisibility)(),s=(0,r.useRef)(0),{sendAction:d}=(0,i.useSeamlyCommands)(),{hasCountdown:p,isActive:m,stopCountdown:f}=(0,i.useSeamlyIdleDetachCountdown)(),h=(0,r.useCallback)((()=>{if(t)return;const e=(new Date).getTime(),r=()=>{d({type:c.actionTypes.interactivityUpdate}),s.current=e};p&&m&&(r(),f()),e-s.current>o.activitySendDelay&&r()}),[d,p,m,f,t]);return(0,u.jsx)("div",{className:(0,a.className)("activity-monitor"),tabIndex:-1,onMouseDown:h,onKeyUp:h,onTouchStart:h,onMouseMove:h,onWheel:h,onPointerDown:h,onPointerMove:h,children:(0,u.jsx)(l.default.Provider,{value:h,children:e})})}},"./src/javascripts/core/ui/components/core/seamly-api-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{SeamlyApiContext:()=>o,SeamlyEventBusContext:()=>n});var r=s("preact");const o=(0,r.createContext)(null),n=(0,r.createContext)(null)},"./src/javascripts/core/ui/components/core/seamly-chat.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/javascripts/core/ui/hooks/use-seamly-chat.ts"),o=s("./node_modules/preact/compat/jsx-runtime.mjs");const n=({children:e})=>((0,r.default)(),(0,o.jsx)(o.Fragment,{children:e}))},"./src/javascripts/core/ui/components/core/seamly-core.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/errors/index.ts"),a=s("./src/javascripts/core/ui/components/core/seamly-chat.tsx"),i=s("./src/javascripts/core/ui/components/conversation/component-filter.tsx"),c=s("./src/javascripts/core/ui/components/core/seamly-activity-monitor.tsx"),l=s("./src/javascripts/core/ui/components/core/seamly-api-context.ts"),u=s("./src/javascripts/core/ui/components/core/seamly-event-subscriber.ts"),d=s("./src/javascripts/core/ui/components/core/seamly-file-upload.tsx"),p=s("./src/javascripts/core/ui/components/core/seamly-idle-detach-counter.ts"),m=s("./src/javascripts/core/ui/components/core/seamly-initializer.tsx"),f=s("./src/javascripts/core/ui/components/core/seamly-instance-functions-loader.ts"),h=s("./src/javascripts/core/ui/components/core/seamly-live-region.tsx"),v=s("./src/javascripts/core/ui/components/core/seamly-new-notifications.ts"),y=s("./src/javascripts/core/ui/components/core/seamly-read-state.ts"),j=s("./node_modules/preact/compat/jsx-runtime.mjs");const g=({store:e,children:t,eventBus:s,api:g})=>((0,r.useErrorBoundary)((t=>{console.error(t),e.dispatch((0,n.catchError)(t))})),(0,j.jsx)(o.Provider,{store:e,children:(0,j.jsx)(l.SeamlyEventBusContext.Provider,{value:s,children:(0,j.jsx)(l.SeamlyApiContext.Provider,{value:g,children:(0,j.jsx)(h.default,{children:(0,j.jsx)(a.default,{children:(0,j.jsxs)(i.default,{children:[(0,j.jsx)(m.default,{}),(0,j.jsx)(u.default,{}),(0,j.jsx)(y.default,{}),(0,j.jsx)(v.default,{}),(0,j.jsx)(p.default,{}),(0,j.jsxs)(c.default,{children:[(0,j.jsx)(f.default,{}),(0,j.jsx)(d.default,{children:t})]})]})})})})})}))},"./src/javascripts/core/ui/components/core/seamly-event-subscriber.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var r=s("preact/hooks"),o=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),n=s("./src/javascripts/core/api/errors/seamly-offline-error.ts"),a=s("./src/javascripts/core/api/errors/seamly-session-expired-error.ts"),i=s("./src/javascripts/core/domains/app/slice.ts"),c=s("./src/javascripts/core/domains/i18n/actions.ts"),l=s("./src/javascripts/core/domains/interrupt/slice.ts"),u=s("./src/javascripts/core/domains/store/index.ts"),d=s("./src/javascripts/core/domains/store/actions.ts"),p=s("./src/javascripts/core/domains/store/slice.ts"),m=s("./src/javascripts/core/domains/translations/slice.ts"),f=s("./src/javascripts/core/ui/hooks/event-bus-hooks.ts"),h=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),v=s("./src/javascripts/core/ui/hooks/use-seamly-conversation.ts");const y=["text","choice_prompt","image","video"],j=()=>{const e=(0,v.default)(),t=(0,r.useRef)(),s=(0,r.useRef)(),j=(0,u.useAppDispatch)(),g=(0,f.default)(),b=(0,r.useRef)(null),{initCountdown:x,endCountdown:_}=(0,h.useSeamlyIdleDetachCountdown)(),{emitEvent:w}=(0,h.useSeamlyCommands)(),{hasPrompt:S,continueChat:k}=(0,h.useSeamlyResumeConversationPrompt)(),C=(0,r.useRef)(S);return(0,r.useEffect)((()=>{C.current=S}),[S]),(0,r.useEffect)((()=>{e.socket&&(e.onConnection((({currentState:e})=>{if("attach_channel_erred"===e){const e=new o.default;return j((0,l.setInterrupt)({name:e.name,message:e.message,langKey:e.langKey,originalEvent:e.originalEvent,originalError:e.originalError,action:e.action})),!0}return!1})),e.onError((e=>{const t=new n.default(e);j((0,l.setInterrupt)({name:t.name,message:t.message,langKey:t.langKey,originalEvent:t.originalEvent,originalError:t.originalError})),j((0,p.clearEvents)())})),e.onOpen((()=>{j((0,l.clearInterrupt)())})))}),[e,e.socket,j]),(0,r.useEffect)((()=>{e.onConnection((({connected:t})=>!!t&&(s.current&&e?.removeListener("message",s.current),s.current=e=>{switch(e.type){case"ui":switch(e.payload.type){case"idle_detach_countdown":"idle_detach_countdown"===e.payload.body.type&&x(e.payload.body.duration);break;case"loading":j((0,p.setIsLoading)(e.payload.body.loading));break;case"idle_detach_countdown_elapsed":_(void 0,!0);break;case"resume_conversation_prompt":j((0,p.initResumeConversationPrompt)());break;case"user_first_response":j((0,i.setHasResponded)(!0)),w("system.userFirstResponse",e.payload.body);break;case"translation_proposal":j((0,m.setTranslationProposalPrompt)(e.payload.body))}break;case"service_attach":const{service:{name:t,settings:{proactiveMessages:{enabled:s},entry:r},sessionId:n}}=e.payload;j((0,p.setProactiveMessages)(s||!1)),t&&w("system.serviceChanged",t),n&&j((0,p.setActiveService)(n)),j((0,p.setServiceEntryMetadata)(r)),j((0,p.updateFeatures)({uploads:{enabled:r.options?.upload?.enabled||!1}}));break;case"context":e.payload.contentLocale&&e.payload.userLocale&&j((0,c.setLocale)(e.payload.userLocale));break;case"message":switch(e.payload.type){case"text":case"choice_prompt":case"splash":case"image":case"upload":case"video":case"cta":case"custom":case"carousel":case"card":if(e.payload.service&&e.payload.service.serviceSessionId&&j((0,p.setActiveService)(e.payload.service.serviceSessionId)),e.payload.fromClient){j((0,p.updateEvent)(e));break}C.current&&k(),j((0,p.addEvent)(e))}break;case"participant":(e=>{const{payload:t}=e;if(!t||!t.participant)return;const{fromClient:s,participant:r}=t;!s&&"string"!=typeof r&&r?.name&&j((0,p.setHeaderSubTitle)(r.name)),j((0,p.setParticipant)(t)),"string"!=typeof r&&r.introduction&&j((0,p.addEvent)({...e,payload:{...t,type:"participant"}}))})(e);break;case"service_data":e.payload.persist&&j((0,p.setServiceDataItem)(e.payload));break;case"info":"divider"!==e.payload.type&&"text"!==e.payload.type&&"translation"!==e.payload.type||j((0,p.addEvent)({type:"info",payload:{...e.payload,participant:null}}));break;case"error":switch(e.payload.type){case"find_conversation":const t=new a.default(e);j((0,l.setInterrupt)({name:t.name,action:t.action,message:t.message,originalEvent:t.originalEvent,originalError:t.originalError}));break;case"conversation":const s=new o.default(e);j((0,l.setInterrupt)({name:s.name,message:s.message,langKey:s.langKey,originalEvent:s.originalEvent,originalError:s.originalError,action:s.action}))}}return e},e.onMessage(s.current),!0)))}),[k,e,j,w,_,g,x]),(0,r.useEffect)((()=>{e.onConnection((({connected:s})=>!!s&&(t.current&&e.removeListener("message",t.current),t.current=async({payload:e})=>{if("history_changed"===e?.type)try{const t=await j((0,d.getConversation)(e)).unwrap();t&&"service"in t&&j((0,p.setEvents)(t))}catch(e){}return y.includes(e?.type)?(e.id!==b.current&&g.emit("message",e),b.current=e.id,e):e},e.addListener("message",t.current),!0)))}),[e,j,g]),null}},"./src/javascripts/core/ui/components/core/seamly-file-upload-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=(0,s("preact").createContext)(null)},"./src/javascripts/core/ui/components/core/seamly-file-upload.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/store/index.ts"),a=s("./src/javascripts/core/domains/store/slice.ts"),i=s("./src/javascripts/core/lib/id.ts"),c=s("./src/javascripts/core/ui/components/core/seamly-file-upload-context.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=({children:e})=>{const{t}=(0,o.useI18n)(),s=(0,n.useAppDispatch)(),d=(0,l.useSeamlyApiContext)(),{addUploadBubble:p}=(0,l.useSeamlyCommands)(),m=(0,r.useCallback)((async(e,t)=>{s((0,a.startProcessingImage)(t));const r=await(e=>new Promise(((t,s)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{"string"==typeof r.result&&t(r.result)},r.onerror=e=>s(e)})))(e),o=new Image;o.src=r,await o.decode();const n=(e=>{const t=document.createElement("canvas"),s=t.getContext("2d"),[r,o]=(e=>{const{height:t,width:s}=e;return s>t&&s>600?[600,600*t/s]:t>600?[600*s/t,600]:[s,t]})(e);return t.width=r,t.height=o,s?.drawImage(e,0,0,r,o),t.toDataURL()})(o);try{sessionStorage.setItem(`image-${t}`,n)}catch(e){}finally{s((0,a.doneProcessingImage)(t))}}),[s]),f=(0,r.useCallback)((e=>{const r=(0,i.randomId)(),o=d.uploadFile(e,(e=>{s((0,a.setUploadProgress)({fileId:r,progress:Math.ceil(e)}))}),(async t=>{const{id:o,transactionId:n,occurredAt:i,body:{contentType:c,filename:l,filesize:u}}=t;s((0,a.setUploadComplete)(r)),p(o,n,i,c,l,u),c.includes("image/")&&await m(e,o)}),(e=>{let o;switch(e?.error||""){case"file_uploads_are_disabled":o=t("fileUpload.errors.unavailable");break;case"request_entity_too_large":o=t("fileUpload.errors.tooLarge");break;case"file_has_invalid_mime_type":o=t("fileUpload.errors.wrongType");break;case"virus_found":o=t("fileUpload.errors.virusFound");break;default:o=t("fileUpload.errors.general")}s((0,a.setUploadError)({fileId:r,errorText:o}))}));s((0,a.registerUpload)({fileId:r,fileName:e.name,uploadHandle:o}))}),[m,p,d,s,t]);return(0,u.jsx)(c.default.Provider,{value:f,children:e})}},"./src/javascripts/core/ui/components/core/seamly-idle-detach-counter.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/javascripts/core/ui/hooks/use-interval.ts"),o=s("./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts");const n=()=>{const{hasCountdown:e,isActive:t,remaining:s,decrementCountdown:n}=(0,o.default)();return(0,r.default)((()=>{n()}),e&&t&&s&&s>0?1e3:null),null}},"./src/javascripts/core/ui/components/core/seamly-initializer.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts");const a=()=>{const{initUserSelectedOptions:e}=(0,n.useSeamlyOptions)(),t=(0,r.useRef)(!1),s=(0,o.useConfig)();return(0,r.useEffect)((()=>{s.api&&!t.current&&(t.current=!0,e())}),[e,s]),null}},"./src/javascripts/core/ui/components/core/seamly-instance-functions-loader.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.every.js");var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/config/hooks.ts"),a=s("./src/javascripts/core/domains/config/slice.ts"),i=s("./src/javascripts/core/domains/interrupt/selectors.ts"),c=s("./src/javascripts/core/domains/store/index.ts"),l=s("./src/javascripts/core/domains/translations/hooks.ts"),u=s("./src/javascripts/core/domains/visibility/constants.ts"),d=s("./src/javascripts/core/domains/visibility/hooks.ts"),p=s("./src/javascripts/core/ui/hooks/event-bus-hooks.ts"),m=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),f=s("./src/javascripts/core/ui/utils/seamly-utils.ts");function h(e,t,s=[]){const o=(0,p.default)(),n=(0,r.useRef)(t);(0,r.useEffect)((()=>{if(!s.every(Boolean))return;const t=(...e)=>n.current?.(...e);return o.emit("function.register",e,t),()=>o.emit("function.unregister",e,t)}),[o,e,...s])}const v=()=>{const e=(0,n.useConfig)(),{emitEvent:t,sendAction:s,sendContext:v,sendMessage:y}=(0,m.useSeamlyCommands)(),j=(0,c.useAppDispatch)(),{setVisibility:g,visible:b}=(0,d.useVisibility)(),x=(0,r.useRef)(b),_=(0,p.default)(),w=(0,m.useSeamlyApiContext)(),S=(0,m.useSeamlyUnreadCount)(),k=(0,r.useRef)(null),C=(0,r.useRef)(null),{isInline:E,isResolving:T}=(0,m.useSeamlyLayoutMode)(),N=(0,o.useSelector)(i.selectHasError),I=(0,m.useSeamlyConversationUrl)(),O=(0,r.useRef)(null),A=(0,m.useSeamlyActivityEventHandler)(),{enableTranslations:P,disableTranslations:L}=(0,l.useTranslations)();return(0,r.useEffect)((()=>{x.current=b}),[b]),h("askText",(e=>{y({body:e})}),[w.send]),h("setVariables",(e=>{v({variables:e})}),[w.send]),h("getVisibility",(e=>{e?e(x.current):console.warn("A callback function is required for the getVisibility action.")})),h("setVisibility",(e=>{const t="string"==typeof e||null===e?e:e.visibility;Object.values(u.visibilityStates).includes(t)?(A(),g(e)):console.error('Requested visibility states should be "open", "minimized" ,"hidden" or null.')}),[e.api]),h("sendCustomAction",((e,r)=>{const o={type:"custom",body:{type:e,body:r}};s(o),t(`action.${o.type}`,o)}),[w.send]),h("setTopic",(({name:e,fallbackMessage:t,message:r,userTriggered:o})=>{o&&j((0,a.updateConfig)({showSuggestions:!1})),e&&t?s({type:f.actionTypes.setTopic,body:{name:e,fallbackMessage:t,message:r}}):console.warn("A name and a fallbackMessage are required for the setTopic action.")}),[w.send]),h("setContext",(e=>{v(e)}),[w.send]),h("setTranslation",(({enabled:e,locale:t})=>{e?P(t,f.sourceTypes.windowApi):L()}),[w.send]),(0,r.useEffect)((()=>{T||N||(O.current&&O.current!==I&&_.emit("unreadMessageCount",S),b===u.visibilityStates.open&&b!==C.current&&0!==k.current&&_.emit("unreadMessageCount",0),b!==u.visibilityStates.open&&S!==k.current&&_.emit("unreadMessageCount",S),C.current=b,k.current=S,"string"==typeof I&&(O.current=I))}),[S,b,_,E,T,N,I]),null}},"./src/javascripts/core/ui/components/core/seamly-live-region-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{SeamlyLiveRegionContext:()=>r});const r=(0,s("preact").createContext)(null)},"./src/javascripts/core/ui/components/core/seamly-live-region.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/hooks/event-bus-hooks.ts"),a=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),i=s("./src/javascripts/core/ui/components/core/seamly-live-region-context.ts"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=({children:e})=>{const t=(0,n.default)(),s=(0,r.useRef)(null),[l,u]=(0,r.useState)(),d=(0,r.useRef)(!0),p=(0,r.useCallback)((e=>{d.current&&(u(e),t.emit("aria-live",e))}),[u,t]);return(0,r.useEffect)((()=>(s.current=null,l?.messageText&&(s.current=setTimeout((()=>{p({}),s.current&&clearTimeout(s.current)}),600)),()=>{s.current&&clearTimeout(s.current)})),[l,p]),(0,r.useEffect)((()=>()=>{d.current=!1}),[]),(0,c.jsxs)(i.SeamlyLiveRegionContext.Provider,{value:p,children:[e,(0,c.jsxs)("div",{className:(0,o.className)("app__live-container"),children:[(0,c.jsx)("div",{"aria-live":"assertive","aria-atomic":"true",className:(0,o.className)("visually-hidden"),children:l?.ariaLive===a.ariaLiveLevels.assertive?l?.messageText:null}),(0,c.jsx)("div",{"aria-live":"polite","aria-atomic":"true",className:(0,o.className)("visually-hidden"),children:l?.ariaLive===a.ariaLiveLevels.polite?l?.messageText:null})]})]})}},"./src/javascripts/core/ui/components/core/seamly-new-notifications.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts");const a=()=>{const{t:e}=(0,o.useI18n)(),t=(0,n.useSeamlyIsHistoryLoaded)(),{sendPolite:s}=(0,n.useLiveRegion)();return(0,r.useEffect)((()=>{t&&setTimeout((()=>{s(e("window.srTexts.onHistoryLoad"))}),500)}),[t,e,s]),null}},"./src/javascripts/core/ui/components/core/seamly-read-state.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("preact/hooks"),o=s("./src/javascripts/core/config.ts"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/utils/general-utils.ts");const l=()=>{const{t:e}=(0,n.useI18n)(),{isOpen:t,isVisible:s}=(0,a.useVisibility)(),l=(0,i.useSeamlyUnreadCount)(),{sendPolite:u}=(0,i.useLiveRegion)(),d=(0,r.useMemo)((()=>(0,c.debounce)(u,o.unreadScreenReaderWait)),[u]),p=(0,r.useRef)(null),m=(0,r.useRef)(null);return(0,r.useEffect)((()=>{p.current!==s&&!s&&m.current&&m.current(),0!==l&&!t&&s&&(m.current=d(e("message.srTextUnreadCount",{unreadCount:l}))),p.current=s}),[l,t,s,d,e]),null}},"./src/javascripts/core/ui/components/entry/abort-transaction-button/abort-transaction-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),n=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),a=s("./src/javascripts/core/ui/components/entry/text-entry/hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");function c(){const{abortTransaction:e,clearEntryAbortTransaction:t}=(0,a.useEntryAbortTransaction)(),s=(0,o.useSeamlyApiContext)();return e?(0,i.jsx)("li",{className:(0,r.className)(["cvco-conversation__item","cvco-conversation__item--abort-transaction"]),children:(0,i.jsx)("button",{className:(0,r.className)(["button","button--secondary","abort-transaction__button"]),type:"button",onClick:()=>{s.send("action",{type:n.actionTypes.setTopic,body:{name:e.topicName,fallbackMessage:e.topicFallbackMessage}}),t()},children:e.label})}):null}},"./src/javascripts/core/ui/components/entry/entry-container.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("./src/javascripts/core/ui/components/warnings/idle-detach-warning.tsx"),c=s("./src/javascripts/core/ui/components/warnings/resume-conversation-prompt.tsx"),l=s("./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),d=s("./src/javascripts/core/ui/utils/general-utils.ts"),p=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),m=s("./src/javascripts/core/ui/components/entry/text-entry/index.tsx"),f=s("./src/javascripts/core/ui/components/entry/upload/index.tsx"),h=s("./src/javascripts/core/ui/components/entry/upload-toggle.tsx"),v=s("./node_modules/preact/compat/jsx-runtime.mjs");const y=()=>{const{isOpen:e}=(0,n.useVisibility)(),t=(0,r.useRef)(null),{hasCountdown:s}=(0,u.useSeamlyIdleDetachCountdown)(),[y,j]=(0,r.useState)(s),{hasPrompt:g}=(0,u.useSeamlyResumeConversationPrompt)(),[b,x]=(0,r.useState)(g),_=(0,u.useSkiplinkTargetFocusing)(),w=(0,r.useRef)(!1),{activeEntry:S,activeEntryOptions:k}=(0,l.useSeamlyEntry)(),[C,E]=(0,r.useState)({text:m.default,upload:f.default}),[T,N]=(0,r.useState)((()=>S)),I=(0,o.useConfig)(),{accountAllowsUploads:O}=(0,u.useFileUploadMeta)(),A=(0,r.useCallback)((()=>{(0,d.runIfElementContainsOrHasFocus)(t.current,_)}),[_]);(0,r.useEffect)((()=>{const{customComponents:e}=I,{entry:t}=e||{};t&&E((e=>({...e,...t})))}),[I]),(0,r.useEffect)((()=>{A(),j(s),x(g)}),[s,g,A]),(0,r.useEffect)((()=>{N(S),A()}),[S,A,t]),w.current=!(!t.current||!t.current.contains(document.activeElement));const P=C[T],{allowManualInput:L=!0}=k;return(0,v.jsxs)("div",{className:(0,a.className)("chat__entry"),ref:t,children:[y&&(0,v.jsx)(i.default,{}),b&&(0,v.jsx)(c.default,{}),(0,v.jsxs)("div",{className:(0,a.className)(["entry__body",...s||g||!1===L?["entry__body--hidden"]:[]]),children:[T!==p.entryTypes.upload&&O&&e?(0,v.jsx)(h.default,{}):null,(0,v.jsx)(P,{})]})]})}},"./src/javascripts/core/ui/components/entry/text-entry/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useCharacterLimit:()=>m,useEntryAbortTransaction:()=>h,useEntryTextTranslation:()=>f});var r=s("preact/hooks"),o=s("./src/javascripts/core/config.ts"),n=s("./src/javascripts/core/domains/config/hooks.ts"),a=s("./src/javascripts/core/domains/forms/hooks.ts"),i=s("./src/javascripts/core/domains/i18n/hooks.ts"),c=s("./src/javascripts/core/domains/store/index.ts"),l=s("./src/javascripts/core/domains/store/slice.ts"),u=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),d=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),p=s("./src/javascripts/core/ui/utils/general-utils.ts");function m(e){const{t}=(0,i.useI18n)(),{sendAssertive:s}=(0,u.useLiveRegion)(),{hasLimit:n,limit:c}=(0,d.useEntryTextLimit)(),l=(0,r.useMemo)((()=>(0,p.debounce)(s,o.maxCharacterSrDebounceDelay)),[s]),m=(0,r.useMemo)((()=>(0,p.debounce)(((e,s)=>{e&&l(t("input.srCharacterLimitText",{limit:s}))}),o.maxCharacterSrDebounceDelay)),[l,t]),[{value:f}]=(0,a.useFormControl)(e),h="number"==typeof c&&n&&f?c-f.length:c,v=!(!n||"number"!=typeof h)&&h<=o.maxCharacterWarningLimit,y=!(!n||"number"!=typeof h)&&h<0;return(0,r.useEffect)((()=>{m(v,h)}),[v,h,m]),{hasCharacterLimit:n,characterLimit:c,reachedCharacterWarning:v,reachedCharacterLimit:y,remainingChars:h}}const f=e=>{const{hasCharacterLimit:t,characterLimit:s}=m(e),{entryMeta:{optionsOverride:o}}=(0,d.useSeamlyStateContext)(),{alwaysShowEntryLabel:a}=(0,n.useConfig)(),{t:c}=(0,i.useI18n)();return{placeholder:(0,r.useMemo)((()=>c("input.inputPlaceholder",{hasLimit:t,text:o?.text?.placeholder||c("input.inputPlaceholderText"),limit:t?s:null})),[c,t,s,o?.text?.placeholder]),label:(0,r.useMemo)((()=>c("input.inputLabel",{hasLimit:!o?.text?.label&&t,text:o?.text?.label||c("input.inputLabelText"),limit:!o?.text?.label&&t?s:null})),[c,t,s,o?.text?.label]),labelClass:(0,r.useMemo)((()=>!0===a||o?.text?.label?"label":"visually-hidden"),[a,o?.text?.label])}},h=()=>{const e=(0,c.useAppDispatch)(),{entryMeta:{actions:t,translatedActions:s}}=(0,d.useSeamlyStateContext)();return{abortTransaction:s?.abortTransaction||t?.abortTransaction,clearEntryAbortTransaction:()=>{e((0,l.clearAbortTransaction)())}}}},"./src/javascripts/core/ui/components/entry/text-entry/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d,textEntryControlName:()=>u});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/forms/provider.tsx"),n=s("./src/javascripts/core/domains/visibility/constants.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/components/entry/text-entry/text-entry-form.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u="textMessageEntry";function d({...e}){const{isOpen:t,setVisibility:s}=(0,a.useVisibility)(),d=(0,i.useSkiplink)(),p=(0,i.useSkiplinkTargetFocusing)(),{sendMessage:m}=(0,i.useSeamlyCommands)(),f=(0,r.useCallback)(((e,{updateControlValue:r})=>{m({body:e[u]}),r(u,""),p(),t||s({visibility:n.visibilityStates.open})}),[m,p,t,s]);return(0,l.jsx)(o.default,{...e,formId:"textEntry",persistData:!0,onSubmit:f,children:(0,l.jsx)(c.default,{controlName:u,skipLinkId:d})})}},"./src/javascripts/core/ui/components/entry/text-entry/text-entry-form.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/forms/hooks.ts"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("./src/javascripts/core/ui/components/form-controls/form.tsx"),l=s("./src/javascripts/core/ui/components/form-controls/input.tsx"),u=s("./src/javascripts/core/ui/components/layout/icon.tsx"),d=s("./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),m=s("./src/javascripts/core/ui/components/entry/text-entry/hooks.ts"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");function h({controlName:e,skipLinkId:t}){const{t:s}=(0,n.useI18n)(),{setInputFocus:h}=(0,a.useVisibility)(),{sendAssertive:v}=(0,p.useLiveRegion)(),{emitEvent:y}=(0,p.useSeamlyCommands)(),j=(0,d.useSeamlyTyping)(),{setBlockAutoEntrySwitch:g}=(0,d.useSeamlyEntry)(),{placeholder:b,label:x,labelClass:_}=(0,m.useEntryTextTranslation)(e),{hasCharacterLimit:w,reachedCharacterWarning:S,reachedCharacterLimit:k,remainingChars:C}=(0,m.useCharacterLimit)(e),[{value:E}]=(0,o.useFormControl)(e),T=!!E,N=(0,r.useCallback)((()=>{S&&v(s("input.srCharacterLimitText",{limit:C})),y("ui.inputFocus")}),[s,v,S,C,y]);return(0,r.useLayoutEffect)((()=>(g(T),()=>{g(!1)})),[g,T]),(0,f.jsxs)(c.default,{className:(0,i.className)("entry-form"),disableValidationClasses:!0,noValidate:"true",children:[(0,f.jsxs)("div",{className:(0,i.className)(["input--text__container",...S&&!k?["character-warning"]:[],...k?["character-exceeded"]:[]]),children:[(0,f.jsx)(l.default,{id:t,type:"text",name:e,className:(0,i.className)("input__text"),autocomplete:"off",placeholder:b,labelText:x,labelClass:(0,i.className)(_),"aria-invalid":!!w&&k,onKeyUp:j,onFocus:N,focus:h}),(0,f.jsx)("div",{className:(0,i.className)("character-count"),children:S&&(0,f.jsx)("span",{children:C})})]}),(0,f.jsx)("button",{className:(0,i.className)("button","input__submit"),onPointerDown:e=>{e.preventDefault()},"aria-disabled":!T||k,children:(0,f.jsx)(u.default,{name:"send",size:"32",alt:s("input.sendMessage")})})]})}},"./src/javascripts/core/ui/components/entry/upload-toggle.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/layout/icon.tsx"),i=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),c=s("./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./src/javascripts/core/ui/utils/general-utils.ts"),d=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),p=s("./node_modules/preact/compat/jsx-runtime.mjs");const m=()=>{const{t:e}=(0,o.useI18n)(),{showFileUpload:t,serviceAllowsUploads:s}=(0,l.useFileUploadMeta)(),[m,f]=(0,r.useState)(s||!1),h=(0,l.useSkiplinkTargetFocusing)(),v=(0,r.useRef)(null),{setUserEntryType:y,activeEntry:j}=(0,c.useSeamlyEntry)(),g=(0,r.useRef)(null),{sendPolite:b}=(0,l.useLiveRegion)(),x=!!(0,l.useSeamlyCurrentAgent)();return(0,r.useEffect)((()=>{(0,u.runIfElementContainsOrHasFocus)(g.current,(()=>{s||h()})),f(s||!1)}),[s,h]),(0,r.useEffect)((()=>{v.current&&!s&&b(e("fileUpload.srUnavailableText")),!1===v.current&&s&&b(e("fileUpload.srAvailableText")),x&&(v.current=s)}),[s,x,b,e]),t||j===d.entryTypes.upload?null:(0,p.jsx)(i.default,{isActive:m,transitionStartState:i.transitionStartStates.rendered,children:(0,p.jsx)("div",{className:(0,n.className)("upload-toggle-wrapper"),children:(0,p.jsx)(i.default,{isActive:m,transitionStartState:i.transitionStartStates.visuallyHidden,children:(0,p.jsx)("button",{className:(0,n.className)(["button","button--secondary","upload-toggle"]),ref:g,"aria-disabled":!m,type:"button",onClick:m?()=>{y(d.entryTypes.upload),h()}:void 0,children:(0,p.jsx)(a.default,{name:"file",size:"32",alt:e("fileUpload.toggleButtonText")})})})})})}},"./src/javascripts/core/ui/components/entry/upload/file-upload-form.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/forms/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/form-controls/file-input.tsx"),i=s("./src/javascripts/core/ui/components/form-controls/form.tsx"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=({skiplinkId:e,controlName:t,accept:s,contentHint:l,isUploading:u,isComplete:d,onClickCancel:p})=>{const{t:m}=(0,o.useI18n)(),[{value:f}]=(0,r.useFormControl)(t),h=f&&f.length>0,v=h&&"string"!=typeof f?f[0].name:"";return(0,c.jsxs)(i.default,{className:(0,n.className)("upload-form"),children:[(0,c.jsx)(a.default,{name:t,id:e,accept:s,labelText:m("fileUpload.labelText"),outputText:m("fileUpload.selectedText",{hasFile:h,filename:v}),contentHint:l}),(0,c.jsxs)("div",{className:(0,n.className)("upload__button-container"),children:[(0,c.jsx)("button",{id:u||!d?e:void 0,type:"button",onClick:p,className:(0,n.className)("button","button--secondary","upload__cancel"),children:m("fileUpload.cancelButtonText")}),(0,c.jsx)("button",{className:(0,n.className)("button","button--primary"),type:"submit",children:m("fileUpload.uploadButtonText")})]})]})}},"./src/javascripts/core/ui/components/entry/upload/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/forms/provider.tsx"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("./src/javascripts/core/ui/components/widgets/upload-progress.tsx"),c=s("./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/use-single-file-upload.ts"),d=s("./src/javascripts/core/ui/utils/form-utils.ts"),p=s("./src/javascripts/core/ui/utils/general-utils.ts"),m=s("./src/javascripts/core/ui/utils/validations.ts"),f=s("./src/javascripts/core/ui/components/entry/upload/file-upload-form.tsx"),h=s("./node_modules/preact/compat/jsx-runtime.mjs");const v="fileListForm",y="fileList",j=()=>{const{t:e}=(0,n.useI18n)(),{sendPolite:t,sendAssertive:s}=(0,l.useLiveRegion)(),j=(0,l.useSkiplink)(),g=(0,l.useSkiplinkTargetFocusing)(),{serviceAllowsUploads:b,allowedMimeTypes:x,maxSize:_}=(0,l.useFileUploadMeta)(),w=(0,r.useRef)(null),S=(0,r.useRef)(b),{cancelEntrySelection:k}=(0,c.useSeamlyEntry)(),{uploadFile:C,clearUploads:E,isUploading:T,isComplete:N}=(0,l.useFileUploads)(),{uploadHandle:I,hasServerError:O,progress:A}=(0,u.default)(v,y),P=(0,l.useGeneratedId)(),L=(0,r.useRef)(!0),R=e("fileUpload.contentHint",{size:(0,p.formatBytes)(_)}),M=(0,r.useRef)(""),D=(0,r.useRef)(null);(0,r.useEffect)((()=>{M.current&&D.current?.contains(document.activeElement)&&"INPUT"===document.activeElement?.tagName&&s(R),M.current=R}),[R,s]),(0,r.useEffect)((()=>{A>0&&t(1===A?e("fileUpload.srStartedText"):`${A}%`)}),[A,t,e]),(0,r.useEffect)((()=>{L.current||T||!N||(E(),k(),g(),setTimeout((()=>{t(e("fileUpload.srCompleteText"))}),300)),L.current=N}),[T,N,E,k,g,t,e]),(0,r.useEffect)((()=>{b||T||(E(),k(),g())}),[b,T,E,k,g]);const F=(0,r.useCallback)((({fileList:e})=>{C(e[0]),g()}),[C,!1,g]),U=(0,r.useCallback)((()=>{I&&I.abort(),E(),k(),g()}),[I,E,k,g]),z=(0,r.useMemo)((()=>({[y]:[(0,d.getValidator)((()=>b),e("fileUpload.errors.unavailable")),(0,d.getValidator)(m.fileListObjectIsNotEmpty,e("fileUpload.errors.noFile")),(0,d.getValidator)(m.validateFileSize,e("fileUpload.errors.tooLarge"),_)]})),[_,b,e]);return(0,h.jsx)("div",{className:(0,a.className)(["upload",...O?["upload--error"]:[]]),ref:D,children:(0,h.jsxs)(o.default,{formId:v,persistData:!0,onSubmit:F,validationSchema:z,children:[(T||!N)&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(i.default,{}),(0,h.jsx)("div",{className:(0,a.className)("upload__button-container"),children:(0,h.jsx)("button",{id:T||!N?j:void 0,type:"button",onClick:U,ref:w,className:(0,a.className)("button","button--secondary","upload__cancel"),children:e("fileUpload.cancelButtonText")})})]}),!T&&N&&(0,h.jsx)(f.default,{controlName:y,skiplinkId:j,accept:x?.join(", ")||"",contentHint:R,isComplete:N,isUploading:T,onClickCancel:U}),!S.current&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("span",{className:(0,a.className)("notification"),id:P,children:e("fileUpload.unavailableText")}),(0,h.jsx)("div",{className:(0,a.className)("upload__button-container"),children:(0,h.jsx)("button",{id:T||!N?j:void 0,type:"button",onClick:U,className:(0,a.className)("button","button--secondary","upload__cancel"),children:e("fileUpload.cancelButtonText")})})]})]})})}},"./src/javascripts/core/ui/components/form-controls/error.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/layout/icon.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i({id:e,error:t}){const[s,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=setTimeout((()=>i(!0)),300);return()=>clearTimeout(e)}),[]),(0,a.jsx)("div",{className:(0,o.className)("error"),"aria-live":"assertive","aria-atomic":"true",children:s&&t&&(0,a.jsxs)("span",{id:e,className:(0,o.className)("error__message"),children:[(0,a.jsx)(n.default,{name:"error",size:"16",alt:""}),t]})})}},"./src/javascripts/core/ui/components/form-controls/file-input.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/forms/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/layout/icon.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/components/form-controls/error.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");function u({id:e,name:t,labelText:s,contentHint:u,outputText:d,accept:p}){const{isSubmitted:m}=(0,o.useFormContext)(),[f,h]=(0,r.useState)(!1),[{onInput:v,onBlur:y},{error:j}]=(0,o.useFormControl)(t),g=(0,i.useGeneratedId)(),b=(0,i.useGeneratedId)(),x=(0,i.useGeneratedId)(),_=m&&j,w=[x];u&&w.push(b),_&&w.push(g);const S=(0,r.useCallback)((()=>{h(!0)}),[h]),k=(0,r.useCallback)((()=>{h(!1),y()}),[h,y]),C=(0,r.useCallback)((e=>{const t={target:{value:e.target.files}};v(t)}),[v]);return(0,l.jsxs)("div",{className:(0,n.className)("upload__container"),children:[u&&(0,l.jsx)("span",{className:(0,n.className)("upload__content-hint"),id:b,children:u}),(0,l.jsx)(c.default,{id:g,error:_&&j}),(0,l.jsx)("div",{className:(0,n.className)(["file-upload",...f?["focus-within"]:[]]),children:(0,l.jsxs)("label",{htmlFor:e,className:(0,n.className)("upload__label"),children:[(0,l.jsx)(a.default,{name:"upload",size:"32",alt:""}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:(0,n.className)(["upload__label--text"]),children:s}),(0,l.jsx)("input",{id:e,className:(0,n.className)("upload__input"),type:"file",name:t,onChange:C,"aria-invalid":_?"true":"false","aria-describedby":w.join(" "),accept:p||null,onFocus:S,onBlur:k}),(0,l.jsx)("span",{className:(0,n.className)("upload__output"),"aria-hidden":"true",id:x,children:d})]})]})})]})}},"./src/javascripts/core/ui/components/form-controls/form.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/forms/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=function({className:e,disableValidationClasses:t=!1,...s}){const{handleSubmit:a,isValid:i,isSubmitted:c}=(0,r.useForm)(),l=["form"];return!t&&c&&(l.push("form--submitted"),i?l.push("form--valid"):l.push("form--invalid")),(0,n.jsx)("form",{onSubmit:a,className:(0,o.className)([...l,e]),...s})}},"./src/javascripts/core/ui/components/form-controls/input.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/forms/hooks.ts"),n=s("./src/javascripts/core/ui/components/form-controls/wrapper.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=function({id:e,name:t,type:s,labelText:i,labelClass:c,contentHint:l=null,focus:u,"aria-invalid":d,"aria-describedby":p,...m}){const f=(0,r.useRef)(null),{isSubmitted:h}=(0,o.useFormContext)(),[v,{error:y}]=(0,o.useFormControl)(t),j=h&&y,g=[];return p&&g.push(p),l&&g.push(`${e}-content-hint`),j&&g.push(`${e}-error`),(0,r.useLayoutEffect)((()=>{f.current&&u&&f.current.focus()}),[u]),(0,a.jsx)(n.default,{id:e,contentHint:l,validity:!j,errorText:y,labelText:i,labelClass:c,children:(0,a.jsx)("input",{...v,...m,ref:f,id:e,type:s,"aria-invalid":d||j?"true":"false","aria-describedby":g.join(" ")||void 0,name:t})})}},"./src/javascripts/core/ui/components/form-controls/wrapper.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/form-controls/error.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({contentHint:e,id:t,labelText:s,labelClass:a,validity:i,errorText:c,children:l})=>(0,n.jsxs)(n.Fragment,{children:[e&&(0,n.jsx)("span",{id:`${t}-content-hint`,className:(0,r.className)("input__content-hint"),children:e}),(0,n.jsx)(o.default,{id:`${t}-error`,error:!i&&c}),(0,n.jsxs)("div",{className:(0,r.className)("form-control__wrapper"),children:[(0,n.jsx)("label",{htmlFor:t,className:(0,r.className)(a),children:s}),l]})]})},"./src/javascripts/core/ui/components/layout/agent-info.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./node_modules/react-redux/dist/react-redux.mjs"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/interrupt/selectors.ts"),i=s("./src/javascripts/core/domains/visibility/hooks.ts"),c=s("./src/javascripts/core/lib/css.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./src/javascripts/core/ui/components/layout/icon.tsx"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=()=>{const{t:e}=(0,n.useI18n)(),{title:t,subTitle:s}=(0,l.useSeamlyHeaderData)(),p=(0,l.useSeamlyUnreadCount)(),{isOpen:m}=(0,i.useVisibility)(),f=(0,l.useSeamlyCurrentAgent)(),h=(0,r.useSelector)(a.selectHasError),v=(0,o.useStartChatIcon)(),y=f?.avatar??v,j=h?"":s,g=["message-count"];return m&&g.push("message-count__hide"),0===p&&g.push("message-count__empty"),j||!m?(0,d.jsxs)("div",{className:(0,c.className)("agent-info"),children:[(0,d.jsxs)("div",{className:(0,c.className)("agent-info__graphic"),children:[y?(0,d.jsx)("img",{className:(0,c.className)(f?.avatar?"avatar":"icon"),src:y,alt:""}):(0,d.jsx)(u.default,{name:"avatar",size:"32",alt:""}),(0,d.jsx)("span",{className:(0,c.className)(g),"aria-hidden":"true",children:p})]}),(0,d.jsxs)("div",{className:(0,c.className)("agent-info__body"),children:[(0,d.jsx)("p",{className:(0,c.className)("agent-info__heading"),children:t??e("header.title")}),(0,d.jsx)("p",{className:(0,c.className)("agent-info__text"),children:j})]})]}):null}},"./src/javascripts/core/ui/components/layout/chat-frame.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./node_modules/react-redux/dist/react-redux.mjs"),o=s("./src/javascripts/core/domains/interrupt/selectors.ts"),n=s("./src/javascripts/core/domains/translations/components/translation-status.tsx"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("./src/javascripts/core/ui/components/app-options/index.tsx"),l=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-provider.tsx"),u=s("./src/javascripts/core/ui/components/entry/entry-container.tsx"),d=s("./src/javascripts/core/ui/components/view/window-view/collapse-button.tsx"),p=s("./src/javascripts/core/ui/components/layout/interrupt.tsx"),m=s("./node_modules/preact/compat/jsx-runtime.mjs");const f=function({children:e}){const t=(0,r.useSelector)(o.selectHasError),{isOpen:s}=(0,a.useVisibility)();return t?(0,m.jsx)(p.default,{}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(l.default,{children:[(0,m.jsxs)("div",{className:(0,i.className)("chat__container__header"),children:[(0,m.jsx)(n.default,{}),(0,m.jsx)(d.default,{})]}),e]}),(0,m.jsx)(u.default,{}),s&&(0,m.jsx)(c.default,{})]})}},"./src/javascripts/core/ui/components/layout/chat.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("preact/compat"),o=s("./src/javascripts/core/domains/app/hooks.ts"),n=s("./src/javascripts/core/domains/config/hooks.ts"),a=s("./src/javascripts/core/domains/i18n/hooks.ts"),i=s("./src/javascripts/core/domains/visibility/constants.ts"),c=s("./src/javascripts/core/domains/visibility/hooks.ts"),l=s("./src/javascripts/core/lib/css.ts"),u=s("./src/javascripts/core/ui/components/suggestions/index.tsx"),d=s("./src/javascripts/core/ui/hooks/component-helper-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),m=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");const h=(0,r.forwardRef)((({children:e,className:t=""},s)=>{const{isOpen:r,isVisible:h,setVisibility:v}=(0,c.useVisibility)(),{namespace:y,layoutMode:j}=(0,n.useConfig)(),{isInline:g}=(0,p.useSeamlyLayoutMode)(),b=(0,d.useSeamlyAppContainerClassNames)(),x=(0,m.useGeneratedId)(),_=(0,o.useUserHasResponded)(),{t:w}=(0,a.useI18n)(),S=["chat",`chat--layout-${j}`,`namespace--${y}`,t];return"function"!=typeof b&&S.push(...b),r||"app"===j||S.push("chat--collapsed"),_&&S.push("chat--user-responded"),h&&(0,f.jsxs)("section",{className:(0,l.className)(S),onKeyDown:e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&!g&&r&&v({visibility:i.visibilityStates.minimized})},tabIndex:-1,ref:s,role:"window"===j?"dialog":void 0,"aria-labelledby":x,children:[(0,f.jsx)("h2",{className:(0,l.className)("chat__title","visually-hidden"),id:x,children:w("chat.srLabel")}),(0,f.jsx)("div",{className:(0,l.className)("chat-wrapper"),children:e}),"inline"===j&&r&&(0,f.jsx)(u.default,{isAside:!0})]})}))},"./src/javascripts/core/ui/components/layout/collapsed-chat-messages.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CollapsedChatMessages:()=>i}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/hooks/use-event-component-mapping.ts"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");function a({event:e}){const[t]=(0,o.default)(e);return(0,n.jsx)("li",{children:(0,n.jsx)(t,{event:e})})}function i({events:e}){return(0,n.jsx)("ul",{className:(0,r.className)("collapsed-chat-messages"),children:e.map((e=>(0,n.jsx)(a,{event:e},e.payload.id)))})}},"./src/javascripts/core/ui/components/layout/continue-chat-messages.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/ui/components/layout/collapsed-chat-messages.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i(){const{t:e}=(0,o.useI18n)(),t=e("window.chat.continue"),s=(0,r.useMemo)((()=>({type:"message",payload:{type:"custom",body:{text:t,type:"",data:{}},participant:"seamly-client-participant"}})),[t]);return(0,a.jsx)(n.CollapsedChatMessages,{events:[s]})}},"./src/javascripts/core/ui/components/layout/header.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./src/javascripts/core/ui/components/layout/icon.tsx"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=({children:e,onCloseChat:t})=>{const{headerCollapseButtonId:s}=(0,a.useSeamlyStateContext)(),l=(0,r.useRef)(null),{t:u}=(0,o.useI18n)();return(0,c.jsxs)("header",{className:(0,n.className)("chat__header"),children:[e,(0,c.jsx)("div",{className:(0,n.className)("header-controls"),children:(0,c.jsx)("button",{type:"button",className:(0,n.className)("button","header-controls__collapse"),onClick:t,ref:l,id:s,children:(0,c.jsx)(i.default,{name:"chevronDown",size:"32",alt:u("header.collapseApp")})})})]})}},"./src/javascripts/core/ui/components/layout/icon.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ICONS:()=>E,default:()=>T});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/icons/avatar_bot-32.svg"),n=s("./src/icons/icon_arrow_left-16.svg"),a=s("./src/icons/icon_arrow_right-16.svg"),i=s("./src/icons/icon_balloon-32.svg"),c=s("./src/icons/icon_check-16.svg"),l=s("./src/icons/icon_check-32.svg"),u=s("./src/icons/icon_chevron_down-32.svg"),d=s("./src/icons/icon_chevron_down-8.svg"),p=s("./src/icons/icon_chevron_right-16.svg"),m=s("./src/icons/icon_chevron_right-8.svg"),f=s("./src/icons/icon_close-16.svg"),h=s("./src/icons/icon_close-8.svg"),v=s("./src/icons/icon_download-16.svg"),y=s("./src/icons/icon_enlarge-32.svg"),j=s("./src/icons/icon_error-16.svg"),g=s("./src/icons/icon_file-32.svg"),b=s("./src/icons/icon_newtopic-32.svg"),x=s("./src/icons/icon_newtranslation-16.svg"),_=s("./src/icons/icon_newtranslation-32.svg"),w=s("./src/icons/icon_options-32.svg"),S=s("./src/icons/icon_send-32.svg"),k=s("./src/icons/icon_upload-32.svg"),C=s("./node_modules/preact/compat/jsx-runtime.mjs");const E={send:{32:S},balloon:{32:i},newTopic:{32:b},newTranslation:{16:x,32:_},avatar:{32:o},chevronDown:{8:d,32:u},chevronRight:{8:m,16:p},close:{8:h,16:f},enlarge:{32:y},options:{32:w},file:{32:g},upload:{32:k},download:{16:v},error:{16:j},arrowLeft:{16:n},arrowRight:{16:a},check:{16:c,32:l}},T=({name:e,size:t="32",className:s,alt:o})=>(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{"aria-hidden":"true",className:s||(0,r.className)("icon"),dangerouslySetInnerHTML:{__html:E[e][t]}}),o&&(0,C.jsx)("span",{className:(0,r.className)("visually-hidden"),children:o})]})},"./src/javascripts/core/ui/components/layout/interrupt.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/interrupt/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/view/window-view/collapse-button.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=()=>{const{meta:{originalError:e,title:t,message:s,buttonText:l,action:u,srText:d}}=(0,o.useInterrupt)(),p=(0,i.useSeamlyCommands)(),m=(0,i.useGeneratedId)(),{sendPolite:f}=(0,i.useLiveRegion)(),h=(0,i.useSkiplinkTargetFocusing)(),v="SeamlySessionExpiredError"===e?.name;return(0,r.useEffect)((()=>{!v&&d&&setTimeout((()=>{f(d)}),200)}),[f,d,v]),v?(0,c.jsx)(c.Fragment,{}):(0,c.jsxs)("section",{className:(0,n.className)("interrupt"),"aria-labelledby":m,children:[(0,c.jsx)(a.default,{}),(0,c.jsxs)("div",{className:(0,n.className)("interrupt__body"),children:[(0,c.jsx)("h2",{id:m,className:(0,n.className)("interrupt__title"),children:t}),(0,c.jsx)("p",{className:(0,n.className)("interrupt__message"),children:s}),l&&u&&(0,c.jsx)("div",{className:(0,n.className)("interrupt__actions"),children:(0,c.jsx)("button",{type:"button",className:(0,n.className)("button","button--primary"),onClick:()=>{u&&p[u]&&p[u](),h()},children:l})})]})]})}},"./src/javascripts/core/ui/components/layout/pre-chat-messages.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./node_modules/react-redux/dist/react-redux.mjs"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/interrupt/selectors.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/ui/components/layout/collapsed-chat-messages.tsx"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");function l(){const{preChatEvents:e}=(0,o.useConfig)(),t=(0,r.useSelector)(n.selectHasError),{isOpen:s}=(0,a.useVisibility)();return t||!e?.length||s?null:(0,c.jsx)(i.CollapsedChatMessages,{events:e})}},"./src/javascripts/core/ui/components/layout/privacy-disclaimer.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=()=>{const{t:e}=(0,o.useI18n)(),{showDisclaimer:t}=(0,r.useConfig)();return t?(0,a.jsxs)("div",{className:(0,n.className)("disclaimer"),tabIndex:0,children:[(0,a.jsx)("h2",{className:(0,n.className)("disclaimer__title"),children:e("disclaimer.title")}),(0,a.jsx)("div",{className:(0,n.className)("disclaimer__message"),dangerouslySetInnerHTML:{__html:e("disclaimer.content")}})]}):null}},"./src/javascripts/core/ui/components/options/options-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/layout/icon.tsx"),i=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),c=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./src/javascripts/core/ui/utils/general-utils.ts"),d=s("./src/javascripts/core/ui/components/options/options.tsx"),p=s("./node_modules/preact/compat/jsx-runtime.mjs");const m=()=>{const{t:e}=(0,o.useI18n)(),{menuOptions:t,showOption:s,panelActive:m,hideOption:f}=(0,l.useSeamlyOptions)(),{id:h}=(0,l.useOptionButton)(),v=(0,r.useRef)(null),[y,j]=(0,r.useState)(!1),g=(0,r.useRef)(null),b=t.length,x=(0,r.useRef)([]),_=(0,r.useRef)(!1),w=b>1,S=t[0],k=(0,r.useMemo)((()=>S?.name?.trim().replace(/\s+/g,"")),[S]);return(0,r.useEffect)((()=>()=>{v.current&&clearTimeout(v.current)}),[]),(0,r.useEffect)((()=>{y&&!_.current&&requestAnimationFrame((async()=>{await(0,c.timeout)(60);const e=t.findIndex((e=>e.available)),s=-1===e?0:e;x.current&&(0,u.focusElement)(x.current[s])})),_.current=y}),[y,t]),b?(0,p.jsxs)("div",{className:(0,n.className)("options__container"),onKeyDown:e=>{y&&((0,u.getKey)(e)===u.keyNames.Escape&&(j(!1),(0,u.focusElement)(g.current)),(0,u.getKey)(e)===u.keyNames.Home&&(x.current&&(0,u.focusElement)(x.current[0]),e.preventDefault()),(0,u.getKey)(e)===u.keyNames.End&&(x.current&&(0,u.focusElement)(x.current[b-1]),e.preventDefault()))},onFocusOut:()=>{w&&(v.current=setTimeout((()=>{j(!1)}),200))},onFocusIn:()=>{v.current&&clearTimeout(v.current)},children:[(0,p.jsx)(i.default,{transitionStartState:i.transitionStartStates.notRendered,isActive:m,children:(0,p.jsx)("div",{className:(0,n.className)("options__dialog"),children:(0,p.jsx)(d.default,{})})}),w&&(0,p.jsx)(i.default,{isActive:y,transitionStartState:i.transitionStartStates.notRendered,children:(0,p.jsx)("ul",{className:(0,n.className)(["options__menu"]),role:"menu",tabIndex:-1,"aria-labelledby":h,children:t.map((({name:r,title:o,available:a},i)=>(0,p.jsx)("li",{className:(0,n.className)("options__menu__item"),role:"menuitem","data-testid":r,children:(0,p.jsxs)("button",{type:"button",ref:e=>{e&&(x.current[i]=e)},className:(0,n.className)(["button","button--secondary"]),onKeyDown:e=>((e,t)=>{if((0,u.getKey)(e)===u.keyNames.ArrowDown){const s=Math.min(b-1,t+1);x.current&&(0,u.focusElement)(x.current[t===s?0:s]),e.preventDefault()}if((0,u.getKey)(e)===u.keyNames.ArrowUp){const s=Math.max(0,t-1);x.current&&(0,u.focusElement)(x.current[t===s?b-1:s]),e.preventDefault()}})(e,i),onKeyPress:e=>((e,s)=>{const r=String.fromCharCode(e.charCode);if(1!==r.length||!r.match(/\S/))return;let o=-1;t.forEach(((e,t)=>{t>s&&e.title.charAt(0).toLowerCase()===r.toLowerCase()&&-1===o&&(o=t)})),-1!==o&&x.current&&(0,u.focusElement)(x.current[o])})(e,i),onClick:()=>((e,t)=>{t&&(j(!1),s(e))})(r,a),"aria-disabled":!a,children:[(0,p.jsxs)("span",{className:(0,n.className)("button__text"),children:[o,!a&&" "]}),a?null:(0,p.jsx)("span",{className:(0,n.className)("button__state"),children:e("options.unavailableText")})]})},r)))})}),(0,p.jsxs)("button",{type:"button",className:(0,n.className)(["button","button--secondary","chat__options__button",...!w&&k?[`chat__options__button--${k}`]:[]]),id:h,onClick:()=>{m&&f(),w?j((e=>!e)):S.available&&!m&&s(S.name)},onKeyDown:w?e=>{(0,u.getKey)(e)===u.keyNames.ArrowDown&&(j(!0),e.preventDefault())}:void 0,ref:g,"aria-haspopup":!!w&&"menu","aria-expanded":!!w&&y,"aria-disabled":!w&&!S.available,children:[w?(0,p.jsx)(a.default,{name:"options",size:"32",alt:""}):null,(0,p.jsx)("span",{className:(0,n.className)("button__text"),children:w?e("options.openButtonText"):`${S.title}${S.available?"":" "}`}),w||S.available?null:(0,p.jsx)("span",{className:(0,n.className)("button__state"),children:e("options.unavailableText")})]})]}):null}},"./src/javascripts/core/ui/components/options/options-frame.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/layout/icon.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./src/javascripts/core/ui/hooks/use-click-outside.ts"),c=s("./src/javascripts/core/ui/utils/general-utils.ts"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=({className:e,children:t,onCancel:s,headingText:u,description:d,descriptionId:p,cancelButtonText:m,cancelButtonRef:f,disableButtonFocusing:h,position:v={horizontal:"left",vertical:"top"}})=>{const y=(0,a.useGeneratedId)(),{hideOption:j}=(0,a.useSeamlyOptions)(),{focusButton:g}=(0,a.useOptionButton)(),b=(0,r.useCallback)((()=>{j(),h||g()}),[h,g,j]),x=(0,r.useCallback)((()=>{s&&s(),b()}),[b,s]),_=(0,i.default)(x);return(0,r.useEffect)((()=>{(0,c.focusElement)(_.current)}),[_]),(0,l.jsx)("section",{className:(0,o.className)("options",{"options--right":"right"===v.horizontal,"options--left":"left"===v.horizontal,"options--top":"top"===v.vertical,"options--bottom":"bottom"===v.vertical},e||""),"aria-labelledby":y,tabIndex:-1,ref:_,children:(0,l.jsxs)("div",{className:(0,o.className)("options__body"),children:[(0,l.jsx)("h2",{id:y,className:(0,o.className)("options__title"),children:u}),(0,l.jsxs)("button",{type:"button",onClick:x,"aria-describedby":y,className:(0,o.className)("button","options__close"),ref:e=>{f&&(f.current=e)},children:[(0,l.jsx)(n.default,{name:"close",size:"16",alt:""}),(0,l.jsx)("span",{children:m})]}),d?(0,l.jsx)("p",{className:(0,o.className)("options__description"),id:p,children:d}):null,(0,l.jsx)("div",{className:(0,o.className)("options__wrapper"),children:t})]})})}},"./src/javascripts/core/ui/components/options/options.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),n=s("./src/javascripts/core/ui/components/options/transcript/index.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i={sendTranscript:n.default},c=()=>{const{optionActive:e}=(0,o.useSeamlyOptions)(),t=(0,r.useRef)(),s=i[t.current??e];return e&&(t.current=e),s?(0,a.jsx)(s,{}):null}},"./src/javascripts/core/ui/components/options/transcript/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/forms/provider.tsx"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/ui/components/options/options-frame.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/utils/form-utils.ts"),l=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),u=s("./src/javascripts/core/ui/utils/validations.ts"),d=s("./src/javascripts/core/ui/components/options/transcript/transcript-form.tsx"),p=s("./node_modules/preact/compat/jsx-runtime.mjs");const m="email",f=()=>{const[e,t]=(0,r.useState)(void 0),{hideOption:s}=(0,i.useSeamlyOptions)(),{focusButton:f}=(0,i.useOptionButton)(),{t:h}=(0,n.useI18n)(),v=(0,i.useGeneratedId)(),{sendAction:y}=(0,i.useSeamlyCommands)(),j=(0,r.useMemo)((()=>({[m]:[(0,c.getValidator)(u.isNotEmptyString,h("options.sendTranscript.noEmailText")),(0,c.getValidator)(u.isEmailString,h("options.sendTranscript.invalidEmailText"))]})),[h]),g=(0,r.useCallback)((e=>{const t=e[m].trim();y({type:l.actionTypes.sendTranscript,body:{emailAddress:t}}),s(),f()}),[y,s,f]),b=(0,r.useCallback)((({isValid:e,isSubmitted:s})=>{t(s&&!e?"options--error":void 0)}),[t]);return(0,p.jsx)(a.default,{className:e,headingText:h("options.sendTranscript.title"),cancelButtonText:h("options.cancelButtonText"),description:h("options.sendTranscript.description"),descriptionId:v,position:{vertical:"top",horizontal:"right"},children:(0,p.jsx)(o.default,{formId:"sendTranscript",onSubmit:g,validationSchema:j,onError:b,children:(0,p.jsx)(d.default,{controlName:m,describedById:v})})})}},"./src/javascripts/core/ui/components/options/transcript/transcript-form.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/form-controls/form.tsx"),a=s("./src/javascripts/core/ui/components/form-controls/input.tsx"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");function c({controlName:e,describedById:t}){const{t:s}=(0,r.useI18n)();return(0,i.jsxs)(n.default,{noValidate:"true",className:(0,o.className)("options__form"),children:[(0,i.jsx)(a.default,{id:"email-id",name:e,type:"email",autocomplete:"email",className:(0,o.className)("transcript__input"),"aria-describedby":t,labelClass:(0,o.className)("label"),labelText:s("options.sendTranscript.label")}),(0,i.jsx)("div",{className:(0,o.className)("options__actions"),children:(0,i.jsx)("button",{type:"submit",className:(0,o.className)("button","button--primary","options__submit"),children:s("options.sendTranscript.sendButtonText")})})]})}},"./src/javascripts/core/ui/components/suggestions/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>E}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/app/hooks.ts"),a=s("./src/javascripts/core/domains/config/hooks.ts"),i=s("./src/javascripts/core/domains/i18n/hooks.ts"),c=s("./src/javascripts/core/domains/interrupt/selectors.ts"),l=s("./src/javascripts/core/domains/translations/hooks.ts"),u=s("./src/javascripts/core/domains/visibility/constants.ts"),d=s("./src/javascripts/core/domains/visibility/hooks.ts"),p=s("./src/javascripts/core/lib/css.ts"),m=s("./src/javascripts/core/lib/id.ts"),f=s("./src/javascripts/core/ui/components/suggestions/suggestions-list.tsx"),h=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),v=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),y=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),j=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),g=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),b=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),x=s("./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts"),_=s("./src/javascripts/core/ui/hooks/use-seamly-resume-conversation-prompt.ts"),w=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),S=s("./src/javascripts/core/ui/utils/general-utils.ts"),k=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),C=s("./node_modules/preact/compat/jsx-runtime.mjs");const E=({isAside:e=!1})=>{const{isInline:t}=(0,g.useSeamlyLayoutMode)(),{t:s}=(0,i.useI18n)(),{addMessageBubble:E,emitEvent:T,sendAction:N}=(0,b.default)(),I=(0,j.useSeamlyHasConversation)(),{isOpen:O,setVisibility:A}=(0,d.useVisibility)(),{showSuggestions:P}=(0,a.useConfig)(),L=(0,w.useGeneratedId)(),R=(0,v.useSkiplinkTargetFocusing)(),M=(0,r.useRef)(null),{sendPolite:D}=(0,y.useLiveRegion)(),F=(0,o.useSelector)(c.selectHasError),{hasCountdown:U,endCountdown:z}=(0,x.default)(),{hasPrompt:B,continueChat:V}=(0,_.default)(),$=(0,n.useUserHasResponded)(),H=(0,g.useSeamlyServiceData)("suggestion"),{body:G}=(0,l.useTranslatedEventData)({payload:H,type:"service_data"}),q=(0,r.useMemo)((()=>F?[]:Array.isArray(G)?G:[]),[G,F]),W=(0,r.useRef)(),K=(0,r.useRef)(!1),J=(0,r.useRef)(),Y=!!q?.length,X=t?($||O)&&!e:$,Q=(0,r.useRef)(X),Z=Y&&!X&&P,ee=Y?q:J.current;J.current=ee;const te=(0,r.useMemo)((()=>{const t=["suggestions"];return e&&t.push("suggestions--aside"),(0,p.className)(t)}),[e]),se=(0,r.useCallback)((({id:e,question:t})=>{if(!I())return;U&&z(!0),B&&V();const s=(0,m.randomId)(),r={type:k.actionTypes.custom,originMessage:H.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:t}},transactionId:s};N(r),E(t,s),T(`action.${r.type}`,r),O||A({visibility:u.visibilityStates.open}),R()}),[E,V,z,T,R,I,U,B,O,H,N,A]);(0,r.useEffect)((()=>{if(W.current!==q&&!X){if(Y){const e=K.current?s("suggestions.srUpdatedText"):s("suggestions.srAvailableText");setTimeout((()=>{D(e)}),30)}else K.current&&D(s("suggestions.srUnavailableText"));W.current=q}!Q.current&&X?((0,S.runIfElementContainsOrHasFocus)(M.current,R),D(s("suggestions.srUnavailableText"))):!Y&&K.current&&(0,S.runIfElementContainsOrHasFocus)(M.current,R),K.current=Y,Q.current=X}),[q,Y,X,R,D,s]);const re=s("suggestions.headingText"),oe=s("suggestions.footerText"),ne=re?"section":"div";return(0,C.jsx)(h.default,{isActive:!!Z,transitionStartState:h.transitionStartStates.notRendered,children:(0,C.jsxs)(ne,{className:te,"aria-labelledby":re?L:void 0,ref:M,children:[re&&(0,C.jsx)("p",{id:L,className:(0,p.className)("suggestions__heading"),children:re}),!!ee&&(0,C.jsx)(f.default,{suggestions:ee,onClickSuggestion:se}),oe&&!O&&(0,C.jsx)("p",{className:(0,p.className)("suggestions__footer"),children:oe})]})})}},"./src/javascripts/core/ui/components/suggestions/suggestions-item.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c,mapCategoryToClass:()=>i}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/layout/icon.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=e=>`suggestions__item--${String(e).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`,c=({id:e,categories:t=[],question:s,onClick:c,hasIcon:l})=>{const u=(0,r.useMemo)((()=>["suggestions__item",...t.map(i)]),[t]),d=(0,r.useCallback)((()=>{c&&c({id:e,question:s})}),[e,s,c]);return(0,a.jsx)("li",{className:(0,o.className)(u),children:(0,a.jsxs)("button",{type:"button",onClick:d,className:(0,o.className)("button","button--primary"),children:[l&&(0,a.jsx)(n.default,{name:"chevronRight",size:"8",alt:""}),s]})})}},"./src/javascripts/core/ui/components/suggestions/suggestions-list.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/suggestions/suggestions-item.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({className:e,suggestions:t=[],onClickSuggestion:s,hasIcon:a=!0})=>(0,n.jsx)("ul",{className:(0,r.className)("suggestions__list",e||""),children:t.map((e=>(0,n.jsx)(o.default,{hasIcon:a,onClick:s,categories:e.categories,id:e.id,question:e.question},e.id)))})},"./src/javascripts/core/ui/components/translation-proposal/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/chat-status/index.tsx"),n=s("./src/javascripts/core/ui/components/chat-status/chat-status-action.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i(){const{showProposal:e,translationProposal:t,dismissTranslationProposal:s,activateTranslationProposal:i}=(0,r.useTranslationProposal)(),{id:c}=(0,r.useTranslationsContainer)();return e&&t?(0,a.jsx)(o.default,{handleClose:s,srCloseButtonText:t.srDismissButtonText,id:c,title:t.titleLabel,children:(0,a.jsx)(n.default,{handleClick:i,icon:"newTranslation",title:t.buttonLabel})}):null}},"./src/javascripts/core/ui/components/view/app-view.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/ui/components/conversation/conversation.tsx"),o=s("./src/javascripts/core/ui/components/layout/chat.tsx"),n=s("./src/javascripts/core/ui/components/layout/chat-frame.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=()=>(0,a.jsx)(o.default,{children:(0,a.jsx)(n.default,{children:(0,a.jsx)(r.default,{})})})},"./src/javascripts/core/ui/components/view/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/app/hooks.ts"),a=s("./src/javascripts/core/domains/config/hooks.ts"),i=s("./src/javascripts/core/domains/i18n/hooks.ts"),c=s("./src/javascripts/core/domains/store/selectors.ts"),l=s("./src/javascripts/core/domains/translations/hooks.ts"),u=s("./src/javascripts/core/domains/visibility/hooks.ts"),d=s("./src/javascripts/core/lib/css.ts"),p=s("./src/javascripts/core/ui/components/view/app-view.tsx"),m=s("./src/javascripts/core/ui/components/view/inline-view.tsx"),f=s("./src/javascripts/core/ui/components/view/window-view/index.tsx"),h=s("./src/javascripts/core/ui/hooks/component-helper-hooks.ts"),v=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),y=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),j=s("./src/javascripts/core/ui/hooks/use-notifications.ts"),g=s("./node_modules/preact/compat/jsx-runtime.mjs");const b={app:p.default,inline:m.default,window:f.default};function x(e){const t=document.createElement("div");return t.innerHTML=e||"",t.textContent||t.innerText||""}const _=({children:e})=>{const{sendNotification:t}=(0,j.default)(),[,s]=(0,v.useSeamlyContainerElement)(),p=(0,a.useConfig)(),m=(0,y.useSeamlyCurrentAgent)(),{proactiveMessages:f}=(0,y.useSeamlyServiceInfo)(),{isOpen:_,isVisible:w}=(0,u.useVisibility)(),S=(0,h.useSeamlyAppContainerClassNames)(),k=(0,n.useUserHasResponded)(),C=(0,o.useSelector)(c.selectLastUnreadEvent),{body:E}=(0,l.useTranslatedEventData)(C),{userLocale:T}=(0,i.useI18n)(),N=(0,r.useRef)(void 0),I=(0,r.useMemo)((()=>E?"string"==typeof E?x(E):"text"in E?x(E.text):"prompt"in E&&E.prompt&&"text"in E.prompt?x(E.prompt?.text):"":""),[E]);(0,r.useEffect)((()=>{m?.name&&I&&f&&C&&N.current!==C.payload?.id&&(t(m.name,{body:I,icon:m?.avatar||void 0}),N.current=C.payload.id)}),[m?.avatar,m?.name,C,I,f,t]);const O=b[p.layoutMode],A=(0,r.useCallback)((e=>{"function"==typeof s&&s(e)}),[s]),P=(0,r.useMemo)((()=>{if(T){const e=document.querySelector("html")?.getAttribute("lang");if(e!==T)return T}}),[T]);if(!O)return console.warn('"layoutMode" should be one of "app", "inline" or "window"'),null;const L=["app",`app--layout-${p.layoutMode}`,`namespace--${p.namespace}`];return"function"!=typeof S?L.push(...S):L.push(...S(p)),_||"app"===p.layoutMode||L.push("app--collapsed"),k&&L.push("app--user-responded"),w?(0,g.jsx)("div",{className:(0,d.className)(L),lang:P,tabIndex:-1,"data-nosnippet":!0,style:{zIndex:p?.zIndex},ref:A,children:e||(0,g.jsx)(O,{})}):null}},"./src/javascripts/core/ui/components/view/inline-view.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/javascripts/core/domains/visibility/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/conversation/conversation.tsx"),a=s("./src/javascripts/core/ui/components/layout/chat.tsx"),i=s("./src/javascripts/core/ui/components/layout/chat-frame.tsx"),c=s("./src/javascripts/core/ui/components/layout/pre-chat-messages.tsx"),l=s("./src/javascripts/core/ui/components/suggestions/index.tsx"),u=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=()=>{const{showInlineView:e,containerRef:t}=(0,r.useShowInlineView)(),{isOpen:s}=(0,r.useVisibility)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u.default,{isActive:!s,transitionStartState:u.transitionStartStates.rendered,children:(0,d.jsxs)("div",{ref:t,className:(0,o.className)("unstarted-wrapper","unstarted-wrapper--inline"),children:[(0,d.jsx)(c.default,{}),(0,d.jsx)(l.default,{})]})}),(0,d.jsx)(u.default,{isActive:s,transitionStartState:u.transitionStartStates.rendered,children:(0,d.jsx)(a.default,{ref:t,children:e&&(0,d.jsx)(i.default,{children:s&&(0,d.jsx)(n.default,{})})})})]})}},"./src/javascripts/core/ui/components/view/window-view/collapse-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/layout/icon.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=()=>{const{t:e}=(0,r.useI18n)(),{isOpen:t,closeChat:s}=(0,o.useVisibility)(),{isWindow:l}=(0,i.useSeamlyLayoutMode)();return t&&l?(0,c.jsx)("button",{type:"button",className:(0,n.className)("button","collapse-button"),onClick:s,children:(0,c.jsx)(a.default,{name:"chevronDown",size:"32",alt:e("window.srCollapseButton")})}):null}},"./src/javascripts/core/ui/components/view/window-view/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var r=s("./src/javascripts/core/domains/app/hooks.ts"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("./src/javascripts/core/ui/components/conversation/conversation.tsx"),c=s("./src/javascripts/core/ui/components/layout/chat.tsx"),l=s("./src/javascripts/core/ui/components/layout/chat-frame.tsx"),u=s("./src/javascripts/core/ui/components/layout/continue-chat-messages.tsx"),d=s("./src/javascripts/core/ui/components/layout/pre-chat-messages.tsx"),p=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),m=s("./src/javascripts/core/ui/components/view/window-view/window-open-button.tsx"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");const h=(e,t,s)=>"object"==typeof e?e[t]:s,v=()=>{const{isOpen:e,openChat:t}=(0,n.useVisibility)(),s=(0,r.useUserHasResponded)(),{continueChat:v,preChat:y}=(0,o.useConfig)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(m.default,{onClick:t}),(0,f.jsx)(p.default,{isActive:!!y&&!e&&!s,exitAfter:h(y,"exitAfter"),enterDelay:h(y,"enterDelay"),transitionStartState:p.transitionStartStates.notRendered,children:(0,f.jsx)("div",{className:(0,a.className)("unstarted-wrapper","unstarted-wrapper--window"),children:(0,f.jsx)(d.default,{})})}),(0,f.jsx)(p.default,{isActive:v&&!e&&s,exitAfter:h(v,"exitAfter"),enterDelay:h(v,"enterDelay"),transitionStartState:p.transitionStartStates.notRendered,children:(0,f.jsx)("div",{className:(0,a.className)("unstarted-wrapper","unstarted-wrapper--window","unstarted-wrapper--continue"),children:(0,f.jsx)(u.default,{})})}),(0,f.jsx)(p.default,{isActive:e,transitionStartState:p.transitionStartStates.notRendered,children:(0,f.jsx)(c.default,{children:(0,f.jsx)(l.default,{children:(0,f.jsx)(i.default,{})})})})]})}},"./src/javascripts/core/ui/components/view/window-view/window-open-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/config/hooks.ts"),a=s("./src/javascripts/core/domains/i18n/hooks.ts"),i=s("./src/javascripts/core/domains/interrupt/selectors.ts"),c=s("./src/javascripts/core/domains/visibility/hooks.ts"),l=s("./src/javascripts/core/lib/css.ts"),u=s("./src/javascripts/core/ui/components/layout/icon.tsx"),d=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),p=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),m=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),f=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),h=s("./node_modules/preact/compat/jsx-runtime.mjs");const v=()=>{const e=(0,n.useStartChatIcon)(),t=(0,f.useSeamlyCurrentAgent)(),s=(0,o.useSelector)(i.selectHasError),r=t&&!s,a=r?t.avatar:e;return a?(0,h.jsx)("img",{className:(0,l.className)(r?"avatar":"icon"),src:a,alt:""}):(0,h.jsx)(u.default,{name:"avatar",size:"32",alt:""})},y=({onClick:e})=>{const t=(0,m.useSeamlyHasConversation)(),{t:s}=(0,a.useI18n)(),o=t()?s("window.openButton.srContinue"):s("window.openButton.srStart"),n=(0,p.useSkiplinkTargetFocusing)(),{isOpen:i}=(0,c.useVisibility)(),u=(0,f.useSeamlyUnreadCount)(),y=(0,r.useCallback)((()=>{e(),n()}),[n,e]);return(0,h.jsx)(d.default,{isActive:!i,transitionStartState:d.transitionStartStates.rendered,children:(0,h.jsxs)("button",{className:(0,l.className)("window-open-button"),"aria-label":o,"aria-hidden":i,onClick:y,children:[(0,h.jsx)(d.default,{isActive:!!u,transitionStartState:d.transitionStartStates.notRendered,children:(0,h.jsx)("span",{className:(0,l.className)("message-count"),"aria-hidden":"true",children:u})}),(0,h.jsx)(v,{})]})})}},"./src/javascripts/core/ui/components/warnings/idle-detach-warning.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),a=s("./src/javascripts/core/ui/hooks/use-seamly-activity-event-handler.ts"),i=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),c=s("./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts"),l=s("./src/javascripts/core/ui/components/warnings/prompt.tsx"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=()=>{const{t:e}=(0,r.useI18n)(),t=(0,n.useSkiplinkTargetFocusing)(),s=(0,a.default)(),{emitEvent:d}=(0,i.default)(),{isActive:p,remaining:m,timer:f,endCountdown:h}=(0,c.default)(),v=!!m&&m>0,y=e(v?"idleDetachWarning.countdownTitle":"idleDetachWarning.notifyTransferText");return(0,u.jsx)(l.default,{baseClassName:"idle",title:y,children:v&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:(0,o.className)("idle__count-container"),children:p&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("span",{className:(0,o.className)("idle__count-text"),children:e("idleDetachWarning.countdownText")}),(0,u.jsx)("span",{className:(0,o.className)("idle__count-timer"),children:e("idleDetachWarning.countdownTimer",f)})]})}),(0,u.jsxs)("div",{className:(0,o.className)("idle__options"),children:[(0,u.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{s(),h(!0),t(),d("idleTimer.selectContinue")},children:e("idleDetachWarning.continueButton")}),(0,u.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{h(),t(),d("idleTimer.selectEnd")},children:e("idleDetachWarning.detachButton")})]})]})})}},"./src/javascripts/core/ui/components/warnings/prompt.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({baseClassName:e,children:t,title:s})=>{const a=(0,o.useSkiplink)(),i=(0,o.useGeneratedId)();return(0,n.jsxs)("section",{id:a,className:(0,r.className)(e),"aria-describedby":i,tabIndex:-1,children:[(0,n.jsx)("h2",{className:(0,r.className)(`${e}__title`),id:i,children:s}),t]})}},"./src/javascripts/core/ui/components/warnings/resume-conversation-prompt.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),a=s("./src/javascripts/core/ui/hooks/use-seamly-activity-event-handler.ts"),i=s("./src/javascripts/core/ui/hooks/use-seamly-resume-conversation-prompt.ts"),c=s("./src/javascripts/core/ui/components/warnings/prompt.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=()=>{const{t:e}=(0,r.useI18n)(),t=(0,a.default)(),{name:s}=(0,n.useSeamlyCurrentAgent)()||{},{continueChat:u,restartChat:d}=(0,i.default)();return(0,l.jsx)(c.default,{baseClassName:"prompt",title:e("resumeConversationPrompt.title",{name:s}),children:(0,l.jsxs)("div",{className:(0,o.className)("prompt__options"),children:[(0,l.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{t(),u()},children:e("resumeConversationPrompt.continueButton")}),(0,l.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:d,children:e("resumeConversationPrompt.detachButton")})]})})}},"./src/javascripts/core/ui/components/widgets/in-out-transition.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f,transitionStartStates:()=>m,useStableCallback:()=>p}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("preact"),o=s("preact/hooks"),n=s("./src/javascripts/core/config.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("./src/javascripts/core/ui/hooks/use-timeout.ts"),c=s("./src/javascripts/core/ui/utils/general-utils.ts"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u={visible:(0,a.className)("transition--visible"),in:(0,a.className)("transition--in"),visuallyHidden:(0,a.className)("visually-hidden")},d=Object.values(u),p=e=>{const t=(0,o.useRef)(null);t.current=e;const s="function"==typeof e;return(0,o.useMemo)((()=>s?(...e)=>t.current(...e):void 0),[s])},m={notRendered:"notRendered",rendered:"rendered",visuallyHidden:"visuallyHidden"},f=({children:e,isActive:t,timeout:s=n.defaultTransitionTimeMs,transitionStartState:a=m.notRendered,onInTransitionComplete:f=()=>{},onOutTransitionComplete:h=()=>{},exitAfter:v,enterDelay:y=0})=>{const j=(0,o.useRef)(!1),g=(0,o.useRef)(null),b=(0,o.useRef)(null),x=a===m.visuallyHidden,[_,w]=(0,o.useState)((()=>x?[u.visuallyHidden]:[])),[S,k]=(0,o.useState)((()=>0===y)),C=(0,o.useMemo)((()=>v?v+y:v),[y,v]);(0,i.default)((()=>k(!1)),t?C:void 0),(0,i.default)((()=>k(!0)),t?y:void 0);const E=(0,o.useMemo)((()=>S&&t),[t,S]),T=p(f),N=p(h),I="notRendered"!==a||_.length>0;return(0,o.useEffect)((()=>(j.current&&!E&&(w([u.visible]),g.current=setTimeout((()=>{w([...x?[u.visuallyHidden]:[]]),N&&(b.current=requestAnimationFrame((()=>{N()})))}),s)),!j.current&&E&&(w([u.visible]),b.current=requestAnimationFrame((()=>{b.current=requestAnimationFrame((()=>{w([u.visible,u.in]),T&&(g.current=setTimeout((()=>{T()}),s))}))}))),j.current=E,()=>{g.current&&clearTimeout(g.current),b.current&&cancelAnimationFrame(b.current)})),[x,T,N,s,E]),(0,l.jsx)(l.Fragment,{children:I&&(0,r.toChildArray)(e).filter(c.childIsVNode).map((e=>{const{className:t=""}=e.props,s=t.split(" ").filter((e=>!d.includes(e)));return(0,r.cloneElement)(e,{className:[...s,..._].join(" ")})}))})}},"./src/javascripts/core/ui/components/widgets/lightbox.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("./src/javascripts/core/ui/components/layout/icon.tsx"),c=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),l=s("./src/javascripts/core/ui/components/widgets/modal.tsx"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=({url:e,description:t,onClose:s})=>{const d=(0,o.useConfig)(),p=(0,c.useSeamlyActivityEventHandler)(),m=(0,c.useSeamlyAppContainerClassNames)(),f=(0,r.useRef)(null),{t:h}=(0,n.useI18n)(),v=["modal",`app--layout-${d.layoutMode}`,`namespace--${d.namespace}`];"function"!=typeof m?v.push(...m):v.push(...m(d));const y=e=>{e.stopPropagation()},j=()=>{s()},g=d?.zIndex?{zIndex:d.zIndex+1}:void 0;return(0,u.jsx)(l.default,{onClose:s,"aria-label":h("lightbox.heading"),fallBackFocusRef:f,children:({onClose:s,modalRenderFn:r})=>r((s=>(0,u.jsx)("div",{className:(0,a.className)(v),onClick:j,style:g,children:(0,u.jsxs)("div",{className:(0,a.className)("modal__float"),tabIndex:-1,onMouseDown:p,onKeyDown:p,onTouchStart:p,onMouseMove:p,onWheel:p,onPointerDown:p,onPointerMove:p,ref:f,children:[(0,u.jsx)("div",{className:(0,a.className)("modal__inner"),onClick:y,children:(0,u.jsx)("img",{className:(0,a.className)("modal__image"),src:e,alt:t})}),(0,u.jsxs)("button",{type:"button",className:(0,a.className)("modal__close"),onClick:s,children:[(0,u.jsx)(i.default,{name:"close",size:"16",alt:""}),h("lightbox.closeLabel")]})]})}))(s))})}},"./src/javascripts/core/ui/components/widgets/modal.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/focus-trap/dist/focus-trap.esm.js"),o=s("preact"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./src/javascripts/core/ui/utils/general-utils.ts");const c=({children:e,onClose:t,fallBackFocusRef:s,"aria-label":c,"aria-labelledby":l})=>{const u=(0,a.useGeneratedId)(),d=(0,n.useRef)(null),p=(0,n.useRef)(null),[m,f]=(0,n.useState)(!1);return(0,n.useEffect)((()=>(m&&d.current&&(p.current=(0,r.createFocusTrap)(d.current,{initialFocus:s.current||void 0}),p.current.activate()),()=>{p.current&&p.current.deactivate()})),[m,s]),(0,n.useEffect)((()=>{const e=(0,i.createAriaHider)();return()=>{e()}}),[m]),(0,n.useEffect)((()=>{m&&d.current&&d.current.addEventListener("keydown",(e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&t()}))}),[m,t]),(0,n.useLayoutEffect)((()=>{const e=document.getElementsByTagName("body")[0],t=document.createElement("div");return t.setAttribute("id",u),t.setAttribute("role","dialog"),t.setAttribute("data-nosnippet","true"),t.setAttribute("aria-modal","true"),c&&t.setAttribute("aria-label",c),l&&t.setAttribute("aria-labelledby",l),e.appendChild(t),d.current=t,f(!0),()=>{d.current&&(e.removeChild(d.current),d.current=null)}}),[c,l,u]),"function"==typeof e?e({onClose:t,modalRenderFn:e=>d.current&&(0,o.render)(e,d.current)}):d.current&&(0,o.render)((0,o.toChildArray)(e).filter(i.childIsVNode).map((e=>(e.props={...e.props,onClose:t},e))),d.current)}},"./src/javascripts/core/ui/components/widgets/upload-progress.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/form-controls/error.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=()=>{const{t:e}=(0,r.useI18n)(),{currentUploads:t}=(0,a.useFileUploads)();return(0,i.jsx)("div",{className:(0,o.className)("progress"),children:t.map((({id:t,name:s,progress:r,uploading:a,error:c})=>(0,i.jsxs)("div",{className:(0,o.className)("progress_container"),children:[(0,i.jsxs)("div",{className:(0,o.className)("progress__text"),children:[(0,i.jsx)("span",{className:(0,o.className)("progress__text--file-name"),children:s}),(0,i.jsx)("span",{className:(0,o.className)("progress__text--percentage"),children:`${r}%`})]}),(0,i.jsx)(n.default,{error:c,id:"progress-error"}),(0,i.jsx)("progress",{className:(0,o.className)("progress__bar"),role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":e("fileUpload.srProgressLabel",{fileName:s}),max:"100","aria-valuenow":r,value:r,"aria-busy":a,children:`${r}%`})]},t)))})}},"./src/javascripts/core/ui/hooks/component-helper-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useSeamlyAppContainerClassNames:()=>o,useSeamlyMessageContainerClassNames:()=>n}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/config/hooks.ts");const o=()=>(0,r.useConfig)().appContainerClassNames,n=e=>{const{fromClient:t}=e.payload,s=["message"];return"info"===e.type?s.push("message--source-info"):t?s.push("message--source-user"):s.push("message--source-agent"),s}},"./src/javascripts/core/ui/hooks/event-bus-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/core/seamly-api-context.ts");const n=()=>{const e=(0,r.useContext)(o.SeamlyEventBusContext);if(!e)throw new Error("useSeamlyEventBusContext has to be used within <SeamlyEventBusContext.Provider>");return e}},"./src/javascripts/core/ui/hooks/file-upload-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useFileUploadMeta:()=>c,useFileUploads:()=>l}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.every.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/store/slice.ts"),a=s("./src/javascripts/core/ui/components/core/seamly-file-upload-context.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const c=()=>{const{showFileUpload:e,entryMeta:{options:t,optionsOverride:s},options:{features:{uploads:r}}}=(0,i.useSeamlyStateContext)(),{allowedMimeTypes:o,maxSize:n}=s?.upload||{},{enabled:a,enabledFromEntry:c}=r||{},{allowedMimeTypes:l,maxSize:u}={...t.upload||{allowedMimeTypes:[],maxSize:0},...o?{allowedMimeTypes:o}:{},...n?{maxSize:n}:{}};return{showFileUpload:e,accountAllowsUploads:!!r,serviceAllowsUploads:c||a,allowedMimeTypes:l,maxSize:u}},l=()=>{const{currentUploads:e}=(0,i.useSeamlyStateContext)(),t=(0,o.useAppDispatch)(),s=(()=>{const e=(0,r.useContext)(a.default);if(!e)throw new Error("useSeamlyFileUploadContext has to be used within <SeamlyFileUploadContext.Provider>");return e})();return{uploadFile:(0,r.useCallback)((e=>{s(e)}),[s]),clearUploads:(0,r.useCallback)((()=>{t((0,n.clearAllUploads)())}),[t]),currentUploads:e,isUploading:e.some((e=>e.uploading)),isComplete:e.every((e=>e.complete))}}},"./src/javascripts/core/ui/hooks/focus-helper-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{timeout:()=>c,useElementFocusingById:()=>d,useFocusIfSeamlyContainedFocus:()=>m,useSeamlyContainerElement:()=>u,useSkiplinkTargetFocusing:()=>p});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/store/slice.ts"),a=s("./src/javascripts/core/ui/utils/general-utils.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const c=(e=0)=>new Promise((t=>{setTimeout(t,e)})),l=e=>{requestAnimationFrame((async()=>{await c(180);const t="string"==typeof e?document.getElementById(e):e;(0,a.focusElement)(t)}))},u=()=>{const{seamlyContainerElement:e}=(0,i.useSeamlyStateContext)(),t=(0,o.useAppDispatch)();return[e,(0,r.useCallback)((e=>{t((0,n.setSeamlyContainerElement)(e))}),[t])]},d=e=>(0,r.useCallback)((()=>{l(e)}),[e]),p=()=>{const e=(0,i.useSkiplink)();return d(e)},m=()=>{const e=(0,r.useRef)(null),[t]=u();return e.current=t,(0,r.useCallback)((t=>{(0,a.runIfElementContainsOrHasFocus)(e.current,(()=>{l(t)}))}),[])}},"./src/javascripts/core/ui/hooks/live-region-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useLiveRegion:()=>i,useSeamlyLiveRegionContext:()=>a});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/core/seamly-live-region-context.ts"),n=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const a=()=>{const e=(0,r.useContext)(o.SeamlyLiveRegionContext);if(!e)throw new Error("useSeamlyLiveRegionContext has to be used within <SeamlyLiveRegionContext.Provider>");return e},i=()=>{const e=a();return{sendPolite:(0,r.useCallback)((t=>{t&&e({ariaLive:n.ariaLiveLevels.polite,messageText:t})}),[e]),sendAssertive:(0,r.useCallback)((t=>{t&&e({ariaLive:n.ariaLiveLevels.assertive,messageText:t})}),[e])}}},"./src/javascripts/core/ui/hooks/seamly-api-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useSeamlyApiContext:()=>n,useSeamlyConversationUrl:()=>i,useSeamlyHasConversation:()=>c,useSeamlyObjectStore:()=>a});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/core/seamly-api-context.ts");const n=()=>{const e=(0,r.useContext)(o.SeamlyApiContext);if(!e)throw new Error("useSeamlyApiContext has to be used within <SeamlyApiContext.Provider>");return e},a=()=>n().store,i=()=>{const{get:e}=a();return e?e("conversationUrl"):null},c=()=>{const e=n();return(0,r.useCallback)((()=>e.hasConversation()),[e])}},"./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useSeamlyEntry:()=>d,useSeamlyTyping:()=>u});var r=s("preact/hooks"),o=s("./src/javascripts/core/config.ts"),n=s("./src/javascripts/core/domains/store/index.ts"),a=s("./src/javascripts/core/domains/store/slice.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),l=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const u=()=>{const{sendAction:e}=(0,i.useSeamlyCommands)(),{features:t}=(0,i.useSeamlyOptions)(),{typingPeekahead:s}=t||{},n=(0,r.useRef)(null),a=(0,r.useRef)(null),c=(0,r.useRef)(!1),u=(0,r.useRef)(null);(0,r.useEffect)((()=>()=>{u.current&&clearInterval(u.current),n.current&&clearTimeout(n.current),a.current&&clearTimeout(a.current)}),[]);const d=(t,r)=>{e({type:l.actionTypes.typing,state:t,...s&&s.enabled?{body:{currentMessage:r}}:{}})};return e=>{e.code&&"Enter"===e.code||13===e.keyCode||(c.current=!0,u.current||(d(!0,e.target.value),u.current=setInterval((()=>{!c.current&&u.current?(clearInterval(u.current),u.current=null):s&&s.enabled&&d(!0,e.target.value)}),o.typingTimeout)),n.current&&clearTimeout(n.current),a.current&&clearTimeout(a.current),n.current=setTimeout((()=>{c.current=!1}),300),a.current=setTimeout((()=>{d(!1,e.target.value)}),o.typingTimeout))}},d=()=>{const{default:e,active:t,userSelected:s,options:o,optionsOverride:i}=(0,c.useSeamlyStateContext)().entryMeta,l=(0,n.useAppDispatch)(),u=s||t||e,d=i&&i[u]||o&&o[u]||{},p=(0,r.useCallback)((e=>{l((0,a.setBlockAutoEntrySwitch)(e))}),[l]),m=(0,r.useCallback)((e=>{l((0,a.setActiveEntryType)(e))}),[l]),f=(0,r.useCallback)((e=>{l((0,a.setUserEntryType)(e))}),[l]),h=(0,r.useCallback)((()=>{s?f(null):m(e)}),[m,f,e,s]);return{activeEntry:u,activeEntryOptions:d,setActiveEntryType:m,setUserEntryType:f,cancelEntrySelection:h,setBlockAutoEntrySwitch:p}}},"./src/javascripts/core/ui/hooks/seamly-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useElementFocusingById:()=>n.useElementFocusingById,useEntryTextLimit:()=>d.useEntryTextLimit,useEvents:()=>d.useEvents,useFileUploadMeta:()=>i.useFileUploadMeta,useFileUploads:()=>i.useFileUploads,useFocusIfSeamlyContainedFocus:()=>n.useFocusIfSeamlyContainedFocus,useForceUpdate:()=>y.useForceUpdate,useGeneratedId:()=>y.useGeneratedId,useLastMessageEventId:()=>d.useLastMessageEventId,useLiveRegion:()=>c.useLiveRegion,useOptionButton:()=>u.useOptionButton,useSeamlyActivityEventHandler:()=>p.default,useSeamlyApiContext:()=>l.useSeamlyApiContext,useSeamlyAppContainerClassNames:()=>a.useSeamlyAppContainerClassNames,useSeamlyChat:()=>m.default,useSeamlyCommands:()=>f.default,useSeamlyContainerElement:()=>n.useSeamlyContainerElement,useSeamlyConversationUrl:()=>l.useSeamlyConversationUrl,useSeamlyCurrentAgent:()=>d.useSeamlyCurrentAgent,useSeamlyEventStream:()=>j,useSeamlyHeaderData:()=>d.useSeamlyHeaderData,useSeamlyIdleDetachCountdown:()=>h.default,useSeamlyIsHistoryLoaded:()=>d.useSeamlyIsHistoryLoaded,useSeamlyIsLoading:()=>d.useSeamlyIsLoading,useSeamlyLayoutMode:()=>d.useSeamlyLayoutMode,useSeamlyLiveRegionContext:()=>c.useSeamlyLiveRegionContext,useSeamlyMessageContainerClassNames:()=>a.useSeamlyMessageContainerClassNames,useSeamlyOptions:()=>u.useSeamlyOptions,useSeamlyParticipant:()=>d.useSeamlyParticipant,useSeamlyResumeConversationPrompt:()=>v.default,useSeamlyServiceData:()=>d.useSeamlyServiceData,useSeamlyServiceInfo:()=>d.useSeamlyServiceInfo,useSeamlyStateContext:()=>d.useSeamlyStateContext,useSeamlyUnreadCount:()=>d.useSeamlyUnreadCount,useSkiplink:()=>d.useSkiplink,useSkiplinkTargetFocusing:()=>n.useSkiplinkTargetFocusing});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/hooks/use-seamly-conversation.ts"),n=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),a=s("./src/javascripts/core/ui/hooks/component-helper-hooks.ts"),i=s("./src/javascripts/core/ui/hooks/file-upload-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/seamly-option-hooks.ts"),d=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/use-seamly-activity-event-handler.ts"),m=s("./src/javascripts/core/ui/hooks/use-seamly-chat.ts"),f=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),h=s("./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts"),v=s("./src/javascripts/core/ui/hooks/use-seamly-resume-conversation-prompt.ts"),y=s("./src/javascripts/core/ui/hooks/utility-hooks.ts");const j=(e,t)=>{const s=(0,o.default)();(0,r.useEffect)((()=>{s.onMessage(((s,r)=>(t&&!t({type:s,payload:r})||e({type:s,payload:r}),r)))}),[e,t,s])}},"./src/javascripts/core/ui/hooks/seamly-option-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useOptionButton:()=>d,useSeamlyOptions:()=>u}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/store/index.ts"),a=s("./src/javascripts/core/domains/store/slice.ts"),i=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const u=()=>{const{t:e}=(0,o.useI18n)(),{options:t}=(0,l.useSeamlyStateContext)(),{panelActive:s,optionActive:i,userSelectedOptions:u,features:d}=t,{extraMenuItem:p,sendTranscript:m}=d,f={extraMenuItem:p,sendTranscript:m},h=t=>"extraMenuItem"===t?"Extra menu item":e(`options.${t}.menuTitle`),v=Object.keys(f).filter((e=>f[e])).map((e=>({name:e,title:h(e),available:f[e].enabled}))),y=p||m,j=(0,n.useAppDispatch)(),{get:g,set:b}=(0,c.useSeamlyObjectStore)();return{allowOptionSelection:y,userSelectedOptions:u,features:d,menuOptions:v,initUserSelectedOptions:(0,r.useCallback)((()=>{const e=g("options")||{};j((0,a.setUserSelectedOptions)(e))}),[g,j]),setUserSelectedOptions:(0,r.useCallback)((e=>{j((0,a.setUserSelectedOptions)(e)),b("options",e)}),[b,j]),setUserSelectedOption:(0,r.useCallback)(((e,t)=>{const s=g("options")||{};"object"==typeof s&&b("options",{...s,[e]:t}),j((0,a.setUserSelectedOption)({option:e,value:t}))}),[j,g,b]),showOption:e=>{j((0,a.showOption)(e))},hideOption:()=>{j((0,a.hideOption)())},panelActive:s,optionActive:i}},d=()=>{const{optionsButtonId:e}=(0,l.useSeamlyStateContext)();return{id:e,focusButton:(0,i.useElementFocusingById)(e)}}},"./src/javascripts/core/ui/hooks/seamly-state-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectEventIds:()=>f,selectEvents:()=>p,selectEventsWithSuggestion:()=>d,selectState:()=>l,useEntryTextLimit:()=>T,useEvents:()=>m,useEventsIds:()=>h,useLastMessageEventId:()=>S,useLoadedImageEventIds:()=>g,useSeamlyCurrentAgent:()=>C,useSeamlyHeaderData:()=>y,useSeamlyIsHistoryLoaded:()=>k,useSeamlyIsLoading:()=>v,useSeamlyLayoutMode:()=>N,useSeamlyParticipant:()=>x,useSeamlyServiceData:()=>E,useSeamlyServiceInfo:()=>_,useSeamlyStateContext:()=>u,useSeamlyUnreadCount:()=>j,useSkiplink:()=>b}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/reselect/dist/reselect.mjs"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/app/selectors.ts"),a=s("./src/javascripts/core/domains/config/hooks.ts"),i=s("./src/javascripts/core/domains/config/selectors.ts"),c=s("./src/javascripts/core/ui/utils/general-utils.ts");const l=({state:e})=>e,u=()=>(0,o.useSelector)(l),d=(0,r.createSelector)(l,i.selectConfig,n.selectUserHasResponded,(({events:e,serviceData:t},s,r)=>{if(r||"inline"===s.layoutMode||!t?.suggestion||!t?.suggestion?.body?.length)return e;const o={type:"service_data",payload:t.suggestion};return[...e,o]})),p=(0,r.createSelector)(d,i.selectConfig,((e,t)=>{const{enabled:s,threshold:r}=t?.messages?.timeIndicator??{};return s?e.map((({type:e,payload:t},s,o)=>{if(0===s)return{type:e,payload:{...t,timeIndicator:t?.occurredAt}};const n=o[s-1];if(!t?.occurredAt||!n.payload?.occurredAt||!r)return{type:e,payload:{...t,timeIndicator:void 0}};const a=(0,c.microsecondsToMilliseconds)(t.occurredAt-n.payload.occurredAt)>=r?t.occurredAt:void 0;return{type:e,payload:{...t,timeIndicator:a}}})):e})),m=()=>(0,o.useSelector)(p),f=(0,r.createSelector)(p,(e=>e.map((e=>e.payload.id)))),h=()=>(0,o.useSelector)(f),v=()=>u().isLoading,y=()=>u().headerTitles,j=()=>u().unreadEvents,g=()=>u().loadedImageEventIds,b=()=>u().skiplinkTargetId,x=e=>u().participantInfo.participants[e],_=()=>u().serviceInfo,w=(0,r.createSelector)(p,(e=>{const t=e.filter((e=>"message"===e.type));return t[t.length-1]?.payload.id})),S=()=>(0,o.useSelector)(w),k=()=>u().historyLoaded,C=()=>{const{participants:e,currentAgent:t}=u().participantInfo;return t?e[t]:null},E=e=>u().serviceData[e],T=()=>{const{entryMeta:{options:e,optionsOverride:t}}=u(),{limit:s}=t?.text||e?.text||{limit:null};return{hasLimit:null!==s,limit:null!==s?s:null}},N=()=>{const{layoutMode:e}=(0,a.useConfig)();return{isInline:"inline"===e,isWindow:"window"===e,isApp:"app"===e,isResolving:!e}}},"./src/javascripts/core/ui/hooks/sounds/beep.mp3":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=s.p+"sounds/beep.mp3"},"./src/javascripts/core/ui/hooks/use-click-outside.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("preact/hooks");const o=e=>{const t=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const s=s=>{t.current&&s.target instanceof HTMLElement&&!t.current.contains(s.target)&&(s.preventDefault(),s.stopPropagation(),e())};return document.addEventListener("click",s,!0),document.addEventListener("touchstart",s,!0),()=>{document.removeEventListener("click",s,!0),document.removeEventListener("touchstart",s,!0)}}),[e,t]),t}},"./src/javascripts/core/ui/hooks/use-debounce.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("preact/hooks");const o=(e,t=20)=>{const[s,o]=(0,r.useState)(e),n=(0,r.useRef)(null);return(0,r.useEffect)((()=>(n.current=setTimeout((()=>o(e)),t),()=>{n.current&&clearTimeout(n.current)})),[e,t]),s}},"./src/javascripts/core/ui/hooks/use-event-component-mapping.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/conversation/component-context.ts"),n=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const a=e=>{const t=(()=>{const e=(0,r.useContext)(o.default);if(!e)throw new Error("useComponentContext has to be used within <ComponentContext.Provider>");return e})(),s=t[e.type];let a=s[e.payload.type],i=null;return e.payload.type===n.payloadTypes.choicePrompt&&(i=s[e.payload.body.prompt.type]),"participant"===e.type&&(a=s[e.type]),a&&"function"!=typeof a&&(a=a[e.payload.body.type]),[a||t?.fallback,i]}},"./src/javascripts/core/ui/hooks/use-interval.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("preact/hooks");const o=(e,t)=>{const s=(0,r.useRef)(e);(0,r.useEffect)((()=>{s.current=e}),[e]),(0,r.useEffect)((()=>{if(null!==t){const e=setInterval((function(){s.current()}),t);return()=>clearInterval(e)}}),[t])}},"./src/javascripts/core/ui/hooks/use-notifications.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/config/hooks.ts"),a=s("./src/javascripts/core/domains/store/selectors.ts"),i=s("./src/javascripts/core/ui/components/entry/text-entry/index.tsx"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/sounds/beep.mp3");const u=!!window.Notification,d=()=>{const{proactiveMessages:e}=(0,c.useSeamlyServiceInfo)(),{notificationAudioURL:t}=(0,n.useConfig)(),[s,d]=(0,r.useState)(u?Notification.permission:"default"),[p,m]=(0,r.useState)(document.visibilityState),f=(0,o.useSelector)(a.selectShowNotifications),h=(0,r.useCallback)((async()=>{if(u&&"granted"!==s){const e=await Notification.requestPermission();d(e)}}),[s]),v=(0,r.useMemo)((()=>"granted"===s),[s]),y=(0,r.useMemo)((()=>"hidden"===p),[p]);(0,r.useEffect)((()=>{"default"===s&&e&&h()}),[s,e,h]);const j=(0,r.useCallback)((async(e,r)=>{if(f&&u){if("default"===s&&h(),!1!==t&&!v&&(y||!document.hasFocus()))try{const e=new Audio(t||l.default);await e.play()}catch(e){console.warn(e)}if(v&&(y||!document.hasFocus())){const t=new Notification(e,r);t.onclick=function(){window.parent.focus(),window.focus(),t.close();const e=document.querySelector(`input[name=${i.textEntryControlName}]`);e&&e.focus()}}}}),[t,s,v,h,f,y]);return(0,r.useEffect)((()=>{if(!f)return()=>{};function e(){m(document.visibilityState)}return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e)}}),[f]),{permission:s,requestPermission:h,sendNotification:j}}},"./src/javascripts/core/ui/hooks/use-seamly-actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useSeamlyActions:()=>n});var r=s("./src/javascripts/core/domains/store/index.ts"),o=s("./src/javascripts/core/domains/store/slice.ts");const n=()=>{const e=(0,r.useAppDispatch)();return{addEvent:t=>e((0,o.addEvent)(t)),clearEvents:()=>e((0,o.clearEvents)()),setEventsRead:t=>e((0,o.setEventsRead)(t)),setLoadedImageEventIds:t=>e((0,o.setLoadedImageEventIds)(t)),setIsLoading:t=>e((0,o.setIsLoading)(t)),setParticipant:t=>e((0,o.setParticipant)(t)),setHeaderTitle:t=>e((0,o.setHeaderTitle)(t)),setHeaderSubTitle:t=>e((0,o.setHeaderSubTitle)(t)),setActiveService:t=>e((0,o.setActiveService)(t)),initIdleDetachCountdown:t=>e((0,o.initIdleDetachCountdown)(t)),decrementIdleDetachCountdownCounter:()=>e((0,o.decrementIdleDetachCountdownCounter)()),stopIdleDetachCountdownCounter:()=>e((0,o.stopIdleDetachCountdownCounter)()),clearIdleDetachCountdown:()=>e((0,o.clearIdleDetachCountdown)()),initResumeConversationPrompt:()=>e((0,o.initResumeConversationPrompt)()),clearResumeConversationPrompt:()=>e((0,o.clearResumeConversationPrompt)()),setServiceDataItem:t=>e((0,o.setServiceDataItem)(t)),setFeatures:t=>e((0,o.setFeatures)(t)),setFeatureEnabledState:t=>e((0,o.setFeatureEnabledState)(t)),clearFeatures:()=>e((0,o.clearFeatures)()),setInitialState:t=>e((0,o.setInitialState)(t)),setUserSelectedOptions:t=>e((0,o.setUserSelectedOptions)(t)),setUserSelectedOption:t=>e((0,o.setUserSelectedOption)(t)),showOption:t=>e((0,o.showOption)(t)),hideOption:()=>e((0,o.hideOption)()),setServiceEntryMetadata:t=>e((0,o.setServiceEntryMetadata)(t)),setBlockAutoEntrySwitch:t=>e((0,o.setBlockAutoEntrySwitch)(t)),setActiveEntryType:t=>e((0,o.setActiveEntryType)(t)),setUserEntryType:t=>e((0,o.setUserEntryType)(t)),registerUpload:t=>e((0,o.registerUpload)(t)),setUploadProgress:t=>e((0,o.setUploadProgress)(t)),setUploadComplete:t=>e((0,o.setUploadComplete)(t)),setUploadError:t=>e((0,o.setUploadError)(t)),clearAllUploads:()=>e((0,o.clearAllUploads)()),setSeamlyContainerElement:t=>e((0,o.setSeamlyContainerElement)(t))}}},"./src/javascripts/core/ui/hooks/use-seamly-activity-event-handler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/core/seamly-activity-event-context.ts");const n=()=>{const e=(0,r.useContext)(o.default);if(!e)throw new Error("useSeamlyActivityEventHandler has to be used within <SeamlyActivityEventContext.Provider>");return e}},"./src/javascripts/core/ui/hooks/use-seamly-chat.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("preact/hooks"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),c=s("./src/javascripts/core/domains/visibility/selectors.ts"),l=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),d=s("./src/javascripts/core/ui/hooks/use-session-expired-command.ts");const p=()=>{const{t:e}=(0,n.useI18n)(),{isInline:t,isWindow:s,isApp:p}=(0,u.useSeamlyLayoutMode)(),{isOpen:m,isVisible:f}=(0,a.useVisibility)(),h=(0,o.useSelector)(c.selectShowInlineView),{start:v,connect:y,apiConfigReady:j,apiConnected:g}=(0,i.default)(),b=(0,r.useRef)(!1),{sendAssertive:x}=(0,l.useLiveRegion)();(0,d.default)(),(0,r.useEffect)((()=>{f&&setTimeout((()=>{x(e("window.srTexts.onLoad"))}),500)}),[f,x,e]),(0,r.useEffect)((()=>{f&&x(e(m?"window.srTexts.onOpen":"window.srTexts.onClose"))}),[m,f,x,e]),(0,r.useEffect)((()=>{j||g||(b.current=!1)}),[j,g]);const _=(0,r.useCallback)((async()=>{g||(b.current=!0,await y()),(p||m||f&&t)&&v()}),[g,y,p,t,m,f,v]);(0,r.useEffect)((()=>{!j||b.current||s&&!m||!(!t||f&&h)||_()}),[j,_,t,m,f,s,h])}},"./src/javascripts/core/ui/hooks/use-seamly-commands.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var r=s("preact/hooks"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/app/hooks.ts"),a=s("./src/javascripts/core/domains/app/slice.ts"),i=s("./src/javascripts/core/domains/interrupt/slice.ts"),c=s("./src/javascripts/core/domains/store/index.ts"),l=s("./src/javascripts/core/domains/store/slice.ts"),u=s("./src/javascripts/core/domains/visibility/constants.ts"),d=s("./src/javascripts/core/domains/visibility/hooks.ts"),p=s("./src/javascripts/core/lib/id.ts"),m=s("./src/javascripts/core/ui/hooks/event-bus-hooks.ts"),f=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),h=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const v=()=>{const e=(0,f.useSeamlyApiContext)(),t=(0,c.useAppDispatch)(),s=(0,m.default)(),v=(0,n.useUserHasResponded)(),y=(0,f.useSeamlyHasConversation)(),{visible:j,setVisibility:g}=(0,d.useVisibility)(),b=(0,h.useSeamlyUnreadCount)(),x=(0,r.useCallback)(((...e)=>{s.emit(...e)}),[s]),_=(0,r.useCallback)((()=>{x("ui.beforeStart",{visibility:j,hasConversation:y(),hasResponded:v,unreadMessageCount:b}),e.send("start_conversation"),x("ui.start",{visibility:j,hasConversation:y(),hasResponded:v,unreadMessageCount:b})}),[e,x,y,v,b,j]),w=(0,r.useCallback)((async()=>{await t((0,o.resetApp)())}),[t]),S=(0,r.useCallback)((e=>({type:e,id:(0,p.randomId)(),transactionId:(0,p.randomId)(),fromClient:!0,participant:"seamly-client-participant",occurredAt:1e3*Date.now()})),[]),k=(0,r.useCallback)((e=>({...S("text"),body:{text:e}})),[S]),C=(0,r.useCallback)((({body:s,config:r={}})=>{if(""===s.trim())return;const o={...k(s),...r};e.send("message",o),x("message",o),t((0,l.addEvent)({type:"message",payload:{...o,body:o.body,type:o.type,optimisticallyInjected:!0}}))}),[e,t,x,k]),E=(0,r.useCallback)(((e,s=(0,p.randomId)())=>{t((0,l.addEvent)({type:"message",payload:{...k(e),transactionId:s}}))}),[t,k]),T=(0,r.useCallback)(((e,s,r,o,n,a)=>{t((0,l.addEvent)({type:"message",payload:{type:"upload",id:e,transactionId:s,fromClient:!0,participant:"seamly-client-participant",occurredAt:r,body:{contentType:o,filename:n,filesize:a,id:e||"",isDeleted:!1}}}))}),[t]),N=(0,r.useCallback)((t=>{t&&e.send("action",t)}),[e]),I=(0,r.useCallback)((t=>{e.sendContext(t)}),[e]);return{connect:(0,r.useCallback)((()=>e.connected?Promise.reject(new Error("The API is already connected")):e.connect().then((e=>{e&&(t((0,l.setInitialState)(e)),e.messages&&e.messages.length&&t((0,l.setEvents)(e)),e.userResponded&&(t((0,a.setHasResponded)(e.userResponded)),g({visibility:u.visibilityStates.open})))})).catch((e=>{t((0,i.setInterrupt)({name:e?.name,message:e?.message,langKey:e?.langKey,action:e?.action,originalEvent:e?.originalEvent,originalError:e?.originalError}))}))),[e,t,g]),start:_,sendMessage:C,sendAction:N,sendContext:I,reset:w,emitEvent:x,addMessageBubble:E,addUploadBubble:T,apiConnected:e.connected,apiConfigReady:e.configReady}}},"./src/javascripts/core/ui/hooks/use-seamly-conversation.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("preact/compat"),o=s("./src/javascripts/core/api/conversation-connector.ts"),n=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts");const a=()=>{const e=(0,n.useSeamlyApiContext)();return(0,r.useSyncExternalStore)(o.default.subscribe,(()=>e.conversation))}},"./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("preact/hooks"),o=s("./src/javascripts/core/config.ts"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/store/index.ts"),i=s("./src/javascripts/core/domains/store/slice.ts"),c=s("./src/javascripts/core/domains/visibility/hooks.ts"),l=s("./src/javascripts/core/ui/utils/general-utils.ts"),u=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),d=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),m=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts");const f=()=>{const e=(0,a.useAppDispatch)(),{idleDetachCountdown:{hasCountdown:t,isActive:s,count:f,remaining:h,timer:v,wasStopped:y}}=(0,p.useSeamlyStateContext)(),{isOpen:j}=(0,c.useVisibility)(),{emitEvent:g,sendAction:b}=(0,m.default)(),{t:x}=(0,n.useI18n)(),{sendAssertive:_,sendPolite:w}=(0,d.useLiveRegion)(),S=(0,r.useCallback)((e=>{j&&_(e)}),[j,_]),k=(0,r.useCallback)((e=>{j&&w(e)}),[j,w]),C=(0,r.useCallback)((t=>{const s=(0,l.millisecondsToSeconds)(t),r=(0,l.getTimeFromSeconds)(s);e((0,i.initIdleDetachCountdown)({delaySeconds:s,delayTime:r})),g("idleTimer.start"),S(`${x("idleDetachWarning.countdownTitle")} ${x("idleDetachWarning.countdownText")} ${x("idleDetachWarning.countdownTimer",r)}`)}),[e,g,S,x]),E=(0,r.useCallback)(((s=void 0,r=!1)=>{t&&(s||(r||b({type:u.actionTypes.detachService}),S(x("idleDetachWarning.notifyTransferText"))),y||g("idleTimer.stop"),e((0,i.clearIdleDetachCountdown)()))}),[e,g,t,b,S,x,y]),T=(0,r.useCallback)((()=>{if(!h||h<=0)return;const t=h-1;t%o.screenReaderDebounceDelaySeconds==0&&S(`${x("idleDetachWarning.countdownText")} ${x("idleDetachWarning.countdownTimer",(0,l.getTimeFromSeconds)(t))}`),e((0,i.decrementIdleDetachCountdownCounter)())}),[e,h,S,x]),N=(0,r.useCallback)((()=>{s&&(e((0,i.stopIdleDetachCountdownCounter)()),h&&(g("idleTimer.stop"),k(x("idleDetachWarning.srCountDownStoppedText"))))}),[e,g,s,h,k,x]);return{hasCountdown:t,isActive:s,count:f,remaining:h,timer:v,wasStopped:y,initCountdown:C,endCountdown:E,decrementCountdown:T,stopCountdown:N}}},"./src/javascripts/core/ui/hooks/use-seamly-resume-conversation-prompt.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/store/slice.ts"),a=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),i=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts");const u=()=>{const e=(0,o.useAppDispatch)(),t=(0,c.useSeamlyStateContext)().resumeConversationPrompt,{sendAction:s}=(0,l.default)(),{t:u}=(0,r.useI18n)(),{sendAssertive:d}=(0,i.useLiveRegion)();return{continueChat:()=>{s({type:a.actionTypes.dismiss,body:{type:a.dismissTypes.resumeConversationPrompt}}),e((0,n.clearResumeConversationPrompt)())},hasPrompt:t,restartChat:()=>{d(u("resumeConversationPrompt.srNotifyRestartText")),s({type:a.actionTypes.detachService}),e((0,n.clearResumeConversationPrompt)())}}}},"./src/javascripts/core/ui/hooks/use-session-expired-command.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("preact/hooks"),o=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),n=s("./src/javascripts/core/domains/interrupt/hooks.ts"),a=s("./src/javascripts/core/domains/interrupt/slice.ts"),i=s("./src/javascripts/core/domains/store/index.ts"),c=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts");function l(){const{meta:{originalError:e,action:t}}=(0,n.useInterrupt)(),s=(0,i.useAppDispatch)(),{reset:l}=(0,c.default)(),u="SeamlySessionExpiredError"===e?.name,d=(0,r.useRef)(0),p=(0,r.useRef)(null);(0,r.useEffect)((()=>{if(u&&"reset"===t){if(d.current>=10){p.current=setTimeout((()=>{d.current=0}),1e4);const e=new o.default;return s((0,a.setInterrupt)({name:e.name,message:e.message,langKey:e.langKey,originalEvent:e.originalEvent,originalError:e.originalError,action:e.action})),()=>{}}d.current+=1,l()}return()=>{p.current&&clearTimeout(p.current)}}),[t,l,u,s])}},"./src/javascripts/core/ui/hooks/use-single-file-upload.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./node_modules/react-redux/dist/react-redux.mjs"),o=s("./src/javascripts/core/domains/forms/selectors.ts"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts");const a=(e,t)=>{const s=(0,r.useSelector)((s=>(0,o.getControlValueByName)(s,{formId:e,name:t}))),{currentUploads:a}=(0,n.useFileUploads)(),i=s&&s.length>0;let c=null,l=!1,u=0;if(a&&a.length>0){const e=a[0];c=e.uploadHandle,l=!!e.error,u=e.progress}return{hasFile:i,selectedFileName:i?s[0].name:"",uploadHandle:c,hasServerError:l,progress:u}}},"./src/javascripts/core/ui/hooks/use-timeout.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("preact/hooks");function o(e,t){const s=(0,r.useRef)(null),o=(0,r.useRef)(e);return(0,r.useEffect)((()=>{o.current=e}),[e]),(0,r.useEffect)((()=>"number"!=typeof t?()=>{}:(s.current=setTimeout((()=>o.current()),t),()=>{s.current&&clearTimeout(s.current)})),[t]),s}},"./src/javascripts/core/ui/hooks/utility-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useForceUpdate:()=>n,useGeneratedId:()=>a});var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/id.ts");const n=()=>{const[e,t]=(0,r.useReducer)((e=>e+1),0);return(0,r.useCallback)((()=>{setTimeout((()=>{t()}))}),[])},a=()=>{const[e]=(0,r.useState)((()=>(0,o.randomId)()));return e}},"./src/javascripts/core/ui/utils/form-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getValidator:()=>r});const r=(e,t,s=null)=>({fn:e,errorText:t,compareValue:s})},"./src/javascripts/core/ui/utils/general-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{childIsVNode:()=>j,createAriaHider:()=>o,debounce:()=>r,focusElement:()=>m,formatBytes:()=>l,getKey:()=>p,getRelativeDate:()=>h,getTimeFromSeconds:()=>c,keyCodes:()=>u,keyNames:()=>d,microsecondsToMilliseconds:()=>i,millisecondsToSeconds:()=>a,omit:()=>y,pick:()=>v,propIsTrue:()=>n,runIfElementContainsOrHasFocus:()=>f}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");const r=(e,t)=>{let s;return function(...r){let o=!1;return clearTimeout(s),s=setTimeout((()=>{s=null,o||e.apply(this,r),o=!1}),t),t=>{o=!0,t&&e.apply(this,r)}}},o=()=>{const e=[],t=[];return document.querySelectorAll('body > *:not([role="dialog"])').forEach((s=>{const r=s.getAttribute("aria-hidden");null!==r&&"false"!==r||(null!==r&&e.push(r),t.push(s),s.setAttribute("aria-hidden","true"))})),()=>{t.forEach(((t,s)=>{const r=e[s];null===r?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r)}))}},n=e=>"true"===e||!0===e,a=e=>Math.ceil(e/1e3),i=e=>Math.ceil(e/1e3),c=e=>{const t=Math.floor(e/60);return{minutes:t,seconds:e-60*t}},l=(e,t=2)=>{if(0===e)return"0 Bytes";const s=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/1024**r).toFixed(s))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}`},u={27:"Escape",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown"},d={Escape:"Escape",End:"End",Home:"Home",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown"},p=e=>e.code?d[e.code]:u[e.keyCode],m=e=>{e&&e.focus()},f=(e,t)=>{e&&(e.contains(document.activeElement)||e===document.activeElement)&&t()},h=(e,t)=>{const s=new Date(t).setHours(0,0,0,0),r=e.getTime(),o=864e5;return r>=s+o?e:r>s?"today":r>s-o?"yesterday":e},v=(e,t)=>t.reduce(((t,s)=>(s in e&&(t[s]=e[s]),t)),{}),y=(e,t)=>Object.keys(e).reduce(((s,r)=>(t.includes(r)||(s[r]=e[r]),s)),{});function j(e){return"object"==typeof e}},"./src/javascripts/core/ui/utils/seamly-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{TRANSLATION_PROPOSAL:()=>c,actionTypes:()=>i,ariaLiveLevels:()=>d,cardTypes:()=>f,dismissTypes:()=>l,dividerKeys:()=>p,entryTypes:()=>n,eventTypes:()=>r,featureKeys:()=>m,payloadTypes:()=>o,readStates:()=>a,sourceTypes:()=>u});const r={info:"info",message:"message",participant:"participant",system:"system"},o={choicePrompt:"choice_prompt",text:"text",image:"image",video:"video",participant:"participant",divider:"divider",translation:"translation",message:"message",countdown:"countdown",upload:"upload",cta:"cta",splash:"splash"},n={text:"text",upload:"upload"},a={received:"received",read:"read"},i={pickChoice:"pick_choice",navigate:"navigate",custom:"custom",typing:"typing",read:"read",detachService:"detach_service",interactivityUpdate:"interactivity_update",dismiss:"dismiss",sendTranscript:"send_transcript",setTopic:"set_topic",setTranslation:"set_translation",setContext:"set_context",clickCta:"click_cta",clickCard:"click_card"},c="translation_proposal",l={resumeConversationPrompt:"resume_conversation_prompt",translationProposal:c},u={translationProposal:c,translationChoice:"translation_choice",windowApi:"window_api"},d={assertive:"assertive",polite:"polite"},p={new_topic:"newTopic",new_translation:"newTranslation"},m={cobrowsing:"cobrowsing",extraMenuItem:"extraMenuItem",sendTranscript:"sendTranscript",translation:"translation",typingPeekahead:"typingPeekahead",uploads:"uploads",webNotifications:"webNotifications"},f={ask:"ask",navigate:"navigate",topic:"topic"}},"./src/javascripts/core/ui/utils/validations.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{fileListObjectIsNotEmpty:()=>o,isEmailString:()=>n,isNotEmptyString:()=>a,validateFileSize:()=>r});const r=(e,t)=>{let s=!0;for(let r=0;r<e.length;r++)e[r].size>t&&(s=!1);return s},o=e=>!!e?.length,n=e=>{const t=e&&e.trim();return!(!t||!t.match(/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i))},a=e=>!!e},preact:e=>{"use strict";e.exports=require("preact")},"preact/compat":e=>{"use strict";e.exports=require("preact/compat")},"preact/hooks":e=>{"use strict";e.exports=require("preact/hooks")},"preact/jsx-runtime":e=>{"use strict";e.exports=require("preact/jsx-runtime")}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,s),n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})();var r={};(()=>{"use strict";s.r(r),s.d(r,{API:()=>u.default,AgentInfo:()=>I.default,Chat:()=>O.default,ChatFrame:()=>A.default,ComponentFilter:()=>w.default,Conversation:()=>S.default,Engine:()=>U.default,EntryContainer:()=>E.default,EventParticipant:()=>g.default,ExternalApi:()=>z.default,Header:()=>P.default,Icon:()=>L.default,Interrupt:()=>R.default,MessageContainer:()=>C.default,SeamlyActivityEventContext:()=>$.default,SeamlyActivityMonitor:()=>V.default,SeamlyApiContext:()=>h.SeamlyApiContext,SeamlyEventBusContext:()=>h.SeamlyEventBusContext,SeamlyFileUpload:()=>B.default,SeamlyGeneralError:()=>D.default,SeamlyLiveRegionContext:()=>v.SeamlyLiveRegionContext,SeamlyOfflineError:()=>F.default,SeamlyStoreProvider:()=>f.Provider,Text:()=>k.default,TextEntry:()=>T.default,Upload:()=>N.default,View:()=>M.default,appReducer:()=>G.default,appStorageProvider:()=>b.default,calculateVisibility:()=>m.calculateVisibility,className:()=>y.className,configReducer:()=>q.default,cookieStorageProvider:()=>x.default,default:()=>ee,eventTypes:()=>l.eventTypes,formsReducer:()=>W.default,getSearchParamsByKeys:()=>Z.getSearchParamsByKeys,getUrlSearchParams:()=>Z.getUrlSearchParams,getUrlSearchString:()=>Z.getUrlSearchString,i18nReducer:()=>K.default,initResetSearchParams:()=>Z.initResetSearchParams,interruptReducer:()=>J.default,randomId:()=>d.randomId,replaceSearchParams:()=>Z.replaceSearchParams,sessionStorageProvider:()=>_.default,setConfig:()=>q.setConfig,setInitialLocale:()=>K.setInitialLocale,setParticipant:()=>Y.setParticipant,setPreChatEvents:()=>q.setPreChatEvents,setTranslations:()=>K.setTranslations,stateReducer:()=>Y.default,timeout:()=>H.timeout,translationReducer:()=>X.default,useChoicePrompt:()=>i.useChoicePrompt,useEvents:()=>j.useEvents,useGeneratedId:()=>j.useGeneratedId,useI18n:()=>p.useI18n,useSeamlyActions:()=>c.useSeamlyActions,useSeamlyChat:()=>j.useSeamlyChat,useSeamlyCommands:()=>j.useSeamlyCommands,useSeamlyConfig:()=>t.useConfig,useSeamlyEventStream:()=>j.useSeamlyEventStream,useSeamlyIdleDetachCountdown:()=>j.useSeamlyIdleDetachCountdown,useSeamlyMessageContainerClassNames:()=>j.useSeamlyMessageContainerClassNames,useSeamlyOptions:()=>j.useSeamlyOptions,useSeamlyVisibility:()=>a.useVisibility,useTranslatedEventData:()=>o.useTranslatedEventData,useTranslations:()=>o.useTranslations,useTranslationsContainer:()=>o.useTranslationsContainer,visibilityReducer:()=>Q.default,visibilityStates:()=>n.visibilityStates}),s("./node_modules/core-js/es/array/at.js");var e=s("./src/javascripts/core/lib/external-api/initialize-api.ts"),t=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/translations/hooks.ts"),n=s("./src/javascripts/core/domains/visibility/constants.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/ui/components/conversation/event/choice-prompt.tsx"),c=s("./src/javascripts/core/ui/hooks/use-seamly-actions.ts"),l=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),u=s("./src/javascripts/core/api/index.ts"),d=s("./src/javascripts/core/lib/id.ts"),p=s("./src/javascripts/core/domains/i18n/hooks.ts"),m=s("./src/javascripts/core/domains/visibility/utils.ts"),f=s("./node_modules/react-redux/dist/react-redux.mjs"),h=s("./src/javascripts/core/ui/components/core/seamly-api-context.ts"),v=s("./src/javascripts/core/ui/components/core/seamly-live-region-context.ts"),y=s("./src/javascripts/core/lib/css.ts"),j=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),g=s("./src/javascripts/core/ui/components/conversation/event/event-participant.tsx"),b=s("./src/javascripts/core/lib/store/providers/app-storage.ts"),x=s("./src/javascripts/core/lib/store/providers/cookie-storage.ts"),_=s("./src/javascripts/core/lib/store/providers/session-storage.ts"),w=s("./src/javascripts/core/ui/components/conversation/component-filter.tsx"),S=s("./src/javascripts/core/ui/components/conversation/conversation.tsx"),k=s("./src/javascripts/core/ui/components/conversation/event/text.tsx"),C=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),E=s("./src/javascripts/core/ui/components/entry/entry-container.tsx"),T=s("./src/javascripts/core/ui/components/entry/text-entry/index.tsx"),N=s("./src/javascripts/core/ui/components/entry/upload/index.tsx"),I=s("./src/javascripts/core/ui/components/layout/agent-info.tsx"),O=s("./src/javascripts/core/ui/components/layout/chat.tsx"),A=s("./src/javascripts/core/ui/components/layout/chat-frame.tsx"),P=s("./src/javascripts/core/ui/components/layout/header.tsx"),L=s("./src/javascripts/core/ui/components/layout/icon.tsx"),R=s("./src/javascripts/core/ui/components/layout/interrupt.tsx"),M=s("./src/javascripts/core/ui/components/view/index.tsx"),D=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),F=s("./src/javascripts/core/api/errors/seamly-offline-error.ts"),U=s("./src/javascripts/core/lib/engine/index.tsx"),z=s("./src/javascripts/core/lib/external-api/index.ts"),B=s("./src/javascripts/core/ui/components/core/seamly-file-upload.tsx"),V=s("./src/javascripts/core/ui/components/core/seamly-activity-monitor.tsx"),$=s("./src/javascripts/core/ui/components/core/seamly-activity-event-context.ts"),H=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),G=s("./src/javascripts/core/domains/app/slice.ts"),q=s("./src/javascripts/core/domains/config/slice.ts"),W=s("./src/javascripts/core/domains/forms/slice.ts"),K=s("./src/javascripts/core/domains/i18n/slice.ts"),J=s("./src/javascripts/core/domains/interrupt/slice.ts"),Y=s("./src/javascripts/core/domains/store/slice.ts"),X=s("./src/javascripts/core/domains/translations/slice.ts"),Q=s("./src/javascripts/core/domains/visibility/slice.ts"),Z=s("./src/javascripts/core/lib/url-helpers.ts");const ee=e.default})(),module.exports=r})();
|
|
2
|
+
(()=>{var e={"./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ReducerType:()=>ne,SHOULD_AUTOBATCH:()=>O,TaskAbortError:()=>Te,Tuple:()=>y,__DO_NOT_USE__ActionTypes:()=>r.__DO_NOT_USE__ActionTypes,addListener:()=>qe,applyMiddleware:()=>r.applyMiddleware,asyncThunkCreator:()=>oe,autoBatchEnhancer:()=>L,bindActionCreators:()=>r.bindActionCreators,buildCreateSlice:()=>ie,clearAllListeners:()=>Ke,combineReducers:()=>r.combineReducers,combineSlices:()=>it,compose:()=>r.compose,configureStore:()=>M,createAction:()=>d,createActionCreatorInvariantMiddleware:()=>h,createAsyncThunk:()=>te,createDraftSafeSelector:()=>c,createDraftSafeSelectorCreator:()=>i,createDynamicMiddleware:()=>Ze,createEntityAdapter:()=>be,createImmutableStateInvariantMiddleware:()=>S,createListenerMiddleware:()=>Xe,createNextState:()=>o.produce,createReducer:()=>F,createSelector:()=>n.createSelector,createSelectorCreator:()=>n.createSelectorCreator,createSerializableStateInvariantMiddleware:()=>T,createSlice:()=>le,createStore:()=>r.createStore,current:()=>o.current,findNonSerializableValue:()=>C,formatProdErrorMessage:()=>ct,freeze:()=>o.freeze,isAction:()=>r.isAction,isActionCreator:()=>p,isAllOf:()=>B,isAnyOf:()=>z,isAsyncThunkAction:()=>K,isDraft:()=>o.isDraft,isFluxStandardAction:()=>m,isFulfilled:()=>q,isImmutableDefault:()=>b,isPending:()=>H,isPlain:()=>k,isPlainObject:()=>r.isPlainObject,isRejected:()=>G,isRejectedWithValue:()=>W,legacy_createStore:()=>r.legacy_createStore,lruMemoize:()=>n.lruMemoize,miniSerializeError:()=>Z,nanoid:()=>J,original:()=>o.original,prepareAutoBatched:()=>A,removeListener:()=>Je,unwrapResult:()=>se,weakMapMemoize:()=>n.weakMapMemoize});var r=s("./node_modules/redux/dist/redux.mjs"),o=s("./node_modules/immer/dist/immer.mjs"),n=s("./node_modules/reselect/dist/reselect.mjs"),a=s("./node_modules/redux-thunk/dist/redux-thunk.mjs"),i=(...e)=>{const t=(0,n.createSelectorCreator)(...e),s=Object.assign((...e)=>{const s=t(...e),r=(e,...t)=>s((0,o.isDraft)(e)?(0,o.current)(e):e,...t);return Object.assign(r,s),r},{withTypes:()=>s});return s},c=i(n.weakMapMemoize),l="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?r.compose:r.compose.apply(null,arguments)},u=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,e=>e&&"function"==typeof e.match);function d(e,t){function s(...s){if(t){let r=t(...s);if(!r)throw new Error("prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:s[0]}}return s.toString=()=>`${e}`,s.type=e,s.match=t=>(0,r.isAction)(t)&&t.type===e,s}function p(e){return"function"==typeof e&&"type"in e&&u(e)}function m(e){return(0,r.isAction)(e)&&Object.keys(e).every(f)}function f(e){return["type","payload","error","meta"].indexOf(e)>-1}function h(e={}){const{isActionCreator:t=p}=e;return()=>e=>s=>(t(s)&&console.warn(function(e){const t=e?`${e}`.split("/"):[],s=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \`dispatch(${s}())\` instead of \`dispatch(${s})\`. This is necessary even if the action has no payload.`}(s.type)),e(s))}function v(e,t){let s=0;return{measureTime(e){const t=Date.now();try{return e()}finally{const e=Date.now();s+=e-t}},warnIfExceeded(){s>e&&console.warn(`${t} took ${s}ms, which is more than the warning threshold of ${e}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)}}}var y=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function j(e){return(0,o.isDraftable)(e)?(0,o.produce)(e,()=>{}):e}function g(e,t,s){return e.has(t)?e.get(t):e.set(t,s(t)).get(t)}function b(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function x(e,t,s){const r=_(e,t,s);return{detectMutations:()=>w(e,t,r,s)}}function _(e,t=[],s,r="",o=new Set){const n={value:s};if(!e(s)&&!o.has(s)){o.add(s),n.children={};for(const o in s){const a=r?r+"."+o:o;t.length&&-1!==t.indexOf(a)||(n.children[o]=_(e,t,s[o],a))}}return n}function w(e,t=[],s,r,o=!1,n=""){const a=s?s.value:void 0,i=a===r;if(o&&!i&&!Number.isNaN(r))return{wasMutated:!0,path:n};if(e(a)||e(r))return{wasMutated:!1};const c={};for(let e in s.children)c[e]=!0;for(let e in r)c[e]=!0;const l=t.length>0;for(let o in c){const a=n?n+"."+o:o;if(l&&t.some(e=>e instanceof RegExp?e.test(a):a===e))continue;const c=w(e,t,s.children[o],r[o],i,a);if(c.wasMutated)return c}return{wasMutated:!1}}function S(e={}){{let t=function(e,t,r,o){return JSON.stringify(e,s(t,o),r)},s=function(e,t){let s=[],r=[];return t||(t=function(e,t){return s[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,s.indexOf(t)).join(".")+"]"}),function(o,n){if(s.length>0){var a=s.indexOf(this);~a?s.splice(a+1):s.push(this),~a?r.splice(a,1/0,o):r.push(o),~s.indexOf(n)&&(n=t.call(this,o,n))}else s.push(n);return null==e?n:e.call(this,o,n)}},{isImmutable:r=b,ignoredPaths:o,warnAfter:n=32}=e;const a=x.bind(null,r,o);return({getState:e})=>{let s,r=e(),o=a(r);return i=>c=>{const l=v(n,"ImmutableStateInvariantMiddleware");l.measureTime(()=>{if(r=e(),s=o.detectMutations(),o=a(r),s.wasMutated)throw new Error(`A state mutation was detected between dispatches, in the path '${s.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const u=i(c);return l.measureTime(()=>{if(r=e(),s=o.detectMutations(),o=a(r),s.wasMutated)throw new Error(`A state mutation was detected inside a dispatch, in the path: ${s.path||""}. Take a look at the reducer(s) handling the action ${t(c)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),l.warnIfExceeded(),u}}}}function k(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||(0,r.isPlainObject)(e)}function C(e,t="",s=k,r,o=[],n){let a;if(!s(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(n?.has(e))return!1;const i=null!=r?r(e):Object.entries(e),c=o.length>0;for(const[e,l]of i){const i=t?t+"."+e:e;if(!c||!o.some(e=>e instanceof RegExp?e.test(i):i===e)){if(!s(l))return{keyPath:i,value:l};if("object"==typeof l&&(a=C(l,i,s,r,o,n),a))return a}}return n&&E(e)&&n.add(e),!1}function E(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!E(t))return!1;return!0}function T(e={}){{const{isSerializable:t=k,getEntries:s,ignoredActions:o=[],ignoredActionPaths:n=["meta.arg","meta.baseQueryMeta"],ignoredPaths:a=[],warnAfter:i=32,ignoreState:c=!1,ignoreActions:l=!1,disableCache:u=!1}=e,d=!u&&WeakSet?new WeakSet:void 0;return e=>u=>p=>{if(!(0,r.isAction)(p))return u(p);const m=u(p),f=v(i,"SerializableStateInvariantMiddleware");return l||o.length&&-1!==o.indexOf(p.type)||f.measureTime(()=>{const e=C(p,"",t,s,n,d);if(e){const{keyPath:t,value:s}=e;console.error(`A non-serializable value was detected in an action, in the path: \`${t}\`. Value:`,s,"\nTake a look at the logic that dispatched this action: ",p,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}}),c||(f.measureTime(()=>{const r=C(e.getState(),"",t,s,a,d);if(r){const{keyPath:e,value:t}=r;console.error(`A non-serializable value was detected in the state, in the path: \`${e}\`. Value:`,t,`\nTake a look at the reducer(s) handling this action type: ${p.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),f.warnIfExceeded()),m}}}function N(e){return"boolean"==typeof e}var I=()=>function(e){const{thunk:t=!0,immutableCheck:s=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let n=new y;if(t&&(N(t)?n.push(a.thunk):n.push((0,a.withExtraArgument)(t.extraArgument))),s){let e={};N(s)||(e=s),n.unshift(S(e))}if(r){let e={};N(r)||(e=r),n.push(T(e))}if(o){let e={};N(o)||(e=o),n.unshift(h(e))}return n},O="RTK_autoBatch",A=()=>e=>({payload:e,meta:{[O]:!0}}),P=e=>t=>{setTimeout(t,e)},L=(e={type:"raf"})=>t=>(...s)=>{const r=t(...s);let o=!0,n=!1,a=!1;const i=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:P(10):"callback"===e.type?e.queueNotification:P(e.timeout),l=()=>{a=!1,n&&(n=!1,i.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return o=!e?.meta?.[O],n=!o,n&&(a||(a=!0,c(l))),r.dispatch(e)}finally{o=!0}}})},R=e=>function(t){const{autoBatch:s=!0}=t??{};let r=new y(e);return s&&r.push(L("object"==typeof s?s:void 0)),r};function M(e){const t=I(),{reducer:s,middleware:o,devTools:n=!0,duplicateMiddlewareCheck:a=!0,preloadedState:i,enhancers:c}=e||{};let u,d;if("function"==typeof s)u=s;else{if(!(0,r.isPlainObject)(s))throw new Error("`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");u=(0,r.combineReducers)(s)}if(o&&"function"!=typeof o)throw new Error("`middleware` field must be a callback");if("function"==typeof o){if(d=o(t),!Array.isArray(d))throw new Error("when using a middleware builder function, an array of middleware must be returned")}else d=t();if(d.some(e=>"function"!=typeof e))throw new Error("each middleware provided to configureStore must be a function");if(a){let e=new Set;d.forEach(t=>{if(e.has(t))throw new Error("Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");e.add(t)})}let p=r.compose;n&&(p=l({trace:!0,..."object"==typeof n&&n}));const m=(0,r.applyMiddleware)(...d),f=R(m);if(c&&"function"!=typeof c)throw new Error("`enhancers` field must be a callback");let h="function"==typeof c?c(f):f();if(!Array.isArray(h))throw new Error("`enhancers` callback must return an array");if(h.some(e=>"function"!=typeof e))throw new Error("each enhancer provided to configureStore must be a function");d.length&&!h.includes(m)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=p(...h);return(0,r.createStore)(u,i,v)}function D(e){const t={},s=[];let r;const o={addCase(e,n){if(s.length>0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");const a="string"==typeof e?e:e.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error(`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=n,o},addAsyncThunk(e,n){if(r)throw new Error("`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return n.pending&&(t[e.pending.type]=n.pending),n.rejected&&(t[e.rejected.type]=n.rejected),n.fulfilled&&(t[e.fulfilled.type]=n.fulfilled),n.settled&&s.push({matcher:e.settled,reducer:n.settled}),o},addMatcher(e,t){if(r)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return s.push({matcher:e,reducer:t}),o},addDefaultCase(e){if(r)throw new Error("`builder.addDefaultCase` can only be called once");return r=e,o}};return e(o),[t,s,r]}function F(e,t){if("object"==typeof t)throw new Error("The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let s,[r,n,a]=D(t);if("function"==typeof e)s=()=>j(e());else{const t=j(e);s=()=>t}function i(e=s(),t){let i=[r[t.type],...n.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===i.filter(e=>!!e).length&&(i=[a]),i.reduce((e,s)=>{if(s){if((0,o.isDraft)(e)){const r=s(e,t);return void 0===r?e:r}if((0,o.isDraftable)(e))return(0,o.produce)(e,e=>s(e,t));{const r=s(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return i.getInitialState=s,i}var U=(e,t)=>u(e)?e.match(t):e(t);function z(...e){return t=>e.some(e=>U(e,t))}function B(...e){return t=>e.every(e=>U(e,t))}function V(e,t){if(!e||!e.meta)return!1;const s="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return s&&r}function $(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function H(...e){return 0===e.length?e=>V(e,["pending"]):$(e)?z(...e.map(e=>e.pending)):H()(e[0])}function G(...e){return 0===e.length?e=>V(e,["rejected"]):$(e)?z(...e.map(e=>e.rejected)):G()(e[0])}function W(...e){return 0===e.length||$(e)?B(G(...e),e=>e&&e.meta&&e.meta.rejectedWithValue):W()(e[0])}function q(...e){return 0===e.length?e=>V(e,["fulfilled"]):$(e)?z(...e.map(e=>e.fulfilled)):q()(e[0])}function K(...e){return 0===e.length?e=>V(e,["pending","fulfilled","rejected"]):$(e)?z(...e.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):K()(e[0])}var J=(e=21)=>{let t="",s=e;for(;s--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},Y=["name","message","stack","code"],X=class{constructor(e,t){this.payload=e,this.meta=t}_type},Q=class{constructor(e,t){this.payload=e,this.meta=t}_type},Z=e=>{if("object"==typeof e&&null!==e){const t={};for(const s of Y)"string"==typeof e[s]&&(t[s]=e[s]);return t}return{message:String(e)}},ee="External signal was aborted",te=(()=>{function e(e,t,s){const r=d(e+"/fulfilled",(e,t,s,r)=>({payload:e,meta:{...r||{},arg:s,requestId:t,requestStatus:"fulfilled"}})),o=d(e+"/pending",(e,t,s)=>({payload:void 0,meta:{...s||{},arg:t,requestId:e,requestStatus:"pending"}})),n=d(e+"/rejected",(e,t,r,o,n)=>({payload:o,error:(s&&s.serializeError||Z)(e||"Rejected"),meta:{...n||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:a}={}){return(i,c,l)=>{const u=s?.idGenerator?s.idGenerator(e):J(),d=new AbortController;let p,m;function f(e){m=e,d.abort()}a&&(a.aborted?f(ee):a.addEventListener("abort",()=>f(ee),{once:!0}));const h=async function(){let a;try{let n=s?.condition?.(e,{getState:c,extra:l});if(null!==(h=n)&&"object"==typeof h&&"function"==typeof h.then&&(n=await n),!1===n||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const v=new Promise((e,t)=>{p=()=>{t({name:"AbortError",message:m||"Aborted"})},d.signal.addEventListener("abort",p)});i(o(u,e,s?.getPendingMeta?.({requestId:u,arg:e},{getState:c,extra:l}))),a=await Promise.race([v,Promise.resolve(t(e,{dispatch:i,getState:c,extra:l,requestId:u,signal:d.signal,abort:f,rejectWithValue:(e,t)=>new X(e,t),fulfillWithValue:(e,t)=>new Q(e,t)})).then(t=>{if(t instanceof X)throw t;return t instanceof Q?r(t.payload,u,e,t.meta):r(t,u,e)})])}catch(t){a=t instanceof X?n(null,u,e,t.payload,t.meta):n(t,u,e)}finally{p&&d.signal.removeEventListener("abort",p)}var h;return s&&!s.dispatchConditionRejection&&n.match(a)&&a.meta.condition||i(a),a}();return Object.assign(h,{abort:f,requestId:u,arg:e,unwrap:()=>h.then(se)})}},{pending:o,rejected:n,fulfilled:r,settled:z(n,r),typePrefix:e})}return e.withTypes=()=>e,e})();function se(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var re=Symbol.for("rtk-slice-createasyncthunk"),oe={[re]:te},ne=(e=>(e.reducer="reducer",e.reducerWithPrepare="reducerWithPrepare",e.asyncThunk="asyncThunk",e))(ne||{});function ae(e,t){return`${e}/${t}`}function ie({creators:e}={}){const t=e?.asyncThunk?.[re];return function(e){const{name:s,reducerPath:r=s}=e;if(!s)throw new Error("`name` is a required option for createSlice");"undefined"!=typeof process&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},n=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},i={addCase(e,t){const s="string"==typeof e?e:e.type;if(!s)throw new Error("`context.addCase` cannot be called with an empty action type");if(s in a.sliceCaseReducersByType)throw new Error("`context.addCase` cannot be called with two reducers for the same action type: "+s);return a.sliceCaseReducersByType[s]=t,i},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),i),exposeAction:(e,t)=>(a.actionCreators[e]=t,i),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,i)};function c(){if("object"==typeof e.extraReducers)throw new Error("The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},s=[],r]="function"==typeof e.extraReducers?D(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return F(e.initialState,e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of s)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}n.forEach(r=>{const n=o[r],a={reducerName:r,type:ae(s,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(n)?function({type:e,reducerName:t,createNotation:s},r,o){let n,a;if("reducer"in r){if(s&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");n=r.reducer,a=r.prepare}else n=r;o.addCase(e,n).exposeCaseReducer(t,n).exposeAction(t,a?d(e,a):d(e))}(a,n,i):function({type:e,reducerName:t},s,r,o){if(!o)throw new Error("Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:n,fulfilled:a,pending:i,rejected:c,settled:l,options:u}=s,d=o(e,n,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),i&&r.addCase(d.pending,i),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||ue,pending:i||ue,rejected:c||ue,settled:l||ue})}(a,n,i,t)});const l=e=>e,u=new Map,p=new WeakMap;let m;function f(e,t){return m||(m=c()),m(e,t)}function h(){return m||(m=c()),m.getInitialState()}function v(t,s=!1){function r(e){let o=e[t];if(void 0===o){if(!s)throw new Error("selectSlice returned undefined for an uninjected slice reducer");o=g(p,r,h)}return o}function o(t=l){const r=g(u,s,()=>new WeakMap);return g(r,t,()=>{const r={};for(const[o,n]of Object.entries(e.selectors??{}))r[o]=ce(n,t,()=>g(p,t,h),s);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const y={name:s,reducer:f,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...v(r),injectInto(e,{reducerPath:t,...s}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},s),{...y,...v(o,!0)}}};return y}}function ce(e,t,s,r){function o(o,...n){let a=t(o);if(void 0===a){if(!r)throw new Error("selectState returned undefined for an uninjected slice reducer");a=s()}return e(a,...n)}return o.unwrapped=e,o}var le=ie();function ue(){}var de=o.isDraft;function pe(e){const t=me((t,s)=>e(s));return function(e){return t(e,void 0)}}function me(e){return function(t,s){const r=t=>{m(s)?e(s.payload,t):e(s,t)};return de(t)?(r(t),t):(0,o.produce)(t,r)}}function fe(e,t){const s=t(e);return void 0===s&&console.warn("The entity passed to the `selectId` implementation returned undefined.","You should probably provide your own `selectId` implementation.","The entity that was passed:",e,"The `selectId` implementation:",t.toString()),s}function he(e){return Array.isArray(e)||(e=Object.values(e)),e}function ve(e){return(0,o.isDraft)(e)?(0,o.current)(e):e}function ye(e,t,s){e=he(e);const r=ve(s.ids),o=new Set(r),n=[],a=new Set([]),i=[];for(const s of e){const e=fe(s,t);o.has(e)||a.has(e)?i.push({id:e,changes:s}):(a.add(e),n.push(s))}return[n,i,r]}function je(e){function t(t,s){const r=fe(t,e);r in s.entities||(s.ids.push(r),s.entities[r]=t)}function s(e,s){e=he(e);for(const r of e)t(r,s)}function r(t,s){const r=fe(t,e);r in s.entities||s.ids.push(r),s.entities[r]=t}function o(e,t){let s=!1;e.forEach(e=>{e in t.entities&&(delete t.entities[e],s=!0)}),s&&(t.ids=t.ids.filter(e=>e in t.entities))}function n(t,s){const r={},o={};if(t.forEach(e=>{e.id in s.entities&&(o[e.id]={id:e.id,changes:{...o[e.id]?.changes,...e.changes}})}),(t=Object.values(o)).length>0){const o=t.filter(t=>function(t,s,r){const o=r.entities[s.id];if(void 0===o)return!1;const n=Object.assign({},o,s.changes),a=fe(n,e),i=a!==s.id;return i&&(t[s.id]=a,delete r.entities[s.id]),r.entities[a]=n,i}(r,t,s)).length>0;o&&(s.ids=Object.values(s.entities).map(t=>fe(t,e)))}}function a(t,r){const[o,a]=ye(t,e,r);s(o,r),n(a,r)}return{removeAll:pe(function(e){Object.assign(e,{ids:[],entities:{}})}),addOne:me(t),addMany:me(s),setOne:me(r),setMany:me(function(e,t){e=he(e);for(const s of e)r(s,t)}),setAll:me(function(e,t){e=he(e),t.ids=[],t.entities={},s(e,t)}),updateOne:me(function(e,t){return n([e],t)}),updateMany:me(n),upsertOne:me(function(e,t){return a([e],t)}),upsertMany:me(a),removeOne:me(function(e,t){return o([e],t)}),removeMany:me(o)}}function ge(e,t,s){const r=function(e,t,s){let r=0,o=e.length;for(;r<o;){let n=r+o>>>1;s(t,e[n])>=0?r=n+1:o=n}return r}(e,t,s);return e.splice(r,0,t),e}function be(e={}){const{selectId:t,sortComparer:s}={sortComparer:!1,selectId:e=>e.id,...e},r=s?function(e,t){const{removeOne:s,removeMany:r,removeAll:o}=je(e);function n(t,s,r){t=he(t);const o=new Set(r??ve(s.ids)),n=t.filter(t=>!o.has(fe(t,e)));0!==n.length&&l(s,n)}function a(t,s){if(0!==(t=he(t)).length){for(const r of t)delete s.entities[e(r)];l(s,t)}}function i(t,s){let r=!1,o=!1;for(let n of t){const t=s.entities[n.id];if(!t)continue;r=!0,Object.assign(t,n.changes);const a=e(t);if(n.id!==a){o=!0,delete s.entities[n.id];const e=s.ids.indexOf(n.id);s.ids[e]=a,s.entities[a]=t}}r&&l(s,[],r,o)}function c(t,s){const[r,o,a]=ye(t,e,s);r.length&&n(r,s,a),o.length&&i(o,s)}const l=(s,r,o,n)=>{const a=ve(s.entities),i=ve(s.ids),c=s.entities;let l=i;n&&(l=new Set(i));let u=[];for(const e of l){const t=a[e];t&&u.push(t)}const d=0===u.length;for(const s of r)c[e(s)]=s,d||ge(u,s,t);d?u=r.slice().sort(t):o&&u.sort(t);const p=u.map(e);(function(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0})(i,p)||(s.ids=p)};return{removeOne:s,removeMany:r,removeAll:o,addOne:me(function(e,t){return n([e],t)}),updateOne:me(function(e,t){return i([e],t)}),upsertOne:me(function(e,t){return c([e],t)}),setOne:me(function(e,t){return a([e],t)}),setMany:me(a),setAll:me(function(e,t){e=he(e),t.entities={},t.ids=[],n(e,t,[])}),addMany:me(n),updateMany:me(i),upsertMany:me(c)}}(t,s):je(t),o=function(e){return{getInitialState:function(t={},s){const r=Object.assign({ids:[],entities:{}},t);return s?e.setAll(r,s):r}}}(r),n={getSelectors:function(e,t={}){const{createSelector:s=c}=t,r=e=>e.ids,o=e=>e.entities,n=s(r,o,(e,t)=>e.map(e=>t[e])),a=(e,t)=>t,i=(e,t)=>e[t],l=s(r,e=>e.length);if(!e)return{selectIds:r,selectEntities:o,selectAll:n,selectTotal:l,selectById:s(o,a,i)};const u=s(e,o);return{selectIds:s(e,r),selectEntities:u,selectAll:s(e,n),selectTotal:s(e,l),selectById:s(u,a,i)}}};return{selectId:t,sortComparer:s,...o,...n,...r}}var xe="listener",_e="completed",we="cancelled",Se=`task-${we}`,ke=`task-${_e}`,Ce=`${xe}-${we}`,Ee=`${xe}-${_e}`,Te=class{constructor(e){this.code=e,this.message=`task ${we} (reason: ${e})`}name="TaskAbortError";message},Ne=(e,t)=>{if("function"!=typeof e)throw new TypeError(`${t} is not a function`)},Ie=()=>{},Oe=(e,t=Ie)=>(e.catch(t),e),Ae=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Pe=(e,t)=>{const s=e.signal;s.aborted||("reason"in s||Object.defineProperty(s,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Le=e=>{if(e.aborted){const{reason:t}=e;throw new Te(t)}};function Re(e,t){let s=Ie;return new Promise((r,o)=>{const n=()=>o(new Te(e.reason));e.aborted?n():(s=Ae(e,n),t.finally(()=>s()).then(r,o))}).finally(()=>{s=Ie})}var Me=e=>t=>Oe(Re(e,t).then(t=>(Le(e),t))),De=e=>{const t=Me(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:Fe}=Object,Ue={},ze="listenerMiddleware",Be=(e,t)=>(s,r)=>{Ne(s,"taskExecutor");const o=new AbortController;var n;n=o,Ae(e,()=>Pe(n,e.reason));const a=(async()=>{try{return await Promise.resolve(),{status:"ok",value:await(async()=>{Le(e),Le(o.signal);const t=await s({pause:Me(o.signal),delay:De(o.signal),signal:o.signal});return Le(o.signal),t})()}}catch(e){return{status:e instanceof Te?"cancelled":"rejected",error:e}}finally{Pe(o,ke)}})();return r?.autoJoin&&t.push(a.catch(Ie)),{result:Me(e)(a),cancel(){Pe(o,Se)}}},Ve=e=>{let{type:t,actionCreator:s,matcher:r,predicate:o,effect:n}=e;if(t)o=d(t).match;else if(s)t=s.type,o=s.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return Ne(n,"options.listener"),{predicate:o,type:t,effect:n}},$e=Fe(e=>{const{type:t,predicate:s,effect:r}=Ve(e);return{id:J(),effect:r,type:t,predicate:s,pending:new Set,unsubscribe:()=>{throw new Error("Unsubscribe not initialized")}}},{withTypes:()=>$e}),He=(e,t)=>{const{type:s,effect:r,predicate:o}=Ve(t);return Array.from(e.values()).find(e=>("string"==typeof s?e.type===s:e.predicate===o)&&e.effect===r)},Ge=e=>{e.pending.forEach(e=>{Pe(e,Ce)})},We=(e,t,s)=>{try{e(t,s)}catch(e){setTimeout(()=>{throw e},0)}},qe=Fe(d(`${ze}/add`),{withTypes:()=>qe}),Ke=d(`${ze}/removeAll`),Je=Fe(d(`${ze}/remove`),{withTypes:()=>Je}),Ye=(...e)=>{console.error(`${ze}/error`,...e)},Xe=(e={})=>{const t=new Map,{extra:s,onError:o=Ye}=e;Ne(o,"onError");const n=e=>{return(s=He(t,e)??$e(e)).unsubscribe=()=>t.delete(s.id),t.set(s.id,s),e=>{s.unsubscribe(),e?.cancelActive&&Ge(s)};var s};Fe(n,{withTypes:()=>n});const a=e=>{const s=He(t,e);return s&&(s.unsubscribe(),e.cancelActive&&Ge(s)),!!s};Fe(a,{withTypes:()=>a});const i=async(e,r,a,i)=>{const c=new AbortController,l=((e,t)=>(s,r)=>Oe((async(s,r)=>{Le(t);let o=()=>{};const n=[new Promise((t,r)=>{let n=e({predicate:s,effect:(e,s)=>{s.unsubscribe(),t([e,s.getState(),s.getOriginalState()])}});o=()=>{n(),r()}})];null!=r&&n.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await Re(t,Promise.race(n));return Le(t),e}finally{o()}})(s,r)))(n,c.signal),u=[];try{e.pending.add(c),await Promise.resolve(e.effect(r,Fe({},a,{getOriginalState:i,condition:(e,t)=>l(e,t).then(Boolean),take:l,delay:De(c.signal),pause:Me(c.signal),extra:s,signal:c.signal,fork:Be(c.signal,u),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,s)=>{e!==c&&(Pe(e,Ce),s.delete(e))})},cancel:()=>{Pe(c,Ce),e.pending.delete(c)},throwIfCancelled:()=>{Le(c.signal)}})))}catch(e){e instanceof Te||We(o,e,{raisedBy:"effect"})}finally{await Promise.all(u),Pe(c,Ee),e.pending.delete(c)}},c=(e=>()=>{e.forEach(Ge),e.clear()})(t);return{middleware:e=>s=>l=>{if(!(0,r.isAction)(l))return s(l);if(qe.match(l))return n(l.payload);if(Ke.match(l))return void c();if(Je.match(l))return a(l.payload);let u=e.getState();const d=()=>{if(u===Ue)throw new Error(`${ze}: getOriginalState can only be called synchronously`);return u};let p;try{if(p=s(l),t.size>0){const s=e.getState(),r=Array.from(t.values());for(const t of r){let r=!1;try{r=t.predicate(l,s,u)}catch(e){r=!1,We(o,e,{raisedBy:"predicate"})}r&&i(t,l,e,d)}}}finally{u=Ue}return p},startListening:n,stopListening:a,clearListeners:c}},Qe=e=>({middleware:e,applied:new Map}),Ze=()=>{const e=J(),t=new Map,s=Object.assign(d("dynamicMiddleware/add",(...t)=>({payload:t,meta:{instanceId:e}})),{withTypes:()=>s}),o=Object.assign(function(...e){e.forEach(e=>{g(t,e,Qe)})},{withTypes:()=>o}),n=B(s,(e=>t=>t?.meta?.instanceId===e)(e));return{middleware:e=>s=>a=>n(a)?(o(...a.payload),e.dispatch):(e=>{const s=Array.from(t.values()).map(t=>g(t.applied,e,t.middleware));return(0,r.compose)(...s)})(e)(s)(a),addMiddleware:o,withMiddleware:s,instanceId:e}},et=e=>e.flatMap(e=>{return"reducerPath"in(t=e)&&"string"==typeof t.reducerPath?[[e.reducerPath,e.reducer]]:Object.entries(e);var t}),tt=Symbol.for("rtk-state-proxy-original"),st=new WeakMap,rt=(e,t,s)=>g(st,e,()=>new Proxy(e,{get:(e,r,o)=>{if(r===tt)return e;const n=Reflect.get(e,r,o);if(void 0===n){const e=s[r];if(void 0!==e)return e;const o=t[r];if(o){const e=o(void 0,{type:J()});if(void 0===e)throw new Error(`The slice reducer for key "${r.toString()}" returned undefined when called for selector(). If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);return s[r]=e,e}}return n}})),ot=e=>{if(!(t=e)||!t[tt])throw new Error("original must be used on state Proxy");var t;return e[tt]},nt={},at=(e=nt)=>e;function it(...e){const t=Object.fromEntries(et(e)),s=()=>Object.keys(t).length?(0,r.combineReducers)(t):at;let o=s();function n(e,t){return o(e,t)}n.withLazyLoadedSlices=()=>n;const a={},i=Object.assign(function(e,s){return function(r,...o){return e(rt(s?s(r,...o):r,t,a),...o)}},{original:ot});return Object.assign(n,{inject:(e,r={})=>{const{reducerPath:i,reducer:c}=e,l=t[i];return!r.overrideExisting&&l&&l!==c?("undefined"!=typeof process&&console.error(`called \`inject\` to override already-existing reducer ${i} without specifying \`overrideExisting: true\``),n):(r.overrideExisting&&l!==c&&delete a[i],t[i]=c,o=s(),n)},selector:i})}function ct(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}},"./node_modules/@ultraq/function-utils/function-utils.js":(e,t,s)=>{"use strict";function r(e){const t={};return function(...s){let r=s.length?s.map(e=>null===e?"null":void 0===e?"undefined":"function"==typeof e?e.toString():e instanceof Date?e.toISOString():JSON.stringify(e)).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(t,r))return t[r];let o=e(...s);return t[r]=o,o}}s.r(t),s.d(t,{memoize:()=>r})},"./node_modules/@ultraq/icu-message-formatter/dist/icu-message-formatter.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{MessageFormatter:()=>c,findClosingBracket:()=>n,parseCases:()=>o,pluralTypeHandler:()=>f,selectTypeHandler:()=>v,splitFormattedArgument:()=>a});var r=s("./node_modules/@ultraq/function-utils/function-utils.js");function o(e=""){const t=e=>/\s/.test(e),s=[],r={};let o=0,a=null,i=!1,c=0;for(;c<e.length;){if(i&&(t(e[c])||"{"===e[c]))i=!1,a=e.slice(o,c),"{"===e[c]&&c--;else if(!i&&!t(e[c])){const t="{"===e[c];if(a&&t){const t=n(e,c);if(-1===t)throw new Error(`Unbalanced curly braces in string: "${e}"`);r[a]=e.slice(c+1,t),c=t,a=null}else a&&(s.push(a),a=null),i=!0,o=c}c++}return i&&(a=e.slice(o)),a&&s.push(a),{args:s,cases:r}}function n(e,t){let s=0;for(let r=t+1;r<e.length;r++){let t=e.charAt(r);if("}"===t){if(0===s)return r;s--}else"{"===t&&s++}return-1}function a(e){return i(e.slice(1,-1),",",3)}function i(e,t,s,r=[]){if(!e)return r;if(1===s)return r.push(e),r;let o=e.indexOf(t);if(-1===o)return r.push(e),r;let n=e.substring(0,o).trim(),a=e.substring(o+t.length+1).trim();return r.push(n),i(a,t,s-1,r)}class c{constructor(e,t={}){this.locale=e,this.typeHandlers=t}format=(0,r.memoize)((e,t={})=>this.process(e,t).flat(1/0).join(""));process(e,t={}){if(!e)return[];let s=e.indexOf("{");if(-1!==s){let r=n(e,s);if(-1===r)throw new Error(`Unbalanced curly braces in string: "${e}"`);{let o=e.substring(s,r+1);if(o){let n=[],i=e.substring(0,s);i&&n.push(i);let[c,l,u]=a(o),d=t[c],p=l&&this.typeHandlers[l];n.push(p?p(d,u,this.locale,t,this.process.bind(this)):d);let m=e.substring(r+1);return m&&n.push(this.process(m,t)),n}}}return[e]}}let l,u=0;const d="one",p="other";function m(e,t){let s=0,r="",o=0;const n={};for(;s<e.length;){if("#"!==e[s]||o)r+=e[s];else{let e="__hashToken"+u++;r+=`{${e}, number}`,n[e]=t}"{"===e[s]?o++:"}"===e[s]&&o--,s++}return{caseBody:r,numberValues:n}}function f(e,t,s,r,n){const{args:a,cases:i}=o(t);let c=parseInt(e);a.forEach(e=>{e.startsWith("offset:")&&(c-=parseInt(e.slice(7)))});const u=[];if("PluralRules"in Intl){void 0!==l&&l.resolvedOptions().locale===s||(l=new Intl.PluralRules(s));const e=l.select(c);e!==p&&u.push(e)}1===c&&u.push(d),u.push(`=${c}`,p);for(let e=0;e<u.length;e++){const t=u[e];if(t in i){const{caseBody:e,numberValues:s}=m(i[t],c);return n(e,{...r,...s})}}return e}const h="other";function v(e,t,s,r,n){const{cases:a}=o(t);return e in a?n(a[e],r):h in a?n(a[h],r):e}},"./node_modules/core-js/es/array/at.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.array.at.js");var r=s("./node_modules/core-js/internals/entry-unbind.js");e.exports=r("Array","at")},"./node_modules/core-js/internals/a-callable.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-callable.js"),o=s("./node_modules/core-js/internals/try-to-string.js"),n=TypeError;e.exports=function(e){if(r(e))return e;throw new n(o(e)+" is not a function")}},"./node_modules/core-js/internals/a-set.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/set-helpers.js").has;e.exports=function(e){return r(e),e}},"./node_modules/core-js/internals/add-to-unscopables.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/well-known-symbol.js"),o=s("./node_modules/core-js/internals/object-create.js"),n=s("./node_modules/core-js/internals/object-define-property.js").f,a=r("unscopables"),i=Array.prototype;void 0===i[a]&&n(i,a,{configurable:!0,value:o(null)}),e.exports=function(e){i[a][e]=!0}},"./node_modules/core-js/internals/an-instance.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/object-is-prototype-of.js"),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new o("Incorrect invocation")}},"./node_modules/core-js/internals/an-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-object.js"),o=String,n=TypeError;e.exports=function(e){if(r(e))return e;throw new n(o(e)+" is not an object")}},"./node_modules/core-js/internals/array-includes.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-indexed-object.js"),o=s("./node_modules/core-js/internals/to-absolute-index.js"),n=s("./node_modules/core-js/internals/length-of-array-like.js"),a=function(e){return function(t,s,a){var i=r(t),c=n(i);if(0===c)return!e&&-1;var l,u=o(a,c);if(e&&s!=s){for(;c>u;)if((l=i[u++])!=l)return!0}else for(;c>u;u++)if((e||u in i)&&i[u]===s)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"./node_modules/core-js/internals/array-set-length.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/is-array.js"),n=TypeError,a=Object.getOwnPropertyDescriptor,i=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=i?function(e,t){if(o(e)&&!a(e,"length").writable)throw new n("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/an-object.js"),o=s("./node_modules/core-js/internals/iterator-close.js");e.exports=function(e,t,s,n){try{return n?t(r(s)[0],s[1]):t(s)}catch(t){o(e,"throw",t)}}},"./node_modules/core-js/internals/classof-raw.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=r({}.toString),n=r("".slice);e.exports=function(e){return n(o(e),8,-1)}},"./node_modules/core-js/internals/classof.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-string-tag-support.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/classof-raw.js"),a=s("./node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),i=Object,c="Arguments"===n(function(){return arguments}());e.exports=r?n:function(e){var t,s,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(t=i(e),a))?s:c?n(t):"Object"===(r=n(t))&&o(t.callee)?"Arguments":r}},"./node_modules/core-js/internals/copy-constructor-properties.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/has-own-property.js"),o=s("./node_modules/core-js/internals/own-keys.js"),n=s("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),a=s("./node_modules/core-js/internals/object-define-property.js");e.exports=function(e,t,s){for(var i=o(t),c=a.f,l=n.f,u=0;u<i.length;u++){var d=i[u];r(e,d)||s&&r(s,d)||c(e,d,l(t,d))}}},"./node_modules/core-js/internals/correct-prototype-getter.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/fails.js");e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},"./node_modules/core-js/internals/create-iter-result-object.js":e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},"./node_modules/core-js/internals/create-non-enumerable-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/object-define-property.js"),n=s("./node_modules/core-js/internals/create-property-descriptor.js");e.exports=r?function(e,t,s){return o.f(e,t,n(1,s))}:function(e,t,s){return e[t]=s,e}},"./node_modules/core-js/internals/create-property-descriptor.js":e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"./node_modules/core-js/internals/create-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/object-define-property.js"),n=s("./node_modules/core-js/internals/create-property-descriptor.js");e.exports=function(e,t,s){r?o.f(e,t,n(0,s)):e[t]=s}},"./node_modules/core-js/internals/define-built-in-accessor.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/make-built-in.js"),o=s("./node_modules/core-js/internals/object-define-property.js");e.exports=function(e,t,s){return s.get&&r(s.get,t,{getter:!0}),s.set&&r(s.set,t,{setter:!0}),o.f(e,t,s)}},"./node_modules/core-js/internals/define-built-in.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-callable.js"),o=s("./node_modules/core-js/internals/object-define-property.js"),n=s("./node_modules/core-js/internals/make-built-in.js"),a=s("./node_modules/core-js/internals/define-global-property.js");e.exports=function(e,t,s,i){i||(i={});var c=i.enumerable,l=void 0!==i.name?i.name:t;if(r(s)&&n(s,l,i),i.global)c?e[t]=s:a(t,s);else{try{i.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=s:o.f(e,t,{value:s,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e}},"./node_modules/core-js/internals/define-built-ins.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/define-built-in.js");e.exports=function(e,t,s){for(var o in t)r(e,o,t[o],s);return e}},"./node_modules/core-js/internals/define-global-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(s){r[e]=t}return t}},"./node_modules/core-js/internals/descriptors.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/fails.js");e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},"./node_modules/core-js/internals/document-create-element.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/is-object.js"),n=r.document,a=o(n)&&o(n.createElement);e.exports=function(e){return a?n.createElement(e):{}}},"./node_modules/core-js/internals/does-not-exceed-safe-integer.js":e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},"./node_modules/core-js/internals/entry-unbind.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/function-uncurry-this.js");e.exports=function(e,t){return o(r[e].prototype[t])}},"./node_modules/core-js/internals/enum-bug-keys.js":e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"./node_modules/core-js/internals/environment-user-agent.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js").navigator,o=r&&r.userAgent;e.exports=o?String(o):""},"./node_modules/core-js/internals/environment-v8-version.js":(e,t,s)=>{"use strict";var r,o,n=s("./node_modules/core-js/internals/global-this.js"),a=s("./node_modules/core-js/internals/environment-user-agent.js"),i=n.process,c=n.Deno,l=i&&i.versions||c&&c.version,u=l&&l.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},"./node_modules/core-js/internals/export.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,n=s("./node_modules/core-js/internals/create-non-enumerable-property.js"),a=s("./node_modules/core-js/internals/define-built-in.js"),i=s("./node_modules/core-js/internals/define-global-property.js"),c=s("./node_modules/core-js/internals/copy-constructor-properties.js"),l=s("./node_modules/core-js/internals/is-forced.js");e.exports=function(e,t){var s,u,d,p,m,f=e.target,h=e.global,v=e.stat;if(s=h?r:v?r[f]||i(f,{}):r[f]&&r[f].prototype)for(u in t){if(p=t[u],d=e.dontCallGetSet?(m=o(s,u))&&m.value:s[u],!l(h?u:f+(v?".":"#")+u,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;c(p,d)}(e.sham||d&&d.sham)&&n(p,"sham",!0),a(s,u,p,e)}}},"./node_modules/core-js/internals/fails.js":e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},"./node_modules/core-js/internals/function-apply.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype,n=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(n):function(){return a.apply(n,arguments)})},"./node_modules/core-js/internals/function-bind-context.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this-clause.js"),o=s("./node_modules/core-js/internals/a-callable.js"),n=s("./node_modules/core-js/internals/function-bind-native.js"),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:n?a(e,t):function(){return e.apply(t,arguments)}}},"./node_modules/core-js/internals/function-bind-native.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/fails.js");e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},"./node_modules/core-js/internals/function-call.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},"./node_modules/core-js/internals/function-name.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/has-own-property.js"),n=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,i=o(n,"name"),c=i&&"something"===function(){}.name,l=i&&(!r||r&&a(n,"name").configurable);e.exports={EXISTS:i,PROPER:c,CONFIGURABLE:l}},"./node_modules/core-js/internals/function-uncurry-this-accessor.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/a-callable.js");e.exports=function(e,t,s){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[s]))}catch(e){}}},"./node_modules/core-js/internals/function-uncurry-this-clause.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/classof-raw.js"),o=s("./node_modules/core-js/internals/function-uncurry-this.js");e.exports=function(e){if("Function"===r(e))return o(e)}},"./node_modules/core-js/internals/function-uncurry-this.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype,n=o.call,a=r&&o.bind.bind(n,n);e.exports=r?a:function(e){return function(){return n.apply(e,arguments)}}},"./node_modules/core-js/internals/get-built-in.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/is-callable.js");e.exports=function(e,t){return arguments.length<2?(s=r[e],o(s)?s:void 0):r[e]&&r[e][t];var s}},"./node_modules/core-js/internals/get-iterator-direct.js":e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},"./node_modules/core-js/internals/get-iterator-method.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/classof.js"),o=s("./node_modules/core-js/internals/get-method.js"),n=s("./node_modules/core-js/internals/is-null-or-undefined.js"),a=s("./node_modules/core-js/internals/iterators.js"),i=s("./node_modules/core-js/internals/well-known-symbol.js")("iterator");e.exports=function(e){if(!n(e))return o(e,i)||o(e,"@@iterator")||a[r(e)]}},"./node_modules/core-js/internals/get-iterator.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/a-callable.js"),n=s("./node_modules/core-js/internals/an-object.js"),a=s("./node_modules/core-js/internals/try-to-string.js"),i=s("./node_modules/core-js/internals/get-iterator-method.js"),c=TypeError;e.exports=function(e,t){var s=arguments.length<2?i(e):t;if(o(s))return n(r(s,e));throw new c(a(e)+" is not iterable")}},"./node_modules/core-js/internals/get-method.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-callable.js"),o=s("./node_modules/core-js/internals/is-null-or-undefined.js");e.exports=function(e,t){var s=e[t];return o(s)?void 0:r(s)}},"./node_modules/core-js/internals/get-set-record.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-callable.js"),o=s("./node_modules/core-js/internals/an-object.js"),n=s("./node_modules/core-js/internals/function-call.js"),a=s("./node_modules/core-js/internals/to-integer-or-infinity.js"),i=s("./node_modules/core-js/internals/get-iterator-direct.js"),c="Invalid size",l=RangeError,u=TypeError,d=Math.max,p=function(e,t){this.set=e,this.size=d(t,0),this.has=r(e.has),this.keys=r(e.keys)};p.prototype={getIterator:function(){return i(o(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},e.exports=function(e){o(e);var t=+e.size;if(t!=t)throw new u(c);var s=a(t);if(s<0)throw new l(c);return new p(e,s)}},"./node_modules/core-js/internals/global-this.js":function(e,t,s){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof s.g&&s.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},"./node_modules/core-js/internals/has-own-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/to-object.js"),n=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return n(o(e),t)}},"./node_modules/core-js/internals/hidden-keys.js":e=>{"use strict";e.exports={}},"./node_modules/core-js/internals/html.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/get-built-in.js");e.exports=r("document","documentElement")},"./node_modules/core-js/internals/ie8-dom-define.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/document-create-element.js");e.exports=!r&&!o(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})},"./node_modules/core-js/internals/indexed-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/classof-raw.js"),a=Object,i=r("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?i(e,""):a(e)}:a},"./node_modules/core-js/internals/inspect-source.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/shared-store.js"),a=r(Function.toString);o(n.inspectSource)||(n.inspectSource=function(e){return a(e)}),e.exports=n.inspectSource},"./node_modules/core-js/internals/internal-state.js":(e,t,s)=>{"use strict";var r,o,n,a=s("./node_modules/core-js/internals/weak-map-basic-detection.js"),i=s("./node_modules/core-js/internals/global-this.js"),c=s("./node_modules/core-js/internals/is-object.js"),l=s("./node_modules/core-js/internals/create-non-enumerable-property.js"),u=s("./node_modules/core-js/internals/has-own-property.js"),d=s("./node_modules/core-js/internals/shared-store.js"),p=s("./node_modules/core-js/internals/shared-key.js"),m=s("./node_modules/core-js/internals/hidden-keys.js"),f="Object already initialized",h=i.TypeError,v=i.WeakMap;if(a||d.state){var y=d.state||(d.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,r=function(e,t){if(y.has(e))throw new h(f);return t.facade=e,y.set(e,t),t},o=function(e){return y.get(e)||{}},n=function(e){return y.has(e)}}else{var j=p("state");m[j]=!0,r=function(e,t){if(u(e,j))throw new h(f);return t.facade=e,l(e,j,t),t},o=function(e){return u(e,j)?e[j]:{}},n=function(e){return u(e,j)}}e.exports={set:r,get:o,has:n,enforce:function(e){return n(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var s;if(!c(t)||(s=o(t)).type!==e)throw new h("Incompatible receiver, "+e+" required");return s}}}},"./node_modules/core-js/internals/is-array-iterator-method.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/well-known-symbol.js"),o=s("./node_modules/core-js/internals/iterators.js"),n=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[n]===e)}},"./node_modules/core-js/internals/is-array.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/classof-raw.js");e.exports=Array.isArray||function(e){return"Array"===r(e)}},"./node_modules/core-js/internals/is-callable.js":e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},"./node_modules/core-js/internals/is-forced.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/fails.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=/#|\.prototype\./,a=function(e,t){var s=c[i(e)];return s===u||s!==l&&(o(t)?r(t):!!t)},i=a.normalize=function(e){return String(e).replace(n,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},"./node_modules/core-js/internals/is-null-or-undefined.js":e=>{"use strict";e.exports=function(e){return null==e}},"./node_modules/core-js/internals/is-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-callable.js");e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},"./node_modules/core-js/internals/is-pure.js":e=>{"use strict";e.exports=!1},"./node_modules/core-js/internals/is-symbol.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/get-built-in.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/object-is-prototype-of.js"),a=s("./node_modules/core-js/internals/use-symbol-as-uid.js"),i=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&n(t.prototype,i(e))}},"./node_modules/core-js/internals/iterate-simple.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js");e.exports=function(e,t,s){for(var o,n,a=s?e:e.iterator,i=e.next;!(o=r(i,a)).done;)if(void 0!==(n=t(o.value)))return n}},"./node_modules/core-js/internals/iterate.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-bind-context.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/an-object.js"),a=s("./node_modules/core-js/internals/try-to-string.js"),i=s("./node_modules/core-js/internals/is-array-iterator-method.js"),c=s("./node_modules/core-js/internals/length-of-array-like.js"),l=s("./node_modules/core-js/internals/object-is-prototype-of.js"),u=s("./node_modules/core-js/internals/get-iterator.js"),d=s("./node_modules/core-js/internals/get-iterator-method.js"),p=s("./node_modules/core-js/internals/iterator-close.js"),m=TypeError,f=function(e,t){this.stopped=e,this.result=t},h=f.prototype;e.exports=function(e,t,s){var v,y,j,g,b,x,_,w=s&&s.that,S=!(!s||!s.AS_ENTRIES),k=!(!s||!s.IS_RECORD),C=!(!s||!s.IS_ITERATOR),E=!(!s||!s.INTERRUPTED),T=r(t,w),N=function(e){return v&&p(v,"normal"),new f(!0,e)},I=function(e){return S?(n(e),E?T(e[0],e[1],N):T(e[0],e[1])):E?T(e,N):T(e)};if(k)v=e.iterator;else if(C)v=e;else{if(!(y=d(e)))throw new m(a(e)+" is not iterable");if(i(y)){for(j=0,g=c(e);g>j;j++)if((b=I(e[j]))&&l(h,b))return b;return new f(!1)}v=u(e,y)}for(x=k?e.next:v.next;!(_=o(x,v)).done;){try{b=I(_.value)}catch(e){p(v,"throw",e)}if("object"==typeof b&&b&&l(h,b))return b}return new f(!1)}},"./node_modules/core-js/internals/iterator-close-all.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/iterator-close.js");e.exports=function(e,t,s){for(var o=e.length-1;o>=0;o--)if(void 0!==e[o])try{s=r(e[o].iterator,t,s)}catch(e){t="throw",s=e}if("throw"===t)throw s;return s}},"./node_modules/core-js/internals/iterator-close.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/an-object.js"),n=s("./node_modules/core-js/internals/get-method.js");e.exports=function(e,t,s){var a,i;o(e);try{if(!(a=n(e,"return"))){if("throw"===t)throw s;return s}a=r(a,e)}catch(e){i=!0,a=e}if("throw"===t)throw s;if(i)throw a;return o(a),s}},"./node_modules/core-js/internals/iterator-create-proxy.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/object-create.js"),n=s("./node_modules/core-js/internals/create-non-enumerable-property.js"),a=s("./node_modules/core-js/internals/define-built-ins.js"),i=s("./node_modules/core-js/internals/well-known-symbol.js"),c=s("./node_modules/core-js/internals/internal-state.js"),l=s("./node_modules/core-js/internals/get-method.js"),u=s("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,d=s("./node_modules/core-js/internals/create-iter-result-object.js"),p=s("./node_modules/core-js/internals/iterator-close.js"),m=s("./node_modules/core-js/internals/iterator-close-all.js"),f=i("toStringTag"),h="IteratorHelper",v="WrapForValidIterator",y="normal",j="throw",g=c.set,b=function(e){var t=c.getterFor(e?v:h);return a(o(u),{next:function(){var s=t(this);if(e)return s.nextHandler();if(s.done)return d(void 0,!0);try{var r=s.nextHandler();return s.returnHandlerResult?r:d(r,s.done)}catch(e){throw s.done=!0,e}},return:function(){var s=t(this),o=s.iterator;if(s.done=!0,e){var n=l(o,"return");return n?r(n,o):d(void 0,!0)}if(s.inner)try{p(s.inner.iterator,y)}catch(e){return p(o,j,e)}if(s.openIters)try{m(s.openIters,y)}catch(e){return p(o,j,e)}return o&&p(o,y),d(void 0,!0)}})},x=b(!0),_=b(!1);n(_,f,"Iterator Helper"),e.exports=function(e,t,s){var r=function(r,o){o?(o.iterator=r.iterator,o.next=r.next):o=r,o.type=t?v:h,o.returnHandlerResult=!!s,o.nextHandler=e,o.counter=0,o.done=!1,g(this,o)};return r.prototype=t?x:_,r}},"./node_modules/core-js/internals/iterator-helper-throws-on-invalid-iterator.js":e=>{"use strict";e.exports=function(e,t){var s="function"==typeof Iterator&&Iterator.prototype[e];if(s)try{s.call({next:null},t).next()}catch(e){return!0}}},"./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js");e.exports=function(e,t){var s=r.Iterator,o=s&&s.prototype,n=o&&o[e],a=!1;if(n)try{n.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(e){e instanceof t||(a=!1)}if(!a)return n}},"./node_modules/core-js/internals/iterators-core.js":(e,t,s)=>{"use strict";var r,o,n,a=s("./node_modules/core-js/internals/fails.js"),i=s("./node_modules/core-js/internals/is-callable.js"),c=s("./node_modules/core-js/internals/is-object.js"),l=s("./node_modules/core-js/internals/object-create.js"),u=s("./node_modules/core-js/internals/object-get-prototype-of.js"),d=s("./node_modules/core-js/internals/define-built-in.js"),p=s("./node_modules/core-js/internals/well-known-symbol.js"),m=s("./node_modules/core-js/internals/is-pure.js"),f=p("iterator"),h=!1;[].keys&&("next"in(n=[].keys())?(o=u(u(n)))!==Object.prototype&&(r=o):h=!0),!c(r)||a(function(){var e={};return r[f].call(e)!==e})?r={}:m&&(r=l(r)),i(r[f])||d(r,f,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},"./node_modules/core-js/internals/iterators.js":e=>{"use strict";e.exports={}},"./node_modules/core-js/internals/length-of-array-like.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-length.js");e.exports=function(e){return r(e.length)}},"./node_modules/core-js/internals/make-built-in.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/is-callable.js"),a=s("./node_modules/core-js/internals/has-own-property.js"),i=s("./node_modules/core-js/internals/descriptors.js"),c=s("./node_modules/core-js/internals/function-name.js").CONFIGURABLE,l=s("./node_modules/core-js/internals/inspect-source.js"),u=s("./node_modules/core-js/internals/internal-state.js"),d=u.enforce,p=u.get,m=String,f=Object.defineProperty,h=r("".slice),v=r("".replace),y=r([].join),j=i&&!o(function(){return 8!==f(function(){},"length",{value:8}).length}),g=String(String).split("String"),b=e.exports=function(e,t,s){"Symbol("===h(m(t),0,7)&&(t="["+v(m(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),s&&s.getter&&(t="get "+t),s&&s.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(i?f(e,"name",{value:t,configurable:!0}):e.name=t),j&&s&&a(s,"arity")&&e.length!==s.arity&&f(e,"length",{value:s.arity});try{s&&a(s,"constructor")&&s.constructor?i&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=d(e);return a(r,"source")||(r.source=y(g,"string"==typeof t?t:"")),e};Function.prototype.toString=b(function(){return n(this)&&p(this).source||l(this)},"toString")},"./node_modules/core-js/internals/math-trunc.js":e=>{"use strict";var t=Math.ceil,s=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?s:t)(r)}},"./node_modules/core-js/internals/object-create.js":(e,t,s)=>{"use strict";var r,o=s("./node_modules/core-js/internals/an-object.js"),n=s("./node_modules/core-js/internals/object-define-properties.js"),a=s("./node_modules/core-js/internals/enum-bug-keys.js"),i=s("./node_modules/core-js/internals/hidden-keys.js"),c=s("./node_modules/core-js/internals/html.js"),l=s("./node_modules/core-js/internals/document-create-element.js"),u=s("./node_modules/core-js/internals/shared-key.js"),d="prototype",p="script",m=u("IE_PROTO"),f=function(){},h=function(e){return"<"+p+">"+e+"</"+p+">"},v=function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,s;y="undefined"!=typeof document?document.domain&&r?v(r):(t=l("iframe"),s="java"+p+":",t.style.display="none",c.appendChild(t),t.src=String(s),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):v(r);for(var o=a.length;o--;)delete y[d][a[o]];return y()};i[m]=!0,e.exports=Object.create||function(e,t){var s;return null!==e?(f[d]=o(e),s=new f,f[d]=null,s[m]=e):s=y(),void 0===t?s:n.f(s,t)}},"./node_modules/core-js/internals/object-define-properties.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/v8-prototype-define-bug.js"),n=s("./node_modules/core-js/internals/object-define-property.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/to-indexed-object.js"),c=s("./node_modules/core-js/internals/object-keys.js");t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var s,r=i(t),o=c(t),l=o.length,u=0;l>u;)n.f(e,s=o[u++],r[s]);return e}},"./node_modules/core-js/internals/object-define-property.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/ie8-dom-define.js"),n=s("./node_modules/core-js/internals/v8-prototype-define-bug.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/to-property-key.js"),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",m="writable";t.f=r?n?function(e,t,s){if(a(e),t=i(t),a(s),"function"==typeof e&&"prototype"===t&&"value"in s&&m in s&&!s[m]){var r=u(e,t);r&&r[m]&&(e[t]=s.value,s={configurable:p in s?s[p]:r[p],enumerable:d in s?s[d]:r[d],writable:!1})}return l(e,t,s)}:l:function(e,t,s){if(a(e),t=i(t),a(s),o)try{return l(e,t,s)}catch(e){}if("get"in s||"set"in s)throw new c("Accessors not supported");return"value"in s&&(e[t]=s.value),e}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=s("./node_modules/core-js/internals/create-property-descriptor.js"),i=s("./node_modules/core-js/internals/to-indexed-object.js"),c=s("./node_modules/core-js/internals/to-property-key.js"),l=s("./node_modules/core-js/internals/has-own-property.js"),u=s("./node_modules/core-js/internals/ie8-dom-define.js"),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=i(e),t=c(t),u)try{return d(e,t)}catch(e){}if(l(e,t))return a(!o(n.f,e,t),e[t])}},"./node_modules/core-js/internals/object-get-own-property-names.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/object-keys-internal.js"),o=s("./node_modules/core-js/internals/enum-bug-keys.js").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/has-own-property.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/to-object.js"),a=s("./node_modules/core-js/internals/shared-key.js"),i=s("./node_modules/core-js/internals/correct-prototype-getter.js"),c=a("IE_PROTO"),l=Object,u=l.prototype;e.exports=i?l.getPrototypeOf:function(e){var t=n(e);if(r(t,c))return t[c];var s=t.constructor;return o(s)&&t instanceof s?s.prototype:t instanceof l?u:null}},"./node_modules/core-js/internals/object-is-prototype-of.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js");e.exports=r({}.isPrototypeOf)},"./node_modules/core-js/internals/object-keys-internal.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/has-own-property.js"),n=s("./node_modules/core-js/internals/to-indexed-object.js"),a=s("./node_modules/core-js/internals/array-includes.js").indexOf,i=s("./node_modules/core-js/internals/hidden-keys.js"),c=r([].push);e.exports=function(e,t){var s,r=n(e),l=0,u=[];for(s in r)!o(i,s)&&o(r,s)&&c(u,s);for(;t.length>l;)o(r,s=t[l++])&&(~a(u,s)||c(u,s));return u}},"./node_modules/core-js/internals/object-keys.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/object-keys-internal.js"),o=s("./node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(e){return r(e,o)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":(e,t)=>{"use strict";var s={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!s.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:s},"./node_modules/core-js/internals/ordinary-to-primitive.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=s("./node_modules/core-js/internals/is-object.js"),a=TypeError;e.exports=function(e,t){var s,i;if("string"===t&&o(s=e.toString)&&!n(i=r(s,e)))return i;if(o(s=e.valueOf)&&!n(i=r(s,e)))return i;if("string"!==t&&o(s=e.toString)&&!n(i=r(s,e)))return i;throw new a("Can't convert object to primitive value")}},"./node_modules/core-js/internals/own-keys.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/get-built-in.js"),o=s("./node_modules/core-js/internals/function-uncurry-this.js"),n=s("./node_modules/core-js/internals/object-get-own-property-names.js"),a=s("./node_modules/core-js/internals/object-get-own-property-symbols.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=n.f(i(e)),s=a.f;return s?c(t,s(e)):t}},"./node_modules/core-js/internals/require-object-coercible.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-null-or-undefined.js"),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},"./node_modules/core-js/internals/set-clone.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/set-helpers.js"),o=s("./node_modules/core-js/internals/set-iterate.js"),n=r.Set,a=r.add;e.exports=function(e){var t=new n;return o(e,function(e){a(t,e)}),t}},"./node_modules/core-js/internals/set-difference.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js"),n=s("./node_modules/core-js/internals/set-clone.js"),a=s("./node_modules/core-js/internals/set-size.js"),i=s("./node_modules/core-js/internals/get-set-record.js"),c=s("./node_modules/core-js/internals/set-iterate.js"),l=s("./node_modules/core-js/internals/iterate-simple.js"),u=o.has,d=o.remove;e.exports=function(e){var t=r(this),s=i(e),o=n(t);return a(t)<=s.size?c(t,function(e){s.includes(e)&&d(o,e)}):l(s.getIterator(),function(e){u(o,e)&&d(o,e)}),o}},"./node_modules/core-js/internals/set-helpers.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=Set.prototype;e.exports={Set,add:r(o.add),has:r(o.has),remove:r(o.delete),proto:o}},"./node_modules/core-js/internals/set-intersection.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js"),n=s("./node_modules/core-js/internals/set-size.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/set-iterate.js"),c=s("./node_modules/core-js/internals/iterate-simple.js"),l=o.Set,u=o.add,d=o.has;e.exports=function(e){var t=r(this),s=a(e),o=new l;return n(t)>s.size?c(s.getIterator(),function(e){d(t,e)&&u(o,e)}):i(t,function(e){s.includes(e)&&u(o,e)}),o}},"./node_modules/core-js/internals/set-is-disjoint-from.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js").has,n=s("./node_modules/core-js/internals/set-size.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/set-iterate.js"),c=s("./node_modules/core-js/internals/iterate-simple.js"),l=s("./node_modules/core-js/internals/iterator-close.js");e.exports=function(e){var t=r(this),s=a(e);if(n(t)<=s.size)return!1!==i(t,function(e){if(s.includes(e))return!1},!0);var u=s.getIterator();return!1!==c(u,function(e){if(o(t,e))return l(u,"normal",!1)})}},"./node_modules/core-js/internals/set-is-subset-of.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-size.js"),n=s("./node_modules/core-js/internals/set-iterate.js"),a=s("./node_modules/core-js/internals/get-set-record.js");e.exports=function(e){var t=r(this),s=a(e);return!(o(t)>s.size)&&!1!==n(t,function(e){if(!s.includes(e))return!1},!0)}},"./node_modules/core-js/internals/set-is-superset-of.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js").has,n=s("./node_modules/core-js/internals/set-size.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/iterate-simple.js"),c=s("./node_modules/core-js/internals/iterator-close.js");e.exports=function(e){var t=r(this),s=a(e);if(n(t)<s.size)return!1;var l=s.getIterator();return!1!==i(l,function(e){if(!o(t,e))return c(l,"normal",!1)})}},"./node_modules/core-js/internals/set-iterate.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=s("./node_modules/core-js/internals/iterate-simple.js"),n=s("./node_modules/core-js/internals/set-helpers.js"),a=n.Set,i=n.proto,c=r(i.forEach),l=r(i.keys),u=l(new a).next;e.exports=function(e,t,s){return s?o({iterator:l(e),next:u},t):c(e,t)}},"./node_modules/core-js/internals/set-method-accept-set-like.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/get-built-in.js"),o=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},n=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var s=r("Set");try{(new s)[e](o(0));try{return(new s)[e](o(-1)),!1}catch(r){if(!t)return!0;try{return(new s)[e](n(-1/0)),!1}catch(r){var a=new s;return a.add(1),a.add(2),t(a[e](n(1/0)))}}}catch(e){return!1}}},"./node_modules/core-js/internals/set-method-get-keys-before-cloning-detection.js":e=>{"use strict";e.exports=function(e){try{var t=new Set,s={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},r=t[e](s);return 1===r.size&&4===r.values().next().value}catch(e){return!1}}},"./node_modules/core-js/internals/set-size.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this-accessor.js"),o=s("./node_modules/core-js/internals/set-helpers.js");e.exports=r(o.proto,"size","get")||function(e){return e.size}},"./node_modules/core-js/internals/set-symmetric-difference.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js"),n=s("./node_modules/core-js/internals/set-clone.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/iterate-simple.js"),c=o.add,l=o.has,u=o.remove;e.exports=function(e){var t=r(this),s=a(e).getIterator(),o=n(t);return i(s,function(e){l(t,e)?u(o,e):c(o,e)}),o}},"./node_modules/core-js/internals/set-union.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/a-set.js"),o=s("./node_modules/core-js/internals/set-helpers.js").add,n=s("./node_modules/core-js/internals/set-clone.js"),a=s("./node_modules/core-js/internals/get-set-record.js"),i=s("./node_modules/core-js/internals/iterate-simple.js");e.exports=function(e){var t=r(this),s=a(e).getIterator(),c=n(t);return i(s,function(e){o(c,e)}),c}},"./node_modules/core-js/internals/shared-key.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/shared.js"),o=s("./node_modules/core-js/internals/uid.js"),n=r("keys");e.exports=function(e){return n[e]||(n[e]=o(e))}},"./node_modules/core-js/internals/shared-store.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/is-pure.js"),o=s("./node_modules/core-js/internals/global-this.js"),n=s("./node_modules/core-js/internals/define-global-property.js"),a="__core-js_shared__",i=e.exports=o[a]||n(a,{});(i.versions||(i.versions=[])).push({version:"3.45.1",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"./node_modules/core-js/internals/shared.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/shared-store.js");e.exports=function(e,t){return r[e]||(r[e]=t||{})}},"./node_modules/core-js/internals/symbol-constructor-detection.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/environment-v8-version.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/global-this.js").String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},"./node_modules/core-js/internals/to-absolute-index.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-integer-or-infinity.js"),o=Math.max,n=Math.min;e.exports=function(e,t){var s=r(e);return s<0?o(s+t,0):n(s,t)}},"./node_modules/core-js/internals/to-indexed-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/indexed-object.js"),o=s("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return r(o(e))}},"./node_modules/core-js/internals/to-integer-or-infinity.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/math-trunc.js");e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},"./node_modules/core-js/internals/to-length.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-integer-or-infinity.js"),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/require-object-coercible.js"),o=Object;e.exports=function(e){return o(r(e))}},"./node_modules/core-js/internals/to-primitive.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-call.js"),o=s("./node_modules/core-js/internals/is-object.js"),n=s("./node_modules/core-js/internals/is-symbol.js"),a=s("./node_modules/core-js/internals/get-method.js"),i=s("./node_modules/core-js/internals/ordinary-to-primitive.js"),c=s("./node_modules/core-js/internals/well-known-symbol.js"),l=TypeError,u=c("toPrimitive");e.exports=function(e,t){if(!o(e)||n(e))return e;var s,c=a(e,u);if(c){if(void 0===t&&(t="default"),s=r(c,e,t),!o(s)||n(s))return s;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),i(e,t)}},"./node_modules/core-js/internals/to-property-key.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/to-primitive.js"),o=s("./node_modules/core-js/internals/is-symbol.js");e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},"./node_modules/core-js/internals/to-string-tag-support.js":(e,t,s)=>{"use strict";var r={};r[s("./node_modules/core-js/internals/well-known-symbol.js")("toStringTag")]="z",e.exports="[object z]"===String(r)},"./node_modules/core-js/internals/to-string.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/classof.js"),o=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},"./node_modules/core-js/internals/try-to-string.js":e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},"./node_modules/core-js/internals/uid.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/function-uncurry-this.js"),o=0,n=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+n,36)}},"./node_modules/core-js/internals/use-symbol-as-uid.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/symbol-constructor-detection.js");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"./node_modules/core-js/internals/v8-prototype-define-bug.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/fails.js");e.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},"./node_modules/core-js/internals/validate-arguments-length.js":e=>{"use strict";var t=TypeError;e.exports=function(e,s){if(e<s)throw new t("Not enough arguments");return e}},"./node_modules/core-js/internals/weak-map-basic-detection.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/is-callable.js"),n=r.WeakMap;e.exports=o(n)&&/native code/.test(String(n))},"./node_modules/core-js/internals/well-known-symbol.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/global-this.js"),o=s("./node_modules/core-js/internals/shared.js"),n=s("./node_modules/core-js/internals/has-own-property.js"),a=s("./node_modules/core-js/internals/uid.js"),i=s("./node_modules/core-js/internals/symbol-constructor-detection.js"),c=s("./node_modules/core-js/internals/use-symbol-as-uid.js"),l=r.Symbol,u=o("wks"),d=c?l.for||l:l&&l.withoutSetter||a;e.exports=function(e){return n(u,e)||(u[e]=i&&n(l,e)?l[e]:d("Symbol."+e)),u[e]}},"./node_modules/core-js/modules/es.array.at.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/to-object.js"),n=s("./node_modules/core-js/internals/length-of-array-like.js"),a=s("./node_modules/core-js/internals/to-integer-or-infinity.js"),i=s("./node_modules/core-js/internals/add-to-unscopables.js");r({target:"Array",proto:!0},{at:function(e){var t=o(this),s=n(t),r=a(e),i=r>=0?r:s+r;return i<0||i>=s?void 0:t[i]}}),i("at")},"./node_modules/core-js/modules/es.array.push.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/to-object.js"),n=s("./node_modules/core-js/internals/length-of-array-like.js"),a=s("./node_modules/core-js/internals/array-set-length.js"),i=s("./node_modules/core-js/internals/does-not-exceed-safe-integer.js");r({target:"Array",proto:!0,arity:1,forced:s("./node_modules/core-js/internals/fails.js")(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=o(this),s=n(t),r=arguments.length;i(s+r);for(var c=0;c<r;c++)t[s]=arguments[c],s++;return a(t,s),s}})},"./node_modules/core-js/modules/es.iterator.constructor.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/global-this.js"),n=s("./node_modules/core-js/internals/an-instance.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/is-callable.js"),c=s("./node_modules/core-js/internals/object-get-prototype-of.js"),l=s("./node_modules/core-js/internals/define-built-in-accessor.js"),u=s("./node_modules/core-js/internals/create-property.js"),d=s("./node_modules/core-js/internals/fails.js"),p=s("./node_modules/core-js/internals/has-own-property.js"),m=s("./node_modules/core-js/internals/well-known-symbol.js"),f=s("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,h=s("./node_modules/core-js/internals/descriptors.js"),v=s("./node_modules/core-js/internals/is-pure.js"),y="constructor",j="Iterator",g=m("toStringTag"),b=TypeError,x=o[j],_=v||!i(x)||x.prototype!==f||!d(function(){x({})}),w=function(){if(n(this,f),c(this)===f)throw new b("Abstract class Iterator not directly constructable")},S=function(e,t){h?l(f,e,{configurable:!0,get:function(){return t},set:function(t){if(a(this),this===f)throw new b("You can't redefine this property");p(this,e)?this[e]=t:u(this,e,t)}}):f[e]=t};p(f,g)||S(g,j),!_&&p(f,y)&&f[y]!==Object||S(y,w),w.prototype=f,r({global:!0,constructor:!0,forced:_},{Iterator:w})},"./node_modules/core-js/modules/es.iterator.every.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/iterate.js"),a=s("./node_modules/core-js/internals/a-callable.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=s("./node_modules/core-js/internals/get-iterator-direct.js"),l=s("./node_modules/core-js/internals/iterator-close.js"),u=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js")("every",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{every:function(e){i(this);try{a(e)}catch(e){l(this,"throw",e)}if(u)return o(u,this,e);var t=c(this),s=0;return!n(t,function(t,r){if(!e(t,s++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},"./node_modules/core-js/modules/es.iterator.filter.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/a-callable.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/get-iterator-direct.js"),c=s("./node_modules/core-js/internals/iterator-create-proxy.js"),l=s("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),u=s("./node_modules/core-js/internals/is-pure.js"),d=s("./node_modules/core-js/internals/iterator-close.js"),p=s("./node_modules/core-js/internals/iterator-helper-throws-on-invalid-iterator.js"),m=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js"),f=!u&&!p("filter",function(){}),h=!u&&!f&&m("filter",TypeError),v=u||f||h,y=c(function(){for(var e,t,s=this.iterator,r=this.predicate,n=this.next;;){if(e=a(o(n,s)),this.done=!!e.done)return;if(t=e.value,l(s,r,[t,this.counter++],!0))return t}});r({target:"Iterator",proto:!0,real:!0,forced:v},{filter:function(e){a(this);try{n(e)}catch(e){d(this,"throw",e)}return h?o(h,this,e):new y(i(this),{predicate:e})}})},"./node_modules/core-js/modules/es.iterator.find.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/iterate.js"),a=s("./node_modules/core-js/internals/a-callable.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=s("./node_modules/core-js/internals/get-iterator-direct.js"),l=s("./node_modules/core-js/internals/iterator-close.js"),u=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js")("find",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{find:function(e){i(this);try{a(e)}catch(e){l(this,"throw",e)}if(u)return o(u,this,e);var t=c(this),s=0;return n(t,function(t,r){if(e(t,s++))return r(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},"./node_modules/core-js/modules/es.iterator.for-each.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/iterate.js"),a=s("./node_modules/core-js/internals/a-callable.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=s("./node_modules/core-js/internals/get-iterator-direct.js"),l=s("./node_modules/core-js/internals/iterator-close.js"),u=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js")("forEach",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{forEach:function(e){i(this);try{a(e)}catch(e){l(this,"throw",e)}if(u)return o(u,this,e);var t=c(this),s=0;n(t,function(t){e(t,s++)},{IS_RECORD:!0})}})},"./node_modules/core-js/modules/es.iterator.map.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/a-callable.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/get-iterator-direct.js"),c=s("./node_modules/core-js/internals/iterator-create-proxy.js"),l=s("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),u=s("./node_modules/core-js/internals/iterator-close.js"),d=s("./node_modules/core-js/internals/iterator-helper-throws-on-invalid-iterator.js"),p=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js"),m=s("./node_modules/core-js/internals/is-pure.js"),f=!m&&!d("map",function(){}),h=!m&&!f&&p("map",TypeError),v=m||f||h,y=c(function(){var e=this.iterator,t=a(o(this.next,e));if(!(this.done=!!t.done))return l(e,this.mapper,[t.value,this.counter++],!0)});r({target:"Iterator",proto:!0,real:!0,forced:v},{map:function(e){a(this);try{n(e)}catch(e){u(this,"throw",e)}return h?o(h,this,e):new y(i(this),{mapper:e})}})},"./node_modules/core-js/modules/es.iterator.reduce.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/iterate.js"),n=s("./node_modules/core-js/internals/a-callable.js"),a=s("./node_modules/core-js/internals/an-object.js"),i=s("./node_modules/core-js/internals/get-iterator-direct.js"),c=s("./node_modules/core-js/internals/iterator-close.js"),l=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js"),u=s("./node_modules/core-js/internals/function-apply.js"),d=s("./node_modules/core-js/internals/fails.js"),p=TypeError,m=d(function(){[].keys().reduce(function(){},void 0)}),f=!m&&l("reduce",p);r({target:"Iterator",proto:!0,real:!0,forced:m||f},{reduce:function(e){a(this);try{n(e)}catch(e){c(this,"throw",e)}var t=arguments.length<2,s=t?void 0:arguments[1];if(f)return u(f,this,t?[e]:[e,s]);var r=i(this),l=0;if(o(r,function(r){t?(t=!1,s=r):s=e(s,r,l),l++},{IS_RECORD:!0}),t)throw new p("Reduce of empty iterator with no initial value");return s}})},"./node_modules/core-js/modules/es.iterator.some.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/function-call.js"),n=s("./node_modules/core-js/internals/iterate.js"),a=s("./node_modules/core-js/internals/a-callable.js"),i=s("./node_modules/core-js/internals/an-object.js"),c=s("./node_modules/core-js/internals/get-iterator-direct.js"),l=s("./node_modules/core-js/internals/iterator-close.js"),u=s("./node_modules/core-js/internals/iterator-helper-without-closing-on-early-error.js")("some",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:u},{some:function(e){i(this);try{a(e)}catch(e){l(this,"throw",e)}if(u)return o(u,this,e);var t=c(this),s=0;return n(t,function(t,r){if(e(t,s++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},"./node_modules/core-js/modules/es.set.difference.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-difference.js"),n=s("./node_modules/core-js/internals/fails.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("difference",function(e){return 0===e.size})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var s=e++>1;return t.has(1)&&t.clear(),{done:s,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size})},{difference:o})},"./node_modules/core-js/modules/es.set.intersection.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/fails.js"),n=s("./node_modules/core-js/internals/set-intersection.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:n})},"./node_modules/core-js/modules/es.set.is-disjoint-from.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-is-disjoint-from.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("isDisjointFrom",function(e){return!e})},{isDisjointFrom:o})},"./node_modules/core-js/modules/es.set.is-subset-of.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-is-subset-of.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("isSubsetOf",function(e){return e})},{isSubsetOf:o})},"./node_modules/core-js/modules/es.set.is-superset-of.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-is-superset-of.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("isSupersetOf",function(e){return!e})},{isSupersetOf:o})},"./node_modules/core-js/modules/es.set.symmetric-difference.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-symmetric-difference.js"),n=s("./node_modules/core-js/internals/set-method-get-keys-before-cloning-detection.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("symmetricDifference")||!n("symmetricDifference")},{symmetricDifference:o})},"./node_modules/core-js/modules/es.set.union.v2.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/export.js"),o=s("./node_modules/core-js/internals/set-union.js"),n=s("./node_modules/core-js/internals/set-method-get-keys-before-cloning-detection.js");r({target:"Set",proto:!0,real:!0,forced:!s("./node_modules/core-js/internals/set-method-accept-set-like.js")("union")||!n("union")},{union:o})},"./node_modules/core-js/modules/esnext.iterator.constructor.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.constructor.js")},"./node_modules/core-js/modules/esnext.iterator.every.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.every.js")},"./node_modules/core-js/modules/esnext.iterator.filter.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.filter.js")},"./node_modules/core-js/modules/esnext.iterator.find.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.find.js")},"./node_modules/core-js/modules/esnext.iterator.for-each.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.for-each.js")},"./node_modules/core-js/modules/esnext.iterator.map.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.map.js")},"./node_modules/core-js/modules/esnext.iterator.reduce.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.reduce.js")},"./node_modules/core-js/modules/esnext.iterator.some.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.iterator.some.js")},"./node_modules/core-js/modules/esnext.set.difference.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.difference.v2.js")},"./node_modules/core-js/modules/esnext.set.intersection.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.intersection.v2.js")},"./node_modules/core-js/modules/esnext.set.is-disjoint-from.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.is-disjoint-from.v2.js")},"./node_modules/core-js/modules/esnext.set.is-subset-of.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.is-subset-of.v2.js")},"./node_modules/core-js/modules/esnext.set.is-superset-of.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.is-superset-of.v2.js")},"./node_modules/core-js/modules/esnext.set.symmetric-difference.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.symmetric-difference.v2.js")},"./node_modules/core-js/modules/esnext.set.union.v2.js":(e,t,s)=>{"use strict";s("./node_modules/core-js/modules/es.set.union.v2.js")},"./node_modules/core-js/modules/web.url-search-params.delete.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/define-built-in.js"),o=s("./node_modules/core-js/internals/function-uncurry-this.js"),n=s("./node_modules/core-js/internals/to-string.js"),a=s("./node_modules/core-js/internals/validate-arguments-length.js"),i=URLSearchParams,c=i.prototype,l=o(c.append),u=o(c.delete),d=o(c.forEach),p=o([].push),m=new i("a=1&a=2&b=3");m.delete("a",1),m.delete("b",void 0),m+""!="a=2"&&r(c,"delete",function(e){var t=arguments.length,s=t<2?void 0:arguments[1];if(t&&void 0===s)return u(this,e);var r=[];d(this,function(e,t){p(r,{key:t,value:e})}),a(t,1);for(var o,i=n(e),c=n(s),m=0,f=0,h=!1,v=r.length;m<v;)o=r[m++],h||o.key===i?(h=!0,u(this,o.key)):f++;for(;f<v;)(o=r[f++]).key===i&&o.value===c||l(this,o.key,o.value)},{enumerable:!0,unsafe:!0})},"./node_modules/core-js/modules/web.url-search-params.has.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/define-built-in.js"),o=s("./node_modules/core-js/internals/function-uncurry-this.js"),n=s("./node_modules/core-js/internals/to-string.js"),a=s("./node_modules/core-js/internals/validate-arguments-length.js"),i=URLSearchParams,c=i.prototype,l=o(c.getAll),u=o(c.has),d=new i("a=1");!d.has("a",2)&&d.has("a",void 0)||r(c,"has",function(e){var t=arguments.length,s=t<2?void 0:arguments[1];if(t&&void 0===s)return u(this,e);var r=l(this,e);a(t,1);for(var o=n(s),i=0;i<r.length;)if(r[i++]===o)return!0;return!1},{enumerable:!0,unsafe:!0})},"./node_modules/core-js/modules/web.url-search-params.size.js":(e,t,s)=>{"use strict";var r=s("./node_modules/core-js/internals/descriptors.js"),o=s("./node_modules/core-js/internals/function-uncurry-this.js"),n=s("./node_modules/core-js/internals/define-built-in-accessor.js"),a=URLSearchParams.prototype,i=o(a.forEach);r&&!("size"in a)&&n(a,"size",{get:function(){var e=0;return i(this,function(){e++}),e},configurable:!0,enumerable:!0})},"./node_modules/focus-trap/dist/focus-trap.esm.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createFocusTrap:()=>h});var r=s("./node_modules/tabbable/dist/index.esm.js");function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,r=Array(t);s<t;s++)r[s]=e[s];return r}function n(e,t,s){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var r=s.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function a(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,r)}return s}function i(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?a(Object(s),!0).forEach(function(t){n(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):a(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}var c=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},l=function(e){return c(e)&&!e.shiftKey},u=function(e){return c(e)&&e.shiftKey},d=function(e){return setTimeout(e,0)},p=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),r=1;r<t;r++)s[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,s):e},m=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},f=[],h=function(e,t){var s,n=(null==t?void 0:t.document)||document,a=(null==t?void 0:t.trapStack)||f,h=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:l,isKeyBackward:u},t),v={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},y=function(e,t,s){return e&&void 0!==e[t]?e[t]:h[s||t]},j=function(e,t){var s="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return v.containerGroups.findIndex(function(t){var r=t.container,o=t.tabbableNodes;return r.contains(e)||(null==s?void 0:s.includes(r))||o.find(function(t){return t===e})})},g=function(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=s.hasFallback,a=void 0!==r&&r,i=s.params,c=void 0===i?[]:i,l=h[e];if("function"==typeof l&&(l=l.apply(void 0,function(e){if(Array.isArray(e))return o(e)}(t=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?o(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),!0===l&&(l=void 0),!l){if(void 0===l||!1===l)return l;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var u=l;if("string"==typeof l){try{u=n.querySelector(l)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!u&&!a)throw new Error("`".concat(e,"` as selector refers to no known node"))}return u},b=function(){var e=g("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!(0,r.isFocusable)(e,h.tabbableOptions))if(j(n.activeElement)>=0)e=n.activeElement;else{var t=v.tabbableGroups[0];e=t&&t.firstTabbableNode||g("fallbackFocus")}else null===e&&(e=g("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},x=function(){if(v.containerGroups=v.containers.map(function(e){var t=(0,r.tabbable)(e,h.tabbableOptions),s=(0,r.focusable)(e,h.tabbableOptions),o=t.length>0?t[0]:void 0,n=t.length>0?t[t.length-1]:void 0,a=s.find(function(e){return(0,r.isTabbable)(e)}),i=s.slice().reverse().find(function(e){return(0,r.isTabbable)(e)}),c=!!t.find(function(e){return(0,r.getTabIndex)(e)>0});return{container:e,tabbableNodes:t,focusableNodes:s,posTabIndexesFound:c,firstTabbableNode:o,lastTabbableNode:n,firstDomTabbableNode:a,lastDomTabbableNode:i,nextTabbableNode:function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.indexOf(e);return n<0?o?s.slice(s.indexOf(e)+1).find(function(e){return(0,r.isTabbable)(e)}):s.slice(0,s.indexOf(e)).reverse().find(function(e){return(0,r.isTabbable)(e)}):t[n+(o?1:-1)]}}}),v.tabbableGroups=v.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),v.tabbableGroups.length<=0&&!g("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(v.containerGroups.find(function(e){return e.posTabIndexesFound})&&v.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},_=function(e){var t=e.activeElement;if(t)return t.shadowRoot&&null!==t.shadowRoot.activeElement?_(t.shadowRoot):t},w=function(e){!1!==e&&e!==_(document)&&(e&&e.focus?(e.focus({preventScroll:!!h.preventScroll}),v.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(b()))},S=function(e){var t=g("setReturnFocus",{params:[e]});return t||!1!==t&&e},k=function(e){var t=e.target,s=e.event,o=e.isBackward,n=void 0!==o&&o;t=t||m(s),x();var a=null;if(v.tabbableGroups.length>0){var i=j(t,s),l=i>=0?v.containerGroups[i]:void 0;if(i<0)a=n?v.tabbableGroups[v.tabbableGroups.length-1].lastTabbableNode:v.tabbableGroups[0].firstTabbableNode;else if(n){var u=v.tabbableGroups.findIndex(function(e){var s=e.firstTabbableNode;return t===s});if(u<0&&(l.container===t||(0,r.isFocusable)(t,h.tabbableOptions)&&!(0,r.isTabbable)(t,h.tabbableOptions)&&!l.nextTabbableNode(t,!1))&&(u=i),u>=0){var d=0===u?v.tabbableGroups.length-1:u-1,p=v.tabbableGroups[d];a=(0,r.getTabIndex)(t)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else c(s)||(a=l.nextTabbableNode(t,!1))}else{var f=v.tabbableGroups.findIndex(function(e){var s=e.lastTabbableNode;return t===s});if(f<0&&(l.container===t||(0,r.isFocusable)(t,h.tabbableOptions)&&!(0,r.isTabbable)(t,h.tabbableOptions)&&!l.nextTabbableNode(t))&&(f=i),f>=0){var y=f===v.tabbableGroups.length-1?0:f+1,b=v.tabbableGroups[y];a=(0,r.getTabIndex)(t)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else c(s)||(a=l.nextTabbableNode(t))}}else a=g("fallbackFocus");return a},C=function(e){var t=m(e);j(t,e)>=0||(p(h.clickOutsideDeactivates,e)?s.deactivate({returnFocus:h.returnFocusOnDeactivate}):p(h.allowOutsideClick,e)||e.preventDefault())},E=function(e){var t=m(e),s=j(t,e)>=0;if(s||t instanceof Document)s&&(v.mostRecentlyFocusedNode=t);else{var o;e.stopImmediatePropagation();var n=!0;if(v.mostRecentlyFocusedNode)if((0,r.getTabIndex)(v.mostRecentlyFocusedNode)>0){var a=j(v.mostRecentlyFocusedNode),i=v.containerGroups[a].tabbableNodes;if(i.length>0){var c=i.findIndex(function(e){return e===v.mostRecentlyFocusedNode});c>=0&&(h.isKeyForward(v.recentNavEvent)?c+1<i.length&&(o=i[c+1],n=!1):c-1>=0&&(o=i[c-1],n=!1))}}else v.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return(0,r.getTabIndex)(e)>0})})||(n=!1);else n=!1;n&&(o=k({target:v.mostRecentlyFocusedNode,isBackward:h.isKeyBackward(v.recentNavEvent)})),w(o||v.mostRecentlyFocusedNode||b())}v.recentNavEvent=void 0},T=function(e){(h.isKeyForward(e)||h.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];v.recentNavEvent=e;var s=k({event:e,isBackward:t});s&&(c(e)&&e.preventDefault(),w(s))}(e,h.isKeyBackward(e))},N=function(e){var t;"Escape"!==(null==(t=e)?void 0:t.key)&&"Esc"!==(null==t?void 0:t.key)&&27!==(null==t?void 0:t.keyCode)||!1===p(h.escapeDeactivates,e)||(e.preventDefault(),s.deactivate())},I=function(e){var t=m(e);j(t,e)>=0||p(h.clickOutsideDeactivates,e)||p(h.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},O=function(){if(v.active)return function(e,t){if(e.length>0){var s=e[e.length-1];s!==t&&s._setPausedState(!0)}var r=e.indexOf(t);-1===r||e.splice(r,1),e.push(t)}(a,s),v.delayInitialFocusTimer=h.delayInitialFocus?d(function(){w(b())}):w(b()),n.addEventListener("focusin",E,!0),n.addEventListener("mousedown",C,{capture:!0,passive:!1}),n.addEventListener("touchstart",C,{capture:!0,passive:!1}),n.addEventListener("click",I,{capture:!0,passive:!1}),n.addEventListener("keydown",T,{capture:!0,passive:!1}),n.addEventListener("keydown",N),s},A=function(){if(v.active)return n.removeEventListener("focusin",E,!0),n.removeEventListener("mousedown",C,!0),n.removeEventListener("touchstart",C,!0),n.removeEventListener("click",I,!0),n.removeEventListener("keydown",T,!0),n.removeEventListener("keydown",N),s},P="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver(function(e){e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===v.mostRecentlyFocusedNode})})&&w(b())}):void 0,L=function(){P&&(P.disconnect(),v.active&&!v.paused&&v.containers.map(function(e){P.observe(e,{subtree:!0,childList:!0})}))};return s={get active(){return v.active},get paused(){return v.paused},activate:function(e){if(v.active)return this;var t=y(e,"onActivate"),s=y(e,"onPostActivate"),r=y(e,"checkCanFocusTrap");r||x(),v.active=!0,v.paused=!1,v.nodeFocusedBeforeActivation=_(n),null==t||t();var o=function(){r&&x(),O(),L(),null==s||s()};return r?(r(v.containers.concat()).then(o,o),this):(o(),this)},deactivate:function(e){if(!v.active)return this;var t=i({onDeactivate:h.onDeactivate,onPostDeactivate:h.onPostDeactivate,checkCanReturnFocus:h.checkCanReturnFocus},e);clearTimeout(v.delayInitialFocusTimer),v.delayInitialFocusTimer=void 0,A(),v.active=!1,v.paused=!1,L(),function(e,t){var s=e.indexOf(t);-1!==s&&e.splice(s,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}(a,s);var r=y(t,"onDeactivate"),o=y(t,"onPostDeactivate"),n=y(t,"checkCanReturnFocus"),c=y(t,"returnFocus","returnFocusOnDeactivate");null==r||r();var l=function(){d(function(){c&&w(S(v.nodeFocusedBeforeActivation)),null==o||o()})};return c&&n?(n(S(v.nodeFocusedBeforeActivation)).then(l,l),this):(l(),this)},pause:function(e){return v.active?(v.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return v.active?(v.manuallyPaused=!1,a[a.length-1]!==this?this:this._setPausedState(!1,e)):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return v.containers=t.map(function(e){return"string"==typeof e?n.querySelector(e):e}),v.active&&x(),L(),this}},Object.defineProperties(s,{_isManuallyPaused:{value:function(){return v.manuallyPaused}},_setPausedState:{value:function(e,t){if(v.paused===e)return this;if(v.paused=e,e){var s=y(t,"onPause"),r=y(t,"onPostPause");null==s||s(),A(),L(),null==r||r()}else{var o=y(t,"onUnpause"),n=y(t,"onPostUnpause");null==o||o(),x(),O(),L(),null==n||n()}return this}}}),s.updateContainerElements(e),s}},"./node_modules/immer/dist/immer.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Immer:()=>W,applyPatches:()=>re,castDraft:()=>ae,castImmutable:()=>ie,createDraft:()=>oe,current:()=>K,enableMapSet:()=>X,enablePatches:()=>Y,finishDraft:()=>ne,freeze:()=>w,immerable:()=>o,isDraft:()=>l,isDraftable:()=>u,nothing:()=>r,original:()=>m,produce:()=>Z,produceWithPatches:()=>ee,setAutoFreeze:()=>te,setUseStrictShallowCopy:()=>se});var r=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),n=Symbol.for("immer-state"),a=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}];function i(e,...t){{const s=a[e],r="function"==typeof s?s.apply(null,t):s;throw new Error(`[Immer] ${r}`)}}var c=Object.getPrototypeOf;function l(e){return!!e&&!!e[n]}function u(e){return!!e&&(p(e)||Array.isArray(e)||!!e[o]||!!e.constructor?.[o]||g(e)||b(e))}var d=Object.prototype.constructor.toString();function p(e){if(!e||"object"!=typeof e)return!1;const t=c(e);if(null===t)return!0;const s=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return s===Object||"function"==typeof s&&Function.toString.call(s)===d}function m(e){return l(e)||i(15,e),e[n].base_}function f(e,t){0===h(e)?Reflect.ownKeys(e).forEach(s=>{t(s,e[s],e)}):e.forEach((s,r)=>t(r,s,e))}function h(e){const t=e[n];return t?t.type_:Array.isArray(e)?1:g(e)?2:b(e)?3:0}function v(e,t){return 2===h(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function y(e,t){return 2===h(e)?e.get(t):e[t]}function j(e,t,s){const r=h(e);2===r?e.set(t,s):3===r?e.add(s):e[t]=s}function g(e){return e instanceof Map}function b(e){return e instanceof Set}function x(e){return e.copy_||e.base_}function _(e,t){if(g(e))return new Map(e);if(b(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=p(e);if(!0===t||"class_only"===t&&!s){const t=Object.getOwnPropertyDescriptors(e);delete t[n];let s=Reflect.ownKeys(t);for(let r=0;r<s.length;r++){const o=s[r],n=t[o];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(t[o]={configurable:!0,writable:!0,enumerable:n.enumerable,value:e[o]})}return Object.create(c(e),t)}{const t=c(e);if(null!==t&&s)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function w(e,t=!1){return k(e)||l(e)||!u(e)||(h(e)>1&&Object.defineProperties(e,{set:{value:S},add:{value:S},clear:{value:S},delete:{value:S}}),Object.freeze(e),t&&Object.values(e).forEach(e=>w(e,!0))),e}function S(){i(2)}function k(e){return Object.isFrozen(e)}var C,E={};function T(e){const t=E[e];return t||i(0,e),t}function N(e,t){E[e]||(E[e]=t)}function I(){return C}function O(e,t){t&&(T("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function A(e){P(e),e.drafts_.forEach(R),e.drafts_=null}function P(e){e===C&&(C=e.parent_)}function L(e){return C={drafts_:[],parent_:C,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function R(e){const t=e[n];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function M(e,t){t.unfinalizedDrafts_=t.drafts_.length;const s=t.drafts_[0];return void 0!==e&&e!==s?(s[n].modified_&&(A(t),i(4)),u(e)&&(e=D(t,e),t.parent_||U(t,e)),t.patches_&&T("Patches").generateReplacementPatches_(s[n].base_,e,t.patches_,t.inversePatches_)):e=D(t,s,[]),A(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r?e:void 0}function D(e,t,s){if(k(t))return t;const r=t[n];if(!r)return f(t,(o,n)=>F(e,r,t,o,n,s)),t;if(r.scope_!==e)return t;if(!r.modified_)return U(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,n=!1;3===r.type_&&(o=new Set(t),t.clear(),n=!0),f(o,(o,a)=>F(e,r,t,o,a,s,n)),U(e,t,!1),s&&e.patches_&&T("Patches").generatePatches_(r,s,e.patches_,e.inversePatches_)}return r.copy_}function F(e,t,s,r,o,n,a){if(o===s&&i(5),l(o)){const a=D(e,o,n&&t&&3!==t.type_&&!v(t.assigned_,r)?n.concat(r):void 0);if(j(s,r,a),!l(a))return;e.canAutoFreeze_=!1}else a&&s.add(o);if(u(o)&&!k(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;D(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!(g(s)?s.has(r):Object.prototype.propertyIsEnumerable.call(s,r))||U(e,o)}}function U(e,t,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&w(t,s)}var z={get(e,t){if(t===n)return e;const s=x(e);if(!v(s,t))return function(e,t,s){const r=$(t,s);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,s,t);const r=s[t];return e.finalized_||!u(r)?r:r===V(e.base_,t)?(G(e),e.copy_[t]=q(r,e)):r},has:(e,t)=>t in x(e),ownKeys:e=>Reflect.ownKeys(x(e)),set(e,t,s){const r=$(x(e),t);if(r?.set)return r.set.call(e.draft_,s),!0;if(!e.modified_){const r=V(x(e),t),i=r?.[n];if(i&&i.base_===s)return e.copy_[t]=s,e.assigned_[t]=!1,!0;if(((o=s)===(a=r)?0!==o||1/o==1/a:o!=o&&a!=a)&&(void 0!==s||v(e.base_,t)))return!0;G(e),H(e)}var o,a;return e.copy_[t]===s&&(void 0!==s||t in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=s,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==V(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,G(e),H(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const s=x(e),r=Reflect.getOwnPropertyDescriptor(s,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:s[t]}:r},defineProperty(){i(11)},getPrototypeOf:e=>c(e.base_),setPrototypeOf(){i(12)}},B={};function V(e,t){const s=e[n];return(s?x(s):e)[t]}function $(e,t){if(!(t in e))return;let s=c(e);for(;s;){const e=Object.getOwnPropertyDescriptor(s,t);if(e)return e;s=c(s)}}function H(e){e.modified_||(e.modified_=!0,e.parent_&&H(e.parent_))}function G(e){e.copy_||(e.copy_=_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}f(z,(e,t)=>{B[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),B.deleteProperty=function(e,t){return isNaN(parseInt(t))&&i(13),B.set.call(this,e,t,void 0)},B.set=function(e,t,s){return"length"!==t&&isNaN(parseInt(t))&&i(14),z.set.call(this,e[0],t,s,e[0])};var W=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,s)=>{if("function"==typeof e&&"function"!=typeof t){const s=t;t=e;const r=this;return function(e=s,...o){return r.produce(e,e=>t.call(this,e,...o))}}let o;if("function"!=typeof t&&i(6),void 0!==s&&"function"!=typeof s&&i(7),u(e)){const r=L(this),n=q(e,void 0);let a=!0;try{o=t(n),a=!1}finally{a?A(r):P(r)}return O(r,s),M(o,r)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===r&&(o=void 0),this.autoFreeze_&&w(o,!0),s){const t=[],r=[];T("Patches").generateReplacementPatches_(e,o,t,r),s(t,r)}return o}i(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...s)=>this.produceWithPatches(t,t=>e(t,...s));let s,r;return[this.produce(e,t,(e,t)=>{s=e,r=t}),s,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){u(e)||i(8),l(e)&&(e=K(e));const t=L(this),s=q(e,void 0);return s[n].isManual_=!0,P(t),s}finishDraft(e,t){const s=e&&e[n];s&&s.isManual_||i(9);const{scope_:r}=s;return O(r,t),M(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let s;for(s=t.length-1;s>=0;s--){const r=t[s];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}s>-1&&(t=t.slice(s+1));const r=T("Patches").applyPatches_;return l(e)?r(e,t):this.produce(e,e=>r(e,t))}};function q(e,t){const s=g(e)?T("MapSet").proxyMap_(e,t):b(e)?T("MapSet").proxySet_(e,t):function(e,t){const s=Array.isArray(e),r={type_:s?1:0,scope_:t?t.scope_:I(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,n=z;s&&(o=[r],n=B);const{revoke:a,proxy:i}=Proxy.revocable(o,n);return r.draft_=i,r.revoke_=a,i}(e,t);return(t?t.scope_:I()).drafts_.push(s),s}function K(e){return l(e)||i(10,e),J(e)}function J(e){if(!u(e)||k(e))return e;const t=e[n];let s;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,s=_(e,t.scope_.immer_.useStrictShallowCopy_)}else s=_(e,!0);return f(s,(e,t)=>{j(s,e,J(t))}),t&&(t.finalized_=!1),s}function Y(){a.push('Sets cannot have "replace" patches.',function(e){return"Unsupported patch operation: "+e},function(e){return"Cannot apply patch, path doesn't resolve: "+e},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");const e="replace",t="add",s="remove";function n(e){if(!u(e))return e;if(Array.isArray(e))return e.map(n);if(g(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,n(t)]));if(b(e))return new Set(Array.from(e).map(n));const t=Object.create(c(e));for(const s in e)t[s]=n(e[s]);return v(e,o)&&(t[o]=e[o]),t}function d(e){return l(e)?n(e):e}N("Patches",{applyPatches_:function(r,o){return o.forEach(o=>{const{path:a,op:c}=o;let l=r;for(let e=0;e<a.length-1;e++){const t=h(l);let s=a[e];"string"!=typeof s&&"number"!=typeof s&&(s=""+s),0!==t&&1!==t||"__proto__"!==s&&"constructor"!==s||i(19),"function"==typeof l&&"prototype"===s&&i(19),l=y(l,s),"object"!=typeof l&&i(18,a.join("/"))}const u=h(l),d=n(o.value),p=a[a.length-1];switch(c){case e:switch(u){case 2:return l.set(p,d);case 3:i(16);default:return l[p]=d}case t:switch(u){case 1:return"-"===p?l.push(d):l.splice(p,0,d);case 2:return l.set(p,d);case 3:return l.add(d);default:return l[p]=d}case s:switch(u){case 1:return l.splice(p,1);case 2:return l.delete(p);case 3:return l.delete(o.value);default:return delete l[p]}default:i(17,c)}}),r},generatePatches_:function(r,o,n,a){switch(r.type_){case 0:case 2:return function(r,o,n,a){const{base_:i,copy_:c}=r;f(r.assigned_,(r,l)=>{const u=y(i,r),p=y(c,r),m=l?v(i,r)?e:t:s;if(u===p&&m===e)return;const f=o.concat(r);n.push(m===s?{op:m,path:f}:{op:m,path:f,value:p}),a.push(m===t?{op:s,path:f}:m===s?{op:t,path:f,value:d(u)}:{op:e,path:f,value:d(u)})})}(r,o,n,a);case 1:return function(r,o,n,a){let{base_:i,assigned_:c}=r,l=r.copy_;l.length<i.length&&([i,l]=[l,i],[n,a]=[a,n]);for(let t=0;t<i.length;t++)if(c[t]&&l[t]!==i[t]){const s=o.concat([t]);n.push({op:e,path:s,value:d(l[t])}),a.push({op:e,path:s,value:d(i[t])})}for(let e=i.length;e<l.length;e++){const s=o.concat([e]);n.push({op:t,path:s,value:d(l[e])})}for(let e=l.length-1;i.length<=e;--e){const t=o.concat([e]);a.push({op:s,path:t})}}(r,o,n,a);case 3:return function(e,r,o,n){let{base_:a,copy_:i}=e,c=0;a.forEach(e=>{if(!i.has(e)){const a=r.concat([c]);o.push({op:s,path:a,value:e}),n.unshift({op:t,path:a,value:e})}c++}),c=0,i.forEach(e=>{if(!a.has(e)){const a=r.concat([c]);o.push({op:t,path:a,value:e}),n.unshift({op:s,path:a,value:e})}c++})}(r,o,n,a)}},generateReplacementPatches_:function(t,s,o,n){o.push({op:e,path:[],value:s===r?void 0:s}),n.push({op:e,path:[],value:t})}})}function X(){class e extends Map{constructor(e,t){super(),this[n]={type_:2,parent_:t,scope_:t?t.scope_:I(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:e,draft_:this,isManual_:!1,revoked_:!1}}get size(){return x(this[n]).size}has(e){return x(this[n]).has(e)}set(e,s){const r=this[n];return o(r),x(r).has(e)&&x(r).get(e)===s||(t(r),H(r),r.assigned_.set(e,!0),r.copy_.set(e,s),r.assigned_.set(e,!0)),this}delete(e){if(!this.has(e))return!1;const s=this[n];return o(s),t(s),H(s),s.base_.has(e)?s.assigned_.set(e,!1):s.assigned_.delete(e),s.copy_.delete(e),!0}clear(){const e=this[n];o(e),x(e).size&&(t(e),H(e),e.assigned_=new Map,f(e.base_,t=>{e.assigned_.set(t,!1)}),e.copy_.clear())}forEach(e,t){x(this[n]).forEach((s,r,o)=>{e.call(t,this.get(r),r,this)})}get(e){const s=this[n];o(s);const r=x(s).get(e);if(s.finalized_||!u(r))return r;if(r!==s.base_.get(e))return r;const a=q(r,s);return t(s),s.copy_.set(e,a),a}keys(){return x(this[n]).keys()}values(){const e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){const e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const t=e.next();if(t.done)return t;const s=this.get(t.value);return{done:!1,value:[t.value,s]}}}}[Symbol.iterator](){return this.entries()}}function t(e){e.copy_||(e.assigned_=new Map,e.copy_=new Map(e.base_))}class s extends Set{constructor(e,t){super(),this[n]={type_:3,parent_:t,scope_:t?t.scope_:I(),modified_:!1,finalized_:!1,copy_:void 0,base_:e,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return x(this[n]).size}has(e){const t=this[n];return o(t),t.copy_?!!t.copy_.has(e)||!(!t.drafts_.has(e)||!t.copy_.has(t.drafts_.get(e))):t.base_.has(e)}add(e){const t=this[n];return o(t),this.has(e)||(r(t),H(t),t.copy_.add(e)),this}delete(e){if(!this.has(e))return!1;const t=this[n];return o(t),r(t),H(t),t.copy_.delete(e)||!!t.drafts_.has(e)&&t.copy_.delete(t.drafts_.get(e))}clear(){const e=this[n];o(e),x(e).size&&(r(e),H(e),e.copy_.clear())}values(){const e=this[n];return o(e),r(e),e.copy_.values()}entries(){const e=this[n];return o(e),r(e),e.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(e,t){const s=this.values();let r=s.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=s.next()}}function r(e){e.copy_||(e.copy_=new Set,e.base_.forEach(t=>{if(u(t)){const s=q(t,e);e.drafts_.set(t,s),e.copy_.add(s)}else e.copy_.add(t)}))}function o(e){e.revoked_&&i(3,JSON.stringify(x(e)))}N("MapSet",{proxyMap_:function(t,s){return new e(t,s)},proxySet_:function(e,t){return new s(e,t)}})}var Q=new W,Z=Q.produce,ee=Q.produceWithPatches.bind(Q),te=Q.setAutoFreeze.bind(Q),se=Q.setUseStrictShallowCopy.bind(Q),re=Q.applyPatches.bind(Q),oe=Q.createDraft.bind(Q),ne=Q.finishDraft.bind(Q);function ae(e){return e}function ie(e){return e}},"./node_modules/js-cookie/dist/js.cookie.mjs":(e,t,s)=>{"use strict";function r(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)e[r]=s[r]}return e}s.r(t),s.d(t,{default:()=>o});var o=function e(t,s){function o(e,o,n){if("undefined"!=typeof document){"number"==typeof(n=r({},s,n)).expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var i in n)n[i]&&(a+="; "+i,!0!==n[i]&&(a+="="+n[i].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+a}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var s=document.cookie?document.cookie.split("; "):[],r={},o=0;o<s.length;o++){var n=s[o].split("="),a=n.slice(1).join("=");try{var i=decodeURIComponent(n[0]);if(r[i]=t.read(a,i),e===i)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){o(e,"",r({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,r({},this.attributes,t))},withConverter:function(t){return e(r({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(s)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},"./node_modules/minivents/dist/minivents.commonjs.min.js":e=>{e.exports=function(e){var t={},s=[];(e=e||this).on=function(s,r,o){return(t[s]=t[s]||[]).push([r,o]),e},e.off=function(r,o){r||(t={});for(var n=t[r]||s,a=n.length=o?n.length:0;a--;)o==n[a][0]&&n.splice(a,1);return e},e.emit=function(r){for(var o,n=t[r]||s,a=n.length>0?n.slice(0,n.length):n,i=0;o=a[i++];)o[0].apply(o[1],s.slice.call(arguments,1));return e}}},"./node_modules/preact/compat/dist/compat.module.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Children:()=>b,Component:()=>r.Component,Fragment:()=>r.Fragment,PureComponent:()=>f,StrictMode:()=>ie,Suspense:()=>k,SuspenseList:()=>T,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Y,cloneElement:()=>se,createContext:()=>r.createContext,createElement:()=>r.createElement,createFactory:()=>Q,createPortal:()=>A,createRef:()=>r.createRef,default:()=>le,findDOMNode:()=>oe,flushSync:()=>ae,forwardRef:()=>j,hydrate:()=>z,isElement:()=>ce,isFragment:()=>ee,isMemo:()=>te,isValidElement:()=>Z,lazy:()=>E,memo:()=>h,render:()=>U,startTransition:()=>u,unmountComponentAtNode:()=>re,unstable_batchedUpdates:()=>ne,useDeferredValue:()=>d,useInsertionEffect:()=>m,useSyncExternalStore:()=>c,useTransition:()=>p,version:()=>X});var r=s("preact"),o=s("preact/hooks"),n={};for(const e in o)["default","Component","Fragment","createContext","createElement","createRef","Children","PureComponent","StrictMode","Suspense","SuspenseList","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","createFactory","createPortal","findDOMNode","flushSync","forwardRef","hydrate","isElement","isFragment","isMemo","isValidElement","lazy","memo","render","startTransition","unmountComponentAtNode","unstable_batchedUpdates","useDeferredValue","useInsertionEffect","useSyncExternalStore","useTransition","version"].indexOf(e)<0&&(n[e]=()=>o[e]);function a(e,t){for(var s in t)e[s]=t[s];return e}function i(e,t){for(var s in e)if("__source"!==s&&!(s in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function c(e,t){var s=t(),r=(0,o.useState)({t:{__:s,u:t}}),n=r[0].t,a=r[1];return(0,o.useLayoutEffect)(function(){n.__=s,n.u=t,l(n)&&a({t:n})},[e,s,t]),(0,o.useEffect)(function(){return l(n)&&a({t:n}),e(function(){l(n)&&a({t:n})})},[e]),s}function l(e){var t,s,r=e.u,o=e.__;try{var n=r();return!((t=o)===(s=n)&&(0!==t||1/t==1/s)||t!=t&&s!=s)}catch(e){return!0}}function u(e){e()}function d(e){return e}function p(){return[!1,u]}s.d(t,n);var m=o.useLayoutEffect;function f(e,t){this.props=e,this.context=t}function h(e,t){function s(e){var s=this.props.ref,r=s==e.ref;return!r&&s&&(s.call?s(null):s.current=null),t?!t(this.props,e)||!r:i(this.props,e)}function o(t){return this.shouldComponentUpdate=s,(0,r.createElement)(e,t)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o.type=e,o}(f.prototype=new r.Component).isPureReactComponent=!0,f.prototype.shouldComponentUpdate=function(e,t){return i(this.props,e)||i(this.state,t)};var v=r.options.__b;r.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),v&&v(e)};var y="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function j(e){function t(t){var s=a({},t);return delete s.ref,e(s,t.ref||null)}return t.$$typeof=y,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var g=function(e,t){return null==e?null:(0,r.toChildArray)((0,r.toChildArray)(e).map(t))},b={map:g,forEach:g,count:function(e){return e?(0,r.toChildArray)(e).length:0},only:function(e){var t=(0,r.toChildArray)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:r.toChildArray},x=r.options.__e;r.options.__e=function(e,t,s,r){if(e.then)for(var o,n=t;n=n.__;)if((o=n.__c)&&o.__c)return null==t.__e&&(t.__e=s.__e,t.__k=s.__k),o.__c(e,t);x(e,t,s,r)};var _=r.options.unmount;function w(e,t,s){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=a({},e)).__c&&(e.__c.__P===s&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return w(e,t,s)})),e}function S(e,t,s){return e&&s&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return S(e,t,s)}),e.__c&&e.__c.__P===t&&(e.__e&&s.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=s)),e}function k(){this.__u=0,this.o=null,this.__b=null}function C(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function E(e){var t,s,o;function n(n){if(t||(t=e()).then(function(e){s=e.default||e},function(e){o=e}),o)throw o;if(!s)throw t;return(0,r.createElement)(s,n)}return n.displayName="Lazy",n.__f=!0,n}function T(){this.i=null,this.l=null}r.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),_&&_(e)},(k.prototype=new r.Component).__c=function(e,t){var s=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(s);var o=C(r.__v),n=!1,a=function(){n||(n=!0,s.__R=null,o?o(i):i())};s.__R=a;var i=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=S(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},k.prototype.componentWillUnmount=function(){this.o=[]},k.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var s=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=w(this.__b,s,o.__O=o.__P)}this.__b=null}var n=t.__a&&(0,r.createElement)(r.Fragment,null,e.fallback);return n&&(n.__u&=-33),[(0,r.createElement)(r.Fragment,null,t.__a?null:e.children),n]};var N=function(e,t,s){if(++s[1]===s[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(s=e.i;s;){for(;s.length>3;)s.pop()();if(s[1]<s[0])break;e.i=s=s[2]}};function I(e){return this.getChildContext=function(){return e.context},e.children}function O(e){var t=this,s=e.h;if(t.componentWillUnmount=function(){(0,r.render)(null,t.v),t.v=null,t.h=null},t.h&&t.h!==s&&t.componentWillUnmount(),!t.v){for(var o=t.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;t.h=s,t.v={nodeType:1,parentNode:s,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},insertBefore:function(e,s){this.childNodes.push(e),t.h.insertBefore(e,s)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}(0,r.render)((0,r.createElement)(I,{context:t.context},e.__v),t.v)}function A(e,t){var s=(0,r.createElement)(O,{__v:e,h:t});return s.containerInfo=t,s}(T.prototype=new r.Component).__a=function(e){var t=this,s=C(t.__v),r=t.l.get(e);return r[0]++,function(o){var n=function(){t.props.revealOrder?(r.push(o),N(t,e,r)):o()};s?s(n):n()}},T.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,r.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var s=t.length;s--;)this.l.set(t[s],this.i=[1,0,this.i]);return e.children},T.prototype.componentDidUpdate=T.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,s){N(e,s,t)})};var P="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,L=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,R=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,M=/[A-Z0-9]/g,D="undefined"!=typeof document,F=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function U(e,t,s){return null==t.__k&&(t.textContent=""),(0,r.render)(e,t),"function"==typeof s&&s(),e?e.__c:null}function z(e,t,s){return(0,r.hydrate)(e,t),"function"==typeof s&&s(),e?e.__c:null}r.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(r.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var B=r.options.event;function V(){}function $(){return this.cancelBubble}function H(){return this.defaultPrevented}r.options.event=function(e){return B&&(e=B(e)),e.persist=V,e.isPropagationStopped=$,e.isDefaultPrevented=H,e.nativeEvent=e};var G,W={enumerable:!1,configurable:!0,get:function(){return this.class}},q=r.options.vnode;r.options.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,s=e.type,o={},n=-1===s.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||D&&"children"===a&&"noscript"===s||"class"===a||"className"===a)){var c=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===c&&"no"===i?i=!1:"o"===c[0]&&"n"===c[1]?"ondoubleclick"===c?a="ondblclick":"onchange"!==c||"input"!==s&&"textarea"!==s||F(t.type)?"onfocus"===c?a="onfocusin":"onblur"===c?a="onfocusout":R.test(a)&&(a=c):c=a="oninput":n&&L.test(a)?a=a.replace(M,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===c&&o[a=c]&&(a="oninputCapture"),o[a]=i}}"select"==s&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,r.toChildArray)(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==s&&null!=o.defaultValue&&(o.value=(0,r.toChildArray)(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",W)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=P,q&&q(e)};var K=r.options.__r;r.options.__r=function(e){K&&K(e),G=e.__c};var J=r.options.diffed;r.options.diffed=function(e){J&&J(e);var t=e.props,s=e.__e;null!=s&&"textarea"===e.type&&"value"in t&&t.value!==s.value&&(s.value=null==t.value?"":t.value),G=null};var Y={ReactCurrentDispatcher:{current:{readContext:function(e){return G.__n[e.__c].props.value},useCallback:o.useCallback,useContext:o.useContext,useDebugValue:o.useDebugValue,useDeferredValue:d,useEffect:o.useEffect,useId:o.useId,useImperativeHandle:o.useImperativeHandle,useInsertionEffect:m,useLayoutEffect:o.useLayoutEffect,useMemo:o.useMemo,useReducer:o.useReducer,useRef:o.useRef,useState:o.useState,useSyncExternalStore:c,useTransition:p}}},X="18.3.1";function Q(e){return r.createElement.bind(null,e)}function Z(e){return!!e&&e.$$typeof===P}function ee(e){return Z(e)&&e.type===r.Fragment}function te(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function se(e){return Z(e)?r.cloneElement.apply(null,arguments):e}function re(e){return!!e.__k&&((0,r.render)(null,e),!0)}function oe(e){return e&&(e.base||1===e.nodeType&&e)||null}var ne=function(e,t){return e(t)},ae=function(e,t){return e(t)},ie=r.Fragment,ce=Z,le={useState:o.useState,useId:o.useId,useReducer:o.useReducer,useEffect:o.useEffect,useLayoutEffect:o.useLayoutEffect,useInsertionEffect:m,useTransition:p,useDeferredValue:d,useSyncExternalStore:c,startTransition:u,useRef:o.useRef,useImperativeHandle:o.useImperativeHandle,useMemo:o.useMemo,useCallback:o.useCallback,useContext:o.useContext,useDebugValue:o.useDebugValue,version:"18.3.1",Children:b,render:U,hydrate:z,unmountComponentAtNode:re,createPortal:A,createElement:r.createElement,createContext:r.createContext,createFactory:Q,cloneElement:se,createRef:r.createRef,Fragment:r.Fragment,isValidElement:Z,isElement:ce,isFragment:ee,isMemo:te,findDOMNode:oe,Component:r.Component,PureComponent:f,memo:h,forwardRef:j,flushSync:ae,unstable_batchedUpdates:ne,StrictMode:ie,Suspense:k,SuspenseList:T,lazy:E,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Y}},"./node_modules/preact/compat/jsx-runtime.mjs":(e,t,s)=>{"use strict";s.r(t),s("preact/compat");var r=s("preact/jsx-runtime"),o={};for(const e in r)"default"!==e&&(o[e]=()=>r[e]);s.d(t,o)},"./node_modules/react-redux/dist/react-redux.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Provider:()=>le,ReactReduxContext:()=>re,batch:()=>ge,connect:()=>ce,createDispatchHook:()=>fe,createSelectorHook:()=>ye,createStoreHook:()=>pe,shallowEqual:()=>B,useDispatch:()=>he,useSelector:()=>je,useStore:()=>me});var r=s("./node_modules/preact/compat/dist/compat.module.js"),o=s("./node_modules/use-sync-external-store/with-selector.js"),n=r.version.startsWith("19"),a=Symbol.for(n?"react.transitional.element":"react.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),g=Symbol.for("react.client.reference"),b=m,x=v;function _(e){return"string"==typeof e||"function"==typeof e||e===c||e===u||e===l||e===f||e===h||e===j||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===p||e.$$typeof===d||e.$$typeof===m||e.$$typeof===g||void 0!==e.getModuleId)}function w(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case a:switch(e=e.type){case c:case u:case l:case f:case h:return e;default:switch(e=e&&e.$$typeof){case p:case m:case y:case v:case d:return e;default:return t}}case i:return t}}}function S(e){return n?w(e)===d:w(e)===p}function k(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function C(e,t){if(!e)throw new Error(`Unexpected value for ${t} in connect.`);"mapStateToProps"!==t&&"mapDispatchToProps"!==t||Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||k(`The selector for ${t} of connect did not specify a value for dependsOnOwnProps.`)}function E(e,t,s,r,{areStatesEqual:o,areOwnPropsEqual:n,areStatePropsEqual:a}){let i,c,l,u,d,p=!1;return function(m,f){return p?function(p,m){const f=!n(m,c),h=!o(p,i,m,c);return i=p,c=m,f&&h?(l=e(i,c),t.dependsOnOwnProps&&(u=t(r,c)),d=s(l,u,c),d):f?(e.dependsOnOwnProps&&(l=e(i,c)),t.dependsOnOwnProps&&(u=t(r,c)),d=s(l,u,c),d):h?function(){const t=e(i,c),r=!a(t,l);return l=t,r&&(d=s(l,u,c)),d}():d}(m,f):(i=m,c=f,l=e(i,c),u=t(r,c),d=s(l,u,c),p=!0,d)}}function T(e,t,s){(function(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;let s=t;for(;null!==Object.getPrototypeOf(s);)s=Object.getPrototypeOf(s);return t===s})(e)||k(`${s}() in ${t} must return a plain object. Instead received ${e}.`)}function N(e){return function(t){const s=e(t);function r(){return s}return r.dependsOnOwnProps=!1,r}}function I(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function O(e,t){return function(s,{displayName:r}){const o=function(e,t){return o.dependsOnOwnProps?o.mapToProps(e,t):o.mapToProps(e,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,n){o.mapToProps=e,o.dependsOnOwnProps=I(e);let a=o(s,n);return"function"==typeof a&&(o.mapToProps=a,o.dependsOnOwnProps=I(a),a=o(s,n)),T(a,r,t),a},o}}function A(e,t){return(s,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function P(e,t,s){return{...s,...e,...t}}function L(e){e()}var R={notify(){},get:()=>[]};function M(e,t){let s,r=R,o=0,n=!1;function a(){l.onStateChange&&l.onStateChange()}function i(){o++,s||(s=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){L(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){const t=[];let s=e;for(;s;)t.push(s),s=s.next;return t},subscribe(s){let r=!0;const o=t={callback:s,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function c(){o--,s&&0===o&&(s(),s=void 0,r.clear(),r=R)}const l={addNestedSub:function(e){i();const t=r.subscribe(e);let s=!1;return()=>{s||(s=!0,t(),c())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return n},trySubscribe:function(){n||(n=!0,i())},tryUnsubscribe:function(){n&&(n=!1,c())},getListeners:()=>r};return l}var D=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),F=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),U=(()=>D||F?r.useLayoutEffect:r.useEffect)();function z(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function B(e,t){if(z(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const s=Object.keys(e),r=Object.keys(t);if(s.length!==r.length)return!1;for(let r=0;r<s.length;r++)if(!Object.prototype.hasOwnProperty.call(t,s[r])||!z(e[s[r]],t[s[r]]))return!1;return!0}var V={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},H={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},G={[b]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[x]:H};function W(e){return w(e)===v?H:G[e.$$typeof]||V}var q=Object.defineProperty,K=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,X=Object.getPrototypeOf,Q=Object.prototype;function Z(e,t){if("string"!=typeof t){if(Q){const s=X(t);s&&s!==Q&&Z(e,s)}let s=K(t);J&&(s=s.concat(J(t)));const r=W(e),o=W(t);for(let n=0;n<s.length;++n){const a=s[n];if(!($[a]||o&&o[a]||r&&r[a])){const s=Y(t,a);try{q(e,a,s)}catch(e){}}}}return e}var ee=Symbol.for("react-redux-context"),te="undefined"!=typeof globalThis?globalThis:{};function se(){if(!r.createContext)return{};const e=te[ee]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),t.displayName="ReactRedux",e.set(r.createContext,t)),t}var re=se(),oe=[null,null];function ne(e,t,s,r,o,n){e.current=r,s.current=!1,o.current&&(o.current=null,n())}function ae(e,t){return e===t}var ie=!1,ce=function(e,t,s,{pure:o,areStatesEqual:n=ae,areOwnPropsEqual:a=B,areStatePropsEqual:i=B,areMergedPropsEqual:c=B,forwardRef:l=!1,context:u=re}={}){void 0===o||ie||(ie=!0,k('The `pure` option has been removed. `connect` is now always a "pure/memoized" component'));const d=u,p=function(e){return e?"function"==typeof e?O(e,"mapStateToProps"):A(e,"mapStateToProps"):N(()=>({}))}(e),m=function(e){return e&&"object"==typeof e?N(t=>function(e,t){const s={};for(const r in e){const o=e[r];"function"==typeof o&&(s[r]=(...e)=>t(o(...e)))}return s}(e,t)):e?"function"==typeof e?O(e,"mapDispatchToProps"):A(e,"mapDispatchToProps"):N(e=>({dispatch:e}))}(t),f=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:s,areMergedPropsEqual:r}){let o,n=!1;return function(t,a,i){const c=e(t,a,i);return n?r(c,o)||(o=c):(n=!0,o=c,T(o,s,"mergeProps")),o}}}(e):A(e,"mergeProps"):()=>P}(s),h=Boolean(e);return e=>{if(!_(e))throw new Error(`You must pass a component to the function returned by connect. Instead received ${(e=>{try{return JSON.stringify(e)}catch(t){return String(e)}})(e)}`);const t=e.displayName||e.name||"Component",s=`Connect(${t})`,o={shouldHandleStateChanges:h,displayName:s,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:m,initMergeProps:f,areStatesEqual:n,areStatePropsEqual:i,areOwnPropsEqual:a,areMergedPropsEqual:c};function u(t){const[n,a,i]=r.useMemo(()=>{const{reactReduxForwardedRef:e,...s}=t;return[t.context,e,s]},[t]),c=r.useMemo(()=>{let e=d;if(n?.Consumer){if(!S(r.createElement(n.Consumer,null)))throw new Error("You must pass a valid React context consumer as `props.context`");e=n}return e},[n,d]),l=r.useContext(c),u=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),p=Boolean(l)&&Boolean(l.store);if(!u&&!p)throw new Error(`Could not find "store" in the context of "${s}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${s} in connect options.`);const m=u?t.store:l.store,f=p?l.getServerState:m.getState,v=r.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:s,initMergeProps:r,...o}){const n=t(e,o),a=s(e,o),i=r(e,o);return function(e,t,s){C(e,"mapStateToProps"),C(t,"mapDispatchToProps"),C(s,"mergeProps")}(n,a,i),E(n,a,i,e,o)}(m.dispatch,o),[m]),[y,j]=r.useMemo(()=>{if(!h)return oe;const e=M(m,u?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[m,u,l]),g=r.useMemo(()=>u?l:{...l,subscription:y},[u,l,y]),b=r.useRef(void 0),x=r.useRef(i),_=r.useRef(void 0),w=r.useRef(!1),k=r.useRef(!1),T=r.useRef(void 0);U(()=>(k.current=!0,()=>{k.current=!1}),[]);const N=r.useMemo(()=>()=>_.current&&i===x.current?_.current:v(m.getState(),i),[m,i]),I=r.useMemo(()=>e=>y?function(e,t,s,r,o,n,a,i,c,l,u){if(!e)return()=>{};let d=!1,p=null;const m=()=>{if(d||!i.current)return;const e=t.getState();let s,m;try{s=r(e,o.current)}catch(e){m=e,p=e}m||(p=null),s===n.current?a.current||l():(n.current=s,c.current=s,a.current=!0,u())};return s.onStateChange=m,s.trySubscribe(),m(),()=>{if(d=!0,s.tryUnsubscribe(),s.onStateChange=null,p)throw p}}(h,m,y,v,x,b,w,k,_,j,e):()=>{},[y]);var O,A;let P;O=ne,A=[x,b,w,i,_,j],U(()=>O(...A),undefined);try{P=r.useSyncExternalStore(I,N,f?()=>v(f(),i):N)}catch(e){throw T.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${T.current.stack}\n\n`),e}U(()=>{T.current=void 0,_.current=void 0,b.current=P});const L=r.useMemo(()=>r.createElement(e,{...P,ref:a}),[a,e,P]);return r.useMemo(()=>h?r.createElement(c.Provider,{value:g},L):L,[c,L,g])}const v=r.memo(u);if(v.WrappedComponent=e,v.displayName=u.displayName=s,l){const t=r.forwardRef(function(e,t){return r.createElement(v,{...e,reactReduxForwardedRef:t})});return t.displayName=s,t.WrappedComponent=e,Z(t,e)}return Z(v,e)}},le=function(e){const{children:t,context:s,serverState:o,store:n}=e,a=r.useMemo(()=>{const t=M(n),s={store:n,subscription:t,getServerState:o?()=>o:void 0};{const{identityFunctionCheck:t="once",stabilityCheck:r="once"}=e;return Object.assign(s,{stabilityCheck:r,identityFunctionCheck:t})}},[n,o]),i=r.useMemo(()=>n.getState(),[n]);U(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),i!==n.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,i]);const c=s||re;return r.createElement(c.Provider,{value:a},t)};function ue(e=re){return function(){const t=r.useContext(e);if(!t)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return t}}var de=ue();function pe(e=re){const t=e===re?de:ue(e),s=()=>{const{store:e}=t();return e};return Object.assign(s,{withTypes:()=>s}),s}var me=pe();function fe(e=re){const t=e===re?me:pe(e),s=()=>t().dispatch;return Object.assign(s,{withTypes:()=>s}),s}var he=fe(),ve=(e,t)=>e===t;function ye(e=re){const t=e===re?de:ue(e),s=(e,s={})=>{const{equalityFn:n=ve}="function"==typeof s?{equalityFn:s}:s;if(!e)throw new Error("You must pass a selector to useSelector");if("function"!=typeof e)throw new Error("You must pass a function as a selector to useSelector");if("function"!=typeof n)throw new Error("You must pass a function as an equality function to useSelector");const a=t(),{store:i,subscription:c,getServerState:l}=a,u=r.useRef(!0),d=r.useCallback({[e.name](t){const r=e(t);{const{devModeChecks:o={}}="function"==typeof s?{}:s,{identityFunctionCheck:i,stabilityCheck:c}=a,{identityFunctionCheck:l,stabilityCheck:d}={stabilityCheck:c,identityFunctionCheck:i,...o};if("always"===d||"once"===d&&u.current){const s=e(t);if(!n(r,s)){let o;try{throw new Error}catch(e){({stack:o}=e)}console.warn("Selector "+(e.name||"unknown")+" returned a different result when called with the same parameters. This can lead to unnecessary rerenders.\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization",{state:t,selected:r,selected2:s,stack:o})}}if(("always"===l||"once"===l&&u.current)&&r===t){let t;try{throw new Error}catch(e){({stack:t}=e)}console.warn("Selector "+(e.name||"unknown")+" returned the root state when called. This can lead to unnecessary rerenders.\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.",{stack:t})}u.current&&(u.current=!1)}return r}}[e.name],[e]),p=(0,o.useSyncExternalStoreWithSelector)(c.addNestedSub,i.getState,l||i.getState,d,n);return r.useDebugValue(p),p};return Object.assign(s,{withTypes:()=>s}),s}var je=ye(),ge=L},"./node_modules/reconnecting-websocket/dist/reconnecting-websocket-mjs.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},r(e,t)};function o(e,t){function s(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}function n(e,t){var s="function"==typeof Symbol&&e[Symbol.iterator];if(!s)return e;var r,o,n=s.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=n.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}}return a}var a=function(e,t){this.target=t,this.type=e},i=function(e){function t(t,s){var r=e.call(this,"error",s)||this;return r.message=t.message,r.error=t,r}return o(t,e),t}(a),c=function(e){function t(t,s,r){void 0===t&&(t=1e3),void 0===s&&(s="");var o=e.call(this,"close",r)||this;return o.wasClean=!0,o.code=t,o.reason=s,o}return o(t,e),t}(a),l=function(){if("undefined"!=typeof WebSocket)return WebSocket},u={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+4e3*Math.random(),minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1};const d=function(){function e(e,t,s){var r=this;void 0===s&&(s={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(e){r._debug("open event");var t=r._options.minUptime,s=void 0===t?u.minUptime:t;clearTimeout(r._connectTimeout),r._uptimeTimeout=setTimeout(function(){return r._acceptOpen()},s),r._ws.binaryType=r._binaryType,r._messageQueue.forEach(function(e){return r._ws.send(e)}),r._messageQueue=[],r.onopen&&r.onopen(e),r._listeners.open.forEach(function(t){return r._callEventListener(e,t)})},this._handleMessage=function(e){r._debug("message event"),r.onmessage&&r.onmessage(e),r._listeners.message.forEach(function(t){return r._callEventListener(e,t)})},this._handleError=function(e){r._debug("error event",e.message),r._disconnect(void 0,"TIMEOUT"===e.message?"timeout":void 0),r.onerror&&r.onerror(e),r._debug("exec error listeners"),r._listeners.error.forEach(function(t){return r._callEventListener(e,t)}),r._connect()},this._handleClose=function(e){r._debug("close event"),r._clearTimeouts(),r._shouldReconnect&&r._connect(),r.onclose&&r.onclose(e),r._listeners.close.forEach(function(t){return r._callEventListener(e,t)})},this._url=e,this._protocols=t,this._options=s,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){return this._messageQueue.reduce(function(e,t){return"string"==typeof t?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e},0)+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(e,t){void 0===e&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),this._ws?this._ws.readyState!==this.CLOSED?this._ws.close(e,t):this._debug("close: already closed"):this._debug("close enqueued: no ws instance")},e.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,this._ws&&this._ws.readyState!==this.CLOSED?(this._disconnect(e,t),this._connect()):this._connect()},e.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,s=void 0===t?u.maxEnqueuedMessages:t;this._messageQueue.length<s&&(this._debug("enqueue",e),this._messageQueue.push(e))}},e.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},e.prototype.dispatchEvent=function(e){var t,s,r=this._listeners[e.type];if(r)try{for(var o=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],s=0;return t?t.call(e):{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}}}(r),n=o.next();!n.done;n=o.next()){var a=n.value;this._callEventListener(e,a)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(s=o.return)&&s.call(o)}finally{if(t)throw t.error}}return!0},e.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(e){return e!==t}))},e.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e}(["RWS>"],e))},e.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,s=void 0===t?u.reconnectionDelayGrowFactor:t,r=e.minReconnectionDelay,o=void 0===r?u.minReconnectionDelay:r,n=e.maxReconnectionDelay,a=void 0===n?u.maxReconnectionDelay:n,i=0;return this._retryCount>0&&(i=o*Math.pow(s,this._retryCount-1))>a&&(i=a),this._debug("next delay",i),i},e.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},e.prototype._getNextUrl=function(e){if("string"==typeof e)return Promise.resolve(e);if("function"==typeof e){var t=e();if("string"==typeof t)return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},e.prototype._connect=function(){var e=this;if(!this._connectLock&&this._shouldReconnect){this._connectLock=!0;var t=this._options,s=t.maxRetries,r=void 0===s?u.maxRetries:s,o=t.connectionTimeout,n=void 0===o?u.connectionTimeout:o,a=t.WebSocket,i=void 0===a?l():a;if(this._retryCount>=r)this._debug("max retries reached",this._retryCount,">=",r);else{if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),void 0===(c=i)||!c||2!==c.CLOSING)throw Error("No valid WebSocket class provided");var c;this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(t){e._closeCalled||(e._debug("connect",{url:t,protocols:e._protocols}),e._ws=e._protocols?new i(t,e._protocols):new i(t),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},n))})}}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new i(Error("TIMEOUT"),this))},e.prototype._disconnect=function(e,t){if(void 0===e&&(e=1e3),this._clearTimeouts(),this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new c(e,t,this))}catch(e){}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},e}()},"./node_modules/redux-thunk/dist/redux-thunk.mjs":(e,t,s)=>{"use strict";function r(e){return({dispatch:t,getState:s})=>r=>o=>"function"==typeof o?o(t,s,e):r(o)}s.r(t),s.d(t,{thunk:()=>o,withExtraArgument:()=>n});var o=r(),n=r},"./node_modules/redux/dist/redux.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{__DO_NOT_USE__ActionTypes:()=>n,applyMiddleware:()=>h,bindActionCreators:()=>m,combineReducers:()=>d,compose:()=>f,createStore:()=>c,isAction:()=>v,isPlainObject:()=>a,legacy_createStore:()=>l});var r=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),o=()=>Math.random().toString(36).substring(7).split("").join("."),n={INIT:`@@redux/INIT${o()}`,REPLACE:`@@redux/REPLACE${o()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${o()}`};function a(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function i(e){let t=typeof e;return t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const s=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(s){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return s}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}(e),t}function c(e,t,s){if("function"!=typeof e)throw new Error(`Expected the root reducer to be a function. Instead, received: '${i(e)}'`);if("function"==typeof t&&"function"==typeof s||"function"==typeof s&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===s&&(s=t,t=void 0),void 0!==s){if("function"!=typeof s)throw new Error(`Expected the enhancer to be a function. Instead, received: '${i(s)}'`);return s(c)(e,t)}let o=e,l=t,u=new Map,d=u,p=0,m=!1;function f(){d===u&&(d=new Map,u.forEach((e,t)=>{d.set(t,e)}))}function h(){if(m)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function v(e){if("function"!=typeof e)throw new Error(`Expected the listener to be a function. Instead, received: '${i(e)}'`);if(m)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;f();const s=p++;return d.set(s,e),function(){if(t){if(m)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,f(),d.delete(s),u=null}}}function y(e){if(!a(e))throw new Error(`Actions must be plain objects. Instead, the actual type was: '${i(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error(`Action "type" property must be a string. Instead, the actual type was: '${i(e.type)}'. Value was: '${e.type}' (stringified)`);if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,l=o(l,e)}finally{m=!1}return(u=d).forEach(e=>{e()}),e}return y({type:n.INIT}),{dispatch:y,subscribe:v,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error(`Expected the nextReducer to be a function. Instead, received: '${i(e)}`);o=e,y({type:n.REPLACE})},[r]:function(){const e=v;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(`Expected the observer to be an object. Instead, received: '${i(t)}'`);function s(){const e=t;e.next&&e.next(h())}return s(),{unsubscribe:e(s)}},[r](){return this}}}}}function l(e,t,s){return c(e,t,s)}function u(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function d(e){const t=Object.keys(e),s={};for(let r=0;r<t.length;r++){const o=t[r];void 0===e[o]&&u(`No reducer provided for key "${o}"`),"function"==typeof e[o]&&(s[o]=e[o])}const r=Object.keys(s);let o,c;o={};try{!function(e){Object.keys(e).forEach(t=>{const s=e[t];if(void 0===s(void 0,{type:n.INIT}))throw new Error(`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===s(void 0,{type:n.PROBE_UNKNOWN_ACTION()}))throw new Error(`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${n.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}(s)}catch(e){c=e}return function(e={},t){if(c)throw c;{const r=function(e,t,s,r){const o=Object.keys(t),c=s&&s.type===n.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!a(e))return`The ${c} has unexpected type of "${i(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const l=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!r[e]);return l.forEach(e=>{r[e]=!0}),s&&s.type===n.REPLACE?void 0:l.length>0?`Unexpected ${l.length>1?"keys":"key"} "${l.join('", "')}" found in ${c}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,s,t,o);r&&u(r)}let l=!1;const d={};for(let o=0;o<r.length;o++){const n=r[o],a=s[n],i=e[n],c=a(i,t);if(void 0===c){const e=t&&t.type;throw new Error(`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${n}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}d[n]=c,l=l||c!==i}return l=l||r.length!==Object.keys(e).length,l?d:e}}function p(e,t){return function(...s){return t(e.apply(this,s))}}function m(e,t){if("function"==typeof e)return p(e,t);if("object"!=typeof e||null===e)throw new Error(`bindActionCreators expected an object or a function, but instead received: '${i(e)}'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);const s={};for(const r in e){const o=e[r];"function"==typeof o&&(s[r]=p(o,t))}return s}function f(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...s)=>e(t(...s)))}function h(...e){return t=>(s,r)=>{const o=t(s,r);let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(e,...t)=>n(e,...t)},i=e.map(e=>e(a));return n=f(...i)(o.dispatch),{...o,dispatch:n}}}function v(e){return a(e)&&"type"in e&&"string"==typeof e.type}},"./node_modules/reselect/dist/reselect.mjs":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createSelector:()=>V,createSelectorCreator:()=>B,createStructuredSelector:()=>$,lruMemoize:()=>L,referenceEqualityCheck:()=>A,setGlobalDevModeChecks:()=>a,unstable_autotrackMemoize:()=>R,weakMapMemoize:()=>z});var r=(e,t,s)=>{if(1===t.length&&t[0]===s){let t=!1;try{const s={};e(s)===s&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},o=(e,t,s)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:n,inputSelectorResultsCopy:a}=e,i=r(()=>({}),...o);if(i.apply(null,n)!==i.apply(null,a)){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:s,firstInputs:n,secondInputs:a,stack:e})}},n={inputStabilityCheck:"once",identityFunctionCheck:"once"},a=e=>{Object.assign(n,e)},i=Symbol("NOT_FOUND");function c(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}var l=e=>Array.isArray(e)?e:[e];function u(e,t){const s=[],{length:r}=e;for(let o=0;o<r;o++)s.push(e[o].apply(null,t));return s}var d=(e,t)=>{const{identityFunctionCheck:s,inputStabilityCheck:a}={...n,...t};return{identityFunctionCheck:{shouldRun:"always"===s||"once"===s&&e,run:r},inputStabilityCheck:{shouldRun:"always"===a||"once"===a&&e,run:o}}},p=0,m=null,f=class{revision=p;_value;_lastValue;_isEqual=h;constructor(e,t=h){this._value=this._lastValue=e,this._isEqual=t}get value(){return m?.add(this),this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++p)}};function h(e,t){return e===t}var v=class{_cachedValue;_cachedRevision=-1;_deps=[];hits=0;fn;constructor(e){this.fn=e}clear(){this._cachedValue=void 0,this._cachedRevision=-1,this._deps=[],this.hits=0}get value(){if(this.revision>this._cachedRevision){const{fn:e}=this,t=new Set,s=m;m=t,this._cachedValue=e(),m=s,this.hits++,this._deps=Array.from(t),this._cachedRevision=this.revision}return m?.add(this),this._cachedValue}get revision(){return Math.max(...this._deps.map(e=>e.revision),0)}};function y(e){return e instanceof f||console.warn("Not a valid cell! ",e),e.value}var j=(e,t)=>!1;function g(){return function(e,t=h){return new f(null,t)}(0,j)}function b(e,t){!function(e,t){if(!(e instanceof f))throw new TypeError("setValue must be passed a tracked store created with `createStorage`.");e.value=e._lastValue=t}(e,t)}var x=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=g()),y(t)},_=e=>{const t=e.collectionTag;null!==t&&b(t,null)},w=(Symbol(),0),S=Object.getPrototypeOf({}),k=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,C);tag=g();tags={};children={};collectionTag=null;id=w++},C={get:(e,t)=>function(){const{value:s}=e,r=Reflect.get(s,t);if("symbol"==typeof t)return r;if(t in S)return r;if("object"==typeof r&&null!==r){let s=e.children[t];return void 0===s&&(s=e.children[t]=N(r)),s.tag&&y(s.tag),s.proxy}{let s=e.tags[t];return void 0===s&&(s=e.tags[t]=g(),s.value=r),y(s),r}}(),ownKeys:e=>(x(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},E=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],T);tag=g();tags={};children={};collectionTag=null;id=w++},T={get:([e],t)=>("length"===t&&x(e),C.get(e,t)),ownKeys:([e])=>C.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>C.getOwnPropertyDescriptor(e,t),has:([e],t)=>C.has(e,t)};function N(e){return Array.isArray(e)?new E(e):new k(e)}function I(e,t){const{value:s,tags:r,children:o}=e;if(e.value=t,Array.isArray(s)&&Array.isArray(t)&&s.length!==t.length)_(e);else if(s!==t){let r=0,o=0,n=!1;for(const e in s)r++;for(const e in t)if(o++,!(e in s)){n=!0;break}(n||r!==o)&&_(e)}for(const o in r){const n=s[o],a=t[o];n!==a&&(_(e),b(r[o],a)),"object"==typeof a&&null!==a&&delete r[o]}for(const e in o){const s=o[e],r=t[e];s.value!==r&&("object"==typeof r&&null!==r?I(s,r):(O(s),delete o[e]))}}function O(e){e.tag&&b(e.tag,null),_(e);for(const t in e.tags)b(e.tags[t],null);for(const t in e.children)O(e.children[t])}var A=(e,t)=>e===t;function P(e){return function(t,s){if(null===t||null===s||t.length!==s.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],s[o]))return!1;return!0}}function L(e,t){const s="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=A,maxSize:o=1,resultEqualityCheck:n}=s,a=P(r);let c=0;const l=o<=1?function(e){let t;return{get:s=>t&&e(t.key,s)?t.value:i,put(e,s){t={key:e,value:s}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(a):function(e,t){let s=[];function r(e){const r=s.findIndex(s=>t(e,s.key));if(r>-1){const e=s[r];return r>0&&(s.splice(r,1),s.unshift(e)),e.value}return i}return{get:r,put:function(t,o){r(t)===i&&(s.unshift({key:t,value:o}),s.length>e&&s.pop())},getEntries:function(){return s},clear:function(){s=[]}}}(o,a);function u(){let t=l.get(arguments);if(t===i){if(t=e.apply(null,arguments),c++,n){const e=l.getEntries().find(e=>n(e.value,t));e&&(t=e.value,0!==c&&c--)}l.put(arguments,t)}return t}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>c,u.resetResultsCount=()=>{c=0},u}function R(e){const t=N([]);let s=null;const r=P(A),o=(c(n=()=>e.apply(null,t.proxy),"the first parameter to `createCache` must be a function"),new v(n));var n;function a(){return r(s,arguments)||(I(t,arguments),s=arguments),o.value}return a.clearCache=()=>o.clear(),a}var M="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}},D=0,F=1;function U(){return{s:D,v:void 0,o:null,p:null}}function z(e,t={}){let s=U();const{resultEqualityCheck:r}=t;let o,n=0;function a(){let t=s;const{length:a}=arguments;for(let e=0,s=a;e<s;e++){const s=arguments[e];if("function"==typeof s||"object"==typeof s&&null!==s){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(s);void 0===r?(t=U(),e.set(s,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(s);void 0===r?(t=U(),e.set(s,t)):t=r}}const i=t;let c;if(t.s===F)c=t.v;else if(c=e.apply(null,arguments),n++,r){const e=o?.deref?.()??o;null!=e&&r(e,c)&&(c=e,0!==n&&n--),o="object"==typeof c&&null!==c||"function"==typeof c?new M(c):c}return i.s=F,i.v=c,c}return a.clearCache=()=>{s=U(),a.resetResultsCount()},a.resultsCount=()=>n,a.resetResultsCount=()=>{n=0},a}function B(e,...t){const s="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,n={},a=e.pop();"object"==typeof a&&(n=a,a=e.pop()),c(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const i={...s,...n},{memoize:p,memoizeOptions:m=[],argsMemoize:f=z,argsMemoizeOptions:h=[],devModeChecks:v={}}=i,y=l(m),j=l(h),g=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const s=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${s}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),b=p(function(){return r++,a.apply(null,arguments)},...y);let x=!0;const _=f(function(){o++;const e=u(g,arguments);t=b.apply(null,e);{const{identityFunctionCheck:s,inputStabilityCheck:r}=d(x,v);if(s.shouldRun&&s.run(a,e,t),r.shouldRun){const t=u(g,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:p,memoizeOptions:y},arguments)}x&&(x=!1)}return t},...j);return Object.assign(_,{resultFunc:a,memoizedResultFunc:b,dependencies:g,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:p,argsMemoize:f})};return Object.assign(r,{withTypes:()=>r}),r}var V=B(z),$=Object.assign((e,t=V)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const s=Object.keys(e);return t(s.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[s[r]]=t,e),{}))},{withTypes:()=>$})},"./node_modules/tabbable/dist/index.esm.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{focusable:()=>x,getTabIndex:()=>p,isFocusable:()=>S,isTabbable:()=>_,tabbable:()=>b});var r=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],o=r.join(","),n="undefined"==typeof Element,a=n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=!n&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},c=function e(t,s){var r;void 0===s&&(s=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||s&&t&&e(t.parentNode)},l=function(e,t,s){if(c(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(o));return t&&a.call(e,o)&&r.unshift(e),r.filter(s)},u=function e(t,s,r){for(var n=[],i=Array.from(t);i.length;){var l=i.shift();if(!c(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),d=e(u.length?u:l.children,!0,r);r.flatten?n.push.apply(n,d):n.push({scopeParent:l,candidates:d})}else{a.call(l,o)&&r.filter(l)&&(s||!t.includes(l))&&n.push(l);var p=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),m=!c(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(p&&m){var f=e(!0===p?l.children:p.children,!0,r);r.flatten?n.push.apply(n,f):n.push({scopeParent:l,candidates:f})}else i.unshift.apply(i,l.children)}}return n},d=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},p=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,s=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===s||"true"===s}(e))&&!d(e)?0:e.tabIndex},m=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},f=function(e){return"INPUT"===e.tagName},h=function(e){var t=e.getBoundingClientRect(),s=t.width,r=t.height;return 0===s&&0===r},v=function(e,t){return!(t.disabled||c(t)||function(e){return f(e)&&"hidden"===e.type}(t)||function(e,t){var s=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=a.call(e,"details>summary:first-of-type")?e.parentElement:e;if(a.call(o,"details:not([open]) *"))return!0;if(s&&"full"!==s&&"legacy-full"!==s){if("non-zero-area"===s)return h(e)}else{if("function"==typeof r){for(var n=e;e;){var c=e.parentElement,l=i(e);if(c&&!c.shadowRoot&&!0===r(c))return h(e);e=e.assignedSlot?e.assignedSlot:c||l===e.ownerDocument?c:l.host}e=n}if(function(e){var t,s,r,o,n=e&&i(e),a=null===(t=n)||void 0===t?void 0:t.host,c=!1;if(n&&n!==e)for(c=!!(null!==(s=a)&&void 0!==s&&null!==(r=s.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!c&&a;){var l,u,d;c=!(null===(u=a=null===(l=n=i(a))||void 0===l?void 0:l.host)||void 0===u||null===(d=u.ownerDocument)||void 0===d||!d.contains(a))}return c}(e))return!e.getClientRects().length;if("legacy-full"!==s)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var s=0;s<t.children.length;s++){var r=t.children.item(s);if("LEGEND"===r.tagName)return!!a.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},y=function(e,t){return!(function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,s=e.form||i(e),r=function(e){return s.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var s=0;s<e.length;s++)if(e[s].checked&&e[s].form===t)return e[s]}(t,e.form);return!o||o===e}(e)}(t)||p(t)<0||!v(e,t))},j=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},g=function e(t){var s=[],r=[];return t.forEach(function(t,o){var n=!!t.scopeParent,a=n?t.scopeParent:t,i=function(e,t){var s=p(e);return s<0&&t&&!d(e)?0:s}(a,n),c=n?e(t.candidates):a;0===i?n?s.push.apply(s,c):s.push(a):r.push({documentOrder:o,tabIndex:i,item:t,isScope:n,content:c})}),r.sort(m).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(s)},b=function(e,t){var s;return s=(t=t||{}).getShadowRoot?u([e],t.includeContainer,{filter:y.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:j}):l(e,t.includeContainer,y.bind(null,t)),g(s)},x=function(e,t){return(t=t||{}).getShadowRoot?u([e],t.includeContainer,{filter:v.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):l(e,t.includeContainer,v.bind(null,t))},_=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==a.call(e,o)&&y(t,e)},w=r.concat("iframe").join(","),S=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==a.call(e,w)&&v(t,e)}},"./node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js":(e,t,s)=>{"use strict";!function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=s("./node_modules/preact/compat/dist/compat.module.js"),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=e.useSyncExternalStore,n=e.useRef,a=e.useEffect,i=e.useMemo,c=e.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,s,l,u){var d=n(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=i(function(){function e(e){if(!a){if(a=!0,o=e,e=l(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return n=t}return n=e}if(t=n,r(o,e))return t;var s=l(e);return void 0!==u&&u(t,s)?(o=e,t):(o=e,n=s)}var o,n,a=!1,i=void 0===s?null:s;return[function(){return e(t())},null===i?void 0:function(){return e(i())}]},[t,s,l,u]);var m=o(e,d[0],d[1]);return a(function(){p.hasValue=!0,p.value=m},[m]),c(m),m},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()},"./node_modules/use-sync-external-store/with-selector.js":(e,t,s)=>{"use strict";e.exports=s("./node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js")},"./src/icons/avatar_bot-32.svg":e=>{"use strict";e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">\n<path fill="#4A48C1" d="M10,14.8c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S11.1,14.8,10,14.8z M15.9,14.8c1.1,0,2-0.9,2-2s-0.9-2-2-2\n\ts-2,0.9-2,2S14.8,14.8,15.9,14.8z M21.8,10.8c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S22.9,10.8,21.8,10.8z M21.3,18.1H10.7\n\tC11.7,23.9,20.2,23.9,21.3,18.1z"/>\n</svg>\n'},"./src/icons/icon_arrow_left-16.svg":e=>{"use strict";e.exports='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">\n<path fill="#5053A4" d="M13.6,8c0,0.6-0.4,1-1,1h-7l2.2,2.5c0.4,0.4,0.3,1-0.1,1.4c-0.2,0.2-0.4,0.2-0.7,0.2c-0.3,0-0.6-0.1-0.8-0.3\n\tL2.6,8.6c0,0-0.1-0.1-0.1-0.2c0,0-0.1-0.1-0.1-0.1c0-0.1-0.1-0.2-0.1-0.3c0,0,0,0,0,0c0,0,0,0,0,0c0-0.1,0-0.3,0.1-0.4\n\tc0,0,0.1-0.1,0.1-0.1c0-0.1,0.1-0.1,0.1-0.2l3.7-4.1c0.4-0.4,1-0.4,1.4-0.1c0.4,0.4,0.4,1,0.1,1.4L5.6,7h7C13.2,7,13.6,7.4,13.6,8z"\n\t/>\n</svg>\n'},"./src/icons/icon_arrow_right-16.svg":e=>{"use strict";e.exports='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">\n<path fill="#5053A4" d="M2.4,8.1c0-0.6,0.4-1,1-1h7L8.1,4.5c-0.4-0.4-0.3-1,0.1-1.4c0.2-0.2,0.4-0.2,0.7-0.2c0.3,0,0.6,0.1,0.8,0.3\n\tl3.7,4.2c0,0,0.1,0.1,0.1,0.2c0,0,0.1,0.1,0.1,0.1c0,0.1,0.1,0.2,0.1,0.3c0,0,0,0,0,0c0,0,0,0,0,0c0,0.1,0,0.3-0.1,0.4\n\tc0,0-0.1,0.1-0.1,0.1c0,0.1-0.1,0.1-0.1,0.2l-3.7,4.1c-0.4,0.4-1,0.4-1.4,0.1c-0.4-0.4-0.4-1-0.1-1.4l2.2-2.4h-7\n\tC2.8,9.1,2.4,8.6,2.4,8.1z"/>\n</svg>\n'},"./src/icons/icon_balloon-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M24,10.824v10.375c0,1.104-0.896,2-2,2h-4.694l-4.931,3.625v-3.625H10c-1.104,0-2-0.896-2-2V10.824\tc0-1.104,0.896-2,2-2h12C23.104,8.824,24,9.719,24,10.824z"/></svg>'},"./src/icons/icon_check-16.svg":e=>{"use strict";e.exports='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="16px"\n height="16px"\n x="0px"\n y="0px"\n viewBox="0 0 16 16"\n>\n <path\n fill="currentColor"\n d="M11.6,4.3l-5,5L4.9,7.5C4.4,7,3.7,7,3.2,7.5l0,0C2.8,8,2.8,8.7,3.2,9.2l1.7,1.7l0,0l0.8,0.8\n\tc0.5,0.5,1.2,0.5,1.7,0l0.8-0.8l5-5c0.5-0.5,0.5-1.2,0-1.7l0,0C12.8,3.8,12.1,3.8,11.6,4.3z"\n />\n</svg>\n'},"./src/icons/icon_check-32.svg":e=>{"use strict";e.exports='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="32px"\n height="32px"\n x="0px"\n y="0px"\n viewBox="0 0 32 32"\n>\n <path\n fill="currentColor"\n d="M22.9,9.3l-9.3,9.3l-3.2-3.2c-0.9-0.9-2.3-0.9-3.2,0l0,0c-0.9,0.9-0.9,2.3,0,3.2l3.2,3.2l0,0l1.6,1.6\n\tc0.9,0.9,2.3,0.9,3.2,0l1.6-1.6l9.3-9.3c0.9-0.9,0.9-2.3,0-3.2l0,0C25.2,8.4,23.7,8.4,22.9,9.3z"\n />\n</svg>\n'},"./src/icons/icon_chevron_down-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M16,20.425c-0.782,0-1.563-0.291-2.159-0.874l-6.541-6.408c-0.395-0.387-0.401-1.02-0.015-1.414\tc0.387-0.394,1.021-0.4,1.414-0.015l6.541,6.408c0.42,0.409,1.102,0.409,1.52-0.001l6.541-6.407c0.396-0.386,1.028-0.38,1.414,0.015\tc0.387,0.395,0.381,1.027-0.014,1.414l-6.541,6.407C17.563,20.133,16.782,20.425,16,20.425z"/></svg>'},"./src/icons/icon_chevron_down-8.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M-0.001,2.876c0-0.247,0.091-0.494,0.273-0.688c0.38-0.401,1.013-0.418,1.414-0.039l1.938,1.834\tc0.199,0.188,0.547,0.188,0.746,0L6.31,2.15c0.401-0.379,1.034-0.362,1.414,0.04c0.379,0.401,0.361,1.034-0.04,1.414L5.745,5.437\tC4.782,6.35,3.213,6.35,2.249,5.436L0.311,3.603C0.103,3.406-0.001,3.142-0.001,2.876z"/></svg>'},"./src/icons/icon_chevron_right-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#4A48C1" d="M6.5,13c-0.247,0-0.494-0.091-0.687-0.273c-0.401-0.38-0.419-1.013-0.04-1.414L8.22,8.727\tc0.373-0.394,0.373-1.06,0-1.454L5.773,4.687c-0.379-0.401-0.362-1.034,0.04-1.414c0.4-0.378,1.034-0.362,1.414,0.04l2.446,2.586\tc1.096,1.159,1.096,3.043,0,4.203l-2.446,2.586C7.03,12.896,6.765,13,6.5,13z"/></svg>'},"./src/icons/icon_chevron_right-8.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M2.875,7.998c-0.247,0-0.494-0.091-0.688-0.273c-0.401-0.38-0.418-1.013-0.039-1.414l1.834-1.938\tc0.188-0.199,0.188-0.547,0-0.746l-1.835-1.94c-0.379-0.401-0.362-1.034,0.04-1.414s1.034-0.361,1.414,0.04l1.834,1.939\tc0.913,0.963,0.913,2.532-0.001,3.496L3.601,7.686C3.405,7.894,3.14,7.998,2.875,7.998z"/></svg>'},"./src/icons/icon_close-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#4A48C1" d="M12.709,11.295L9.411,7.982l3.262-3.276c0.39-0.392,0.388-1.024-0.004-1.414\tc-0.39-0.39-1.023-0.388-1.414,0.003L8,6.564L4.746,3.295C4.357,2.904,3.724,2.903,3.332,3.292C2.94,3.682,2.939,4.315,3.329,4.707\tl3.261,3.275l-3.298,3.313c-0.39,0.391-0.388,1.024,0.003,1.414C3.49,12.903,3.745,13,4,13c0.257,0,0.513-0.099,0.708-0.295L8,9.399\tl3.291,3.306C11.486,12.901,11.743,13,12,13c0.255,0,0.511-0.097,0.705-0.291C13.097,12.319,13.099,11.686,12.709,11.295z"/></svg>'},"./src/icons/icon_close-8.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M7.705,7.729C7.511,7.923,7.255,8.02,7,8.02c-0.257,0-0.514-0.099-0.709-0.295L4,5.423L1.709,7.725\tC1.513,7.921,1.257,8.02,1,8.02c-0.255,0-0.51-0.097-0.706-0.291c-0.391-0.39-0.393-1.022-0.003-1.414l2.298-2.309l-2.27-2.28\tC-0.07,1.334-0.068,0.701,0.323,0.311c0.392-0.389,1.024-0.387,1.415,0.003L4,2.587l2.263-2.274C6.653-0.077,7.287-0.079,7.677,0.31\tC8.068,0.7,8.07,1.333,7.681,1.725l-2.27,2.281l2.298,2.309C8.099,6.705,8.097,7.339,7.705,7.729z"/></svg>'},"./src/icons/icon_download-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#FFF" d="M3.175,7.726c-0.413-0.367-0.45-0.999-0.083-1.412c0.367-0.413,0.999-0.45,1.412-0.083L7,8.45V1.5\tc0-0.552,0.448-1,1-1c0.553,0,1,0.448,1,1v6.95l2.496-2.219c0.412-0.367,1.044-0.331,1.411,0.083\tc0.367,0.413,0.33,1.045-0.083,1.412l-4.16,3.698c-0.047,0.041-0.103,0.062-0.154,0.094c-0.047,0.028-0.089,0.064-0.141,0.085\tC8.25,11.649,8.125,11.677,8,11.677c-0.126,0-0.25-0.027-0.369-0.074c-0.05-0.021-0.09-0.055-0.136-0.083\tc-0.053-0.031-0.111-0.053-0.159-0.096L3.175,7.726z M12.018,13.5H3.983c-0.552,0-1,0.447-1,1s0.448,1,1,1h8.035\tc0.553,0,1-0.447,1-1S12.57,13.5,12.018,13.5z"/></svg>'},"./src/icons/icon_enlarge-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M24,9v6.5c0,0.552-0.447,1-1,1s-1-0.448-1-1v-4.086L11.414,22H15.5c0.552,0,1,0.447,1,1s-0.448,1-1,1H9\tc-0.13,0-0.26-0.026-0.382-0.077c-0.245-0.102-0.439-0.296-0.541-0.541C8.026,23.26,8,23.13,8,23v-6.5c0-0.552,0.448-1,1-1\ts1,0.448,1,1v4.085L20.586,10H16.5c-0.552,0-1-0.448-1-1s0.448-1,1-1H23c0.13,0,0.26,0.026,0.382,0.077\tc0.245,0.102,0.439,0.296,0.541,0.541C23.974,8.74,24,8.87,24,9z"/></svg>'},"./src/icons/icon_error-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#ad001f" d="M15.744,13.104L9.097,1.47c-0.604-1.055-1.59-1.055-2.193,0L0.256,13.104\tc-0.604,1.056-0.102,1.919,1.113,1.919H14.63C15.847,15.022,16.348,14.159,15.744,13.104z M7,5.045c0-0.552,0.448-1,1-1s1,0.448,1,1\tv3.656c0,0.552-0.448,1-1,1s-1-0.448-1-1V5.045z M8,13.212c-0.748,0-1.354-0.607-1.354-1.354c0-0.748,0.606-1.354,1.354-1.354\ts1.354,0.606,1.354,1.354C9.354,12.604,8.748,13.212,8,13.212z"/></svg>'},"./src/icons/icon_file-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" x="0px" y="0px" version="1.1" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,28.5c-3.6,0-6.5-3-6.5-6.6V9.6c0-0.6,0.4-1,1-1s1,0.4,1,1v12.3c0,2.5,2,4.6,4.5,4.6\tc2.5,0,4.5-2.1,4.5-4.6V8.3c0-1.5-1.2-2.8-2.7-2.8c-1.5,0-2.7,1.3-2.7,2.8v13.5c0,0.6,0.5,1.1,1,1.1c0.6,0,1-0.5,1-1.1v-10\tc0-0.6,0.4-1,1-1s1,0.4,1,1v10c0,1.7-1.4,3.1-3,3.1s-3-1.4-3-3.1V8.3c0-2.6,2.1-4.8,4.7-4.8c2.6,0,4.7,2.2,4.7,4.8v13.6\tC22.5,25.5,19.6,28.5,16,28.5z"/></svg>'},"./src/icons/icon_newtopic-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,8.593l2.407,4.573l5.093,0.876l-3.604,3.702l0.74,5.115L16,20.574l-4.634,2.285l0.739-5.115L8.5,14.042\tl5.094-0.876L16,8.593z"/></svg>'},"./src/icons/icon_newtranslation-16.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path fill="#4A48C1" d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M14.1,7.1h-1.4c-0.1-1.5-0.4-2.9-1-4\tC13,4,13.9,5.4,14.1,7.1z M7.1,2.1v5H5C5.2,4.7,6.1,2.9,7.1,2.1z M7.1,8.9v5c-1-0.7-1.9-2.5-2.1-5H7.1z M8.9,13.9v-5H11\tC10.8,11.3,9.9,13.2,8.9,13.9z M8.9,7.1v-5c1,0.7,1.9,2.5,2.1,5H8.9z M4.2,3.1c-0.5,1.1-0.9,2.5-1,4H1.9C2.1,5.4,3,4,4.2,3.1z M1.9,8.9h1.4c0.1,1.5,0.4,2.9,1,4C3,12,2.1,10.5,1.9,8.9z M11.8,12.9c0.5-1.1,0.9-2.5,1-4h1.4C13.9,10.5,13,12,11.8,12.9z"/></svg>'},"./src/icons/icon_newtranslation-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,7c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4.1,9-9S20.9,7,16,7z M22.9,15h-1.6c-0.1-1.7-0.5-3.3-1.1-4.5\tC21.6,11.5,22.6,13.1,22.9,15z M15,9.4V15h-2.3C12.9,12.3,13.9,10.2,15,9.4z M15,17v5.6c-1.1-0.8-2.1-2.9-2.3-5.6H15z M17,22.6V17\th2.3C19.1,19.8,18.1,21.8,17,22.6z M17,15V9.4c1.1,0.8,2.1,2.9,2.3,5.6H17z M11.8,10.4c-0.6,1.3-1,2.8-1.1,4.5H9.1\tC9.4,13.1,10.4,11.5,11.8,10.4z M9.1,17h1.6c0.1,1.7,0.5,3.3,1.1,4.5C10.4,20.5,9.4,18.9,9.1,17z M20.2,21.5c0.6-1.3,1-2.8,1.1-4.5\th1.6C22.6,18.8,21.6,20.5,20.2,21.5z"/></svg>'},"./src/icons/icon_options-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M26.1,21.383c0.334-0.625,0.602-1.279,0.812-1.949L32,18.609V13.51l-5.058-0.846\tc-0.208-0.67-0.468-1.325-0.795-1.956l3.009-4.145l-3.604-3.634L21.38,5.903c-0.626-0.333-1.276-0.602-1.948-0.81L18.609,0\tl-5.098,0.001l-0.847,5.061c-0.669,0.203-1.326,0.465-1.957,0.794L6.562,2.847L2.929,6.449l2.973,4.171\tC5.569,11.247,5.3,11.9,5.091,12.569L0,13.373v5.099l5.06,0.866c0.204,0.669,0.467,1.324,0.796,1.955l-3.009,4.146l3.601,3.635\tl4.171-2.975c0.627,0.335,1.282,0.603,1.951,0.811L13.372,32h5.118l0.849-5.057c0.668-0.207,1.323-0.469,1.953-0.795l4.144,3.01\tl3.639-3.604L26.1,21.383z M19.01,19.035c-1.675,1.663-4.381,1.652-6.041-0.025c-1.662-1.675-1.649-4.381,0.024-6.042\tc1.676-1.661,4.382-1.648,6.043,0.025C20.699,14.67,20.686,17.377,19.01,19.035z"/></svg>'},"./src/icons/icon_send-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M6.714,14.985l17.837-7.906c0.681-0.302,1.414,0.301,1.25,1.027L22.273,23.59\tc-0.13,0.566-0.751,0.865-1.275,0.613l-3.623-1.752l-2.334,2.287c-0.572,0.562-1.538,0.156-1.538-0.645V21.01\tc0-0.217,0.078-0.43,0.222-0.594l7.676-8.841l-10.414,7.472l-4.351-2.445C5.987,16.236,6.033,15.287,6.714,14.985L6.714,14.985z"/></svg>'},"./src/icons/icon_upload-32.svg":e=>{"use strict";e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M9.488,13.481c-0.391-0.391-0.391-1.023,0-1.414l5.805-5.805c0.026-0.026,0.06-0.036,0.088-0.058\tc0.073-0.06,0.146-0.119,0.235-0.156c0.246-0.103,0.522-0.103,0.769,0c0.093,0.039,0.171,0.101,0.249,0.165\tc0.023,0.02,0.053,0.027,0.074,0.049l5.805,5.805c0.391,0.391,0.391,1.023,0,1.414c-0.195,0.195-0.451,0.293-0.707,0.293\ts-0.512-0.098-0.707-0.293L17,9.383V20.33c0,0.553-0.447,1-1,1c-0.552,0-1-0.447-1-1V9.383l-4.098,4.098\tC10.512,13.872,9.879,13.872,9.488,13.481z M22.819,24.031H9.181c-0.552,0-1,0.447-1,1s0.448,1,1,1h13.639c0.553,0,1-0.447,1-1\tS23.372,24.031,22.819,24.031z"/></svg>'},"./src/javascripts/core/api/conversation-connector.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.set.difference.v2.js"),s("./node_modules/core-js/modules/esnext.set.intersection.v2.js"),s("./node_modules/core-js/modules/esnext.set.is-disjoint-from.v2.js"),s("./node_modules/core-js/modules/esnext.set.is-subset-of.v2.js"),s("./node_modules/core-js/modules/esnext.set.is-superset-of.v2.js"),s("./node_modules/core-js/modules/esnext.set.symmetric-difference.v2.js"),s("./node_modules/core-js/modules/esnext.set.union.v2.js");var r=s("./src/javascripts/core/lib/split-url-params.ts"),o=s("./node_modules/reconnecting-websocket/dist/reconnecting-websocket-mjs.js");const n=new Set;class a{#e=[];#t=null;#s=null;#r=e=>{const t=JSON.parse(e.data);this.#t&&clearInterval(this.#t),this.#t=setInterval(()=>{this.socket?.readyState===o.default.OPEN&&this.socket?.send(JSON.stringify({type:"ping"}))},3e4);try{if("attach_channel_response"===t.type){if(!t.payload.success)return void this.#o({connected:!0,ready:!1,currentState:"attach_channel_erred"});this.#o({connected:!0,ready:!0,currentState:"attach_channel_response"})}}catch(e){console.warn(e)}};#n=()=>{this.#o({connected:!1,ready:!1,currentState:"socket_closed"})};#a=()=>{this.#o({connected:!1,ready:!1,currentState:"socket_join_error"})};accessToken="";channelName="";channelTopic="";url="";async connect(e,t,s,n){this.url=e,this.accessToken=n,this.channelName=t,this.channelTopic=s;const{url:a}=(0,r.default)(this.url);this.socket=new o.default(a,[],{maxReconnectionDelay:1e4,minReconnectionDelay:500,reconnectionDelayGrowFactor:2});const i={type:"attach_channel",payload:{accessToken:this.accessToken,channelName:this.channelName}};this.#s=()=>{this.socket?.send(JSON.stringify(i)),this.#o({connected:!0,ready:!1,currentState:"socket_connected"})},this.socket?.addEventListener("open",this.#s),this.socket?.addEventListener("message",this.#r),this.socket?.addEventListener("close",this.#n),this.socket?.addEventListener("error",this.#a)}disconnect(){this.socket?.close(),this.#s&&this.socket?.removeEventListener("open",this.#s),this.socket?.removeEventListener("message",this.#r),this.socket?.removeEventListener("close",this.#n),this.socket?.removeEventListener("error",this.#a),this.#e=[]}onOpen=e=>{this?.socket?.addEventListener("open",e)};onError=e=>{this?.socket?.addEventListener("error",e)};addListener=(e,t)=>{this?.socket?.addEventListener(e,e=>t(JSON.parse(e.data)))};onMessage=e=>{this?.socket&&(this.socket.onmessage=t=>e(JSON.parse(t.data)))};removeListener=(e,t)=>{this.socket?.removeEventListener(e,t)};onConnection(e){this.#e.push(e)}#o(e){this.#e=this.#e.filter(t=>!t(e)),n.forEach(e=>e())}pushToChannel(e,t){this.socket?.send(JSON.stringify({type:e,payload:t}))}static subscribe(e){return n.add(e),()=>n.delete(e)}}},"./src/javascripts/core/api/errors/seamly-api-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});class r extends Error{constructor(e,t){super(e,{cause:t?.cause}),this.status=t?.status}}},"./src/javascripts/core/api/errors/seamly-base-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});class r extends Error{action="";langKey="";constructor(e,...t){if(super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,Object.getPrototypeOf(this)),this.originalError=e,e?.payload&&(this.originalEvent=e,this.originalError=e.payload.error,this.message=`Event of type ${e.payload.type} encountered`),!this.message&&e?.message){const t=function(e){try{return JSON.parse(e).error}catch(t){return e}}(e.message);this.message=t}e?.error&&(this.originalError=e.error)}}},"./src/javascripts/core/api/errors/seamly-configuration-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyConfigurationError",this.langKey="errors.configError"}}},"./src/javascripts/core/api/errors/seamly-general-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyGeneralError",this.langKey="errors.general",this.action="reset"}}},"./src/javascripts/core/api/errors/seamly-offline-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyOfflineError",this.langKey="errors.seamlyOffline"}}},"./src/javascripts/core/api/errors/seamly-session-expired-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlySessionExpiredError",this.action="reset"}}},"./src/javascripts/core/api/errors/seamly-unauthorized-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyUnauthorizedError",this.langKey="errors.general",this.action="reset"}}},"./src/javascripts/core/api/errors/seamly-unavailable-error.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/api/errors/seamly-base-error.ts");class o extends r.default{constructor(e,...t){super(e,...t),this.name="SeamlyUnavailableError",this.langKey="errors.seamlyUnavailable"}}},"./src/javascripts/core/api/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h}),s("./node_modules/core-js/modules/web.url-search-params.delete.js"),s("./node_modules/core-js/modules/web.url-search-params.has.js"),s("./node_modules/core-js/modules/web.url-search-params.size.js");var r=s("./src/javascripts/core/api/conversation-connector.ts"),o=s("./src/javascripts/core/api/errors/seamly-api-error.ts"),n=s("./src/javascripts/core/api/errors/seamly-configuration-error.ts"),a=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),i=s("./src/javascripts/core/api/errors/seamly-session-expired-error.ts"),c=s("./src/javascripts/core/api/errors/seamly-unauthorized-error.ts"),l=s("./src/javascripts/core/lib/debug.ts"),u=s("./src/javascripts/core/lib/store/index.ts"),d=s("./src/javascripts/core/lib/store/providers/session-storage.ts"),p=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),m=s("./src/javascripts/core/api/utils.ts");const f=(0,l.default)("seamly");class h{#i;#c;#l;#u="window";#d;#p="new";URLS={};locale="";conversation=new r.default;constructor({layoutMode:e,namespace:t,config:s,context:r}){this.store=(0,u.objectStore)(`${t}.connection${r.userLocale?`.${r.userLocale}`:""}`,s.storageProvider||d.default),this.connectionInfo={apiKey:s.key,domain:s.domain||"api.seamly-app.com",secure:!1!==s.secure&&(s.secure||!0)},this.#d={...s,sendEnvironment:s.sendEnvironment??!0,context:{...r,channelName:r.channelName||"web"}},this.#i=!1,this.connected=!1,this.configReady=!1,s.externalId&&(this.#c=s.externalId),this.#u=e,this.userResponded=!1,this.URLS={translations:{href:`/channels/api/v3/client/${this.connectionInfo.apiKey}/translations/{version}/{locale}.json`,templated:!0},config:{href:`/channels/api/v3/client/${this.connectionInfo.apiKey}/configs`,templated:!0}},window.addEventListener("pageshow",e=>{e.persisted&&this.connected&&this.connect()})}getAccessToken(){return this.store.get("accessToken")}setAccessToken(e){this.store.set("accessToken",e)}getConversationUrl(){return this.store.get("conversationUrl")}setConversationUrl(e){this.store.set("conversationUrl",e?.href)}hasConversation(){return!!this.getConversationUrl()}getChannelTopic(){return this.store.get("channelTopic")||this.store.get("channelName")}getLocale=e=>e||this.locale;#m({_links:{self:e,...t}}){this.URLS={...this.URLS,...t}}clearStore(){this.store.delete("accessToken"),this.store.delete("conversationUrl"),this.store.delete("channelName"),this.store.delete("channelTopic")}#f(e){return`${this.connectionInfo.secure?`${e}s`:e}://${this.connectionInfo.domain}`}async getTranslations(e){try{if(!this.URLS.translations?.href)throw new n.default;const t=`${this.#f("http")}${this.URLS.translations.href}`.replace("{version}",String(4)).replace("{locale}",this.getLocale(e)),s=await(0,m.fetchApi)(t,{method:"GET"});return(await s.json()).translations}catch(e){if(e.status>=500)throw new a.default(e);throw new o.default(e)}}getContext(e){const{source:t,userLocale:s,variables:r}=e;if(t&&"string"!=typeof t)throw new Error("Source must be a string");if(s){if("string"!=typeof s)throw new Error("Locale must be a string");this.#h(e,s)}if(r&&"object"!=typeof r)throw new Error("Variables must be an object");if(0===Object.keys(e).length&&e.constructor===Object)return;const o=this.#d.context?.userLocale;return{...o?{userLocale:o}:{},...e}}async downloadFile(e,t){try{const s=await(0,m.fetchApi)(`${this.#f("http")}${this.URLS.uploads.href}/${e}`,{method:"GET",headers:{Authorization:`Bearer ${this.getAccessToken()}`}}),r=document.createElement("a"),o=URL.createObjectURL(await s.blob());r.href=o,void 0!==r.download&&(r.download=t),r.click(),setTimeout(()=>{URL.revokeObjectURL(o)},6e4)}catch(e){}}uploadFile(e,t,s,r){const o=new FormData;o.append("upload",e);const n=new XMLHttpRequest;return n.open("POST",`${this.#f("http")}${this.URLS.uploads.href}`),n.setRequestHeader("Authorization",`Bearer ${this.getAccessToken()}`),n.upload.onprogress=e=>{if("function"==typeof t){const s=Math.ceil(e.loaded/e.total*100);t(s)}},n.onloadend=()=>{if(0!==n.status)if(200!==n.status&&201!==n.status||!s){if(!r)throw new Error(n.response);try{r(JSON.parse(n.response))}catch(e){r(n.response)}}else try{s(JSON.parse(n.response))}catch(e){s(n.response)}},n.send(o),n}async createConversation(){try{"function"==typeof this.#d?.getConversationAuthToken&&(this.#l=await this.#d.getConversationAuthToken());const e=await(0,m.fetchApi)(`${this.#f("http")}${this.URLS.conversations?.href}`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({externalId:this.#l?void 0:this.#c,token:this.#l})}),t=await e.json(),{conversation:s}=t,r={...s};return this.setAccessToken(s.accessToken),this.#m(t),this.URLS.conversation&&this.setConversationUrl(this.URLS.conversation),this.locale=s.context.userLocale,this.userResponded=s.userResponded,this.#p=s.status,r}catch(e){if(e.status>=500)throw new a.default(e);if(400===e.status)throw new c.default(e);if(404===e.status)throw new n.default(e);throw e}}async getConfig(){try{const e={channelName:this.#d.context.channelName,contentLocale:this.#d.context.contentLocale,environment:!0===this.#d.sendEnvironment?this.getEnvironment():this.#d.sendEnvironment,userLocale:this.#d.context.userLocale,variables:this.#d.context.variables},t=await(0,m.fetchApi)(`${this.#f("http")}${this.URLS.config?.href}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})}),s=await t.json();return this.#m(s),this.configReady=!0,s.config}catch(e){if(404===e.status)throw new n.default(e);if(e.status>=500)throw new a.default(e);throw e}}async fetchConversation(){if(!this.hasConversation())return null;try{const e=await(0,m.fetchApi)(`${this.#f("http")}${this.getConversationUrl()}`,{method:"GET",headers:{Authorization:`Bearer ${this.getAccessToken()}`}}),t=await e.json();return this.#p=t.conversation.status,this.#m(t),t.conversation}catch(e){if(401===e.status)throw new c.default(e);if(404===e.status)throw new i.default(e);if(e.status>=500)throw new a.default(e);throw e}}async getConversation(){return this.hasConversation()?this.fetchConversation():null}async getConversationIntitialState(){return this.fetchConversation()}async disconnect(){this.conversation?.disconnect&&this.conversation.disconnect(),this.connected=!1,this.configReady=!1}async connect(){this.connected=!1;const e=this.hasConversation()?void 0:await this.createConversation();return this.URLS.socket&&(this.conversation.connect(`${this.#f("ws")}${this.URLS.socket.href}`,this.#d.context.channelName||"",this.getChannelTopic(),this.getAccessToken()),this.conversation.onConnection(({connected:e,ready:t})=>{this.connected=e,this.#i=t}),this.send("context",this.#v())),e}send(e,t=void 0){this.connected&&this.#i?(f("[SEND]",e,t),this.conversation.pushToChannel(e,(0,m.buildPayload)(e,t))):this.conversation?.onConnection(({connected:s,ready:r})=>(this.connected=s,this.#i=r,!!r&&(this.send(e,t),!0)))}sendContext(e){const t=this.getContext(e);t&&this.send("context",t)}#v(){const e=!0===this.#d.sendEnvironment?this.getEnvironment():void 0,t="string"==typeof this.#d.context?.source?this.#d.context?.source:void 0,s=this.#d.context?.variables;return{contentLocale:"started"!==this.#p?this.#d.context?.contentLocale:void 0,environment:e,source:t,userLocale:"started"!==this.#p?this.#d.context?.userLocale:void 0,variables:s}}#h(e,t){e.source||t==this.#d.context?.userLocale||(e.source=p.sourceTypes.windowApi)}getEnvironment(){return{clientName:"@seamly/web-ui",clientVariant:this.#u,clientVersion:"25.1.0-beta.1",currentUrl:window.location.toString(),screenResolution:`${window.screen.width}x${window.screen.height}`,timezone:(0,m.getTimeZone)(),userAgent:navigator.userAgent,preferredLocale:navigator.language}}}},"./src/javascripts/core/api/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{buildPayload:()=>n,fetchApi:()=>a,getTimeZone:()=>i}),s("./node_modules/core-js/modules/web.url-search-params.delete.js"),s("./node_modules/core-js/modules/web.url-search-params.has.js"),s("./node_modules/core-js/modules/web.url-search-params.size.js");var r=s("./src/javascripts/core/lib/id.ts"),o=s("./src/javascripts/core/api/errors/seamly-api-error.ts");function n(e,t){if("message"!==e)return t;const{type:s,body:o}=t;let{transactionId:n}=t;return n||(n=(0,r.randomId)()),{type:s,body:o,transactionId:n}}const a=async(e,t)=>{const s=new URL(e),r=await fetch(s.href,{mode:"cors",...t});if(!r.ok)throw new o.default(r.statusText||`Request failed with status: ${r.status}`,{status:r.status});return r};function i(){if(!Intl||"undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return;const e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return;const t=e.resolvedOptions().timeZone;return t&&(t.indexOf("/")>-1||"UTC"===t)?t:void 0}},"./src/javascripts/core/config.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CSS_NAME:()=>r,activitySendDelay:()=>c,defaultConfig:()=>m,defaultTransitionTimeMs:()=>d,maxCharacterSrDebounceDelay:()=>u,maxCharacterWarningLimit:()=>l,newMessageScreenReaderWait:()=>a,screenReaderDebounceDelaySeconds:()=>i,typingTimeout:()=>p,unreadScreenReaderWait:()=>n,userParticipantId:()=>o});const r="cvco",o="seamly-client-participant",n=2e3,a=1e3,i=10,c=15e3,l=50,u=300,d=300,p=2e3,m={namespace:"default",layoutMode:"window",messages:{agent:{showAvatar:!1,showName:!1},user:{showAvatar:!1,showName:!1},timeIndicator:{enabled:!1,threshold:36e5}}}},"./src/javascripts/core/domains/app/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{initializeApp:()=>u,resetApp:()=>d});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/api/errors/seamly-session-expired-error.ts"),n=s("./src/javascripts/core/api/errors/seamly-unavailable-error.ts"),a=s("./src/javascripts/core/domains/config/actions.ts"),i=s("./src/javascripts/core/domains/redux/create-debounced-async-thunk.ts"),c=s("./src/javascripts/core/domains/visibility/actions.ts"),l=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const u=(0,r.createAsyncThunk)("initializeApp",async(e,{extra:{api:t,config:s},rejectWithValue:r})=>{const a=s?.context?.contentLocale,i=s?.context?.userLocale;try{return t.hasConversation()?{initialState:await t.getConversationIntitialState(),contentLocale:a,userLocale:i,config:s}:(s?.context?.topic&&t.send("action",{type:l.actionTypes.setTopic,body:{name:s.context.topic,fallbackMessage:s.context.topic}}),{initialState:void 0,contentLocale:a,userLocale:i,config:s})}catch(e){if(e instanceof o.default){const e=new o.default;return r({name:e.name,message:e.message,originalEvent:e.originalEvent,originalError:e.originalError,action:e.action})}const t=new n.default;return r({name:t.name,message:t.message,langKey:t.langKey})}}),d=(0,i.default)("resetApp",async(e,{dispatch:t,extra:{api:s}})=>{await s.disconnect(),s.clearStore(),t((0,a.resetConfig)()),await t((0,a.initializeConfig)()),await t(u()),t((0,c.initializeVisibility)())},{wait:2e3,leading:!0})},"./src/javascripts/core/domains/app/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useUserHasResponded:()=>n});var r=s("./src/javascripts/core/domains/app/selectors.ts"),o=s("./node_modules/react-redux/dist/react-redux.mjs");const n=()=>(0,o.useSelector)(r.selectUserHasResponded)},"./src/javascripts/core/domains/app/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectUserHasResponded:()=>r});const r=(0,s("./node_modules/reselect/dist/reselect.mjs").createSelector)(({app:e})=>e,({userHasResponded:e})=>e)},"./src/javascripts/core/domains/app/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{appSlice:()=>a,default:()=>c,setHasResponded:()=>i});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts");const n={userHasResponded:!1},a=(0,r.createSlice)({name:"app",initialState:n,reducers:{setHasResponded:(e,{payload:t})=>{e.userHasResponded=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,()=>n).addCase(o.initializeApp.fulfilled,(e,{payload:t})=>{t.initialState&&"userResponded"in t.initialState&&(e.userHasResponded=t.initialState.userResponded||!1)})}}),{setHasResponded:i}=a.actions,c=a.reducer},"./src/javascripts/core/domains/config/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{initializeConfig:()=>o,resetConfig:()=>n});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs");const o=(0,r.createAsyncThunk)("initializeConfig",async(e,{extra:{api:t,config:s},rejectWithValue:r})=>{try{const{features:e,preChat:r,agentParticipant:o,defaultContentLocale:n,defaultUserLocale:a,userParticipant:i,startChatIcon:c}=await t.getConfig(),{connectWhenInView:l}=s;return{features:e,preChat:r,agentParticipant:o,userParticipant:i,startChatIcon:c,defaultUserLocale:s?.context?.userLocale||a,defaultContentLocale:s?.context?.contentLocale||n,connectWhenInView:l}}catch(e){return r(e)}}),n=(0,r.createAsyncThunk)("resetConfig",async(e,{extra:{config:t}})=>t)},"./src/javascripts/core/domains/config/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useConfig:()=>n,useParticipants:()=>a,useStartChatIcon:()=>i});var r=s("./src/javascripts/core/domains/config/selectors.ts"),o=s("./node_modules/react-redux/dist/react-redux.mjs");const n=()=>(0,o.useSelector)(r.selectConfig);function a(){const{agentParticipant:e,userParticipant:t}=n();return{agent:e,user:t}}function i(){const{startChatIcon:e}=n();return e}},"./src/javascripts/core/domains/config/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectConfig:()=>n});var r=s("./node_modules/reselect/dist/reselect.mjs"),o=s("./src/javascripts/core/domains/visibility/constants.ts");const n=(0,r.createSelector)(({config:e})=>e,e=>{let t={visible:"inline"===e?.layoutMode?o.visibilityStates.open:o.visibilityStates.minimized,appContainerClassNames:e?.appContainerClassNames||[],...e};return"function"==typeof t.appContainerClassNames&&(t={...t,appContainerClassNames:t.appContainerClassNames(t)}),t})},"./src/javascripts/core/domains/config/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{configSlice:()=>u,default:()=>f,initialConfigState:()=>i,setConfig:()=>d,setPreChatEvents:()=>m,updateConfig:()=>p}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/config.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/ui/utils/general-utils.ts");const i={...o.defaultConfig,alwaysShowEntryLabel:!1,api:{domain:"",key:"",secure:!0,sendEnvironment:!0},context:{},notificationAudioURL:void 0,hideOnNoUserResponse:!1,connectWhenInView:!0,showDisclaimer:!1,showSuggestions:!0,preChat:{enterDelay:1e3,exitAfter:4e3},continueChat:{enterDelay:0,exitAfter:2e3},customComponents:{},defaults:{visible:null},preChatEvents:[],parentElement:void 0,layoutMode:"window"},c=["alwaysShowEntryLabel","hideOnNoUserResponse","connectWhenInView","showDisclaimer","showSuggestions","continueChat","preChat","namespace","customComponents","defaults","layoutMode","api","zIndex","context","appContainerClassNames","messages","visible","visibilityCallback","errorCallback","agentParticipant","userParticipant","startChatIcon","notificationAudioURL"],l=(e,t)=>{const{messages:s,...r}=(0,a.pick)(t,c);let o=e;return Object.keys(r).length>0&&(o={...o,...r}),s&&(o={...o,messages:{...o.messages,...s}}),o},u=(0,r.createSlice)({name:"config",initialState:i,reducers:{setConfig:(e,{payload:t})=>l(e,t),updateConfig:(e,{payload:t})=>l(e,t),setPreChatEvents:(e,{payload:t})=>{e.preChatEvents=t}},extraReducers:e=>{e.addCase(n.resetConfig.fulfilled,e=>e).addCase(n.initializeConfig.fulfilled,(e,{payload:{preChat:t,agentParticipant:s,userParticipant:r,startChatIcon:o,defaultContentLocale:n,defaultUserLocale:a}})=>{e.preChatEvents=t.map(e=>({type:"message",payload:e})),e.context.contentLocale=n,e.context.userLocale=a,e.agentParticipant=s,e.userParticipant=r,e.startChatIcon=o||""})}}),{setConfig:d,updateConfig:p,setPreChatEvents:m}=u.actions,f=u.reducer},"./src/javascripts/core/domains/errors/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{catchError:()=>m,createErrorsMiddleware:()=>f});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/api/errors/seamly-base-error.ts"),n=s("./src/javascripts/core/api/errors/seamly-configuration-error.ts"),a=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),i=s("./src/javascripts/core/api/errors/seamly-offline-error.ts"),c=s("./src/javascripts/core/api/errors/seamly-session-expired-error.ts"),l=s("./src/javascripts/core/api/errors/seamly-unauthorized-error.ts"),u=s("./src/javascripts/core/api/errors/seamly-unavailable-error.ts"),d=s("./src/javascripts/core/domains/config/selectors.ts");const p={SeamlyGeneralError:a.default,SeamlyConfigurationError:n.default,SeamlySessionExpiredError:c.default,SeamlyOfflineError:i.default,SeamlyUnauthorizedError:l.default,SeamlyUnavailableError:u.default},m=(0,r.createAction)("catch-error",e=>({payload:e}));function f({api:e}){return({getState:t})=>{const s=s=>{const{errorCallback:r,namespace:n,api:a,layoutMode:i}=(0,d.selectConfig)(t()),{error:c,type:l}=s,u=p[c?.name]?new p[c.name](c):new o.default(c);r?.(u,{namespace:n,api:a,layoutMode:i,conversationUrl:e.getConversationUrl(),action:l?s:void 0})};return e=>t=>{try{return t.payload?.originalEvent?.payload?s({error:t.payload,type:t.payload?.originalEvent?.payload?.type}):t.payload?.originalError&&s({error:t.payload,type:void 0}),e(t)}catch(e){throw s({error:e}),e}}}}},"./src/javascripts/core/domains/forms/context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Consumer:()=>n,Provider:()=>o,default:()=>a});const r=(0,s("preact").createContext)({handleSubmit:()=>{},isSubmitted:!1,isValid:!1,updateControlValue:()=>{},updateControlTouched:()=>{},errors:void 0}),{Provider:o,Consumer:n}=r,a=r},"./src/javascripts/core/domains/forms/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useForm:()=>d,useFormContext:()=>u,useFormControl:()=>m,useValidations:()=>p});var r=s("./src/javascripts/core/domains/forms/selectors.ts"),o=s("./src/javascripts/core/domains/forms/slice.ts"),n=s("./src/javascripts/core/domains/store/index.ts"),a=s("preact/hooks"),i=s("./node_modules/react-redux/dist/react-redux.mjs"),c=s("./src/javascripts/core/domains/forms/context.ts"),l=s("./src/javascripts/core/domains/forms/utils.ts");function u(){return(0,a.useContext)(c.default)}function d(){const{handleSubmit:e,isSubmitted:t,isValid:s}=u();return{handleSubmit:e,isSubmitted:t,isValid:s}}function p(e,t){const s=(0,a.useMemo)(()=>(0,l.validate)(e,t),[e,t]);return{isValid:0===Object.keys(s).length,errors:s}}function m(e){const t=(0,n.useAppDispatch)(),{formId:s,updateControlValue:c,updateControlTouched:l,errors:d}=u(),p=!!(0,i.useSelector)(e=>(0,r.getFormById)(e,{formId:s})),m=(0,i.useSelector)(t=>(0,r.getControlValueByName)(t,{formId:s,name:e})),f=(0,i.useSelector)(t=>(0,r.getControlTouchedByName)(t,{formId:s,name:e})),h=d?.[e],v=!h;(0,a.useEffect)(()=>{p&&t((0,o.registerControl)({formId:s,name:e}))},[p,s,e,t]),(0,a.useLayoutEffect)(()=>()=>{t((0,o.deregisterControl)({formId:s,name:e}))},[p,s,e,t]);const y=(0,a.useCallback)(t=>c(e,t.target.value),[e,c]),j=(0,a.useCallback)(()=>{l(e,!0)},[l,e]);return[(0,a.useMemo)(()=>({name:e,onInput:y,onBlur:j,value:m}),[e,y,j,m]),(0,a.useMemo)(()=>({isValid:v,error:h,touched:f}),[v,h,f])]}},"./src/javascripts/core/domains/forms/provider.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/javascripts/core/domains/app/slice.ts"),o=s("./src/javascripts/core/domains/forms/context.ts"),n=s("./src/javascripts/core/domains/forms/hooks.ts"),a=s("./src/javascripts/core/domains/forms/selectors.ts"),i=s("./src/javascripts/core/domains/forms/slice.ts"),c=s("./src/javascripts/core/domains/store/index.ts"),l=s("preact/hooks"),u=s("./node_modules/react-redux/dist/react-redux.mjs"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=({children:e,formId:t,persistData:s=!1,onError:p,onSubmit:m,validationSchema:f={},...h})=>{const v=(0,c.useAppDispatch)(),y=(0,u.useSelector)(e=>(0,a.getFormValuesByFormId)(e,{formId:t})),[j,g]=(0,l.useState)(!1),[b,x]=(0,l.useState)({}),{isValid:_,errors:w}=(0,n.useValidations)(y,f),S=(0,l.useMemo)(()=>({...w,...b}),[w,b]);(0,l.useLayoutEffect)(()=>{v((0,i.registerForm)({formId:t,persistData:s}))},[t,s,v]),(0,l.useEffect)(()=>()=>{v((0,i.deregisterForm)({formId:t}))},[t,s,v]);const k=(0,l.useCallback)((e,s)=>{v((0,i.updateControlValue)({formId:t,name:e,value:s}))},[t,v]),C=(0,l.useCallback)((e,s)=>{v((0,i.updateControlTouched)({formId:t,name:e,touched:s}))},[v,t]),E=(0,l.useCallback)((e,t)=>{x(s=>({...s,[e]:t}))},[x]),T=(0,l.useCallback)(e=>{e.preventDefault();const t="true"===e.submitter.getAttribute("aria-disabled");g(!t),!t&&_&&(v((0,r.setHasResponded)(!0)),m(y,{updateControlValue:k,setError:E}))},[_,v,m,y,k,E]);(0,l.useEffect)(()=>{p&&p({errors:S,isSubmitted:j,isValid:0===Object.keys(S).length})},[j,S,p]);const N=(0,l.useMemo)(()=>({formId:t,values:y,errors:S,isValid:0===Object.keys(S).length,isSubmitted:j,handleSubmit:T,validationSchema:f,updateControlValue:k,updateControlTouched:C}),[t,y,S,j,T,f,k,C]);return t?m?(0,d.jsx)(o.Provider,{...h,value:N,children:e}):(console.error('"onSubmit" is required.'),null):(console.error('"formId" is required.'),null)}},"./src/javascripts/core/domains/forms/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getControlTouchedByName:()=>c,getControlValueByName:()=>i,getFormById:()=>o,getFormValuesByFormId:()=>a}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js");var r=s("./node_modules/reselect/dist/reselect.mjs");const o=(0,r.createSelector)([({forms:e})=>e,(e,{formId:t})=>t],(e,t)=>e[t]),n=(0,r.createSelector)(o,e=>e?.controls||{}),a=(0,r.createSelector)(n,e=>{const t={};return Object.entries(e).forEach(([e,{value:s}])=>{t[e]=s}),t}),i=(0,r.createSelector)([n,(e,{name:t})=>t],(e,t)=>e[t]?.value),c=(0,r.createSelector)([n,(e,{name:t})=>t],(e,t)=>e[t]?.touched)},"./src/javascripts/core/domains/forms/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h,deregisterControl:()=>p,deregisterForm:()=>u,formsSlice:()=>c,registerControl:()=>d,registerForm:()=>l,updateControlTouched:()=>f,updateControlValue:()=>m});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts");const n={controls:{}},a={touched:!1},i={controls:a},c=(0,r.createSlice)({name:"forms",initialState:i,reducers:{registerForm:(e,{payload:{persistData:t,formId:s}})=>{const r=t?e[s]??{...n,persistData:t}:{...n,persistData:t};e[s]=r},deregisterForm:(e,{payload:{formId:t}})=>(e[t]?.persistData||delete e[t],e),registerControl:(e,{payload:{name:t,formId:s}})=>{e[s].controls={[t]:a}},deregisterControl:(e,{payload:{name:t,formId:s}})=>{const r=e[s];if(!r)return e;if(r.persistData)return e;const o={...r.controls};return delete o[t],{...e,[s]:{...r,controls:o}}},updateControlValue:(e,{payload:{formId:t,name:s,value:r}})=>{e[t]?.controls&&(e[t].controls[s].value=r)},updateControlTouched:(e,{payload:{formId:t,name:s,touched:r}})=>{e[t]?.controls[s]&&(e[t].controls[s].touched=r)}},extraReducers:e=>{e.addCase(o.resetApp.pending,()=>i)}}),{registerForm:l,deregisterForm:u,registerControl:d,deregisterControl:p,updateControlValue:m,updateControlTouched:f}=c.actions,h=c.reducer},"./src/javascripts/core/domains/forms/utils.ts":(e,t,s)=>{"use strict";function r(e,t={}){return Object.entries(t).reduce((t,[s,r])=>{const o=Array.isArray(r)?r:[r];for(let r=0;r<o.length;r++)if(!o[r].fn(e[s],o[r].compareValue)){t[s]=o[r].errorText;break}return t},{})}s.r(t),s.d(t,{validate:()=>r}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js")},"./src/javascripts/core/domains/i18n/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{setLocale:()=>r});const r=(0,s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs").createAsyncThunk)("setLocale",async(e,{extra:{api:t},rejectWithValue:s})=>{try{return{translations:await t.getTranslations(e),userLocale:e}}catch(e){return s(e)}},{condition:(e,{getState:t})=>{const{i18n:{isLoading:s,userLocale:r}}=t();return e!==r&&!s}})},"./src/javascripts/core/domains/i18n/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useI18n:()=>c});var r=s("./node_modules/@ultraq/icu-message-formatter/dist/icu-message-formatter.js"),o=s("./src/javascripts/core/domains/i18n/selectors.ts"),n=s("preact/hooks"),a=s("./node_modules/react-redux/dist/react-redux.mjs");const i=new r.MessageFormatter("en-GB",{plural:r.pluralTypeHandler,select:r.selectTypeHandler});function c(){const e=(0,a.useSelector)(o.selectTranslations),t=(0,a.useSelector)(o.selectLocale),s=(0,a.useSelector)(o.selectInitialLocale),r=(0,a.useSelector)(o.selectIsLoading);return{t:(0,n.useCallback)((s,o={})=>{if(!e)return"";const n=e[s];return n?i.format(n,o):(r||console.warn(`Translation key: ${s} is missing in locale: ${t}`),"")},[e,t,r]),userLocale:t,initialLocale:s}}},"./src/javascripts/core/domains/i18n/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectInitialLocale:()=>n,selectIsLoading:()=>i,selectLocale:()=>a,selectTranslations:()=>o});var r=s("./node_modules/reselect/dist/reselect.mjs");const o=(0,r.createSelector)(({i18n:e})=>e,({translations:e})=>e),n=(0,r.createSelector)(({i18n:e})=>e,({initialLocale:e})=>e),a=(0,r.createSelector)(({i18n:e})=>e,({userLocale:e})=>e),i=(0,r.createSelector)(({i18n:e})=>e,({isLoading:e})=>e)},"./src/javascripts/core/domains/i18n/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d,i18nSlice:()=>c,setInitialLocale:()=>l,setTranslations:()=>u}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/domains/i18n/actions.ts");const i={translations:{"errors.configError.message":"We are sorry this happened, please retry at a later time.","errors.configError.srText":"A chat configuration error occurred. Our apologies, please retry at a later time.","errors.configError.title":"Chat configuration error.","errors.general.buttonText":"Restart chat","errors.general.message":"Do you want to start a new chat session?","errors.general.srText":"Something went wrong with the chat session. You can restart the chat.","errors.general.title":"Something went wrong","errors.seamlyOffline.message":"There might be a problem with your or our network connection. The chat session should resume as soon the connection is available again.","errors.seamlyOffline.srText":"The chat has connection issues. There might be a problem with your or our network connection. The chat session should resume as soon as the connection is available again.","errors.seamlyOffline.title":"Connection issues","errors.seamlyUnavailable.buttonText":"Try again","errors.seamlyUnavailable.message":"The server could not be reached. Try again in a little while.","errors.seamlyUnavailable.srText":"The chat server could not be reached. Try again in a little while.","errors.seamlyUnavailable.title":"Server unavailable"},isLoading:!1,initialLocale:void 0,userLocale:void 0},c=(0,r.createSlice)({name:"app",initialState:i,reducers:{setInitialLocale:(e,t)=>{e.initialLocale=t.payload},setTranslations:(e,{payload:t})=>{e.translations=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,()=>i).addCase(n.initializeConfig.fulfilled,(e,{payload:t})=>{e.initialLocale=t.defaultUserLocale}).addCase(a.setLocale.pending,e=>{e.isLoading=!0}).addCase(a.setLocale.rejected,e=>{e.isLoading=!1}).addCase(a.setLocale.fulfilled,(e,{payload:t})=>{e.isLoading=!1,t?.translations&&(e.userLocale=t.userLocale,e.translations=Object.keys(t.translations).sort().reduce((e,s)=>{if(!t.translations)return e;const r=t.translations[s];return e[s]=r,e},{}))})}}),{setInitialLocale:l,setTranslations:u}=c.actions,d=c.reducer},"./src/javascripts/core/domains/interrupt/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useInterrupt:()=>i});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("preact/hooks"),n=s("./node_modules/react-redux/dist/react-redux.mjs"),a=s("./src/javascripts/core/domains/interrupt/selectors.ts");function i(){const{t:e}=(0,r.useI18n)(),t=(0,n.useSelector)(a.selectError);return{hasError:(0,n.useSelector)(a.selectHasError),meta:(0,o.useMemo)(()=>{if(!t)return{title:void 0,message:void 0,srText:void 0,buttonText:void 0,originalError:void 0,action:void 0};const{langKey:s,action:r}=t,o=e(`${s}.title`),n=e(`${s}.message`),a=e(`${s}.srText`),i=r?e(`${s}.buttonText`):null;return{...s?{title:o,message:n,srText:a}:{},...r?{action:r}:{},...r&&s?{buttonText:i}:{},originalError:t}},[t,e]),error:t}}},"./src/javascripts/core/domains/interrupt/middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),o=s("./src/javascripts/core/domains/interrupt/slice.ts");const n=["SeamlyGeneralError","SeamlyConfigurationError","SeamlySessionExpiredError","SeamlyOfflineError","SeamlyUnauthorizedError","SeamlyUnavailableError"];function a({api:e}){return()=>t=>s=>{const{payload:a,type:i}=s;if(i===o.setInterrupt.type){if(!n.includes(a.name))throw new r.default(a);"reset"===a.action&&e.disconnect().then(()=>{e.clearStore()})}return t(s)}}},"./src/javascripts/core/domains/interrupt/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectError:()=>o,selectHasError:()=>n});var r=s("./node_modules/reselect/dist/reselect.mjs");const o=(0,r.createSelector)(({interrupt:e})=>e,({error:e})=>e),n=(0,r.createSelector)(o,e=>Boolean(e))},"./src/javascripts/core/domains/interrupt/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{clearInterrupt:()=>p,default:()=>m,interruptSlice:()=>u,setInterrupt:()=>d});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/domains/i18n/actions.ts"),i=s("./src/javascripts/core/domains/store/actions.ts"),c=s("./src/javascripts/core/domains/visibility/actions.ts");const l={error:void 0},u=(0,r.createSlice)({name:"interrupt",initialState:l,reducers:{setInterrupt:(e,t)=>{e.error=t.payload},clearInterrupt:()=>l},extraReducers:e=>{e.addCase(n.initializeConfig.pending,()=>l).addMatcher((0,r.isAnyOf)(o.initializeApp.rejected,n.initializeConfig.rejected,a.setLocale.rejected,c.setVisibility.rejected,c.initializeVisibility.rejected,i.getConversation.rejected),(e,{payload:t})=>{e.error=t})}}),{setInterrupt:d,clearInterrupt:p}=u.actions,m=u.reducer},"./src/javascripts/core/domains/options/middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./src/javascripts/core/domains/store/slice.ts");function o({api:e}){return()=>t=>s=>{const o=t(s);switch(s.type){case r.setUserSelectedOptions.toString():e.store.set("options",s.payload);break;case r.setUserSelectedOption.toString():e.store.set("options",{...e.store.get("options")||{},[s.payload.option]:s.payload.value})}return o}}},"./src/javascripts/core/domains/redux/create-debounced-async-thunk.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs");const o=(e,t,s)=>{const{wait:o=300,maxWait:n=0,leading:a=!1}=s??{};let i,c=null,l=null;const u=()=>{l&&clearTimeout(l),l=void 0,i&&(i(!0),i=void 0)};return(0,r.createAsyncThunk)(e,t,{condition:()=>{const e=a&&!c;return c&&clearTimeout(c),c=setTimeout(()=>{u(),c=null},o),!!e||(i&&(i(!1),i=void 0),n&&!l&&(l=setTimeout(u,n)),new Promise(e=>{i=e}))}})}},"./src/javascripts/core/domains/store/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getConversation:()=>r});const r=(0,s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs").createAsyncThunk)("getConversation",async(e,{extra:{api:t},rejectWithValue:s})=>{try{const e=await t.getConversation();if(!e)throw new Error("No conversation found");return e}catch(e){return s({name:e?.name,message:e?.message,langKey:e?.langKey,action:e?.action,originalEvent:e?.originalEvent,originalError:e?.originalError})}},{condition(e,{getState:t}){const{state:{events:s}}=t(),r=s.at(-1);return r&&("lastEvent"in e?e?.lastEvent?.id:e?.body?.lastEvent?.id)!==r.payload.id}})},"./src/javascripts/core/domains/store/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{createStore:()=>g,useAppDispatch:()=>b});var r=s("./node_modules/redux/dist/redux.mjs"),o=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),n=s("./src/javascripts/core/domains/app/slice.ts"),a=s("./src/javascripts/core/domains/config/slice.ts"),i=s("./src/javascripts/core/domains/errors/index.ts"),c=s("./src/javascripts/core/domains/forms/slice.ts"),l=s("./src/javascripts/core/domains/i18n/slice.ts"),u=s("./src/javascripts/core/domains/interrupt/middleware.ts"),d=s("./src/javascripts/core/domains/interrupt/slice.ts"),p=s("./src/javascripts/core/domains/options/middleware.ts"),m=s("./src/javascripts/core/domains/store/slice.ts"),f=s("./src/javascripts/core/domains/translations/middleware.ts"),h=s("./src/javascripts/core/domains/translations/slice.ts"),v=s("./src/javascripts/core/domains/visibility/slice.ts"),y=s("./node_modules/react-redux/dist/react-redux.mjs");const j=(0,r.combineReducers)({state:m.default,app:n.default,config:a.default,i18n:l.default,translations:h.default,visibility:v.default,forms:c.default,interrupt:d.default});function g({initialState:e,api:t,eventBus:s,config:r}){return(0,o.configureStore)({reducer:j,preloadedState:e,middleware:e=>e({thunk:{extraArgument:{api:t,eventBus:s,config:r}},serializableCheck:!1}).concat((0,i.createErrorsMiddleware)({api:t}),(0,u.default)({api:t}),(0,p.default)({api:t}),f.default)})}const b=y.useDispatch},"./src/javascripts/core/domains/store/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectLastUnreadEvent:()=>c,selectShowNotifications:()=>u,selectUnreadEventIds:()=>l,selectUnreadEvents:()=>i}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/reselect/dist/reselect.mjs"),o=s("./src/javascripts/core/domains/store/slice.ts"),n=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),a=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const i=(0,r.createSelector)(n.selectEvents,e=>e.filter(e=>(0,o.isUnreadMessage)(e)&&"service_data"!==e.type&&e.payload?.messageStatus===a.readStates.received)),c=(0,r.createSelector)([i],e=>e.filter(e=>"participant"!==e.type).at(-1)),l=(0,r.createSelector)(i,e=>e.filter(({payload:e})=>e?.id).map(({payload:e})=>e.id)),u=(0,r.createSelector)(({state:e})=>e.options.features?.webNotifications,e=>e?.enabled)},"./src/javascripts/core/domains/store/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{addEvent:()=>v,calculateNewEntryMeta:()=>m,clearAbortTransaction:()=>G,clearAllUploads:()=>j,clearEvents:()=>g,clearFeatures:()=>b,clearIdleDetachCountdown:()=>x,clearResumeConversationPrompt:()=>_,decrementIdleDetachCountdownCounter:()=>w,default:()=>re,doneProcessingImage:()=>Y,hideOption:()=>S,initIdleDetachCountdown:()=>k,initResumeConversationPrompt:()=>C,initialStoreState:()=>f,isUnreadMessage:()=>l,mergeEvents:()=>d,orderEvents:()=>u,registerUpload:()=>E,setActiveEntryType:()=>T,setActiveService:()=>N,setBlockAutoEntrySwitch:()=>I,setEvents:()=>D,setEventsRead:()=>O,setFeatureEnabledState:()=>A,setFeatures:()=>L,setHeaderSubTitle:()=>R,setHeaderTitle:()=>M,setInitialState:()=>F,setIsLoading:()=>U,setLoadedImageEventIds:()=>z,setParticipant:()=>B,setProactiveMessages:()=>se,setSeamlyContainerElement:()=>V,setServiceDataItem:()=>$,setServiceEntryMetadata:()=>H,setUploadComplete:()=>W,setUploadError:()=>q,setUploadProgress:()=>K,setUserEntryType:()=>X,setUserSelectedOption:()=>Q,setUserSelectedOptions:()=>Z,showOption:()=>ee,startProcessingImage:()=>J,stopIdleDetachCountdownCounter:()=>te,storeSlice:()=>h,updateEvent:()=>y,updateFeatures:()=>P}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.find.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/lib/id.ts"),i=s("./src/javascripts/core/ui/utils/general-utils.ts"),c=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const l=({type:e,payload:t})=>"hidden"===document.visibilityState||e===c.eventTypes.message&&!t.fromClient||e===c.eventTypes.info&&t.type===c.payloadTypes.text,u=e=>e.sort(({payload:{occurredAt:e=0}},{payload:{occurredAt:t=0}})=>e-t),d=(e,t)=>{const s=e.filter(e=>"message"===e.type&&!e.payload.optimisticallyInjected&&!t.some(t=>t.payload?.id===e.payload.id)),r=t.filter(({type:e,payload:t})=>!("participant"===e&&!t?.participant?.introduction)).reverse();return u([...r,...s])},p=(e,t)=>{if(!e)return{participants:{},currentAgent:""};const{participants:s}=e||{participants:{}},{id:r,avatar:o,name:n,introduction:a}=t.participant,i=s[r],c={...s,[r]:i?{...i,...o?{avatar:o}:{},...n?{name:n}:{},...a?{introduction:a}:{}}:t.participant};return{...e,participants:c,currentAgent:e.currentAgent===r||t.fromClient?e.currentAgent:r}},m=(e,t)=>{if(!0===t?.payload?.fromClient||"message"!==t?.type)return e;const s=t?.payload?.translatedEntry||t?.payload?.entry,{blockAutoEntrySwitch:r}=e,o=t?.payload?.actions||{},n=t?.payload?.translatedActions||{},{type:a,options:i}=s||{};let c=e.active;return r||a===e.userSelected||(c=a),{...e,active:c,optionsOverride:{...a?{[a]:i}:{}},actions:o,translatedActions:n}},f={events:[],isLastEventFromClient:!1,initialState:{userResponded:!1,context:{contentLocale:"",translationActive:!1,userLocale:""}},unreadEvents:0,userHasResponded:!1,loadedImageEventIds:[],isLoading:!1,idleDetachCountdown:{hasCountdown:!1,isActive:!1,remaining:void 0,wasStopped:void 0,count:void 0,timer:void 0},resumeConversationPrompt:!1,serviceInfo:{activeServiceSessionId:"",proactiveMessages:!1},participantInfo:{participants:{},currentAgent:""},headerTitles:{title:null,subTitle:""},historyLoaded:!1,skiplinkTargetId:(0,a.randomId)(),optionsButtonId:(0,a.randomId)(),headerCollapseButtonId:(0,a.randomId)(),windowOpenButtonId:(0,a.randomId)(),serviceData:{},options:{features:{webNotifications:{enabled:!1}},panelActive:!1,optionActive:"",userSelectedOptions:{}},showFileUpload:!1,currentUploads:[],processingFileUploads:[],entryMeta:{default:c.entryTypes.text,optionsOverride:{},defaultEntry:c.entryTypes.text,active:c.entryTypes.text,userSelected:null,blockAutoEntrySwitch:!1,options:{},actions:{},translatedActions:{}},seamlyContainerElement:null},h=(0,r.createSlice)({name:"store",initialState:f,reducers:{addEvent:(e,t)=>{const{type:s,payload:r}=t.payload,o=Object.prototype.hasOwnProperty.call(e.options.features,c.featureKeys.uploads);let n={...e.options};if(o&&(s===c.eventTypes.message||s===c.eventTypes.participant)&&!r.fromClient){const e="message"===s?r.entry?.type:void 0;n={...n,features:{...n.features,uploads:{enabled:n.features.uploads?.enabled||!1,...n.features?.uploads||{},enabledFromEntry:e===c.entryTypes.upload}}}}const i=l(t.payload);if(!e.events.find(e=>e.payload.id===r.id)){if(!e.events.find(e=>"transactionId"in e.payload&&"transactionId"in r&&e.payload.transactionId===r.transactionId&&(!t.payload.type||e.type===t.payload.type)&&r.fromClient)){const l=m(e.entryMeta,t.payload);e.entryMeta=o||l.active!==c.entryTypes.upload?l:{...e.entryMeta},e.options=n,i&&(e.unreadEvents+=1,"service_data"!==s&&(t.payload.payload.messageStatus=r.fromClient?c.readStates.read:c.readStates.received)),t.payload.payload.key=(0,a.randomId)(),e.events.push(t.payload),e.events=u(e.events)}r.fromClient&&(e.isLastEventFromClient=r.fromClient)}},updateEvent:(e,{payload:t})=>{const s=e.events.find(e=>"service_data"!==e.type&&"service_data"!==t.type&&e.payload.transactionId===t.payload.transactionId);s?(s.payload.id=t.payload.id,s.payload.occurredAt=t.payload.occurredAt):e.events.push(t),e.events=u(e.events)},clearEvents:e=>{e.unreadEvents=0,e.loadedImageEventIds=[],e.events=[]},setEventsRead:(e,{payload:t})=>{e.unreadEvents=0,e.events.forEach(e=>(e.payload.id&&-1!==t.indexOf(e.payload.id)&&(e.payload={...e.payload,..."service_data"!==e.type&&e.payload.messageStatus===c.readStates.received&&{messageStatus:c.readStates.read}}),e))},setLoadedImageEventIds:(e,{payload:t})=>{e.loadedImageEventIds.push(t)},setEvents:(e,{payload:{messages:t,unreadMessageCount:s,userResponded:r,participants:o,service:n,serviceData:a,ui:i}})=>{const l=d(e.events,t),u=Object.fromEntries(Object.entries(o).map(([e,t])=>[t.id,t])),f=t.find(e=>"participant"===e.type),h=f?.payload?.participant?.id,{entry:v}=n?.settings||{},y=m({...e.entryMeta,...v,active:c.payloadTypes.text,options:{...v?.options}},l.findLast(e=>"message"===e.type));let j={...e.options.features};const g=t.find(e=>!e.payload.fromClient&&["message","participant"].includes(e.type)),b=Object.prototype.hasOwnProperty.call(j,c.featureKeys.uploads);if(b&&"message"===g?.type){const e=g.payload.entry?.type||"";j={...j,uploads:{enabled:j.uploads?.enabled||!1,enabledFromEntry:e===c.entryTypes.upload}}}e.unreadEvents=s,e.userHasResponded=r,e.events=l.filter(e=>"participant"!==e.type||!!e.payload.participant?.introduction),e.participantInfo={...e.participantInfo,...h?p(e.participantInfo,{participant:u[h]}):{},participants:u},e.historyLoaded=!0,e.serviceInfo={...e.serviceInfo,proactiveMessages:n?.settings?.proactiveMessages?.enabled||!1,activeServiceSessionId:n?.sessionId},e.serviceData={...e.serviceData,...a},e.options={...e.options,features:j},e.entryMeta=b||y.active!==c.entryTypes.upload?y:{...e.entryMeta},e.resumeConversationPrompt=i.resumeConversationPrompt||!1,h&&(e.headerTitles.subTitle=u[h]?.name)},setIsLoading:(e,{payload:t})=>{e.isLoading=t},initIdleDetachCountdown:(e,{payload:t})=>{const{delaySeconds:s,delayTime:r}=t;e.idleDetachCountdown={hasCountdown:!0,isActive:!0,wasStopped:!1,count:s,remaining:s,timer:r}},decrementIdleDetachCountdownCounter:e=>{const{idleDetachCountdown:t}=e,{remaining:s=0}=t,r=s-1;e.idleDetachCountdown.remaining=r,e.idleDetachCountdown.timer=(0,i.getTimeFromSeconds)(r)},stopIdleDetachCountdownCounter:e=>{e.idleDetachCountdown.isActive=!1,e.idleDetachCountdown.wasStopped=!0},clearIdleDetachCountdown:e=>{e.idleDetachCountdown.hasCountdown=!1,e.idleDetachCountdown.isActive=!1},initResumeConversationPrompt:e=>{e.resumeConversationPrompt=!0},clearResumeConversationPrompt:e=>{e.resumeConversationPrompt=!1},setParticipant:(e,{payload:t})=>{e.participantInfo=p(e.participantInfo,{participant:t.participant,fromClient:t.fromClient})},setActiveService:(e,{payload:t})=>{e.serviceInfo.activeServiceSessionId!==t&&(e.serviceInfo.activeServiceSessionId=t)},setHeaderTitle:(e,{payload:t})=>{e.headerTitles.title=t},setHeaderSubTitle:(e,{payload:t})=>{e.headerTitles.subTitle=t},setInitialState:(e,{payload:t})=>{e.initialState=t,e.unreadEvents=f.unreadEvents},setServiceDataItem:(e,{payload:t})=>{e.serviceData[t.type]=t},setFeatures:(e,{payload:t})=>{t.features&&(e.options.features=t.features)},updateFeatures:(e,{payload:t})=>{Object.entries(t).forEach(([t,s])=>{e.options.features[t]=s})},setFeatureEnabledState:(e,{payload:t})=>{Object.prototype.hasOwnProperty.call(e.options.features,t.key)&&(e.options.features[t.key].enabled=t.enabled)},clearFeatures:e=>{e.options.features={webNotifications:e.options.features.webNotifications}},showOption:(e,{payload:t})=>{e.options.panelActive=!0,e.options.optionActive=t},hideOption:e=>{e.options.panelActive=!1,e.options.optionActive=""},setUserSelectedOptions:(e,{payload:t})=>{e.options.userSelectedOptions=t},setUserSelectedOption:(e,{payload:t})=>{const{option:s,value:r}=t;e.options.userSelectedOptions[s]=r},setBlockAutoEntrySwitch:(e,{payload:t})=>{e.entryMeta.blockAutoEntrySwitch=t},setServiceEntryMetadata:(e,{payload:t})=>{e.entryMeta.options={...e.entryMeta.options,upload:{...t.options.upload}},e.entryMeta.optionsOverride={},e.entryMeta.actions={},e.entryMeta.translatedActions={}},setActiveEntryType:(e,{payload:t})=>{e.entryMeta.active=t},setUserEntryType:(e,{payload:t})=>{e.entryMeta.userSelected=t},clearAbortTransaction:e=>{e.entryMeta.actions={}},registerUpload:(e,{payload:t})=>{e.currentUploads.push({id:t.fileId,name:t.fileName,progress:1,uploading:!0,complete:!1,error:"",uploadHandle:t.uploadHandle})},setUploadProgress:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map(e=>e.id===t.fileId?{...e,progress:t.progress,uploading:100!==t.progress,uploadHandle:100===t.progress?null:e.uploadHandle}:e)},startProcessingImage:(e,{payload:t})=>{e.processingFileUploads.push(t)},doneProcessingImage:(e,{payload:t})=>{e.processingFileUploads=e.processingFileUploads.filter(e=>e!==t)},setUploadError:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map(e=>e.id===t.fileId?{...e,error:t.errorText,progress:0,uploading:!1,uploadHandle:null}:e)},setUploadComplete:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map(e=>e.id===t?{...e,complete:!0}:e)},clearAllUploads:e=>{e.currentUploads=[]},setSeamlyContainerElement:(e,{payload:t})=>{e.seamlyContainerElement=t},setProactiveMessages:(e,{payload:t})=>{e.serviceInfo.proactiveMessages=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,()=>f).addCase(o.initializeApp.pending,e=>{e.isLoading=!0}).addCase(n.initializeConfig.fulfilled,(e,{payload:t})=>{e.headerTitles.subTitle=t.agentParticipant?.name||"",t.features&&(e.options.features=t.features)}).addCase(o.initializeApp.fulfilled,(e,{payload:t,type:s})=>{if(e.isLoading=!1,!t.initialState)return;e.initialState=t.initialState,"messages"in t.initialState&&h.caseReducers.setEvents(e,{payload:t.initialState,type:s});const{initialState:{service:r}}=t;r?.settings?.entry?.options?.upload&&h.caseReducers.setFeatureEnabledState(e,{payload:{key:c.featureKeys.uploads,enabled:r.settings.entry.options.upload.enabled||!1},type:s})}).addMatcher((0,r.isAnyOf)(k,C),e=>{e.isLastEventFromClient=!1})}}),{addEvent:v,updateEvent:y,clearAllUploads:j,clearEvents:g,clearFeatures:b,clearIdleDetachCountdown:x,clearResumeConversationPrompt:_,decrementIdleDetachCountdownCounter:w,hideOption:S,initIdleDetachCountdown:k,initResumeConversationPrompt:C,registerUpload:E,setActiveEntryType:T,setActiveService:N,setBlockAutoEntrySwitch:I,setEventsRead:O,setFeatureEnabledState:A,updateFeatures:P,setFeatures:L,setHeaderSubTitle:R,setHeaderTitle:M,setEvents:D,setInitialState:F,setIsLoading:U,setLoadedImageEventIds:z,setParticipant:B,setSeamlyContainerElement:V,setServiceDataItem:$,setServiceEntryMetadata:H,clearAbortTransaction:G,setUploadComplete:W,setUploadError:q,setUploadProgress:K,startProcessingImage:J,doneProcessingImage:Y,setUserEntryType:X,setUserSelectedOption:Q,setUserSelectedOptions:Z,showOption:ee,stopIdleDetachCountdownCounter:te,setProactiveMessages:se}=h.actions,re=h.reducer},"./src/javascripts/core/domains/translations/components/options-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/lib/css.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./src/javascripts/core/ui/utils/general-utils.ts"),c=s("./src/javascripts/core/domains/translations/components/options-dialog/index.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");function u({children:e,position:t={horizontal:"left",vertical:"top"},classNames:s=[]}){const[u,d]=(0,o.useState)(!1),p=(0,o.useRef)(null),m=(0,a.useGeneratedId)();return(0,l.jsxs)("div",{className:(0,r.className)("translations__container"),onKeyDown:e=>{u&&(0,i.getKey)(e)===i.keyNames.Escape&&(d(!1),(0,i.focusElement)(p.current))},children:[(0,l.jsx)(n.default,{transitionStartState:n.transitionStartStates.notRendered,isActive:u,children:(0,l.jsx)("div",{className:(0,r.className)("options__dialog"),role:"dialog",children:(0,l.jsx)(c.default,{onClose:()=>{d(!1)},position:t})})}),(0,l.jsx)("button",{type:"button",className:(0,r.className)(["button","chat__options__button",...s]),id:m,onClick:()=>{d(!u)},onKeyDown:e=>{(0,i.getKey)(e)===i.keyNames.ArrowDown&&(d(!0),e.preventDefault())},ref:p,"aria-haspopup":"dialog","aria-expanded":u,children:e})]})}},"./src/javascripts/core/domains/translations/components/options-dialog/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/translations/components/options-dialog/translation-options.tsx"),n=s("./src/javascripts/core/ui/components/options/options-frame.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=function({onClose:e,position:t}){const{t:s}=(0,r.useI18n)(),c=(0,a.useGeneratedId)();return(0,i.jsx)(n.default,{onCancel:e,headingText:s("translations.menu.title"),cancelButtonText:s("translations.settings.cancelButtonText"),description:s("translations.menu.description"),descriptionId:c,position:t,disableButtonFocusing:!0,children:(0,i.jsx)(o.default,{describedById:c,onChange:e})})}},"./src/javascripts/core/domains/translations/components/options-dialog/translation-option.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/layout/icon.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({label:e,checked:t,description:s,onChange:a,id:i,itemClassName:c})=>(0,n.jsxs)("li",{className:(0,r.className)([c||"","translation-options__item"]),"aria-selected":t,role:"option",tabIndex:0,onClick:a,onKeyDown:e=>{"Space"!==e.code&&"Enter"!==e.code||(e.preventDefault(),a())},id:i,children:[(0,n.jsx)(o.default,{name:"check",size:"16",alt:""}),e," ",s&&(0,n.jsxs)("span",{children:["(",s,")"]})]})},"./src/javascripts/core/domains/translations/components/options-dialog/translation-options.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/translations/components/options-dialog/translation-option.tsx"),a=s("./src/javascripts/core/domains/translations/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("preact/compat"),l=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),u=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=({onChange:e,describedById:t})=>{const{context:{contentLocale:s}}=(0,r.useConfig)(),{t:p}=(0,o.useI18n)(),{languages:m,currentLocale:f,enableTranslations:h,disableTranslations:v}=(0,a.useTranslations)(),y=(0,l.useSkiplinkTargetFocusing)(),j=t=>()=>{t&&(t===f||s===t?v():h(t,u.sourceTypes.translationChoice),e(),y())},{primaryLanguages:g,remainingLanguages:b}=(0,c.useMemo)(()=>m.reduce((e,t)=>{const r=t.locale===s,o=((e,t,s)=>t===e.locale||!t&&s)(t,f,r);t.locale!==s&&e.remainingLanguages.push({...t,checked:o,isOriginal:r});const n=e.remainingLanguages.findIndex(e=>e.locale===f);return(r||o&&n>4)&&e.primaryLanguages.push({...t,checked:o,isOriginal:r}),e},{primaryLanguages:[],remainingLanguages:[]}),[f,s,m]);return(0,d.jsxs)("ul",{"aria-describedby":t,role:"listbox",tabIndex:-1,className:(0,i.className)("translation-options"),children:[g.map(({locale:e,nativeName:t,checked:s,isOriginal:r},o)=>(0,d.jsx)(n.default,{id:e,label:t,checked:s,description:r?p("translations.settings.original"):void 0,onChange:j(e),itemClassName:(0,i.className)({"translation-options__item--original":r,"translation-options__item--selected":s&&0!==o})},e)),b.map(({locale:e,nativeName:t,checked:s,isOriginal:r})=>(0,d.jsx)(n.default,{id:e,label:t,checked:s,description:r?p("translations.settings.original"):void 0,onChange:j(e)},e))]})}},"./src/javascripts/core/domains/translations/components/translation-status.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/interrupt/selectors.ts"),o=s("./src/javascripts/core/domains/translations/hooks.ts"),n=s("./node_modules/react-redux/dist/react-redux.mjs"),a=s("./src/javascripts/core/ui/components/translation-proposal/index.tsx"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");function c(){const e=(0,n.useSelector)(r.selectHasError),{isActive:t}=(0,o.useTranslations)();return e||t?null:(0,i.jsx)(a.default,{})}},"./src/javascripts/core/domains/translations/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useLocaleNativeName:()=>j,useTranslatedEventData:()=>h,useTranslatedParticipantData:()=>v,useTranslationProposal:()=>g,useTranslations:()=>f,useTranslationsContainer:()=>y}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.find.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/store/index.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("preact/hooks"),c=s("./node_modules/react-redux/dist/react-redux.mjs"),l=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),d=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),p=s("./src/javascripts/core/domains/translations/selectors.ts"),m=s("./src/javascripts/core/domains/translations/slice.ts");function f(){const{sendContext:e}=(0,u.default)(),t=(0,n.useAppDispatch)(),s=(0,r.useConfig)(),o=(0,i.useCallback)((t,s)=>{e({userLocale:t,source:s})},[e]),a=(0,i.useCallback)(()=>{e({userLocale:s.context?.contentLocale}),t((0,m.disableTranslation)())},[s.context?.contentLocale,t,e]),{languages:l,isActive:d,isAvailable:p,currentLocale:f}=(0,c.useSelector)(({translations:e})=>e);return{languages:l,isActive:d,isAvailable:p,currentLocale:f,enableTranslations:o,disableTranslations:a}}const h=e=>{const t=(0,c.useSelector)((0,p.selectIsTranslated)(e));if(!e?.payload)return{body:void 0,hasTranslation:!1,isTranslated:!1,locale:""};const s=e.payload?.translatedBody&&"data"in e.payload.translatedBody?e.payload?.translatedBody.data:e.payload.translatedBody,{translation:r,body:o}={body:e.payload?.body,translation:e.payload?.translation},n=!!s;return{body:t&&n?s:o,hasTranslation:n,isTranslated:t&&n,locale:r?.locale}},v=e=>{const{translatedBody:t,translation:s,body:r}={body:e.payload?.participant?.introduction,translatedBody:e.payload?.participant?.translatedIntroduction,translation:e.payload?.participant?.translation},o=!!t,n=(0,c.useSelector)((0,p.selectIsTranslated)(e));return{body:n&&o?t:r,hasTranslation:o,isTranslated:n&&o,userLocale:s?.locale}};function y(){const e=(0,c.useSelector)(({translations:e})=>e.containerId);return{id:e,focusContainer:(0,l.useElementFocusingById)(e)}}function j(e){const{languages:t}=f();return(0,i.useMemo)(()=>t?.find(t=>t.locale===e)?.nativeName,[e,t])}const g=()=>{const{isActive:e,languages:t}=f(),s=(0,n.useAppDispatch)(),{sendAction:r}=(0,u.default)(),{translationProposal:l}=(0,c.useSelector)(e=>e.translations),{enableTranslations:p}=f(),{isOpen:h}=(0,a.useVisibility)(),{userLocale:v}=(0,o.useI18n)(),y=l?.proposedLocale,g=j(y),b=(0,i.useMemo)(()=>null!==l&&!e&&h&&v!==y&&t.some(e=>e.locale===y),[l,e,h,v,y,t]);return{activateTranslationProposal:()=>{l?.proposedLocale&&p(l.proposedLocale,d.sourceTypes.translationProposal)},dismissTranslationProposal:()=>{r({type:d.actionTypes.dismiss,body:{type:d.TRANSLATION_PROPOSAL}}),s((0,m.disableTranslationProposalPrompt)())},proposedLocale:y,proposedLocaleNativeName:g,showProposal:b,translationProposal:l}}},"./src/javascripts/core/domains/translations/middleware.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/app/actions.ts"),o=s("./src/javascripts/core/domains/config/actions.ts"),n=s("./src/javascripts/core/domains/i18n/actions.ts"),a=s("./src/javascripts/core/domains/store/slice.ts");const i=({dispatch:e})=>t=>s=>{const i=t(s);if(o.initializeConfig.fulfilled.match(s)&&s.payload.defaultUserLocale)return e((0,n.setLocale)(s.payload.defaultUserLocale)),i;if(r.initializeApp.fulfilled.match(s))return s.payload.userLocale&&e((0,n.setLocale)(s.payload.userLocale)),i;if(a.addEvent.match(s)&&"info"===s.payload.type&&s.payload.payload.body&&"subtype"in s.payload.payload.body&&"new_translation"===s.payload.payload.body.subtype){const{body:t}=s.payload.payload;if(t.translationLocale&&t.translationEnabled)return e((0,n.setLocale)(t.translationLocale)),i}return i}},"./src/javascripts/core/domains/translations/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectIsTranslated:()=>o}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.every.js");var r=s("./node_modules/reselect/dist/reselect.mjs");const o=e=>(0,r.createSelector)(e=>e.translations.translatedEventGroups,t=>Object.values(t).every(t=>e?.payload?.id&&!t.includes(e.payload.id)))},"./src/javascripts/core/domains/translations/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y,disableEventsTranslation:()=>f,disableTranslation:()=>p,disableTranslationProposalPrompt:()=>v,enableEventsTranslation:()=>m,enableTranslation:()=>d,setTranslationProposalPrompt:()=>h,translationSlice:()=>u,translationsInitialState:()=>c}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/domains/i18n/actions.ts"),i=s("./src/javascripts/core/domains/store/slice.ts");const c={isActive:!1,currentLocale:void 0,isAvailable:!1,languages:[],containerId:(0,r.nanoid)(),translatedEventGroups:{},translationProposal:null},l=(e,t)=>{const s=[...e].reduce((e,{payload:s,type:r},o,n)=>{if(e[t]&&s.id){if("info"===r&&"divider"===s?.type&&s?.body?.translationEnabled)return n.splice(0),e;e[t].push(s.id)}return s.id===t&&(e[t]=[]),e},{}),[[r,o]]=Object.entries(s);return{lastGroupId:e.filter(e=>"divider"===e.payload?.type).map(e=>e.payload.id).at(-1),groupId:r,eventIds:o}},u=(0,r.createSlice)({name:"translation",initialState:c,reducers:{enableTranslation:(e,{payload:t})=>{e.isActive=!0,e.currentLocale=t},disableTranslation:e=>{e.isActive=!1,e.currentLocale=void 0},enableEventsTranslation:(e,{payload:{events:t,id:s}})=>{delete e.translatedEventGroups[s];const{lastGroupId:r}=l(t,s);e.lastGroupId=r},disableEventsTranslation:(e,{payload:{events:t,id:s}})=>{const{lastGroupId:r,groupId:o,eventIds:n}=l(t,s);e.lastGroupId=r,e.translatedEventGroups[o]=n},disableTranslationProposalPrompt:e=>{e.translationProposal=null},setTranslationProposalPrompt:(e,{payload:t})=>{e.translationProposal=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,()=>c).addCase(n.initializeConfig.fulfilled,(e,{payload:t})=>{const s=t?.features?.translation;s?.languages&&(e.isAvailable=!0===s.enabled,e.languages=[...s.languages].sort((e,s)=>e.locale===t.defaultUserLocale?-1:s.locale===t.defaultUserLocale?1:e.nativeName?.localeCompare(s.nativeName||"",void 0,{sensitivity:"base"})||0))}).addCase(a.setLocale.fulfilled,(e,{payload:t})=>{e.currentLocale=t.userLocale}).addCase(i.addEvent,(e,{payload:t})=>{t.payload.id&&e.lastGroupId&&e.translatedEventGroups[e.lastGroupId]&&e.translatedEventGroups[e.lastGroupId].push(t.payload.id)}).addCase(i.setEvents,(e,{payload:t})=>{e.translationProposal=t?.ui?.translationProposal}).addCase(o.initializeApp.fulfilled,(e,{payload:t})=>{e.translationProposal=t.initialState?.ui?.translationProposal})}}),{enableTranslation:d,disableTranslation:p,enableEventsTranslation:m,disableEventsTranslation:f,setTranslationProposalPrompt:h,disableTranslationProposalPrompt:v}=u.actions,y=u.reducer},"./src/javascripts/core/domains/visibility/actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{initializeVisibility:()=>p,setVisibility:()=>d});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/app/selectors.ts"),n=s("./src/javascripts/core/domains/config/selectors.ts"),a=s("./src/javascripts/core/domains/visibility/utils.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),c=s("./src/javascripts/core/domains/visibility/constants.ts"),l=s("./src/javascripts/core/domains/visibility/selectors.ts");const u=[c.visibilityStates.open,c.visibilityStates.minimized,c.visibilityStates.hidden],d=(0,r.createAsyncThunk)("setVisibility",(e,{getState:t,extra:{api:s,eventBus:r}})=>{const d=t(),p=e.visibility,m=l.selectVisibility(d),f=(0,o.selectUserHasResponded)(d),h=s.hasConversation(),v=n.selectConfig(d),{visibilityCallback:y=a.calculateVisibility,layoutMode:j}=v,{unreadEvents:g}=(0,i.selectState)(d),b=y({hasResponded:f,previousVisibility:m,requestedVisibility:p,config:v});if(b&&!u.includes(b))return console.error('The visibilityCallback function should return "open", "minimized" or "hidden".'),{visibility:null,setInputFocus:e.setInputFocus};if(m===b)return{visibility:null,setInputFocus:e.setInputFocus};const x=s.store.get(c.StoreKey);return s.store.set(c.StoreKey,{...x||{},[j]:p}),p&&r.emit("ui.visible",p,{visibility:p,hasConversation:h,hasResponded:f,unreadMessageCount:g}),{visibility:b,setInputFocus:e.setInputFocus}}),p=(0,r.createAsyncThunk)("initialize",async(e,{dispatch:t,getState:s,extra:{api:r}})=>{const{layoutMode:o}=n.selectConfig(s()),a=r.store.get(c.StoreKey)?.[o]||c.visibilityStates.initialize;return t(d({visibility:a})),a})},"./src/javascripts/core/domains/visibility/constants.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{StoreKey:()=>r,visibilityStates:()=>o});const r="visibility",o={hidden:"hidden",minimized:"minimized",open:"open",initialize:null}},"./src/javascripts/core/domains/visibility/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useIntersect:()=>m,useShowInlineView:()=>f,useVisibility:()=>p});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/visibility/actions.ts"),a=s("./src/javascripts/core/domains/visibility/slice.ts"),i=s("preact"),c=s("preact/hooks"),l=s("./node_modules/react-redux/dist/react-redux.mjs"),u=s("./src/javascripts/core/domains/visibility/constants.ts"),d=s("./src/javascripts/core/domains/visibility/selectors.ts");const p=()=>{const e=(0,o.useAppDispatch)(),t=(0,l.useSelector)(d.selectVisibility),s=(0,l.useSelector)(d.selectSetInputFocus),r=!!t&&t!==u.visibilityStates.hidden,a=t===u.visibilityStates.open,i=t===u.visibilityStates.minimized,p=(0,c.useCallback)(t=>{e("string"==typeof t||null===t?(0,n.setVisibility)({visibility:t,setInputFocus:!1}):(0,n.setVisibility)(t))},[e]);return{isVisible:r,isOpen:a,isMinimized:i,visible:t,setVisibility:p,openChat:()=>{p({visibility:u.visibilityStates.open})},closeChat:()=>{p({visibility:u.visibilityStates.minimized})},setInputFocus:s}},m=({freezeOnceVisible:e=!1,enabled:t=!0,containerRef:s=(0,i.createRef)()})=>{const[r,o]=(0,c.useState)(null),n=!!r?.isIntersecting||!t,a=n&&e,l=([e])=>o(e);return(0,c.useEffect)(()=>{const e=s?.current,r=!!window.IntersectionObserver;if(e||console.error("containerRef must be set on a DOM element. check the component where useIntersect is being used."),!r||a||!e||!t)return()=>{};const o=new IntersectionObserver(l,{threshold:0,root:null,rootMargin:"0%"});return o.observe(e),()=>o.disconnect()},[s,t,a]),{isVisible:n,containerRef:s}},f=()=>{const e=(0,o.useAppDispatch)(),{connectWhenInView:t}=(0,r.useConfig)(),s=(0,l.useSelector)(d.selectShowInlineView),{containerRef:n,isVisible:i}=m({enabled:t,freezeOnceVisible:!0});return(0,c.useEffect)(()=>{i&&e((0,a.setShowInlineView)())},[e,i]),{containerRef:n,showInlineView:s}}},"./src/javascripts/core/domains/visibility/selectors.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectSetInputFocus:()=>a,selectShowInlineView:()=>n,selectVisibility:()=>o});var r=s("./node_modules/reselect/dist/reselect.mjs");const o=(0,r.createSelector)(({visibility:e})=>e,e=>e.visibility),n=(0,r.createSelector)(({visibility:e})=>e,e=>e.showInlineView),a=(0,r.createSelector)(({visibility:e})=>e,e=>e.setInputFocus)},"./src/javascripts/core/domains/visibility/slice.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l,setShowInlineView:()=>c,visibilitySlice:()=>i});var r=s("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs"),o=s("./src/javascripts/core/domains/config/actions.ts"),n=s("./src/javascripts/core/domains/visibility/actions.ts");const a={visibility:s("./src/javascripts/core/domains/visibility/constants.ts").visibilityStates.initialize,showInlineView:!1,setInputFocus:!1},i=(0,r.createSlice)({name:"visibility",initialState:a,reducers:{setShowInlineView:e=>{e.showInlineView=!0}},extraReducers:e=>{e.addCase(n.setVisibility.fulfilled,(e,{payload:{visibility:t,setInputFocus:s}})=>{t&&(e.visibility=t,e.setInputFocus=Boolean(s))}).addCase(o.initializeConfig.fulfilled,(e,{payload:t})=>{t.connectWhenInView||(e.showInlineView=!t.connectWhenInView)})}}),{setShowInlineView:c}=i.actions,l=i.reducer},"./src/javascripts/core/domains/visibility/utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{calculateVisibility:()=>o});var r=s("./src/javascripts/core/domains/visibility/constants.ts");const o=({hasResponded:e,previousVisibility:t,requestedVisibility:s,config:o})=>{const{defaults:n,layoutMode:a,hideOnNoUserResponse:i}=o,{visible:c}=n||{};if("app"===a&&!t)return r.visibilityStates.open;if("window"===a&&i&&s!==r.visibilityStates.open)return e?s||t||r.visibilityStates.open:r.visibilityStates.hidden;if("inline"===a&&e&&!s)return t||r.visibilityStates.open;const l=r.visibilityStates.minimized;return s||t||c||l}},"./src/javascripts/core/lib/css.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{className:()=>o}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/config.ts");const o=(...e)=>e.flat().map(e=>"object"==typeof e?Object.entries(e).map(([e,t])=>t?e:"").join(" "):e).filter(e=>"string"==typeof e).map(e=>e?.split(" ")).flat().filter(e=>e&&e.length).map(e=>e&&e.indexOf(r.CSS_NAME)>-1?e:[r.CSS_NAME,e].join("-")).join(" ")},"./src/javascripts/core/lib/debug.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=e=>(...t)=>console.debug(e,...t)},"./src/javascripts/core/lib/engine/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js");var r=s("./src/javascripts/core/api/index.ts"),o=s("./src/javascripts/core/domains/app/actions.ts"),n=s("./src/javascripts/core/domains/config/actions.ts"),a=s("./src/javascripts/core/domains/config/slice.ts"),i=s("./src/javascripts/core/domains/store/index.ts"),c=s("./src/javascripts/core/domains/visibility/actions.ts"),l=s("./node_modules/minivents/dist/minivents.commonjs.min.js"),u=s.n(l),d=s("preact"),p=s("./src/javascripts/core/ui/components/chat-app.tsx"),m=s("./src/javascripts/core/ui/components/core/seamly-core.tsx"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");class h{constructor(e,t){const{namespace:s="",parentElement:o,...n}=e;this.config={...n,namespace:s},this.namespace=s,this.parentElement=o,this.externalApi=t,this.api=new r.default({layoutMode:e.layoutMode,namespace:e.namespace,config:e.api,context:e.context}),this.eventBus=new(u()),this.functions={},this.registerFunctions({on:this.eventBus.on,off:this.eventBus.off}),this.eventBus.on("function.register",(e,t)=>this.registerFunction(e,t)),this.eventBus.on("function.unregister",(e,t)=>this.unregisterFunction(e,t))}async render(){const{view:e,...t}=this.config.customComponents||{},s={...this.config,parentElement:this.parentElement,customComponents:Object.keys(t).length?t:void 0},r=(0,i.createStore)({api:this.api,eventBus:this.eventBus,config:s,initialState:void 0});r.dispatch((0,a.setConfig)(s)),await r.dispatch((0,n.initializeConfig)()),await r.dispatch((0,o.initializeApp)()),r.dispatch((0,c.initializeVisibility)()),e?(0,d.render)((0,f.jsx)(m.default,{eventBus:this.eventBus,store:r,api:this.api,children:(0,f.jsx)(e,{})}),this.parentElement):(0,d.render)((0,f.jsx)(p.default,{config:s,eventBus:this.eventBus,store:r,api:this.api}),this.parentElement)}destroy(){(0,d.render)(null,this.parentElement),this.eventBus.off(),this.api.disconnect(),this.functions={}}registerFunctions(e){Object.entries(e).forEach(([e,t])=>{this.registerFunction(e,t)})}registerFunction(e,t){this.functions[e]=this.functions[e]||[],this.functions[e].push(t),this.externalApi.handleActions()}unregisterFunction(e,t){const s=this.functions[e];s&&s.length&&(this.functions[e]=s.filter(e=>e!==t))}execFunction(e,...t){const s=this.functions[e];return!(!s||!s.length||(s.forEach(s=>{try{s(...t)}catch(t){console.error(`Action(${e}) failed: `,t)}}),0))}}},"./src/javascripts/core/lib/external-api/index.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("./src/javascripts/core/lib/engine/index.tsx"),o=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const n=e=>"object"==typeof e&&"action"in e,a=e=>({...e,args:Array.isArray(e.args)?e.args:[e.args]}),i=class{constructor(e){this._waitingActions=[],this._instances={},this.timeouts={},this.appConfig=e,this.context={}}push(...e){(e=e.filter(n).map(a)).length&&(this._waitingActions.push(...e),this.handleActions())}handleActions(){const e=this._waitingActions;this._waitingActions=[],e.forEach(e=>{switch(e.action){case"init":this.handleInit(e);break;case"destroy":this.handleDestroy(e);break;default:this.handleAction(e)||this.setContext(e.action,...e.args)||this._waitingActions.push(e)}})}instanceInitializing(e){const t=Object.keys(this._instances);return!e&&t.length>0||t.includes(e)}setContext(e,t){const{instance:s}=t;if(this.instanceInitializing(s))return!1;switch(e){case"setTopic":{const{name:e}=t;return e&&(this.context.topic=e),!0}case"setTranslation":{const{enabled:e,locale:s}=t;return e&&s&&(this.context.userLocale=s,this.context.source=o.sourceTypes.windowApi),!0}case"setContext":{const{userLocale:e,contentLocale:s}=t;return this.context.userLocale=e,this.context.contentLocale=s,e&&e!=this.appConfig?.userLocale&&(this.context.source=o.sourceTypes.windowApi),!0}case"setVariables":return Object.keys(t).length>0&&(this.context.variables={...t}),!0;default:return!1}}handleInit(e){const t=this.getUserConfig(...e.args),s=this.getCombinedConfig(t),{parentElement:r,namespace:o}=s||t;if(o?Object.values(this._instances).forEach(e=>{e.parentElement!==r&&e.namespace!==o||this.destroy(e)}):this.destroy(),s){const e=this.createInstance(s);this._instances[s.namespace]=e,this.context={},this.debouncedRender(e,s.namespace)}}handleDestroy(e){this.destroy(e.instance)}handleAction(e){const{action:t,instance:s,args:r}=e,o=Object.values(this._instances);return!s&&o.length>1&&console.warn(`Multiple instances detected. Due to potential race conditions, it is recommended to target a specific instance with the action: ${t}`),o.map(e=>(!s||e.namespace===s)&&e.execFunction(t,...r)).some(Boolean)}createInstance(e){return new r.default(e,this)}debouncedRender(e,t){window.clearTimeout(this.timeouts[t]),this.timeouts[t]=window.setTimeout(()=>{e.render()},100)}destroy(e){e?("string"==typeof e&&(e=this._instances[e]),e&&(e.destroy(),delete this._instances[e.namespace])):Object.entries(this._instances).forEach(([e,t])=>{t.destroy(),delete this._instances[e]})}getUserConfig(e={}){return e}getCombinedConfig(e){const t={...e.context||this.appConfig.context,...this.context},s=this.getMergedVariables(e);Object.keys(s).length>0&&(t.variables=s);const r={...this.appConfig.defaults,...e.defaults},o={...this.appConfig,...e,api:{...this.appConfig.api,...e.api},context:Object.keys(t).length?t:void 0,defaults:Object.keys(r).length?r:void 0};return"function"==typeof this.appConfig?this.appConfig(o):o}getMergedVariables(e){return{...this.appConfig.context?.variables||{},...e.context?.variables||{},...this.context.variables||{}}}}},"./src/javascripts/core/lib/external-api/initialize-api.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/lib/external-api/index.ts");function o(e){if(window.seamly&&!Array.isArray(window.seamly))throw new Error("Seamly UI has already been initialised. Use the window.seamly object to start new instances instead.");const t=Array.isArray(window.seamly)?window.seamly:[],s=new r.default(e);window.seamly={push:s.push.bind(s)},s.push(...t)}},"./src/javascripts/core/lib/id.ts":(e,t,s)=>{"use strict";function r(){return`_${(Number(String(Math.random()).slice(2))+Date.now()+Math.round(performance.now())).toString(36)}`}s.r(t),s.d(t,{randomId:()=>r})},"./src/javascripts/core/lib/split-url-params.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");const r=e=>{const t=e.indexOf("?");return t<0?{url:e,params:{}}:{url:e.slice(0,t),params:e.slice(t+1).split("&").reduce((e,t)=>{const[s,r]=t.split("=");return{...e,[s]:decodeURIComponent(r)}},{})}}},"./src/javascripts/core/lib/store/index.ts":(e,t,s)=>{"use strict";function r(e,t){const s=t(e),r=s.get()||{};return{get:e=>void 0===e?r:r[e],set:(e,t)=>(r[e]=t,s.set(r),t),delete(e){const t=this.get(e);return delete r[e],s.set(r),t}}}s.r(t),s.d(t,{objectStore:()=>r})},"./src/javascripts/core/lib/store/providers/app-storage.ts":(e,t,s)=>{"use strict";function r(){return{get:()=>{if(Object.prototype.hasOwnProperty.call(window,"SeamlyBridge"))try{return JSON.parse(window.SeamlyBridge.getData())}catch(e){return console.error("Unexpected or malformed data retrieved from bridge",e),{}}return window.seamlyBridgeData},set:e=>{window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.seamlyBridge&&window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(e)),Object.prototype.hasOwnProperty.call(window,"SeamlyBridge")&&window.SeamlyBridge.setData(JSON.stringify(e)),window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify(e))}}}s.r(t),s.d(t,{default:()=>r})},"./src/javascripts/core/lib/store/providers/cookie-storage.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("./node_modules/js-cookie/dist/js.cookie.mjs");function o(e={}){return function(t){const s=`cvco.${t}`;return{get(){const e=r.default.get(s);return e?JSON.parse(e):null},set(t){t&&r.default.set(s,JSON.stringify(t),e)}}}}},"./src/javascripts/core/lib/store/providers/session-storage.ts":(e,t,s)=>{"use strict";function r(e){const t=`cvco.${e}`;return{get(){const e=[t,t.split(".").slice(0,-1).join(".")];let s;do{s=sessionStorage.getItem(e[0])}while(e.shift()&&!s);return s?JSON.parse(s):{}},set(e){e&&sessionStorage.setItem(t,JSON.stringify(e))}}}s.r(t),s.d(t,{default:()=>r})},"./src/javascripts/core/lib/url-helpers.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getSearchParamsByKeys:()=>n,getUrlSearchParams:()=>r,getUrlSearchString:()=>o,initResetSearchParams:()=>u,removeSearchParam:()=>c,replaceSearchParams:()=>l,setSearchParam:()=>a,setSearchParams:()=>i}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js"),s("./node_modules/core-js/modules/web.url-search-params.delete.js"),s("./node_modules/core-js/modules/web.url-search-params.has.js"),s("./node_modules/core-js/modules/web.url-search-params.size.js");const r=()=>{const e=new URLSearchParams(window.location.search);return Array.from(e.entries()).reduce((e,[t,s])=>({...e,[t]:s}),{})},o=e=>new URLSearchParams(e).toString(),n=(...e)=>{const t=new URL(window.location.href);return e.reduce((e,s)=>{const r=t.searchParams.get(s)||sessionStorage.getItem(s);return r&&(e[s]=r),e},{})},a=(e,t)=>{const s=new URL(window.location.href),{searchParams:r}=s;r.set(e,t),s.search=r.toString(),window.location.href=s.toString()},i=e=>{const t=new URL(window.location.href),{searchParams:s}=t;Object.entries(e).forEach(([e,t])=>{s.set(e,t)}),t.search=s.toString(),window.location.href=t.toString()},c=(...e)=>{const t=new URL(window.location.href),{searchParams:s}=t;e.forEach(e=>s.delete(e)),t.search=s.toString(),window.history.replaceState({},"",t)},l=(...e)=>{const t=new URL(window.location.href),s=e.reduce((e,s)=>{const r=t.searchParams.get(s),o=r||sessionStorage.getItem(s);return r&&sessionStorage.setItem(s,r),o?(e.set(s,o),e):e},new URLSearchParams),r=new URLSearchParams({...Object.fromEntries(t.searchParams),...Object.fromEntries(s)});return r.toString()&&window.history.replaceState(null,"",`?${r}`),n(...s.keys())},u=(...e)=>{const t=document.querySelector("[data-reset-search-params]");t&&t.addEventListener("click",t=>{t.preventDefault();const s=new URL(window.location.href);e.forEach(e=>{sessionStorage.removeItem(e),s.searchParams.delete(e)}),window.location.href=s.toString()})}},"./src/javascripts/core/ui/components/app-options/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/interrupt/selectors.ts"),n=s("./src/javascripts/core/domains/translations/components/options-button.tsx"),a=s("./src/javascripts/core/domains/translations/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("./node_modules/react-redux/dist/react-redux.mjs"),l=s("./src/javascripts/core/ui/components/layout/icon.tsx"),u=s("./src/javascripts/core/ui/components/options/options-button.tsx"),d=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),p=s("./node_modules/preact/compat/jsx-runtime.mjs");function m(){const{menuOptions:e,allowOptionSelection:t}=(0,d.useSeamlyOptions)(),{isAvailable:s}=(0,a.useTranslations)(),m=(0,c.useSelector)(o.selectHasError),{t:f,userLocale:h}=(0,r.useI18n)(),v=(0,a.useLocaleNativeName)(h);if(!s&&(!t||!e.length)||m)return null;const y=f("translations.settings.openButtonText",{hasLanguage:!!v,language:v});return(0,p.jsxs)("div",{className:(0,i.className)("chat__options"),children:[s&&(0,p.jsx)("div",{className:(0,i.className)("chat__options-item","chat__options-item--left"),children:(0,p.jsxs)(n.default,{classNames:["button--secondary"],children:[(0,p.jsx)(l.default,{alt:y,name:"newTranslation",size:"16"}),(0,p.jsx)("span",{className:(0,i.className)("button__text"),children:y})]})}),t&&(0,p.jsx)("div",{className:(0,i.className)("chat__options-item","chat__options-item--right"),children:(0,p.jsx)(u.default,{})})]})}},"./src/javascripts/core/ui/components/chat-app.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/ui/components/core/seamly-core.tsx"),o=s("./src/javascripts/core/ui/components/view/index.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=e=>(0,n.jsx)(r.default,{...e,children:(0,n.jsx)(o.default,{})})},"./src/javascripts/core/ui/components/chat-status/chat-status-action.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/layout/icon.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({handleClick:e,icon:t,title:s,srButtonText:a})=>(0,n.jsxs)("button",{type:"button",onClick:e,className:(0,r.className)("button","button--primary","chat-status__button"),children:[(0,n.jsx)(o.default,{name:t,size:"16",alt:""}),s,a&&(0,n.jsx)("span",{className:(0,r.className)("visually-hidden"),children:a})]})},"./src/javascripts/core/ui/components/chat-status/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/layout/icon.tsx"),n=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=({children:e,handleClose:t,title:s,closeButtonText:i,srCloseButtonText:c,id:l})=>{const u=(0,n.useGeneratedId)();return(0,a.jsxs)("section",{tabIndex:-1,id:l,"aria-labelledby":s?u:void 0,className:(0,r.className)("chat-status",s?void 0:"chat-status--condensed"),children:[(0,a.jsxs)("div",{className:(0,r.className)("chat-status__body"),children:[s?(0,a.jsx)("h2",{className:(0,r.className)("chat-status__title"),id:u,children:s}):null,e]}),"function"==typeof t&&(0,a.jsxs)("button",{type:"button",onClick:t,className:(0,r.className)("button","button--tertiary","chat-status__close"),children:[i||(0,a.jsx)(o.default,{name:"close",size:"16",alt:""}),c&&(0,a.jsx)("span",{className:(0,r.className)("visually-hidden"),children:c})]})]})}},"./src/javascripts/core/ui/components/conversation/component-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=(0,s("preact").createContext)(null)},"./src/javascripts/core/ui/components/conversation/component-filter.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/components/conversation/component-context.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/card-message.tsx"),i=s("./src/javascripts/core/ui/components/conversation/event/carousel-message/index.tsx"),c=s("./src/javascripts/core/ui/components/conversation/event/choice-prompt.tsx"),l=s("./src/javascripts/core/ui/components/conversation/event/conversation-suggestions.tsx"),u=s("./src/javascripts/core/ui/components/conversation/event/divider/index.tsx"),d=s("./src/javascripts/core/ui/components/conversation/event/divider/variants/time-indicator.tsx"),p=s("./src/javascripts/core/ui/components/conversation/event/image.tsx"),m=s("./src/javascripts/core/ui/components/conversation/event/participant.tsx"),f=s("./src/javascripts/core/ui/components/conversation/event/splash.tsx"),h=s("./src/javascripts/core/ui/components/conversation/event/text.tsx"),v=s("./src/javascripts/core/ui/components/conversation/event/translation.tsx"),y=s("./src/javascripts/core/ui/components/conversation/event/upload.tsx"),j=s("./src/javascripts/core/ui/components/conversation/event/video.tsx"),g=s("./node_modules/preact/compat/jsx-runtime.mjs");const b={message:{choice_prompt:c.default,text:h.default,image:p.default,splash:f.default,video:j.default,upload:y.default,carousel:i.default,card:a.default},info:{text:h.default,divider:u.default,translation:v.default,timeIndicator:d.default},participant:{participant:m.default},service_data:{suggestion:l.default}},x=({children:e})=>{const{customComponents:t}=(0,r.useConfig)(),s=(0,o.useMemo)(()=>Object.keys(b).reduce((e,s)=>(e[s]={...b[s],...t?t[s]:{}},e),{fallback:h.default}),[t]);return(0,g.jsx)(n.default.Provider,{value:s,children:e})}},"./src/javascripts/core/ui/components/conversation/conversation.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/layout/privacy-disclaimer.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/use-debounce.ts"),u=s("./src/javascripts/core/ui/components/entry/abort-transaction-button/abort-transaction-button.tsx"),d=s("./src/javascripts/core/ui/components/conversation/component-filter.tsx"),p=s("./src/javascripts/core/ui/components/conversation/event/event.tsx"),m=s("./src/javascripts/core/ui/components/conversation/loader.tsx"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");const h=()=>{const e=(0,c.useEvents)();let t;return(0,f.jsx)(f.Fragment,{children:e.map(e=>{const{type:s,payload:r}=e;let o=!1;if("info"===s||"message"===s){const{participant:s,fromClient:n}=r,a=n?"seamly-client-participant":s;"info"!==e.type&&t!==a&&(o=!0),t=a}return(0,f.jsx)(p.default,{event:e,newParticipant:o},e.payload.key||e.payload.id)})})},v=()=>{const{t:e}=(0,r.useI18n)(),t=(0,i.useSeamlyIsLoading)(),s=(0,l.default)(t,t?0:20),{isOpen:c}=(0,o.useVisibility)(),p=(0,i.useSkiplink)(),v=(0,i.useSkiplinkTargetFocusing)();return(0,f.jsxs)(f.Fragment,{children:[c&&(0,f.jsx)("a",{className:(0,n.className)("skip-link"),href:`#${p}`,onClick:e=>{e.preventDefault(),v()},children:e("skiplinkText")}),(0,f.jsx)("div",{className:(0,n.className)("chat__body"),children:(0,f.jsxs)("div",{className:(0,n.className)("conversation__container"),children:[(0,f.jsx)(a.default,{}),(0,f.jsx)("div",{role:"log","aria-label":e("chat.srLabel"),children:(0,f.jsxs)("ol",{className:(0,n.className)("conversation"),children:[(0,f.jsx)(d.default,{children:(0,f.jsx)(h,{})}),s?(0,f.jsx)(m.default,{}):null,(0,f.jsx)(u.default,{})]})})]})})]})}},"./src/javascripts/core/ui/components/conversation/event-divider.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/layout/icon.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({children:e,className:t,graphicSrc:s,graphicType:a="icon",iconName:i,iconSize:c,iconClassName:l,dividerType:u,title:d,description:p})=>{const m=Boolean(i||s);return(0,n.jsxs)("div",{className:(0,r.className)("divider",u&&`divider--type-${u}`,t),children:[m&&(0,n.jsx)("span",{className:(0,r.className)("divider__graphic"),children:i?(0,n.jsx)(o.default,{name:i,size:c,className:l,alt:""}):(0,n.jsx)("img",{src:s||void 0,className:(0,r.className)({icon:"icon"===a,avatar:"avatar"===a},l)})}),(0,n.jsxs)("div",{className:(0,r.className)("divider__body"),children:[d?(0,n.jsx)("h2",{className:(0,r.className)("divider__title"),dangerouslySetInnerHTML:{__html:d}}):null,p?(0,n.jsx)("p",{className:(0,r.className)("divider__description"),dangerouslySetInnerHTML:{__html:p}}):null,e]})]})}},"./src/javascripts/core/ui/components/conversation/event/card-component.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/lib/css.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),a=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({id:e,action:t,buttonText:s,description:c,hasFocus:l,image:u,title:d,isCarouselItem:p})=>{const m=(0,o.useRef)(null),{sendMessage:f,sendAction:h,emitEvent:v}=(0,n.useSeamlyCommands)(),y=(0,n.useGeneratedId)(),j=(0,o.useRef)(!1),g=t?.type===a.cardTypes.navigate?"a":"button",b=(0,o.useCallback)(()=>v(`action.${a.actionTypes.clickCard}`,{type:a.actionTypes.clickCard,originMessage:e,action:t}),[v,e,t]),x=(0,o.useCallback)(()=>{if(b(),t?.type===a.cardTypes.ask)f({body:t?.ask});else if(t?.type===a.cardTypes.topic){const{topic:e,fallbackMessage:s}=t;h({type:a.actionTypes.setTopic,body:{name:e,fallbackMessage:s}})}},[f,t,h,b]),_=(0,o.useMemo)(()=>t?.type===a.cardTypes.navigate?{href:t?.link,rel:"noopener noreferrer",target:t?.newTab?"_blank":"_self",onClick:b}:{onClick:x},[t,x,b]);return(0,o.useEffect)(()=>{p&&(l&&j.current?window.requestAnimationFrame(()=>m.current?.focus()):m.current?.blur()),j.current=!0},[l,p]),(0,i.jsxs)("div",{className:(0,r.className)("card__wrapper"),id:e,tabIndex:-1,ref:m,children:[u?(0,i.jsx)("img",{className:(0,r.className)("card__image"),src:u,alt:""}):null,(0,i.jsxs)("div",{className:(0,r.className)("card__content"),id:e,children:[d&&(0,i.jsx)("h2",{className:(0,r.className)("card__title"),children:d}),c&&(0,i.jsx)("div",{className:(0,r.className)("card__description"),dangerouslySetInnerHTML:{__html:c}}),(0,i.jsx)(g,{tabIndex:p&&!l?-1:void 0,className:(0,r.className)("button","button--primary"),"aria-describedby":y,..._,children:s})]})]})}},"./src/javascripts/core/ui/components/conversation/event/card-message.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/card-component.tsx"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({event:e})=>{const{body:t}=(0,r.useTranslatedEventData)(e),s=(0,n.useGeneratedId)();return(0,i.jsx)(o.default,{type:"card",event:e,children:(0,i.jsx)(a.default,{id:s,...t})})}},"./src/javascripts/core/ui/components/conversation/event/carousel-component/components/controls.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/layout/icon.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i({items:e,currentIndex:t,onChange:s,children:i}){const{t:c}=(0,r.useI18n)(),l=e.length;return(0,a.jsxs)("div",{className:(0,o.className)("carousel-controls"),children:[(0,a.jsx)("button",{className:(0,o.className)("button","button--previous"),"aria-label":c("carousel.controls.previous"),onClick:()=>{s((t-1+l)%l)},children:(0,a.jsx)(n.default,{name:"arrowLeft",size:"16",alt:""})}),i,(0,a.jsx)("button",{className:(0,o.className)("button","button--next"),"aria-label":c("carousel.controls.next"),onClick:()=>{s((t+1)%l)},children:(0,a.jsx)(n.default,{name:"arrowRight",size:"16",alt:""})})]})}},"./src/javascripts/core/ui/components/conversation/event/carousel-component/components/pagination.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/lib/css.ts"),o=s("preact/hooks"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");function a({items:e,currentIndex:t,onChange:s,getItemKey:a,getItemLabel:i}){const c=e.length,l=(0,o.useCallback)(e=>{const r=Number(e.target.dataset.item||"0"),o=Math.min(c-1,Math.max(0,r));o!==t&&s(o)},[c,t,s]);return(0,n.jsx)("div",{className:(0,r.className)("carousel-pagination__wrapper"),role:"group",children:(0,n.jsx)("ul",{className:(0,r.className)("carousel-pagination"),children:e.map((e,s)=>{const o=t===s;return(0,n.jsx)("li",{className:(0,r.className)("carousel-pagination__item",o?"is-active":void 0),children:(0,n.jsx)("button",{className:(0,r.className)("carousel-pagination__button"),type:"button",onClick:l,"data-item":s,"aria-disabled":o?"true":void 0,"aria-label":i(e,s)})},a(e,s,"pagination-item-"))})})})}},"./src/javascripts/core/ui/components/conversation/event/carousel-component/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/lib/css.ts"),o=s("preact"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/components/conversation/event/carousel-message/components/slide.tsx"),i=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),c=s("./src/javascripts/core/ui/components/conversation/event/carousel-component/components/controls.tsx"),l=s("./src/javascripts/core/ui/components/conversation/event/carousel-component/components/pagination.tsx"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=(e,t,s)=>`${s}${t}`,p=e=>e.label,m=({target:e})=>{e.scrollLeft=0};function f({currentIndex:e=0,onChange:t=()=>{},getItemKey:s=d,getItemLabel:f=p,items:h}){const v=(0,i.useGeneratedId)(),y=h.length,[j,g]=(0,n.useState)(Number(e||0));(0,n.useEffect)(()=>{g(Number(e||0))},[g,e]);const b=(0,n.useRef)([]);b.current=(0,n.useMemo)(()=>Array(y).fill(1).map(()=>(0,o.createRef)()),[y]);const x=(0,n.useRef)(!0),_=(0,n.useRef)(null);return _.current=t,(0,n.useEffect)(()=>{x.current?x.current=!1:_.current&&_.current(j)},[j]),(0,u.jsxs)("div",{className:(0,r.className)("carousel"),role:"group","aria-roledescription":"carousel",children:[(0,u.jsx)("div",{className:(0,r.className)("carousel__slides-wrapper"),onScroll:m,children:(0,u.jsx)("div",{id:v,className:(0,r.className)("carousel__slides"),style:{width:100*y+"%",left:-100*j+"%"},"aria-live":"polite","aria-atomic":"false",children:h.map((e,t)=>{const o=j===t;return(0,u.jsx)("div",{ref:b.current[t],className:(0,r.className)("carousel__slide",o?"is-active":void 0),"aria-hidden":o?void 0:"true",children:(0,u.jsx)(a.default,{item:e,items:h,index:t,isActive:o})},s(e,t,"item-"))})})}),(0,u.jsx)("div",{className:(0,r.className)("carousel__controls"),children:(0,u.jsx)(c.default,{currentIndex:j,items:h,onChange:g,children:(0,u.jsx)("div",{className:(0,r.className)("carousel__pagination"),children:(0,u.jsx)(l.default,{currentIndex:j,items:h,onChange:g,getItemKey:s,getItemLabel:f})})})})]})}},"./src/javascripts/core/ui/components/conversation/event/carousel-message/components/slide.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/conversation/event/card-component.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i({item:e,items:t,index:s,isActive:i}){const{t:c}=(0,r.useI18n)();return(0,a.jsx)("div",{className:(0,o.className)("carousel-item",`carousel-item--${e.type}`),role:"group","aria-roledescription":"slide","aria-label":c("carousel.slide.label",{index:s+1,total:t.length}),children:(0,a.jsx)(n.default,{...e,isCarouselItem:!0,hasFocus:i})})}},"./src/javascripts/core/ui/components/conversation/event/carousel-message/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/event/carousel-component/index.tsx"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=(e,t,s="")=>`${s}${e.title}:${t}`,c=e=>e.title,l=({event:e})=>{const{body:t}=(0,r.useTranslatedEventData)(e),s=t.cards;return(0,a.jsx)(n.default,{event:e,modifiers:"type-carousel",children:(0,a.jsx)(o.default,{items:s,getItemKey:i,getItemLabel:c})})}},"./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i,useChatScrollContext:()=>a});var r=s("preact"),o=s("preact/hooks");const n=(0,r.createContext)(null),a=()=>{const e=(0,o.useContext)(n);if(!e)throw new Error("useChatScrollContext has to be used within <ChatScrollContext.Provider>");return e},i=n},"./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-provider.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("./src/javascripts/core/lib/css.ts"),o=s("preact"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-context.ts"),i=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/unread-messages-button.tsx"),c=s("./src/javascripts/core/ui/components/conversation/use-chat-scroll.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=({children:e})=>{const t=(0,l.useEvents)(),s=(0,n.useMemo)(()=>t.reduce((e,t)=>t.payload.id?(e[t.payload.id]=(0,o.createRef)(),e):e,{}),[t]),{scrollToRef:d,scrollToBottom:p,containerRef:m,unreadIds:f}=(0,c.default)(s);return(0,u.jsx)(a.default.Provider,{value:{eventRefs:s,unreadIds:f,scrollToRef:d,scrollToBottom:p,containerRef:m},children:(0,u.jsxs)("div",{className:(0,r.className)("chat__container"),children:[(0,u.jsx)("div",{className:(0,r.className)("chat__container__scroll-area"),ref:m,children:e}),(0,u.jsx)(i.default,{})]})})}},"./src/javascripts/core/ui/components/conversation/event/chat-scroll/unread-messages-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-context.ts"),i=s("./src/javascripts/core/ui/components/layout/icon.tsx"),c=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=()=>{const{scrollToRef:e,unreadIds:t}=(0,a.useChatScrollContext)(),{isMinimized:s}=(0,o.useVisibility)(),{t:u}=(0,r.useI18n)();return(0,l.jsx)(c.default,{isActive:!!t.length&&!s,children:(0,l.jsx)("div",{className:(0,n.className)("unread-messages"),children:(0,l.jsxs)("button",{type:"button",className:(0,n.className)("button","button--primary"),onClick:e,children:[u("message.unreadMessagesCount",{unreadCount:t.length}),(0,l.jsx)(i.default,{name:"chevronDown",size:"32",alt:""})]})})})}},"./src/javascripts/core/ui/components/conversation/event/choice-prompt.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y,useChoicePrompt:()=>v}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/translations/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/lib/id.ts"),i=s("preact"),c=s("preact/hooks"),l=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),u=s("./src/javascripts/core/ui/components/layout/icon.tsx"),d=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),m=s("./src/javascripts/core/ui/utils/general-utils.ts"),f=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),h=s("./node_modules/preact/compat/jsx-runtime.mjs");const v=e=>{const{payload:t}=e,[s,r]=(0,c.useState)(!1),{addMessageBubble:n,emitEvent:i,sendAction:l}=(0,p.useSeamlyCommands)(),u=(0,d.useSeamlyHasConversation)(),{activeServiceSessionId:m}=(0,p.useSeamlyServiceInfo)(),h=(0,p.useLastMessageEventId)(),{body:v}=(0,o.useTranslatedEventData)(e),{service:y}=t,j=(0,c.useMemo)(()=>{if("choice_prompt"===e.payload.type)return{...e,payload:{...e.payload,body:e.payload.body?.prompt,translatedBody:e.payload.translatedBody&&{...e.payload.translatedBody,data:e.payload.translatedBody?.prompt}}}},[e]),g=v?.chooseAgain&&m===y?.serviceSessionId&&t.id!==h;return(0,c.useEffect)(()=>{r(t.id===h)},[t,h]),{body:v,subEvent:j,showOptions:s,chooseAgain:g,onChoiceClickHandler:e=>{if(!u())return;const s=(0,a.randomId)(),o={type:f.actionTypes.pickChoice,originMessage:t.id,choice:{chooseAgain:g,id:e.id},transactionId:s};n(e.text,s),l(o),r(!1),i(`action.${o.type}`,{...o,choice:{...o.choice,text:e.text}})},onChooseAgainClickHandler:()=>{r(e=>!e)}}},y=({event:e,children:t,...s})=>{const{t:o}=(0,r.useI18n)(),a=(0,p.useGeneratedId)(),{body:c,subEvent:d,showOptions:f,chooseAgain:y,onChoiceClickHandler:j,onChooseAgainClickHandler:g}=v(e);return(0,h.jsxs)(h.Fragment,{children:[(0,i.toChildArray)(t).filter(m.childIsVNode).map(e=>(e.props={...e.props,event:d,id:a,showTranslationToggle:!1},e)),y&&(0,h.jsxs)("button",{type:"button",className:(0,n.className)("button","button--secondary","button--choose-again"),"aria-expanded":f?"true":"false",onClick:g,"aria-describedby":a,children:[o(f?"message.choicePrompts.cancelChooseAgain":"message.choicePrompts.chooseAgain"),(0,h.jsx)(u.default,{name:"chevronDown",size:"8",alt:""})]}),f&&(0,h.jsx)(l.default,{type:"choice-prompt",showParticipant:!1,event:e,...s,children:(0,h.jsx)("ul",{className:(0,n.className)("choice-prompt","choice-prompt--many"),children:c?.choices?.map(e=>(0,h.jsx)("li",{className:(0,n.className)("choice-prompt__item",{[`choice-prompt__item--${e?.category}`]:!!e.category}),children:(0,h.jsx)("button",{type:"button",className:(0,n.className)("button","button--primary"),onClick:()=>{j(e)},children:e.text})},e.id))})})]})}},"./src/javascripts/core/ui/components/conversation/event/conversation-suggestions.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g,useSuggestions:()=>j}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("./src/javascripts/core/domains/app/hooks.ts"),o=s("./src/javascripts/core/domains/app/slice.ts"),n=s("./src/javascripts/core/domains/config/hooks.ts"),a=s("./src/javascripts/core/domains/i18n/hooks.ts"),i=s("./src/javascripts/core/domains/store/index.ts"),c=s("./src/javascripts/core/domains/translations/hooks.ts"),l=s("./src/javascripts/core/lib/css.ts"),u=s("./src/javascripts/core/lib/id.ts"),d=s("preact/hooks"),p=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),m=s("./src/javascripts/core/ui/components/suggestions/suggestions-list.tsx"),f=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),h=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),v=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),y=s("./node_modules/preact/compat/jsx-runtime.mjs");const j=e=>{const{payload:t}=e,{body:s}=(0,c.useTranslatedEventData)(e);return{suggestions:s,payload:t}},g=({event:e,...t})=>{const[s,c]=(0,d.useState)(!0),g=(0,i.useAppDispatch)(),b=(0,r.useUserHasResponded)(),{addMessageBubble:x,emitEvent:_,sendAction:w}=(0,h.useSeamlyCommands)(),S=(0,f.useSeamlyHasConversation)(),{suggestions:k,payload:C}=j(e),{showSuggestions:E}=(0,n.useConfig)(),T=(0,h.useEvents)(),{t:N}=(0,a.useI18n)(),I=N("suggestions.headingText"),O=N("suggestions.footerText"),A=(0,d.useMemo)(()=>T.some(({payload:e,type:t})=>"message"===t&&e?.transactionLast),[T]),P=(0,d.useCallback)(({id:e,question:t})=>{if(!S())return;c(!1),g((0,o.setHasResponded)(!0));const s=(0,u.randomId)(),r={type:v.actionTypes.custom,originMessage:C.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:t}},transactionId:s};w(r),x(t,s),_(`action.${r.type}`,r)},[x,g,_,S,C.id,w]);return s&&!b&&A&&E?(0,y.jsxs)("div",{className:(0,l.className)("suggestions","suggestions--conversation"),children:[I&&(0,y.jsx)("p",{className:(0,l.className)("suggestions__heading"),children:I}),(0,y.jsxs)(p.default,{type:"suggestions",showParticipant:!1,event:e,...t,children:[(0,y.jsx)(m.default,{className:"suggestions__list--conversation",onClickSuggestion:P,suggestions:k}),O&&(0,y.jsx)("p",{className:(0,l.className)("suggestions__footer"),children:O})]})]}):null}},"./src/javascripts/core/ui/components/conversation/event/divider/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),o=s("./src/javascripts/core/ui/components/conversation/event/divider/variants/default.tsx"),n=s("./src/javascripts/core/ui/components/conversation/event/divider/variants/new-translation.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i={default:o.default,[r.dividerKeys.new_translation]:n.default},c=({event:e,...t})=>{const s=i[r.dividerKeys[e.payload.body.subtype]]||i.default;return(0,a.jsx)(s,{event:e,...t})}},"./src/javascripts/core/ui/components/conversation/event/divider/variants/default.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/event-divider.tsx"),n=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i={[n.dividerKeys.new_topic]:"new-topic"},c=({event:e})=>{const{t}=(0,r.useI18n)(),{subtype:s}=e.payload.body,c=i[n.dividerKeys[s]];return n.dividerKeys[s]?(0,a.jsx)(o.default,{dividerType:c,iconName:n.dividerKeys[s],title:t(`dividerKeys.${n.dividerKeys[s]}`)}):null}},"./src/javascripts/core/ui/components/conversation/event/divider/variants/new-translation.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/translations/slice.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("preact/hooks"),c=s("./node_modules/react-redux/dist/react-redux.mjs"),l=s("./src/javascripts/core/ui/components/conversation/event-divider.tsx"),u=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=({event:e})=>{const{t}=(0,r.useI18n)(),s=(0,u.useEvents)(),{body:{translationEnabled:p,text:m,title:f},id:h}=e.payload,v=(0,c.useSelector)(e=>e.translations.translatedEventGroups),y=(0,o.useAppDispatch)(),j=(0,i.useCallback)(()=>{v[h]?y((0,n.enableEventsTranslation)({events:s,id:h})):y((0,n.disableEventsTranslation)({events:s,id:h}))},[y,s,h,v]);return(0,d.jsx)(l.default,{iconName:"newTranslation",dividerType:"new-translation",title:f,description:m,children:p?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("button",{className:(0,a.className)("button","button--secondary"),onClick:j,children:t(v[h]?"translations.toggle.showTranslationsButtonText":"translations.toggle.hideTranslationsButtonText")})}):null})}},"./src/javascripts/core/ui/components/conversation/event/divider/variants/time-indicator.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/lib/css.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/components/conversation/event/hooks/use-formatted-date.ts"),a=s("./src/javascripts/core/ui/components/conversation/event-divider.tsx"),i=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),c=s("./src/javascripts/core/ui/utils/general-utils.ts"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=({event:e})=>{const t=(0,i.useForceUpdate)(),{date:s,time:u,timeUntilMidnight:d,srText:p}=(0,n.useFormattedDate)((0,c.microsecondsToMilliseconds)(e.payload.timeIndicator));return(0,o.useEffect)(()=>{const e=setTimeout(()=>{t()},d);return()=>{clearTimeout(e)}},[t,d]),(0,l.jsxs)(a.default,{dividerType:"time-indicator",children:[(0,l.jsxs)("h2",{className:(0,r.className)("divider__time"),"aria-hidden":"true",children:[(0,l.jsx)("span",{className:(0,r.className)("divider__time--date"),children:s}),(0,l.jsx)("span",{className:(0,r.className)("divider__time--time"),children:u})]}),(0,l.jsx)("p",{className:(0,r.className)("visually-hidden"),children:p})]})}},"./src/javascripts/core/ui/components/conversation/event/event-participant.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({eventPayload:e})=>{const{t}=(0,o.useI18n)(),{fromClient:s,participant:c}=e,l=(0,a.useSeamlyParticipant)(c)||{},{messages:u}=(0,r.useConfig)(),d=s?t("participants.user.name"):l&&l.name,{showAvatar:p,showName:m}=u&&u[s?"user":"agent"]||{};if(!p&&!m)return null;const f=[];return p&&d&&l.avatar&&f.push((0,i.jsx)("span",{className:(0,n.className)("message__avatar"),children:(0,i.jsx)("img",{src:l.avatar,className:(0,n.className)("avatar"),alt:""})})),m&&d&&f.push((0,i.jsx)("span",{className:(0,n.className)("message__author-name"),children:d})),f.length>0?(0,i.jsx)("div",{className:(0,n.className)("message__author"),children:f}):null}},"./src/javascripts/core/ui/components/conversation/event/event.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");var r=s("./src/javascripts/core/domains/store/index.ts"),o=s("./src/javascripts/core/domains/store/slice.ts"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("preact/compat"),c=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-context.ts"),l=s("./src/javascripts/core/ui/components/conversation/event/divider/variants/time-indicator.tsx"),u=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),d=s("./src/javascripts/core/ui/hooks/use-event-component-mapping.ts"),p=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),m=s("./node_modules/preact/compat/jsx-runtime.mjs");const f=({event:e,newParticipant:t})=>{const{eventRefs:s,unreadIds:f}=(0,c.useChatScrollContext)(),{sendAction:h}=(0,u.useSeamlyCommands)(),v=e.payload.id?s[e.payload.id]:void 0,{containerRef:y,isVisible:j}=(0,n.useIntersect)({containerRef:v,freezeOnceVisible:!0}),g=(0,r.useAppDispatch)(),[b,x]=(0,d.default)(e);if((0,i.useEffect)(()=>{if(j&&f?.includes(e.payload.id)){const t=f.reduce((t,s)=>e?.payload?.id&&s&&!t.includes(e.payload.id)?t.concat(s):t,[]);g((0,o.setEventsRead)(t)),h({type:p.actionTypes.read,events:t})}},[g,e.payload.id,j,h,f]),!b)return null;const _=["conversation__item"];return"info"===e.type?_.push("conversation__item--source-info"):e.payload.fromClient?_.push("conversation__item--source-user"):_.push("conversation__item--source-agent"),t&&_.push("conversation__item--new-participant"),(0,m.jsxs)("li",{className:(0,a.className)(_),ref:y,children:[e.payload.timeIndicator&&(0,m.jsx)(l.default,{event:e}),(0,m.jsx)(b,{event:e,children:(0,m.jsx)(x,{event:e})})]})}},"./src/javascripts/core/ui/components/conversation/event/hooks/use-event-link-click-handler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),o=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const n=({originMessage:e,transactionId:t})=>{const{emitEvent:s,sendAction:n}=(0,r.useSeamlyCommands)();return r=>{if(r.target&&r.target.dataset.linkId){const a={type:o.actionTypes.navigate,originMessage:e,transactionId:t,link:{id:r.target.dataset.linkId,url:r.target.getAttribute("href")}};n(a),s(`action.${a.type}`,a)}}}},"./src/javascripts/core/ui/components/conversation/event/hooks/use-formatted-date.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useFormattedDate:()=>c});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/ui/utils/general-utils.ts");const a={month:"long",day:"numeric",year:"numeric"},i={hour:"numeric",minute:"numeric"},c=e=>{const{t}=(0,o.useI18n)(),s=(0,r.useConfig)(),c=s?.context?.userLocale??[],l=new Date(e),u=new Date,d=new Date(u);d.setHours(24,0,0,0);const p=d.valueOf()-u.valueOf(),m=l.toString(),f=new Intl.DateTimeFormat(c,i).format(l);let h=(0,n.getRelativeDate)(l,u);switch(h){case"today":h=t("dateTime.today");break;case"yesterday":h=t("dateTime.yesterday");break;default:h=new Intl.DateTimeFormat(c,a).format(l)}return{date:h,srText:t("dateTime.srText",{date:h,time:f}),time:f,fullDateTime:m,timeUntilMidnight:p}}},"./src/javascripts/core/ui/components/conversation/event/image-lightbox.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/components/layout/icon.tsx"),i=s("./src/javascripts/core/ui/components/widgets/lightbox.tsx"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=({description:e,url:t})=>{const{t:s}=(0,r.useI18n)(),[l,u]=(0,n.useState)(!1);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("button",{type:"button",className:(0,o.className)("modal__enlarge"),onClick:()=>{u(!0)},children:[s("message.image.srTextEnlargeButtonLabel",{description:e}),(0,c.jsx)(a.default,{name:"enlarge",size:"32",alt:""})]}),l&&(0,c.jsx)(i.default,{url:t,description:e,onClose:()=>{u(!1)}})]})}},"./src/javascripts/core/ui/components/conversation/event/image.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/domains/store/index.ts"),o=s("./src/javascripts/core/domains/store/slice.ts"),n=s("./src/javascripts/core/domains/translations/hooks.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),c=s("./src/javascripts/core/ui/components/conversation/event/image-lightbox.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=({event:e,descriptorId:t,...s})=>{const{body:u}=(0,n.useTranslatedEventData)(e),[d,p]=(0,a.useState)(!1),m=(0,r.useAppDispatch)();return(0,l.jsxs)(i.default,{event:e,type:"image",...s,children:[(0,l.jsx)("img",{src:u?.url,id:t,alt:u?.description||void 0,onLoad:()=>{m((0,o.setLoadedImageEventIds)(e.payload.id)),p(!0)}}),u?.isZoomable&&d&&(0,l.jsx)(c.default,{description:u?.description,url:u?.url})]})}},"./src/javascripts/core/ui/components/conversation/event/participant.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/event-divider.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({event:e})=>{const{participant:t}=e.payload,{body:s}=(0,r.useTranslatedParticipantData)(e);return s?(0,n.jsx)(o.default,{graphicSrc:t?.avatar,graphicType:t?.avatar?"avatar":void 0,iconName:t?.avatar?void 0:"balloon",dividerType:"participant",title:s}):null}},"./src/javascripts/core/ui/components/conversation/event/splash.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/conversation/event/hooks/use-event-link-click-handler.ts"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=({event:e,...t})=>{const{payload:s}=e,{body:i}=(0,r.useTranslatedEventData)(e),c=(0,o.default)({originMessage:s.id,transactionId:s.transactionId});return(0,a.jsx)(n.default,{type:"splash",event:e,onClick:c,...t,bodyProps:{dangerouslySetInnerHTML:{__html:i?.text||""}}})}},"./src/javascripts/core/ui/components/conversation/event/text.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./src/javascripts/core/ui/components/conversation/event/hooks/use-event-link-click-handler.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({event:e,...t})=>{const{body:s}=(0,r.useTranslatedEventData)(e),c=(0,a.default)({originMessage:e.payload.id,transactionId:e.payload.transactionId}),l=(0,o.useMemo)(()=>e.payload.optimisticallyInjected?{children:(0,i.jsx)("p",{children:s?.text})}:{bodyProps:{dangerouslySetInnerHTML:{__html:s?.text||""}}},[s,e]);return(0,i.jsx)(n.default,{type:"text",event:e,onClick:c,...t,...l})}},"./src/javascripts/core/ui/components/conversation/event/translation.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/translations/hooks.ts"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=({event:e,...t})=>{const{t:s}=(0,r.useI18n)(),{body:i}=(0,o.useTranslatedEventData)(e);return(0,a.jsx)(n.default,{type:"text",event:e,...t,children:s(i.key.join("."),i.variables)})}},"./src/javascripts/core/ui/components/conversation/event/upload.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/translations/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("preact/hooks"),i=s("./node_modules/react-redux/dist/react-redux.mjs"),c=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),l=s("./src/javascripts/core/ui/components/layout/icon.tsx"),u=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p="PROCESSING_IMAGE",m=({img:e,filename:t})=>{const{t:s}=(0,r.useI18n)(),o=s("fileUpload.srFileUploadedText",{fileName:t});return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("span",{className:(0,n.className)(["download","download--preview"]),children:[(0,d.jsx)("img",{src:e,alt:o}),(0,d.jsx)("span",{"aria-hidden":"true",className:(0,n.className)("file-download"),children:t})]})})},f=({children:e,fileId:t,isDeleted:s,onClickHandler:r,url:o,target:a})=>t&&!s?(0,d.jsx)("button",{type:"button",onClick:r,className:(0,n.className)(["download","download-link"]),children:e}):o?(0,d.jsx)("a",{href:o,download:!0,target:a,className:(0,n.className)(["download","download-link"]),children:e}):(0,d.jsx)("span",{className:(0,n.className)("download"),children:e}),h=({event:e,...t})=>{const{t:s}=(0,r.useI18n)(),{body:h}=(0,o.useTranslatedEventData)(e),{fromClient:v,id:y}=e.payload,{filename:j,id:g,isDeleted:b,url:x}=h,_=(0,u.useSeamlyApiContext)(),w=(e=>{const{processingFileUploads:t}=(0,i.useSelector)(({state:e})=>e);return(0,a.useMemo)(()=>{if(t.some(t=>t===e))return p;try{return sessionStorage.getItem(`image-${e}`)}catch(e){return}},[e,t])})(y),S=(0,a.useMemo)(()=>s(b||!x&&!g?"fileUpload.srFileUploadedText":"fileUpload.srFileDownloadText",{fileName:j}),[x,g,j,b,s]);return(0,d.jsx)(c.default,{event:e,type:"upload",...t,children:w&&w!==p?(0,d.jsx)(m,{img:w,filename:j}):(0,d.jsxs)(f,{fileId:g,isDeleted:b,onClickHandler:()=>{g&&j&&_.downloadFile(g,j)},url:x,target:v?void 0:"_blank",children:[(0,d.jsx)(l.default,{name:"download",size:"16",alt:S}),(0,d.jsx)("span",{"aria-hidden":"true",className:(0,n.className)("file-download"),children:j})]})})}},"./src/javascripts/core/ui/components/conversation/event/video.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({event:e,descriptorId:t,...s})=>{const{body:c}=(0,r.useTranslatedEventData)(e);return(0,a.useSeamlyMessageContainerClassNames)(e).push("message--type-video"),(0,i.jsxs)(n.default,{event:e,type:"video",...s,children:[(0,i.jsx)("div",{id:t,className:(0,o.className)("visually-hidden"),children:c?.description}),(0,i.jsx)("iframe",{title:c?.description||"",src:c?.url,allow:"autoplay; encrypted-media",allowFullScreen:!0})]})}},"./src/javascripts/core/ui/components/conversation/loader.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),n=s("./src/javascripts/core/ui/components/conversation/event/event-participant.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=()=>{const{id:e}=(0,o.useSeamlyCurrentAgent)()||{};return(0,a.jsx)("li",{className:(0,r.className)("conversation__item","conversation__item--source-agent"),children:(0,a.jsxs)("div",{className:(0,r.className)("message","message--source-agent","message--type-loading"),children:[(0,a.jsx)(n.default,{eventPayload:{fromClient:!1,participant:e}}),(0,a.jsx)("div",{className:(0,r.className)("message__body"),children:(0,a.jsxs)("span",{className:(0,r.className)("loader"),children:[(0,a.jsx)("span",{className:(0,r.className)("loader__part","one")}),(0,a.jsx)("span",{className:(0,r.className)("loader__part","two")}),(0,a.jsx)("span",{className:(0,r.className)("loader__part","three")}),(0,a.jsx)("span",{className:(0,r.className)("loader__part","four")})]})})]})})}},"./src/javascripts/core/ui/components/conversation/message-container.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js");var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/hooks/component-helper-hooks.ts"),a=s("./src/javascripts/core/ui/components/conversation/event/event-participant.tsx"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=({showParticipant:e=!0,event:t,type:s,modifiers:c,children:l,bodyProps:u={},info:d,...p})=>{const m=(0,n.useSeamlyMessageContainerClassNames)(t),{hasTranslation:f,isTranslated:h,locale:v}=(0,r.useTranslatedEventData)(t);return s&&m.push(`message--type-${s}`),c&&("string"==typeof c&&(c=c.split(" ").filter(e=>e.length)),c.forEach(e=>{m.push(`message--${e}`)})),h&&m.push("message--is-translated"),f&&m.push("message--has-translation"),h&&(u={...u,lang:v}),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:(0,o.className)(m),...p,children:[e&&(0,i.jsx)(a.default,{eventPayload:t.payload}),(0,i.jsx)("div",{className:(0,o.className)("message__body"),...u,children:l}),d&&(0,i.jsx)("div",{"aria-hidden":"true",className:(0,o.className)("message__info"),children:d})]})})}},"./src/javascripts/core/ui/components/conversation/use-chat-scroll.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/store/selectors.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("preact/hooks"),a=s("./node_modules/react-redux/dist/react-redux.mjs"),i=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const l=e=>{const t=(0,n.useRef)(null),[s,l]=(0,n.useState)(!0),u=(0,a.useSelector)(r.selectUnreadEventIds),d=(0,c.useEvents)(),p=(0,c.useSeamlyIsLoading)(),{isOpen:m}=(0,o.useVisibility)(),f=(0,c.useLoadedImageEventIds)(),{processingFileUploads:h,isLastEventFromClient:v}=(0,a.useSelector)(({state:e})=>e);(0,n.useEffect)(()=>{const e=t.current;if(!e)return()=>{};const s=()=>{const{scrollHeight:t,scrollTop:s,clientHeight:r}=e,o=Math.abs(t-s-r)>10;l(!o)};return e.addEventListener("scroll",s),()=>e.removeEventListener("scroll",s)},[]);const y=(0,n.useCallback)(()=>{requestAnimationFrame(async()=>{await(0,i.timeout)(30),t.current?.scrollTo({top:t.current?.scrollHeight,left:0,behavior:"auto"})})},[]);return(0,n.useEffect)(()=>{v&&y()},[v,y]),(0,n.useEffect)(()=>{s&&y()},[s,u,d,p,m,f,h,y]),{containerRef:t,unreadIds:u,scrollToRef:()=>{const s=u.at(0);if(void 0!==s){const r=e[s]?.current;t.current?.scrollTo({top:r?.offsetTop,behavior:"auto",left:0})}},scrollToBottom:y}}},"./src/javascripts/core/ui/components/core/seamly-activity-event-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=(0,s("preact").createContext)(null)},"./src/javascripts/core/ui/components/core/seamly-activity-monitor.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/javascripts/core/config.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),l=s("./src/javascripts/core/ui/components/core/seamly-activity-event-context.ts"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=({children:e})=>{const{isMinimized:t}=(0,o.useVisibility)(),s=(0,a.useRef)(0),{sendAction:d}=(0,i.useSeamlyCommands)(),{hasCountdown:p,isActive:m,stopCountdown:f}=(0,i.useSeamlyIdleDetachCountdown)(),h=(0,a.useCallback)(()=>{if(t)return;const e=(new Date).getTime(),o=()=>{d({type:c.actionTypes.interactivityUpdate}),s.current=e};p&&m&&(o(),f()),e-s.current>r.activitySendDelay&&o()},[d,p,m,f,t]);return(0,u.jsx)("div",{className:(0,n.className)("activity-monitor"),tabIndex:-1,onMouseDown:h,onKeyUp:h,onTouchStart:h,onMouseMove:h,onWheel:h,onPointerDown:h,onPointerMove:h,children:(0,u.jsx)(l.default.Provider,{value:h,children:e})})}},"./src/javascripts/core/ui/components/core/seamly-api-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{SeamlyApiContext:()=>o,SeamlyEventBusContext:()=>n});var r=s("preact");const o=(0,r.createContext)(null),n=(0,r.createContext)(null)},"./src/javascripts/core/ui/components/core/seamly-chat.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/javascripts/core/ui/hooks/use-seamly-chat.ts"),o=s("./node_modules/preact/compat/jsx-runtime.mjs");const n=({children:e})=>((0,r.default)(),(0,o.jsx)(o.Fragment,{children:e}))},"./src/javascripts/core/ui/components/core/seamly-core.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var r=s("./src/javascripts/core/domains/errors/index.ts"),o=s("preact/hooks"),n=s("./node_modules/react-redux/dist/react-redux.mjs"),a=s("./src/javascripts/core/ui/components/core/seamly-chat.tsx"),i=s("./src/javascripts/core/ui/components/conversation/component-filter.tsx"),c=s("./src/javascripts/core/ui/components/core/seamly-activity-monitor.tsx"),l=s("./src/javascripts/core/ui/components/core/seamly-api-context.ts"),u=s("./src/javascripts/core/ui/components/core/seamly-event-subscriber.ts"),d=s("./src/javascripts/core/ui/components/core/seamly-file-upload.tsx"),p=s("./src/javascripts/core/ui/components/core/seamly-idle-detach-counter.ts"),m=s("./src/javascripts/core/ui/components/core/seamly-initializer.tsx"),f=s("./src/javascripts/core/ui/components/core/seamly-instance-functions-loader.ts"),h=s("./src/javascripts/core/ui/components/core/seamly-live-region.tsx"),v=s("./src/javascripts/core/ui/components/core/seamly-new-notifications.ts"),y=s("./src/javascripts/core/ui/components/core/seamly-read-state.ts"),j=s("./node_modules/preact/compat/jsx-runtime.mjs");const g=({store:e,children:t,eventBus:s,api:g})=>((0,o.useErrorBoundary)(t=>{console.error(t),e.dispatch((0,r.catchError)(t))}),(0,j.jsx)(n.Provider,{store:e,children:(0,j.jsx)(l.SeamlyEventBusContext.Provider,{value:s,children:(0,j.jsx)(l.SeamlyApiContext.Provider,{value:g,children:(0,j.jsx)(h.default,{children:(0,j.jsx)(a.default,{children:(0,j.jsxs)(i.default,{children:[(0,j.jsx)(m.default,{}),(0,j.jsx)(u.default,{}),(0,j.jsx)(y.default,{}),(0,j.jsx)(v.default,{}),(0,j.jsx)(p.default,{}),(0,j.jsxs)(c.default,{children:[(0,j.jsx)(f.default,{}),(0,j.jsx)(d.default,{children:t})]})]})})})})})}))},"./src/javascripts/core/ui/components/core/seamly-event-subscriber.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var r=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),o=s("./src/javascripts/core/api/errors/seamly-offline-error.ts"),n=s("./src/javascripts/core/api/errors/seamly-session-expired-error.ts"),a=s("./src/javascripts/core/domains/app/slice.ts"),i=s("./src/javascripts/core/domains/i18n/actions.ts"),c=s("./src/javascripts/core/domains/interrupt/slice.ts"),l=s("./src/javascripts/core/domains/store/index.ts"),u=s("./src/javascripts/core/domains/store/actions.ts"),d=s("./src/javascripts/core/domains/store/slice.ts"),p=s("./src/javascripts/core/domains/translations/slice.ts"),m=s("preact/hooks"),f=s("./src/javascripts/core/ui/hooks/event-bus-hooks.ts"),h=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),v=s("./src/javascripts/core/ui/hooks/use-seamly-conversation.ts");const y=["text","choice_prompt","image","video"],j=()=>{const e=(0,v.default)(),t=(0,m.useRef)(),s=(0,m.useRef)(),j=(0,l.useAppDispatch)(),g=(0,f.default)(),b=(0,m.useRef)(null),{initCountdown:x,endCountdown:_}=(0,h.useSeamlyIdleDetachCountdown)(),{emitEvent:w}=(0,h.useSeamlyCommands)(),{hasPrompt:S,continueChat:k}=(0,h.useSeamlyResumeConversationPrompt)(),C=(0,m.useRef)(S);return(0,m.useEffect)(()=>{C.current=S},[S]),(0,m.useEffect)(()=>{e.socket&&(e.onConnection(({currentState:e})=>{if("attach_channel_erred"===e){const e=new r.default;return j((0,c.setInterrupt)({name:e.name,message:e.message,langKey:e.langKey,originalEvent:e.originalEvent,originalError:e.originalError,action:e.action})),!0}return!1}),e.onError(e=>{const t=new o.default(e);j((0,c.setInterrupt)({name:t.name,message:t.message,langKey:t.langKey,originalEvent:t.originalEvent,originalError:t.originalError})),j((0,d.clearEvents)())}),e.onOpen(()=>{j((0,c.clearInterrupt)())}))},[e,e.socket,j]),(0,m.useEffect)(()=>{e.onConnection(({connected:t})=>!!t&&(s.current&&e?.removeListener("message",s.current),s.current=e=>{switch(e.type){case"ui":switch(e.payload.type){case"idle_detach_countdown":"idle_detach_countdown"===e.payload.body.type&&x(e.payload.body.duration);break;case"loading":j((0,d.setIsLoading)(e.payload.body.loading));break;case"idle_detach_countdown_elapsed":_(void 0,!0);break;case"resume_conversation_prompt":j((0,d.initResumeConversationPrompt)());break;case"user_first_response":j((0,a.setHasResponded)(!0)),w("system.userFirstResponse",e.payload.body);break;case"translation_proposal":j((0,p.setTranslationProposalPrompt)(e.payload.body))}break;case"service_attach":{const{service:{name:t,settings:{proactiveMessages:{enabled:s},entry:r},sessionId:o}}=e.payload;j((0,d.setProactiveMessages)(s||!1)),t&&w("system.serviceChanged",t),o&&j((0,d.setActiveService)(o)),j((0,d.setServiceEntryMetadata)(r)),j((0,d.updateFeatures)({uploads:{enabled:r.options?.upload?.enabled||!1}}));break}case"context":e.payload.contentLocale&&e.payload.userLocale&&j((0,i.setLocale)(e.payload.userLocale));break;case"message":switch(e.payload.type){case"text":case"choice_prompt":case"splash":case"image":case"upload":case"video":case"custom":case"carousel":case"card":if(e.payload.service&&e.payload.service.serviceSessionId&&j((0,d.setActiveService)(e.payload.service.serviceSessionId)),e.payload.fromClient){j((0,d.updateEvent)(e));break}C.current&&k(),j((0,d.addEvent)(e))}break;case"participant":(e=>{const{payload:t}=e;if(!t||!t.participant)return;const{fromClient:s,participant:r}=t;!s&&"string"!=typeof r&&r?.name&&j((0,d.setHeaderSubTitle)(r.name)),j((0,d.setParticipant)(t)),"string"!=typeof r&&r.introduction&&j((0,d.addEvent)({...e,payload:{...t,type:"participant"}}))})(e);break;case"service_data":e.payload.persist&&j((0,d.setServiceDataItem)(e.payload));break;case"info":"divider"!==e.payload.type&&"text"!==e.payload.type&&"translation"!==e.payload.type||j((0,d.addEvent)({type:"info",payload:{...e.payload,participant:null}}));break;case"error":switch(e.payload.type){case"find_conversation":{const t=new n.default(e);j((0,c.setInterrupt)({name:t.name,action:t.action,message:t.message,originalEvent:t.originalEvent,originalError:t.originalError}));break}case"conversation":{const t=new r.default(e);j((0,c.setInterrupt)({name:t.name,message:t.message,langKey:t.langKey,originalEvent:t.originalEvent,originalError:t.originalError,action:t.action}));break}}}return e},e.onMessage(s.current),!0))},[k,e,j,w,_,g,x]),(0,m.useEffect)(()=>{e.onConnection(({connected:s})=>!!s&&(t.current&&e.removeListener("message",t.current),t.current=async({payload:e})=>{if("history_changed"===e?.type)try{const t=await j((0,u.getConversation)(e)).unwrap();t&&"service"in t&&j((0,d.setEvents)(t))}catch(e){}return y.includes(e?.type)?(e.id!==b.current&&g.emit("message",e),b.current=e.id,e):e},e.addListener("message",t.current),!0))},[e,j,g]),null}},"./src/javascripts/core/ui/components/core/seamly-file-upload-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=(0,s("preact").createContext)(null)},"./src/javascripts/core/ui/components/core/seamly-file-upload.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/store/slice.ts"),a=s("./src/javascripts/core/lib/id.ts"),i=s("preact/hooks"),c=s("./src/javascripts/core/ui/components/core/seamly-file-upload-context.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=({children:e})=>{const{t}=(0,r.useI18n)(),s=(0,o.useAppDispatch)(),d=(0,l.useSeamlyApiContext)(),{addUploadBubble:p}=(0,l.useSeamlyCommands)(),m=(0,i.useCallback)(async(e,t)=>{s((0,n.startProcessingImage)(t));const r=await(e=>new Promise((t,s)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{"string"==typeof r.result&&t(r.result)},r.onerror=e=>s(e)}))(e),o=new Image;o.src=r,await o.decode();const a=(e=>{const t=document.createElement("canvas"),s=t.getContext("2d"),[r,o]=(e=>{const{height:t,width:s}=e;return s>t&&s>600?[600,600*t/s]:t>600?[600*s/t,600]:[s,t]})(e);return t.width=r,t.height=o,s?.drawImage(e,0,0,r,o),t.toDataURL()})(o);try{sessionStorage.setItem(`image-${t}`,a)}catch(e){}finally{s((0,n.doneProcessingImage)(t))}},[s]),f=(0,i.useCallback)(e=>{const r=(0,a.randomId)(),o=d.uploadFile(e,e=>{s((0,n.setUploadProgress)({fileId:r,progress:Math.ceil(e)}))},async t=>{const{id:o,transactionId:a,occurredAt:i,body:{contentType:c,filename:l,filesize:u}}=t;s((0,n.setUploadComplete)(r)),p(o,a,i,c,l,u),c.includes("image/")&&await m(e,o)},e=>{let o;switch(e?.error||""){case"file_uploads_are_disabled":o=t("fileUpload.errors.unavailable");break;case"request_entity_too_large":o=t("fileUpload.errors.tooLarge");break;case"file_has_invalid_mime_type":o=t("fileUpload.errors.wrongType");break;case"virus_found":o=t("fileUpload.errors.virusFound");break;default:o=t("fileUpload.errors.general")}s((0,n.setUploadError)({fileId:r,errorText:o}))});s((0,n.registerUpload)({fileId:r,fileName:e.name,uploadHandle:o}))},[m,p,d,s,t]);return(0,u.jsx)(c.default.Provider,{value:f,children:e})}},"./src/javascripts/core/ui/components/core/seamly-idle-detach-counter.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("./src/javascripts/core/ui/hooks/use-interval.ts"),o=s("./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts");const n=()=>{const{hasCountdown:e,isActive:t,remaining:s,decrementCountdown:n}=(0,o.default)();return(0,r.default)(()=>{n()},e&&t&&s&&s>0?1e3:null),null}},"./src/javascripts/core/ui/components/core/seamly-initializer.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts");const a=()=>{const{initUserSelectedOptions:e}=(0,n.useSeamlyOptions)(),t=(0,o.useRef)(!1),s=(0,r.useConfig)();return(0,o.useEffect)(()=>{s.api&&!t.current&&(t.current=!0,e())},[e,s]),null}},"./src/javascripts/core/ui/components/core/seamly-instance-functions-loader.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.every.js");var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/config/slice.ts"),n=s("./src/javascripts/core/domains/interrupt/selectors.ts"),a=s("./src/javascripts/core/domains/store/index.ts"),i=s("./src/javascripts/core/domains/translations/hooks.ts"),c=s("./src/javascripts/core/domains/visibility/constants.ts"),l=s("./src/javascripts/core/domains/visibility/hooks.ts"),u=s("preact/hooks"),d=s("./node_modules/react-redux/dist/react-redux.mjs"),p=s("./src/javascripts/core/ui/hooks/event-bus-hooks.ts"),m=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),f=s("./src/javascripts/core/ui/utils/seamly-utils.ts");function h(e,t,s=[]){const r=(0,p.default)(),o=(0,u.useRef)(t);(0,u.useEffect)(()=>{if(!s.every(Boolean))return;const t=(...e)=>o.current?.(...e);return r.emit("function.register",e,t),()=>r.emit("function.unregister",e,t)},[r,e,...s])}const v=()=>{const e=(0,r.useConfig)(),{emitEvent:t,sendAction:s,sendContext:v,sendMessage:y}=(0,m.useSeamlyCommands)(),j=(0,a.useAppDispatch)(),{setVisibility:g,visible:b}=(0,l.useVisibility)(),x=(0,u.useRef)(b),_=(0,p.default)(),w=(0,m.useSeamlyApiContext)(),S=(0,m.useSeamlyUnreadCount)(),k=(0,u.useRef)(null),C=(0,u.useRef)(null),{isInline:E,isResolving:T}=(0,m.useSeamlyLayoutMode)(),N=(0,d.useSelector)(n.selectHasError),I=(0,m.useSeamlyConversationUrl)(),O=(0,u.useRef)(null),A=(0,m.useSeamlyActivityEventHandler)(),{enableTranslations:P,disableTranslations:L}=(0,i.useTranslations)();return(0,u.useEffect)(()=>{x.current=b},[b]),h("askText",e=>{y({body:e})},[w.send]),h("setVariables",e=>{v({variables:e})},[w.send]),h("getVisibility",e=>{e?e(x.current):console.warn("A callback function is required for the getVisibility action.")}),h("setVisibility",e=>{const t="string"==typeof e||null===e?e:e.visibility;Object.values(c.visibilityStates).includes(t)?(A(),g(e)):console.error('Requested visibility states should be "open", "minimized" ,"hidden" or null.')},[e.api]),h("sendCustomAction",(e,r)=>{const o={type:"custom",body:{type:e,body:r}};s(o),t(`action.${o.type}`,o)},[w.send]),h("setTopic",({name:e,fallbackMessage:t,message:r,userTriggered:n})=>{n&&j((0,o.updateConfig)({showSuggestions:!1})),e&&t?s({type:f.actionTypes.setTopic,body:{name:e,fallbackMessage:t,message:r}}):console.warn("A name and a fallbackMessage are required for the setTopic action.")},[w.send]),h("setContext",e=>{v(e)},[w.send]),h("setTranslation",({enabled:e,locale:t})=>{e?P(t,f.sourceTypes.windowApi):L()},[w.send]),(0,u.useEffect)(()=>{T||N||(O.current&&O.current!==I&&_.emit("unreadMessageCount",S),b===c.visibilityStates.open&&b!==C.current&&0!==k.current&&_.emit("unreadMessageCount",0),b!==c.visibilityStates.open&&S!==k.current&&_.emit("unreadMessageCount",S),C.current=b,k.current=S,"string"==typeof I&&(O.current=I))},[S,b,_,E,T,N,I]),null}},"./src/javascripts/core/ui/components/core/seamly-live-region-context.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{SeamlyLiveRegionContext:()=>r});const r=(0,s("preact").createContext)(null)},"./src/javascripts/core/ui/components/core/seamly-live-region.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/lib/css.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/hooks/event-bus-hooks.ts"),a=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),i=s("./src/javascripts/core/ui/components/core/seamly-live-region-context.ts"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=({children:e})=>{const t=(0,n.default)(),s=(0,o.useRef)(null),[l,u]=(0,o.useState)(),d=(0,o.useRef)(!0),p=(0,o.useCallback)(e=>{d.current&&(u(e),t.emit("aria-live",e))},[u,t]);return(0,o.useEffect)(()=>(s.current=null,l?.messageText&&(s.current=setTimeout(()=>{p({}),s.current&&clearTimeout(s.current)},600)),()=>{s.current&&clearTimeout(s.current)}),[l,p]),(0,o.useEffect)(()=>()=>{d.current=!1},[]),(0,c.jsxs)(i.SeamlyLiveRegionContext.Provider,{value:p,children:[e,(0,c.jsxs)("div",{className:(0,r.className)("app__live-container"),children:[(0,c.jsx)("div",{"aria-live":"assertive","aria-atomic":"true",className:(0,r.className)("visually-hidden"),children:l?.ariaLive===a.ariaLiveLevels.assertive?l?.messageText:null}),(0,c.jsx)("div",{"aria-live":"polite","aria-atomic":"true",className:(0,r.className)("visually-hidden"),children:l?.ariaLive===a.ariaLiveLevels.polite?l?.messageText:null})]})]})}},"./src/javascripts/core/ui/components/core/seamly-new-notifications.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts");const a=()=>{const{t:e}=(0,r.useI18n)(),t=(0,n.useSeamlyIsHistoryLoaded)(),{sendPolite:s}=(0,n.useLiveRegion)();return(0,o.useEffect)(()=>{t&&setTimeout(()=>{s(e("window.srTexts.onHistoryLoad"))},500)},[t,e,s]),null}},"./src/javascripts/core/ui/components/core/seamly-read-state.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/config.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/utils/general-utils.ts");const l=()=>{const{t:e}=(0,o.useI18n)(),{isOpen:t,isVisible:s}=(0,n.useVisibility)(),l=(0,i.useSeamlyUnreadCount)(),{sendPolite:u}=(0,i.useLiveRegion)(),d=(0,a.useMemo)(()=>(0,c.debounce)(u,r.unreadScreenReaderWait),[u]),p=(0,a.useRef)(null),m=(0,a.useRef)(null);return(0,a.useEffect)(()=>{p.current!==s&&!s&&m.current&&m.current(),0!==l&&!t&&s&&(m.current=d(e("message.srTextUnreadCount",{unreadCount:l}))),p.current=s},[l,t,s,d,e]),null}},"./src/javascripts/core/ui/components/entry/abort-transaction-button/abort-transaction-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),n=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),a=s("./src/javascripts/core/ui/components/entry/text-entry/hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");function c(){const{abortTransaction:e,clearEntryAbortTransaction:t}=(0,a.useEntryAbortTransaction)(),s=(0,o.useSeamlyApiContext)();return e?(0,i.jsx)("li",{className:(0,r.className)(["cvco-conversation__item","cvco-conversation__item--abort-transaction"]),children:(0,i.jsx)("button",{className:(0,r.className)(["button","button--secondary","abort-transaction__button"]),type:"button",onClick:()=>{s.send("action",{type:n.actionTypes.setTopic,body:{name:e.topicName,fallbackMessage:e.topicFallbackMessage}}),t()},children:e.label})}):null}},"./src/javascripts/core/ui/components/entry/entry-container.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/components/warnings/idle-detach-warning.tsx"),c=s("./src/javascripts/core/ui/components/warnings/resume-conversation-prompt.tsx"),l=s("./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),d=s("./src/javascripts/core/ui/utils/general-utils.ts"),p=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),m=s("./src/javascripts/core/ui/components/entry/text-entry/index.tsx"),f=s("./src/javascripts/core/ui/components/entry/upload/index.tsx"),h=s("./src/javascripts/core/ui/components/entry/upload-toggle.tsx"),v=s("./node_modules/preact/compat/jsx-runtime.mjs");const y=()=>{const{isOpen:e}=(0,o.useVisibility)(),t=(0,a.useRef)(null),{hasCountdown:s}=(0,u.useSeamlyIdleDetachCountdown)(),[y,j]=(0,a.useState)(s),{hasPrompt:g}=(0,u.useSeamlyResumeConversationPrompt)(),[b,x]=(0,a.useState)(g),_=(0,u.useSkiplinkTargetFocusing)(),w=(0,a.useRef)(!1),{activeEntry:S,activeEntryOptions:k}=(0,l.useSeamlyEntry)(),[C,E]=(0,a.useState)({text:m.default,upload:f.default}),[T,N]=(0,a.useState)(()=>S),I=(0,r.useConfig)(),{accountAllowsUploads:O}=(0,u.useFileUploadMeta)(),A=(0,a.useCallback)(()=>{(0,d.runIfElementContainsOrHasFocus)(t.current,_)},[_]);(0,a.useEffect)(()=>{const{customComponents:e}=I,{entry:t}=e||{};t&&E(e=>({...e,...t}))},[I]),(0,a.useEffect)(()=>{A(),j(s),x(g)},[s,g,A]),(0,a.useEffect)(()=>{N(S),A()},[S,A,t]),w.current=!(!t.current||!t.current.contains(document.activeElement));const P=C[T]||m.default,{allowManualInput:L=!0}=k;return(0,v.jsxs)("div",{className:(0,n.className)("chat__entry"),ref:t,children:[y&&(0,v.jsx)(i.default,{}),b&&(0,v.jsx)(c.default,{}),(0,v.jsxs)("div",{className:(0,n.className)(["entry__body",...s||g||!1===L?["entry__body--hidden"]:[]]),children:[T!==p.entryTypes.upload&&O&&e?(0,v.jsx)(h.default,{}):null,(0,v.jsx)(P,{})]})]})}},"./src/javascripts/core/ui/components/entry/text-entry/hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useCharacterLimit:()=>m,useEntryAbortTransaction:()=>h,useEntryTextTranslation:()=>f});var r=s("./src/javascripts/core/config.ts"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/forms/hooks.ts"),a=s("./src/javascripts/core/domains/i18n/hooks.ts"),i=s("./src/javascripts/core/domains/store/index.ts"),c=s("./src/javascripts/core/domains/store/slice.ts"),l=s("preact/hooks"),u=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),d=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),p=s("./src/javascripts/core/ui/utils/general-utils.ts");function m(e){const{t}=(0,a.useI18n)(),{sendAssertive:s}=(0,u.useLiveRegion)(),{hasLimit:o,limit:i}=(0,d.useEntryTextLimit)(),c=(0,l.useMemo)(()=>(0,p.debounce)(s,r.maxCharacterSrDebounceDelay),[s]),m=(0,l.useMemo)(()=>(0,p.debounce)((e,s)=>{e&&c(t("input.srCharacterLimitText",{limit:s}))},r.maxCharacterSrDebounceDelay),[c,t]),[{value:f}]=(0,n.useFormControl)(e),h="number"==typeof i&&o&&f?i-f.length:i,v=!(!o||"number"!=typeof h)&&h<=r.maxCharacterWarningLimit,y=!(!o||"number"!=typeof h)&&h<0;return(0,l.useEffect)(()=>{m(v,h)},[v,h,m]),{hasCharacterLimit:o,characterLimit:i,reachedCharacterWarning:v,reachedCharacterLimit:y,remainingChars:h}}const f=e=>{const{hasCharacterLimit:t,characterLimit:s}=m(e),{entryMeta:{active:r,optionsOverride:n}}=(0,d.useSeamlyStateContext)();let i=null,c=null;r&&n&&"object"==typeof n[r]&&(i=n[r].label,c=n[r].placeholder);const{alwaysShowEntryLabel:u}=(0,o.useConfig)(),{t:p}=(0,a.useI18n)();return{placeholder:(0,l.useMemo)(()=>p("input.inputPlaceholder",{hasLimit:t,text:c||p("input.inputPlaceholderText"),limit:t?s:null}),[p,t,s,c]),label:(0,l.useMemo)(()=>p("input.inputLabel",{hasLimit:!i&&t,text:i||p("input.inputLabelText"),limit:!i&&t?s:null}),[p,t,s,i]),labelClass:(0,l.useMemo)(()=>!0===u||i?"label":"visually-hidden",[u,i])}},h=()=>{const e=(0,i.useAppDispatch)(),{entryMeta:{actions:t,translatedActions:s}}=(0,d.useSeamlyStateContext)();return{abortTransaction:s?.abortTransaction||t?.abortTransaction,clearEntryAbortTransaction:()=>{e((0,c.clearAbortTransaction)())}}}},"./src/javascripts/core/ui/components/entry/text-entry/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d,textEntryControlName:()=>u});var r=s("./src/javascripts/core/domains/forms/provider.tsx"),o=s("./src/javascripts/core/domains/visibility/constants.ts"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/components/entry/text-entry/text-entry-form.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u="textMessageEntry";function d({...e}){const{isOpen:t,setVisibility:s}=(0,n.useVisibility)(),d=(0,i.useSkiplink)(),p=(0,i.useSkiplinkTargetFocusing)(),{sendMessage:m}=(0,i.useSeamlyCommands)(),f=(0,a.useCallback)((e,{updateControlValue:r})=>{m({body:e[u]}),r(u,""),p(),t||s({visibility:o.visibilityStates.open})},[m,p,t,s]);return(0,l.jsx)(r.default,{...e,formId:"textEntry",persistData:!0,onSubmit:f,children:(0,l.jsx)(c.default,{controlName:u,skipLinkId:d})})}},"./src/javascripts/core/ui/components/entry/text-entry/text-entry-form.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h});var r=s("./src/javascripts/core/domains/forms/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("preact/hooks"),c=s("./src/javascripts/core/ui/components/form-controls/form.tsx"),l=s("./src/javascripts/core/ui/components/form-controls/input.tsx"),u=s("./src/javascripts/core/ui/components/layout/icon.tsx"),d=s("./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),m=s("./src/javascripts/core/ui/components/entry/text-entry/hooks.ts"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");function h({controlName:e,skipLinkId:t}){const{t:s}=(0,o.useI18n)(),{setInputFocus:h}=(0,n.useVisibility)(),{sendAssertive:v}=(0,p.useLiveRegion)(),{emitEvent:y}=(0,p.useSeamlyCommands)(),j=(0,d.useSeamlyTyping)(),{setBlockAutoEntrySwitch:g}=(0,d.useSeamlyEntry)(),{placeholder:b,label:x,labelClass:_}=(0,m.useEntryTextTranslation)(e),{hasCharacterLimit:w,reachedCharacterWarning:S,reachedCharacterLimit:k,remainingChars:C}=(0,m.useCharacterLimit)(e),[{value:E}]=(0,r.useFormControl)(e),T=!!E,N=(0,i.useCallback)(()=>{S&&v(s("input.srCharacterLimitText",{limit:C})),y("ui.inputFocus")},[s,v,S,C,y]);return(0,i.useLayoutEffect)(()=>(g(T),()=>{g(!1)}),[g,T]),(0,f.jsxs)(c.default,{className:(0,a.className)("entry-form"),disableValidationClasses:!0,noValidate:"true",children:[(0,f.jsxs)("div",{className:(0,a.className)(["input--text__container",...S&&!k?["character-warning"]:[],...k?["character-exceeded"]:[]]),children:[(0,f.jsx)(l.default,{id:t,type:"text",name:e,className:(0,a.className)("input__text"),autocomplete:"off",placeholder:b,labelText:x,labelClass:(0,a.className)(_),"aria-invalid":!!w&&k,onKeyUp:j,onFocus:N,focus:h}),(0,f.jsx)("div",{className:(0,a.className)("character-count"),children:S&&(0,f.jsx)("span",{children:C})})]}),(0,f.jsx)("button",{className:(0,a.className)("button","input__submit"),onPointerDown:e=>{e.preventDefault()},"aria-disabled":!T||k,children:(0,f.jsx)(u.default,{name:"send",size:"32",alt:s("input.sendMessage")})})]})}},"./src/javascripts/core/ui/components/entry/upload-toggle.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/components/layout/icon.tsx"),i=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),c=s("./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./src/javascripts/core/ui/utils/general-utils.ts"),d=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),p=s("./node_modules/preact/compat/jsx-runtime.mjs");const m=()=>{const{t:e}=(0,r.useI18n)(),{showFileUpload:t,serviceAllowsUploads:s}=(0,l.useFileUploadMeta)(),[m,f]=(0,n.useState)(s||!1),h=(0,l.useSkiplinkTargetFocusing)(),v=(0,n.useRef)(null),{setUserEntryType:y,activeEntry:j}=(0,c.useSeamlyEntry)(),g=(0,n.useRef)(null),{sendPolite:b}=(0,l.useLiveRegion)(),x=!!(0,l.useSeamlyCurrentAgent)();return(0,n.useEffect)(()=>{(0,u.runIfElementContainsOrHasFocus)(g.current,()=>{s||h()}),f(s||!1)},[s,h]),(0,n.useEffect)(()=>{v.current&&!s&&b(e("fileUpload.srUnavailableText")),!1===v.current&&s&&b(e("fileUpload.srAvailableText")),x&&(v.current=s)},[s,x,b,e]),t||j===d.entryTypes.upload?null:(0,p.jsx)(i.default,{isActive:m,transitionStartState:i.transitionStartStates.rendered,children:(0,p.jsx)("div",{className:(0,o.className)("upload-toggle-wrapper"),children:(0,p.jsx)(i.default,{isActive:m,transitionStartState:i.transitionStartStates.visuallyHidden,children:(0,p.jsx)("button",{className:(0,o.className)(["button","button--secondary","upload-toggle"]),ref:g,"aria-disabled":!m,type:"button",onClick:m?()=>{y(d.entryTypes.upload),h()}:void 0,tabIndex:m?void 0:-1,children:(0,p.jsx)(a.default,{name:"file",size:"32",alt:e("fileUpload.toggleButtonText")})})})})})}},"./src/javascripts/core/ui/components/entry/upload/file-upload-form.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/forms/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./src/javascripts/core/ui/components/form-controls/file-input.tsx"),i=s("./src/javascripts/core/ui/components/form-controls/form.tsx"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=({skiplinkId:e,controlName:t,accept:s,contentHint:l,isUploading:u,isComplete:d,onClickCancel:p})=>{const{t:m}=(0,o.useI18n)(),[{value:f}]=(0,r.useFormControl)(t),h=f&&f.length>0,v=h&&"string"!=typeof f?f[0].name:"";return(0,c.jsxs)(i.default,{className:(0,n.className)("upload-form"),children:[(0,c.jsx)(a.default,{name:t,id:e,accept:s,labelText:m("fileUpload.labelText"),outputText:m("fileUpload.selectedText",{hasFile:h,filename:v}),contentHint:l}),(0,c.jsxs)("div",{className:(0,n.className)("upload__button-container"),children:[(0,c.jsx)("button",{id:u||!d?e:void 0,type:"button",onClick:p,className:(0,n.className)("button","button--secondary","upload__cancel"),children:m("fileUpload.cancelButtonText")}),(0,c.jsx)("button",{className:(0,n.className)("button","button--primary"),type:"submit",children:m("fileUpload.uploadButtonText")})]})]})}},"./src/javascripts/core/ui/components/entry/upload/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var r=s("./src/javascripts/core/domains/forms/provider.tsx"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/components/widgets/upload-progress.tsx"),c=s("./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/use-single-file-upload.ts"),d=s("./src/javascripts/core/ui/utils/form-utils.ts"),p=s("./src/javascripts/core/ui/utils/general-utils.ts"),m=s("./src/javascripts/core/ui/utils/validations.ts"),f=s("./src/javascripts/core/ui/components/entry/upload/file-upload-form.tsx"),h=s("./node_modules/preact/compat/jsx-runtime.mjs");const v="fileListForm",y="fileList",j=()=>{const{t:e}=(0,o.useI18n)(),{sendPolite:t,sendAssertive:s}=(0,l.useLiveRegion)(),j=(0,l.useSkiplink)(),g=(0,l.useSkiplinkTargetFocusing)(),{serviceAllowsUploads:b,allowedMimeTypes:x,maxSize:_}=(0,l.useFileUploadMeta)(),w=(0,a.useRef)(null),S=(0,a.useRef)(b),{cancelEntrySelection:k}=(0,c.useSeamlyEntry)(),{uploadFile:C,clearUploads:E,isUploading:T,isComplete:N}=(0,l.useFileUploads)(),{uploadHandle:I,hasServerError:O,progress:A}=(0,u.default)(v,y),P=(0,l.useGeneratedId)(),L=(0,a.useRef)(!0),R=e("fileUpload.contentHint",{size:(0,p.formatBytes)(_)}),M=(0,a.useRef)(""),D=(0,a.useRef)(null);(0,a.useEffect)(()=>{M.current&&D.current?.contains(document.activeElement)&&"INPUT"===document.activeElement?.tagName&&s(R),M.current=R},[R,s]),(0,a.useEffect)(()=>{A>0&&t(1===A?e("fileUpload.srStartedText"):`${A}%`)},[A,t,e]),(0,a.useEffect)(()=>{L.current||T||!N||(E(),k(),g(),setTimeout(()=>{t(e("fileUpload.srCompleteText"))},300)),L.current=N},[T,N,E,k,g,t,e]),(0,a.useEffect)(()=>{b||T||(E(),k(),g())},[b,T,E,k,g]);const F=(0,a.useCallback)(({fileList:e})=>{C(e[0]),g()},[C,!1,g]),U=(0,a.useCallback)(()=>{I&&I.abort(),E(),k(),g()},[I,E,k,g]),z=(0,a.useMemo)(()=>({[y]:[(0,d.getValidator)(()=>b,e("fileUpload.errors.unavailable")),(0,d.getValidator)(m.fileListObjectIsNotEmpty,e("fileUpload.errors.noFile")),(0,d.getValidator)(m.validateFileSize,e("fileUpload.errors.tooLarge"),_)]}),[_,b,e]);return(0,h.jsx)("div",{className:(0,n.className)(["upload",...O?["upload--error"]:[]]),ref:D,children:(0,h.jsxs)(r.default,{formId:v,persistData:!0,onSubmit:F,validationSchema:z,children:[(T||!N)&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(i.default,{}),(0,h.jsx)("div",{className:(0,n.className)("upload__button-container"),children:(0,h.jsx)("button",{id:T||!N?j:void 0,type:"button",onClick:U,ref:w,className:(0,n.className)("button","button--secondary","upload__cancel"),children:e("fileUpload.cancelButtonText")})})]}),!T&&N&&(0,h.jsx)(f.default,{controlName:y,skiplinkId:j,accept:x?.join(", ")||"",contentHint:R,isComplete:N,isUploading:T,onClickCancel:U}),!S.current&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("span",{className:(0,n.className)("notification"),id:P,children:e("fileUpload.unavailableText")}),(0,h.jsx)("div",{className:(0,n.className)("upload__button-container"),children:(0,h.jsx)("button",{id:T||!N?j:void 0,type:"button",onClick:U,className:(0,n.className)("button","button--secondary","upload__cancel"),children:e("fileUpload.cancelButtonText")})})]})]})})}},"./src/javascripts/core/ui/components/form-controls/error.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/lib/css.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/components/layout/icon.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i({id:e,error:t}){const[s,i]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const e=setTimeout(()=>i(!0),300);return()=>clearTimeout(e)},[]),(0,a.jsx)("div",{className:(0,r.className)("error"),"aria-live":"assertive","aria-atomic":"true",children:s&&t&&(0,a.jsxs)("span",{id:e,className:(0,r.className)("error__message"),children:[(0,a.jsx)(n.default,{name:"error",size:"16",alt:""}),t]})})}},"./src/javascripts/core/ui/components/form-controls/file-input.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/forms/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/components/layout/icon.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/components/form-controls/error.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");function u({id:e,name:t,labelText:s,contentHint:u,outputText:d,accept:p}){const{isSubmitted:m}=(0,r.useFormContext)(),[f,h]=(0,n.useState)(!1),[{onInput:v,onBlur:y},{error:j}]=(0,r.useFormControl)(t),g=(0,i.useGeneratedId)(),b=(0,i.useGeneratedId)(),x=(0,i.useGeneratedId)(),_=m&&j,w=[x];u&&w.push(b),_&&w.push(g);const S=(0,n.useCallback)(()=>{h(!0)},[h]),k=(0,n.useCallback)(()=>{h(!1),y()},[h,y]),C=(0,n.useCallback)(e=>{const t={target:{value:e.target.files}};v(t)},[v]);return(0,l.jsxs)("div",{className:(0,o.className)("upload__container"),children:[u&&(0,l.jsx)("span",{className:(0,o.className)("upload__content-hint"),id:b,children:u}),(0,l.jsx)(c.default,{id:g,error:_&&j}),(0,l.jsx)("div",{className:(0,o.className)(["file-upload",...f?["focus-within"]:[]]),children:(0,l.jsxs)("label",{htmlFor:e,className:(0,o.className)("upload__label"),children:[(0,l.jsx)(a.default,{name:"upload",size:"32",alt:""}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:(0,o.className)(["upload__label--text"]),children:s}),(0,l.jsx)("input",{id:e,className:(0,o.className)("upload__input"),type:"file",name:t,onChange:C,"aria-invalid":_?"true":"false","aria-describedby":w.join(" "),accept:p||null,onFocus:S,onBlur:k}),(0,l.jsx)("span",{className:(0,o.className)("upload__output"),"aria-hidden":"true",id:x,children:d})]})]})})]})}},"./src/javascripts/core/ui/components/form-controls/form.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/forms/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=function({className:e,disableValidationClasses:t=!1,...s}){const{handleSubmit:a,isValid:i,isSubmitted:c}=(0,r.useForm)(),l=["form"];return!t&&c&&(l.push("form--submitted"),i?l.push("form--valid"):l.push("form--invalid")),(0,n.jsx)("form",{onSubmit:a,className:(0,o.className)([...l,e]),...s})}},"./src/javascripts/core/ui/components/form-controls/input.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/forms/hooks.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/components/form-controls/wrapper.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=function({id:e,name:t,type:s,labelText:i,labelClass:c,contentHint:l=null,focus:u,"aria-invalid":d,"aria-describedby":p,...m}){const f=(0,o.useRef)(null),{isSubmitted:h}=(0,r.useFormContext)(),[v,{error:y}]=(0,r.useFormControl)(t),j=h&&y,g=[];return p&&g.push(p),l&&g.push(`${e}-content-hint`),j&&g.push(`${e}-error`),(0,o.useLayoutEffect)(()=>{f.current&&u&&f.current.focus()},[u]),(0,a.jsx)(n.default,{id:e,contentHint:l,validity:!j,errorText:y,labelText:i,labelClass:c,children:(0,a.jsx)("input",{...v,...m,ref:f,id:e,type:s,"aria-invalid":d||j?"true":"false","aria-describedby":g.join(" ")||void 0,name:t})})}},"./src/javascripts/core/ui/components/form-controls/wrapper.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/form-controls/error.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({contentHint:e,id:t,labelText:s,labelClass:a,validity:i,errorText:c,children:l})=>(0,n.jsxs)(n.Fragment,{children:[e&&(0,n.jsx)("span",{id:`${t}-content-hint`,className:(0,r.className)("input__content-hint"),children:e}),(0,n.jsx)(o.default,{id:`${t}-error`,error:!i&&c}),(0,n.jsxs)("div",{className:(0,r.className)("form-control__wrapper"),children:[(0,n.jsx)("label",{htmlFor:t,className:(0,r.className)(a),children:s}),l]})]})},"./src/javascripts/core/ui/components/layout/agent-info.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/interrupt/selectors.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("./node_modules/react-redux/dist/react-redux.mjs"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./src/javascripts/core/ui/components/layout/icon.tsx"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=()=>{const{t:e}=(0,o.useI18n)(),{title:t,subTitle:s}=(0,l.useSeamlyHeaderData)(),p=(0,l.useSeamlyUnreadCount)(),{isOpen:m}=(0,a.useVisibility)(),f=(0,l.useSeamlyCurrentAgent)(),h=(0,c.useSelector)(n.selectHasError),v=(0,r.useStartChatIcon)(),y=f?.avatar??v,j=h?"":s,g=["message-count"];return m&&g.push("message-count__hide"),0===p&&g.push("message-count__empty"),j||!m?(0,d.jsxs)("div",{className:(0,i.className)("agent-info"),children:[(0,d.jsxs)("div",{className:(0,i.className)("agent-info__graphic"),children:[y?(0,d.jsx)("img",{className:(0,i.className)(f?.avatar?"avatar":"icon"),src:y,alt:""}):(0,d.jsx)(u.default,{name:"avatar",size:"32",alt:""}),(0,d.jsx)("span",{className:(0,i.className)(g),"aria-hidden":"true",children:p})]}),(0,d.jsxs)("div",{className:(0,i.className)("agent-info__body"),children:[(0,d.jsx)("p",{className:(0,i.className)("agent-info__heading"),children:t??e("header.title")}),(0,d.jsx)("p",{className:(0,i.className)("agent-info__text"),children:j})]})]}):null}},"./src/javascripts/core/ui/components/layout/chat-frame.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./src/javascripts/core/domains/interrupt/selectors.ts"),o=s("./src/javascripts/core/domains/translations/components/translation-status.tsx"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("./node_modules/react-redux/dist/react-redux.mjs"),c=s("./src/javascripts/core/ui/components/app-options/index.tsx"),l=s("./src/javascripts/core/ui/components/conversation/event/chat-scroll/chat-scroll-provider.tsx"),u=s("./src/javascripts/core/ui/components/entry/entry-container.tsx"),d=s("./src/javascripts/core/ui/components/view/window-view/collapse-button.tsx"),p=s("./src/javascripts/core/ui/components/layout/interrupt.tsx"),m=s("./node_modules/preact/compat/jsx-runtime.mjs");const f=function({children:e}){const t=(0,i.useSelector)(r.selectHasError),{isOpen:s}=(0,n.useVisibility)();return t?(0,m.jsx)(p.default,{}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(l.default,{children:[(0,m.jsxs)("div",{className:(0,a.className)("chat__container__header"),children:[(0,m.jsx)(o.default,{}),(0,m.jsx)(d.default,{})]}),e]}),(0,m.jsx)(u.default,{}),s&&(0,m.jsx)(c.default,{})]})}},"./src/javascripts/core/ui/components/layout/chat.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/app/hooks.ts"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("preact/compat"),l=s("./src/javascripts/core/ui/components/suggestions/index.tsx"),u=s("./src/javascripts/core/ui/hooks/component-helper-hooks.ts"),d=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),m=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");const h=(0,c.forwardRef)(({children:e,className:t=""},s)=>{const{closeChat:c,isOpen:h,isVisible:v}=(0,a.useVisibility)(),y=(0,d.useWindowOpenButtonFocusing)(),{namespace:j,layoutMode:g}=(0,o.useConfig)(),{isInline:b}=(0,p.useSeamlyLayoutMode)(),x=(0,u.useSeamlyAppContainerClassNames)(),_=(0,m.useGeneratedId)(),w=(0,r.useUserHasResponded)(),{t:S}=(0,n.useI18n)(),k=["chat",`chat--layout-${g}`,`namespace--${j}`,t];return"function"!=typeof x&&k.push(...x),h||"app"===g||k.push("chat--collapsed"),w&&k.push("chat--user-responded"),v&&(0,f.jsxs)("section",{className:(0,i.className)(k),onKeyDown:e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&!b&&h&&(c(),y())},tabIndex:-1,ref:s,role:"window"===g?"dialog":void 0,"aria-labelledby":_,children:[(0,f.jsx)("h2",{className:(0,i.className)("chat__title","visually-hidden"),id:_,children:S("window.srModalLayoutLabel")}),(0,f.jsx)("div",{className:(0,i.className)("chat-wrapper"),children:e}),"inline"===g&&h&&(0,f.jsx)(l.default,{isAside:!0})]})})},"./src/javascripts/core/ui/components/layout/collapsed-chat-messages.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CollapsedChatMessages:()=>i}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/hooks/use-event-component-mapping.ts"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");function a({event:e}){const[t]=(0,o.default)(e);return(0,n.jsx)("li",{children:(0,n.jsx)(t,{event:e})})}function i({events:e}){return(0,n.jsx)("ul",{className:(0,r.className)("collapsed-chat-messages"),children:e.map(e=>(0,n.jsx)(a,{event:e},e.payload.id))})}},"./src/javascripts/core/ui/components/layout/continue-chat-messages.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/components/layout/collapsed-chat-messages.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i(){const{t:e}=(0,r.useI18n)(),t=e("window.chat.continue"),s=(0,o.useMemo)(()=>({type:"message",payload:{type:"custom",body:{text:t,type:"",data:{}},participant:"seamly-client-participant"}}),[t]);return(0,a.jsx)(n.CollapsedChatMessages,{events:[s]})}},"./src/javascripts/core/ui/components/layout/header.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./src/javascripts/core/ui/components/layout/icon.tsx"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=({children:e,onCloseChat:t})=>{const{headerCollapseButtonId:s}=(0,a.useSeamlyStateContext)(),l=(0,n.useRef)(null),{t:u}=(0,r.useI18n)();return(0,c.jsxs)("header",{className:(0,o.className)("chat__header"),children:[e,(0,c.jsx)("div",{className:(0,o.className)("header-controls"),children:(0,c.jsx)("button",{type:"button",className:(0,o.className)("button","header-controls__collapse"),onClick:t,ref:l,id:s,children:(0,c.jsx)(i.default,{name:"chevronDown",size:"32",alt:u("header.collapseApp")})})})]})}},"./src/javascripts/core/ui/components/layout/icon.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ICONS:()=>E,default:()=>T});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/icons/avatar_bot-32.svg"),n=s("./src/icons/icon_arrow_left-16.svg"),a=s("./src/icons/icon_arrow_right-16.svg"),i=s("./src/icons/icon_balloon-32.svg"),c=s("./src/icons/icon_check-16.svg"),l=s("./src/icons/icon_check-32.svg"),u=s("./src/icons/icon_chevron_down-32.svg"),d=s("./src/icons/icon_chevron_down-8.svg"),p=s("./src/icons/icon_chevron_right-16.svg"),m=s("./src/icons/icon_chevron_right-8.svg"),f=s("./src/icons/icon_close-16.svg"),h=s("./src/icons/icon_close-8.svg"),v=s("./src/icons/icon_download-16.svg"),y=s("./src/icons/icon_enlarge-32.svg"),j=s("./src/icons/icon_error-16.svg"),g=s("./src/icons/icon_file-32.svg"),b=s("./src/icons/icon_newtopic-32.svg"),x=s("./src/icons/icon_newtranslation-16.svg"),_=s("./src/icons/icon_newtranslation-32.svg"),w=s("./src/icons/icon_options-32.svg"),S=s("./src/icons/icon_send-32.svg"),k=s("./src/icons/icon_upload-32.svg"),C=s("./node_modules/preact/compat/jsx-runtime.mjs");const E={send:{32:S},balloon:{32:i},newTopic:{32:b},newTranslation:{16:x,32:_},avatar:{32:o},chevronDown:{8:d,32:u},chevronRight:{8:m,16:p},close:{8:h,16:f},enlarge:{32:y},options:{32:w},file:{32:g},upload:{32:k},download:{16:v},error:{16:j},arrowLeft:{16:n},arrowRight:{16:a},check:{16:c,32:l}},T=({name:e,size:t="32",className:s,alt:o})=>(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{"aria-hidden":"true",className:s||(0,r.className)("icon"),dangerouslySetInnerHTML:{__html:E[e][t]}}),o&&(0,C.jsx)("span",{className:(0,r.className)("visually-hidden"),children:o})]})},"./src/javascripts/core/ui/components/layout/interrupt.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/interrupt/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/components/view/window-view/collapse-button.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");const l=()=>{const{meta:{originalError:e,title:t,message:s,buttonText:l,action:u,srText:d}}=(0,r.useInterrupt)(),p=(0,i.useSeamlyCommands)(),m=(0,i.useGeneratedId)(),{sendPolite:f}=(0,i.useLiveRegion)(),h=(0,i.useSkiplinkTargetFocusing)(),v="SeamlySessionExpiredError"===e?.name;return(0,n.useEffect)(()=>{!v&&d&&setTimeout(()=>{f(d)},200)},[f,d,v]),v?(0,c.jsx)(c.Fragment,{}):(0,c.jsxs)("section",{className:(0,o.className)("interrupt"),"aria-labelledby":m,children:[(0,c.jsx)(a.default,{}),(0,c.jsxs)("div",{className:(0,o.className)("interrupt__body"),children:[(0,c.jsx)("h2",{id:m,className:(0,o.className)("interrupt__title"),children:t}),(0,c.jsx)("p",{className:(0,o.className)("interrupt__message"),children:s}),l&&u&&(0,c.jsx)("div",{className:(0,o.className)("interrupt__actions"),children:(0,c.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{u&&p[u]&&p[u](),h()},children:l})})]})]})}},"./src/javascripts/core/ui/components/layout/pre-chat-messages.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/interrupt/selectors.ts"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("./node_modules/react-redux/dist/react-redux.mjs"),i=s("./src/javascripts/core/ui/components/layout/collapsed-chat-messages.tsx"),c=s("./node_modules/preact/compat/jsx-runtime.mjs");function l(){const{preChatEvents:e}=(0,r.useConfig)(),t=(0,a.useSelector)(o.selectHasError),{isOpen:s}=(0,n.useVisibility)();return t||!e?.length||s?null:(0,c.jsx)(i.CollapsedChatMessages,{events:e})}},"./src/javascripts/core/ui/components/layout/privacy-disclaimer.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=()=>{const{t:e}=(0,o.useI18n)(),{showDisclaimer:t}=(0,r.useConfig)();return t?(0,a.jsxs)("div",{className:(0,n.className)("disclaimer"),tabIndex:0,children:[(0,a.jsx)("h2",{className:(0,n.className)("disclaimer__title"),children:e("disclaimer.title")}),(0,a.jsx)("div",{className:(0,n.className)("disclaimer__message"),dangerouslySetInnerHTML:{__html:e("disclaimer.content")}})]}):null}},"./src/javascripts/core/ui/components/options/options-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/components/layout/icon.tsx"),i=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),c=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),u=s("./src/javascripts/core/ui/utils/general-utils.ts"),d=s("./src/javascripts/core/ui/components/options/options.tsx"),p=s("./node_modules/preact/compat/jsx-runtime.mjs");const m=()=>{const{t:e}=(0,r.useI18n)(),{menuOptions:t,showOption:s,panelActive:m,hideOption:f}=(0,l.useSeamlyOptions)(),{id:h}=(0,l.useOptionButton)(),v=(0,n.useRef)(null),[y,j]=(0,n.useState)(!1),g=(0,n.useRef)(null),b=t.length,x=(0,n.useRef)([]),_=(0,n.useRef)(!1),w=b>1,S=t[0],k=(0,n.useMemo)(()=>S?.name?.trim().replace(/\s+/g,""),[S]);return(0,n.useEffect)(()=>()=>{v.current&&clearTimeout(v.current)},[]),(0,n.useEffect)(()=>{y&&!_.current&&requestAnimationFrame(async()=>{await(0,c.timeout)(60);const e=t.findIndex(e=>e.available),s=-1===e?0:e;x.current&&(0,u.focusElement)(x.current[s])}),_.current=y},[y,t]),b?(0,p.jsxs)("div",{className:(0,o.className)("options__container"),onKeyDown:e=>{y&&((0,u.getKey)(e)===u.keyNames.Escape&&(j(!1),(0,u.focusElement)(g.current)),(0,u.getKey)(e)===u.keyNames.Home&&(x.current&&(0,u.focusElement)(x.current[0]),e.preventDefault()),(0,u.getKey)(e)===u.keyNames.End&&(x.current&&(0,u.focusElement)(x.current[b-1]),e.preventDefault()))},onFocusOut:()=>{w&&(v.current=setTimeout(()=>{j(!1)},200))},onFocusIn:()=>{v.current&&clearTimeout(v.current)},children:[(0,p.jsx)(i.default,{transitionStartState:i.transitionStartStates.notRendered,isActive:m,children:(0,p.jsx)("div",{className:(0,o.className)("options__dialog"),children:(0,p.jsx)(d.default,{})})}),w&&(0,p.jsx)(i.default,{isActive:y,transitionStartState:i.transitionStartStates.notRendered,children:(0,p.jsx)("ul",{className:(0,o.className)(["options__menu"]),role:"menu",tabIndex:-1,"aria-labelledby":h,children:t.map(({name:r,title:n,available:a},i)=>(0,p.jsx)("li",{className:(0,o.className)("options__menu__item"),role:"menuitem","data-testid":r,children:(0,p.jsxs)("button",{type:"button",ref:e=>{e&&(x.current[i]=e)},className:(0,o.className)(["button","button--secondary"]),onKeyDown:e=>((e,t)=>{if((0,u.getKey)(e)===u.keyNames.ArrowDown){const s=Math.min(b-1,t+1);x.current&&(0,u.focusElement)(x.current[t===s?0:s]),e.preventDefault()}if((0,u.getKey)(e)===u.keyNames.ArrowUp){const s=Math.max(0,t-1);x.current&&(0,u.focusElement)(x.current[t===s?b-1:s]),e.preventDefault()}})(e,i),onKeyPress:e=>((e,s)=>{const r=String.fromCharCode(e.charCode);if(1!==r.length||!r.match(/\S/))return;let o=-1;t.forEach((e,t)=>{t>s&&e.title.charAt(0).toLowerCase()===r.toLowerCase()&&-1===o&&(o=t)}),-1!==o&&x.current&&(0,u.focusElement)(x.current[o])})(e,i),onClick:()=>((e,t)=>{t&&(j(!1),s(e))})(r,a),"aria-disabled":!a,children:[(0,p.jsxs)("span",{className:(0,o.className)("button__text"),children:[n,!a&&" "]}),a?null:(0,p.jsx)("span",{className:(0,o.className)("button__state"),children:e("options.unavailableText")})]})},r))})}),(0,p.jsxs)("button",{type:"button",className:(0,o.className)(["button","button--secondary","chat__options__button",...!w&&k?[`chat__options__button--${k}`]:[]]),id:h,onClick:()=>{m&&f(),w?j(e=>!e):S.available&&!m&&s(S.name)},onKeyDown:w?e=>{(0,u.getKey)(e)===u.keyNames.ArrowDown&&(j(!0),e.preventDefault())}:void 0,ref:g,"aria-haspopup":!!w&&"menu","aria-expanded":!!w&&y,"aria-disabled":!w&&!S.available,children:[w?(0,p.jsx)(a.default,{name:"options",size:"32",alt:""}):null,(0,p.jsx)("span",{className:(0,o.className)("button__text"),children:w?e("options.openButtonText"):`${S.title}${S.available?"":" "}`}),w||S.available?null:(0,p.jsx)("span",{className:(0,o.className)("button__state"),children:e("options.unavailableText")})]})]}):null}},"./src/javascripts/core/ui/components/options/options-frame.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/lib/css.ts"),o=s("preact/hooks"),n=s("./src/javascripts/core/ui/components/layout/icon.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./src/javascripts/core/ui/hooks/use-click-outside.ts"),c=s("./src/javascripts/core/ui/utils/general-utils.ts"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=({className:e,children:t,onCancel:s,headingText:u,description:d,descriptionId:p,cancelButtonText:m,cancelButtonRef:f,disableButtonFocusing:h,position:v={horizontal:"left",vertical:"top"}})=>{const y=(0,a.useGeneratedId)(),{hideOption:j}=(0,a.useSeamlyOptions)(),{focusButton:g}=(0,a.useOptionButton)(),b=(0,o.useCallback)(()=>{j(),h||g()},[h,g,j]),x=(0,o.useCallback)(()=>{s&&s(),b()},[b,s]),_=(0,i.default)(x);return(0,o.useEffect)(()=>{(0,c.focusElement)(_.current)},[_]),(0,l.jsx)("section",{className:(0,r.className)("options",{"options--right":"right"===v.horizontal,"options--left":"left"===v.horizontal,"options--top":"top"===v.vertical,"options--bottom":"bottom"===v.vertical},e||""),"aria-labelledby":y,tabIndex:-1,ref:_,children:(0,l.jsxs)("div",{className:(0,r.className)("options__body"),children:[(0,l.jsx)("h2",{id:y,className:(0,r.className)("options__title"),children:u}),(0,l.jsxs)("button",{type:"button",onClick:x,"aria-describedby":y,className:(0,r.className)("button","options__close"),ref:e=>{f&&(f.current=e)},children:[(0,l.jsx)(n.default,{name:"close",size:"16",alt:""}),(0,l.jsx)("span",{children:m})]}),d?(0,l.jsx)("p",{className:(0,r.className)("options__description"),id:p,children:d}):null,(0,l.jsx)("div",{className:(0,r.className)("options__wrapper"),children:t})]})})}},"./src/javascripts/core/ui/components/options/options.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),n=s("./src/javascripts/core/ui/components/options/transcript/index.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i={sendTranscript:n.default},c=()=>{const{optionActive:e}=(0,o.useSeamlyOptions)(),t=(0,r.useRef)(),s=i[t.current??e];return e&&(t.current=e),s?(0,a.jsx)(s,{}):null}},"./src/javascripts/core/ui/components/options/transcript/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./src/javascripts/core/domains/forms/provider.tsx"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/components/options/options-frame.tsx"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/utils/form-utils.ts"),l=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),u=s("./src/javascripts/core/ui/utils/validations.ts"),d=s("./src/javascripts/core/ui/components/options/transcript/transcript-form.tsx"),p=s("./node_modules/preact/compat/jsx-runtime.mjs");const m="email",f=()=>{const[e,t]=(0,n.useState)(void 0),{hideOption:s}=(0,i.useSeamlyOptions)(),{focusButton:f}=(0,i.useOptionButton)(),{t:h}=(0,o.useI18n)(),v=(0,i.useGeneratedId)(),{sendAction:y}=(0,i.useSeamlyCommands)(),j=(0,n.useMemo)(()=>({[m]:[(0,c.getValidator)(u.isNotEmptyString,h("options.sendTranscript.noEmailText")),(0,c.getValidator)(u.isEmailString,h("options.sendTranscript.invalidEmailText"))]}),[h]),g=(0,n.useCallback)(e=>{const t=e[m].trim();y({type:l.actionTypes.sendTranscript,body:{emailAddress:t}}),s(),f()},[y,s,f]),b=(0,n.useCallback)(({isValid:e,isSubmitted:s})=>{t(s&&!e?"options--error":void 0)},[t]);return(0,p.jsx)(a.default,{className:e,headingText:h("options.sendTranscript.title"),cancelButtonText:h("options.cancelButtonText"),description:h("options.sendTranscript.description"),descriptionId:v,position:{vertical:"top",horizontal:"right"},children:(0,p.jsx)(r.default,{formId:"sendTranscript",onSubmit:g,validationSchema:j,onError:b,children:(0,p.jsx)(d.default,{controlName:m,describedById:v})})})}},"./src/javascripts/core/ui/components/options/transcript/transcript-form.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/form-controls/form.tsx"),a=s("./src/javascripts/core/ui/components/form-controls/input.tsx"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");function c({controlName:e,describedById:t}){const{t:s}=(0,r.useI18n)();return(0,i.jsxs)(n.default,{noValidate:"true",className:(0,o.className)("options__form"),children:[(0,i.jsx)(a.default,{id:"email-id",name:e,type:"email",autocomplete:"email",className:(0,o.className)("transcript__input"),"aria-describedby":t,labelClass:(0,o.className)("label"),labelText:s("options.sendTranscript.label")}),(0,i.jsx)("div",{className:(0,o.className)("options__actions"),children:(0,i.jsx)("button",{type:"submit",className:(0,o.className)("button","button--primary","options__submit"),children:s("options.sendTranscript.sendButtonText")})})]})}},"./src/javascripts/core/ui/components/suggestions/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>E}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/app/hooks.ts"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/interrupt/selectors.ts"),i=s("./src/javascripts/core/domains/translations/hooks.ts"),c=s("./src/javascripts/core/domains/visibility/constants.ts"),l=s("./src/javascripts/core/domains/visibility/hooks.ts"),u=s("./src/javascripts/core/lib/css.ts"),d=s("./src/javascripts/core/lib/id.ts"),p=s("preact/hooks"),m=s("./node_modules/react-redux/dist/react-redux.mjs"),f=s("./src/javascripts/core/ui/components/suggestions/suggestions-list.tsx"),h=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),v=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),y=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),j=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),g=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),b=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),x=s("./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts"),_=s("./src/javascripts/core/ui/hooks/use-seamly-resume-conversation-prompt.ts"),w=s("./src/javascripts/core/ui/hooks/utility-hooks.ts"),S=s("./src/javascripts/core/ui/utils/general-utils.ts"),k=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),C=s("./node_modules/preact/compat/jsx-runtime.mjs");const E=({isAside:e=!1})=>{const{isInline:t}=(0,g.useSeamlyLayoutMode)(),{t:s}=(0,n.useI18n)(),{addMessageBubble:E,emitEvent:T,sendAction:N}=(0,b.default)(),I=(0,j.useSeamlyHasConversation)(),{isOpen:O,setVisibility:A}=(0,l.useVisibility)(),{showSuggestions:P}=(0,o.useConfig)(),L=(0,w.useGeneratedId)(),R=(0,v.useSkiplinkTargetFocusing)(),M=(0,p.useRef)(null),{sendPolite:D}=(0,y.useLiveRegion)(),F=(0,m.useSelector)(a.selectHasError),{hasCountdown:U,endCountdown:z}=(0,x.default)(),{hasPrompt:B,continueChat:V}=(0,_.default)(),$=(0,r.useUserHasResponded)(),H=(0,g.useSeamlyServiceData)("suggestion"),{body:G}=(0,i.useTranslatedEventData)({payload:H,type:"service_data"}),W=(0,p.useMemo)(()=>F?[]:Array.isArray(G)?G:[],[G,F]),q=(0,p.useRef)(),K=(0,p.useRef)(!1),J=(0,p.useRef)(),Y=!!W?.length,X=t?($||O)&&!e:$,Q=(0,p.useRef)(X),Z=Y&&!X&&P,ee=Y?W:J.current;J.current=ee;const te=(0,p.useMemo)(()=>{const t=["suggestions"];return e&&t.push("suggestions--aside"),(0,u.className)(t)},[e]),se=(0,p.useCallback)(({id:e,question:t})=>{if(!I())return;U&&z(!0),B&&V();const s=(0,d.randomId)(),r={type:k.actionTypes.custom,originMessage:H.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:t}},transactionId:s};N(r),E(t,s),T(`action.${r.type}`,r),O||A({visibility:c.visibilityStates.open}),R()},[E,V,z,T,R,I,U,B,O,H,N,A]);(0,p.useEffect)(()=>{if(q.current!==W&&!X){if(Y){const e=K.current?s("suggestions.srUpdatedText"):s("suggestions.srAvailableText");setTimeout(()=>{D(e)},30)}else K.current&&D(s("suggestions.srUnavailableText"));q.current=W}!Q.current&&X?((0,S.runIfElementContainsOrHasFocus)(M.current,R),D(s("suggestions.srUnavailableText"))):!Y&&K.current&&(0,S.runIfElementContainsOrHasFocus)(M.current,R),K.current=Y,Q.current=X},[W,Y,X,R,D,s]);const re=s("suggestions.headingText"),oe=s("suggestions.footerText"),ne=re?"section":"div";return(0,C.jsx)(h.default,{isActive:!!Z,transitionStartState:h.transitionStartStates.notRendered,children:(0,C.jsxs)(ne,{className:te,"aria-labelledby":re?L:void 0,ref:M,children:[re&&(0,C.jsx)("p",{id:L,className:(0,u.className)("suggestions__heading"),children:re}),!!ee&&(0,C.jsx)(f.default,{suggestions:ee,onClickSuggestion:se}),oe&&!O&&(0,C.jsx)("p",{className:(0,u.className)("suggestions__footer"),children:oe})]})})}},"./src/javascripts/core/ui/components/suggestions/suggestions-item.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c,mapCategoryToClass:()=>i}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("preact/hooks"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/layout/icon.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=e=>`suggestions__item--${String(e).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`,c=({id:e,categories:t=[],question:s,onClick:c,hasIcon:l})=>{const u=(0,r.useMemo)(()=>["suggestions__item",...t.map(i)],[t]),d=(0,r.useCallback)(()=>{c&&c({id:e,question:s})},[e,s,c]);return(0,a.jsx)("li",{className:(0,o.className)(u),children:(0,a.jsxs)("button",{type:"button",onClick:d,className:(0,o.className)("button","button--primary"),children:[l&&(0,a.jsx)(n.default,{name:"chevronRight",size:"8",alt:""}),s]})})}},"./src/javascripts/core/ui/components/suggestions/suggestions-list.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/components/suggestions/suggestions-item.tsx"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({className:e,suggestions:t=[],onClickSuggestion:s,hasIcon:a=!0})=>(0,n.jsx)("ul",{className:(0,r.className)("suggestions__list",e||""),children:t.map(e=>(0,n.jsx)(o.default,{hasIcon:a,onClick:s,categories:e.categories,id:e.id,question:e.question},e.id))})},"./src/javascripts/core/ui/components/translation-proposal/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/domains/translations/hooks.ts"),o=s("./src/javascripts/core/ui/components/chat-status/index.tsx"),n=s("./src/javascripts/core/ui/components/chat-status/chat-status-action.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");function i(){const{showProposal:e,translationProposal:t,dismissTranslationProposal:s,activateTranslationProposal:i}=(0,r.useTranslationProposal)(),{id:c}=(0,r.useTranslationsContainer)();return e&&t?(0,a.jsx)(o.default,{handleClose:s,srCloseButtonText:t.srDismissButtonText,id:c,title:t.titleLabel,children:(0,a.jsx)(n.default,{handleClick:i,icon:"newTranslation",title:t.buttonLabel})}):null}},"./src/javascripts/core/ui/components/view/app-view.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var r=s("./src/javascripts/core/ui/components/conversation/conversation.tsx"),o=s("./src/javascripts/core/ui/components/layout/chat.tsx"),n=s("./src/javascripts/core/ui/components/layout/chat-frame.tsx"),a=s("./node_modules/preact/compat/jsx-runtime.mjs");const i=()=>(0,a.jsx)(o.default,{children:(0,a.jsx)(n.default,{children:(0,a.jsx)(r.default,{})})})},"./src/javascripts/core/ui/components/view/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>_}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/app/hooks.ts"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/i18n/hooks.ts"),a=s("./src/javascripts/core/domains/store/selectors.ts"),i=s("./src/javascripts/core/domains/translations/hooks.ts"),c=s("./src/javascripts/core/domains/visibility/hooks.ts"),l=s("./src/javascripts/core/lib/css.ts"),u=s("preact/hooks"),d=s("./node_modules/react-redux/dist/react-redux.mjs"),p=s("./src/javascripts/core/ui/components/view/app-view.tsx"),m=s("./src/javascripts/core/ui/components/view/inline-view.tsx"),f=s("./src/javascripts/core/ui/components/view/window-view/index.tsx"),h=s("./src/javascripts/core/ui/hooks/component-helper-hooks.ts"),v=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),y=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),j=s("./src/javascripts/core/ui/hooks/use-notifications.ts"),g=s("./node_modules/preact/compat/jsx-runtime.mjs");const b={app:p.default,inline:m.default,window:f.default};function x(e){const t=document.createElement("div");return t.innerHTML=e||"",t.textContent||t.innerText||""}const _=({children:e})=>{const{sendNotification:t}=(0,j.default)(),[,s]=(0,v.useSeamlyContainerElement)(),p=(0,o.useConfig)(),m=(0,y.useSeamlyCurrentAgent)(),{proactiveMessages:f}=(0,y.useSeamlyServiceInfo)(),{isOpen:_,isVisible:w}=(0,c.useVisibility)(),S=(0,h.useSeamlyAppContainerClassNames)(),k=(0,r.useUserHasResponded)(),C=(0,d.useSelector)(a.selectLastUnreadEvent),{body:E}=(0,i.useTranslatedEventData)(C),{userLocale:T}=(0,n.useI18n)(),N=(0,u.useRef)(void 0),I=(0,u.useMemo)(()=>E?"string"==typeof E?x(E):"text"in E?x(E.text):"prompt"in E&&E.prompt&&"text"in E.prompt?x(E.prompt?.text):"":"",[E]);(0,u.useEffect)(()=>{m?.name&&I&&f&&C&&N.current!==C.payload?.id&&(t(m.name,{body:I,icon:m?.avatar||void 0}),N.current=C.payload.id)},[m?.avatar,m?.name,C,I,f,t]);const O=b[p.layoutMode],A=(0,u.useCallback)(e=>{"function"==typeof s&&s(e)},[s]),P=(0,u.useMemo)(()=>{if(T){const e=document.querySelector("html")?.getAttribute("lang");if(e!==T)return T}},[T]);if(!O)return console.warn('"layoutMode" should be one of "app", "inline" or "window"'),null;const L=["app",`app--layout-${p.layoutMode}`,`namespace--${p.namespace}`];return"function"!=typeof S?L.push(...S):L.push(...S(p)),_||"app"===p.layoutMode||L.push("app--collapsed"),k&&L.push("app--user-responded"),w?(0,g.jsx)("div",{className:(0,l.className)(L),lang:P,tabIndex:-1,"data-nosnippet":!0,style:{zIndex:p?.zIndex},ref:A,children:e||(0,g.jsx)(O,{})}):null}},"./src/javascripts/core/ui/components/view/inline-view.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/javascripts/core/domains/visibility/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/conversation/conversation.tsx"),a=s("./src/javascripts/core/ui/components/layout/chat.tsx"),i=s("./src/javascripts/core/ui/components/layout/chat-frame.tsx"),c=s("./src/javascripts/core/ui/components/layout/pre-chat-messages.tsx"),l=s("./src/javascripts/core/ui/components/suggestions/index.tsx"),u=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),d=s("./node_modules/preact/compat/jsx-runtime.mjs");const p=()=>{const{showInlineView:e,containerRef:t}=(0,r.useShowInlineView)(),{isOpen:s}=(0,r.useVisibility)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u.default,{isActive:!s,transitionStartState:u.transitionStartStates.rendered,children:(0,d.jsxs)("div",{ref:t,className:(0,o.className)("unstarted-wrapper","unstarted-wrapper--inline"),children:[(0,d.jsx)(c.default,{}),(0,d.jsx)(l.default,{})]})}),(0,d.jsx)(u.default,{isActive:s,transitionStartState:u.transitionStartStates.rendered,children:(0,d.jsx)(a.default,{ref:t,children:e&&(0,d.jsx)(i.default,{children:s&&(0,d.jsx)(n.default,{})})})})]})}},"./src/javascripts/core/ui/components/view/window-view/collapse-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/components/layout/icon.tsx"),c=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=()=>{const{t:e}=(0,r.useI18n)(),{isOpen:t,closeChat:s}=(0,o.useVisibility)(),{isWindow:d}=(0,l.useSeamlyLayoutMode)(),p=(0,c.useWindowOpenButtonFocusing)(),m=(0,a.useCallback)(()=>{s(),p()},[s,p]);return t&&d?(0,u.jsx)("button",{type:"button",className:(0,n.className)("button","collapse-button"),onClick:m,children:(0,u.jsx)(i.default,{name:"chevronDown",size:"32",alt:e("window.srCollapseButton")})}):null}},"./src/javascripts/core/ui/components/view/window-view/index.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var r=s("./src/javascripts/core/domains/app/hooks.ts"),o=s("./src/javascripts/core/domains/config/hooks.ts"),n=s("./src/javascripts/core/domains/visibility/hooks.ts"),a=s("./src/javascripts/core/lib/css.ts"),i=s("./src/javascripts/core/ui/components/conversation/conversation.tsx"),c=s("./src/javascripts/core/ui/components/layout/chat.tsx"),l=s("./src/javascripts/core/ui/components/layout/chat-frame.tsx"),u=s("./src/javascripts/core/ui/components/layout/continue-chat-messages.tsx"),d=s("./src/javascripts/core/ui/components/layout/pre-chat-messages.tsx"),p=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),m=s("./src/javascripts/core/ui/components/view/window-view/window-open-button.tsx"),f=s("./node_modules/preact/compat/jsx-runtime.mjs");const h=(e,t,s)=>"object"==typeof e?e[t]:s,v=()=>{const{isOpen:e,openChat:t}=(0,n.useVisibility)(),s=(0,r.useUserHasResponded)(),{continueChat:v,preChat:y}=(0,o.useConfig)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(m.default,{onClick:t}),(0,f.jsx)(p.default,{isActive:!!y&&!e&&!s,exitAfter:h(y,"exitAfter"),enterDelay:h(y,"enterDelay"),transitionStartState:p.transitionStartStates.notRendered,children:(0,f.jsx)("div",{className:(0,a.className)("unstarted-wrapper","unstarted-wrapper--window"),children:(0,f.jsx)(d.default,{})})}),(0,f.jsx)(p.default,{isActive:v&&!e&&s,exitAfter:h(v,"exitAfter"),enterDelay:h(v,"enterDelay"),transitionStartState:p.transitionStartStates.notRendered,children:(0,f.jsx)("div",{className:(0,a.className)("unstarted-wrapper","unstarted-wrapper--window","unstarted-wrapper--continue"),children:(0,f.jsx)(u.default,{})})}),(0,f.jsx)(p.default,{isActive:e,transitionStartState:p.transitionStartStates.notRendered,children:(0,f.jsx)(c.default,{children:(0,f.jsx)(l.default,{children:(0,f.jsx)(i.default,{})})})})]})}},"./src/javascripts/core/ui/components/view/window-view/window-open-button.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/interrupt/selectors.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/lib/css.ts"),c=s("preact/hooks"),l=s("./node_modules/react-redux/dist/react-redux.mjs"),u=s("./src/javascripts/core/ui/components/layout/icon.tsx"),d=s("./src/javascripts/core/ui/components/widgets/in-out-transition.tsx"),p=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),m=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),f=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),h=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),v=s("./node_modules/preact/compat/jsx-runtime.mjs");const y=()=>{const e=(0,r.useStartChatIcon)(),t=(0,h.useSeamlyCurrentAgent)(),s=(0,l.useSelector)(n.selectHasError),o=t&&!s,a=o?t.avatar:e;return a?(0,v.jsx)("img",{className:(0,i.className)(o?"avatar":"icon"),src:a,alt:""}):(0,v.jsx)(u.default,{name:"avatar",size:"32",alt:""})},j=({onClick:e})=>{const t=(0,m.useSeamlyHasConversation)(),{t:s}=(0,o.useI18n)(),r=t()?s("window.openButton.srContinue"):s("window.openButton.srStart"),n=(0,p.useSkiplinkTargetFocusing)(),{isOpen:l}=(0,a.useVisibility)(),{windowOpenButtonId:u}=(0,f.useSeamlyStateContext)(),j=(0,h.useSeamlyUnreadCount)(),g=(0,c.useCallback)(()=>{e(),n()},[n,e]);return(0,v.jsx)(d.default,{isActive:!l,transitionStartState:d.transitionStartStates.rendered,children:(0,v.jsxs)("button",{type:"button",className:(0,i.className)("window-open-button"),"aria-label":r,onClick:g,inert:l||void 0,id:u,children:[(0,v.jsx)(d.default,{isActive:!!j,transitionStartState:d.transitionStartStates.notRendered,children:(0,v.jsx)("span",{className:(0,i.className)("message-count"),"aria-hidden":"true",children:j})}),(0,v.jsx)(y,{})]})})}},"./src/javascripts/core/ui/components/warnings/idle-detach-warning.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),a=s("./src/javascripts/core/ui/hooks/use-seamly-activity-event-handler.ts"),i=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),c=s("./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts"),l=s("./src/javascripts/core/ui/components/warnings/prompt.tsx"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=()=>{const{t:e}=(0,r.useI18n)(),t=(0,n.useSkiplinkTargetFocusing)(),s=(0,a.default)(),{emitEvent:d}=(0,i.default)(),{isActive:p,remaining:m,timer:f,endCountdown:h}=(0,c.default)(),v=!!m&&m>0,y=e(v?"idleDetachWarning.countdownTitle":"idleDetachWarning.notifyTransferText");return(0,u.jsx)(l.default,{baseClassName:"idle",title:y,children:v&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:(0,o.className)("idle__count-container"),children:p&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("span",{className:(0,o.className)("idle__count-text"),children:e("idleDetachWarning.countdownText")}),(0,u.jsx)("span",{className:(0,o.className)("idle__count-timer"),children:e("idleDetachWarning.countdownTimer",f)})]})}),(0,u.jsxs)("div",{className:(0,o.className)("idle__options"),children:[(0,u.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{s(),h(!0),t(),d("idleTimer.selectContinue")},children:e("idleDetachWarning.continueButton")}),(0,u.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{h(),t(),d("idleTimer.selectEnd")},children:e("idleDetachWarning.detachButton")})]})]})})}},"./src/javascripts/core/ui/components/warnings/prompt.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/lib/css.ts"),o=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),n=s("./node_modules/preact/compat/jsx-runtime.mjs");const a=({baseClassName:e,children:t,title:s})=>{const a=(0,o.useSkiplink)(),i=(0,o.useGeneratedId)();return(0,n.jsxs)("section",{id:a,className:(0,r.className)(e),"aria-describedby":i,tabIndex:-1,children:[(0,n.jsx)("h2",{className:(0,r.className)(`${e}__title`),id:i,children:s}),t]})}},"./src/javascripts/core/ui/components/warnings/resume-conversation-prompt.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),a=s("./src/javascripts/core/ui/hooks/use-seamly-activity-event-handler.ts"),i=s("./src/javascripts/core/ui/hooks/use-seamly-resume-conversation-prompt.ts"),c=s("./src/javascripts/core/ui/components/warnings/prompt.tsx"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u=()=>{const{t:e}=(0,r.useI18n)(),t=(0,a.default)(),{name:s}=(0,n.useSeamlyCurrentAgent)()||{},{continueChat:u,restartChat:d}=(0,i.default)();return(0,l.jsx)(c.default,{baseClassName:"prompt",title:e("resumeConversationPrompt.title",{name:s}),children:(0,l.jsxs)("div",{className:(0,o.className)("prompt__options"),children:[(0,l.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{t(),u()},children:e("resumeConversationPrompt.continueButton")}),(0,l.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:d,children:e("resumeConversationPrompt.detachButton")})]})})}},"./src/javascripts/core/ui/components/widgets/in-out-transition.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f,transitionStartStates:()=>m,useStableCallback:()=>p}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/config.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("preact"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/hooks/use-timeout.ts"),c=s("./src/javascripts/core/ui/utils/general-utils.ts"),l=s("./node_modules/preact/compat/jsx-runtime.mjs");const u={visible:(0,o.className)("transition--visible"),in:(0,o.className)("transition--in"),visuallyHidden:(0,o.className)("visually-hidden")},d=Object.values(u),p=e=>{const t=(0,a.useRef)(null);t.current=e;const s="function"==typeof e;return(0,a.useMemo)(()=>s?(...e)=>t.current(...e):void 0,[s])},m={notRendered:"notRendered",rendered:"rendered",visuallyHidden:"visuallyHidden"},f=({children:e,isActive:t,timeout:s=r.defaultTransitionTimeMs,transitionStartState:o=m.notRendered,onInTransitionComplete:f=()=>{},onOutTransitionComplete:h=()=>{},exitAfter:v,enterDelay:y=0})=>{const j=(0,a.useRef)(!1),g=(0,a.useRef)(null),b=(0,a.useRef)(null),x=o===m.visuallyHidden,[_,w]=(0,a.useState)(()=>x?[u.visuallyHidden]:[]),[S,k]=(0,a.useState)(()=>0===y),C=(0,a.useMemo)(()=>v?v+y:v,[y,v]);(0,i.default)(()=>k(!1),t?C:void 0),(0,i.default)(()=>k(!0),t?y:void 0);const E=(0,a.useMemo)(()=>S&&t,[t,S]),T=p(f),N=p(h),I="notRendered"!==o||_.length>0;return(0,a.useEffect)(()=>(j.current&&!E&&(w([u.visible]),g.current=setTimeout(()=>{w([...x?[u.visuallyHidden]:[]]),N&&(b.current=requestAnimationFrame(()=>{N()}))},s)),!j.current&&E&&(w([u.visible]),b.current=requestAnimationFrame(()=>{b.current=requestAnimationFrame(()=>{w([u.visible,u.in]),T&&(g.current=setTimeout(()=>{T()},s))})})),j.current=E,()=>{g.current&&clearTimeout(g.current),b.current&&cancelAnimationFrame(b.current)}),[x,T,N,s,E]),(0,l.jsx)(l.Fragment,{children:I&&(0,n.toChildArray)(e).filter(c.childIsVNode).map(e=>{const{className:t=""}=e.props,s=t.split(" ").filter(e=>!d.includes(e));return(0,n.cloneElement)(e,{className:[...s,..._].join(" ")})})})}},"./src/javascripts/core/ui/components/widgets/lightbox.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/lib/css.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/components/layout/icon.tsx"),c=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),l=s("./src/javascripts/core/ui/components/widgets/modal.tsx"),u=s("./node_modules/preact/compat/jsx-runtime.mjs");const d=({url:e,description:t,onClose:s})=>{const d=(0,r.useConfig)(),p=(0,c.useSeamlyActivityEventHandler)(),m=(0,c.useSeamlyAppContainerClassNames)(),f=(0,a.useRef)(null),{t:h}=(0,o.useI18n)(),v=["modal",`app--layout-${d.layoutMode}`,`namespace--${d.namespace}`];"function"!=typeof m?v.push(...m):v.push(...m(d));const y=e=>{e.stopPropagation()},j=()=>{s()},g=d?.zIndex?{zIndex:d.zIndex+1}:void 0;return(0,u.jsx)(l.default,{onClose:s,"aria-label":h("lightbox.heading"),fallBackFocusRef:f,children:({onClose:s,modalRenderFn:r})=>r((s=>(0,u.jsx)("div",{className:(0,n.className)(v),onClick:j,style:g,children:(0,u.jsxs)("div",{className:(0,n.className)("modal__float"),tabIndex:-1,onMouseDown:p,onKeyDown:p,onTouchStart:p,onMouseMove:p,onWheel:p,onPointerDown:p,onPointerMove:p,ref:f,children:[(0,u.jsx)("div",{className:(0,n.className)("modal__inner"),onClick:y,children:(0,u.jsx)("img",{className:(0,n.className)("modal__image"),src:e,alt:t})}),(0,u.jsxs)("button",{type:"button",className:(0,n.className)("modal__close"),onClick:s,children:[(0,u.jsx)(i.default,{name:"close",size:"16",alt:""}),h("lightbox.closeLabel")]})]})}))(s))})}},"./src/javascripts/core/ui/components/widgets/modal.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/focus-trap/dist/focus-trap.esm.js"),o=s("preact"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./src/javascripts/core/ui/utils/general-utils.ts");const c=({children:e,onClose:t,fallBackFocusRef:s,"aria-label":c,"aria-labelledby":l})=>{const u=(0,a.useGeneratedId)(),d=(0,n.useRef)(null),p=(0,n.useRef)(null),[m,f]=(0,n.useState)(!1);return(0,n.useEffect)(()=>(m&&d.current&&(p.current=(0,r.createFocusTrap)(d.current,{initialFocus:s.current||void 0}),p.current.activate()),()=>{p.current&&p.current.deactivate()}),[m,s]),(0,n.useEffect)(()=>{const e=(0,i.createAriaHider)();return()=>{e()}},[m]),(0,n.useEffect)(()=>{m&&d.current&&d.current.addEventListener("keydown",e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&t()})},[m,t]),(0,n.useLayoutEffect)(()=>{const e=document.getElementsByTagName("body")[0],t=document.createElement("div");return t.setAttribute("id",u),t.setAttribute("role","dialog"),t.setAttribute("data-nosnippet","true"),t.setAttribute("aria-modal","true"),c&&t.setAttribute("aria-label",c),l&&t.setAttribute("aria-labelledby",l),e.appendChild(t),d.current=t,f(!0),()=>{d.current&&(e.removeChild(d.current),d.current=null)}},[c,l,u]),"function"==typeof e?e({onClose:t,modalRenderFn:e=>d.current&&(0,o.render)(e,d.current)}):d.current&&(0,o.render)((0,o.toChildArray)(e).filter(i.childIsVNode).map(e=>(e.props={...e.props,onClose:t},e)),d.current)}},"./src/javascripts/core/ui/components/widgets/upload-progress.tsx":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/lib/css.ts"),n=s("./src/javascripts/core/ui/components/form-controls/error.tsx"),a=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),i=s("./node_modules/preact/compat/jsx-runtime.mjs");const c=()=>{const{t:e}=(0,r.useI18n)(),{currentUploads:t}=(0,a.useFileUploads)();return(0,i.jsx)("div",{className:(0,o.className)("progress"),children:t.map(({id:t,name:s,progress:r,uploading:a,error:c})=>(0,i.jsxs)("div",{className:(0,o.className)("progress_container"),children:[(0,i.jsxs)("div",{className:(0,o.className)("progress__text"),children:[(0,i.jsx)("span",{className:(0,o.className)("progress__text--file-name"),children:s}),(0,i.jsx)("span",{className:(0,o.className)("progress__text--percentage"),children:`${r}%`})]}),(0,i.jsx)(n.default,{error:c,id:"progress-error"}),(0,i.jsx)("progress",{className:(0,o.className)("progress__bar"),role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-label":e("fileUpload.srProgressLabel",{fileName:s}),max:"100","aria-valuenow":r,value:r,"aria-busy":a,children:`${r}%`})]},t))})}},"./src/javascripts/core/ui/hooks/component-helper-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useSeamlyAppContainerClassNames:()=>o,useSeamlyMessageContainerClassNames:()=>n}),s("./node_modules/core-js/modules/es.array.push.js");var r=s("./src/javascripts/core/domains/config/hooks.ts");const o=()=>(0,r.useConfig)().appContainerClassNames,n=e=>{const{fromClient:t}=e.payload,s=["message"];return"info"===e.type?s.push("message--source-info"):t?s.push("message--source-user"):s.push("message--source-agent"),s}},"./src/javascripts/core/ui/hooks/event-bus-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/core/seamly-api-context.ts");const n=()=>{const e=(0,r.useContext)(o.SeamlyEventBusContext);if(!e)throw new Error("useSeamlyEventBusContext has to be used within <SeamlyEventBusContext.Provider>");return e}},"./src/javascripts/core/ui/hooks/file-upload-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useFileUploadMeta:()=>c,useFileUploads:()=>l}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.every.js"),s("./node_modules/core-js/modules/esnext.iterator.some.js");var r=s("./src/javascripts/core/domains/store/index.ts"),o=s("./src/javascripts/core/domains/store/slice.ts"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/components/core/seamly-file-upload-context.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const c=()=>{const{showFileUpload:e,entryMeta:{options:t,optionsOverride:s},options:{features:{uploads:r}}}=(0,i.useSeamlyStateContext)(),{allowedMimeTypes:o,maxSize:n}=s?.upload||{},{enabled:a,enabledFromEntry:c}=r||{},{allowedMimeTypes:l,maxSize:u}={...t.upload||{allowedMimeTypes:[],maxSize:0},...o?{allowedMimeTypes:o}:{},...n?{maxSize:n}:{}};return{showFileUpload:e,accountAllowsUploads:!!r,serviceAllowsUploads:c||a,allowedMimeTypes:l,maxSize:u}},l=()=>{const{currentUploads:e}=(0,i.useSeamlyStateContext)(),t=(0,r.useAppDispatch)(),s=(()=>{const e=(0,n.useContext)(a.default);if(!e)throw new Error("useSeamlyFileUploadContext has to be used within <SeamlyFileUploadContext.Provider>");return e})();return{uploadFile:(0,n.useCallback)(e=>{s(e)},[s]),clearUploads:(0,n.useCallback)(()=>{t((0,o.clearAllUploads)())},[t]),currentUploads:e,isUploading:e.some(e=>e.uploading),isComplete:e.every(e=>e.complete)}}},"./src/javascripts/core/ui/hooks/focus-helper-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{timeout:()=>c,useElementFocusingById:()=>d,useFocusIfSeamlyContainedFocus:()=>f,useSeamlyContainerElement:()=>u,useSkiplinkTargetFocusing:()=>p,useWindowOpenButtonFocusing:()=>m});var r=s("./src/javascripts/core/domains/store/index.ts"),o=s("./src/javascripts/core/domains/store/slice.ts"),n=s("preact/hooks"),a=s("./src/javascripts/core/ui/utils/general-utils.ts"),i=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const c=(e=0)=>new Promise(t=>{setTimeout(t,e)}),l=e=>{requestAnimationFrame(async()=>{await c(180);const t="string"==typeof e?document.getElementById(e):e;(0,a.focusElement)(t)})},u=()=>{const{seamlyContainerElement:e}=(0,i.useSeamlyStateContext)(),t=(0,r.useAppDispatch)();return[e,(0,n.useCallback)(e=>{t((0,o.setSeamlyContainerElement)(e))},[t])]},d=e=>(0,n.useCallback)(()=>{l(e)},[e]),p=()=>{const e=(0,i.useSkiplink)();return d(e)},m=()=>{const{windowOpenButtonId:e}=(0,i.useSeamlyStateContext)();return d(e)},f=()=>{const e=(0,n.useRef)(null),[t]=u();return e.current=t,(0,n.useCallback)(t=>{(0,a.runIfElementContainsOrHasFocus)(e.current,()=>{l(t)})},[])}},"./src/javascripts/core/ui/hooks/live-region-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useLiveRegion:()=>i,useSeamlyLiveRegionContext:()=>a});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/core/seamly-live-region-context.ts"),n=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const a=()=>{const e=(0,r.useContext)(o.SeamlyLiveRegionContext);if(!e)throw new Error("useSeamlyLiveRegionContext has to be used within <SeamlyLiveRegionContext.Provider>");return e},i=()=>{const e=a();return{sendPolite:(0,r.useCallback)(t=>{t&&e({ariaLive:n.ariaLiveLevels.polite,messageText:t})},[e]),sendAssertive:(0,r.useCallback)(t=>{t&&e({ariaLive:n.ariaLiveLevels.assertive,messageText:t})},[e])}}},"./src/javascripts/core/ui/hooks/seamly-api-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useSeamlyApiContext:()=>n,useSeamlyConversationUrl:()=>i,useSeamlyHasConversation:()=>c,useSeamlyObjectStore:()=>a});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/core/seamly-api-context.ts");const n=()=>{const e=(0,r.useContext)(o.SeamlyApiContext);if(!e)throw new Error("useSeamlyApiContext has to be used within <SeamlyApiContext.Provider>");return e},a=()=>n().store,i=()=>{const{get:e}=a();return e?e("conversationUrl"):null},c=()=>{const e=n();return(0,r.useCallback)(()=>e.hasConversation(),[e])}},"./src/javascripts/core/ui/hooks/seamly-entry-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useSeamlyEntry:()=>d,useSeamlyTyping:()=>u});var r=s("./src/javascripts/core/config.ts"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/store/slice.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),l=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const u=()=>{const{sendAction:e}=(0,i.useSeamlyCommands)(),{features:t}=(0,i.useSeamlyOptions)(),{typingPeekahead:s}=t||{},o=(0,a.useRef)(null),n=(0,a.useRef)(null),c=(0,a.useRef)(!1),u=(0,a.useRef)(null);(0,a.useEffect)(()=>()=>{u.current&&clearInterval(u.current),o.current&&clearTimeout(o.current),n.current&&clearTimeout(n.current)},[]);const d=(t,r)=>{e({type:l.actionTypes.typing,state:t,...s&&s.enabled?{body:{currentMessage:r}}:{}})};return e=>{e.code&&"Enter"===e.code||13===e.keyCode||(c.current=!0,u.current||(d(!0,e.target.value),u.current=setInterval(()=>{!c.current&&u.current?(clearInterval(u.current),u.current=null):s&&s.enabled&&d(!0,e.target.value)},r.typingTimeout)),o.current&&clearTimeout(o.current),n.current&&clearTimeout(n.current),o.current=setTimeout(()=>{c.current=!1},300),n.current=setTimeout(()=>{d(!1,e.target.value)},r.typingTimeout))}},d=()=>{const{default:e,active:t,userSelected:s,options:r,optionsOverride:i}=(0,c.useSeamlyStateContext)().entryMeta,l=(0,o.useAppDispatch)(),u=s||t||e,d=i&&i[u]||r&&r[u]||{},p=(0,a.useCallback)(e=>{l((0,n.setBlockAutoEntrySwitch)(e))},[l]),m=(0,a.useCallback)(e=>{l((0,n.setActiveEntryType)(e))},[l]),f=(0,a.useCallback)(e=>{l((0,n.setUserEntryType)(e))},[l]),h=(0,a.useCallback)(()=>{s?f(null):m(e)},[m,f,e,s]);return{activeEntry:u,activeEntryOptions:d,setActiveEntryType:m,setUserEntryType:f,cancelEntrySelection:h,setBlockAutoEntrySwitch:p}}},"./src/javascripts/core/ui/hooks/seamly-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useElementFocusingById:()=>n.useElementFocusingById,useEntryTextLimit:()=>d.useEntryTextLimit,useEvents:()=>d.useEvents,useFileUploadMeta:()=>i.useFileUploadMeta,useFileUploads:()=>i.useFileUploads,useFocusIfSeamlyContainedFocus:()=>n.useFocusIfSeamlyContainedFocus,useForceUpdate:()=>y.useForceUpdate,useGeneratedId:()=>y.useGeneratedId,useLastMessageEventId:()=>d.useLastMessageEventId,useLiveRegion:()=>c.useLiveRegion,useOptionButton:()=>u.useOptionButton,useSeamlyActivityEventHandler:()=>p.default,useSeamlyApiContext:()=>l.useSeamlyApiContext,useSeamlyAppContainerClassNames:()=>a.useSeamlyAppContainerClassNames,useSeamlyChat:()=>m.default,useSeamlyCommands:()=>f.default,useSeamlyContainerElement:()=>n.useSeamlyContainerElement,useSeamlyConversationUrl:()=>l.useSeamlyConversationUrl,useSeamlyCurrentAgent:()=>d.useSeamlyCurrentAgent,useSeamlyEventStream:()=>j,useSeamlyHeaderData:()=>d.useSeamlyHeaderData,useSeamlyIdleDetachCountdown:()=>h.default,useSeamlyIsHistoryLoaded:()=>d.useSeamlyIsHistoryLoaded,useSeamlyIsLoading:()=>d.useSeamlyIsLoading,useSeamlyLayoutMode:()=>d.useSeamlyLayoutMode,useSeamlyLiveRegionContext:()=>c.useSeamlyLiveRegionContext,useSeamlyMessageContainerClassNames:()=>a.useSeamlyMessageContainerClassNames,useSeamlyOptions:()=>u.useSeamlyOptions,useSeamlyParticipant:()=>d.useSeamlyParticipant,useSeamlyResumeConversationPrompt:()=>v.default,useSeamlyServiceData:()=>d.useSeamlyServiceData,useSeamlyServiceInfo:()=>d.useSeamlyServiceInfo,useSeamlyStateContext:()=>d.useSeamlyStateContext,useSeamlyUnreadCount:()=>d.useSeamlyUnreadCount,useSkiplink:()=>d.useSkiplink,useSkiplinkTargetFocusing:()=>n.useSkiplinkTargetFocusing});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/hooks/use-seamly-conversation.ts"),n=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),a=s("./src/javascripts/core/ui/hooks/component-helper-hooks.ts"),i=s("./src/javascripts/core/ui/hooks/file-upload-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/seamly-option-hooks.ts"),d=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/use-seamly-activity-event-handler.ts"),m=s("./src/javascripts/core/ui/hooks/use-seamly-chat.ts"),f=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),h=s("./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts"),v=s("./src/javascripts/core/ui/hooks/use-seamly-resume-conversation-prompt.ts"),y=s("./src/javascripts/core/ui/hooks/utility-hooks.ts");const j=(e,t)=>{const s=(0,o.default)();(0,r.useEffect)(()=>{s.onMessage((s,r)=>(t&&!t({type:s,payload:r})||e({type:s,payload:r}),r))},[e,t,s])}},"./src/javascripts/core/ui/hooks/seamly-option-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useOptionButton:()=>d,useSeamlyOptions:()=>u}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/store/slice.ts"),a=s("preact/hooks"),i=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const u=()=>{const{t:e}=(0,r.useI18n)(),{options:t}=(0,l.useSeamlyStateContext)(),{panelActive:s,optionActive:i,userSelectedOptions:u,features:d}=t,{extraMenuItem:p,sendTranscript:m}=d,f={extraMenuItem:p,sendTranscript:m},h=t=>"extraMenuItem"===t?"Extra menu item":e(`options.${t}.menuTitle`),v=Object.keys(f).filter(e=>f[e]).map(e=>({name:e,title:h(e),available:f[e].enabled})),y=p||m,j=(0,o.useAppDispatch)(),{get:g,set:b}=(0,c.useSeamlyObjectStore)();return{allowOptionSelection:y,userSelectedOptions:u,features:d,menuOptions:v,initUserSelectedOptions:(0,a.useCallback)(()=>{const e=g("options")||{};j((0,n.setUserSelectedOptions)(e))},[g,j]),setUserSelectedOptions:(0,a.useCallback)(e=>{j((0,n.setUserSelectedOptions)(e)),b("options",e)},[b,j]),setUserSelectedOption:(0,a.useCallback)((e,t)=>{const s=g("options")||{};"object"==typeof s&&b("options",{...s,[e]:t}),j((0,n.setUserSelectedOption)({option:e,value:t}))},[j,g,b]),showOption:e=>{j((0,n.showOption)(e))},hideOption:()=>{j((0,n.hideOption)())},panelActive:s,optionActive:i}},d=()=>{const{optionsButtonId:e}=(0,l.useSeamlyStateContext)();return{id:e,focusButton:(0,i.useElementFocusingById)(e)}}},"./src/javascripts/core/ui/hooks/seamly-state-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{selectEventIds:()=>f,selectEvents:()=>p,selectEventsWithSuggestion:()=>d,selectState:()=>l,useEntryTextLimit:()=>T,useEvents:()=>m,useEventsIds:()=>h,useLastMessageEventId:()=>S,useLoadedImageEventIds:()=>g,useSeamlyCurrentAgent:()=>C,useSeamlyHeaderData:()=>y,useSeamlyIsHistoryLoaded:()=>k,useSeamlyIsLoading:()=>v,useSeamlyLayoutMode:()=>N,useSeamlyParticipant:()=>x,useSeamlyServiceData:()=>E,useSeamlyServiceInfo:()=>_,useSeamlyStateContext:()=>u,useSeamlyUnreadCount:()=>j,useSkiplink:()=>b}),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.filter.js"),s("./node_modules/core-js/modules/esnext.iterator.map.js");var r=s("./node_modules/reselect/dist/reselect.mjs"),o=s("./src/javascripts/core/domains/app/selectors.ts"),n=s("./src/javascripts/core/domains/config/hooks.ts"),a=s("./src/javascripts/core/domains/config/selectors.ts"),i=s("./node_modules/react-redux/dist/react-redux.mjs"),c=s("./src/javascripts/core/ui/utils/general-utils.ts");const l=({state:e})=>e,u=()=>(0,i.useSelector)(l),d=(0,r.createSelector)(l,a.selectConfig,o.selectUserHasResponded,({events:e,serviceData:t},s,r)=>{if(r||"inline"===s.layoutMode||!t?.suggestion||!t?.suggestion?.body?.length)return e;const o={type:"service_data",payload:t.suggestion};return[...e,o]}),p=(0,r.createSelector)(d,a.selectConfig,(e,t)=>{const{enabled:s,threshold:r}=t?.messages?.timeIndicator??{};return s?e.map(({type:e,payload:t},s,o)=>{if(0===s)return{type:e,payload:{...t,timeIndicator:t?.occurredAt}};const n=o[s-1];if(!t?.occurredAt||!n.payload?.occurredAt||!r)return{type:e,payload:{...t,timeIndicator:void 0}};const a=(0,c.microsecondsToMilliseconds)(t.occurredAt-n.payload.occurredAt)>=r?t.occurredAt:void 0;return{type:e,payload:{...t,timeIndicator:a}}}):e}),m=()=>(0,i.useSelector)(p),f=(0,r.createSelector)(p,e=>e.map(e=>e.payload.id)),h=()=>(0,i.useSelector)(f),v=()=>u().isLoading,y=()=>u().headerTitles,j=()=>u().unreadEvents,g=()=>u().loadedImageEventIds,b=()=>u().skiplinkTargetId,x=e=>u().participantInfo.participants[e],_=()=>u().serviceInfo,w=(0,r.createSelector)(p,e=>{const t=e.filter(e=>"message"===e.type);return t[t.length-1]?.payload.id}),S=()=>(0,i.useSelector)(w),k=()=>u().historyLoaded,C=()=>{const{participants:e,currentAgent:t}=u().participantInfo;return t?e[t]:null},E=e=>u().serviceData[e],T=()=>{const{entryMeta:{active:e,options:t,optionsOverride:s}}=u();let r=null;return e&&"number"==typeof s[e]?.limit?r=s[e].limit:e&&"number"==typeof t[e]?.limit&&(r=t[e].limit),{hasLimit:null!==r,limit:null!==r?r:null}},N=()=>{const{layoutMode:e}=(0,n.useConfig)();return{isInline:"inline"===e,isWindow:"window"===e,isApp:"app"===e,isResolving:!e}}},"./src/javascripts/core/ui/hooks/sounds/beep.mp3":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const r=s.p+"sounds/beep.mp3"},"./src/javascripts/core/ui/hooks/use-click-outside.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("preact/hooks");const o=e=>{const t=(0,r.useRef)(null);return(0,r.useEffect)(()=>{const s=s=>{t.current&&s.target instanceof HTMLElement&&!t.current.contains(s.target)&&(s.preventDefault(),s.stopPropagation(),e())};return document.addEventListener("click",s,!0),document.addEventListener("touchstart",s,!0),()=>{document.removeEventListener("click",s,!0),document.removeEventListener("touchstart",s,!0)}},[e,t]),t}},"./src/javascripts/core/ui/hooks/use-debounce.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("preact/hooks");const o=(e,t=20)=>{const[s,o]=(0,r.useState)(e),n=(0,r.useRef)(null);return(0,r.useEffect)(()=>(n.current=setTimeout(()=>o(e),t),()=>{n.current&&clearTimeout(n.current)}),[e,t]),s}},"./src/javascripts/core/ui/hooks/use-event-component-mapping.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/conversation/component-context.ts"),n=s("./src/javascripts/core/ui/utils/seamly-utils.ts");const a=e=>{const t=(()=>{const e=(0,r.useContext)(o.default);if(!e)throw new Error("useComponentContext has to be used within <ComponentContext.Provider>");return e})(),s=t[e.type];let a=s[e.payload.type],i=null;return e.payload.type===n.payloadTypes.choicePrompt&&(i=s[e.payload.body.prompt.type]),"participant"===e.type&&(a=s[e.type]),a&&"function"!=typeof a&&(a=a[e.payload.body.type]),[a||t?.fallback,i]}},"./src/javascripts/core/ui/hooks/use-interval.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("preact/hooks");const o=(e,t)=>{const s=(0,r.useRef)(e);(0,r.useEffect)(()=>{s.current=e},[e]),(0,r.useEffect)(()=>{if(null!==t){const e=setInterval(function(){s.current()},t);return()=>clearInterval(e)}},[t])}},"./src/javascripts/core/ui/hooks/use-notifications.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/store/selectors.ts"),n=s("preact/hooks"),a=s("./node_modules/react-redux/dist/react-redux.mjs"),i=s("./src/javascripts/core/ui/components/entry/text-entry/index.tsx"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/sounds/beep.mp3");const u=!!window.Notification,d=()=>{const{proactiveMessages:e}=(0,c.useSeamlyServiceInfo)(),{notificationAudioURL:t}=(0,r.useConfig)(),[s,d]=(0,n.useState)(u?Notification.permission:"default"),[p,m]=(0,n.useState)(document.visibilityState),f=(0,a.useSelector)(o.selectShowNotifications),h=(0,n.useCallback)(async()=>{if(u&&"granted"!==s){const e=await Notification.requestPermission();d(e)}},[s]),v=(0,n.useMemo)(()=>"granted"===s,[s]),y=(0,n.useMemo)(()=>"hidden"===p,[p]);(0,n.useEffect)(()=>{"default"===s&&e&&h()},[s,e,h]);const j=(0,n.useCallback)(async(e,r)=>{if(f&&u){if("default"===s&&h(),!1!==t&&!v&&(y||!document.hasFocus()))try{const e=new Audio(t||l.default);await e.play()}catch(e){console.warn(e)}if(v&&(y||!document.hasFocus())){const t=new Notification(e,r);t.onclick=function(){window.parent.focus(),window.focus(),t.close();const e=document.querySelector(`input[name=${i.textEntryControlName}]`);e&&e.focus()}}}},[t,s,v,h,f,y]);return(0,n.useEffect)(()=>{if(!f)return()=>{};function e(){m(document.visibilityState)}return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e)}},[f]),{permission:s,requestPermission:h,sendNotification:j}}},"./src/javascripts/core/ui/hooks/use-seamly-actions.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useSeamlyActions:()=>n});var r=s("./src/javascripts/core/domains/store/index.ts"),o=s("./src/javascripts/core/domains/store/slice.ts");const n=()=>{const e=(0,r.useAppDispatch)();return{addEvent:t=>e((0,o.addEvent)(t)),clearEvents:()=>e((0,o.clearEvents)()),setEventsRead:t=>e((0,o.setEventsRead)(t)),setLoadedImageEventIds:t=>e((0,o.setLoadedImageEventIds)(t)),setIsLoading:t=>e((0,o.setIsLoading)(t)),setParticipant:t=>e((0,o.setParticipant)(t)),setHeaderTitle:t=>e((0,o.setHeaderTitle)(t)),setHeaderSubTitle:t=>e((0,o.setHeaderSubTitle)(t)),setActiveService:t=>e((0,o.setActiveService)(t)),initIdleDetachCountdown:t=>e((0,o.initIdleDetachCountdown)(t)),decrementIdleDetachCountdownCounter:()=>e((0,o.decrementIdleDetachCountdownCounter)()),stopIdleDetachCountdownCounter:()=>e((0,o.stopIdleDetachCountdownCounter)()),clearIdleDetachCountdown:()=>e((0,o.clearIdleDetachCountdown)()),initResumeConversationPrompt:()=>e((0,o.initResumeConversationPrompt)()),clearResumeConversationPrompt:()=>e((0,o.clearResumeConversationPrompt)()),setServiceDataItem:t=>e((0,o.setServiceDataItem)(t)),setFeatures:t=>e((0,o.setFeatures)(t)),setFeatureEnabledState:t=>e((0,o.setFeatureEnabledState)(t)),clearFeatures:()=>e((0,o.clearFeatures)()),setInitialState:t=>e((0,o.setInitialState)(t)),setUserSelectedOptions:t=>e((0,o.setUserSelectedOptions)(t)),setUserSelectedOption:t=>e((0,o.setUserSelectedOption)(t)),showOption:t=>e((0,o.showOption)(t)),hideOption:()=>e((0,o.hideOption)()),setServiceEntryMetadata:t=>e((0,o.setServiceEntryMetadata)(t)),setBlockAutoEntrySwitch:t=>e((0,o.setBlockAutoEntrySwitch)(t)),setActiveEntryType:t=>e((0,o.setActiveEntryType)(t)),setUserEntryType:t=>e((0,o.setUserEntryType)(t)),registerUpload:t=>e((0,o.registerUpload)(t)),setUploadProgress:t=>e((0,o.setUploadProgress)(t)),setUploadComplete:t=>e((0,o.setUploadComplete)(t)),setUploadError:t=>e((0,o.setUploadError)(t)),clearAllUploads:()=>e((0,o.clearAllUploads)()),setSeamlyContainerElement:t=>e((0,o.setSeamlyContainerElement)(t))}}},"./src/javascripts/core/ui/hooks/use-seamly-activity-event-handler.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var r=s("preact/hooks"),o=s("./src/javascripts/core/ui/components/core/seamly-activity-event-context.ts");const n=()=>{const e=(0,r.useContext)(o.default);if(!e)throw new Error("useSeamlyActivityEventHandler has to be used within <SeamlyActivityEventContext.Provider>");return e}},"./src/javascripts/core/ui/hooks/use-seamly-chat.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/visibility/hooks.ts"),n=s("preact/hooks"),a=s("./node_modules/react-redux/dist/react-redux.mjs"),i=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts"),c=s("./src/javascripts/core/domains/visibility/selectors.ts"),l=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),u=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),d=s("./src/javascripts/core/ui/hooks/use-session-expired-command.ts");const p=()=>{const{t:e}=(0,r.useI18n)(),{isInline:t,isWindow:s,isApp:p}=(0,u.useSeamlyLayoutMode)(),{isOpen:m,isVisible:f}=(0,o.useVisibility)(),h=(0,a.useSelector)(c.selectShowInlineView),{start:v,connect:y,apiConfigReady:j,apiConnected:g}=(0,i.default)(),b=(0,n.useRef)(!1),{sendAssertive:x}=(0,l.useLiveRegion)();(0,d.default)(),(0,n.useEffect)(()=>{f&&setTimeout(()=>{x(e("window.srTexts.onLoad"))},500)},[f,x,e]),(0,n.useEffect)(()=>{f&&x(e(m?"window.srTexts.onOpen":"window.srTexts.onClose"))},[m,f,x,e]),(0,n.useEffect)(()=>{j||g||(b.current=!1)},[j,g]);const _=(0,n.useCallback)(async()=>{g||(b.current=!0,await y()),(p||m||f&&t)&&v()},[g,y,p,t,m,f,v]);(0,n.useEffect)(()=>{!j||b.current||s&&!m||!(!t||f&&h)||_()},[j,_,t,m,f,s,h])}},"./src/javascripts/core/ui/hooks/use-seamly-commands.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var r=s("./src/javascripts/core/domains/app/actions.ts"),o=s("./src/javascripts/core/domains/app/hooks.ts"),n=s("./src/javascripts/core/domains/app/slice.ts"),a=s("./src/javascripts/core/domains/interrupt/slice.ts"),i=s("./src/javascripts/core/domains/store/index.ts"),c=s("./src/javascripts/core/domains/store/slice.ts"),l=s("./src/javascripts/core/domains/visibility/constants.ts"),u=s("./src/javascripts/core/domains/visibility/hooks.ts"),d=s("./src/javascripts/core/lib/id.ts"),p=s("preact/hooks"),m=s("./src/javascripts/core/ui/hooks/event-bus-hooks.ts"),f=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts"),h=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts");const v=()=>{const e=(0,f.useSeamlyApiContext)(),t=(0,i.useAppDispatch)(),s=(0,m.default)(),v=(0,o.useUserHasResponded)(),y=(0,f.useSeamlyHasConversation)(),{visible:j,setVisibility:g}=(0,u.useVisibility)(),b=(0,h.useSeamlyUnreadCount)(),x=(0,p.useCallback)((...e)=>{s.emit(...e)},[s]),_=(0,p.useCallback)(()=>{x("ui.beforeStart",{visibility:j,hasConversation:y(),hasResponded:v,unreadMessageCount:b}),e.send("start_conversation"),x("ui.start",{visibility:j,hasConversation:y(),hasResponded:v,unreadMessageCount:b})},[e,x,y,v,b,j]),w=(0,p.useCallback)(async()=>{await t((0,r.resetApp)())},[t]),S=(0,p.useCallback)(e=>({type:e,id:(0,d.randomId)(),transactionId:(0,d.randomId)(),fromClient:!0,participant:"seamly-client-participant",occurredAt:1e3*Date.now()}),[]),k=(0,p.useCallback)(e=>({...S("text"),body:{text:e}}),[S]),C=(0,p.useCallback)(({body:s,config:r={}})=>{if(""===s.trim())return;const o={...k(s),...r};e.send("message",o),x("message",o),t((0,c.addEvent)({type:"message",payload:{...o,body:o.body,type:o.type,optimisticallyInjected:!0}}))},[e,t,x,k]),E=(0,p.useCallback)((e,s=(0,d.randomId)())=>{t((0,c.addEvent)({type:"message",payload:{...k(e),transactionId:s}}))},[t,k]),T=(0,p.useCallback)((e,s,r,o,n,a)=>{t((0,c.addEvent)({type:"message",payload:{type:"upload",id:e,transactionId:s,fromClient:!0,participant:"seamly-client-participant",occurredAt:r,body:{contentType:o,filename:n,filesize:a,id:e||"",isDeleted:!1}}}))},[t]),N=(0,p.useCallback)(t=>{t&&e.send("action",t)},[e]),I=(0,p.useCallback)(t=>{e.sendContext(t)},[e]);return{connect:(0,p.useCallback)(()=>e.connected?Promise.reject(new Error("The API is already connected")):e.connect().then(e=>{e&&(t((0,c.setInitialState)(e)),e.messages&&e.messages.length&&t((0,c.setEvents)(e)),e.userResponded&&(t((0,n.setHasResponded)(e.userResponded)),g({visibility:l.visibilityStates.open})))}).catch(e=>{t((0,a.setInterrupt)({name:e?.name,message:e?.message,langKey:e?.langKey,action:e?.action,originalEvent:e?.originalEvent,originalError:e?.originalError}))}),[e,t,g]),start:_,sendMessage:C,sendAction:N,sendContext:I,reset:w,emitEvent:x,addMessageBubble:E,addUploadBubble:T,apiConnected:e.connected,apiConfigReady:e.configReady}}},"./src/javascripts/core/ui/hooks/use-seamly-conversation.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/api/conversation-connector.ts"),o=s("preact/compat"),n=s("./src/javascripts/core/ui/hooks/seamly-api-hooks.ts");const a=()=>{const e=(0,n.useSeamlyApiContext)();return(0,o.useSyncExternalStore)(r.default.subscribe,()=>e.conversation)}},"./src/javascripts/core/ui/hooks/use-seamly-idle-detach-countdown.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var r=s("./src/javascripts/core/config.ts"),o=s("./src/javascripts/core/domains/i18n/hooks.ts"),n=s("./src/javascripts/core/domains/store/index.ts"),a=s("./src/javascripts/core/domains/store/slice.ts"),i=s("./src/javascripts/core/domains/visibility/hooks.ts"),c=s("preact/hooks"),l=s("./src/javascripts/core/ui/utils/general-utils.ts"),u=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),d=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),p=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),m=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts");const f=()=>{const e=(0,n.useAppDispatch)(),{idleDetachCountdown:{hasCountdown:t,isActive:s,count:f,remaining:h,timer:v,wasStopped:y}}=(0,p.useSeamlyStateContext)(),{isOpen:j}=(0,i.useVisibility)(),g=(0,c.useRef)({hasCountdown:!1,wasStopped:!1});g.current={hasCountdown:t,wasStopped:y||!1};const{emitEvent:b,sendAction:x}=(0,m.default)(),{t:_}=(0,o.useI18n)(),{sendAssertive:w,sendPolite:S}=(0,d.useLiveRegion)(),k=(0,c.useCallback)(e=>{j&&w(e)},[j,w]),C=(0,c.useCallback)(e=>{j&&S(e)},[j,S]),E=(0,c.useCallback)(t=>{const s=(0,l.millisecondsToSeconds)(t),r=(0,l.getTimeFromSeconds)(s);e((0,a.initIdleDetachCountdown)({delaySeconds:s,delayTime:r})),b("idleTimer.start"),k(`${_("idleDetachWarning.countdownTitle")} ${_("idleDetachWarning.countdownText")} ${_("idleDetachWarning.countdownTimer",r)}`)},[e,b,k,_]),T=(0,c.useCallback)((t=void 0,s=!1)=>{const{hasCountdown:r,wasStopped:o}=g.current;r&&(t||(s||x({type:u.actionTypes.detachService}),k(_("idleDetachWarning.notifyTransferText"))),o||b("idleTimer.stop"),e((0,a.clearIdleDetachCountdown)()))},[e,b,x,k,_]),N=(0,c.useCallback)(()=>{if(!h||h<=0)return;const t=h-1;t%r.screenReaderDebounceDelaySeconds===0&&k(`${_("idleDetachWarning.countdownText")} ${_("idleDetachWarning.countdownTimer",(0,l.getTimeFromSeconds)(t))}`),e((0,a.decrementIdleDetachCountdownCounter)())},[e,h,k,_]),I=(0,c.useCallback)(()=>{s&&(e((0,a.stopIdleDetachCountdownCounter)()),h&&(b("idleTimer.stop"),C(_("idleDetachWarning.srCountDownStoppedText"))))},[e,b,s,h,C,_]);return{hasCountdown:t,isActive:s,count:f,remaining:h,timer:v,wasStopped:y,initCountdown:E,endCountdown:T,decrementCountdown:N,stopCountdown:I}}},"./src/javascripts/core/ui/hooks/use-seamly-resume-conversation-prompt.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var r=s("./src/javascripts/core/domains/i18n/hooks.ts"),o=s("./src/javascripts/core/domains/store/index.ts"),n=s("./src/javascripts/core/domains/store/slice.ts"),a=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),i=s("./src/javascripts/core/ui/hooks/live-region-hooks.ts"),c=s("./src/javascripts/core/ui/hooks/seamly-state-hooks.ts"),l=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts");const u=()=>{const e=(0,o.useAppDispatch)(),t=(0,c.useSeamlyStateContext)().resumeConversationPrompt,{sendAction:s}=(0,l.default)(),{t:u}=(0,r.useI18n)(),{sendAssertive:d}=(0,i.useLiveRegion)();return{continueChat:()=>{s({type:a.actionTypes.dismiss,body:{type:a.dismissTypes.resumeConversationPrompt}}),e((0,n.clearResumeConversationPrompt)())},hasPrompt:t,restartChat:()=>{d(u("resumeConversationPrompt.srNotifyRestartText")),s({type:a.actionTypes.detachService}),e((0,n.clearResumeConversationPrompt)())}}}},"./src/javascripts/core/ui/hooks/use-session-expired-command.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var r=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),o=s("./src/javascripts/core/domains/interrupt/hooks.ts"),n=s("./src/javascripts/core/domains/interrupt/slice.ts"),a=s("./src/javascripts/core/domains/store/index.ts"),i=s("preact/hooks"),c=s("./src/javascripts/core/ui/hooks/use-seamly-commands.ts");function l(){const{meta:{originalError:e,action:t}}=(0,o.useInterrupt)(),s=(0,a.useAppDispatch)(),{reset:l}=(0,c.default)(),u="SeamlySessionExpiredError"===e?.name,d=(0,i.useRef)(0),p=(0,i.useRef)(null);(0,i.useEffect)(()=>{if(u&&"reset"===t){if(d.current>=10){p.current=setTimeout(()=>{d.current=0},1e4);const e=new r.default;return s((0,n.setInterrupt)({name:e.name,message:e.message,langKey:e.langKey,originalEvent:e.originalEvent,originalError:e.originalError,action:e.action})),()=>{}}d.current+=1,l()}return()=>{p.current&&clearTimeout(p.current)}},[t,l,u,s])}},"./src/javascripts/core/ui/hooks/use-single-file-upload.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var r=s("./src/javascripts/core/domains/forms/selectors.ts"),o=s("./node_modules/react-redux/dist/react-redux.mjs"),n=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts");const a=(e,t)=>{const s=(0,o.useSelector)(s=>(0,r.getControlValueByName)(s,{formId:e,name:t})),{currentUploads:a}=(0,n.useFileUploads)(),i=s&&s.length>0;let c=null,l=!1,u=0;if(a&&a.length>0){const e=a[0];c=e.uploadHandle,l=!!e.error,u=e.progress}return{hasFile:i,selectedFileName:i?s[0].name:"",uploadHandle:c,hasServerError:l,progress:u}}},"./src/javascripts/core/ui/hooks/use-timeout.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s("preact/hooks");function o(e,t){const s=(0,r.useRef)(null),o=(0,r.useRef)(e);return(0,r.useEffect)(()=>{o.current=e},[e]),(0,r.useEffect)(()=>"number"!=typeof t?()=>{}:(s.current=setTimeout(()=>o.current(),t),()=>{s.current&&clearTimeout(s.current)}),[t]),s}},"./src/javascripts/core/ui/hooks/utility-hooks.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{useForceUpdate:()=>n,useGeneratedId:()=>a});var r=s("./src/javascripts/core/lib/id.ts"),o=s("preact/hooks");const n=()=>{const[e,t]=(0,o.useReducer)(e=>e+1,0);return(0,o.useCallback)(()=>{setTimeout(()=>{t()})},[])},a=()=>{const[e]=(0,o.useState)(()=>(0,r.randomId)());return e}},"./src/javascripts/core/ui/utils/form-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{getValidator:()=>r});const r=(e,t,s=null)=>({fn:e,errorText:t,compareValue:s})},"./src/javascripts/core/ui/utils/general-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{childIsVNode:()=>j,createAriaHider:()=>o,debounce:()=>r,focusElement:()=>m,formatBytes:()=>l,getKey:()=>p,getRelativeDate:()=>h,getTimeFromSeconds:()=>c,keyCodes:()=>u,keyNames:()=>d,microsecondsToMilliseconds:()=>i,millisecondsToSeconds:()=>a,omit:()=>y,pick:()=>v,propIsTrue:()=>n,runIfElementContainsOrHasFocus:()=>f}),s("./node_modules/core-js/modules/es.array.push.js"),s("./node_modules/core-js/modules/esnext.iterator.constructor.js"),s("./node_modules/core-js/modules/esnext.iterator.for-each.js"),s("./node_modules/core-js/modules/esnext.iterator.reduce.js");const r=(e,t)=>{let s;return function(...r){let o=!1;return clearTimeout(s),s=setTimeout(()=>{s=null,o||e.apply(this,r),o=!1},t),t=>{o=!0,t&&e.apply(this,r)}}},o=()=>{const e=[],t=[];return document.querySelectorAll('body > *:not([role="dialog"])').forEach(s=>{const r=s.getAttribute("aria-hidden");null!==r&&"false"!==r||(null!==r&&e.push(r),t.push(s),s.setAttribute("aria-hidden","true"))}),()=>{t.forEach((t,s)=>{const r=e[s];null===r?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r)})}},n=e=>"true"===e||!0===e,a=e=>Math.ceil(e/1e3),i=e=>Math.ceil(e/1e3),c=e=>{const t=Math.floor(e/60);return{minutes:t,seconds:e-60*t}},l=(e,t=2)=>{if(0===e)return"0 Bytes";const s=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/1024**r).toFixed(s))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}`},u={27:"Escape",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown"},d={Escape:"Escape",End:"End",Home:"Home",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown"},p=e=>e.code?d[e.code]:u[e.keyCode],m=e=>{e&&e.focus()},f=(e,t)=>{e&&(e.contains(document.activeElement)||e===document.activeElement)&&t()},h=(e,t)=>{const s=new Date(t).setHours(0,0,0,0),r=e.getTime(),o=864e5;return r>=s+o?e:r>s?"today":r>s-o?"yesterday":e},v=(e,t)=>t.reduce((t,s)=>(s in e&&(t[s]=e[s]),t),{}),y=(e,t)=>Object.keys(e).reduce((s,r)=>(t.includes(r)||(s[r]=e[r]),s),{});function j(e){return"object"==typeof e}},"./src/javascripts/core/ui/utils/seamly-utils.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{TRANSLATION_PROPOSAL:()=>c,actionTypes:()=>i,ariaLiveLevels:()=>d,cardTypes:()=>f,dismissTypes:()=>l,dividerKeys:()=>p,entryTypes:()=>n,eventTypes:()=>r,featureKeys:()=>m,payloadTypes:()=>o,readStates:()=>a,sourceTypes:()=>u});const r={info:"info",message:"message",participant:"participant",system:"system"},o={choicePrompt:"choice_prompt",text:"text",image:"image",video:"video",participant:"participant",divider:"divider",translation:"translation",message:"message",countdown:"countdown",upload:"upload",splash:"splash"},n={text:"text",upload:"upload"},a={received:"received",read:"read"},i={pickChoice:"pick_choice",navigate:"navigate",custom:"custom",typing:"typing",read:"read",detachService:"detach_service",interactivityUpdate:"interactivity_update",dismiss:"dismiss",sendTranscript:"send_transcript",setTopic:"set_topic",setTranslation:"set_translation",setContext:"set_context",clickCard:"click_card"},c="translation_proposal",l={resumeConversationPrompt:"resume_conversation_prompt",translationProposal:c},u={translationProposal:c,translationChoice:"translation_choice",windowApi:"window_api"},d={assertive:"assertive",polite:"polite"},p={new_topic:"newTopic",new_translation:"newTranslation"},m={cobrowsing:"cobrowsing",extraMenuItem:"extraMenuItem",sendTranscript:"sendTranscript",translation:"translation",typingPeekahead:"typingPeekahead",uploads:"uploads",webNotifications:"webNotifications"},f={ask:"ask",navigate:"navigate",topic:"topic"}},"./src/javascripts/core/ui/utils/validations.ts":(e,t,s)=>{"use strict";s.r(t),s.d(t,{fileListObjectIsNotEmpty:()=>o,isEmailString:()=>n,isNotEmptyString:()=>a,validateFileSize:()=>r});const r=(e,t)=>{let s=!0;for(let r=0;r<e.length;r++)e[r].size>t&&(s=!1);return s},o=e=>!!e?.length,n=e=>{const t=e&&e.trim();return!(!t||!t.match(/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i))},a=e=>!!e},preact:e=>{"use strict";e.exports=require("preact")},"preact/compat":e=>{"use strict";e.exports=require("preact/compat")},"preact/hooks":e=>{"use strict";e.exports=require("preact/hooks")},"preact/jsx-runtime":e=>{"use strict";e.exports=require("preact/jsx-runtime")}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,s),n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})();var r={};(()=>{"use strict";s.r(r),s.d(r,{API:()=>u.default,AgentInfo:()=>I.default,Chat:()=>O.default,ChatFrame:()=>A.default,ComponentFilter:()=>w.default,Conversation:()=>S.default,Engine:()=>U.default,EntryContainer:()=>E.default,EventParticipant:()=>g.default,ExternalApi:()=>z.default,Header:()=>P.default,Icon:()=>L.default,Interrupt:()=>R.default,MessageContainer:()=>C.default,SeamlyActivityEventContext:()=>$.default,SeamlyActivityMonitor:()=>V.default,SeamlyApiContext:()=>h.SeamlyApiContext,SeamlyEventBusContext:()=>h.SeamlyEventBusContext,SeamlyFileUpload:()=>B.default,SeamlyGeneralError:()=>D.default,SeamlyLiveRegionContext:()=>v.SeamlyLiveRegionContext,SeamlyOfflineError:()=>F.default,SeamlyStoreProvider:()=>f.Provider,Text:()=>k.default,TextEntry:()=>T.default,Upload:()=>N.default,View:()=>M.default,appReducer:()=>G.default,appStorageProvider:()=>b.default,calculateVisibility:()=>m.calculateVisibility,className:()=>y.className,configReducer:()=>W.default,cookieStorageProvider:()=>x.default,default:()=>ee,eventTypes:()=>l.eventTypes,formsReducer:()=>q.default,getSearchParamsByKeys:()=>Z.getSearchParamsByKeys,getUrlSearchParams:()=>Z.getUrlSearchParams,getUrlSearchString:()=>Z.getUrlSearchString,i18nReducer:()=>K.default,initResetSearchParams:()=>Z.initResetSearchParams,interruptReducer:()=>J.default,randomId:()=>d.randomId,replaceSearchParams:()=>Z.replaceSearchParams,sessionStorageProvider:()=>_.default,setConfig:()=>W.setConfig,setInitialLocale:()=>K.setInitialLocale,setParticipant:()=>Y.setParticipant,setPreChatEvents:()=>W.setPreChatEvents,setTranslations:()=>K.setTranslations,stateReducer:()=>Y.default,timeout:()=>H.timeout,translationReducer:()=>X.default,useChoicePrompt:()=>i.useChoicePrompt,useEvents:()=>j.useEvents,useGeneratedId:()=>j.useGeneratedId,useI18n:()=>p.useI18n,useSeamlyActions:()=>c.useSeamlyActions,useSeamlyChat:()=>j.useSeamlyChat,useSeamlyCommands:()=>j.useSeamlyCommands,useSeamlyConfig:()=>t.useConfig,useSeamlyEventStream:()=>j.useSeamlyEventStream,useSeamlyIdleDetachCountdown:()=>j.useSeamlyIdleDetachCountdown,useSeamlyMessageContainerClassNames:()=>j.useSeamlyMessageContainerClassNames,useSeamlyOptions:()=>j.useSeamlyOptions,useSeamlyVisibility:()=>a.useVisibility,useTranslatedEventData:()=>o.useTranslatedEventData,useTranslations:()=>o.useTranslations,useTranslationsContainer:()=>o.useTranslationsContainer,visibilityReducer:()=>Q.default,visibilityStates:()=>n.visibilityStates}),s("./node_modules/core-js/es/array/at.js");var e=s("./src/javascripts/core/lib/external-api/initialize-api.ts"),t=s("./src/javascripts/core/domains/config/hooks.ts"),o=s("./src/javascripts/core/domains/translations/hooks.ts"),n=s("./src/javascripts/core/domains/visibility/constants.ts"),a=s("./src/javascripts/core/domains/visibility/hooks.ts"),i=s("./src/javascripts/core/ui/components/conversation/event/choice-prompt.tsx"),c=s("./src/javascripts/core/ui/hooks/use-seamly-actions.ts"),l=s("./src/javascripts/core/ui/utils/seamly-utils.ts"),u=s("./src/javascripts/core/api/index.ts"),d=s("./src/javascripts/core/lib/id.ts"),p=s("./src/javascripts/core/domains/i18n/hooks.ts"),m=s("./src/javascripts/core/domains/visibility/utils.ts"),f=s("./node_modules/react-redux/dist/react-redux.mjs"),h=s("./src/javascripts/core/ui/components/core/seamly-api-context.ts"),v=s("./src/javascripts/core/ui/components/core/seamly-live-region-context.ts"),y=s("./src/javascripts/core/lib/css.ts"),j=s("./src/javascripts/core/ui/hooks/seamly-hooks.ts"),g=s("./src/javascripts/core/ui/components/conversation/event/event-participant.tsx"),b=s("./src/javascripts/core/lib/store/providers/app-storage.ts"),x=s("./src/javascripts/core/lib/store/providers/cookie-storage.ts"),_=s("./src/javascripts/core/lib/store/providers/session-storage.ts"),w=s("./src/javascripts/core/ui/components/conversation/component-filter.tsx"),S=s("./src/javascripts/core/ui/components/conversation/conversation.tsx"),k=s("./src/javascripts/core/ui/components/conversation/event/text.tsx"),C=s("./src/javascripts/core/ui/components/conversation/message-container.tsx"),E=s("./src/javascripts/core/ui/components/entry/entry-container.tsx"),T=s("./src/javascripts/core/ui/components/entry/text-entry/index.tsx"),N=s("./src/javascripts/core/ui/components/entry/upload/index.tsx"),I=s("./src/javascripts/core/ui/components/layout/agent-info.tsx"),O=s("./src/javascripts/core/ui/components/layout/chat.tsx"),A=s("./src/javascripts/core/ui/components/layout/chat-frame.tsx"),P=s("./src/javascripts/core/ui/components/layout/header.tsx"),L=s("./src/javascripts/core/ui/components/layout/icon.tsx"),R=s("./src/javascripts/core/ui/components/layout/interrupt.tsx"),M=s("./src/javascripts/core/ui/components/view/index.tsx"),D=s("./src/javascripts/core/api/errors/seamly-general-error.ts"),F=s("./src/javascripts/core/api/errors/seamly-offline-error.ts"),U=s("./src/javascripts/core/lib/engine/index.tsx"),z=s("./src/javascripts/core/lib/external-api/index.ts"),B=s("./src/javascripts/core/ui/components/core/seamly-file-upload.tsx"),V=s("./src/javascripts/core/ui/components/core/seamly-activity-monitor.tsx"),$=s("./src/javascripts/core/ui/components/core/seamly-activity-event-context.ts"),H=s("./src/javascripts/core/ui/hooks/focus-helper-hooks.ts"),G=s("./src/javascripts/core/domains/app/slice.ts"),W=s("./src/javascripts/core/domains/config/slice.ts"),q=s("./src/javascripts/core/domains/forms/slice.ts"),K=s("./src/javascripts/core/domains/i18n/slice.ts"),J=s("./src/javascripts/core/domains/interrupt/slice.ts"),Y=s("./src/javascripts/core/domains/store/slice.ts"),X=s("./src/javascripts/core/domains/translations/slice.ts"),Q=s("./src/javascripts/core/domains/visibility/slice.ts"),Z=s("./src/javascripts/core/lib/url-helpers.ts");const ee=e.default})(),module.exports=r})();
|
|
3
3
|
//# sourceMappingURL=~/index.debug.min.js.map
|