svg-path-commander 2.1.2 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/svg-path-commander.cjs +1 -1
- package/dist/svg-path-commander.cjs.map +1 -1
- package/dist/svg-path-commander.d.ts +755 -849
- package/dist/svg-path-commander.js +1 -1
- package/dist/svg-path-commander.js.map +1 -1
- package/dist/svg-path-commander.mjs +947 -611
- package/dist/svg-path-commander.mjs.map +1 -1
- package/package.json +14 -22
- package/.eslintrc.cjs +0 -225
- package/.prettierrc.json +0 -15
- package/dts.config.ts +0 -15
- package/src/convert/pathToAbsolute.ts +0 -18
- package/src/convert/pathToCurve.ts +0 -43
- package/src/convert/pathToRelative.ts +0 -18
- package/src/convert/pathToString.ts +0 -50
- package/src/index.ts +0 -454
- package/src/interface.ts +0 -130
- package/src/math/arcTools.ts +0 -396
- package/src/math/bezier.ts +0 -261
- package/src/math/cubicTools.ts +0 -124
- package/src/math/distanceSquareRoot.ts +0 -15
- package/src/math/lineTools.ts +0 -69
- package/src/math/midPoint.ts +0 -18
- package/src/math/polygonTools.ts +0 -48
- package/src/math/quadTools.ts +0 -100
- package/src/math/rotateVector.ts +0 -17
- package/src/math/roundTo.ts +0 -7
- package/src/options/options.ts +0 -9
- package/src/parser/error.ts +0 -2
- package/src/parser/finalizeSegment.ts +0 -35
- package/src/parser/invalidPathValue.ts +0 -2
- package/src/parser/isArcCommand.ts +0 -11
- package/src/parser/isDigit.ts +0 -12
- package/src/parser/isDigitStart.ts +0 -14
- package/src/parser/isMoveCommand.ts +0 -17
- package/src/parser/isPathCommand.ts +0 -28
- package/src/parser/isSpace.ts +0 -23
- package/src/parser/paramsCount.ts +0 -16
- package/src/parser/paramsParser.ts +0 -14
- package/src/parser/parsePathString.ts +0 -33
- package/src/parser/pathParser.ts +0 -29
- package/src/parser/scanFlag.ts +0 -29
- package/src/parser/scanParam.ts +0 -102
- package/src/parser/scanSegment.ts +0 -84
- package/src/parser/skipSpaces.ts +0 -17
- package/src/process/absolutizeSegment.ts +0 -63
- package/src/process/arcToCubic.ts +0 -128
- package/src/process/getSVGMatrix.ts +0 -70
- package/src/process/iterate.ts +0 -58
- package/src/process/lineToCubic.ts +0 -17
- package/src/process/normalizePath.ts +0 -33
- package/src/process/normalizeSegment.ts +0 -84
- package/src/process/optimizePath.ts +0 -63
- package/src/process/projection2d.ts +0 -52
- package/src/process/quadToCubic.ts +0 -31
- package/src/process/relativizeSegment.ts +0 -59
- package/src/process/reverseCurve.ts +0 -24
- package/src/process/reversePath.ts +0 -114
- package/src/process/roundPath.ts +0 -33
- package/src/process/roundSegment.ts +0 -9
- package/src/process/segmentToCubic.ts +0 -48
- package/src/process/shortenSegment.ts +0 -71
- package/src/process/splitCubic.ts +0 -29
- package/src/process/splitPath.ts +0 -63
- package/src/process/transformPath.ts +0 -110
- package/src/types.ts +0 -228
- package/src/util/distanceEpsilon.ts +0 -3
- package/src/util/getClosestPoint.ts +0 -15
- package/src/util/getDrawDirection.ts +0 -16
- package/src/util/getPathArea.ts +0 -70
- package/src/util/getPathBBox.ts +0 -98
- package/src/util/getPointAtLength.ts +0 -110
- package/src/util/getPropertiesAtLength.ts +0 -67
- package/src/util/getPropertiesAtPoint.ts +0 -84
- package/src/util/getSegmentAtLength.ts +0 -15
- package/src/util/getSegmentOfPoint.ts +0 -18
- package/src/util/getTotalLength.ts +0 -68
- package/src/util/isAbsoluteArray.ts +0 -18
- package/src/util/isCurveArray.ts +0 -15
- package/src/util/isNormalizedArray.ts +0 -16
- package/src/util/isPathArray.ts +0 -24
- package/src/util/isPointInStroke.ts +0 -16
- package/src/util/isRelativeArray.ts +0 -18
- package/src/util/isValidPath.ts +0 -27
- package/src/util/shapeParams.ts +0 -16
- package/src/util/shapeToPath.ts +0 -86
- package/src/util/shapeToPathArray.ts +0 -183
- package/test/class.test.ts +0 -504
- package/test/fixtures/getMarkup.ts +0 -17
- package/test/fixtures/shapeObjects.ts +0 -11
- package/test/fixtures/shapes.js +0 -104
- package/test/fixtures/simpleShapes.js +0 -75
- package/test/static.test.ts +0 -330
- package/vite.config.mts +0 -41
- package/vitest.config-ui.mts +0 -26
- package/vitest.config.mts +0 -26
package/test/fixtures/shapes.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
const shapes = {
|
|
2
|
-
initial: [
|
|
3
|
-
'M16 8C16 4.134 12.418 1 8 1S0 4.134 0 8c0 1.759 0.744 3.369 1.969 4.6c-0.096 1.016 -0.416 2.13 -0.77 2.966c-0.078 0.185 0.072 0.394 0.272 0.362c2.256 -0.37 3.597 -0.938 4.18 -1.234A9.06 9.06 0 0 0 8 15c4.417 0 8 -3.134 8 -7zM7.194 6.766c0.087 0.123 0.163 0.259 0.227 0.4c0.427 0.948 0.392 2.377 -0.942 3.705a0.446 0.446 0 0 1 -0.612 0.009A0.405 0.405 0 0 1 5.856 10.293C6.274 9.876 6.528 9.462 6.665 9.072C6.396 9.237 6.077 9.332 5.735 9.332C4.775 9.333 4 8.587 4 7.667C4 6.747 4.776 6 5.734 6C6.005 6 6.262 6.06 6.49 6.166L6.498 6.17c0.168 0.07 0.326 0.182 0.468 0.323c0.084 0.083 0.161 0.174 0.227 0.272zM11 9.073C10.731 9.238 10.412 9.333 10.07 9.333C9.112 9.333 8.335 8.587 8.335 7.667C8.335 6.747 9.112 6 10.069 6c0.27 0 0.527 0.059 0.755 0.166l0.008 0.003c0.169 0.07 0.326 0.182 0.468 0.323c0.085 0.083 0.16 0.174 0.227 0.272c0.086 0.123 0.163 0.259 0.227 0.4c0.428 0.948 0.391 2.377 -0.942 3.705a0.446 0.446 0 0 1 -0.612 0.009a0.405 0.405 0 0 1 -0.01 -0.589c0.419 -0.416 0.671 -0.83 0.809 -1.221z',
|
|
4
|
-
'M16 14v-9h-16v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2zM2.56 12.332h-0.71l1.898 -5.332h0.696l1.898 5.332h-0.718l-0.54 -1.602h-1.984l-0.54 1.602zM4.104 7.805h-0.02l-0.8 2.375h1.616l-0.796 -2.375zM9.85 8.227v4.105h-0.668v-0.539h-0.027c-0.145 0.325 -0.532 0.605 -1.188 0.605c-0.847 0 -1.453 -0.484 -1.453 -1.425v-2.746h0.676v2.554c0 0.766 0.441 1.012 0.98 1.012c0.59 0 1.004 -0.371 1.004 -1.023v-2.543h0.676zM11.123 12.637c0.075 0.332 0.422 0.636 0.985 0.636c0.648 0 1.07 -0.378 1.07 -1.023v-0.605h-0.02c-0.163 0.355 -0.613 0.648 -1.171 0.648c-0.957 0 -1.64 -0.672 -1.64 -1.902v-0.34c0 -1.207 0.675 -1.887 1.64 -1.887c0.558 0 1.004 0.293 1.195 0.64h0.02v-0.577h0.648v4.03c0 1.052 -0.816 1.579 -1.746 1.579c-1.043 0 -1.574 -0.516 -1.668 -1.2h0.687zM13.178 10.102c0 -0.832 -0.414 -1.36 -1.062 -1.36c-0.692 0 -1.098 0.492 -1.098 1.36v0.253c0 0.852 0.406 1.364 1.098 1.364c0.671 0 1.062 -0.516 1.062 -1.364v-0.253zM4 0.5a0.5 0.5 0 0 0 -1 0v0.5h-1a2 2 0 0 0 -2 2v1h16v-1a2 2 0 0 0 -2 -2h-1v-0.5a0.5 0.5 0 0 0 -1 0v0.5h-8v-0.5z',
|
|
5
|
-
'M5.5.5A.5.5 0 016 0h4a.5.5 0 010 1H9v1.07a7.002 7.002 0 013.537 12.26l.817.816a.5.5 0 01-.708.708l-.924-.925A6.967 6.967 0 018 16a6.967 6.967 0 01-3.722-1.07l-.924.924a.5.5 0 01-.708-.708l.817-.816A7.002 7.002 0 017 2.07V1H5.999a.5.5 0 01-.5-.5zM.86 5.387A2.5 2.5 0 114.387 1.86 8.035 8.035 0 00.86 5.387zM13.5 1c-.753 0-1.429.333-1.887.86a8.035 8.035 0 013.527 3.527A2.5 2.5 0 0013.5 1zm-5 4a.5.5 0 00-1 0v3.882l-1.447 2.894a.5.5 0 10.894.448l1.5-3A.5.5 0 008.5 9V5z',
|
|
6
|
-
'M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2H2A2 2 0 0 1 0 14V2A2 2 0 0 1 2 0zm3.354 4.646A0.5 0.5 0 1 0 4.646 5.354L7.293 8l-2.647 2.646a0.5 0.5 0 0 0 0.708 0.708L8 8.707l2.646 2.647a0.5 0.5 0 0 0 0.708 -0.708L8.707 8l2.647 -2.646A0.5 0.5 0 0 0 10.646 4.646L8 7.293L5.354 4.646z',
|
|
7
|
-
'M2 4a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-6a2 2 0 0 0 -2 -2h-1.172a2 2 0 0 1 -1.414 -0.586l-0.828 -0.828a2 2 0 0 0 -1.414 -0.586h-2.344a2 2 0 0 0 -1.414 0.586l-0.828 0.828a2 2 0 0 1 -1.414 0.586h-1.172zM10.5 8.5a2.5 2.5 0 0 0 -5 0a2.5 2.5 0 1 0 5 0zM2.5 6a0.5 0.5 0 0 1 0 -1a0.5 0.5 0 1 1 0 1zM11.5 8.5a3.5 3.5 0 1 1 -7 0a3.5 3.5 0 0 1 7 0z',
|
|
8
|
-
'M2 0a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V2a2 2 0 00-2-2H2zm7.5 11h-4a.5.5 0 01-.5-.5v-4a.5.5 0 011 0v2.793l4.146-4.147a.5.5 0 01.708.708L6.707 10H9.5a.5.5 0 010 1z',
|
|
9
|
-
'M15.98 8.51C15.6 14.66 8.71 18.08 3.58 14.68C3.27 14.47 2.98 14.25 2.71 14.01l5.5 -5.5h7.78zM2 13.3L7.5 7.8V0.03C1.35 0.41 -2.07 7.3 1.33 12.43c0.2 0.3 0.42 0.59 0.67 0.87zM8.5 0.03c4.02 0.25 7.23 3.46 7.49 7.49H8.5V0.03z',
|
|
10
|
-
'M8.66 8.66v-4H7.34v4h1.31zM8.66 11.34V10H7.34v1.34h1.31zM8 1.34q2.75 0 4.7 1.95T14.66 8t-1.95 4.7T8 14.66T3.3 12.7T1.34 8T3.3 3.3T8 1.34z'
|
|
11
|
-
],
|
|
12
|
-
normalized: [
|
|
13
|
-
"M16 8C16 4.13 12.42 1 8 1C3.58 1 0 4.13 0 8C0 9.76 0.74 11.37 1.97 12.6C1.87 13.62 1.55 14.73 1.2 15.57C1.12 15.75 1.27 15.96 1.47 15.93C3.73 15.56 5.07 14.99 5.65 14.69A9.06 9.06 0 0 0 8 15C12.42 15 16 11.87 16 8ZM7.19 6.77C7.28 6.89 7.36 7.03 7.42 7.17C7.85 8.11 7.81 9.54 6.48 10.87A0.45 0.45 0 0 1 5.87 10.88A0.41 0.41 0 0 1 5.86 10.29C6.27 9.88 6.53 9.46 6.67 9.07C6.4 9.24 6.08 9.33 5.74 9.33C4.78 9.33 4 8.59 4 7.67C4 6.75 4.78 6 5.73 6C6.01 6 6.26 6.06 6.49 6.17L6.5 6.17C6.67 6.24 6.82 6.35 6.97 6.49C7.05 6.58 7.13 6.67 7.19 6.77ZM11 9.07C10.73 9.24 10.41 9.33 10.07 9.33C9.11 9.33 8.34 8.59 8.34 7.67C8.34 6.75 9.11 6 10.07 6C10.34 6 10.6 6.06 10.82 6.17L10.83 6.17C11 6.24 11.16 6.35 11.3 6.49C11.39 6.58 11.46 6.67 11.53 6.76C11.61 6.89 11.69 7.02 11.75 7.16C12.18 8.11 12.15 9.54 10.81 10.87A0.45 0.45 0 0 1 10.2 10.88A0.41 0.41 0 0 1 10.19 10.29C10.61 9.87 10.86 9.46 11 9.07Z",
|
|
14
|
-
"M16 14L16 5L0 5L0 14A2 2 0 0 0 2 16L14 16A2 2 0 0 0 16 14ZM2.56 12.33L1.85 12.33L3.75 7L4.44 7L6.34 12.33L5.62 12.33L5.08 10.73L3.1 10.73L2.56 12.33ZM4.1 7.81L4.08 7.81L3.28 10.18L4.9 10.18L4.1 7.81ZM9.85 8.23L9.85 12.33L9.18 12.33L9.18 11.79L9.16 11.79C9.01 12.12 8.62 12.4 7.97 12.4C7.12 12.4 6.51 11.91 6.51 10.97L6.51 8.23L7.19 8.23L7.19 10.78C7.19 11.55 7.63 11.79 8.17 11.79C8.76 11.79 9.17 11.42 9.17 10.77L9.17 8.23L9.85 8.23ZM11.12 12.64C11.2 12.97 11.55 13.27 12.11 13.27C12.76 13.27 13.18 12.9 13.18 12.25L13.18 11.65L13.16 11.65C13 12 12.55 12.29 11.99 12.29C11.03 12.29 10.35 11.62 10.35 10.39L10.35 10.05C10.35 8.84 11.02 8.16 11.99 8.16C12.55 8.16 12.99 8.46 13.18 8.8L13.2 8.8L13.2 8.23L13.85 8.23L13.85 12.26C13.85 13.31 13.03 13.84 12.1 13.84C11.06 13.84 10.53 13.32 10.44 12.64L11.12 12.64ZM13.18 10.1C13.18 9.27 12.76 8.74 12.12 8.74C11.42 8.74 11.02 9.23 11.02 10.1L11.02 10.36C11.02 11.21 11.42 11.72 12.12 11.72C12.79 11.72 13.18 11.2 13.18 10.36L13.18 10.1ZM4 0.5A0.5 0.5 0 0 0 3 0.5L3 1L2 1A2 2 0 0 0 0 3L0 4L16 4L16 3A2 2 0 0 0 14 1L13 1L13 0.5A0.5 0.5 0 0 0 12 0.5L12 1L4 1L4 0.5Z",
|
|
15
|
-
"M5.5 0.5A0.5 0.5 0 0 1 6 0L10 0A0.5 0.5 0 0 1 10 1L9 1L9 2.07A7 7 0 0 1 12.54 14.33L13.35 15.15A0.5 0.5 0 0 1 12.65 15.85L11.72 14.93A6.97 6.97 0 0 1 8 16A6.97 6.97 0 0 1 4.28 14.93L3.35 15.85A0.5 0.5 0 0 1 2.65 15.15L3.46 14.33A7 7 0 0 1 7 2.07L7 1L6 1A0.5 0.5 0 0 1 5.5 0.5ZM0.86 5.39A2.5 2.5 0 1 1 4.39 1.86A8.04 8.04 0 0 0 0.86 5.39ZM13.5 1C12.75 1 12.07 1.33 11.61 1.86A8.04 8.04 0 0 1 15.14 5.39A2.5 2.5 0 0 0 13.5 1ZM8.5 5A0.5 0.5 0 0 0 7.5 5L7.5 8.88L6.05 11.78A0.5 0.5 0 1 0 6.95 12.22L8.45 9.22A0.5 0.5 0 0 0 8.5 9L8.5 5Z",
|
|
16
|
-
"M2 0L14 0A2 2 0 0 1 16 2L16 14A2 2 0 0 1 14 16L2 16A2 2 0 0 1 0 14L0 2A2 2 0 0 1 2 0ZM5.35 4.65A0.5 0.5 0 1 0 4.65 5.35L7.29 8L4.65 10.65A0.5 0.5 0 0 0 5.35 11.35L8 8.71L10.65 11.35A0.5 0.5 0 0 0 11.35 10.65L8.71 8L11.35 5.35A0.5 0.5 0 0 0 10.65 4.65L8 7.29L5.35 4.65Z",
|
|
17
|
-
"M2 4A2 2 0 0 0 0 6L0 12A2 2 0 0 0 2 14L14 14A2 2 0 0 0 16 12L16 6A2 2 0 0 0 14 4L12.83 4A2 2 0 0 1 11.41 3.41L10.59 2.59A2 2 0 0 0 9.17 2L6.83 2A2 2 0 0 0 5.41 2.59L4.59 3.41A2 2 0 0 1 3.17 4L2 4ZM10.5 8.5A2.5 2.5 0 0 0 5.5 8.5A2.5 2.5 0 1 0 10.5 8.5ZM2.5 6A0.5 0.5 0 0 1 2.5 5A0.5 0.5 0 1 1 2.5 6ZM11.5 8.5A3.5 3.5 0 1 1 4.5 8.5A3.5 3.5 0 0 1 11.5 8.5Z",
|
|
18
|
-
"M2 0A2 2 0 0 0 0 2L0 14A2 2 0 0 0 2 16L14 16A2 2 0 0 0 16 14L16 2A2 2 0 0 0 14 0L2 0ZM9.5 11L5.5 11A0.5 0.5 0 0 1 5 10.5L5 6.5A0.5 0.5 0 0 1 6 6.5L6 9.29L10.15 5.15A0.5 0.5 0 0 1 10.85 5.85L6.71 10L9.5 10A0.5 0.5 0 0 1 9.5 11Z",
|
|
19
|
-
"M15.98 8.51C15.6 14.66 8.71 18.08 3.58 14.68C3.27 14.47 2.98 14.25 2.71 14.01L8.21 8.51L15.99 8.51ZM2 13.3L7.5 7.8L7.5 0.03C1.35 0.41 -2.07 7.3 1.33 12.43C1.53 12.73 1.75 13.02 2 13.3ZM8.5 0.03C12.52 0.28 15.73 3.49 15.99 7.52L8.5 7.52L8.5 0.03Z",
|
|
20
|
-
"M8.66 8.66L8.66 4.66L7.34 4.66L7.34 8.66L8.65 8.66ZM8.66 11.34L8.66 10L7.34 10L7.34 11.34L8.65 11.34ZM8 1.34Q10.75 1.34 12.7 3.29Q14.65 5.24 14.66 8Q14.67 10.76 12.71 12.7Q10.75 14.64 8 14.66Q5.25 14.68 3.3 12.7Q1.35 10.72 1.34 8Q1.33 5.28 3.3 3.3Q5.27 1.32 8 1.34Z"
|
|
21
|
-
],
|
|
22
|
-
optimized: [
|
|
23
|
-
"M16 8C16 4.13 12.42 1 8 1S0 4.13 0 8c0 1.76 0.74 3.37 1.97 4.6c-0.1 1.02 -0.42 2.13 -0.77 2.97c-0.08 0.19 0.07 0.39 0.27 0.36c2.26 -0.37 3.6 -0.94 4.18 -1.23A9.06 9.06 0 0 0 8 15c4.42 0 8 -3.13 8 -7zM7.19 6.77c0.09 0.12 0.16 0.26 0.23 0.4c0.43 0.95 0.39 2.38 -0.94 3.71a0.45 0.45 0 0 1 -0.61 0.01A0.41 0.41 0 0 1 5.86 10.29C6.27 9.88 6.53 9.46 6.67 9.07C6.4 9.24 6.08 9.33 5.74 9.33C4.78 9.33 4 8.59 4 7.67S4.78 6 5.73 6c0.27 0 0.53 0.06 0.76 0.17l0.01 0c0.17 0.07 0.33 0.18 0.47 0.32c0.08 0.08 0.16 0.17 0.23 0.27zM11 9.07c-0.27 0.16 -0.59 0.26 -0.93 0.26C9.11 9.33 8.34 8.59 8.34 7.67S9.11 6 10.07 6c0.27 0 0.53 0.06 0.76 0.17l0.01 0C11 6.24 11.16 6.35 11.3 6.49c0.09 0.08 0.16 0.17 0.23 0.27c0.09 0.12 0.16 0.26 0.23 0.4c0.43 0.95 0.39 2.38 -0.94 3.71a0.45 0.45 0 0 1 -0.61 0.01a0.41 0.41 0 0 1 -0.01 -0.59C10.61 9.87 10.86 9.46 11 9.07z",
|
|
24
|
-
"M16 14V5H0v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2zM2.56 12.33H1.85L3.75 7h0.7l1.9 5.33H5.62l-0.54 -1.6H3.1l-0.54 1.6zM4.1 7.81H4.08l-0.8 2.38H4.9L4.1 7.81zm5.75 0.42v4.11H9.18v-0.54H9.16C9.01 12.12 8.62 12.4 7.97 12.4c-0.85 0 -1.45 -0.48 -1.45 -1.43V8.23h0.68v2.55c0 0.77 0.44 1.01 0.98 1.01c0.59 0 1 -0.37 1 -1.02V8.23h0.68zm1.27 4.41c0.07 0.33 0.42 0.64 0.98 0.64c0.65 0 1.07 -0.38 1.07 -1.02v-0.61h-0.02C13 12 12.55 12.29 11.99 12.29c-0.96 0 -1.64 -0.67 -1.64 -1.9v-0.34c0 -1.21 0.68 -1.89 1.64 -1.89c0.56 0 1 0.29 1.2 0.64h0.02V8.23h0.65v4.03c0 1.05 -0.82 1.58 -1.75 1.58c-1.04 0 -1.57 -0.52 -1.67 -1.2h0.69zm2.06 -2.53c0 -0.83 -0.41 -1.36 -1.06 -1.36c-0.69 0 -1.1 0.49 -1.1 1.36v0.25c0 0.85 0.41 1.36 1.1 1.36c0.67 0 1.06 -0.52 1.06 -1.36V10.1zM4 0.5a0.5 0.5 0 0 0 -1 0V1H2A2 2 0 0 0 0 3v1h16V3A2 2 0 0 0 14 1h-1V0.5a0.5 0.5 0 0 0 -1 0V1H4V0.5z",
|
|
25
|
-
"M5.5 0.5A0.5 0.5 0 0 1 6 0h4a0.5 0.5 0 0 1 0 1H9v1.07a7 7 0 0 1 3.54 12.26l0.82 0.82a0.5 0.5 0 0 1 -0.71 0.71l-0.92 -0.93A6.97 6.97 0 0 1 8 16A6.97 6.97 0 0 1 4.28 14.93l-0.92 0.92A0.5 0.5 0 0 1 2.65 15.15l0.82 -0.82A7 7 0 0 1 7 2.07V1H6A0.5 0.5 0 0 1 5.5 0.5zM0.86 5.39A2.5 2.5 0 1 1 4.39 1.86A8.04 8.04 0 0 0 0.86 5.39zM13.5 1c-0.75 0 -1.43 0.33 -1.89 0.86a8.04 8.04 0 0 1 3.53 3.53A2.5 2.5 0 0 0 13.5 1zm-5 4a0.5 0.5 0 0 0 -1 0v3.88l-1.45 2.89a0.5 0.5 0 1 0 0.89 0.45l1.5 -3A0.5 0.5 0 0 0 8.5 9V5z",
|
|
26
|
-
"M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2H2A2 2 0 0 1 0 14V2A2 2 0 0 1 2 0zm3.35 4.65A0.5 0.5 0 1 0 4.65 5.35L7.29 8l-2.65 2.65a0.5 0.5 0 0 0 0.71 0.71L8 8.71l2.65 2.65a0.5 0.5 0 0 0 0.71 -0.71L8.71 8l2.65 -2.65A0.5 0.5 0 0 0 10.65 4.65L8 7.29L5.35 4.65z",
|
|
27
|
-
"M2 4A2 2 0 0 0 0 6v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2V6A2 2 0 0 0 14 4h-1.17A2 2 0 0 1 11.41 3.41L10.59 2.59A2 2 0 0 0 9.17 2H6.83A2 2 0 0 0 5.41 2.59L4.59 3.41A2 2 0 0 1 3.17 4H2zm8.5 4.5a2.5 2.5 0 0 0 -5 0a2.5 2.5 0 1 0 5 0zM2.5 6a0.5 0.5 0 0 1 0 -1a0.5 0.5 0 1 1 0 1zm9 2.5a3.5 3.5 0 1 1 -7 0a3.5 3.5 0 0 1 7 0z",
|
|
28
|
-
"M2 0A2 2 0 0 0 0 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2V2A2 2 0 0 0 14 0H2zm7.5 11h-4A0.5 0.5 0 0 1 5 10.5v-4a0.5 0.5 0 0 1 1 0v2.79l4.15 -4.15a0.5 0.5 0 0 1 0.71 0.71L6.71 10H9.5a0.5 0.5 0 0 1 0 1z",
|
|
29
|
-
"M15.98 8.51c-0.38 6.15 -7.27 9.57 -12.4 6.17C3.27 14.47 2.98 14.25 2.71 14.01l5.5 -5.5h7.78zM2 13.3L7.5 7.8V0.03C1.35 0.41 -2.07 7.3 1.33 12.43c0.2 0.3 0.42 0.59 0.67 0.87zM8.5 0.03c4.02 0.25 7.23 3.46 7.49 7.49H8.5V0.03z",
|
|
30
|
-
"M8.66 8.66v-4H7.34v4h1.31zm0 2.68V10H7.34v1.34h1.31zM8 1.34q2.75 0 4.7 1.95T14.66 8t-1.95 4.7T8 14.66T3.3 12.7T1.34 8T3.3 3.3T8 1.34z"
|
|
31
|
-
],
|
|
32
|
-
relative: [
|
|
33
|
-
"M16 8c0 -3.87 -3.58 -7 -8 -7s-8 3.13 -8 7c0 1.76 0.74 3.37 1.97 4.6c-0.1 1.02 -0.42 2.13 -0.77 2.97c-0.08 0.19 0.07 0.39 0.27 0.36c2.26 -0.37 3.6 -0.94 4.18 -1.23a9.06 9.06 0 0 0 2.35 0.31c4.42 0 8 -3.13 8 -7zm-8.81 -1.23c0.09 0.12 0.16 0.26 0.23 0.4c0.43 0.95 0.39 2.38 -0.94 3.71a0.45 0.45 0 0 1 -0.61 0.01a0.41 0.41 0 0 1 -0.01 -0.59c0.42 -0.42 0.67 -0.83 0.81 -1.22c-0.27 0.17 -0.59 0.26 -0.93 0.26c-0.96 0 -1.74 -0.75 -1.74 -1.67c0 -0.92 0.78 -1.67 1.73 -1.67c0.27 0 0.53 0.06 0.76 0.17l0.01 0c0.17 0.07 0.33 0.18 0.47 0.32c0.08 0.08 0.16 0.17 0.23 0.27zm3.81 2.31c-0.27 0.16 -0.59 0.26 -0.93 0.26c-0.96 0 -1.73 -0.75 -1.73 -1.67c0 -0.92 0.78 -1.67 1.73 -1.67c0.27 0 0.53 0.06 0.76 0.17l0.01 0c0.17 0.07 0.33 0.18 0.47 0.32c0.09 0.08 0.16 0.17 0.23 0.27c0.09 0.12 0.16 0.26 0.23 0.4c0.43 0.95 0.39 2.38 -0.94 3.71a0.45 0.45 0 0 1 -0.61 0.01a0.41 0.41 0 0 1 -0.01 -0.59c0.42 -0.42 0.67 -0.83 0.81 -1.22z",
|
|
34
|
-
"M16 14v-9h-16v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2zm-13.44 -1.67h-0.71l1.9 -5.33h0.7l1.9 5.33h-0.72l-0.54 -1.6h-1.98l-0.54 1.6zm1.54 -4.53h-0.02l-0.8 2.38h1.62l-0.8 -2.37zm5.75 0.42v4.11h-0.67v-0.54h-0.03c-0.14 0.33 -0.53 0.61 -1.19 0.61c-0.85 0 -1.45 -0.48 -1.45 -1.42v-2.75h0.68v2.55c0 0.77 0.44 1.01 0.98 1.01c0.59 0 1 -0.37 1 -1.02v-2.54h0.68zm1.27 4.41c0.08 0.33 0.42 0.64 0.99 0.64c0.65 0 1.07 -0.38 1.07 -1.02v-0.6h-0.02c-0.16 0.36 -0.61 0.65 -1.17 0.65c-0.96 0 -1.64 -0.67 -1.64 -1.9v-0.34c0 -1.21 0.68 -1.89 1.64 -1.89c0.56 0 1 0.29 1.2 0.64h0.02v-0.58h0.65v4.03c0 1.05 -0.82 1.58 -1.75 1.58c-1.04 0 -1.57 -0.52 -1.67 -1.2h0.69zm2.06 -2.53c0 -0.83 -0.41 -1.36 -1.06 -1.36c-0.69 0 -1.1 0.49 -1.1 1.36v0.25c0 0.85 0.41 1.36 1.1 1.36c0.67 0 1.06 -0.52 1.06 -1.36v-0.25zm-9.18 -9.6a0.5 0.5 0 0 0 -1 0v0.5h-1a2 2 0 0 0 -2 2v1h16v-1a2 2 0 0 0 -2 -2h-1v-0.5a0.5 0.5 0 0 0 -1 0v0.5h-8v-0.5z",
|
|
35
|
-
"M5.5 0.5a0.5 0.5 0 0 1 0.5 -0.5h4a0.5 0.5 0 0 1 0 1h-1v1.07a7 7 0 0 1 3.54 12.26l0.82 0.82a0.5 0.5 0 0 1 -0.71 0.71l-0.92 -0.92a6.97 6.97 0 0 1 -3.72 1.07a6.97 6.97 0 0 1 -3.72 -1.07l-0.92 0.92a0.5 0.5 0 0 1 -0.71 -0.71l0.82 -0.82a7 7 0 0 1 3.54 -12.26v-1.07h-1a0.5 0.5 0 0 1 -0.5 -0.5zm-4.64 4.89a2.5 2.5 0 1 1 3.53 -3.53a8.04 8.04 0 0 0 -3.53 3.53zm12.64 -4.39c-0.75 0 -1.43 0.33 -1.89 0.86a8.04 8.04 0 0 1 3.53 3.53a2.5 2.5 0 0 0 -1.64 -4.39zm-5 4a0.5 0.5 0 0 0 -1 0v3.88l-1.45 2.89a0.5 0.5 0 1 0 0.89 0.45l1.5 -3a0.5 0.5 0 0 0 0.05 -0.22v-4z",
|
|
36
|
-
"M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2zm3.35 4.65a0.5 0.5 0 1 0 -0.71 0.71l2.65 2.65l-2.65 2.65a0.5 0.5 0 0 0 0.71 0.71l2.65 -2.65l2.65 2.65a0.5 0.5 0 0 0 0.71 -0.71l-2.65 -2.65l2.65 -2.65a0.5 0.5 0 0 0 -0.71 -0.71l-2.65 2.65l-2.65 -2.65z",
|
|
37
|
-
"M2 4a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-6a2 2 0 0 0 -2 -2h-1.17a2 2 0 0 1 -1.41 -0.59l-0.83 -0.83a2 2 0 0 0 -1.41 -0.59h-2.34a2 2 0 0 0 -1.41 0.59l-0.83 0.83a2 2 0 0 1 -1.41 0.59h-1.17zm8.5 4.5a2.5 2.5 0 0 0 -5 0a2.5 2.5 0 1 0 5 0zm-8 -2.5a0.5 0.5 0 0 1 0 -1a0.5 0.5 0 1 1 0 1zm9 2.5a3.5 3.5 0 1 1 -7 0a3.5 3.5 0 0 1 7 0z",
|
|
38
|
-
"M2 0a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-12zm7.5 11h-4a0.5 0.5 0 0 1 -0.5 -0.5v-4a0.5 0.5 0 0 1 1 0v2.79l4.15 -4.15a0.5 0.5 0 0 1 0.71 0.71l-4.15 4.15h2.79a0.5 0.5 0 0 1 0 1z",
|
|
39
|
-
"M15.98 8.51c-0.38 6.15 -7.27 9.57 -12.4 6.17c-0.31 -0.21 -0.6 -0.43 -0.87 -0.67l5.5 -5.5h7.78zm-13.98 4.79l5.5 -5.5v-7.77c-6.15 0.38 -9.57 7.27 -6.17 12.4c0.2 0.3 0.42 0.59 0.67 0.87zm6.5 -13.27c4.02 0.25 7.23 3.46 7.49 7.49h-7.49v-7.49z",
|
|
40
|
-
"M8.66 8.66v-4h-1.32v4h1.31zm0 2.68v-1.34h-1.32v1.34h1.31zm-0.66 -10q2.75 0 4.7 1.95t1.96 4.71t-1.95 4.7t-4.71 1.96t-4.7 -1.96t-1.96 -4.7t1.96 -4.7t4.7 -1.96z"
|
|
41
|
-
],
|
|
42
|
-
absolute: [
|
|
43
|
-
"M16 8C16 4.13 12.42 1 8 1S0 4.13 0 8C0 9.76 0.74 11.37 1.97 12.6C1.87 13.62 1.55 14.73 1.2 15.57C1.12 15.75 1.27 15.96 1.47 15.93C3.73 15.56 5.07 14.99 5.65 14.69A9.06 9.06 0 0 0 8 15C12.42 15 16 11.87 16 8ZM7.19 6.77C7.28 6.89 7.36 7.03 7.42 7.17C7.85 8.11 7.81 9.54 6.48 10.87A0.45 0.45 0 0 1 5.87 10.88A0.41 0.41 0 0 1 5.86 10.29C6.27 9.88 6.53 9.46 6.67 9.07C6.4 9.24 6.08 9.33 5.74 9.33C4.78 9.33 4 8.59 4 7.67C4 6.75 4.78 6 5.73 6C6.01 6 6.26 6.06 6.49 6.17L6.5 6.17C6.67 6.24 6.82 6.35 6.97 6.49C7.05 6.58 7.13 6.67 7.19 6.77ZM11 9.07C10.73 9.24 10.41 9.33 10.07 9.33C9.11 9.33 8.34 8.59 8.34 7.67C8.34 6.75 9.11 6 10.07 6C10.34 6 10.6 6.06 10.82 6.17L10.83 6.17C11 6.24 11.16 6.35 11.3 6.49C11.39 6.58 11.46 6.67 11.53 6.76C11.61 6.89 11.69 7.02 11.75 7.16C12.18 8.11 12.15 9.54 10.81 10.87A0.45 0.45 0 0 1 10.2 10.88A0.41 0.41 0 0 1 10.19 10.29C10.61 9.87 10.86 9.46 11 9.07Z",
|
|
44
|
-
"M16 14V5H0V14A2 2 0 0 0 2 16H14A2 2 0 0 0 16 14ZM2.56 12.33H1.85L3.75 7H4.44L6.34 12.33H5.62L5.08 10.73H3.1L2.56 12.33ZM4.1 7.81H4.08L3.28 10.18H4.9L4.1 7.81ZM9.85 8.23V12.33H9.18V11.79H9.16C9.01 12.12 8.62 12.4 7.97 12.4C7.12 12.4 6.51 11.91 6.51 10.97V8.23H7.19V10.78C7.19 11.55 7.63 11.79 8.17 11.79C8.76 11.79 9.17 11.42 9.17 10.77V8.23H9.85ZM11.12 12.64C11.2 12.97 11.55 13.27 12.11 13.27C12.76 13.27 13.18 12.9 13.18 12.25V11.65H13.16C13 12 12.55 12.29 11.99 12.29C11.03 12.29 10.35 11.62 10.35 10.39V10.05C10.35 8.84 11.02 8.16 11.99 8.16C12.55 8.16 12.99 8.46 13.18 8.8H13.2V8.23H13.85V12.26C13.85 13.31 13.03 13.84 12.1 13.84C11.06 13.84 10.53 13.32 10.44 12.64H11.12ZM13.18 10.1C13.18 9.27 12.76 8.74 12.12 8.74C11.42 8.74 11.02 9.23 11.02 10.1V10.36C11.02 11.21 11.42 11.72 12.12 11.72C12.79 11.72 13.18 11.2 13.18 10.36V10.1ZM4 0.5A0.5 0.5 0 0 0 3 0.5V1H2A2 2 0 0 0 0 3V4H16V3A2 2 0 0 0 14 1H13V0.5A0.5 0.5 0 0 0 12 0.5V1H4V0.5Z",
|
|
45
|
-
"M5.5 0.5A0.5 0.5 0 0 1 6 0H10A0.5 0.5 0 0 1 10 1H9V2.07A7 7 0 0 1 12.54 14.33L13.35 15.15A0.5 0.5 0 0 1 12.65 15.85L11.72 14.93A6.97 6.97 0 0 1 8 16A6.97 6.97 0 0 1 4.28 14.93L3.35 15.85A0.5 0.5 0 0 1 2.65 15.15L3.46 14.33A7 7 0 0 1 7 2.07V1H6A0.5 0.5 0 0 1 5.5 0.5ZM0.86 5.39A2.5 2.5 0 1 1 4.39 1.86A8.04 8.04 0 0 0 0.86 5.39ZM13.5 1C12.75 1 12.07 1.33 11.61 1.86A8.04 8.04 0 0 1 15.14 5.39A2.5 2.5 0 0 0 13.5 1ZM8.5 5A0.5 0.5 0 0 0 7.5 5V8.88L6.05 11.78A0.5 0.5 0 1 0 6.95 12.22L8.45 9.22A0.5 0.5 0 0 0 8.5 9V5Z",
|
|
46
|
-
"M2 0H14A2 2 0 0 1 16 2V14A2 2 0 0 1 14 16H2A2 2 0 0 1 0 14V2A2 2 0 0 1 2 0ZM5.35 4.65A0.5 0.5 0 1 0 4.65 5.35L7.29 8L4.65 10.65A0.5 0.5 0 0 0 5.35 11.35L8 8.71L10.65 11.35A0.5 0.5 0 0 0 11.35 10.65L8.71 8L11.35 5.35A0.5 0.5 0 0 0 10.65 4.65L8 7.29L5.35 4.65Z",
|
|
47
|
-
"M2 4A2 2 0 0 0 0 6V12A2 2 0 0 0 2 14H14A2 2 0 0 0 16 12V6A2 2 0 0 0 14 4H12.83A2 2 0 0 1 11.41 3.41L10.59 2.59A2 2 0 0 0 9.17 2H6.83A2 2 0 0 0 5.41 2.59L4.59 3.41A2 2 0 0 1 3.17 4H2ZM10.5 8.5A2.5 2.5 0 0 0 5.5 8.5A2.5 2.5 0 1 0 10.5 8.5ZM2.5 6A0.5 0.5 0 0 1 2.5 5A0.5 0.5 0 1 1 2.5 6ZM11.5 8.5A3.5 3.5 0 1 1 4.5 8.5A3.5 3.5 0 0 1 11.5 8.5Z",
|
|
48
|
-
"M2 0A2 2 0 0 0 0 2V14A2 2 0 0 0 2 16H14A2 2 0 0 0 16 14V2A2 2 0 0 0 14 0H2ZM9.5 11H5.5A0.5 0.5 0 0 1 5 10.5V6.5A0.5 0.5 0 0 1 6 6.5V9.29L10.15 5.15A0.5 0.5 0 0 1 10.85 5.85L6.71 10H9.5A0.5 0.5 0 0 1 9.5 11Z",
|
|
49
|
-
"M15.98 8.51C15.6 14.66 8.71 18.08 3.58 14.68C3.27 14.47 2.98 14.25 2.71 14.01L8.21 8.51H15.99ZM2 13.3L7.5 7.8V0.03C1.35 0.41 -2.07 7.3 1.33 12.43C1.53 12.73 1.75 13.02 2 13.3ZM8.5 0.03C12.52 0.28 15.73 3.49 15.99 7.52H8.5V0.03Z",
|
|
50
|
-
"M8.66 8.66V4.66H7.34V8.66H8.65ZM8.66 11.34V10H7.34V11.34H8.65ZM8 1.34Q10.75 1.34 12.7 3.29T14.66 8T12.71 12.7T8 14.66T3.3 12.7T1.34 8T3.3 3.3T8 1.34Z"
|
|
51
|
-
],
|
|
52
|
-
curve: [
|
|
53
|
-
"M16 8C16 4.13 12.42 1 8 1C3.58 1 0 4.13 0 8C0 9.76 0.74 11.37 1.97 12.6C1.87 13.62 1.55 14.73 1.2 15.57C1.12 15.75 1.27 15.96 1.47 15.93C3.73 15.56 5.07 14.99 5.65 14.69C6.42 14.9 7.21 15 8 15C12.42 15 16 11.87 16 8C16 8 16 8 16 8M7.19 6.77C7.28 6.89 7.36 7.03 7.42 7.17C7.85 8.11 7.81 9.54 6.48 10.87C6.31 11.04 6.04 11.04 5.87 10.88C5.7 10.72 5.69 10.46 5.86 10.29C6.27 9.88 6.53 9.46 6.67 9.07C6.4 9.24 6.08 9.33 5.74 9.33C4.78 9.33 4 8.59 4 7.67C4 6.75 4.78 6 5.73 6C6.01 6 6.26 6.06 6.49 6.17C6.49 6.17 6.5 6.17 6.5 6.17C6.67 6.24 6.82 6.35 6.97 6.49C7.05 6.58 7.13 6.67 7.19 6.77C7.19 6.77 7.19 6.77 7.19 6.77M11 9.07C10.73 9.24 10.41 9.33 10.07 9.33C9.11 9.33 8.34 8.59 8.34 7.67C8.34 6.75 9.11 6 10.07 6C10.34 6 10.6 6.06 10.82 6.17C10.83 6.17 10.83 6.17 10.83 6.17C11 6.24 11.16 6.35 11.3 6.49C11.39 6.58 11.46 6.67 11.53 6.76C11.61 6.89 11.69 7.02 11.75 7.16C12.18 8.11 12.15 9.54 10.81 10.87C10.64 11.03 10.37 11.04 10.2 10.88C10.03 10.72 10.02 10.45 10.19 10.29C10.61 9.87 10.86 9.46 11 9.07C11 9.07 11 9.07 11 9.07",
|
|
54
|
-
"M16 14C16 11 16 8 16 5C10.67 5 5.33 5 0 5C0 8 0 11 0 14C0 15.1 0.9 16 2 16C6 16 10 16 14 16C15.1 16 16 15.1 16 14C16 14 16 14 16 14M2.56 12.33C2.32 12.33 2.09 12.33 1.85 12.33C2.48 10.55 3.12 8.78 3.75 7C3.98 7 4.21 7 4.44 7C5.08 8.78 5.71 10.55 6.34 12.33C6.1 12.33 5.86 12.33 5.62 12.33C5.44 11.8 5.26 11.26 5.08 10.73C4.42 10.73 3.76 10.73 3.1 10.73C2.92 11.26 2.74 11.8 2.56 12.33C2.56 12.33 2.56 12.33 2.56 12.33M4.1 7.81C4.1 7.81 4.09 7.81 4.08 7.81C3.82 8.6 3.55 9.39 3.28 10.18C3.82 10.18 4.36 10.18 4.9 10.18C4.63 9.39 4.37 8.6 4.1 7.81C4.1 7.81 4.1 7.81 4.1 7.81M9.85 8.23C9.85 9.6 9.85 10.96 9.85 12.33C9.63 12.33 9.4 12.33 9.18 12.33C9.18 12.15 9.18 11.97 9.18 11.79C9.17 11.79 9.16 11.79 9.16 11.79C9.01 12.12 8.62 12.4 7.97 12.4C7.12 12.4 6.51 11.91 6.51 10.97C6.51 10.06 6.51 9.14 6.51 8.23C6.74 8.23 6.96 8.23 7.19 8.23C7.19 9.08 7.19 9.93 7.19 10.78C7.19 11.55 7.63 11.79 8.17 11.79C8.76 11.79 9.17 11.42 9.17 10.77C9.17 9.92 9.17 9.07 9.17 8.23C9.4 8.23 9.62 8.23 9.85 8.23C9.85 8.23 9.85 8.23 9.85 8.23M11.12 12.64C11.2 12.97 11.55 13.27 12.11 13.27C12.76 13.27 13.18 12.9 13.18 12.25C13.18 12.05 13.18 11.85 13.18 11.65C13.17 11.65 13.16 11.65 13.16 11.65C13 12 12.55 12.29 11.99 12.29C11.03 12.29 10.35 11.62 10.35 10.39C10.35 10.28 10.35 10.16 10.35 10.05C10.35 8.84 11.02 8.16 11.99 8.16C12.55 8.16 12.99 8.46 13.18 8.8C13.19 8.8 13.2 8.8 13.2 8.8C13.2 8.61 13.2 8.42 13.2 8.23C13.42 8.23 13.63 8.23 13.85 8.23C13.85 9.57 13.85 10.91 13.85 12.26C13.85 13.31 13.03 13.84 12.1 13.84C11.06 13.84 10.53 13.32 10.44 12.64C10.67 12.64 10.89 12.64 11.12 12.64C11.12 12.64 11.12 12.64 11.12 12.64M13.18 10.1C13.18 9.27 12.76 8.74 12.12 8.74C11.42 8.74 11.02 9.23 11.02 10.1C11.02 10.19 11.02 10.27 11.02 10.36C11.02 11.21 11.42 11.72 12.12 11.72C12.79 11.72 13.18 11.2 13.18 10.36C13.18 10.27 13.18 10.19 13.18 10.1C13.18 10.1 13.18 10.1 13.18 10.1M4 0.5C4 0.12 3.58 -0.13 3.25 0.07C3.1 0.16 3 0.32 3 0.5C3 0.67 3 0.83 3 1C2.67 1 2.33 1 2 1C0.9 1 0 1.9 0 3C0 3.33 0 3.67 0 4C5.33 4 10.67 4 16 4C16 3.67 16 3.33 16 3C16 1.9 15.1 1 14 1C13.67 1 13.33 1 13 1C13 0.83 13 0.67 13 0.5C13 0.12 12.58 -0.13 12.25 0.07C12.1 0.16 12 0.32 12 0.5C12 0.67 12 0.83 12 1C9.33 1 6.67 1 4 1C4 0.83 4 0.67 4 0.5C4 0.5 4 0.5 4 0.5",
|
|
55
|
-
"M5.5 0.5C5.5 0.22 5.72 0 6 0C7.33 0 8.67 0 10 0C10.38 0 10.63 0.42 10.43 0.75C10.34 0.9 10.18 1 10 1C9.67 1 9.33 1 9 1C9 1.36 9 1.71 9 2.07C14.33 2.84 16.83 9.1 13.5 13.33C13.21 13.7 12.89 14.03 12.54 14.33C12.81 14.6 13.08 14.87 13.35 15.15C13.63 15.42 13.5 15.88 13.13 15.98C12.96 16.03 12.77 15.98 12.65 15.85C12.34 15.55 12.03 15.24 11.72 14.93C10.61 15.63 9.32 16 8 16C6.68 16 5.39 15.63 4.28 14.93C3.97 15.24 3.66 15.55 3.35 15.85C3.08 16.13 2.62 16 2.52 15.63C2.47 15.46 2.52 15.27 2.65 15.15C2.92 14.87 3.19 14.6 3.46 14.33C-0.64 10.83 0.58 4.21 5.66 2.4C6.09 2.25 6.54 2.14 7 2.07C7 1.71 7 1.36 7 1C6.67 1 6.33 1 6 1C5.72 1 5.5 0.78 5.5 0.5C5.5 0.5 5.5 0.5 5.5 0.5M0.86 5.39C-0.59 4.12 -0.13 1.76 1.69 1.14C2.65 0.81 3.72 1.09 4.39 1.86C2.87 2.63 1.63 3.87 0.86 5.39C0.86 5.39 0.86 5.39 0.86 5.39M13.5 1C12.75 1 12.07 1.33 11.61 1.86C13.13 2.63 14.37 3.87 15.14 5.39C16.59 4.12 16.13 1.76 14.31 1.14C14.05 1.05 13.78 1 13.5 1C13.5 1 13.5 1 13.5 1M8.5 5C8.5 4.62 8.08 4.37 7.75 4.57C7.6 4.66 7.5 4.82 7.5 5C7.5 6.29 7.5 7.59 7.5 8.88C7.02 9.85 6.54 10.81 6.05 11.78C5.88 12.12 6.14 12.52 6.52 12.5C6.71 12.49 6.87 12.39 6.95 12.22C7.45 11.22 7.95 10.22 8.45 9.22C8.48 9.15 8.5 9.08 8.5 9C8.5 7.67 8.5 6.33 8.5 5C8.5 5 8.5 5 8.5 5",
|
|
56
|
-
"M2 0C6 0 10 0 14 0C15.1 0 16 0.9 16 2C16 6 16 10 16 14C16 15.1 15.1 16 14 16C10 16 6 16 2 16C0.9 16 0 15.1 0 14C0 10 0 6 0 2C0 0.9 0.9 0 2 0C2 0 2 0 2 0M5.35 4.65C5.08 4.37 4.62 4.5 4.52 4.87C4.47 5.04 4.52 5.23 4.65 5.35C5.53 6.24 6.41 7.12 7.29 8C6.41 8.88 5.53 9.76 4.65 10.65C4.37 10.92 4.5 11.38 4.87 11.48C5.04 11.53 5.23 11.48 5.35 11.35C6.24 10.47 7.12 9.59 8 8.71C8.88 9.59 9.76 10.47 10.65 11.35C10.92 11.63 11.38 11.5 11.48 11.13C11.53 10.96 11.48 10.77 11.35 10.65C10.47 9.76 9.59 8.88 8.71 8C9.59 7.12 10.47 6.24 11.35 5.35C11.63 5.08 11.5 4.62 11.13 4.52C10.96 4.47 10.77 4.52 10.65 4.65C9.76 5.53 8.88 6.41 8 7.29C7.12 6.41 6.24 5.53 5.35 4.65C5.35 4.65 5.35 4.65 5.35 4.65",
|
|
57
|
-
"M2 4C0.9 4 0 4.9 0 6C0 8 0 10 0 12C0 13.1 0.9 14 2 14C6 14 10 14 14 14C15.1 14 16 13.1 16 12C16 10 16 8 16 6C16 4.9 15.1 4 14 4C13.61 4 13.22 4 12.83 4C12.3 4 11.79 3.79 11.41 3.41C11.14 3.14 10.86 2.86 10.59 2.59C10.21 2.21 9.7 2 9.17 2C8.39 2 7.61 2 6.83 2C6.3 2 5.79 2.21 5.41 2.59C5.14 2.86 4.86 3.14 4.59 3.41C4.21 3.79 3.7 4 3.17 4C2.78 4 2.39 4 2 4C2 4 2 4 2 4M10.5 8.5C10.5 6.58 8.42 5.37 6.75 6.33C5.98 6.78 5.5 7.61 5.5 8.5C5.5 10.42 7.58 11.63 9.25 10.67C10.02 10.22 10.5 9.39 10.5 8.5C10.5 8.5 10.5 8.5 10.5 8.5M2.5 6C2.12 6 1.87 5.58 2.07 5.25C2.16 5.1 2.32 5 2.5 5C2.88 5 3.13 5.42 2.93 5.75C2.84 5.9 2.68 6 2.5 6C2.5 6 2.5 6 2.5 6M11.5 8.5C11.5 11.19 8.58 12.88 6.25 11.53C5.17 10.91 4.5 9.75 4.5 8.5C4.5 5.81 7.42 4.12 9.75 5.47C10.83 6.09 11.5 7.25 11.5 8.5C11.5 8.5 11.5 8.5 11.5 8.5",
|
|
58
|
-
"M2 0C0.9 0 0 0.9 0 2C0 6 0 10 0 14C0 15.1 0.9 16 2 16C6 16 10 16 14 16C15.1 16 16 15.1 16 14C16 10 16 6 16 2C16 0.9 15.1 0 14 0C10 0 6 0 2 0C2 0 2 0 2 0M9.5 11C8.17 11 6.83 11 5.5 11C5.22 11 5 10.78 5 10.5C5 9.17 5 7.83 5 6.5C5 6.12 5.42 5.87 5.75 6.07C5.9 6.16 6 6.32 6 6.5C6 7.43 6 8.36 6 9.29C7.38 7.91 8.76 6.53 10.15 5.15C10.42 4.87 10.88 5 10.98 5.37C11.03 5.54 10.98 5.73 10.85 5.85C9.47 7.24 8.09 8.62 6.71 10C7.64 10 8.57 10 9.5 10C9.88 10 10.13 10.42 9.93 10.75C9.84 10.9 9.68 11 9.5 11C9.5 11 9.5 11 9.5 11",
|
|
59
|
-
"M15.98 8.51C15.6 14.66 8.71 18.08 3.58 14.68C3.27 14.47 2.98 14.25 2.71 14.01C4.54 12.18 6.38 10.34 8.21 8.51C10.8 8.51 13.4 8.51 15.99 8.51C15.99 8.51 15.99 8.51 15.99 8.51M2 13.3C3.83 11.47 5.67 9.63 7.5 7.8C7.5 5.21 7.5 2.62 7.5 0.03C1.35 0.41 -2.07 7.3 1.33 12.43C1.53 12.73 1.75 13.02 2 13.3C2 13.3 2 13.3 2 13.3M8.5 0.03C12.52 0.28 15.73 3.49 15.99 7.52C13.49 7.52 11 7.52 8.5 7.52C8.5 5.02 8.5 2.53 8.5 0.03C8.5 0.03 8.5 0.03 8.5 0.03",
|
|
60
|
-
"M8.66 8.66C8.66 7.33 8.66 5.99 8.66 4.66C8.22 4.66 7.78 4.66 7.34 4.66C7.34 5.99 7.34 7.33 7.34 8.66C7.78 8.66 8.21 8.66 8.65 8.66C8.65 8.66 8.65 8.66 8.65 8.66M8.66 11.34C8.66 10.89 8.66 10.45 8.66 10C8.22 10 7.78 10 7.34 10C7.34 10.45 7.34 10.89 7.34 11.34C7.78 11.34 8.21 11.34 8.65 11.34C8.65 11.34 8.65 11.34 8.65 11.34M8 1.34C9.83 1.34 11.4 1.99 12.7 3.29C14 4.59 14.65 6.16 14.66 8C14.67 9.84 14.02 11.41 12.71 12.7C11.4 13.99 9.83 14.65 8 14.66C6.17 14.67 4.6 14.02 3.3 12.7C2 11.38 1.35 9.81 1.34 8C1.33 6.19 1.99 4.62 3.3 3.3C4.61 1.98 6.18 1.33 8 1.34C8 1.34 8 1.34 8 1.34"
|
|
61
|
-
],
|
|
62
|
-
scaled: [
|
|
63
|
-
"M14.4 7.2C14.4 3.72 11.18 0.9 7.2 0.9S0 3.72 0 7.2C0 8.78 0.67 10.23 1.77 11.34C1.69 12.25 1.4 13.26 1.08 14.01C1.01 14.18 1.14 14.36 1.32 14.34C3.35 14 4.56 13.49 5.09 13.22C5.78 13.41 6.49 13.5 7.2 13.5C11.18 13.5 14.4 10.68 14.4 7.2ZM6.47 6.09C6.55 6.2 6.62 6.32 6.68 6.45C7.06 7.3 7.03 8.59 5.83 9.78C5.68 9.93 5.44 9.94 5.28 9.79C5.13 9.65 5.12 9.41 5.27 9.26C5.65 8.89 5.88 8.52 6 8.16C5.76 8.31 5.47 8.4 5.16 8.4C4.3 8.4 3.6 7.73 3.6 6.9C3.6 6.07 4.3 5.4 5.16 5.4C5.4 5.4 5.64 5.45 5.84 5.55L5.85 5.55C6 5.62 6.14 5.72 6.27 5.84C6.35 5.92 6.41 6 6.47 6.09ZM9.9 8.17C9.66 8.31 9.37 8.4 9.06 8.4C8.2 8.4 7.5 7.73 7.5 6.9C7.5 6.07 8.2 5.4 9.06 5.4C9.31 5.4 9.54 5.45 9.74 5.55L9.75 5.55C9.9 5.62 10.04 5.72 10.17 5.84C10.25 5.92 10.31 6 10.37 6.09C10.45 6.2 10.52 6.32 10.58 6.45C10.96 7.3 10.93 8.59 9.73 9.78C9.58 9.93 9.34 9.93 9.18 9.79C9.03 9.65 9.02 9.41 9.17 9.26C9.55 8.89 9.77 8.51 9.9 8.16Z",
|
|
64
|
-
"M14.4 12.6V4.5H0V12.6C0 13.59 0.81 14.4 1.8 14.4H12.6C13.59 14.4 14.4 13.59 14.4 12.6ZM2.3 11.1H1.67L3.37 6.3H4L5.71 11.1H5.06L4.58 9.66H2.79L2.3 11.1ZM3.69 7.02H3.68L2.96 9.16H4.41L3.69 7.02ZM8.87 7.4V11.1H8.26V10.61H8.24C8.11 10.91 7.76 11.16 7.17 11.16C6.41 11.16 5.86 10.72 5.86 9.88V7.4H6.47V9.7C6.47 10.39 6.87 10.61 7.35 10.61C7.88 10.61 8.26 10.28 8.26 9.69V7.4H8.87ZM10.01 11.37C10.08 11.67 10.39 11.95 10.9 11.95C11.48 11.95 11.86 11.61 11.86 11.03V10.48H11.84C11.7 10.8 11.29 11.06 10.79 11.06C9.93 11.06 9.31 10.46 9.31 9.35V9.05C9.31 7.96 9.92 7.35 10.79 7.35C11.29 7.35 11.69 7.61 11.86 7.92H11.88V7.4H12.47V11.03C12.47 11.98 11.73 12.45 10.89 12.45C9.95 12.45 9.48 11.99 9.39 11.37H10.01ZM11.86 9.09C11.86 8.34 11.49 7.87 10.9 7.87C10.28 7.87 9.92 8.31 9.92 9.09V9.32C9.92 10.09 10.28 10.55 10.9 10.55C11.51 10.55 11.86 10.08 11.86 9.32V9.09ZM3.6 0.45C3.6 0.1 3.23 -0.11 2.93 0.06C2.79 0.14 2.7 0.29 2.7 0.45V0.9H1.8C0.81 0.9 0 1.71 0 2.7V3.6H14.4V2.7C14.4 1.71 13.59 0.9 12.6 0.9H11.7V0.45C11.7 0.1 11.33 -0.11 11.03 0.06C10.89 0.14 10.8 0.29 10.8 0.45V0.9H3.6V0.45Z",
|
|
65
|
-
"M4.95 0.45C4.95 0.2 5.15 0 5.4 0H9C9.35 0 9.56 0.37 9.39 0.68C9.31 0.81 9.16 0.9 9 0.9H8.1V1.86C12.9 2.56 15.15 8.19 12.15 12C11.89 12.33 11.6 12.63 11.28 12.9L12.02 13.63C12.26 13.88 12.15 14.3 11.82 14.39C11.66 14.43 11.5 14.38 11.38 14.27L10.55 13.44C9.55 14.07 8.39 14.4 7.2 14.4C6.01 14.4 4.85 14.07 3.85 13.44L3.02 14.27C2.77 14.51 2.35 14.4 2.26 14.07C2.22 13.91 2.27 13.75 2.38 13.63L3.12 12.9C-0.58 9.75 0.52 3.79 5.09 2.16C5.48 2.02 5.89 1.92 6.3 1.86V0.9H5.4C5.15 0.9 4.95 0.7 4.95 0.45ZM0.77 4.85C-0.53 3.71 -0.12 1.59 1.52 1.02C2.39 0.72 3.35 0.98 3.95 1.67C2.58 2.37 1.47 3.48 0.77 4.85ZM12.15 0.9C11.47 0.9 10.86 1.2 10.45 1.67C11.82 2.37 12.93 3.48 13.63 4.85C14.93 3.71 14.52 1.59 12.88 1.02C12.65 0.94 12.4 0.9 12.15 0.9ZM7.65 4.5C7.65 4.15 7.28 3.94 6.98 4.11C6.84 4.19 6.75 4.34 6.75 4.5V7.99L5.45 10.6C5.29 10.91 5.53 11.27 5.87 11.25C6.03 11.24 6.18 11.15 6.25 11L7.6 8.3C7.63 8.24 7.65 8.17 7.65 8.1V4.5Z",
|
|
66
|
-
"M1.8 0H12.6C13.59 0 14.4 0.81 14.4 1.8V12.6C14.4 13.59 13.59 14.4 12.6 14.4H1.8C0.81 14.4 0 13.59 0 12.6V1.8C0 0.81 0.81 0 1.8 0ZM4.82 4.18C4.57 3.94 4.15 4.05 4.06 4.38C4.02 4.54 4.07 4.7 4.18 4.82L6.56 7.2L4.18 9.58C3.94 9.83 4.05 10.25 4.38 10.34C4.54 10.38 4.7 10.33 4.82 10.22L7.2 7.84L9.58 10.22C9.83 10.46 10.25 10.35 10.34 10.02C10.38 9.86 10.33 9.7 10.22 9.58L7.84 7.2L10.22 4.82C10.46 4.57 10.35 4.15 10.02 4.06C9.86 4.02 9.7 4.07 9.58 4.18L7.2 6.56L4.82 4.18Z",
|
|
67
|
-
"M1.8 3.6C0.81 3.6 0 4.41 0 5.4V10.8C0 11.79 0.81 12.6 1.8 12.6H12.6C13.59 12.6 14.4 11.79 14.4 10.8V5.4C14.4 4.41 13.59 3.6 12.6 3.6H11.55C11.07 3.6 10.61 3.41 10.27 3.07L9.53 2.33C9.19 1.99 8.73 1.8 8.25 1.8H6.15C5.67 1.8 5.21 1.99 4.87 2.33L4.13 3.07C3.79 3.41 3.33 3.6 2.85 3.6H1.8ZM9.45 7.65C9.45 5.92 7.57 4.84 6.08 5.7C5.38 6.1 4.95 6.85 4.95 7.65C4.95 9.38 6.83 10.46 8.33 9.6C9.02 9.2 9.45 8.45 9.45 7.65ZM2.25 5.4C1.9 5.4 1.69 5.02 1.86 4.73C1.94 4.59 2.09 4.5 2.25 4.5C2.6 4.5 2.81 4.88 2.64 5.18C2.56 5.31 2.41 5.4 2.25 5.4ZM10.35 7.65C10.35 10.07 7.73 11.59 5.63 10.38C4.65 9.82 4.05 8.78 4.05 7.65C4.05 5.23 6.68 3.71 8.78 4.92C9.75 5.48 10.35 6.52 10.35 7.65Z",
|
|
68
|
-
"M1.8 0C0.81 0 0 0.81 0 1.8V12.6C0 13.59 0.81 14.4 1.8 14.4H12.6C13.59 14.4 14.4 13.59 14.4 12.6V1.8C14.4 0.81 13.59 0 12.6 0H1.8ZM8.55 9.9H4.95C4.7 9.9 4.5 9.7 4.5 9.45V5.85C4.5 5.5 4.88 5.29 5.18 5.46C5.31 5.54 5.4 5.69 5.4 5.85V8.36L9.13 4.63C9.38 4.39 9.8 4.5 9.89 4.83C9.93 4.99 9.88 5.15 9.77 5.27L6.04 9H8.55C8.9 9 9.11 9.38 8.94 9.68C8.86 9.81 8.71 9.9 8.55 9.9Z",
|
|
69
|
-
"M14.38 7.66C14.04 13.19 7.84 16.27 3.22 13.21C2.94 13.02 2.68 12.83 2.44 12.61L7.39 7.66H14.39ZM1.8 11.97L6.75 7.02V0.03C1.22 0.37 -1.86 6.57 1.2 11.19C1.38 11.46 1.58 11.72 1.8 11.97ZM7.65 0.03C11.27 0.25 14.16 3.14 14.39 6.77H7.65V0.03Z",
|
|
70
|
-
"M7.79 7.79V4.19H6.61V7.79H7.79ZM7.79 10.21V9H6.61V10.21H7.79ZM7.2 1.21Q9.68 1.21 11.43 2.96T13.19 7.2T11.44 11.43T7.2 13.19T2.97 11.43T1.21 7.2T2.97 2.97T7.2 1.21Z"
|
|
71
|
-
],
|
|
72
|
-
translated: [
|
|
73
|
-
"M17 9C17 5.13 13.42 2 9 2S1 5.13 1 9C1 10.76 1.74 12.37 2.97 13.6C2.87 14.62 2.55 15.73 2.2 16.57C2.12 16.75 2.27 16.96 2.47 16.93C4.73 16.56 6.07 15.99 6.65 15.69C7.42 15.9 8.21 16 9 16C13.42 16 17 12.87 17 9ZM8.19 7.77C8.28 7.89 8.36 8.03 8.42 8.17C8.85 9.11 8.81 10.54 7.48 11.87C7.31 12.04 7.04 12.04 6.87 11.88C6.7 11.72 6.69 11.46 6.86 11.29C7.27 10.88 7.53 10.46 7.67 10.07C7.4 10.24 7.08 10.33 6.74 10.33C5.78 10.33 5 9.59 5 8.67C5 7.75 5.78 7 6.73 7C7.01 7 7.26 7.06 7.49 7.17L7.5 7.17C7.67 7.24 7.82 7.35 7.97 7.49C8.05 7.58 8.13 7.67 8.19 7.77ZM12 10.07C11.73 10.24 11.41 10.33 11.07 10.33C10.11 10.33 9.34 9.59 9.34 8.67C9.34 7.75 10.11 7 11.07 7C11.34 7 11.6 7.06 11.82 7.17L11.83 7.17C12 7.24 12.16 7.35 12.3 7.49C12.39 7.58 12.46 7.67 12.53 7.76C12.61 7.89 12.69 8.02 12.75 8.16C13.18 9.11 13.15 10.54 11.81 11.87C11.64 12.03 11.37 12.04 11.2 11.88C11.03 11.72 11.02 11.45 11.19 11.29C11.61 10.87 11.86 10.46 12 10.07Z",
|
|
74
|
-
"M17 15V6H1V15C1 16.1 1.9 17 3 17H15C16.1 17 17 16.1 17 15ZM3.56 13.33H2.85L4.75 8H5.44L7.34 13.33H6.62L6.08 11.73H4.1L3.56 13.33ZM5.1 8.81H5.08L4.28 11.18H5.9L5.1 8.81ZM10.85 9.23V13.33H10.18V12.79H10.16C10.01 13.12 9.62 13.4 8.97 13.4C8.12 13.4 7.51 12.91 7.51 11.97V9.23H8.19V11.78C8.19 12.55 8.63 12.79 9.17 12.79C9.76 12.79 10.17 12.42 10.17 11.77V9.23H10.85ZM12.12 13.64C12.2 13.97 12.55 14.27 13.11 14.27C13.76 14.27 14.18 13.9 14.18 13.25V12.65H14.16C14 13 13.55 13.29 12.99 13.29C12.03 13.29 11.35 12.62 11.35 11.39V11.05C11.35 9.84 12.02 9.16 12.99 9.16C13.55 9.16 13.99 9.46 14.18 9.8H14.2V9.23H14.85V13.26C14.85 14.31 14.03 14.84 13.1 14.84C12.06 14.84 11.53 14.32 11.44 13.64H12.12ZM14.18 11.1C14.18 10.27 13.76 9.74 13.12 9.74C12.42 9.74 12.02 10.23 12.02 11.1V11.36C12.02 12.21 12.42 12.72 13.12 12.72C13.79 12.72 14.18 12.2 14.18 11.36V11.1ZM5 1.5C5 1.12 4.58 0.87 4.25 1.07C4.1 1.16 4 1.32 4 1.5V2H3C1.9 2 1 2.9 1 4V5H17V4C17 2.9 16.1 2 15 2H14V1.5C14 1.12 13.58 0.87 13.25 1.07C13.1 1.16 13 1.32 13 1.5V2H5V1.5Z",
|
|
75
|
-
"M6.5 1.5C6.5 1.22 6.72 1 7 1H11C11.38 1 11.63 1.42 11.43 1.75C11.34 1.9 11.18 2 11 2H10V3.07C15.33 3.84 17.83 10.1 14.5 14.33C14.21 14.7 13.89 15.03 13.54 15.33L14.35 16.15C14.63 16.42 14.5 16.88 14.13 16.98C13.96 17.03 13.77 16.98 13.65 16.85L12.72 15.93C11.61 16.63 10.32 17 9 17C7.68 17 6.39 16.63 5.28 15.93L4.35 16.85C4.08 17.13 3.62 17 3.52 16.63C3.47 16.46 3.52 16.27 3.65 16.15L4.46 15.33C0.36 11.83 1.58 5.21 6.66 3.4C7.09 3.25 7.54 3.14 8 3.07V2H7C6.72 2 6.5 1.78 6.5 1.5ZM1.86 6.39C0.41 5.12 0.87 2.76 2.69 2.14C3.65 1.81 4.72 2.09 5.39 2.86C3.87 3.63 2.63 4.87 1.86 6.39ZM14.5 2C13.75 2 13.07 2.33 12.61 2.86C14.13 3.63 15.37 4.87 16.14 6.39C17.59 5.12 17.13 2.76 15.31 2.14C15.05 2.05 14.78 2 14.5 2ZM9.5 6C9.5 5.62 9.08 5.37 8.75 5.57C8.6 5.66 8.5 5.82 8.5 6V9.88L7.05 12.78C6.88 13.12 7.14 13.52 7.52 13.5C7.71 13.49 7.87 13.39 7.95 13.22L9.45 10.22C9.48 10.15 9.5 10.08 9.5 10V6Z",
|
|
76
|
-
"M3 1H15C16.1 1 17 1.9 17 3V15C17 16.1 16.1 17 15 17H3C1.9 17 1 16.1 1 15V3C1 1.9 1.9 1 3 1ZM6.35 5.65C6.08 5.37 5.62 5.5 5.52 5.87C5.47 6.04 5.52 6.23 5.65 6.35L8.29 9L5.65 11.65C5.37 11.92 5.5 12.38 5.87 12.48C6.04 12.53 6.23 12.48 6.35 12.35L9 9.71L11.65 12.35C11.92 12.63 12.38 12.5 12.48 12.13C12.53 11.96 12.48 11.77 12.35 11.65L9.71 9L12.35 6.35C12.63 6.08 12.5 5.62 12.13 5.52C11.96 5.47 11.77 5.52 11.65 5.65L9 8.29L6.35 5.65Z",
|
|
77
|
-
"M3 5C1.9 5 1 5.9 1 7V13C1 14.1 1.9 15 3 15H15C16.1 15 17 14.1 17 13V7C17 5.9 16.1 5 15 5H13.83C13.3 5 12.79 4.79 12.41 4.41L11.59 3.59C11.21 3.21 10.7 3 10.17 3H7.83C7.3 3 6.79 3.21 6.41 3.59L5.59 4.41C5.21 4.79 4.7 5 4.17 5H3ZM11.5 9.5C11.5 7.58 9.42 6.37 7.75 7.33C6.98 7.78 6.5 8.61 6.5 9.5C6.5 11.42 8.58 12.63 10.25 11.67C11.02 11.22 11.5 10.39 11.5 9.5ZM3.5 7C3.12 7 2.87 6.58 3.07 6.25C3.16 6.1 3.32 6 3.5 6C3.88 6 4.13 6.42 3.93 6.75C3.84 6.9 3.68 7 3.5 7ZM12.5 9.5C12.5 12.19 9.58 13.88 7.25 12.53C6.17 11.91 5.5 10.75 5.5 9.5C5.5 6.81 8.42 5.12 10.75 6.47C11.83 7.09 12.5 8.25 12.5 9.5Z",
|
|
78
|
-
"M3 1C1.9 1 1 1.9 1 3V15C1 16.1 1.9 17 3 17H15C16.1 17 17 16.1 17 15V3C17 1.9 16.1 1 15 1H3ZM10.5 12H6.5C6.22 12 6 11.78 6 11.5V7.5C6 7.12 6.42 6.87 6.75 7.07C6.9 7.16 7 7.32 7 7.5V10.29L11.15 6.15C11.42 5.87 11.88 6 11.98 6.37C12.03 6.54 11.98 6.73 11.85 6.85L7.71 11H10.5C10.88 11 11.13 11.42 10.93 11.75C10.84 11.9 10.68 12 10.5 12Z",
|
|
79
|
-
"M16.98 9.51C16.6 15.66 9.71 19.08 4.58 15.68C4.27 15.47 3.98 15.25 3.71 15.01L9.21 9.51H16.99ZM3 14.3L8.5 8.8V1.03C2.35 1.41 -1.07 8.3 2.33 13.43C2.53 13.73 2.75 14.02 3 14.3ZM9.5 1.03C13.52 1.28 16.73 4.49 16.99 8.52H9.5V1.03Z",
|
|
80
|
-
"M9.66 9.66V5.66H8.34V9.66H9.65ZM9.66 12.34V11H8.34V12.34H9.65ZM9 2.34Q11.75 2.34 13.7 4.29T15.66 9T13.71 13.7T9 15.66T4.3 13.7T2.34 9T4.3 4.3T9 2.34Z"
|
|
81
|
-
],
|
|
82
|
-
length: [
|
|
83
|
-
81.67071892681327,
|
|
84
|
-
170.27898053351782,
|
|
85
|
-
103.70446684221288,
|
|
86
|
-
96.79922293172581,
|
|
87
|
-
90.7196977830866,
|
|
88
|
-
91.38021514948004,
|
|
89
|
-
93.39245633427387,
|
|
90
|
-
57.84918795039813,
|
|
91
|
-
],
|
|
92
|
-
pointAt50: [
|
|
93
|
-
{ x: 15.938953304842967, y: 8.868891726272725 },
|
|
94
|
-
{ x: 14.832293673094282, y: 15.818594853651366 },
|
|
95
|
-
{ x: 1.8808184432764348, y: 5.602539862243249 },
|
|
96
|
-
{ x: 0, y: 9.424777960769376 },
|
|
97
|
-
{ x: 10.497072046759587, y: 8.379040530375336 },
|
|
98
|
-
{ x: 12.566370614359172, y: 0},
|
|
99
|
-
{ x: 6.406410409169571, y: 0.17024392855151 },
|
|
100
|
-
{ x: 1.8274263290642496, y: 5.4591901510102145 }
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export default shapes;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
const simpleShapes = {
|
|
2
|
-
initial: [
|
|
3
|
-
'M10 10l80 80V10H50', // line
|
|
4
|
-
'M10 90C30 90 25 10 50 10s20 80 40 80s15 -80 40 -80s20 80 40 80', // cubic
|
|
5
|
-
'M10 50q15 -25 30 0t30 0t30 0t30 0t30 0t30 0', // quad
|
|
6
|
-
'M6 10a6 4 10 1 0 8 0m-8 0a6 4 10 1 1 8 0m-8 0a6 4 10 0 1 8 0m-8 0a6 4 10 0 0 8 0' // arc
|
|
7
|
-
],
|
|
8
|
-
// {translate: 15, rotate: 15, scale: 0.5}
|
|
9
|
-
normalized: [
|
|
10
|
-
"M10 10L90 90L90 10L50 10",
|
|
11
|
-
"M10 90C30 90 25 10 50 10C75 10 70 90 90 90C110 90 105 10 130 10C155 10 150 90 170 90",
|
|
12
|
-
"M10 50Q25 25 40 50Q55 75 70 50Q85 25 100 50Q115 75 130 50Q145 25 160 50Q175 75 190 50",
|
|
13
|
-
"M6 10A6 4 10 1 0 14 10M6 10A6 4 10 1 1 14 10M6 10A6 4 10 0 1 14 10M6 10A6 4 10 0 0 14 10"
|
|
14
|
-
],
|
|
15
|
-
transformed: [
|
|
16
|
-
"M18.54 6.12L46.82 55.11L57.17 16.48L37.85 11.3",
|
|
17
|
-
"M8.18 44.76C17.84 47.35 25.78 8.06 37.85 11.3S37.16 52.53 46.82 55.11S64.42 18.42 76.49 21.65S75.8 62.88 85.46 65.47",
|
|
18
|
-
"M13.36 25.44Q23.84 15.31 27.85 29.32T42.34 33.21T56.83 37.09T71.31 40.97T85.8 44.85T100.29 48.74",
|
|
19
|
-
"M16.6 5.61C14.93 6.26 15.42 8.37 17.49 9.41C19.55 10.44 21.64 9.62 21.25 7.93C21.14 7.49 20.87 7.04 20.47 6.64M16.6 5.61C15.06 4.09 15.78 2.3 17.9 2.39C20.02 2.48 21.95 4.37 21.37 5.8C21.22 6.18 20.91 6.47 20.47 6.64M16.6 5.61C17.74 5.16 19.42 5.61 20.47 6.64M16.6 5.61C17.65 6.63 19.33 7.09 20.47 6.64"
|
|
20
|
-
],
|
|
21
|
-
// {scale: [0.55,0.6,0.65]}
|
|
22
|
-
scaled3d: [
|
|
23
|
-
"M5.5 6L49.5 54V6H27.5",
|
|
24
|
-
"M5.5 54C16.5 54 13.75 6 27.5 6S38.5 54 49.5 54S57.75 6 71.5 6S82.5 54 93.5 54",
|
|
25
|
-
"M5.5 30Q13.75 15 22 30T38.5 30T55 30T71.5 30T88 30T104.5 30",
|
|
26
|
-
"M3.3 6C1.71 7.28 2.83 9.57 5.32 10.13C7.81 10.69 9.79 9.09 8.9 7.25C8.66 6.77 8.24 6.34 7.7 6M3.3 6C1.23 4.72 1.48 2.43 3.76 1.87C6.04 1.31 8.63 2.91 8.42 4.75C8.37 5.23 8.12 5.66 7.7 6M3.3 6C4.38 5.13 6.29 5.13 7.7 6M3.3 6C4.71 6.87 6.62 6.87 7.7 6"
|
|
27
|
-
],
|
|
28
|
-
// {skew: 45}
|
|
29
|
-
// {skew: [45,0]}
|
|
30
|
-
skewedX: [
|
|
31
|
-
"M20 10L180 90L100 10H60",
|
|
32
|
-
"M100 90C120 90 35 10 60 10S160 90 180 90S115 10 140 10S240 90 260 90",
|
|
33
|
-
"M60 50Q50 25 90 50T120 50T150 50T180 50T210 50T240 50",
|
|
34
|
-
"M16 10C15.24 12.13 21.11 15.95 26.56 16.88C32.01 17.81 32.96 15.15 28.26 12.09C27.03 11.29 25.55 10.56 24 10M16 10C10.1 7.87 6.74 4.05 9.96 3.12C13.17 2.19 20.54 4.85 23.22 7.91C23.93 8.71 24.2 9.44 24 10M16 10C16.52 8.56 20 8.56 24 10M16 10C20 11.44 23.48 11.44 24 10"
|
|
35
|
-
],
|
|
36
|
-
// {skew: [0,45]}
|
|
37
|
-
skewedY: [
|
|
38
|
-
"M10 20L90 180V100L50 60",
|
|
39
|
-
"M10 100C30 120 25 35 50 60S70 160 90 180S105 115 130 140S150 240 170 260",
|
|
40
|
-
"M10 60Q25 50 40 90T70 120T100 150T130 180T160 210T190 240",
|
|
41
|
-
"M6 16C3.11 15.24 5.15 21.11 9.67 26.56C14.2 32.01 17.81 32.96 16.17 28.26C15.75 27.03 14.99 25.55 14 24M6 16C2.23 10.1 2.7 6.74 6.84 9.96C10.98 13.17 15.69 20.54 15.31 23.22C15.22 23.93 14.76 24.2 14 24M6 16C7.96 16.52 11.44 20 14 24M6 16C8.56 20 12.04 23.48 14 24"
|
|
42
|
-
],
|
|
43
|
-
reversed: [
|
|
44
|
-
"M50 10H90V90L10 10",
|
|
45
|
-
"M170 90C150 90 155 10 130 10S110 90 90 90S75 10 50 10S30 90 10 90",
|
|
46
|
-
"M190 50Q175 75 160 50T130 50T100 50T70 50T40 50T10 50",
|
|
47
|
-
"M14 10A6 4 10 1 1 6 10M14 10A6 4 10 1 0 6 10M14 10A6 4 10 0 0 6 10M14 10A6 4 10 0 1 6 10"
|
|
48
|
-
],
|
|
49
|
-
length: [
|
|
50
|
-
233.1370849898476,
|
|
51
|
-
379.0289739091177,
|
|
52
|
-
244.25352263349316,
|
|
53
|
-
63.11262433473098,
|
|
54
|
-
],
|
|
55
|
-
pointAt0: [
|
|
56
|
-
{ "x": 10, "y": 10 },
|
|
57
|
-
{ "x": 10, "y": 90 },
|
|
58
|
-
{ "x": 10, "y": 50 },
|
|
59
|
-
{ "x": 6, "y": 10 }
|
|
60
|
-
],
|
|
61
|
-
pointAt400: [
|
|
62
|
-
{ x: 50, y: 10 },
|
|
63
|
-
{ x: 170, y: 90 },
|
|
64
|
-
{ x: 190, y: 50 },
|
|
65
|
-
{ x: 14, y: 10 }
|
|
66
|
-
],
|
|
67
|
-
pointAt50: [
|
|
68
|
-
{ x: 45.35533905932737, y: 45.35533905932737 },
|
|
69
|
-
{ x: 28.85808806500117, y: 46.6836898667648 },
|
|
70
|
-
{ x: 46.84696090751847, y: 58.807108530914896 },
|
|
71
|
-
{ x: 7.697454886004856, y: 9.193767828563768 }
|
|
72
|
-
]
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export default simpleShapes;
|
package/test/static.test.ts
DELETED
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
import { expect, it, describe, beforeEach, vi } from 'vitest';
|
|
2
|
-
import SVGPathCommander, { PathArray, type CurveArray, type ShapeTypes } from '~/index';
|
|
3
|
-
import invalidPathValue from '../src/parser/invalidPathValue';
|
|
4
|
-
import error from '../src/parser/error';
|
|
5
|
-
|
|
6
|
-
import getMarkup from './fixtures/getMarkup';
|
|
7
|
-
import simpleShapes from './fixtures/simpleShapes';
|
|
8
|
-
import shapes from './fixtures/shapes';
|
|
9
|
-
import shapeObjects from './fixtures/shapeObjects';
|
|
10
|
-
|
|
11
|
-
import "../docs/assets/style.css";
|
|
12
|
-
|
|
13
|
-
describe('SVGPathCommander Static Methods', () => {
|
|
14
|
-
const wrapper = document.createElement('div');
|
|
15
|
-
document.body.append(wrapper);
|
|
16
|
-
|
|
17
|
-
beforeEach(async () => {
|
|
18
|
-
wrapper.innerHTML = '';
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('Convert shape to path with incomplete values should return false', () => {
|
|
22
|
-
['line', 'circle', 'ellipse', 'rect', 'polygon', 'polyline', 'glyph'].forEach((SHAPE) => {
|
|
23
|
-
// @ts-expect-error
|
|
24
|
-
expect(SVGPathCommander.shapeToPath({ type: SHAPE, fill: 'red' }), `${SHAPE} with no specific attributes`).to.be.false;
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('Convert shape to pathArray with incomplete values should return false', () => {
|
|
29
|
-
['line', 'circle', 'ellipse', 'rect', 'polygon', 'polyline', 'glyph'].forEach((SHAPE) => {
|
|
30
|
-
// @ts-expect-error
|
|
31
|
-
expect(SVGPathCommander.shapeToPathArray({ type: SHAPE, fill: 'red' }), `${SHAPE} with no specific attributes`).to.be.false;
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
['wombat', 'line', 'circle', 'ellipse', 'rect', 'polygon', 'polyline', 'glyph', 'path'].forEach((SHAPE) => {
|
|
36
|
-
it(`Convert <${SHAPE}> to path`, async () => {
|
|
37
|
-
wrapper.append(getMarkup());
|
|
38
|
-
await vi.waitFor(() => wrapper.querySelector('svg') as SVGElement, { timeout: 200 });
|
|
39
|
-
const svg = await vi.waitFor(() => wrapper.querySelector('svg') as SVGElement, { timeout: 200 });
|
|
40
|
-
svg.setAttribute('viewBox', '0 0 182 72');
|
|
41
|
-
svg.innerHTML = `<line id="line" x1="0" y1="0" x2="182" y2="72" stroke="turquoise" stroke-width="2" />
|
|
42
|
-
<circle id="circle" cx="27.5" cy="36.9" r="23.5" fill="orangered"/>
|
|
43
|
-
<ellipse id="ellipse" cx="68.3" cy="37" rx="15.1" fill="darkorange"/>
|
|
44
|
-
<wombat id="wombat" fill="black"/>
|
|
45
|
-
<polygon id="polygon" points="107.4,13 113.7,28.8 127.9,31.3 117.6,43.5 120.1,60.8 107.4,52.6 94.6,60.8 97.1,43.5 86.8,31.3 101,28.8" fill="yellow"/>
|
|
46
|
-
<polyline id="polyline" points="107.39,17.78 112.43,30.42 123.79,32.42 115.55,42.18 117.55,56.02 107.39,49.46 97.15,56.02 99.15,42.18 90.91,32.42 102.27,30.42" fill="none" stroke="black" stroke-width="2"/>
|
|
47
|
-
<rect id="rect" x="131" y="13.2" width="47.5" height="47.6" rx="25" fill="yellowgreen"/>
|
|
48
|
-
<path id="path" d="M143.5 22.72H166s3 0 3 3v22.56s0 3 -3 3h-22.5s-3 0 -3 -3V25.72s0 -3 3 -3" fill="rgba(255,255,255,0.3)"/>
|
|
49
|
-
<glyph id="glyph" d="M143.5 22.72H166s3 0 3 3v22.56s0 3 -3 3h-22.5s-3 0 -3 -3V25.72s0 -3 3 -3" fill="rgba(255,255,255,0.3)"/>`;
|
|
50
|
-
|
|
51
|
-
const shape = await vi.waitFor(() => wrapper.querySelector(SHAPE) as SVGElement, { timeout: 200 });
|
|
52
|
-
if (SHAPE === 'wombat') {
|
|
53
|
-
try {
|
|
54
|
-
SVGPathCommander.shapeToPathArray(shape as unknown as SVGCircleElement, shape.ownerDocument);
|
|
55
|
-
} catch (er) {
|
|
56
|
-
expect(er).to.be.instanceOf(TypeError);
|
|
57
|
-
expect(er).to.have.property('message', `${error}: "${SHAPE}" is not SVGElement`);
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
SVGPathCommander.shapeToPath(shape as unknown as SVGCircleElement, true, shape.ownerDocument);
|
|
61
|
-
} catch (er) {
|
|
62
|
-
expect(er).to.be.instanceOf(TypeError);
|
|
63
|
-
expect(er).to.have.property('message', `${error}: "${SHAPE}" is not SVGElement`);
|
|
64
|
-
}
|
|
65
|
-
} else if (SHAPE === 'path') {
|
|
66
|
-
try {
|
|
67
|
-
SVGPathCommander.shapeToPath(shape as unknown as SVGCircleElement, true, shape.ownerDocument);
|
|
68
|
-
} catch (er) {
|
|
69
|
-
expect(er).to.be.instanceOf(TypeError);
|
|
70
|
-
expect(er).to.have.property('message', `${error}: "${SHAPE}" is already SVGPathElement`);
|
|
71
|
-
}
|
|
72
|
-
} else {
|
|
73
|
-
SVGPathCommander.shapeToPath(shape as unknown as ShapeTypes, true, shape.ownerDocument);
|
|
74
|
-
expect(svg.querySelector(SHAPE)).to.not.exist;
|
|
75
|
-
expect(svg.querySelector(`#${SHAPE}`)).to.exist;
|
|
76
|
-
expect(svg.querySelector(`#${SHAPE}`)?.getAttribute('d')).to.have.length.greaterThan(0);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
shapeObjects.forEach((SHAPE) => {
|
|
82
|
-
it(`Convert "${SHAPE.type}" Object to pathArray`, () => {
|
|
83
|
-
expect(SVGPathCommander.shapeToPathArray(SHAPE as unknown as ShapeTypes)).to.have.length.greaterThan(0);
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
it(`Convert <wombat> Object to pathArray should throw error`, () => {
|
|
88
|
-
try {
|
|
89
|
-
SVGPathCommander.shapeToPathArray({ type: 'wombat', fill: 'red' } as unknown as ShapeTypes)
|
|
90
|
-
} catch (er) {
|
|
91
|
-
expect(er).to.be.instanceOf(TypeError);
|
|
92
|
-
expect(er).to.have.property('message', `${error}: "wombat" is not SVGElement`);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
shapeObjects.forEach((SHAPE) => {
|
|
97
|
-
it(`Convert "${SHAPE.type}" Object to path`, async () => {
|
|
98
|
-
wrapper.append(getMarkup());
|
|
99
|
-
await vi.waitFor(() => wrapper.querySelector('svg') as SVGElement, { timeout: 200 });
|
|
100
|
-
const svg = await vi.waitFor(() => wrapper.querySelector('svg') as SVGElement, { timeout: 200 });
|
|
101
|
-
svg.setAttribute('viewBox', '0 0 182 72');
|
|
102
|
-
|
|
103
|
-
svg.append(SVGPathCommander.shapeToPath(SHAPE as unknown as ShapeTypes) as SVGPathElement);
|
|
104
|
-
const shape = svg.querySelector(`#${SHAPE.type}`);
|
|
105
|
-
expect(shape).to.exist;
|
|
106
|
-
expect(shape?.getAttribute('d')).to.have.length.greaterThan(0);
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
simpleShapes.normalized.forEach((SHAPE, i) => {
|
|
111
|
-
it(`Can do optimizePath #${i}`, () => {
|
|
112
|
-
const path = new SVGPathCommander(SHAPE);
|
|
113
|
-
|
|
114
|
-
expect(path.optimize().toString()).to.equal(simpleShapes.initial[i]);
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
it(`Can disable round, use a given decimal amount or revert back to default round option`, () => {
|
|
119
|
-
const sample = [["M", 0, 0], ["L", 181.99955, 0], ["L", 91, 72], ["L", 0, 0], ["Z"]] as PathArray;
|
|
120
|
-
const rounded = [["M", 0, 0], ["L", 181.9996, 0], ["L", 91, 72], ["L", 0, 0], ["Z"]] as PathArray;
|
|
121
|
-
|
|
122
|
-
expect(SVGPathCommander.roundPath(sample, 4), `can use number setting`).to.deep.equal(rounded);
|
|
123
|
-
expect(SVGPathCommander.roundPath(sample, 'off'), `can use "off" setting`).to.deep.equal(sample);
|
|
124
|
-
expect(SVGPathCommander.roundPath(sample, -1), `use 4 decimals when negative number is provided`).to.deep.equal(rounded);
|
|
125
|
-
// @ts-expect-error
|
|
126
|
-
expect(SVGPathCommander.roundPath(sample, 'wombat'), `use 4 decimals when string is provided`).to.deep.equal(rounded);
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
it(`Can do reverseCurve`, () => {
|
|
130
|
-
const path = new SVGPathCommander(simpleShapes.normalized[1]);
|
|
131
|
-
const pathReversed = new SVGPathCommander(simpleShapes.normalized[1]).reverse();
|
|
132
|
-
const reversed = [["M", 170, 90], ["C", 150, 90, 155, 10, 130, 10], ["C", 105, 10, 110, 90, 90, 90], ["C", 70, 90, 75, 10, 50, 10], ["C", 25, 10, 30, 90, 10, 90]];
|
|
133
|
-
|
|
134
|
-
expect(pathReversed.segments).to.deep.equal(reversed);
|
|
135
|
-
expect(SVGPathCommander.reverseCurve(pathReversed.segments as CurveArray)).to.deep.equal(path.segments);
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
it(`Can do reversePath`, () => {
|
|
139
|
-
const path = new SVGPathCommander(simpleShapes.normalized[2]);
|
|
140
|
-
const pathReversed = new SVGPathCommander(simpleShapes.normalized[2]).reverse();
|
|
141
|
-
const reversed = [["M", 190, 50], ["Q", 175, 75, 160, 50], ["Q", 145, 25, 130, 50], ["Q", 115, 75, 100, 50], ["Q", 85, 25, 70, 50], ["Q", 55, 75, 40, 50], ["Q", 25, 25, 10, 50]];
|
|
142
|
-
|
|
143
|
-
expect(pathReversed.segments).to.deep.equal(reversed);
|
|
144
|
-
expect(SVGPathCommander.reversePath(pathReversed.segments)).to.deep.equal(path.segments);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it(`Can transformPath with arc segments`, () => {
|
|
148
|
-
const { transformPath, pathToString, reversePath } = SVGPathCommander;
|
|
149
|
-
|
|
150
|
-
// This test assumes **SVGPathCommander** static method can work with default
|
|
151
|
-
// transform origin *{0,0,0}* when no origin is provided in the **transformObject**.
|
|
152
|
-
// The test also shows how Arc segments are converted to CubicBezier for transformation.
|
|
153
|
-
const path = pathToString(transformPath(simpleShapes.initial[3], { rotate: 45 }));
|
|
154
|
-
expect(path).to.equal('M-2.8284 11.3137C-6.3778 10.7769 -7.6385 14.9238 -5.0977 18.7783C-2.5569 22.6327 1.8798 23.3038 2.8884 19.9862C3.153 19.1158 3.1321 18.0645 2.8284 16.9706M-2.8284 11.3137C-3.9859 7.1438 -0.9528 4.7691 2.631 7.0393C6.2148 9.3095 7.6616 14.5219 5.2352 16.4216C4.5986 16.92 3.7596 17.1114 2.8284 16.9706M-2.8284 11.3137C-0.4208 11.6779 2.0433 14.1419 2.8284 16.9706M-2.8284 11.3137C-2.0433 14.1423 0.4208 16.6064 2.8284 16.9706');
|
|
155
|
-
|
|
156
|
-
const path1 = pathToString(transformPath(simpleShapes.initial[3], { rotate: -45 }));
|
|
157
|
-
expect(path1).to.equal('M11.3137 2.8284C10.7769 6.3778 14.9238 7.6385 18.7783 5.0977C22.6327 2.5569 23.3038 -1.8798 19.9862 -2.8884C19.1158 -3.153 18.0645 -3.1321 16.9706 -2.8284M11.3137 2.8284C7.1438 3.9859 4.7691 0.9528 7.0393 -2.631C9.3095 -6.2148 14.5219 -7.6616 16.4216 -5.2352C16.92 -4.5986 17.1114 -3.7596 16.9706 -2.8284M11.3137 2.8284C11.6779 0.4208 14.1419 -2.0433 16.9706 -2.8284M11.3137 2.8284C14.1423 2.0433 16.6064 -0.4208 16.9706 -2.8284');
|
|
158
|
-
|
|
159
|
-
// @ts-expect-error
|
|
160
|
-
const path2 = pathToString(transformPath(reversePath(simpleShapes.initial[3]), { rotate: 45 }));
|
|
161
|
-
expect(path2).to.equal('M2.8284 16.9706C0.4208 16.6064 -2.0433 14.1423 -2.8284 11.3137M2.8284 16.9706C2.0433 14.1419 -0.4208 11.6779 -2.8284 11.3137M2.8284 16.9706C6.3778 17.5074 7.6385 13.3604 5.0977 9.506C2.5569 5.6516 -1.8798 4.9805 -2.8884 8.2981C-3.153 9.1684 -3.1321 10.2198 -2.8284 11.3137M2.8284 16.9706C3.9859 21.1405 0.9528 23.5152 -2.631 21.245C-6.2148 18.9748 -7.6616 13.7624 -5.2352 11.8626C-4.5986 11.3642 -3.7596 11.1729 -2.8284 11.3137');
|
|
162
|
-
|
|
163
|
-
// @ts-expect-error
|
|
164
|
-
const path3 = pathToString(transformPath(reversePath(simpleShapes.initial[3]), { rotate: -45 }));
|
|
165
|
-
expect(path3).to.equal('M16.9706 -2.8284C16.6064 -0.4208 14.1423 2.0433 11.3137 2.8284M16.9706 -2.8284C14.1419 -2.0433 11.6779 0.4208 11.3137 2.8284M16.9706 -2.8284C17.5074 -6.3778 13.3604 -7.6385 9.506 -5.0977C5.6516 -2.5569 4.9805 1.8798 8.2981 2.8884C9.1684 3.153 10.2198 3.1321 11.3137 2.8284M16.9706 -2.8284C21.1405 -3.9859 23.5152 -0.9528 21.245 2.631C18.9748 6.2148 13.7624 7.6616 11.8626 5.2352C11.3642 4.5986 11.1729 3.7596 11.3137 2.8284');
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
it(`Can do getPropertiesAtLength`, () => {
|
|
169
|
-
try {
|
|
170
|
-
SVGPathCommander.getPropertiesAtLength('M16.9706 -2.8284A4 6 89.5025 0 1 11.3137 2.8284M', 50);
|
|
171
|
-
} catch (er) {
|
|
172
|
-
expect(er).to.be.instanceOf(TypeError);
|
|
173
|
-
expect(er).to.have.property('message', `${error}: ${invalidPathValue} at index 48, "pathValue" is missing param`);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
const props0 = SVGPathCommander.getPropertiesAtLength(simpleShapes.initial[0], 0);
|
|
177
|
-
// cy.log(props50)
|
|
178
|
-
expect(props0.index).to.equal(0)
|
|
179
|
-
expect(props0.lengthAtSegment).to.equal(0)
|
|
180
|
-
expect(props0.segment).to.deep.equal(["M", 10, 10])
|
|
181
|
-
|
|
182
|
-
const props50 = SVGPathCommander.getPropertiesAtLength(simpleShapes.initial[0], 50);
|
|
183
|
-
// cy.log(props50)
|
|
184
|
-
expect(props50.index).to.equal(1)
|
|
185
|
-
expect(props50.lengthAtSegment).to.equal(0)
|
|
186
|
-
expect(props50.segment).to.deep.equal(['l', 80, 80])
|
|
187
|
-
|
|
188
|
-
const props400 = SVGPathCommander.getPropertiesAtLength(simpleShapes.initial[0], 400);
|
|
189
|
-
// cy.log(props50)
|
|
190
|
-
expect(props400.index).to.equal(3)
|
|
191
|
-
expect(props400.lengthAtSegment).to.equal(193.1370849898476)
|
|
192
|
-
expect(props400.segment).to.deep.equal(['H', 50])
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
it(`Can do getPropertiesAtPoint`, () => {
|
|
196
|
-
const { getPropertiesAtPoint } = SVGPathCommander;
|
|
197
|
-
|
|
198
|
-
// getPropertiesAtPoint first point
|
|
199
|
-
const propsPoint0 = getPropertiesAtPoint(simpleShapes.initial[1], { "x": 10, "y": 90 });
|
|
200
|
-
expect(propsPoint0.closest).to.deep.equal({ x: 10, y: 90 });
|
|
201
|
-
expect(propsPoint0.distance).to.equal(0);
|
|
202
|
-
expect(propsPoint0.segment).to.deep.equal({ segment: ["M", 10, 90], index: 0, length: 0, lengthAtSegment: 0 })
|
|
203
|
-
|
|
204
|
-
// getPropertiesAtPoint mid point
|
|
205
|
-
const propsPoint50 = getPropertiesAtPoint(simpleShapes.initial[1], { x: 30.072453006153214, y: 41.42818552481854 });
|
|
206
|
-
expect(propsPoint50.closest).to.deep.equal({ x: 30.072383912322863, y: 41.42816186159437 })
|
|
207
|
-
expect(propsPoint50.distance).to.equal(0.00007303359207048124)
|
|
208
|
-
expect(propsPoint50.segment).to.deep.equal({ segment: ['C', 30, 90, 25, 10, 50, 10], index: 1, length: 94.75724347727943, lengthAtSegment: 0 })
|
|
209
|
-
|
|
210
|
-
// getPropertiesAtPoint last point
|
|
211
|
-
const propsPoint400 = getPropertiesAtPoint(simpleShapes.initial[1], { "x": 50, "y": 10 });
|
|
212
|
-
expect(propsPoint400.closest).to.deep.equal({ x: 50.000003520199236, y: 10.000000000000531 })
|
|
213
|
-
expect(propsPoint400.distance).to.equal(0.0000035201992361067316)
|
|
214
|
-
expect(propsPoint400.segment).to.deep.equal({ segment: ['s', 20, 80, 40, 80], index: 2, length: 94.75724347727943, lengthAtSegment: 94.75724347727943 })
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
it(`Can do getSegmentAtLength`, () => {
|
|
218
|
-
const { getSegmentAtLength } = SVGPathCommander;
|
|
219
|
-
expect(getSegmentAtLength(simpleShapes.initial[1])).to.deep.equal(['M', 10, 90]);
|
|
220
|
-
expect(getSegmentAtLength(simpleShapes.initial[1], 0)).to.deep.equal(['M', 10, 90]);
|
|
221
|
-
expect(getSegmentAtLength(simpleShapes.initial[3], 15)).to.deep.equal(['a', 6, 4, 10, 1, 0, 8, 0]);
|
|
222
|
-
expect(getSegmentAtLength(simpleShapes.initial[3], 400)).to.deep.equal(['a', 6, 4, 10, 0, 0, 8, 0]);
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
it(`Can do getSegmentOfPoint`, () => {
|
|
226
|
-
const { getSegmentOfPoint } = SVGPathCommander;
|
|
227
|
-
// first point
|
|
228
|
-
expect(getSegmentOfPoint(simpleShapes.initial[1], { x: 10, y: 90 })).to.deep.equal({ segment: ["M", 10, 90], index: 0, length: 0, lengthAtSegment: 0 });
|
|
229
|
-
// mid point
|
|
230
|
-
expect(getSegmentOfPoint(simpleShapes.initial[3], { x: 9, y: 9 })).to.deep.equal({ segment: ["a", 6, 4, 10, 0, 1, 8, 0], index: 5, length: 7.498916687913066,/* point: { x: 6, y: 10 },*/ lengthAtSegment: 48.11479095890485 });
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
it(`Can do getClosestPoint`, () => {
|
|
234
|
-
const { getClosestPoint } = SVGPathCommander;
|
|
235
|
-
// first point
|
|
236
|
-
expect(getClosestPoint(simpleShapes.initial[1], { x: 10, y: 90 })).to.deep.equal({ x: 10, y: 90 });
|
|
237
|
-
// mid point
|
|
238
|
-
expect(getClosestPoint(simpleShapes.initial[3], { x: 9, y: 9 })).to.deep.equal({ x: 8.995511191469355, y: 8.952970323068374 });
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
it(`Can do isPointInStroke`, () => {
|
|
242
|
-
const { isPointInStroke } = SVGPathCommander;
|
|
243
|
-
// first point
|
|
244
|
-
expect(isPointInStroke(simpleShapes.initial[1], { x: 10, y: 90 })).to.be.true;
|
|
245
|
-
// mid point'
|
|
246
|
-
// expect(isPointInStroke(simpleShapes.initial[1], { x: 28.94438057441916, y: 46.29922469345143 })).to.be.true;
|
|
247
|
-
expect(isPointInStroke(simpleShapes.initial[1], { x: 90, y: 90 })).to.be.true;
|
|
248
|
-
// ({ x: 10, y: 10 })
|
|
249
|
-
expect(isPointInStroke(simpleShapes.initial[1], { x: 10, y: 10 })).to.be.false;
|
|
250
|
-
// ({ x: 45.355339, y: 45.355339 })
|
|
251
|
-
expect(isPointInStroke(simpleShapes.initial[1], { x: 45.355339, y: 45.355339 })).to.be.false;
|
|
252
|
-
// ({ x: 50, y: 10 })
|
|
253
|
-
expect(isPointInStroke(simpleShapes.initial[1], { x: 50, y: 10 })).to.be.true;
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
it(`Can do getDrawDirection`, () => {
|
|
257
|
-
const { getDrawDirection } = SVGPathCommander;
|
|
258
|
-
expect(getDrawDirection(simpleShapes.reversed[1])).to.be.true;
|
|
259
|
-
expect(getDrawDirection(simpleShapes.initial[1])).to.be.false;
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
it(`Can do splitCubic`, () => {
|
|
263
|
-
const { splitCubic } = SVGPathCommander;
|
|
264
|
-
expect(splitCubic([70, 60, 70, 80, 110, 80, 110, 60])).to.deep.equal([
|
|
265
|
-
['C', 70, 70, 80, 75, 90, 75],
|
|
266
|
-
['C', 100, 75, 110, 70, 110, 60],
|
|
267
|
-
]);
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
it(`Can do polygonLength`, () => {
|
|
271
|
-
const { polygonTools } = SVGPathCommander;
|
|
272
|
-
expect(polygonTools.polygonLength([[100, 100], [150, 25], [150, 75], [200, 0]])).to.equal(230.27756377319946);
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
it(`Can do polygonArea`, () => {
|
|
276
|
-
const { polygonTools } = SVGPathCommander;
|
|
277
|
-
expect(polygonTools.polygonArea([[107.4, 13], [113.7, 28.8], [127.9, 31.3], [117.6, 43.5], [120.1, 60.8], [107.4, 52.6], [94.6, 60.8], [97.1, 43.5], [86.8, 31.3], [101, 28.8]])).to.equal(-836.69);
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
it(`Can do transformPath with empty object`, () => {
|
|
281
|
-
const { transformPath, pathToString } = SVGPathCommander;
|
|
282
|
-
const path = pathToString(transformPath(simpleShapes.normalized[0] as string));
|
|
283
|
-
expect(path).to.equal(simpleShapes.normalized[0]);
|
|
284
|
-
const path1 = pathToString(transformPath(simpleShapes.normalized[0], {}));
|
|
285
|
-
expect(path1).to.equal(simpleShapes.normalized[0]);
|
|
286
|
-
const path2 = pathToString(transformPath(simpleShapes.normalized[0], { origin: [0, 0, 0] }));
|
|
287
|
-
expect(path2).to.equal(simpleShapes.normalized[0]);
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
it(`Can check path type`, () => {
|
|
291
|
-
const { parsePathString, isPathArray, isCurveArray, isAbsoluteArray, isRelativeArray, isNormalizedArray } = SVGPathCommander;
|
|
292
|
-
// const
|
|
293
|
-
expect(isPathArray(simpleShapes.initial[0])).to.be.false;
|
|
294
|
-
expect(isPathArray(parsePathString(simpleShapes.initial[0]))).to.be.true;
|
|
295
|
-
expect(isAbsoluteArray(simpleShapes.normalized[0])).to.be.false;
|
|
296
|
-
expect(isAbsoluteArray(parsePathString(simpleShapes.normalized[0]))).to.be.true;
|
|
297
|
-
expect(isRelativeArray(shapes.relative[7])).to.be.false;
|
|
298
|
-
// console.log(parsePathString(shapes.relative[7]))
|
|
299
|
-
expect(isRelativeArray(parsePathString(shapes.relative[7]))).to.be.true;
|
|
300
|
-
expect(isNormalizedArray(simpleShapes.normalized[0])).to.be.false;
|
|
301
|
-
expect(isNormalizedArray(parsePathString(simpleShapes.normalized[0]))).to.be.true;
|
|
302
|
-
expect(isCurveArray(simpleShapes.normalized[1])).to.be.false;
|
|
303
|
-
expect(isCurveArray(parsePathString(simpleShapes.normalized[1]))).to.be.true;
|
|
304
|
-
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
it(`Can cover all remaining branches`, () => {
|
|
308
|
-
const { splitPath, pathToString, optimizePath, parsePathString, getPathBBox, getPointAtLength, getTotalLength } = SVGPathCommander;
|
|
309
|
-
expect(getPointAtLength(simpleShapes.normalized[3], 24.057395479452424)).to.deep.equal({ x: 14, y: 10 });
|
|
310
|
-
expect(getPointAtLength(simpleShapes.normalized[0], 0)).to.deep.equal({ x: 10, y: 10 });
|
|
311
|
-
expect(getPointAtLength(simpleShapes.normalized[3], undefined)).to.deep.equal({ x: 6, y: 10 });
|
|
312
|
-
expect(getTotalLength(simpleShapes.normalized[0])).to.be.above(233);
|
|
313
|
-
expect(getPathBBox(simpleShapes.normalized[2])).to.deep.equal({
|
|
314
|
-
"cx": 100, "cy": 50, "cz": 192.5,
|
|
315
|
-
"height": 25, "width": 180,
|
|
316
|
-
"x": 10, "y": 37.5, "x2": 190, "y2": 62.5,
|
|
317
|
-
});
|
|
318
|
-
expect(getPathBBox(simpleShapes.normalized[1])).to.deep.equal({
|
|
319
|
-
"cx": 90, "cy": 50, "cz": 200,
|
|
320
|
-
"height": 80, "width": 160,
|
|
321
|
-
"x": 10, "y": 10, "x2": 170,"y2": 90,
|
|
322
|
-
});
|
|
323
|
-
expect(splitPath(parsePathString(shapes.relative[1])).length).to.equal(7);
|
|
324
|
-
expect(pathToString(optimizePath(parsePathString(
|
|
325
|
-
// 'M10 50q15 -25 30 0Q55 75 70 50Q85 25 100 50T130 50Q145 25 160 50t30 0'
|
|
326
|
-
simpleShapes.normalized[2]
|
|
327
|
-
), 2))).to.equal(simpleShapes.initial[2]);
|
|
328
|
-
// M10 50q15 -25 30 0t30 0t30 0t30 0t30 0t30 0
|
|
329
|
-
});
|
|
330
|
-
});
|
package/vite.config.mts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import { resolve } from 'path';
|
|
3
|
-
import { defineConfig } from 'vite';
|
|
4
|
-
import { name } from './package.json';
|
|
5
|
-
|
|
6
|
-
const getPackageName = () => {
|
|
7
|
-
return name.includes('@') ? name.split('/')[1] : name;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const NAME = 'SVGPathCommander';
|
|
11
|
-
|
|
12
|
-
const fileName = {
|
|
13
|
-
es: `${getPackageName()}.mjs`,
|
|
14
|
-
cjs: `${getPackageName()}.cjs`,
|
|
15
|
-
iife: `${getPackageName()}.js`,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default defineConfig({
|
|
19
|
-
base: './',
|
|
20
|
-
resolve: {
|
|
21
|
-
alias: {
|
|
22
|
-
"~": resolve(__dirname, "src"),
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
build: {
|
|
26
|
-
emptyOutDir: true,
|
|
27
|
-
outDir: 'dist',
|
|
28
|
-
lib: {
|
|
29
|
-
entry: resolve(__dirname, 'src/index.ts'),
|
|
30
|
-
name: NAME,
|
|
31
|
-
formats: ['es', 'cjs', 'iife'],
|
|
32
|
-
fileName: (format: string) => fileName[format],
|
|
33
|
-
},
|
|
34
|
-
sourcemap: true,
|
|
35
|
-
reportCompressedSize: true,
|
|
36
|
-
},
|
|
37
|
-
esbuild: {
|
|
38
|
-
legalComments: 'none'
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
package/vitest.config-ui.mts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vitest/config";
|
|
2
|
-
import { resolve } from 'node:path';
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
resolve: {
|
|
6
|
-
alias: {
|
|
7
|
-
"~": resolve(__dirname, "src"),
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
test: {
|
|
11
|
-
css: true,
|
|
12
|
-
globals: true,
|
|
13
|
-
coverage: {
|
|
14
|
-
provider: "istanbul",
|
|
15
|
-
reporter: ["html", "text", "lcov"],
|
|
16
|
-
enabled: true,
|
|
17
|
-
include: ["src/**/*.{ts,tsx}"],
|
|
18
|
-
},
|
|
19
|
-
browser: {
|
|
20
|
-
// provider: 'webdriverio', // or 'webdriverio'
|
|
21
|
-
enabled: true,
|
|
22
|
-
headless: false,
|
|
23
|
-
name: 'chromium', // browser name is required
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
});
|