botframework-webchat-fluent-theme 4.17.0-main.20240411.647b269 → 4.17.0-main.20240411.ff34969

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.
Files changed (51) hide show
  1. package/dist/botframework-webchat-fluent-theme.development.js +4081 -0
  2. package/dist/botframework-webchat-fluent-theme.development.js.map +1 -0
  3. package/dist/botframework-webchat-fluent-theme.production.min.js +8 -16
  4. package/dist/botframework-webchat-fluent-theme.production.min.js.map +1 -1
  5. package/dist/index.js +1350 -16
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +13 -4
  9. package/src/bundle.ts +9 -2
  10. package/src/components/DropZone.tsx +3 -0
  11. package/src/components/SendBox.tsx +3 -0
  12. package/src/components/SuggestedActions.tsx +3 -0
  13. package/src/components/TelephoneKeypad.tsx +1 -0
  14. package/src/components/Theme.tsx +71 -0
  15. package/src/components/dropZone/index.tsx +132 -0
  16. package/src/components/sendbox/AddAttachmentButton.tsx +77 -0
  17. package/src/components/sendbox/Attachments.tsx +40 -0
  18. package/src/components/sendbox/ErrorMessage.tsx +26 -0
  19. package/src/components/sendbox/TelephoneKeypadToolbarButton.tsx +30 -0
  20. package/src/components/sendbox/TextArea.tsx +146 -0
  21. package/src/components/sendbox/Toolbar.tsx +115 -0
  22. package/src/components/sendbox/index.tsx +234 -0
  23. package/src/components/sendbox/private/useSubmitError.ts +46 -0
  24. package/src/components/sendbox/private/useUniqueId.ts +13 -0
  25. package/src/components/suggestedActions/AccessibleButton.tsx +59 -0
  26. package/src/components/suggestedActions/SuggestedAction.tsx +129 -0
  27. package/src/components/suggestedActions/index.tsx +103 -0
  28. package/src/components/suggestedActions/private/computeSuggestedActionText.ts +21 -0
  29. package/src/components/telephoneKeypad/Provider.tsx +22 -0
  30. package/src/components/telephoneKeypad/Surrogate.tsx +13 -0
  31. package/src/components/telephoneKeypad/index.ts +6 -0
  32. package/src/components/telephoneKeypad/private/Button.tsx +107 -0
  33. package/src/components/telephoneKeypad/private/Context.ts +18 -0
  34. package/src/components/telephoneKeypad/private/TelephoneKeypad.tsx +168 -0
  35. package/src/components/telephoneKeypad/types.ts +1 -0
  36. package/src/components/telephoneKeypad/useShown.ts +9 -0
  37. package/src/external.umd/botframework-webchat-api.ts +3 -0
  38. package/src/external.umd/botframework-webchat-component.ts +4 -0
  39. package/src/external.umd/react.ts +1 -0
  40. package/src/icons/AddDocumentIcon.tsx +20 -0
  41. package/src/icons/AttachmentIcon.tsx +20 -0
  42. package/src/icons/SendIcon.tsx +20 -0
  43. package/src/icons/TelephoneKeypad.tsx +20 -0
  44. package/src/index.ts +2 -1
  45. package/src/private/FluentThemeProvider.tsx +11 -7
  46. package/src/private/useStyleToEmotionObject.ts +32 -0
  47. package/src/styles/index.ts +15 -0
  48. package/src/testIds.ts +21 -0
  49. package/src/types/PropsOf.ts +7 -0
  50. package/src/external/ThemeProvider.tsx +0 -16
  51. package/src/private/SendBox.tsx +0 -7
