favesalon-embed 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements/index.d.ts +24 -0
- package/dist/{cjs/_commonjsHelpers-5cfcba41.js → favesalon-embed/_commonjsHelpers-9bc404fc.js} +14 -6
- package/dist/{esm/_commonjsHelpers-098d5b27.js → favesalon-embed/_commonjsHelpers-a4f66ccd.js} +14 -2
- package/dist/{cjs/global-9073d10e.js → favesalon-embed/app-globals-437cc3f3.js} +15 -8
- package/dist/{esm/global-e1089ffd.js → favesalon-embed/app-globals-60769a2c.js} +16 -7
- package/dist/favesalon-embed/chat-box.entry.js +54 -0
- package/dist/favesalon-embed/chat-button.entry.js +51 -0
- package/dist/favesalon-embed/chat-form.entry.js +39 -0
- package/dist/favesalon-embed/chat-messages.entry.js +53 -0
- package/dist/favesalon-embed/chat-rooms.entry.js +17279 -0
- package/dist/favesalon-embed/css-shim-b7d3d95f.js +4 -0
- package/dist/favesalon-embed/dom-64053c71.js +73 -0
- package/dist/favesalon-embed/favesalon-embed.css +2433 -4
- package/dist/favesalon-embed/favesalon-embed.esm.js +148 -1
- package/dist/{collection/components/google-map/index.js → favesalon-embed/google-map.entry.js} +12 -54
- package/dist/{esm/index-80523fec.js → favesalon-embed/index-00b83e1c.js} +425 -15
- package/dist/favesalon-embed/index-04c09911.js +3371 -0
- package/dist/favesalon-embed/index-888e99e3.js +3371 -0
- package/dist/{cjs/index-7f190886.js → favesalon-embed/index-ac52896a.js} +454 -47
- package/dist/favesalon-embed/index.esm.js +1 -0
- package/dist/favesalon-embed/isObject-13b86c17.js +203 -0
- package/dist/favesalon-embed/relativeTime-15477f02.js +7 -0
- package/dist/favesalon-embed/relativeTime-268e64b0.js +7 -0
- package/dist/{esm → favesalon-embed}/salon-booking-modal.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-booking.entry.js +3 -3
- package/dist/{esm → favesalon-embed}/salon-gift-card-modal.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-gift-card.entry.js +3 -3
- package/dist/favesalon-embed/salon-info.entry.js +29 -0
- package/dist/{esm → favesalon-embed}/salon-latest-reviews.entry.js +4 -4
- package/dist/{collection/components/salon-latest-styles/index.js → favesalon-embed/salon-latest-styles.entry.js} +14 -99
- package/dist/{collection/components/salon-locations/index.js → favesalon-embed/salon-locations.entry.js} +15 -95
- package/dist/{esm → favesalon-embed}/salon-lookbook.entry.js +3 -3
- package/dist/{esm → favesalon-embed}/salon-ranking.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-reviews.entry.js +3 -3
- package/dist/{collection/components/salon-schedules/index.js → favesalon-embed/salon-schedules.entry.js} +14 -95
- package/dist/{esm → favesalon-embed}/salon-services.entry.js +3 -3
- package/dist/{esm → favesalon-embed}/salon-stylists.entry.js +3 -3
- package/dist/{custom-elements/index.js → favesalon-embed/services-55a87166.js} +2465 -7150
- package/dist/{cjs/services-125c82d8.js → favesalon-embed/services-7c46a2fd.js} +2465 -103
- package/dist/{esm/services-40a3e622.js → favesalon-embed/services-7cb8f2a6.js} +2469 -100
- package/dist/favesalon-embed/shadow-css-98135883.js +387 -0
- package/dist/{esm → favesalon-embed}/style-detail.entry.js +4 -4
- package/dist/{esm → favesalon-embed}/user-avatar.entry.js +13 -4
- package/dist/{esm/utils-e97485e0.js → favesalon-embed/utils-2c19db45.js} +6 -0
- package/dist/types/components/chat-box/index.d.ts +12 -0
- package/dist/types/components/chat-button/index.d.ts +0 -8
- package/dist/types/components/chat-form/index.d.ts +6 -0
- package/dist/types/components/chat-messages/index.d.ts +14 -0
- package/dist/types/components/chat-rooms/index.d.ts +12 -0
- package/dist/types/components/user-avatar/index.d.ts +2 -1
- package/dist/types/components.d.ts +84 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/chat-button.cjs.entry.js +0 -118
- package/dist/cjs/colors-38421769.js +0 -69
- package/dist/cjs/favesalon-embed.cjs.js +0 -24
- package/dist/cjs/google-map_5.cjs.entry.js +0 -310
- package/dist/cjs/index-47c2a5f6.js +0 -1533
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -23
- package/dist/cjs/relativeTime-3721080d.js +0 -9
- package/dist/cjs/salon-booking-modal.cjs.entry.js +0 -30
- package/dist/cjs/salon-booking.cjs.entry.js +0 -51
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +0 -29
- package/dist/cjs/salon-gift-card.cjs.entry.js +0 -51
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +0 -97
- package/dist/cjs/salon-lookbook.cjs.entry.js +0 -222
- package/dist/cjs/salon-ranking.cjs.entry.js +0 -60
- package/dist/cjs/salon-reviews.cjs.entry.js +0 -193
- package/dist/cjs/salon-services.cjs.entry.js +0 -81
- package/dist/cjs/salon-stylists.cjs.entry.js +0 -118
- package/dist/cjs/style-detail.cjs.entry.js +0 -312
- package/dist/cjs/user-avatar.cjs.entry.js +0 -45
- package/dist/cjs/utils-c5a33b3c.js +0 -23
- package/dist/collection/collection-manifest.json +0 -29
- package/dist/collection/components/chat-button/index.css +0 -122
- package/dist/collection/components/chat-button/index.js +0 -218
- package/dist/collection/components/chat-conversation/index.js +0 -103
- package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
- package/dist/collection/components/google-map/index.css +0 -5
- package/dist/collection/components/salon-booking/index.css +0 -30
- package/dist/collection/components/salon-booking/index.js +0 -126
- package/dist/collection/components/salon-booking/salon-booking-modal.js +0 -92
- package/dist/collection/components/salon-gift-card/index.css +0 -30
- package/dist/collection/components/salon-gift-card/index.js +0 -126
- package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -73
- package/dist/collection/components/salon-info/index.css +0 -1
- package/dist/collection/components/salon-info/index.js +0 -77
- package/dist/collection/components/salon-latest-reviews/index.css +0 -11
- package/dist/collection/components/salon-latest-reviews/index.js +0 -163
- package/dist/collection/components/salon-latest-styles/index.css +0 -12
- package/dist/collection/components/salon-locations/index.css +0 -24
- package/dist/collection/components/salon-lookbook/index.css +0 -15
- package/dist/collection/components/salon-lookbook/index.js +0 -368
- package/dist/collection/components/salon-ranking/index.css +0 -3
- package/dist/collection/components/salon-ranking/index.js +0 -117
- package/dist/collection/components/salon-reviews/index.css +0 -18
- package/dist/collection/components/salon-reviews/index.js +0 -249
- package/dist/collection/components/salon-schedules/index.css +0 -18
- package/dist/collection/components/salon-services/index.css +0 -1
- package/dist/collection/components/salon-services/index.js +0 -146
- package/dist/collection/components/salon-stylists/index.css +0 -43
- package/dist/collection/components/salon-stylists/index.js +0 -184
- package/dist/collection/components/style-detail/index.css +0 -76
- package/dist/collection/components/style-detail/index.js +0 -386
- package/dist/collection/components/user-avatar/index.css +0 -0
- package/dist/collection/components/user-avatar/index.js +0 -134
- package/dist/collection/constants/colors.js +0 -65
- package/dist/collection/global/global.js +0 -8
- package/dist/collection/index.js +0 -1
- package/dist/collection/mocks/users.js +0 -10
- package/dist/collection/services/services.js +0 -295
- package/dist/collection/types/chat.js +0 -23
- package/dist/collection/types/common.js +0 -11
- package/dist/collection/types/review.js +0 -39
- package/dist/collection/types/salon.js +0 -58
- package/dist/collection/types/service.js +0 -24
- package/dist/collection/types/style.js +0 -128
- package/dist/collection/types/stylist.js +0 -30
- package/dist/collection/types/user.js +0 -10
- package/dist/collection/utils/utils.js +0 -20
- package/dist/esm/chat-button.entry.js +0 -114
- package/dist/esm/favesalon-embed.js +0 -19
- package/dist/esm/google-map_5.entry.js +0 -302
- package/dist/esm/index-3fae868e.js +0 -1506
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -19
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/relativeTime-cd452e6d.js +0 -7
- package/dist/favesalon-embed/p-019c5ccd.entry.js +0 -1
- package/dist/favesalon-embed/p-083a8821.entry.js +0 -1
- package/dist/favesalon-embed/p-0d0ed9ea.entry.js +0 -1
- package/dist/favesalon-embed/p-119db8de.entry.js +0 -1
- package/dist/favesalon-embed/p-1432c51b.entry.js +0 -1
- package/dist/favesalon-embed/p-22093506.entry.js +0 -1
- package/dist/favesalon-embed/p-32b314e9.js +0 -2
- package/dist/favesalon-embed/p-47e646f8.js +0 -1
- package/dist/favesalon-embed/p-4a5eca9a.js +0 -6
- package/dist/favesalon-embed/p-58d2e9be.js +0 -1
- package/dist/favesalon-embed/p-71404b6a.entry.js +0 -1
- package/dist/favesalon-embed/p-857c3a61.entry.js +0 -1
- package/dist/favesalon-embed/p-99ec77f7.entry.js +0 -1
- package/dist/favesalon-embed/p-a33331cc.js +0 -1
- package/dist/favesalon-embed/p-b0c3673a.entry.js +0 -1
- package/dist/favesalon-embed/p-b287b1ea.entry.js +0 -1
- package/dist/favesalon-embed/p-b3af7842.entry.js +0 -1
- package/dist/favesalon-embed/p-b630ae68.js +0 -1580
- package/dist/favesalon-embed/p-ce2c1c9a.entry.js +0 -1
- package/dist/favesalon-embed/p-d6083940.js +0 -1
- package/dist/favesalon-embed/p-d9b7ad58.entry.js +0 -1
- package/dist/favesalon-embed/p-fc9a5551.js +0 -6
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/types/components/chat-conversation/index.d.ts +0 -0
- /package/dist/{esm → favesalon-embed}/colors-ea36347a.js +0 -0
|
@@ -2,12 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
import type { Components, JSX } from "../types/components";
|
|
4
4
|
|
|
5
|
+
interface ChatBox extends Components.ChatBox, HTMLElement {}
|
|
6
|
+
export const ChatBox: {
|
|
7
|
+
prototype: ChatBox;
|
|
8
|
+
new (): ChatBox;
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
interface ChatButton extends Components.ChatButton, HTMLElement {}
|
|
6
12
|
export const ChatButton: {
|
|
7
13
|
prototype: ChatButton;
|
|
8
14
|
new (): ChatButton;
|
|
9
15
|
};
|
|
10
16
|
|
|
17
|
+
interface ChatForm extends Components.ChatForm, HTMLElement {}
|
|
18
|
+
export const ChatForm: {
|
|
19
|
+
prototype: ChatForm;
|
|
20
|
+
new (): ChatForm;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
interface ChatMessages extends Components.ChatMessages, HTMLElement {}
|
|
24
|
+
export const ChatMessages: {
|
|
25
|
+
prototype: ChatMessages;
|
|
26
|
+
new (): ChatMessages;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
interface ChatRooms extends Components.ChatRooms, HTMLElement {}
|
|
30
|
+
export const ChatRooms: {
|
|
31
|
+
prototype: ChatRooms;
|
|
32
|
+
new (): ChatRooms;
|
|
33
|
+
};
|
|
34
|
+
|
|
11
35
|
interface GoogleMap extends Components.GoogleMap, HTMLElement {}
|
|
12
36
|
export const GoogleMap: {
|
|
13
37
|
prototype: GoogleMap;
|
package/dist/{cjs/_commonjsHelpers-5cfcba41.js → favesalon-embed/_commonjsHelpers-9bc404fc.js}
RENAMED
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
2
|
|
|
3
|
+
function getDefaultExportFromCjs (x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
+
}
|
|
6
|
+
|
|
5
7
|
function createCommonjsModule(fn, basedir, module) {
|
|
6
8
|
return module = {
|
|
7
9
|
path: basedir,
|
|
8
10
|
exports: {},
|
|
9
11
|
require: function (path, base) {
|
|
10
|
-
return commonjsRequire();
|
|
12
|
+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
11
13
|
}
|
|
12
14
|
}, fn(module, module.exports), module.exports;
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
18
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
22
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
23
|
+
}
|
|
24
|
+
|
|
15
25
|
function getAugmentedNamespace(n) {
|
|
16
26
|
if (n.__esModule) return n;
|
|
17
27
|
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
@@ -31,6 +41,4 @@ function commonjsRequire () {
|
|
|
31
41
|
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
exports.createCommonjsModule = createCommonjsModule;
|
|
36
|
-
exports.getAugmentedNamespace = getAugmentedNamespace;
|
|
44
|
+
export { commonjsGlobal as a, getAugmentedNamespace as b, createCommonjsModule as c, getDefaultExportFromCjs as g };
|
package/dist/{esm/_commonjsHelpers-098d5b27.js → favesalon-embed/_commonjsHelpers-a4f66ccd.js}
RENAMED
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
2
|
|
|
3
|
+
function getDefaultExportFromCjs (x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
function createCommonjsModule(fn, basedir, module) {
|
|
4
8
|
return module = {
|
|
5
9
|
path: basedir,
|
|
6
10
|
exports: {},
|
|
7
11
|
require: function (path, base) {
|
|
8
|
-
return commonjsRequire();
|
|
12
|
+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
9
13
|
}
|
|
10
14
|
}, fn(module, module.exports), module.exports;
|
|
11
15
|
}
|
|
12
16
|
|
|
17
|
+
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
18
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
22
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
23
|
+
}
|
|
24
|
+
|
|
13
25
|
function getAugmentedNamespace(n) {
|
|
14
26
|
if (n.__esModule) return n;
|
|
15
27
|
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
@@ -29,4 +41,4 @@ function commonjsRequire () {
|
|
|
29
41
|
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
30
42
|
}
|
|
31
43
|
|
|
32
|
-
export { createCommonjsModule as a, commonjsGlobal as c,
|
|
44
|
+
export { createCommonjsModule as a, getAugmentedNamespace as b, commonjsGlobal as c, getDefaultExportFromCjs as g };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import './index-888e99e3.js';
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
4
|
* Bootstrap v5.1.3 (https://getbootstrap.com/)
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
7
7
|
*/
|
|
8
8
|
!function (t, e) { "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).bootstrap = e(); }(undefined, (function () {
|
|
9
|
+
"use strict";
|
|
9
10
|
const t = "transitionend", e = t => { let e = t.getAttribute("data-bs-target"); if (!e || "#" === e) {
|
|
10
11
|
let i = t.getAttribute("href");
|
|
11
12
|
if (!i || !i.includes("#") && !i.startsWith("."))
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
return null; if ("function" == typeof t.getRootNode) {
|
|
17
18
|
const e = t.getRootNode();
|
|
18
19
|
return e instanceof ShadowRoot ? e : null;
|
|
19
|
-
} return t instanceof ShadowRoot ? t : t.parentNode ? h(t.parentNode) : null; }, d = () => { }, u = t => { }, f = () => { const { jQuery: t } = window; return t && !document.body.hasAttribute("data-bs-no-jquery") ? t : null; }, p = [], m = () => "rtl" === document.documentElement.dir, g = t => { var e; e = () => { const e = f(); if (e) {
|
|
20
|
+
} return t instanceof ShadowRoot ? t : t.parentNode ? h(t.parentNode) : null; }, d = () => { }, u = t => { t.offsetHeight; }, f = () => { const { jQuery: t } = window; return t && !document.body.hasAttribute("data-bs-no-jquery") ? t : null; }, p = [], m = () => "rtl" === document.documentElement.dir, g = t => { var e; e = () => { const e = f(); if (e) {
|
|
20
21
|
const i = t.NAME, n = e.fn[i];
|
|
21
22
|
e.fn[i] = t.jQueryInterface, e.fn[i].Constructor = t, e.fn[i].noConflict = () => (e.fn[i] = n, t.jQueryInterface);
|
|
22
23
|
} }, "loading" === document.readyState ? (p.length || document.addEventListener("DOMContentLoaded", (() => { p.forEach((t => t())); })), p.push(e)) : e(); }, _ = t => { "function" == typeof t && t(); }, b = (e, i, n = !0) => { if (!n)
|
|
@@ -144,7 +145,7 @@
|
|
|
144
145
|
return; if (this._triggerSlideEvent(o, d).defaultPrevented)
|
|
145
146
|
return; if (!n || !o)
|
|
146
147
|
return; this._isSliding = !0, a && this.pause(), this._setActiveIndicatorElement(o), this._activeElement = o; const f = () => { j.trigger(this._element, et, { relatedTarget: o, direction: d, from: s, to: r }); }; if (this._element.classList.contains("slide")) {
|
|
147
|
-
o.classList.add(h), n.classList.add(c), o.classList.add(c);
|
|
148
|
+
o.classList.add(h), u(o), n.classList.add(c), o.classList.add(c);
|
|
148
149
|
const t = () => { o.classList.remove(c, h), o.classList.add(it), n.classList.remove(it, h, c), this._isSliding = !1, setTimeout(f, 0); };
|
|
149
150
|
this._queueCallback(t, n, !0);
|
|
150
151
|
}
|
|
@@ -188,7 +189,7 @@
|
|
|
188
189
|
return; e.forEach((e => { i !== e && pt.getOrCreateInstance(e, { toggle: !1 }).hide(), t || H.set(e, "bs.collapse", null); })); const n = this._getDimension(); this._element.classList.remove(ct), this._element.classList.add(ht), this._element.style[n] = 0, this._addAriaAndCollapsedClass(this._triggerArray, !0), this._isTransitioning = !0; const s = `scroll${n[0].toUpperCase() + n.slice(1)}`; this._queueCallback((() => { this._isTransitioning = !1, this._element.classList.remove(ht), this._element.classList.add(ct, lt), this._element.style[n] = "", j.trigger(this._element, "shown.bs.collapse"); }), this._element, !0), this._element.style[n] = `${this._element[s]}px`; }
|
|
189
190
|
hide() { if (this._isTransitioning || !this._isShown())
|
|
190
191
|
return; if (j.trigger(this._element, "hide.bs.collapse").defaultPrevented)
|
|
191
|
-
return; const t = this._getDimension(); this._element.style[t] = `${this._element.getBoundingClientRect()[t]}px`, this._element.classList.add(ht), this._element.classList.remove(ct, lt); const e = this._triggerArray.length; for (let t = 0; t < e; t++) {
|
|
192
|
+
return; const t = this._getDimension(); this._element.style[t] = `${this._element.getBoundingClientRect()[t]}px`, u(this._element), this._element.classList.add(ht), this._element.classList.remove(ct, lt); const e = this._triggerArray.length; for (let t = 0; t < e; t++) {
|
|
192
193
|
const e = this._triggerArray[t], i = n(e);
|
|
193
194
|
i && !this._isShown(i) && this._addAriaAndCollapsedClass([e], !1);
|
|
194
195
|
} this._isTransitioning = !0, this._element.style[t] = "", this._queueCallback((() => { this._isTransitioning = !1, this._element.classList.remove(ht), this._element.classList.add(ct), j.trigger(this._element, "hidden.bs.collapse"); }), this._element, !0); }
|
|
@@ -333,7 +334,7 @@
|
|
|
333
334
|
}
|
|
334
335
|
e.modifiersData[n] = C;
|
|
335
336
|
} }, requiresIfExists: ["offset"] };
|
|
336
|
-
function Me(t, e, i) { void 0 === i && (i = !1); var n = zt(e); zt(e) && function (t) { t.getBoundingClientRect(); }(e); var s, o, r = Gt(e), a = Vt(t), l = { scrollLeft: 0, scrollTop: 0 }, c = { x: 0, y: 0 }; return (n || !n && !i) && (("body" !== Rt(e) || we(r)) && (l = (s = e) !== Wt(s) && zt(s) ? { scrollLeft: (o = s).scrollLeft, scrollTop: o.scrollTop } : ve(s)), zt(e) ? ((c = Vt(e)).x += e.clientLeft, c.y += e.clientTop) : r && (c.x = ye(r))), { x: a.left + l.scrollLeft - c.x, y: a.top + l.scrollTop - c.y, width: a.width, height: a.height }; }
|
|
337
|
+
function Me(t, e, i) { void 0 === i && (i = !1); var n = zt(e); zt(e) && function (t) { var e = t.getBoundingClientRect(); e.width, t.offsetWidth, e.height, t.offsetHeight; }(e); var s, o, r = Gt(e), a = Vt(t), l = { scrollLeft: 0, scrollTop: 0 }, c = { x: 0, y: 0 }; return (n || !n && !i) && (("body" !== Rt(e) || we(r)) && (l = (s = e) !== Wt(s) && zt(s) ? { scrollLeft: (o = s).scrollLeft, scrollTop: o.scrollTop } : ve(s)), zt(e) ? ((c = Vt(e)).x += e.clientLeft, c.y += e.clientTop) : r && (c.x = ye(r))), { x: a.left + l.scrollLeft - c.x, y: a.top + l.scrollTop - c.y, width: a.width, height: a.height }; }
|
|
337
338
|
function He(t) { var e = new Map, i = new Set, n = []; function s(t) { i.add(t.name), [].concat(t.requires || [], t.requiresIfExists || []).forEach((function (t) { if (!i.has(t)) {
|
|
338
339
|
var n = e.get(t);
|
|
339
340
|
n && s(n);
|
|
@@ -471,7 +472,7 @@
|
|
|
471
472
|
_initializeBackDrop() { return new bi({ isVisible: Boolean(this._config.backdrop), isAnimated: this._isAnimated() }); }
|
|
472
473
|
_initializeFocusTrap() { return new Ai({ trapElement: this._element }); }
|
|
473
474
|
_getConfig(t) { return t = Object.assign(Object.assign(Object.assign({}, Ci), U.getDataAttributes(this._element)), "object" == typeof t ? t : {}), a(Ti, t, ki), t; }
|
|
474
|
-
_showElement(t) { const e = this._isAnimated(), i = V.findOne(".modal-body", this._dialog); this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE || document.body.append(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.scrollTop = 0, i && (i.scrollTop = 0), this._element.classList.add(ji), this._queueCallback((() => { this._config.focus && this._focustrap.activate(), this._isTransitioning = !1, j.trigger(this._element, "shown.bs.modal", { relatedTarget: t }); }), this._dialog, e); }
|
|
475
|
+
_showElement(t) { const e = this._isAnimated(), i = V.findOne(".modal-body", this._dialog); this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE || document.body.append(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.scrollTop = 0, i && (i.scrollTop = 0), e && u(this._element), this._element.classList.add(ji), this._queueCallback((() => { this._config.focus && this._focustrap.activate(), this._isTransitioning = !1, j.trigger(this._element, "shown.bs.modal", { relatedTarget: t }); }), this._dialog, e); }
|
|
475
476
|
_setEscapeEvent() { this._isShown ? j.on(this._element, Ni, (t => { this._config.keyboard && t.key === Oi ? (t.preventDefault(), this.hide()) : this._config.keyboard || t.key !== Oi || this._triggerBackdropTransition(); })) : j.off(this._element, Ni); }
|
|
476
477
|
_setResizeEvent() { this._isShown ? j.on(window, Di, (() => this._adjustDialog())) : j.off(window, Di); }
|
|
477
478
|
_hideModal() { this._element.style.display = "none", this._element.setAttribute("aria-hidden", !0), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._isTransitioning = !1, this._backdrop.hide((() => { document.body.classList.remove(Pi), this._resetAdjustments(), this._scrollBar.reset(), j.trigger(this._element, Li); })); }
|
|
@@ -662,7 +663,7 @@
|
|
|
662
663
|
e.classList.remove(Tn);
|
|
663
664
|
const t = V.findOne(":scope > .dropdown-menu .active", e.parentNode);
|
|
664
665
|
t && t.classList.remove(Tn), "tab" === e.getAttribute("role") && e.setAttribute("aria-selected", !1);
|
|
665
|
-
} t.classList.add(Tn), "tab" === t.getAttribute("role") && t.setAttribute("aria-selected", !0), t.classList.contains(On) && t.classList.add(Cn); let n = t.parentNode; if (n && "LI" === n.nodeName && (n = n.parentNode), n && n.classList.contains("dropdown-menu")) {
|
|
666
|
+
} t.classList.add(Tn), "tab" === t.getAttribute("role") && t.setAttribute("aria-selected", !0), u(t), t.classList.contains(On) && t.classList.add(Cn); let n = t.parentNode; if (n && "LI" === n.nodeName && (n = n.parentNode), n && n.classList.contains("dropdown-menu")) {
|
|
666
667
|
const e = t.closest(".dropdown");
|
|
667
668
|
e && V.find(".dropdown-toggle", e).forEach((t => t.classList.add(Tn))), t.setAttribute("aria-expanded", !0);
|
|
668
669
|
} i && i(); }
|
|
@@ -679,7 +680,7 @@
|
|
|
679
680
|
static get DefaultType() { return Pn; }
|
|
680
681
|
static get Default() { return jn; }
|
|
681
682
|
static get NAME() { return Dn; }
|
|
682
|
-
show() { j.trigger(this._element, "show.bs.toast").defaultPrevented || (this._clearTimeout(), this._config.animation && this._element.classList.add("fade"), this._element.classList.remove(Sn), this._element.classList.add(Nn), this._element.classList.add(In), this._queueCallback((() => { this._element.classList.remove(In), j.trigger(this._element, "shown.bs.toast"), this._maybeScheduleHide(); }), this._element, this._config.animation)); }
|
|
683
|
+
show() { j.trigger(this._element, "show.bs.toast").defaultPrevented || (this._clearTimeout(), this._config.animation && this._element.classList.add("fade"), this._element.classList.remove(Sn), u(this._element), this._element.classList.add(Nn), this._element.classList.add(In), this._queueCallback((() => { this._element.classList.remove(In), j.trigger(this._element, "shown.bs.toast"), this._maybeScheduleHide(); }), this._element, this._config.animation)); }
|
|
683
684
|
hide() { this._element.classList.contains(Nn) && (j.trigger(this._element, "hide.bs.toast").defaultPrevented || (this._element.classList.add(In), this._queueCallback((() => { this._element.classList.add(Sn), this._element.classList.remove(In), this._element.classList.remove(Nn), j.trigger(this._element, "hidden.bs.toast"); }), this._element, this._config.animation))); }
|
|
684
685
|
dispose() { this._clearTimeout(), this._element.classList.contains(Nn) && this._element.classList.remove(Nn), super.dispose(); }
|
|
685
686
|
_getConfig(t) { return t = Object.assign(Object.assign(Object.assign({}, jn), U.getDataAttributes(this._element)), "object" == typeof t && t ? t : {}), a(Dn, t, this.constructor.DefaultType), t; }
|
|
@@ -703,3 +704,9 @@
|
|
|
703
704
|
}
|
|
704
705
|
return R(Mn), g(Mn), { Alert: W, Button: z, Carousel: st, Collapse: pt, Dropdown: hi, Modal: Hi, Offcanvas: Fi, Popover: gn, ScrollSpy: An, Tab: xn, Toast: Mn, Tooltip: un };
|
|
705
706
|
}));
|
|
707
|
+
|
|
708
|
+
const globalFn = () => { };
|
|
709
|
+
|
|
710
|
+
const globalScripts = globalFn;
|
|
711
|
+
|
|
712
|
+
export { globalScripts as g };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import './index-04c09911.js';
|
|
2
|
+
|
|
1
3
|
/*!
|
|
2
4
|
* Bootstrap v5.1.3 (https://getbootstrap.com/)
|
|
3
5
|
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
4
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5
7
|
*/
|
|
6
8
|
!function (t, e) { "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).bootstrap = e(); }(undefined, (function () {
|
|
9
|
+
"use strict";
|
|
7
10
|
const t = "transitionend", e = t => { let e = t.getAttribute("data-bs-target"); if (!e || "#" === e) {
|
|
8
11
|
let i = t.getAttribute("href");
|
|
9
12
|
if (!i || !i.includes("#") && !i.startsWith("."))
|
|
@@ -14,7 +17,7 @@
|
|
|
14
17
|
return null; if ("function" == typeof t.getRootNode) {
|
|
15
18
|
const e = t.getRootNode();
|
|
16
19
|
return e instanceof ShadowRoot ? e : null;
|
|
17
|
-
} return t instanceof ShadowRoot ? t : t.parentNode ? h(t.parentNode) : null; }, d = () => { }, u = t => { }, f = () => { const { jQuery: t } = window; return t && !document.body.hasAttribute("data-bs-no-jquery") ? t : null; }, p = [], m = () => "rtl" === document.documentElement.dir, g = t => { var e; e = () => { const e = f(); if (e) {
|
|
20
|
+
} return t instanceof ShadowRoot ? t : t.parentNode ? h(t.parentNode) : null; }, d = () => { }, u = t => { t.offsetHeight; }, f = () => { const { jQuery: t } = window; return t && !document.body.hasAttribute("data-bs-no-jquery") ? t : null; }, p = [], m = () => "rtl" === document.documentElement.dir, g = t => { var e; e = () => { const e = f(); if (e) {
|
|
18
21
|
const i = t.NAME, n = e.fn[i];
|
|
19
22
|
e.fn[i] = t.jQueryInterface, e.fn[i].Constructor = t, e.fn[i].noConflict = () => (e.fn[i] = n, t.jQueryInterface);
|
|
20
23
|
} }, "loading" === document.readyState ? (p.length || document.addEventListener("DOMContentLoaded", (() => { p.forEach((t => t())); })), p.push(e)) : e(); }, _ = t => { "function" == typeof t && t(); }, b = (e, i, n = !0) => { if (!n)
|
|
@@ -142,7 +145,7 @@
|
|
|
142
145
|
return; if (this._triggerSlideEvent(o, d).defaultPrevented)
|
|
143
146
|
return; if (!n || !o)
|
|
144
147
|
return; this._isSliding = !0, a && this.pause(), this._setActiveIndicatorElement(o), this._activeElement = o; const f = () => { j.trigger(this._element, et, { relatedTarget: o, direction: d, from: s, to: r }); }; if (this._element.classList.contains("slide")) {
|
|
145
|
-
o.classList.add(h), n.classList.add(c), o.classList.add(c);
|
|
148
|
+
o.classList.add(h), u(o), n.classList.add(c), o.classList.add(c);
|
|
146
149
|
const t = () => { o.classList.remove(c, h), o.classList.add(it), n.classList.remove(it, h, c), this._isSliding = !1, setTimeout(f, 0); };
|
|
147
150
|
this._queueCallback(t, n, !0);
|
|
148
151
|
}
|
|
@@ -186,7 +189,7 @@
|
|
|
186
189
|
return; e.forEach((e => { i !== e && pt.getOrCreateInstance(e, { toggle: !1 }).hide(), t || H.set(e, "bs.collapse", null); })); const n = this._getDimension(); this._element.classList.remove(ct), this._element.classList.add(ht), this._element.style[n] = 0, this._addAriaAndCollapsedClass(this._triggerArray, !0), this._isTransitioning = !0; const s = `scroll${n[0].toUpperCase() + n.slice(1)}`; this._queueCallback((() => { this._isTransitioning = !1, this._element.classList.remove(ht), this._element.classList.add(ct, lt), this._element.style[n] = "", j.trigger(this._element, "shown.bs.collapse"); }), this._element, !0), this._element.style[n] = `${this._element[s]}px`; }
|
|
187
190
|
hide() { if (this._isTransitioning || !this._isShown())
|
|
188
191
|
return; if (j.trigger(this._element, "hide.bs.collapse").defaultPrevented)
|
|
189
|
-
return; const t = this._getDimension(); this._element.style[t] = `${this._element.getBoundingClientRect()[t]}px`, this._element.classList.add(ht), this._element.classList.remove(ct, lt); const e = this._triggerArray.length; for (let t = 0; t < e; t++) {
|
|
192
|
+
return; const t = this._getDimension(); this._element.style[t] = `${this._element.getBoundingClientRect()[t]}px`, u(this._element), this._element.classList.add(ht), this._element.classList.remove(ct, lt); const e = this._triggerArray.length; for (let t = 0; t < e; t++) {
|
|
190
193
|
const e = this._triggerArray[t], i = n(e);
|
|
191
194
|
i && !this._isShown(i) && this._addAriaAndCollapsedClass([e], !1);
|
|
192
195
|
} this._isTransitioning = !0, this._element.style[t] = "", this._queueCallback((() => { this._isTransitioning = !1, this._element.classList.remove(ht), this._element.classList.add(ct), j.trigger(this._element, "hidden.bs.collapse"); }), this._element, !0); }
|
|
@@ -331,7 +334,7 @@
|
|
|
331
334
|
}
|
|
332
335
|
e.modifiersData[n] = C;
|
|
333
336
|
} }, requiresIfExists: ["offset"] };
|
|
334
|
-
function Me(t, e, i) { void 0 === i && (i = !1); var n = zt(e); zt(e) && function (t) { t.getBoundingClientRect(); }(e); var s, o, r = Gt(e), a = Vt(t), l = { scrollLeft: 0, scrollTop: 0 }, c = { x: 0, y: 0 }; return (n || !n && !i) && (("body" !== Rt(e) || we(r)) && (l = (s = e) !== Wt(s) && zt(s) ? { scrollLeft: (o = s).scrollLeft, scrollTop: o.scrollTop } : ve(s)), zt(e) ? ((c = Vt(e)).x += e.clientLeft, c.y += e.clientTop) : r && (c.x = ye(r))), { x: a.left + l.scrollLeft - c.x, y: a.top + l.scrollTop - c.y, width: a.width, height: a.height }; }
|
|
337
|
+
function Me(t, e, i) { void 0 === i && (i = !1); var n = zt(e); zt(e) && function (t) { var e = t.getBoundingClientRect(); e.width, t.offsetWidth, e.height, t.offsetHeight; }(e); var s, o, r = Gt(e), a = Vt(t), l = { scrollLeft: 0, scrollTop: 0 }, c = { x: 0, y: 0 }; return (n || !n && !i) && (("body" !== Rt(e) || we(r)) && (l = (s = e) !== Wt(s) && zt(s) ? { scrollLeft: (o = s).scrollLeft, scrollTop: o.scrollTop } : ve(s)), zt(e) ? ((c = Vt(e)).x += e.clientLeft, c.y += e.clientTop) : r && (c.x = ye(r))), { x: a.left + l.scrollLeft - c.x, y: a.top + l.scrollTop - c.y, width: a.width, height: a.height }; }
|
|
335
338
|
function He(t) { var e = new Map, i = new Set, n = []; function s(t) { i.add(t.name), [].concat(t.requires || [], t.requiresIfExists || []).forEach((function (t) { if (!i.has(t)) {
|
|
336
339
|
var n = e.get(t);
|
|
337
340
|
n && s(n);
|
|
@@ -469,7 +472,7 @@
|
|
|
469
472
|
_initializeBackDrop() { return new bi({ isVisible: Boolean(this._config.backdrop), isAnimated: this._isAnimated() }); }
|
|
470
473
|
_initializeFocusTrap() { return new Ai({ trapElement: this._element }); }
|
|
471
474
|
_getConfig(t) { return t = Object.assign(Object.assign(Object.assign({}, Ci), U.getDataAttributes(this._element)), "object" == typeof t ? t : {}), a(Ti, t, ki), t; }
|
|
472
|
-
_showElement(t) { const e = this._isAnimated(), i = V.findOne(".modal-body", this._dialog); this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE || document.body.append(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.scrollTop = 0, i && (i.scrollTop = 0), this._element.classList.add(ji), this._queueCallback((() => { this._config.focus && this._focustrap.activate(), this._isTransitioning = !1, j.trigger(this._element, "shown.bs.modal", { relatedTarget: t }); }), this._dialog, e); }
|
|
475
|
+
_showElement(t) { const e = this._isAnimated(), i = V.findOne(".modal-body", this._dialog); this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE || document.body.append(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.scrollTop = 0, i && (i.scrollTop = 0), e && u(this._element), this._element.classList.add(ji), this._queueCallback((() => { this._config.focus && this._focustrap.activate(), this._isTransitioning = !1, j.trigger(this._element, "shown.bs.modal", { relatedTarget: t }); }), this._dialog, e); }
|
|
473
476
|
_setEscapeEvent() { this._isShown ? j.on(this._element, Ni, (t => { this._config.keyboard && t.key === Oi ? (t.preventDefault(), this.hide()) : this._config.keyboard || t.key !== Oi || this._triggerBackdropTransition(); })) : j.off(this._element, Ni); }
|
|
474
477
|
_setResizeEvent() { this._isShown ? j.on(window, Di, (() => this._adjustDialog())) : j.off(window, Di); }
|
|
475
478
|
_hideModal() { this._element.style.display = "none", this._element.setAttribute("aria-hidden", !0), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._isTransitioning = !1, this._backdrop.hide((() => { document.body.classList.remove(Pi), this._resetAdjustments(), this._scrollBar.reset(), j.trigger(this._element, Li); })); }
|
|
@@ -660,7 +663,7 @@
|
|
|
660
663
|
e.classList.remove(Tn);
|
|
661
664
|
const t = V.findOne(":scope > .dropdown-menu .active", e.parentNode);
|
|
662
665
|
t && t.classList.remove(Tn), "tab" === e.getAttribute("role") && e.setAttribute("aria-selected", !1);
|
|
663
|
-
} t.classList.add(Tn), "tab" === t.getAttribute("role") && t.setAttribute("aria-selected", !0), t.classList.contains(On) && t.classList.add(Cn); let n = t.parentNode; if (n && "LI" === n.nodeName && (n = n.parentNode), n && n.classList.contains("dropdown-menu")) {
|
|
666
|
+
} t.classList.add(Tn), "tab" === t.getAttribute("role") && t.setAttribute("aria-selected", !0), u(t), t.classList.contains(On) && t.classList.add(Cn); let n = t.parentNode; if (n && "LI" === n.nodeName && (n = n.parentNode), n && n.classList.contains("dropdown-menu")) {
|
|
664
667
|
const e = t.closest(".dropdown");
|
|
665
668
|
e && V.find(".dropdown-toggle", e).forEach((t => t.classList.add(Tn))), t.setAttribute("aria-expanded", !0);
|
|
666
669
|
} i && i(); }
|
|
@@ -677,7 +680,7 @@
|
|
|
677
680
|
static get DefaultType() { return Pn; }
|
|
678
681
|
static get Default() { return jn; }
|
|
679
682
|
static get NAME() { return Dn; }
|
|
680
|
-
show() { j.trigger(this._element, "show.bs.toast").defaultPrevented || (this._clearTimeout(), this._config.animation && this._element.classList.add("fade"), this._element.classList.remove(Sn), this._element.classList.add(Nn), this._element.classList.add(In), this._queueCallback((() => { this._element.classList.remove(In), j.trigger(this._element, "shown.bs.toast"), this._maybeScheduleHide(); }), this._element, this._config.animation)); }
|
|
683
|
+
show() { j.trigger(this._element, "show.bs.toast").defaultPrevented || (this._clearTimeout(), this._config.animation && this._element.classList.add("fade"), this._element.classList.remove(Sn), u(this._element), this._element.classList.add(Nn), this._element.classList.add(In), this._queueCallback((() => { this._element.classList.remove(In), j.trigger(this._element, "shown.bs.toast"), this._maybeScheduleHide(); }), this._element, this._config.animation)); }
|
|
681
684
|
hide() { this._element.classList.contains(Nn) && (j.trigger(this._element, "hide.bs.toast").defaultPrevented || (this._element.classList.add(In), this._queueCallback((() => { this._element.classList.add(Sn), this._element.classList.remove(In), this._element.classList.remove(Nn), j.trigger(this._element, "hidden.bs.toast"); }), this._element, this._config.animation))); }
|
|
682
685
|
dispose() { this._clearTimeout(), this._element.classList.contains(Nn) && this._element.classList.remove(Nn), super.dispose(); }
|
|
683
686
|
_getConfig(t) { return t = Object.assign(Object.assign(Object.assign({}, jn), U.getDataAttributes(this._element)), "object" == typeof t && t ? t : {}), a(Dn, t, this.constructor.DefaultType), t; }
|
|
@@ -701,3 +704,9 @@
|
|
|
701
704
|
}
|
|
702
705
|
return R(Mn), g(Mn), { Alert: W, Button: z, Carousel: st, Collapse: pt, Dropdown: hi, Modal: Hi, Offcanvas: Fi, Popover: gn, ScrollSpy: An, Tab: xn, Toast: Mn, Tooltip: un };
|
|
703
706
|
}));
|
|
707
|
+
|
|
708
|
+
const globalFn = () => { };
|
|
709
|
+
|
|
710
|
+
const globalScripts = globalFn;
|
|
711
|
+
|
|
712
|
+
export { globalScripts as g };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
+
import { H as HttpService } from './services-7c46a2fd.js';
|
|
4
|
+
import './_commonjsHelpers-a4f66ccd.js';
|
|
5
|
+
|
|
6
|
+
const indexCss = ".chat-widget,.chat-widget--sidebar,.chat-widget--content{display:flex;height:100%;width:100%}.chat-widget{position:relative}.chat-widget--sidebar,.chat-widget--content{background-color:#fff;border:1px solid #EFEFEF;position:absolute;inset:0;flex-direction:column}.chat-widget .chat-widget--sidebar{z-index:10}.chat-widget .chat-widget--content{z-index:5}.chat-widget.has-chat-room .chat-widget--content{z-index:10}.chat-widget--content-header{background-color:#001529;border-bottom:1px solid #EFEFEF;display:flex;align-items:center;justify-content:space-between;padding:16px}.chat-widget--content-title{font-size:20px;font-weight:600;line-height:1;margin:0}.chat-widget--content-close{border:1px solid #fff;cursor:pointer;display:block;position:absolute;z-index:1000;top:50%;right:0;width:30px;height:30px;transform:translate(0, -50%);-moz-border-radius:30px;-webkit-border-radius:30px;border-radius:30px;background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==')}@media (min-width: 992px){.chat-widget--sidebar,.chat-widget--content{position:static;width:auto;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.chat-widget--sidebar{min-width:320px;max-width:320px;margin-right:24px}.chat-widget--content{flex-grow:1;flex-shrink:1}.chat-rooms--search,.chat-widget--content-header{-moz-border-radius:8px 8px 0 0;-webkit-border-radius:8px 8px 0 0;border-radius:8px 8px 0 0}}";
|
|
7
|
+
|
|
8
|
+
const ChatBox = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.onClickRoom = (chatRoom) => {
|
|
12
|
+
this.activeRoom = chatRoom;
|
|
13
|
+
};
|
|
14
|
+
this.primaryColor = undefined;
|
|
15
|
+
this.accessToken = undefined;
|
|
16
|
+
this.senderId = undefined;
|
|
17
|
+
this.chatRooms = undefined;
|
|
18
|
+
this.activeRoom = undefined;
|
|
19
|
+
}
|
|
20
|
+
componentWillLoad() {
|
|
21
|
+
this.fetchData();
|
|
22
|
+
}
|
|
23
|
+
async fetchData() {
|
|
24
|
+
try {
|
|
25
|
+
this.chatRooms = await HttpService().fetchChatRooms(this.accessToken);
|
|
26
|
+
(this.chatRooms || []).forEach((chatRoom) => {
|
|
27
|
+
HttpService().fetchChatMessages(chatRoom.uid, (messages) => {
|
|
28
|
+
this.chatRooms = [...(this.chatRooms || [])].map((room) => {
|
|
29
|
+
if (chatRoom.uid === room.uid) {
|
|
30
|
+
room.messages = messages;
|
|
31
|
+
}
|
|
32
|
+
return room;
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
this.chatRooms = [];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
const senderInfo = this.activeRoom ? (this.activeRoom.members || []).find(user => user.id === Number(this.senderId)) : null;
|
|
43
|
+
const receiverInfo = this.activeRoom ? (this.activeRoom.members || []).find(user => user.id !== Number(this.senderId)) : null;
|
|
44
|
+
return (h("div", { class: `chat-widget ${this.activeRoom ? 'has-chat-room' : ''}` }, h("div", { class: "chat-widget--sidebar" }, h("chat-rooms", { "sender-id": Number(this.senderId), activeRoom: this.activeRoom, chatRooms: this.chatRooms, onClickRoom: this.onClickRoom })), h("div", { class: "chat-widget--content" }, receiverInfo && (h("div", { class: "chat-widget--content-header" }, h("user-avatar", { size: 40, avatar: receiverInfo.avatar, name: h("div", { class: "chat-room--user-name", style: { color: '#fff' } }, receiverInfo.fullName), shortName: String(receiverInfo.fullName || '').charAt(0) }), h("div", { style: { position: 'relative' } }, h("div", { class: "chat-widget--content-close", onClick: () => this.onClickRoom(null) })))), h("div", { style: {
|
|
45
|
+
flexShrink: '1',
|
|
46
|
+
flexGrow: '1',
|
|
47
|
+
overflowY: 'auto',
|
|
48
|
+
padding: '16px',
|
|
49
|
+
} }, this.activeRoom && (h("chat-messages", { sender: senderInfo, receiver: receiverInfo, messages: this.activeRoom.messages || [], "chat-room-id": this.activeRoom.uid })), !this.activeRoom && (h("div", { style: { paddingTop: '72px', textAlign: 'center' } }, h("div", { class: "chat-widget--content-title" }, "Welcome back!"), h("div", { style: { marginTop: "12px" } }, "Select any user in left hand side to get started.")))), this.activeRoom && (h("div", { style: { borderTop: `1px solid ${Colors.Gray02}` } }, h("chat-form", { "sender-id": Number(senderInfo.id), "chat-room-id": this.activeRoom.uid }))))));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
ChatBox.style = indexCss;
|
|
53
|
+
|
|
54
|
+
export { ChatBox as chat_box };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
+
import { H as HttpService } from './services-7c46a2fd.js';
|
|
4
|
+
import './_commonjsHelpers-a4f66ccd.js';
|
|
5
|
+
|
|
6
|
+
const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'); chat-button{position:relative}.chat-button--indicator{cursor:pointer;position:absolute;inset:0}.chat-button--counter{background-color:rgb(240, 90, 97);border:1px solid rgb(255, 255, 255);position:absolute;right:6px;top:0px;height:8px;width:8px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.chat-box{font-family:'Roboto', sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#fff;display:flex;flex-direction:column;position:fixed;inset:0px;z-index:20000;font-size:16px;text-align:left;color:#141414}.chat-box--header{display:flex;justify-content:space-between;padding:16px;position:relative}.chat-box--title{color:#fff;font-size:20px;font-weight:600;line-height:1;display:flex;align-items:center;justify-content:space-between;margin:0}.chat-box--close{cursor:pointer;display:block;position:absolute;z-index:1000;top:50%;right:0;width:30px;height:30px;transform:translate(0, -50%);background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==')}@media (min-width: 768px){.chat-box{border:1px solid #fff;left:unset;top:unset;right:1px;bottom:0px;height:420px;max-height:90vh;width:600px;-moz-border-radius:8px 8px 0px 0px;-webkit-border-radius:8px 8px 0px 0px;border-radius:8px 8px 0px 0px;-moz-box-shadow:rgba(0, 0, 0, 0.1) 0px 0px 24px;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0px 0px 24px;box-shadow:rgba(0, 0, 0, 0.1) 0px 0px 24px}.chat-box--header{-moz-border-radius:8px 8px 0px 0px;-webkit-border-radius:8px 8px 0px 0px;border-radius:8px 8px 0px 0px}}";
|
|
7
|
+
|
|
8
|
+
const ChatButton = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.primaryColor = undefined;
|
|
12
|
+
this.accessToken = undefined;
|
|
13
|
+
this.senderId = undefined;
|
|
14
|
+
this.receiverId = undefined;
|
|
15
|
+
this.senderInfo = {};
|
|
16
|
+
this.receiverInfo = {};
|
|
17
|
+
this.chatRoom = {};
|
|
18
|
+
this.chatMessages = undefined;
|
|
19
|
+
this.isChatExpanded = undefined;
|
|
20
|
+
}
|
|
21
|
+
componentWillLoad() {
|
|
22
|
+
this.fetchData();
|
|
23
|
+
}
|
|
24
|
+
async fetchData() {
|
|
25
|
+
try {
|
|
26
|
+
this.chatRoom = await HttpService().createChatRoom(this.receiverId, this.accessToken);
|
|
27
|
+
if (this.chatRoom) {
|
|
28
|
+
HttpService().fetchChatMessages(this.chatRoom.uid, (messages) => this.chatMessages = messages);
|
|
29
|
+
this.senderInfo = this.chatRoom.members.find(user => user.id === Number(this.senderId));
|
|
30
|
+
this.receiverInfo = this.chatRoom.members.find(user => user.id === Number(this.receiverId));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (e) { }
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
const unreadMessages = (this.chatMessages || []).filter(message => {
|
|
37
|
+
return Boolean(message.unRead) && message.senderId !== this.senderInfo.id;
|
|
38
|
+
});
|
|
39
|
+
return (h("div", null, h("div", { class: "chat-button--indicator", onClick: () => this.isChatExpanded = true }, unreadMessages.length > 0 && h("span", { class: "chat-button--counter" })), h("div", { class: "chat-box", style: this.isChatExpanded ? {} : { display: 'none' } }, h("div", { class: "chat-box--header", style: {
|
|
40
|
+
backgroundColor: this.primaryColor || '#f05a61',
|
|
41
|
+
} }, h("h3", { class: "chat-box--title" }, "Chat"), h("div", { style: { position: 'relative' } }, h("div", { class: "chat-box--close", onClick: () => this.isChatExpanded = false }))), h("div", { style: {
|
|
42
|
+
flexShrink: '1',
|
|
43
|
+
flexGrow: '1',
|
|
44
|
+
overflowY: 'auto',
|
|
45
|
+
padding: '16px',
|
|
46
|
+
} }, h("chat-messages", { sender: this.senderInfo, receiver: this.receiverInfo, messages: this.chatMessages || [], "chat-room-id": this.chatRoom.uid })), h("div", { style: { borderTop: `1px solid ${Colors.Gray02}` } }, h("chat-form", { "sender-id": this.senderInfo.id ? Number(this.senderInfo.id) : null, "chat-room-id": this.chatRoom.uid })))));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
ChatButton.style = indexCss;
|
|
50
|
+
|
|
51
|
+
export { ChatButton as chat_button };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
+
import { H as HttpService } from './services-7c46a2fd.js';
|
|
3
|
+
import './_commonjsHelpers-a4f66ccd.js';
|
|
4
|
+
import './colors-ea36347a.js';
|
|
5
|
+
|
|
6
|
+
const indexCss = ".chat-form{display:flex;height:56px;width:100%}.chat-form #chat-form--input{border:none;outline:none;flex-shrink:1;flex-grow:1;height:100%;font-size:16px;padding-left:16px;padding-right:16px;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.chat-form>button{background-color:#001529;border:none;color:#fff;font-size:16px;min-width:80px;height:42px;margin:7px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}.chat-form>button:hover,.chat-form>button:focus,.chat-form>button:active{background-color:#001529}";
|
|
7
|
+
|
|
8
|
+
const ChatForm = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.onSubmitMessage = async () => {
|
|
12
|
+
try {
|
|
13
|
+
const elNewMessage = document.getElementById('chat-form--input');
|
|
14
|
+
if (!!elNewMessage.value) {
|
|
15
|
+
await HttpService().sendChatMessage({
|
|
16
|
+
message: elNewMessage.value,
|
|
17
|
+
senderId: this.senderId,
|
|
18
|
+
chatRoomId: this.chatRoomId,
|
|
19
|
+
});
|
|
20
|
+
elNewMessage.value = '';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
catch (error) { }
|
|
24
|
+
};
|
|
25
|
+
this.senderId = undefined;
|
|
26
|
+
this.chatRoomId = undefined;
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
return (h("div", { class: "chat-form" }, h("input", { id: "chat-form--input", type: "text", placeholder: "Enter a message...", onKeyPress: (evt) => {
|
|
30
|
+
if (evt.key === 'Enter') {
|
|
31
|
+
evt.preventDefault();
|
|
32
|
+
this.onSubmitMessage();
|
|
33
|
+
}
|
|
34
|
+
} }), h("button", { type: "button", onClick: () => this.onSubmitMessage() }, "Send")));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
ChatForm.style = indexCss;
|
|
38
|
+
|
|
39
|
+
export { ChatForm as chat_form };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
+
import { d as dayjs_min, H as HttpService, b as dateFormat } from './services-7c46a2fd.js';
|
|
3
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
4
|
+
import { r as relativeTime } from './relativeTime-268e64b0.js';
|
|
5
|
+
import './_commonjsHelpers-a4f66ccd.js';
|
|
6
|
+
|
|
7
|
+
const indexCss = ".chat-message{overflow:hidden;clear:both;min-width:240px}.chat-message+.chat-message{margin-top:6px}.chat-message--meta{display:flex}.chat-message--title{background-color:#F1F1F1;padding:8px 12px;position:relative;float:left;margin-top:6px;-moz-border-radius:0 10px 10px 10px;-webkit-border-radius:0 10px 10px 10px;border-radius:0 10px 10px 10px}.chat-message--time{clear:both;color:#999;font-size:75%;padding-top:2px}.chat-message.is-owner .chat-message--content{margin-left:12px}.chat-message.is-guest .chat-message--meta{flex-direction:row-reverse}.chat-message.is-guest .chat-message--title{background-color:#EFF7FF;float:right;margin-right:12px;text-align:right;-moz-border-radius:10px 0 10px 10px;-webkit-border-radius:10px 0 10px 10px;border-radius:10px 0 10px 10px}";
|
|
8
|
+
|
|
9
|
+
dayjs_min.extend(relativeTime);
|
|
10
|
+
const ChatMessages = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
registerInstance(this, hostRef);
|
|
13
|
+
this.markMessagesAsRead = async () => {
|
|
14
|
+
try {
|
|
15
|
+
const unreadMessages = (this.messages || []).filter(message => {
|
|
16
|
+
return Boolean(message.unRead) && message.senderId !== this.sender.id;
|
|
17
|
+
});
|
|
18
|
+
if (unreadMessages.length > 0) {
|
|
19
|
+
await HttpService().markMessagesAsRead(this.chatRoomId, unreadMessages);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (e) { }
|
|
23
|
+
};
|
|
24
|
+
this.scrollToLastMessage = () => {
|
|
25
|
+
const targetElement = document.getElementById('chat--last-message');
|
|
26
|
+
targetElement && targetElement.scrollIntoView();
|
|
27
|
+
};
|
|
28
|
+
this.renderMessage = (chatMessage) => {
|
|
29
|
+
const { message, senderId, timestamp } = chatMessage;
|
|
30
|
+
const isOwner = this.sender.id === senderId;
|
|
31
|
+
const todayStr = dayjs_min().format(dateFormat);
|
|
32
|
+
const messageDayStr = dayjs_min(timestamp).format(dateFormat);
|
|
33
|
+
return (h("div", { class: `chat-message ${isOwner ? 'is-owner' : 'is-guest'}` }, h("div", { class: "chat-message--meta" }, h("user-avatar", { size: 40, shortName: String(((isOwner ? this.sender : this.receiver) || {}).fullName || '').charAt(0), avatar: ((isOwner ? this.sender : this.receiver) || {}).avatar }), h("div", { class: "chat-message--content" }, h("div", { class: "chat-message--title" }, message), timestamp && (h("div", { class: "chat-message--time" }, todayStr === messageDayStr ? dayjs_min(timestamp).format('HH:mm') : dayjs_min(timestamp).fromNow()))))));
|
|
34
|
+
};
|
|
35
|
+
this.sender = {};
|
|
36
|
+
this.receiver = {};
|
|
37
|
+
this.messages = [];
|
|
38
|
+
this.chatRoomId = undefined;
|
|
39
|
+
}
|
|
40
|
+
componentDidLoad() {
|
|
41
|
+
this.markMessagesAsRead();
|
|
42
|
+
}
|
|
43
|
+
componentDidUpdate() {
|
|
44
|
+
this.scrollToLastMessage();
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
const isEmpty = (this.messages || []).length === 0;
|
|
48
|
+
return (h("div", { class: "chat-messages" }, !isEmpty && this.messages.map(this.renderMessage), isEmpty && (h("div", { style: { padding: '48px', textAlign: 'center' } }, h("div", { style: { color: Colors.Green04 } }, "No messages yet"))), h("div", { id: "chat--last-message" })));
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
ChatMessages.style = indexCss;
|
|
52
|
+
|
|
53
|
+
export { ChatMessages as chat_messages };
|