@syzlm/function 1.0.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.
Files changed (90) hide show
  1. package/README.md +111 -0
  2. package/dist/arrays/arrayUtils.d.ts +20 -0
  3. package/dist/arrays/arrayUtils.d.ts.map +1 -0
  4. package/dist/arrays/index.d.ts +2 -0
  5. package/dist/arrays/index.d.ts.map +1 -0
  6. package/dist/index.cjs.js +2 -0
  7. package/dist/index.cjs.js.map +1 -0
  8. package/dist/index.d.ts +6 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +2 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/numbers/index.d.ts +2 -0
  13. package/dist/numbers/index.d.ts.map +1 -0
  14. package/dist/numbers/numberUtils.d.ts +31 -0
  15. package/dist/numbers/numberUtils.d.ts.map +1 -0
  16. package/dist/objects/index.d.ts +2 -0
  17. package/dist/objects/index.d.ts.map +1 -0
  18. package/dist/objects/objectUtils.d.ts +36 -0
  19. package/dist/objects/objectUtils.d.ts.map +1 -0
  20. package/dist/storage.d.ts +13 -0
  21. package/dist/storage.d.ts.map +1 -0
  22. package/dist/strings/index.d.ts +2 -0
  23. package/dist/strings/index.d.ts.map +1 -0
  24. package/dist/strings/stringUtils.d.ts +51 -0
  25. package/dist/strings/stringUtils.d.ts.map +1 -0
  26. package/dist/utils/index.d.ts +2 -0
  27. package/dist/utils/index.d.ts.map +1 -0
  28. package/dist/utils/utilFunctions.d.ts +21 -0
  29. package/dist/utils/utilFunctions.d.ts.map +1 -0
  30. package/docs/.nojekyll +1 -0
  31. package/docs/assets/hierarchy.js +1 -0
  32. package/docs/assets/highlight.css +85 -0
  33. package/docs/assets/icons.js +18 -0
  34. package/docs/assets/icons.svg +1 -0
  35. package/docs/assets/main.js +60 -0
  36. package/docs/assets/navigation.js +1 -0
  37. package/docs/assets/search.js +1 -0
  38. package/docs/assets/style.css +1633 -0
  39. package/docs/functions/capitalize.html +4 -0
  40. package/docs/functions/chunk.html +5 -0
  41. package/docs/functions/clamp.html +6 -0
  42. package/docs/functions/debounce.html +5 -0
  43. package/docs/functions/deepClone.html +4 -0
  44. package/docs/functions/delay.html +4 -0
  45. package/docs/functions/get.html +6 -0
  46. package/docs/functions/getFontLength.html +4 -0
  47. package/docs/functions/getFontWidth.html +5 -0
  48. package/docs/functions/isPlainObject.html +4 -0
  49. package/docs/functions/merge.html +5 -0
  50. package/docs/functions/parseStrEmpty.html +4 -0
  51. package/docs/functions/randomString.html +4 -0
  52. package/docs/functions/range.html +6 -0
  53. package/docs/functions/round.html +5 -0
  54. package/docs/functions/set.html +6 -0
  55. package/docs/functions/shuffle.html +4 -0
  56. package/docs/functions/thousandSign.html +4 -0
  57. package/docs/functions/thousandSignZero.html +5 -0
  58. package/docs/functions/throttle.html +5 -0
  59. package/docs/functions/toCamelCase.html +4 -0
  60. package/docs/functions/toFixed.html +5 -0
  61. package/docs/functions/unique.html +4 -0
  62. package/docs/hierarchy.html +1 -0
  63. package/docs/index.html +53 -0
  64. package/docs/modules.html +1 -0
  65. package/jest.config.js +8 -0
  66. package/package.json +43 -0
  67. package/rollup.config.js +29 -0
  68. package/scripts/deploy-docs.sh +40 -0
  69. package/src/arrays/arrayUtils.ts +36 -0
  70. package/src/arrays/index.ts +2 -0
  71. package/src/index.ts +17 -0
  72. package/src/numbers/index.ts +2 -0
  73. package/src/numbers/numberUtils.ts +121 -0
  74. package/src/objects/index.ts +2 -0
  75. package/src/objects/objectUtils.ts +107 -0
  76. package/src/storage/index.ts +1 -0
  77. package/src/storage/storage.ts +83 -0
  78. package/src/strings/index.ts +2 -0
  79. package/src/strings/stringUtils.ts +120 -0
  80. package/src/utils/index.ts +2 -0
  81. package/src/utils/utilFunctions.ts +45 -0
  82. package/test-output.txt +23 -0
  83. package/test-tofixed.js +36 -0
  84. package/tests/arrays.test.ts +89 -0
  85. package/tests/numbers.test.ts +140 -0
  86. package/tests/objects.test.ts +189 -0
  87. package/tests/strings.test.ts +197 -0
  88. package/tests/utils.test.ts +121 -0
  89. package/tsconfig.json +21 -0
  90. package/typedoc.json +15 -0
