@weft-js/text 0.0.0-stage → 0.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/LICENSE +38 -0
- package/README.md +103 -2
- package/dist/LICENSE +38 -0
- package/dist/LICENSE-pretext +229 -0
- package/dist/blink/chunk-2UTDV3NY.js +1 -0
- package/dist/blink/chunk-AVLP4LK4.js +1 -0
- package/dist/blink/chunk-LBFXENHK.js +1 -0
- package/dist/blink/chunk-LCLBVK2G.js +1 -0
- package/dist/blink/chunk-M5EVTPT6.js +1 -0
- package/dist/blink/engine.js +1 -0
- package/dist/blink/exact-SQQRYG6J.js +1 -0
- package/dist/blink/meta.json +1 -0
- package/dist/blink/pack-complex-TZ3EEWXH.js +1 -0
- package/dist/blink/pack-families-E2YTVA25.js +0 -0
- package/dist/blink/pack-rare-3377IVPF.js +0 -0
- package/dist/blink/pack-scripts-6AZOGP44.js +1 -0
- package/dist/blink/pack-spacing-ZXHYQEXD.js +1 -0
- package/dist/gecko/chunk-SWBCNRDA.js +1 -0
- package/dist/gecko/chunk-VN7PBWFN.js +1 -0
- package/dist/gecko/chunk-XRF67SWC.js +1 -0
- package/dist/gecko/engine.js +1 -0
- package/dist/gecko/meta.json +1 -0
- package/dist/gecko/pack-complex-ZRH5NAPR.js +1 -0
- package/dist/gecko/pack-families-34KO3CLI.js +0 -0
- package/dist/gecko/pack-rare-FDYU357Z.js +0 -0
- package/dist/gecko/pack-scripts-JJOHXLOT.js +1 -0
- package/dist/gecko/pack-spacing-CAG6CLVB.js +1 -0
- package/dist/index.js +1 -0
- package/dist/webkit/chunk-A4DB6TWP.js +1 -0
- package/dist/webkit/chunk-B3WIVP7S.js +1 -0
- package/dist/webkit/chunk-FEELTLSH.js +1 -0
- package/dist/webkit/chunk-JQWGQSV3.js +1 -0
- package/dist/webkit/chunk-M5EVTPT6.js +1 -0
- package/dist/webkit/chunk-SCKMN2PN.js +1 -0
- package/dist/webkit/engine.js +1 -0
- package/dist/webkit/exact-NKXB5V2W.js +1 -0
- package/dist/webkit/meta.json +1 -0
- package/dist/webkit/pack-complex-ZCMCV5WM.js +1 -0
- package/dist/webkit/pack-families-KIE64YFZ.js +1 -0
- package/dist/webkit/pack-rare-SSJ2B7KP.js +0 -0
- package/dist/webkit/pack-scripts-WIXSLWBC.js +1 -0
- package/dist/webkit/pack-spacing-UGCQZTVO.js +1 -0
- package/package.json +51 -4
- package/plugin/build.mjs +225 -0
- package/plugin/index.d.ts +40 -0
- package/plugin/index.mjs +79 -0
- package/plugin/measure.mjs +20 -0
- package/vendor/pretext/LICENSE +229 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ravonus
|
|
4
|
+
|
|
5
|
+
This package is a derived build of Pretext (@chenglou/pretext 1.0.0) by Cheng Lou and the Pretext
|
|
6
|
+
contributors, https://github.com/chenglou/pretext, used under its MIT licence. Pretext does the real work:
|
|
7
|
+
its ports of Blink's, WebKit's and Gecko's line breaking and its measurement rules are what this package
|
|
8
|
+
ships, specialised per engine and split into lazy chunks. vendor/pretext/ holds the unmodified source and
|
|
9
|
+
its LICENSE, with the notices of the Chromium, WebKit, ICU, ICU4X and Unicode sources it follows or is
|
|
10
|
+
generated from. Those notices apply to gen/ and dist/ too, and dist/LICENSE-pretext carries them.
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
|
|
30
|
+
------------------------------------------------------------------------------
|
|
31
|
+
|
|
32
|
+
Pretext, vendored in vendor/pretext/ and the source of gen/ and dist/:
|
|
33
|
+
|
|
34
|
+
MIT License
|
|
35
|
+
|
|
36
|
+
Copyright (c) 2026 Pretext contributors
|
|
37
|
+
|
|
38
|
+
The full text, with its third-party notices, is vendor/pretext/LICENSE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,104 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @weft-js/text
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Not released yet.** This package isn't published on its own. `weft docs fonts` covers what an app uses from it.
|
|
4
|
+
|
|
5
|
+
Fonts and text for weft. `text()` for `weft.config.ts` is the main entry, `@weft-js/text/build` is the Node-only font build, and `@weft-js/text/measure` and `@weft-js/text/engine` are what a browser loads: nothing Node-only reaches them.
|
|
6
|
+
|
|
7
|
+
## The engine
|
|
8
|
+
|
|
9
|
+
**A slim build of [Pretext](https://github.com/chenglou/pretext) by Cheng Lou (`@chenglou/pretext` 1.0.0, MIT).**
|
|
10
|
+
Pretext does the hard part: it ports Blink's, WebKit's and Gecko's line breaking and their measurement rules to
|
|
11
|
+
JavaScript, so a paragraph's height comes from arithmetic over canvas widths instead of DOM reflow. This package
|
|
12
|
+
changes none of that logic. It specialises Pretext per engine, cuts its tables down to a base alphabet, moves the
|
|
13
|
+
rest into lazy chunks, and puts a small "lite" tier in front for plain Latin and emoji text. Credit for the
|
|
14
|
+
engine goes to Pretext. Bugs in the slicing are ours. Research and numbers: `docs/research/12-text-engine-slim.md`.
|
|
15
|
+
|
|
16
|
+
## Size
|
|
17
|
+
|
|
18
|
+
Brotli 11 after terser, as `npm run build && npm run size` reports it. This build skips `npm run coverage`, which needs
|
|
19
|
+
Chrome, so the "rare" pack is empty and its code is still in the exact tier.
|
|
20
|
+
|
|
21
|
+
| Engine | Base chunk (what a page loads) | Exact tier (lazy) | Script data + CJK/SEA code (lazy) | Other lazy packs |
|
|
22
|
+
|---|---|---|---|---|
|
|
23
|
+
| Blink | **8.17 KB** | 11.22 KB | 12.37 KB | complex 2.0, spacing 0.8 |
|
|
24
|
+
| WebKit | **9.49 KB** | 10.14 KB | 10.31 KB | complex 2.2, spacing 0.8, families 1.9 |
|
|
25
|
+
| Gecko | 16.58 KB (exact tier in base; no lite tier yet) | n/a | 7.84 KB | complex 2.1, spacing 0.8 |
|
|
26
|
+
|
|
27
|
+
Upstream `prepare` + `layout` + `clearCache` was 33.9 KB br for all engines in one file when research 12 measured it. The base figures include
|
|
28
|
+
the 0.21 KB detector shell (`dist/index.js`).
|
|
29
|
+
|
|
30
|
+
## API
|
|
31
|
+
|
|
32
|
+
<!-- example: skip @weft-js/text/engine ships no type declarations yet, and text, width and lineHeight are yours -->
|
|
33
|
+
```ts
|
|
34
|
+
import { loadTextEngine } from '@weft-js/text/engine'
|
|
35
|
+
const te = await loadTextEngine() // loads only this browser's engine chunk
|
|
36
|
+
const h = te.prepare(text, '16px Inter', { whiteSpace: 'normal' })
|
|
37
|
+
const { height, lineCount } = te.layout(h, width, lineHeight)
|
|
38
|
+
const ranges = te.lines(h, width) // [{ width, start, end }], cursors as Pretext gives them
|
|
39
|
+
te.clear() // Pretext's clearCache(), plus the lite tier's caches
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
It follows weft's `MeasureProvider` contract (`prepare`, `layout`, `lines`, `lineText`, `clear`, see `src/types.ts`). Extras:
|
|
43
|
+
- `needs(text, font, opts)`: the lazy packs a text needs, from a scan of its code points.
|
|
44
|
+
- `load(packs)`: preload those packs.
|
|
45
|
+
- `setLocale()`.
|
|
46
|
+
|
|
47
|
+
`lineText(h, line)` needs a handle prepared with `{ segments: true }`. That works on both tiers: a lite handle keeps its
|
|
48
|
+
collapsed text and segment starts, so asking for strings doesn't load the exact tier.
|
|
49
|
+
|
|
50
|
+
A handle has `exact` and `ready`. While a pack it needs is still loading, `layout()` returns an estimate marked
|
|
51
|
+
`exact: false`. Once `ready` settles the same handle is exact, so there's no need to prepare it again. Call
|
|
52
|
+
`load(needs(...))` before preparing to never see an estimate.
|
|
53
|
+
|
|
54
|
+
## How it is built
|
|
55
|
+
|
|
56
|
+
- **`vendor/pretext/`** is the unmodified source of the pinned npm tarball. Its version, sha256 and integrity are in
|
|
57
|
+
`package.json` under `pretext`.
|
|
58
|
+
- **`scripts/specialize.mjs`** writes `gen/<engine>/`:
|
|
59
|
+
- It folds the engine profile to constants, so esbuild drops the other engines' code.
|
|
60
|
+
- It re-encodes the break data for that engine only, restricted to `src/alphabet.json`. The scan's state machines
|
|
61
|
+
are pruned to the states reachable over the alphabet's categories and then minimised.
|
|
62
|
+
- It moves CJK/Thai/kana, letter-spacing, WebKit generic-family and complex-walker code into lazy packs. Stubs
|
|
63
|
+
throw `PackMissing`, which the provider catches: it loads the pack and prepares again.
|
|
64
|
+
- Prepare-time code that never ran in `scripts/coverage.mjs` goes to a "rare" pack.
|
|
65
|
+
- **`src/lite.ts`** is the lite tier.
|
|
66
|
+
- It reuses Pretext's own break scan and canvas widths, and Pretext's simple line counter with its additions in
|
|
67
|
+
the same order.
|
|
68
|
+
- It runs only inside an envelope where every Pretext correction is zero:
|
|
69
|
+
- the base alphabet and `white-space: normal`;
|
|
70
|
+
- no NBSP or other glue, soft hyphens, bidi controls or unusual spaces;
|
|
71
|
+
- no letter spacing;
|
|
72
|
+
- the font must pass the same probes Pretext runs: space kerning at segment edges (Blink), emoji correction,
|
|
73
|
+
fullwidth curly quotes (Blink Han kerning) and generic families (WebKit).
|
|
74
|
+
- A layout narrower than the widest word needs emergency breaks, so it goes to the exact tier.
|
|
75
|
+
- **`scripts/build.mjs`** bundles each engine with code splitting and reports brotli per chunk.
|
|
76
|
+
|
|
77
|
+
## Accuracy
|
|
78
|
+
|
|
79
|
+
`npm run test:accuracy` runs headless Chrome and WebKit. It compares every paragraph's line count with unmodified
|
|
80
|
+
Pretext at 11 widths and with DOM heights at 320 and 480 px. It also compares `lines()` with `walkLineRanges()` on
|
|
81
|
+
lite handles. The corpus covers Latin, hard Latin, emoji, Arabic, CJK, Thai and mixed text, 1,000 paragraphs each.
|
|
82
|
+
Fonts are Arial, Times New Roman, Georgia, Verdana and Helvetica.
|
|
83
|
+
|
|
84
|
+
The bar is zero differences from upstream, and the 2026-10-28 run met it. Every DOM mismatch is one upstream has too.
|
|
85
|
+
|
|
86
|
+
`npm test` (vitest, no browser) checks:
|
|
87
|
+
- the restricted break scans against upstream's full ones, on the corpus and a fuzz over the alphabet, with and
|
|
88
|
+
without the rare pack;
|
|
89
|
+
- the lite counter and walker;
|
|
90
|
+
- the alphabet and the engine detector.
|
|
91
|
+
|
|
92
|
+
## Staying in sync with upstream
|
|
93
|
+
|
|
94
|
+
1. Bump `devDependencies["@chenglou/pretext"]` and run `npm pack @chenglou/pretext@<v>` into a clean folder. Check its
|
|
95
|
+
sha256 and update the `pretext` block.
|
|
96
|
+
2. Replace `vendor/pretext/src` and `vendor/pretext/LICENSE` with the tarball's. Leave out its tests.
|
|
97
|
+
3. Run `npm run gen` and check its output:
|
|
98
|
+
- The specialiser fails loudly if a moved function or a profile field disappeared.
|
|
99
|
+
- The printed fold count must stay explainable.
|
|
100
|
+
- Profile folds only touch `profile.`, `engineProfile.` and `getEngineProfile().`.
|
|
101
|
+
4. Run `npm run coverage`, `npm test`, `npm run build` and `npm run test:accuracy`.
|
|
102
|
+
- **Merge only with zero differences from upstream** in both browsers.
|
|
103
|
+
- A new correction in Pretext's measurement needs a matching envelope check in `src/lite.ts`. Otherwise the
|
|
104
|
+
accuracy run shows it as diffs on lite handles (`tier: "l"`).
|
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ravonus
|
|
4
|
+
|
|
5
|
+
This package is a derived build of Pretext (@chenglou/pretext 1.0.0) by Cheng Lou and the Pretext
|
|
6
|
+
contributors, https://github.com/chenglou/pretext, used under its MIT licence. Pretext does the real work:
|
|
7
|
+
its ports of Blink's, WebKit's and Gecko's line breaking and its measurement rules are what this package
|
|
8
|
+
ships, specialised per engine and split into lazy chunks. vendor/pretext/ holds the unmodified source and
|
|
9
|
+
its LICENSE, with the notices of the Chromium, WebKit, ICU, ICU4X and Unicode sources it follows or is
|
|
10
|
+
generated from. Those notices apply to gen/ and dist/ too, and dist/LICENSE-pretext carries them.
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
|
|
30
|
+
------------------------------------------------------------------------------
|
|
31
|
+
|
|
32
|
+
Pretext, vendored in vendor/pretext/ and the source of gen/ and dist/:
|
|
33
|
+
|
|
34
|
+
MIT License
|
|
35
|
+
|
|
36
|
+
Copyright (c) 2026 Pretext contributors
|
|
37
|
+
|
|
38
|
+
The full text, with its third-party notices, is vendor/pretext/LICENSE.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pretext contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
Notices of the sources that parts of this package follow or are generated
|
|
26
|
+
from.
|
|
27
|
+
|
|
28
|
+
Chromium: the Han kerning character types and tests, the line break pair table
|
|
29
|
+
and the script classes.
|
|
30
|
+
|
|
31
|
+
Copyright 2015 The Chromium Authors
|
|
32
|
+
Copyright 2016 The Chromium Authors
|
|
33
|
+
Copyright 2023 The Chromium Authors
|
|
34
|
+
|
|
35
|
+
Redistribution and use in source and binary forms, with or without
|
|
36
|
+
modification, are permitted provided that the following conditions are
|
|
37
|
+
met:
|
|
38
|
+
|
|
39
|
+
* Redistributions of source code must retain the above copyright
|
|
40
|
+
notice, this list of conditions and the following disclaimer.
|
|
41
|
+
* Redistributions in binary form must reproduce the above
|
|
42
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
43
|
+
in the documentation and/or other materials provided with the
|
|
44
|
+
distribution.
|
|
45
|
+
* Neither the name of Google LLC nor the names of its
|
|
46
|
+
contributors may be used to endorse or promote products derived from
|
|
47
|
+
this software without specific prior written permission.
|
|
48
|
+
|
|
49
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
50
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
51
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
52
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
53
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
54
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
55
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
56
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
57
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
58
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
59
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
60
|
+
|
|
61
|
+
Chromium and WebKit files whose headers carry the license below: two character
|
|
62
|
+
ranges of Han kerning and the list of cursive scripts (Chromium), the language
|
|
63
|
+
and script lists of the generic font families (WebKit).
|
|
64
|
+
|
|
65
|
+
Copyright (C) 2014 Google Inc. All rights reserved.
|
|
66
|
+
Copyright (c) 2012 Google Inc. All rights reserved.
|
|
67
|
+
Copyright (C) 2013 BlackBerry Limited. All rights reserved.
|
|
68
|
+
Copyright (C) 2011 Google Inc. All rights reserved.
|
|
69
|
+
Copyright (C) 2021 Apple Inc. All rights reserved.
|
|
70
|
+
|
|
71
|
+
Redistribution and use in source and binary forms, with or without
|
|
72
|
+
modification, are permitted provided that the following conditions are
|
|
73
|
+
met:
|
|
74
|
+
|
|
75
|
+
* Redistributions of source code must retain the above copyright
|
|
76
|
+
notice, this list of conditions and the following disclaimer.
|
|
77
|
+
* Redistributions in binary form must reproduce the above
|
|
78
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
79
|
+
in the documentation and/or other materials provided with the
|
|
80
|
+
distribution.
|
|
81
|
+
* Neither the name of Google Inc. nor the names of its
|
|
82
|
+
contributors may be used to endorse or promote products derived from
|
|
83
|
+
this software without specific prior written permission.
|
|
84
|
+
|
|
85
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
86
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
87
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
88
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
89
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
90
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
91
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
92
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
93
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
94
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
95
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
96
|
+
|
|
97
|
+
WebKit: the line break pair table and the scan for break opportunities between
|
|
98
|
+
inline text items.
|
|
99
|
+
|
|
100
|
+
Copyright (C) 2005-2024 Apple Inc. All rights reserved.
|
|
101
|
+
Copyright (C) 2011-2024 Google Inc. All rights reserved.
|
|
102
|
+
Copyright (C) 2021-2023 Apple Inc. All rights reserved.
|
|
103
|
+
Copyright (C) 2018-2026 Apple Inc. All rights reserved.
|
|
104
|
+
Copyright (C) 2018-2023 Apple Inc. All rights reserved.
|
|
105
|
+
Copyright (C) 2018-2024 Apple Inc. All rights reserved.
|
|
106
|
+
Copyright (C) 2014 Google Inc. All rights reserved.
|
|
107
|
+
|
|
108
|
+
Redistribution and use in source and binary forms, with or without
|
|
109
|
+
modification, are permitted provided that the following conditions
|
|
110
|
+
are met:
|
|
111
|
+
1. Redistributions of source code must retain the above copyright
|
|
112
|
+
notice, this list of conditions and the following disclaimer.
|
|
113
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
114
|
+
notice, this list of conditions and the following disclaimer in the
|
|
115
|
+
documentation and/or other materials provided with the distribution.
|
|
116
|
+
|
|
117
|
+
THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
|
|
118
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
119
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
120
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
|
|
121
|
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
122
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
123
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
124
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
125
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
126
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
127
|
+
THE POSSIBILITY OF SUCH DAMAGE.
|
|
128
|
+
|
|
129
|
+
ICU, in Chromium's and Apple's copies: the rule-based break iterator, the line
|
|
130
|
+
and grapheme break rules and the script and bracket properties.
|
|
131
|
+
|
|
132
|
+
© 2016 and later: Unicode, Inc. and others.
|
|
133
|
+
License & terms of use: http://www.unicode.org/copyright.html
|
|
134
|
+
Copyright (C) 1999-2016 International Business Machines Corporation
|
|
135
|
+
and others. All rights reserved.
|
|
136
|
+
Copyright (C) 2016 and later: Unicode, Inc. and others.
|
|
137
|
+
Copyright (C) 1999-2016, International Business Machines
|
|
138
|
+
Corporation and others. All Rights Reserved.
|
|
139
|
+
Copyright (C) 1999-2014 International Business Machines
|
|
140
|
+
Corporation and others. All Rights Reserved.
|
|
141
|
+
Copyright (C) 2005-2016, International Business Machines
|
|
142
|
+
Corporation and others. All Rights Reserved.
|
|
143
|
+
|
|
144
|
+
ICU4X: the line break iterator, the line break data and the East Asian width
|
|
145
|
+
data.
|
|
146
|
+
|
|
147
|
+
Copyright © 2020-2024 Unicode, Inc.
|
|
148
|
+
Portions of ICU4X may have been adapted from ICU4C and/or ICU4J.
|
|
149
|
+
ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others.
|
|
150
|
+
|
|
151
|
+
From ICU's LICENSE file: the Unicode License V3, which ICU4X's LICENSE file
|
|
152
|
+
also gives, under its own copyright line above; then the ICU License.
|
|
153
|
+
|
|
154
|
+
UNICODE LICENSE V3
|
|
155
|
+
|
|
156
|
+
COPYRIGHT AND PERMISSION NOTICE
|
|
157
|
+
|
|
158
|
+
Copyright © 2016-2025 Unicode, Inc.
|
|
159
|
+
|
|
160
|
+
NOTICE TO USER: Carefully read the following legal agreement. BY
|
|
161
|
+
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
|
|
162
|
+
SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
|
|
163
|
+
TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
|
|
164
|
+
DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
|
|
165
|
+
|
|
166
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
167
|
+
copy of data files and any associated documentation (the "Data Files") or
|
|
168
|
+
software and any associated documentation (the "Software") to deal in the
|
|
169
|
+
Data Files or Software without restriction, including without limitation
|
|
170
|
+
the rights to use, copy, modify, merge, publish, distribute, and/or sell
|
|
171
|
+
copies of the Data Files or Software, and to permit persons to whom the
|
|
172
|
+
Data Files or Software are furnished to do so, provided that either (a)
|
|
173
|
+
this copyright and permission notice appear with all copies of the Data
|
|
174
|
+
Files or Software, or (b) this copyright and permission notice appear in
|
|
175
|
+
associated Documentation.
|
|
176
|
+
|
|
177
|
+
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
178
|
+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
179
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
180
|
+
THIRD PARTY RIGHTS.
|
|
181
|
+
|
|
182
|
+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
|
|
183
|
+
BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
|
|
184
|
+
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
185
|
+
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
186
|
+
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
|
|
187
|
+
FILES OR SOFTWARE.
|
|
188
|
+
|
|
189
|
+
Except as contained in this notice, the name of a copyright holder shall
|
|
190
|
+
not be used in advertising or otherwise to promote the sale, use or other
|
|
191
|
+
dealings in these Data Files or Software without prior written
|
|
192
|
+
authorization of the copyright holder.
|
|
193
|
+
|
|
194
|
+
SPDX-License-Identifier: Unicode-3.0
|
|
195
|
+
|
|
196
|
+
ICU License - ICU 1.8.1 to ICU 57.1
|
|
197
|
+
|
|
198
|
+
COPYRIGHT AND PERMISSION NOTICE
|
|
199
|
+
|
|
200
|
+
Copyright (c) 1995-2016 International Business Machines Corporation and others
|
|
201
|
+
All rights reserved.
|
|
202
|
+
|
|
203
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
204
|
+
a copy of this software and associated documentation files (the
|
|
205
|
+
"Software"), to deal in the Software without restriction, including
|
|
206
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
207
|
+
distribute, and/or sell copies of the Software, and to permit persons
|
|
208
|
+
to whom the Software is furnished to do so, provided that the above
|
|
209
|
+
copyright notice(s) and this permission notice appear in all copies of
|
|
210
|
+
the Software and that both the above copyright notice(s) and this
|
|
211
|
+
permission notice appear in supporting documentation.
|
|
212
|
+
|
|
213
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
214
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
215
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
216
|
+
OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
217
|
+
HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
|
|
218
|
+
SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
|
|
219
|
+
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
|
|
220
|
+
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
221
|
+
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
222
|
+
|
|
223
|
+
Except as contained in this notice, the name of a copyright holder
|
|
224
|
+
shall not be used in advertising or otherwise to promote the sale, use
|
|
225
|
+
or other dealings in this Software without prior written authorization
|
|
226
|
+
of the copyright holder.
|
|
227
|
+
|
|
228
|
+
All trademarks and registered trademarks mentioned herein are the
|
|
229
|
+
property of their respective owners.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,C as t,D as n,E as r,F as l,G as a,I as i,J as s,K as u,L as o,N as c,P as d,Q as f,R as h,S as g,T as m,U as p,a as F,d as w,e as E,f as x,g as T,h as y,i as v,j as A,k as S,l as C,n as b,o as k,p as L,r as K,x as B}from"./chunk-AVLP4LK4.js";import{c as P,e as D,f as I,n as U,o as q,p as G,r as H,s as M,v as j}from"./chunk-LCLBVK2G.js";var R=/\p{Ps}/uy,z=/\p{Pe}/uy,N=/[\u2018-\u301F\uFF08-\uFF60]/;function V(e){return e>=8216&&e<=12319||e>=65288&&e<=65376}function W(e,t){let n=e.charCodeAt(t);switch(n){case 8216:case 8220:return 9;case 8217:case 8221:return 10;case 12289:case 12290:case 65292:case 65294:return 6;case 65306:return 7;case 65307:return 8;case 183:case 8231:case 12288:case 12539:return 3;default:{if(n<40||!j(n,H))return 0;let r=n>=12288&&n<=12351||n>=65281&&n<=65376||n>=65504&&n<=65510;return R.lastIndex=z.lastIndex=t,R.test(e)?r?1:4:z.test(e)?r?2:5:0}}}function J(e,t,r){let l=e.trims.get(t);if(void 0===l){let a=String.fromCharCode(t);l=2*n(a,r).width-n(a+a,r).width,e.trims.set(t,l)}return l}function O(e,t,n){let r=W(t,n);switch(r){case 6:return e.typeForDot;case 7:return e.typeForColon;case 8:return e.typeForSemicolon;case 9:return e.quoteFullwidth?1:4;case 10:return e.quoteFullwidth?2:5;default:return r}}function Q(e,t){return 1!==t||1!==e&&3!==e&&2!==e&&4!==e?2!==e||2!==t&&3!==t&&5!==t?0:-1:1}function $(e){return e>=12288&&e<=12543||e>=65072&&e<=65135||e>=65280&&e<=65519&&65307!==e}function _(e,t,n){return t===x?0:F(n,e,0,e.length,null)}function X(e,t,n){return t>1?e+(t-1)*n:e}var Y=[741,745,768,879,1425,1469,1471,1487,1536,4255,4352,4607,4957,4959,5888,6319,6400,6479,6528,6623,6656,7423,7616,7679,8400,8447,9977,9977,11503,11505,12330,12335,12441,12444,42620,42621,42736,42737,43008,44031,55216,55295,65024,65039,65056,65071,68096,68191,69632,69839,69888,70111,70144,70223,70320,70527,70656,70879,71040,71263,71296,71375,71424,72895,92928,93071,125184,125279,127462,127487,127995,127999,917504,917631,917760,917999],Z=/\p{Extended_Pictographic}/u,ee=G(String.raw`^\p{M}`,"u"),te=/^[\p{Nd}:\-/×,.+\u2013\u2014]+$/u;function ne(e){let t=!1;for(let n=0;n<e.length;){let r=e.codePointAt(n);if(n+=r>65535?2:1,8205===r&&t)return!0;t=r>65535&&Z.test(String.fromCodePoint(r));for(let e=0;e<Y.length&&r>=Y[e];e+=2)if(r<=Y[e+1])return!0}return!1}var re=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF\u200F\u{10800}-\u{10FFF}\u{1E800}-\u{1EFFF}\u202A-\u202E\u2066-\u2069]/u;function le(e){return e===E||e===y}var ae=16,ie=31,se=2048,ue=null;function oe(e){return I[U(ue??(ue=q("chromium/script")),e)]}function ce(e,t){let n=e.codePointAt(t),r=oe(n),l=t+(n>65535?2:1);if(1024&r&&l<e.length){let t=oe(e.codePointAt(l))>>5&ie;if(0!==t)return r&~ie|t}return r}function de(e,t,n){let{openBrackets:r}=e;for(;e.read<n||e.scripts===ie&&e.read<t.length;){let n=t.codePointAt(e.read),l=ce(t,e.read),a=l&ie,i=8192&l?r.lastIndexOf(n-(l>>14)):-1;if(i>=0&&(0!==r[i+1]&&(a=r[i+1]),r.length=i+2),0!==(e.scripts&a))e.scripts&=a;else{for(let t=r.length-1;t>0&&0===r[t];t-=2)r[t]=e.scripts&-e.scripts;e.scripts=a}!!(4096&l)&&(64===r.length&&r.splice(0,2),r.push(n,0)),e.read+=n>65535?2:1}return e.scripts}function fe(e,t,n,r){let l=ce(t,n)&ie;for(let e=n;l===ie&&e+1<r&&j(t.charCodeAt(e),M);e++)l=ce(t,e+1)&ie;if(l===ie)return!0;for(let e=n-2;e>=0;e--){56320==(64512&t.charCodeAt(e))&&e>0&&e--;let n=ce(t,e);if(8192&n)break;let r=n&ie;if(r!==ie){if(!(r&r-1))return 0!==(r&l);break}}return 0!==(de(e,t,n)&l)}function he(e,t,n,r,l){return(P.getUnspacedGraphemes??D("spacing","getUnspacedGraphemes"))(e,t,n,r,l)}function ge(e,t,l){return r(e,t).width-n(e,t).width-l}function me(e,t,n,r,l,a,i,s){if(null===r)return 0;let{texts:u,flags:o}=e,d=t+1;for(;d<n&&(o[d]&b)===T;)d++;if(d>=n||(o[d]&b)!==w)return 0;let f=u[d],g=h(r,l,a,i)+c(f,a,i),m=c(r+f,a,i);return g-m>s?g-m:0}function pe(e,t,n,r,l,a){return h(e,t,n,r)-l+a}function Fe(h,F,A,I,U,q,G,H,M,j){let{normalized:R,texts:z,starts:Y,flags:Z}=h,ae=0===F?0:Y[F],se=0===F&&A===Z.length?R:A===F+1?z[F]:R.slice(ae,A<Z.length?Y[A]:R.length),ue=null===j?[]:j.widths,ce=null===j?new Uint8Array(A-F):j.segmentFlags,de=null===j?[]:j.breakableFitAdvances,Fe=U?[]:null,we=ue.length,Ee=0!==q,xe=m(I,H,Ee),Te=d(se)?f(I,xe):0,ye=se.includes(" ")||se.includes("\t")?u(xe):0,ve=8*(ye+q),Ae=0,Se=se.includes(" ")?i(xe):null;null!==Se&&re.test(se)&&(Se=null);let Ce={read:0,scripts:ie,openBrackets:[]},be=0,ke=Ee&&(e=>{for(let t=0;t<e.length;t++){if(e.charCodeAt(t)<128)continue;let n=oe(e.codePointAt(t));if(16===(n&ie)||16==(n>>5&ie))return!0}return!1})(se),Le=!Ee,Ke=null,Be=null,Pe=null,De=null;for(let l=F,i=we;l<A;l++,i++){let u=z[l],o=Z[l],d=o&b,f=0,m=0,p=null;switch(d){case w:{let e=null,c=""===e,h=c?r(u,xe):n(u,xe);Pe=u,De=h;let w=null===e||c?0:ge(u+e,xe,ye);if(null!==Se&&h.spaceKerning!==a){let e=l>F&&le(Z[l-1]&b),t=l+1<A&&le(Z[l+1]&b);if(e||t){let n=h.spaceKerning??s(u,h,xe,Se);t&&(w=Math.max(n.after,0),be=Math.min(n.after,0)),e&&0!==n.before&&((Z[l-1]&b)!==y||l!==F+1&&(Z[l-2]&b)!==C)&&fe(Ce,se,Y[l]-ae,Y[l]-ae+u.length)&&(ue[i-1]=ue[i-1]+n.before)}}f=pe(u,h,xe,Te,c?ye:0,w);let E=null,x=t;if(Ee&&(m=_(u,d,"chromium/char"),ke&&(E=he(se,Y[l]-ae,Y[l]-ae+u.length,"chromium/char",Ce),null!==E&&(f-=E.length*q))),!M||0!==(o&K)||1===u.length)break;let T=0!==q?"segment-prefixes":te.test(u)?"pair-context":h.width<80?"sum-graphemes":"reshaped-lines",v=g(u,h,xe,Te,T,c?ye:null);if(p=v.advances,null===p)break;if(null!==v.lineStartExtras&&((Ke??(Ke=new Array(A-F).fill(null)))[l-F]=v.lineStartExtras),0!==w&&(p=p.slice(),p[p.length-1]=p[p.length-1]+w),0!==x.length){p=p.slice();for(let e=0;e<x.length;e++)p[e]=p[e]+x[e]*q}if(null!==E){p=p.slice();for(let e=0;e<E.length;e++)p[E[e]]=p[E[e]]-q}break}case E:case y:case x:f=c(u,xe,Te)+be,be=0,Ee&&(m=_(u,d,"chromium/char"));break;case v:0===Ae&&(Ae=c(" ",xe,Te)/2);break;case S:{f=c(u,xe,Te);let e=l+1<A?z[l+1]:"";Ee&&(l>F&&(Z[l-1]&b)===w&&ne(z[l-1])||ee().test(e)&&ne(e))&&(m=1);break}}d!==w&&d!==E&&d!==x&&(Le=!1),d!==w&&d!==T&&(Pe=null),ce[i]=o&~K|(Ee&&m>0?k:0),ue[i]=X(f,m,q),de[i]=p,null!==Fe&&(Fe[l-F]=u),d!==w&&173===u.charCodeAt(0)?(Be??(Be=e(l-F)),Be[l-F]=me(h,l,A,Pe,De,xe,Te,.005)):null!==Be&&(Be[l-F]=0)}let Ie=null===Be?"-":B(xe),Ue=c(Ie,xe,Te)+(0===q?0:1*q),qe={widthTrims:null,lineStartExtras:null,lineEndTrims:null,overflowLineEndTrims:null};if((e=>N.test(e))(se)){qe=((t,r,l,a)=>{let i={widthTrims:null,lineStartExtras:null,lineEndTrims:null,overflowLineEndTrims:null},s=(e=>{if(void 0!==e.hanKerning)return e.hanKerning;let t={typeForDot:0,typeForColon:0,typeForSemicolon:0,quoteFullwidth:!1,trims:new Map};if(J(t,12300,e)<=.001)return e.hanKerning=null,null;let r=n("中",e).width,l=p(e),a=[12289,12290,65292,65294,65306,65307,8220,8216,8221,8217].map(e=>((e,t,n)=>{let r,l,a,i=String.fromCharCode(t);if($(t)){let t=e.measureText("中"+i);r=t.width-n,a=t.actualBoundingBoxRight-n,l=-e.measureText(i+"中").actualBoundingBoxLeft}else{let t=e.measureText(i);r=t.width,l=-t.actualBoundingBoxLeft,a=t.actualBoundingBoxRight}let s=r/2;return{advance:r,type:a<=s?2:l>=s?1:a-l<=s&&l>=s/2?3:0}})(l,e,r)),i=(e,t)=>{for(let n=e+1;n<t;n++)if(a[n].advance!==a[e].advance||a[n].type!==a[e].type)return 0;return a[e].type};return t.typeForDot=i(0,4),t.typeForColon=a[4].type,t.typeForSemicolon=a[5].type,t.quoteFullwidth=1===i(6,8)&&2===i(8,10),e.hanKerning=t,t})(t);if(null===s)return i;let{flags:u,starts:o,normalized:c}=r,d=u.length,f=(t,n)=>{i.widthTrims??(i.widthTrims=e(a-l)),i.widthTrims[t-l]=i.widthTrims[t-l]+n};for(let n=l;n<a;n++){if((u[n]&b)!==w)continue;let r=o[n],h=n+1<d?o[n+1]:c.length,g=c.charCodeAt(r);if(n>0&&V(g)&&1===Q(O(s,c,r-1),O(s,c,r))){let r=J(s,g,t);i.lineStartExtras??(i.lineStartExtras=e(a-l)),i.lineStartExtras[n-l]=r,f(n,r)}for(let e=r+1;e<h;e++){let r=c.charCodeAt(e-1),l=c.charCodeAt(e);if(!V(r)&&!V(l)||$(r)===$(l))continue;let a=Q(O(s,c,e-1),O(s,c,e));0!==a&&f(n,J(s,1===a?l:r,t))}let m=c.charCodeAt(h-1);if(!V(m))continue;let p=n+1===d;if(!p&&-1===Q(O(s,c,h-1),O(s,c,h))){f(n,J(s,m,t));continue}let F=W(c,h-1);2!==F&&10!==F||2!==O(s,c,h-1)||(p||(u[n+1]&b)===w&&0===(u[n+1]&L)?(i.lineEndTrims??(i.lineEndTrims=e(a-l)),i.lineEndTrims[n-l]=J(s,m,t)):(i.overflowLineEndTrims??(i.overflowLineEndTrims=e(a-l)),i.overflowLineEndTrims[n-l]=J(s,m,t)))}return i})(xe,h,F,A);let t=qe.widthTrims;if(null!==t)for(let e=0;e<t.length;e++)ue[we+e]=ue[we+e]-t[e]}let Ge=qe.lineStartExtras;if(xe.measuredKana&&null!==xe.kanaKerning&&l.test(se)){let e=o(xe);null!==e&&(Ge=((e,t,n,r,l,a,i,s)=>(P.addKanaKerning??D("scripts","addKanaKerning"))(e,t,n,r,l,a,i,s))(Ge,ue,we,h,F,A,xe,e))}let He=qe.lineEndTrims;se.includes(" ")&&(He=((e,t,n,r,l,a,i)=>(P.addIdeographicSpaceHangs??D("scripts","addIdeographicSpaceHangs"))(e,t,n,r,l,a,i))(He,h,xe,q,Ue,F,A));let Me={widths:ue,segmentFlags:ce,simpleLineWalkFastPath:Le&&!h.hasUnbroken,simpleLineCountFastPath:Le,breakableFitAdvances:de,letterSpacing:q,discretionaryHyphenWidth:Ue,discretionaryHyphenContexts:Be,breakableLineStartExtras:Ke,lineStartExtras:Ge,lineEndTrims:He,overflowLineEndTrims:qe.overflowLineEndTrims,tabStopAdvance:ve,minimumTabAdvance:Ae};return null!==Fe&&(Me.segments=Fe),Me}function we(){ue=null}export{ae as a,se as b,oe as c,de as d,Fe as e,we as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as e,C as t,c as n,e as r,h as a,i,j as l,k as s,l as o,m as u,n as c,o as f,q as p,r as h,s as d,t as m,u as g,v as x,y as w,z as C}from"./chunk-LCLBVK2G.js";var v={};function S(e){return 8192==(65280&e)&&(e>=8234&&e<=8238||e>=8294&&e<=8297||8206==(-2&e))||1564===e}function y(e,t,n,r,a){let{rules:i,transitions:l,skipped:s}=v[e]??(v[e]=(e=>{let t=C("gecko/char"===e?"chromium/char":e),n=t.rowWidth,r=t.rows,a=r.length/n,i=new Uint8Array(a*t.catCount);for(let e=0;e<a;e++)for(let a=0;a<t.catCount;a++){let l=r[e*n+3+a];i[e*t.catCount+a]=0===l||r[l*n]>1?128|r[w*n+3+a]:l}return{rules:t,transitions:i,skipped:"gecko/char"===e?c(t.classes,173):-1}})(e)),o=i.catCount,u=w,f=0;for(let e=n;e<r;){let n=t.charCodeAt(e),p=e+1;if(55296==(64512&n)&&p<r){let e=t.charCodeAt(p);56320==(64512&e)&&(p++,n=(n-55296<<10)+e-56320+65536)}let h=c(i.classes,n);if(h===s&&(173===n||S(n))){e=p;continue}let d=l[u*o+h];!!(128&d)&&(null!==a&&(a[f]=e),f++),u=-129&d,e=p}return u!==w&&(null!==a&&(a[f]=r),f++),f}function k(){for(let e in v)delete v[e]}function F(){}new Uint8Array([0,0,1,1,0,0,1,1,0,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);var b=0,K=1,A=2,E=3,j=4,M=5,T=6,N=7,W=8,I=9,O=15,P=16,$=32,B=64,L=128,R=["text","space","zero-width-break","soft-hyphen","preserved-space","tab","zero-width-glue","control","hard-break"],_=/[ \t\n\r\f]{2,}|[\t\n\r\f]/g,z=/[\t\n\r\f]| {2,}|^ | $/;function U(e,t){return 32===e||9===e||10===e||13===e&&!0}var q=/\p{M}/u;function D(e,t,n,r,a,i){return 8232!==r&&8233!==r||0===(t[n+1]&l)?173===r&&0!==(t[n+1]&s)&&((e,t)=>{let n=t-1;for(;n>=0&&173===e.charCodeAt(n);)n--;return n>=0&&10!==e.charCodeAt(n)})(e,n)?2:((e,t)=>{if("pre-wrap"===t){if(32===e)return 4;if(9===e)return 5;if(10===e)return 8}return 32===e?1:8203===e?2:173===e?3:0})(r,a):8}function G(e){return 0===e||1===e||4===e||3===e}function V(e){return e<32||e>=127&&e<=159||8232===e||8233===e}function H(e,l,s="normal",u="normal",c=null,f=null){let p="pre-wrap"===s,h=null===f?null:[],d=p?e:null!==f&&f.ownSegmentBreaks?((e,t,a,i,l)=>(n.removeItemsSkippableSegmentBreaks??r("rich","removeItemsSkippableSegmentBreaks"))(e,t,a,i,l))(e,f.starts,l,c,h):(e=>{if(!e.includes("\n"))return e;if(!e.includes(""))return e;let t="",n=0;for(let r=e.indexOf("\n");-1!==r;){let a=r;for(let t=r-1;t>=0&&U(e.charCodeAt(t));t--)a=t;let i=r+1,l=i;for(;l<e.length&&U(e.charCodeAt(l));l++)i=l+1;if(r=e.indexOf("\n",l),8203===e.charCodeAt(a-1)||8203===e.charCodeAt(i)){t+=e.slice(n,a);for(let n=a;n<i;n++)U(e.charCodeAt(n))||(t+=e[n]);n=i}}return 0===n?e:t+e.slice(n)})(e);if(null!==f&&0===h.length)for(let e=0;e<f.starts.length;e++)h.push(f.starts[e]);let m,g=p?(e=>/[\r\f]/.test(e)?e.replace(/\r\n/g,"\n").replace(/[\r\f]/g,"\n"):e)(e):(e=>{if(!z.test(e))return e;let t=e.replace(_," ");return 32===t.charCodeAt(0)&&(t=t.slice(1)),t.length>0&&32===t.charCodeAt(t.length-1)&&(t=t.slice(0,-1)),t})(d);return m=t(g,"keep-all"===u,c),null!==f&&((e,t,a,i)=>{(n.markItemStarts??r("rich","markItemStarts"))(e,t,a,i,"blink")})(e,g,m,f),((e,t,n,r)=>{let l=[],s=[],u=!1,c=!1,f=-1;for(let t=0;t<e.length;t++){let p=e.charCodeAt(t),h=D(e,n,t,p,r),d=0===h&&V(p),m=0===(n[t]&a);0!==(n[t]&(a|o))||d||u||c&&!q.test(e[t])||h!==f||!G(h)?(c=m&&0===h&&q.test(e[t])&&(u||2===f||3===f||7===f),l.push(t),s.push(0|h),f=h,u=d):0!==(n[t]&i)&&(s[s.length-1]=-129&s[s.length-1])}let p=!1,h=s.length;for(let e=h-2;e>=0;e--){let t=15&s[e],r=15&s[e+1];if(0===(n[l[e+1]]&a)&&8!==t){if(0!==r&&6!==r&&7!==r)continue;(2===t||3===t)&&(s[e]=-16&s[e]|6),s[e+1]=32|s[e+1],p=!0}}if(p)for(let e=0;e<h;e++)!(32&s[e])&&(s[e]=64|s[e]);let d=[];for(let t=0;t<h;t++)d.push(e.slice(l[t],t+1<h?l[t+1]:e.length));return{normalized:e,spaceSources:null,texts:d,starts:l,flags:s,hasUnbroken:p}})(g,0,m,s)}var J,Q=null,X=null,Y=96,Z=/\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{Emoji}\uFE0F/u,ee=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,te=["serif","sans-serif","cursive","fantasy","monospace"],ne=/("[^"]*"|'[^']*')|(^|,)(\s*)(serif|sans-serif|cursive|fantasy|monospace)(?=\s*(?:,|$))/gi,re=/\dpx(?:\s*\/\s*\S+)?\s+/,ae=/(?:"[^"]*"|'[^']*'|[^,])+/g;function ie(e){if(null!==e.hyphenText)return e.hyphenText;let t=e.canvasFont,n=re.exec(t),r="-";if(null!==n&&pe("‐",e).width!==pe("-",e).width){let a=Le(e),i=n.index+n[0].length,l=t.slice(0,i),s=t.slice(i).match(ae)??[],o=l+"monospace",u=l+"serif";if(le(a,o," ")!==le(a,u," ")&&le(a,o,"‐")!==le(a,u,"‐"))for(let e=0;e<s.length;e++){let t=`${l}${s[e]}, monospace`,n=`${l}${s[e]}, serif`;if(le(a,t," ")===le(a,n," ")){le(a,t,"‐")===le(a,n,"‐")&&(r="‐");break}}a.font=t}return e.hyphenText=r,r}function le(e,t,n){return e.font=t,e.measureText(n).width}function se(e){J=e}function oe(t){null!==Q&&Q.segments>262144&&_e();let n=J??null;if(void 0===J&&typeof document<"u"){let e=document.documentElement?.lang;"string"==typeof e&&(n=e)}return""===n?e():n}function ue(e,t){let n=e??0;if(!Number.isFinite(n))throw new RangeError(`letterSpacing must be a finite number of CSS px, not ${n}`);return n}function ce(e){let t=[];for(let n=0;n<e;n++)t.push(0);return t}var fe=[];function pe(e,t){return t.metrics.get(e)??de(t.metrics,e,e,t)}function he(e,t){return t.followingSpaceMetrics.get(e)??de(t.followingSpaceMetrics,e,e+" ",t)}function de(e,t,n,r){let a={width:Le(r).measureText(n).width,emojiCount:-1,fit:null,spaceKerning:null,extraSpacings:null};return e.set(t,a),r.state.segments++,!r.measuredKana&&me.test(t)&&(r.measuredKana=!0),a}var me=/[\u3041-\u30FF]/,ge=/[\u3041-\u30FF]{2}/,xe={after:0,before:0};function we(e){return e>=12353&&e<=12438||e>=12449&&e<=12538||e>=13312&&e<=40959||e>=63744&&e<=64255}function Ce(e){if(void 0===e.spaceKerning){let t=Le(e),n="\u2028";for(let e=33;e<=126;e++)n+=String.fromCharCode(e)+"\u2028";let r=t.measureText(n).width;t.fontKerning="none";let a=t.measureText(n).width;t.fontKerning="auto",e.spaceKerning=r!==a&&t.measureText("\u2028").width===pe(" ",e).width?new Map:null}return e.spaceKerning}function ve(e,t,n,r){let a=e<<1|(t?1:0),i=r.get(a);if(void 0===i){if(i=0,!(e=>x(e,p)||55296==(63488&e)||we(e)||e>=44032&&e<=55203)(e)){let r=String.fromCharCode(e),a=Le(n).measureText(t?"\u2028"+r:r+"\u2028").width;i=a-pe(r,n).width-pe(" ",n).width,Math.abs(i)<=a/4194304&&(i=0)}r.set(a,i)}return i}function Se(e,t,n,r){let a=0,i=e.length-1;for(;a<i&&x(e.charCodeAt(a),d);)a++;for(;i>a&&x(e.charCodeAt(i),d);)i--;let l=a<i&&x(e.charCodeAt(a+1),p)?0:ve(e.charCodeAt(a),!0,n,r),s=ve(e.charCodeAt(i),!1,n,r);return t.spaceKerning=0===s&&0===l?xe:{after:s,before:l}}function ye(e){return e.spaceWidth??(e.spaceWidth=pe(" ",e).width)}function ke(e){return(n.getFontKanaKerning??r("scripts","getFontKanaKerning"))(e)}function Fe(e,t,a,i,l){return(n.getKanaKerning??r("scripts","getKanaKerning"))(e,t,a,i,l)}function be(e,t,n){return Ie(e,pe(e,t),t,n)}function Ke(){return X??(X={})}function Ae(e){return ee.test(e)}function Ee(e,t){let n=t.emojiCorrection;if(null!==n)return n;let r=(e=>{let t=e.match(/(?:^|\D)(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16})(e),a=0!==t.emojiWidth,i=t.emojiWidth=Le(t).measureText("😀").width;if(n=0,i>r+.5&&typeof document<"u"){let r=(e=>{let t=document.body;if(null===t&&null===document.head)return NaN;let n=document.createElement("span");n.style.cssText="all:initial!important;-webkit-locale:inherit!important;display:inline-block!important;visibility:hidden!important;position:absolute!important",n.style.setProperty("font",e,"important"),n.textContent="😀";let r=null===t?NaN:je(t,n);return Number.isNaN(r)&&(r=je(document.documentElement,n)),r})(e);if(Number.isNaN(r))return 0;if(i-r>.5&&(n=i-r,a)){for(let e of t.metrics.values())e.fit=null;for(let e of t.followingSpaceMetrics.values())e.fit=null}}return t.emojiCorrection=n,n}function je(e,t){e.appendChild(t);let n=t.getBoundingClientRect().width,r=parseFloat(getComputedStyle(t).width);return e.removeChild(t),Math.abs(n-r)<=1e-5*r?n:r}var Me=2**-20,Te=2**-17;function Ne(e,t){let n=pe(e,t).width,r=Math.round(n/t.emojiWidth);return Math.abs(n-r*t.emojiWidth)<=n*Me?r:0}var We=/[\p{Extended_Pictographic}\p{Emoji_Component}\uFE0E]+/gu;function Ie(e,t,n,r){return 0===r?t.width:(t.emojiCount<0&&(t.emojiCount=((e,t)=>{let n=new Int32Array(e.length),r=y("chromium/char",e,0,e.length,n),a=0;for(let i=0,l=0;i<r;l=n[i++]){let r=e.slice(l,n[i]);if(!Z.test(r))continue;let s=r.match(We);for(let e=0;e<s.length;e++)a+=Ne(s[e],t)}return a})(e,n)),t.width-t.emojiCount*r)}function Oe(e,t,n,r,a,i=null){if(null!==t.fit&&t.fit.mode===a)return t.fit;Ke();let l=new Int32Array(e.length),s=y("chromium/char",e,0,e.length,l);if(s<=1)return t.fit={mode:a,advances:null,lineStartExtras:null};let o,u=null,c=!1;if("reshaped-lines"===a){let a=Ie(e,t,n,r)-(i??0),f=$e(e,l,s,"sum-graphemes",t,n,r,i);if(o=f,!Pe(f,a)){o=$e(e,l,s,"pair-context",t,n,r,i),c=s>96||Pe(o,a),c||(o=$e(e,l,s,"segment-prefixes",t,n,r,i)),u=[0];for(let e=1;e<s;e++)u.push(f[e]-o[e])}}else c="sum-graphemes"!==a&&!("segment-prefixes"===a&&s<=96),o=$e(e,l,s,c?"pair-context":a,t,n,r,i);if(null!==n.kanaKerning&&ge.test(e)){let t=ke(n);if(null!==t)for(let r=1;r<s;r++){let a=Fe(e,c&&r>1?l[r-2]:0,l[r-1],n,t);a>0?o[r-1]=o[r-1]+a:a<0&&(o[r]=o[r]+a,u??(u=ce(s)),u[r]=u[r]-a)}}return t.fit={mode:a,advances:o,lineStartExtras:u}}function Pe(e,t){let n=0;for(let t=0;t<e.length;t++)n+=e[t];return Math.abs(n-t)<=t*Te}function $e(e,t,n,r,a,i,l,s){let o="segment-prefixes"===r,u="pair-context"===r,c=[],f=0,p=0;for(let r=0,h=0;r<n;h=t[r++]){let d=t[r];if(o){let t=null!==s&&r===n-1?Ie(e,a,i,l)-s:be(e.slice(0,d),i,l);c.push(t-p),p=t;continue}let m=be(e.slice(h,d),i,l);c.push(u&&r>0?be(e.slice(f,d),i,l)-p:m),f=h,p=m}return null!==s&&!o&&(c[n-1]=c[n-1]+a.width-pe(e,i).width-s),c}function Be(e,t,n){(null===Q||Q.language!==t)&&(Q=(e=>{let t=Re(e),n=(Ke(),"string"==typeof t.letterSpacing);return{language:e,context:t,font:"",letterSpacing:"0px",wholeRunContext:null,wholeRunFont:"",genericFamilies:null,takesLetterSpacing:n,shapesLetterSpaced:n&&!0,fonts:new Map,letterSpacedFonts:new Map,segments:0}})(t));let r=Q,a=n&&r.shapesLetterSpaced,i=a?r.letterSpacedFonts:r.fonts;r.font="";let l=i.get(e);if(void 0===l){let t=null===r.genericFamilies?e:((e,t)=>{let n=re.exec(e);if(null===n)return e;let r=n.index+n[0].length;return e.slice(0,r)+e.slice(r).replace(ne,(e,n,r,a,i)=>{let l=void 0===n?t[te.indexOf(i.toLowerCase())]:"";return""===l?e:r+a+l})})(e,r.genericFamilies);if(!((e,t)=>(e.font="1px serif",e.font=t,"1px serif"!==e.font||(e.font="2px serif",e.font=t,"2px serif"!==e.font)))(r.context,t))throw new RangeError(`font must be a font string Canvas takes, a size in px then a family, such as 16px Inter, not "${e}"`);l={state:r,canvasFont:t,letterSpacing:a?"0.000001px":"0px",metrics:new Map,followingSpaceMetrics:new Map,spaceKerning:void 0,measuredKana:!1,kanaKerning:void 0,kanaFont:t,emojiCorrection:null,emojiWidth:0,hyphenText:null,spaceWidth:null,hanKerning:void 0,ligaturePairs:new Map,glyphCounts:new Map},i.set(e,l)}return l}function Le(e){let t=e.state;return t.font!==e.canvasFont&&(t.context.font=t.font=e.canvasFont),t.letterSpacing!==e.letterSpacing&&(t.context.letterSpacing=t.letterSpacing=e.letterSpacing),t.context}function Re(e){let t=null;if(typeof OffscreenCanvas<"u"?t=new OffscreenCanvas(1,1).getContext("2d"):typeof document<"u"&&(t=document.createElement("canvas").getContext("2d")),null===t)throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.");return null!==e&&"lang"in t&&(t.lang=e),t}function _e(){null!==Q&&(Q.fonts.clear(),Q.letterSpacedFonts.clear(),Q.segments=0)}export{y as a,k as b,F as c,b as d,K as e,A as f,E as g,j as h,M as i,T as j,N as k,W as l,I as m,O as n,P as o,$ as p,B as q,L as r,R as s,H as t,Y as u,re as v,ae as w,ie as x,se as y,oe as z,ue as A,ce as B,fe as C,pe as D,he as E,ge as F,xe as G,we as H,Ce as I,Se as J,ye as K,ke as L,Fe as M,be as N,Ke as O,Ae as P,Ee as Q,Ie as R,Oe as S,Be as T,Le as U,Re as V,_e as W};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e,e as n,f as t,g as r,h as l,i as a,l as i,n as s,p as u}from"./chunk-AVLP4LK4.js";import{c as m,e as d}from"./chunk-LCLBVK2G.js";var g=1<<n|1<<t|1<<r|1<<l|1<<a;function o(e){return!!(1<<e&g)}function f(e,n,t,l){return 0===l&&t>0&&t<n&&(e[t-1]&s)===r}function x(e,l){return e===n||e===r||e===t&&!l}function h(e,n,t,r){if(r){let r=Math.round(60*n);if(r<=0)return 0;let l=Math.round(60*e);return(Math.ceil((l+Math.round(120*t)/2)/r)*r-l)/60}if(n<=0)return 0;let l=n-(e-Math.floor(e/n)*n);return l<t?l+n:l}function p(e,n,t,r,l){return h(r-(null===n.insideExtras?0:n.insideExtras[t]/2),null===n.tabStopAdvances?e.tabStopAdvance:n.tabStopAdvances[t],null===n.minimumTabAdvances?e.minimumTabAdvance:n.minimumTabAdvances[t],l)+e.widths[t]}function c(e,n,t,r,l,a,i){return(m.getTerminalLetterSpacing??d("spacing","getTerminalLetterSpacing"))(e,n,t,r,l,a,i)}function I(e){return e<=1/0?e:1/0}function L(e,n){let{segmentFlags:t}=e,r=e.widths.length,l=n.segmentIndex;if(l>=r)return!1;if(n.graphemeIndex>0)return!0;let a=0===l||(t[l-1]&s)===i;for(;;){let e=t[l]&s;if(e===i){if(a)return n.segmentIndex=l,n.graphemeIndex=0,!0;if(++l>=r)return!1;n.segmentIndex=l,n.graphemeIndex=0,a=!0}else{if(!x(e,a))return n.segmentIndex=l,n.graphemeIndex=0,!0;if(++l>=r)return!1}}}function b(e,n,t,r={lineCount:0,maxLineWidth:0}){let l={segmentIndex:0,graphemeIndex:0};if(!e.simpleLineWalkFastPath)return L(e,l)&&v(e,l,n,t,r),r.lineCount;let{segmentFlags:a}=e,i=e.widths.length;for(;;){let u=l.segmentIndex,m=0===u;for(;u<i&&x(a[u]&s,m);)u++;if(u>=i)return r.lineCount;let d=l.graphemeIndex;l.segmentIndex=u;let g=k(e,l,n);r.lineCount++,g>r.maxLineWidth&&(r.maxLineWidth=g),t?.(g,u,d,l.segmentIndex,l.graphemeIndex)}}function E(r,l){if(!r.simpleLineWalkFastPath||null!==r.overflowLineEndTrims)return r.simpleLineCountFastPath?((e,n)=>{let{segmentFlags:t}=e,r=e.widths.length,l={segmentIndex:0,graphemeIndex:0},a=0;for(;L(e,l);){let i=l.segmentIndex,s=l.graphemeIndex;k(e,l,n),0===l.graphemeIndex&&l.segmentIndex<r&&0!==(t[l.segmentIndex]&u)&&(l.segmentIndex=i,l.graphemeIndex=s,v(e,l,n,void 0,null,!0)),a++}return a})(r,l):b(r,l);let{widths:a,segmentFlags:i,breakableFitAdvances:m,breakableLineStartExtras:d,lineStartExtras:g,lineEndTrims:o}=r,f=Math.max(0,l)+.005,x=a.length,h=0,p=0,c=!1;for(let r=0;r<x;r++){let l=i[r]&s,u=a[r],x=null===o?0:o[r];if(c){if(p+u-x<=f){p+=u;continue}if(h++,p=0,c=!1,l!==e)continue}else if(l===n||l===t&&r>0)continue;let I=null===g?u:u+g[r],L=m[r];if(I-x<=f||null===L){p+=I,c=!0;continue}let b=d?.[r]??null,E=0;for(;E<L.length;){for(null!==b&&(p+=b[E]),p+=L[E++];E<L.length&&p+L[E]<=f;)p+=L[E++];E<L.length?(h++,p=0):c=!0}}return h+(c?1:0)}function v(e,n,t,r,l,a){return(m.walkPreparedComplexLines??d("complex","walkPreparedComplexLines"))(e,n,t,r,l,a)}function k(e,n,t){let r,{widths:l,segmentFlags:a,breakableFitAdvances:i,lineStartExtras:u,lineEndTrims:m,overflowLineEndTrims:d}=e,g=Math.max(0,t)+.005,f=n.segmentIndex,x=i[f],h=null===u?l[f]:l[f]+u[f],p=null!==d&&h-d[f]<=g?d[f]:null===m?0:m[f],c=0;if(n.graphemeIndex>0||h-p>g&&null!==x){let t=x,l=e.breakableLineStartExtras?.[f]??null,a=n.graphemeIndex+1;r=null===l?t[a-1]:t[a-1]+l[a-1];let i=e.items;for(void 0!==i&&(a>1?null!==i.insideExtras:null!==i.fillExtras)&&(r+=a>1?i.insideExtras[f]:i.fillExtras[f]);a<t.length;a++){if(r+t[a]>g)return n.graphemeIndex=a,r;r+=t[a]}}else r=h,h>g&&(c=p);for(let e=f+1;e<l.length;e++){let t=l[e],i=null===m?0:m[e];if(r+t-i>g){let t=o(a[e]&s);return n.segmentIndex=t?e+1:e,n.graphemeIndex=0,!t&&o(a[e-1]&s)?r-l[e-1]:r-c}r+=t,c=r>g?i:0}return n.segmentIndex=l.length,n.graphemeIndex=0,r-c}export{g as a,o as b,f as c,h as d,p as e,c as f,I as g,L as h,b as i,E as j};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var A=Object.defineProperty,g=(g,B)=>{for(var Q in B)A(g,Q,{get:B[Q],enumerable:!0})},B=(g,B,Q)=>((g,B,Q)=>B in g?A(g,B,{enumerable:!0,configurable:!0,writable:!0,value:Q}):g[B]=Q)(g,"symbol"!=typeof B?B+"":B,Q),Q={},C=class extends Error{constructor(A,g){super(`text-engine: "${A}" pack not loaded (needed by ${g})`),B(this,"pack",A)}};function e(A,g){throw new C(A,g)}var E={"chromium/line_normal":[0,27],"chromium/line_normal_cj":[1,27],"chromium/char":[2,25],"chromium/script":[3,21]},r=75,w="CAAAAQACAQMABBEAAAUABgAHAAgACQAKAAgABwALAAwACAAJAA0ADgANAA8JEAENAggABgAIGREACwAJABICCBkRAAsAEwAUAAgFAAADGQAAFQAWAAoCCQIIABcAEQAYAAgAAQAXAAgACgAJAQgAGQEIABoBCAARABsCCAAWFhEACB4RAAjAAxECCAAcCQgAEQAZAhEAGQARCAgAEQAIABEECAAZBBEECAEdEwgBHgAfACAAHgAgAB4AIAAeASAAHwIgACEAIAAfACEAIg4hAiAGIQEgACEBIA8hACMBIQAjESEAIAIhASQAJQMknDUg/wMRBhMAFQITACYAIQAnAQAAKAAVASgAKQIIABgAGwAWABgAKgArABYAGAMIAiwAEwEDBAAALQcKAAgAGAAbAAgALgAvBQgADQALADABLwAuBAgAMQUIABMACgETADIAEwAIADMBEwA0AzUANjkABgkACgAJADcLCQAKAwkACgEJAAoACQAKAAkNOB8hACAOHQIIAAoECAAKCwgACQoIABcCCAA5AggBEQUIABEFCAAXEwgAEUQIBRcOCAEXZggBCdoBCAAsFwgACwAwAAsAMA0IAToLCAAXADsAPKMBCAAXGAgDPQIXADoBPgA6AwgCF8YBCAAX5gEIARcJCAAXCAgAFzkIARcBPQAIAz4AFwgIABcBCAAXAQgBOgEIAD4ACAI/AEABPwAXAAgBFwEIABcCCAAXAggBFwdBABcBPgA/AwgAFwAIABcECAs9CggBFwEIABcACAEXAAgAPhEIABcBCAAXADoJCAVBAQgAFwA9AxcACAAXAAgBFwIIABcAPQQIABcBCAE9AwgBFwoIAToEPwE6AT8APgMIAD8APQA+AD8APgAIAD4AOgIIAT8BCAA/AQgCPwYIABcAOgQIABcAPgE6AD4AOgAIAT4AQAA6AQgAOgM/AD4BPwA9AQgBPgFCAUAACAAXAQgAFwAIABcACAAXBQgAFwIIABcFCAA9CQgBFw4IABcBCAAXAwgAPQAIAD0DCAI9AAgAPQIIBQcACAAGAEMAPgIIAAsAMAALADAACwAwAAsAMAALADAACwAwAAsAMB4IAj0ICAAXDQgAPQ0IwAI9MwgBF84DCAIXEggBPTIIAD0DCAA9HQgBHYmlAwj/4wMhAz8AOiY/A0RjPwtEDj8BRA4/AEQNPwA6AEQkPwlEbwgBFwsIARcNCAA9AQgJPRIIN0QZRQBGAToMRAlHADoTRwA6AUcIOgBHA0QIRwZEAToNRAVHmQFEIDoAPgE/CD4IOgA+RToAPgY6AEINOgE/AT4APwI+AQgBPhQ6AT0EOgA9BDoCQgE6AEIBOgBCAUABPgQ6Cz4QOgE/AD4AOgA+AD8APgI6BEg+OgA+ADoAPgFCAToKQhQ6EkICOgBCAzoCQgA6AkIGOgBCADoAQg06AD0AOgA9ADoAPQQ6AEIDOgA9ADoBPUk6AD4APwA6Bj0POg09DDoLPQoIABcAPgM6AD8XOgY/AT4BPwA+AUADPgBCCz8APgE/Az4BPwBAAz8BQgw/ADoAPgE/AD4HPwE+CD8APgQ/Aj4LPwI+BwgCPgE/AD4APwA+Az8APgU/AD4CPwA+BQgAPkk6AkICOgRCJQgCBwIvAwgiOgBCDzoCQgg6AEIEOgQ/AD4AQgI+AjoBPwM6AkQDOgU+Aj8APgA/AToCRAA+AT8APgg6AkRzCAI/AwgEP1QIBD8FRAs6A0QAOg5ECwgDSTcIB0kJCAVJJwgHSR0IAUkLCANJAQgNSQgIJkkLCABCAToAQgc6B0IFOgBCCDoJQgA6AD8CQgY6AD8vOgBCPDoBQgA6AUIAOgBCEDoCQgA6DEIhOlcIB0QNPwFEDDoCRAo6AkQ0OgJCADoARAA6A0QPOgFECzoDRAA6CEKGijBEADYAAB023/8LSg==",t="rAJLAwQFBgcICQoLDA0ODxAREhMLDwQUFQ4LFhcLGAsLAwMDAwMDFRUcHRkeFhgfFRoaFAsEBCALCyEMCyIjJCUbGyYlJwkmKCIiKSoDJksCDhQcSwUDBAMFBg0BAQcCEwEIAwECAwkIFwMDAwMCIw8HBwYHBgcHBwoGBggHCAAGAREBAgAAAAADBAAEAAAAAAAFAAT6ARkLCgALAAAAAAADAAACEQcOAAAHAAcOABYCAz0HBwAHAAAHAA==",n=[1055,5151,25631,8,42015,12,10,1,479,351,287,31,415,159,4,2,2064,16,543,4097,24577,63,5121,-7137,58399],o={"chromium/line_normal":[43,43,11,134,null,"AQAoBgIAAwAEAAQABQAGAAcACAACAAkACgALAAwADQAOAAcADwAQABEACwASAAgAEwAHABQAFQAWABcABwASABgAGQAaABsAHAAdAB4AHwAZACAAAQ4AARMhBAgAAAAiAAMBAAIAAwAAAAIAAAAAAAAAAAELBgMHAAAAAAAAAAQAAQAHIwMAAwAEAAAAAQABAAACAAEHBAADCwYAAAAFAAUkAAAEAAElAAAAAAIAAQAABAMGBxERByYABwYAAQUIDSEGIgADAwgABwwGCQgAAAAAJwwUASgDAAAZACcCHQAeARkACAcGCggAAAAAJw4pAwABJwADAwYLBCoUCwACBQYMBCsFAA4sBQAAAwQGDQoADi0FAAABAwYOEQAHLgANBwYPCy8AMAExATIIMwY0AA0EBhAEKwwRBzUAEAQAAQURFCIEEQAKAwYSEggGEgAFAwYTDwAJNgARBAYUCQoHEQc3ABQmAAEAAwQ4ADgDOQA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ATgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAOAwYCEggGFgAUBQYXBDoMEQc7ABcADwUBAgQ8Ej0BPgQ/AAUFAQIEQBI9AT4EQQASBAYaBCoPPgQaAAsFAQIEQhI9AT4EQwAaBQECBEQSPQE+BEUACQMGHRlGCxkABQMGRxlICxkAHAQGHxERB0kKSgAeAwYgGUsLGQAeAwYhDw8JTAAaAwQEASIZIgAbAwYDEggGIwAjFQEEAgQBTQhOAE4ATgIhAQACCABOAQMBTgFPAE4CTgBOAE4CTgBOAE4ATgAfCQAAAwQBJQYIBQ0EEQALAQgEJQAeAwYHEggGJgAABAYnDFACDwknACADBgkSCAYoACEDBgoSCAYpABkEBlEEKgdSDFMAJQILKxEHACQEBgwEKw0IBiwAJQMGDRIIBi0AJgMGDhIIBi4ALQQGLwQrBQAOVAAhAwYwCgAOVQAiBgYxBwACAA5WBwAEAAArBgYyBCsDCQAKD1cDGAArCAYPCy8AMAExATIBCAYzBjQAGwUGWAQrAwkQWQMYAAkCBhAZNQAuAwYTEggGNgAvAwYUEggGNwAAAQADACQIDFoFWwBcAVoBXQNeB18DYAA0Ags6FRcAMwQGFwQ6DQgGOwAkAgEFF2EANQkGPRk9A2IAYwBkAGUAZgFnAWMANgoBBgIEAWgZaQNqAGsAbAFtAW4BawA3BAY8EggBPgQ/ACcCAQUXYQACAgZAGUEAJwIBBRdhABcDBkIUPgRDACgCAQUXYQAGAgZEGUUAPgMGHRIIBkYAKQIBBRdhAAkCBkcZSABBBAYfEggGSQpvACYUAQcEcAdxAHEAcQBxBHEDcQNxAXIAcQJxAHEAcQFxAHEAcQBxAHEAcQBDAwYgEggGSwBEAwYhEggGTAApDgEIDXMAcwBzCHMDcwJzAnMAcwBzAnMAcwBzAHMAAAEABABOBwQEAU0NIQEAAggCAwNPAAADBlAPDwlQAE8DBlEUCARTAC4FAAEFdA8PBCIEdQBLBAZREggBCARTACgCBi8ZVAAiAgYwGVUAIwIGMRlWACsCBjIZVwAkAgEFF2EALQMGWBQ+BFkAUwEAAwBPAQADADgBAAMATQEAAwA5AQADAE0BAAMARQEAAwBZCQZhGWEDdgB3AHgAeQB6AXsBdwBKAQACAEoBAAIASgEAAgBKAQACAEoBAAIASQEAAgAqBwEJInwAfQB+AX8BgAEBfQBhAwQEAWgZaQBSAQAGAFIBAAYAUgEABgBRAQAGAFABAAYAJQUAAQWBARQiBIIBCoMBACYSAQoMhAEAhAEAhAEAhAEEhAEDhAEDhAEChAEChAEAhAEAhAEBhAEAhAEAhAEAhAEAhAEAhAEAAAEABwAfAwQEAXAZcgAAAQAIACcFAAEFdA8PBCIEdQBtBAQEAXQSCAZ1AF4BAAUAXgEABQBeAQAFAF4BAAUAXgEABQBdAQAFAGQBAAkAZAEACQBkAQAJAGMBAAkAYgEACQARBQABBYEBFCIEggEKhQEAOQMEBAGBARmCAQA5AQAHAAABAAoAOwEACg=="],"chromium/line_normal_cj":[43,43,11,134,"chromium/line_normal",""],"chromium/char":[11,11,3,10,null,"AQAIBgIAAgADAAQABQAEAAQABgAAAQABAAACAAEGAgAAAwABCgQABAAAAwABCgUABwACAQ0IAAMBCgUABAIBAgsJAAABAAI="]},l="5DAIgAAACAAAAAQDBAYA/+v/+/8CAQF/DBwACAEADhwCCAAUAQQfgAlAFDgAGBwAGFQAJAEANHAAKDgACBwM9hYAuP///+////9vACsAJDgADAEACIgDAA4eABiYAgDmARwANKQDAChUACQcBLyW/7kH+AMAoQLAAwDqAxwBAFm4BwCeBhwAFYAHAYAY9BMAGpAUAK4BmAIB/xYBAX/wBYwIABgBAZgC5gcBDBCMDwBQHAC2AbQCAAeIGAGGBYgYAScM3AoANIwBAH7QAgEA2wH0BQDAAXAAlg0cAA==";function I(A){E=A.classMaps,r=A.jointClassCount,w=A.classRunsVarints,t=A.classRemapsPacked,n=A.scriptClassFacts,o=A.ruleTables,l=A.blinkLinePairsPacked}var a=1,c=2,D=4,i=8,s=16;function h(A){if(null===A||A.length<2||A.length>2&&45!==A.charCodeAt(2)&&95!==A.charCodeAt(2))return"root";let g=32|A.charCodeAt(0),B=32|A.charCodeAt(1);return 106===g&&97===B?"ja":107===g&&111===B?"ko":122===g&&104===B?"zh":"root"}function u(A){let g=atob(A),B=0,Q=()=>{let A,Q=0,C=1;do{A=g.charCodeAt(B++),Q+=(127&A)*C,C*=128}while(A>=128);return Q},C=new Uint8Array(Q()),e=0;for(;B<g.length;){for(let A=Q();A>0;A--)C[e++]=g.charCodeAt(B++);if(B>=g.length)break;let A=Q()+4,E=e-Q();if(E+A<=e)C.copyWithin(e,E,E+A);else for(let g=0;g<A;g++)C[e+g]=C[E+g];e+=A}if(e!==C.length)throw new Error("A packed table unpacked to the wrong length");return C}function P(A){let g=atob(A),B=new Int32Array(g.length),Q=0;for(let A=0;A<g.length;){let C=g.charCodeAt(A++),e=127&C;for(let B=7;C>=128;B+=7)C=g.charCodeAt(A++),e|=(127&C)<<B;B[Q++]=e}return B.subarray(0,Q)}function F(A,g){return A.values[A.index[g>>8]<<8|255&g]}var f=null,M=null;function G(A){let[g,B]=E[A];return f??(f=P(w)),M??(M=u(t)),((A,g,B)=>{let Q=new Uint16Array(4352),C=new Uint8Array(B<<8),e=new Int32Array(256).fill(-1),E=0,r=0,w=0,t=-1;for(let B=0;B<=A.length;B+=2){let n=B<A.length?g[A[B+1]]:-1;if(n!==t){for(;r<w;){let A=r>>8;if(!(255&r)&&w-r>=256)e[t]<0&&(e[t]=E,C.fill(t,E<<8,++E<<8)),Q.fill(e[t],A,w>>8),r=-256&w;else{!(255&r)&&(Q[A]=E++);let g=Math.min(w,A+1<<8),B=Q[A]-A<<8;C.fill(t,r+B,g+B),r=g}}t=n}B<A.length&&(w+=A[B]+1)}if(1114112!==w)throw new Error("The class runs don't cover U+0000..U+10FFFF");return{index:Q,values:C}})(f,M.subarray(g*r),B)}function Y(A,g){let B=null;return()=>B??(B=new RegExp(A,g))}var k=[Y(String.raw`^[\p{L}\p{N}]$`,"u"),Y(String.raw`^\p{M}$`,"u"),Y(String.raw`^\p{P}$`,"u"),Y(String.raw`^[\p{Ps}\p{Pe}\p{Pi}\p{Pf}\p{Po}]$`,"u"),Y(String.raw`^\p{Default_Ignorable_Code_Point}$`,"u"),Y(String.raw`^\p{Emoji}$`,"u"),Y(String.raw`^\p{sc=Hangul}$`,"u")],O=1,R=2,U=4,d=5,H=6,m=null,S=new Map;function J(A,g){let B=m??(m=new Uint16Array(65536)),Q=1<<2*g,C=A<65536?B[A]:S.get(A)??0;return!(C&Q<<1)&&(C|=Q<<1|(k[g]().test(String.fromCodePoint(A))?Q:0),A<65536?B[A]=C:S.set(A,C)),0!==(C&Q)}var T=null;function L(){return T??(T=new Intl.Segmenter(void 0,{granularity:"word"}))}function p(){T=null}var X=1;function y(A){let[g,,,B,Q,C]=o[A];return((A,g,B,Q)=>{let C=new Uint16Array(g*A);null!==B&&C.set(B);for(let g=0,B=-A;g<Q.length;){B+=(Q[g++]+1)*A;let e=Q[g++]*A;e>0&&C.copyWithin(B,B-e,B-e+A);let E=B-1;for(let A=Q[g++];A>0;A--)E+=1+Q[g++],C[E]=Q[g++]}return C})(g+3,B,null===Q?null:y(Q),P(C))}var N={};function b(A){let g=N[A];if(void 0===g){let[B,Q,C]=o[A];g=N[A]={catCount:B,dictCategoriesStart:Q,rowWidth:B+3,rows:y(A),lookAheadResultsSize:C,classes:G(A)}}return g}var v={chars:[],categories:[]};function x(A,g,B,Q=v){let C=A.rows,e=A.rowWidth,E=A.dictCategoriesStart,r=g.length,w=new Int32Array(A.lookAheadResultsSize).fill(-1),t=Q.chars,n=t.length;for(let o=0;o<r;){let l=0,I=o,a=-1,c=o,D=g.charCodeAt(c++);if(55296==(64512&D)&&c<r){let A=g.charCodeAt(c);56320==(64512&A)&&(c++,D=(D-55296<<10)+A-56320+65536)}let i=!1,s=!1,h=1*e,u=0;for(;;){if(i){if(s)break;s=!0,u=1}else{let g=!1;for(let A=0;A<n;A++)if(D===t[A]){u=Q.categories[A],g=!0;break}g||(u=F(A.classes,D),u>=E&&l++)}let B=C[h+3+u];h=B*e;let o=C[h];if(1===o)I=c;else if(o>1&&w[o]>=0){a=w[o];break}let P=C[h+1];if(P>1&&(w[P]=c),0===B)break;if(!s)if(c>=r)i=!0;else if(D=g.charCodeAt(c++),55296==(64512&D)&&c<r){let A=g.charCodeAt(c);56320==(64512&A)&&(c++,D=(D-55296<<10)+A-56320+65536)}}a<0&&(a=I,I===o&&(a=o+1,55296==(64512&g.charCodeAt(o))&&a<r&&56320==(64512&g.charCodeAt(a))&&a++)),B[a]=1,l>0&&j(A,g,o,a,B),o=a}}function K(A,g){return F(A.classes,g)>=A.dictCategoriesStart}function j(A,g,B,C,E){return(Q.markDictionaryWords??e("scripts","markDictionaryWords"))(A,g,B,C,E)}var z,Z=null;function W(){return z??(z=(new Intl.DateTimeFormat).resolvedOptions().locale)}function _(A){return 32===A||9===A||10===A}function V(A,g,B,Q){if(B<33||Q<33)return 0;if(45===B){if(!(Q<=127))return 2;if(Q>=48&&Q<=57){let A=32|g;return g>=48&&g<=57||A>=97&&A<=122?1:0}}if(B<=255&&Q<=255){let g=Q-33;return A[28*(B-33)+(g>>3)]&1<<(7&g)?1:0}return 2}function $(A,g,B,Q){let C=J(B,1)?g:B;return J(C,0)&&!K(A,C)&&J(Q,0)&&!K(A,Q)}function q(A,g,B){let Q=A.length,C=new Uint8Array(Q+1);if(Q<2)return C;let e=Z??(Z=u(l)),E=b("chromium/"+("zh"===h(B)?"line_normal_cj":"line_normal")),r=null,w=0,t=A.charCodeAt(0);for(let B=1;B<Q;w=t,t=A.charCodeAt(B),B++){let n=A.charCodeAt(B);if(_(n))continue;if(_(t)){C[B]=1;continue}let o=V(e,w,t,n);1!==o?g&&$(E,w,t,n)||0!==o&&(null===r&&(r=new Uint8Array(Q+1),x(E,A,r)),1===r[B]&&(C[B]=1)):C[B]=1}return C}var AA=new Map;function gA(){f=null,M=null;for(let A in N)delete N[A];AA.clear()}export{g as a,B as b,Q as c,C as d,e,n as f,I as g,a as h,c as i,D as j,i as k,s as l,h as m,F as n,G as o,Y as p,O as q,R as r,U as s,d as t,H as u,J as v,L as w,p as x,X as y,b as z,K as A,W as B,q as C,gA as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=[];for(let[e,r]of[[0,591],[592,767],[768,879],[7680,7935],[8192,8303],[8352,8399],[8400,8447],[8448,8527],[8592,8703],[8704,8959],[8960,9215],[9312,9471],[9632,9727],[9728,10175],[10496,10623],[11008,11263],[65024,65039],[126976,129791],[917504,917631]].sort((t,e)=>t[0]-e[0]))t.length&&e<=t[t.length-1]+1?t[t.length-1]=Math.max(t[t.length-1],r):t.push(e,r);function e(e){for(let r=0;r<t.length;r+=2){if(e<t[r])return!1;if(e<=t[r+1])return!0}return!1}function r(t){for(let r=0;r<t.length;r++){let n=t.charCodeAt(r);if(!(n<880)){if(55296==(64512&n)&&r+1<t.length){let e=t.charCodeAt(r+1);56320==(64512&e)&&(n=(n-55296<<10)+e-56320+65536,r++)}if(!e(n))return!1}}return!0}export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-M5EVTPT6.js";import{C as t,b as n,d as r}from"./chunk-LCLBVK2G.js";var l,i,a=/[\u034f\ufe00-\ufe0e\0-\x08\x0b\x0e-\x1f\x7f-\xa0\xad\u2000-\u200c\u200e\u200f\u2011\u2028-\u202f\u205f-\u206f\ufeff]/,o=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\ufe0f\u20e3]/u,u=/[\u2018\u2019\u201c\u201d]/,s=null,c="",h=new Map;function d(e,t,n){let r=e.widths.get(n);return void 0===r&&(c!==t&&(s.font=c=t),e.widths.set(n,r=s.measureText(n).width)),r}var x=e=>e>=768&&e<=879||e>=8400&&e<=8447||e>=65024&&e<=65039;function f(e,t,n,r){let l=n<<1|(r?1:0),i=e.kerning.get(l);if(void 0===i){if(i=0,!x(n)&&55296!=(63488&n)){let l=String.fromCharCode(n),a=d(e,t,r?"\u2028"+l:l+"\u2028");i=a-d(e,t,l)-e.space,Math.abs(i)<=a/4194304&&(i=0)}e.kerning.set(l,i)}return i}function p(e,t,n){let r=0,l=n.length-1;for(;r<l&&65039===n.charCodeAt(r);)r++;for(;l>r&&65039===n.charCodeAt(l);)l--;let i=n.charCodeAt(r+1);return(r<l&&x(i)||0===f(e,t,n.charCodeAt(r),!0))&&0===f(e,t,n.charCodeAt(l),!1)}function m(e,t){return!("pre-wrap"===t?.whiteSpace||"keep-all"===t?.wordBreak||t?.letterSpacing||a.test(e))}var g,w=null,C=null,y=!1;function v(){return C??(C=import("./exact-SQQRYG6J.js").then(e=>(w=e.exact,y&&w.setLocale(g),w)))}var M=class{constructor(e,t,r){n(this,"text",e),n(this,"font",t),n(this,"opts",r),n(this,"exact",!1),n(this,"ready",null),n(this,"lite",null),n(this,"x",null)}};function T(e){if(w){let t=w.prepare(e.text,e.font,e.opts);return e.x=t,e.lite||(e.exact=t.exact),void(e.ready=t.ready&&t.ready.then(()=>{e.exact=!0,e.ready=null}))}e.ready=v().then(()=>(T(e),e.ready??void 0)).then(()=>{e.exact=!0,e.ready=null})}var k={engine:"blink",prepare(n,a,x){let f=new M(n,a,x);return e(n)&&m(n,x)&&(f.lite=function(e,n,a=!1){let x,f=(()=>{let e=i??null;return void 0===i&&typeof document<"u"&&(e=document.documentElement?.lang??null),""===e?(new Intl.DateTimeFormat).resolvedOptions().locale:e})(),m=((e,t)=>{let n=(e=>{if(null===s||l!==e){if(null===(s=typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1).getContext("2d"):document.createElement("canvas").getContext("2d")))throw new Error("text-engine: no Canvas 2D context");null!==e&&"lang"in s&&(s.lang=e),l=e,c="",h.clear()}return s})(t),r=h.get(e);if(void 0===r){r={widths:new Map,space:0,kerns:!1,kerning:new Map,emoji:null},h.set(e,r),r.space=d(r,e," ");{let t="\u2028";for(let e=33;e<=126;e++)t+=String.fromCharCode(e)+"\u2028";n.font=c=e;let l=n.measureText(t).width;n.fontKerning="none";let i=n.measureText(t).width;n.fontKerning="auto",r.kerns=l!==i&&n.measureText("\u2028").width===r.space}}return r})(n,f),g=e;if(/[\t\n\r\f]| {2,}|^ | $/.test(g)&&(g=g.replace(/[ \t\n\r\f]{2,}|[\t\n\r\f]/g," "),32===g.charCodeAt(0)&&(g=g.slice(1)),g.length&&32===g.charCodeAt(g.length-1)&&(g=g.slice(0,-1))),o.test(g)&&!((e,t)=>{if(null===e.emoji){let n=+(/(\d+(?:\.\d+)?)px/.exec(t)?.[1]??16),r=d(e,t,"😀");if(e.emoji=0,r>n+.5&&typeof document<"u"&&document.body){let n=document.createElement("span");n.style.cssText="all:initial!important;-webkit-locale:inherit!important;display:inline-block!important;visibility:hidden!important;position:absolute!important",n.style.setProperty("font",t,"important"),n.textContent="😀",document.body.appendChild(n);let l=n.getBoundingClientRect().width;n.remove(),e.emoji=Number.isNaN(l)||r-l>.5?1:0}}return 0===e.emoji})(m,n)||u.test(g)&&((e,t)=>{if(2*d(e,t,"「")-d(e,t,"「「")<=.001)return!1;let n=e=>{let t=s.measureText(e),n=t.width/2,r=-t.actualBoundingBoxLeft,l=t.actualBoundingBoxRight;return t.width+":"+(l<=n?"C":r>=n?"O":l-r<=n&&r>=n/2?"M":"-")};s.font=c=t;let r=n("“"),l=n("”");return r===n("‘")&&r.endsWith("O")&&l===n("’")&&l.endsWith("C")})(m,n))return null;try{x=t(g,!1,f)}catch(e){if(e instanceof r)return null;throw e}let w=g.includes(" "),C=[],y=[],v=[],M=0;for(let e=0,t=1;t<=g.length;t++){if(t<g.length&&!x[t])continue;let r=t;if(32===g.charCodeAt(r-1)&&r--,r>e){let t=g.slice(e,r);if(m.kerns&&w&&!p(m,n,t))return null;let l=d(m,n,t);C.push(l),y.push(1),v.push(e),l>M&&(M=l)}r<t&&(C.push(m.space),y.push(0),v.push(r)),e=t}let T={widths:Float64Array.from(C),text:Uint8Array.from(y),maxText:M};return a?{...T,source:g,starts:Uint32Array.from(v)}:T}(n,a,x?.segments)),f.lite?f.exact=!0:T(f),f},layout(e,t,n){let r=e;if(r.lite&&r.lite.maxText<=Math.max(0,t)+.005){let e=((e,t)=>{let n=Math.max(0,t)+.005,{widths:r,text:l}=e,i=0,a=0,o=!1;for(let e=0;e<r.length;e++){let t=r[e];if(o){if(a+t<=n){a+=t;continue}if(i++,a=0,o=!1,!l[e])continue}else if(!l[e])continue;a+=t,o=!0}return i+(o?1:0)})(r.lite,t);return{height:e*n,lineCount:e}}return r.lite&&!r.x&&T(r),w&&r.x&&r.x.exact?w.layout(r.x,t,n):r.lite?((e,t,n)=>{let r=Math.max(1,t),l=0,i=0;for(let t=0;t<e.widths.length;t++){let n=e.widths[t];e.text[t]?n>r?(i>0&&l++,l+=Math.ceil(n/r)-1,i=n%r):i+n>r?(l++,i=n):i+=n:i+=n}return(i>0||0===l)&&l++,{height:l*n,lineCount:l,exact:!1}})(r.lite,t,n):((e,t,n,r)=>{let l=+(/(\d+(?:\.\d+)?)px/.exec(t)?.[1]??16),i=0===e.length?0:Math.max(1,Math.ceil(e.length*l*.5/Math.max(1,n)));return{height:i*r,lineCount:i,exact:!1}})(r.text,r.font,t,n)},lines(e,t){let n=e;if(n.lite&&n.lite.maxText<=Math.max(0,t)+.005){let e=[];return((e,t,n)=>{let r=Math.max(0,t)+.005,{widths:l,text:i}=e;for(let e=0;e<l.length;){for(;e<l.length&&!i[e];)e++;if(e>=l.length)break;let t=e,a=l[e++],o=a;for(;e<l.length&&a+l[e]<=r;)a+=l[e],i[e]&&(o=a),e++;e<l.length&&!i[e]&&e++,n(o,t,e)}})(n.lite,t,(t,n,r)=>{e.push({width:t,start:{segmentIndex:n,graphemeIndex:0},end:{segmentIndex:r,graphemeIndex:0},lite:!0})}),e}return n.lite&&!n.x&&T(n),w&&n.x&&n.x.exact?w.lines(n.x,t):[]},lineText(e,t){let n=e;if(t.lite&&void 0!==n.lite?.source)return((e,t,n)=>e.source.slice(e.starts[t],n<e.starts.length?e.starts[n]:e.source.length).trimEnd())(n.lite,t.start.segmentIndex,t.end.segmentIndex);if(!w||!n.x)throw new Error("text-engine: lineText needs a handle prepared with { segments: true } once it is exact");return w.lineText(n.x,t)},clear(){h.clear(),s=null,w?.clear()},needs(t,n,r){if(e(t)&&m(t,r))return[];let l=w?[]:["exact"];return e(t)||l.push("scripts"),r?.letterSpacing&&l.push("spacing"),l},async load(e){e.length&&await(await v()).load(e.filter(e=>"exact"!==e))},loaded(){return w?["exact",...w.loaded()]:[]},setLocale(e){g=e,y=!0,(e=>{i=e,s=null})(e),w?.setLocale(e)}};export{k as engine};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-M5EVTPT6.js";import{c as t,g as n,i as s,j as r}from"./chunk-LBFXENHK.js";import{e as a}from"./chunk-2UTDV3NY.js";import{A as i,O as l,W as p,a as h,f as o,g as c,j as g,l as m,n as u,s as d,t as x,y as f,z as w}from"./chunk-AVLP4LK4.js";import{b as k,d as I,x as j}from"./chunk-LCLBVK2G.js";var M=new WeakMap;function y(e,t,n){return 0===n?0:((e,t)=>{let n=M.get(e);void 0===n&&(n=new Map,M.set(e,n));let s=n.get(t);if(void 0===s){let r=e.segments[t];s=new Int32Array(r.length),h("chromium/char",r,0,r.length,s),n.set(t,s)}return s})(e,t)[n-1]}function E(e,n,s,r,a){let i=((e,t,n,s,r)=>{let{segmentFlags:a}=e,i=e.segments.length,l=s<i?s:i,p="";for(let s=t;s<l;s++){let r=a[s]&u;r===c||r===m||(r===g||r===o)&&173===e.segments[s].charCodeAt(0)||(p+=s===t&&n>0?e.segments[s].slice(y(e,s,n)):e.segments[s])}return r>0&&s<i&&(p+=e.segments[s].slice(y(e,s,t===s?n:0),y(e,s,r))),p})(e,n,s,r,a);return t(e.segmentFlags,e.widths.length,r,a)?i+"-":i}function v(e,t,n,s){let r=s?.wordBreak??"normal",p=l(),h=i(s?.letterSpacing,p),o=w(p),c=x(e,p,s?.whiteSpace,r,o);return a(c,0,c.flags.length,t,n,h,p,o,!0,null)}function F(){j(),p()}var L={complex(){return import("./pack-complex-TZ3EEWXH.js")},scripts(){return import("./pack-scripts-6AZOGP44.js")},spacing(){return import("./pack-spacing-ZXHYQEXD.js")},families(){return import("./pack-families-E2YTVA25.js")},rare(){return import("./pack-rare-3377IVPF.js")}},T=new Set,A=new Map;function P(e){return Promise.all(e.filter(e=>!T.has(e)).map(e=>{let t=A.get(e);return t||A.set(e,t=L[e]().then(()=>{T.add(e)})),t})).then(()=>{})}function V(t,n,s){let r=[];return e(t)||r.push("scripts"),s?.letterSpacing&&r.push("spacing"),r}var C=class{constructor(e,t,n){k(this,"text",e),k(this,"font",t),k(this,"opts",n),k(this,"exact",!1),k(this,"ready",null),k(this,"p",null)}};function S(e,t=0){let n=V(e.text,0,e.opts).filter(e=>!T.has(e));if(0===n.length){try{e.p=e.opts?.segments?((e,t,n)=>{let s=v(e,t,!0,n),r=[];for(let e=0;e<s.segmentFlags.length;e++)r.push(d[s.segmentFlags[e]&u]);return s.kinds=r,s})(e.text,e.font,e.opts):((e,t,n)=>v(e,t,!1,n))(e.text,e.font,e.opts)}catch(e){if(!(e instanceof I))throw e;n.push(e.pack)}e.p&&!e.p.simpleLineWalkFastPath&&!T.has("complex")&&(n.push("complex"),!T.has("spacing")&&!n.includes("spacing")&&n.push("spacing"))}if(0===n.length)return e.exact=!0,void(e.ready=null);if(t>4)throw new Error("text-engine: packs did not settle");e.ready=P(n).then(()=>{n.includes("complex")&&e.p&&1===n.length?(e.exact=!0,e.ready=null):S(e,t+1)})}var W={prepare(e,t,n){let s=new C(e,t,n);return S(s),s},layout(e,t,s){let a=e;return a.exact?((e,t,s)=>{let a=r(e,n(t));return{lineCount:a,height:a*s}})(a.p,t,s):((e,t,n)=>{let s=+(/(\d+(?:\.\d+)?)px/.exec(e.font)?.[1]??16),r=0===e.text.length?0:Math.max(1,Math.ceil(e.text.length*s*.5/Math.max(1,t)));return{height:r*n,lineCount:r}})(a,t,s)},lines(e,t){if(!e.exact)return[];let r=[];return((e,t,r)=>{s(e,n(t),(e,t,n,s,a)=>{r(((e,t,n,s,r)=>({width:Math.max(0,e),start:{segmentIndex:t,graphemeIndex:n},end:{segmentIndex:s,graphemeIndex:r}}))(e,t,n,s,a))})})(e.p,t,e=>{r.push({width:e.width,start:e.start,end:e.end})}),r},lineText(e,t){let n=e;if(!n.exact||!n.opts?.segments)throw new Error("text-engine: lineText needs an exact handle prepared with { segments: true }");return((e,t)=>((e,t,n,s,r,a)=>({text:E(e,n,s,r,a),width:Math.max(0,t),start:{segmentIndex:n,graphemeIndex:s},end:{segmentIndex:r,graphemeIndex:a}}))(e,t.width,t.start.segmentIndex,t.start.graphemeIndex,t.end.segmentIndex,t.end.graphemeIndex))(n.p,t).text},clear(){F()},needs:V,load:P,loaded(){return[...T]},setLocale(e){(e=>{f(e),F()})(e)}};export{W as exact};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/alphabet.json":{"bytes":237,"imports":[]},"src/alphabet.ts":{"bytes":1771,"imports":[{"path":"src/alphabet.json","kind":"import-statement","original":"./alphabet.json"}],"format":"esm"},"gen/blink/packs.ts":{"bytes":366,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"gen/blink/generated/engine-break-data.ts":{"bytes":7067,"imports":[],"format":"esm"},"gen/blink/line-breaks.ts":{"bytes":38236,"imports":[{"path":"gen/blink/packs.ts","kind":"import-statement","original":"./packs.js"},{"path":"gen/blink/generated/engine-break-data.ts","kind":"import-statement","original":"./generated/engine-break-data.js"}],"format":"esm"},"src/lite.ts":{"bytes":13717,"imports":[{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"@engine/line-breaks.js"},{"path":"gen/blink/packs.ts","kind":"import-statement","original":"@engine/packs.js"}],"format":"esm"},"gen/blink/graphemes.ts":{"bytes":4921,"imports":[{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"./line-breaks.js"}],"format":"esm"},"gen/blink/gecko-line-breaks.ts":{"bytes":33967,"imports":[{"path":"gen/blink/generated/engine-break-data.ts","kind":"import-statement","original":"./generated/engine-break-data.js"},{"path":"gen/blink/graphemes.ts","kind":"import-statement","original":"./graphemes.js"},{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"./line-breaks.js"}],"format":"esm"},"gen/blink/analysis.ts":{"bytes":37064,"imports":[{"path":"gen/blink/packs.ts","kind":"import-statement","original":"./packs.js"},{"path":"gen/blink/gecko-line-breaks.ts","kind":"import-statement","original":"./gecko-line-breaks.js"},{"path":"gen/blink/graphemes.ts","kind":"import-statement","original":"./graphemes.js"},{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"./line-breaks.js"}],"format":"esm"},"gen/blink/generated/webkit-generic-families.ts":{"bytes":5190,"imports":[],"format":"esm"},"gen/blink/measurement.ts":{"bytes":85257,"imports":[{"path":"gen/blink/packs.ts","kind":"import-statement","original":"./packs.js"},{"path":"gen/blink/graphemes.ts","kind":"import-statement","original":"./graphemes.js"},{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"./line-breaks.js"},{"path":"gen/blink/generated/webkit-generic-families.ts","kind":"import-statement","original":"./generated/webkit-generic-families.js"}],"format":"esm"},"gen/blink/han-kerning.ts":{"bytes":13356,"imports":[{"path":"gen/blink/analysis.ts","kind":"import-statement","original":"./analysis.js"},{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"./line-breaks.js"},{"path":"gen/blink/measurement.ts","kind":"import-statement","original":"./measurement.js"}],"format":"esm"},"gen/blink/prepare.ts":{"bytes":40794,"imports":[{"path":"gen/blink/packs.ts","kind":"import-statement","original":"./packs.js"},{"path":"gen/blink/han-kerning.ts","kind":"import-statement","original":"./han-kerning.js"},{"path":"gen/blink/graphemes.ts","kind":"import-statement","original":"./graphemes.js"},{"path":"gen/blink/generated/engine-break-data.ts","kind":"import-statement","original":"./generated/engine-break-data.js"},{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"./line-breaks.js"},{"path":"gen/blink/analysis.ts","kind":"import-statement","original":"./analysis.js"},{"path":"gen/blink/measurement.ts","kind":"import-statement","original":"./measurement.js"}],"format":"esm"},"gen/blink/line-break.ts":{"bytes":25555,"imports":[{"path":"gen/blink/packs.ts","kind":"import-statement","original":"./packs.js"},{"path":"gen/blink/analysis.ts","kind":"import-statement","original":"./analysis.js"},{"path":"./measurement.js","kind":"import-statement","external":true}],"format":"esm"},"gen/blink/line-text.ts":{"bytes":3756,"imports":[{"path":"gen/blink/graphemes.ts","kind":"import-statement","original":"./graphemes.js"},{"path":"gen/blink/analysis.ts","kind":"import-statement","original":"./analysis.js"},{"path":"gen/blink/line-break.ts","kind":"import-statement","original":"./line-break.js"},{"path":"./measurement.js","kind":"import-statement","external":true}],"format":"esm"},"gen/blink/layout.ts":{"bytes":14402,"imports":[{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"./line-breaks.js"},{"path":"gen/blink/analysis.ts","kind":"import-statement","original":"./analysis.js"},{"path":"gen/blink/measurement.ts","kind":"import-statement","original":"./measurement.js"},{"path":"gen/blink/prepare.ts","kind":"import-statement","original":"./prepare.js"},{"path":"gen/blink/line-break.ts","kind":"import-statement","original":"./line-break.js"},{"path":"gen/blink/line-text.ts","kind":"import-statement","original":"./line-text.js"}],"format":"esm"},"gen/blink/line-break.complex.ts":{"bytes":36550,"imports":[{"path":"gen/blink/analysis.ts","kind":"import-statement","original":"./analysis.js"},{"path":"gen/blink/measurement.ts","kind":"import-statement","original":"./measurement.js"},{"path":"gen/blink/line-break.ts","kind":"import-statement","original":"./line-break.js"}],"format":"esm"},"gen/blink/pack-complex.ts":{"bytes":159,"imports":[{"path":"gen/blink/packs.ts","kind":"import-statement","original":"./packs.js"},{"path":"gen/blink/line-break.complex.ts","kind":"import-statement","original":"./line-break.complex.js"}],"format":"esm"},"gen/blink/line-breaks.scripts.ts":{"bytes":2555,"imports":[{"path":"./generated/engine-break-data.js","kind":"import-statement","external":true},{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"./line-breaks.js"}],"format":"esm"},"gen/blink/measurement.scripts.ts":{"bytes":6031,"imports":[{"path":"./graphemes.js","kind":"import-statement","external":true},{"path":"./line-breaks.js","kind":"import-statement","external":true},{"path":"./generated/webkit-generic-families.js","kind":"import-statement","external":true},{"path":"gen/blink/measurement.ts","kind":"import-statement","original":"./measurement.js"}],"format":"esm"},"gen/blink/prepare.scripts.ts":{"bytes":4284,"imports":[{"path":"./han-kerning.js","kind":"import-statement","external":true},{"path":"./graphemes.js","kind":"import-statement","external":true},{"path":"./generated/engine-break-data.js","kind":"import-statement","external":true},{"path":"./line-breaks.js","kind":"import-statement","external":true},{"path":"gen/blink/analysis.ts","kind":"import-statement","original":"./analysis.js"},{"path":"gen/blink/measurement.ts","kind":"import-statement","original":"./measurement.js"},{"path":"./prepare.js","kind":"import-statement","external":true}],"format":"esm"},"gen/blink/generated/engine-break-data.full.ts":{"bytes":26794,"imports":[],"format":"esm"},"gen/blink/pack-scripts.ts":{"bytes":781,"imports":[{"path":"gen/blink/packs.ts","kind":"import-statement","original":"./packs.js"},{"path":"gen/blink/line-breaks.scripts.ts","kind":"import-statement","original":"./line-breaks.scripts.js"},{"path":"gen/blink/measurement.scripts.ts","kind":"import-statement","original":"./measurement.scripts.js"},{"path":"gen/blink/prepare.scripts.ts","kind":"import-statement","original":"./prepare.scripts.js"},{"path":"gen/blink/generated/engine-break-data.full.ts","kind":"import-statement","original":"./generated/engine-break-data.full.js"},{"path":"gen/blink/generated/engine-break-data.ts","kind":"import-statement","original":"./generated/engine-break-data.js"},{"path":"gen/blink/line-breaks.ts","kind":"import-statement","original":"./line-breaks.js"},{"path":"gen/blink/graphemes.ts","kind":"import-statement","original":"./graphemes.js"},{"path":"gen/blink/prepare.ts","kind":"import-statement","original":"./prepare.js"},{"path":"gen/blink/gecko-line-breaks.ts","kind":"import-statement","original":"./gecko-line-breaks.js"}],"format":"esm"},"gen/blink/line-break.spacing.ts":{"bytes":2650,"imports":[{"path":"gen/blink/analysis.ts","kind":"import-statement","original":"./analysis.js"},{"path":"./measurement.js","kind":"import-statement","external":true},{"path":"gen/blink/line-break.ts","kind":"import-statement","original":"./line-break.js"}],"format":"esm"},"gen/blink/measurement.spacing.ts":{"bytes":3324,"imports":[{"path":"gen/blink/graphemes.ts","kind":"import-statement","original":"./graphemes.js"},{"path":"./line-breaks.js","kind":"import-statement","external":true},{"path":"./generated/webkit-generic-families.js","kind":"import-statement","external":true},{"path":"gen/blink/measurement.ts","kind":"import-statement","original":"./measurement.js"}],"format":"esm"},"gen/blink/prepare.spacing.ts":{"bytes":2757,"imports":[{"path":"./han-kerning.js","kind":"import-statement","external":true},{"path":"gen/blink/graphemes.ts","kind":"import-statement","original":"./graphemes.js"},{"path":"./generated/engine-break-data.js","kind":"import-statement","external":true},{"path":"./line-breaks.js","kind":"import-statement","external":true},{"path":"./analysis.js","kind":"import-statement","external":true},{"path":"./measurement.js","kind":"import-statement","external":true},{"path":"gen/blink/prepare.ts","kind":"import-statement","original":"./prepare.js"}],"format":"esm"},"gen/blink/pack-spacing.ts":{"bytes":257,"imports":[{"path":"gen/blink/packs.ts","kind":"import-statement","original":"./packs.js"},{"path":"gen/blink/line-break.spacing.ts","kind":"import-statement","original":"./line-break.spacing.js"},{"path":"gen/blink/measurement.spacing.ts","kind":"import-statement","original":"./measurement.spacing.js"},{"path":"gen/blink/prepare.spacing.ts","kind":"import-statement","original":"./prepare.spacing.js"}],"format":"esm"},"gen/blink/pack-families.ts":{"bytes":56,"imports":[],"format":"esm"},"gen/blink/pack-rare.ts":{"bytes":56,"imports":[],"format":"esm"},"src/exact.ts":{"bytes":5060,"imports":[{"path":"gen/blink/layout.ts","kind":"import-statement","original":"@engine/layout.js"},{"path":"gen/blink/packs.ts","kind":"import-statement","original":"@engine/packs.js"},{"path":"src/alphabet.ts","kind":"import-statement","original":"./alphabet.js"},{"path":"gen/blink/pack-complex.ts","kind":"dynamic-import","original":"@engine/pack-complex.js"},{"path":"gen/blink/pack-scripts.ts","kind":"dynamic-import","original":"@engine/pack-scripts.js"},{"path":"gen/blink/pack-spacing.ts","kind":"dynamic-import","original":"@engine/pack-spacing.js"},{"path":"gen/blink/pack-families.ts","kind":"dynamic-import","original":"@engine/pack-families.js"},{"path":"gen/blink/pack-rare.ts","kind":"dynamic-import","original":"@engine/pack-rare.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/engine.ts":{"bytes":5213,"imports":[{"path":"src/alphabet.ts","kind":"import-statement","original":"./alphabet.js"},{"path":"src/lite.ts","kind":"import-statement","original":"./lite.js"},{"path":"src/exact.ts","kind":"dynamic-import","original":"./exact.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/blink/engine.js":{"imports":[{"path":"dist/blink/chunk-M5EVTPT6.js","kind":"import-statement"},{"path":"dist/blink/chunk-LCLBVK2G.js","kind":"import-statement"},{"path":"dist/blink/exact-SQQRYG6J.js","kind":"dynamic-import"}],"exports":["engine"],"entryPoint":"src/engine.ts","inputs":{"src/lite.ts":{"bytesInOutput":4198},"src/engine.ts":{"bytesInOutput":2167}},"bytes":6481},"dist/blink/pack-complex-TZ3EEWXH.js":{"imports":[{"path":"dist/blink/chunk-LBFXENHK.js","kind":"import-statement"},{"path":"dist/blink/chunk-AVLP4LK4.js","kind":"import-statement"},{"path":"dist/blink/chunk-LCLBVK2G.js","kind":"import-statement"}],"exports":[],"entryPoint":"gen/blink/pack-complex.ts","inputs":{"gen/blink/line-break.complex.ts":{"bytesInOutput":4989},"gen/blink/pack-complex.ts":{"bytesInOutput":21}},"bytes":5289},"dist/blink/pack-scripts-6AZOGP44.js":{"imports":[{"path":"dist/blink/chunk-2UTDV3NY.js","kind":"import-statement"},{"path":"dist/blink/chunk-AVLP4LK4.js","kind":"import-statement"},{"path":"dist/blink/chunk-LCLBVK2G.js","kind":"import-statement"}],"exports":[],"entryPoint":"gen/blink/pack-scripts.ts","inputs":{"gen/blink/line-breaks.scripts.ts":{"bytesInOutput":381},"gen/blink/measurement.scripts.ts":{"bytesInOutput":1942},"gen/blink/prepare.scripts.ts":{"bytesInOutput":818},"gen/blink/generated/engine-break-data.full.ts":{"bytesInOutput":26537},"gen/blink/pack-scripts.ts":{"bytesInOutput":44}},"bytes":29969},"dist/blink/pack-spacing-ZXHYQEXD.js":{"imports":[{"path":"dist/blink/chunk-LBFXENHK.js","kind":"import-statement"},{"path":"dist/blink/chunk-2UTDV3NY.js","kind":"import-statement"},{"path":"dist/blink/chunk-AVLP4LK4.js","kind":"import-statement"},{"path":"dist/blink/chunk-LCLBVK2G.js","kind":"import-statement"}],"exports":[],"entryPoint":"gen/blink/pack-spacing.ts","inputs":{"gen/blink/line-break.spacing.ts":{"bytesInOutput":400},"gen/blink/measurement.spacing.ts":{"bytesInOutput":561},"gen/blink/prepare.spacing.ts":{"bytesInOutput":249},"gen/blink/pack-spacing.ts":{"bytesInOutput":23}},"bytes":1499},"dist/blink/pack-families-E2YTVA25.js":{"imports":[],"exports":[],"entryPoint":"gen/blink/pack-families.ts","inputs":{"gen/blink/pack-families.ts":{"bytesInOutput":0}},"bytes":0},"dist/blink/pack-rare-3377IVPF.js":{"imports":[],"exports":[],"entryPoint":"gen/blink/pack-rare.ts","inputs":{"gen/blink/pack-rare.ts":{"bytesInOutput":0}},"bytes":0},"dist/blink/exact-SQQRYG6J.js":{"imports":[{"path":"dist/blink/chunk-M5EVTPT6.js","kind":"import-statement"},{"path":"dist/blink/chunk-LBFXENHK.js","kind":"import-statement"},{"path":"dist/blink/chunk-2UTDV3NY.js","kind":"import-statement"},{"path":"dist/blink/chunk-AVLP4LK4.js","kind":"import-statement"},{"path":"dist/blink/chunk-LCLBVK2G.js","kind":"import-statement"},{"path":"dist/blink/pack-complex-TZ3EEWXH.js","kind":"dynamic-import"},{"path":"dist/blink/pack-scripts-6AZOGP44.js","kind":"dynamic-import"},{"path":"dist/blink/pack-spacing-ZXHYQEXD.js","kind":"dynamic-import"},{"path":"dist/blink/pack-families-E2YTVA25.js","kind":"dynamic-import"},{"path":"dist/blink/pack-rare-3377IVPF.js","kind":"dynamic-import"}],"exports":["exact"],"entryPoint":"src/exact.ts","inputs":{"gen/blink/line-text.ts":{"bytesInOutput":666},"gen/blink/layout.ts":{"bytesInOutput":893},"src/exact.ts":{"bytesInOutput":1878}},"bytes":3772},"dist/blink/chunk-M5EVTPT6.js":{"imports":[],"exports":["a"],"inputs":{"src/alphabet.json":{"bytesInOutput":243},"src/alphabet.ts":{"bytesInOutput":447}},"bytes":706},"dist/blink/chunk-LBFXENHK.js":{"imports":[{"path":"dist/blink/chunk-AVLP4LK4.js","kind":"import-statement"},{"path":"dist/blink/chunk-LCLBVK2G.js","kind":"import-statement"}],"exports":["a","b","c","d","e","f","g","h","i","j"],"inputs":{"gen/blink/line-break.ts":{"bytesInOutput":3483}},"bytes":3705},"dist/blink/chunk-2UTDV3NY.js":{"imports":[{"path":"dist/blink/chunk-AVLP4LK4.js","kind":"import-statement"},{"path":"dist/blink/chunk-LCLBVK2G.js","kind":"import-statement"}],"exports":["a","b","c","d","e","f"],"inputs":{"gen/blink/han-kerning.ts":{"bytesInOutput":3160},"gen/blink/prepare.ts":{"bytesInOutput":5833}},"bytes":9438},"dist/blink/chunk-AVLP4LK4.js":{"imports":[{"path":"dist/blink/chunk-LCLBVK2G.js","kind":"import-statement"}],"exports":["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],"inputs":{"gen/blink/graphemes.ts":{"bytesInOutput":890},"gen/blink/gecko-line-breaks.ts":{"bytesInOutput":1003},"gen/blink/analysis.ts":{"bytesInOutput":3422},"gen/blink/measurement.ts":{"bytesInOutput":7957}},"bytes":13846},"dist/blink/chunk-LCLBVK2G.js":{"imports":[],"exports":["A","B","C","D","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],"inputs":{"gen/blink/packs.ts":{"bytesInOutput":162},"gen/blink/generated/engine-break-data.ts":{"bytesInOutput":5434},"gen/blink/line-breaks.ts":{"bytesInOutput":4852}},"bytes":10919}}}
|