@simai-studio/chat 1.0.0 → 1.1.0
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/README.md +7 -5
- package/dist/package-receipt.json +438 -436
- package/dist/set.json +4 -2
- package/dist/smart/chat-composer/aliases.json +11 -0
- package/dist/smart/chat-composer/aliases.json.gz +0 -0
- package/dist/smart/chat-composer/component.json +44 -4
- package/dist/smart/chat-composer/component.json.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.css +8 -103
- package/dist/smart/chat-composer/css/chat-composer.css.gz +0 -0
- package/dist/smart/chat-composer/css/chat-composer.min.css +2 -2
- package/dist/smart/chat-composer/css/chat-composer.min.css.gz +0 -0
- package/dist/smart/chat-composer/examples.json +27 -8
- package/dist/smart/chat-composer/examples.json.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.js +65 -60
- package/dist/smart/chat-composer/js/chat-composer.js.gz +0 -0
- package/dist/smart/chat-composer/js/chat-composer.min.js +17 -19
- package/dist/smart/chat-composer/js/chat-composer.min.js.gz +0 -0
- package/dist/smart/chat-composer/lang/en.json +1 -4
- package/dist/smart/chat-composer/lang/en.json.gz +0 -0
- package/dist/smart/chat-composer/lang/ru.json +1 -4
- package/dist/smart/chat-composer/lang/ru.json.gz +0 -0
- package/dist/smart/chat-composer/probe.json +21 -5
- package/dist/smart/chat-composer/probe.json.gz +0 -0
- package/dist/smart/chat-composer/smart.manifest.json +41 -15
- package/dist/smart/chat-composer/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-composer/static/default/busy.html +2 -2
- package/dist/smart/chat-composer/static/default/busy.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/disabled.html +1 -1
- package/dist/smart/chat-composer/static/default/disabled.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/files.html +82 -27
- package/dist/smart/chat-composer/static/default/files.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/near-limit.html +2 -2
- package/dist/smart/chat-composer/static/default/near-limit.html.gz +0 -0
- package/dist/smart/chat-composer/static/default/reference.html +2 -2
- package/dist/smart/chat-composer/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-composer/static/sheets.json +24 -2
- package/dist/smart/chat-composer/static/sheets.json.gz +0 -0
- package/dist/smart/chat-composer/template/default.css +7 -82
- package/dist/smart/chat-composer/template/default.css.gz +0 -0
- package/dist/smart/chat-composer/template/default.js +1 -1
- package/dist/smart/chat-composer/template/default.js.gz +0 -0
- package/dist/smart/chat-composer/template/parts.js +40 -33
- package/dist/smart/chat-composer/template/parts.js.gz +0 -0
- package/dist/smart/chat-interlocutor/component.json +3 -2
- package/dist/smart/chat-interlocutor/component.json.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css +1 -36
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.css.gz +0 -0
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css +2 -2
- package/dist/smart/chat-interlocutor/css/chat-interlocutor.min.css.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js +1 -1
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.js.gz +0 -0
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js +1 -1
- package/dist/smart/chat-interlocutor/js/chat-interlocutor.min.js.gz +0 -0
- package/dist/smart/chat-interlocutor/smart.manifest.json +4 -4
- package/dist/smart/chat-interlocutor/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/former.html +1 -1
- package/dist/smart/chat-interlocutor/static/default/former.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/grouped.html +1 -1
- package/dist/smart/chat-interlocutor/static/default/grouped.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/reference.html +1 -1
- package/dist/smart/chat-interlocutor/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/default/single.html +1 -1
- package/dist/smart/chat-interlocutor/static/default/single.html.gz +0 -0
- package/dist/smart/chat-interlocutor/static/sheets.json +10 -5
- package/dist/smart/chat-interlocutor/static/sheets.json.gz +0 -0
- package/dist/smart/chat-interlocutor/template/default.css +1 -1
- package/dist/smart/chat-interlocutor/template/default.css.gz +0 -0
- package/dist/smart/chat-message/aliases.json +11 -0
- package/dist/smart/chat-message/aliases.json.gz +0 -0
- package/dist/smart/chat-message/component.json +30 -2
- package/dist/smart/chat-message/component.json.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.css +91 -1122
- package/dist/smart/chat-message/css/chat-message.css.gz +0 -0
- package/dist/smart/chat-message/css/chat-message.min.css +2 -2
- package/dist/smart/chat-message/css/chat-message.min.css.gz +0 -0
- package/dist/smart/chat-message/examples.json +32 -10
- package/dist/smart/chat-message/examples.json.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.js +511 -150
- package/dist/smart/chat-message/js/chat-message.js.gz +0 -0
- package/dist/smart/chat-message/js/chat-message.min.js +15 -25
- package/dist/smart/chat-message/js/chat-message.min.js.gz +0 -0
- package/dist/smart/chat-message/lang/en.json +1 -6
- package/dist/smart/chat-message/lang/en.json.gz +0 -0
- package/dist/smart/chat-message/lang/ru.json +1 -6
- package/dist/smart/chat-message/lang/ru.json.gz +0 -0
- package/dist/smart/chat-message/probe.json +31 -9
- package/dist/smart/chat-message/probe.json.gz +0 -0
- package/dist/smart/chat-message/smart.manifest.json +23 -13
- package/dist/smart/chat-message/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-card.html +1 -1
- package/dist/smart/chat-message/static/default/brief-card.html.gz +0 -0
- package/dist/smart/chat-message/static/default/brief-questions.html +1 -1
- package/dist/smart/chat-message/static/default/brief-questions.html.gz +0 -0
- package/dist/smart/chat-message/static/default/deliverables.html +1 -1
- package/dist/smart/chat-message/static/default/deliverables.html.gz +0 -0
- package/dist/smart/chat-message/static/default/document.html +2 -2
- package/dist/smart/chat-message/static/default/document.html.gz +0 -0
- package/dist/smart/chat-message/static/default/failed.html +1 -1
- package/dist/smart/chat-message/static/default/failed.html.gz +0 -0
- package/dist/smart/chat-message/static/default/feedback-reason.html +1 -1
- package/dist/smart/chat-message/static/default/feedback-reason.html.gz +0 -0
- package/dist/smart/chat-message/static/default/limit.html +1 -1
- package/dist/smart/chat-message/static/default/limit.html.gz +0 -0
- package/dist/smart/chat-message/static/default/proposal.html +17 -19
- package/dist/smart/chat-message/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-message/static/default/question.html +15 -11
- package/dist/smart/chat-message/static/default/question.html.gz +0 -0
- package/dist/smart/chat-message/static/default/reference.html +1 -1
- package/dist/smart/chat-message/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-message/static/default/steps.html +1 -1
- package/dist/smart/chat-message/static/default/steps.html.gz +0 -0
- package/dist/smart/chat-message/static/default/stopped.html +1 -1
- package/dist/smart/chat-message/static/default/stopped.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-own.html +1 -1
- package/dist/smart/chat-message/static/person/person-own.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person-reply.html +1 -5
- package/dist/smart/chat-message/static/person/person-reply.html.gz +0 -0
- package/dist/smart/chat-message/static/person/person.html +8 -10
- package/dist/smart/chat-message/static/person/person.html.gz +0 -0
- package/dist/smart/chat-message/static/sheets.json +66 -12
- package/dist/smart/chat-message/static/sheets.json.gz +0 -0
- package/dist/smart/chat-message/template/default.css +9 -99
- package/dist/smart/chat-message/template/default.css.gz +0 -0
- package/dist/smart/chat-threads/component.json +10 -2
- package/dist/smart/chat-threads/component.json.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.css +1 -17
- package/dist/smart/chat-threads/css/chat-threads.css.gz +0 -0
- package/dist/smart/chat-threads/css/chat-threads.min.css +2 -2
- package/dist/smart/chat-threads/css/chat-threads.min.css.gz +0 -0
- package/dist/smart/chat-threads/examples.json +3 -3
- package/dist/smart/chat-threads/examples.json.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.js +1 -1
- package/dist/smart/chat-threads/js/chat-threads.js.gz +0 -0
- package/dist/smart/chat-threads/js/chat-threads.min.js +1 -1
- package/dist/smart/chat-threads/js/chat-threads.min.js.gz +0 -0
- package/dist/smart/chat-threads/probe.json +3 -3
- package/dist/smart/chat-threads/probe.json.gz +0 -0
- package/dist/smart/chat-threads/smart.manifest.json +11 -4
- package/dist/smart/chat-threads/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.html +27 -21
- package/dist/smart/chat-threads/static/default/activity.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/activity.skeleton.html +27 -21
- package/dist/smart/chat-threads/static/default/activity.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.html +9 -6
- package/dist/smart/chat-threads/static/default/archive.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/archive.skeleton.html +9 -6
- package/dist/smart/chat-threads/static/default/archive.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.html +25 -13
- package/dist/smart/chat-threads/static/default/avatars.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html +25 -13
- package/dist/smart/chat-threads/static/default/avatars.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/empty.html +11 -9
- package/dist/smart/chat-threads/static/default/empty.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/loading.html +11 -9
- package/dist/smart/chat-threads/static/default/loading.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.html +20 -11
- package/dist/smart/chat-threads/static/default/people.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/people.skeleton.html +20 -11
- package/dist/smart/chat-threads/static/default/people.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.html +22 -13
- package/dist/smart/chat-threads/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/reference.skeleton.html +22 -13
- package/dist/smart/chat-threads/static/default/reference.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.html +18 -13
- package/dist/smart/chat-threads/static/default/ungrouped.html.gz +0 -0
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html +18 -13
- package/dist/smart/chat-threads/static/default/ungrouped.skeleton.html.gz +0 -0
- package/dist/smart/chat-threads/static/sheets.json +81 -0
- package/dist/smart/chat-threads/static/sheets.json.gz +0 -0
- package/dist/smart/chat-threads/template/default.css +1 -1
- package/dist/smart/chat-threads/template/default.css.gz +0 -0
- package/dist/smart/chat-window/component.json +12 -2
- package/dist/smart/chat-window/component.json.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.css +1 -209
- package/dist/smart/chat-window/css/chat-window.css.gz +0 -0
- package/dist/smart/chat-window/css/chat-window.min.css +2 -2
- package/dist/smart/chat-window/css/chat-window.min.css.gz +0 -0
- package/dist/smart/chat-window/examples.json +3 -3
- package/dist/smart/chat-window/examples.json.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.js +520 -122
- package/dist/smart/chat-window/js/chat-window.js.gz +0 -0
- package/dist/smart/chat-window/js/chat-window.min.js +1 -1
- package/dist/smart/chat-window/js/chat-window.min.js.gz +0 -0
- package/dist/smart/chat-window/probe.json +3 -3
- package/dist/smart/chat-window/probe.json.gz +0 -0
- package/dist/smart/chat-window/smart.manifest.json +15 -6
- package/dist/smart/chat-window/smart.manifest.json.gz +0 -0
- package/dist/smart/chat-window/static/default/archived.html +15 -12
- package/dist/smart/chat-window/static/default/archived.html.gz +0 -0
- package/dist/smart/chat-window/static/default/embedded.html +19 -13
- package/dist/smart/chat-window/static/default/embedded.html.gz +0 -0
- package/dist/smart/chat-window/static/default/greeting.html +19 -13
- package/dist/smart/chat-window/static/default/greeting.html.gz +0 -0
- package/dist/smart/chat-window/static/default/people.html +21 -27
- package/dist/smart/chat-window/static/default/people.html.gz +0 -0
- package/dist/smart/chat-window/static/default/proposal.html +36 -32
- package/dist/smart/chat-window/static/default/proposal.html.gz +0 -0
- package/dist/smart/chat-window/static/default/reference.html +20 -14
- package/dist/smart/chat-window/static/default/reference.html.gz +0 -0
- package/dist/smart/chat-window/static/default/waiting.html +19 -13
- package/dist/smart/chat-window/static/default/waiting.html.gz +0 -0
- package/dist/smart/chat-window/static/sheets.json +50 -0
- package/dist/smart/chat-window/static/sheets.json.gz +0 -0
- package/dist/smart/chat-window/template/default.css +1 -1
- package/dist/smart/chat-window/template/default.css.gz +0 -0
- package/dist/smart/rule.js +8 -0
- package/dist/smart/rule.js.gz +0 -0
- package/package.json +1 -1
|
@@ -85,7 +85,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
85
85
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
86
86
|
/* harmony export */ calendarDayOffset: () => (/* binding */ calendarDayOffset),
|
|
87
87
|
/* harmony export */ formatDate: () => (/* binding */ formatDate),
|
|
88
|
+
/* harmony export */ knownTimeZone: () => (/* binding */ knownTimeZone),
|
|
88
89
|
/* harmony export */ msUntilNextDay: () => (/* binding */ msUntilNextDay),
|
|
90
|
+
/* harmony export */ timeZoneOffset: () => (/* binding */ timeZoneOffset),
|
|
89
91
|
/* harmony export */ toDate: () => (/* reexport safe */ _format_intl_js__WEBPACK_IMPORTED_MODULE_0__.toDate)
|
|
90
92
|
/* harmony export */ });
|
|
91
93
|
/* harmony import */ var _format_intl_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("15b4e93ff6ed");
|
|
@@ -114,8 +116,12 @@ function hasDateStyle(style) {
|
|
|
114
116
|
*
|
|
115
117
|
* `date` and `time` are Intl styles (short, medium, long, full); `intl` gives
|
|
116
118
|
* Intl.DateTimeFormat options outright, for a form the styles do not name (a
|
|
117
|
-
* chart's tick, «14:05» with two-digit hours).
|
|
118
|
-
*
|
|
119
|
+
* chart's tick, «14:05» with two-digit hours). `timeZone` (an IANA name,
|
|
120
|
+
* Europe/Moscow) writes the moment on that zone's clock instead of the
|
|
121
|
+
* reader's (owner decision C183 (3): a product that knows the person's zone).
|
|
122
|
+
* Anything that is not a date is `gap`, '' by default. A marker after the year
|
|
123
|
+
* («2026 г.», «2026 р.») is held to it by a no-break space, so it never starts
|
|
124
|
+
* a line alone.
|
|
119
125
|
*/
|
|
120
126
|
|
|
121
127
|
|
|
@@ -123,6 +129,7 @@ function formatDate(value, {
|
|
|
123
129
|
date = 'medium',
|
|
124
130
|
time = null,
|
|
125
131
|
intl = null,
|
|
132
|
+
timeZone = '',
|
|
126
133
|
gap = '',
|
|
127
134
|
...where
|
|
128
135
|
} = {}) {
|
|
@@ -137,23 +144,108 @@ function formatDate(value, {
|
|
|
137
144
|
if (!options.dateStyle && !options.timeStyle) options.dateStyle = 'medium';
|
|
138
145
|
}
|
|
139
146
|
|
|
140
|
-
|
|
147
|
+
if (knownTimeZone(timeZone)) options = { ...options,
|
|
148
|
+
timeZone
|
|
149
|
+
}; // The year keeps its marker («2026 г.» never wraps before «г.»): format-intl.js.
|
|
150
|
+
|
|
151
|
+
return (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.formatDateText)((0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('DateTimeFormat', (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.formatLocale)(where), options), moment);
|
|
141
152
|
}
|
|
142
153
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
|
|
146
|
-
|
|
154
|
+
* Whether the platform knows an IANA time zone name (Europe/Moscow, UTC). An
|
|
155
|
+
* empty or unknown name is the reader's own zone everywhere here.
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
function knownTimeZone(timeZone) {
|
|
159
|
+
const name = String(timeZone ?? '').trim();
|
|
160
|
+
if (!name) return false;
|
|
161
|
+
const root = typeof globalThis !== 'undefined' ? globalThis : {};
|
|
162
|
+
if (!(root.__sfTimeZones instanceof Map)) root.__sfTimeZones = new Map();
|
|
163
|
+
if (root.__sfTimeZones.has(name)) return root.__sfTimeZones.get(name);
|
|
164
|
+
let known = true;
|
|
165
|
+
|
|
166
|
+
try {
|
|
167
|
+
new Intl.DateTimeFormat('en', {
|
|
168
|
+
timeZone: name
|
|
169
|
+
});
|
|
170
|
+
} catch {
|
|
171
|
+
known = false;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (root.__sfTimeZones.size < 64) root.__sfTimeZones.set(name, known);
|
|
175
|
+
return known;
|
|
176
|
+
} // The calendar date and the clock of a moment in a zone, as numbers: the
|
|
177
|
+
// reader's own when the zone is none.
|
|
178
|
+
|
|
179
|
+
function wallClock(moment, timeZone) {
|
|
180
|
+
if (!knownTimeZone(timeZone)) {
|
|
181
|
+
return {
|
|
182
|
+
year: moment.getFullYear(),
|
|
183
|
+
month: moment.getMonth(),
|
|
184
|
+
day: moment.getDate(),
|
|
185
|
+
hour: moment.getHours(),
|
|
186
|
+
minute: moment.getMinutes(),
|
|
187
|
+
second: moment.getSeconds()
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const parts = {};
|
|
192
|
+
|
|
193
|
+
for (const part of (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('DateTimeFormat', 'en-US', {
|
|
194
|
+
timeZone,
|
|
195
|
+
hourCycle: 'h23',
|
|
196
|
+
year: 'numeric',
|
|
197
|
+
month: 'numeric',
|
|
198
|
+
day: 'numeric',
|
|
199
|
+
hour: 'numeric',
|
|
200
|
+
minute: 'numeric',
|
|
201
|
+
second: 'numeric'
|
|
202
|
+
}).formatToParts(moment)) {
|
|
203
|
+
if (part.type !== 'literal') parts[part.type] = Number(part.value);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return {
|
|
207
|
+
year: parts.year,
|
|
208
|
+
month: parts.month - 1,
|
|
209
|
+
day: parts.day,
|
|
210
|
+
hour: parts.hour % 24,
|
|
211
|
+
minute: parts.minute,
|
|
212
|
+
second: parts.second
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* The zone's offset from UTC at a moment, in minutes (Moscow +180, New York
|
|
217
|
+
* -300 in winter); the reader's own when the zone is none.
|
|
218
|
+
*/
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
function timeZoneOffset(value, {
|
|
222
|
+
timeZone = ''
|
|
223
|
+
} = {}) {
|
|
224
|
+
const moment = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(value);
|
|
225
|
+
if (!moment) return Number.NaN;
|
|
226
|
+
if (!knownTimeZone(timeZone)) return -moment.getTimezoneOffset();
|
|
227
|
+
const clock = wallClock(moment, timeZone);
|
|
228
|
+
const asUtc = Date.UTC(clock.year, clock.month, clock.day, clock.hour, clock.minute, clock.second);
|
|
229
|
+
return Math.round((asUtc - Math.floor(moment.getTime() / 1000) * 1000) / 60000);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Calendar days from `now` to the value in the reader's time zone (or
|
|
233
|
+
* `timeZone`'s): 0 today, -1 yesterday, 1 tomorrow; NaN when the value is no
|
|
234
|
+
* date. Counted on calendar dates, not 24-hour spans, so 23:59 yesterday is
|
|
235
|
+
* -1 at 00:01 and a day of a clock change is still one day.
|
|
147
236
|
*/
|
|
148
237
|
|
|
149
238
|
function calendarDayOffset(value, {
|
|
150
|
-
now = new Date()
|
|
239
|
+
now = new Date(),
|
|
240
|
+
timeZone = ''
|
|
151
241
|
} = {}) {
|
|
152
242
|
const moment = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(value);
|
|
153
243
|
const today = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(now);
|
|
154
244
|
if (!moment || !today) return Number.NaN;
|
|
155
|
-
const
|
|
156
|
-
const
|
|
245
|
+
const at = wallClock(moment, timeZone);
|
|
246
|
+
const from = wallClock(today, timeZone);
|
|
247
|
+
const day = Date.UTC(at.year, at.month, at.day);
|
|
248
|
+
const base = Date.UTC(from.year, from.month, from.day);
|
|
157
249
|
return Math.round((day - base) / DAY_MS);
|
|
158
250
|
}
|
|
159
251
|
/**
|
|
@@ -163,10 +255,26 @@ function calendarDayOffset(value, {
|
|
|
163
255
|
* draws them again; «сегодня» said yesterday is wrong by morning.
|
|
164
256
|
*/
|
|
165
257
|
|
|
166
|
-
function msUntilNextDay(now = new Date()
|
|
258
|
+
function msUntilNextDay(now = new Date(), {
|
|
259
|
+
timeZone = ''
|
|
260
|
+
} = {}) {
|
|
167
261
|
const today = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(now) ?? new Date();
|
|
168
|
-
|
|
169
|
-
|
|
262
|
+
|
|
263
|
+
if (!knownTimeZone(timeZone)) {
|
|
264
|
+
const next = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1);
|
|
265
|
+
return next.getTime() - today.getTime();
|
|
266
|
+
} // In a named zone: the time left on its clock until 24:00, corrected by a
|
|
267
|
+
// change of its offset before then (a clock change at night).
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
const clock = wallClock(today, timeZone);
|
|
271
|
+
const left = DAY_MS - ((clock.hour * 60 + clock.minute) * 60 + clock.second) * 1000 - today.getMilliseconds();
|
|
272
|
+
const shift = timeZoneOffset(today, {
|
|
273
|
+
timeZone
|
|
274
|
+
}) - timeZoneOffset(new Date(today.getTime() + left), {
|
|
275
|
+
timeZone
|
|
276
|
+
});
|
|
277
|
+
return Math.max(1, left + shift * 60000);
|
|
170
278
|
}
|
|
171
279
|
__webpack_async_result__();
|
|
172
280
|
} catch(e) { __webpack_async_result__(e); } });
|
|
@@ -184,25 +292,67 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
184
292
|
/* harmony export */ formatFileSize: () => (/* binding */ formatFileSize)
|
|
185
293
|
/* harmony export */ });
|
|
186
294
|
/* harmony import */ var _format_intl_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("15b4e93ff6ed");
|
|
295
|
+
/* harmony import */ var _lang_file_size_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("4294700087dc");
|
|
187
296
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_format_intl_js__WEBPACK_IMPORTED_MODULE_0__]);
|
|
188
297
|
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
189
298
|
_format_intl_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
|
190
299
|
// File sizes in the page's language («1,4 МБ»), with no top-level side
|
|
191
300
|
// effects (format-intl.js). The same functions as core/js/format.js,
|
|
192
301
|
// composition/file-size.mjs and SF.format.fileSize.
|
|
193
|
-
// The four words of a size
|
|
194
|
-
//
|
|
195
|
-
//
|
|
302
|
+
// The four words of a size live in core's language files
|
|
303
|
+
// (core/js/lang/file-size, localization study LC-3): English ships in the
|
|
304
|
+
// bundle; Russian and any other language take the words their language file
|
|
305
|
+
// or a product registers for `sf-file-size` (owner decision C282;
|
|
306
|
+
// SF.language.register('sf-file-size', 'de', {b, kb, mb, gb})), else the
|
|
307
|
+
// English words with its own digits. A component with words of its own passes
|
|
308
|
+
// them as `units`. The registry is read from the shared global the page
|
|
309
|
+
// language keeps (core/js/page-language.js), so this module still runs
|
|
310
|
+
// nothing on load.
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
const UNIT_KEYS = /* @__PURE__ */Object.freeze(['b', 'kb', 'mb', 'gb']);
|
|
314
|
+
|
|
315
|
+
function unitsOf(words) {
|
|
316
|
+
return Object.freeze(UNIT_KEYS.map(key => words[key]));
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
function registeredUnits(code) {
|
|
320
|
+
const words = globalThis.__sfPageLanguage?.registered?.get?.('sf-file-size')?.get?.(code);
|
|
321
|
+
return words && UNIT_KEYS.every(key => typeof words[key] === 'string') ? unitsOf(words) : null;
|
|
322
|
+
} // The built-in languages' units (English; owner decision C282), and `ru` as
|
|
323
|
+
// before for a reader of SF.format.FILE_SIZE_UNITS.ru: the units the ru
|
|
324
|
+
// language file registered, null until it is on the page.
|
|
196
325
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
326
|
+
|
|
327
|
+
function unitTable(words) {
|
|
328
|
+
const table = {};
|
|
329
|
+
|
|
330
|
+
for (const [code, own] of Object.entries(words)) table[code] = unitsOf(own);
|
|
331
|
+
|
|
332
|
+
if (!table.ru) Object.defineProperty(table, 'ru', {
|
|
333
|
+
enumerable: true,
|
|
334
|
+
get: () => registeredUnits('ru')
|
|
335
|
+
});
|
|
336
|
+
return Object.freeze(table);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const FILE_SIZE_UNITS = /* @__PURE__ */unitTable(_lang_file_size_index_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
340
|
+
/** The unit words for a locale: registered for it, its own, its language's, else English. */
|
|
202
341
|
|
|
203
342
|
function fileSizeUnits(locale = 'en') {
|
|
204
|
-
const
|
|
205
|
-
|
|
343
|
+
const wanted = String(locale || 'en').trim().toLowerCase().replace('_', '-'); // A registry alias takes its pack's words (zh-cn: zh-hans, pt: pt-br;
|
|
344
|
+
// core/lang/index.json aliases, kept on the shared store by core).
|
|
345
|
+
|
|
346
|
+
const pack = code => globalThis.__sfPageLanguage?.packs?.aliases?.[code] ?? code;
|
|
347
|
+
|
|
348
|
+
const base = wanted.split('-')[0];
|
|
349
|
+
|
|
350
|
+
for (const code of [...new Set([wanted, pack(wanted), base, pack(base)])]) {
|
|
351
|
+
const units = registeredUnits(code) ?? (Object.hasOwn(FILE_SIZE_UNITS, code) ? FILE_SIZE_UNITS[code] : null);
|
|
352
|
+
if (units) return units;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
return registeredUnits('en') ?? FILE_SIZE_UNITS.en;
|
|
206
356
|
}
|
|
207
357
|
/**
|
|
208
358
|
* A size as people read it: «512 Б», «2 КБ», «1,4 МБ», «12 GB». Binary steps
|
|
@@ -249,6 +399,7 @@ __webpack_async_result__();
|
|
|
249
399
|
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
250
400
|
__webpack_require__.r(__webpack_exports__);
|
|
251
401
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
402
|
+
/* harmony export */ formatDateText: () => (/* binding */ formatDateText),
|
|
252
403
|
/* harmony export */ formatLocale: () => (/* binding */ formatLocale),
|
|
253
404
|
/* harmony export */ intlFormatter: () => (/* binding */ intlFormatter),
|
|
254
405
|
/* harmony export */ toDate: () => (/* binding */ toDate)
|
|
@@ -319,6 +470,31 @@ function intlFormatter(kind, locale, options) {
|
|
|
319
470
|
if (cache.size >= 256) cache.delete(cache.keys().next().value);
|
|
320
471
|
cache.set(key, made);
|
|
321
472
|
return made;
|
|
473
|
+
} // A date's year keeps the abbreviation that follows it (A4, group build 15):
|
|
474
|
+
// Russian, Ukrainian, Bulgarian, Belarusian, Kazakh, Lithuanian, Macedonian
|
|
475
|
+
// and Armenian write one after the year -- «19 нояб. 2026 г.», «2026 р.»,
|
|
476
|
+
// «2026 m.», «2026 թ.» -- and the platform joins it with an ordinary space, so
|
|
477
|
+
// a narrow cell or a wrapped line printed «2026» at the end of one line and
|
|
478
|
+
// «г.» alone at the start of the next. Only the space before an abbreviation
|
|
479
|
+
// (letters closed by a full stop: г., гг., m.) becomes a no-break space; a word
|
|
480
|
+
// such as English «at» or German «um», a comma, a slash or a time after the
|
|
481
|
+
// year is left as the platform writes it (DEV answer msg-e6758728).
|
|
482
|
+
|
|
483
|
+
/** A DateTimeFormat's text of a moment with the year's marker held to the year. */
|
|
484
|
+
|
|
485
|
+
function formatDateText(formatter, moment) {
|
|
486
|
+
if (typeof formatter?.formatToParts !== 'function') return formatter.format(moment); // A module-level regular expression is a statement a bundler keeps (core-format test): made here.
|
|
487
|
+
|
|
488
|
+
const gap = /^[\s\u00a0\u202f]+(?=\p{L}+\.)/u;
|
|
489
|
+
let text = '';
|
|
490
|
+
let afterYear = false;
|
|
491
|
+
|
|
492
|
+
for (const part of formatter.formatToParts(moment)) {
|
|
493
|
+
text += afterYear && part.type === 'literal' ? part.value.replace(gap, '\u00a0') : part.value;
|
|
494
|
+
afterYear = part.type === 'year';
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
return text;
|
|
322
498
|
}
|
|
323
499
|
__webpack_async_result__();
|
|
324
500
|
} catch(e) { __webpack_async_result__(e); } });
|
|
@@ -332,7 +508,9 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
332
508
|
__webpack_require__.r(__webpack_exports__);
|
|
333
509
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
334
510
|
/* harmony export */ formatNumber: () => (/* binding */ formatNumber),
|
|
335
|
-
/* harmony export */ numberOptions: () => (/* binding */ numberOptions)
|
|
511
|
+
/* harmony export */ numberOptions: () => (/* binding */ numberOptions),
|
|
512
|
+
/* harmony export */ percentSign: () => (/* binding */ percentSign),
|
|
513
|
+
/* harmony export */ percentText: () => (/* binding */ percentText)
|
|
336
514
|
/* harmony export */ });
|
|
337
515
|
/* harmony import */ var _format_intl_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("15b4e93ff6ed");
|
|
338
516
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_format_intl_js__WEBPACK_IMPORTED_MODULE_0__]);
|
|
@@ -350,20 +528,42 @@ _format_intl_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_resu
|
|
|
350
528
|
* number (default) 1 234,5 as many digits as `step` needs, at most 6; 2 without one
|
|
351
529
|
* integer 1 235
|
|
352
530
|
* decimal-<n> n digits after the point, always (0 to 20)
|
|
353
|
-
*
|
|
531
|
+
* share a share 0..1 as 12 % (0.125 is 12,5 %)
|
|
532
|
+
* percent the same share: the charts' word, kept
|
|
533
|
+
* unit-percent a value that already is the percent (12.5 is 12,5 %),
|
|
534
|
+
* as the property type `percent` stores it
|
|
354
535
|
* compact 1,2 тыс. / 1.2K
|
|
355
536
|
* currency-<CODE> 1 234,50 ₽ (an ISO 4217 code)
|
|
356
537
|
* unit-<unit> 45,3 ГБ (an Intl unit: gigabyte, megabit-per-second)
|
|
357
538
|
*
|
|
358
|
-
* Anything else reads as number.
|
|
539
|
+
* Anything else reads as number. Words join with a space: a kind (currency-,
|
|
540
|
+
* unit-, percent) and a precision (integer, decimal-<n>, compact), so
|
|
541
|
+
* «currency-RUB integer» is 1 235 ₽, «currency-RUB decimal-2» 1 234,50 ₽ and
|
|
542
|
+
* «currency-RUB compact» 1,1 млн ₽. The precision wins whatever the order.
|
|
359
543
|
*/
|
|
360
544
|
|
|
361
545
|
function numberOptions(format = 'number', step = 0) {
|
|
362
|
-
const
|
|
546
|
+
const words = String(format || 'number').trim().split(/\s+/u).filter(Boolean);
|
|
547
|
+
|
|
548
|
+
if (words.length > 1) {
|
|
549
|
+
const PRECISION = /^(?:integer|compact|decimal-\d{1,2})$/u;
|
|
550
|
+
const kinds = words.filter(one => !PRECISION.test(one));
|
|
551
|
+
const precision = words.filter(one => PRECISION.test(one));
|
|
552
|
+
return [...kinds, ...precision].reduce((options, one) => ({ ...options,
|
|
553
|
+
...numberOptions(one, step)
|
|
554
|
+
}), {});
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
const word = words[0] ?? 'number';
|
|
363
558
|
if (word === 'integer') return {
|
|
559
|
+
minimumFractionDigits: 0,
|
|
364
560
|
maximumFractionDigits: 0
|
|
365
|
-
};
|
|
366
|
-
|
|
561
|
+
}; // Two meanings of «percent» met in the Framework (C294, MP-4): this word
|
|
562
|
+
// multiplies a share by 100, while the property type `percent` holds the
|
|
563
|
+
// percent itself. `share` says which one it is; `percent` stays its alias for
|
|
564
|
+
// the charts that write it, and `unit-percent` is the percent itself.
|
|
565
|
+
|
|
566
|
+
if (word === 'share' || word === 'percent') return {
|
|
367
567
|
style: 'percent',
|
|
368
568
|
maximumFractionDigits: 1
|
|
369
569
|
};
|
|
@@ -415,7 +615,35 @@ function formatNumber(value, format = 'number', {
|
|
|
415
615
|
if (typeof number !== 'number' || !Number.isFinite(number)) return gap;
|
|
416
616
|
const options = numberOptions(format, step);
|
|
417
617
|
if (grouping === false) options.useGrouping = false;
|
|
418
|
-
|
|
618
|
+
const text = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('NumberFormat', (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.formatLocale)(where), options).format(number);
|
|
619
|
+
return options.style === 'percent' || options.unit === 'percent' ? percentSign(text) : text;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* One spelling of a per cent in every language (owner decision C203 (3), DEV
|
|
623
|
+
* msg-913fd9e4, 2026-11-15): the number, a no-break space (U+00A0) and «%» --
|
|
624
|
+
* «72 %», «12,5 %», and «72 %» in English too, where Intl writes «72%». A
|
|
625
|
+
* language that writes the sign first («%72») keeps its order.
|
|
626
|
+
*/
|
|
627
|
+
|
|
628
|
+
function percentSign(text) {
|
|
629
|
+
// A right-to-left language writes direction marks around the sign («12.5%»
|
|
630
|
+
// in Arabic); they go with the space it had, and the number keeps the mark
|
|
631
|
+
// it starts with (C294).
|
|
632
|
+
return String(text).replace(/[\s\u00a0\u202f\u200e\u200f\u061c]*%[\u200e\u200f\u061c]*$/u, '\u00a0%');
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* A value that already is a per cent (0..100, «72», «72.5») as the progress
|
|
636
|
+
* family shows and says it (owner decision C203 (3), IM-3): the number in the
|
|
637
|
+
* language of the node's part of the page, as many digits as it has (up to
|
|
638
|
+
* 2), a no-break space and «%» -- «72 %», «72,5 %».
|
|
639
|
+
*/
|
|
640
|
+
|
|
641
|
+
function percentText(value, node) {
|
|
642
|
+
const number = Number(value);
|
|
643
|
+
return percentSign(`${formatNumber(Number.isFinite(number) ? number : 0, 'number', {
|
|
644
|
+
node,
|
|
645
|
+
grouping: false
|
|
646
|
+
})}%`);
|
|
419
647
|
}
|
|
420
648
|
__webpack_async_result__();
|
|
421
649
|
} catch(e) { __webpack_async_result__(e); } });
|
|
@@ -429,7 +657,8 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
|
|
429
657
|
__webpack_require__.r(__webpack_exports__);
|
|
430
658
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
431
659
|
/* harmony export */ formatRelativeDay: () => (/* binding */ formatRelativeDay),
|
|
432
|
-
/* harmony export */ formatRelativeTime: () => (/* binding */ formatRelativeTime)
|
|
660
|
+
/* harmony export */ formatRelativeTime: () => (/* binding */ formatRelativeTime),
|
|
661
|
+
/* harmony export */ intlSpeaks: () => (/* binding */ intlSpeaks)
|
|
433
662
|
/* harmony export */ });
|
|
434
663
|
/* harmony import */ var _format_intl_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("15b4e93ff6ed");
|
|
435
664
|
/* harmony import */ var _format_date_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e577837dd70a");
|
|
@@ -444,6 +673,57 @@ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_for
|
|
|
444
673
|
function capitalise(text, locale) {
|
|
445
674
|
const first = Array.from(text)[0] ?? '';
|
|
446
675
|
return first ? first.toLocaleUpperCase(locale || undefined) + text.slice(first.length) : text;
|
|
676
|
+
} // «сегодня», «вчера», «завтра» are the platform's words, except where the
|
|
677
|
+
// platform has no words of the language: a browser without a language's
|
|
678
|
+
// relative-time data says «yesterday» on a page in it. Then the words come
|
|
679
|
+
// from core's language files (core/js/lang/relative-day, registered as
|
|
680
|
+
// `sf-relative-day`), which a language pack or a product brings
|
|
681
|
+
// (SF.language.register('sf-relative-day', 'de', {today, yesterday,
|
|
682
|
+
// tomorrow})). ru and en are never looked up: every platform speaks them.
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
const DAY_KEYS = /* @__PURE__ */Object.freeze({
|
|
686
|
+
0: 'today',
|
|
687
|
+
[-1]: 'yesterday',
|
|
688
|
+
1: 'tomorrow'
|
|
689
|
+
});
|
|
690
|
+
/** Whether Intl's relative-time words are those of the locale's language, not a fallback's. */
|
|
691
|
+
|
|
692
|
+
function intlSpeaks(locale) {
|
|
693
|
+
const wanted = String(locale || '').trim().toLowerCase().replace('_', '-').split('-')[0];
|
|
694
|
+
if (!wanted) return true;
|
|
695
|
+
if (wanted === 'en') return true;
|
|
696
|
+
|
|
697
|
+
try {
|
|
698
|
+
const own = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('RelativeTimeFormat', locale, {
|
|
699
|
+
numeric: 'auto'
|
|
700
|
+
});
|
|
701
|
+
if (String(own.resolvedOptions().locale).toLowerCase().split('-')[0] !== wanted) return false; // A platform may answer the locale's name over English data (a trimmed
|
|
702
|
+
// ICU): its «yesterday» is then English's.
|
|
703
|
+
|
|
704
|
+
return own.format(-1, 'day') !== (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('RelativeTimeFormat', 'en', {
|
|
705
|
+
numeric: 'auto'
|
|
706
|
+
}).format(-1, 'day');
|
|
707
|
+
} catch {
|
|
708
|
+
return false;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
function packDayWord(offset, locale) {
|
|
713
|
+
if (intlSpeaks(locale)) return null;
|
|
714
|
+
const words = globalThis.__sfPageLanguage?.registered?.get?.('sf-relative-day');
|
|
715
|
+
const wanted = String(locale || '').trim().toLowerCase().replace('_', '-'); // A registry alias takes its pack's words (zh-cn: zh-hans, pt: pt-br).
|
|
716
|
+
|
|
717
|
+
const pack = code => globalThis.__sfPageLanguage?.packs?.aliases?.[code] ?? code;
|
|
718
|
+
|
|
719
|
+
const base = wanted.split('-')[0];
|
|
720
|
+
|
|
721
|
+
for (const code of [...new Set([wanted, pack(wanted), base, pack(base)])]) {
|
|
722
|
+
const word = words?.get?.(code)?.[DAY_KEYS[offset]];
|
|
723
|
+
if (typeof word === 'string' && word.trim()) return word;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
return null;
|
|
447
727
|
}
|
|
448
728
|
/**
|
|
449
729
|
* The day a moment fell on, as a list says it: «сегодня», «вчера», «завтра»,
|
|
@@ -454,6 +734,8 @@ function capitalise(text, locale) {
|
|
|
454
734
|
* `weekday: false` goes from yesterday straight to the date; `capital: true`
|
|
455
735
|
* starts the word with a capital, as a heading or a divider does.
|
|
456
736
|
*
|
|
737
|
+
* `timeZone` counts the days and writes them on that zone's clock.
|
|
738
|
+
*
|
|
457
739
|
* The answer changes at the reader's midnight: msUntilNextDay (format-date.js)
|
|
458
740
|
* says when.
|
|
459
741
|
*/
|
|
@@ -466,6 +748,7 @@ function formatRelativeDay(value, {
|
|
|
466
748
|
tomorrow,
|
|
467
749
|
weekday = true,
|
|
468
750
|
capital = false,
|
|
751
|
+
timeZone = '',
|
|
469
752
|
gap = '',
|
|
470
753
|
...where
|
|
471
754
|
} = {}) {
|
|
@@ -473,8 +756,12 @@ function formatRelativeDay(value, {
|
|
|
473
756
|
if (!moment) return gap;
|
|
474
757
|
const locale = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.formatLocale)(where);
|
|
475
758
|
const offset = (0,_format_date_js__WEBPACK_IMPORTED_MODULE_1__.calendarDayOffset)(moment, {
|
|
476
|
-
now
|
|
759
|
+
now,
|
|
760
|
+
timeZone
|
|
477
761
|
});
|
|
762
|
+
const zone = (0,_format_date_js__WEBPACK_IMPORTED_MODULE_1__.knownTimeZone)(timeZone) ? {
|
|
763
|
+
timeZone
|
|
764
|
+
} : {};
|
|
478
765
|
const own = {
|
|
479
766
|
0: today,
|
|
480
767
|
[-1]: yesterday,
|
|
@@ -485,22 +772,24 @@ function formatRelativeDay(value, {
|
|
|
485
772
|
if (own) {
|
|
486
773
|
text = String(own);
|
|
487
774
|
} else if (offset >= -1 && offset <= 1) {
|
|
488
|
-
text = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('RelativeTimeFormat', locale, {
|
|
775
|
+
text = packDayWord(offset, locale) ?? (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('RelativeTimeFormat', locale, {
|
|
489
776
|
numeric: 'auto'
|
|
490
777
|
}).format(offset, 'day');
|
|
491
778
|
} else if (weekday && offset < -1 && offset > -7) {
|
|
492
779
|
text = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('DateTimeFormat', locale, {
|
|
493
|
-
weekday: 'long'
|
|
780
|
+
weekday: 'long',
|
|
781
|
+
...zone
|
|
494
782
|
}).format(moment);
|
|
495
783
|
} else {
|
|
496
784
|
const year = moment.getFullYear() === (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.toDate)(now).getFullYear() ? {} : {
|
|
497
785
|
year: 'numeric'
|
|
498
786
|
};
|
|
499
|
-
text = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('DateTimeFormat', locale, {
|
|
787
|
+
text = (0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.formatDateText)((0,_format_intl_js__WEBPACK_IMPORTED_MODULE_0__.intlFormatter)('DateTimeFormat', locale, {
|
|
500
788
|
day: 'numeric',
|
|
501
789
|
month: 'long',
|
|
502
|
-
...year
|
|
503
|
-
|
|
790
|
+
...year,
|
|
791
|
+
...zone
|
|
792
|
+
}), moment);
|
|
504
793
|
}
|
|
505
794
|
|
|
506
795
|
return capital ? capitalise(text, locale) : text;
|
|
@@ -810,8 +1099,8 @@ lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
|
|
810
1099
|
// The two small pieces the composer draws more than once, as Lit templates:
|
|
811
1100
|
// the Framework's icon button and a file chip. In simai/ui-chat they were the
|
|
812
1101
|
// base Component's iconButton and renderAttachment (component/chat/js/render.js),
|
|
813
|
-
// plain DOM shared with the site widget;
|
|
814
|
-
// markup
|
|
1102
|
+
// plain DOM shared with the site widget; the icon button is the Framework's
|
|
1103
|
+
// markup, and since K-08 the chip is the Framework's sf-file-preview (chip).
|
|
815
1104
|
// The icon step that sits in a button of each step: 16 in 32, 20 in 40.
|
|
816
1105
|
|
|
817
1106
|
const ICON_IN_BUTTON = {
|
|
@@ -856,46 +1145,61 @@ function attachmentState(file) {
|
|
|
856
1145
|
return progress !== undefined && progress !== null && progress < 1 ? "uploading" : "ready";
|
|
857
1146
|
}
|
|
858
1147
|
/**
|
|
859
|
-
* A file chip
|
|
860
|
-
*
|
|
1148
|
+
* A file chip (K-08, SIMAI Framework pair ui-73df5d1b4d4c): the Framework's
|
|
1149
|
+
* sf-file-preview in its chip look draws the name, the type and the size,
|
|
1150
|
+
* the upload's bar and per cent (state uploading, value), the refusal
|
|
1151
|
+
* («Не загрузился: …», state error, error-text, with its «Повторить») and «×».
|
|
1152
|
+
* The chat only maps its file to the preview's settings and hears its
|
|
1153
|
+
* requests: detach («×») and retry («Повторить»), which go no further than
|
|
1154
|
+
* the chip -- the host hears the chat's own events.
|
|
1155
|
+
*
|
|
1156
|
+
* The class sf-chat-attachment (and sf-chat-attachment--<state>) stays on the
|
|
1157
|
+
* preview's host until 2027-01-01, a dated alias for a page that finds or
|
|
1158
|
+
* styles a chip by it (aliases.json); its inner parts are the preview's.
|
|
861
1159
|
*
|
|
862
|
-
*
|
|
863
|
-
*
|
|
1160
|
+
* A progress of 0 (or none known) runs the bar without a share; an error that
|
|
1161
|
+
* is not text (true) says «Не загрузился» alone.
|
|
1162
|
+
*
|
|
1163
|
+
* @param {{id?: string, name: string, bytes: number, href?: string, mime?: string, progress?: number|null, error?: string|boolean|null}} file
|
|
864
1164
|
*/
|
|
865
1165
|
|
|
866
1166
|
function renderAttachment(file, {
|
|
867
|
-
words,
|
|
868
1167
|
removable = false,
|
|
869
|
-
|
|
1168
|
+
href = "",
|
|
1169
|
+
onRemove = null,
|
|
1170
|
+
onRetry = null,
|
|
1171
|
+
onDownload = null,
|
|
1172
|
+
className = ""
|
|
870
1173
|
} = {}) {
|
|
871
1174
|
const state = attachmentState(file);
|
|
872
1175
|
const name = String(file.name ?? "");
|
|
873
|
-
const
|
|
874
|
-
const percent = Math.round((file.progress || 0) * 100);
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
1176
|
+
const bytes = file.bytes === null || file.bytes === undefined || file.bytes === "" ? NaN : Number(file.bytes);
|
|
1177
|
+
const percent = Math.round(Math.min(1, Math.max(0, Number(file.progress) || 0)) * 100);
|
|
1178
|
+
|
|
1179
|
+
const stop = handler => event => {
|
|
1180
|
+
event.stopPropagation();
|
|
1181
|
+
event.preventDefault();
|
|
1182
|
+
handler?.(file, event);
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__.html)`<sf-file-preview
|
|
1186
|
+
class="sf-chat-attachment sf-chat-attachment--${state} ${className}"
|
|
1187
|
+
appearance="chip"
|
|
1188
|
+
file-name=${name}
|
|
1189
|
+
file-size=${Number.isFinite(bytes) && bytes >= 0 ? String(bytes) : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
1190
|
+
mime-type=${file.mime || lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
1191
|
+
href=${href || lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
1192
|
+
state=${state}
|
|
1193
|
+
value=${state === "uploading" && Number(file.progress) > 0 ? String(percent) : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
1194
|
+
error-text=${state === "error" && typeof file.error === "string" ? file.error : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
1195
|
+
remove-action=${removable ? lit__WEBPACK_IMPORTED_MODULE_0__.nothing : "false"}
|
|
1196
|
+
@sf-file-preview-detach=${stop(onRemove)}
|
|
1197
|
+
@sf-file-preview-retry=${stop(onRetry)}
|
|
1198
|
+
@sf-file-preview-download=${onDownload ? event => {
|
|
1199
|
+
event.stopPropagation();
|
|
1200
|
+
onDownload(file, event);
|
|
1201
|
+
} : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
1202
|
+
></sf-file-preview>`;
|
|
899
1203
|
}
|
|
900
1204
|
__webpack_async_result__();
|
|
901
1205
|
} catch(e) { __webpack_async_result__(e); } });
|
|
@@ -1615,71 +1919,78 @@ function renderStages(ctx, message) {
|
|
|
1615
1919
|
'aria-hidden': 'true'
|
|
1616
1920
|
}), text(ctx, 'span', 'sf-chat-stages__label', ctx.words(key)));
|
|
1617
1921
|
return root;
|
|
1618
|
-
} // --- sf-
|
|
1922
|
+
} // --- a file chip: sf-file-preview (K-08) ---------------------------------
|
|
1619
1923
|
|
|
1620
1924
|
/**
|
|
1621
|
-
* A file chip: sf-
|
|
1622
|
-
*
|
|
1623
|
-
*
|
|
1624
|
-
*
|
|
1925
|
+
* A file chip: the Framework's sf-file-preview in its chip look, as
|
|
1926
|
+
* sf-chat-composer draws it (K-08, pair ui-73df5d1b4d4c): name, type · size,
|
|
1927
|
+
* the upload's bar, the server's refusal, «×» when removable. With `href` (the
|
|
1928
|
+
* host's own download address, never built here) the name of a ready file is
|
|
1929
|
+
* the preview's link; its download request is checked first: a file deleted
|
|
1930
|
+
* since loses the link and says «Файл недоступен» in place of its size.
|
|
1931
|
+
* `check: false` (a person's file, the module's protected link) downloads as
|
|
1932
|
+
* the preview does, unasked. The host carries the dated class
|
|
1933
|
+
* sf-chat-attachment until 2027-01-01.
|
|
1625
1934
|
* @param {{id?: string, name: string, bytes: number, href?: string, progress?: number|null, error?: string, removable?: boolean}} file
|
|
1626
1935
|
*/
|
|
1627
1936
|
|
|
1628
|
-
function renderAttachment(ctx, file
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
size
|
|
1633
|
-
}),
|
|
1634
|
-
uploading: percent => ctx.words('attachment.uploading', {
|
|
1635
|
-
percent
|
|
1636
|
-
}),
|
|
1637
|
-
remove: name => ctx.words('attachment.remove', {
|
|
1638
|
-
name
|
|
1639
|
-
}),
|
|
1640
|
-
size: bytes => formatBytes(bytes, ctx.words, ctx.locale)
|
|
1641
|
-
};
|
|
1937
|
+
function renderAttachment(ctx, file, {
|
|
1938
|
+
onRetry = null,
|
|
1939
|
+
check = true
|
|
1940
|
+
} = {}) {
|
|
1642
1941
|
const holder = ctx.document.createElement('div');
|
|
1942
|
+
const ready = Boolean(file.href) && (0,_chat_composer_js_templates_parts_js__WEBPACK_IMPORTED_MODULE_4__.attachmentState)(file) === 'ready';
|
|
1643
1943
|
(0,lit__WEBPACK_IMPORTED_MODULE_0__.render)((0,_chat_composer_js_templates_parts_js__WEBPACK_IMPORTED_MODULE_4__.renderAttachment)(file, {
|
|
1644
|
-
words,
|
|
1645
1944
|
removable: Boolean(file.removable),
|
|
1945
|
+
href: ready ? file.href : '',
|
|
1646
1946
|
onRemove: one => ctx.onAction?.('remove-attachment', {
|
|
1647
1947
|
id: one.id,
|
|
1648
1948
|
name: one.name
|
|
1649
|
-
})
|
|
1949
|
+
}),
|
|
1950
|
+
onRetry,
|
|
1951
|
+
onDownload: ready && check ? (one, event) => checkDownload(ctx, event, one) : null
|
|
1650
1952
|
}), holder);
|
|
1651
|
-
const root = holder.querySelector('
|
|
1953
|
+
const root = holder.querySelector('sf-file-preview');
|
|
1652
1954
|
root.remove();
|
|
1653
|
-
|
|
1654
|
-
if (file.href && (0,_chat_composer_js_templates_parts_js__WEBPACK_IMPORTED_MODULE_4__.attachmentState)(file) === 'ready') {
|
|
1655
|
-
const name = root.querySelector('.sf-chat-attachment__name');
|
|
1656
|
-
const metaNode = root.querySelector('.sf-chat-attachment__meta');
|
|
1657
|
-
const link = text(ctx, 'a', 'sf-chat-attachment__name sf-chat-attachment__link', file.name, {
|
|
1658
|
-
href: file.href,
|
|
1659
|
-
download: file.name,
|
|
1660
|
-
title: ctx.words('files.downloadLabel', {
|
|
1661
|
-
name: file.name
|
|
1662
|
-
})
|
|
1663
|
-
});
|
|
1664
|
-
link.addEventListener('click', event => checkDownload(ctx, event, link, metaNode, file.name));
|
|
1665
|
-
name.replaceWith(link);
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
1955
|
return root;
|
|
1669
1956
|
} // The server keeps a sent file's attachment after the file is deleted from
|
|
1670
|
-
// «Мои файлы» (Mirai24, 27.10): the
|
|
1671
|
-
//
|
|
1957
|
+
// «Мои файлы» (Mirai24, 27.10): the preview's download request (its name
|
|
1958
|
+
// link, its download action) is held and the address asked first; a file
|
|
1959
|
+
// that is gone is said so in its chip -- the name without a link, «Файл
|
|
1960
|
+
// недоступен» where its size was, said once by a polite line beside it
|
|
1672
1961
|
// (the neutral word a people messenger can say as well: 1.1.0, was «Файл удалён»).
|
|
1673
1962
|
|
|
1674
|
-
async function checkDownload(ctx, event,
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1963
|
+
async function checkDownload(ctx, event, file) {
|
|
1964
|
+
const chip = event.currentTarget;
|
|
1965
|
+
event.preventDefault();
|
|
1966
|
+
const href = chip.getAttribute('href') || '';
|
|
1967
|
+
let missing = false;
|
|
1968
|
+
|
|
1969
|
+
try {
|
|
1970
|
+
const response = await ctx.document.defaultView.fetch(new URL(href, ctx.document.baseURI).href, {
|
|
1971
|
+
method: 'HEAD',
|
|
1972
|
+
credentials: 'same-origin'
|
|
1678
1973
|
});
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1974
|
+
missing = response.status === 404 || response.status === 410;
|
|
1975
|
+
} catch {
|
|
1976
|
+
missing = false;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
if (!missing) {
|
|
1980
|
+
const anchor = ctx.document.createElement('a');
|
|
1981
|
+
anchor.href = href;
|
|
1982
|
+
anchor.download = String(file.name ?? '');
|
|
1983
|
+
anchor.click();
|
|
1984
|
+
return;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
const gone = ctx.words('attachment.deleted');
|
|
1988
|
+
chip.removeAttribute('href');
|
|
1989
|
+
chip.setAttribute('file-size', gone);
|
|
1990
|
+
const said = text(ctx, 'span', 'sf-chat-offscreen', gone, {
|
|
1991
|
+
role: 'status'
|
|
1682
1992
|
});
|
|
1993
|
+
chip.after(said);
|
|
1683
1994
|
} // A download link asks its address first (HEAD, the page's own cookies) and
|
|
1684
1995
|
// follows it unless the file is gone (404 or 410): then `gone` says so.
|
|
1685
1996
|
|
|
@@ -5574,6 +5885,18 @@ class SfChatWindow extends ChatWindowElement {
|
|
|
5574
5885
|
conversation_id: this._data.conversation?.id ?? null,
|
|
5575
5886
|
interlocutor: this.interlocutorId
|
|
5576
5887
|
}).then(result => this.showResult(result));
|
|
5888
|
+
}); // «Повторить» on a chip that did not upload (sf-chat-composer 1.3.0,
|
|
5889
|
+
// K-08): the host sends the same file again (file.retry without a
|
|
5890
|
+
// message). A host without it answers unavailable and the chip stays.
|
|
5891
|
+
|
|
5892
|
+
composer.addEventListener("sf-chat-composer-retry", event => {
|
|
5893
|
+
this.request("file.retry", {
|
|
5894
|
+
conversation_id: this._data.conversation?.id ?? null,
|
|
5895
|
+
message_id: null,
|
|
5896
|
+
file_key: event.detail.id
|
|
5897
|
+
}).then(result => {
|
|
5898
|
+
if (result.answer !== "unavailable") this.showResult(result);
|
|
5899
|
+
});
|
|
5577
5900
|
});
|
|
5578
5901
|
composer.addEventListener("sf-chat-composer-detach", async event => {
|
|
5579
5902
|
const result = await this.request("file.detach", {
|
|
@@ -11778,11 +12101,28 @@ class StartView {
|
|
|
11778
12101
|
if (active === this.title || active === doc.body || !active) this.focusField(form.field ?? lookup);
|
|
11779
12102
|
});
|
|
11780
12103
|
} // The field's own box: sf-input's host takes no focus (it has no box of its
|
|
11781
|
-
// own), and a field just placed draws it a frame later.
|
|
12104
|
+
// own), and a field just placed draws it a frame later. On the pair
|
|
12105
|
+
// ui-73df5d1b4d4c a field drawn before its sheet has arrived takes no focus
|
|
12106
|
+
// yet, so the focus is asked again each frame (thirty at most) until the
|
|
12107
|
+
// field has it -- only while nothing else took it meanwhile (the form's
|
|
12108
|
+
// title, which holds it while the form opens, or the page).
|
|
11782
12109
|
|
|
11783
12110
|
|
|
11784
12111
|
focusField(field) {
|
|
11785
|
-
this.
|
|
12112
|
+
const doc = this.ctx.document;
|
|
12113
|
+
|
|
12114
|
+
const ask = frames => {
|
|
12115
|
+
if (!field.isConnected) return;
|
|
12116
|
+
const input = field.querySelector('input');
|
|
12117
|
+
const active = doc.activeElement;
|
|
12118
|
+
if (input && active === input) return; // Something else took the focus since the first ask: it stays there.
|
|
12119
|
+
|
|
12120
|
+
if (frames < 30 && active && active !== doc.body && active !== this.title && !field.contains(active)) return;
|
|
12121
|
+
input?.focus();
|
|
12122
|
+
if (doc.activeElement !== input && frames > 0) requestAnimationFrame(() => ask(frames - 1));
|
|
12123
|
+
};
|
|
12124
|
+
|
|
12125
|
+
ask(30);
|
|
11786
12126
|
}
|
|
11787
12127
|
|
|
11788
12128
|
clear() {
|
|
@@ -12070,7 +12410,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12070
12410
|
/* harmony export */ getInitials: () => (/* binding */ getInitials),
|
|
12071
12411
|
/* harmony export */ normalizeInitialsWords: () => (/* binding */ normalizeInitialsWords)
|
|
12072
12412
|
/* harmony export */ });
|
|
12073
|
-
|
|
12413
|
+
// c282-allow-start: input parsing (initials read from Russian names, C152)
|
|
12414
|
+
const INITIALS_SKIP_WORDS = new Set(["а", "без", "в", "во", "для", "до", "за", "из", "из-за", "из-под", "и", "к", "ко", "между", "на", "над", "о", "об", "от", "по", "под", "при", "про", "с", "со", "у", "через", "the", "a", "an", "and", "for", "from", "in", "of", "on", "to"]); // Words a name carries that are not the person's or the organisation's own
|
|
12415
|
+
// (owner decision C152 (3), 2026-11-14): legal forms (ООО «Ромашка» → Р),
|
|
12416
|
+
// titles (Dr. John Smith → JS) and name particles (Мария фон Штейн → МШ) are
|
|
12417
|
+
// skipped wherever they stand. Compared without case and without the dots
|
|
12418
|
+
// around them (normalizeInitialsWords strips those).
|
|
12419
|
+
|
|
12420
|
+
const INITIALS_SERVICE_WORDS = new Set([// legal forms
|
|
12421
|
+
"ооо", "оао", "зао", "пао", "ао", "нао", "ип", "нко", "ано", "гуп", "муп", "фгуп", "гбу", "мбу", "чоп", "llc", "inc", "ltd", "gmbh", "ag", "corp", "co", "llp", "plc", "lp", "bv", "oy", "ab", "srl", "sarl", // titles
|
|
12422
|
+
"dr", "prof", "mr", "mrs", "ms", "mx", "miss", "sir", "jr", "sr", "phd", "д-р", "проф", "акад", "г-н", "г-жа", "доц", // particles
|
|
12423
|
+
"фон", "ван", "дер", "де", "ди", "да", "дю", "ла", "ле", "ибн", "бен", "оглы", "кызы", "von", "van", "der", "den", "de", "di", "da", "du", "del", "della", "la", "le", "ten", "ter", "bin", "ibn"]); // c282-allow-end
|
|
12424
|
+
|
|
12074
12425
|
function normalizeInitialsWords(value = "") {
|
|
12075
12426
|
return String(value || "").trim().split(/[\s/|]+/).map(word => word.replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, "")).filter(Boolean);
|
|
12076
12427
|
} // The first character a reader sees: a whole grapheme, so a letter written
|
|
@@ -12103,6 +12454,10 @@ function firstGrapheme(word) {
|
|
|
12103
12454
|
// «Жан-Поль» → «ЖП» one hyphenated word reads as its parts
|
|
12104
12455
|
// «Анна-Мария Смирнова» → «АС» ...but a name of several words by its words
|
|
12105
12456
|
// «Анна» → «А»
|
|
12457
|
+
// «ООО «Ромашка»» → «Р» legal forms, titles, particles skipped (C152)
|
|
12458
|
+
// «Мария фон Штейн» → «МШ»
|
|
12459
|
+
// «Dr. John Smith» → «JS»
|
|
12460
|
+
// «anna@simai.ru» → «A» an address: the first letter before «@»
|
|
12106
12461
|
// «» → '' or `fallback`: '?' where text must stand
|
|
12107
12462
|
//
|
|
12108
12463
|
// `maxLetters` caps the letters (two), `skipWords` replaces the skipped words,
|
|
@@ -12116,7 +12471,21 @@ function getInitials(value = "", options = {}) {
|
|
|
12116
12471
|
fallback = "",
|
|
12117
12472
|
locale
|
|
12118
12473
|
} = options;
|
|
12119
|
-
|
|
12474
|
+
let source = String(value ?? "").trim(); // An address reads by the name before «@»: one letter (C152 (3)),
|
|
12475
|
+
// anna@simai.ru → A, not the letters of its parts.
|
|
12476
|
+
|
|
12477
|
+
if (/^[^\s@]+@[^\s@]+$/u.test(source)) {
|
|
12478
|
+
const local = normalizeInitialsWords(source.slice(0, source.indexOf("@")).replace(/[._+-]+/gu, " "));
|
|
12479
|
+
if (!local.length) return String(fallback);
|
|
12480
|
+
const letter = firstGrapheme(local[0]);
|
|
12481
|
+
return (locale ? letter.toLocaleUpperCase(locale) : letter.toUpperCase()) || String(fallback);
|
|
12482
|
+
}
|
|
12483
|
+
|
|
12484
|
+
const allWords = normalizeInitialsWords(source); // Legal forms, titles and particles go first; a name made of them alone
|
|
12485
|
+
// keeps them, so it still has initials.
|
|
12486
|
+
|
|
12487
|
+
const ownWords = allWords.filter(word => !INITIALS_SERVICE_WORDS.has(String(word).toLowerCase()));
|
|
12488
|
+
const words = ownWords.length ? ownWords : allWords;
|
|
12120
12489
|
let significantWords = words.filter((word, index) => index === 0 || !skipWords.has(String(word).toLowerCase())); // One word written with a hyphen or a dash is a compound name: its parts
|
|
12121
12490
|
// are its words. Split before the skip list, «из-за» would be two words.
|
|
12122
12491
|
|
|
@@ -12179,6 +12548,35 @@ module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.r
|
|
|
12179
12548
|
|
|
12180
12549
|
/***/ },
|
|
12181
12550
|
|
|
12551
|
+
/***/ "4294700087dc"
|
|
12552
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
12553
|
+
|
|
12554
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12555
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12556
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
12557
|
+
/* harmony export */ files: () => (/* binding */ files)
|
|
12558
|
+
/* harmony export */ });
|
|
12559
|
+
/* harmony import */ var _en_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3694b5e2bf39");
|
|
12560
|
+
// Written by scripts/build-language-packs.mjs from src/core/lang/built-in.json
|
|
12561
|
+
// (owner decision C282); do not edit. The words this bundle carries: the
|
|
12562
|
+
// built-in languages' (en); every other language comes from
|
|
12563
|
+
// a language file (core/lang/<code>.js or its parts).
|
|
12564
|
+
|
|
12565
|
+
|
|
12566
|
+
const files = { en: { runtime: _en_json__WEBPACK_IMPORTED_MODULE_0__.runtime } };
|
|
12567
|
+
|
|
12568
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ en: _en_json__WEBPACK_IMPORTED_MODULE_0__.runtime });
|
|
12569
|
+
|
|
12570
|
+
|
|
12571
|
+
/***/ },
|
|
12572
|
+
|
|
12573
|
+
/***/ "3694b5e2bf39"
|
|
12574
|
+
(module) {
|
|
12575
|
+
|
|
12576
|
+
module.exports = /*#__PURE__*/JSON.parse('{"runtime":{"b":"B","kb":"KB","mb":"MB","gb":"GB"}}');
|
|
12577
|
+
|
|
12578
|
+
/***/ },
|
|
12579
|
+
|
|
12182
12580
|
/***/ "c8da50be6e6c"
|
|
12183
12581
|
(module) {
|
|
12184
12582
|
|
|
@@ -12189,7 +12587,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"$comment":"Dated aliases of sf-chat-
|
|
|
12189
12587
|
/***/ "d90b68919aff"
|
|
12190
12588
|
(module) {
|
|
12191
12589
|
|
|
12192
|
-
module.exports = /*#__PURE__*/JSON.parse('{"id":"smart.chat-window","tag":"sf-chat-window","version":"1.14.
|
|
12590
|
+
module.exports = /*#__PURE__*/JSON.parse('{"id":"smart.chat-window","tag":"sf-chat-window","version":"1.14.4","kind":"leaf","settings":{"capabilities":{"type":"string","default":""},"landmark":{"type":"enum","values":["main","section"],"default":"main"},"heading-level":{"type":"number","integer":true,"min":1,"max":2,"default":1},"embedded":{"type":"boolean","default":false},"no-queue":{"type":"boolean","default":false},"me":{"type":"object","optional":true,"nullable":true},"conversations":{"type":"list","default":[]},"conversation":{"type":"object","optional":true,"nullable":true},"messages":{"type":"list","default":[]},"history":{"type":"object","default":{"has_older":false}},"feed-state":{"type":"enum","values":["ready","loading","revoked"],"default":"ready"},"limits":{"type":"object","default":{}},"interlocutors":{"type":"list","default":[]},"notice":{"type":"object","optional":true,"nullable":true},"conversation-list":{"type":"object","default":{"archived":false,"has_more":false,"loading":false}},"composer-files":{"type":"list","default":[]},"my-files":{"type":"object","optional":true,"nullable":true}},"values":{},"events":{"open":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"load-more":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"submit":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"retry":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"save":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"delete":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"read":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"rate":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"answer":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"check":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"stop":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"create":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"rename":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"archive":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"restore":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"select":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"query":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"pin":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true,"own-verb":true},"attach":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"detach":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true},"settled":{"carries":{"request-id":"string","intent":"string","payload":"object","answer":{"type":"enum","values":["applied","conflict","refused","unavailable"]},"reason":{"type":"string","nullable":true,"optional":true}}},"toggle":{"carries":{"kind":{"type":"enum","values":["find","preview","start","members"]},"open":"boolean","form":{"type":"enum","values":["private","group"],"optional":true}}},"react":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true,"own-verb":true},"apply":{"carries":{"request-id":"string","intent":{"type":"string"},"kind":{"type":"string","optional":true},"payload":{"type":"object"}},"cancelable":true,"own-verb":true}},"actions":{"set-data":{"with":{"data":"object"}},"settle":{"with":{"request-id":"string","result":"object"}},"start-conversation":{},"open-conversation":{"with":{"id":"id"}},"focus-composer":{},"open-files":{},"close-files":{"with":{"focus":{"type":"boolean","optional":true}}},"set-list-footer":{"with":{"node":{"type":"object","nullable":true}}},"open-find":{"with":{"query":{"type":"string","optional":true}}},"close-find":{"with":{"focus":{"type":"boolean","optional":true}}},"open-preview":{"with":{"source":{"type":"object"}}},"close-preview":{"with":{"focus":{"type":"boolean","optional":true}}},"open-start":{"with":{"kind":{"type":"enum","values":["private","group"],"optional":true}}},"close-start":{"with":{"focus":{"type":"boolean","optional":true}}},"open-members":{},"close-members":{"with":{"focus":{"type":"boolean","optional":true}}}},"port":{"id":"simai.chat-port","version":"1.0.0","contract":"src/core/contracts/ports/simai.chat-port/1.0.0/port.json"},"presentation":{"skeleton":{"late":[]}},"host-states":{"data-find-open":"boolean","data-preview-open":"boolean","data-start-open":"boolean","data-members-open":"boolean"},"css-variables":{"--sf-chat-window-side-width":{"type":"length","state":"default"},"--sf-chat-window-side-color":{"type":"color","state":"default"},"--sf-chat-window-width":{"type":"length","state":"default"},"--sf-chat-window-text-color":{"type":"color","state":"default"},"--sf-chat-window-muted-color":{"type":"color","state":"default"},"--sf-chat-window-border-color":{"type":"color","state":"default"}}}');
|
|
12193
12591
|
|
|
12194
12592
|
/***/ },
|
|
12195
12593
|
|