@brainfish-ai/widgets-initiator 1.5.2 → 1.6.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/dist/web.js CHANGED
@@ -1,47 +1,47 @@
1
- var Fe = Object.defineProperty, Te = Object.defineProperties;
1
+ var Te = Object.defineProperty, Fe = Object.defineProperties;
2
2
  var Le = Object.getOwnPropertyDescriptors;
3
3
  var pe = Object.getOwnPropertySymbols;
4
- var $e = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable;
5
- var T = (a, t, n) => t in a ? Fe(a, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[t] = n, L = (a, t) => {
6
- for (var n in t || (t = {}))
7
- $e.call(t, n) && T(a, n, t[n]);
4
+ var $e = Object.prototype.hasOwnProperty, Ke = Object.prototype.propertyIsEnumerable;
5
+ var F = (a, t, r) => t in a ? Te(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r, L = (a, t) => {
6
+ for (var r in t || (t = {}))
7
+ $e.call(t, r) && F(a, r, t[r]);
8
8
  if (pe)
9
- for (var n of pe(t))
10
- We.call(t, n) && T(a, n, t[n]);
9
+ for (var r of pe(t))
10
+ Ke.call(t, r) && F(a, r, t[r]);
11
11
  return a;
12
- }, $ = (a, t) => Te(a, Le(t));
13
- var _ = (a, t, n) => T(a, typeof t != "symbol" ? t + "" : t, n);
14
- var m = (a, t, n) => new Promise((i, o) => {
15
- var r = (s) => {
12
+ }, $ = (a, t) => Fe(a, Le(t));
13
+ var S = (a, t, r) => F(a, typeof t != "symbol" ? t + "" : t, r);
14
+ var m = (a, t, r) => new Promise((d, o) => {
15
+ var n = (s) => {
16
16
  try {
17
- l(n.next(s));
18
- } catch (u) {
19
- o(u);
17
+ i(r.next(s));
18
+ } catch (l) {
19
+ o(l);
20
20
  }
21
21
  }, e = (s) => {
22
22
  try {
23
- l(n.throw(s));
24
- } catch (u) {
25
- o(u);
23
+ i(r.throw(s));
24
+ } catch (l) {
25
+ o(l);
26
26
  }
27
- }, l = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(r, e);
28
- l((n = n.apply(a, t)).next());
27
+ }, i = (s) => s.done ? d(s.value) : Promise.resolve(s.value).then(n, e);
28
+ i((r = r.apply(a, t)).next());
29
29
  });
30
- var k, z;
30
+ var _, H;
31
31
  (function() {
32
32
  try {
33
33
  var a = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, t = new a.Error().stack;
34
- t && (a._sentryDebugIds = a._sentryDebugIds || {}, a._sentryDebugIds[t] = "3f03cfaa-f399-4f03-926b-3cd5c4aabd37", a._sentryDebugIdIdentifier = "sentry-dbid-3f03cfaa-f399-4f03-926b-3cd5c4aabd37");
35
- } catch (n) {
34
+ t && (a._sentryDebugIds = a._sentryDebugIds || {}, a._sentryDebugIds[t] = "6fbe27fe-8181-435f-9330-4e9fec48bb6a", a._sentryDebugIdIdentifier = "sentry-dbid-6fbe27fe-8181-435f-9330-4e9fec48bb6a");
35
+ } catch (r) {
36
36
  }
37
- })(), (typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}).SENTRY_RELEASE = { id: "8e419dad60578a85eb8137655ef2251f84590af4" }, function(a) {
37
+ })(), (typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}).SENTRY_RELEASE = { id: "e4d978c3b1cd863f6b5fc1b2b532cb51a3d1ad81" }, function(a) {
38
38
  a.Sidebar = "sidebar", a.Searchbar = "searchbar";
39
- }(k || (k = {})), k.Sidebar, k.Searchbar;
39
+ }(_ || (_ = {})), _.Sidebar, _.Searchbar;
40
40
  class ie extends Error {
41
- constructor(n, i) {
42
- super(n, i);
43
- _(this, "cause");
44
- this.name = "BrainfishWidgetError", this.cause = i == null ? void 0 : i.cause, Error.captureStackTrace && Error.captureStackTrace(this, ie), this.cause instanceof Error && this.cause.stack && (this.stack = this.stack + `
41
+ constructor(r, d) {
42
+ super(r, d);
43
+ S(this, "cause");
44
+ this.name = "BrainfishWidgetError", this.cause = d == null ? void 0 : d.cause, Error.captureStackTrace && Error.captureStackTrace(this, ie), this.cause instanceof Error && this.cause.stack && (this.stack = this.stack + `
45
45
  Caused by: ` + this.cause.stack);
46
46
  }
47
47
  toJSON() {
@@ -50,131 +50,136 @@ Caused by: ` + this.cause.stack);
50
50
  }
51
51
  (function(a) {
52
52
  a.LINK = "link", a.CALLBACK = "callback", a.EMAIL = "email", a.PHONE = "phone";
53
- })(z || (z = {}));
54
- const x = (a, t, n, i) => {
55
- let o = n, r = {};
53
+ })(H || (H = {}));
54
+ const x = (a, t, r, d) => {
55
+ let o = r, n = {};
56
56
  if (t instanceof Error) try {
57
- r = JSON.parse(t.message), o += ` - ${r.message || t.message}`;
57
+ n = JSON.parse(t.message), o += ` - ${n.message || t.message}`;
58
58
  } catch (e) {
59
59
  o += ` - ${t.message}`;
60
60
  }
61
61
  else o += ` - ${String(t)}`;
62
- ((e, l, s) => {
62
+ ((e, i, s) => {
63
63
  if (!navigator || navigator.userAgent.toLowerCase().includes("headless")) return;
64
- const u = l.toJSON();
65
- fetch(`${e || "https://app.brainfi.sh"}/api/trackError.widget.create`, { method: "POST", headers: { "Content-Type": "application/json", "api-key": s }, body: JSON.stringify({ error: `WebWidgetVersion: 1.5.2. ${l.message}`, stack: l.stack, cause: { message: u.message, stack: u.stack, cause: u.cause } }) });
66
- })(a, new ie(o, { cause: r }), i);
67
- }, Ke = (a) => m(void 0, null, function* () {
68
- let { widgetKey: t, apiHost: n } = a;
69
- return function(i, o, r) {
64
+ const l = i.toJSON();
65
+ fetch(`${e || "https://app.brainfi.sh"}/api/trackError.widget.create`, { method: "POST", headers: { "Content-Type": "application/json", "api-key": s }, body: JSON.stringify({ error: `WebWidgetVersion: 1.6.1. ${i.message}`, stack: i.stack, cause: { message: l.message, stack: l.stack, cause: l.cause } }) });
66
+ })(a, new ie(o, { cause: n }), d);
67
+ }, We = (a) => m(void 0, null, function* () {
68
+ let { widgetKey: t, apiHost: r } = a;
69
+ return function(d, o, n) {
70
70
  return m(this, null, function* () {
71
- let e, l = 0;
72
- for (; l < 3; ) try {
73
- const s = yield fetch(`${i}${o}`, { method: "POST", headers: { "Content-Type": "application/json", "api-key": r } });
71
+ let e, i = 0;
72
+ for (; i < 3; ) try {
73
+ const s = yield fetch(`${d}${o}`, { method: "POST", headers: { "Content-Type": "application/json", "api-key": n } });
74
74
  if (!s.ok) throw new Error(`API call failed with status: ${s.status}`);
75
- const u = yield s.json();
76
- if (!u) throw new Error("Error loading config: empty response");
77
- return u;
75
+ const l = yield s.json();
76
+ if (!l) throw new Error("Error loading config: empty response");
77
+ return l;
78
78
  } catch (s) {
79
- if (e = s, l++, l >= 3) throw x(i, s, "Error fetching config", r), e;
80
- yield new Promise((u) => setTimeout(u, 500));
79
+ if (e = s, i++, i >= 3) throw x(d, s, "Error fetching config", n), e;
80
+ yield new Promise((l) => setTimeout(l, 500));
81
81
  }
82
82
  });
83
- }(n, "/api/searchWidgets.getConfigByKey", t);
84
- }), ze = (a) => {
85
- let { config: t, apiKey: n, apiHost: i } = a;
83
+ }(r, "/api/searchWidgets.getConfigByKey", t);
84
+ }), He = (a) => {
85
+ let { config: t, apiKey: r, apiHost: d } = a;
86
86
  const o = t.settings || {};
87
- return ["bodyActionButtons", "footerActionButtons", "nextBestActions"].forEach((r) => {
88
- o[r] && (o[r] = o[r].map((e) => e.type === z.CALLBACK && e.value ? $(L({}, e), { value: new Function(`return ${e.value}`)() }) : e));
89
- }), $(L({}, t), { settings: o, apiHost: i, widgetMode: t.widgetType, apiKey: n });
90
- }, se = (a) => (a == null ? void 0 : a.apiHost) || "https://app.brainfi.sh", W = (() => {
87
+ return ["bodyActionButtons", "footerActionButtons", "nextBestActions"].forEach((n) => {
88
+ o[n] && (o[n] = o[n].map((e) => e.type === H.CALLBACK && e.value ? $(L({}, e), { value: new Function(`return ${e.value}`)() }) : e));
89
+ }), $(L({}, t), { settings: o, apiHost: d, widgetMode: t.widgetType, apiKey: r });
90
+ }, se = (a) => (a == null ? void 0 : a.apiHost) || "https://app.brainfi.sh", K = (() => {
91
91
  if (typeof window == "undefined") return;
92
92
  const a = window.navigator.userAgent;
93
93
  if (!(a.match(/iPad/i) || a.match(/iPhone/i))) return !1;
94
94
  const t = a.match(/OS (\d+)_/i);
95
95
  return t && parseInt(t[1], 10) <= 14;
96
- })(), He = (a) => m(void 0, null, function* () {
97
- let { apiHost: t, widgetKey: n, version: i } = a;
96
+ })(), ze = (a) => m(void 0, null, function* () {
97
+ let { apiHost: t, widgetKey: r, version: d } = a;
98
98
  try {
99
- const o = `https://cdn.jsdelivr.net/npm/@brainfish-ai/search-widget@${i}/dist/web.js`, r = W ? o.replace("web.js", "web.umd.js") : o;
100
- return { widget: yield ((l) => m(void 0, null, function* () {
101
- return document.getElementById("brainfish-widget") ? window.Brainfish : new Promise((s, u) => {
102
- const d = document.createElement("script");
103
- d.id = "brainfish-widget", d.src = l, d.type = W ? "text/javascript" : "module", d.async = !0, d.crossOrigin = "anonymous", d.onload = () => {
99
+ const o = `https://cdn.jsdelivr.net/npm/@brainfish-ai/search-widget@${d}/dist/web.js`, n = K ? o.replace("web.js", "web.umd.js") : o;
100
+ return { widget: yield ((i) => m(void 0, null, function* () {
101
+ return document.getElementById("brainfish-widget") ? window.Brainfish : new Promise((s, l) => {
102
+ const u = document.createElement("script");
103
+ u.id = "brainfish-widget", u.src = i, u.type = K ? "text/javascript" : "module", u.async = !0, u.crossOrigin = "anonymous", u.onload = () => {
104
104
  setTimeout(() => {
105
105
  const c = window.Brainfish;
106
- c ? s(c) : u(new Error("Failed to load Brainfish module"));
106
+ c ? s(c) : l(new Error("Failed to load Brainfish module"));
107
107
  }, 200);
108
- }, d.onerror = (c) => {
109
- const f = c, h = { message: `Failed to load script: ${l}`, type: f.type, fileName: f.filename, lineNumber: f.lineno, columnNumber: f.colno, error: f.error ? f.error.toString() : "Unknown error" };
110
- u(new Error(JSON.stringify(h)));
111
- }, W || document.head.appendChild(d);
108
+ }, u.onerror = (c) => {
109
+ const f = c, g = { message: `Failed to load script: ${i}`, type: f.type, fileName: f.filename, lineNumber: f.lineno, columnNumber: f.colno, error: f.error ? f.error.toString() : "Unknown error" };
110
+ l(new Error(JSON.stringify(g)));
111
+ }, K || document.head.appendChild(u);
112
112
  });
113
- }))(r) };
113
+ }))(n) };
114
114
  } catch (o) {
115
- x(t, o, o.message, n);
115
+ x(t, o, o.message, r);
116
116
  }
117
- }), ge = /* @__PURE__ */ new Set(), qe = (a, t) => m(void 0, null, function* () {
118
- const n = se(a.overrides);
117
+ }), ge = /* @__PURE__ */ new Set(), Ne = (a, t) => m(void 0, null, function* () {
118
+ const r = se(a.overrides);
119
119
  try {
120
120
  if (ge.has(a.widgetKey)) return;
121
- const i = yield He({ apiHost: n, widgetKey: a.widgetKey, version: t.version || "latest" });
122
- if (i) {
123
- const { widget: o } = i, r = ze({ config: t, apiKey: a.widgetKey, apiHost: n });
121
+ const d = yield ze({ apiHost: r, widgetKey: a.widgetKey, version: t.version || "latest" });
122
+ if (d) {
123
+ const { widget: o } = d, n = He({ config: t, apiKey: a.widgetKey, apiHost: r });
124
124
  return a.overrides && t.settings && Object.entries(a.overrides).forEach((e) => {
125
- let [l, s] = e;
126
- t.settings && l in t.settings && (t.settings[l] = function() {
127
- let u = arguments.length > 1 ? arguments[1] : void 0;
128
- const d = new Map((arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).map((c) => [c.label, c]));
129
- return u.forEach((c) => d.set(c.label, c)), Array.from(d.values());
130
- }(t.settings[l], s));
131
- }), function(e, l) {
132
- l.widgetType === k.Searchbar || l.widgetType === "Search" ? e.SearchWidget.initStandard(l) : e.HelpWidget.initPopup(l);
133
- }(o, r), ge.add(a.widgetKey), o;
125
+ let [i, s] = e;
126
+ t.settings && i in t.settings && (t.settings[i] = function() {
127
+ let l = arguments.length > 1 ? arguments[1] : void 0;
128
+ const u = new Map((arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).map((c) => [c.label, c]));
129
+ return l.forEach((c) => u.set(c.label, c)), Array.from(u.values());
130
+ }(t.settings[i], s));
131
+ }), function(e, i) {
132
+ i.widgetType === _.Searchbar || i.widgetType === "Search" ? e.SearchWidget.initStandard(i) : e.HelpWidget.initPopup(i);
133
+ }(o, n), ge.add(a.widgetKey), o;
134
134
  }
135
- } catch (i) {
136
- x(n, i, i.message, a.widgetKey);
135
+ } catch (d) {
136
+ x(r, d, d.message, a.widgetKey);
137
137
  }
138
138
  });
139
139
  let he = !1;
140
- const De = function(i, o, r) {
141
- return m(this, arguments, function* (a, t, n) {
142
- let e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "", l = arguments.length > 4 && arguments[4] !== void 0 && arguments[4];
143
- if (t || x(n, new Error("Access key is required"), "Access key is required", a), !he) try {
144
- window.BrainfishAnalytics("init", { apiUrl: e, accessKey: t, trackScreenViews: !0, trackAttributes: !0, trackOutgoingLinks: !0, enableRecording: l }), he = !0, yield ((s, u) => m(this, null, function* () {
140
+ const qe = function(d, o, n) {
141
+ return m(this, arguments, function* (a, t, r) {
142
+ let e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "", i = arguments.length > 4 && arguments[4] !== void 0 && arguments[4];
143
+ if (t || x(r, new Error("Access key is required"), "Access key is required", a), !he) try {
144
+ const s = (() => {
145
+ if (typeof window == "undefined" || typeof navigator == "undefined") return !1;
146
+ const l = navigator, u = window, c = (l.doNotTrack || u.doNotTrack || l.msDoNotTrack || "0").toString().toLowerCase();
147
+ return ["1", "yes", "true"].includes(c);
148
+ })();
149
+ window.BrainfishAnalytics("init", { apiUrl: e, accessKey: t, trackScreenViews: !s, trackAttributes: !s, trackOutgoingLinks: !s, enableRecording: !s && i }), he = !0, yield ((l, u) => m(this, null, function* () {
145
150
  if (document.getElementById("brainfish-analytics")) return window.BrainfishAnalytics;
146
- const d = document.createElement("script");
147
- d.id = "brainfish-analytics", d.src = "https://cdn.jsdelivr.net/npm/@brainfish-ai/web-tracker@latest/dist/tracker.js", d.type = "module", d.async = !0, d.crossOrigin = "anonymous", d.onerror = () => {
148
- x(s, new Error(`Failed to load script: ${d.src}`), `Failed to load script: ${d.src}`, u);
149
- }, document.head.appendChild(d);
150
- }))(n, a);
151
+ const c = document.createElement("script");
152
+ c.id = "brainfish-analytics", c.src = "https://cdn.jsdelivr.net/npm/@brainfish-ai/web-tracker@latest/dist/tracker.js", c.type = "module", c.async = !0, c.crossOrigin = "anonymous", c.onerror = () => {
153
+ x(l, new Error(`Failed to load script: ${c.src}`), `Failed to load script: ${c.src}`, u);
154
+ }, document.head.appendChild(c);
155
+ }))(r, a);
151
156
  } catch (s) {
152
- x(n, s, "Failed to initialize BrainfishAnalytics", a);
157
+ x(r, s, "Failed to initialize BrainfishAnalytics", a);
153
158
  }
154
159
  });
155
160
  };
156
161
  function M(a, t) {
157
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
158
- const i = document.createElement(a);
159
- return i.className = t, Object.entries(n).forEach((o) => {
160
- let [r, e] = o;
161
- i.setAttribute(r, e);
162
- }), i;
162
+ let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
163
+ const d = document.createElement(a);
164
+ return d.className = t, Object.entries(r).forEach((o) => {
165
+ let [n, e] = o;
166
+ d.setAttribute(n, e);
167
+ }), d;
163
168
  }
164
- const j = "bf-iframe-container", F = "bf-trigger-button";
169
+ const j = "bf-iframe-container", T = "bf-trigger-button";
165
170
  class v {
166
171
  static get isWidgetOpen() {
167
172
  return this.isOpen;
168
173
  }
169
- static initialize(t, n) {
170
- this.button = t, this.icon = n, t.addEventListener("click", () => this.toggleIframeVisibility());
174
+ static initialize(t, r) {
175
+ this.button = t, this.icon = r, t.addEventListener("click", () => this.toggleIframeVisibility());
171
176
  }
172
177
  static toggleIframeVisibility() {
173
178
  if (!this.button || !this.icon) return;
174
179
  this.isOpen = !this.isOpen;
175
- const t = this.icon.querySelector(".fish-icon"), n = this.icon.querySelector(".close-icon"), i = document.querySelector(".bf-iframe-container"), o = i == null ? void 0 : i.querySelector("iframe");
176
- var r;
177
- this.isOpen ? (i == null || i.classList.add("open"), i == null || i.setAttribute("aria-hidden", "false"), this.button.setAttribute("aria-expanded", "true"), t.classList.remove("visible"), n.classList.add("visible"), o == null || (r = o.contentWindow) === null || r === void 0 || r.postMessage({ type: "FOCUS_SEARCH_FIELD" }, "*"), window.BrainfishAnalytics("track", "Open Widget"), document.body.clientWidth <= 576 && this.hideTriggerButton()) : (i == null || i.classList.remove("open"), i == null || i.setAttribute("aria-hidden", "true"), this.button.setAttribute("aria-expanded", "false"), n.classList.remove("visible"), t.classList.add("visible"), this.showTriggerButton(), window.BrainfishAnalytics("track", "Close Widget"));
180
+ const t = this.icon.querySelector(".fish-icon"), r = this.icon.querySelector(".close-icon"), d = document.querySelector(".bf-iframe-container"), o = d == null ? void 0 : d.querySelector("iframe");
181
+ var n;
182
+ this.isOpen ? (d == null || d.classList.add("open"), d == null || d.setAttribute("aria-hidden", "false"), this.button.setAttribute("aria-expanded", "true"), t.classList.remove("visible"), r.classList.add("visible"), o == null || (n = o.contentWindow) === null || n === void 0 || n.postMessage({ type: "FOCUS_SEARCH_FIELD" }, "*"), window.BrainfishAnalytics("track", "Open Widget"), document.body.clientWidth <= 576 && this.hideTriggerButton()) : (d == null || d.classList.remove("open"), d == null || d.setAttribute("aria-hidden", "true"), this.button.setAttribute("aria-expanded", "false"), r.classList.remove("visible"), t.classList.add("visible"), this.showTriggerButton(), window.BrainfishAnalytics("track", "Close Widget"));
178
183
  }
179
184
  static showTriggerButton() {
180
185
  var t;
@@ -185,99 +190,110 @@ class v {
185
190
  (t = this.button) === null || t === void 0 || t.classList.add("hidden");
186
191
  }
187
192
  }
188
- _(v, "isOpen", !1), _(v, "button", null), _(v, "icon", null);
189
- function Re(a, t) {
193
+ S(v, "isOpen", !1), S(v, "button", null), S(v, "icon", null);
194
+ function De(a) {
195
+ let { widgetHost: t, apiHost: r, widgetKey: d, signal: o } = a;
190
196
  window.addEventListener("message", (n) => {
191
- if (n.origin !== a) return;
192
- const { type: i } = n.data;
193
- if (i === "TOGGLE_WIDGET_SIZE" && function() {
194
- const o = document.querySelector(`.${j}`);
195
- o.classList.contains("expanded") ? o.classList.remove("expanded") : o.classList.add("expanded");
196
- }(), i === "TRACK_EVENT") {
197
+ if (n.origin !== t) return;
198
+ const { type: e } = n.data;
199
+ if (e === "TOGGLE_WIDGET_SIZE" && function() {
200
+ const i = document.querySelector(`.${j}`);
201
+ i.classList.contains("expanded") ? i.classList.remove("expanded") : i.classList.add("expanded");
202
+ }(), e === "TRACK_EVENT") {
197
203
  if (!window.BrainfishAnalytics) return;
198
- const { eventName: o, data: r } = n.data;
199
- window.BrainfishAnalytics("track", o, r);
204
+ const { eventName: i, data: s } = n.data;
205
+ window.BrainfishAnalytics("track", i, s);
200
206
  }
201
- i === "CLOSE_WIDGET" && (window.BrainfishAnalytics("track", "Close Widget"), v.toggleIframeVisibility());
202
- }, { signal: t });
207
+ if (e === "CLOSE_WIDGET" && (window.BrainfishAnalytics("track", "Close Widget"), v.toggleIframeVisibility()), e === "NEXT_BEST_ACTION_CLICKED") {
208
+ const { action: i, searchQueryId: s, query: l, answer: u } = n.data, c = { action: i, searchQueryId: s };
209
+ if (!["function", "callback"].includes(i.type)) return void console.error("Invalid action type", i);
210
+ if (window.__bfCallbacks = window.__bfCallbacks || {}, window.__bfCallbacks[i.id]) return void window.__bfCallbacks[i.id](l, u, c);
211
+ const f = `${r}/api/searchWidgets.callback.codeblocks?apiKey=${d}&codeblockId=${i.id}`, g = document.createElement("script");
212
+ g.src = f, document.head.appendChild(g), g.onload = () => {
213
+ window.__bfCallbacks[i.id](l, u, c), setTimeout(() => {
214
+ document.head.removeChild(g);
215
+ }, 300);
216
+ };
217
+ }
218
+ }, { signal: o });
203
219
  }
204
- function ue(a) {
220
+ function de(a) {
205
221
  return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
206
222
  }
207
- var H = { exports: {} }, q = { exports: {} }, D = { exports: {} };
223
+ var z = { exports: {} }, N = { exports: {} }, q = { exports: {} };
208
224
  (function(a, t) {
209
- function n(o) {
225
+ function r(o) {
210
226
  return Math.round(255 * o);
211
227
  }
212
- function i(o, r, e) {
213
- return n(o) + "," + n(r) + "," + n(e);
228
+ function d(o, n, e) {
229
+ return r(o) + "," + r(n) + "," + r(e);
214
230
  }
215
- t.__esModule = !0, t.default = void 0, t.default = function(o, r, e, l) {
216
- if (l === void 0 && (l = i), r === 0) return l(e, e, e);
217
- var s = (o % 360 + 360) % 360 / 60, u = (1 - Math.abs(2 * e - 1)) * r, d = u * (1 - Math.abs(s % 2 - 1)), c = 0, f = 0, h = 0;
218
- s >= 0 && s < 1 ? (c = u, f = d) : s >= 1 && s < 2 ? (c = d, f = u) : s >= 2 && s < 3 ? (f = u, h = d) : s >= 3 && s < 4 ? (f = d, h = u) : s >= 4 && s < 5 ? (c = d, h = u) : s >= 5 && s < 6 && (c = u, h = d);
219
- var g = e - u / 2;
220
- return l(c + g, f + g, h + g);
231
+ t.__esModule = !0, t.default = void 0, t.default = function(o, n, e, i) {
232
+ if (i === void 0 && (i = d), n === 0) return i(e, e, e);
233
+ var s = (o % 360 + 360) % 360 / 60, l = (1 - Math.abs(2 * e - 1)) * n, u = l * (1 - Math.abs(s % 2 - 1)), c = 0, f = 0, g = 0;
234
+ s >= 0 && s < 1 ? (c = l, f = u) : s >= 1 && s < 2 ? (c = u, f = l) : s >= 2 && s < 3 ? (f = l, g = u) : s >= 3 && s < 4 ? (f = u, g = l) : s >= 4 && s < 5 ? (c = u, g = l) : s >= 5 && s < 6 && (c = l, g = u);
235
+ var h = e - l / 2;
236
+ return i(c + h, f + h, g + h);
221
237
  }, a.exports = t.default;
222
- })(D, D.exports);
223
- var le = D.exports, R = { exports: {} };
238
+ })(q, q.exports);
239
+ var le = q.exports, D = { exports: {} };
224
240
  (function(a, t) {
225
241
  t.__esModule = !0, t.default = void 0;
226
- var n = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "00ffff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "0000ff", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "00ffff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "ff00ff", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "639", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" };
227
- t.default = function(i) {
228
- if (typeof i != "string") return i;
229
- var o = i.toLowerCase();
230
- return n[o] ? "#" + n[o] : i;
242
+ var r = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "00ffff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "0000ff", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "00ffff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "ff00ff", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "639", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" };
243
+ t.default = function(d) {
244
+ if (typeof d != "string") return d;
245
+ var o = d.toLowerCase();
246
+ return r[o] ? "#" + r[o] : d;
231
247
  }, a.exports = t.default;
232
- })(R, R.exports);
233
- var Ne = R.exports, N = { exports: {} };
248
+ })(D, D.exports);
249
+ var Re = D.exports, R = { exports: {} };
234
250
  (function(a, t) {
235
- function n(s) {
236
- var u = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
237
- return n = function(d) {
238
- if (d === null || !function(f) {
251
+ function r(s) {
252
+ var l = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
253
+ return r = function(u) {
254
+ if (u === null || !function(f) {
239
255
  try {
240
256
  return Function.toString.call(f).indexOf("[native code]") !== -1;
241
- } catch (h) {
257
+ } catch (g) {
242
258
  return typeof f == "function";
243
259
  }
244
- }(d)) return d;
245
- if (typeof d != "function") throw new TypeError("Super expression must either be null or a function");
246
- if (u !== void 0) {
247
- if (u.has(d)) return u.get(d);
248
- u.set(d, c);
260
+ }(u)) return u;
261
+ if (typeof u != "function") throw new TypeError("Super expression must either be null or a function");
262
+ if (l !== void 0) {
263
+ if (l.has(u)) return l.get(u);
264
+ l.set(u, c);
249
265
  }
250
266
  function c() {
251
- return function(f, h, g) {
252
- if (i()) return Reflect.construct.apply(null, arguments);
267
+ return function(f, g, h) {
268
+ if (d()) return Reflect.construct.apply(null, arguments);
253
269
  var p = [null];
254
- p.push.apply(p, h);
270
+ p.push.apply(p, g);
255
271
  var b = new (f.bind.apply(f, p))();
256
- return g && o(b, g.prototype), b;
257
- }(d, arguments, r(this).constructor);
272
+ return h && o(b, h.prototype), b;
273
+ }(u, arguments, n(this).constructor);
258
274
  }
259
- return c.prototype = Object.create(d.prototype, { constructor: { value: c, enumerable: !1, writable: !0, configurable: !0 } }), o(c, d);
260
- }, n(s);
275
+ return c.prototype = Object.create(u.prototype, { constructor: { value: c, enumerable: !1, writable: !0, configurable: !0 } }), o(c, u);
276
+ }, r(s);
261
277
  }
262
- function i() {
278
+ function d() {
263
279
  try {
264
280
  var s = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
265
281
  }));
266
- } catch (u) {
282
+ } catch (l) {
267
283
  }
268
- return (i = function() {
284
+ return (d = function() {
269
285
  return !!s;
270
286
  })();
271
287
  }
272
- function o(s, u) {
273
- return o = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(d, c) {
274
- return d.__proto__ = c, d;
275
- }, o(s, u);
288
+ function o(s, l) {
289
+ return o = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(u, c) {
290
+ return u.__proto__ = c, u;
291
+ }, o(s, l);
276
292
  }
277
- function r(s) {
278
- return r = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(u) {
279
- return u.__proto__ || Object.getPrototypeOf(u);
280
- }, r(s);
293
+ function n(s) {
294
+ return n = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(l) {
295
+ return l.__proto__ || Object.getPrototypeOf(l);
296
+ }, n(s);
281
297
  }
282
298
  t.__esModule = !0, t.default = void 0;
283
299
  var e = { 1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).
@@ -429,213 +445,213 @@ To pass a single animation please supply them in simple values, e.g. animation('
429
445
 
430
446
  `, 78: `base must be set in "px" or "%" but you set it in "%s".
431
447
  ` };
432
- function l() {
433
- for (var s = arguments.length, u = new Array(s), d = 0; d < s; d++) u[d] = arguments[d];
434
- var c, f = u[0], h = [];
435
- for (c = 1; c < u.length; c += 1) h.push(u[c]);
436
- return h.forEach(function(g) {
437
- f = f.replace(/%[a-z]/, g);
448
+ function i() {
449
+ for (var s = arguments.length, l = new Array(s), u = 0; u < s; u++) l[u] = arguments[u];
450
+ var c, f = l[0], g = [];
451
+ for (c = 1; c < l.length; c += 1) g.push(l[c]);
452
+ return g.forEach(function(h) {
453
+ f = f.replace(/%[a-z]/, h);
438
454
  }), f;
439
455
  }
440
456
  t.default = function(s) {
441
- var u, d;
457
+ var l, u;
442
458
  function c(f) {
443
- var h;
444
- if (process.env.NODE_ENV === "production") h = s.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + f + " for more information.") || this;
459
+ var g;
460
+ if (process.env.NODE_ENV === "production") g = s.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + f + " for more information.") || this;
445
461
  else {
446
- for (var g = arguments.length, p = new Array(g > 1 ? g - 1 : 0), b = 1; b < g; b++) p[b - 1] = arguments[b];
447
- h = s.call(this, l.apply(void 0, [e[f]].concat(p))) || this;
462
+ for (var h = arguments.length, p = new Array(h > 1 ? h - 1 : 0), b = 1; b < h; b++) p[b - 1] = arguments[b];
463
+ g = s.call(this, i.apply(void 0, [e[f]].concat(p))) || this;
448
464
  }
449
465
  return function(C) {
450
466
  if (C === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
451
467
  return C;
452
- }(h);
468
+ }(g);
453
469
  }
454
- return d = s, (u = c).prototype = Object.create(d.prototype), u.prototype.constructor = u, o(u, d), c;
455
- }(n(Error)), a.exports = t.default;
456
- })(N, N.exports);
457
- var S = N.exports;
470
+ return u = s, (l = c).prototype = Object.create(u.prototype), l.prototype.constructor = l, o(l, u), c;
471
+ }(r(Error)), a.exports = t.default;
472
+ })(R, R.exports);
473
+ var k = R.exports;
458
474
  (function(a, t) {
459
- t.__esModule = !0, t.default = function(g) {
460
- if (typeof g != "string") throw new o.default(3);
461
- var p = (0, i.default)(g);
475
+ t.__esModule = !0, t.default = function(h) {
476
+ if (typeof h != "string") throw new o.default(3);
477
+ var p = (0, d.default)(h);
462
478
  if (p.match(e)) return { red: parseInt("" + p[1] + p[2], 16), green: parseInt("" + p[3] + p[4], 16), blue: parseInt("" + p[5] + p[6], 16) };
463
- if (p.match(l)) {
479
+ if (p.match(i)) {
464
480
  var b = parseFloat((parseInt("" + p[7] + p[8], 16) / 255).toFixed(2));
465
481
  return { red: parseInt("" + p[1] + p[2], 16), green: parseInt("" + p[3] + p[4], 16), blue: parseInt("" + p[5] + p[6], 16), alpha: b };
466
482
  }
467
483
  if (p.match(s)) return { red: parseInt("" + p[1] + p[1], 16), green: parseInt("" + p[2] + p[2], 16), blue: parseInt("" + p[3] + p[3], 16) };
468
- if (p.match(u)) {
484
+ if (p.match(l)) {
469
485
  var C = parseFloat((parseInt("" + p[4] + p[4], 16) / 255).toFixed(2));
470
486
  return { red: parseInt("" + p[1] + p[1], 16), green: parseInt("" + p[2] + p[2], 16), blue: parseInt("" + p[3] + p[3], 16), alpha: C };
471
487
  }
472
- var E = d.exec(p);
488
+ var E = u.exec(p);
473
489
  if (E) return { red: parseInt("" + E[1], 10), green: parseInt("" + E[2], 10), blue: parseInt("" + E[3], 10) };
474
490
  var y = c.exec(p.substring(0, 50));
475
491
  if (y) return { red: parseInt("" + y[1], 10), green: parseInt("" + y[2], 10), blue: parseInt("" + y[3], 10), alpha: parseFloat("" + y[4]) > 1 ? parseFloat("" + y[4]) / 100 : parseFloat("" + y[4]) };
476
492
  var A = f.exec(p);
477
493
  if (A) {
478
- var Ie = parseInt("" + A[1], 10), Oe = parseInt("" + A[2], 10) / 100, Me = parseInt("" + A[3], 10) / 100, fe = "rgb(" + (0, n.default)(Ie, Oe, Me) + ")", I = d.exec(fe);
479
- if (!I) throw new o.default(4, p, fe);
480
- return { red: parseInt("" + I[1], 10), green: parseInt("" + I[2], 10), blue: parseInt("" + I[3], 10) };
494
+ var Oe = parseInt("" + A[1], 10), Ie = parseInt("" + A[2], 10) / 100, Me = parseInt("" + A[3], 10) / 100, fe = "rgb(" + (0, r.default)(Oe, Ie, Me) + ")", O = u.exec(fe);
495
+ if (!O) throw new o.default(4, p, fe);
496
+ return { red: parseInt("" + O[1], 10), green: parseInt("" + O[2], 10), blue: parseInt("" + O[3], 10) };
481
497
  }
482
- var w = h.exec(p.substring(0, 50));
498
+ var w = g.exec(p.substring(0, 50));
483
499
  if (w) {
484
- var Be = parseInt("" + w[1], 10), Pe = parseInt("" + w[2], 10) / 100, je = parseInt("" + w[3], 10) / 100, ce = "rgb(" + (0, n.default)(Be, Pe, je) + ")", O = d.exec(ce);
485
- if (!O) throw new o.default(4, p, ce);
486
- return { red: parseInt("" + O[1], 10), green: parseInt("" + O[2], 10), blue: parseInt("" + O[3], 10), alpha: parseFloat("" + w[4]) > 1 ? parseFloat("" + w[4]) / 100 : parseFloat("" + w[4]) };
500
+ var Be = parseInt("" + w[1], 10), Pe = parseInt("" + w[2], 10) / 100, je = parseInt("" + w[3], 10) / 100, ce = "rgb(" + (0, r.default)(Be, Pe, je) + ")", I = u.exec(ce);
501
+ if (!I) throw new o.default(4, p, ce);
502
+ return { red: parseInt("" + I[1], 10), green: parseInt("" + I[2], 10), blue: parseInt("" + I[3], 10), alpha: parseFloat("" + w[4]) > 1 ? parseFloat("" + w[4]) / 100 : parseFloat("" + w[4]) };
487
503
  }
488
504
  throw new o.default(5);
489
505
  };
490
- var n = r(le), i = r(Ne), o = r(S);
491
- function r(g) {
492
- return g && g.__esModule ? g : { default: g };
506
+ var r = n(le), d = n(Re), o = n(k);
507
+ function n(h) {
508
+ return h && h.__esModule ? h : { default: h };
493
509
  }
494
- var e = /^#[a-fA-F0-9]{6}$/, l = /^#[a-fA-F0-9]{8}$/, s = /^#[a-fA-F0-9]{3}$/, u = /^#[a-fA-F0-9]{4}$/, d = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, c = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, f = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, h = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
510
+ var e = /^#[a-fA-F0-9]{6}$/, i = /^#[a-fA-F0-9]{8}$/, s = /^#[a-fA-F0-9]{3}$/, l = /^#[a-fA-F0-9]{4}$/, u = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, c = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, f = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, g = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
495
511
  a.exports = t.default;
496
- })(q, q.exports);
497
- var de = q.exports;
512
+ })(N, N.exports);
513
+ var ue = N.exports;
498
514
  (function(a, t) {
499
515
  t.__esModule = !0, t.default = function(o) {
500
516
  if (o === "transparent") return 0;
501
- var r = (0, i.default)(o), e = Object.keys(r).map(function(d) {
502
- var c = r[d] / 255;
517
+ var n = (0, d.default)(o), e = Object.keys(n).map(function(u) {
518
+ var c = n[u] / 255;
503
519
  return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
504
- }), l = e[0], s = e[1], u = e[2];
505
- return parseFloat((0.2126 * l + 0.7152 * s + 0.0722 * u).toFixed(3));
520
+ }), i = e[0], s = e[1], l = e[2];
521
+ return parseFloat((0.2126 * i + 0.7152 * s + 0.0722 * l).toFixed(3));
506
522
  };
507
- var n, i = (n = de) && n.__esModule ? n : { default: n };
523
+ var r, d = (r = ue) && r.__esModule ? r : { default: r };
508
524
  a.exports = t.default;
509
- })(H, H.exports);
510
- const Ye = ue(H.exports);
525
+ })(z, z.exports);
526
+ const Ye = de(z.exports);
511
527
  var Y = { exports: {} }, J = { exports: {} };
512
528
  (function(a, t) {
513
- function n(i, o, r) {
529
+ function r(d, o, n) {
514
530
  return function() {
515
- var e = r.concat(Array.prototype.slice.call(arguments));
516
- return e.length >= o ? i.apply(this, e) : n(i, o, e);
531
+ var e = n.concat(Array.prototype.slice.call(arguments));
532
+ return e.length >= o ? d.apply(this, e) : r(d, o, e);
517
533
  };
518
534
  }
519
- t.__esModule = !0, t.default = function(i) {
520
- return n(i, i.length, []);
535
+ t.__esModule = !0, t.default = function(d) {
536
+ return r(d, d.length, []);
521
537
  }, a.exports = t.default;
522
538
  })(J, J.exports);
523
539
  var me, B, we = J.exports, U = { exports: {} };
524
- me = U, (B = U.exports).__esModule = !0, B.default = void 0, B.default = function(a, t, n) {
525
- return Math.max(a, Math.min(t, n));
540
+ me = U, (B = U.exports).__esModule = !0, B.default = void 0, B.default = function(a, t, r) {
541
+ return Math.max(a, Math.min(t, r));
526
542
  }, me.exports = B.default;
527
543
  var xe = U.exports, G = { exports: {} }, V = { exports: {} };
528
544
  (function(a, t) {
529
- t.__esModule = !0, t.default = void 0, t.default = function(n) {
530
- var i, o = n.red / 255, r = n.green / 255, e = n.blue / 255, l = Math.max(o, r, e), s = Math.min(o, r, e), u = (l + s) / 2;
531
- if (l === s) return n.alpha !== void 0 ? { hue: 0, saturation: 0, lightness: u, alpha: n.alpha } : { hue: 0, saturation: 0, lightness: u };
532
- var d = l - s, c = u > 0.5 ? d / (2 - l - s) : d / (l + s);
533
- switch (l) {
545
+ t.__esModule = !0, t.default = void 0, t.default = function(r) {
546
+ var d, o = r.red / 255, n = r.green / 255, e = r.blue / 255, i = Math.max(o, n, e), s = Math.min(o, n, e), l = (i + s) / 2;
547
+ if (i === s) return r.alpha !== void 0 ? { hue: 0, saturation: 0, lightness: l, alpha: r.alpha } : { hue: 0, saturation: 0, lightness: l };
548
+ var u = i - s, c = l > 0.5 ? u / (2 - i - s) : u / (i + s);
549
+ switch (i) {
534
550
  case o:
535
- i = (r - e) / d + (r < e ? 6 : 0);
551
+ d = (n - e) / u + (n < e ? 6 : 0);
536
552
  break;
537
- case r:
538
- i = (e - o) / d + 2;
553
+ case n:
554
+ d = (e - o) / u + 2;
539
555
  break;
540
556
  default:
541
- i = (o - r) / d + 4;
557
+ d = (o - n) / u + 4;
542
558
  }
543
- return i *= 60, n.alpha !== void 0 ? { hue: i, saturation: c, lightness: u, alpha: n.alpha } : { hue: i, saturation: c, lightness: u };
559
+ return d *= 60, r.alpha !== void 0 ? { hue: d, saturation: c, lightness: l, alpha: r.alpha } : { hue: d, saturation: c, lightness: l };
544
560
  }, a.exports = t.default;
545
561
  })(V, V.exports);
546
562
  var Je = V.exports;
547
563
  (function(a, t) {
548
- t.__esModule = !0, t.default = function(r) {
549
- return (0, i.default)((0, n.default)(r));
564
+ t.__esModule = !0, t.default = function(n) {
565
+ return (0, d.default)((0, r.default)(n));
550
566
  };
551
- var n = o(de), i = o(Je);
552
- function o(r) {
553
- return r && r.__esModule ? r : { default: r };
567
+ var r = o(ue), d = o(Je);
568
+ function o(n) {
569
+ return n && n.__esModule ? n : { default: n };
554
570
  }
555
571
  a.exports = t.default;
556
572
  })(G, G.exports);
557
- var Se = G.exports, Z = { exports: {} }, Q = { exports: {} }, X = { exports: {} }, ee = { exports: {} };
573
+ var ke = G.exports, Z = { exports: {} }, Q = { exports: {} }, X = { exports: {} }, ee = { exports: {} };
558
574
  (function(a, t) {
559
- t.__esModule = !0, t.default = void 0, t.default = function(n) {
560
- return n.length === 7 && n[1] === n[2] && n[3] === n[4] && n[5] === n[6] ? "#" + n[1] + n[3] + n[5] : n;
575
+ t.__esModule = !0, t.default = void 0, t.default = function(r) {
576
+ return r.length === 7 && r[1] === r[2] && r[3] === r[4] && r[5] === r[6] ? "#" + r[1] + r[3] + r[5] : r;
561
577
  }, a.exports = t.default;
562
578
  })(ee, ee.exports);
563
- var _e = ee.exports, te = { exports: {} };
579
+ var Se = ee.exports, te = { exports: {} };
564
580
  (function(a, t) {
565
- t.__esModule = !0, t.default = void 0, t.default = function(n) {
566
- var i = n.toString(16);
567
- return i.length === 1 ? "0" + i : i;
581
+ t.__esModule = !0, t.default = void 0, t.default = function(r) {
582
+ var d = r.toString(16);
583
+ return d.length === 1 ? "0" + d : d;
568
584
  }, a.exports = t.default;
569
585
  })(te, te.exports);
570
- var ke = te.exports;
586
+ var _e = te.exports;
571
587
  (function(a, t) {
572
588
  t.__esModule = !0, t.default = void 0;
573
- var n = r(le), i = r(_e), o = r(ke);
574
- function r(s) {
589
+ var r = n(le), d = n(Se), o = n(_e);
590
+ function n(s) {
575
591
  return s && s.__esModule ? s : { default: s };
576
592
  }
577
593
  function e(s) {
578
594
  return (0, o.default)(Math.round(255 * s));
579
595
  }
580
- function l(s, u, d) {
581
- return (0, i.default)("#" + e(s) + e(u) + e(d));
596
+ function i(s, l, u) {
597
+ return (0, d.default)("#" + e(s) + e(l) + e(u));
582
598
  }
583
- t.default = function(s, u, d) {
584
- return (0, n.default)(s, u, d, l);
599
+ t.default = function(s, l, u) {
600
+ return (0, r.default)(s, l, u, i);
585
601
  }, a.exports = t.default;
586
602
  })(X, X.exports);
587
603
  var Ce = X.exports;
588
604
  (function(a, t) {
589
- t.__esModule = !0, t.default = function(r, e, l) {
590
- if (typeof r == "number" && typeof e == "number" && typeof l == "number") return (0, n.default)(r, e, l);
591
- if (typeof r == "object" && e === void 0 && l === void 0) return (0, n.default)(r.hue, r.saturation, r.lightness);
592
- throw new i.default(1);
605
+ t.__esModule = !0, t.default = function(n, e, i) {
606
+ if (typeof n == "number" && typeof e == "number" && typeof i == "number") return (0, r.default)(n, e, i);
607
+ if (typeof n == "object" && e === void 0 && i === void 0) return (0, r.default)(n.hue, n.saturation, n.lightness);
608
+ throw new d.default(1);
593
609
  };
594
- var n = o(Ce), i = o(S);
595
- function o(r) {
596
- return r && r.__esModule ? r : { default: r };
610
+ var r = o(Ce), d = o(k);
611
+ function o(n) {
612
+ return n && n.__esModule ? n : { default: n };
597
613
  }
598
614
  a.exports = t.default;
599
615
  })(Q, Q.exports);
600
616
  var Ue = Q.exports, ne = { exports: {} };
601
617
  (function(a, t) {
602
- t.__esModule = !0, t.default = function(e, l, s, u) {
603
- if (typeof e == "number" && typeof l == "number" && typeof s == "number" && typeof u == "number") return u >= 1 ? (0, n.default)(e, l, s) : "rgba(" + (0, i.default)(e, l, s) + "," + u + ")";
604
- if (typeof e == "object" && l === void 0 && s === void 0 && u === void 0) return e.alpha >= 1 ? (0, n.default)(e.hue, e.saturation, e.lightness) : "rgba(" + (0, i.default)(e.hue, e.saturation, e.lightness) + "," + e.alpha + ")";
618
+ t.__esModule = !0, t.default = function(e, i, s, l) {
619
+ if (typeof e == "number" && typeof i == "number" && typeof s == "number" && typeof l == "number") return l >= 1 ? (0, r.default)(e, i, s) : "rgba(" + (0, d.default)(e, i, s) + "," + l + ")";
620
+ if (typeof e == "object" && i === void 0 && s === void 0 && l === void 0) return e.alpha >= 1 ? (0, r.default)(e.hue, e.saturation, e.lightness) : "rgba(" + (0, d.default)(e.hue, e.saturation, e.lightness) + "," + e.alpha + ")";
605
621
  throw new o.default(2);
606
622
  };
607
- var n = r(Ce), i = r(le), o = r(S);
608
- function r(e) {
623
+ var r = n(Ce), d = n(le), o = n(k);
624
+ function n(e) {
609
625
  return e && e.__esModule ? e : { default: e };
610
626
  }
611
627
  a.exports = t.default;
612
628
  })(ne, ne.exports);
613
629
  var Ge = ne.exports, re = { exports: {} };
614
630
  (function(a, t) {
615
- t.__esModule = !0, t.default = function(e, l, s) {
616
- if (typeof e == "number" && typeof l == "number" && typeof s == "number") return (0, n.default)("#" + (0, i.default)(e) + (0, i.default)(l) + (0, i.default)(s));
617
- if (typeof e == "object" && l === void 0 && s === void 0) return (0, n.default)("#" + (0, i.default)(e.red) + (0, i.default)(e.green) + (0, i.default)(e.blue));
631
+ t.__esModule = !0, t.default = function(e, i, s) {
632
+ if (typeof e == "number" && typeof i == "number" && typeof s == "number") return (0, r.default)("#" + (0, d.default)(e) + (0, d.default)(i) + (0, d.default)(s));
633
+ if (typeof e == "object" && i === void 0 && s === void 0) return (0, r.default)("#" + (0, d.default)(e.red) + (0, d.default)(e.green) + (0, d.default)(e.blue));
618
634
  throw new o.default(6);
619
635
  };
620
- var n = r(_e), i = r(ke), o = r(S);
621
- function r(e) {
636
+ var r = n(Se), d = n(_e), o = n(k);
637
+ function n(e) {
622
638
  return e && e.__esModule ? e : { default: e };
623
639
  }
624
640
  a.exports = t.default;
625
641
  })(re, re.exports);
626
642
  var Ee = re.exports, ae = { exports: {} };
627
643
  (function(a, t) {
628
- t.__esModule = !0, t.default = function(e, l, s, u) {
629
- if (typeof e == "string" && typeof l == "number") {
630
- var d = (0, n.default)(e);
631
- return "rgba(" + d.red + "," + d.green + "," + d.blue + "," + l + ")";
644
+ t.__esModule = !0, t.default = function(e, i, s, l) {
645
+ if (typeof e == "string" && typeof i == "number") {
646
+ var u = (0, r.default)(e);
647
+ return "rgba(" + u.red + "," + u.green + "," + u.blue + "," + i + ")";
632
648
  }
633
- if (typeof e == "number" && typeof l == "number" && typeof s == "number" && typeof u == "number") return u >= 1 ? (0, i.default)(e, l, s) : "rgba(" + e + "," + l + "," + s + "," + u + ")";
634
- if (typeof e == "object" && l === void 0 && s === void 0 && u === void 0) return e.alpha >= 1 ? (0, i.default)(e.red, e.green, e.blue) : "rgba(" + e.red + "," + e.green + "," + e.blue + "," + e.alpha + ")";
649
+ if (typeof e == "number" && typeof i == "number" && typeof s == "number" && typeof l == "number") return l >= 1 ? (0, d.default)(e, i, s) : "rgba(" + e + "," + i + "," + s + "," + l + ")";
650
+ if (typeof e == "object" && i === void 0 && s === void 0 && l === void 0) return e.alpha >= 1 ? (0, d.default)(e.red, e.green, e.blue) : "rgba(" + e.red + "," + e.green + "," + e.blue + "," + e.alpha + ")";
635
651
  throw new o.default(7);
636
652
  };
637
- var n = r(de), i = r(Ee), o = r(S);
638
- function r(e) {
653
+ var r = n(ue), d = n(Ee), o = n(k);
654
+ function n(e) {
639
655
  return e && e.__esModule ? e : { default: e };
640
656
  }
641
657
  a.exports = t.default;
@@ -644,21 +660,21 @@ var Ve = ae.exports;
644
660
  (function(a, t) {
645
661
  t.__esModule = !0, t.default = function(f) {
646
662
  if (typeof f != "object") throw new e.default(8);
647
- if (u(f)) return (0, r.default)(f);
663
+ if (l(f)) return (0, n.default)(f);
648
664
  if (s(f)) return (0, o.default)(f);
649
- if (c(f)) return (0, i.default)(f);
650
- if (d(f)) return (0, n.default)(f);
665
+ if (c(f)) return (0, d.default)(f);
666
+ if (u(f)) return (0, r.default)(f);
651
667
  throw new e.default(8);
652
668
  };
653
- var n = l(Ue), i = l(Ge), o = l(Ee), r = l(Ve), e = l(S);
654
- function l(f) {
669
+ var r = i(Ue), d = i(Ge), o = i(Ee), n = i(Ve), e = i(k);
670
+ function i(f) {
655
671
  return f && f.__esModule ? f : { default: f };
656
672
  }
657
673
  var s = function(f) {
658
674
  return typeof f.red == "number" && typeof f.green == "number" && typeof f.blue == "number" && (typeof f.alpha != "number" || f.alpha === void 0);
659
- }, u = function(f) {
675
+ }, l = function(f) {
660
676
  return typeof f.red == "number" && typeof f.green == "number" && typeof f.blue == "number" && typeof f.alpha == "number";
661
- }, d = function(f) {
677
+ }, u = function(f) {
662
678
  return typeof f.hue == "number" && typeof f.saturation == "number" && typeof f.lightness == "number" && (typeof f.alpha != "number" || f.alpha === void 0);
663
679
  }, c = function(f) {
664
680
  return typeof f.hue == "number" && typeof f.saturation == "number" && typeof f.lightness == "number" && typeof f.alpha == "number";
@@ -668,111 +684,111 @@ var Ve = ae.exports;
668
684
  var Ae = Z.exports;
669
685
  (function(a, t) {
670
686
  t.__esModule = !0, t.default = void 0;
671
- var n = e(we), i = e(xe), o = e(Se), r = e(Ae);
672
- function e(u) {
673
- return u && u.__esModule ? u : { default: u };
674
- }
675
- function l() {
676
- return l = Object.assign ? Object.assign.bind() : function(u) {
677
- for (var d = 1; d < arguments.length; d++) {
678
- var c = arguments[d];
679
- for (var f in c) Object.prototype.hasOwnProperty.call(c, f) && (u[f] = c[f]);
687
+ var r = e(we), d = e(xe), o = e(ke), n = e(Ae);
688
+ function e(l) {
689
+ return l && l.__esModule ? l : { default: l };
690
+ }
691
+ function i() {
692
+ return i = Object.assign ? Object.assign.bind() : function(l) {
693
+ for (var u = 1; u < arguments.length; u++) {
694
+ var c = arguments[u];
695
+ for (var f in c) Object.prototype.hasOwnProperty.call(c, f) && (l[f] = c[f]);
680
696
  }
681
- return u;
682
- }, l.apply(this, arguments);
697
+ return l;
698
+ }, i.apply(this, arguments);
683
699
  }
684
- var s = (0, n.default)(function(u, d) {
685
- if (d === "transparent") return d;
686
- var c = (0, o.default)(d);
687
- return (0, r.default)(l({}, c, { lightness: (0, i.default)(0, 1, c.lightness - parseFloat(u)) }));
700
+ var s = (0, r.default)(function(l, u) {
701
+ if (u === "transparent") return u;
702
+ var c = (0, o.default)(u);
703
+ return (0, n.default)(i({}, c, { lightness: (0, d.default)(0, 1, c.lightness - parseFloat(l)) }));
688
704
  });
689
705
  t.default = s, a.exports = t.default;
690
706
  })(Y, Y.exports);
691
- const Ze = ue(Y.exports);
707
+ const Ze = de(Y.exports);
692
708
  var oe = { exports: {} };
693
709
  (function(a, t) {
694
710
  t.__esModule = !0, t.default = void 0;
695
- var n = e(we), i = e(xe), o = e(Se), r = e(Ae);
696
- function e(u) {
697
- return u && u.__esModule ? u : { default: u };
698
- }
699
- function l() {
700
- return l = Object.assign ? Object.assign.bind() : function(u) {
701
- for (var d = 1; d < arguments.length; d++) {
702
- var c = arguments[d];
703
- for (var f in c) Object.prototype.hasOwnProperty.call(c, f) && (u[f] = c[f]);
711
+ var r = e(we), d = e(xe), o = e(ke), n = e(Ae);
712
+ function e(l) {
713
+ return l && l.__esModule ? l : { default: l };
714
+ }
715
+ function i() {
716
+ return i = Object.assign ? Object.assign.bind() : function(l) {
717
+ for (var u = 1; u < arguments.length; u++) {
718
+ var c = arguments[u];
719
+ for (var f in c) Object.prototype.hasOwnProperty.call(c, f) && (l[f] = c[f]);
704
720
  }
705
- return u;
706
- }, l.apply(this, arguments);
721
+ return l;
722
+ }, i.apply(this, arguments);
707
723
  }
708
- var s = (0, n.default)(function(u, d) {
709
- if (d === "transparent") return d;
710
- var c = (0, o.default)(d);
711
- return (0, r.default)(l({}, c, { lightness: (0, i.default)(0, 1, c.lightness + parseFloat(u)) }));
724
+ var s = (0, r.default)(function(l, u) {
725
+ if (u === "transparent") return u;
726
+ var c = (0, o.default)(u);
727
+ return (0, n.default)(i({}, c, { lightness: (0, d.default)(0, 1, c.lightness + parseFloat(l)) }));
712
728
  });
713
729
  t.default = s, a.exports = t.default;
714
730
  })(oe, oe.exports);
715
- const Qe = ue(oe.exports);
731
+ const Qe = de(oe.exports);
716
732
  function Xe(a) {
717
733
  if (!document.querySelector("style[data-widget-styles]")) {
718
- var t, n;
734
+ var t, r;
719
735
  (function() {
720
- let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "#000", o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "FFF";
721
- const r = document.createElement("style");
722
- r.attributes.setNamedItem(document.createAttribute("data-widget-styles"));
723
- const e = Ye(i) > 0.5;
724
- r.textContent = `
736
+ let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "#000", o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "FFF";
737
+ const n = document.createElement("style");
738
+ n.attributes.setNamedItem(document.createAttribute("data-widget-styles"));
739
+ const e = Ye(d) > 0.5;
740
+ n.textContent = `
725
741
  .bf-trigger-button{position:fixed;bottom:16px;right:16px;width:56px;height:56px;border-radius:50%;border:none;box-shadow:0 20px 25px -5px #1212171a,0 10px 10px -5px #1212170a;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:1000;padding:12px;gap:10px;overflow:hidden}.bf-trigger-button.hidden{display:none}.trigger-button-icon{width:36px;height:36px;position:relative}.trigger-button-icon svg{width:100%;height:100%;position:absolute;inset:0}.trigger-button-icon>svg>path{transition:transform .3s ease,opacity .3s ease;transform:scale(.5);transform-origin:center;opacity:0}.trigger-button-icon svg.visible{display:block}.trigger-button-icon>svg.visible>path{opacity:1;transform:scale(1)}.trigger-iframe{position:relative;width:100%;height:100%;border:none;outline:none;transform:translateZ(0)}.bf-iframe-container{position:fixed;bottom:0;right:0;width:100vw;height:100vh;border:none;overflow:hidden;z-index:999;opacity:0;pointer-events:none;transform:translateY(20px);transition:opacity .3s ease,transform .3s ease,width .2s ease-in-out,height .2s ease-in-out}.bf-iframe-container.open{opacity:1;transform:translateY(0);pointer-events:auto;top:0;left:0}@media (min-width: 576px){.bf-iframe-container{bottom:80px;right:24px;width:448px;height:min(750px,calc(100vh - 80px));border-radius:8px;border:1px solid var(--Dark-300, #D4D4D4);box-shadow:0 20px 25px -5px #1212171a,0 10px 10px -5px #1212170a}.bf-iframe-container.open{top:unset;left:unset}.bf-iframe-container.expanded{width:min(calc(448px * 1.35),calc(100vw - 16px));height:min(calc(750px * 1.35),calc(100vh - 80px))}}
726
- .${F} { background: ${i}; }
727
- .${F}:hover {
728
- background: ${e ? Ze(0.05, i) : Qe(0.05, i)};
742
+ .${T} { background: ${d}; }
743
+ .${T}:hover {
744
+ background: ${e ? Ze(0.05, d) : Qe(0.05, d)};
729
745
  }
730
746
  .trigger-button-icon { color: ${o}; }
731
- `, document.head.appendChild(r);
732
- })((a == null || (t = a.theme) === null || t === void 0 ? void 0 : t.inputButtonBgColor) || "#007bff", (a == null || (n = a.theme) === null || n === void 0 ? void 0 : n.textBaseColor) || "#ffffff");
747
+ `, document.head.appendChild(n);
748
+ })((a == null || (t = a.theme) === null || t === void 0 ? void 0 : t.inputButtonBgColor) || "#007bff", (a == null || (r = a.theme) === null || r === void 0 ? void 0 : r.textBaseColor) || "#ffffff");
733
749
  }
734
750
  }
735
751
  function et(a, t) {
736
- const n = () => {
737
- ((i) => {
752
+ const r = () => {
753
+ ((d) => {
738
754
  var o;
739
- (o = a.contentWindow) === null || o === void 0 || o.postMessage({ type: "UPDATE_BODY_CLASS", isDarkMode: i }, "*");
755
+ (o = a.contentWindow) === null || o === void 0 || o.postMessage({ type: "UPDATE_BODY_CLASS", isDarkMode: d }, "*");
740
756
  })(document.body.classList.contains("dark"));
741
757
  };
742
- n(), (() => {
743
- const i = new MutationObserver(n);
744
- i.observe(document.body, { attributes: !0, attributeFilter: ["class"] }), t.addEventListener("abort", () => i.disconnect());
758
+ r(), (() => {
759
+ const d = new MutationObserver(r);
760
+ d.observe(document.body, { attributes: !0, attributeFilter: ["class"] }), t.addEventListener("abort", () => d.disconnect());
745
761
  })();
746
762
  }
747
763
  function tt(a, t) {
748
- let n;
749
- const i = () => {
750
- ((r) => {
764
+ let r;
765
+ const d = () => {
766
+ ((n) => {
751
767
  var e;
752
- const l = { type: "UPDATE_BODY_CLASS", isMobile: r };
753
- (e = a.contentWindow) === null || e === void 0 || e.postMessage(l, "*"), r && (v.isWidgetOpen ? v.hideTriggerButton() : v.showTriggerButton());
768
+ const i = { type: "UPDATE_BODY_CLASS", isMobile: n };
769
+ (e = a.contentWindow) === null || e === void 0 || e.postMessage(i, "*"), n && (v.isWidgetOpen ? v.hideTriggerButton() : v.showTriggerButton());
754
770
  })(document.body.clientWidth <= 576);
755
771
  }, o = () => {
756
- n && clearTimeout(n), n = window.setTimeout(i, 300);
772
+ r && clearTimeout(r), r = window.setTimeout(d, 300);
757
773
  };
758
- i(), (() => {
759
- const r = new ResizeObserver(o);
760
- r.observe(document.body), t.addEventListener("abort", () => r.disconnect());
774
+ d(), (() => {
775
+ const n = new ResizeObserver(o);
776
+ n.observe(document.body), t.addEventListener("abort", () => n.disconnect());
761
777
  })();
762
778
  }
763
779
  function be(a) {
764
780
  const t = new TextEncoder().encode(a);
765
781
  if (typeof window != "undefined" && typeof window.btoa == "function") {
766
- const n = Array.from(t, (i) => String.fromCharCode(i)).join("");
767
- return btoa(n);
782
+ const r = Array.from(t, (d) => String.fromCharCode(d)).join("");
783
+ return btoa(r);
768
784
  }
769
785
  if (typeof Buffer != "undefined") return Buffer.from(t).toString("base64");
770
786
  throw new Error("[utils.base64Encode]: Unsupported environment");
771
787
  }
772
788
  const ve = /* @__PURE__ */ new Set();
773
789
  function nt(a, t) {
774
- const n = document.createDocumentFragment(), i = function(e) {
775
- const l = M("button", F, { id: `trigger-button-${e}`, "aria-controls": j, "aria-expanded": "false", "data-name": F }), s = M("div", "trigger-button-icon", { "aria-hidden": "true" });
790
+ const r = document.createDocumentFragment(), d = function(e) {
791
+ const i = M("button", T, { id: `trigger-button-${e}`, "aria-controls": j, "aria-expanded": "false", "data-name": T }), s = M("div", "trigger-button-icon", { "aria-hidden": "true" });
776
792
  return s.innerHTML = `
777
793
  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" viewBox="0 0 256 256" class="close-icon">
778
794
  <path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"></path>
@@ -780,107 +796,107 @@ function nt(a, t) {
780
796
  <svg width="24" height="14" viewBox="0 0 24 14" fill="none" xmlns="http://www.w3.org/2000/svg" class="fish-icon visible">
781
797
  <path fill-rule="evenodd" clip-rule="evenodd" d="M1.71844 10.3882L4.60606 6.98384L1.71844 3.58375C1.4014 3.21362 1.44424 2.65841 1.81269 2.33993C1.97978 2.1979 2.65242 1.98701 3.04657 2.43461L5.78425 5.65824C6.14281 5.29523 6.51693 4.95924 6.90479 4.65114C8.88976 3.07437 11.2345 2.22803 13.6931 2.22803C16.9492 2.22803 20.0039 3.71718 22.2917 6.41142C22.5702 6.74282 22.5702 7.22916 22.2917 7.56056C20.0039 10.2591 16.9492 11.744 13.6931 11.744C11.2348 11.744 8.89035 10.8948 6.90554 9.31995C6.51741 9.01199 6.14304 8.67628 5.78425 8.31374L3.04657 11.5374C2.72953 11.9075 2.18114 11.9505 1.81269 11.632C1.44852 11.3179 1.40568 10.7584 1.71844 10.3882ZM5.93026 10.4683C8.17161 12.2599 10.8546 13.25 13.6931 13.25C17.4881 13.25 21.019 11.4034 23.4447 8.52942C24.1873 7.64571 24.1843 6.31801 23.4397 5.43663C20.8944 2.43919 17.4337 0.722025 13.6931 0.722025C10.8555 0.722025 8.17194 1.70845 5.92952 3.50276L4.17682 1.43933C3.57943 0.760929 2.79325 0.630009 2.25286 0.662947C1.98116 0.679506 1.73125 0.736852 1.51895 0.811846C1.26839 0.900352 1.03017 1.02718 0.827835 1.20058C-0.165283 2.05903 -0.283916 3.561 0.574656 4.56345L2.63075 6.98445L0.568104 9.41623C-0.272133 10.4106 -0.166523 11.9125 0.827835 12.7714C1.81372 13.6243 3.34308 13.5062 4.19036 12.5171L5.93026 10.4683Z" fill="currentColor"/>
782
798
  </svg>
783
- `, l.setAttribute("aria-label", "Open Brainfish widget"), l.appendChild(s), v.initialize(l, s), l;
784
- }(a), { iframeContainer: o, iframe: r } = function(e) {
785
- const l = M("div", j, { id: j, "aria-live": "polite", "aria-hidden": "true" }), s = M("iframe", "trigger-iframe", { src: e, sandbox: "allow-scripts allow-same-origin allow-popups allow-forms", allow: "clipboard-write", role: "dialog" });
786
- return l.appendChild(s), { iframeContainer: l, iframe: s };
799
+ `, i.setAttribute("aria-label", "Open Brainfish widget"), i.appendChild(s), v.initialize(i, s), i;
800
+ }(a), { iframeContainer: o, iframe: n } = function(e) {
801
+ const i = M("div", j, { id: j, "aria-live": "polite", "aria-hidden": "true" }), s = M("iframe", "trigger-iframe", { src: e, sandbox: "allow-scripts allow-same-origin allow-popups allow-forms", allow: "clipboard-write", role: "dialog" });
802
+ return i.appendChild(s), { iframeContainer: i, iframe: s };
787
803
  }(t);
788
- return n.appendChild(i), n.appendChild(o), { fragment: n, iframe: r };
804
+ return r.appendChild(d), r.appendChild(o), { fragment: r, iframe: n };
789
805
  }
790
806
  const rt = (a, t) => {
791
- const n = se(a.overrides), i = ((o = a.overrides) == null ? void 0 : o.widgetHost) || "https://agent.brainfi.sh";
807
+ const r = se(a.overrides), d = ((o = a.overrides) == null ? void 0 : o.widgetHost) || "https://agent.brainfi.sh";
792
808
  var o;
793
- const { theme: r, settings: e } = t, l = `${i}/?widgetKey=${a.widgetKey}&themeParam=${be(JSON.stringify(r))}&settingsParam=${be(JSON.stringify(e))}`;
809
+ const { theme: n, settings: e } = t, i = `${d}/?widgetKey=${a.widgetKey}&themeParam=${be(JSON.stringify(n))}&settingsParam=${be(JSON.stringify(e))}`;
794
810
  try {
795
- if (s = a.widgetKey, ve.has(s) || function(g) {
796
- return !!document.getElementById(`trigger-button-${g}`);
811
+ if (s = a.widgetKey, ve.has(s) || function(h) {
812
+ return !!document.getElementById(`trigger-button-${h}`);
797
813
  }(a.widgetKey)) return;
798
814
  Xe(t);
799
- const { fragment: u, iframe: d } = nt(a.widgetKey, l), c = new AbortController(), { signal: f } = c;
800
- d.onload = () => {
815
+ const { fragment: l, iframe: u } = nt(a.widgetKey, i), c = new AbortController(), { signal: f } = c;
816
+ u.onload = () => {
801
817
  setTimeout(() => {
802
- et(d, f), Re(i, f), tt(d, f);
818
+ et(u, f), De({ widgetHost: d, apiHost: r, widgetKey: a.widgetKey, signal: f }), tt(u, f);
803
819
  }, 0);
804
- }, document.body.appendChild(u), ve.add(a.widgetKey);
805
- const h = () => {
806
- c.abort(), window.removeEventListener("beforeunload", h);
820
+ }, document.body.appendChild(l), ve.add(a.widgetKey);
821
+ const g = () => {
822
+ c.abort(), window.removeEventListener("beforeunload", g);
807
823
  };
808
- return void window.addEventListener("beforeunload", h);
809
- } catch (u) {
810
- (function(d, c, f) {
811
- x(d, c, c.message, f);
812
- })(n, u, a.widgetKey);
824
+ return void window.addEventListener("beforeunload", g);
825
+ } catch (l) {
826
+ (function(u, c, f) {
827
+ x(u, c, c.message, f);
828
+ })(r, l, a.widgetKey);
813
829
  }
814
830
  var s;
815
831
  };
816
832
  let P = null;
817
833
  const ye = typeof window != "undefined" && window.Brainfish ? window.Brainfish : (P || (P = /* @__PURE__ */ function() {
818
834
  let a = [], t = null;
819
- function n(o, r) {
835
+ function r(o, n) {
820
836
  if (t) {
821
837
  const e = o.split(".");
822
- let l = t;
823
- for (let u = 0; u < e.length - 1; u++) l = l[e[u]];
824
- const s = l[e[e.length - 1]];
825
- if (typeof s == "function") return s.apply(l, r);
826
- } else a.push([o, r]);
838
+ let i = t;
839
+ for (let l = 0; l < e.length - 1; l++) i = i[e[l]];
840
+ const s = i[e[e.length - 1]];
841
+ if (typeof s == "function") return s.apply(i, n);
842
+ } else a.push([o, n]);
827
843
  }
828
844
  return { Widgets: { init: function() {
829
- for (var o = arguments.length, r = new Array(o), e = 0; e < o; e++) r[e] = arguments[e];
830
- return n("Widgets.init", r);
845
+ for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
846
+ return r("Widgets.init", n);
831
847
  } }, SearchWidget: { initStandard: function() {
832
- for (var o = arguments.length, r = new Array(o), e = 0; e < o; e++) r[e] = arguments[e];
833
- return n("SearchWidget.initStandard", r);
848
+ for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
849
+ return r("SearchWidget.initStandard", n);
834
850
  } }, HelpWidget: { initPopup: function() {
835
- for (var o = arguments.length, r = new Array(o), e = 0; e < o; e++) r[e] = arguments[e];
836
- return n("HelpWidget.initPopup", r);
851
+ for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
852
+ return r("HelpWidget.initPopup", n);
837
853
  }, close: function() {
838
- for (var o = arguments.length, r = new Array(o), e = 0; e < o; e++) r[e] = arguments[e];
839
- return n("HelpWidget.close", r);
854
+ for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
855
+ return r("HelpWidget.close", n);
840
856
  }, open: function() {
841
- for (var o = arguments.length, r = new Array(o), e = 0; e < o; e++) r[e] = arguments[e];
842
- return n("HelpWidget.open", r);
857
+ for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
858
+ return r("HelpWidget.open", n);
843
859
  }, toggle: function() {
844
- for (var o = arguments.length, r = new Array(o), e = 0; e < o; e++) r[e] = arguments[e];
845
- return n("HelpWidget.toggle", r);
860
+ for (var o = arguments.length, n = new Array(o), e = 0; e < o; e++) n[e] = arguments[e];
861
+ return r("HelpWidget.toggle", n);
846
862
  } }, _setRealBrainfish: function(o) {
847
863
  for (t = o; a.length > 0; ) {
848
- const [r, e] = a.shift();
849
- n(r, e);
864
+ const [n, e] = a.shift();
865
+ r(n, e);
850
866
  }
851
867
  } };
852
868
  }(), typeof window != "undefined" && (window.Brainfish = P)), P);
853
- let K = null;
869
+ let W = null;
854
870
  ye.Widgets.init = (a) => m(void 0, null, function* () {
855
871
  window && (window.BrainfishAnalytics = window.BrainfishAnalytics || function() {
856
- for (var r = arguments.length, e = new Array(r), l = 0; l < r; l++) e[l] = arguments[l];
872
+ for (var n = arguments.length, e = new Array(n), i = 0; i < n; i++) e[i] = arguments[i];
857
873
  (window.BrainfishAnalytics.q = window.BrainfishAnalytics.q || []).push(e);
858
874
  });
859
- const t = se(a.overrides), n = ((i = a.overrides) == null ? void 0 : i.analyticsApiHost) || "";
860
- var i;
875
+ const t = se(a.overrides), r = ((d = a.overrides) == null ? void 0 : d.analyticsApiHost) || "";
876
+ var d;
861
877
  let o;
862
- if (a.config) o = JSON.parse(((r) => {
878
+ if (a.config) o = JSON.parse(((n) => {
863
879
  if (typeof window != "undefined" && typeof window.atob == "function") {
864
- const e = atob(r), l = e.length, s = new Uint8Array(l);
865
- for (let u = 0; u < l; u++) s[u] = e.charCodeAt(u);
880
+ const e = atob(n), i = e.length, s = new Uint8Array(i);
881
+ for (let l = 0; l < i; l++) s[l] = e.charCodeAt(l);
866
882
  return new TextDecoder().decode(s);
867
883
  }
868
- if (typeof Buffer != "undefined") return Buffer.from(r, "base64").toString("utf-8");
884
+ if (typeof Buffer != "undefined") return Buffer.from(n, "base64").toString("utf-8");
869
885
  throw new Error("[utils.base64Decode]: Unsupported environment");
870
886
  })(a.config));
871
887
  else {
872
- const { config: r } = yield Ke({ widgetKey: a.widgetKey, apiHost: t });
873
- o = r;
888
+ const { config: n } = yield We({ widgetKey: a.widgetKey, apiHost: t });
889
+ o = n;
874
890
  }
875
- K || (K = function(r, e, l, s) {
891
+ W || (W = function(n, e, i, s) {
876
892
  return m(this, null, function* () {
877
- var u, d, c;
878
- const f = ((u = r.overrides) === null || u === void 0 ? void 0 : u.enableRecording) || (e == null || (d = e.settings) === null || d === void 0 ? void 0 : d.enableRecording) || !1, h = ((c = r.overrides) === null || c === void 0 ? void 0 : c.version) || (e == null ? void 0 : e.version), g = [];
879
- h != null && h.startsWith("2.") ? rt(r, e) : g.push(qe(r, e)), g.push(De(r.widgetKey, e.trackingToken || "", l, s, f));
880
- const [p] = yield Promise.allSettled(g);
893
+ var l, u, c;
894
+ const f = ((l = n.overrides) === null || l === void 0 ? void 0 : l.enableRecording) || (e == null || (u = e.settings) === null || u === void 0 ? void 0 : u.enableRecording) || !1, g = ((c = n.overrides) === null || c === void 0 ? void 0 : c.version) || (e == null ? void 0 : e.version), h = [];
895
+ g != null && g.startsWith("2.") ? rt(n, e) : h.push(Ne(n, e)), h.push(qe(n.widgetKey, e.trackingToken || "", i, s, f));
896
+ const [p] = yield Promise.allSettled(h);
881
897
  p && p.status === "fulfilled" && p.value && ye._setRealBrainfish(p.value);
882
898
  });
883
- }(a, o, t, n)), yield K;
899
+ }(a, o, t, r)), yield W;
884
900
  });
885
901
  const ot = function() {
886
902
  typeof window != "undefined" && window.BrainfishAnalytics && window.BrainfishAnalytics(...arguments);