package/README.md ADDED
@@ -0,0 +1,111 @@
1
+ # Function - TypeScript 工具函数库
2
+
3
+ 一个轻量级、高性能的 TypeScript 工具函数库,支持按需加载,适合现代前端和 Node.js 项目使用。
4
+
5
+ ## 特性
6
+
7
+ - ✨ **TypeScript 编写**:完整的类型定义,提供良好的开发体验
8
+ - 📦 **按需加载**:支持 ES 模块,可通过 Tree Shaking 优化打包体积
9
+ - 🔧 **丰富的工具函数**:涵盖数组、对象、字符串、数字和通用工具
10
+ - 🚀 **高性能**:优化的实现,确保函数执行效率
11
+ - 📝 **完善的文档**:详细的 API 文档和使用示例
12
+
13
+ ## 安装
14
+
15
+ ```bash
16
+ npm install function
17
+ ```
18
+
19
+ ## 使用
20
+
21
+ ### 整体导入
22
+
23
+ ```typescript
24
+ import * as utils from 'function';
25
+
26
+ // 使用数组工具函数
27
+ const uniqueArray = utils.unique([1, 2, 2, 3]);
28
+
29
+ // 使用对象工具函数
30
+ const clonedObj = utils.deepClone({ a: 1, b: { c: 2 } });
31
+ ```
32
+
33
+ ### 按需导入
34
+
35
+ ```typescript
36
+ // 导入数组工具函数
37
+ import { unique, shuffle, chunk } from 'function/arrays';
38
+
39
+ // 导入对象工具函数
40
+ import { deepClone, merge, get } from 'function/objects';
41
+
42
+ // 导入字符串工具函数
43
+ import { toCamelCase, capitalize, randomString } from 'function/strings';
44
+
45
+ // 导入数字工具函数
46
+ import { range, round, clamp } from 'function/numbers';
47
+
48
+ // 导入通用工具函数
49
+ import { debounce, throttle, delay } from 'function/utils';
50
+ ```
51
+
52
+ ## API 文档
53
+
54
+ ### 数组工具函数
55
+
56
+ - `unique<T>(arr: T[]): T[]` - 数组去重
57
+ - `shuffle<T>(arr: T[]): T[]` - 数组随机打乱
58
+ - `chunk<T>(arr: T[], size: number): T[][]` - 数组分块
59
+
60
+ ### 对象工具函数
61
+
62
+ - `deepClone<T extends object>(obj: T): T` - 对象深拷贝
63
+ - `merge<T extends object>(target: T, ...sources: Partial<T>[]): T` - 对象合并
64
+ - `get<T extends object>(obj: T, path: string, defaultValue?: any): any` - 获取对象属性值(支持路径访问)
65
+
66
+ ### 字符串工具函数
67
+
68
+ - `toCamelCase(str: string): string` - 字符串驼峰命名转换
69
+ - `capitalize(str: string): string` - 字符串首字母大写
70
+ - `randomString(length: number): string` - 生成随机字符串
71
+
72
+ ### 数字工具函数
73
+
74
+ - `range(start: number, end: number, step: number = 1): number[]` - 数字范围生成
75
+ - `round(num: number, decimals: number = 0): number` - 数字四舍五入
76
+ - `clamp(num: number, min: number, max: number): number` - 数字在指定范围内的限制
77
+
78
+ ### 通用工具函数
79
+
80
+ - `debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void` - 防抖函数
81
+ - `throttle<T extends (...args: any[]) => any>(func: T, limit: number): (...args: Parameters<T>) => void` - 节流函数
82
+ - `delay(ms: number): Promise<void>` - 延迟函数
83
+
84
+ ## 构建
85
+
86
+ ```bash
87
+ # 安装依赖
88
+ npm install
89
+
90
+ # 构建项目
91
+ npm run build
92
+
93
+ # 监听模式构建
94
+ npm run watch
95
+ ```
96
+
97
+ ## 测试
98
+
99
+ ```bash
100
+ npm test
101
+ ```
102
+
103
+ ## 发布
104
+
105
+ ```bash
106
+ npm publish
107
+ ```
108
+
109
+ ## 许可证
110
+
111
+ ISC
@@ -0,0 +1,20 @@
1
+ /**
2
+ * 数组去重函数
3
+ * @param arr 需要去重的数组
4
+ * @returns 去重后的新数组
5
+ */
6
+ export declare function unique<T>(arr: T[]): T[];
7
+ /**
8
+ * 数组随机打乱函数
9
+ * @param arr 需要打乱的数组
10
+ * @returns 打乱后的新数组
11
+ */
12
+ export declare function shuffle<T>(arr: T[]): T[];
13
+ /**
14
+ * 数组分块函数
15
+ * @param arr 需要分块的数组
16
+ * @param size 每个块的大小
17
+ * @returns 分块后的二维数组
18
+ */
19
+ export declare function chunk<T>(arr: T[], size: number): T[][];
20
+ //# sourceMappingURL=arrayUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrayUtils.d.ts","sourceRoot":"","sources":["../../src/arrays/arrayUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEvC;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAOxC;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,CAMtD"}
@@ -0,0 +1,2 @@
1
+ export * from './arrayUtils';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/arrays/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";function t(t,e=0){let n=String(t),r=n.startsWith("-");if(r&&(n=n.slice(1)),n.includes("e")||n.includes("E")){const[t,e]=n.split(/[eE]/);let r=parseInt(e),[o,s]=t.split(".");s=s||"",n=r>=0?o+s.padEnd(r,"0"):"0."+"0".repeat(-r-1)+o+s}let[o,s]=n.split(".");if(s=s||"",e<0&&(e=0),s.length>e){let t=parseInt(s[e]),n=s.slice(0,e);if(t>=5){let t=1;const e=n.split("");for(let n=e.length-1;n>=0&&t>0;n--){let r=parseInt(e[n])+t;10===r?(e[n]="0",t=1):(e[n]=r.toString(),t=0)}n=e.join(""),t>0&&(o=(parseInt(o)+1).toString())}s=n}else s=s.padEnd(e,"0");return 0===e?(r?"-":"")+o:(r?"-":"")+o+"."+s}Object.defineProperty(exports,"__esModule",{value:!0}),exports.capitalize=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):t},exports.chunk=function(t,e){const n=[];for(let r=0;r<t.length;r+=e)n.push(t.slice(r,r+e));return n},exports.clamp=function(t,e,n){return Math.min(Math.max(t,e),n)},exports.debounce=function(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}},exports.deepClone=function t(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(e=>t(e));if("object"==typeof e){const n={};for(const r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}return e},exports.delay=function(t){return new Promise(e=>setTimeout(e,t))},exports.get=function(t,e,n){const r=e.split(".");let o=t;for(const t of r){if(null==o)return n;o=o[t]}return void 0===o?n:o},exports.getFontLength=function(t){let e=0;for(let n=0;n<t.length;n++)t.charCodeAt(n)>127||94===t.charCodeAt(n)?e+=2:e+=1;return e},exports.getFontWidth=function(t,e){let n="undefined"!=typeof document?document.createElement("canvas"):null;const r=n.getContext("2d");return r.font=e||'600 14px / 22px -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',n=null,r.measureText(t).width},exports.isPlainObject=function(t){if(null===t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return null===e||e===Object.prototype},exports.merge=function(t,...e){return Object.assign({},t,...e)},exports.parseStrEmpty=function(t){return t&&"undefined"!==t&&"null"!==t?t:""},exports.randomString=function(t){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let r=0;r<t;r++)n+=e.charAt(Math.floor(62*Math.random()));return n},exports.range=function(t,e,n=1){const r=[];for(let o=t;o<=e;o+=n)r.push(o);return r},exports.round=function(t,e=0){const n=Math.pow(10,e);return Math.round(t*n)/n},exports.set=function(t,e,n){const r=e.split(".");let o=t;for(let t=0;t<r.length-1;t++){const e=r[t];null!==o[e]&&void 0!==o[e]||(o[e]={}),o=o[e]}return o[r[r.length-1]]=n,t},exports.shuffle=function(t){const e=[...t];for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e},exports.thousandSign=function(t){if(t){const[e,n]=String(t).split(".");let r=e.replace(/\d(?=(\d{3})+$)/g,"$&,");return n&&(r+=Number(n)>0?`${parseFloat(`0.${n}`)}`.replace(/0\./,"."):""),r}return String(t||"0").replace(/\d(?=(\d{3})+$)/g,"$&,")},exports.thousandSignZero=function(e,n){if(e){const r=t(Number(e),n||2),[o,s]=r.split(".");let i=o.replace(/\d(?=(\d{3})+$)/g,"$&,");return s&&(i+=`.${s}`),i}return String(e||"0.00").replace(/\d(?=(\d{3})+$)/g,"$&,")},exports.throttle=function(t,e){let n;return(...r)=>{n||(t(...r),n=!0,setTimeout(()=>n=!1,e))}},exports.toCamelCase=function(t){return t.replace(/[-_\s]+(.)?/g,(t,e)=>e?e.toUpperCase():"")},exports.toFixed=t,exports.unique=function(t){return[...new Set(t)]};
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/numbers/numberUtils.ts","../src/strings/stringUtils.ts","../src/arrays/arrayUtils.ts","../src/utils/utilFunctions.ts","../src/objects/objectUtils.ts"],"sourcesContent":[null,null,null,null,null],"names":["toFixed","num","digits","numStr","String","isNegative","startsWith","slice","includes","base","exponent","split","exp","parseInt","intPart","decPart","padEnd","repeat","integerPart","decimalPart","length","roundDigit","newDecimalPart","carry","newDecimalArray","i","digit","toString","join","str","charAt","toUpperCase","arr","size","result","push","min","max","Math","func","wait","timeoutId","args","clearTimeout","setTimeout","deepClone","obj","Date","getTime","Array","map","item","clonedObj","key","hasOwnProperty","ms","Promise","resolve","path","defaultValue","keys","undefined","len","charCodeAt","fontStyle","canvas","document","createElement","ctx","getContext","font","measureText","width","value","proto","Object","getPrototypeOf","prototype","target","sources","assign","chars","floor","random","start","end","step","decimals","factor","pow","round","current","newArr","j","integer","decimal","ret","replace","Number","parseFloat","fixed","limit","inThrottle","_","c","Set"],"mappings":"sBA2CgBA,EAAQC,EAAaC,EAAiB,GAEpD,IAAIC,EAASC,OAAOH,GAChBI,EAAaF,EAAOG,WAAW,KAMnC,GALID,IACFF,EAASA,EAAOI,MAAM,IAIpBJ,EAAOK,SAAS,MAAQL,EAAOK,SAAS,KAAM,CAChD,MAAOC,EAAMC,GAAYP,EAAOQ,MAAM,QACtC,IAAIC,EAAMC,SAASH,IACdI,EAASC,GAAWN,EAAKE,MAAM,KACpCI,EAAUA,GAAW,GAInBZ,EAFES,GAAO,EAEAE,EAAUC,EAAQC,OAAOJ,EAAK,KAG9B,KAAO,IAAIK,QAAQL,EAAM,GAAKE,EAAUC,CAEpD,CAGD,IAAKG,EAAaC,GAAehB,EAAOQ,MAAM,KAS9C,GARAQ,EAAcA,GAAe,GAGzBjB,EAAS,IACXA,EAAS,GAIPiB,EAAYC,OAASlB,EAAQ,CAE/B,IAAImB,EAAaR,SAASM,EAAYjB,IAClCoB,EAAiBH,EAAYZ,MAAM,EAAGL,GAG1C,GAAImB,GAAc,EAAG,CAEnB,IAAIE,EAAQ,EACZ,MAAMC,EAAkBF,EAAeX,MAAM,IAG7C,IAAK,IAAIc,EAAID,EAAgBJ,OAAS,EAAGK,GAAK,GAAKF,EAAQ,EAAGE,IAAK,CACjE,IAAIC,EAAQb,SAASW,EAAgBC,IAAMF,EAC7B,KAAVG,GACFF,EAAgBC,GAAK,IACrBF,EAAQ,IAERC,EAAgBC,GAAKC,EAAMC,WAC3BJ,EAAQ,EAEX,CAEDD,EAAiBE,EAAgBI,KAAK,IAGlCL,EAAQ,IACVL,GAAeL,SAASK,GAAe,GAAGS,WAE7C,CAEDR,EAAcG,CACf,MAECH,EAAcA,EAAYH,OAAOd,EAAQ,KAI3C,OAAe,IAAXA,GACMG,EAAa,IAAM,IAAMa,GAEzBb,EAAa,IAAM,IAAMa,EAAc,IAAMC,CAEzD,2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,EAAGC,IAAMA,EAAIA,EAAEzE,cAAgB,GACrE,mCCNM,SAAoBC,GACxB,MAAO,IAAI,IAAIyE,IAAIzE,GACrB"}
@@ -0,0 +1,6 @@
1
+ export * from './arrays';
2
+ export * from './objects';
3
+ export * from './strings';
4
+ export * from './numbers';
5
+ export * from './utils';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AAGzB,cAAc,WAAW,CAAC;AAG1B,cAAc,WAAW,CAAC;AAG1B,cAAc,WAAW,CAAC;AAG1B,cAAc,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ function t(t){return[...new Set(t)]}function e(t){const e=[...t];for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}function n(t,e){const n=[];for(let r=0;r<t.length;r+=e)n.push(t.slice(r,r+e));return n}function r(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array)return t.map(t=>r(t));if("object"==typeof t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=r(t[n]));return e}return t}function o(t,...e){return Object.assign({},t,...e)}function u(t,e,n){const r=e.split(".");let o=t;for(const t of r){if(null==o)return n;o=o[t]}return void 0===o?n:o}function i(t,e,n){const r=e.split(".");let o=t;for(let t=0;t<r.length-1;t++){const e=r[t];null!==o[e]&&void 0!==o[e]||(o[e]={}),o=o[e]}return o[r[r.length-1]]=n,t}function l(t){if(null===t||"object"!=typeof t)return!1;const e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t,e,n=1){const r=[];for(let o=t;o<=e;o+=n)r.push(o);return r}function s(t,e=0){const n=Math.pow(10,e);return Math.round(t*n)/n}function f(t,e,n){return Math.min(Math.max(t,e),n)}function a(t,e=0){let n=String(t),r=n.startsWith("-");if(r&&(n=n.slice(1)),n.includes("e")||n.includes("E")){const[t,e]=n.split(/[eE]/);let r=parseInt(e),[o,u]=t.split(".");u=u||"",n=r>=0?o+u.padEnd(r,"0"):"0."+"0".repeat(-r-1)+o+u}let[o,u]=n.split(".");if(u=u||"",e<0&&(e=0),u.length>e){let t=parseInt(u[e]),n=u.slice(0,e);if(t>=5){let t=1;const e=n.split("");for(let n=e.length-1;n>=0&&t>0;n--){let r=parseInt(e[n])+t;10===r?(e[n]="0",t=1):(e[n]=r.toString(),t=0)}n=e.join(""),t>0&&(o=(parseInt(o)+1).toString())}u=n}else u=u.padEnd(e,"0");return 0===e?(r?"-":"")+o:(r?"-":"")+o+"."+u}function p(t){return t.replace(/[-_\s]+(.)?/g,(t,e)=>e?e.toUpperCase():"")}function d(t){return t?t.charAt(0).toUpperCase()+t.slice(1):t}function g(t){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let r=0;r<t;r++)n+=e.charAt(Math.floor(62*Math.random()));return n}function h(t){return t&&"undefined"!==t&&"null"!==t?t:""}function m(t){let e=0;for(let n=0;n<t.length;n++)t.charCodeAt(n)>127||94===t.charCodeAt(n)?e+=2:e+=1;return e}function S(t,e){let n="undefined"!=typeof document?document.createElement("canvas"):null;const r=n.getContext("2d");r.font=e||'600 14px / 22px -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';return n=null,r.measureText(t).width}function y(t){if(t){const[e,n]=String(t).split(".");let r=e.replace(/\d(?=(\d{3})+$)/g,"$&,");return n&&(r+=Number(n)>0?`${parseFloat(`0.${n}`)}`.replace(/0\./,"."):""),r}return String(t||"0").replace(/\d(?=(\d{3})+$)/g,"$&,")}function b(t,e){if(t){const n=a(Number(t),e||2),[r,o]=n.split(".");let u=r.replace(/\d(?=(\d{3})+$)/g,"$&,");return o&&(u+=`.${o}`),u}return String(t||"0.00").replace(/\d(?=(\d{3})+$)/g,"$&,")}function j(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}function $(t,e){let n;return(...r)=>{n||(t(...r),n=!0,setTimeout(()=>n=!1,e))}}function E(t){return new Promise(e=>setTimeout(e,t))}export{d as capitalize,n as chunk,f as clamp,j as debounce,r as deepClone,E as delay,u as get,m as getFontLength,S as getFontWidth,l as isPlainObject,o as merge,h as parseStrEmpty,g as randomString,c as range,s as round,i as set,e as shuffle,y as thousandSign,b as thousandSignZero,$ as throttle,p as toCamelCase,a as toFixed,t as unique};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/arrays/arrayUtils.ts","../src/objects/objectUtils.ts","../src/numbers/numberUtils.ts","../src/strings/stringUtils.ts","../src/utils/utilFunctions.ts"],"sourcesContent":[null,null,null,null,null],"names":["unique","arr","Set","shuffle","newArr","i","length","j","Math","floor","random","chunk","size","result","push","slice","deepClone","obj","Date","getTime","Array","map","item","clonedObj","key","hasOwnProperty","merge","target","sources","Object","assign","get","path","defaultValue","keys","split","undefined","set","value","current","isPlainObject","proto","getPrototypeOf","prototype","range","start","end","step","round","num","decimals","factor","pow","clamp","min","max","toFixed","digits","numStr","String","isNegative","startsWith","includes","base","exponent","exp","parseInt","intPart","decPart","padEnd","repeat","integerPart","decimalPart","roundDigit","newDecimalPart","carry","newDecimalArray","digit","toString","join","toCamelCase","str","replace","_","c","toUpperCase","capitalize","charAt","randomString","chars","parseStrEmpty","getFontLength","len","charCodeAt","getFontWidth","fontStyle","canvas","document","createElement","ctx","getContext","font","measureText","width","thousandSign","integer","decimal","ret","Number","parseFloat","thousandSignZero","fixed","debounce","func","wait","timeoutId","args","clearTimeout","setTimeout","throttle","limit","inThrottle","delay","ms","Promise","resolve"],"mappings":"AAKM,SAAUA,EAAUC,GACxB,MAAO,IAAI,IAAIC,IAAID,GACrB,CAOM,SAAUE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QAAQC,GAAWP,WAAWO,EAASF,GACpD"}
@@ -0,0 +1,2 @@
1
+ export * from './numberUtils';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/numbers/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 数字范围生成函数
3
+ * @param start 起始数字
4
+ * @param end 结束数字
5
+ * @param step 步长
6
+ * @returns 生成的数字数组
7
+ */
8
+ export declare function range(start: number, end: number, step?: number): number[];
9
+ /**
10
+ * 数字四舍五入函数
11
+ * @param num 需要四舍五入的数字
12
+ * @param decimals 保留小数位数
13
+ * @returns 四舍五入后的数字
14
+ */
15
+ export declare function round(num: number, decimals?: number): number;
16
+ /**
17
+ * 数字在指定范围内的限制函数
18
+ * @param num 需要限制的数字
19
+ * @param min 最小值
20
+ * @param max 最大值
21
+ * @returns 限制后的数字
22
+ */
23
+ export declare function clamp(num: number, min: number, max: number): number;
24
+ /**
25
+ * 精确的数字toFixed函数
26
+ * @param num 需要处理的数字
27
+ * @param digits 保留小数位数
28
+ * @returns 格式化后的字符串
29
+ */
30
+ export declare function toFixed(num: number, digits?: number): string;
31
+ //# sourceMappingURL=numberUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numberUtils.d.ts","sourceRoot":"","sources":["../../src/numbers/numberUtils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAU,GAAG,MAAM,EAAE,CAM5E;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAG/D;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,CA6E/D"}
@@ -0,0 +1,2 @@
1
+ export * from './objectUtils';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/objects/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 对象深拷贝函数
3
+ * @param obj 需要深拷贝的对象
4
+ * @returns 深拷贝后的新对象
5
+ */
6
+ export declare function deepClone<T>(obj: T): T;
7
+ /**
8
+ * 对象合并函数
9
+ * @param target 目标对象
10
+ * @param sources 源对象列表
11
+ * @returns 合并后的对象
12
+ */
13
+ export declare function merge<T extends object>(target: T, ...sources: any[]): T;
14
+ /**
15
+ * 获取对象属性值(支持路径访问)
16
+ * @param obj 目标对象
17
+ * @param path 属性路径,如 'a.b.c'
18
+ * @param defaultValue 默认值
19
+ * @returns 属性值或默认值
20
+ */
21
+ export declare function get(obj: any, path: string, defaultValue?: any): any;
22
+ /**
23
+ * 设置对象属性值(支持路径访问)
24
+ * @param obj 目标对象
25
+ * @param path 属性路径,如 'a.b.c'
26
+ * @param value 要设置的值
27
+ * @returns 设置后的对象
28
+ */
29
+ export declare function set<T extends Record<string, any>>(obj: T, path: string, value: any): T;
30
+ /**
31
+ * 检查一个值是否是普通对象
32
+ * @param value 要检查的值
33
+ * @returns 如果是普通对象返回true,否则返回false
34
+ */
35
+ export declare function isPlainObject(value: any): value is object;
36
+ //# sourceMappingURL=objectUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectUtils.d.ts","sourceRoot":"","sources":["../../src/objects/objectUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAwBtC;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAEvE;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,GAAG,CAYnE;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,CActF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,MAAM,CASzD"}
@@ -0,0 +1,13 @@
1
+ export declare const sessionStorage: {
2
+ setItem: (k: string, a: any) => void;
3
+ getItem: (k: string, needParse?: boolean) => any;
4
+ removeItem: (k: string) => void;
5
+ clear: () => void;
6
+ };
7
+ export declare const localStorage: {
8
+ setItem: (k: string, a: any) => void;
9
+ getItem: (k: string, needParse?: boolean) => any;
10
+ removeItem: (k: string) => void;
11
+ clear: () => void;
12
+ };
13
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAqEA,eAAO,MAAM,cAAc;iBACZ,MAAM,KAAK,GAAG;iBACd,MAAM;oBACH,MAAM;;CAGvB,CAAC;AAEF,eAAO,MAAM,YAAY;iBACV,MAAM,KAAK,GAAG;iBACd,MAAM;oBACH,MAAM;;CAEvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './stringUtils';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/strings/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * 字符串驼峰命名转换函数
3
+ * @param str 需要转换的字符串
4
+ * @returns 驼峰命名的字符串
5
+ */
6
+ export declare function toCamelCase(str: string): string;
7
+ /**
8
+ * 字符串首字母大写函数
9
+ * @param str 需要转换的字符串
10
+ * @returns 首字母大写的字符串
11
+ */
12
+ export declare function capitalize(str: string): string;
13
+ /**
14
+ * 生成随机字符串函数
15
+ * @param length 字符串长度
16
+ * @returns 随机字符串
17
+ */
18
+ export declare function randomString(length: number): string;
19
+ /**
20
+ * 转换字符串,undefined,null等转化为""
21
+ * @param str 需要转换的字符串
22
+ * @returns 转换后的字符串
23
+ */
24
+ export declare function parseStrEmpty(str: string): string;
25
+ /**
26
+ * 获取字符串的字体长度
27
+ * @param str 需要计算长度的字符串
28
+ * @returns 字符串的字体长度(中文字符算2个长度,英文字符算1个长度)
29
+ */
30
+ export declare function getFontLength(str: string): number;
31
+ /**
32
+ * 获取文字宽度
33
+ * @param str 需要计算宽度的字符串
34
+ * @param fontStyle 字体样式,可选,默认使用系统默认字体
35
+ * @returns 文字宽度(像素)
36
+ */
37
+ export declare function getFontWidth(str: string, fontStyle?: string): number;
38
+ /**
39
+ * 千分位格式化
40
+ * @param num 需要格式化的数字或字符串
41
+ * @returns 千分位格式化后的字符串
42
+ */
43
+ export declare function thousandSign(num: number | string): string;
44
+ /**
45
+ * 千分位格式化 自动补零
46
+ * @param num 需要格式化的数字或字符串
47
+ * @param fixed 保留的小数位数,默认2位
48
+ * @returns 千分位格式化后的字符串
49
+ */
50
+ export declare function thousandSignZero(num: number | string, fixed?: number): string;
51
+ //# sourceMappingURL=stringUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringUtils.d.ts","sourceRoot":"","sources":["../../src/strings/stringUtils.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAOnD;AAGD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAUjD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAUpE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAUzD;AACD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAY7E"}
@@ -0,0 +1,2 @@
1
+ export * from './utilFunctions';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 防抖函数
3
+ * @param func 需要防抖的函数
4
+ * @param wait 等待时间(毫秒)
5
+ * @returns 防抖后的函数
6
+ */
7
+ export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
8
+ /**
9
+ * 节流函数
10
+ * @param func 需要节流的函数
11
+ * @param limit 限制时间(毫秒)
12
+ * @returns 节流后的函数
13
+ */
14
+ export declare function throttle<T extends (...args: any[]) => any>(func: T, limit: number): (...args: Parameters<T>) => void;
15
+ /**
16
+ * 延迟函数
17
+ * @param ms 延迟时间(毫秒)
18
+ * @returns Promise对象
19
+ */
20
+ export declare function delay(ms: number): Promise<void>;
21
+ //# sourceMappingURL=utilFunctions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilFunctions.d.ts","sourceRoot":"","sources":["../../src/utils/utilFunctions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAMlC;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,MAAM,GACZ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CASlC;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C"}
package/docs/.nojekyll ADDED
@@ -0,0 +1 @@
1
+ TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
@@ -0,0 +1 @@
1
+ window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzytWsqqurQUAmx4Kpg=="
@@ -0,0 +1,85 @@
1
+ :root {
2
+ --light-hl-0: #795E26;
3
+ --dark-hl-0: #DCDCAA;
4
+ --light-hl-1: #000000;
5
+ --dark-hl-1: #D4D4D4;
6
+ --light-hl-2: #A31515;
7
+ --dark-hl-2: #CE9178;
8
+ --light-hl-3: #AF00DB;
9
+ --dark-hl-3: #C586C0;
10
+ --light-hl-4: #0000FF;
11
+ --dark-hl-4: #569CD6;
12
+ --light-hl-5: #001080;
13
+ --dark-hl-5: #9CDCFE;
14
+ --light-hl-6: #008000;
15
+ --dark-hl-6: #6A9955;
16
+ --light-hl-7: #0070C1;
17
+ --dark-hl-7: #4FC1FF;
18
+ --light-hl-8: #098658;
19
+ --dark-hl-8: #B5CEA8;
20
+ --light-code-background: #FFFFFF;
21
+ --dark-code-background: #1E1E1E;
22
+ }
23
+
24
+ @media (prefers-color-scheme: light) { :root {
25
+ --hl-0: var(--light-hl-0);
26
+ --hl-1: var(--light-hl-1);
27
+ --hl-2: var(--light-hl-2);
28
+ --hl-3: var(--light-hl-3);
29
+ --hl-4: var(--light-hl-4);
30
+ --hl-5: var(--light-hl-5);
31
+ --hl-6: var(--light-hl-6);
32
+ --hl-7: var(--light-hl-7);
33
+ --hl-8: var(--light-hl-8);
34
+ --code-background: var(--light-code-background);
35
+ } }
36
+
37
+ @media (prefers-color-scheme: dark) { :root {
38
+ --hl-0: var(--dark-hl-0);
39
+ --hl-1: var(--dark-hl-1);
40
+ --hl-2: var(--dark-hl-2);
41
+ --hl-3: var(--dark-hl-3);
42
+ --hl-4: var(--dark-hl-4);
43
+ --hl-5: var(--dark-hl-5);
44
+ --hl-6: var(--dark-hl-6);
45
+ --hl-7: var(--dark-hl-7);
46
+ --hl-8: var(--dark-hl-8);
47
+ --code-background: var(--dark-code-background);
48
+ } }
49
+
50
+ :root[data-theme='light'] {
51
+ --hl-0: var(--light-hl-0);
52
+ --hl-1: var(--light-hl-1);
53
+ --hl-2: var(--light-hl-2);
54
+ --hl-3: var(--light-hl-3);
55
+ --hl-4: var(--light-hl-4);
56
+ --hl-5: var(--light-hl-5);
57
+ --hl-6: var(--light-hl-6);
58
+ --hl-7: var(--light-hl-7);
59
+ --hl-8: var(--light-hl-8);
60
+ --code-background: var(--light-code-background);
61
+ }
62
+
63
+ :root[data-theme='dark'] {
64
+ --hl-0: var(--dark-hl-0);
65
+ --hl-1: var(--dark-hl-1);
66
+ --hl-2: var(--dark-hl-2);
67
+ --hl-3: var(--dark-hl-3);
68
+ --hl-4: var(--dark-hl-4);
69
+ --hl-5: var(--dark-hl-5);
70
+ --hl-6: var(--dark-hl-6);
71
+ --hl-7: var(--dark-hl-7);
72
+ --hl-8: var(--dark-hl-8);
73
+ --code-background: var(--dark-code-background);
74
+ }
75
+
76
+ .hl-0 { color: var(--hl-0); }
77
+ .hl-1 { color: var(--hl-1); }
78
+ .hl-2 { color: var(--hl-2); }
79
+ .hl-3 { color: var(--hl-3); }
80
+ .hl-4 { color: var(--hl-4); }
81
+ .hl-5 { color: var(--hl-5); }
82
+ .hl-6 { color: var(--hl-6); }
83
+ .hl-7 { color: var(--hl-7); }
84
+ .hl-8 { color: var(--hl-8); }
85
+ pre, code { background: var(--code-background); }
@@ -0,0 +1,18 @@
1
+ (function() {
2
+ addIcons();
3
+ function addIcons() {
4
+ if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons);
5
+ const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
6
+ svg.innerHTML = `<g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g><g id="icon-alertNote" class="tsd-no-select"><path fill="var(--color-alert-note)" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g><g id="icon-alertTip" class="tsd-no-select"><path fill="var(--color-alert-tip)" d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></g><g id="icon-alertImportant" class="tsd-no-select"><path fill="var(--color-alert-important)" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertWarning" class="tsd-no-select"><path fill="var(--color-alert-warning)" d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertCaution" class="tsd-no-select"><path fill="var(--color-alert-caution)" d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g>`;
7
+ svg.style.display = "none";
8
+ if (location.protocol === "file:") updateUseElements();
9
+ }
10
+
11
+ function updateUseElements() {
12
+ document.querySelectorAll("use").forEach(el => {
13
+ if (el.getAttribute("href").includes("#icon-")) {
14
+ el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#"));
15
+ }
16
+ });
17
+ }
18
+ })()
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"><g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g><g id="icon-alertNote" class="tsd-no-select"><path fill="var(--color-alert-note)" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g><g id="icon-alertTip" class="tsd-no-select"><path fill="var(--color-alert-tip)" d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></g><g id="icon-alertImportant" class="tsd-no-select"><path fill="var(--color-alert-important)" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertWarning" class="tsd-no-select"><path fill="var(--color-alert-warning)" d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertCaution" class="tsd-no-select"><path fill="var(--color-alert-caution)" d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g></svg>