string-convert-indexes 6.1.3 → 6.2.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.
package/CHANGELOG.md CHANGED
@@ -3,11 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## 6.1.0 (2025-10-15)
6
+ ## 6.2.0 (2026-08-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ - make validation diagnostics safe ([7b01074](https://github.com/codsen/codsen/commit/7b0107476f12734aeb8e82852ba980b187280110))
11
+ - resolve review findings REV-004 through REV-007 ([b60e9ee](https://github.com/codsen/codsen/commit/b60e9eeb499af94685cfb87b4970fe025be1fc10))
12
+ - retire direct publish aliases ([f98e31e](https://github.com/codsen/codsen/commit/f98e31eb89bc185471225664e610b55f34fbf648))
13
+ - standardise index conversion errs ([182dee5](https://github.com/codsen/codsen/commit/182dee517593c0705bd43e97fbdbd473be7aa7db))
7
14
 
8
15
  ### Features
9
16
 
10
- - if value to be added is a number, keep it as is, don't stringify ([ce3e1a5](https://github.com/codsen/codsen/commit/ce3e1a525998ca3c0abf0142affef95b14cd1990))
17
+ - add codsen-glob and migrate glob consumers ([5595a2b](https://github.com/codsen/codsen/commit/5595a2b267eaa6cb60072d037aef00b7a28edd42))
18
+ - refresh the tooling and generate with the latest dependencies ([781f802](https://github.com/codsen/codsen/commit/781f802911066a82a4533b0e5a3fcbd742d0dd83))
19
+
20
+ ### Reverts
21
+
22
+ - Revert "Merge pull request #128 from codsen/release/npm-32198404552-1" ([5baeeaa](https://github.com/codsen/codsen/commit/5baeeaaa677b86f1eaa6396cadf3aea32b06416e)), closes [#128](https://github.com/codsen/codsen/issues/128)
23
+ - Revert "Merge pull request #127 from codsen/release/npm-32194020886-1" ([5f1e94d](https://github.com/codsen/codsen/commit/5f1e94deef910ce735266b16aeee08a76de7a862)), closes [#127](https://github.com/codsen/codsen/issues/127)
11
24
 
12
25
  ## 6.0.0 (2022-12-01)
13
26
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright © 2010-2025 Roy Revelt and other contributors
3
+ Copyright © 2010-2026 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -32,9 +32,9 @@ npm i string-convert-indexes
32
32
  ## Quick Take
33
33
 
34
34
  ```js
35
- import { strict as assert } from "assert";
35
+ import { strict as assert } from "node:assert";
36
36
 
37
- import { nativeToUnicode, unicodeToNative } from "string-convert-indexes";
37
+ import { nativeToUnicode } from "string-convert-indexes";
38
38
 
39
39
  // CONVERTING NATIVE JS INDEXES TO UNICODE-CHAR-COUNT-BASED
40
40
  // 𝌆 - \uD834\uDF06
@@ -42,34 +42,9 @@ import { nativeToUnicode, unicodeToNative } from "string-convert-indexes";
42
42
  // at index 1, we have low surrogate, that's still grapheme index zero
43
43
  assert.equal(nativeToUnicode("\uD834\uDF06aa", "1"), "0");
44
44
  // notice it's retained as string. The same type as input is retained!
45
-
46
- // at index 2, we have first letter a - that's second index, counting graphemes
47
- assert.equal(nativeToUnicode("\uD834\uDF06aa", 3), 2);
48
-
49
- // convert many indexes at once - any nested data structure is fine:
50
- assert.deepEqual(nativeToUnicode("\uD834\uDF06aa", [1, 0, 2, 3]), [0, 0, 1, 2]);
51
-
52
- // numbers from an AST-like complex structure are still picked out and converted:
53
- assert.deepEqual(nativeToUnicode("\uD834\uDF06aa", [1, "0", [[[2]]], 3]), [
54
- 0, // notice matching type is retained
55
- "0", // notice matching type is retained
56
- [[[1]]],
57
- 2,
58
- ]);
59
-
60
- // CONVERTING UNICODE-CHAR-COUNT-BASED TO NATIVE JS INDEXES
61
- // 𝌆 - \uD834\uDF06
62
-
63
- assert.deepEqual(unicodeToNative("\uD834\uDF06aa", [0, 1, 2]), [0, 2, 3]);
64
-
65
- assert.deepEqual(unicodeToNative("\uD834\uDF06aa", [1, 0, 2]), [2, 0, 3]);
66
-
67
- assert.throws(() => unicodeToNative("\uD834\uDF06aa", [1, 0, 2, 3]));
68
- // throws an error!
69
- // that's because there's no character (counting Unicode characters) with index 3
70
- // we have only three Unicode characters, so indexes go only up until 2
71
45
  ```
72
46
 
47
+
73
48
  ## Documentation
74
49
 
75
50
  Please [visit codsen.com](https://codsen.com/os/string-convert-indexes/) for a full description of the API. If you’re looking for the **Changelog**, it’s [here](https://github.com/codsen/codsen/blob/main/packages/string-convert-indexes/CHANGELOG.md).
@@ -82,6 +57,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
82
57
 
83
58
  MIT License
84
59
 
85
- Copyright © 2010-2025 Roy Revelt and other contributors
60
+ Copyright © 2010-2026 Roy Revelt and other contributors
86
61
 
87
62
  <p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
@@ -1,11 +1,34 @@
1
1
  /**
2
2
  * @name string-convert-indexes
3
3
  * @fileoverview Convert between native JS string character indexes and grapheme-count-based indexes
4
- * @version 6.1.3
4
+ * @version 6.2.1
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-convert-indexes/}
8
8
  */
9
9
 
10
- import{traverse as d}from"ast-monkey-traverse";import y from"grapheme-splitter";var a="6.1.3";var E=a;function f(o,i,t){function g(r){return!(!["string","number"].includes(typeof r)||typeof r=="string"&&!/^\d*$/.test(r)||typeof r=="number"&&(!Number.isInteger(r)||r<0))}function p(r,n){let u=0,e=0;for(let c=0,m=r.length;c<m;c++){if(e+=r[c].length,n>=u&&n<e)return c;u+=r[c].length}throw new Error(`string-convert-indexes: [THROW_ID_05] the "indexes" value, ${t}, is not covered by graphemes length!`)}function l(r,n){if(n>=r.length)throw new Error(`string-convert-indexes: [THROW_ID_06] the index to convert, ${n}, is not covered by graphemes length!`);return r.slice(0,n).join("").length}if(typeof i!="string"||!i)throw new TypeError(`string-convert-indexes: [THROW_ID_01] the first input argument, input string, must be a non-zero-length string! Currently it's: ${typeof i}, equal to:
11
- ${i}`);if(t===0)return 0;if(t==="0")return"0";let s=new y().splitGraphemes(i);if(["string","number"].includes(typeof t)){if(g(t))return o==="u"?typeof t=="string"?String(l(s,+t)):l(s,+t):typeof t=="string"?String(p(s,+t)):p(s,+t);throw new Error(`string-convert-indexes: [THROW_ID_02] the second input argument, "indexes" is not suitable to describe string index - it was given as ${JSON.stringify(t,null,4)} (${typeof t})`)}else{if(t&&typeof t=="object")return o==="u"?d(t,(r,n,u)=>{let e=n!==void 0?n:r;if(["string","number"].includes(typeof e)){if(g(e))return typeof e=="string"?String(l(s,+e)):l(s,+e);throw new Error(`string-convert-indexes: [THROW_ID_03] bad value was encountered, ${JSON.stringify(e,null,4)}, its path is ${u.path}`)}return e}):d(t,(r,n,u)=>{let e=n!==void 0?n:r;if(["string","number"].includes(typeof e)){if(g(e))return typeof e=="string"?String(p(s,+e)):p(s,+e);throw new Error(`string-convert-indexes: [THROW_ID_04] bad value was encountered, ${JSON.stringify(e,null,4)}, its path is ${u.path}`)}return e});throw new Error(`string-convert-indexes: [THROW_ID_07] the first input argument, a source string should be a string but it was given as ${i}, type ${typeof i}`)}}function I(o,i){return f("n",o,i)}function T(o,i){return f("u",o,i)}export{I as nativeToUnicode,T as unicodeToNative,E as version};
10
+ import{formatDiagnosticValue as m}from"codsen-utils";import{collectGraphemes as $}from"unicode-segmenter/grapheme";import{traverse as h}from"ast-monkey-traverse";var f="6.2.1";var k=f,v=typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function g(i){let r=typeof i;return r==="string"||r==="number"}function y(i,r,n){let c=i==="n"?"nativeToUnicode":"unicodeToNative";function d(e){return!(!g(e)||typeof e=="string"&&!/^\d*$/.test(e)||typeof e=="number"&&(!Number.isInteger(e)||e<0))}function a(e,o){let u=0,t=0;for(let p=0,b=e.length;p<b;p++){if(t+=e[p].length,o>=u&&o<t)return p;u+=e[p].length}throw new Error(`string-convert-indexes/${c}(): [THROW_ID_01] the "indexes" value, ${n}, is not covered by graphemes length!`)}function l(e,o){if(o>=e.length)throw new Error(`string-convert-indexes/${c}(): [THROW_ID_02] the index to convert, ${o}, is not covered by graphemes length!`);return e.slice(0,o).join("").length}if(typeof r!="string"||!r)throw new TypeError(`string-convert-indexes/${c}(): [THROW_ID_03] the first input argument, input string, must be a non-zero-length string! Currently it's: ${typeof r}, equal to:
11
+ ${r}`);if(n===0)return 0;if(n==="0")return"0";let s=v?Array.from(v.segment(r),({segment:e})=>e):$(r);if(g(n)){if(d(n))return i==="u"?typeof n=="string"?String(l(s,+n)):l(s,+n):typeof n=="string"?String(a(s,+n)):a(s,+n);throw new Error(`string-convert-indexes/${c}(): [THROW_ID_04] the second input argument, "indexes" is not suitable to describe string index - it was given as ${m(n,4)} (${typeof n})`)}else{if(n&&typeof n=="object")return i==="u"?h(n,(e,o,u)=>{let t=o!==void 0?o:e;if(g(t)){if(d(t))return typeof t=="string"?String(l(s,+t)):l(s,+t);throw new Error(`string-convert-indexes/${c}(): [THROW_ID_05] bad value was encountered, ${m(t,4)}, its path is ${u.path}`)}return t}):h(n,(e,o,u)=>{let t=o!==void 0?o:e;if(g(t)){if(d(t))return typeof t=="string"?String(a(s,+t)):a(s,+t);throw new Error(`string-convert-indexes/${c}(): [THROW_ID_06] bad value was encountered, ${m(t,4)}, its path is ${u.path}`)}return t});throw new Error(`string-convert-indexes/${c}(): [THROW_ID_07] the first input argument, a source string should be a string but it was given as ${r}, type ${typeof r}`)}}function D(i,r){return y("n",i,r)}function E(i,r){return y("u",i,r)}export{D as nativeToUnicode,E as unicodeToNative,k as version};
12
+ /*!
13
+ * unicode-segmenter
14
+ * MIT License
15
+ * Copyright (c) 2024 Hyeseong Kim <hey@hyeseong.kim>
16
+ *
17
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
18
+ * of this software and associated documentation files (the "Software"), to deal
19
+ * in the Software without restriction, including without limitation the rights
20
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
+ * copies of the Software, and to permit persons to whom the Software is
22
+ * furnished to do so, subject to the following conditions:
23
+ *
24
+ * The above copyright notice and this permission notice shall be included in
25
+ * all copies or substantial portions of the Software.
26
+ *
27
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
+ * SOFTWARE.
34
+ */
@@ -1,34 +1,49 @@
1
1
  /**
2
2
  * @name string-convert-indexes
3
3
  * @fileoverview Convert between native JS string character indexes and grapheme-count-based indexes
4
- * @version 6.1.3
4
+ * @version 6.2.1
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-convert-indexes/}
8
8
  */
9
9
 
10
- "use strict";var stringConvertIndexes=(()=>{var D0=Object.create;var $=Object.defineProperty,A0=Object.defineProperties,i0=Object.getOwnPropertyDescriptor,s0=Object.getOwnPropertyDescriptors,F0=Object.getOwnPropertyNames,K=Object.getOwnPropertySymbols,u0=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty,a0=Object.prototype.propertyIsEnumerable;var Q=(t,r,D)=>r in t?$(t,r,{enumerable:!0,configurable:!0,writable:!0,value:D}):t[r]=D,O=(t,r)=>{for(var D in r||(r={}))Z.call(r,D)&&Q(t,D,r[D]);if(K)for(var D of K(r))a0.call(r,D)&&Q(t,D,r[D]);return t},S=(t,r)=>A0(t,s0(r));var q=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),l0=(t,r)=>{for(var D in r)$(t,D,{get:r[D],enumerable:!0})},z=(t,r,D,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let F of F0(r))!Z.call(t,F)&&F!==D&&$(t,F,{get:()=>r[F],enumerable:!(l=i0(r,F))||l.enumerable});return t};var R=(t,r,D)=>(D=t!=null?D0(u0(t)):{},z(r||!t||!t.__esModule?$(D,"default",{value:t,enumerable:!0}):D,t)),f0=t=>z($({},"__esModule",{value:!0}),t);var _=q((O0,X)=>{"use strict";X.exports=E0;function j(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function E0(t){if(t=t||{},t.circles)return p0(t);let r=new Map;if(r.set(Date,i=>new Date(i)),r.set(Map,(i,s)=>new Map(l(Array.from(i),s))),r.set(Set,(i,s)=>new Set(l(Array.from(i),s))),t.constructorHandlers)for(let i of t.constructorHandlers)r.set(i[0],i[1]);let D=null;return t.proto?h:F;function l(i,s){let C=Object.keys(i),n=new Array(C.length);for(let A=0;A<C.length;A++){let B=C[A],a=i[B];typeof a!="object"||a===null?n[B]=a:a.constructor!==Object&&(D=r.get(a.constructor))?n[B]=D(a,s):ArrayBuffer.isView(a)?n[B]=j(a):n[B]=s(a)}return n}function F(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return l(i,F);if(i.constructor!==Object&&(D=r.get(i.constructor)))return D(i,F);let s={};for(let C in i){if(Object.hasOwnProperty.call(i,C)===!1)continue;let n=i[C];typeof n!="object"||n===null?s[C]=n:n.constructor!==Object&&(D=r.get(n.constructor))?s[C]=D(n,F):ArrayBuffer.isView(n)?s[C]=j(n):s[C]=F(n)}return s}function h(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return l(i,h);if(i.constructor!==Object&&(D=r.get(i.constructor)))return D(i,h);let s={};for(let C in i){let n=i[C];typeof n!="object"||n===null?s[C]=n:n.constructor!==Object&&(D=r.get(n.constructor))?s[C]=D(n,h):ArrayBuffer.isView(n)?s[C]=j(n):s[C]=h(n)}return s}}function p0(t){let r=[],D=[],l=new Map;if(l.set(Date,C=>new Date(C)),l.set(Map,(C,n)=>new Map(h(Array.from(C),n))),l.set(Set,(C,n)=>new Set(h(Array.from(C),n))),t.constructorHandlers)for(let C of t.constructorHandlers)l.set(C[0],C[1]);let F=null;return t.proto?s:i;function h(C,n){let A=Object.keys(C),B=new Array(A.length);for(let a=0;a<A.length;a++){let y=A[a],m=C[y];if(typeof m!="object"||m===null)B[y]=m;else if(m.constructor!==Object&&(F=l.get(m.constructor)))B[y]=F(m,n);else if(ArrayBuffer.isView(m))B[y]=j(m);else{let w=r.indexOf(m);w!==-1?B[y]=D[w]:B[y]=n(m)}}return B}function i(C){if(typeof C!="object"||C===null)return C;if(Array.isArray(C))return h(C,i);if(C.constructor!==Object&&(F=l.get(C.constructor)))return F(C,i);let n={};r.push(C),D.push(n);for(let A in C){if(Object.hasOwnProperty.call(C,A)===!1)continue;let B=C[A];if(typeof B!="object"||B===null)n[A]=B;else if(B.constructor!==Object&&(F=l.get(B.constructor)))n[A]=F(B,i);else if(ArrayBuffer.isView(B))n[A]=j(B);else{let a=r.indexOf(B);a!==-1?n[A]=D[a]:n[A]=i(B)}}return r.pop(),D.pop(),n}function s(C){if(typeof C!="object"||C===null)return C;if(Array.isArray(C))return h(C,s);if(C.constructor!==Object&&(F=l.get(C.constructor)))return F(C,s);let n={};r.push(C),D.push(n);for(let A in C){let B=C[A];if(typeof B!="object"||B===null)n[A]=B;else if(B.constructor!==Object&&(F=l.get(B.constructor)))n[A]=F(B,s);else if(ArrayBuffer.isView(B))n[A]=j(B);else{let a=r.indexOf(B);a!==-1?n[A]=D[a]:n[A]=s(B)}}return r.pop(),D.pop(),n}}});var c=q((R0,I)=>{function h0(){var t=0,r=1,D=2,l=3,F=4,h=5,i=6,s=7,C=8,n=9,A=10,B=11,a=12,y=13,m=14,w=15,H=16,k=17,b=0,T=1,N=2,B0=3,r0=4;function t0(x,u){return 55296<=x.charCodeAt(u)&&x.charCodeAt(u)<=56319&&56320<=x.charCodeAt(u+1)&&x.charCodeAt(u+1)<=57343}function V(x,u){u===void 0&&(u=0);var p=x.charCodeAt(u);if(55296<=p&&p<=56319&&u<x.length-1){var f=p,E=x.charCodeAt(u+1);return 56320<=E&&E<=57343?(f-55296)*1024+(E-56320)+65536:f}if(56320<=p&&p<=57343&&u>=1){var f=x.charCodeAt(u-1),E=p;return 55296<=f&&f<=56319?(f-55296)*1024+(E-56320)+65536:E}return p}function n0(x,u,p){var f=[x].concat(u).concat([p]),E=f[f.length-2],g=p,W=f.lastIndexOf(m);if(W>1&&f.slice(1,W).every(function(v){return v==l})&&[l,y,k].indexOf(x)==-1)return N;var G=f.lastIndexOf(F);if(G>0&&f.slice(1,G).every(function(v){return v==F})&&[a,F].indexOf(E)==-1)return f.filter(function(v){return v==F}).length%2==1?B0:r0;if(E==t&&g==r)return b;if(E==D||E==t||E==r)return g==m&&u.every(function(v){return v==l})?N:T;if(g==D||g==t||g==r)return T;if(E==i&&(g==i||g==s||g==n||g==A))return b;if((E==n||E==s)&&(g==s||g==C))return b;if((E==A||E==C)&&g==C)return b;if(g==l||g==w)return b;if(g==h)return b;if(E==a)return b;var J=f.indexOf(l)!=-1?f.lastIndexOf(l)-1:f.length-2;return[y,k].indexOf(f[J])!=-1&&f.slice(J+1,-1).every(function(v){return v==l})&&g==m||E==w&&[H,k].indexOf(g)!=-1?b:u.indexOf(F)!=-1?N:E==F&&g==F?b:T}this.nextBreak=function(x,u){if(u===void 0&&(u=0),u<0)return 0;if(u>=x.length-1)return x.length;for(var p=U(V(x,u)),f=[],E=u+1;E<x.length;E++)if(!t0(x,E-1)){var g=U(V(x,E));if(n0(p,f,g))return E;f.push(g)}return x.length},this.splitGraphemes=function(x){for(var u=[],p=0,f;(f=this.nextBreak(x,p))<x.length;)u.push(x.slice(p,f)),p=f;return p<x.length&&u.push(x.slice(p)),u},this.iterateGraphemes=function(x){var u=0,p={next:(function(){var f,E;return(E=this.nextBreak(x,u))<x.length?(f=x.slice(u,E),u=E,{value:f,done:!1}):u<x.length?(f=x.slice(u),u=x.length,{value:f,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(p[Symbol.iterator]=function(){return p}),p},this.countGraphemes=function(x){for(var u=0,p=0,f;(f=this.nextBreak(x,p))<x.length;)p=f,u++;return p<x.length&&u++,u};function U(x){return 1536<=x&&x<=1541||x==1757||x==1807||x==2274||x==3406||x==69821||70082<=x&&x<=70083||x==72250||72326<=x&&x<=72329||x==73030?a:x==13?t:x==10?r:0<=x&&x<=9||11<=x&&x<=12||14<=x&&x<=31||127<=x&&x<=159||x==173||x==1564||x==6158||x==8203||8206<=x&&x<=8207||x==8232||x==8233||8234<=x&&x<=8238||8288<=x&&x<=8292||x==8293||8294<=x&&x<=8303||55296<=x&&x<=57343||x==65279||65520<=x&&x<=65528||65529<=x&&x<=65531||113824<=x&&x<=113827||119155<=x&&x<=119162||x==917504||x==917505||917506<=x&&x<=917535||917632<=x&&x<=917759||918e3<=x&&x<=921599?D:768<=x&&x<=879||1155<=x&&x<=1159||1160<=x&&x<=1161||1425<=x&&x<=1469||x==1471||1473<=x&&x<=1474||1476<=x&&x<=1477||x==1479||1552<=x&&x<=1562||1611<=x&&x<=1631||x==1648||1750<=x&&x<=1756||1759<=x&&x<=1764||1767<=x&&x<=1768||1770<=x&&x<=1773||x==1809||1840<=x&&x<=1866||1958<=x&&x<=1968||2027<=x&&x<=2035||2070<=x&&x<=2073||2075<=x&&x<=2083||2085<=x&&x<=2087||2089<=x&&x<=2093||2137<=x&&x<=2139||2260<=x&&x<=2273||2275<=x&&x<=2306||x==2362||x==2364||2369<=x&&x<=2376||x==2381||2385<=x&&x<=2391||2402<=x&&x<=2403||x==2433||x==2492||x==2494||2497<=x&&x<=2500||x==2509||x==2519||2530<=x&&x<=2531||2561<=x&&x<=2562||x==2620||2625<=x&&x<=2626||2631<=x&&x<=2632||2635<=x&&x<=2637||x==2641||2672<=x&&x<=2673||x==2677||2689<=x&&x<=2690||x==2748||2753<=x&&x<=2757||2759<=x&&x<=2760||x==2765||2786<=x&&x<=2787||2810<=x&&x<=2815||x==2817||x==2876||x==2878||x==2879||2881<=x&&x<=2884||x==2893||x==2902||x==2903||2914<=x&&x<=2915||x==2946||x==3006||x==3008||x==3021||x==3031||x==3072||3134<=x&&x<=3136||3142<=x&&x<=3144||3146<=x&&x<=3149||3157<=x&&x<=3158||3170<=x&&x<=3171||x==3201||x==3260||x==3263||x==3266||x==3270||3276<=x&&x<=3277||3285<=x&&x<=3286||3298<=x&&x<=3299||3328<=x&&x<=3329||3387<=x&&x<=3388||x==3390||3393<=x&&x<=3396||x==3405||x==3415||3426<=x&&x<=3427||x==3530||x==3535||3538<=x&&x<=3540||x==3542||x==3551||x==3633||3636<=x&&x<=3642||3655<=x&&x<=3662||x==3761||3764<=x&&x<=3769||3771<=x&&x<=3772||3784<=x&&x<=3789||3864<=x&&x<=3865||x==3893||x==3895||x==3897||3953<=x&&x<=3966||3968<=x&&x<=3972||3974<=x&&x<=3975||3981<=x&&x<=3991||3993<=x&&x<=4028||x==4038||4141<=x&&x<=4144||4146<=x&&x<=4151||4153<=x&&x<=4154||4157<=x&&x<=4158||4184<=x&&x<=4185||4190<=x&&x<=4192||4209<=x&&x<=4212||x==4226||4229<=x&&x<=4230||x==4237||x==4253||4957<=x&&x<=4959||5906<=x&&x<=5908||5938<=x&&x<=5940||5970<=x&&x<=5971||6002<=x&&x<=6003||6068<=x&&x<=6069||6071<=x&&x<=6077||x==6086||6089<=x&&x<=6099||x==6109||6155<=x&&x<=6157||6277<=x&&x<=6278||x==6313||6432<=x&&x<=6434||6439<=x&&x<=6440||x==6450||6457<=x&&x<=6459||6679<=x&&x<=6680||x==6683||x==6742||6744<=x&&x<=6750||x==6752||x==6754||6757<=x&&x<=6764||6771<=x&&x<=6780||x==6783||6832<=x&&x<=6845||x==6846||6912<=x&&x<=6915||x==6964||6966<=x&&x<=6970||x==6972||x==6978||7019<=x&&x<=7027||7040<=x&&x<=7041||7074<=x&&x<=7077||7080<=x&&x<=7081||7083<=x&&x<=7085||x==7142||7144<=x&&x<=7145||x==7149||7151<=x&&x<=7153||7212<=x&&x<=7219||7222<=x&&x<=7223||7376<=x&&x<=7378||7380<=x&&x<=7392||7394<=x&&x<=7400||x==7405||x==7412||7416<=x&&x<=7417||7616<=x&&x<=7673||7675<=x&&x<=7679||x==8204||8400<=x&&x<=8412||8413<=x&&x<=8416||x==8417||8418<=x&&x<=8420||8421<=x&&x<=8432||11503<=x&&x<=11505||x==11647||11744<=x&&x<=11775||12330<=x&&x<=12333||12334<=x&&x<=12335||12441<=x&&x<=12442||x==42607||42608<=x&&x<=42610||42612<=x&&x<=42621||42654<=x&&x<=42655||42736<=x&&x<=42737||x==43010||x==43014||x==43019||43045<=x&&x<=43046||43204<=x&&x<=43205||43232<=x&&x<=43249||43302<=x&&x<=43309||43335<=x&&x<=43345||43392<=x&&x<=43394||x==43443||43446<=x&&x<=43449||x==43452||x==43493||43561<=x&&x<=43566||43569<=x&&x<=43570||43573<=x&&x<=43574||x==43587||x==43596||x==43644||x==43696||43698<=x&&x<=43700||43703<=x&&x<=43704||43710<=x&&x<=43711||x==43713||43756<=x&&x<=43757||x==43766||x==44005||x==44008||x==44013||x==64286||65024<=x&&x<=65039||65056<=x&&x<=65071||65438<=x&&x<=65439||x==66045||x==66272||66422<=x&&x<=66426||68097<=x&&x<=68099||68101<=x&&x<=68102||68108<=x&&x<=68111||68152<=x&&x<=68154||x==68159||68325<=x&&x<=68326||x==69633||69688<=x&&x<=69702||69759<=x&&x<=69761||69811<=x&&x<=69814||69817<=x&&x<=69818||69888<=x&&x<=69890||69927<=x&&x<=69931||69933<=x&&x<=69940||x==70003||70016<=x&&x<=70017||70070<=x&&x<=70078||70090<=x&&x<=70092||70191<=x&&x<=70193||x==70196||70198<=x&&x<=70199||x==70206||x==70367||70371<=x&&x<=70378||70400<=x&&x<=70401||x==70460||x==70462||x==70464||x==70487||70502<=x&&x<=70508||70512<=x&&x<=70516||70712<=x&&x<=70719||70722<=x&&x<=70724||x==70726||x==70832||70835<=x&&x<=70840||x==70842||x==70845||70847<=x&&x<=70848||70850<=x&&x<=70851||x==71087||71090<=x&&x<=71093||71100<=x&&x<=71101||71103<=x&&x<=71104||71132<=x&&x<=71133||71219<=x&&x<=71226||x==71229||71231<=x&&x<=71232||x==71339||x==71341||71344<=x&&x<=71349||x==71351||71453<=x&&x<=71455||71458<=x&&x<=71461||71463<=x&&x<=71467||72193<=x&&x<=72198||72201<=x&&x<=72202||72243<=x&&x<=72248||72251<=x&&x<=72254||x==72263||72273<=x&&x<=72278||72281<=x&&x<=72283||72330<=x&&x<=72342||72344<=x&&x<=72345||72752<=x&&x<=72758||72760<=x&&x<=72765||x==72767||72850<=x&&x<=72871||72874<=x&&x<=72880||72882<=x&&x<=72883||72885<=x&&x<=72886||73009<=x&&x<=73014||x==73018||73020<=x&&x<=73021||73023<=x&&x<=73029||x==73031||92912<=x&&x<=92916||92976<=x&&x<=92982||94095<=x&&x<=94098||113821<=x&&x<=113822||x==119141||119143<=x&&x<=119145||119150<=x&&x<=119154||119163<=x&&x<=119170||119173<=x&&x<=119179||119210<=x&&x<=119213||119362<=x&&x<=119364||121344<=x&&x<=121398||121403<=x&&x<=121452||x==121461||x==121476||121499<=x&&x<=121503||121505<=x&&x<=121519||122880<=x&&x<=122886||122888<=x&&x<=122904||122907<=x&&x<=122913||122915<=x&&x<=122916||122918<=x&&x<=122922||125136<=x&&x<=125142||125252<=x&&x<=125258||917536<=x&&x<=917631||917760<=x&&x<=917999?l:127462<=x&&x<=127487?F:x==2307||x==2363||2366<=x&&x<=2368||2377<=x&&x<=2380||2382<=x&&x<=2383||2434<=x&&x<=2435||2495<=x&&x<=2496||2503<=x&&x<=2504||2507<=x&&x<=2508||x==2563||2622<=x&&x<=2624||x==2691||2750<=x&&x<=2752||x==2761||2763<=x&&x<=2764||2818<=x&&x<=2819||x==2880||2887<=x&&x<=2888||2891<=x&&x<=2892||x==3007||3009<=x&&x<=3010||3014<=x&&x<=3016||3018<=x&&x<=3020||3073<=x&&x<=3075||3137<=x&&x<=3140||3202<=x&&x<=3203||x==3262||3264<=x&&x<=3265||3267<=x&&x<=3268||3271<=x&&x<=3272||3274<=x&&x<=3275||3330<=x&&x<=3331||3391<=x&&x<=3392||3398<=x&&x<=3400||3402<=x&&x<=3404||3458<=x&&x<=3459||3536<=x&&x<=3537||3544<=x&&x<=3550||3570<=x&&x<=3571||x==3635||x==3763||3902<=x&&x<=3903||x==3967||x==4145||4155<=x&&x<=4156||4182<=x&&x<=4183||x==4228||x==6070||6078<=x&&x<=6085||6087<=x&&x<=6088||6435<=x&&x<=6438||6441<=x&&x<=6443||6448<=x&&x<=6449||6451<=x&&x<=6456||6681<=x&&x<=6682||x==6741||x==6743||6765<=x&&x<=6770||x==6916||x==6965||x==6971||6973<=x&&x<=6977||6979<=x&&x<=6980||x==7042||x==7073||7078<=x&&x<=7079||x==7082||x==7143||7146<=x&&x<=7148||x==7150||7154<=x&&x<=7155||7204<=x&&x<=7211||7220<=x&&x<=7221||x==7393||7410<=x&&x<=7411||x==7415||43043<=x&&x<=43044||x==43047||43136<=x&&x<=43137||43188<=x&&x<=43203||43346<=x&&x<=43347||x==43395||43444<=x&&x<=43445||43450<=x&&x<=43451||43453<=x&&x<=43456||43567<=x&&x<=43568||43571<=x&&x<=43572||x==43597||x==43755||43758<=x&&x<=43759||x==43765||44003<=x&&x<=44004||44006<=x&&x<=44007||44009<=x&&x<=44010||x==44012||x==69632||x==69634||x==69762||69808<=x&&x<=69810||69815<=x&&x<=69816||x==69932||x==70018||70067<=x&&x<=70069||70079<=x&&x<=70080||70188<=x&&x<=70190||70194<=x&&x<=70195||x==70197||70368<=x&&x<=70370||70402<=x&&x<=70403||x==70463||70465<=x&&x<=70468||70471<=x&&x<=70472||70475<=x&&x<=70477||70498<=x&&x<=70499||70709<=x&&x<=70711||70720<=x&&x<=70721||x==70725||70833<=x&&x<=70834||x==70841||70843<=x&&x<=70844||x==70846||x==70849||71088<=x&&x<=71089||71096<=x&&x<=71099||x==71102||71216<=x&&x<=71218||71227<=x&&x<=71228||x==71230||x==71340||71342<=x&&x<=71343||x==71350||71456<=x&&x<=71457||x==71462||72199<=x&&x<=72200||x==72249||72279<=x&&x<=72280||x==72343||x==72751||x==72766||x==72873||x==72881||x==72884||94033<=x&&x<=94078||x==119142||x==119149?h:4352<=x&&x<=4447||43360<=x&&x<=43388?i:4448<=x&&x<=4519||55216<=x&&x<=55238?s:4520<=x&&x<=4607||55243<=x&&x<=55291?C:x==44032||x==44060||x==44088||x==44116||x==44144||x==44172||x==44200||x==44228||x==44256||x==44284||x==44312||x==44340||x==44368||x==44396||x==44424||x==44452||x==44480||x==44508||x==44536||x==44564||x==44592||x==44620||x==44648||x==44676||x==44704||x==44732||x==44760||x==44788||x==44816||x==44844||x==44872||x==44900||x==44928||x==44956||x==44984||x==45012||x==45040||x==45068||x==45096||x==45124||x==45152||x==45180||x==45208||x==45236||x==45264||x==45292||x==45320||x==45348||x==45376||x==45404||x==45432||x==45460||x==45488||x==45516||x==45544||x==45572||x==45600||x==45628||x==45656||x==45684||x==45712||x==45740||x==45768||x==45796||x==45824||x==45852||x==45880||x==45908||x==45936||x==45964||x==45992||x==46020||x==46048||x==46076||x==46104||x==46132||x==46160||x==46188||x==46216||x==46244||x==46272||x==46300||x==46328||x==46356||x==46384||x==46412||x==46440||x==46468||x==46496||x==46524||x==46552||x==46580||x==46608||x==46636||x==46664||x==46692||x==46720||x==46748||x==46776||x==46804||x==46832||x==46860||x==46888||x==46916||x==46944||x==46972||x==47e3||x==47028||x==47056||x==47084||x==47112||x==47140||x==47168||x==47196||x==47224||x==47252||x==47280||x==47308||x==47336||x==47364||x==47392||x==47420||x==47448||x==47476||x==47504||x==47532||x==47560||x==47588||x==47616||x==47644||x==47672||x==47700||x==47728||x==47756||x==47784||x==47812||x==47840||x==47868||x==47896||x==47924||x==47952||x==47980||x==48008||x==48036||x==48064||x==48092||x==48120||x==48148||x==48176||x==48204||x==48232||x==48260||x==48288||x==48316||x==48344||x==48372||x==48400||x==48428||x==48456||x==48484||x==48512||x==48540||x==48568||x==48596||x==48624||x==48652||x==48680||x==48708||x==48736||x==48764||x==48792||x==48820||x==48848||x==48876||x==48904||x==48932||x==48960||x==48988||x==49016||x==49044||x==49072||x==49100||x==49128||x==49156||x==49184||x==49212||x==49240||x==49268||x==49296||x==49324||x==49352||x==49380||x==49408||x==49436||x==49464||x==49492||x==49520||x==49548||x==49576||x==49604||x==49632||x==49660||x==49688||x==49716||x==49744||x==49772||x==49800||x==49828||x==49856||x==49884||x==49912||x==49940||x==49968||x==49996||x==50024||x==50052||x==50080||x==50108||x==50136||x==50164||x==50192||x==50220||x==50248||x==50276||x==50304||x==50332||x==50360||x==50388||x==50416||x==50444||x==50472||x==50500||x==50528||x==50556||x==50584||x==50612||x==50640||x==50668||x==50696||x==50724||x==50752||x==50780||x==50808||x==50836||x==50864||x==50892||x==50920||x==50948||x==50976||x==51004||x==51032||x==51060||x==51088||x==51116||x==51144||x==51172||x==51200||x==51228||x==51256||x==51284||x==51312||x==51340||x==51368||x==51396||x==51424||x==51452||x==51480||x==51508||x==51536||x==51564||x==51592||x==51620||x==51648||x==51676||x==51704||x==51732||x==51760||x==51788||x==51816||x==51844||x==51872||x==51900||x==51928||x==51956||x==51984||x==52012||x==52040||x==52068||x==52096||x==52124||x==52152||x==52180||x==52208||x==52236||x==52264||x==52292||x==52320||x==52348||x==52376||x==52404||x==52432||x==52460||x==52488||x==52516||x==52544||x==52572||x==52600||x==52628||x==52656||x==52684||x==52712||x==52740||x==52768||x==52796||x==52824||x==52852||x==52880||x==52908||x==52936||x==52964||x==52992||x==53020||x==53048||x==53076||x==53104||x==53132||x==53160||x==53188||x==53216||x==53244||x==53272||x==53300||x==53328||x==53356||x==53384||x==53412||x==53440||x==53468||x==53496||x==53524||x==53552||x==53580||x==53608||x==53636||x==53664||x==53692||x==53720||x==53748||x==53776||x==53804||x==53832||x==53860||x==53888||x==53916||x==53944||x==53972||x==54e3||x==54028||x==54056||x==54084||x==54112||x==54140||x==54168||x==54196||x==54224||x==54252||x==54280||x==54308||x==54336||x==54364||x==54392||x==54420||x==54448||x==54476||x==54504||x==54532||x==54560||x==54588||x==54616||x==54644||x==54672||x==54700||x==54728||x==54756||x==54784||x==54812||x==54840||x==54868||x==54896||x==54924||x==54952||x==54980||x==55008||x==55036||x==55064||x==55092||x==55120||x==55148||x==55176?n:44033<=x&&x<=44059||44061<=x&&x<=44087||44089<=x&&x<=44115||44117<=x&&x<=44143||44145<=x&&x<=44171||44173<=x&&x<=44199||44201<=x&&x<=44227||44229<=x&&x<=44255||44257<=x&&x<=44283||44285<=x&&x<=44311||44313<=x&&x<=44339||44341<=x&&x<=44367||44369<=x&&x<=44395||44397<=x&&x<=44423||44425<=x&&x<=44451||44453<=x&&x<=44479||44481<=x&&x<=44507||44509<=x&&x<=44535||44537<=x&&x<=44563||44565<=x&&x<=44591||44593<=x&&x<=44619||44621<=x&&x<=44647||44649<=x&&x<=44675||44677<=x&&x<=44703||44705<=x&&x<=44731||44733<=x&&x<=44759||44761<=x&&x<=44787||44789<=x&&x<=44815||44817<=x&&x<=44843||44845<=x&&x<=44871||44873<=x&&x<=44899||44901<=x&&x<=44927||44929<=x&&x<=44955||44957<=x&&x<=44983||44985<=x&&x<=45011||45013<=x&&x<=45039||45041<=x&&x<=45067||45069<=x&&x<=45095||45097<=x&&x<=45123||45125<=x&&x<=45151||45153<=x&&x<=45179||45181<=x&&x<=45207||45209<=x&&x<=45235||45237<=x&&x<=45263||45265<=x&&x<=45291||45293<=x&&x<=45319||45321<=x&&x<=45347||45349<=x&&x<=45375||45377<=x&&x<=45403||45405<=x&&x<=45431||45433<=x&&x<=45459||45461<=x&&x<=45487||45489<=x&&x<=45515||45517<=x&&x<=45543||45545<=x&&x<=45571||45573<=x&&x<=45599||45601<=x&&x<=45627||45629<=x&&x<=45655||45657<=x&&x<=45683||45685<=x&&x<=45711||45713<=x&&x<=45739||45741<=x&&x<=45767||45769<=x&&x<=45795||45797<=x&&x<=45823||45825<=x&&x<=45851||45853<=x&&x<=45879||45881<=x&&x<=45907||45909<=x&&x<=45935||45937<=x&&x<=45963||45965<=x&&x<=45991||45993<=x&&x<=46019||46021<=x&&x<=46047||46049<=x&&x<=46075||46077<=x&&x<=46103||46105<=x&&x<=46131||46133<=x&&x<=46159||46161<=x&&x<=46187||46189<=x&&x<=46215||46217<=x&&x<=46243||46245<=x&&x<=46271||46273<=x&&x<=46299||46301<=x&&x<=46327||46329<=x&&x<=46355||46357<=x&&x<=46383||46385<=x&&x<=46411||46413<=x&&x<=46439||46441<=x&&x<=46467||46469<=x&&x<=46495||46497<=x&&x<=46523||46525<=x&&x<=46551||46553<=x&&x<=46579||46581<=x&&x<=46607||46609<=x&&x<=46635||46637<=x&&x<=46663||46665<=x&&x<=46691||46693<=x&&x<=46719||46721<=x&&x<=46747||46749<=x&&x<=46775||46777<=x&&x<=46803||46805<=x&&x<=46831||46833<=x&&x<=46859||46861<=x&&x<=46887||46889<=x&&x<=46915||46917<=x&&x<=46943||46945<=x&&x<=46971||46973<=x&&x<=46999||47001<=x&&x<=47027||47029<=x&&x<=47055||47057<=x&&x<=47083||47085<=x&&x<=47111||47113<=x&&x<=47139||47141<=x&&x<=47167||47169<=x&&x<=47195||47197<=x&&x<=47223||47225<=x&&x<=47251||47253<=x&&x<=47279||47281<=x&&x<=47307||47309<=x&&x<=47335||47337<=x&&x<=47363||47365<=x&&x<=47391||47393<=x&&x<=47419||47421<=x&&x<=47447||47449<=x&&x<=47475||47477<=x&&x<=47503||47505<=x&&x<=47531||47533<=x&&x<=47559||47561<=x&&x<=47587||47589<=x&&x<=47615||47617<=x&&x<=47643||47645<=x&&x<=47671||47673<=x&&x<=47699||47701<=x&&x<=47727||47729<=x&&x<=47755||47757<=x&&x<=47783||47785<=x&&x<=47811||47813<=x&&x<=47839||47841<=x&&x<=47867||47869<=x&&x<=47895||47897<=x&&x<=47923||47925<=x&&x<=47951||47953<=x&&x<=47979||47981<=x&&x<=48007||48009<=x&&x<=48035||48037<=x&&x<=48063||48065<=x&&x<=48091||48093<=x&&x<=48119||48121<=x&&x<=48147||48149<=x&&x<=48175||48177<=x&&x<=48203||48205<=x&&x<=48231||48233<=x&&x<=48259||48261<=x&&x<=48287||48289<=x&&x<=48315||48317<=x&&x<=48343||48345<=x&&x<=48371||48373<=x&&x<=48399||48401<=x&&x<=48427||48429<=x&&x<=48455||48457<=x&&x<=48483||48485<=x&&x<=48511||48513<=x&&x<=48539||48541<=x&&x<=48567||48569<=x&&x<=48595||48597<=x&&x<=48623||48625<=x&&x<=48651||48653<=x&&x<=48679||48681<=x&&x<=48707||48709<=x&&x<=48735||48737<=x&&x<=48763||48765<=x&&x<=48791||48793<=x&&x<=48819||48821<=x&&x<=48847||48849<=x&&x<=48875||48877<=x&&x<=48903||48905<=x&&x<=48931||48933<=x&&x<=48959||48961<=x&&x<=48987||48989<=x&&x<=49015||49017<=x&&x<=49043||49045<=x&&x<=49071||49073<=x&&x<=49099||49101<=x&&x<=49127||49129<=x&&x<=49155||49157<=x&&x<=49183||49185<=x&&x<=49211||49213<=x&&x<=49239||49241<=x&&x<=49267||49269<=x&&x<=49295||49297<=x&&x<=49323||49325<=x&&x<=49351||49353<=x&&x<=49379||49381<=x&&x<=49407||49409<=x&&x<=49435||49437<=x&&x<=49463||49465<=x&&x<=49491||49493<=x&&x<=49519||49521<=x&&x<=49547||49549<=x&&x<=49575||49577<=x&&x<=49603||49605<=x&&x<=49631||49633<=x&&x<=49659||49661<=x&&x<=49687||49689<=x&&x<=49715||49717<=x&&x<=49743||49745<=x&&x<=49771||49773<=x&&x<=49799||49801<=x&&x<=49827||49829<=x&&x<=49855||49857<=x&&x<=49883||49885<=x&&x<=49911||49913<=x&&x<=49939||49941<=x&&x<=49967||49969<=x&&x<=49995||49997<=x&&x<=50023||50025<=x&&x<=50051||50053<=x&&x<=50079||50081<=x&&x<=50107||50109<=x&&x<=50135||50137<=x&&x<=50163||50165<=x&&x<=50191||50193<=x&&x<=50219||50221<=x&&x<=50247||50249<=x&&x<=50275||50277<=x&&x<=50303||50305<=x&&x<=50331||50333<=x&&x<=50359||50361<=x&&x<=50387||50389<=x&&x<=50415||50417<=x&&x<=50443||50445<=x&&x<=50471||50473<=x&&x<=50499||50501<=x&&x<=50527||50529<=x&&x<=50555||50557<=x&&x<=50583||50585<=x&&x<=50611||50613<=x&&x<=50639||50641<=x&&x<=50667||50669<=x&&x<=50695||50697<=x&&x<=50723||50725<=x&&x<=50751||50753<=x&&x<=50779||50781<=x&&x<=50807||50809<=x&&x<=50835||50837<=x&&x<=50863||50865<=x&&x<=50891||50893<=x&&x<=50919||50921<=x&&x<=50947||50949<=x&&x<=50975||50977<=x&&x<=51003||51005<=x&&x<=51031||51033<=x&&x<=51059||51061<=x&&x<=51087||51089<=x&&x<=51115||51117<=x&&x<=51143||51145<=x&&x<=51171||51173<=x&&x<=51199||51201<=x&&x<=51227||51229<=x&&x<=51255||51257<=x&&x<=51283||51285<=x&&x<=51311||51313<=x&&x<=51339||51341<=x&&x<=51367||51369<=x&&x<=51395||51397<=x&&x<=51423||51425<=x&&x<=51451||51453<=x&&x<=51479||51481<=x&&x<=51507||51509<=x&&x<=51535||51537<=x&&x<=51563||51565<=x&&x<=51591||51593<=x&&x<=51619||51621<=x&&x<=51647||51649<=x&&x<=51675||51677<=x&&x<=51703||51705<=x&&x<=51731||51733<=x&&x<=51759||51761<=x&&x<=51787||51789<=x&&x<=51815||51817<=x&&x<=51843||51845<=x&&x<=51871||51873<=x&&x<=51899||51901<=x&&x<=51927||51929<=x&&x<=51955||51957<=x&&x<=51983||51985<=x&&x<=52011||52013<=x&&x<=52039||52041<=x&&x<=52067||52069<=x&&x<=52095||52097<=x&&x<=52123||52125<=x&&x<=52151||52153<=x&&x<=52179||52181<=x&&x<=52207||52209<=x&&x<=52235||52237<=x&&x<=52263||52265<=x&&x<=52291||52293<=x&&x<=52319||52321<=x&&x<=52347||52349<=x&&x<=52375||52377<=x&&x<=52403||52405<=x&&x<=52431||52433<=x&&x<=52459||52461<=x&&x<=52487||52489<=x&&x<=52515||52517<=x&&x<=52543||52545<=x&&x<=52571||52573<=x&&x<=52599||52601<=x&&x<=52627||52629<=x&&x<=52655||52657<=x&&x<=52683||52685<=x&&x<=52711||52713<=x&&x<=52739||52741<=x&&x<=52767||52769<=x&&x<=52795||52797<=x&&x<=52823||52825<=x&&x<=52851||52853<=x&&x<=52879||52881<=x&&x<=52907||52909<=x&&x<=52935||52937<=x&&x<=52963||52965<=x&&x<=52991||52993<=x&&x<=53019||53021<=x&&x<=53047||53049<=x&&x<=53075||53077<=x&&x<=53103||53105<=x&&x<=53131||53133<=x&&x<=53159||53161<=x&&x<=53187||53189<=x&&x<=53215||53217<=x&&x<=53243||53245<=x&&x<=53271||53273<=x&&x<=53299||53301<=x&&x<=53327||53329<=x&&x<=53355||53357<=x&&x<=53383||53385<=x&&x<=53411||53413<=x&&x<=53439||53441<=x&&x<=53467||53469<=x&&x<=53495||53497<=x&&x<=53523||53525<=x&&x<=53551||53553<=x&&x<=53579||53581<=x&&x<=53607||53609<=x&&x<=53635||53637<=x&&x<=53663||53665<=x&&x<=53691||53693<=x&&x<=53719||53721<=x&&x<=53747||53749<=x&&x<=53775||53777<=x&&x<=53803||53805<=x&&x<=53831||53833<=x&&x<=53859||53861<=x&&x<=53887||53889<=x&&x<=53915||53917<=x&&x<=53943||53945<=x&&x<=53971||53973<=x&&x<=53999||54001<=x&&x<=54027||54029<=x&&x<=54055||54057<=x&&x<=54083||54085<=x&&x<=54111||54113<=x&&x<=54139||54141<=x&&x<=54167||54169<=x&&x<=54195||54197<=x&&x<=54223||54225<=x&&x<=54251||54253<=x&&x<=54279||54281<=x&&x<=54307||54309<=x&&x<=54335||54337<=x&&x<=54363||54365<=x&&x<=54391||54393<=x&&x<=54419||54421<=x&&x<=54447||54449<=x&&x<=54475||54477<=x&&x<=54503||54505<=x&&x<=54531||54533<=x&&x<=54559||54561<=x&&x<=54587||54589<=x&&x<=54615||54617<=x&&x<=54643||54645<=x&&x<=54671||54673<=x&&x<=54699||54701<=x&&x<=54727||54729<=x&&x<=54755||54757<=x&&x<=54783||54785<=x&&x<=54811||54813<=x&&x<=54839||54841<=x&&x<=54867||54869<=x&&x<=54895||54897<=x&&x<=54923||54925<=x&&x<=54951||54953<=x&&x<=54979||54981<=x&&x<=55007||55009<=x&&x<=55035||55037<=x&&x<=55063||55065<=x&&x<=55091||55093<=x&&x<=55119||55121<=x&&x<=55147||55149<=x&&x<=55175||55177<=x&&x<=55203?A:x==9757||x==9977||9994<=x&&x<=9997||x==127877||127938<=x&&x<=127940||x==127943||127946<=x&&x<=127948||128066<=x&&x<=128067||128070<=x&&x<=128080||x==128110||128112<=x&&x<=128120||x==128124||128129<=x&&x<=128131||128133<=x&&x<=128135||x==128170||128372<=x&&x<=128373||x==128378||x==128400||128405<=x&&x<=128406||128581<=x&&x<=128583||128587<=x&&x<=128591||x==128675||128692<=x&&x<=128694||x==128704||x==128716||129304<=x&&x<=129308||129310<=x&&x<=129311||x==129318||129328<=x&&x<=129337||129341<=x&&x<=129342||129489<=x&&x<=129501?y:127995<=x&&x<=127999?m:x==8205?w:x==9792||x==9794||9877<=x&&x<=9878||x==9992||x==10084||x==127752||x==127806||x==127859||x==127891||x==127908||x==127912||x==127979||x==127981||x==128139||128187<=x&&x<=128188||x==128295||x==128300||x==128488||x==128640||x==128658?H:128102<=x&&x<=128105?k:B}return this}typeof I<"u"&&I.exports&&(I.exports=h0)});var v0={};l0(v0,{nativeToUnicode:()=>m0,unicodeToNative:()=>b0,version:()=>y0});var o=R(_(),1);var Y=R(_(),1);var j0=(0,Y.default)();function e(t){if(t==null||typeof t!="object")return!1;let r=Object.getPrototypeOf(t);return r!==null&&r!==Object.prototype&&Object.getPrototypeOf(r)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}function L(t){if(t.includes(".")){let r=t.lastIndexOf(".");if(!t.slice(0,r).includes("."))return t.slice(0,r);for(let D=r-1;D--;)if(t[D]===".")return t.slice(D+1,r)}return null}var P=(0,o.default)();function M(t,r){let D={now:!1};function l(F,h,i,s){let C=P(F),n,A=O({depth:-1,path:""},i);if(A.depth+=1,Array.isArray(C))for(let B=0,a=C.length;B<a&&!s.now;B++){let y=A.path?"".concat(A.path,".").concat(B):"".concat(B);C[B]!==void 0?(A.parent=P(C),A.parentType="array",A.parentKey=L(y),n=l(h(C[B],void 0,S(O({},A),{path:y}),s),h,S(O({},A),{path:y}),s),Number.isNaN(n)&&B<C.length?(C.splice(B,1),B-=1):C[B]=n):C.splice(B,1)}else if(e(C))for(let B in C){if(s.now&&B!=null)break;let a=A.path?"".concat(A.path,".").concat(B):B;A.depth===0&&B!=null&&(A.topmostKey=B),A.parent=P(C),A.parentType="object",A.parentKey=L(a),n=l(h(B,C[B],S(O({},A),{path:a}),s),h,S(O({},A),{path:a}),s),Number.isNaN(n)?delete C[B]:C[B]=n}return C}return l(t,r,{},D)}var x0=R(c(),1);var d="6.1.3";var y0=d;function C0(t,r,D){function l(C){return!(!["string","number"].includes(typeof C)||typeof C=="string"&&!/^\d*$/.test(C)||typeof C=="number"&&(!Number.isInteger(C)||C<0))}function F(C,n){let A=0,B=0;for(let a=0,y=C.length;a<y;a++){if(B+=C[a].length,n>=A&&n<B)return a;A+=C[a].length}throw new Error('string-convert-indexes: [THROW_ID_05] the "indexes" value, '.concat(D,", is not covered by graphemes length!"))}function h(C,n){if(n>=C.length)throw new Error("string-convert-indexes: [THROW_ID_06] the index to convert, ".concat(n,", is not covered by graphemes length!"));return C.slice(0,n).join("").length}if(typeof r!="string"||!r)throw new TypeError("string-convert-indexes: [THROW_ID_01] the first input argument, input string, must be a non-zero-length string! Currently it's: ".concat(typeof r,", equal to:\n").concat(r));if(D===0)return 0;if(D==="0")return"0";let s=new x0.default().splitGraphemes(r);if(["string","number"].includes(typeof D)){if(l(D))return t==="u"?typeof D=="string"?String(h(s,+D)):h(s,+D):typeof D=="string"?String(F(s,+D)):F(s,+D);throw new Error('string-convert-indexes: [THROW_ID_02] the second input argument, "indexes" is not suitable to describe string index - it was given as '.concat(JSON.stringify(D,null,4)," (").concat(typeof D,")"))}else{if(D&&typeof D=="object")return t==="u"?M(D,(C,n,A)=>{let B=n!==void 0?n:C;if(["string","number"].includes(typeof B)){if(l(B))return typeof B=="string"?String(h(s,+B)):h(s,+B);throw new Error("string-convert-indexes: [THROW_ID_03] bad value was encountered, ".concat(JSON.stringify(B,null,4),", its path is ").concat(A.path))}return B}):M(D,(C,n,A)=>{let B=n!==void 0?n:C;if(["string","number"].includes(typeof B)){if(l(B))return typeof B=="string"?String(F(s,+B)):F(s,+B);throw new Error("string-convert-indexes: [THROW_ID_04] bad value was encountered, ".concat(JSON.stringify(B,null,4),", its path is ").concat(A.path))}return B});throw new Error("string-convert-indexes: [THROW_ID_07] the first input argument, a source string should be a string but it was given as ".concat(r,", type ").concat(typeof r))}}function m0(t,r){return C0("n",t,r)}function b0(t,r){return C0("u",t,r)}return f0(v0);})();
10
+ "use strict";var stringConvertIndexes=(()=>{var j=Object.defineProperty,te=Object.defineProperties,re=Object.getOwnPropertyDescriptor,ne=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertyNames,T=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var O=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))B.call(t,r)&&O(e,r,t[r]);if(T)for(var r of T(t))oe.call(t,r)&&O(e,r,t[r]);return e},C=(e,t)=>te(e,ne(t));var le=(e,t)=>{for(var r in t)j(e,r,{get:t[r],enumerable:!0})},se=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of ie(t))!B.call(e,l)&&l!==r&&j(e,l,{get:()=>t[l],enumerable:!(i=re(t,l))||i.enumerable});return e};var ue=e=>se(j({},"__esModule",{value:!0}),e);var F=(e,t,r)=>O(e,typeof t!="symbol"?t+"":t,r);var we={};le(we,{nativeToUnicode:()=>ve,unicodeToNative:()=>Ae,version:()=>xe});function ae(){let e=[],t=0,r=!1;return{append(i){return r?!1:t+i.length>1999?(e.push("\u2026"),t+=1,r=!0,!1):(e.push(i),t+=i.length,!0)},result(){return e.join("")},stopped(){return r}}}function fe(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function D(e,t){if(e.append('"')){for(let r=0;r<t.length&&!e.stopped();r+=1){let i=t.charCodeAt(r);i===34?e.append('\\"'):i===92?e.append("\\\\"):i===8?e.append("\\b"):i===9?e.append("\\t"):i===10?e.append("\\n"):i===12?e.append("\\f"):i===13?e.append("\\r"):i<32||i===8232||i===8233||i>=55296&&i<=57343?e.append(fe(i)):e.append(t[r])}e.append('"')}}function ce(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function W(e,t){e.append("Symbol(");let r=String(t);r.length>8&&D(e,r.slice(7,-1)),e.append(")")}function R(e,t){typeof t=="symbol"?W(e,t):D(e,String(t))}function S(e,t=0){let r=ae(),i=t===4?4:0,l=new WeakSet,n=0;function f(s){i&&r.append(" ".repeat(s*i))}function p(s,h){s&&r.append(","),i&&(r.append("\n"),f(h+1))}function o(s,h,g){i&&h&&(r.append("\n"),f(g)),r.append(s)}function c(s,h){Object.prototype.hasOwnProperty.call(s,"value")?m(s.value,h):r.append(ce(s))}function u(s,h){let g;try{g=Reflect.getOwnPropertyDescriptor(s,"length")}catch(y){r.append("[Uninspectable]");return}let b=g==null?void 0:g.value;if(!Number.isSafeInteger(b)||b<0){r.append("[Uninspectable]");return}r.append("[");let x=!1;for(let y=0;y<b&&!r.stopped();y+=1){if(p(x,h),x=!0,n>=50){r.append("[MaxEntries]");break}n+=1;let v;try{v=Reflect.getOwnPropertyDescriptor(s,String(y))}catch(ke){r.append("[Uninspectable]");continue}v!=null&&v.enumerable?c(v,h+1):r.append("[Empty]")}o("]",x,h)}function a(s,h){let g;try{g=Reflect.ownKeys(s)}catch(x){r.append("[Uninspectable]");return}r.append("{");let b=!1;for(let x of g){if(r.stopped())break;if(n>=50){p(b,h),b=!0,D(r,"\u2026"),r.append(i?": ":":"),r.append("[MaxEntries]");break}n+=1;let y;try{y=Reflect.getOwnPropertyDescriptor(s,x)}catch(v){p(b,h),b=!0,R(r,x),r.append(i?": ":":"),r.append("[Uninspectable]");continue}y!=null&&y.enumerable&&(p(b,h),b=!0,R(r,x),r.append(i?": ":":"),c(y,h+1))}o("}",b,h)}function d(s,h){if(l.has(s)){r.append("[Circular]");return}if(h>=5){r.append("[MaxDepth]");return}let g;try{g=Array.isArray(s)}catch(b){r.append("[Uninspectable]");return}l.add(s);try{g?u(s,h):a(s,h)}finally{l.delete(s)}}function m(s,h){s===null?r.append("null"):typeof s=="string"?D(r,s):typeof s=="number"?r.append(Object.is(s,-0)?"-0":String(s)):typeof s=="boolean"?r.append(s?"true":"false"):typeof s>"u"?r.append("undefined"):typeof s=="bigint"?r.append("".concat(s,"n")):typeof s=="symbol"?W(r,s):typeof s=="function"?r.append("[Function]"):d(s,h)}try{return m(e,0),r.result()}catch(s){return"[Uninspectable]"}}var Fe=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);var pe=class{constructor(){F(this,"hasRepeatedReferences",!1);F(this,"clones",[]);F(this,"index");F(this,"sources",[])}get(e){if(this.index){let r=this.index.get(e);return r!==void 0&&(this.hasRepeatedReferences=!0),r}let t=this.sources.indexOf(e);if(t!==-1)return this.hasRepeatedReferences=!0,this.clones[t]}set(e,t){if(this.index){this.index.set(e,t);return}if(this.sources.push(e),this.clones.push(t),this.sources.length===32){this.index=new WeakMap;for(let r=0;r<this.sources.length;r++)this.index.set(this.sources[r],this.clones[r]);this.sources=[],this.clones=[]}}};function _(e,t){let r=t.get(e);if(r!==void 0)return r;let i=e.slice(0);return t.set(e,i),i}function he(e,t){if(typeof Buffer<"u"&&Buffer.isBuffer(e)){let n=Buffer.from(e);return t.set(e,n),n}let r=_(e.buffer,t);if(e instanceof DataView){let n=new DataView(r,e.byteOffset,e.byteLength);return t.set(e,n),n}let i=e.constructor,l=new i(r,e.byteOffset,e.length);return t.set(e,l),l}function I(e,t,r,i){for(let l of r){let n=t[l];e[l]=typeof n!="object"||n===null?n:w(n,i)}}function w(e,t){if(typeof e!="object"||e===null)return e;let r=t.get(e);if(r!==void 0)return r;if(Array.isArray(e)){let n=e.length,f=new Array(n);t.set(e,f);let p=e,o=Object.keys(e);if(o.length===n&&(n===0||o[n-1]==="".concat(n-1)))for(let c=0;c<n;c++){let u=p[c];f[c]=typeof u!="object"||u===null?u:w(u,t)}else I(f,p,o,t);return f}let i=Object.getPrototypeOf(e);if(i===Object.prototype||i===null){let n={};return t.set(e,n),I(n,e,Object.keys(e),t),n}if(e instanceof Date){let n=new Date(e.getTime());return t.set(e,n),n}if(ArrayBuffer.isView(e))return he(e,t);if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return _(e,t);if(e instanceof Map){let n=new Map;t.set(e,n);for(let[f,p]of e)n.set(w(f,t),w(p,t));return n}if(e instanceof Set){let n=new Set;t.set(e,n);for(let f of e)n.add(w(f,t));return n}let l={};return t.set(e,l),I(l,e,Object.keys(e),t),l}function k(e){return w(e,new pe)}function U(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function L(e,t,r){let i=e.length,l=0,n=0,f=-1,p=()=>{let o=0,c=0,u;do u=parseInt(e[l++],36),o+=(u&15)<<c,c+=4;while(u&16);return o};for(;l<i;){let o=f+1+p();r(o,f=o+p(),t?parseInt(t[n++],36):0)}}function P(e,t,r){let i=0,l=t.length-1;for(;i<=l;){let n=i+l>>>1,f=r[n];if(e<t[n])l=n-1;else if(e>f>>>5)i=n+1;else return f&31}return 0}var M="090001000h1v5g2903000hl2v6jh16ng1s210111110o35aa10u2k1g10l6600152113h2010u1q1r5aq3890o13181214r22k3158q2n1000v100h1k20000001207030001160721k171001h1j11610332010010321210090411021c1c02100o301201412230u1130b100h1j116111420120411001100k11l10051001h1j11611142011000321210072411021d0g10r3000000132120090o200200g1j11f2012031213711271t1001o301001000001121371b1f0c101h1l2011001031212000080a1t1001m40400102101600i11t301006c7i601008b6p41r10101041h3d0004115a1j290p3q223000511010100g1501010302003172030c0010016000e0i6v50n40n5tl12ir33s12t11u11cj30100060700010a90t220000l71i20m7203010241000502rd101004k300000006101027050920g3t22bk1300616g209030207u18c1000t10003010501b2o20000102000004g37070101o921c000640602001mcv3rg20000001o16d0c0m1fg6g2h30m10q55f1vm11c0ma0p1a42nc0ne1a090q3314902021204020112030318250105bb1201110i1021i15101131502141b15120511011k1155132040202510201010603060a1f02040104210b1g3290e0e0kn11vs12j11j3040pp12t80g6v1qi2500c0r51ktl7319g21g51gh103040n11010040j51i3f01q1h1d0m27p1a0000cs13200523j200010301010100v140018a4q2501010101c08000i1f12601011g3012215110u1a0001015000pcq181000100011000iji5fvc0u91g5bhg20ie0l94lo6002115303121s12240la1tj23h44tj11t45m4ah33q700000l3ep2021a200t220301012040a0i320j2040007f00100r20c100g3208000011531000s520201036020t900207l1101n311000000321210090a12634b910201l22001051020120011020000e1i520701020000n10h5001050000010000010001re0010323010001r11i520701000001q6000000107l600000230004gg12080001lc62027111n1000411230000000000t820321030030r10090n205001380800501020n2050c0001mc00002000000nc006150000i5l1100600010001q753011160000i441111000000rl11019100000c1h201043102n10ltk1f006eoss2b0202gs94r36si2033ku101m373h50b1rqs4113sli1t22m1uh2435070726u13k92rr7m34h380e0m141egl561g1261114k60ga6nn10t33sv13uf1jf0207150qt16t66pr60n23k6bf1f0e1l29g71c1e029j1n30p11ea0k1028139m16rb2v621122i52213040tf1u3b51n17127c0232041d120819052c28220104060306l5g3l4572g130152cqdl2c3o37a5o27u11c32d9m2cu2191obo57eh9gg1tv3",N="262122424333333393233393339333333333393393bf3b3b3b3b3f3f3bffff33b3bb33ff3f33b3b3333333bffff3b33bb33f33bffff33b3bb33ff3f33b3bbb333b3ff33b333f33b3b3b3b3333b3bf33b3bb39333b33b33b3b3b333b333333b3b33333f3b33b3ffb3f3fff3f3b33f35dc33333f3b3b3b33323333b3bb3b33b3fb3b3333b33333bff3b3f33bfb3b3ff3b3b3b3b3b333b333b3323e224423444444444444444444444444444444444444444444444444444444444444444444444444444444433334433333333b3b3bb33333b353bff3b3b3b3f3ff3b3b333bfff3f33333fb3bb3fb3b3bb33232333f333fff333333333b3b3333bb3b39393f3b3fbf33bb3b393b3b3b3333b33b33b3bbb33b33ffff3b3333bb3933b3b3b333b3b3b3b3b33b3b3b33b3b3b33b3b33b33b3b3b3fffff3bb39b9b3b33b3bf3f3b33f3b3f93b33b3b3bb33b33b3b3b3333393b3b3b33b39bffb3b332333b333dd3b3333233332333333333333333333333333333444444444444a4444444444444344444444444444444444444444444444444444444444",q="0001000000010010000000100000000000000000000000000001000000010018000100000001001000010101100101100000000000000000000100000001111000010000000110101001110111111111000100000021001000010000000100100001000000011010000100000001111000014000000100180001000000010010";var G=new Uint8Array(12448),K=new Uint8Array(1440),Q=new Uint8Array(2816),z,Z;{let e=(l,n,f,p,o)=>{let c=p-n+1,u=l.length;c>0&&f-n<u&&l.fill(o,f>n?f-n:0,c>u?u:c)},t=new Uint32Array(320),r=new Uint32Array(320),i=0;L(M,N,(l,n,f)=>{e(G,0,l,n,f),e(K,42592,l,n,f),e(Q,126976,l,n,f),n>=65040&&!(l>=126976&&n<=129791)&&(t[i]=l,r[i++]=n<<5|f)}),z=t.slice(0,i),Z=r.slice(0,i)}function V(e){return e<12448?G[e]:e<42592?e===12951||e===12953?4:0:e<44032?K[e-42592]:e<55204?(e-44032)%28?8:7:e>=126976&&e<129792?Q[e-126976]:e>>>4===4064?3:de(e)}function de(e){return e<57344?e<=55238?e>=55216?13:0:e>=55243&&e<=55291?12:0:e<65024?e===64286?3:0:e>=917504?e>921599?0:e>=917536&&e<917632||e>=917760&&e<918e3?3:2:P(e,z,Z)}var ge=Uint8Array.from(q);function be(e){return e===2381||e===2509||e===2765||e===2893||e===3149||e===3405||e===4153||e===6098||e===6752||e===6980||e===7083||e===43456||e===43766||e===68159||e===69939||e===70608||e===71998||e===72263||e===72345||e===73538}function me(e,t){return t===8204?e&21:e&8||be(t)?e&21|40:e&21|32}function H(e,t,r){return t===3?e&32?me(e,r):e&21:t===4?17:t===10?e&2^3:t===14?(e&16)>>2|e&41:t===15?33:1}function J(e){let t=[],r=e.length;if(r===0)return t;let i=e.codePointAt(0),l=i>65535?2:1,n=V(i),f=H(1,n,i),p=0;for(;l<r;){i=e.codePointAt(l);let o=V(i),c=!(f&ge[n<<4|o]);f=H(f,o,i),c&&(t.push(e.slice(p,l)),p=l),l+=i>65535?2:1,n=o}return t.push(e.slice(p)),t}function E(e,t){if(typeof t!="function")throw new TypeError("ast-monkey-traverse/traverse(): [THROW_ID_01] The second argument must be a callback function. It was ".concat(typeof t,"."));let r={now:!1};function i(l,n,f,p){let o=l,c,u=A({depth:-1,path:""},f);if(u.depth+=1,Array.isArray(o))for(let a=0,d=o.length;a<d&&!p.now;a++){let m=u.path?"".concat(u.path,".").concat(a):"".concat(a);if(o[a]!==void 0){u.parent=k(o),u.parentType="array",u.parentKey=u.path?u.path.slice(u.path.lastIndexOf(".")+1):null;let s=o[a],h=n(s,void 0,C(A({},u),{path:m}),p);c=i(h===s?h:k(h),n,C(A({},u),{path:m}),p),Number.isNaN(c)&&a<o.length?(o.splice(a,1),a-=1):o[a]=c}else o.splice(a,1)}else if(U(o))for(let a in o){if(p.now&&a!=null)break;let d=u.path?"".concat(u.path,".").concat(a):a;u.depth===0&&a!=null&&(u.topmostKey=a),u.parent=k(o),u.parentType="object",u.parentKey=u.path?u.path.slice(u.path.lastIndexOf(".")+1):null;let m=o[a],s=n(a,m,C(A({},u),{path:d}),p);c=i(s===m?s:k(s),n,C(A({},u),{path:d}),p),Number.isNaN(c)?delete o[a]:o[a]=c}return o}return i(k(e),t,{},r)}var Y="6.2.1";var xe=Y,X=typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function $(e){let t=typeof e;return t==="string"||t==="number"}function ee(e,t,r){let i=e==="n"?"nativeToUnicode":"unicodeToNative";function l(o){return!(!$(o)||typeof o=="string"&&!/^\d*$/.test(o)||typeof o=="number"&&(!Number.isInteger(o)||o<0))}function n(o,c){let u=0,a=0;for(let d=0,m=o.length;d<m;d++){if(a+=o[d].length,c>=u&&c<a)return d;u+=o[d].length}throw new Error("string-convert-indexes/".concat(i,'(): [THROW_ID_01] the "indexes" value, ').concat(r,", is not covered by graphemes length!"))}function f(o,c){if(c>=o.length)throw new Error("string-convert-indexes/".concat(i,"(): [THROW_ID_02] the index to convert, ").concat(c,", is not covered by graphemes length!"));return o.slice(0,c).join("").length}if(typeof t!="string"||!t)throw new TypeError("string-convert-indexes/".concat(i,"(): [THROW_ID_03] the first input argument, input string, must be a non-zero-length string! Currently it's: ").concat(typeof t,", equal to:\n").concat(t));if(r===0)return 0;if(r==="0")return"0";let p=X?Array.from(X.segment(t),({segment:o})=>o):J(t);if($(r)){if(l(r))return e==="u"?typeof r=="string"?String(f(p,+r)):f(p,+r):typeof r=="string"?String(n(p,+r)):n(p,+r);throw new Error("string-convert-indexes/".concat(i,'(): [THROW_ID_04] the second input argument, "indexes" is not suitable to describe string index - it was given as ').concat(S(r,4)," (").concat(typeof r,")"))}else{if(r&&typeof r=="object")return e==="u"?E(r,(o,c,u)=>{let a=c!==void 0?c:o;if($(a)){if(l(a))return typeof a=="string"?String(f(p,+a)):f(p,+a);throw new Error("string-convert-indexes/".concat(i,"(): [THROW_ID_05] bad value was encountered, ").concat(S(a,4),", its path is ").concat(u.path))}return a}):E(r,(o,c,u)=>{let a=c!==void 0?c:o;if($(a)){if(l(a))return typeof a=="string"?String(n(p,+a)):n(p,+a);throw new Error("string-convert-indexes/".concat(i,"(): [THROW_ID_06] bad value was encountered, ").concat(S(a,4),", its path is ").concat(u.path))}return a});throw new Error("string-convert-indexes/".concat(i,"(): [THROW_ID_07] the first input argument, a source string should be a string but it was given as ").concat(t,", type ").concat(typeof t))}}function ve(e,t){return ee("n",e,t)}function Ae(e,t){return ee("u",e,t)}return ue(we);})();
11
11
  /**
12
12
  * @name codsen-utils
13
13
  * @fileoverview Various utility functions
14
- * @version 1.7.3
14
+ * @version 1.8.0
15
15
  * @author Roy Revelt
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/codsen-utils/}
18
18
  */
19
- /**
20
- * @name ast-monkey-util
21
- * @fileoverview Utility library of AST helper functions
22
- * @version 3.1.3
23
- * @author Roy Revelt
24
- * @license MIT
25
- * {@link https://codsen.com/os/ast-monkey-util/}
26
- */
27
19
  /**
28
20
  * @name ast-monkey-traverse
29
21
  * @fileoverview Utility library to traverse AST
30
- * @version 4.1.3
22
+ * @version 4.2.1
31
23
  * @author Roy Revelt
32
24
  * @license MIT
33
25
  * {@link https://codsen.com/os/ast-monkey-traverse/}
34
26
  */
27
+ /*!
28
+ * unicode-segmenter
29
+ * MIT License
30
+ * Copyright (c) 2024 Hyeseong Kim <hey@hyeseong.kim>
31
+ *
32
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
33
+ * of this software and associated documentation files (the "Software"), to deal
34
+ * in the Software without restriction, including without limitation the rights
35
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
+ * copies of the Software, and to permit persons to whom the Software is
37
+ * furnished to do so, subject to the following conditions:
38
+ *
39
+ * The above copyright notice and this permission notice shall be included in
40
+ * all copies or substantial portions of the Software.
41
+ *
42
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48
+ * SOFTWARE.
49
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-convert-indexes",
3
- "version": "6.1.3",
3
+ "version": "6.2.1",
4
4
  "description": "Convert between native JS string character indexes and grapheme-count-based indexes",
5
5
  "keywords": [
6
6
  "astral",
@@ -33,45 +33,45 @@
33
33
  },
34
34
  "types": "types/index.d.ts",
35
35
  "scripts": {
36
- "build": "node '../../ops/scripts/esbuild.js' && npm run dts",
37
- "cjs-off": "exit 0",
38
- "cjs-on": "exit 0",
39
- "dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
36
+ "build": "node ../../ops/scripts/esbuild.js && npm run dts",
37
+ "coverage": "c8 uvu test",
38
+ "dev": "node ../../ops/scripts/esbuild.js --dev && npm run dts",
40
39
  "devtest": "c8 npm run unit && npm run examples && npm run lint",
41
- "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --log-level 'silent'",
40
+ "dts": "rollup -c && biome format --write --config-path=../../biome.json --vcs-enabled=false --use-editorconfig=false types/index.d.ts",
42
41
  "examples": "node '../../ops/scripts/run-examples.js'",
43
- "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
44
- "letspublish": "npm publish --provenance || :",
45
- "lint": "eslint . --fix --concurrency=auto --cache",
42
+ "lect": "node '../../ops/lect/lect.js'",
43
+ "lect:check": "node '../../ops/lect/lect.js' --check",
44
+ "lint": "biome lint --error-on-warnings . && npm run typecheck",
45
+ "lint:fix": "biome lint --write --error-on-warnings . && npm run typecheck",
46
46
  "perf": "node perf/check.js",
47
47
  "prep": "echo 'ready'",
48
- "prettier": "prettier",
49
- "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --log-level 'silent'",
50
- "pretest": "npm run lect && npm run build",
48
+ "prettier": "biome format",
49
+ "prettier:format": "biome format --write .",
50
+ "pretest": "npm run lect:check && npm run build",
51
51
  "test": "npm run devtest",
52
+ "typecheck": "tsc --noEmit --pretty false --project tsconfig.json",
52
53
  "unit": "uvu test"
53
54
  },
54
- "engines": {
55
- "node": ">=14.18.0"
56
- },
57
55
  "c8": {
56
+ "all": true,
58
57
  "check-coverage": true,
59
- "exclude": [
60
- "**/test/**/*.*"
61
- ],
58
+ "exclude": ["**/test/**/*.*"],
59
+ "include": ["dist/*.esm.js"],
62
60
  "lines": 100
63
61
  },
64
62
  "lect": {
65
63
  "licence": {
66
- "extras": [
67
- ""
68
- ]
64
+ "extras": [""]
69
65
  },
70
66
  "various": {}
71
67
  },
72
68
  "dependencies": {
73
- "ast-monkey-traverse": "^4.1.3",
74
- "grapheme-splitter": "^1.0.4"
69
+ "ast-monkey-traverse": "^4.2.1",
70
+ "codsen-utils": "^1.8.0",
71
+ "unicode-segmenter": "^0.17.3"
72
+ },
73
+ "engines": {
74
+ "node": ">=18.20.8"
75
75
  },
76
76
  "publishConfig": {
77
77
  "registry": "https://registry.npmjs.org/"