botframework-webchat-fluent-theme 4.17.0-main.20240411.ff34969 → 4.17.0-main.20240416.4ff01ae
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/botframework-webchat-fluent-theme.development.css.map +1 -0
- package/dist/botframework-webchat-fluent-theme.development.js +384 -2081
- package/dist/botframework-webchat-fluent-theme.development.js.map +1 -1
- package/dist/botframework-webchat-fluent-theme.production.min.css.map +1 -0
- package/dist/botframework-webchat-fluent-theme.production.min.js +1 -3
- package/dist/botframework-webchat-fluent-theme.production.min.js.map +1 -1
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +360 -648
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1076 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -8
- package/src/components/Theme.module.css +60 -0
- package/src/components/Theme.tsx +4 -64
- package/src/components/dropZone/index.module.css +23 -0
- package/src/components/dropZone/index.tsx +6 -31
- package/src/components/sendbox/AddAttachmentButton.module.css +10 -0
- package/src/components/sendbox/AddAttachmentButton.tsx +5 -17
- package/src/components/sendbox/Attachments.module.css +7 -0
- package/src/components/sendbox/Attachments.tsx +3 -12
- package/src/components/sendbox/ErrorMessage.module.css +9 -0
- package/src/components/sendbox/ErrorMessage.tsx +2 -13
- package/src/components/sendbox/TelephoneKeypadToolbarButton.tsx +1 -1
- package/src/components/sendbox/TextArea.module.css +61 -0
- package/src/components/sendbox/TextArea.tsx +9 -70
- package/src/components/sendbox/Toolbar.module.css +49 -0
- package/src/components/sendbox/Toolbar.tsx +4 -55
- package/src/components/sendbox/index.module.css +58 -0
- package/src/components/sendbox/index.tsx +16 -81
- package/src/components/suggestedActions/SuggestedAction.module.css +34 -0
- package/src/components/suggestedActions/SuggestedAction.tsx +5 -47
- package/src/components/suggestedActions/index.module.css +23 -0
- package/src/components/suggestedActions/index.tsx +18 -23
- package/src/components/telephoneKeypad/private/Button.module.css +62 -0
- package/src/components/telephoneKeypad/private/Button.tsx +5 -67
- package/src/components/telephoneKeypad/private/TelephoneKeypad.module.css +30 -0
- package/src/components/telephoneKeypad/private/TelephoneKeypad.tsx +4 -35
- package/src/env.d.ts +7 -0
- package/src/index.ts +3 -0
- package/src/styles/injectStyle.ts +9 -0
- package/src/styles/useStyles.ts +19 -0
- package/src/styles.ts +4 -0
- package/src/tsconfig.json +2 -1
- package/src/private/useStyleToEmotionObject.ts +0 -32
- package/src/styles/index.ts +0 -15
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
11
|
};
|
|
12
|
-
var __copyProps = (to,
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
15
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () =>
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
@@ -320,22 +320,22 @@
|
|
|
320
320
|
"use strict";
|
|
321
321
|
var global2 = require_global();
|
|
322
322
|
var userAgent = require_engine_user_agent();
|
|
323
|
-
var
|
|
323
|
+
var process = global2.process;
|
|
324
324
|
var Deno = global2.Deno;
|
|
325
|
-
var versions =
|
|
325
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
326
326
|
var v8 = versions && versions.v8;
|
|
327
|
-
var
|
|
327
|
+
var match;
|
|
328
328
|
var version;
|
|
329
329
|
if (v8) {
|
|
330
|
-
|
|
331
|
-
version =
|
|
330
|
+
match = v8.split(".");
|
|
331
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
332
332
|
}
|
|
333
333
|
if (!version && userAgent) {
|
|
334
|
-
|
|
335
|
-
if (!
|
|
336
|
-
|
|
337
|
-
if (
|
|
338
|
-
version = +
|
|
334
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
|
335
|
+
if (!match || match[1] >= 74) {
|
|
336
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
|
337
|
+
if (match)
|
|
338
|
+
version = +match[1];
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
module.exports = version;
|
|
@@ -917,9 +917,9 @@
|
|
|
917
917
|
var toIntegerOrInfinity = require_to_integer_or_infinity();
|
|
918
918
|
var max = Math.max;
|
|
919
919
|
var min = Math.min;
|
|
920
|
-
module.exports = function(index,
|
|
920
|
+
module.exports = function(index, length) {
|
|
921
921
|
var integer = toIntegerOrInfinity(index);
|
|
922
|
-
return integer < 0 ? max(integer +
|
|
922
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
925
|
});
|
|
@@ -958,19 +958,19 @@
|
|
|
958
958
|
var createMethod = function(IS_INCLUDES) {
|
|
959
959
|
return function($this, el, fromIndex) {
|
|
960
960
|
var O = toIndexedObject($this);
|
|
961
|
-
var
|
|
962
|
-
if (
|
|
961
|
+
var length = lengthOfArrayLike(O);
|
|
962
|
+
if (length === 0)
|
|
963
963
|
return !IS_INCLUDES && -1;
|
|
964
|
-
var index = toAbsoluteIndex(fromIndex,
|
|
964
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
965
965
|
var value;
|
|
966
966
|
if (IS_INCLUDES && el !== el)
|
|
967
|
-
while (
|
|
967
|
+
while (length > index) {
|
|
968
968
|
value = O[index++];
|
|
969
969
|
if (value !== value)
|
|
970
970
|
return true;
|
|
971
971
|
}
|
|
972
972
|
else
|
|
973
|
-
for (;
|
|
973
|
+
for (; length > index; index++) {
|
|
974
974
|
if ((IS_INCLUDES || index in O) && O[index] === el)
|
|
975
975
|
return IS_INCLUDES || index || 0;
|
|
976
976
|
}
|
|
@@ -1064,10 +1064,10 @@
|
|
|
1064
1064
|
anObject(O);
|
|
1065
1065
|
var props = toIndexedObject(Properties);
|
|
1066
1066
|
var keys = objectKeys(Properties);
|
|
1067
|
-
var
|
|
1067
|
+
var length = keys.length;
|
|
1068
1068
|
var index = 0;
|
|
1069
1069
|
var key;
|
|
1070
|
-
while (
|
|
1070
|
+
while (length > index)
|
|
1071
1071
|
definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1072
1072
|
return O;
|
|
1073
1073
|
};
|
|
@@ -1144,9 +1144,9 @@
|
|
|
1144
1144
|
} catch (error) {
|
|
1145
1145
|
}
|
|
1146
1146
|
NullProtoObject = typeof document != "undefined" ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument);
|
|
1147
|
-
var
|
|
1148
|
-
while (
|
|
1149
|
-
delete NullProtoObject[PROTOTYPE][enumBugKeys[
|
|
1147
|
+
var length = enumBugKeys.length;
|
|
1148
|
+
while (length--)
|
|
1149
|
+
delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1150
1150
|
return NullProtoObject();
|
|
1151
1151
|
};
|
|
1152
1152
|
hiddenKeys[IE_PROTO] = true;
|
|
@@ -1266,15 +1266,6 @@
|
|
|
1266
1266
|
}
|
|
1267
1267
|
});
|
|
1268
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
1269
|
// node_modules/inject-meta-tag/lib/esmodules/injectMetaTag.js
|
|
1279
1270
|
function injectMeta(name, content) {
|
|
1280
1271
|
try {
|
|
@@ -1291,8 +1282,8 @@
|
|
|
1291
1282
|
}
|
|
1292
1283
|
|
|
1293
1284
|
// src/private/FluentThemeProvider.tsx
|
|
1294
|
-
var
|
|
1295
|
-
var
|
|
1285
|
+
var import_botframework_webchat_component9 = __toESM(require_botframework_webchat_component());
|
|
1286
|
+
var import_react27 = __toESM(require_react());
|
|
1296
1287
|
|
|
1297
1288
|
// src/components/telephoneKeypad/Provider.tsx
|
|
1298
1289
|
var import_react2 = __toESM(require_react());
|
|
@@ -1324,10 +1315,10 @@
|
|
|
1324
1315
|
var Provider_default = Provider;
|
|
1325
1316
|
|
|
1326
1317
|
// src/components/telephoneKeypad/Surrogate.tsx
|
|
1327
|
-
var
|
|
1318
|
+
var import_react8 = __toESM(require_react());
|
|
1328
1319
|
|
|
1329
1320
|
// src/components/telephoneKeypad/private/TelephoneKeypad.tsx
|
|
1330
|
-
var
|
|
1321
|
+
var import_react7 = __toESM(require_react());
|
|
1331
1322
|
|
|
1332
1323
|
// node_modules/use-ref-from/lib/esmodules/useRefFrom.js
|
|
1333
1324
|
var import_create = __toESM(require_create3());
|
|
@@ -1347,1518 +1338,68 @@
|
|
|
1347
1338
|
return readOnlyRef;
|
|
1348
1339
|
}
|
|
1349
1340
|
|
|
1350
|
-
// src/
|
|
1341
|
+
// src/components/telephoneKeypad/private/Button.tsx
|
|
1351
1342
|
var import_react5 = __toESM(require_react());
|
|
1352
1343
|
|
|
1353
|
-
//
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
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
|
-
};
|
|
1344
|
+
// src/components/telephoneKeypad/private/Button.module.css
|
|
1345
|
+
var Button_default = {
|
|
1346
|
+
"telephone-keypad__button": "Button_telephone-keypad__button",
|
|
1347
|
+
"telephone-keypad__button__ruby": "Button_telephone-keypad__button__ruby",
|
|
1348
|
+
"telephone-keypad__button__text": "Button_telephone-keypad__button__text",
|
|
1349
|
+
"telephone-keypad--horizontal": "Button_telephone-keypad--horizontal"
|
|
1802
1350
|
};
|
|
1803
1351
|
|
|
1804
|
-
//
|
|
1805
|
-
function memoize(fn) {
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
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;
|
|
1352
|
+
// src/styles/injectStyle.ts
|
|
1353
|
+
var injectedStyles = "/* src/components/telephoneKeypad/private/Button.module.css */\n.webchat-fluent .Button_telephone-keypad__button {\n -webkit-user-select: none;\n align-items: center;\n appearance: none;\n background-color: White;\n border-radius: 100%;\n border: solid 1px var(--webchat-colorNeutralStroke1);\n color: var(--webchat-colorGray200);\n font-weight: var(--webchat-fontWeightSemibold);\n cursor: pointer;\n display: flex;\n flex-direction: column;\n height: 60px;\n opacity: 0.7;\n padding: 0;\n position: relative;\n touch-action: none;\n user-select: none;\n width: 60px;\n}\n.webchat-fluent .Button_telephone-keypad__button:hover {\n background-color: var(--webchat-colorGray30);\n}\n.webchat-fluent .Button_telephone-keypad__button__ruby {\n color: var(--webchat-colorGray190);\n font-size: 10px;\n}\n.webchat-fluent .Button_telephone-keypad__button__text {\n font-size: 24px;\n margin-top: 8px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button {\n height: 32px;\n justify-content: center;\n margin: 8px 4px;\n width: 32px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__ruby {\n display: none;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__text {\n font-size: 20px;\n margin-top: 0;\n}\n\n/* src/components/telephoneKeypad/private/TelephoneKeypad.module.css */\n.webchat-fluent .TelephoneKeypad_telephone-keypad {\n align-items: center;\n background: var(--webchat-colorNeutralBackground1);\n border: none;\n border-radius: var(--webchat-borderRadiusXLarge);\n display: flex;\n flex-direction: column;\n font-family: var(--webchat-fontFamilyBase);\n justify-content: center;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__box {\n box-sizing: border-box;\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(3, 1fr);\n grid-template-rows: repeat(4, 1fr);\n justify-items: center;\n padding: 16px;\n width: 100%;\n}\n\n/* src/components/Theme.module.css */\n.webchat-fluent.Theme_theme {\n display: contents;\n --webchat-colorNeutralForeground1: var(--colorNeutralForeground1, #242424);\n --webchat-colorNeutralForeground2: var(--colorNeutralForeground2, #424242);\n --webchat-colorNeutralForeground4: var(--colorNeutralForeground4, #707070);\n --webchat-colorNeutralForegroundDisabled: var(--colorNeutralForegroundDisabled, #bdbdbd);\n --webchat-colorNeutralBackground1: var(--colorNeutralBackground1, #ffffff);\n --webchat-colorNeutralBackground4: var(--colorNeutralBackground4, #f0f0f0);\n --webchat-colorNeutralBackground5: var(--colorNeutralBackground5, #ebebeb);\n --webchat-colorSubtleBackgroundHover: var(--colorSubtleBackgroundHover, #f5f5f5);\n --webchat-colorSubtleBackgroundPressed: var(--colorSubtleBackgroundPressed, #e0e0e0);\n --webchat-colorNeutralStroke1: var(--colorNeutralStroke1, #d1d1d1);\n --webchat-colorNeutralStroke2: var(--colorNeutralStroke2, #e0e0e0);\n --webchat-colorNeutralStroke1Selected: var(--colorNeutralStroke1Selected, #bdbdbd);\n --webchat-colorBrandStroke2: var(--colorBrandStroke2, #9edcf7);\n --webchat-colorBrandForeground2Hover: var(--colorBrandForeground2Hover, #015a7a);\n --webchat-colorBrandForeground2Pressed: var(--colorBrandForeground2Pressed, #01384d);\n --webchat-colorBrandBackground2Hover: var(--colorBrandBackground2Hover, #bee7fa);\n --webchat-colorBrandBackground2Pressed: var(--colorBrandBackground2Pressed, #7fd2f5);\n --webchat-colorCompoundBrandForeground1: var(--colorCompoundBrandForeground1, #077fab);\n --webchat-colorCompoundBrandForeground1Hover: var(--colorCompoundBrandForeground1Hover, #02729c);\n --webchat-colorCompoundBrandForeground1Pressed: var(--colorCompoundBrandForeground1Pressed, #01678c);\n --webchat-colorStatusDangerForeground1: var(--colorStatusDangerForeground1, #b10e1c);\n --webchat-colorGray30: var(--colorGray30, #edebe9);\n --webchat-colorGray160: var(--colorGray160, #323130);\n --webchat-colorGray190: var(--colorGray190, #201f1e);\n --webchat-colorGray200: var(--colorGray200, #1b1a19);\n --webchat-borderRadiusSmall: var(--borderRadiusSmall, 2px);\n --webchat-borderRadiusLarge: var(--borderRadiusLarge, 6px);\n --webchat-borderRadiusXLarge: var(--borderRadiusXLarge, 8px);\n --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));\n --webchat-spacingHorizontalMNudge: var(--spacingHorizontalMNudge, 10px);\n --webchat-fontFamilyBase: var(--fontFamilyBase, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontFamilyNumeric: var(--fontFamilyNumeric, Bahnschrift, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontWeightSemibold: var(--fontWeightSemibold, 600);\n}\n\n/* src/components/dropZone/index.module.css */\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone {\n background-color: var(--webchat-colorNeutralBackground4);\n border-radius: inherit;\n cursor: copy;\n display: grid;\n gap: 8px;\n inset: 0;\n place-content: center;\n place-items: center;\n position: absolute;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone--droppable {\n background-color: #e00;\n color: White;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone-icon {\n height: 36px;\n pointer-events: none;\n width: 36px;\n}\n\n/* src/components/suggestedActions/SuggestedAction.module.css */\n.webchat-fluent .SuggestedAction_suggested-action {\n align-items: center;\n background: transparent;\n border-radius: 8px;\n border: 1px solid var(--webchat-colorBrandStroke2);\n cursor: pointer;\n display: flex;\n font-size: 12px;\n gap: 4px;\n padding: 4px 8px 4px;\n text-align: start;\n transition: all .15s ease-out;\n}\n@media (hover: hover) {\n .webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):hover {\n background-color: var(--webchat-colorBrandBackground2Hover);\n color: var(--webchat-colorBrandForeground2Hover);\n }\n}\n.webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):active {\n background-color: var(--webchat-colorBrandBackground2Pressed);\n color: var(--webchat-colorBrandForeground2Pressed);\n}\n.webchat-fluent .SuggestedAction_suggested-action[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .SuggestedAction_suggested-action__image {\n font-size: 12px;\n height: 1em;\n width: 1em;\n}\n\n/* src/components/suggestedActions/index.module.css */\n.webchat-fluent .suggestedActions_suggested-actions {\n align-items: flex-end;\n align-self: flex-end;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.webchat-fluent .suggestedActions_suggested-actions:not(:empty) {\n padding-block-end: 8px;\n padding-inline-start: 4px;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--flow {\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--stacked {\n flex-direction: column;\n}\n\n/* src/components/sendbox/Toolbar.module.css */\n.webchat-fluent .Toolbar_sendbox__toolbar {\n display: flex;\n gap: 4px;\n margin-inline-start: auto;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button {\n align-items: center;\n appearance: none;\n aspect-ratio: 1;\n background: transparent;\n border-radius: var(--webchat-borderRadiusSmall);\n border: none;\n cursor: pointer;\n display: flex;\n justify-content: center;\n padding: 3px;\n width: 32px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button > svg {\n font-size: 20px;\n pointer-events: none;\n}\n@media (hover: hover) {\n .webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):hover {\n background-color: var(--webchat-colorSubtleBackgroundHover);\n color: var(--webchat-colorCompoundBrandForeground1Hover);\n }\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):active {\n background-color: var(--webchat-colorSubtleBackgroundPressed);\n color: var(--webchat-colorCompoundBrandForeground1Pressed);\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator {\n align-self: center;\n border-inline-end: 1px solid var(--webchat-colorNeutralStroke2);\n height: 28px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator:is(:first-child, :last-child, :only-child) {\n display: none;\n}\n\n/* src/components/sendbox/AddAttachmentButton.module.css */\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment {\n display: grid;\n}\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment-input {\n font-size: 0;\n height: 0;\n opacity: 0;\n width: 0;\n}\n\n/* src/components/sendbox/Attachments.module.css */\n.webchat-fluent .Attachments_sendbox__attachment {\n border-radius: var(--webchat-borderRadiusLarge);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n cursor: default;\n padding: 6px 8px;\n width: fit-content;\n}\n\n/* src/components/sendbox/ErrorMessage.module.css */\n.webchat-fluent .ErrorMessage_sendbox__error-message {\n color: transparent;\n font-size: 0;\n height: 0;\n left: 0;\n position: absolute;\n top: 0;\n width: 0;\n}\n\n/* src/components/sendbox/TextArea.module.css */\n.webchat-fluent .TextArea_sendbox__text-area {\n display: grid;\n grid-template-areas: \"main\";\n max-height: 200px;\n overflow: hidden;\n}\n.webchat-fluent .TextArea_sendbox__text-area--hidden {\n height: 0;\n visibility: collapse;\n}\n.webchat-fluent .TextArea_sendbox__text-area-shared {\n border: none;\n font: inherit;\n grid-area: main;\n outline: inherit;\n overflow-wrap: anywhere;\n resize: inherit;\n scrollbar-gutter: stable;\n}\n.webchat-fluent .TextArea_sendbox__text-area-doppelganger {\n overflow: hidden;\n visibility: hidden;\n white-space: pre-wrap;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input {\n height: 100%;\n padding: 0;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll {\n scrollbar-color: unset;\n scrollbar-width: unset;\n -moz-scrollbar-color: var(--webchat-colorNeutralBackground5) var(--webchat-colorNeutralForeground2);\n -moz-scrollbar-width: thin;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar {\n width: 8px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-track {\n background-color: var(--webchat-colorNeutralBackground5);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-thumb {\n background-color: var(--webchat-colorNeutralForeground2);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-corner {\n background-color: var(--webchat-colorNeutralBackground5);\n}\n\n/* src/components/sendbox/index.module.css */\n.webchat-fluent .sendbox_sendbox {\n color: var(--webchat-colorNeutralForeground1);\n font-family: var(--webchat-fontFamilyBase);\n padding: 0 10px 10px;\n text-rendering: optimizeLegibility;\n}\n.webchat-fluent .sendbox_sendbox__sendbox {\n background-color: var(--webchat-colorNeutralBackground1);\n border-radius: var(--webchat-borderRadiusLarge);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n display: grid;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n gap: 6px;\n line-height: 20px;\n padding: 8px;\n position: relative;\n}\n.webchat-fluent .sendbox_sendbox__sendbox:focus-within {\n border-color: var(--webchat-colorNeutralStroke1Selected);\n box-shadow: inset 0 -6px 0 -3px var(--webchat-colorCompoundBrandForeground1Hover);\n}\n.webchat-fluent .sendbox_sendbox__sendbox-text {\n background-color: transparent;\n border: none;\n flex: auto;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n line-height: 20px;\n outline: none;\n padding: 4px 4px 0;\n resize: none;\n}\n.webchat-fluent .sendbox_sendbox__sendbox-controls {\n align-items: center;\n display: flex;\n padding-inline-start: 4px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter {\n color: var(--webchat-colorNeutralForeground4);\n cursor: default;\n font-family: var(--webchat-fontFamilyNumeric);\n font-size: 10px;\n line-height: 14px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter--error {\n color: var(--webchat-colorStatusDangerForeground1);\n}\n";
|
|
1354
|
+
function injectStyles() {
|
|
1355
|
+
if (globalThis.document) {
|
|
1356
|
+
const style = document.createElement("style");
|
|
1357
|
+
style.append(document.createTextNode(injectedStyles));
|
|
1358
|
+
document.head.appendChild(style);
|
|
1873
1359
|
}
|
|
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
1360
|
}
|
|
2286
1361
|
|
|
2287
|
-
//
|
|
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
|
|
1362
|
+
// src/styles/useStyles.ts
|
|
2755
1363
|
var import_react4 = __toESM(require_react());
|
|
2756
|
-
|
|
2757
|
-
|
|
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)(
|
|
1364
|
+
function useStyles(styles) {
|
|
1365
|
+
return (0, import_react4.useMemo)(
|
|
2776
1366
|
() => Object.freeze(
|
|
2777
|
-
Object.fromEntries(
|
|
1367
|
+
Object.fromEntries(
|
|
1368
|
+
Object.entries(styles).map(([baseClassName, resultClassName]) => [
|
|
1369
|
+
baseClassName,
|
|
1370
|
+
`${baseClassName} ${resultClassName}`
|
|
1371
|
+
])
|
|
1372
|
+
)
|
|
2778
1373
|
),
|
|
2779
|
-
[
|
|
1374
|
+
[styles]
|
|
2780
1375
|
);
|
|
2781
1376
|
}
|
|
1377
|
+
var useStyles_default = useStyles;
|
|
2782
1378
|
|
|
2783
1379
|
// src/components/telephoneKeypad/private/Button.tsx
|
|
2784
|
-
var
|
|
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)(
|
|
1380
|
+
var Button = (0, import_react5.memo)(
|
|
2840
1381
|
// As we are all TypeScript, internal components do not need propTypes.
|
|
2841
1382
|
// eslint-disable-next-line react/prop-types
|
|
2842
|
-
(0,
|
|
2843
|
-
const classNames =
|
|
1383
|
+
(0, import_react5.forwardRef)(({ button, "data-testid": dataTestId, onClick, ruby }, ref) => {
|
|
1384
|
+
const classNames = useStyles_default(Button_default);
|
|
2844
1385
|
const onClickRef = useRefFrom(onClick);
|
|
2845
|
-
const handleClick = (0,
|
|
2846
|
-
return /* @__PURE__ */
|
|
1386
|
+
const handleClick = (0, import_react5.useCallback)(() => onClickRef.current?.(), [onClickRef]);
|
|
1387
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
|
2847
1388
|
"button",
|
|
2848
1389
|
{
|
|
2849
|
-
className: classNames["
|
|
1390
|
+
className: classNames["telephone-keypad__button"],
|
|
2850
1391
|
"data-testid": dataTestId,
|
|
2851
1392
|
onClick: handleClick,
|
|
2852
1393
|
ref,
|
|
2853
1394
|
type: "button"
|
|
2854
1395
|
},
|
|
2855
|
-
/* @__PURE__ */
|
|
2856
|
-
!!ruby && /* @__PURE__ */
|
|
1396
|
+
/* @__PURE__ */ import_react5.default.createElement("span", { className: classNames["telephone-keypad__button__text"] }, button === "star" ? "\u2217" : button === "pound" ? "#" : button),
|
|
1397
|
+
!!ruby && /* @__PURE__ */ import_react5.default.createElement("ruby", { className: classNames["telephone-keypad__button__ruby"] }, ruby)
|
|
2857
1398
|
);
|
|
2858
1399
|
})
|
|
2859
1400
|
);
|
|
2860
1401
|
Button.displayName = "TelephoneKeypad.Button";
|
|
2861
|
-
var
|
|
1402
|
+
var Button_default2 = Button;
|
|
2862
1403
|
|
|
2863
1404
|
// src/testIds.ts
|
|
2864
1405
|
var testIds = {
|
|
@@ -2883,71 +1424,48 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
2883
1424
|
var testIds_default = testIds;
|
|
2884
1425
|
|
|
2885
1426
|
// src/components/telephoneKeypad/useShown.ts
|
|
2886
|
-
var
|
|
1427
|
+
var import_react6 = __toESM(require_react());
|
|
2887
1428
|
function useShown() {
|
|
2888
|
-
const { setShown, shown } = (0,
|
|
2889
|
-
return (0,
|
|
1429
|
+
const { setShown, shown } = (0, import_react6.useContext)(Context_default);
|
|
1430
|
+
return (0, import_react6.useMemo)(() => Object.freeze([shown, setShown]), [shown, setShown]);
|
|
2890
1431
|
}
|
|
2891
1432
|
|
|
2892
|
-
// src/components/telephoneKeypad/private/TelephoneKeypad.
|
|
2893
|
-
var
|
|
2894
|
-
"
|
|
2895
|
-
|
|
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
|
-
}
|
|
1433
|
+
// src/components/telephoneKeypad/private/TelephoneKeypad.module.css
|
|
1434
|
+
var TelephoneKeypad_default = {
|
|
1435
|
+
"telephone-keypad": "TelephoneKeypad_telephone-keypad",
|
|
1436
|
+
"telephone-keypad__box": "TelephoneKeypad_telephone-keypad__box"
|
|
2921
1437
|
};
|
|
2922
|
-
|
|
1438
|
+
|
|
1439
|
+
// src/components/telephoneKeypad/private/TelephoneKeypad.tsx
|
|
1440
|
+
var Orientation = (0, import_react7.memo)(
|
|
2923
1441
|
({ children, isHorizontal }) => {
|
|
2924
|
-
const classNames =
|
|
1442
|
+
const classNames = useStyles_default(TelephoneKeypad_default);
|
|
2925
1443
|
return isHorizontal ? (
|
|
2926
1444
|
// <HorizontalDialPadController>{children}</HorizontalDialPadController>
|
|
2927
1445
|
false
|
|
2928
|
-
) : /* @__PURE__ */
|
|
1446
|
+
) : /* @__PURE__ */ import_react7.default.createElement("div", { className: classNames["telephone-keypad__box"] }, children);
|
|
2929
1447
|
}
|
|
2930
1448
|
);
|
|
2931
1449
|
Orientation.displayName = "TelephoneKeypad:Orientation";
|
|
2932
|
-
var TelephoneKeypad = (0,
|
|
1450
|
+
var TelephoneKeypad = (0, import_react7.memo)(({ autoFocus, onButtonClick, isHorizontal }) => {
|
|
2933
1451
|
const autoFocusRef = useRefFrom(autoFocus);
|
|
2934
|
-
const classNames =
|
|
2935
|
-
const firstButtonRef = (0,
|
|
1452
|
+
const classNames = useStyles_default(TelephoneKeypad_default);
|
|
1453
|
+
const firstButtonRef = (0, import_react7.useRef)(null);
|
|
2936
1454
|
const onButtonClickRef = useRefFrom(onButtonClick);
|
|
2937
1455
|
const [, setShown] = useShown();
|
|
2938
|
-
const handleButton1Click = (0,
|
|
2939
|
-
const handleButton2Click = (0,
|
|
2940
|
-
const handleButton3Click = (0,
|
|
2941
|
-
const handleButton4Click = (0,
|
|
2942
|
-
const handleButton5Click = (0,
|
|
2943
|
-
const handleButton6Click = (0,
|
|
2944
|
-
const handleButton7Click = (0,
|
|
2945
|
-
const handleButton8Click = (0,
|
|
2946
|
-
const handleButton9Click = (0,
|
|
2947
|
-
const handleButton0Click = (0,
|
|
2948
|
-
const handleButtonStarClick = (0,
|
|
2949
|
-
const handleButtonPoundClick = (0,
|
|
2950
|
-
const handleKeyDown = (0,
|
|
1456
|
+
const handleButton1Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("1"), [onButtonClickRef]);
|
|
1457
|
+
const handleButton2Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("2"), [onButtonClickRef]);
|
|
1458
|
+
const handleButton3Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("3"), [onButtonClickRef]);
|
|
1459
|
+
const handleButton4Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("4"), [onButtonClickRef]);
|
|
1460
|
+
const handleButton5Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("5"), [onButtonClickRef]);
|
|
1461
|
+
const handleButton6Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("6"), [onButtonClickRef]);
|
|
1462
|
+
const handleButton7Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("7"), [onButtonClickRef]);
|
|
1463
|
+
const handleButton8Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("8"), [onButtonClickRef]);
|
|
1464
|
+
const handleButton9Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("9"), [onButtonClickRef]);
|
|
1465
|
+
const handleButton0Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("0"), [onButtonClickRef]);
|
|
1466
|
+
const handleButtonStarClick = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("star"), [onButtonClickRef]);
|
|
1467
|
+
const handleButtonPoundClick = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("pound"), [onButtonClickRef]);
|
|
1468
|
+
const handleKeyDown = (0, import_react7.useCallback)(
|
|
2951
1469
|
(event) => {
|
|
2952
1470
|
if (event.key === "Escape") {
|
|
2953
1471
|
setShown(false);
|
|
@@ -2955,83 +1473,83 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
2955
1473
|
},
|
|
2956
1474
|
[setShown]
|
|
2957
1475
|
);
|
|
2958
|
-
(0,
|
|
1476
|
+
(0, import_react7.useEffect)(() => {
|
|
2959
1477
|
autoFocusRef.current && firstButtonRef.current?.focus();
|
|
2960
1478
|
}, [autoFocusRef, firstButtonRef]);
|
|
2961
|
-
return /* @__PURE__ */
|
|
2962
|
-
|
|
1479
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", { className: classNames["telephone-keypad"], onKeyDown: handleKeyDown }, /* @__PURE__ */ import_react7.default.createElement(Orientation, { isHorizontal }, /* @__PURE__ */ import_react7.default.createElement(
|
|
1480
|
+
Button_default2,
|
|
2963
1481
|
{
|
|
2964
1482
|
button: "1",
|
|
2965
1483
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButton1,
|
|
2966
1484
|
onClick: handleButton1Click,
|
|
2967
1485
|
ref: firstButtonRef
|
|
2968
1486
|
}
|
|
2969
|
-
), /* @__PURE__ */
|
|
2970
|
-
|
|
1487
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1488
|
+
Button_default2,
|
|
2971
1489
|
{
|
|
2972
1490
|
button: "2",
|
|
2973
1491
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButton2,
|
|
2974
1492
|
onClick: handleButton2Click,
|
|
2975
1493
|
ruby: "ABC"
|
|
2976
1494
|
}
|
|
2977
|
-
), /* @__PURE__ */
|
|
2978
|
-
|
|
1495
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1496
|
+
Button_default2,
|
|
2979
1497
|
{
|
|
2980
1498
|
button: "3",
|
|
2981
1499
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButton3,
|
|
2982
1500
|
onClick: handleButton3Click,
|
|
2983
1501
|
ruby: "DEF"
|
|
2984
1502
|
}
|
|
2985
|
-
), /* @__PURE__ */
|
|
2986
|
-
|
|
1503
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1504
|
+
Button_default2,
|
|
2987
1505
|
{
|
|
2988
1506
|
button: "4",
|
|
2989
1507
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButton4,
|
|
2990
1508
|
onClick: handleButton4Click,
|
|
2991
1509
|
ruby: "GHI"
|
|
2992
1510
|
}
|
|
2993
|
-
), /* @__PURE__ */
|
|
2994
|
-
|
|
1511
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1512
|
+
Button_default2,
|
|
2995
1513
|
{
|
|
2996
1514
|
button: "5",
|
|
2997
1515
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButton5,
|
|
2998
1516
|
onClick: handleButton5Click,
|
|
2999
1517
|
ruby: "JKL"
|
|
3000
1518
|
}
|
|
3001
|
-
), /* @__PURE__ */
|
|
3002
|
-
|
|
1519
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1520
|
+
Button_default2,
|
|
3003
1521
|
{
|
|
3004
1522
|
button: "6",
|
|
3005
1523
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButton6,
|
|
3006
1524
|
onClick: handleButton6Click,
|
|
3007
1525
|
ruby: "MNO"
|
|
3008
1526
|
}
|
|
3009
|
-
), /* @__PURE__ */
|
|
3010
|
-
|
|
1527
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1528
|
+
Button_default2,
|
|
3011
1529
|
{
|
|
3012
1530
|
button: "7",
|
|
3013
1531
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButton7,
|
|
3014
1532
|
onClick: handleButton7Click,
|
|
3015
1533
|
ruby: "PQRS"
|
|
3016
1534
|
}
|
|
3017
|
-
), /* @__PURE__ */
|
|
3018
|
-
|
|
1535
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1536
|
+
Button_default2,
|
|
3019
1537
|
{
|
|
3020
1538
|
button: "8",
|
|
3021
1539
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButton8,
|
|
3022
1540
|
onClick: handleButton8Click,
|
|
3023
1541
|
ruby: "TUV"
|
|
3024
1542
|
}
|
|
3025
|
-
), /* @__PURE__ */
|
|
3026
|
-
|
|
1543
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1544
|
+
Button_default2,
|
|
3027
1545
|
{
|
|
3028
1546
|
button: "9",
|
|
3029
1547
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButton9,
|
|
3030
1548
|
onClick: handleButton9Click,
|
|
3031
1549
|
ruby: "WXYZ"
|
|
3032
1550
|
}
|
|
3033
|
-
), /* @__PURE__ */
|
|
3034
|
-
|
|
1551
|
+
), /* @__PURE__ */ import_react7.default.createElement(Button_default2, { button: "star", "data-testid": testIds_default.sendBoxTelephoneKeypadButtonStar, onClick: handleButtonStarClick }), /* @__PURE__ */ import_react7.default.createElement(Button_default2, { button: "0", "data-testid": testIds_default.sendBoxTelephoneKeypadButton0, onClick: handleButton0Click, ruby: "+" }), /* @__PURE__ */ import_react7.default.createElement(
|
|
1552
|
+
Button_default2,
|
|
3035
1553
|
{
|
|
3036
1554
|
button: "pound",
|
|
3037
1555
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButtonPound,
|
|
@@ -3040,74 +1558,38 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3040
1558
|
)));
|
|
3041
1559
|
});
|
|
3042
1560
|
TelephoneKeypad.displayName = "TelephoneKeypad";
|
|
3043
|
-
var
|
|
1561
|
+
var TelephoneKeypad_default2 = TelephoneKeypad;
|
|
3044
1562
|
|
|
3045
1563
|
// src/components/telephoneKeypad/Surrogate.tsx
|
|
3046
|
-
var TelephoneKeypadSurrogate = (0,
|
|
1564
|
+
var TelephoneKeypadSurrogate = (0, import_react8.memo)((props) => useShown()[0] ? /* @__PURE__ */ import_react8.default.createElement(TelephoneKeypad_default2, { ...props }) : false);
|
|
3047
1565
|
TelephoneKeypadSurrogate.displayName = "TelephoneKeypad.Surrogate";
|
|
3048
1566
|
var Surrogate_default = TelephoneKeypadSurrogate;
|
|
3049
1567
|
|
|
3050
1568
|
// src/components/Theme.tsx
|
|
3051
|
-
var
|
|
3052
|
-
var
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
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
|
-
}
|
|
1569
|
+
var import_react9 = __toESM(require_react());
|
|
1570
|
+
var import_classnames = __toESM(require_classnames());
|
|
1571
|
+
|
|
1572
|
+
// src/components/Theme.module.css
|
|
1573
|
+
var Theme_default = {
|
|
1574
|
+
theme: "Theme_theme"
|
|
3096
1575
|
};
|
|
1576
|
+
|
|
1577
|
+
// src/components/Theme.tsx
|
|
1578
|
+
var rootClassName = "webchat-fluent";
|
|
3097
1579
|
function WebchatTheme(props) {
|
|
3098
|
-
const classNames =
|
|
3099
|
-
return /* @__PURE__ */
|
|
1580
|
+
const classNames = useStyles_default(Theme_default);
|
|
1581
|
+
return /* @__PURE__ */ import_react9.default.createElement("div", { className: (0, import_classnames.default)(rootClassName, classNames["theme"]) }, props.children);
|
|
3100
1582
|
}
|
|
3101
1583
|
|
|
3102
1584
|
// src/components/sendbox/index.tsx
|
|
3103
|
-
var
|
|
3104
|
-
var
|
|
3105
|
-
var
|
|
1585
|
+
var import_botframework_webchat_component8 = __toESM(require_botframework_webchat_component());
|
|
1586
|
+
var import_classnames7 = __toESM(require_classnames());
|
|
1587
|
+
var import_react26 = __toESM(require_react());
|
|
3106
1588
|
|
|
3107
1589
|
// src/icons/SendIcon.tsx
|
|
3108
|
-
var
|
|
1590
|
+
var import_react10 = __toESM(require_react());
|
|
3109
1591
|
function SendIcon(props) {
|
|
3110
|
-
return /* @__PURE__ */
|
|
1592
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
|
3111
1593
|
"svg",
|
|
3112
1594
|
{
|
|
3113
1595
|
"aria-hidden": "true",
|
|
@@ -3118,7 +1600,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3118
1600
|
width: "1em",
|
|
3119
1601
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3120
1602
|
},
|
|
3121
|
-
/* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
3122
1604
|
"path",
|
|
3123
1605
|
{
|
|
3124
1606
|
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",
|
|
@@ -3129,14 +1611,14 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3129
1611
|
}
|
|
3130
1612
|
|
|
3131
1613
|
// src/components/dropZone/index.tsx
|
|
3132
|
-
var
|
|
3133
|
-
var
|
|
3134
|
-
var
|
|
1614
|
+
var import_botframework_webchat_component = __toESM(require_botframework_webchat_component());
|
|
1615
|
+
var import_classnames2 = __toESM(require_classnames());
|
|
1616
|
+
var import_react12 = __toESM(require_react());
|
|
3135
1617
|
|
|
3136
1618
|
// src/icons/AddDocumentIcon.tsx
|
|
3137
|
-
var
|
|
1619
|
+
var import_react11 = __toESM(require_react());
|
|
3138
1620
|
function AddDocumentIcon(props) {
|
|
3139
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
3140
1622
|
"svg",
|
|
3141
1623
|
{
|
|
3142
1624
|
"aria-hidden": "true",
|
|
@@ -3147,7 +1629,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3147
1629
|
width: "1em",
|
|
3148
1630
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3149
1631
|
},
|
|
3150
|
-
/* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
3151
1633
|
"path",
|
|
3152
1634
|
{
|
|
3153
1635
|
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",
|
|
@@ -3157,31 +1639,15 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3157
1639
|
);
|
|
3158
1640
|
}
|
|
3159
1641
|
|
|
3160
|
-
// src/components/dropZone/index.
|
|
3161
|
-
var
|
|
3162
|
-
|
|
3163
|
-
"
|
|
3164
|
-
|
|
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
|
-
}
|
|
1642
|
+
// src/components/dropZone/index.module.css
|
|
1643
|
+
var dropZone_default = {
|
|
1644
|
+
"sendbox__attachment-drop-zone": "dropZone_sendbox__attachment-drop-zone",
|
|
1645
|
+
"sendbox__attachment-drop-zone--droppable": "dropZone_sendbox__attachment-drop-zone--droppable",
|
|
1646
|
+
"sendbox__attachment-drop-zone-icon": "dropZone_sendbox__attachment-drop-zone-icon"
|
|
3184
1647
|
};
|
|
1648
|
+
|
|
1649
|
+
// src/components/dropZone/index.tsx
|
|
1650
|
+
var { useLocalizer } = import_botframework_webchat_component.hooks;
|
|
3185
1651
|
var handleDragOver = (event) => {
|
|
3186
1652
|
event.preventDefault();
|
|
3187
1653
|
};
|
|
@@ -3197,12 +1663,12 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3197
1663
|
return false;
|
|
3198
1664
|
}
|
|
3199
1665
|
var DropZone = (props) => {
|
|
3200
|
-
const [dropZoneState, setDropZoneState] = (0,
|
|
3201
|
-
const classNames =
|
|
3202
|
-
const dropZoneRef = (0,
|
|
1666
|
+
const [dropZoneState, setDropZoneState] = (0, import_react12.useState)(false);
|
|
1667
|
+
const classNames = useStyles_default(dropZone_default);
|
|
1668
|
+
const dropZoneRef = (0, import_react12.useRef)(null);
|
|
3203
1669
|
const localize = useLocalizer();
|
|
3204
1670
|
const onFilesAddedRef = useRefFrom(props.onFilesAdded);
|
|
3205
|
-
(0,
|
|
1671
|
+
(0, import_react12.useEffect)(() => {
|
|
3206
1672
|
let entranceCounter = 0;
|
|
3207
1673
|
const handleDragEnter = (event) => {
|
|
3208
1674
|
entranceCounter++;
|
|
@@ -3220,7 +1686,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3220
1686
|
document.removeEventListener("dragleave", handleDragLeave);
|
|
3221
1687
|
};
|
|
3222
1688
|
}, [setDropZoneState]);
|
|
3223
|
-
const handleDrop = (0,
|
|
1689
|
+
const handleDrop = (0, import_react12.useCallback)(
|
|
3224
1690
|
(event) => {
|
|
3225
1691
|
event.preventDefault();
|
|
3226
1692
|
setDropZoneState(false);
|
|
@@ -3231,59 +1697,51 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3231
1697
|
},
|
|
3232
1698
|
[onFilesAddedRef, setDropZoneState]
|
|
3233
1699
|
);
|
|
3234
|
-
return dropZoneState ? /* @__PURE__ */
|
|
1700
|
+
return dropZoneState ? /* @__PURE__ */ import_react12.default.createElement(
|
|
3235
1701
|
"div",
|
|
3236
1702
|
{
|
|
3237
|
-
className: (0,
|
|
3238
|
-
[classNames["
|
|
1703
|
+
className: (0, import_classnames2.default)(classNames["sendbox__attachment-drop-zone"], {
|
|
1704
|
+
[classNames["sendbox__attachment-drop-zone--droppable"]]: dropZoneState === "droppable"
|
|
3239
1705
|
}),
|
|
3240
1706
|
"data-testid": testIds_default.sendBoxDropZone,
|
|
3241
1707
|
onDragOver: handleDragOver,
|
|
3242
1708
|
onDrop: handleDrop,
|
|
3243
1709
|
ref: dropZoneRef
|
|
3244
1710
|
},
|
|
3245
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ import_react12.default.createElement(AddDocumentIcon, { className: classNames["sendbox__attachment-drop-zone-icon"] }),
|
|
3246
1712
|
localize("TEXT_INPUT_DROP_ZONE")
|
|
3247
1713
|
) : null;
|
|
3248
1714
|
};
|
|
3249
1715
|
DropZone.displayName = "DropZone";
|
|
3250
|
-
var
|
|
1716
|
+
var dropZone_default2 = (0, import_react12.memo)(DropZone);
|
|
3251
1717
|
|
|
3252
1718
|
// src/components/DropZone.tsx
|
|
3253
|
-
var DropZone_default =
|
|
1719
|
+
var DropZone_default = dropZone_default2;
|
|
3254
1720
|
|
|
3255
1721
|
// src/components/suggestedActions/index.tsx
|
|
1722
|
+
var import_botframework_webchat_component3 = __toESM(require_botframework_webchat_component());
|
|
1723
|
+
var import_classnames4 = __toESM(require_classnames());
|
|
1724
|
+
var import_react15 = __toESM(require_react());
|
|
1725
|
+
|
|
1726
|
+
// src/components/suggestedActions/SuggestedAction.tsx
|
|
3256
1727
|
var import_botframework_webchat_component2 = __toESM(require_botframework_webchat_component());
|
|
3257
1728
|
var import_classnames3 = __toESM(require_classnames());
|
|
3258
|
-
var
|
|
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
|
-
}
|
|
1729
|
+
var import_react14 = __toESM(require_react());
|
|
3273
1730
|
|
|
3274
|
-
// src/components/suggestedActions/SuggestedAction.
|
|
3275
|
-
var
|
|
3276
|
-
|
|
3277
|
-
|
|
1731
|
+
// src/components/suggestedActions/SuggestedAction.module.css
|
|
1732
|
+
var SuggestedAction_default = {
|
|
1733
|
+
"suggested-action": "SuggestedAction_suggested-action",
|
|
1734
|
+
"suggested-action__image": "SuggestedAction_suggested-action__image"
|
|
1735
|
+
};
|
|
3278
1736
|
|
|
3279
1737
|
// src/components/suggestedActions/AccessibleButton.tsx
|
|
3280
|
-
var
|
|
1738
|
+
var import_react13 = __toESM(require_react());
|
|
3281
1739
|
var preventDefaultHandler = (event) => event.preventDefault();
|
|
3282
|
-
var AccessibleButton = (0,
|
|
1740
|
+
var AccessibleButton = (0, import_react13.forwardRef)(
|
|
3283
1741
|
({ "aria-hidden": ariaHidden, children, disabled, onClick, tabIndex, ...props }, forwardedRef) => {
|
|
3284
|
-
const targetRef = (0,
|
|
1742
|
+
const targetRef = (0, import_react13.useRef)(null);
|
|
3285
1743
|
const ref = forwardedRef || targetRef;
|
|
3286
|
-
return /* @__PURE__ */
|
|
1744
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
3287
1745
|
"button",
|
|
3288
1746
|
{
|
|
3289
1747
|
"aria-disabled": disabled ? "true" : "false",
|
|
@@ -3302,46 +1760,10 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3302
1760
|
);
|
|
3303
1761
|
}
|
|
3304
1762
|
);
|
|
3305
|
-
var AccessibleButton_default = (0,
|
|
1763
|
+
var AccessibleButton_default = (0, import_react13.memo)(AccessibleButton);
|
|
3306
1764
|
|
|
3307
1765
|
// src/components/suggestedActions/SuggestedAction.tsx
|
|
3308
|
-
var {
|
|
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
|
-
};
|
|
1766
|
+
var { useDisabled, useFocus, usePerformCardAction, useScrollToEnd, useStyleSet, useSuggestedActions } = import_botframework_webchat_component2.hooks;
|
|
3345
1767
|
function SuggestedAction({
|
|
3346
1768
|
buttonText,
|
|
3347
1769
|
className,
|
|
@@ -3356,11 +1778,11 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3356
1778
|
const [{ suggestedAction: suggestedActionStyleSet }] = useStyleSet();
|
|
3357
1779
|
const [disabled] = useDisabled();
|
|
3358
1780
|
const focus = useFocus();
|
|
3359
|
-
const focusRef = (0,
|
|
1781
|
+
const focusRef = (0, import_react14.useRef)(null);
|
|
3360
1782
|
const performCardAction = usePerformCardAction();
|
|
3361
|
-
const classNames =
|
|
1783
|
+
const classNames = useStyles_default(SuggestedAction_default);
|
|
3362
1784
|
const scrollToEnd = useScrollToEnd();
|
|
3363
|
-
const handleClick = (0,
|
|
1785
|
+
const handleClick = (0, import_react14.useCallback)(
|
|
3364
1786
|
({ target }) => {
|
|
3365
1787
|
(async function() {
|
|
3366
1788
|
await focus("sendBoxWithoutKeyboard");
|
|
@@ -3371,57 +1793,70 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3371
1793
|
},
|
|
3372
1794
|
[displayText, focus, performCardAction, scrollToEnd, setSuggestedActions, text, type, value]
|
|
3373
1795
|
);
|
|
3374
|
-
return /* @__PURE__ */
|
|
1796
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
3375
1797
|
AccessibleButton_default,
|
|
3376
1798
|
{
|
|
3377
|
-
className: (0,
|
|
3378
|
-
classNames["webchat-fluent__suggested-action"],
|
|
3379
|
-
suggestedActionStyleSet + "",
|
|
3380
|
-
(className || "") + ""
|
|
3381
|
-
),
|
|
1799
|
+
className: (0, import_classnames3.default)(classNames["suggested-action"], suggestedActionStyleSet + "", (className || "") + ""),
|
|
3382
1800
|
disabled,
|
|
3383
1801
|
onClick: handleClick,
|
|
3384
1802
|
ref: focusRef,
|
|
3385
1803
|
type: "button"
|
|
3386
1804
|
},
|
|
3387
|
-
image && /* @__PURE__ */
|
|
3388
|
-
/* @__PURE__ */
|
|
1805
|
+
image && /* @__PURE__ */ import_react14.default.createElement("img", { alt: imageAlt, className: classNames["suggested-action__image"], src: image }),
|
|
1806
|
+
/* @__PURE__ */ import_react14.default.createElement("span", null, buttonText)
|
|
3389
1807
|
);
|
|
3390
1808
|
}
|
|
3391
|
-
var
|
|
1809
|
+
var SuggestedAction_default2 = (0, import_react14.memo)(SuggestedAction);
|
|
3392
1810
|
|
|
3393
|
-
// src/components/suggestedActions/
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
paddingBlockEnd: "8px",
|
|
3404
|
-
paddingInlineStart: "4px"
|
|
3405
|
-
}
|
|
1811
|
+
// src/components/suggestedActions/private/computeSuggestedActionText.ts
|
|
1812
|
+
function computeSuggestedActionText(cardAction) {
|
|
1813
|
+
const { title } = cardAction;
|
|
1814
|
+
const { type, value } = cardAction;
|
|
1815
|
+
if (type === "messageBack") {
|
|
1816
|
+
return title || cardAction.displayText;
|
|
1817
|
+
} else if (title) {
|
|
1818
|
+
return title;
|
|
1819
|
+
} else if (typeof value === "string") {
|
|
1820
|
+
return value;
|
|
3406
1821
|
}
|
|
1822
|
+
return JSON.stringify(value);
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
// src/components/suggestedActions/index.module.css
|
|
1826
|
+
var suggestedActions_default = {
|
|
1827
|
+
"suggested-actions": "suggestedActions_suggested-actions",
|
|
1828
|
+
"suggested-actions--flow": "suggestedActions_suggested-actions--flow",
|
|
1829
|
+
"suggested-actions--stacked": "suggestedActions_suggested-actions--stacked"
|
|
3407
1830
|
};
|
|
3408
|
-
|
|
1831
|
+
|
|
1832
|
+
// src/components/suggestedActions/index.tsx
|
|
1833
|
+
var { useLocalizer: useLocalizer2, useStyleOptions, useStyleSet: useStyleSet2, useSuggestedActions: useSuggestedActions2 } = import_botframework_webchat_component3.hooks;
|
|
1834
|
+
function SuggestedActionStackedOrFlowContainer(props) {
|
|
1835
|
+
const [{ suggestedActionLayout }] = useStyleOptions();
|
|
3409
1836
|
const [{ suggestedActions: suggestedActionsStyleSet }] = useStyleSet2();
|
|
3410
|
-
const classNames =
|
|
3411
|
-
return /* @__PURE__ */
|
|
1837
|
+
const classNames = useStyles_default(suggestedActions_default);
|
|
1838
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
3412
1839
|
"div",
|
|
3413
1840
|
{
|
|
3414
1841
|
"aria-label": props["aria-label"],
|
|
3415
1842
|
"aria-live": "polite",
|
|
3416
1843
|
"aria-orientation": "vertical",
|
|
3417
|
-
className: (0,
|
|
1844
|
+
className: (0, import_classnames4.default)(
|
|
1845
|
+
classNames["suggested-actions"],
|
|
1846
|
+
suggestedActionsStyleSet + "",
|
|
1847
|
+
{
|
|
1848
|
+
[classNames["suggested-actions--flow"]]: suggestedActionLayout === "flow",
|
|
1849
|
+
[classNames["suggested-actions--stacked"]]: suggestedActionLayout !== "flow"
|
|
1850
|
+
},
|
|
1851
|
+
props.className
|
|
1852
|
+
),
|
|
3418
1853
|
role: "toolbar"
|
|
3419
1854
|
},
|
|
3420
|
-
!!props.children && !!
|
|
1855
|
+
!!props.children && !!import_react15.default.Children.count(props.children) && props.children
|
|
3421
1856
|
);
|
|
3422
1857
|
}
|
|
3423
1858
|
function SuggestedActions() {
|
|
3424
|
-
const classNames =
|
|
1859
|
+
const classNames = useStyles_default(suggestedActions_default);
|
|
3425
1860
|
const localize = useLocalizer2();
|
|
3426
1861
|
const [suggestedActions] = useSuggestedActions2();
|
|
3427
1862
|
const children = suggestedActions.map((cardAction, index) => {
|
|
@@ -3429,8 +1864,8 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3429
1864
|
if (!suggestedActions?.length) {
|
|
3430
1865
|
return null;
|
|
3431
1866
|
}
|
|
3432
|
-
return /* @__PURE__ */
|
|
3433
|
-
|
|
1867
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
1868
|
+
SuggestedAction_default2,
|
|
3434
1869
|
{
|
|
3435
1870
|
buttonText: computeSuggestedActionText(cardAction),
|
|
3436
1871
|
displayText,
|
|
@@ -3444,28 +1879,28 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3444
1879
|
}
|
|
3445
1880
|
);
|
|
3446
1881
|
});
|
|
3447
|
-
return /* @__PURE__ */
|
|
3448
|
-
|
|
1882
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
1883
|
+
SuggestedActionStackedOrFlowContainer,
|
|
3449
1884
|
{
|
|
3450
1885
|
"aria-label": localize("SUGGESTED_ACTIONS_LABEL_ALT"),
|
|
3451
|
-
className: classNames["
|
|
1886
|
+
className: classNames["suggested-actions"]
|
|
3452
1887
|
},
|
|
3453
1888
|
children
|
|
3454
1889
|
);
|
|
3455
1890
|
}
|
|
3456
|
-
var
|
|
1891
|
+
var suggestedActions_default2 = (0, import_react15.memo)(SuggestedActions);
|
|
3457
1892
|
|
|
3458
1893
|
// src/components/SuggestedActions.tsx
|
|
3459
|
-
var SuggestedActions_default =
|
|
1894
|
+
var SuggestedActions_default = suggestedActions_default2;
|
|
3460
1895
|
|
|
3461
1896
|
// src/components/sendbox/AddAttachmentButton.tsx
|
|
3462
|
-
var
|
|
3463
|
-
var
|
|
1897
|
+
var import_botframework_webchat_component4 = __toESM(require_botframework_webchat_component());
|
|
1898
|
+
var import_react18 = __toESM(require_react());
|
|
3464
1899
|
|
|
3465
1900
|
// src/icons/AttachmentIcon.tsx
|
|
3466
|
-
var
|
|
1901
|
+
var import_react16 = __toESM(require_react());
|
|
3467
1902
|
function AttachmentIcon(props) {
|
|
3468
|
-
return /* @__PURE__ */
|
|
1903
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
3469
1904
|
"svg",
|
|
3470
1905
|
{
|
|
3471
1906
|
"aria-hidden": "true",
|
|
@@ -3476,7 +1911,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3476
1911
|
width: "1em",
|
|
3477
1912
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3478
1913
|
},
|
|
3479
|
-
/* @__PURE__ */
|
|
1914
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
3480
1915
|
"path",
|
|
3481
1916
|
{
|
|
3482
1917
|
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",
|
|
@@ -3487,63 +1922,26 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3487
1922
|
}
|
|
3488
1923
|
|
|
3489
1924
|
// src/components/sendbox/Toolbar.tsx
|
|
3490
|
-
var
|
|
3491
|
-
var
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
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
|
-
}
|
|
1925
|
+
var import_classnames5 = __toESM(require_classnames());
|
|
1926
|
+
var import_react17 = __toESM(require_react());
|
|
1927
|
+
|
|
1928
|
+
// src/components/sendbox/Toolbar.module.css
|
|
1929
|
+
var Toolbar_default = {
|
|
1930
|
+
sendbox__toolbar: "Toolbar_sendbox__toolbar",
|
|
1931
|
+
"sendbox__toolbar-button": "Toolbar_sendbox__toolbar-button",
|
|
1932
|
+
"sendbox__toolbar-separator": "Toolbar_sendbox__toolbar-separator"
|
|
3537
1933
|
};
|
|
1934
|
+
|
|
1935
|
+
// src/components/sendbox/Toolbar.tsx
|
|
3538
1936
|
var preventDefaultHandler2 = (event) => event.preventDefault();
|
|
3539
|
-
var ToolbarButton = (0,
|
|
1937
|
+
var ToolbarButton = (0, import_react17.memo)(
|
|
3540
1938
|
(props) => {
|
|
3541
|
-
const classNames =
|
|
3542
|
-
return /* @__PURE__ */
|
|
1939
|
+
const classNames = useStyles_default(Toolbar_default);
|
|
1940
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
3543
1941
|
"button",
|
|
3544
1942
|
{
|
|
3545
1943
|
"aria-label": props["aria-label"],
|
|
3546
|
-
className: (0,
|
|
1944
|
+
className: (0, import_classnames5.default)(classNames["sendbox__toolbar-button"], props.className),
|
|
3547
1945
|
"data-testid": props["data-testid"],
|
|
3548
1946
|
onClick: props.disabled ? preventDefaultHandler2 : props.onClick,
|
|
3549
1947
|
type: props.type === "submit" ? "submit" : "button",
|
|
@@ -3557,19 +1955,19 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3557
1955
|
}
|
|
3558
1956
|
);
|
|
3559
1957
|
ToolbarButton.displayName = "ToolbarButton";
|
|
3560
|
-
var Toolbar = (0,
|
|
3561
|
-
const classNames =
|
|
3562
|
-
return /* @__PURE__ */
|
|
1958
|
+
var Toolbar = (0, import_react17.memo)((props) => {
|
|
1959
|
+
const classNames = useStyles_default(Toolbar_default);
|
|
1960
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { className: (0, import_classnames5.default)(classNames["sendbox__toolbar"], props.className) }, props.children);
|
|
3563
1961
|
});
|
|
3564
1962
|
Toolbar.displayName = "Toolbar";
|
|
3565
|
-
var ToolbarSeparator = (0,
|
|
1963
|
+
var ToolbarSeparator = (0, import_react17.memo)(
|
|
3566
1964
|
(props) => {
|
|
3567
|
-
const classNames =
|
|
3568
|
-
return /* @__PURE__ */
|
|
1965
|
+
const classNames = useStyles_default(Toolbar_default);
|
|
1966
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
3569
1967
|
"div",
|
|
3570
1968
|
{
|
|
3571
1969
|
"aria-orientation": "vertical",
|
|
3572
|
-
className: (0,
|
|
1970
|
+
className: (0, import_classnames5.default)(classNames["sendbox__toolbar-separator"], props.className),
|
|
3573
1971
|
role: "separator"
|
|
3574
1972
|
}
|
|
3575
1973
|
);
|
|
@@ -3577,27 +1975,22 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3577
1975
|
);
|
|
3578
1976
|
ToolbarSeparator.displayName = "ToolbarSeparator";
|
|
3579
1977
|
|
|
3580
|
-
// src/components/sendbox/AddAttachmentButton.
|
|
3581
|
-
var
|
|
3582
|
-
|
|
3583
|
-
"
|
|
3584
|
-
display: "grid"
|
|
3585
|
-
},
|
|
3586
|
-
"webchat-fluent__sendbox__add-attachment-input": {
|
|
3587
|
-
fontSize: 0,
|
|
3588
|
-
height: 0,
|
|
3589
|
-
opacity: 0,
|
|
3590
|
-
width: 0
|
|
3591
|
-
}
|
|
1978
|
+
// src/components/sendbox/AddAttachmentButton.module.css
|
|
1979
|
+
var AddAttachmentButton_default = {
|
|
1980
|
+
"sendbox__add-attachment": "AddAttachmentButton_sendbox__add-attachment",
|
|
1981
|
+
"sendbox__add-attachment-input": "AddAttachmentButton_sendbox__add-attachment-input"
|
|
3592
1982
|
};
|
|
1983
|
+
|
|
1984
|
+
// src/components/sendbox/AddAttachmentButton.tsx
|
|
1985
|
+
var { useLocalizer: useLocalizer3, useStyleOptions: useStyleOptions2 } = import_botframework_webchat_component4.hooks;
|
|
3593
1986
|
function AddAttachmentButton(props) {
|
|
3594
|
-
const inputRef = (0,
|
|
3595
|
-
const classNames =
|
|
1987
|
+
const inputRef = (0, import_react18.useRef)(null);
|
|
1988
|
+
const classNames = useStyles_default(AddAttachmentButton_default);
|
|
3596
1989
|
const localize = useLocalizer3();
|
|
3597
|
-
const [{ uploadAccept, uploadMultiple }] =
|
|
1990
|
+
const [{ uploadAccept, uploadMultiple }] = useStyleOptions2();
|
|
3598
1991
|
const onFilesAddedRef = useRefFrom(props.onFilesAdded);
|
|
3599
|
-
const handleClick = (0,
|
|
3600
|
-
const handleFileChange = (0,
|
|
1992
|
+
const handleClick = (0, import_react18.useCallback)(() => inputRef.current?.click(), [inputRef]);
|
|
1993
|
+
const handleFileChange = (0, import_react18.useCallback)(
|
|
3601
1994
|
({ target: { files } }) => {
|
|
3602
1995
|
if (files) {
|
|
3603
1996
|
onFilesAddedRef.current?.([...files]);
|
|
@@ -3608,13 +2001,13 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3608
2001
|
},
|
|
3609
2002
|
[inputRef, onFilesAddedRef]
|
|
3610
2003
|
);
|
|
3611
|
-
return /* @__PURE__ */
|
|
2004
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: classNames["sendbox__add-attachment"] }, /* @__PURE__ */ import_react18.default.createElement(
|
|
3612
2005
|
"input",
|
|
3613
2006
|
{
|
|
3614
2007
|
accept: uploadAccept,
|
|
3615
2008
|
"aria-disabled": props.disabled,
|
|
3616
2009
|
"aria-hidden": "true",
|
|
3617
|
-
className: classNames["
|
|
2010
|
+
className: classNames["sendbox__add-attachment-input"],
|
|
3618
2011
|
multiple: uploadMultiple,
|
|
3619
2012
|
onInput: props.disabled ? void 0 : handleFileChange,
|
|
3620
2013
|
readOnly: props.disabled,
|
|
@@ -3623,31 +2016,29 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3623
2016
|
tabIndex: -1,
|
|
3624
2017
|
type: "file"
|
|
3625
2018
|
}
|
|
3626
|
-
), /* @__PURE__ */
|
|
2019
|
+
), /* @__PURE__ */ import_react18.default.createElement(
|
|
3627
2020
|
ToolbarButton,
|
|
3628
2021
|
{
|
|
3629
2022
|
"aria-label": localize("TEXT_INPUT_UPLOAD_BUTTON_ALT"),
|
|
3630
2023
|
"data-testid": testIds_default.sendBoxUploadButton,
|
|
3631
2024
|
onClick: handleClick
|
|
3632
2025
|
},
|
|
3633
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ import_react18.default.createElement(AttachmentIcon, null)
|
|
3634
2027
|
));
|
|
3635
2028
|
}
|
|
3636
|
-
var
|
|
2029
|
+
var AddAttachmentButton_default2 = (0, import_react18.memo)(AddAttachmentButton);
|
|
3637
2030
|
|
|
3638
2031
|
// src/components/sendbox/Attachments.tsx
|
|
3639
|
-
var
|
|
3640
|
-
var
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
borderRadius: "var(--webchat-borderRadiusLarge)",
|
|
3646
|
-
cursor: "default",
|
|
3647
|
-
padding: "6px 8px",
|
|
3648
|
-
width: "fit-content"
|
|
3649
|
-
}
|
|
2032
|
+
var import_botframework_webchat_component5 = __toESM(require_botframework_webchat_component());
|
|
2033
|
+
var import_react19 = __toESM(require_react());
|
|
2034
|
+
|
|
2035
|
+
// src/components/sendbox/Attachments.module.css
|
|
2036
|
+
var Attachments_default = {
|
|
2037
|
+
sendbox__attachment: "Attachments_sendbox__attachment"
|
|
3650
2038
|
};
|
|
2039
|
+
|
|
2040
|
+
// src/components/sendbox/Attachments.tsx
|
|
2041
|
+
var { useLocalizer: useLocalizer4 } = import_botframework_webchat_component5.hooks;
|
|
3651
2042
|
var attachmentsPluralStringIds = {
|
|
3652
2043
|
one: "TEXT_INPUT_ATTACHMENTS_ONE",
|
|
3653
2044
|
two: "TEXT_INPUT_ATTACHMENTS_TWO",
|
|
@@ -3658,42 +2049,38 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3658
2049
|
function Attachments({
|
|
3659
2050
|
attachments
|
|
3660
2051
|
}) {
|
|
3661
|
-
const classNames =
|
|
2052
|
+
const classNames = useStyles_default(Attachments_default);
|
|
3662
2053
|
const localizeWithPlural = useLocalizer4({ plural: true });
|
|
3663
|
-
return attachments.length ? /* @__PURE__ */
|
|
2054
|
+
return attachments.length ? /* @__PURE__ */ import_react19.default.createElement("div", { className: classNames["sendbox__attachment"] }, localizeWithPlural(attachmentsPluralStringIds, attachments.length)) : null;
|
|
3664
2055
|
}
|
|
3665
|
-
var
|
|
2056
|
+
var Attachments_default2 = (0, import_react19.memo)(Attachments);
|
|
3666
2057
|
|
|
3667
2058
|
// src/components/sendbox/ErrorMessage.tsx
|
|
3668
|
-
var
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
width: 0,
|
|
3674
|
-
position: "absolute",
|
|
3675
|
-
top: 0,
|
|
3676
|
-
left: 0,
|
|
3677
|
-
color: "transparent"
|
|
3678
|
-
}
|
|
2059
|
+
var import_react20 = __toESM(require_react());
|
|
2060
|
+
|
|
2061
|
+
// src/components/sendbox/ErrorMessage.module.css
|
|
2062
|
+
var ErrorMessage_default = {
|
|
2063
|
+
"sendbox__error-message": "ErrorMessage_sendbox__error-message"
|
|
3679
2064
|
};
|
|
2065
|
+
|
|
2066
|
+
// src/components/sendbox/ErrorMessage.tsx
|
|
3680
2067
|
function ErrorMessage(props) {
|
|
3681
|
-
const classNames =
|
|
2068
|
+
const classNames = useStyles_default(ErrorMessage_default);
|
|
3682
2069
|
return (
|
|
3683
2070
|
// eslint-disable-next-line react/forbid-dom-props
|
|
3684
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ import_react20.default.createElement("span", { className: classNames["sendbox__error-message"], id: props.id, role: "alert" }, props.error)
|
|
3685
2072
|
);
|
|
3686
2073
|
}
|
|
3687
|
-
var
|
|
2074
|
+
var ErrorMessage_default2 = (0, import_react20.memo)(ErrorMessage);
|
|
3688
2075
|
|
|
3689
2076
|
// src/components/sendbox/TelephoneKeypadToolbarButton.tsx
|
|
3690
|
-
var
|
|
3691
|
-
var
|
|
2077
|
+
var import_react22 = __toESM(require_react());
|
|
2078
|
+
var import_botframework_webchat_component6 = __toESM(require_botframework_webchat_component());
|
|
3692
2079
|
|
|
3693
2080
|
// src/icons/TelephoneKeypad.tsx
|
|
3694
|
-
var
|
|
2081
|
+
var import_react21 = __toESM(require_react());
|
|
3695
2082
|
function TelephoneKeypadIcon(props) {
|
|
3696
|
-
return /* @__PURE__ */
|
|
2083
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
3697
2084
|
"svg",
|
|
3698
2085
|
{
|
|
3699
2086
|
"aria-hidden": "true",
|
|
@@ -3704,7 +2091,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3704
2091
|
width: "1em",
|
|
3705
2092
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3706
2093
|
},
|
|
3707
|
-
/* @__PURE__ */
|
|
2094
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
3708
2095
|
"path",
|
|
3709
2096
|
{
|
|
3710
2097
|
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",
|
|
@@ -3715,81 +2102,42 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3715
2102
|
}
|
|
3716
2103
|
|
|
3717
2104
|
// src/components/sendbox/TelephoneKeypadToolbarButton.tsx
|
|
3718
|
-
var { useLocalizer: useLocalizer5 } =
|
|
3719
|
-
var TelephoneKeypadToolbarButton = (0,
|
|
2105
|
+
var { useLocalizer: useLocalizer5 } = import_botframework_webchat_component6.hooks;
|
|
2106
|
+
var TelephoneKeypadToolbarButton = (0, import_react22.memo)(() => {
|
|
3720
2107
|
const [, setTelephoneKeypadShown] = useShown();
|
|
3721
2108
|
const localize = useLocalizer5();
|
|
3722
|
-
const handleClick = (0,
|
|
3723
|
-
return /* @__PURE__ */
|
|
2109
|
+
const handleClick = (0, import_react22.useCallback)(() => setTelephoneKeypadShown((shown) => !shown), [setTelephoneKeypadShown]);
|
|
2110
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
3724
2111
|
ToolbarButton,
|
|
3725
2112
|
{
|
|
3726
2113
|
"aria-label": localize("TEXT_INPUT_TELEPHONE_KEYPAD_BUTTON_ALT"),
|
|
3727
2114
|
"data-testid": testIds_default.sendBoxTelephoneKeypadToolbarButton,
|
|
3728
2115
|
onClick: handleClick
|
|
3729
2116
|
},
|
|
3730
|
-
/* @__PURE__ */
|
|
2117
|
+
/* @__PURE__ */ import_react22.default.createElement(TelephoneKeypadIcon, null)
|
|
3731
2118
|
);
|
|
3732
2119
|
});
|
|
3733
2120
|
TelephoneKeypadToolbarButton.displayName = "SendBox.TelephoneKeypadToolbarButton";
|
|
3734
2121
|
var TelephoneKeypadToolbarButton_default = TelephoneKeypadToolbarButton;
|
|
3735
2122
|
|
|
3736
2123
|
// src/components/sendbox/TextArea.tsx
|
|
3737
|
-
var
|
|
3738
|
-
var
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
"
|
|
3747
|
-
|
|
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
|
-
}
|
|
2124
|
+
var import_classnames6 = __toESM(require_classnames());
|
|
2125
|
+
var import_react23 = __toESM(require_react());
|
|
2126
|
+
|
|
2127
|
+
// src/components/sendbox/TextArea.module.css
|
|
2128
|
+
var TextArea_default = {
|
|
2129
|
+
"sendbox__text-area": "TextArea_sendbox__text-area",
|
|
2130
|
+
"sendbox__text-area--hidden": "TextArea_sendbox__text-area--hidden",
|
|
2131
|
+
"sendbox__text-area-shared": "TextArea_sendbox__text-area-shared",
|
|
2132
|
+
"sendbox__text-area-doppelganger": "TextArea_sendbox__text-area-doppelganger",
|
|
2133
|
+
"sendbox__text-area-input": "TextArea_sendbox__text-area-input",
|
|
2134
|
+
"sendbox__text-area-input--scroll": "TextArea_sendbox__text-area-input--scroll"
|
|
3789
2135
|
};
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
2136
|
+
|
|
2137
|
+
// src/components/sendbox/TextArea.tsx
|
|
2138
|
+
var TextArea = (0, import_react23.forwardRef)((props, ref) => {
|
|
2139
|
+
const classNames = useStyles_default(TextArea_default);
|
|
2140
|
+
const handleKeyDown = (0, import_react23.useCallback)((event) => {
|
|
3793
2141
|
if (!event.shiftKey && event.key === "Enter") {
|
|
3794
2142
|
event.preventDefault();
|
|
3795
2143
|
if ("form" in event.target && event.target.form instanceof HTMLFormElement) {
|
|
@@ -3797,38 +2145,38 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3797
2145
|
}
|
|
3798
2146
|
}
|
|
3799
2147
|
}, []);
|
|
3800
|
-
return /* @__PURE__ */
|
|
2148
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
3801
2149
|
"div",
|
|
3802
2150
|
{
|
|
3803
|
-
className: (0,
|
|
3804
|
-
classNames["
|
|
2151
|
+
className: (0, import_classnames6.default)(
|
|
2152
|
+
classNames["sendbox__text-area"],
|
|
3805
2153
|
{
|
|
3806
|
-
[classNames["
|
|
2154
|
+
[classNames["sendbox__text-area--hidden"]]: props.hidden
|
|
3807
2155
|
},
|
|
3808
2156
|
props.className
|
|
3809
2157
|
),
|
|
3810
2158
|
role: props.hidden ? "hidden" : void 0
|
|
3811
2159
|
},
|
|
3812
|
-
/* @__PURE__ */
|
|
2160
|
+
/* @__PURE__ */ import_react23.default.createElement(
|
|
3813
2161
|
"div",
|
|
3814
2162
|
{
|
|
3815
|
-
className: (0,
|
|
3816
|
-
classNames["
|
|
3817
|
-
classNames["
|
|
3818
|
-
classNames["
|
|
2163
|
+
className: (0, import_classnames6.default)(
|
|
2164
|
+
classNames["sendbox__text-area-doppelganger"],
|
|
2165
|
+
classNames["sendbox__text-area-shared"],
|
|
2166
|
+
classNames["sendbox__text-area-input--scroll"]
|
|
3819
2167
|
)
|
|
3820
2168
|
},
|
|
3821
2169
|
props.value || props.placeholder,
|
|
3822
2170
|
" "
|
|
3823
2171
|
),
|
|
3824
|
-
/* @__PURE__ */
|
|
2172
|
+
/* @__PURE__ */ import_react23.default.createElement(
|
|
3825
2173
|
"textarea",
|
|
3826
2174
|
{
|
|
3827
2175
|
"aria-label": props["aria-label"],
|
|
3828
|
-
className: (0,
|
|
3829
|
-
classNames["
|
|
3830
|
-
classNames["
|
|
3831
|
-
classNames["
|
|
2176
|
+
className: (0, import_classnames6.default)(
|
|
2177
|
+
classNames["sendbox__text-area-input"],
|
|
2178
|
+
classNames["sendbox__text-area-shared"],
|
|
2179
|
+
classNames["sendbox__text-area-input--scroll"]
|
|
3832
2180
|
),
|
|
3833
2181
|
"data-testid": props["data-testid"],
|
|
3834
2182
|
onInput: props.onInput,
|
|
@@ -3843,12 +2191,12 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3843
2191
|
);
|
|
3844
2192
|
});
|
|
3845
2193
|
TextArea.displayName = "TextArea";
|
|
3846
|
-
var
|
|
2194
|
+
var TextArea_default2 = TextArea;
|
|
3847
2195
|
|
|
3848
2196
|
// src/components/sendbox/private/useSubmitError.ts
|
|
3849
|
-
var
|
|
3850
|
-
var
|
|
3851
|
-
var { useConnectivityStatus, useLocalizer: useLocalizer6 } =
|
|
2197
|
+
var import_botframework_webchat_component7 = __toESM(require_botframework_webchat_component());
|
|
2198
|
+
var import_react24 = __toESM(require_react());
|
|
2199
|
+
var { useConnectivityStatus, useLocalizer: useLocalizer6 } = import_botframework_webchat_component7.hooks;
|
|
3852
2200
|
var useSubmitError = ({
|
|
3853
2201
|
attachments,
|
|
3854
2202
|
message
|
|
@@ -3858,13 +2206,13 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3858
2206
|
const submitErrorRef = useRefFrom(
|
|
3859
2207
|
connectivityStatus !== "connected" && connectivityStatus !== "reconnected" ? "offline" : !message && !attachments.length ? "empty" : void 0
|
|
3860
2208
|
);
|
|
3861
|
-
const errorMessageStringMap = (0,
|
|
2209
|
+
const errorMessageStringMap = (0, import_react24.useMemo)(
|
|
3862
2210
|
() => Object.freeze(
|
|
3863
2211
|
(/* @__PURE__ */ new Map()).set("empty", localize("SEND_BOX_IS_EMPTY_TOOLTIP_ALT")).set("offline", localize("CONNECTIVITY_STATUS_ALT_FATAL"))
|
|
3864
2212
|
),
|
|
3865
2213
|
[localize]
|
|
3866
2214
|
);
|
|
3867
|
-
return (0,
|
|
2215
|
+
return (0, import_react24.useMemo)(
|
|
3868
2216
|
() => Object.freeze([submitErrorRef, submitErrorRef.current && errorMessageStringMap.get(submitErrorRef.current)]),
|
|
3869
2217
|
[errorMessageStringMap, submitErrorRef]
|
|
3870
2218
|
);
|
|
@@ -3872,85 +2220,41 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3872
2220
|
var useSubmitError_default = useSubmitError;
|
|
3873
2221
|
|
|
3874
2222
|
// src/components/sendbox/private/useUniqueId.ts
|
|
3875
|
-
var
|
|
3876
|
-
function useUniqueId(
|
|
3877
|
-
const id = (0,
|
|
3878
|
-
|
|
3879
|
-
return `${
|
|
3880
|
-
}
|
|
2223
|
+
var import_react25 = __toESM(require_react());
|
|
2224
|
+
function useUniqueId(prefix) {
|
|
2225
|
+
const id = (0, import_react25.useMemo)(() => Math.random().toString(36).substr(2, 5), []);
|
|
2226
|
+
prefix = prefix ? `${prefix}--` : "";
|
|
2227
|
+
return `${prefix}${id}`;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
// src/components/sendbox/index.module.css
|
|
2231
|
+
var sendbox_default = {
|
|
2232
|
+
sendbox: "sendbox_sendbox",
|
|
2233
|
+
sendbox__sendbox: "sendbox_sendbox__sendbox",
|
|
2234
|
+
"sendbox__sendbox-text": "sendbox_sendbox__sendbox-text",
|
|
2235
|
+
"sendbox__sendbox-controls": "sendbox_sendbox__sendbox-controls",
|
|
2236
|
+
"sendbox__text-counter": "sendbox_sendbox__text-counter",
|
|
2237
|
+
"sendbox__text-counter--error": "sendbox_sendbox__text-counter--error"
|
|
2238
|
+
};
|
|
3881
2239
|
|
|
3882
2240
|
// src/components/sendbox/index.tsx
|
|
3883
|
-
var { useStyleOptions:
|
|
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
|
-
};
|
|
2241
|
+
var { useStyleOptions: useStyleOptions3, useMakeThumbnail, useLocalizer: useLocalizer7, useSendBoxAttachments, useSendMessage } = import_botframework_webchat_component8.hooks;
|
|
3938
2242
|
function SendBox(props) {
|
|
3939
|
-
const inputRef = (0,
|
|
3940
|
-
const [message, setMessage] = (0,
|
|
2243
|
+
const inputRef = (0, import_react26.useRef)(null);
|
|
2244
|
+
const [message, setMessage] = (0, import_react26.useState)("");
|
|
3941
2245
|
const [attachments, setAttachments] = useSendBoxAttachments();
|
|
3942
|
-
const [{ maxMessageLength }] =
|
|
2246
|
+
const [{ hideTelephoneKeypadButton, hideUploadButton, maxMessageLength }] = useStyleOptions3();
|
|
3943
2247
|
const isMessageLengthExceeded = !!maxMessageLength && message.length > maxMessageLength;
|
|
3944
|
-
const classNames =
|
|
2248
|
+
const classNames = useStyles_default(sendbox_default);
|
|
3945
2249
|
const localize = useLocalizer7();
|
|
3946
2250
|
const sendMessage = useSendMessage();
|
|
3947
2251
|
const makeThumbnail = useMakeThumbnail();
|
|
3948
|
-
const errorMessageId = useUniqueId("
|
|
2252
|
+
const errorMessageId = useUniqueId("sendbox__error-message-id");
|
|
3949
2253
|
const [errorRef, errorMessage] = useSubmitError_default({ message, attachments });
|
|
3950
|
-
const [telephoneKeypadShown
|
|
2254
|
+
const [telephoneKeypadShown] = useShown();
|
|
3951
2255
|
const attachmentsRef = useRefFrom(attachments);
|
|
3952
2256
|
const messageRef = useRefFrom(message);
|
|
3953
|
-
const handleSendBoxClick = (0,
|
|
2257
|
+
const handleSendBoxClick = (0, import_react26.useCallback)(
|
|
3954
2258
|
(event) => {
|
|
3955
2259
|
if ("tabIndex" in event.target && typeof event.target.tabIndex === "number" && event.target.tabIndex >= 0) {
|
|
3956
2260
|
return;
|
|
@@ -3959,11 +2263,11 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3959
2263
|
},
|
|
3960
2264
|
[inputRef]
|
|
3961
2265
|
);
|
|
3962
|
-
const handleMessageChange = (0,
|
|
2266
|
+
const handleMessageChange = (0, import_react26.useCallback)(
|
|
3963
2267
|
(event) => setMessage(event.currentTarget.value),
|
|
3964
2268
|
[setMessage]
|
|
3965
2269
|
);
|
|
3966
|
-
const handleAddFiles = (0,
|
|
2270
|
+
const handleAddFiles = (0, import_react26.useCallback)(
|
|
3967
2271
|
async (inputFiles) => {
|
|
3968
2272
|
const newAttachments = Object.freeze(
|
|
3969
2273
|
await Promise.all(
|
|
@@ -3981,7 +2285,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3981
2285
|
},
|
|
3982
2286
|
[makeThumbnail, setAttachments]
|
|
3983
2287
|
);
|
|
3984
|
-
const handleFormSubmit = (0,
|
|
2288
|
+
const handleFormSubmit = (0, import_react26.useCallback)(
|
|
3985
2289
|
(event) => {
|
|
3986
2290
|
event.preventDefault();
|
|
3987
2291
|
if (errorRef.current !== "empty" && !isMessageLengthExceeded) {
|
|
@@ -3993,12 +2297,10 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
3993
2297
|
},
|
|
3994
2298
|
[attachmentsRef, messageRef, sendMessage, setAttachments, setMessage, isMessageLengthExceeded, errorRef, inputRef]
|
|
3995
2299
|
);
|
|
3996
|
-
const handleTelephoneKeypadButtonClick = (0,
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
},
|
|
4001
|
-
[sendMessage, setTelephoneKeypadShown]
|
|
2300
|
+
const handleTelephoneKeypadButtonClick = (0, import_react26.useCallback)(
|
|
2301
|
+
// TODO: We need more official way of sending DTMF.
|
|
2302
|
+
(dtmf) => sendMessage(`/DTMF ${dtmf}`),
|
|
2303
|
+
[sendMessage]
|
|
4002
2304
|
);
|
|
4003
2305
|
const aria = {
|
|
4004
2306
|
"aria-invalid": "false",
|
|
@@ -4007,18 +2309,18 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
4007
2309
|
"aria-errormessage": errorMessageId
|
|
4008
2310
|
}
|
|
4009
2311
|
};
|
|
4010
|
-
return /* @__PURE__ */
|
|
2312
|
+
return /* @__PURE__ */ import_react26.default.createElement("form", { ...aria, className: (0, import_classnames7.default)(classNames["sendbox"], props.className), onSubmit: handleFormSubmit }, /* @__PURE__ */ import_react26.default.createElement(SuggestedActions_default, null), /* @__PURE__ */ import_react26.default.createElement("div", { className: (0, import_classnames7.default)(classNames["sendbox__sendbox"]), onClickCapture: handleSendBoxClick }, /* @__PURE__ */ import_react26.default.createElement(
|
|
4011
2313
|
Surrogate_default,
|
|
4012
2314
|
{
|
|
4013
2315
|
autoFocus: true,
|
|
4014
2316
|
isHorizontal: false,
|
|
4015
2317
|
onButtonClick: handleTelephoneKeypadButtonClick
|
|
4016
2318
|
}
|
|
4017
|
-
), /* @__PURE__ */
|
|
4018
|
-
|
|
2319
|
+
), /* @__PURE__ */ import_react26.default.createElement(
|
|
2320
|
+
TextArea_default2,
|
|
4019
2321
|
{
|
|
4020
2322
|
"aria-label": isMessageLengthExceeded ? localize("TEXT_INPUT_LENGTH_EXCEEDED_ALT") : localize("TEXT_INPUT_ALT"),
|
|
4021
|
-
className: classNames["
|
|
2323
|
+
className: classNames["sendbox__sendbox-text"],
|
|
4022
2324
|
"data-testid": testIds_default.sendBoxTextBox,
|
|
4023
2325
|
hidden: telephoneKeypadShown,
|
|
4024
2326
|
onInput: handleMessageChange,
|
|
@@ -4026,15 +2328,15 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
4026
2328
|
ref: inputRef,
|
|
4027
2329
|
value: message
|
|
4028
2330
|
}
|
|
4029
|
-
), /* @__PURE__ */
|
|
2331
|
+
), /* @__PURE__ */ import_react26.default.createElement(Attachments_default2, { attachments }), /* @__PURE__ */ import_react26.default.createElement("div", { className: (0, import_classnames7.default)(classNames["sendbox__sendbox-controls"]) }, maxMessageLength && /* @__PURE__ */ import_react26.default.createElement(
|
|
4030
2332
|
"div",
|
|
4031
2333
|
{
|
|
4032
|
-
className: (0,
|
|
4033
|
-
[classNames["
|
|
2334
|
+
className: (0, import_classnames7.default)(classNames["sendbox__text-counter"], {
|
|
2335
|
+
[classNames["sendbox__text-counter--error"]]: isMessageLengthExceeded
|
|
4034
2336
|
})
|
|
4035
2337
|
},
|
|
4036
2338
|
`${message.length}/${maxMessageLength}`
|
|
4037
|
-
), /* @__PURE__ */
|
|
2339
|
+
), /* @__PURE__ */ import_react26.default.createElement(Toolbar, null, !hideTelephoneKeypadButton && /* @__PURE__ */ import_react26.default.createElement(TelephoneKeypadToolbarButton_default, null), !hideUploadButton && /* @__PURE__ */ import_react26.default.createElement(AddAttachmentButton_default2, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react26.default.createElement(ToolbarSeparator, null), /* @__PURE__ */ import_react26.default.createElement(
|
|
4038
2340
|
ToolbarButton,
|
|
4039
2341
|
{
|
|
4040
2342
|
"aria-label": localize("TEXT_INPUT_SEND_BUTTON_ALT"),
|
|
@@ -4042,22 +2344,23 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
4042
2344
|
disabled: isMessageLengthExceeded,
|
|
4043
2345
|
type: "submit"
|
|
4044
2346
|
},
|
|
4045
|
-
/* @__PURE__ */
|
|
4046
|
-
))), /* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ import_react26.default.createElement(SendIcon, null)
|
|
2348
|
+
))), /* @__PURE__ */ import_react26.default.createElement(DropZone_default, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react26.default.createElement(ErrorMessage_default2, { error: errorMessage, id: errorMessageId })));
|
|
4047
2349
|
}
|
|
4048
|
-
var
|
|
2350
|
+
var sendbox_default2 = (0, import_react26.memo)(SendBox);
|
|
4049
2351
|
|
|
4050
2352
|
// src/components/SendBox.tsx
|
|
4051
|
-
var SendBox_default =
|
|
2353
|
+
var SendBox_default = sendbox_default2;
|
|
4052
2354
|
|
|
4053
2355
|
// src/private/FluentThemeProvider.tsx
|
|
4054
|
-
var { ThemeProvider } =
|
|
2356
|
+
var { ThemeProvider } = import_botframework_webchat_component9.Components;
|
|
4055
2357
|
var sendBoxMiddleware = [() => () => () => SendBox_default];
|
|
4056
|
-
var FluentThemeProvider = ({ children }) => /* @__PURE__ */
|
|
4057
|
-
var FluentThemeProvider_default = (0,
|
|
2358
|
+
var FluentThemeProvider = ({ children }) => /* @__PURE__ */ import_react27.default.createElement(WebchatTheme, null, /* @__PURE__ */ import_react27.default.createElement(Provider_default, null, /* @__PURE__ */ import_react27.default.createElement(ThemeProvider, { sendBoxMiddleware }, children)));
|
|
2359
|
+
var FluentThemeProvider_default = (0, import_react27.memo)(FluentThemeProvider);
|
|
4058
2360
|
|
|
4059
2361
|
// src/index.ts
|
|
4060
|
-
injectMeta("botframework-webchat-fluent-theme:version", "4.17.0-main.
|
|
2362
|
+
injectMeta("botframework-webchat-fluent-theme:version", "4.17.0-main.20240416.4ff01ae");
|
|
2363
|
+
injectStyles();
|
|
4061
2364
|
|
|
4062
2365
|
// src/bundle.ts
|
|
4063
2366
|
globalThis.WebChat = {
|