@@ -0,0 +1,4081 @@
1
+ "use strict";
2
+ (() => {
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJS = (cb, mod) => function __require() {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
+ };
12
+ var __copyProps = (to, from2, except, desc) => {
13
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
14
+ for (let key of __getOwnPropNames(from2))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+
29
+ // src/external.umd/botframework-webchat-component.ts
30
+ var require_botframework_webchat_component = __commonJS({
31
+ "src/external.umd/botframework-webchat-component.ts"(exports, module) {
32
+ module.exports = {
33
+ Components: globalThis.WebChat.Components,
34
+ hooks: globalThis.WebChat.hooks
35
+ };
36
+ }
37
+ });
38
+
39
+ // src/external.umd/react.ts
40
+ var require_react = __commonJS({
41
+ "src/external.umd/react.ts"(exports, module) {
42
+ module.exports = globalThis.React;
43
+ }
44
+ });
45
+
46
+ // node_modules/core-js-pure/internals/global.js
47
+ var require_global = __commonJS({
48
+ "node_modules/core-js-pure/internals/global.js"(exports, module) {
49
+ "use strict";
50
+ var check = function(it) {
51
+ return it && it.Math === Math && it;
52
+ };
53
+ module.exports = // eslint-disable-next-line es/no-global-this -- safe
54
+ check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
55
+ check(typeof self == "object" && self) || check(typeof global == "object" && global) || check(typeof exports == "object" && exports) || // eslint-disable-next-line no-new-func -- fallback
56
+ /* @__PURE__ */ function() {
57
+ return this;
58
+ }() || Function("return this")();
59
+ }
60
+ });
61
+
62
+ // node_modules/core-js-pure/internals/fails.js
63
+ var require_fails = __commonJS({
64
+ "node_modules/core-js-pure/internals/fails.js"(exports, module) {
65
+ "use strict";
66
+ module.exports = function(exec) {
67
+ try {
68
+ return !!exec();
69
+ } catch (error) {
70
+ return true;
71
+ }
72
+ };
73
+ }
74
+ });
75
+
76
+ // node_modules/core-js-pure/internals/function-bind-native.js
77
+ var require_function_bind_native = __commonJS({
78
+ "node_modules/core-js-pure/internals/function-bind-native.js"(exports, module) {
79
+ "use strict";
80
+ var fails = require_fails();
81
+ module.exports = !fails(function() {
82
+ var test = (function() {
83
+ }).bind();
84
+ return typeof test != "function" || test.hasOwnProperty("prototype");
85
+ });
86
+ }
87
+ });
88
+
89
+ // node_modules/core-js-pure/internals/function-apply.js
90
+ var require_function_apply = __commonJS({
91
+ "node_modules/core-js-pure/internals/function-apply.js"(exports, module) {
92
+ "use strict";
93
+ var NATIVE_BIND = require_function_bind_native();
94
+ var FunctionPrototype = Function.prototype;
95
+ var apply = FunctionPrototype.apply;
96
+ var call = FunctionPrototype.call;
97
+ module.exports = typeof Reflect == "object" && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
98
+ return call.apply(apply, arguments);
99
+ });
100
+ }
101
+ });
102
+
103
+ // node_modules/core-js-pure/internals/function-uncurry-this.js
104
+ var require_function_uncurry_this = __commonJS({
105
+ "node_modules/core-js-pure/internals/function-uncurry-this.js"(exports, module) {
106
+ "use strict";
107
+ var NATIVE_BIND = require_function_bind_native();
108
+ var FunctionPrototype = Function.prototype;
109
+ var call = FunctionPrototype.call;
110
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
111
+ module.exports = NATIVE_BIND ? uncurryThisWithBind : function(fn) {
112
+ return function() {
113
+ return call.apply(fn, arguments);
114
+ };
115
+ };
116
+ }
117
+ });
118
+
119
+ // node_modules/core-js-pure/internals/classof-raw.js
120
+ var require_classof_raw = __commonJS({
121
+ "node_modules/core-js-pure/internals/classof-raw.js"(exports, module) {
122
+ "use strict";
123
+ var uncurryThis = require_function_uncurry_this();
124
+ var toString = uncurryThis({}.toString);
125
+ var stringSlice = uncurryThis("".slice);
126
+ module.exports = function(it) {
127
+ return stringSlice(toString(it), 8, -1);
128
+ };
129
+ }
130
+ });
131
+
132
+ // node_modules/core-js-pure/internals/function-uncurry-this-clause.js
133
+ var require_function_uncurry_this_clause = __commonJS({
134
+ "node_modules/core-js-pure/internals/function-uncurry-this-clause.js"(exports, module) {
135
+ "use strict";
136
+ var classofRaw = require_classof_raw();
137
+ var uncurryThis = require_function_uncurry_this();
138
+ module.exports = function(fn) {
139
+ if (classofRaw(fn) === "Function")
140
+ return uncurryThis(fn);
141
+ };
142
+ }
143
+ });
144
+
145
+ // node_modules/core-js-pure/internals/is-callable.js
146
+ var require_is_callable = __commonJS({
147
+ "node_modules/core-js-pure/internals/is-callable.js"(exports, module) {
148
+ "use strict";
149
+ var documentAll = typeof document == "object" && document.all;
150
+ module.exports = typeof documentAll == "undefined" && documentAll !== void 0 ? function(argument) {
151
+ return typeof argument == "function" || argument === documentAll;
152
+ } : function(argument) {
153
+ return typeof argument == "function";
154
+ };
155
+ }
156
+ });
157
+
158
+ // node_modules/core-js-pure/internals/descriptors.js
159
+ var require_descriptors = __commonJS({
160
+ "node_modules/core-js-pure/internals/descriptors.js"(exports, module) {
161
+ "use strict";
162
+ var fails = require_fails();
163
+ module.exports = !fails(function() {
164
+ return Object.defineProperty({}, 1, { get: function() {
165
+ return 7;
166
+ } })[1] !== 7;
167
+ });
168
+ }
169
+ });
170
+
171
+ // node_modules/core-js-pure/internals/function-call.js
172
+ var require_function_call = __commonJS({
173
+ "node_modules/core-js-pure/internals/function-call.js"(exports, module) {
174
+ "use strict";
175
+ var NATIVE_BIND = require_function_bind_native();
176
+ var call = Function.prototype.call;
177
+ module.exports = NATIVE_BIND ? call.bind(call) : function() {
178
+ return call.apply(call, arguments);
179
+ };
180
+ }
181
+ });
182
+
183
+ // node_modules/core-js-pure/internals/object-property-is-enumerable.js
184
+ var require_object_property_is_enumerable = __commonJS({
185
+ "node_modules/core-js-pure/internals/object-property-is-enumerable.js"(exports) {
186
+ "use strict";
187
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
188
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
189
+ var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
190
+ exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
191
+ var descriptor = getOwnPropertyDescriptor(this, V);
192
+ return !!descriptor && descriptor.enumerable;
193
+ } : $propertyIsEnumerable;
194
+ }
195
+ });
196
+
197
+ // node_modules/core-js-pure/internals/create-property-descriptor.js
198
+ var require_create_property_descriptor = __commonJS({
199
+ "node_modules/core-js-pure/internals/create-property-descriptor.js"(exports, module) {
200
+ "use strict";
201
+ module.exports = function(bitmap, value) {
202
+ return {
203
+ enumerable: !(bitmap & 1),
204
+ configurable: !(bitmap & 2),
205
+ writable: !(bitmap & 4),
206
+ value
207
+ };
208
+ };
209
+ }
210
+ });
211
+
212
+ // node_modules/core-js-pure/internals/indexed-object.js
213
+ var require_indexed_object = __commonJS({
214
+ "node_modules/core-js-pure/internals/indexed-object.js"(exports, module) {
215
+ "use strict";
216
+ var uncurryThis = require_function_uncurry_this();
217
+ var fails = require_fails();
218
+ var classof = require_classof_raw();
219
+ var $Object = Object;
220
+ var split = uncurryThis("".split);
221
+ module.exports = fails(function() {
222
+ return !$Object("z").propertyIsEnumerable(0);
223
+ }) ? function(it) {
224
+ return classof(it) === "String" ? split(it, "") : $Object(it);
225
+ } : $Object;
226
+ }
227
+ });
228
+
229
+ // node_modules/core-js-pure/internals/is-null-or-undefined.js
230
+ var require_is_null_or_undefined = __commonJS({
231
+ "node_modules/core-js-pure/internals/is-null-or-undefined.js"(exports, module) {
232
+ "use strict";
233
+ module.exports = function(it) {
234
+ return it === null || it === void 0;
235
+ };
236
+ }
237
+ });
238
+
239
+ // node_modules/core-js-pure/internals/require-object-coercible.js
240
+ var require_require_object_coercible = __commonJS({
241
+ "node_modules/core-js-pure/internals/require-object-coercible.js"(exports, module) {
242
+ "use strict";
243
+ var isNullOrUndefined = require_is_null_or_undefined();
244
+ var $TypeError = TypeError;
245
+ module.exports = function(it) {
246
+ if (isNullOrUndefined(it))
247
+ throw new $TypeError("Can't call method on " + it);
248
+ return it;
249
+ };
250
+ }
251
+ });
252
+
253
+ // node_modules/core-js-pure/internals/to-indexed-object.js
254
+ var require_to_indexed_object = __commonJS({
255
+ "node_modules/core-js-pure/internals/to-indexed-object.js"(exports, module) {
256
+ "use strict";
257
+ var IndexedObject = require_indexed_object();
258
+ var requireObjectCoercible = require_require_object_coercible();
259
+ module.exports = function(it) {
260
+ return IndexedObject(requireObjectCoercible(it));
261
+ };
262
+ }
263
+ });
264
+
265
+ // node_modules/core-js-pure/internals/is-object.js
266
+ var require_is_object = __commonJS({
267
+ "node_modules/core-js-pure/internals/is-object.js"(exports, module) {
268
+ "use strict";
269
+ var isCallable = require_is_callable();
270
+ module.exports = function(it) {
271
+ return typeof it == "object" ? it !== null : isCallable(it);
272
+ };
273
+ }
274
+ });
275
+
276
+ // node_modules/core-js-pure/internals/path.js
277
+ var require_path = __commonJS({
278
+ "node_modules/core-js-pure/internals/path.js"(exports, module) {
279
+ "use strict";
280
+ module.exports = {};
281
+ }
282
+ });
283
+
284
+ // node_modules/core-js-pure/internals/get-built-in.js
285
+ var require_get_built_in = __commonJS({
286
+ "node_modules/core-js-pure/internals/get-built-in.js"(exports, module) {
287
+ "use strict";
288
+ var path = require_path();
289
+ var global2 = require_global();
290
+ var isCallable = require_is_callable();
291
+ var aFunction = function(variable) {
292
+ return isCallable(variable) ? variable : void 0;
293
+ };
294
+ module.exports = function(namespace, method) {
295
+ return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global2[namespace]) : path[namespace] && path[namespace][method] || global2[namespace] && global2[namespace][method];
296
+ };
297
+ }
298
+ });
299
+
300
+ // node_modules/core-js-pure/internals/object-is-prototype-of.js
301
+ var require_object_is_prototype_of = __commonJS({
302
+ "node_modules/core-js-pure/internals/object-is-prototype-of.js"(exports, module) {
303
+ "use strict";
304
+ var uncurryThis = require_function_uncurry_this();
305
+ module.exports = uncurryThis({}.isPrototypeOf);
306
+ }
307
+ });
308
+
309
+ // node_modules/core-js-pure/internals/engine-user-agent.js
310
+ var require_engine_user_agent = __commonJS({
311
+ "node_modules/core-js-pure/internals/engine-user-agent.js"(exports, module) {
312
+ "use strict";
313
+ module.exports = typeof navigator != "undefined" && String(navigator.userAgent) || "";
314
+ }
315
+ });
316
+
317
+ // node_modules/core-js-pure/internals/engine-v8-version.js
318
+ var require_engine_v8_version = __commonJS({
319
+ "node_modules/core-js-pure/internals/engine-v8-version.js"(exports, module) {
320
+ "use strict";
321
+ var global2 = require_global();
322
+ var userAgent = require_engine_user_agent();
323
+ var process2 = global2.process;
324
+ var Deno = global2.Deno;
325
+ var versions = process2 && process2.versions || Deno && Deno.version;
326
+ var v8 = versions && versions.v8;
327
+ var match2;
328
+ var version;
329
+ if (v8) {
330
+ match2 = v8.split(".");
331
+ version = match2[0] > 0 && match2[0] < 4 ? 1 : +(match2[0] + match2[1]);
332
+ }
333
+ if (!version && userAgent) {
334
+ match2 = userAgent.match(/Edge\/(\d+)/);
335
+ if (!match2 || match2[1] >= 74) {
336
+ match2 = userAgent.match(/Chrome\/(\d+)/);
337
+ if (match2)
338
+ version = +match2[1];
339
+ }
340
+ }
341
+ module.exports = version;
342
+ }
343
+ });
344
+
345
+ // node_modules/core-js-pure/internals/symbol-constructor-detection.js
346
+ var require_symbol_constructor_detection = __commonJS({
347
+ "node_modules/core-js-pure/internals/symbol-constructor-detection.js"(exports, module) {
348
+ "use strict";
349
+ var V8_VERSION = require_engine_v8_version();
350
+ var fails = require_fails();
351
+ var global2 = require_global();
352
+ var $String = global2.String;
353
+ module.exports = !!Object.getOwnPropertySymbols && !fails(function() {
354
+ var symbol = Symbol("symbol detection");
355
+ return !$String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
356
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
357
+ });
358
+ }
359
+ });
360
+
361
+ // node_modules/core-js-pure/internals/use-symbol-as-uid.js
362
+ var require_use_symbol_as_uid = __commonJS({
363
+ "node_modules/core-js-pure/internals/use-symbol-as-uid.js"(exports, module) {
364
+ "use strict";
365
+ var NATIVE_SYMBOL = require_symbol_constructor_detection();
366
+ module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
367
+ }
368
+ });
369
+
370
+ // node_modules/core-js-pure/internals/is-symbol.js
371
+ var require_is_symbol = __commonJS({
372
+ "node_modules/core-js-pure/internals/is-symbol.js"(exports, module) {
373
+ "use strict";
374
+ var getBuiltIn = require_get_built_in();
375
+ var isCallable = require_is_callable();
376
+ var isPrototypeOf = require_object_is_prototype_of();
377
+ var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
378
+ var $Object = Object;
379
+ module.exports = USE_SYMBOL_AS_UID ? function(it) {
380
+ return typeof it == "symbol";
381
+ } : function(it) {
382
+ var $Symbol = getBuiltIn("Symbol");
383
+ return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
384
+ };
385
+ }
386
+ });
387
+
388
+ // node_modules/core-js-pure/internals/try-to-string.js
389
+ var require_try_to_string = __commonJS({
390
+ "node_modules/core-js-pure/internals/try-to-string.js"(exports, module) {
391
+ "use strict";
392
+ var $String = String;
393
+ module.exports = function(argument) {
394
+ try {
395
+ return $String(argument);
396
+ } catch (error) {
397
+ return "Object";
398
+ }
399
+ };
400
+ }
401
+ });
402
+
403
+ // node_modules/core-js-pure/internals/a-callable.js
404
+ var require_a_callable = __commonJS({
405
+ "node_modules/core-js-pure/internals/a-callable.js"(exports, module) {
406
+ "use strict";
407
+ var isCallable = require_is_callable();
408
+ var tryToString = require_try_to_string();
409
+ var $TypeError = TypeError;
410
+ module.exports = function(argument) {
411
+ if (isCallable(argument))
412
+ return argument;
413
+ throw new $TypeError(tryToString(argument) + " is not a function");
414
+ };
415
+ }
416
+ });
417
+
418
+ // node_modules/core-js-pure/internals/get-method.js
419
+ var require_get_method = __commonJS({
420
+ "node_modules/core-js-pure/internals/get-method.js"(exports, module) {
421
+ "use strict";
422
+ var aCallable = require_a_callable();
423
+ var isNullOrUndefined = require_is_null_or_undefined();
424
+ module.exports = function(V, P) {
425
+ var func = V[P];
426
+ return isNullOrUndefined(func) ? void 0 : aCallable(func);
427
+ };
428
+ }
429
+ });
430
+
431
+ // node_modules/core-js-pure/internals/ordinary-to-primitive.js
432
+ var require_ordinary_to_primitive = __commonJS({
433
+ "node_modules/core-js-pure/internals/ordinary-to-primitive.js"(exports, module) {
434
+ "use strict";
435
+ var call = require_function_call();
436
+ var isCallable = require_is_callable();
437
+ var isObject = require_is_object();
438
+ var $TypeError = TypeError;
439
+ module.exports = function(input, pref) {
440
+ var fn, val;
441
+ if (pref === "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
442
+ return val;
443
+ if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input)))
444
+ return val;
445
+ if (pref !== "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
446
+ return val;
447
+ throw new $TypeError("Can't convert object to primitive value");
448
+ };
449
+ }
450
+ });
451
+
452
+ // node_modules/core-js-pure/internals/is-pure.js
453
+ var require_is_pure = __commonJS({
454
+ "node_modules/core-js-pure/internals/is-pure.js"(exports, module) {
455
+ "use strict";
456
+ module.exports = true;
457
+ }
458
+ });
459
+
460
+ // node_modules/core-js-pure/internals/define-global-property.js
461
+ var require_define_global_property = __commonJS({
462
+ "node_modules/core-js-pure/internals/define-global-property.js"(exports, module) {
463
+ "use strict";
464
+ var global2 = require_global();
465
+ var defineProperty = Object.defineProperty;
466
+ module.exports = function(key, value) {
467
+ try {
468
+ defineProperty(global2, key, { value, configurable: true, writable: true });
469
+ } catch (error) {
470
+ global2[key] = value;
471
+ }
472
+ return value;
473
+ };
474
+ }
475
+ });
476
+
477
+ // node_modules/core-js-pure/internals/shared-store.js
478
+ var require_shared_store = __commonJS({
479
+ "node_modules/core-js-pure/internals/shared-store.js"(exports, module) {
480
+ "use strict";
481
+ var IS_PURE = require_is_pure();
482
+ var globalThis2 = require_global();
483
+ var defineGlobalProperty = require_define_global_property();
484
+ var SHARED = "__core-js_shared__";
485
+ var store = module.exports = globalThis2[SHARED] || defineGlobalProperty(SHARED, {});
486
+ (store.versions || (store.versions = [])).push({
487
+ version: "3.36.1",
488
+ mode: IS_PURE ? "pure" : "global",
489
+ copyright: "\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",
490
+ license: "https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",
491
+ source: "https://github.com/zloirock/core-js"
492
+ });
493
+ }
494
+ });
495
+
496
+ // node_modules/core-js-pure/internals/shared.js
497
+ var require_shared = __commonJS({
498
+ "node_modules/core-js-pure/internals/shared.js"(exports, module) {
499
+ "use strict";
500
+ var store = require_shared_store();
501
+ module.exports = function(key, value) {
502
+ return store[key] || (store[key] = value || {});
503
+ };
504
+ }
505
+ });
506
+
507
+ // node_modules/core-js-pure/internals/to-object.js
508
+ var require_to_object = __commonJS({
509
+ "node_modules/core-js-pure/internals/to-object.js"(exports, module) {
510
+ "use strict";
511
+ var requireObjectCoercible = require_require_object_coercible();
512
+ var $Object = Object;
513
+ module.exports = function(argument) {
514
+ return $Object(requireObjectCoercible(argument));
515
+ };
516
+ }
517
+ });
518
+
519
+ // node_modules/core-js-pure/internals/has-own-property.js
520
+ var require_has_own_property = __commonJS({
521
+ "node_modules/core-js-pure/internals/has-own-property.js"(exports, module) {
522
+ "use strict";
523
+ var uncurryThis = require_function_uncurry_this();
524
+ var toObject = require_to_object();
525
+ var hasOwnProperty = uncurryThis({}.hasOwnProperty);
526
+ module.exports = Object.hasOwn || function hasOwn(it, key) {
527
+ return hasOwnProperty(toObject(it), key);
528
+ };
529
+ }
530
+ });
531
+
532
+ // node_modules/core-js-pure/internals/uid.js
533
+ var require_uid = __commonJS({
534
+ "node_modules/core-js-pure/internals/uid.js"(exports, module) {
535
+ "use strict";
536
+ var uncurryThis = require_function_uncurry_this();
537
+ var id = 0;
538
+ var postfix = Math.random();
539
+ var toString = uncurryThis(1 .toString);
540
+ module.exports = function(key) {
541
+ return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id + postfix, 36);
542
+ };
543
+ }
544
+ });
545
+
546
+ // node_modules/core-js-pure/internals/well-known-symbol.js
547
+ var require_well_known_symbol = __commonJS({
548
+ "node_modules/core-js-pure/internals/well-known-symbol.js"(exports, module) {
549
+ "use strict";
550
+ var global2 = require_global();
551
+ var shared = require_shared();
552
+ var hasOwn = require_has_own_property();
553
+ var uid = require_uid();
554
+ var NATIVE_SYMBOL = require_symbol_constructor_detection();
555
+ var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
556
+ var Symbol2 = global2.Symbol;
557
+ var WellKnownSymbolsStore = shared("wks");
558
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2["for"] || Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
559
+ module.exports = function(name) {
560
+ if (!hasOwn(WellKnownSymbolsStore, name)) {
561
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol2, name) ? Symbol2[name] : createWellKnownSymbol("Symbol." + name);
562
+ }
563
+ return WellKnownSymbolsStore[name];
564
+ };
565
+ }
566
+ });
567
+
568
+ // node_modules/core-js-pure/internals/to-primitive.js
569
+ var require_to_primitive = __commonJS({
570
+ "node_modules/core-js-pure/internals/to-primitive.js"(exports, module) {
571
+ "use strict";
572
+ var call = require_function_call();
573
+ var isObject = require_is_object();
574
+ var isSymbol = require_is_symbol();
575
+ var getMethod = require_get_method();
576
+ var ordinaryToPrimitive = require_ordinary_to_primitive();
577
+ var wellKnownSymbol = require_well_known_symbol();
578
+ var $TypeError = TypeError;
579
+ var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
580
+ module.exports = function(input, pref) {
581
+ if (!isObject(input) || isSymbol(input))
582
+ return input;
583
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
584
+ var result;
585
+ if (exoticToPrim) {
586
+ if (pref === void 0)
587
+ pref = "default";
588
+ result = call(exoticToPrim, input, pref);
589
+ if (!isObject(result) || isSymbol(result))
590
+ return result;
591
+ throw new $TypeError("Can't convert object to primitive value");
592
+ }
593
+ if (pref === void 0)
594
+ pref = "number";
595
+ return ordinaryToPrimitive(input, pref);
596
+ };
597
+ }
598
+ });
599
+
600
+ // node_modules/core-js-pure/internals/to-property-key.js
601
+ var require_to_property_key = __commonJS({
602
+ "node_modules/core-js-pure/internals/to-property-key.js"(exports, module) {
603
+ "use strict";
604
+ var toPrimitive = require_to_primitive();
605
+ var isSymbol = require_is_symbol();
606
+ module.exports = function(argument) {
607
+ var key = toPrimitive(argument, "string");
608
+ return isSymbol(key) ? key : key + "";
609
+ };
610
+ }
611
+ });
612
+
613
+ // node_modules/core-js-pure/internals/document-create-element.js
614
+ var require_document_create_element = __commonJS({
615
+ "node_modules/core-js-pure/internals/document-create-element.js"(exports, module) {
616
+ "use strict";
617
+ var global2 = require_global();
618
+ var isObject = require_is_object();
619
+ var document2 = global2.document;
620
+ var EXISTS = isObject(document2) && isObject(document2.createElement);
621
+ module.exports = function(it) {
622
+ return EXISTS ? document2.createElement(it) : {};
623
+ };
624
+ }
625
+ });
626
+
627
+ // node_modules/core-js-pure/internals/ie8-dom-define.js
628
+ var require_ie8_dom_define = __commonJS({
629
+ "node_modules/core-js-pure/internals/ie8-dom-define.js"(exports, module) {
630
+ "use strict";
631
+ var DESCRIPTORS = require_descriptors();
632
+ var fails = require_fails();
633
+ var createElement = require_document_create_element();
634
+ module.exports = !DESCRIPTORS && !fails(function() {
635
+ return Object.defineProperty(createElement("div"), "a", {
636
+ get: function() {
637
+ return 7;
638
+ }
639
+ }).a !== 7;
640
+ });
641
+ }
642
+ });
643
+
644
+ // node_modules/core-js-pure/internals/object-get-own-property-descriptor.js
645
+ var require_object_get_own_property_descriptor = __commonJS({
646
+ "node_modules/core-js-pure/internals/object-get-own-property-descriptor.js"(exports) {
647
+ "use strict";
648
+ var DESCRIPTORS = require_descriptors();
649
+ var call = require_function_call();
650
+ var propertyIsEnumerableModule = require_object_property_is_enumerable();
651
+ var createPropertyDescriptor = require_create_property_descriptor();
652
+ var toIndexedObject = require_to_indexed_object();
653
+ var toPropertyKey = require_to_property_key();
654
+ var hasOwn = require_has_own_property();
655
+ var IE8_DOM_DEFINE = require_ie8_dom_define();
656
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
657
+ exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
658
+ O = toIndexedObject(O);
659
+ P = toPropertyKey(P);
660
+ if (IE8_DOM_DEFINE)
661
+ try {
662
+ return $getOwnPropertyDescriptor(O, P);
663
+ } catch (error) {
664
+ }
665
+ if (hasOwn(O, P))
666
+ return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
667
+ };
668
+ }
669
+ });
670
+
671
+ // node_modules/core-js-pure/internals/is-forced.js
672
+ var require_is_forced = __commonJS({
673
+ "node_modules/core-js-pure/internals/is-forced.js"(exports, module) {
674
+ "use strict";
675
+ var fails = require_fails();
676
+ var isCallable = require_is_callable();
677
+ var replacement = /#|\.prototype\./;
678
+ var isForced = function(feature, detection) {
679
+ var value = data[normalize(feature)];
680
+ return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
681
+ };
682
+ var normalize = isForced.normalize = function(string) {
683
+ return String(string).replace(replacement, ".").toLowerCase();
684
+ };
685
+ var data = isForced.data = {};
686
+ var NATIVE = isForced.NATIVE = "N";
687
+ var POLYFILL = isForced.POLYFILL = "P";
688
+ module.exports = isForced;
689
+ }
690
+ });
691
+
692
+ // node_modules/core-js-pure/internals/function-bind-context.js
693
+ var require_function_bind_context = __commonJS({
694
+ "node_modules/core-js-pure/internals/function-bind-context.js"(exports, module) {
695
+ "use strict";
696
+ var uncurryThis = require_function_uncurry_this_clause();
697
+ var aCallable = require_a_callable();
698
+ var NATIVE_BIND = require_function_bind_native();
699
+ var bind = uncurryThis(uncurryThis.bind);
700
+ module.exports = function(fn, that) {
701
+ aCallable(fn);
702
+ return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
703
+ return fn.apply(that, arguments);
704
+ };
705
+ };
706
+ }
707
+ });
708
+
709
+ // node_modules/core-js-pure/internals/v8-prototype-define-bug.js
710
+ var require_v8_prototype_define_bug = __commonJS({
711
+ "node_modules/core-js-pure/internals/v8-prototype-define-bug.js"(exports, module) {
712
+ "use strict";
713
+ var DESCRIPTORS = require_descriptors();
714
+ var fails = require_fails();
715
+ module.exports = DESCRIPTORS && fails(function() {
716
+ return Object.defineProperty(function() {
717
+ }, "prototype", {
718
+ value: 42,
719
+ writable: false
720
+ }).prototype !== 42;
721
+ });
722
+ }
723
+ });
724
+
725
+ // node_modules/core-js-pure/internals/an-object.js
726
+ var require_an_object = __commonJS({
727
+ "node_modules/core-js-pure/internals/an-object.js"(exports, module) {
728
+ "use strict";
729
+ var isObject = require_is_object();
730
+ var $String = String;
731
+ var $TypeError = TypeError;
732
+ module.exports = function(argument) {
733
+ if (isObject(argument))
734
+ return argument;
735
+ throw new $TypeError($String(argument) + " is not an object");
736
+ };
737
+ }
738
+ });
739
+
740
+ // node_modules/core-js-pure/internals/object-define-property.js
741
+ var require_object_define_property = __commonJS({
742
+ "node_modules/core-js-pure/internals/object-define-property.js"(exports) {
743
+ "use strict";
744
+ var DESCRIPTORS = require_descriptors();
745
+ var IE8_DOM_DEFINE = require_ie8_dom_define();
746
+ var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
747
+ var anObject = require_an_object();
748
+ var toPropertyKey = require_to_property_key();
749
+ var $TypeError = TypeError;
750
+ var $defineProperty = Object.defineProperty;
751
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
752
+ var ENUMERABLE = "enumerable";
753
+ var CONFIGURABLE = "configurable";
754
+ var WRITABLE = "writable";
755
+ exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
756
+ anObject(O);
757
+ P = toPropertyKey(P);
758
+ anObject(Attributes);
759
+ if (typeof O === "function" && P === "prototype" && "value" in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
760
+ var current = $getOwnPropertyDescriptor(O, P);
761
+ if (current && current[WRITABLE]) {
762
+ O[P] = Attributes.value;
763
+ Attributes = {
764
+ configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
765
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
766
+ writable: false
767
+ };
768
+ }
769
+ }
770
+ return $defineProperty(O, P, Attributes);
771
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
772
+ anObject(O);
773
+ P = toPropertyKey(P);
774
+ anObject(Attributes);
775
+ if (IE8_DOM_DEFINE)
776
+ try {
777
+ return $defineProperty(O, P, Attributes);
778
+ } catch (error) {
779
+ }
780
+ if ("get" in Attributes || "set" in Attributes)
781
+ throw new $TypeError("Accessors not supported");
782
+ if ("value" in Attributes)
783
+ O[P] = Attributes.value;
784
+ return O;
785
+ };
786
+ }
787
+ });
788
+
789
+ // node_modules/core-js-pure/internals/create-non-enumerable-property.js
790
+ var require_create_non_enumerable_property = __commonJS({
791
+ "node_modules/core-js-pure/internals/create-non-enumerable-property.js"(exports, module) {
792
+ "use strict";
793
+ var DESCRIPTORS = require_descriptors();
794
+ var definePropertyModule = require_object_define_property();
795
+ var createPropertyDescriptor = require_create_property_descriptor();
796
+ module.exports = DESCRIPTORS ? function(object, key, value) {
797
+ return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
798
+ } : function(object, key, value) {
799
+ object[key] = value;
800
+ return object;
801
+ };
802
+ }
803
+ });
804
+
805
+ // node_modules/core-js-pure/internals/export.js
806
+ var require_export = __commonJS({
807
+ "node_modules/core-js-pure/internals/export.js"(exports, module) {
808
+ "use strict";
809
+ var global2 = require_global();
810
+ var apply = require_function_apply();
811
+ var uncurryThis = require_function_uncurry_this_clause();
812
+ var isCallable = require_is_callable();
813
+ var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
814
+ var isForced = require_is_forced();
815
+ var path = require_path();
816
+ var bind = require_function_bind_context();
817
+ var createNonEnumerableProperty = require_create_non_enumerable_property();
818
+ var hasOwn = require_has_own_property();
819
+ require_shared_store();
820
+ var wrapConstructor = function(NativeConstructor) {
821
+ var Wrapper = function(a, b, c) {
822
+ if (this instanceof Wrapper) {
823
+ switch (arguments.length) {
824
+ case 0:
825
+ return new NativeConstructor();
826
+ case 1:
827
+ return new NativeConstructor(a);
828
+ case 2:
829
+ return new NativeConstructor(a, b);
830
+ }
831
+ return new NativeConstructor(a, b, c);
832
+ }
833
+ return apply(NativeConstructor, this, arguments);
834
+ };
835
+ Wrapper.prototype = NativeConstructor.prototype;
836
+ return Wrapper;
837
+ };
838
+ module.exports = function(options, source) {
839
+ var TARGET = options.target;
840
+ var GLOBAL = options.global;
841
+ var STATIC = options.stat;
842
+ var PROTO = options.proto;
843
+ var nativeSource = GLOBAL ? global2 : STATIC ? global2[TARGET] : global2[TARGET] && global2[TARGET].prototype;
844
+ var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
845
+ var targetPrototype = target.prototype;
846
+ var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
847
+ var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;
848
+ for (key in source) {
849
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
850
+ USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);
851
+ targetProperty = target[key];
852
+ if (USE_NATIVE)
853
+ if (options.dontCallGetSet) {
854
+ descriptor = getOwnPropertyDescriptor(nativeSource, key);
855
+ nativeProperty = descriptor && descriptor.value;
856
+ } else
857
+ nativeProperty = nativeSource[key];
858
+ sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];
859
+ if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty)
860
+ continue;
861
+ if (options.bind && USE_NATIVE)
862
+ resultProperty = bind(sourceProperty, global2);
863
+ else if (options.wrap && USE_NATIVE)
864
+ resultProperty = wrapConstructor(sourceProperty);
865
+ else if (PROTO && isCallable(sourceProperty))
866
+ resultProperty = uncurryThis(sourceProperty);
867
+ else
868
+ resultProperty = sourceProperty;
869
+ if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) {
870
+ createNonEnumerableProperty(resultProperty, "sham", true);
871
+ }
872
+ createNonEnumerableProperty(target, key, resultProperty);
873
+ if (PROTO) {
874
+ VIRTUAL_PROTOTYPE = TARGET + "Prototype";
875
+ if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {
876
+ createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
877
+ }
878
+ createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
879
+ if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {
880
+ createNonEnumerableProperty(targetPrototype, key, sourceProperty);
881
+ }
882
+ }
883
+ }
884
+ };
885
+ }
886
+ });
887
+
888
+ // node_modules/core-js-pure/internals/math-trunc.js
889
+ var require_math_trunc = __commonJS({
890
+ "node_modules/core-js-pure/internals/math-trunc.js"(exports, module) {
891
+ "use strict";
892
+ var ceil = Math.ceil;
893
+ var floor = Math.floor;
894
+ module.exports = Math.trunc || function trunc(x) {
895
+ var n = +x;
896
+ return (n > 0 ? floor : ceil)(n);
897
+ };
898
+ }
899
+ });
900
+
901
+ // node_modules/core-js-pure/internals/to-integer-or-infinity.js
902
+ var require_to_integer_or_infinity = __commonJS({
903
+ "node_modules/core-js-pure/internals/to-integer-or-infinity.js"(exports, module) {
904
+ "use strict";
905
+ var trunc = require_math_trunc();
906
+ module.exports = function(argument) {
907
+ var number = +argument;
908
+ return number !== number || number === 0 ? 0 : trunc(number);
909
+ };
910
+ }
911
+ });
912
+
913
+ // node_modules/core-js-pure/internals/to-absolute-index.js
914
+ var require_to_absolute_index = __commonJS({
915
+ "node_modules/core-js-pure/internals/to-absolute-index.js"(exports, module) {
916
+ "use strict";
917
+ var toIntegerOrInfinity = require_to_integer_or_infinity();
918
+ var max = Math.max;
919
+ var min = Math.min;
920
+ module.exports = function(index, length2) {
921
+ var integer = toIntegerOrInfinity(index);
922
+ return integer < 0 ? max(integer + length2, 0) : min(integer, length2);
923
+ };
924
+ }
925
+ });
926
+
927
+ // node_modules/core-js-pure/internals/to-length.js
928
+ var require_to_length = __commonJS({
929
+ "node_modules/core-js-pure/internals/to-length.js"(exports, module) {
930
+ "use strict";
931
+ var toIntegerOrInfinity = require_to_integer_or_infinity();
932
+ var min = Math.min;
933
+ module.exports = function(argument) {
934
+ var len = toIntegerOrInfinity(argument);
935
+ return len > 0 ? min(len, 9007199254740991) : 0;
936
+ };
937
+ }
938
+ });
939
+
940
+ // node_modules/core-js-pure/internals/length-of-array-like.js
941
+ var require_length_of_array_like = __commonJS({
942
+ "node_modules/core-js-pure/internals/length-of-array-like.js"(exports, module) {
943
+ "use strict";
944
+ var toLength = require_to_length();
945
+ module.exports = function(obj) {
946
+ return toLength(obj.length);
947
+ };
948
+ }
949
+ });
950
+
951
+ // node_modules/core-js-pure/internals/array-includes.js
952
+ var require_array_includes = __commonJS({
953
+ "node_modules/core-js-pure/internals/array-includes.js"(exports, module) {
954
+ "use strict";
955
+ var toIndexedObject = require_to_indexed_object();
956
+ var toAbsoluteIndex = require_to_absolute_index();
957
+ var lengthOfArrayLike = require_length_of_array_like();
958
+ var createMethod = function(IS_INCLUDES) {
959
+ return function($this, el, fromIndex) {
960
+ var O = toIndexedObject($this);
961
+ var length2 = lengthOfArrayLike(O);
962
+ if (length2 === 0)
963
+ return !IS_INCLUDES && -1;
964
+ var index = toAbsoluteIndex(fromIndex, length2);
965
+ var value;
966
+ if (IS_INCLUDES && el !== el)
967
+ while (length2 > index) {
968
+ value = O[index++];
969
+ if (value !== value)
970
+ return true;
971
+ }
972
+ else
973
+ for (; length2 > index; index++) {
974
+ if ((IS_INCLUDES || index in O) && O[index] === el)
975
+ return IS_INCLUDES || index || 0;
976
+ }
977
+ return !IS_INCLUDES && -1;
978
+ };
979
+ };
980
+ module.exports = {
981
+ // `Array.prototype.includes` method
982
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
983
+ includes: createMethod(true),
984
+ // `Array.prototype.indexOf` method
985
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
986
+ indexOf: createMethod(false)
987
+ };
988
+ }
989
+ });
990
+
991
+ // node_modules/core-js-pure/internals/hidden-keys.js
992
+ var require_hidden_keys = __commonJS({
993
+ "node_modules/core-js-pure/internals/hidden-keys.js"(exports, module) {
994
+ "use strict";
995
+ module.exports = {};
996
+ }
997
+ });
998
+
999
+ // node_modules/core-js-pure/internals/object-keys-internal.js
1000
+ var require_object_keys_internal = __commonJS({
1001
+ "node_modules/core-js-pure/internals/object-keys-internal.js"(exports, module) {
1002
+ "use strict";
1003
+ var uncurryThis = require_function_uncurry_this();
1004
+ var hasOwn = require_has_own_property();
1005
+ var toIndexedObject = require_to_indexed_object();
1006
+ var indexOf = require_array_includes().indexOf;
1007
+ var hiddenKeys = require_hidden_keys();
1008
+ var push = uncurryThis([].push);
1009
+ module.exports = function(object, names) {
1010
+ var O = toIndexedObject(object);
1011
+ var i = 0;
1012
+ var result = [];
1013
+ var key;
1014
+ for (key in O)
1015
+ !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
1016
+ while (names.length > i)
1017
+ if (hasOwn(O, key = names[i++])) {
1018
+ ~indexOf(result, key) || push(result, key);
1019
+ }
1020
+ return result;
1021
+ };
1022
+ }
1023
+ });
1024
+
1025
+ // node_modules/core-js-pure/internals/enum-bug-keys.js
1026
+ var require_enum_bug_keys = __commonJS({
1027
+ "node_modules/core-js-pure/internals/enum-bug-keys.js"(exports, module) {
1028
+ "use strict";
1029
+ module.exports = [
1030
+ "constructor",
1031
+ "hasOwnProperty",
1032
+ "isPrototypeOf",
1033
+ "propertyIsEnumerable",
1034
+ "toLocaleString",
1035
+ "toString",
1036
+ "valueOf"
1037
+ ];
1038
+ }
1039
+ });
1040
+
1041
+ // node_modules/core-js-pure/internals/object-keys.js
1042
+ var require_object_keys = __commonJS({
1043
+ "node_modules/core-js-pure/internals/object-keys.js"(exports, module) {
1044
+ "use strict";
1045
+ var internalObjectKeys = require_object_keys_internal();
1046
+ var enumBugKeys = require_enum_bug_keys();
1047
+ module.exports = Object.keys || function keys(O) {
1048
+ return internalObjectKeys(O, enumBugKeys);
1049
+ };
1050
+ }
1051
+ });
1052
+
1053
+ // node_modules/core-js-pure/internals/object-define-properties.js
1054
+ var require_object_define_properties = __commonJS({
1055
+ "node_modules/core-js-pure/internals/object-define-properties.js"(exports) {
1056
+ "use strict";
1057
+ var DESCRIPTORS = require_descriptors();
1058
+ var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
1059
+ var definePropertyModule = require_object_define_property();
1060
+ var anObject = require_an_object();
1061
+ var toIndexedObject = require_to_indexed_object();
1062
+ var objectKeys = require_object_keys();
1063
+ exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1064
+ anObject(O);
1065
+ var props = toIndexedObject(Properties);
1066
+ var keys = objectKeys(Properties);
1067
+ var length2 = keys.length;
1068
+ var index = 0;
1069
+ var key;
1070
+ while (length2 > index)
1071
+ definePropertyModule.f(O, key = keys[index++], props[key]);
1072
+ return O;
1073
+ };
1074
+ }
1075
+ });
1076
+
1077
+ // node_modules/core-js-pure/internals/html.js
1078
+ var require_html = __commonJS({
1079
+ "node_modules/core-js-pure/internals/html.js"(exports, module) {
1080
+ "use strict";
1081
+ var getBuiltIn = require_get_built_in();
1082
+ module.exports = getBuiltIn("document", "documentElement");
1083
+ }
1084
+ });
1085
+
1086
+ // node_modules/core-js-pure/internals/shared-key.js
1087
+ var require_shared_key = __commonJS({
1088
+ "node_modules/core-js-pure/internals/shared-key.js"(exports, module) {
1089
+ "use strict";
1090
+ var shared = require_shared();
1091
+ var uid = require_uid();
1092
+ var keys = shared("keys");
1093
+ module.exports = function(key) {
1094
+ return keys[key] || (keys[key] = uid(key));
1095
+ };
1096
+ }
1097
+ });
1098
+
1099
+ // node_modules/core-js-pure/internals/object-create.js
1100
+ var require_object_create = __commonJS({
1101
+ "node_modules/core-js-pure/internals/object-create.js"(exports, module) {
1102
+ "use strict";
1103
+ var anObject = require_an_object();
1104
+ var definePropertiesModule = require_object_define_properties();
1105
+ var enumBugKeys = require_enum_bug_keys();
1106
+ var hiddenKeys = require_hidden_keys();
1107
+ var html = require_html();
1108
+ var documentCreateElement = require_document_create_element();
1109
+ var sharedKey = require_shared_key();
1110
+ var GT = ">";
1111
+ var LT = "<";
1112
+ var PROTOTYPE = "prototype";
1113
+ var SCRIPT = "script";
1114
+ var IE_PROTO = sharedKey("IE_PROTO");
1115
+ var EmptyConstructor = function() {
1116
+ };
1117
+ var scriptTag = function(content) {
1118
+ return LT + SCRIPT + GT + content + LT + "/" + SCRIPT + GT;
1119
+ };
1120
+ var NullProtoObjectViaActiveX = function(activeXDocument2) {
1121
+ activeXDocument2.write(scriptTag(""));
1122
+ activeXDocument2.close();
1123
+ var temp = activeXDocument2.parentWindow.Object;
1124
+ activeXDocument2 = null;
1125
+ return temp;
1126
+ };
1127
+ var NullProtoObjectViaIFrame = function() {
1128
+ var iframe = documentCreateElement("iframe");
1129
+ var JS = "java" + SCRIPT + ":";
1130
+ var iframeDocument;
1131
+ iframe.style.display = "none";
1132
+ html.appendChild(iframe);
1133
+ iframe.src = String(JS);
1134
+ iframeDocument = iframe.contentWindow.document;
1135
+ iframeDocument.open();
1136
+ iframeDocument.write(scriptTag("document.F=Object"));
1137
+ iframeDocument.close();
1138
+ return iframeDocument.F;
1139
+ };
1140
+ var activeXDocument;
1141
+ var NullProtoObject = function() {
1142
+ try {
1143
+ activeXDocument = new ActiveXObject("htmlfile");
1144
+ } catch (error) {
1145
+ }
1146
+ NullProtoObject = typeof document != "undefined" ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument);
1147
+ var length2 = enumBugKeys.length;
1148
+ while (length2--)
1149
+ delete NullProtoObject[PROTOTYPE][enumBugKeys[length2]];
1150
+ return NullProtoObject();
1151
+ };
1152
+ hiddenKeys[IE_PROTO] = true;
1153
+ module.exports = Object.create || function create(O, Properties) {
1154
+ var result;
1155
+ if (O !== null) {
1156
+ EmptyConstructor[PROTOTYPE] = anObject(O);
1157
+ result = new EmptyConstructor();
1158
+ EmptyConstructor[PROTOTYPE] = null;
1159
+ result[IE_PROTO] = O;
1160
+ } else
1161
+ result = NullProtoObject();
1162
+ return Properties === void 0 ? result : definePropertiesModule.f(result, Properties);
1163
+ };
1164
+ }
1165
+ });
1166
+
1167
+ // node_modules/core-js-pure/modules/es.object.create.js
1168
+ var require_es_object_create = __commonJS({
1169
+ "node_modules/core-js-pure/modules/es.object.create.js"() {
1170
+ "use strict";
1171
+ var $ = require_export();
1172
+ var DESCRIPTORS = require_descriptors();
1173
+ var create = require_object_create();
1174
+ $({ target: "Object", stat: true, sham: !DESCRIPTORS }, {
1175
+ create
1176
+ });
1177
+ }
1178
+ });
1179
+
1180
+ // node_modules/core-js-pure/es/object/create.js
1181
+ var require_create = __commonJS({
1182
+ "node_modules/core-js-pure/es/object/create.js"(exports, module) {
1183
+ "use strict";
1184
+ require_es_object_create();
1185
+ var path = require_path();
1186
+ var Object2 = path.Object;
1187
+ module.exports = function create(P, D) {
1188
+ return Object2.create(P, D);
1189
+ };
1190
+ }
1191
+ });
1192
+
1193
+ // node_modules/core-js-pure/stable/object/create.js
1194
+ var require_create2 = __commonJS({
1195
+ "node_modules/core-js-pure/stable/object/create.js"(exports, module) {
1196
+ "use strict";
1197
+ var parent = require_create();
1198
+ module.exports = parent;
1199
+ }
1200
+ });
1201
+
1202
+ // node_modules/@babel/runtime-corejs3/core-js-stable/object/create.js
1203
+ var require_create3 = __commonJS({
1204
+ "node_modules/@babel/runtime-corejs3/core-js-stable/object/create.js"(exports, module) {
1205
+ module.exports = require_create2();
1206
+ }
1207
+ });
1208
+
1209
+ // node_modules/classnames/index.js
1210
+ var require_classnames = __commonJS({
1211
+ "node_modules/classnames/index.js"(exports, module) {
1212
+ (function() {
1213
+ "use strict";
1214
+ var hasOwn = {}.hasOwnProperty;
1215
+ function classNames() {
1216
+ var classes = "";
1217
+ for (var i = 0; i < arguments.length; i++) {
1218
+ var arg = arguments[i];
1219
+ if (arg) {
1220
+ classes = appendClass(classes, parseValue(arg));
1221
+ }
1222
+ }
1223
+ return classes;
1224
+ }
1225
+ function parseValue(arg) {
1226
+ if (typeof arg === "string" || typeof arg === "number") {
1227
+ return arg;
1228
+ }
1229
+ if (typeof arg !== "object") {
1230
+ return "";
1231
+ }
1232
+ if (Array.isArray(arg)) {
1233
+ return classNames.apply(null, arg);
1234
+ }
1235
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
1236
+ return arg.toString();
1237
+ }
1238
+ var classes = "";
1239
+ for (var key in arg) {
1240
+ if (hasOwn.call(arg, key) && arg[key]) {
1241
+ classes = appendClass(classes, key);
1242
+ }
1243
+ }
1244
+ return classes;
1245
+ }
1246
+ function appendClass(value, newClass) {
1247
+ if (!newClass) {
1248
+ return value;
1249
+ }
1250
+ if (value) {
1251
+ return value + " " + newClass;
1252
+ }
1253
+ return value + newClass;
1254
+ }
1255
+ if (typeof module !== "undefined" && module.exports) {
1256
+ classNames.default = classNames;
1257
+ module.exports = classNames;
1258
+ } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
1259
+ define("classnames", [], function() {
1260
+ return classNames;
1261
+ });
1262
+ } else {
1263
+ window.classNames = classNames;
1264
+ }
1265
+ })();
1266
+ }
1267
+ });
1268
+
1269
+ // src/external.umd/botframework-webchat-api.ts
1270
+ var require_botframework_webchat_api = __commonJS({
1271
+ "src/external.umd/botframework-webchat-api.ts"(exports, module) {
1272
+ module.exports = {
1273
+ hooks: globalThis.WebChat.hooks
1274
+ };
1275
+ }
1276
+ });
1277
+
1278
+ // node_modules/inject-meta-tag/lib/esmodules/injectMetaTag.js
1279
+ function injectMeta(name, content) {
1280
+ try {
1281
+ if (typeof document === "undefined") {
1282
+ return;
1283
+ }
1284
+ var metaElement = document.createElement("meta");
1285
+ metaElement.setAttribute("name", name);
1286
+ content && metaElement.setAttribute("content", content);
1287
+ document.head.appendChild(metaElement);
1288
+ } catch (error) {
1289
+ console.error('inject-meta-tag: Failed to inject <meta name="'.concat(name, '"> tag.'), error);
1290
+ }
1291
+ }
1292
+
1293
+ // src/private/FluentThemeProvider.tsx
1294
+ var import_botframework_webchat_component5 = __toESM(require_botframework_webchat_component());
1295
+ var import_react28 = __toESM(require_react());
1296
+
1297
+ // src/components/telephoneKeypad/Provider.tsx
1298
+ var import_react2 = __toESM(require_react());
1299
+
1300
+ // src/components/telephoneKeypad/private/Context.ts
1301
+ var import_react = __toESM(require_react());
1302
+ var Context = (0, import_react.createContext)(
1303
+ new Proxy({}, {
1304
+ get() {
1305
+ throw new Error("botframework-webchat: This hook can only used under its corresponding <Provider>.");
1306
+ }
1307
+ })
1308
+ );
1309
+ Context.displayName = "TelephoneKeypad.Context";
1310
+ var Context_default = Context;
1311
+
1312
+ // src/components/telephoneKeypad/Provider.tsx
1313
+ var Provider = (0, import_react2.memo)(({ children }) => {
1314
+ const [shown, setShown] = (0, import_react2.useState)(false);
1315
+ const context = (0, import_react2.useMemo)(
1316
+ () => Object.freeze({
1317
+ setShown,
1318
+ shown
1319
+ }),
1320
+ [setShown, shown]
1321
+ );
1322
+ return /* @__PURE__ */ import_react2.default.createElement(Context_default.Provider, { value: context }, children);
1323
+ });
1324
+ var Provider_default = Provider;
1325
+
1326
+ // src/components/telephoneKeypad/Surrogate.tsx
1327
+ var import_react9 = __toESM(require_react());
1328
+
1329
+ // src/components/telephoneKeypad/private/TelephoneKeypad.tsx
1330
+ var import_react8 = __toESM(require_react());
1331
+
1332
+ // node_modules/use-ref-from/lib/esmodules/useRefFrom.js
1333
+ var import_create = __toESM(require_create3());
1334
+ var import_react3 = __toESM(require_react());
1335
+ function useRefFrom(value) {
1336
+ var ref = (0, import_react3.useRef)();
1337
+ var readOnlyRef = (0, import_react3.useMemo)(function() {
1338
+ return (0, import_create.default)({}, {
1339
+ current: {
1340
+ get: function get() {
1341
+ return ref.current;
1342
+ }
1343
+ }
1344
+ });
1345
+ }, [ref]);
1346
+ ref.current = value;
1347
+ return readOnlyRef;
1348
+ }
1349
+
1350
+ // src/styles/index.ts
1351
+ var import_react5 = __toESM(require_react());
1352
+
1353
+ // node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
1354
+ function sheetForTag(tag) {
1355
+ if (tag.sheet) {
1356
+ return tag.sheet;
1357
+ }
1358
+ for (var i = 0; i < document.styleSheets.length; i++) {
1359
+ if (document.styleSheets[i].ownerNode === tag) {
1360
+ return document.styleSheets[i];
1361
+ }
1362
+ }
1363
+ }
1364
+ function createStyleElement(options) {
1365
+ var tag = document.createElement("style");
1366
+ tag.setAttribute("data-emotion", options.key);
1367
+ if (options.nonce !== void 0) {
1368
+ tag.setAttribute("nonce", options.nonce);
1369
+ }
1370
+ tag.appendChild(document.createTextNode(""));
1371
+ tag.setAttribute("data-s", "");
1372
+ return tag;
1373
+ }
1374
+ var StyleSheet = /* @__PURE__ */ function() {
1375
+ function StyleSheet2(options) {
1376
+ var _this = this;
1377
+ this._insertTag = function(tag) {
1378
+ var before;
1379
+ if (_this.tags.length === 0) {
1380
+ if (_this.insertionPoint) {
1381
+ before = _this.insertionPoint.nextSibling;
1382
+ } else if (_this.prepend) {
1383
+ before = _this.container.firstChild;
1384
+ } else {
1385
+ before = _this.before;
1386
+ }
1387
+ } else {
1388
+ before = _this.tags[_this.tags.length - 1].nextSibling;
1389
+ }
1390
+ _this.container.insertBefore(tag, before);
1391
+ _this.tags.push(tag);
1392
+ };
1393
+ this.isSpeedy = options.speedy === void 0 ? false : options.speedy;
1394
+ this.tags = [];
1395
+ this.ctr = 0;
1396
+ this.nonce = options.nonce;
1397
+ this.key = options.key;
1398
+ this.container = options.container;
1399
+ this.prepend = options.prepend;
1400
+ this.insertionPoint = options.insertionPoint;
1401
+ this.before = null;
1402
+ }
1403
+ var _proto = StyleSheet2.prototype;
1404
+ _proto.hydrate = function hydrate(nodes) {
1405
+ nodes.forEach(this._insertTag);
1406
+ };
1407
+ _proto.insert = function insert(rule) {
1408
+ if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
1409
+ this._insertTag(createStyleElement(this));
1410
+ }
1411
+ var tag = this.tags[this.tags.length - 1];
1412
+ if (true) {
1413
+ var isImportRule3 = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
1414
+ if (isImportRule3 && this._alreadyInsertedOrderInsensitiveRule) {
1415
+ console.error("You're attempting to insert the following rule:\n" + rule + "\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.");
1416
+ }
1417
+ this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule3;
1418
+ }
1419
+ if (this.isSpeedy) {
1420
+ var sheet = sheetForTag(tag);
1421
+ try {
1422
+ sheet.insertRule(rule, sheet.cssRules.length);
1423
+ } catch (e) {
1424
+ if (!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {
1425
+ console.error('There was a problem inserting the following rule: "' + rule + '"', e);
1426
+ }
1427
+ }
1428
+ } else {
1429
+ tag.appendChild(document.createTextNode(rule));
1430
+ }
1431
+ this.ctr++;
1432
+ };
1433
+ _proto.flush = function flush() {
1434
+ this.tags.forEach(function(tag) {
1435
+ return tag.parentNode && tag.parentNode.removeChild(tag);
1436
+ });
1437
+ this.tags = [];
1438
+ this.ctr = 0;
1439
+ if (true) {
1440
+ this._alreadyInsertedOrderInsensitiveRule = false;
1441
+ }
1442
+ };
1443
+ return StyleSheet2;
1444
+ }();
1445
+
1446
+ // node_modules/stylis/src/Enum.js
1447
+ var MS = "-ms-";
1448
+ var MOZ = "-moz-";
1449
+ var WEBKIT = "-webkit-";
1450
+ var COMMENT = "comm";
1451
+ var RULESET = "rule";
1452
+ var DECLARATION = "decl";
1453
+ var IMPORT = "@import";
1454
+ var KEYFRAMES = "@keyframes";
1455
+ var LAYER = "@layer";
1456
+
1457
+ // node_modules/stylis/src/Utility.js
1458
+ var abs = Math.abs;
1459
+ var from = String.fromCharCode;
1460
+ var assign = Object.assign;
1461
+ function hash(value, length2) {
1462
+ return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
1463
+ }
1464
+ function trim(value) {
1465
+ return value.trim();
1466
+ }
1467
+ function match(value, pattern) {
1468
+ return (value = pattern.exec(value)) ? value[0] : value;
1469
+ }
1470
+ function replace(value, pattern, replacement) {
1471
+ return value.replace(pattern, replacement);
1472
+ }
1473
+ function indexof(value, search) {
1474
+ return value.indexOf(search);
1475
+ }
1476
+ function charat(value, index) {
1477
+ return value.charCodeAt(index) | 0;
1478
+ }
1479
+ function substr(value, begin, end) {
1480
+ return value.slice(begin, end);
1481
+ }
1482
+ function strlen(value) {
1483
+ return value.length;
1484
+ }
1485
+ function sizeof(value) {
1486
+ return value.length;
1487
+ }
1488
+ function append(value, array) {
1489
+ return array.push(value), value;
1490
+ }
1491
+ function combine(array, callback) {
1492
+ return array.map(callback).join("");
1493
+ }
1494
+
1495
+ // node_modules/stylis/src/Tokenizer.js
1496
+ var line = 1;
1497
+ var column = 1;
1498
+ var length = 0;
1499
+ var position = 0;
1500
+ var character = 0;
1501
+ var characters = "";
1502
+ function node(value, root, parent, type, props, children, length2) {
1503
+ return { value, root, parent, type, props, children, line, column, length: length2, return: "" };
1504
+ }
1505
+ function copy(root, props) {
1506
+ return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props);
1507
+ }
1508
+ function char() {
1509
+ return character;
1510
+ }
1511
+ function prev() {
1512
+ character = position > 0 ? charat(characters, --position) : 0;
1513
+ if (column--, character === 10)
1514
+ column = 1, line--;
1515
+ return character;
1516
+ }
1517
+ function next() {
1518
+ character = position < length ? charat(characters, position++) : 0;
1519
+ if (column++, character === 10)
1520
+ column = 1, line++;
1521
+ return character;
1522
+ }
1523
+ function peek() {
1524
+ return charat(characters, position);
1525
+ }
1526
+ function caret() {
1527
+ return position;
1528
+ }
1529
+ function slice(begin, end) {
1530
+ return substr(characters, begin, end);
1531
+ }
1532
+ function token(type) {
1533
+ switch (type) {
1534
+ case 0:
1535
+ case 9:
1536
+ case 10:
1537
+ case 13:
1538
+ case 32:
1539
+ return 5;
1540
+ case 33:
1541
+ case 43:
1542
+ case 44:
1543
+ case 47:
1544
+ case 62:
1545
+ case 64:
1546
+ case 126:
1547
+ case 59:
1548
+ case 123:
1549
+ case 125:
1550
+ return 4;
1551
+ case 58:
1552
+ return 3;
1553
+ case 34:
1554
+ case 39:
1555
+ case 40:
1556
+ case 91:
1557
+ return 2;
1558
+ case 41:
1559
+ case 93:
1560
+ return 1;
1561
+ }
1562
+ return 0;
1563
+ }
1564
+ function alloc(value) {
1565
+ return line = column = 1, length = strlen(characters = value), position = 0, [];
1566
+ }
1567
+ function dealloc(value) {
1568
+ return characters = "", value;
1569
+ }
1570
+ function delimit(type) {
1571
+ return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
1572
+ }
1573
+ function whitespace(type) {
1574
+ while (character = peek())
1575
+ if (character < 33)
1576
+ next();
1577
+ else
1578
+ break;
1579
+ return token(type) > 2 || token(character) > 3 ? "" : " ";
1580
+ }
1581
+ function escaping(index, count) {
1582
+ while (--count && next())
1583
+ if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
1584
+ break;
1585
+ return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
1586
+ }
1587
+ function delimiter(type) {
1588
+ while (next())
1589
+ switch (character) {
1590
+ case type:
1591
+ return position;
1592
+ case 34:
1593
+ case 39:
1594
+ if (type !== 34 && type !== 39)
1595
+ delimiter(character);
1596
+ break;
1597
+ case 40:
1598
+ if (type === 41)
1599
+ delimiter(type);
1600
+ break;
1601
+ case 92:
1602
+ next();
1603
+ break;
1604
+ }
1605
+ return position;
1606
+ }
1607
+ function commenter(type, index) {
1608
+ while (next())
1609
+ if (type + character === 47 + 10)
1610
+ break;
1611
+ else if (type + character === 42 + 42 && peek() === 47)
1612
+ break;
1613
+ return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
1614
+ }
1615
+ function identifier(index) {
1616
+ while (!token(peek()))
1617
+ next();
1618
+ return slice(index, position);
1619
+ }
1620
+
1621
+ // node_modules/stylis/src/Parser.js
1622
+ function compile(value) {
1623
+ return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
1624
+ }
1625
+ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
1626
+ var index = 0;
1627
+ var offset = 0;
1628
+ var length2 = pseudo;
1629
+ var atrule = 0;
1630
+ var property = 0;
1631
+ var previous = 0;
1632
+ var variable = 1;
1633
+ var scanning = 1;
1634
+ var ampersand = 1;
1635
+ var character2 = 0;
1636
+ var type = "";
1637
+ var props = rules;
1638
+ var children = rulesets;
1639
+ var reference = rule;
1640
+ var characters2 = type;
1641
+ while (scanning)
1642
+ switch (previous = character2, character2 = next()) {
1643
+ case 40:
1644
+ if (previous != 108 && charat(characters2, length2 - 1) == 58) {
1645
+ if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
1646
+ ampersand = -1;
1647
+ break;
1648
+ }
1649
+ case 34:
1650
+ case 39:
1651
+ case 91:
1652
+ characters2 += delimit(character2);
1653
+ break;
1654
+ case 9:
1655
+ case 10:
1656
+ case 13:
1657
+ case 32:
1658
+ characters2 += whitespace(previous);
1659
+ break;
1660
+ case 92:
1661
+ characters2 += escaping(caret() - 1, 7);
1662
+ continue;
1663
+ case 47:
1664
+ switch (peek()) {
1665
+ case 42:
1666
+ case 47:
1667
+ append(comment(commenter(next(), caret()), root, parent), declarations);
1668
+ break;
1669
+ default:
1670
+ characters2 += "/";
1671
+ }
1672
+ break;
1673
+ case 123 * variable:
1674
+ points[index++] = strlen(characters2) * ampersand;
1675
+ case 125 * variable:
1676
+ case 59:
1677
+ case 0:
1678
+ switch (character2) {
1679
+ case 0:
1680
+ case 125:
1681
+ scanning = 0;
1682
+ case 59 + offset:
1683
+ if (ampersand == -1)
1684
+ characters2 = replace(characters2, /\f/g, "");
1685
+ if (property > 0 && strlen(characters2) - length2)
1686
+ append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
1687
+ break;
1688
+ case 59:
1689
+ characters2 += ";";
1690
+ default:
1691
+ append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2), rulesets);
1692
+ if (character2 === 123)
1693
+ if (offset === 0)
1694
+ parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
1695
+ else
1696
+ switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
1697
+ case 100:
1698
+ case 108:
1699
+ case 109:
1700
+ case 115:
1701
+ parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
1702
+ break;
1703
+ default:
1704
+ parse(characters2, reference, reference, reference, [""], children, 0, points, children);
1705
+ }
1706
+ }
1707
+ index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
1708
+ break;
1709
+ case 58:
1710
+ length2 = 1 + strlen(characters2), property = previous;
1711
+ default:
1712
+ if (variable < 1) {
1713
+ if (character2 == 123)
1714
+ --variable;
1715
+ else if (character2 == 125 && variable++ == 0 && prev() == 125)
1716
+ continue;
1717
+ }
1718
+ switch (characters2 += from(character2), character2 * variable) {
1719
+ case 38:
1720
+ ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
1721
+ break;
1722
+ case 44:
1723
+ points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
1724
+ break;
1725
+ case 64:
1726
+ if (peek() === 45)
1727
+ characters2 += delimit(next());
1728
+ atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
1729
+ break;
1730
+ case 45:
1731
+ if (previous === 45 && strlen(characters2) == 2)
1732
+ variable = 0;
1733
+ }
1734
+ }
1735
+ return rulesets;
1736
+ }
1737
+ function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2) {
1738
+ var post = offset - 1;
1739
+ var rule = offset === 0 ? rules : [""];
1740
+ var size = sizeof(rule);
1741
+ for (var i = 0, j = 0, k = 0; i < index; ++i)
1742
+ for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
1743
+ if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
1744
+ props[k++] = z;
1745
+ return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);
1746
+ }
1747
+ function comment(value, root, parent) {
1748
+ return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
1749
+ }
1750
+ function declaration(value, root, parent, length2) {
1751
+ return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
1752
+ }
1753
+
1754
+ // node_modules/stylis/src/Serializer.js
1755
+ function serialize(children, callback) {
1756
+ var output = "";
1757
+ var length2 = sizeof(children);
1758
+ for (var i = 0; i < length2; i++)
1759
+ output += callback(children[i], i, children, callback) || "";
1760
+ return output;
1761
+ }
1762
+ function stringify(element, index, children, callback) {
1763
+ switch (element.type) {
1764
+ case LAYER:
1765
+ if (element.children.length)
1766
+ break;
1767
+ case IMPORT:
1768
+ case DECLARATION:
1769
+ return element.return = element.return || element.value;
1770
+ case COMMENT:
1771
+ return "";
1772
+ case KEYFRAMES:
1773
+ return element.return = element.value + "{" + serialize(element.children, callback) + "}";
1774
+ case RULESET:
1775
+ element.value = element.props.join(",");
1776
+ }
1777
+ return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
1778
+ }
1779
+
1780
+ // node_modules/stylis/src/Middleware.js
1781
+ function middleware(collection) {
1782
+ var length2 = sizeof(collection);
1783
+ return function(element, index, children, callback) {
1784
+ var output = "";
1785
+ for (var i = 0; i < length2; i++)
1786
+ output += collection[i](element, index, children, callback) || "";
1787
+ return output;
1788
+ };
1789
+ }
1790
+
1791
+ // node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
1792
+ var weakMemoize = function weakMemoize2(func) {
1793
+ var cache = /* @__PURE__ */ new WeakMap();
1794
+ return function(arg) {
1795
+ if (cache.has(arg)) {
1796
+ return cache.get(arg);
1797
+ }
1798
+ var ret = func(arg);
1799
+ cache.set(arg, ret);
1800
+ return ret;
1801
+ };
1802
+ };
1803
+
1804
+ // node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
1805
+ function memoize(fn) {
1806
+ var cache = /* @__PURE__ */ Object.create(null);
1807
+ return function(arg) {
1808
+ if (cache[arg] === void 0)
1809
+ cache[arg] = fn(arg);
1810
+ return cache[arg];
1811
+ };
1812
+ }
1813
+
1814
+ // node_modules/@emotion/cache/dist/emotion-cache.esm.js
1815
+ var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) {
1816
+ var previous = 0;
1817
+ var character2 = 0;
1818
+ while (true) {
1819
+ previous = character2;
1820
+ character2 = peek();
1821
+ if (previous === 38 && character2 === 12) {
1822
+ points[index] = 1;
1823
+ }
1824
+ if (token(character2)) {
1825
+ break;
1826
+ }
1827
+ next();
1828
+ }
1829
+ return slice(begin, position);
1830
+ };
1831
+ var toRules = function toRules2(parsed, points) {
1832
+ var index = -1;
1833
+ var character2 = 44;
1834
+ do {
1835
+ switch (token(character2)) {
1836
+ case 0:
1837
+ if (character2 === 38 && peek() === 12) {
1838
+ points[index] = 1;
1839
+ }
1840
+ parsed[index] += identifierWithPointTracking(position - 1, points, index);
1841
+ break;
1842
+ case 2:
1843
+ parsed[index] += delimit(character2);
1844
+ break;
1845
+ case 4:
1846
+ if (character2 === 44) {
1847
+ parsed[++index] = peek() === 58 ? "&\f" : "";
1848
+ points[index] = parsed[index].length;
1849
+ break;
1850
+ }
1851
+ default:
1852
+ parsed[index] += from(character2);
1853
+ }
1854
+ } while (character2 = next());
1855
+ return parsed;
1856
+ };
1857
+ var getRules = function getRules2(value, points) {
1858
+ return dealloc(toRules(alloc(value), points));
1859
+ };
1860
+ var fixedElements = /* @__PURE__ */ new WeakMap();
1861
+ var compat = function compat2(element) {
1862
+ if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
1863
+ // negative .length indicates that this rule has been already prefixed
1864
+ element.length < 1) {
1865
+ return;
1866
+ }
1867
+ var value = element.value, parent = element.parent;
1868
+ var isImplicitRule = element.column === parent.column && element.line === parent.line;
1869
+ while (parent.type !== "rule") {
1870
+ parent = parent.parent;
1871
+ if (!parent)
1872
+ return;
1873
+ }
1874
+ if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
1875
+ return;
1876
+ }
1877
+ if (isImplicitRule) {
1878
+ return;
1879
+ }
1880
+ fixedElements.set(element, true);
1881
+ var points = [];
1882
+ var rules = getRules(value, points);
1883
+ var parentRules = parent.props;
1884
+ for (var i = 0, k = 0; i < rules.length; i++) {
1885
+ for (var j = 0; j < parentRules.length; j++, k++) {
1886
+ element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
1887
+ }
1888
+ }
1889
+ };
1890
+ var removeLabel = function removeLabel2(element) {
1891
+ if (element.type === "decl") {
1892
+ var value = element.value;
1893
+ if (
1894
+ // charcode for l
1895
+ value.charCodeAt(0) === 108 && // charcode for b
1896
+ value.charCodeAt(2) === 98
1897
+ ) {
1898
+ element["return"] = "";
1899
+ element.value = "";
1900
+ }
1901
+ }
1902
+ };
1903
+ var ignoreFlag = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason";
1904
+ var isIgnoringComment = function isIgnoringComment2(element) {
1905
+ return element.type === "comm" && element.children.indexOf(ignoreFlag) > -1;
1906
+ };
1907
+ var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm2(cache) {
1908
+ return function(element, index, children) {
1909
+ if (element.type !== "rule" || cache.compat)
1910
+ return;
1911
+ var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
1912
+ if (unsafePseudoClasses) {
1913
+ var isNested = !!element.parent;
1914
+ var commentContainer = isNested ? element.parent.children : (
1915
+ // global rule at the root level
1916
+ children
1917
+ );
1918
+ for (var i = commentContainer.length - 1; i >= 0; i--) {
1919
+ var node2 = commentContainer[i];
1920
+ if (node2.line < element.line) {
1921
+ break;
1922
+ }
1923
+ if (node2.column < element.column) {
1924
+ if (isIgnoringComment(node2)) {
1925
+ return;
1926
+ }
1927
+ break;
1928
+ }
1929
+ }
1930
+ unsafePseudoClasses.forEach(function(unsafePseudoClass) {
1931
+ console.error('The pseudo class "' + unsafePseudoClass + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + unsafePseudoClass.split("-child")[0] + '-of-type".');
1932
+ });
1933
+ }
1934
+ };
1935
+ };
1936
+ var isImportRule = function isImportRule2(element) {
1937
+ return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
1938
+ };
1939
+ var isPrependedWithRegularRules = function isPrependedWithRegularRules2(index, children) {
1940
+ for (var i = index - 1; i >= 0; i--) {
1941
+ if (!isImportRule(children[i])) {
1942
+ return true;
1943
+ }
1944
+ }
1945
+ return false;
1946
+ };
1947
+ var nullifyElement = function nullifyElement2(element) {
1948
+ element.type = "";
1949
+ element.value = "";
1950
+ element["return"] = "";
1951
+ element.children = "";
1952
+ element.props = "";
1953
+ };
1954
+ var incorrectImportAlarm = function incorrectImportAlarm2(element, index, children) {
1955
+ if (!isImportRule(element)) {
1956
+ return;
1957
+ }
1958
+ if (element.parent) {
1959
+ console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.");
1960
+ nullifyElement(element);
1961
+ } else if (isPrependedWithRegularRules(index, children)) {
1962
+ console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
1963
+ nullifyElement(element);
1964
+ }
1965
+ };
1966
+ function prefix(value, length2) {
1967
+ switch (hash(value, length2)) {
1968
+ case 5103:
1969
+ return WEBKIT + "print-" + value + value;
1970
+ case 5737:
1971
+ case 4201:
1972
+ case 3177:
1973
+ case 3433:
1974
+ case 1641:
1975
+ case 4457:
1976
+ case 2921:
1977
+ case 5572:
1978
+ case 6356:
1979
+ case 5844:
1980
+ case 3191:
1981
+ case 6645:
1982
+ case 3005:
1983
+ case 6391:
1984
+ case 5879:
1985
+ case 5623:
1986
+ case 6135:
1987
+ case 4599:
1988
+ case 4855:
1989
+ case 4215:
1990
+ case 6389:
1991
+ case 5109:
1992
+ case 5365:
1993
+ case 5621:
1994
+ case 3829:
1995
+ return WEBKIT + value + value;
1996
+ case 5349:
1997
+ case 4246:
1998
+ case 4810:
1999
+ case 6968:
2000
+ case 2756:
2001
+ return WEBKIT + value + MOZ + value + MS + value + value;
2002
+ case 6828:
2003
+ case 4268:
2004
+ return WEBKIT + value + MS + value + value;
2005
+ case 6165:
2006
+ return WEBKIT + value + MS + "flex-" + value + value;
2007
+ case 5187:
2008
+ return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
2009
+ case 5443:
2010
+ return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
2011
+ case 4675:
2012
+ return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
2013
+ case 5548:
2014
+ return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
2015
+ case 5292:
2016
+ return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
2017
+ case 6060:
2018
+ return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
2019
+ case 4554:
2020
+ return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
2021
+ case 6187:
2022
+ return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
2023
+ case 5495:
2024
+ case 3959:
2025
+ return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
2026
+ case 4968:
2027
+ return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
2028
+ case 4095:
2029
+ case 3583:
2030
+ case 4068:
2031
+ case 2532:
2032
+ return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
2033
+ case 8116:
2034
+ case 7059:
2035
+ case 5753:
2036
+ case 5535:
2037
+ case 5445:
2038
+ case 5701:
2039
+ case 4933:
2040
+ case 4677:
2041
+ case 5533:
2042
+ case 5789:
2043
+ case 5021:
2044
+ case 4765:
2045
+ if (strlen(value) - 1 - length2 > 6)
2046
+ switch (charat(value, length2 + 1)) {
2047
+ case 109:
2048
+ if (charat(value, length2 + 4) !== 45)
2049
+ break;
2050
+ case 102:
2051
+ return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
2052
+ case 115:
2053
+ return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
2054
+ }
2055
+ break;
2056
+ case 4949:
2057
+ if (charat(value, length2 + 1) !== 115)
2058
+ break;
2059
+ case 6444:
2060
+ switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
2061
+ case 107:
2062
+ return replace(value, ":", ":" + WEBKIT) + value;
2063
+ case 101:
2064
+ return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
2065
+ }
2066
+ break;
2067
+ case 5936:
2068
+ switch (charat(value, length2 + 11)) {
2069
+ case 114:
2070
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
2071
+ case 108:
2072
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
2073
+ case 45:
2074
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
2075
+ }
2076
+ return WEBKIT + value + MS + value + value;
2077
+ }
2078
+ return value;
2079
+ }
2080
+ var prefixer = function prefixer2(element, index, children, callback) {
2081
+ if (element.length > -1) {
2082
+ if (!element["return"])
2083
+ switch (element.type) {
2084
+ case DECLARATION:
2085
+ element["return"] = prefix(element.value, element.length);
2086
+ break;
2087
+ case KEYFRAMES:
2088
+ return serialize([copy(element, {
2089
+ value: replace(element.value, "@", "@" + WEBKIT)
2090
+ })], callback);
2091
+ case RULESET:
2092
+ if (element.length)
2093
+ return combine(element.props, function(value) {
2094
+ switch (match(value, /(::plac\w+|:read-\w+)/)) {
2095
+ case ":read-only":
2096
+ case ":read-write":
2097
+ return serialize([copy(element, {
2098
+ props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
2099
+ })], callback);
2100
+ case "::placeholder":
2101
+ return serialize([copy(element, {
2102
+ props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
2103
+ }), copy(element, {
2104
+ props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
2105
+ }), copy(element, {
2106
+ props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
2107
+ })], callback);
2108
+ }
2109
+ return "";
2110
+ });
2111
+ }
2112
+ }
2113
+ };
2114
+ var isBrowser = typeof document !== "undefined";
2115
+ var getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() {
2116
+ return memoize(function() {
2117
+ var cache = {};
2118
+ return function(name) {
2119
+ return cache[name];
2120
+ };
2121
+ });
2122
+ });
2123
+ var defaultStylisPlugins = [prefixer];
2124
+ var createCache = function createCache2(options) {
2125
+ var key = options.key;
2126
+ if (!key) {
2127
+ throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements.");
2128
+ }
2129
+ if (isBrowser && key === "css") {
2130
+ var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
2131
+ Array.prototype.forEach.call(ssrStyles, function(node2) {
2132
+ var dataEmotionAttribute = node2.getAttribute("data-emotion");
2133
+ if (dataEmotionAttribute.indexOf(" ") === -1) {
2134
+ return;
2135
+ }
2136
+ document.head.appendChild(node2);
2137
+ node2.setAttribute("data-s", "");
2138
+ });
2139
+ }
2140
+ var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
2141
+ if (true) {
2142
+ if (/[^a-z-]/.test(key)) {
2143
+ throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + key + '" was passed');
2144
+ }
2145
+ }
2146
+ var inserted = {};
2147
+ var container;
2148
+ var nodesToHydrate = [];
2149
+ if (isBrowser) {
2150
+ container = options.container || document.head;
2151
+ Array.prototype.forEach.call(
2152
+ // this means we will ignore elements which don't have a space in them which
2153
+ // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
2154
+ document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
2155
+ function(node2) {
2156
+ var attrib = node2.getAttribute("data-emotion").split(" ");
2157
+ for (var i = 1; i < attrib.length; i++) {
2158
+ inserted[attrib[i]] = true;
2159
+ }
2160
+ nodesToHydrate.push(node2);
2161
+ }
2162
+ );
2163
+ }
2164
+ var _insert;
2165
+ var omnipresentPlugins = [compat, removeLabel];
2166
+ if (true) {
2167
+ omnipresentPlugins.push(createUnsafeSelectorsAlarm({
2168
+ get compat() {
2169
+ return cache.compat;
2170
+ }
2171
+ }), incorrectImportAlarm);
2172
+ }
2173
+ if (isBrowser) {
2174
+ var currentSheet;
2175
+ var finalizingPlugins = [stringify, true ? function(element) {
2176
+ if (!element.root) {
2177
+ if (element["return"]) {
2178
+ currentSheet.insert(element["return"]);
2179
+ } else if (element.value && element.type !== COMMENT) {
2180
+ currentSheet.insert(element.value + "{}");
2181
+ }
2182
+ }
2183
+ } : rulesheet(function(rule) {
2184
+ currentSheet.insert(rule);
2185
+ })];
2186
+ var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
2187
+ var stylis = function stylis2(styles13) {
2188
+ return serialize(compile(styles13), serializer);
2189
+ };
2190
+ _insert = function insert(selector, serialized, sheet, shouldCache) {
2191
+ currentSheet = sheet;
2192
+ if (serialized.map !== void 0) {
2193
+ currentSheet = {
2194
+ insert: function insert2(rule) {
2195
+ sheet.insert(rule + serialized.map);
2196
+ }
2197
+ };
2198
+ }
2199
+ stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
2200
+ if (shouldCache) {
2201
+ cache.inserted[serialized.name] = true;
2202
+ }
2203
+ };
2204
+ } else {
2205
+ var _finalizingPlugins = [stringify];
2206
+ var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
2207
+ var _stylis = function _stylis2(styles13) {
2208
+ return serialize(compile(styles13), _serializer);
2209
+ };
2210
+ var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
2211
+ var getRules3 = function getRules4(selector, serialized) {
2212
+ var name = serialized.name;
2213
+ if (serverStylisCache[name] === void 0) {
2214
+ serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
2215
+ }
2216
+ return serverStylisCache[name];
2217
+ };
2218
+ _insert = function _insert2(selector, serialized, sheet, shouldCache) {
2219
+ var name = serialized.name;
2220
+ var rules = getRules3(selector, serialized);
2221
+ if (cache.compat === void 0) {
2222
+ if (shouldCache) {
2223
+ cache.inserted[name] = true;
2224
+ }
2225
+ if (serialized.map !== void 0) {
2226
+ return rules + serialized.map;
2227
+ }
2228
+ return rules;
2229
+ } else {
2230
+ if (shouldCache) {
2231
+ cache.inserted[name] = rules;
2232
+ } else {
2233
+ return rules;
2234
+ }
2235
+ }
2236
+ };
2237
+ }
2238
+ var cache = {
2239
+ key,
2240
+ sheet: new StyleSheet({
2241
+ key,
2242
+ container,
2243
+ nonce: options.nonce,
2244
+ speedy: options.speedy,
2245
+ prepend: options.prepend,
2246
+ insertionPoint: options.insertionPoint
2247
+ }),
2248
+ nonce: options.nonce,
2249
+ inserted,
2250
+ registered: {},
2251
+ insert: _insert
2252
+ };
2253
+ cache.sheet.hydrate(nodesToHydrate);
2254
+ return cache;
2255
+ };
2256
+
2257
+ // node_modules/@emotion/hash/dist/emotion-hash.esm.js
2258
+ function murmur2(str) {
2259
+ var h = 0;
2260
+ var k, i = 0, len = str.length;
2261
+ for (; len >= 4; ++i, len -= 4) {
2262
+ k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
2263
+ k = /* Math.imul(k, m): */
2264
+ (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
2265
+ k ^= /* k >>> r: */
2266
+ k >>> 24;
2267
+ h = /* Math.imul(k, m): */
2268
+ (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
2269
+ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
2270
+ }
2271
+ switch (len) {
2272
+ case 3:
2273
+ h ^= (str.charCodeAt(i + 2) & 255) << 16;
2274
+ case 2:
2275
+ h ^= (str.charCodeAt(i + 1) & 255) << 8;
2276
+ case 1:
2277
+ h ^= str.charCodeAt(i) & 255;
2278
+ h = /* Math.imul(h, m): */
2279
+ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
2280
+ }
2281
+ h ^= h >>> 13;
2282
+ h = /* Math.imul(h, m): */
2283
+ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
2284
+ return ((h ^ h >>> 15) >>> 0).toString(36);
2285
+ }
2286
+
2287
+ // node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
2288
+ var unitlessKeys = {
2289
+ animationIterationCount: 1,
2290
+ aspectRatio: 1,
2291
+ borderImageOutset: 1,
2292
+ borderImageSlice: 1,
2293
+ borderImageWidth: 1,
2294
+ boxFlex: 1,
2295
+ boxFlexGroup: 1,
2296
+ boxOrdinalGroup: 1,
2297
+ columnCount: 1,
2298
+ columns: 1,
2299
+ flex: 1,
2300
+ flexGrow: 1,
2301
+ flexPositive: 1,
2302
+ flexShrink: 1,
2303
+ flexNegative: 1,
2304
+ flexOrder: 1,
2305
+ gridRow: 1,
2306
+ gridRowEnd: 1,
2307
+ gridRowSpan: 1,
2308
+ gridRowStart: 1,
2309
+ gridColumn: 1,
2310
+ gridColumnEnd: 1,
2311
+ gridColumnSpan: 1,
2312
+ gridColumnStart: 1,
2313
+ msGridRow: 1,
2314
+ msGridRowSpan: 1,
2315
+ msGridColumn: 1,
2316
+ msGridColumnSpan: 1,
2317
+ fontWeight: 1,
2318
+ lineHeight: 1,
2319
+ opacity: 1,
2320
+ order: 1,
2321
+ orphans: 1,
2322
+ tabSize: 1,
2323
+ widows: 1,
2324
+ zIndex: 1,
2325
+ zoom: 1,
2326
+ WebkitLineClamp: 1,
2327
+ // SVG-related properties
2328
+ fillOpacity: 1,
2329
+ floodOpacity: 1,
2330
+ stopOpacity: 1,
2331
+ strokeDasharray: 1,
2332
+ strokeDashoffset: 1,
2333
+ strokeMiterlimit: 1,
2334
+ strokeOpacity: 1,
2335
+ strokeWidth: 1
2336
+ };
2337
+
2338
+ // node_modules/@emotion/serialize/dist/emotion-serialize.esm.js
2339
+ var ILLEGAL_ESCAPE_SEQUENCE_ERROR = `You have illegal escape sequence in your template literal, most likely inside content's property value.
2340
+ Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
2341
+ You can read more about this here:
2342
+ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`;
2343
+ var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
2344
+ var hyphenateRegex = /[A-Z]|^ms/g;
2345
+ var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
2346
+ var isCustomProperty = function isCustomProperty2(property) {
2347
+ return property.charCodeAt(1) === 45;
2348
+ };
2349
+ var isProcessableValue = function isProcessableValue2(value) {
2350
+ return value != null && typeof value !== "boolean";
2351
+ };
2352
+ var processStyleName = /* @__PURE__ */ memoize(function(styleName) {
2353
+ return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase();
2354
+ });
2355
+ var processStyleValue = function processStyleValue2(key, value) {
2356
+ switch (key) {
2357
+ case "animation":
2358
+ case "animationName": {
2359
+ if (typeof value === "string") {
2360
+ return value.replace(animationRegex, function(match2, p1, p2) {
2361
+ cursor = {
2362
+ name: p1,
2363
+ styles: p2,
2364
+ next: cursor
2365
+ };
2366
+ return p1;
2367
+ });
2368
+ }
2369
+ }
2370
+ }
2371
+ if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === "number" && value !== 0) {
2372
+ return value + "px";
2373
+ }
2374
+ return value;
2375
+ };
2376
+ if (true) {
2377
+ contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
2378
+ contentValues = ["normal", "none", "initial", "inherit", "unset"];
2379
+ oldProcessStyleValue = processStyleValue;
2380
+ msPattern = /^-ms-/;
2381
+ hyphenPattern = /-(.)/g;
2382
+ hyphenatedCache = {};
2383
+ processStyleValue = function processStyleValue3(key, value) {
2384
+ if (key === "content") {
2385
+ if (typeof value !== "string" || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
2386
+ throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
2387
+ }
2388
+ }
2389
+ var processed = oldProcessStyleValue(key, value);
2390
+ if (processed !== "" && !isCustomProperty(key) && key.indexOf("-") !== -1 && hyphenatedCache[key] === void 0) {
2391
+ hyphenatedCache[key] = true;
2392
+ console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, "ms-").replace(hyphenPattern, function(str, _char) {
2393
+ return _char.toUpperCase();
2394
+ }) + "?");
2395
+ }
2396
+ return processed;
2397
+ };
2398
+ }
2399
+ var contentValuePattern;
2400
+ var contentValues;
2401
+ var oldProcessStyleValue;
2402
+ var msPattern;
2403
+ var hyphenPattern;
2404
+ var hyphenatedCache;
2405
+ var noComponentSelectorMessage = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
2406
+ function handleInterpolation(mergedProps, registered, interpolation) {
2407
+ if (interpolation == null) {
2408
+ return "";
2409
+ }
2410
+ if (interpolation.__emotion_styles !== void 0) {
2411
+ if (interpolation.toString() === "NO_COMPONENT_SELECTOR") {
2412
+ throw new Error(noComponentSelectorMessage);
2413
+ }
2414
+ return interpolation;
2415
+ }
2416
+ switch (typeof interpolation) {
2417
+ case "boolean": {
2418
+ return "";
2419
+ }
2420
+ case "object": {
2421
+ if (interpolation.anim === 1) {
2422
+ cursor = {
2423
+ name: interpolation.name,
2424
+ styles: interpolation.styles,
2425
+ next: cursor
2426
+ };
2427
+ return interpolation.name;
2428
+ }
2429
+ if (interpolation.styles !== void 0) {
2430
+ var next2 = interpolation.next;
2431
+ if (next2 !== void 0) {
2432
+ while (next2 !== void 0) {
2433
+ cursor = {
2434
+ name: next2.name,
2435
+ styles: next2.styles,
2436
+ next: cursor
2437
+ };
2438
+ next2 = next2.next;
2439
+ }
2440
+ }
2441
+ var styles13 = interpolation.styles + ";";
2442
+ if (interpolation.map !== void 0) {
2443
+ styles13 += interpolation.map;
2444
+ }
2445
+ return styles13;
2446
+ }
2447
+ return createStringFromObject(mergedProps, registered, interpolation);
2448
+ }
2449
+ case "function": {
2450
+ if (mergedProps !== void 0) {
2451
+ var previousCursor = cursor;
2452
+ var result = interpolation(mergedProps);
2453
+ cursor = previousCursor;
2454
+ return handleInterpolation(mergedProps, registered, result);
2455
+ } else if (true) {
2456
+ console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");
2457
+ }
2458
+ break;
2459
+ }
2460
+ case "string":
2461
+ if (true) {
2462
+ var matched = [];
2463
+ var replaced = interpolation.replace(animationRegex, function(match2, p1, p2) {
2464
+ var fakeVarName = "animation" + matched.length;
2465
+ matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, "") + "`");
2466
+ return "${" + fakeVarName + "}";
2467
+ });
2468
+ if (matched.length) {
2469
+ console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n" + [].concat(matched, ["`" + replaced + "`"]).join("\n") + "\n\nYou should wrap it with `css` like this:\n\n" + ("css`" + replaced + "`"));
2470
+ }
2471
+ }
2472
+ break;
2473
+ }
2474
+ if (registered == null) {
2475
+ return interpolation;
2476
+ }
2477
+ var cached = registered[interpolation];
2478
+ return cached !== void 0 ? cached : interpolation;
2479
+ }
2480
+ function createStringFromObject(mergedProps, registered, obj) {
2481
+ var string = "";
2482
+ if (Array.isArray(obj)) {
2483
+ for (var i = 0; i < obj.length; i++) {
2484
+ string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
2485
+ }
2486
+ } else {
2487
+ for (var _key in obj) {
2488
+ var value = obj[_key];
2489
+ if (typeof value !== "object") {
2490
+ if (registered != null && registered[value] !== void 0) {
2491
+ string += _key + "{" + registered[value] + "}";
2492
+ } else if (isProcessableValue(value)) {
2493
+ string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
2494
+ }
2495
+ } else {
2496
+ if (_key === "NO_COMPONENT_SELECTOR" && true) {
2497
+ throw new Error(noComponentSelectorMessage);
2498
+ }
2499
+ if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
2500
+ for (var _i = 0; _i < value.length; _i++) {
2501
+ if (isProcessableValue(value[_i])) {
2502
+ string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
2503
+ }
2504
+ }
2505
+ } else {
2506
+ var interpolated = handleInterpolation(mergedProps, registered, value);
2507
+ switch (_key) {
2508
+ case "animation":
2509
+ case "animationName": {
2510
+ string += processStyleName(_key) + ":" + interpolated + ";";
2511
+ break;
2512
+ }
2513
+ default: {
2514
+ if (_key === "undefined") {
2515
+ console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
2516
+ }
2517
+ string += _key + "{" + interpolated + "}";
2518
+ }
2519
+ }
2520
+ }
2521
+ }
2522
+ }
2523
+ }
2524
+ return string;
2525
+ }
2526
+ var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
2527
+ var sourceMapPattern;
2528
+ if (true) {
2529
+ sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
2530
+ }
2531
+ var cursor;
2532
+ var serializeStyles = function serializeStyles2(args, registered, mergedProps) {
2533
+ if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) {
2534
+ return args[0];
2535
+ }
2536
+ var stringMode = true;
2537
+ var styles13 = "";
2538
+ cursor = void 0;
2539
+ var strings = args[0];
2540
+ if (strings == null || strings.raw === void 0) {
2541
+ stringMode = false;
2542
+ styles13 += handleInterpolation(mergedProps, registered, strings);
2543
+ } else {
2544
+ if (strings[0] === void 0) {
2545
+ console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
2546
+ }
2547
+ styles13 += strings[0];
2548
+ }
2549
+ for (var i = 1; i < args.length; i++) {
2550
+ styles13 += handleInterpolation(mergedProps, registered, args[i]);
2551
+ if (stringMode) {
2552
+ if (strings[i] === void 0) {
2553
+ console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
2554
+ }
2555
+ styles13 += strings[i];
2556
+ }
2557
+ }
2558
+ var sourceMap;
2559
+ if (true) {
2560
+ styles13 = styles13.replace(sourceMapPattern, function(match3) {
2561
+ sourceMap = match3;
2562
+ return "";
2563
+ });
2564
+ }
2565
+ labelPattern.lastIndex = 0;
2566
+ var identifierName = "";
2567
+ var match2;
2568
+ while ((match2 = labelPattern.exec(styles13)) !== null) {
2569
+ identifierName += "-" + // $FlowFixMe we know it's not null
2570
+ match2[1];
2571
+ }
2572
+ var name = murmur2(styles13) + identifierName;
2573
+ if (true) {
2574
+ return {
2575
+ name,
2576
+ styles: styles13,
2577
+ map: sourceMap,
2578
+ next: cursor,
2579
+ toString: function toString() {
2580
+ return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
2581
+ }
2582
+ };
2583
+ }
2584
+ return {
2585
+ name,
2586
+ styles: styles13,
2587
+ next: cursor
2588
+ };
2589
+ };
2590
+
2591
+ // node_modules/@emotion/utils/dist/emotion-utils.esm.js
2592
+ var isBrowser2 = typeof document !== "undefined";
2593
+ function getRegisteredStyles(registered, registeredStyles, classNames) {
2594
+ var rawClassName = "";
2595
+ classNames.split(" ").forEach(function(className) {
2596
+ if (registered[className] !== void 0) {
2597
+ registeredStyles.push(registered[className] + ";");
2598
+ } else {
2599
+ rawClassName += className + " ";
2600
+ }
2601
+ });
2602
+ return rawClassName;
2603
+ }
2604
+ var registerStyles = function registerStyles2(cache, serialized, isStringTag) {
2605
+ var className = cache.key + "-" + serialized.name;
2606
+ if (
2607
+ // we only need to add the styles to the registered cache if the
2608
+ // class name could be used further down
2609
+ // the tree but if it's a string tag, we know it won't
2610
+ // so we don't have to add it to registered cache.
2611
+ // this improves memory usage since we can avoid storing the whole style string
2612
+ (isStringTag === false || // we need to always store it if we're in compat mode and
2613
+ // in node since emotion-server relies on whether a style is in
2614
+ // the registered cache to know whether a style is global or not
2615
+ // also, note that this check will be dead code eliminated in the browser
2616
+ isBrowser2 === false && cache.compat !== void 0) && cache.registered[className] === void 0
2617
+ ) {
2618
+ cache.registered[className] = serialized.styles;
2619
+ }
2620
+ };
2621
+ var insertStyles = function insertStyles2(cache, serialized, isStringTag) {
2622
+ registerStyles(cache, serialized, isStringTag);
2623
+ var className = cache.key + "-" + serialized.name;
2624
+ if (cache.inserted[serialized.name] === void 0) {
2625
+ var stylesForSSR = "";
2626
+ var current = serialized;
2627
+ do {
2628
+ var maybeStyles = cache.insert(serialized === current ? "." + className : "", current, cache.sheet, true);
2629
+ if (!isBrowser2 && maybeStyles !== void 0) {
2630
+ stylesForSSR += maybeStyles;
2631
+ }
2632
+ current = current.next;
2633
+ } while (current !== void 0);
2634
+ if (!isBrowser2 && stylesForSSR.length !== 0) {
2635
+ return stylesForSSR;
2636
+ }
2637
+ }
2638
+ };
2639
+
2640
+ // node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
2641
+ function insertWithoutScoping(cache, serialized) {
2642
+ if (cache.inserted[serialized.name] === void 0) {
2643
+ return cache.insert("", serialized, cache.sheet, true);
2644
+ }
2645
+ }
2646
+ function merge(registered, css, className) {
2647
+ var registeredStyles = [];
2648
+ var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
2649
+ if (registeredStyles.length < 2) {
2650
+ return className;
2651
+ }
2652
+ return rawClassName + css(registeredStyles);
2653
+ }
2654
+ var createEmotion = function createEmotion2(options) {
2655
+ var cache = createCache(options);
2656
+ cache.sheet.speedy = function(value) {
2657
+ if (this.ctr !== 0) {
2658
+ throw new Error("speedy must be changed before any rules are inserted");
2659
+ }
2660
+ this.isSpeedy = value;
2661
+ };
2662
+ cache.compat = true;
2663
+ var css = function css2() {
2664
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2665
+ args[_key] = arguments[_key];
2666
+ }
2667
+ var serialized = serializeStyles(args, cache.registered, void 0);
2668
+ insertStyles(cache, serialized, false);
2669
+ return cache.key + "-" + serialized.name;
2670
+ };
2671
+ var keyframes = function keyframes2() {
2672
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2673
+ args[_key2] = arguments[_key2];
2674
+ }
2675
+ var serialized = serializeStyles(args, cache.registered);
2676
+ var animation = "animation-" + serialized.name;
2677
+ insertWithoutScoping(cache, {
2678
+ name: serialized.name,
2679
+ styles: "@keyframes " + animation + "{" + serialized.styles + "}"
2680
+ });
2681
+ return animation;
2682
+ };
2683
+ var injectGlobal = function injectGlobal2() {
2684
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2685
+ args[_key3] = arguments[_key3];
2686
+ }
2687
+ var serialized = serializeStyles(args, cache.registered);
2688
+ insertWithoutScoping(cache, serialized);
2689
+ };
2690
+ var cx7 = function cx8() {
2691
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
2692
+ args[_key4] = arguments[_key4];
2693
+ }
2694
+ return merge(cache.registered, css, classnames(args));
2695
+ };
2696
+ return {
2697
+ css,
2698
+ cx: cx7,
2699
+ injectGlobal,
2700
+ keyframes,
2701
+ hydrate: function hydrate(ids) {
2702
+ ids.forEach(function(key) {
2703
+ cache.inserted[key] = true;
2704
+ });
2705
+ },
2706
+ flush: function flush() {
2707
+ cache.registered = {};
2708
+ cache.inserted = {};
2709
+ cache.sheet.flush();
2710
+ },
2711
+ // $FlowFixMe
2712
+ sheet: cache.sheet,
2713
+ cache,
2714
+ getRegisteredStyles: getRegisteredStyles.bind(null, cache.registered),
2715
+ merge: merge.bind(null, cache.registered, css)
2716
+ };
2717
+ };
2718
+ var classnames = function classnames2(args) {
2719
+ var cls = "";
2720
+ for (var i = 0; i < args.length; i++) {
2721
+ var arg = args[i];
2722
+ if (arg == null)
2723
+ continue;
2724
+ var toAdd = void 0;
2725
+ switch (typeof arg) {
2726
+ case "boolean":
2727
+ break;
2728
+ case "object": {
2729
+ if (Array.isArray(arg)) {
2730
+ toAdd = classnames2(arg);
2731
+ } else {
2732
+ toAdd = "";
2733
+ for (var k in arg) {
2734
+ if (arg[k] && k) {
2735
+ toAdd && (toAdd += " ");
2736
+ toAdd += k;
2737
+ }
2738
+ }
2739
+ }
2740
+ break;
2741
+ }
2742
+ default: {
2743
+ toAdd = arg;
2744
+ }
2745
+ }
2746
+ if (toAdd) {
2747
+ cls && (cls += " ");
2748
+ cls += toAdd;
2749
+ }
2750
+ }
2751
+ return cls;
2752
+ };
2753
+
2754
+ // src/private/useStyleToEmotionObject.ts
2755
+ var import_react4 = __toESM(require_react());
2756
+ var { random } = Math;
2757
+ var emotionPool = {};
2758
+ var nonce = "";
2759
+ function createCSSKey() {
2760
+ return random().toString(26).substr(2, 5).replace(/\d/gu, (value) => String.fromCharCode(value.charCodeAt(0) + 65));
2761
+ }
2762
+ function useStyleToEmotionObject() {
2763
+ return (0, import_react4.useMemo)(() => {
2764
+ const emotion = (
2765
+ // Prefix "id-" to prevent object injection attack.
2766
+ emotionPool[`id-${nonce}`] || (emotionPool[`id-${nonce}`] = createEmotion({ key: `webchat--css-${createCSSKey()}`, nonce }))
2767
+ );
2768
+ return (style) => emotion.css(style);
2769
+ }, []);
2770
+ }
2771
+
2772
+ // src/styles/index.ts
2773
+ function useStyles(styles13) {
2774
+ const getClassName = useStyleToEmotionObject();
2775
+ return (0, import_react5.useMemo)(
2776
+ () => Object.freeze(
2777
+ Object.fromEntries(Object.entries(styles13).map(([cls, style]) => [cls, `${cls} ${getClassName(style)}`]))
2778
+ ),
2779
+ [styles13, getClassName]
2780
+ );
2781
+ }
2782
+
2783
+ // src/components/telephoneKeypad/private/Button.tsx
2784
+ var import_react6 = __toESM(require_react());
2785
+ var styles = {
2786
+ "webchat__telephone-keypad__button": {
2787
+ "-webkit-user-select": "none",
2788
+ alignItems: "center",
2789
+ appearance: "none",
2790
+ // backgroundColor: isDarkTheme() || isHighContrastTheme() ? black : white,
2791
+ backgroundColor: "White",
2792
+ borderRadius: "100%",
2793
+ // Whitelabel styles
2794
+ // border: `solid 1px ${isHighContrastTheme() ? white : isDarkTheme() ? gray160 : gray40}`,
2795
+ // color: 'inherit',
2796
+ border: "solid 1px var(--webchat-colorNeutralStroke1)",
2797
+ color: "var(--webchat-colorNeutralForeground1)",
2798
+ fontWeight: "var(--webchat-fontWeightSemibold)",
2799
+ cursor: "pointer",
2800
+ display: "flex",
2801
+ flexDirection: "column",
2802
+ height: 60,
2803
+ opacity: 0.7,
2804
+ padding: 0,
2805
+ position: "relative",
2806
+ touchAction: "none",
2807
+ userSelect: "none",
2808
+ width: 60,
2809
+ "&:hover": {
2810
+ // backgroundColor: isHighContrastTheme() ? gray210 : isDarkTheme() ? gray150 : gray30
2811
+ backgroundColor: "var(--webchat-colorGray30)"
2812
+ }
2813
+ },
2814
+ "webchat__telephone-keypad__button__ruby": {
2815
+ // color: isHighContrastTheme() ? white : isDarkTheme() ? gray40 : gray160,
2816
+ color: "var(--webchat-colorGray160)",
2817
+ fontSize: 10
2818
+ },
2819
+ "webchat__telephone-keypad__button__text": {
2820
+ fontSize: 24,
2821
+ marginTop: 8
2822
+ },
2823
+ "webchat__telephone-keypad--horizontal": {
2824
+ "& .webchat__telephone-keypad__button": {
2825
+ height: 32,
2826
+ width: 32,
2827
+ margin: "8px 4px",
2828
+ justifyContent: "center"
2829
+ },
2830
+ "webchat__telephone-keypad__button__ruby": {
2831
+ display: "none"
2832
+ },
2833
+ "& .webchat__telephone-keypad__button__text": {
2834
+ fontSize: 20,
2835
+ marginTop: 0
2836
+ }
2837
+ }
2838
+ };
2839
+ var Button = (0, import_react6.memo)(
2840
+ // As we are all TypeScript, internal components do not need propTypes.
2841
+ // eslint-disable-next-line react/prop-types
2842
+ (0, import_react6.forwardRef)(({ button, "data-testid": dataTestId, onClick, ruby }, ref) => {
2843
+ const classNames = useStyles(styles);
2844
+ const onClickRef = useRefFrom(onClick);
2845
+ const handleClick = (0, import_react6.useCallback)(() => onClickRef.current?.(), [onClickRef]);
2846
+ return /* @__PURE__ */ import_react6.default.createElement(
2847
+ "button",
2848
+ {
2849
+ className: classNames["webchat__telephone-keypad__button"],
2850
+ "data-testid": dataTestId,
2851
+ onClick: handleClick,
2852
+ ref,
2853
+ type: "button"
2854
+ },
2855
+ /* @__PURE__ */ import_react6.default.createElement("span", { className: classNames["webchat__telephone-keypad__button__text"] }, button === "star" ? "\u2217" : button === "pound" ? "#" : button),
2856
+ !!ruby && /* @__PURE__ */ import_react6.default.createElement("ruby", { className: classNames["webchat__telephone-keypad__button__ruby"] }, ruby)
2857
+ );
2858
+ })
2859
+ );
2860
+ Button.displayName = "TelephoneKeypad.Button";
2861
+ var Button_default = Button;
2862
+
2863
+ // src/testIds.ts
2864
+ var testIds = {
2865
+ sendBoxDropZone: "send box drop zone",
2866
+ sendBoxSendButton: "send box send button",
2867
+ sendBoxTextBox: "send box text area",
2868
+ sendBoxTelephoneKeypadButton1: `send box telephone keypad button 1`,
2869
+ sendBoxTelephoneKeypadButton2: `send box telephone keypad button 2`,
2870
+ sendBoxTelephoneKeypadButton3: `send box telephone keypad button 3`,
2871
+ sendBoxTelephoneKeypadButton4: `send box telephone keypad button 4`,
2872
+ sendBoxTelephoneKeypadButton5: `send box telephone keypad button 5`,
2873
+ sendBoxTelephoneKeypadButton6: `send box telephone keypad button 6`,
2874
+ sendBoxTelephoneKeypadButton7: `send box telephone keypad button 7`,
2875
+ sendBoxTelephoneKeypadButton8: `send box telephone keypad button 8`,
2876
+ sendBoxTelephoneKeypadButton9: `send box telephone keypad button 9`,
2877
+ sendBoxTelephoneKeypadButton0: `send box telephone keypad button 0`,
2878
+ sendBoxTelephoneKeypadButtonStar: `send box telephone keypad button star`,
2879
+ sendBoxTelephoneKeypadButtonPound: `send box telephone keypad button pound`,
2880
+ sendBoxTelephoneKeypadToolbarButton: "send box telephone keypad toolbar button",
2881
+ sendBoxUploadButton: "send box upload button"
2882
+ };
2883
+ var testIds_default = testIds;
2884
+
2885
+ // src/components/telephoneKeypad/useShown.ts
2886
+ var import_react7 = __toESM(require_react());
2887
+ function useShown() {
2888
+ const { setShown, shown } = (0, import_react7.useContext)(Context_default);
2889
+ return (0, import_react7.useMemo)(() => Object.freeze([shown, setShown]), [shown, setShown]);
2890
+ }
2891
+
2892
+ // src/components/telephoneKeypad/private/TelephoneKeypad.tsx
2893
+ var styles2 = {
2894
+ "webchat__telephone-keypad": {
2895
+ /* Commented out whitelabel styles for now. */
2896
+ // background: getHighContrastDarkThemeColor(highContrastColor: black, darkThemeColor: gray190, string, defaultColor: gray10),
2897
+ // borderRadius: '8px 8px 0px 0px',
2898
+ // boxShadow: '-3px 0px 7px 0px rgba(0, 0, 0, 0.13), -0.6px 0px 1.8px 0px rgba(0, 0, 0, 0.10)',
2899
+ alignItems: "center",
2900
+ background: "var(--webchat-colorNeutralBackground1)",
2901
+ // border: isHighContrastTheme() ? `1px solid ${white}` : 'none',
2902
+ border: "none",
2903
+ borderRadius: "var(--webchat-borderRadiusXLarge)",
2904
+ // boxShadow: 'var(--shadow16)',
2905
+ display: "flex",
2906
+ flexDirection: "column",
2907
+ fontFamily: "var(--webchat-fontFamilyBase)",
2908
+ justifyContent: "center"
2909
+ // margin: 'var(--spacingHorizontalMNudge)'
2910
+ },
2911
+ "webchat__telephone-keypad__box": {
2912
+ boxSizing: "border-box",
2913
+ display: "grid",
2914
+ gap: "16px",
2915
+ gridTemplateColumns: "repeat(3, 1fr)",
2916
+ gridTemplateRows: "repeat(4, 1fr)",
2917
+ justifyItems: "center",
2918
+ padding: "16px",
2919
+ width: "100%"
2920
+ }
2921
+ };
2922
+ var Orientation = (0, import_react8.memo)(
2923
+ ({ children, isHorizontal }) => {
2924
+ const classNames = useStyles(styles2);
2925
+ return isHorizontal ? (
2926
+ // <HorizontalDialPadController>{children}</HorizontalDialPadController>
2927
+ false
2928
+ ) : /* @__PURE__ */ import_react8.default.createElement("div", { className: classNames["webchat__telephone-keypad__box"] }, children);
2929
+ }
2930
+ );
2931
+ Orientation.displayName = "TelephoneKeypad:Orientation";
2932
+ var TelephoneKeypad = (0, import_react8.memo)(({ autoFocus, onButtonClick, isHorizontal }) => {
2933
+ const autoFocusRef = useRefFrom(autoFocus);
2934
+ const classNames = useStyles(styles2);
2935
+ const firstButtonRef = (0, import_react8.useRef)(null);
2936
+ const onButtonClickRef = useRefFrom(onButtonClick);
2937
+ const [, setShown] = useShown();
2938
+ const handleButton1Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("1"), [onButtonClickRef]);
2939
+ const handleButton2Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("2"), [onButtonClickRef]);
2940
+ const handleButton3Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("3"), [onButtonClickRef]);
2941
+ const handleButton4Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("4"), [onButtonClickRef]);
2942
+ const handleButton5Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("5"), [onButtonClickRef]);
2943
+ const handleButton6Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("6"), [onButtonClickRef]);
2944
+ const handleButton7Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("7"), [onButtonClickRef]);
2945
+ const handleButton8Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("8"), [onButtonClickRef]);
2946
+ const handleButton9Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("9"), [onButtonClickRef]);
2947
+ const handleButton0Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("0"), [onButtonClickRef]);
2948
+ const handleButtonStarClick = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("star"), [onButtonClickRef]);
2949
+ const handleButtonPoundClick = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("pound"), [onButtonClickRef]);
2950
+ const handleKeyDown = (0, import_react8.useCallback)(
2951
+ (event) => {
2952
+ if (event.key === "Escape") {
2953
+ setShown(false);
2954
+ }
2955
+ },
2956
+ [setShown]
2957
+ );
2958
+ (0, import_react8.useEffect)(() => {
2959
+ autoFocusRef.current && firstButtonRef.current?.focus();
2960
+ }, [autoFocusRef, firstButtonRef]);
2961
+ return /* @__PURE__ */ import_react8.default.createElement("div", { className: classNames["webchat__telephone-keypad"], onKeyDown: handleKeyDown }, /* @__PURE__ */ import_react8.default.createElement(Orientation, { isHorizontal }, /* @__PURE__ */ import_react8.default.createElement(
2962
+ Button_default,
2963
+ {
2964
+ button: "1",
2965
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButton1,
2966
+ onClick: handleButton1Click,
2967
+ ref: firstButtonRef
2968
+ }
2969
+ ), /* @__PURE__ */ import_react8.default.createElement(
2970
+ Button_default,
2971
+ {
2972
+ button: "2",
2973
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButton2,
2974
+ onClick: handleButton2Click,
2975
+ ruby: "ABC"
2976
+ }
2977
+ ), /* @__PURE__ */ import_react8.default.createElement(
2978
+ Button_default,
2979
+ {
2980
+ button: "3",
2981
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButton3,
2982
+ onClick: handleButton3Click,
2983
+ ruby: "DEF"
2984
+ }
2985
+ ), /* @__PURE__ */ import_react8.default.createElement(
2986
+ Button_default,
2987
+ {
2988
+ button: "4",
2989
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButton4,
2990
+ onClick: handleButton4Click,
2991
+ ruby: "GHI"
2992
+ }
2993
+ ), /* @__PURE__ */ import_react8.default.createElement(
2994
+ Button_default,
2995
+ {
2996
+ button: "5",
2997
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButton5,
2998
+ onClick: handleButton5Click,
2999
+ ruby: "JKL"
3000
+ }
3001
+ ), /* @__PURE__ */ import_react8.default.createElement(
3002
+ Button_default,
3003
+ {
3004
+ button: "6",
3005
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButton6,
3006
+ onClick: handleButton6Click,
3007
+ ruby: "MNO"
3008
+ }
3009
+ ), /* @__PURE__ */ import_react8.default.createElement(
3010
+ Button_default,
3011
+ {
3012
+ button: "7",
3013
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButton7,
3014
+ onClick: handleButton7Click,
3015
+ ruby: "PQRS"
3016
+ }
3017
+ ), /* @__PURE__ */ import_react8.default.createElement(
3018
+ Button_default,
3019
+ {
3020
+ button: "8",
3021
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButton8,
3022
+ onClick: handleButton8Click,
3023
+ ruby: "TUV"
3024
+ }
3025
+ ), /* @__PURE__ */ import_react8.default.createElement(
3026
+ Button_default,
3027
+ {
3028
+ button: "9",
3029
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButton9,
3030
+ onClick: handleButton9Click,
3031
+ ruby: "WXYZ"
3032
+ }
3033
+ ), /* @__PURE__ */ import_react8.default.createElement(Button_default, { button: "star", "data-testid": testIds_default.sendBoxTelephoneKeypadButtonStar, onClick: handleButtonStarClick }), /* @__PURE__ */ import_react8.default.createElement(Button_default, { button: "0", "data-testid": testIds_default.sendBoxTelephoneKeypadButton0, onClick: handleButton0Click, ruby: "+" }), /* @__PURE__ */ import_react8.default.createElement(
3034
+ Button_default,
3035
+ {
3036
+ button: "pound",
3037
+ "data-testid": testIds_default.sendBoxTelephoneKeypadButtonPound,
3038
+ onClick: handleButtonPoundClick
3039
+ }
3040
+ )));
3041
+ });
3042
+ TelephoneKeypad.displayName = "TelephoneKeypad";
3043
+ var TelephoneKeypad_default = TelephoneKeypad;
3044
+
3045
+ // src/components/telephoneKeypad/Surrogate.tsx
3046
+ var TelephoneKeypadSurrogate = (0, import_react9.memo)((props) => useShown()[0] ? /* @__PURE__ */ import_react9.default.createElement(TelephoneKeypad_default, { ...props }) : false);
3047
+ TelephoneKeypadSurrogate.displayName = "TelephoneKeypad.Surrogate";
3048
+ var Surrogate_default = TelephoneKeypadSurrogate;
3049
+
3050
+ // src/components/Theme.tsx
3051
+ var import_react10 = __toESM(require_react());
3052
+ var styles3 = {
3053
+ "webchat-fluent__theme": {
3054
+ display: "contents",
3055
+ "--webchat-colorNeutralForeground1": "var(--colorNeutralForeground1, #242424)",
3056
+ "--webchat-colorNeutralForeground2": "var(--colorNeutralForeground2, #424242)",
3057
+ "--webchat-colorNeutralForeground4": "var(--colorNeutralForeground4, #707070)",
3058
+ "--webchat-colorNeutralForegroundDisabled": "var(--colorNeutralForegroundDisabled, #bdbdbd)",
3059
+ "--webchat-colorNeutralBackground1": "var(--colorNeutralBackground1, #ffffff)",
3060
+ "--webchat-colorNeutralBackground4": "var(--colorNeutralBackground4, #f0f0f0)",
3061
+ "--webchat-colorNeutralBackground5": "var(--colorNeutralBackground5, #ebebeb)",
3062
+ "--webchat-colorSubtleBackgroundHover": "var(--colorSubtleBackgroundHover, #f5f5f5)",
3063
+ "--webchat-colorSubtleBackgroundPressed": "var(--colorSubtleBackgroundPressed, #e0e0e0)",
3064
+ "--webchat-colorNeutralStroke1": "var(--colorNeutralStroke1, #d1d1d1)",
3065
+ "--webchat-colorNeutralStroke2": "var(--colorNeutralStroke2, #e0e0e0)",
3066
+ "--webchat-colorNeutralStroke1Selected": "var(--colorNeutralStroke1Selected, #bdbdbd)",
3067
+ "--webchat-colorBrandStroke2": "var(--colorBrandStroke2, #9edcf7)",
3068
+ "--webchat-colorBrandForeground2Hover": "var(--colorBrandForeground2Hover, #015a7a)",
3069
+ "--webchat-colorBrandForeground2Pressed": "var(--colorBrandForeground2Pressed, #01384d)",
3070
+ "--webchat-colorBrandBackground2Hover": "var(--colorBrandBackground2Hover, #bee7fa)",
3071
+ "--webchat-colorBrandBackground2Pressed": "var(--colorBrandBackground2Pressed, #7fd2f5)",
3072
+ "--webchat-colorCompoundBrandForeground1": "var(--colorCompoundBrandForeground1, #077fab)",
3073
+ "--webchat-colorCompoundBrandForeground1Hover": "var(--colorCompoundBrandForeground1Hover, #02729c)",
3074
+ "--webchat-colorCompoundBrandForeground1Pressed": "var(--colorCompoundBrandForeground1Pressed, #01678c)",
3075
+ "--webchat-colorStatusDangerForeground1": "var(--colorStatusDangerForeground1, #b10e1c)",
3076
+ // https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/colors.ts
3077
+ "--webchat-colorGray30": "var(--colorGray30, #edebe9)",
3078
+ "--webchat-colorGray160": "var(--colorGray160, #323130)",
3079
+ "--webchat-colorGray200": "var(--colorGray200, #1b1a19)",
3080
+ // https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/borderRadius.ts
3081
+ "--webchat-borderRadiusSmall": "var(--borderRadiusSmall, 2px)",
3082
+ "--webchat-borderRadiusLarge": "var(--borderRadiusLarge, 6px)",
3083
+ "--webchat-borderRadiusXLarge": "var(--borderRadiusXLarge, 8px)",
3084
+ // https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/utils/shadows.ts
3085
+ "--webchat-shadow16": "var(--shadow16, 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108))",
3086
+ // https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/spacings.ts
3087
+ "--webchat-spacingHorizontalMNudge": "var(--spacingHorizontalMNudge, 10px)",
3088
+ // https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/fonts.ts
3089
+ "--webchat-fontFamilyBase": `var(--fontFamilyBase, 'Segoe UI)', 'Segoe UI Web (West European))', -apple-system,
3090
+ BlinkMacSystemFont, Roboto, 'Helvetica Neue)', sans-serif)`,
3091
+ "--webchat-fontFamilyNumeric": `var(--fontFamilyNumeric, Bahnschrift, 'Segoe UI)', 'Segoe UI Web (West European))',
3092
+ -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue)', sans-serif)`,
3093
+ // https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/fonts.ts
3094
+ "--webchat-fontWeightSemibold": "var(--fontWeightSemibold, 600)"
3095
+ }
3096
+ };
3097
+ function WebchatTheme(props) {
3098
+ const classNames = useStyles(styles3);
3099
+ return /* @__PURE__ */ import_react10.default.createElement("div", { className: classNames["webchat-fluent__theme"] }, props.children);
3100
+ }
3101
+
3102
+ // src/components/sendbox/index.tsx
3103
+ var import_botframework_webchat_component4 = __toESM(require_botframework_webchat_component());
3104
+ var import_classnames6 = __toESM(require_classnames());
3105
+ var import_react27 = __toESM(require_react());
3106
+
3107
+ // src/icons/SendIcon.tsx
3108
+ var import_react11 = __toESM(require_react());
3109
+ function SendIcon(props) {
3110
+ return /* @__PURE__ */ import_react11.default.createElement(
3111
+ "svg",
3112
+ {
3113
+ "aria-hidden": "true",
3114
+ className: props.className,
3115
+ fill: "currentColor",
3116
+ height: "1em",
3117
+ viewBox: "0 0 20 20",
3118
+ width: "1em",
3119
+ xmlns: "http://www.w3.org/2000/svg"
3120
+ },
3121
+ /* @__PURE__ */ import_react11.default.createElement(
3122
+ "path",
3123
+ {
3124
+ d: "M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z",
3125
+ fill: "currentColor"
3126
+ }
3127
+ )
3128
+ );
3129
+ }
3130
+
3131
+ // src/components/dropZone/index.tsx
3132
+ var import_botframework_webchat_api = __toESM(require_botframework_webchat_api());
3133
+ var import_classnames = __toESM(require_classnames());
3134
+ var import_react13 = __toESM(require_react());
3135
+
3136
+ // src/icons/AddDocumentIcon.tsx
3137
+ var import_react12 = __toESM(require_react());
3138
+ function AddDocumentIcon(props) {
3139
+ return /* @__PURE__ */ import_react12.default.createElement(
3140
+ "svg",
3141
+ {
3142
+ "aria-hidden": "true",
3143
+ className: props.className,
3144
+ fill: "currentColor",
3145
+ height: "1em",
3146
+ viewBox: "0 0 20 20",
3147
+ width: "1em",
3148
+ xmlns: "http://www.w3.org/2000/svg"
3149
+ },
3150
+ /* @__PURE__ */ import_react12.default.createElement(
3151
+ "path",
3152
+ {
3153
+ d: "M6 2a2 2 0 0 0-2 2v5.2c.32-.08.66-.15 1-.18V4a1 1 0 0 1 1-1h4v3.5c0 .83.67 1.5 1.5 1.5H15v8a1 1 0 0 1-1 1h-3.6c-.18.36-.4.7-.66 1H14a2 2 0 0 0 2-2V7.41c0-.4-.16-.78-.44-1.06l-3.91-3.91A1.5 1.5 0 0 0 10.59 2H6Zm8.8 5h-3.3a.5.5 0 0 1-.5-.5V3.2L14.8 7ZM10 14.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-4-2a.5.5 0 0 0-1 0V14H3.5a.5.5 0 0 0 0 1H5v1.5a.5.5 0 0 0 1 0V15h1.5a.5.5 0 0 0 0-1H6v-1.5Z",
3154
+ fill: "currentColor"
3155
+ }
3156
+ )
3157
+ );
3158
+ }
3159
+
3160
+ // src/components/dropZone/index.tsx
3161
+ var { useLocalizer } = import_botframework_webchat_api.hooks;
3162
+ var styles4 = {
3163
+ "webchat-fluent__sendbox__attachment-drop-zone": {
3164
+ backgroundColor: "var(--webchat-colorNeutralBackground4)",
3165
+ borderRadius: "inherit",
3166
+ cursor: "copy",
3167
+ display: "grid",
3168
+ gap: "8px",
3169
+ inset: "0",
3170
+ placeContent: "center",
3171
+ placeItems: "center",
3172
+ position: "absolute"
3173
+ },
3174
+ "webchat-fluent__sendbox__attachment-drop-zone--droppable": {
3175
+ backgroundColor: "#e00",
3176
+ color: "White"
3177
+ },
3178
+ "webchat-fluent__sendbox__attachment-drop-zone-icon": {
3179
+ height: "36px",
3180
+ // Set "pointer-events: none" to ignore dragging over the icon. Otherwise, when dragging over the icon, it would disable the "--droppable" modifier.
3181
+ pointerEvents: "none",
3182
+ width: "36px"
3183
+ }
3184
+ };
3185
+ var handleDragOver = (event) => {
3186
+ event.preventDefault();
3187
+ };
3188
+ var isFilesTransferEvent = (event) => !!event.dataTransfer?.types?.some((type) => type.toLowerCase() === "files");
3189
+ function isDescendantOf(target, ancestor) {
3190
+ let current = target.parentNode;
3191
+ while (current) {
3192
+ if (current === ancestor) {
3193
+ return true;
3194
+ }
3195
+ current = current.parentNode;
3196
+ }
3197
+ return false;
3198
+ }
3199
+ var DropZone = (props) => {
3200
+ const [dropZoneState, setDropZoneState] = (0, import_react13.useState)(false);
3201
+ const classNames = useStyles(styles4);
3202
+ const dropZoneRef = (0, import_react13.useRef)(null);
3203
+ const localize = useLocalizer();
3204
+ const onFilesAddedRef = useRefFrom(props.onFilesAdded);
3205
+ (0, import_react13.useEffect)(() => {
3206
+ let entranceCounter = 0;
3207
+ const handleDragEnter = (event) => {
3208
+ entranceCounter++;
3209
+ if (isFilesTransferEvent(event)) {
3210
+ setDropZoneState(
3211
+ dropZoneRef.current && (event.target === dropZoneRef.current || event.target instanceof HTMLElement && isDescendantOf(event.target, dropZoneRef.current)) ? "droppable" : "visible"
3212
+ );
3213
+ }
3214
+ };
3215
+ const handleDragLeave = () => --entranceCounter <= 0 && setDropZoneState(false);
3216
+ document.addEventListener("dragenter", handleDragEnter, false);
3217
+ document.addEventListener("dragleave", handleDragLeave, false);
3218
+ return () => {
3219
+ document.removeEventListener("dragenter", handleDragEnter);
3220
+ document.removeEventListener("dragleave", handleDragLeave);
3221
+ };
3222
+ }, [setDropZoneState]);
3223
+ const handleDrop = (0, import_react13.useCallback)(
3224
+ (event) => {
3225
+ event.preventDefault();
3226
+ setDropZoneState(false);
3227
+ if (!isFilesTransferEvent(event.nativeEvent)) {
3228
+ return;
3229
+ }
3230
+ onFilesAddedRef.current([...event.dataTransfer.files]);
3231
+ },
3232
+ [onFilesAddedRef, setDropZoneState]
3233
+ );
3234
+ return dropZoneState ? /* @__PURE__ */ import_react13.default.createElement(
3235
+ "div",
3236
+ {
3237
+ className: (0, import_classnames.default)(classNames["webchat-fluent__sendbox__attachment-drop-zone"], {
3238
+ [classNames["webchat-fluent__sendbox__attachment-drop-zone--droppable"]]: dropZoneState === "droppable"
3239
+ }),
3240
+ "data-testid": testIds_default.sendBoxDropZone,
3241
+ onDragOver: handleDragOver,
3242
+ onDrop: handleDrop,
3243
+ ref: dropZoneRef
3244
+ },
3245
+ /* @__PURE__ */ import_react13.default.createElement(AddDocumentIcon, { className: classNames["webchat-fluent__sendbox__attachment-drop-zone-icon"] }),
3246
+ localize("TEXT_INPUT_DROP_ZONE")
3247
+ ) : null;
3248
+ };
3249
+ DropZone.displayName = "DropZone";
3250
+ var dropZone_default = (0, import_react13.memo)(DropZone);
3251
+
3252
+ // src/components/DropZone.tsx
3253
+ var DropZone_default = dropZone_default;
3254
+
3255
+ // src/components/suggestedActions/index.tsx
3256
+ var import_botframework_webchat_component2 = __toESM(require_botframework_webchat_component());
3257
+ var import_classnames3 = __toESM(require_classnames());
3258
+ var import_react16 = __toESM(require_react());
3259
+
3260
+ // src/components/suggestedActions/private/computeSuggestedActionText.ts
3261
+ function computeSuggestedActionText(cardAction) {
3262
+ const { title } = cardAction;
3263
+ const { type, value } = cardAction;
3264
+ if (type === "messageBack") {
3265
+ return title || cardAction.displayText;
3266
+ } else if (title) {
3267
+ return title;
3268
+ } else if (typeof value === "string") {
3269
+ return value;
3270
+ }
3271
+ return JSON.stringify(value);
3272
+ }
3273
+
3274
+ // src/components/suggestedActions/SuggestedAction.tsx
3275
+ var import_botframework_webchat_component = __toESM(require_botframework_webchat_component());
3276
+ var import_classnames2 = __toESM(require_classnames());
3277
+ var import_react15 = __toESM(require_react());
3278
+
3279
+ // src/components/suggestedActions/AccessibleButton.tsx
3280
+ var import_react14 = __toESM(require_react());
3281
+ var preventDefaultHandler = (event) => event.preventDefault();
3282
+ var AccessibleButton = (0, import_react14.forwardRef)(
3283
+ ({ "aria-hidden": ariaHidden, children, disabled, onClick, tabIndex, ...props }, forwardedRef) => {
3284
+ const targetRef = (0, import_react14.useRef)(null);
3285
+ const ref = forwardedRef || targetRef;
3286
+ return /* @__PURE__ */ import_react14.default.createElement(
3287
+ "button",
3288
+ {
3289
+ "aria-disabled": disabled ? "true" : "false",
3290
+ "aria-hidden": ariaHidden,
3291
+ onClick: disabled ? preventDefaultHandler : onClick,
3292
+ ref,
3293
+ tabIndex,
3294
+ ...disabled && {
3295
+ "aria-disabled": "true",
3296
+ tabIndex: -1
3297
+ },
3298
+ ...props,
3299
+ type: "button"
3300
+ },
3301
+ children
3302
+ );
3303
+ }
3304
+ );
3305
+ var AccessibleButton_default = (0, import_react14.memo)(AccessibleButton);
3306
+
3307
+ // src/components/suggestedActions/SuggestedAction.tsx
3308
+ var { useScrollToEnd, useStyleSet, usePerformCardAction, useFocus, useSuggestedActions, useDisabled } = import_botframework_webchat_component.hooks;
3309
+ var styles5 = {
3310
+ "webchat-fluent__suggested-action": {
3311
+ background: "transparent",
3312
+ border: "1px solid var(--webchat-colorBrandStroke2)",
3313
+ borderRadius: "8px",
3314
+ cursor: "pointer",
3315
+ fontSize: "12px",
3316
+ lineHeight: "14px",
3317
+ padding: "6px 8px 4px",
3318
+ textAlign: "start",
3319
+ display: "flex",
3320
+ gap: "4px",
3321
+ alignItems: "center",
3322
+ transition: "all .15s ease-out",
3323
+ "@media (hover: hover)": {
3324
+ '&:not([aria-disabled="true"]):hover': {
3325
+ backgroundColor: "var(--webchat-colorBrandBackground2Hover)",
3326
+ color: "var(--webchat-colorBrandForeground2Hover)"
3327
+ }
3328
+ },
3329
+ '&:not([aria-disabled="true"]):active': {
3330
+ backgroundColor: "var(--webchat-colorBrandBackground2Pressed)",
3331
+ color: "var(--webchat-colorBrandForeground2Pressed)"
3332
+ },
3333
+ '&[aria-disabled="true"]': {
3334
+ color: " var(--webchat-colorNeutralForegroundDisabled)",
3335
+ cursor: "not-allowed"
3336
+ }
3337
+ },
3338
+ "webchat-fluent__suggested-action__image": {
3339
+ width: "1em",
3340
+ height: "1em",
3341
+ fontSize: "20px",
3342
+ translate: "0 -1px"
3343
+ }
3344
+ };
3345
+ function SuggestedAction({
3346
+ buttonText,
3347
+ className,
3348
+ displayText,
3349
+ image,
3350
+ imageAlt,
3351
+ text,
3352
+ type,
3353
+ value
3354
+ }) {
3355
+ const [_, setSuggestedActions] = useSuggestedActions();
3356
+ const [{ suggestedAction: suggestedActionStyleSet }] = useStyleSet();
3357
+ const [disabled] = useDisabled();
3358
+ const focus = useFocus();
3359
+ const focusRef = (0, import_react15.useRef)(null);
3360
+ const performCardAction = usePerformCardAction();
3361
+ const classNames = useStyles(styles5);
3362
+ const scrollToEnd = useScrollToEnd();
3363
+ const handleClick = (0, import_react15.useCallback)(
3364
+ ({ target }) => {
3365
+ (async function() {
3366
+ await focus("sendBoxWithoutKeyboard");
3367
+ performCardAction({ displayText, text, type, value }, { target });
3368
+ type === "openUrl" && setSuggestedActions([]);
3369
+ scrollToEnd();
3370
+ })();
3371
+ },
3372
+ [displayText, focus, performCardAction, scrollToEnd, setSuggestedActions, text, type, value]
3373
+ );
3374
+ return /* @__PURE__ */ import_react15.default.createElement(
3375
+ AccessibleButton_default,
3376
+ {
3377
+ className: (0, import_classnames2.default)(
3378
+ classNames["webchat-fluent__suggested-action"],
3379
+ suggestedActionStyleSet + "",
3380
+ (className || "") + ""
3381
+ ),
3382
+ disabled,
3383
+ onClick: handleClick,
3384
+ ref: focusRef,
3385
+ type: "button"
3386
+ },
3387
+ image && /* @__PURE__ */ import_react15.default.createElement("img", { alt: imageAlt, className: classNames["webchat-fluent__suggested-action__image"], src: image }),
3388
+ /* @__PURE__ */ import_react15.default.createElement("span", null, buttonText)
3389
+ );
3390
+ }
3391
+ var SuggestedAction_default = (0, import_react15.memo)(SuggestedAction);
3392
+
3393
+ // src/components/suggestedActions/index.tsx
3394
+ var { useLocalizer: useLocalizer2, useStyleSet: useStyleSet2, useSuggestedActions: useSuggestedActions2 } = import_botframework_webchat_component2.hooks;
3395
+ var styles6 = {
3396
+ "webchat-fluent__suggested-actions": {
3397
+ alignItems: "flex-end",
3398
+ alignSelf: "flex-end",
3399
+ display: "flex",
3400
+ flexDirection: "column",
3401
+ gap: "8px",
3402
+ "&:not(:empty)": {
3403
+ paddingBlockEnd: "8px",
3404
+ paddingInlineStart: "4px"
3405
+ }
3406
+ }
3407
+ };
3408
+ function SuggestedActionStackedContainer(props) {
3409
+ const [{ suggestedActions: suggestedActionsStyleSet }] = useStyleSet2();
3410
+ const classNames = useStyles(styles6);
3411
+ return /* @__PURE__ */ import_react16.default.createElement(
3412
+ "div",
3413
+ {
3414
+ "aria-label": props["aria-label"],
3415
+ "aria-live": "polite",
3416
+ "aria-orientation": "vertical",
3417
+ className: (0, import_classnames3.default)(classNames["webchat-fluent__suggested-actions"], suggestedActionsStyleSet + "", props.className),
3418
+ role: "toolbar"
3419
+ },
3420
+ !!props.children && !!import_react16.default.Children.count(props.children) && props.children
3421
+ );
3422
+ }
3423
+ function SuggestedActions() {
3424
+ const classNames = useStyles(styles6);
3425
+ const localize = useLocalizer2();
3426
+ const [suggestedActions] = useSuggestedActions2();
3427
+ const children = suggestedActions.map((cardAction, index) => {
3428
+ const { displayText, image, imageAltText, text, type, value } = cardAction;
3429
+ if (!suggestedActions?.length) {
3430
+ return null;
3431
+ }
3432
+ return /* @__PURE__ */ import_react16.default.createElement(
3433
+ SuggestedAction_default,
3434
+ {
3435
+ buttonText: computeSuggestedActionText(cardAction),
3436
+ displayText,
3437
+ image,
3438
+ imageAlt: image && (imageAltText || text),
3439
+ itemIndex: index,
3440
+ key: index,
3441
+ text,
3442
+ type,
3443
+ value
3444
+ }
3445
+ );
3446
+ });
3447
+ return /* @__PURE__ */ import_react16.default.createElement(
3448
+ SuggestedActionStackedContainer,
3449
+ {
3450
+ "aria-label": localize("SUGGESTED_ACTIONS_LABEL_ALT"),
3451
+ className: classNames["webchat-fluent__suggested-actions"]
3452
+ },
3453
+ children
3454
+ );
3455
+ }
3456
+ var suggestedActions_default = (0, import_react16.memo)(SuggestedActions);
3457
+
3458
+ // src/components/SuggestedActions.tsx
3459
+ var SuggestedActions_default = suggestedActions_default;
3460
+
3461
+ // src/components/sendbox/AddAttachmentButton.tsx
3462
+ var import_botframework_webchat_api2 = __toESM(require_botframework_webchat_api());
3463
+ var import_react19 = __toESM(require_react());
3464
+
3465
+ // src/icons/AttachmentIcon.tsx
3466
+ var import_react17 = __toESM(require_react());
3467
+ function AttachmentIcon(props) {
3468
+ return /* @__PURE__ */ import_react17.default.createElement(
3469
+ "svg",
3470
+ {
3471
+ "aria-hidden": "true",
3472
+ className: props.className,
3473
+ fill: "currentColor",
3474
+ height: "1em",
3475
+ viewBox: "0 0 20 20",
3476
+ width: "1em",
3477
+ xmlns: "http://www.w3.org/2000/svg"
3478
+ },
3479
+ /* @__PURE__ */ import_react17.default.createElement(
3480
+ "path",
3481
+ {
3482
+ d: "m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z",
3483
+ fill: "currentColor"
3484
+ }
3485
+ )
3486
+ );
3487
+ }
3488
+
3489
+ // src/components/sendbox/Toolbar.tsx
3490
+ var import_classnames4 = __toESM(require_classnames());
3491
+ var import_react18 = __toESM(require_react());
3492
+ var styles7 = {
3493
+ "webchat-fluent__sendbox__toolbar": {
3494
+ display: "flex",
3495
+ gap: "4px",
3496
+ marginInlineStart: "auto"
3497
+ },
3498
+ "webchat-fluent__sendbox__toolbar-button": {
3499
+ alignItems: "center",
3500
+ appearance: "none",
3501
+ aspectRatio: "1",
3502
+ background: "transparent",
3503
+ border: "none",
3504
+ borderRadius: "var(--webchat-borderRadiusSmall)",
3505
+ cursor: "pointer",
3506
+ display: "flex",
3507
+ justifyContent: "center",
3508
+ padding: "3px",
3509
+ width: "32px",
3510
+ "> svg": {
3511
+ fontSize: "20px",
3512
+ pointerEvents: "none"
3513
+ },
3514
+ "@media (hover: hover)": {
3515
+ '&:not([aria-disabled="true"]):hover': {
3516
+ backgroundColor: "var(--webchat-colorSubtleBackgroundHover)",
3517
+ color: "var(--webchat-colorCompoundBrandForeground1Hover)"
3518
+ }
3519
+ },
3520
+ '&:not([aria-disabled="true"]):active': {
3521
+ backgroundColor: "var(--webchat-colorSubtleBackgroundPressed)",
3522
+ color: "var(--webchat-colorCompoundBrandForeground1Pressed)"
3523
+ },
3524
+ '&[aria-disabled="true"]': {
3525
+ color: " var(--webchat-colorNeutralForegroundDisabled)",
3526
+ cursor: "not-allowed"
3527
+ }
3528
+ },
3529
+ "webchat-fluent__sendbox__toolbar-separator": {
3530
+ alignSelf: "center",
3531
+ borderInlineEnd: "1px solid var(--webchat-colorNeutralStroke2)",
3532
+ height: "28px",
3533
+ "&:first-child, &:last-child, &:only-child": {
3534
+ display: "none"
3535
+ }
3536
+ }
3537
+ };
3538
+ var preventDefaultHandler2 = (event) => event.preventDefault();
3539
+ var ToolbarButton = (0, import_react18.memo)(
3540
+ (props) => {
3541
+ const classNames = useStyles(styles7);
3542
+ return /* @__PURE__ */ import_react18.default.createElement(
3543
+ "button",
3544
+ {
3545
+ "aria-label": props["aria-label"],
3546
+ className: (0, import_classnames4.default)(classNames["webchat-fluent__sendbox__toolbar-button"], props.className),
3547
+ "data-testid": props["data-testid"],
3548
+ onClick: props.disabled ? preventDefaultHandler2 : props.onClick,
3549
+ type: props.type === "submit" ? "submit" : "button",
3550
+ ...props.disabled && {
3551
+ "aria-disabled": "true",
3552
+ tabIndex: -1
3553
+ }
3554
+ },
3555
+ props.children
3556
+ );
3557
+ }
3558
+ );
3559
+ ToolbarButton.displayName = "ToolbarButton";
3560
+ var Toolbar = (0, import_react18.memo)((props) => {
3561
+ const classNames = useStyles(styles7);
3562
+ return /* @__PURE__ */ import_react18.default.createElement("div", { className: (0, import_classnames4.default)(classNames["webchat-fluent__sendbox__toolbar"], props.className) }, props.children);
3563
+ });
3564
+ Toolbar.displayName = "Toolbar";
3565
+ var ToolbarSeparator = (0, import_react18.memo)(
3566
+ (props) => {
3567
+ const classNames = useStyles(styles7);
3568
+ return /* @__PURE__ */ import_react18.default.createElement(
3569
+ "div",
3570
+ {
3571
+ "aria-orientation": "vertical",
3572
+ className: (0, import_classnames4.default)(classNames["webchat-fluent__sendbox__toolbar-separator"], props.className),
3573
+ role: "separator"
3574
+ }
3575
+ );
3576
+ }
3577
+ );
3578
+ ToolbarSeparator.displayName = "ToolbarSeparator";
3579
+
3580
+ // src/components/sendbox/AddAttachmentButton.tsx
3581
+ var { useLocalizer: useLocalizer3, useStyleOptions } = import_botframework_webchat_api2.hooks;
3582
+ var styles8 = {
3583
+ "webchat-fluent__sendbox__add-attachment": {
3584
+ display: "grid"
3585
+ },
3586
+ "webchat-fluent__sendbox__add-attachment-input": {
3587
+ fontSize: 0,
3588
+ height: 0,
3589
+ opacity: 0,
3590
+ width: 0
3591
+ }
3592
+ };
3593
+ function AddAttachmentButton(props) {
3594
+ const inputRef = (0, import_react19.useRef)(null);
3595
+ const classNames = useStyles(styles8);
3596
+ const localize = useLocalizer3();
3597
+ const [{ uploadAccept, uploadMultiple }] = useStyleOptions();
3598
+ const onFilesAddedRef = useRefFrom(props.onFilesAdded);
3599
+ const handleClick = (0, import_react19.useCallback)(() => inputRef.current?.click(), [inputRef]);
3600
+ const handleFileChange = (0, import_react19.useCallback)(
3601
+ ({ target: { files } }) => {
3602
+ if (files) {
3603
+ onFilesAddedRef.current?.([...files]);
3604
+ if (inputRef.current) {
3605
+ inputRef.current.value = "";
3606
+ }
3607
+ }
3608
+ },
3609
+ [inputRef, onFilesAddedRef]
3610
+ );
3611
+ return /* @__PURE__ */ import_react19.default.createElement("div", { className: classNames["webchat-fluent__sendbox__add-attachment"] }, /* @__PURE__ */ import_react19.default.createElement(
3612
+ "input",
3613
+ {
3614
+ accept: uploadAccept,
3615
+ "aria-disabled": props.disabled,
3616
+ "aria-hidden": "true",
3617
+ className: classNames["webchat-fluent__sendbox__add-attachment-input"],
3618
+ multiple: uploadMultiple,
3619
+ onInput: props.disabled ? void 0 : handleFileChange,
3620
+ readOnly: props.disabled,
3621
+ ref: inputRef,
3622
+ role: "button",
3623
+ tabIndex: -1,
3624
+ type: "file"
3625
+ }
3626
+ ), /* @__PURE__ */ import_react19.default.createElement(
3627
+ ToolbarButton,
3628
+ {
3629
+ "aria-label": localize("TEXT_INPUT_UPLOAD_BUTTON_ALT"),
3630
+ "data-testid": testIds_default.sendBoxUploadButton,
3631
+ onClick: handleClick
3632
+ },
3633
+ /* @__PURE__ */ import_react19.default.createElement(AttachmentIcon, null)
3634
+ ));
3635
+ }
3636
+ var AddAttachmentButton_default = (0, import_react19.memo)(AddAttachmentButton);
3637
+
3638
+ // src/components/sendbox/Attachments.tsx
3639
+ var import_botframework_webchat_api3 = __toESM(require_botframework_webchat_api());
3640
+ var import_react20 = __toESM(require_react());
3641
+ var { useLocalizer: useLocalizer4 } = import_botframework_webchat_api3.hooks;
3642
+ var styles9 = {
3643
+ "webchat-fluent__sendbox__attachment": {
3644
+ border: "1px solid var(--webchat-colorNeutralStroke1)",
3645
+ borderRadius: "var(--webchat-borderRadiusLarge)",
3646
+ cursor: "default",
3647
+ padding: "6px 8px",
3648
+ width: "fit-content"
3649
+ }
3650
+ };
3651
+ var attachmentsPluralStringIds = {
3652
+ one: "TEXT_INPUT_ATTACHMENTS_ONE",
3653
+ two: "TEXT_INPUT_ATTACHMENTS_TWO",
3654
+ few: "TEXT_INPUT_ATTACHMENTS_FEW",
3655
+ many: "TEXT_INPUT_ATTACHMENTS_MANY",
3656
+ other: "TEXT_INPUT_ATTACHMENTS_OTHER"
3657
+ };
3658
+ function Attachments({
3659
+ attachments
3660
+ }) {
3661
+ const classNames = useStyles(styles9);
3662
+ const localizeWithPlural = useLocalizer4({ plural: true });
3663
+ return attachments.length ? /* @__PURE__ */ import_react20.default.createElement("div", { className: classNames["webchat-fluent__sendbox__attachment"] }, localizeWithPlural(attachmentsPluralStringIds, attachments.length)) : null;
3664
+ }
3665
+ var Attachments_default = (0, import_react20.memo)(Attachments);
3666
+
3667
+ // src/components/sendbox/ErrorMessage.tsx
3668
+ var import_react21 = __toESM(require_react());
3669
+ var styles10 = {
3670
+ "webchat-fluent___sendbox__error-message": {
3671
+ fontSize: 0,
3672
+ height: 0,
3673
+ width: 0,
3674
+ position: "absolute",
3675
+ top: 0,
3676
+ left: 0,
3677
+ color: "transparent"
3678
+ }
3679
+ };
3680
+ function ErrorMessage(props) {
3681
+ const classNames = useStyles(styles10);
3682
+ return (
3683
+ // eslint-disable-next-line react/forbid-dom-props
3684
+ /* @__PURE__ */ import_react21.default.createElement("span", { className: classNames["webchat-fluent___sendbox__error-message"], id: props.id, role: "alert" }, props.error)
3685
+ );
3686
+ }
3687
+ var ErrorMessage_default = (0, import_react21.memo)(ErrorMessage);
3688
+
3689
+ // src/components/sendbox/TelephoneKeypadToolbarButton.tsx
3690
+ var import_react23 = __toESM(require_react());
3691
+ var import_botframework_webchat_api4 = __toESM(require_botframework_webchat_api());
3692
+
3693
+ // src/icons/TelephoneKeypad.tsx
3694
+ var import_react22 = __toESM(require_react());
3695
+ function TelephoneKeypadIcon(props) {
3696
+ return /* @__PURE__ */ import_react22.default.createElement(
3697
+ "svg",
3698
+ {
3699
+ "aria-hidden": "true",
3700
+ className: props.className,
3701
+ fill: "currentColor",
3702
+ height: "1em",
3703
+ viewBox: "0 0 20 20",
3704
+ width: "1em",
3705
+ xmlns: "http://www.w3.org/2000/svg"
3706
+ },
3707
+ /* @__PURE__ */ import_react22.default.createElement(
3708
+ "path",
3709
+ {
3710
+ d: "M6 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Zm0 4a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM7.25 12a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 16a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM15.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z",
3711
+ fill: "currentColor"
3712
+ }
3713
+ )
3714
+ );
3715
+ }
3716
+
3717
+ // src/components/sendbox/TelephoneKeypadToolbarButton.tsx
3718
+ var { useLocalizer: useLocalizer5 } = import_botframework_webchat_api4.hooks;
3719
+ var TelephoneKeypadToolbarButton = (0, import_react23.memo)(() => {
3720
+ const [, setTelephoneKeypadShown] = useShown();
3721
+ const localize = useLocalizer5();
3722
+ const handleClick = (0, import_react23.useCallback)(() => setTelephoneKeypadShown((shown) => !shown), [setTelephoneKeypadShown]);
3723
+ return /* @__PURE__ */ import_react23.default.createElement(
3724
+ ToolbarButton,
3725
+ {
3726
+ "aria-label": localize("TEXT_INPUT_TELEPHONE_KEYPAD_BUTTON_ALT"),
3727
+ "data-testid": testIds_default.sendBoxTelephoneKeypadToolbarButton,
3728
+ onClick: handleClick
3729
+ },
3730
+ /* @__PURE__ */ import_react23.default.createElement(TelephoneKeypadIcon, null)
3731
+ );
3732
+ });
3733
+ TelephoneKeypadToolbarButton.displayName = "SendBox.TelephoneKeypadToolbarButton";
3734
+ var TelephoneKeypadToolbarButton_default = TelephoneKeypadToolbarButton;
3735
+
3736
+ // src/components/sendbox/TextArea.tsx
3737
+ var import_classnames5 = __toESM(require_classnames());
3738
+ var import_react24 = __toESM(require_react());
3739
+ var styles11 = {
3740
+ "webchat-fluent__sendbox__text-area": {
3741
+ display: "grid",
3742
+ gridTemplateAreas: `'main'`,
3743
+ maxHeight: "200px",
3744
+ overflow: "hidden"
3745
+ },
3746
+ "webchat-fluent__sendbox__text-area--hidden": {
3747
+ // TODO: Not perfect way of hiding the text box.
3748
+ height: 0,
3749
+ visibility: "collapse"
3750
+ },
3751
+ "webchat-fluent__sendbox__text-area-shared": {
3752
+ border: "none",
3753
+ font: "inherit",
3754
+ gridArea: "main",
3755
+ outline: "inherit",
3756
+ overflowWrap: "anywhere",
3757
+ resize: "inherit",
3758
+ scrollbarGutter: "stable"
3759
+ },
3760
+ "webchat-fluent__sendbox__text-area-doppelganger": {
3761
+ overflow: "hidden",
3762
+ visibility: "hidden",
3763
+ whiteSpace: "pre-wrap"
3764
+ },
3765
+ "webchat-fluent__sendbox__text-area-input": {
3766
+ height: "100%",
3767
+ padding: 0
3768
+ },
3769
+ "webchat-fluent__sendbox__text-area-input--scroll": {
3770
+ /* Firefox */
3771
+ MozScrollbarColor: "var(--webchat-colorNeutralBackground5) var(--webchat-colorNeutralForeground2)",
3772
+ MozScrollbarWidth: "thin",
3773
+ /* Chrome, Edge, and Safari */
3774
+ "&::-webkit-scrollbar": {
3775
+ width: "8px"
3776
+ },
3777
+ "&::-webkit-scrollbar-track": {
3778
+ backgroundColor: " var(--webchat-colorNeutralBackground5)",
3779
+ borderRadius: "16px"
3780
+ },
3781
+ "&::-webkit-scrollbar-thumb": {
3782
+ backgroundColor: "var(--webchat-colorNeutralForeground2)",
3783
+ borderRadius: "16px"
3784
+ },
3785
+ "&::-webkit-scrollbar-corner": {
3786
+ backgroundColor: "var(--webchat-colorNeutralBackground5)"
3787
+ }
3788
+ }
3789
+ };
3790
+ var TextArea = (0, import_react24.forwardRef)((props, ref) => {
3791
+ const classNames = useStyles(styles11);
3792
+ const handleKeyDown = (0, import_react24.useCallback)((event) => {
3793
+ if (!event.shiftKey && event.key === "Enter") {
3794
+ event.preventDefault();
3795
+ if ("form" in event.target && event.target.form instanceof HTMLFormElement) {
3796
+ event.target?.form?.requestSubmit();
3797
+ }
3798
+ }
3799
+ }, []);
3800
+ return /* @__PURE__ */ import_react24.default.createElement(
3801
+ "div",
3802
+ {
3803
+ className: (0, import_classnames5.default)(
3804
+ classNames["webchat-fluent__sendbox__text-area"],
3805
+ {
3806
+ [classNames["webchat-fluent__sendbox__text-area--hidden"]]: props.hidden
3807
+ },
3808
+ props.className
3809
+ ),
3810
+ role: props.hidden ? "hidden" : void 0
3811
+ },
3812
+ /* @__PURE__ */ import_react24.default.createElement(
3813
+ "div",
3814
+ {
3815
+ className: (0, import_classnames5.default)(
3816
+ classNames["webchat-fluent__sendbox__text-area-doppelganger"],
3817
+ classNames["webchat-fluent__sendbox__text-area-shared"],
3818
+ classNames["webchat-fluent__sendbox__text-area-input--scroll"]
3819
+ )
3820
+ },
3821
+ props.value || props.placeholder,
3822
+ " "
3823
+ ),
3824
+ /* @__PURE__ */ import_react24.default.createElement(
3825
+ "textarea",
3826
+ {
3827
+ "aria-label": props["aria-label"],
3828
+ className: (0, import_classnames5.default)(
3829
+ classNames["webchat-fluent__sendbox__text-area-input"],
3830
+ classNames["webchat-fluent__sendbox__text-area-shared"],
3831
+ classNames["webchat-fluent__sendbox__text-area-input--scroll"]
3832
+ ),
3833
+ "data-testid": props["data-testid"],
3834
+ onInput: props.onInput,
3835
+ onKeyDown: handleKeyDown,
3836
+ placeholder: props.placeholder,
3837
+ ref,
3838
+ rows: props.startRows ?? 1,
3839
+ tabIndex: props.hidden ? -1 : void 0,
3840
+ value: props.value
3841
+ }
3842
+ )
3843
+ );
3844
+ });
3845
+ TextArea.displayName = "TextArea";
3846
+ var TextArea_default = TextArea;
3847
+
3848
+ // src/components/sendbox/private/useSubmitError.ts
3849
+ var import_botframework_webchat_component3 = __toESM(require_botframework_webchat_component());
3850
+ var import_react25 = __toESM(require_react());
3851
+ var { useConnectivityStatus, useLocalizer: useLocalizer6 } = import_botframework_webchat_component3.hooks;
3852
+ var useSubmitError = ({
3853
+ attachments,
3854
+ message
3855
+ }) => {
3856
+ const [connectivityStatus] = useConnectivityStatus();
3857
+ const localize = useLocalizer6();
3858
+ const submitErrorRef = useRefFrom(
3859
+ connectivityStatus !== "connected" && connectivityStatus !== "reconnected" ? "offline" : !message && !attachments.length ? "empty" : void 0
3860
+ );
3861
+ const errorMessageStringMap = (0, import_react25.useMemo)(
3862
+ () => Object.freeze(
3863
+ (/* @__PURE__ */ new Map()).set("empty", localize("SEND_BOX_IS_EMPTY_TOOLTIP_ALT")).set("offline", localize("CONNECTIVITY_STATUS_ALT_FATAL"))
3864
+ ),
3865
+ [localize]
3866
+ );
3867
+ return (0, import_react25.useMemo)(
3868
+ () => Object.freeze([submitErrorRef, submitErrorRef.current && errorMessageStringMap.get(submitErrorRef.current)]),
3869
+ [errorMessageStringMap, submitErrorRef]
3870
+ );
3871
+ };
3872
+ var useSubmitError_default = useSubmitError;
3873
+
3874
+ // src/components/sendbox/private/useUniqueId.ts
3875
+ var import_react26 = __toESM(require_react());
3876
+ function useUniqueId(prefix2) {
3877
+ const id = (0, import_react26.useMemo)(() => Math.random().toString(36).substr(2, 5), []);
3878
+ prefix2 = prefix2 ? `${prefix2}--` : "";
3879
+ return `${prefix2}${id}`;
3880
+ }
3881
+
3882
+ // src/components/sendbox/index.tsx
3883
+ var { useStyleOptions: useStyleOptions2, useMakeThumbnail, useLocalizer: useLocalizer7, useSendBoxAttachments, useSendMessage } = import_botframework_webchat_component4.hooks;
3884
+ var styles12 = {
3885
+ "webchat-fluent__sendbox": {
3886
+ color: "var(--webchat-colorNeutralForeground1)",
3887
+ fontFamily: "var(--webchat-fontFamilyBase)",
3888
+ padding: "0 10px 10px",
3889
+ textRendering: "optimizeLegibility"
3890
+ },
3891
+ "webchat-fluent__sendbox__sendbox": {
3892
+ backgroundColor: "var(--webchat-colorNeutralBackground1)",
3893
+ border: "1px solid var(--webchat-colorNeutralStroke1)",
3894
+ borderRadius: "var(--webchat-borderRadiusLarge)",
3895
+ display: "grid",
3896
+ fontFamily: "var(--webchat-fontFamilyBase)",
3897
+ fontSize: "14px",
3898
+ gap: "6px",
3899
+ lineHeight: "20px",
3900
+ padding: "8px",
3901
+ position: "relative",
3902
+ "&:focus-within": {
3903
+ borderColor: "var(--webchat-colorNeutralStroke1Selected)",
3904
+ // TODO clarify with design the color:
3905
+ // - Teams is using colorCompoundBrandForeground1
3906
+ // - Fluent is using colorCompoundBrandStroke
3907
+ // - we are using colorCompoundBrandForeground1Hover
3908
+ boxShadow: "inset 0 -6px 0 -3px var(--webchat-colorCompoundBrandForeground1Hover)"
3909
+ }
3910
+ },
3911
+ "webchat-fluent__sendbox__sendbox-text": {
3912
+ backgroundColor: "transparent",
3913
+ border: "none",
3914
+ flex: "auto",
3915
+ fontFamily: "var(--webchat-fontFamilyBase)",
3916
+ fontSize: "14px",
3917
+ lineHeight: "20px",
3918
+ outline: "none",
3919
+ padding: "4px 4px 0",
3920
+ resize: "none"
3921
+ },
3922
+ "webchat-fluent__sendbox__sendbox-controls": {
3923
+ alignItems: "center",
3924
+ display: "flex",
3925
+ paddingInlineStart: "4px"
3926
+ },
3927
+ "webchat-fluent__sendbox__text-counter": {
3928
+ color: "var(--webchat-colorNeutralForeground4)",
3929
+ cursor: "default",
3930
+ fontFamily: "var(--webchat-fontFamilyNumeric)",
3931
+ fontSize: "10px",
3932
+ lineHeight: "14px"
3933
+ },
3934
+ "webchat-fluent__sendbox__text-counter--error": {
3935
+ color: "var(--webchat-colorStatusDangerForeground1)"
3936
+ }
3937
+ };
3938
+ function SendBox(props) {
3939
+ const inputRef = (0, import_react27.useRef)(null);
3940
+ const [message, setMessage] = (0, import_react27.useState)("");
3941
+ const [attachments, setAttachments] = useSendBoxAttachments();
3942
+ const [{ maxMessageLength }] = useStyleOptions2();
3943
+ const isMessageLengthExceeded = !!maxMessageLength && message.length > maxMessageLength;
3944
+ const classNames = useStyles(styles12);
3945
+ const localize = useLocalizer7();
3946
+ const sendMessage = useSendMessage();
3947
+ const makeThumbnail = useMakeThumbnail();
3948
+ const errorMessageId = useUniqueId("webchat-fluent__sendbox__error-message-id");
3949
+ const [errorRef, errorMessage] = useSubmitError_default({ message, attachments });
3950
+ const [telephoneKeypadShown, setTelephoneKeypadShown] = useShown();
3951
+ const attachmentsRef = useRefFrom(attachments);
3952
+ const messageRef = useRefFrom(message);
3953
+ const handleSendBoxClick = (0, import_react27.useCallback)(
3954
+ (event) => {
3955
+ if ("tabIndex" in event.target && typeof event.target.tabIndex === "number" && event.target.tabIndex >= 0) {
3956
+ return;
3957
+ }
3958
+ inputRef.current?.focus();
3959
+ },
3960
+ [inputRef]
3961
+ );
3962
+ const handleMessageChange = (0, import_react27.useCallback)(
3963
+ (event) => setMessage(event.currentTarget.value),
3964
+ [setMessage]
3965
+ );
3966
+ const handleAddFiles = (0, import_react27.useCallback)(
3967
+ async (inputFiles) => {
3968
+ const newAttachments = Object.freeze(
3969
+ await Promise.all(
3970
+ inputFiles.map(
3971
+ (file) => makeThumbnail(file).then(
3972
+ (thumbnailURL) => Object.freeze({
3973
+ blob: file,
3974
+ ...thumbnailURL && { thumbnailURL }
3975
+ })
3976
+ )
3977
+ )
3978
+ )
3979
+ );
3980
+ setAttachments(newAttachments);
3981
+ },
3982
+ [makeThumbnail, setAttachments]
3983
+ );
3984
+ const handleFormSubmit = (0, import_react27.useCallback)(
3985
+ (event) => {
3986
+ event.preventDefault();
3987
+ if (errorRef.current !== "empty" && !isMessageLengthExceeded) {
3988
+ sendMessage(messageRef.current, void 0, { attachments: attachmentsRef.current });
3989
+ setMessage("");
3990
+ setAttachments([]);
3991
+ }
3992
+ inputRef.current?.focus();
3993
+ },
3994
+ [attachmentsRef, messageRef, sendMessage, setAttachments, setMessage, isMessageLengthExceeded, errorRef, inputRef]
3995
+ );
3996
+ const handleTelephoneKeypadButtonClick = (0, import_react27.useCallback)(
3997
+ (dtmf) => {
3998
+ sendMessage(`/DTMF ${dtmf}`);
3999
+ setTelephoneKeypadShown(false);
4000
+ },
4001
+ [sendMessage, setTelephoneKeypadShown]
4002
+ );
4003
+ const aria = {
4004
+ "aria-invalid": "false",
4005
+ ...errorMessage && {
4006
+ "aria-invalid": "true",
4007
+ "aria-errormessage": errorMessageId
4008
+ }
4009
+ };
4010
+ return /* @__PURE__ */ import_react27.default.createElement("form", { ...aria, className: (0, import_classnames6.default)(classNames["webchat-fluent__sendbox"], props.className), onSubmit: handleFormSubmit }, /* @__PURE__ */ import_react27.default.createElement(SuggestedActions_default, null), /* @__PURE__ */ import_react27.default.createElement("div", { className: (0, import_classnames6.default)(classNames["webchat-fluent__sendbox__sendbox"]), onClickCapture: handleSendBoxClick }, /* @__PURE__ */ import_react27.default.createElement(
4011
+ Surrogate_default,
4012
+ {
4013
+ autoFocus: true,
4014
+ isHorizontal: false,
4015
+ onButtonClick: handleTelephoneKeypadButtonClick
4016
+ }
4017
+ ), /* @__PURE__ */ import_react27.default.createElement(
4018
+ TextArea_default,
4019
+ {
4020
+ "aria-label": isMessageLengthExceeded ? localize("TEXT_INPUT_LENGTH_EXCEEDED_ALT") : localize("TEXT_INPUT_ALT"),
4021
+ className: classNames["webchat-fluent__sendbox__sendbox-text"],
4022
+ "data-testid": testIds_default.sendBoxTextBox,
4023
+ hidden: telephoneKeypadShown,
4024
+ onInput: handleMessageChange,
4025
+ placeholder: props.placeholder ?? localize("TEXT_INPUT_PLACEHOLDER"),
4026
+ ref: inputRef,
4027
+ value: message
4028
+ }
4029
+ ), /* @__PURE__ */ import_react27.default.createElement(Attachments_default, { attachments }), /* @__PURE__ */ import_react27.default.createElement("div", { className: (0, import_classnames6.default)(classNames["webchat-fluent__sendbox__sendbox-controls"]) }, maxMessageLength && /* @__PURE__ */ import_react27.default.createElement(
4030
+ "div",
4031
+ {
4032
+ className: (0, import_classnames6.default)(classNames["webchat-fluent__sendbox__text-counter"], {
4033
+ [classNames["webchat-fluent__sendbox__text-counter--error"]]: isMessageLengthExceeded
4034
+ })
4035
+ },
4036
+ `${message.length}/${maxMessageLength}`
4037
+ ), /* @__PURE__ */ import_react27.default.createElement(Toolbar, null, /* @__PURE__ */ import_react27.default.createElement(TelephoneKeypadToolbarButton_default, null), /* @__PURE__ */ import_react27.default.createElement(AddAttachmentButton_default, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react27.default.createElement(ToolbarSeparator, null), /* @__PURE__ */ import_react27.default.createElement(
4038
+ ToolbarButton,
4039
+ {
4040
+ "aria-label": localize("TEXT_INPUT_SEND_BUTTON_ALT"),
4041
+ "data-testid": testIds_default.sendBoxSendButton,
4042
+ disabled: isMessageLengthExceeded,
4043
+ type: "submit"
4044
+ },
4045
+ /* @__PURE__ */ import_react27.default.createElement(SendIcon, null)
4046
+ ))), /* @__PURE__ */ import_react27.default.createElement(DropZone_default, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react27.default.createElement(ErrorMessage_default, { error: errorMessage, id: errorMessageId })));
4047
+ }
4048
+ var sendbox_default = (0, import_react27.memo)(SendBox);
4049
+
4050
+ // src/components/SendBox.tsx
4051
+ var SendBox_default = sendbox_default;
4052
+
4053
+ // src/private/FluentThemeProvider.tsx
4054
+ var { ThemeProvider } = import_botframework_webchat_component5.Components;
4055
+ var sendBoxMiddleware = [() => () => () => SendBox_default];
4056
+ var FluentThemeProvider = ({ children }) => /* @__PURE__ */ import_react28.default.createElement(WebchatTheme, null, /* @__PURE__ */ import_react28.default.createElement(Provider_default, null, /* @__PURE__ */ import_react28.default.createElement(ThemeProvider, { sendBoxMiddleware }, children)));
4057
+ var FluentThemeProvider_default = (0, import_react28.memo)(FluentThemeProvider);
4058
+
4059
+ // src/index.ts
4060
+ injectMeta("botframework-webchat-fluent-theme:version", "4.17.0-main.20240411.ff34969");
4061
+
4062
+ // src/bundle.ts
4063
+ globalThis.WebChat = {
4064
+ ...globalThis.WebChat,
4065
+ FluentThemeProvider: FluentThemeProvider_default,
4066
+ testIds: {
4067
+ ...globalThis.WebChat?.testIds,
4068
+ ...testIds_default
4069
+ }
4070
+ };
4071
+ })();
4072
+ /*! Bundled license information:
4073
+
4074
+ classnames/index.js:
4075
+ (*!
4076
+ Copyright (c) 2018 Jed Watson.
4077
+ Licensed under the MIT License (MIT), see
4078
+ http://jedwatson.github.io/classnames
4079
+ *)
4080
+ */
4081
+ //# sourceMappingURL=botframework-webchat-fluent-theme.development.js.map