spawn-term 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/assets/ink.cjs +30 -43
  2. package/assets/intl-adapter.cjs +1083 -0
  3. package/dist/cjs/components/App.cjs +4 -46
  4. package/dist/cjs/components/App.cjs.map +1 -1
  5. package/dist/cjs/components/ChildProcess.cjs +12 -54
  6. package/dist/cjs/components/ChildProcess.cjs.map +1 -1
  7. package/dist/cjs/components/Spinner.cjs +2 -3
  8. package/dist/cjs/components/Spinner.cjs.map +1 -1
  9. package/dist/cjs/createApp.cjs +4 -46
  10. package/dist/cjs/createApp.cjs.map +1 -1
  11. package/dist/cjs/index.cjs.cjs +16 -1
  12. package/dist/cjs/index.cjs.cjs.map +1 -1
  13. package/dist/cjs/index.esm.cjs +0 -2
  14. package/dist/cjs/index.esm.cjs.map +1 -1
  15. package/dist/cjs/ink.cjs +112 -0
  16. package/dist/cjs/ink.cjs.map +1 -0
  17. package/dist/cjs/types.cjs.map +1 -1
  18. package/dist/esm/components/App.mjs +1 -3
  19. package/dist/esm/components/App.mjs.map +1 -1
  20. package/dist/esm/components/ChildProcess.mjs +1 -3
  21. package/dist/esm/components/ChildProcess.mjs.map +1 -1
  22. package/dist/esm/components/Spinner.mjs +1 -3
  23. package/dist/esm/components/Spinner.mjs.map +1 -1
  24. package/dist/esm/createApp.mjs +3 -4
  25. package/dist/esm/createApp.mjs.map +1 -1
  26. package/dist/esm/index.cjs.mjs +12 -1
  27. package/dist/esm/index.cjs.mjs.map +1 -1
  28. package/dist/esm/index.esm.mjs +0 -2
  29. package/dist/esm/index.esm.mjs.map +1 -1
  30. package/dist/esm/ink.mjs +10 -0
  31. package/dist/esm/ink.mjs.map +1 -0
  32. package/dist/esm/types.mjs.map +1 -1
  33. package/dist/types/index.cjs.d.ts +4 -1
  34. package/dist/types/index.esm.d.ts +0 -2
  35. package/dist/types/ink.d.mts +15 -0
  36. package/dist/types/types.d.ts +1 -1
  37. package/package.json +3 -3
  38. package/assets/devtools.mjs +0 -4852
  39. package/assets/index.js +0 -10
  40. package/dist/cjs/lib/uuid.cjs +0 -27
  41. package/dist/cjs/lib/uuid.cjs.map +0 -1
  42. package/dist/esm/lib/uuid.mjs +0 -16
  43. package/dist/esm/lib/uuid.mjs.map +0 -1
  44. package/dist/types/lib/uuid.d.ts +0 -1
@@ -0,0 +1,1083 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return intlAdapter;
9
+ }
10
+ });
11
+ function _class_call_check(instance, Constructor) {
12
+ if (!(instance instanceof Constructor)) {
13
+ throw new TypeError("Cannot call a class as a function");
14
+ }
15
+ }
16
+ function _ts_generator(thisArg, body) {
17
+ var f, y, t, g, _ = {
18
+ label: 0,
19
+ sent: function() {
20
+ if (t[0] & 1) throw t[1];
21
+ return t[1];
22
+ },
23
+ trys: [],
24
+ ops: []
25
+ };
26
+ return g = {
27
+ next: verb(0),
28
+ "throw": verb(1),
29
+ "return": verb(2)
30
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
31
+ return this;
32
+ }), g;
33
+ function verb(n) {
34
+ return function(v) {
35
+ return step([
36
+ n,
37
+ v
38
+ ]);
39
+ };
40
+ }
41
+ function step(op) {
42
+ if (f) throw new TypeError("Generator is already executing.");
43
+ while(_)try {
44
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45
+ if (y = 0, t) op = [
46
+ op[0] & 2,
47
+ t.value
48
+ ];
49
+ switch(op[0]){
50
+ case 0:
51
+ case 1:
52
+ t = op;
53
+ break;
54
+ case 4:
55
+ _.label++;
56
+ return {
57
+ value: op[1],
58
+ done: false
59
+ };
60
+ case 5:
61
+ _.label++;
62
+ y = op[1];
63
+ op = [
64
+ 0
65
+ ];
66
+ continue;
67
+ case 7:
68
+ op = _.ops.pop();
69
+ _.trys.pop();
70
+ continue;
71
+ default:
72
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
73
+ _ = 0;
74
+ continue;
75
+ }
76
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
77
+ _.label = op[1];
78
+ break;
79
+ }
80
+ if (op[0] === 6 && _.label < t[1]) {
81
+ _.label = t[1];
82
+ t = op;
83
+ break;
84
+ }
85
+ if (t && _.label < t[2]) {
86
+ _.label = t[2];
87
+ _.ops.push(op);
88
+ break;
89
+ }
90
+ if (t[2]) _.ops.pop();
91
+ _.trys.pop();
92
+ continue;
93
+ }
94
+ op = body.call(thisArg, _);
95
+ } catch (e) {
96
+ op = [
97
+ 6,
98
+ e
99
+ ];
100
+ y = 0;
101
+ } finally{
102
+ f = t = 0;
103
+ }
104
+ if (op[0] & 5) throw op[1];
105
+ return {
106
+ value: op[0] ? op[1] : void 0,
107
+ done: true
108
+ };
109
+ }
110
+ }
111
+ function getDefaultExportFromCjs(x) {
112
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
113
+ }
114
+ var intlAdapter$1 = {};
115
+ var grapheme = {};
116
+ var core = {};
117
+ var hasRequiredCore;
118
+ function requireCore() {
119
+ if (hasRequiredCore) return core;
120
+ hasRequiredCore = 1;
121
+ core.initLookupTableBuffer = initLookupTableBuffer;
122
+ core.initUnicodeRangeBuffer = initUnicodeRangeBuffer;
123
+ core.searchUnicodeRange = searchUnicodeRange;
124
+ // @ts-check
125
+ /**
126
+ * @typedef {[from: number, to: number]} UnicodeRange
127
+ *
128
+ * [from..to] code points included
129
+ */ /**
130
+ * @template {number} T
131
+ * @typedef {[fro: number, to: number, category: T]} CategorizedUnicodeRange
132
+ */ /**
133
+ * @typedef {string & { __tag: 'LookupTableEncoding' }} LookupTableEncoding
134
+ *
135
+ * Base36 encoded {@link LookupTableBuffer} data. It's a sequence of `base36(code point)` with separators.
136
+ *
137
+ * Separator can be omitted if each value is small (=< 36)
138
+ */ /**
139
+ * @typedef {Array<number> & { __tag: 'LookupTableBuffer' }} LookupTableBuffer
140
+ *
141
+ * Value lookup table serialized into a TypedArray
142
+ */ /**
143
+ * @typedef {Array<number> & { __tag: 'UnicodeRangeBuffer' }} UnicodeRangeBuffer
144
+ *
145
+ * {@link UnicodeRange} data serialized into a TypedArray
146
+ *
147
+ * It's a dense array like `[from,to,from,to,...]`
148
+ * So always has an even length and is quantized into 2-items chunks.
149
+ *
150
+ * The pairs must be sorted in ascending order to allow binary search.
151
+ */ /**
152
+ * @typedef {string & { __tag: 'UnicodeRangeEncoding' }} UnicodeRangeEncoding
153
+ *
154
+ * Base36 encoded {@link UnicodeRangeBuffer} data. It's a sequence of `base36(code point),base36(padding)`
155
+ *
156
+ * Value `0` is represented as empty strings
157
+ */ /**
158
+ * @template {object} Ext
159
+ * @typedef {{
160
+ * segment: string,
161
+ * index: number,
162
+ * input: string,
163
+ * } & Ext} SegmentOutput
164
+ */ /**
165
+ * @template {object} T
166
+ * @typedef {IterableIterator<SegmentOutput<T>>} Segmenter
167
+ */ /**
168
+ * @template {number} T
169
+ * @param {T} x
170
+ * @param {UnicodeRangeBuffer} buffer
171
+ * @param {number} [sliceFrom]
172
+ * @param {number} [sliceTo]
173
+ * @return {number} index of including range, or -(low+1) if there isn't
174
+ */ function searchUnicodeRange(x, buffer) {
175
+ var sliceFrom = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, sliceTo = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : buffer.length;
176
+ var lo = sliceFrom;
177
+ var hi = sliceTo - 2;
178
+ while(lo <= hi){
179
+ var mid = lo + hi >> 1 & -2;
180
+ var l = buffer[mid], h = buffer[mid + 1];
181
+ if (l <= x && x <= h) {
182
+ return mid;
183
+ } else if (h < x) {
184
+ lo = mid + 2;
185
+ } else {
186
+ hi = mid - 2;
187
+ }
188
+ }
189
+ return -lo - 1;
190
+ }
191
+ /**
192
+ * @param {Array<number>} buffer
193
+ * @param {LookupTableEncoding} value
194
+ * @param {'' | ','} [sep = '']
195
+ * @return {LookupTableBuffer}
196
+ */ function initLookupTableBuffer(buffer, value) {
197
+ var sep = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : '';
198
+ var nums = value.split(sep).map(function(s) {
199
+ return s ? parseInt(s, 36) : 0;
200
+ });
201
+ for(var i = 0; i < nums.length; i++)buffer[i] = nums[i];
202
+ return /** @type {LookupTableBuffer} */ buffer;
203
+ }
204
+ /**
205
+ * @param {Array<number>} buffer
206
+ * @param {UnicodeRangeEncoding} value
207
+ * @return {UnicodeRangeBuffer}
208
+ */ function initUnicodeRangeBuffer(buffer, value) {
209
+ var nums = value.split(',').map(function(s) {
210
+ return s ? parseInt(s, 36) : 0;
211
+ });
212
+ for(var i = 0, n = 0; i < nums.length; i++)buffer[i] = i % 2 ? n + nums[i] : n = nums[i];
213
+ return /** @type {UnicodeRangeBuffer} */ buffer;
214
+ }
215
+ return core;
216
+ }
217
+ var utils = {};
218
+ var hasRequiredUtils;
219
+ function requireUtils() {
220
+ if (hasRequiredUtils) return utils;
221
+ hasRequiredUtils = 1;
222
+ utils.isBMP = isBMP;
223
+ utils.isHighSurrogate = isHighSurrogate;
224
+ utils.isLowSurrogate = isLowSurrogate;
225
+ utils.isSIP = isSIP;
226
+ utils.isSMP = isSMP;
227
+ utils.isSSP = isSSP;
228
+ utils.isTIP = isTIP;
229
+ utils.surrogatePairToCodePoint = surrogatePairToCodePoint;
230
+ utils.takeChar = takeChar;
231
+ utils.takeCodePoint = takeCodePoint;
232
+ // @ts-check
233
+ /**
234
+ * Take a Unicode code point from the given input by cursor
235
+ *
236
+ * @deprecated
237
+ * Use this only if `String.prototype.codePointAt()` isn't available on the host environment
238
+ *
239
+ * @param {string} input
240
+ * @param {number} cursor
241
+ * @param {number} [length] length of input
242
+ * @return {number} a code point of the character
243
+ */ function takeCodePoint(input, cursor) {
244
+ var length = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : input.length;
245
+ var hi = input.charCodeAt(cursor);
246
+ if (isHighSurrogate(hi)) {
247
+ if (cursor + 1 < length) {
248
+ var lo = input.charCodeAt(cursor + 1);
249
+ if (isLowSurrogate(lo)) {
250
+ return surrogatePairToCodePoint(hi, lo);
251
+ }
252
+ }
253
+ }
254
+ return hi;
255
+ }
256
+ /**
257
+ * Take a UTF-8 char from the given input by cursor
258
+ *
259
+ * @deprecated
260
+ * Use this only if `String.fromCodePoint()` isn't available on the host environment
261
+ *
262
+ * @param {string} input
263
+ * @param {number} cursor
264
+ * @param {number} [length] length of input
265
+ * @return {string} a UTF-8 character (its `.length` will be 1 or 2)
266
+ */ function takeChar(input, cursor) {
267
+ var length = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : input.length;
268
+ var hi = input.charCodeAt(cursor);
269
+ if (isHighSurrogate(hi)) {
270
+ if (cursor + 1 < length) {
271
+ var lo = input.charCodeAt(cursor + 1);
272
+ if (isLowSurrogate(lo)) {
273
+ // This seems to be much slower in V8
274
+ // return String.fromCharCode(hi, lo);
275
+ return String.fromCharCode(hi) + String.fromCharCode(lo);
276
+ }
277
+ }
278
+ }
279
+ return String.fromCharCode(hi);
280
+ }
281
+ /**
282
+ * @param {number} c UTF-16 code point
283
+ */ function isHighSurrogate(c) {
284
+ return 0xd800 <= c && c <= 0xdbff;
285
+ }
286
+ /**
287
+ * @param {number} c UTF-16 code point
288
+ */ function isLowSurrogate(c) {
289
+ return 0xdc00 <= c && c <= 0xdfff;
290
+ }
291
+ /**
292
+ * @param {number} hi high surrogate
293
+ * @param {number} lo low surrogate
294
+ */ function surrogatePairToCodePoint(hi, lo) {
295
+ return (hi - 0xd800 << 10) + (lo - 0xdc00) + 0x10000;
296
+ }
297
+ /**
298
+ * Check if given code point is within the BMP(Basic Multilingual Plane)
299
+ *
300
+ * @param {number} c Unicode code point
301
+ * @return {boolean}
302
+ */ function isBMP(c) {
303
+ return c <= 0xffff;
304
+ }
305
+ /**
306
+ * Check if given code point is within the SMP(Supplementary Multilingual Plane)
307
+ *
308
+ * @param {number} c Unicode code point
309
+ * @return {boolean}
310
+ */ function isSMP(c) {
311
+ return 0x10000 <= c && c <= 0x1ffff;
312
+ }
313
+ /**
314
+ * Check if given code point is within the SIP(Supplementary Ideographic Plane)
315
+ *
316
+ * @param {number} c Unicode code point
317
+ * @return {boolean}
318
+ */ function isSIP(c) {
319
+ return 0x20000 <= c && c <= 0x2ffff;
320
+ }
321
+ /**
322
+ * Check if given code point is within the TIP(Tertiary Ideographic Plane)
323
+ *
324
+ * @param {number} c Unicode code point
325
+ * @return {boolean}
326
+ */ function isTIP(c) {
327
+ return 0x30000 <= c && c <= 0x3ffff;
328
+ }
329
+ /**
330
+ * Check if given code point is within the SSP(Supplementary Special-purpose Plane)
331
+ *
332
+ * @param {number} c Unicode code point
333
+ * @return {boolean}
334
+ */ function isSSP(c) {
335
+ return 0xe0000 <= c && c <= 0xeffff;
336
+ }
337
+ return utils;
338
+ }
339
+ var _grapheme_data = {};
340
+ var hasRequired_grapheme_data;
341
+ function require_grapheme_data() {
342
+ if (hasRequired_grapheme_data) return _grapheme_data;
343
+ hasRequired_grapheme_data = 1;
344
+ _grapheme_data.GraphemeCategory = undefined;
345
+ _grapheme_data.findGraphemeIndex = findGraphemeIndex;
346
+ _grapheme_data.grapheme_cats = _grapheme_data.grapheme_buffer = undefined;
347
+ var _core = /*@__PURE__*/ requireCore();
348
+ // The following code was generated by "scripts/unicode.js",
349
+ // DO NOT EDIT DIRECTLY.
350
+ //
351
+ // @ts-check
352
+ /**
353
+ * @typedef {import('./core.js').LookupTableEncoding} LookupTableEncoding
354
+ * @typedef {import('./core.js').UnicodeRangeEncoding} UnicodeRangeEncoding
355
+ */ /**
356
+ * @typedef {0} GC_Any
357
+ * @typedef {1} GC_CR
358
+ * @typedef {2} GC_Control
359
+ * @typedef {3} GC_Extend
360
+ * @typedef {4} GC_Extended_Pictographic
361
+ * @typedef {5} GC_L
362
+ * @typedef {6} GC_LF
363
+ * @typedef {7} GC_LV
364
+ * @typedef {8} GC_LVT
365
+ * @typedef {9} GC_Prepend
366
+ * @typedef {10} GC_Regional_Indicator
367
+ * @typedef {11} GC_SpacingMark
368
+ * @typedef {12} GC_T
369
+ * @typedef {13} GC_V
370
+ * @typedef {14} GC_ZWJ
371
+ * @typedef {(
372
+ * | GC_Any
373
+ * | GC_CR
374
+ * | GC_Control
375
+ * | GC_Extend
376
+ * | GC_Extended_Pictographic
377
+ * | GC_L
378
+ * | GC_LF
379
+ * | GC_LV
380
+ * | GC_LVT
381
+ * | GC_Prepend
382
+ * | GC_Regional_Indicator
383
+ * | GC_SpacingMark
384
+ * | GC_T
385
+ * | GC_V
386
+ * | GC_ZWJ
387
+ * )} GraphemeCategoryNum
388
+ */ /**
389
+ * @typedef {import('./core.js').CategorizedUnicodeRange<GraphemeCategoryNum>} GraphemeCategoryRange
390
+ */ /**
391
+ * @typedef {(
392
+ * | 'Any'
393
+ * | 'CR'
394
+ * | 'Control'
395
+ * | 'Extend'
396
+ * | 'Extended_Pictographic'
397
+ * | 'L'
398
+ * | 'LF'
399
+ * | 'LV'
400
+ * | 'LVT'
401
+ * | 'Prepend'
402
+ * | 'Regional_Indicator'
403
+ * | 'SpacingMark'
404
+ * | 'T'
405
+ * | 'V'
406
+ * | 'ZWJ'
407
+ * )} GraphemeCategoryKey
408
+ */ /**
409
+ * Grapheme category enum
410
+ *
411
+ * Note: The enum object is not actually `Object.freeze`
412
+ * because it increases 800 bytes of Brotli compression... Not sure why :P
413
+ *
414
+ * @type {Readonly<Record<GraphemeCategoryKey, GraphemeCategoryNum>>}
415
+ */ _grapheme_data.GraphemeCategory = {
416
+ Any: 0,
417
+ CR: 1,
418
+ Control: 2,
419
+ Extend: 3,
420
+ Extended_Pictographic: 4,
421
+ L: 5,
422
+ LF: 6,
423
+ LV: 7,
424
+ LVT: 8,
425
+ Prepend: 9,
426
+ Regional_Indicator: 10,
427
+ SpacingMark: 11,
428
+ T: 12,
429
+ V: 13,
430
+ ZWJ: 14
431
+ };
432
+ var grapheme_buffer = _grapheme_data.grapheme_buffer = (0, _core.initUnicodeRangeBuffer)(Array(2908), /** @type {UnicodeRangeEncoding} */ ',9,a,,b,1,d,,e,h,3j,w,4p,,4t,,4u,,lc,33,w3,6,13l,18,14v,,14x,1,150,1,153,,16o,5,174,a,17g,,18r,k,19s,,1cm,6,1ct,,1cv,5,1d3,1,1d6,3,1e7,,1e9,,1f4,q,1ie,a,1kb,8,1kt,,1li,3,1ln,8,1lx,2,1m1,4,1nd,2,1ow,1,1p3,8,1qi,n,1r6,,1r7,v,1s3,,1tm,,1tn,,1to,,1tq,2,1tt,7,1u1,3,1u5,,1u6,1,1u9,6,1uq,1,1vl,,1vm,1,1x8,,1xa,,1xb,1,1xd,3,1xj,1,1xn,1,1xp,,1xz,,1ya,1,1z2,,1z5,1,1z7,,20s,,20u,2,20x,1,213,1,217,2,21d,,228,1,22d,,22p,1,22r,,24c,,24e,2,24h,4,24n,1,24p,,24r,1,24t,,25e,1,262,5,269,,26a,1,27w,,27y,1,280,,281,3,287,1,28b,1,28d,,28l,2,28y,1,29u,,2bi,,2bj,,2bk,,2bl,1,2bq,2,2bu,2,2bx,,2c7,,2dc,,2dd,2,2dg,,2f0,,2f2,2,2f5,3,2fa,2,2fe,3,2fp,1,2g2,1,2gx,,2gy,1,2ik,,2im,,2in,1,2ip,,2iq,,2ir,1,2iu,2,2iy,3,2j9,1,2jm,1,2k3,,2kg,1,2ki,1,2m3,1,2m6,,2m7,1,2m9,3,2me,2,2mi,2,2ml,,2mm,,2mv,,2n6,1,2o1,,2o2,1,2q2,,2q7,,2q8,1,2qa,2,2qe,,2qg,6,2qn,,2r6,1,2sx,,2sz,,2t0,6,2tj,7,2wh,,2wj,,2wk,8,2x4,6,2zc,1,305,,307,,309,,30e,1,31t,d,327,,328,4,32e,1,32l,a,32x,z,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,,zx5,q,zxw,,zxx,q,zyo,,zyp,q,zzg,,zzh,q,1008,,1009,q,1010,,1011,q,101s,,101t,q,102k,,102l,q,103c,,103d,q,1044,,1045,q,104w,,104x,q,105o,,105p,q,106g,,106h,q,1078,,1079,q,1080,,1081,q,108s,,108t,q,109k,,109l,q,10ac,,10ad,q,10b4,,10b5,q,10bw,,10bx,q,10co,,10cp,q,10dg,,10dh,q,10e8,,10e9,q,10f0,,10f1,q,10fs,,10ft,q,10gk,,10gl,q,10hc,,10hd,q,10i4,,10i5,q,10iw,,10ix,q,10jo,,10jp,q,10kg,,10kh,q,10l8,,10l9,q,10m0,,10m1,q,10ms,,10mt,q,10nk,,10nl,q,10oc,,10od,q,10p4,,10p5,q,10pw,,10px,q,10qo,,10qp,q,10rg,,10rh,q,10s8,,10s9,q,10t0,,10t1,q,10ts,,10tt,q,10uk,,10ul,q,10vc,,10vd,q,10w4,,10w5,q,10ww,,10wx,q,10xo,,10xp,q,10yg,,10yh,q,10z8,,10z9,q,1100,,1101,q,110s,,110t,q,111k,,111l,q,112c,,112d,q,1134,,1135,q,113w,,113x,q,114o,,114p,q,115g,,115h,q,1168,,1169,q,1170,,1171,q,117s,,117t,q,118k,,118l,q,119c,,119d,q,11a4,,11a5,q,11aw,,11ax,q,11bo,,11bp,q,11cg,,11ch,q,11d8,,11d9,q,11e0,,11e1,q,11es,,11et,q,11fk,,11fl,q,11gc,,11gd,q,11h4,,11h5,q,11hw,,11hx,q,11io,,11ip,q,11jg,,11jh,q,11k8,,11k9,q,11l0,,11l1,q,11ls,,11lt,q,11mk,,11ml,q,11nc,,11nd,q,11o4,,11o5,q,11ow,,11ox,q,11po,,11pp,q,11qg,,11qh,q,11r8,,11r9,q,11s0,,11s1,q,11ss,,11st,q,11tk,,11tl,q,11uc,,11ud,q,11v4,,11v5,q,11vw,,11vx,q,11wo,,11wp,q,11xg,,11xh,q,11y8,,11y9,q,11z0,,11z1,q,11zs,,11zt,q,120k,,120l,q,121c,,121d,q,1224,,1225,q,122w,,122x,q,123o,,123p,q,124g,,124h,q,1258,,1259,q,1260,,1261,q,126s,,126t,q,127k,,127l,q,128c,,128d,q,1294,,1295,q,129w,,129x,q,12ao,,12ap,q,12bg,,12bh,q,12c8,,12c9,q,12d0,,12d1,q,12ds,,12dt,q,12ek,,12el,q,12fc,,12fd,q,12g4,,12g5,q,12gw,,12gx,q,12ho,,12hp,q,12ig,,12ih,q,12j8,,12j9,q,12k0,,12k1,q,12ks,,12kt,q,12lk,,12ll,q,12mc,,12md,q,12n4,,12n5,q,12nw,,12nx,q,12oo,,12op,q,12pg,,12ph,q,12q8,,12q9,q,12r0,,12r1,q,12rs,,12rt,q,12sk,,12sl,q,12tc,,12td,q,12u4,,12u5,q,12uw,,12ux,q,12vo,,12vp,q,12wg,,12wh,q,12x8,,12x9,q,12y0,,12y1,q,12ys,,12yt,q,12zk,,12zl,q,130c,,130d,q,1314,,1315,q,131w,,131x,q,132o,,132p,q,133g,,133h,q,1348,,1349,q,1350,,1351,q,135s,,135t,q,136k,,136l,q,137c,,137d,q,1384,,1385,q,138w,,138x,q,139o,,139p,q,13ag,,13ah,q,13b8,,13b9,q,13c0,,13c1,q,13cs,,13ct,q,13dk,,13dl,q,13ec,,13ed,q,13f4,,13f5,q,13fw,,13fx,q,13go,,13gp,q,13hg,,13hh,q,13i8,,13i9,q,13j0,,13j1,q,13js,,13jt,q,13kk,,13kl,q,13lc,,13ld,q,13m4,,13m5,q,13mw,,13mx,q,13no,,13np,q,13og,,13oh,q,13p8,,13p9,q,13q0,,13q1,q,13qs,,13qt,q,13rk,,13rl,q,13sc,,13sd,q,13t4,,13t5,q,13tw,,13tx,q,13uo,,13up,q,13vg,,13vh,q,13w8,,13w9,q,13x0,,13x1,q,13xs,,13xt,q,13yk,,13yl,q,13zc,,13zd,q,1404,,1405,q,140w,,140x,q,141o,,141p,q,142g,,142h,q,1438,,1439,q,1440,,1441,q,144s,,144t,q,145k,,145l,q,146c,,146d,q,1474,,1475,q,147w,,147x,q,148o,,148p,q,149g,,149h,q,14a8,,14a9,q,14b0,,14b1,q,14bs,,14bt,q,14ck,,14cl,q,14dc,,14dd,q,14e4,,14e5,q,14ew,,14ex,q,14fo,,14fp,q,14gg,,14gh,q,14h8,,14h9,q,14i0,,14i1,q,14is,,14it,q,14jk,,14jl,q,14kc,,14kd,q,14l4,,14l5,q,14lw,,14lx,q,14mo,,14mp,q,14ng,,14nh,q,14o8,,14o9,q,14p0,,14p1,q,14ps,,14pt,q,14qk,,14ql,q,14rc,,14rd,q,14s4,,14s5,q,14sw,,14sx,q,14to,,14tp,q,14ug,,14uh,q,14v8,,14v9,q,14w0,,14w1,q,14ws,,14wt,q,14xk,,14xl,q,14yc,,14yd,q,14z4,,14z5,q,14zw,,14zx,q,150o,,150p,q,151g,,151h,q,1528,,1529,q,1530,,1531,q,153s,,153t,q,154k,,154l,q,155c,,155d,q,1564,,1565,q,156w,,156x,q,157o,,157p,q,158g,,158h,q,1598,,1599,q,15a0,,15a1,q,15as,,15at,q,15bk,,15bl,q,15cc,,15cd,q,15d4,,15d5,q,15dw,,15dx,q,15eo,,15ep,q,15fg,,15fh,q,15g8,,15g9,q,15h0,,15h1,q,15hs,,15ht,q,15ik,,15il,q,15jc,,15jd,q,15k4,,15k5,q,15kw,,15kx,q,15lo,,15lp,q,15mg,,15mh,q,15n8,,15n9,q,15o0,,15o1,q,15os,,15ot,q,15pk,,15pl,q,15qc,,15qd,q,15r4,,15r5,q,15rw,,15rx,q,15so,,15sp,q,15tg,,15th,q,15u8,,15u9,q,15v0,,15v1,q,15vs,,15vt,q,15wk,,15wl,q,15xc,,15xd,q,15y4,,15y5,q,15yw,,15yx,q,15zo,,15zp,q,160g,,160h,q,1618,,1619,q,1620,,1621,q,162s,,162t,q,163k,,163l,q,164c,,164d,q,1654,,1655,q,165w,,165x,q,166o,,166p,q,167g,,167h,q,1688,,1689,q,1690,,1691,q,169s,,169t,q,16ak,,16al,q,16bc,,16bd,q,16c4,,16c5,q,16cw,,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o4,3,1joa,1,1joc,3,1jog,,1jok,,1jpd,9,1jqr,5,1jqx,,1jqy,,1jqz,3,1jrb,,1jrl,5,1jrr,1,1jrt,2,1jt0,5,1jt6,c,1jtj,,1jtk,1,1k4v,,1k4w,6,1k54,5,1k5a,,1k5b,,1k7m,l,1k89,,1k8a,6,1k8h,,1k8i,1,1k8k,,1k8l,1,1kc1,5,1kca,,1kcc,1,1kcf,6,1kcm,,1kcn,,1kei,4,1keo,1,1ker,1,1ket,,1keu,,1kev,,1koj,1,1kol,1,1kow,1,1koy,,1koz,,1kqc,1,1kqe,4,1kqm,1,1kqo,2,1kre,,1ovk,f,1ow0,,1ow7,e,1xr2,b,1xre,2,1xrh,2,1zow,4,1zqo,6,206b,,206f,3,20jz,,20k1,1i,20lr,3,20o4,,20og,1,2ftp,1,2fts,3,2jgg,19,2jhs,m,2jxh,4,2jxp,5,2jxv,7,2jy3,7,2jyd,6,2jze,3,2k3m,2,2lmo,1i,2lob,1d,2lpx,,2lqc,,2lqz,4,2lr5,e,2mtc,6,2mtk,g,2mu3,6,2mub,1,2mue,4,2mxb,,2n1s,6,2nce,,2ne4,3,2nsc,3,2nzi,1,2ok0,6,2on8,6,2pz4,73,2q6l,2,2q7j,,2q98,5,2q9q,1,2qa6,,2qa9,9,2qb1,1k,2qcm,p,2qdd,e,2qe2,,2qen,,2qeq,8,2qf0,3,2qfd,c1,2qrf,4,2qrk,8t,2r0m,7d,2r9c,3j,2rg4,b,2rit,16,2rkc,3,2rm0,7,2rmi,5,2rns,7,2rou,29,2rrg,1a,2rss,9,2rt3,c8,2scg,sd,jny8,v,jnz4,2n,jo1s,3j,jo5c,6n,joc0,2rz');
433
+ _grapheme_data.grapheme_cats = (0, _core.initLookupTableBuffer)(Array(1454), /** @type {LookupTableEncoding} */ '262122424333333393233393339333333333393393b3b3b3b3b333b33b3bb33333b3b3333333b3b33bb3333b33b3bb33333b3bbb333b333b33333b3b3b3b3333b3b33b3bb39333b33b33b3b3b333b333333b3b333333b33b3b3333b3335dc333333b3b3b33323333b3bb3b33b3b3b3333b3333b3b333bb3b33b3b3b3b3b333b333b3323e2244234444444444444444444444444444444444444444443333443443333333b3b3bb33333b353b3b3b3b333b3b333b333333b3bb3b3b3bb3787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878dc333232333333333333333b3b3333bb3b393933b3b33bb3b393b3b3b3333b33b33b3bbb33b333b3333bb3933b3b3b333b3b3b3b3b33b3b3b33b3b3b33b3b33b33b3b3b33bb39b9b3b33b3b33b9333b393b3b33b33b3b3b3333393b3b3b33b39bb3b332333b333dd3b33332333323333333333333333333333344444444a44444434444444444444423232');
434
+ var grapheme_lookup = (0, _core.initLookupTableBuffer)(Array(128), /** @type {LookupTableEncoding} */ ',a,w,2y,4r,5a,5m,6w,79,7s,8j,8o,8r,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,8x,91,ai,cj,el,gl,in,kn,mp,oq,qr,st,ut,wq,wq,wq,wq,wq,wq,wq,wq,wq,wr,ww,wz,wz,x5,xb,z5,10c,118,126,126,126,126,126,126,129,129,129,129,129,129,129,129,129,129,129,12c,12c,12e,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12l,12n,12n,12n,12n,12p,12w,12w,132,132,13b,13d,13f,13f,13v,140,148', ',');
435
+ /**
436
+ * @param {number} cp
437
+ * @return Index of {@link grapheme_ranges} if found, or negation of last visited low cursor.
438
+ */ function findGraphemeIndex(cp) {
439
+ // Perform a quick O(1) lookup in a precomputed table to determine
440
+ // the slice of the range table to search in.
441
+ var lookup_table = grapheme_lookup;
442
+ var lookup_interval = 1024;
443
+ var idx = cp / lookup_interval | 0;
444
+ // If the `idx` is outside of the precomputed table - use the slice
445
+ // starting from the last covered index in the precomputed table and
446
+ // ending with the length of the range table.
447
+ var sliceFrom = 1448, sliceTo = 1454;
448
+ if (idx + 1 < lookup_table.length) {
449
+ sliceFrom = lookup_table[idx];
450
+ sliceTo = lookup_table[idx + 1] + 1;
451
+ }
452
+ return (0, _core.searchUnicodeRange)(cp, grapheme_buffer, sliceFrom * 2, sliceTo * 2);
453
+ }
454
+ return _grapheme_data;
455
+ }
456
+ var _incb_data = {};
457
+ var hasRequired_incb_data;
458
+ function require_incb_data() {
459
+ if (hasRequired_incb_data) return _incb_data;
460
+ hasRequired_incb_data = 1;
461
+ _incb_data.consonant_buffer = undefined;
462
+ var _core = /*@__PURE__*/ requireCore();
463
+ // The following code was generated by "scripts/unicode.js",
464
+ // DO NOT EDIT DIRECTLY.
465
+ //
466
+ // @ts-check
467
+ /**
468
+ * @typedef {import('./core.js').UnicodeRangeEncoding} UnicodeRangeEncoding
469
+ */ /**
470
+ * The Unicode `Indic_Conjunct_Break=Consonant` derived property table
471
+ */ _incb_data.consonant_buffer = (0, _core.initUnicodeRangeBuffer)(Array(52), /** @type {UnicodeRangeEncoding} */ '1sl,10,1ug,7,1vc,7,1w5,j,1wq,6,1wy,,1x2,3,1y4,1,1y7,,1yo,1,239,j,23u,6,242,1,245,4,261,,26t,j,27e,6,27m,1,27p,4,28s,1,28v,,29d,,2dx,j,2ei,f,2fs,2,2l1,11');
472
+ return _incb_data;
473
+ }
474
+ var hasRequiredGrapheme;
475
+ function requireGrapheme() {
476
+ if (hasRequiredGrapheme) return grapheme;
477
+ hasRequiredGrapheme = 1;
478
+ grapheme.countGrapheme = grapheme.countGraphemes = countGraphemes;
479
+ grapheme.graphemeSegments = graphemeSegments;
480
+ grapheme.searchGraphemeCategory = grapheme.searchGrapheme = searchGraphemeCategory;
481
+ grapheme.splitGraphemes = splitGraphemes;
482
+ var _core = /*@__PURE__*/ requireCore();
483
+ var _utils = /*@__PURE__*/ requireUtils();
484
+ var _grapheme_data = /*@__PURE__*/ require_grapheme_data();
485
+ grapheme.GraphemeCategory = _grapheme_data.GraphemeCategory;
486
+ var _incb_data = /*@__PURE__*/ require_incb_data();
487
+ // Copyright 2012-2018 The Rust Project Developers. See the COPYRIGHT
488
+ // file at the top-level directory of this distribution and at
489
+ // http://rust-lang.org/COPYRIGHT.
490
+ //
491
+ // Licensed under the MIT license
492
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>.
493
+ //
494
+ // Modified original Rust library [source code]
495
+ // (https://github.com/unicode-rs/unicode-segmentation/blob/1f88570/src/grapheme.rs)
496
+ //
497
+ // to create JavaScript library [unicode-segmenter]
498
+ // (https://github.com/cometkim/unicode-segmenter)
499
+ // @ts-check
500
+ /**
501
+ * @typedef {import('./_grapheme_data.js').GC_Any} GC_Any
502
+ *
503
+ * @typedef {import('./_grapheme_data.js').GraphemeCategoryNum} GraphemeCategoryNum
504
+ * @typedef {import('./_grapheme_data.js').GraphemeCategoryRange} GraphemeCategoryRange
505
+ *
506
+ * @typedef {object} GraphemeSegmentExtra
507
+ * @property {GraphemeCategoryNum} _catBegin Beginning Grapheme_Cluster_Break category of the segment
508
+ * @property {GraphemeCategoryNum} _catEnd Ending Grapheme_Cluster_Break category of the segment
509
+ *
510
+ * @typedef {import('./core.js').Segmenter<GraphemeSegmentExtra>} GraphemeSegmenter
511
+ */ /**
512
+ * @deprecated DO NOT USE directly, will be removed in v1
513
+ * @param {number} cp
514
+ * @return A {@link GraphemeCategoryRange} value if found, or garbage value with {@link GC_Any} category.
515
+ */ function searchGraphemeCategory(cp) {
516
+ var index = (0, _grapheme_data.findGraphemeIndex)(cp);
517
+ if (index < 0) {
518
+ return [
519
+ 0,
520
+ 0,
521
+ 0 /* GC_Any */
522
+ ];
523
+ }
524
+ return [
525
+ _grapheme_data.grapheme_buffer[index],
526
+ _grapheme_data.grapheme_buffer[index + 1],
527
+ _grapheme_data.grapheme_cats[index >> 1]
528
+ ];
529
+ }
530
+ /**
531
+ * Unicode segmentation by extended grapheme rules.
532
+ *
533
+ * This is fully compatible with the {@link IntlSegmenter.segment} API
534
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment
535
+ *
536
+ * @param {string} input
537
+ * @return {GraphemeSegmenter} iterator for grapheme cluster segments
538
+ */ function graphemeSegments(input) {
539
+ var cursor, len, catBefore, catAfter, catBegin, cache, risCount, emoji, consonant, linker, incb, cp, index, segment;
540
+ return _ts_generator(this, function(_state) {
541
+ switch(_state.label){
542
+ case 0:
543
+ // do nothing on empty string
544
+ if (input === '') {
545
+ return [
546
+ 2
547
+ ];
548
+ }
549
+ /** @type {number} Current cursor position. */ cursor = 0;
550
+ /** @type {number} Total length of the input string. */ len = input.length;
551
+ /** @type {GraphemeCategoryNum | null} Category of codepoint immediately preceding cursor, if known. */ catBefore = null;
552
+ /** @type {GraphemeCategoryNum | null} Category of codepoint immediately preceding cursor, if known. */ catAfter = null;
553
+ /** @type {GraphemeCategoryNum | null} Beginning category of a segment */ catBegin = null;
554
+ /** @type {import('./_grapheme_data.js').GraphemeCategoryRange} */ cache = [
555
+ 0,
556
+ 0,
557
+ 2 /* GC_Control */
558
+ ];
559
+ /** @type {number} The number of RIS codepoints preceding `cursor`. */ risCount = 0;
560
+ /** Emoji state */ emoji = false;
561
+ /** InCB=Consonant */ consonant = false;
562
+ /** InCB=Linker */ linker = false;
563
+ /** InCB=Consonant InCB=Linker x InCB=Consonant */ incb = false;
564
+ cp = /** @type number */ input.codePointAt(cursor);
565
+ index = 0;
566
+ segment = '';
567
+ _state.label = 1;
568
+ case 1:
569
+ if (!true) return [
570
+ 3,
571
+ 7
572
+ ];
573
+ segment += input[cursor++];
574
+ if (!(0, _utils.isBMP)(cp)) {
575
+ segment += input[cursor++];
576
+ }
577
+ // Note: Of course the nullish coalescing is useful here,
578
+ // but avoid it for aggressive compatibility and perf claim
579
+ catBefore = catAfter;
580
+ if (catBefore === null) {
581
+ catBefore = cat(cp, cache);
582
+ catBegin = catBefore;
583
+ }
584
+ // Note: Lazily update `consonant` and `linker` state
585
+ // which is a extra overhead only for Hindi text.
586
+ if (!consonant && catBefore === 0) {
587
+ consonant = isIndicConjunctCosonant(cp);
588
+ } else if (catBefore === 3 /* Extend */ ) {
589
+ // Note: \p{InCB=Linker} is a subset of \p{Extend}
590
+ linker = isIndicConjunctLinker(cp);
591
+ }
592
+ if (!(cursor < len)) return [
593
+ 3,
594
+ 2
595
+ ];
596
+ cp = /** @type {number} */ input.codePointAt(cursor);
597
+ catAfter = cat(cp, cache);
598
+ return [
599
+ 3,
600
+ 4
601
+ ];
602
+ case 2:
603
+ return [
604
+ 4,
605
+ {
606
+ segment: segment,
607
+ index: index,
608
+ input: input,
609
+ _catBegin: /** @type {typeof catBefore} */ catBegin,
610
+ _catEnd: catBefore
611
+ }
612
+ ];
613
+ case 3:
614
+ _state.sent();
615
+ return [
616
+ 2
617
+ ];
618
+ case 4:
619
+ if (catBefore === 10 /* Regional_Indicator */ ) {
620
+ risCount += 1;
621
+ } else {
622
+ risCount = 0;
623
+ if (catAfter === 14 /* ZWJ */ && (catBefore === 3 /* Extend */ || catBefore === 4 /* Extended_Pictographic */ )) {
624
+ emoji = true;
625
+ } else if (catAfter === 0 /* Any */ ) {
626
+ // Note: Put GB9c rule checking here to reduce.
627
+ incb = consonant && linker && (consonant = isIndicConjunctCosonant(cp));
628
+ // It cannot be both a linker and a consonant.
629
+ linker = linker && !consonant;
630
+ }
631
+ }
632
+ if (!isBoundary(catBefore, catAfter, risCount, emoji, incb)) return [
633
+ 3,
634
+ 6
635
+ ];
636
+ return [
637
+ 4,
638
+ {
639
+ segment: segment,
640
+ index: index,
641
+ input: input,
642
+ _catBegin: /** @type {typeof catBefore} */ catBegin,
643
+ _catEnd: catBefore
644
+ }
645
+ ];
646
+ case 5:
647
+ _state.sent();
648
+ // flush
649
+ index = cursor;
650
+ segment = '';
651
+ emoji = false;
652
+ incb = false;
653
+ catBegin = catAfter;
654
+ _state.label = 6;
655
+ case 6:
656
+ return [
657
+ 3,
658
+ 1
659
+ ];
660
+ case 7:
661
+ return [
662
+ 2
663
+ ];
664
+ }
665
+ });
666
+ }
667
+ /**
668
+ * Count number of extended grapheme clusters in given text.
669
+ *
670
+ * NOTE:
671
+ *
672
+ * This function is a small wrapper around {@link graphemeSegments}.
673
+ *
674
+ * If you call it more than once at a time, consider memoization
675
+ * or use {@link graphemeSegments} or {@link splitGraphemes} once instead
676
+ *
677
+ * @param {string} text
678
+ * @return {number} count of grapheme clusters
679
+ */ function countGraphemes(text) {
680
+ var count = 0;
681
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
682
+ try {
683
+ for(var _iterator = graphemeSegments(text)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
684
+ var _ = _step.value;
685
+ count += 1;
686
+ }
687
+ } catch (err) {
688
+ _didIteratorError = true;
689
+ _iteratorError = err;
690
+ } finally{
691
+ try {
692
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
693
+ _iterator.return();
694
+ }
695
+ } finally{
696
+ if (_didIteratorError) {
697
+ throw _iteratorError;
698
+ }
699
+ }
700
+ }
701
+ return count;
702
+ }
703
+ /**
704
+ * Split given text into extended grapheme clusters.
705
+ *
706
+ * @param {string} text
707
+ * @return {IterableIterator<string>} iterator for grapheme clusters
708
+ *
709
+ * @see {@link graphemeSegments} if you need extra information.
710
+ *
711
+ * @example
712
+ * [...splitGraphemes('abc')] // => ['a', 'b', 'c']
713
+ */ function splitGraphemes(text) {
714
+ var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, s, err;
715
+ return _ts_generator(this, function(_state) {
716
+ switch(_state.label){
717
+ case 0:
718
+ _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
719
+ _state.label = 1;
720
+ case 1:
721
+ _state.trys.push([
722
+ 1,
723
+ 6,
724
+ 7,
725
+ 8
726
+ ]);
727
+ _iterator = graphemeSegments(text)[Symbol.iterator]();
728
+ _state.label = 2;
729
+ case 2:
730
+ if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
731
+ 3,
732
+ 5
733
+ ];
734
+ s = _step.value;
735
+ return [
736
+ 4,
737
+ s.segment
738
+ ];
739
+ case 3:
740
+ _state.sent();
741
+ _state.label = 4;
742
+ case 4:
743
+ _iteratorNormalCompletion = true;
744
+ return [
745
+ 3,
746
+ 2
747
+ ];
748
+ case 5:
749
+ return [
750
+ 3,
751
+ 8
752
+ ];
753
+ case 6:
754
+ err = _state.sent();
755
+ _didIteratorError = true;
756
+ _iteratorError = err;
757
+ return [
758
+ 3,
759
+ 8
760
+ ];
761
+ case 7:
762
+ try {
763
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
764
+ _iterator.return();
765
+ }
766
+ } finally{
767
+ if (_didIteratorError) {
768
+ throw _iteratorError;
769
+ }
770
+ }
771
+ return [
772
+ 7
773
+ ];
774
+ case 8:
775
+ return [
776
+ 2
777
+ ];
778
+ }
779
+ });
780
+ }
781
+ /**
782
+ * `Grapheme_Cluster_Break` property value of a given codepoint
783
+ *
784
+ * @see https://www.unicode.org/reports/tr29/tr29-43.html#Default_Grapheme_Cluster_Table
785
+ *
786
+ * @param {number} cp
787
+ * @param {import('./_grapheme_data.js').GraphemeCategoryRange} cache
788
+ * @return {GraphemeCategoryNum}
789
+ */ function cat(cp, cache) {
790
+ if (cp < 127) {
791
+ // Special-case optimization for ascii, except U+007F. This
792
+ // improves performance even for many primarily non-ascii texts,
793
+ // due to use of punctuation and white space characters from the
794
+ // ascii range.
795
+ if (cp >= 32) {
796
+ return 0 /* GC_Any */ ;
797
+ } else if (cp === 10) {
798
+ return 6 /* GC_LF */ ;
799
+ } else if (cp === 13) {
800
+ return 1 /* GC_CR */ ;
801
+ } else {
802
+ return 2 /* GC_Control */ ;
803
+ }
804
+ } else {
805
+ // If this char isn't within the cached range, update the cache to the
806
+ // range that includes it.
807
+ if (cp < cache[0] || cp > cache[1]) {
808
+ var index = (0, _grapheme_data.findGraphemeIndex)(cp);
809
+ if (index < 0) {
810
+ return 0;
811
+ }
812
+ cache[0] = _grapheme_data.grapheme_buffer[index];
813
+ cache[1] = _grapheme_data.grapheme_buffer[index + 1];
814
+ cache[2] = /** @type {GraphemeCategoryNum} */ _grapheme_data.grapheme_cats[index >> 1];
815
+ }
816
+ return cache[2];
817
+ }
818
+ }
819
+ /**
820
+ * @param {number} cp
821
+ * @return {boolean}
822
+ */ function isIndicConjunctCosonant(cp) {
823
+ return (0, _core.searchUnicodeRange)(cp, _incb_data.consonant_buffer) >= 0;
824
+ }
825
+ /**
826
+ * @param {number} cp
827
+ * @return {boolean}
828
+ */ function isIndicConjunctLinker(cp) {
829
+ return cp === 2381 /* 0x094D */ || cp === 2509 /* 0x09CD */ || cp === 2765 /* 0x0ACD */ || cp === 2893 /* 0x0B4D */ || cp === 3149 /* 0x0C4D */ || cp === 3405 /* 0x0D4D */ ;
830
+ }
831
+ /**
832
+ * @param {GraphemeCategoryNum} catBefore
833
+ * @param {GraphemeCategoryNum} catAfter
834
+ * @param {number} risCount Regional_Indicator state
835
+ * @param {boolean} emoji Extended_Pictographic state
836
+ * @param {boolean} incb Indic_Conjunct_Break state
837
+ * @return {boolean}
838
+ *
839
+ * @see https://www.unicode.org/reports/tr29/tr29-43.html#Grapheme_Cluster_Boundary_Rules
840
+ */ function isBoundary(catBefore, catAfter, risCount, emoji, incb) {
841
+ // GB3
842
+ if (catBefore === 1 && catAfter === 6) {
843
+ return false;
844
+ }
845
+ // GB4
846
+ if (catBefore === 1 || catBefore === 2 || catBefore === 6) {
847
+ return true;
848
+ }
849
+ // GB5
850
+ if (catAfter === 1 || catAfter === 2 || catAfter === 6) {
851
+ return true;
852
+ }
853
+ // GB6
854
+ if (catBefore === 5 && (catAfter === 5 || catAfter === 7 || catAfter === 8 || catAfter === 13)) {
855
+ return false;
856
+ }
857
+ // GB7
858
+ if ((catBefore === 7 || catBefore === 13) && (catAfter === 12 || catAfter === 13)) {
859
+ return false;
860
+ }
861
+ // GB8
862
+ if (catAfter === 12 && (catBefore === 8 || catBefore === 12)) {
863
+ return false;
864
+ }
865
+ // GB9
866
+ if (catAfter === 3 || catAfter === 14) {
867
+ return false;
868
+ }
869
+ // GB9a
870
+ if (catAfter === 11) {
871
+ return false;
872
+ }
873
+ // GB9b
874
+ if (catBefore === 9) {
875
+ return false;
876
+ }
877
+ // GB9c
878
+ if (catAfter === 0 && incb) {
879
+ return false;
880
+ }
881
+ // GB11
882
+ if (catBefore === 14 && catAfter === 4) {
883
+ return !emoji;
884
+ }
885
+ // GB12, GB13
886
+ if (catBefore === 10 && catAfter === 10) {
887
+ return risCount % 2 === 0;
888
+ }
889
+ // GB999
890
+ return true;
891
+ }
892
+ return grapheme;
893
+ }
894
+ var hasRequiredIntlAdapter;
895
+ function requireIntlAdapter() {
896
+ if (hasRequiredIntlAdapter) return intlAdapter$1;
897
+ hasRequiredIntlAdapter = 1;
898
+ intlAdapter$1.Segmenter = undefined;
899
+ var _grapheme = /*@__PURE__*/ requireGrapheme();
900
+ // @ts-check
901
+ var p_locale = Symbol();
902
+ var p_granularity = Symbol();
903
+ /**
904
+ * Adapter for `IntlSegmenter` API
905
+ *
906
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter
907
+ *
908
+ * @implements {IntlSegmenter}
909
+ */ var Segmenter = /*#__PURE__*/ function() {
910
+ "use strict";
911
+ function Segmenter(locale) {
912
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
913
+ _class_call_check(this, Segmenter);
914
+ var _options_granularity = options.granularity, granularity = _options_granularity === void 0 ? 'grapheme' : _options_granularity;
915
+ switch(granularity){
916
+ case 'grapheme':
917
+ break;
918
+ case 'word':
919
+ throw new TypeError('Unicode "word" segmenter is currently not implemented');
920
+ case 'sentence':
921
+ throw new TypeError('Unicode "sentence" segmenter is currently not implemented');
922
+ default:
923
+ throw new RangeError("Value ".concat(granularity, " out of range for IntlSegmenter options property granularity"));
924
+ }
925
+ /** @type {string} */ this[p_locale] = locale || 'en';
926
+ /** @type {Intl.ResolvedSegmenterOptions["granularity"]} */ this[p_granularity] = granularity;
927
+ }
928
+ var _proto = Segmenter.prototype;
929
+ /**
930
+ * Impelements {@link IntlSegmenter.segment}
931
+ *
932
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment
933
+ *
934
+ * @param {string} input
935
+ * @return {SegmentsAdapter}
936
+ */ _proto.segment = function segment(input) {
937
+ return new SegmentsAdapter(input);
938
+ };
939
+ /**
940
+ * Impelements {@link IntlSegmenter.resolvedOptions}
941
+ *
942
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions
943
+ * @return {Intl.ResolvedSegmenterOptions}
944
+ */ _proto.resolvedOptions = function resolvedOptions() {
945
+ return {
946
+ locale: this[p_locale],
947
+ granularity: this[p_granularity]
948
+ };
949
+ };
950
+ return Segmenter;
951
+ }();
952
+ /**
953
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments
954
+ * @implements {Intl.Segments}
955
+ */ intlAdapter$1.Segmenter = Segmenter;
956
+ var SegmentsAdapter = /*#__PURE__*/ function() {
957
+ "use strict";
958
+ function SegmentsAdapter(input) {
959
+ _class_call_check(this, SegmentsAdapter);
960
+ /** @type {string} */ this.input = input;
961
+ }
962
+ var _proto = SegmentsAdapter.prototype;
963
+ /**
964
+ * @return {Intl.SegmentIterator<Intl.SegmentData>}
965
+ */ _proto[Symbol.iterator] = function() {
966
+ var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _step_value, segment, index, input, err;
967
+ return _ts_generator(this, function(_state) {
968
+ switch(_state.label){
969
+ case 0:
970
+ _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
971
+ _state.label = 1;
972
+ case 1:
973
+ _state.trys.push([
974
+ 1,
975
+ 6,
976
+ 7,
977
+ 8
978
+ ]);
979
+ _iterator = (0, _grapheme.graphemeSegments)(this.input)[Symbol.iterator]();
980
+ _state.label = 2;
981
+ case 2:
982
+ if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
983
+ 3,
984
+ 5
985
+ ];
986
+ _step_value = _step.value, segment = _step_value.segment, index = _step_value.index, input = _step_value.input;
987
+ return [
988
+ 4,
989
+ {
990
+ segment: segment,
991
+ index: index,
992
+ input: input
993
+ }
994
+ ];
995
+ case 3:
996
+ _state.sent();
997
+ _state.label = 4;
998
+ case 4:
999
+ _iteratorNormalCompletion = true;
1000
+ return [
1001
+ 3,
1002
+ 2
1003
+ ];
1004
+ case 5:
1005
+ return [
1006
+ 3,
1007
+ 8
1008
+ ];
1009
+ case 6:
1010
+ err = _state.sent();
1011
+ _didIteratorError = true;
1012
+ _iteratorError = err;
1013
+ return [
1014
+ 3,
1015
+ 8
1016
+ ];
1017
+ case 7:
1018
+ try {
1019
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1020
+ _iterator.return();
1021
+ }
1022
+ } finally{
1023
+ if (_didIteratorError) {
1024
+ throw _iteratorError;
1025
+ }
1026
+ }
1027
+ return [
1028
+ 7
1029
+ ];
1030
+ case 8:
1031
+ return [
1032
+ 2
1033
+ ];
1034
+ }
1035
+ });
1036
+ };
1037
+ /**
1038
+ * Impelements {@link Intl.Segments.containing}
1039
+ *
1040
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing
1041
+ *
1042
+ * @param {number} [codeUnitIndex=0]
1043
+ * @return {Intl.SegmentData} A resolved segment data
1044
+ */ _proto.containing = function containing() {
1045
+ var codeUnitIndex = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1046
+ var offset = 0;
1047
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1048
+ try {
1049
+ // only grapheme segmenter is currently provided
1050
+ for(var _iterator = (0, _grapheme.graphemeSegments)(this.input)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1051
+ var x = _step.value;
1052
+ offset += x.segment.length;
1053
+ if (codeUnitIndex < offset) {
1054
+ return x;
1055
+ }
1056
+ }
1057
+ } catch (err) {
1058
+ _didIteratorError = true;
1059
+ _iteratorError = err;
1060
+ } finally{
1061
+ try {
1062
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1063
+ _iterator.return();
1064
+ }
1065
+ } finally{
1066
+ if (_didIteratorError) {
1067
+ throw _iteratorError;
1068
+ }
1069
+ }
1070
+ }
1071
+ // FIXME mistyped upstream
1072
+ // See https://github.com/microsoft/TypeScript/pull/58084
1073
+ // @ts-ignore `Segments.prototype.containing()` can actually returns `undefined`.
1074
+ return undefined;
1075
+ };
1076
+ return SegmentsAdapter;
1077
+ }();
1078
+ return intlAdapter$1;
1079
+ }
1080
+ var intlAdapterExports = requireIntlAdapter();
1081
+ var intlAdapter = /*@__PURE__*/ getDefaultExportFromCjs(intlAdapterExports);
1082
+
1083
+ /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) { }; module.exports = exports.default; }