flo-mat 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browser/index.js CHANGED
@@ -11,226 +11,6 @@ var FloMat;
11
11
  /******/ "use strict";
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/debug/debug.js":
15
- /*!****************************************************************************!*\
16
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/debug/debug.js ***!
17
- \****************************************************************************/
18
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
19
-
20
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst draw_fs_1 = __webpack_require__(/*! ../draw-fs */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw-fs.js\");\r\n/**\r\n * Returns a new debug object by spreading boolean operation debug information\r\n * onto the given (possibly undefined) debug object.\r\n * @param debug a (possibly undefined) debug object\r\n */\r\nfunction enableDebugDrawFs(debugOn) {\r\n if (!debugOn) {\r\n return;\r\n }\r\n let debug = window._debug_;\r\n debug = Object.assign(Object.assign({}, debug), { fs: Object.assign(Object.assign({}, debug === null || debug === void 0 ? void 0 : debug.fs), { draw: Object.assign({}, draw_fs_1.drawFs) }) });\r\n window._debug_ = debug;\r\n}\r\nexports.enableDebugDrawFs = enableDebugDrawFs;\r\n//# sourceMappingURL=debug.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/debug/debug.js?");
21
-
22
- /***/ }),
23
-
24
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw-fs.js":
25
- /*!************************************************************************!*\
26
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw-fs.js ***!
27
- \************************************************************************/
28
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
29
-
30
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst circle_1 = __webpack_require__(/*! ./draw/circle */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/circle.js\");\r\nconst cross_hair_1 = __webpack_require__(/*! ./draw/cross-hair */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cross-hair.js\");\r\nconst dot_1 = __webpack_require__(/*! ./draw/dot */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/dot.js\");\r\nconst line_1 = __webpack_require__(/*! ./draw/line */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/line.js\");\r\nconst rect_1 = __webpack_require__(/*! ./draw/rect */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/rect.js\");\r\nconst polygon_1 = __webpack_require__(/*! ./draw/polygon */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/polygon.js\");\r\nconst loop_1 = __webpack_require__(/*! ./draw/loop */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/loop.js\");\r\nconst polyline_1 = __webpack_require__(/*! ./draw/polyline */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/polyline.js\");\r\nconst beziers_1 = __webpack_require__(/*! ./draw/beziers */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/beziers.js\");\r\nconst cubic_bezier_1 = __webpack_require__(/*! ./draw/cubic-bezier */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cubic-bezier.js\");\r\nconst bezier_1 = __webpack_require__(/*! ./draw/bezier */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier.js\");\r\nconst bezier_piece_1 = __webpack_require__(/*! ./draw/bezier-piece */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier-piece.js\");\r\nconst quad_bezier_1 = __webpack_require__(/*! ./draw/quad-bezier */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/quad-bezier.js\");\r\nconst text_1 = __webpack_require__(/*! ./draw/text */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/text.js\");\r\nlet drawFs = {\r\n circle: circle_1.circle,\r\n crossHair: cross_hair_1.crossHair,\r\n dot: dot_1.dot,\r\n line: line_1.line,\r\n rect: rect_1.rect,\r\n beziers: beziers_1.beziers,\r\n bezier: bezier_1.bezier,\r\n bezierPiece: bezier_piece_1.bezierPiece,\r\n quadBezier: quad_bezier_1.quadBezier,\r\n cubicBezier: cubic_bezier_1.cubicBezier,\r\n polygon: polygon_1.polygon,\r\n loop: loop_1.loop,\r\n polyline: polyline_1.polyline,\r\n text: text_1.text\r\n};\r\nexports.drawFs = drawFs;\r\n//# sourceMappingURL=draw-fs.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw-fs.js?");
31
-
32
- /***/ }),
33
-
34
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier-from-bezier-piece.js":
35
- /*!**********************************************************************************************!*\
36
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier-from-bezier-piece.js ***!
37
- \**********************************************************************************************/
38
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
39
-
40
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst evaluate_bezier_1 = __webpack_require__(/*! ./evaluate-bezier */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/evaluate-bezier.js\");\r\nconst split_at_1 = __webpack_require__(/*! ./split-at */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/split-at.js\");\r\n/**\r\n * Returns a new bezier from the given bezier by limiting its t range.\r\n *\r\n * Duplicated here so we don't circularly depend on flo-bezier.\r\n *\r\n * Uses de Casteljau's algorithm.\r\n *\r\n * @param ps a bezier\r\n * @param tRange a t range\r\n */\r\nfunction bezierFromBezierPiece(ps, tRange) {\r\n // If tRange = [0,1] then return original bezier.\r\n if (tRange[0] === 0 && tRange[1] === 1) {\r\n return ps;\r\n }\r\n // If tRange[0] === tRange[1] then return a single point degenerated bezier.\r\n if (tRange[0] === tRange[1]) {\r\n let p = evaluate_bezier_1.evaluateBezier(ps, tRange[0]);\r\n return [p, p, p, p];\r\n }\r\n if (tRange[0] === 0) {\r\n return split_at_1.splitAt(ps, tRange[1])[0];\r\n }\r\n if (tRange[1] === 1) {\r\n return split_at_1.splitAt(ps, tRange[0])[1];\r\n }\r\n // At this stage we know the t range is not degenerate and tRange[0] !== 0 \r\n // and tRange[1] !== 1\r\n return split_at_1.splitAt(split_at_1.splitAt(ps, tRange[0])[1], (tRange[1] - tRange[0]) / (1 - tRange[0]))[0];\r\n}\r\nexports.bezierFromBezierPiece = bezierFromBezierPiece;\r\n//# sourceMappingURL=bezier-from-bezier-piece.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier-from-bezier-piece.js?");
41
-
42
- /***/ }),
43
-
44
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier-piece.js":
45
- /*!**********************************************************************************!*\
46
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier-piece.js ***!
47
- \**********************************************************************************/
48
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
49
-
50
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst cross_hair_1 = __webpack_require__(/*! ./cross-hair */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cross-hair.js\");\r\nconst bezier_1 = __webpack_require__(/*! ./bezier */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier.js\");\r\nconst evaluate_bezier_1 = __webpack_require__(/*! ./evaluate-bezier */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/evaluate-bezier.js\");\r\nconst bezier_from_bezier_piece_1 = __webpack_require__(/*! ./bezier-from-bezier-piece */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier-from-bezier-piece.js\");\r\n/**\r\n * Draws a bezier piece, i.e. a bezier within a specified t range.\r\n * @param snap\r\n * @param bezierPiece\r\n * @param class\r\n * @param delay\r\n */\r\nfunction bezierPiece(g, ps_, tRange, class_ = default_class_1.DEFAULT_CLASS, delay) {\r\n let $elems = [];\r\n // Draw crosshair if t range bounds are equal.\r\n if (tRange[0] === tRange[1]) {\r\n let p = evaluate_bezier_1.evaluateBezier(ps_, tRange[0]);\r\n $elems = cross_hair_1.crossHair(g, p, class_, 1.5);\r\n }\r\n else {\r\n let ps = bezier_from_bezier_piece_1.bezierFromBezierPiece(ps_, tRange);\r\n $elems = bezier_1.bezier(g, ps, class_);\r\n }\r\n if (delay) {\r\n setTimeout(() => $elems.forEach(e => e.remove()), delay);\r\n }\r\n return $elems;\r\n}\r\nexports.bezierPiece = bezierPiece;\r\n//# sourceMappingURL=bezier-piece.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier-piece.js?");
51
-
52
- /***/ }),
53
-
54
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier.js":
55
- /*!****************************************************************************!*\
56
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier.js ***!
57
- \****************************************************************************/
58
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
59
-
60
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst line_1 = __webpack_require__(/*! ./line */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/line.js\");\r\nconst quad_bezier_1 = __webpack_require__(/*! ./quad-bezier */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/quad-bezier.js\");\r\nconst cubic_bezier_1 = __webpack_require__(/*! ./cubic-bezier */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cubic-bezier.js\");\r\nfunction bezier(g, bezier, class_ = default_class_1.DEFAULT_CLASS, delay) {\r\n if (bezier.length === 2) {\r\n return line_1.line(g, bezier, class_, delay);\r\n }\r\n else if (bezier.length === 3) {\r\n return quad_bezier_1.quadBezier(g, bezier, class_, delay);\r\n }\r\n else if (bezier.length === 4) {\r\n return cubic_bezier_1.cubicBezier(g, bezier, class_, delay);\r\n }\r\n return [];\r\n}\r\nexports.bezier = bezier;\r\n//# sourceMappingURL=bezier.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier.js?");
61
-
62
- /***/ }),
63
-
64
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/beziers.js":
65
- /*!*****************************************************************************!*\
66
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/beziers.js ***!
67
- \*****************************************************************************/
68
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
69
-
70
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst bezier_1 = __webpack_require__(/*! ./bezier */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/bezier.js\");\r\nconst COLORS = ['red', 'green', 'cyan', 'blue'];\r\n/**\r\n * Draws beziers.\r\n * @param snap\r\n * @param beziers\r\n * @param delay\r\n */\r\nfunction beziers(g, beziers, classes, delay) {\r\n let alternateColors = classes === undefined;\r\n let $beziers = [];\r\n for (let i = 0; i < beziers.length; i++) {\r\n let ps = beziers[i];\r\n let color = COLORS[i % COLORS.length];\r\n let class_ = alternateColors\r\n ? 'thin5 nofill ' + color\r\n : classes;\r\n $beziers.push(...bezier_1.bezier(g, ps, class_));\r\n }\r\n if (delay) {\r\n setTimeout(() => $beziers.forEach(e => e.remove()), delay);\r\n }\r\n return $beziers;\r\n}\r\nexports.beziers = beziers;\r\n//# sourceMappingURL=beziers.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/beziers.js?");
71
-
72
- /***/ }),
73
-
74
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/circle.js":
75
- /*!****************************************************************************!*\
76
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/circle.js ***!
77
- \****************************************************************************/
78
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
79
-
80
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst xmlns_1 = __webpack_require__(/*! ./xmlns */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js\");\r\n/**\r\n * Draws a circle\r\n * @param g An SVG group element wherein to draw the circle.\r\n * @param circle\r\n * @param classes\r\n * @param delay\r\n */\r\nfunction circle(g, circle, classes = default_class_1.DEFAULT_CLASS, delay) {\r\n let c = circle.center;\r\n let r = circle.radius;\r\n let $circle = document.createElementNS(xmlns_1.XMLNS, 'circle');\r\n $circle.setAttributeNS(null, \"cx\", c[0].toString());\r\n $circle.setAttributeNS(null, \"cy\", c[1].toString());\r\n $circle.setAttributeNS(null, \"r\", r.toString());\r\n $circle.setAttributeNS(null, \"class\", classes);\r\n g.appendChild($circle);\r\n if (delay) {\r\n setTimeout(() => $circle.remove(), delay);\r\n }\r\n return [$circle];\r\n}\r\nexports.circle = circle;\r\n//# sourceMappingURL=circle.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/circle.js?");
81
-
82
- /***/ }),
83
-
84
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cross-hair.js":
85
- /*!********************************************************************************!*\
86
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cross-hair.js ***!
87
- \********************************************************************************/
88
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89
-
90
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst circle_1 = __webpack_require__(/*! ./circle */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/circle.js\");\r\nconst line_1 = __webpack_require__(/*! ./line */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/line.js\");\r\n/**\r\n * Draws a crosshair.\r\n */\r\nfunction crossHair(g, p, classes = default_class_1.DEFAULT_CLASS, r = 3, delay) {\r\n let circle_ = { center: p, radius: r };\r\n let $circle = circle_1.circle(g, circle_, classes);\r\n let l1 = [[p[0] - r, p[1]], [p[0] + r, p[1]]];\r\n let l2 = [[p[0], p[1] - r], [p[0], p[1] + r]];\r\n let $l1 = line_1.line(g, l1, classes);\r\n let $l2 = line_1.line(g, l2, classes);\r\n if (delay) {\r\n setTimeout(() => {\r\n $circle.forEach(e => e.remove());\r\n $l1.forEach(e => e.remove());\r\n $l2.forEach(e => e.remove());\r\n }, delay);\r\n }\r\n return [...$circle, ...$l1, ...$l2];\r\n}\r\nexports.crossHair = crossHair;\r\n//# sourceMappingURL=cross-hair.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cross-hair.js?");
91
-
92
- /***/ }),
93
-
94
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cubic-bezier.js":
95
- /*!**********************************************************************************!*\
96
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cubic-bezier.js ***!
97
- \**********************************************************************************/
98
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
99
-
100
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst xmlns_1 = __webpack_require__(/*! ./xmlns */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js\");\r\nconst cross_hair_1 = __webpack_require__(/*! ./cross-hair */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cross-hair.js\");\r\nfunction cubicBezier(g, bezier, class_ = default_class_1.DEFAULT_CLASS, delay) {\r\n let [[x0, y0], [x1, y1], [x2, y2], [x3, y3]] = bezier;\r\n if (x0 === x3 && x1 === x3 && x2 === x3 &&\r\n y0 === y3 && y1 === y3 && y2 === y3) {\r\n return cross_hair_1.crossHair(g, [x0, y0], class_, 0.2, delay);\r\n }\r\n let $path = document.createElementNS(xmlns_1.XMLNS, 'path');\r\n $path.setAttributeNS(null, \"d\", `M${x0} ${y0} C${x1} ${y1} ${x2} ${y2} ${x3} ${y3}`);\r\n $path.setAttributeNS(null, \"class\", class_);\r\n g.appendChild($path);\r\n if (delay) {\r\n setTimeout(() => $path.remove(), delay);\r\n }\r\n return [$path];\r\n}\r\nexports.cubicBezier = cubicBezier;\r\n//# sourceMappingURL=cubic-bezier.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/cubic-bezier.js?");
101
-
102
- /***/ }),
103
-
104
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js":
105
- /*!***********************************************************************************!*\
106
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js ***!
107
- \***********************************************************************************/
108
- /***/ ((__unused_webpack_module, exports) => {
109
-
110
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst DEFAULT_CLASS = 'red thin10 nofill ';\r\nexports.DEFAULT_CLASS = DEFAULT_CLASS;\r\n//# sourceMappingURL=default-class.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js?");
111
-
112
- /***/ }),
113
-
114
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/dot.js":
115
- /*!*************************************************************************!*\
116
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/dot.js ***!
117
- \*************************************************************************/
118
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
119
-
120
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst circle_1 = __webpack_require__(/*! ./circle */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/circle.js\");\r\n/**\r\n * Draws a dot.\r\n */\r\nfunction dot(g, p, r = 3, color = 'red', delay) {\r\n let [$dot] = circle_1.circle(g, { center: p, radius: r }, 'dot ' + color, delay);\r\n if (delay) {\r\n setTimeout(() => $dot.remove(), delay);\r\n }\r\n return [$dot];\r\n}\r\nexports.dot = dot;\r\n//# sourceMappingURL=dot.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/dot.js?");
121
-
122
- /***/ }),
123
-
124
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/evaluate-bezier.js":
125
- /*!*************************************************************************************!*\
126
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/evaluate-bezier.js ***!
127
- \*************************************************************************************/
128
- /***/ ((__unused_webpack_module, exports) => {
129
-
130
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n/**\r\n * Returns an estimate of evaluating the given bezier at the given t value.\r\n * @param ps An order 1, 2 or bezier\r\n * @param t The parameter ∈ [0,1]\r\n */\r\nfunction evaluateBezier(ps, t) {\r\n let s = 1 - t;\r\n if (ps.length === 4) {\r\n // cubic\r\n let [[x0, y0], [x1, y1], [x2, y2], [x3, y3]] = ps;\r\n let x = x0 * Math.pow(s, 3) + 3 * x1 * Math.pow(s, 2) * t + 3 * x2 * s * Math.pow(t, 2) + x3 * Math.pow(t, 3);\r\n let y = y0 * Math.pow(s, 3) + 3 * y1 * Math.pow(s, 2) * t + 3 * y2 * s * Math.pow(t, 2) + y3 * Math.pow(t, 3);\r\n return [x, y];\r\n }\r\n if (ps.length === 3) {\r\n // quadratic\r\n let [[x0, y0], [x1, y1], [x2, y2]] = ps;\r\n let x = x0 * Math.pow(s, 2) + 2 * x1 * s * t + x2 * Math.pow(t, 2);\r\n let y = y0 * Math.pow(s, 2) + 2 * y1 * s * t + y2 * Math.pow(t, 2);\r\n return [x, y];\r\n }\r\n if (ps.length === 2) {\r\n // line\r\n let [[x0, y0], [x1, y1]] = ps;\r\n let x = x0 * s + x1 * t;\r\n let y = y0 * s + y1 * t;\r\n return [x, y];\r\n }\r\n return [NaN, NaN];\r\n}\r\nexports.evaluateBezier = evaluateBezier;\r\n//# sourceMappingURL=evaluate-bezier.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/evaluate-bezier.js?");
131
-
132
- /***/ }),
133
-
134
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/line.js":
135
- /*!**************************************************************************!*\
136
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/line.js ***!
137
- \**************************************************************************/
138
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
139
-
140
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst xmlns_1 = __webpack_require__(/*! ./xmlns */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js\");\r\n/**\r\n *\r\n * @param snap\r\n * @param l\r\n * @param classes\r\n */\r\nfunction line(g, l, classes = default_class_1.DEFAULT_CLASS, delay) {\r\n let $line = document.createElementNS(xmlns_1.XMLNS, 'line');\r\n $line.setAttributeNS(null, \"x1\", l[0][0].toString());\r\n $line.setAttributeNS(null, \"y1\", l[0][1].toString());\r\n $line.setAttributeNS(null, \"x2\", l[1][0].toString());\r\n $line.setAttributeNS(null, \"y2\", l[1][1].toString());\r\n $line.setAttributeNS(null, \"class\", classes);\r\n g.appendChild($line);\r\n if (delay) {\r\n setTimeout(() => $line.remove(), delay);\r\n }\r\n return [$line];\r\n}\r\nexports.line = line;\r\n//# sourceMappingURL=line.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/line.js?");
141
-
142
- /***/ }),
143
-
144
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/loop.js":
145
- /*!**************************************************************************!*\
146
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/loop.js ***!
147
- \**************************************************************************/
148
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
149
-
150
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst xmlns_1 = __webpack_require__(/*! ./xmlns */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js\");\r\nfunction loop(g, curves, class_ = default_class_1.DEFAULT_CLASS, delay) {\r\n if (!curves.length) {\r\n return [];\r\n }\r\n let $path = document.createElementNS(xmlns_1.XMLNS, 'path');\r\n let d = `M${curves[0][0][0]} ${curves[0][0][1]} `;\r\n for (let i = 0; i < curves.length; i++) {\r\n let curve = curves[i];\r\n d += `${getType(curve.length)} `;\r\n for (let j = 1; j < curve.length; j++) {\r\n d += `${curve[j][0]} ${curve[j][1]} `;\r\n }\r\n }\r\n d += ' z';\r\n $path.setAttributeNS(null, \"d\", d);\r\n if (class_) {\r\n $path.setAttributeNS(null, \"class\", class_);\r\n }\r\n g.appendChild($path);\r\n if (delay) {\r\n setTimeout(() => $path.remove(), delay);\r\n }\r\n return [$path];\r\n}\r\nexports.loop = loop;\r\nfunction getType(len) {\r\n if (len === 2) {\r\n return 'L';\r\n }\r\n if (len === 3) {\r\n return 'Q';\r\n }\r\n if (len === 4) {\r\n return 'C';\r\n }\r\n}\r\n//# sourceMappingURL=loop.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/loop.js?");
151
-
152
- /***/ }),
153
-
154
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/polygon.js":
155
- /*!*****************************************************************************!*\
156
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/polygon.js ***!
157
- \*****************************************************************************/
158
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
159
-
160
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst xmlns_1 = __webpack_require__(/*! ./xmlns */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js\");\r\n/**\r\n * Draws a polygon\r\n * @param g\r\n * @param poly the polygon specified as an array of points - the last point does\r\n * not have to be specified\r\n * @param class_\r\n * @param delay\r\n */\r\nfunction polygon(g, poly, class_ = default_class_1.DEFAULT_CLASS, delay) {\r\n let $path = document.createElementNS(xmlns_1.XMLNS, 'path');\r\n let d = `M${poly[0][0]} ${poly[0][1]} L`;\r\n for (let i = 0; i < poly.length; i++) {\r\n d += `${poly[i][0]} ${poly[i][1]} `;\r\n }\r\n d += ' z';\r\n $path.setAttributeNS(null, \"d\", d);\r\n if (class_) {\r\n $path.setAttributeNS(null, \"class\", class_);\r\n }\r\n g.appendChild($path);\r\n if (delay) {\r\n setTimeout(() => $path.remove(), delay);\r\n }\r\n return [$path];\r\n}\r\nexports.polygon = polygon;\r\n//# sourceMappingURL=polygon.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/polygon.js?");
161
-
162
- /***/ }),
163
-
164
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/polyline.js":
165
- /*!******************************************************************************!*\
166
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/polyline.js ***!
167
- \******************************************************************************/
168
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
169
-
170
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst xmlns_1 = __webpack_require__(/*! ./xmlns */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js\");\r\nfunction polyline(g, poly, class_ = default_class_1.DEFAULT_CLASS, delay) {\r\n if (poly.length < 2) {\r\n return [];\r\n }\r\n let $path = document.createElementNS(xmlns_1.XMLNS, 'path');\r\n let d = `M${poly[0][0]} ${poly[0][1]} L`;\r\n for (let i = 0; i < poly.length; i++) {\r\n d += `${poly[i][0]} ${poly[i][1]} `;\r\n }\r\n $path.setAttributeNS(null, \"d\", d);\r\n if (class_) {\r\n $path.setAttributeNS(null, \"class\", class_);\r\n }\r\n g.appendChild($path);\r\n if (delay) {\r\n setTimeout(() => $path.remove(), delay);\r\n }\r\n return [$path];\r\n}\r\nexports.polyline = polyline;\r\n//# sourceMappingURL=polyline.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/polyline.js?");
171
-
172
- /***/ }),
173
-
174
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/quad-bezier.js":
175
- /*!*********************************************************************************!*\
176
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/quad-bezier.js ***!
177
- \*********************************************************************************/
178
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
179
-
180
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst xmlns_1 = __webpack_require__(/*! ./xmlns */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js\");\r\nfunction quadBezier(g, ps, class_ = default_class_1.DEFAULT_CLASS, delay) {\r\n let [[x0, y0], [x1, y1], [x2, y2]] = ps;\r\n let $path = document.createElementNS(xmlns_1.XMLNS, 'path');\r\n $path.setAttributeNS(null, \"d\", `M${x0} ${y0} Q${x1} ${y1} ${x2} ${y2}`);\r\n if (class_) {\r\n $path.setAttributeNS(null, \"class\", class_);\r\n }\r\n g.appendChild($path);\r\n if (delay) {\r\n setTimeout(() => $path.remove(), delay);\r\n }\r\n return [$path];\r\n}\r\nexports.quadBezier = quadBezier;\r\n//# sourceMappingURL=quad-bezier.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/quad-bezier.js?");
181
-
182
- /***/ }),
183
-
184
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/rect.js":
185
- /*!**************************************************************************!*\
186
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/rect.js ***!
187
- \**************************************************************************/
188
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
189
-
190
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst xmlns_1 = __webpack_require__(/*! ./xmlns */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js\");\r\nfunction rect(g, rect, classes = default_class_1.DEFAULT_CLASS, delay) {\r\n let [[x0, y0], [x1, y1]] = rect;\r\n let x = x0 < x1 ? x0 : x1;\r\n let y = y0 < y1 ? y0 : y1;\r\n let width = Math.abs(x0 - x1);\r\n let height = Math.abs(y0 - y1);\r\n let $rect = document.createElementNS(xmlns_1.XMLNS, 'rect');\r\n $rect.setAttributeNS(null, \"x\", x.toString());\r\n $rect.setAttributeNS(null, \"y\", y.toString());\r\n $rect.setAttributeNS(null, \"width\", width.toString());\r\n $rect.setAttributeNS(null, \"height\", height.toString());\r\n if (classes) {\r\n $rect.setAttributeNS(null, \"class\", classes);\r\n }\r\n g.appendChild($rect);\r\n if (delay) {\r\n setTimeout(() => $rect.remove(), delay);\r\n }\r\n return [$rect];\r\n}\r\nexports.rect = rect;\r\n//# sourceMappingURL=rect.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/rect.js?");
191
-
192
- /***/ }),
193
-
194
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/split-at.js":
195
- /*!******************************************************************************!*\
196
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/split-at.js ***!
197
- \******************************************************************************/
198
- /***/ ((__unused_webpack_module, exports) => {
199
-
200
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n/**\r\n * Returns 2 new beziers split at the given t parameter, i.e. for the ranges\r\n * [0,t] and [t,1].\r\n * @param ps\r\n * @param t\r\n */\r\nfunction splitAt(ps, t) {\r\n if (ps.length === 2) {\r\n return splitLineAt(ps, t);\r\n }\r\n else if (ps.length === 3) {\r\n return splitQuadAt(ps, t);\r\n }\r\n else if (ps.length === 4) {\r\n return splitCubicAt(ps, t);\r\n }\r\n return [];\r\n}\r\nexports.splitAt = splitAt;\r\n/**\r\n * Returns 2 new cubic beziers split at the given t parameter, i.e. for the ranges\r\n * [0,t] and [t,1]. Uses de Casteljau's algorithm.\r\n *\r\n * A loose bound on the accuracy of the resultant points is given by:\r\n * |δP| = 2n*max_k(|b_k|)η, where n = 3 (cubic), b_k are the control points\r\n * abd η is Number.EPSILON.\r\n * @param ps A cubic bezier curve\r\n * @param t The t parameter where the curve should be split\r\n */\r\nfunction splitCubicAt(ps, t) {\r\n let [[x0, y0], [x1, y1], [x2, y2], [x3, y3]] = ps;\r\n let s = 1 - t;\r\n let t2 = t * t;\r\n let t3 = t2 * t;\r\n let s2 = s * s;\r\n let s3 = s2 * s;\r\n /** The split point */\r\n let p = [\r\n t3 * x3 + 3 * s * t2 * x2 + 3 * s2 * t * x1 + s3 * x0,\r\n t3 * y3 + 3 * s * t2 * y2 + 3 * s2 * t * y1 + s3 * y0\r\n ];\r\n let ps1 = [\r\n [x0, y0],\r\n [t * x1 + s * x0,\r\n t * y1 + s * y0],\r\n [t2 * x2 + 2 * s * t * x1 + s2 * x0,\r\n t2 * y2 + 2 * s * t * y1 + s2 * y0],\r\n p\r\n ];\r\n let ps2 = [\r\n p,\r\n [t2 * x3 + 2 * t * s * x2 + s2 * x1,\r\n t2 * y3 + 2 * t * s * y2 + s2 * y1],\r\n [t * x3 + s * x2,\r\n t * y3 + s * y2],\r\n [x3, y3]\r\n ];\r\n return [ps1, ps2];\r\n}\r\nfunction splitQuadAt(ps, t) {\r\n let [[x0, y0], [x1, y1], [x2, y2]] = ps;\r\n let s = 1 - t;\r\n /** The split point */\r\n let p = [\r\n s * s * x0 + 2 * s * t * x1 + t * t * x2,\r\n s * s * y0 + 2 * s * t * y1 + t * t * y2\r\n ];\r\n let ps1 = [\r\n [x0, y0],\r\n [s * x0 + t * x1,\r\n s * y0 + t * y1],\r\n p\r\n ];\r\n let ps2 = [\r\n p,\r\n [s * x1 + t * x2,\r\n s * y1 + t * y2],\r\n [x2, y2]\r\n ];\r\n return [ps1, ps2];\r\n}\r\nfunction splitLineAt(ps, t) {\r\n let [[x0, y0], [x1, y1]] = ps;\r\n let s = 1 - t;\r\n /** The split point */\r\n let p = [\r\n s * x0 + t * x1,\r\n s * y0 + t * y1\r\n ];\r\n let ps1 = [\r\n [x0, y0],\r\n p\r\n ];\r\n let ps2 = [\r\n p,\r\n [x1, y1]\r\n ];\r\n return [ps1, ps2];\r\n}\r\n//# sourceMappingURL=split-at.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/split-at.js?");
201
-
202
- /***/ }),
203
-
204
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/text.js":
205
- /*!**************************************************************************!*\
206
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/text.js ***!
207
- \**************************************************************************/
208
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
209
-
210
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst default_class_1 = __webpack_require__(/*! ./default-class */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/default-class.js\");\r\nconst xmlns_1 = __webpack_require__(/*! ./xmlns */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js\");\r\n/**\r\n * Draws text\r\n * @param g a SVG group element wherein to draw\r\n * @param p\r\n * @param str\r\n * @param fontSize\r\n * @param classes\r\n * @param delay\r\n */\r\nfunction text(g, p, str, fontSize, classes = default_class_1.DEFAULT_CLASS, delay) {\r\n let $text = document.createElementNS(xmlns_1.XMLNS, 'text');\r\n $text.setAttributeNS(null, \"x\", p[0].toString());\r\n $text.setAttributeNS(null, \"y\", p[1].toString());\r\n $text.setAttributeNS(null, \"font-size\", fontSize.toString());\r\n $text.setAttributeNS(null, \"class\", classes);\r\n $text.textContent = str;\r\n g.appendChild($text);\r\n if (delay) {\r\n setTimeout(() => $text.remove(), delay);\r\n }\r\n return [$text];\r\n}\r\nexports.text = text;\r\n//# sourceMappingURL=text.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/text.js?");
211
-
212
- /***/ }),
213
-
214
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js":
215
- /*!***************************************************************************!*\
216
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js ***!
217
- \***************************************************************************/
218
- /***/ ((__unused_webpack_module, exports) => {
219
-
220
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst XMLNS = 'http://www.w3.org/2000/svg';\r\nexports.XMLNS = XMLNS;\r\n//# sourceMappingURL=xmlns.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/draw/xmlns.js?");
221
-
222
- /***/ }),
223
-
224
- /***/ "./node_modules/flo-boolean/node_modules/flo-draw/node/index.js":
225
- /*!**********************************************************************!*\
226
- !*** ./node_modules/flo-boolean/node_modules/flo-draw/node/index.js ***!
227
- \**********************************************************************/
228
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
229
-
230
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nconst draw_fs_1 = __webpack_require__(/*! ./draw-fs */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/draw-fs.js\");\r\nexports.drawFs = draw_fs_1.drawFs;\r\nconst debug_1 = __webpack_require__(/*! ./debug/debug */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/debug/debug.js\");\r\nexports.enableDebugDrawFs = debug_1.enableDebugDrawFs;\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node_modules/flo-draw/node/index.js?");
231
-
232
- /***/ }),
233
-
234
14
  /***/ "./src/circle.ts":
235
15
  /*!***********************!*\
236
16
  !*** ./src/circle.ts ***!
@@ -4157,7 +3937,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4157
3937
  \******************************************************************************************************/
4158
3938
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4159
3939
 
4160
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getContainerInOuts\": () => (/* binding */ getContainerInOuts)\n/* harmony export */ });\n/* harmony import */ var _get_in_outs_via_sides_get_in_outs_via_sides_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-in-outs-via-sides/get-in-outs-via-sides.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/get-in-outs-via-sides.js\");\n/* harmony import */ var _get_in_outs_via_crossing_get_in_outs_via_crossing_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./get-in-outs-via-crossing/get-in-outs-via-crossing.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-crossing/get-in-outs-via-crossing.js\");\n\r\n\r\n/**\r\n * * **warning** ioIdx will be modified by this function\r\n * @param container\r\n * @param ioIdx\r\n */\r\nfunction getContainerInOuts(container, ioIdx) {\r\n // We check one _X_ for each curve with an intersection within this container\r\n let xs = container.xs;\r\n // Check nature of Xs. If Xs is the very common case where two curves cross\r\n // we can use a faster check. Also in the bit less common case where all\r\n // curves are joining at an interface we can do a fast ccw (the ccw part\r\n // has not been implemented yet).\r\n if (xs.length === 2) {\r\n if (xs[0].x.kind === 1 && xs[1].x.kind === 1 &&\r\n xs[0].x.ri.multiplicity % 2 === 1 && xs[1].x.ri.multiplicity % 2 === 1) {\r\n return (0,_get_in_outs_via_crossing_get_in_outs_via_crossing_js__WEBPACK_IMPORTED_MODULE_1__.getInOutsViaCrossing)(container, ioIdx);\r\n }\r\n }\r\n return (0,_get_in_outs_via_sides_get_in_outs_via_sides_js__WEBPACK_IMPORTED_MODULE_0__.getInOutsViaSides)(container, ioIdx);\r\n}\r\n\r\n//# sourceMappingURL=get-container-in-outs.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-container-in-outs.js?");
3940
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getContainerInOuts\": () => (/* binding */ getContainerInOuts)\n/* harmony export */ });\n/* harmony import */ var _get_in_outs_via_sides_get_in_outs_via_sides_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-in-outs-via-sides/get-in-outs-via-sides.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/get-in-outs-via-sides.js\");\n/* harmony import */ var _get_in_outs_via_crossing_get_in_outs_via_crossing_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./get-in-outs-via-crossing/get-in-outs-via-crossing.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-crossing/get-in-outs-via-crossing.js\");\n\r\n\r\n/**\r\n * * **warning** ioIdx will be modified by this function\r\n *\r\n * @param container\r\n * @param ioIdx\r\n */\r\nfunction getContainerInOuts(container, ioIdx) {\r\n // We check one __X__ for each curve with an intersection within this container\r\n let xs = container.xs;\r\n // Check nature of Xs. If Xs is the very common case where two curves cross\r\n // we can use a faster check. Also in the bit less common case where all\r\n // curves are joining at an interface we can do a fast ccw (the ccw part\r\n // has not been implemented yet).\r\n if (xs.length === 2) {\r\n if (xs[0].x.kind === 1 && xs[1].x.kind === 1 &&\r\n xs[0].x.ri.multiplicity % 2 === 1 && xs[1].x.ri.multiplicity % 2 === 1) {\r\n return (0,_get_in_outs_via_crossing_get_in_outs_via_crossing_js__WEBPACK_IMPORTED_MODULE_1__.getInOutsViaCrossing)(container, ioIdx);\r\n }\r\n }\r\n return (0,_get_in_outs_via_sides_get_in_outs_via_sides_js__WEBPACK_IMPORTED_MODULE_0__.getInOutsViaSides)(container, ioIdx);\r\n}\r\n\r\n//# sourceMappingURL=get-container-in-outs.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-container-in-outs.js?");
4161
3941
 
4162
3942
  /***/ }),
4163
3943
 
@@ -4177,7 +3957,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4177
3957
  \*********************************************************************************************************************/
4178
3958
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4179
3959
 
4180
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"compareOrderedInOut\": () => (/* binding */ compareOrderedInOut)\n/* harmony export */ });\n/* harmony import */ var flo_poly__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-poly */ \"./node_modules/flo-poly/node/index.js\");\n/* harmony import */ var big_float_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! big-float-ts */ \"./node_modules/big-float-ts/node/index.js\");\n\r\n\r\nconst abs = Math.abs;\r\n// TODO - memoize (probably at some deeper level)\r\n/**\r\n *\r\n * @param inOutA\r\n * @param inOutB\r\n */\r\nfunction compareOrderedInOut(inOutA, inOutB) {\r\n // First compare side indexes - side indexes are the coursest ordering\r\n let res = inOutA.side - inOutB.side;\r\n if (res !== 0) {\r\n return res;\r\n }\r\n // Could not resolve by side indexes (they are the same)\r\n // Compare by side t values\r\n let xA = inOutA.sideX;\r\n let xB = inOutB.sideX;\r\n res = xA.ri.tS - xB.ri.tS;\r\n let errBound = 2 * 4 * Number.EPSILON; // is factor of 2 necessary\r\n if (abs(res) >= errBound) {\r\n return res;\r\n }\r\n // At this point we zoom in once more (compensated once) to add an \r\n // additional 49 bits accuracy\r\n // TODO - first check if they are in the same k family - this will speed\r\n // up the algorithm in those cases.\r\n if (!xA.compensated) { // else the root is already compensated once\r\n xA.compensated = 1; // compensate once - in future we can compensate more times if necessary\r\n // there should be only 1 root in the 4u interval\r\n // TODO - getPExact called too often - cache it!\r\n xA.riExp = (0,flo_poly__WEBPACK_IMPORTED_MODULE_0__.refineK1)(xA.ri, xA.getPExact())[0];\r\n }\r\n if (!xB.compensated) { // else the root is already compensated once\r\n xB.compensated = 1; // compensate once - in future we can compensate more times if necessary\r\n // there should be only 1 root in the 4u interval\r\n // TODO - getPExact called too often - cache it!\r\n xB.riExp = (0,flo_poly__WEBPACK_IMPORTED_MODULE_0__.refineK1)(xB.ri, xB.getPExact())[0];\r\n }\r\n //console.log('compensated')\r\n //console.log('xA', expEst(xA.riExp.tS), ' - ', expEst(xA.riExp.tE));\r\n //console.log('xB', expEst(xB.riExp.tS), ' - ', expEst(xB.riExp.tE));\r\n res = (0,big_float_ts__WEBPACK_IMPORTED_MODULE_1__.eCompare)(xA.riExp.tS, xB.riExp.tS);\r\n if (res !== 0) {\r\n return res;\r\n }\r\n // At this stage it is either the same curve (mathematically if endpoints\r\n // and direction is ignored) or even the once compenensated roots cannot be\r\n // resolved. In future we can cascade compensations to ensure resolution\r\n // but we are already about a quadrillionth of a quadrillionth of a unit\r\n // accurate at this stage.\r\n res = inOutB.inOut.dir - inOutA.inOut.dir;\r\n if (res !== 0) {\r\n return res;\r\n }\r\n // At this stage they are both in or both out\r\n // We reverse sort the ins in comparison to the outs\r\n return inOutA.inOut.dir === 1\r\n ? inOutA.inOut.idx - inOutB.inOut.idx\r\n : inOutB.inOut.idx - inOutA.inOut.idx;\r\n}\r\n/** temp for testing */\r\n//function expEst(t: number[]) {\r\n// return estimate(t.slice(0, t.length-1));\r\n//}\r\n\r\n//# sourceMappingURL=compare-in-out.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/compare-in-out.js?");
3960
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"compareOrderedInOut\": () => (/* binding */ compareOrderedInOut)\n/* harmony export */ });\n/* harmony import */ var flo_poly__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-poly */ \"./node_modules/flo-poly/node/index.js\");\n/* harmony import */ var big_float_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! big-float-ts */ \"./node_modules/big-float-ts/node/index.js\");\n\r\n\r\nconst { abs } = Math;\r\n/**\r\n *\r\n * @param inOutA\r\n * @param inOutB\r\n */\r\nfunction compareOrderedInOut(inOutA, inOutB) {\r\n // First compare side indexes - side indexes are the coursest ordering\r\n const sideA = inOutA.side;\r\n const sideB = inOutB.side;\r\n let res = sideA - sideB;\r\n if (res !== 0) {\r\n return res;\r\n }\r\n // Could not resolve by side indexes (they are the same)\r\n // Compare by side `t` values\r\n let xA = inOutA.sideX;\r\n let xB = inOutB.sideX;\r\n res = xA.ri.tS - xB.ri.tS;\r\n let errBound = 2 * 4 * Number.EPSILON; // is factor of 2 necessary?\r\n if (abs(res) >= errBound) {\r\n return res;\r\n }\r\n // At this point we zoom in once more (compensated once) to add an \r\n // additional 49 bits accuracy\r\n // TODO - first check if they are in the same k family - this will speed\r\n // up the algorithm in those cases.\r\n if (!xA.compensated) { // else the root is already compensated once\r\n xA.compensated = 1; // compensate once - in future we can compensate more times if necessary\r\n // there should be only 1 root in the 4u interval\r\n // TODO - getPExact called too often - cache it!\r\n xA.riExp = (0,flo_poly__WEBPACK_IMPORTED_MODULE_0__.refineK1)(xA.ri, xA.getPExact())[0];\r\n }\r\n if (!xB.compensated) { // else the root is already compensated once\r\n xB.compensated = 1; // compensate once - in future we can compensate more times if necessary\r\n // there should be only 1 root in the 4u interval\r\n // TODO - getPExact called too often - cache it!\r\n xB.riExp = (0,flo_poly__WEBPACK_IMPORTED_MODULE_0__.refineK1)(xB.ri, xB.getPExact())[0];\r\n }\r\n //console.log('compensated')\r\n //console.log('xA', expEst(xA.riExp.tS), ' - ', expEst(xA.riExp.tE));\r\n //console.log('xB', expEst(xB.riExp.tS), ' - ', expEst(xB.riExp.tE));\r\n res = (0,big_float_ts__WEBPACK_IMPORTED_MODULE_1__.eCompare)(xA.riExp.tS, xB.riExp.tS);\r\n if (res !== 0) {\r\n return res;\r\n }\r\n // At this stage it is either the same curve (mathematically, if endpoints\r\n // and direction is ignored) or even the once compenensated roots cannot be\r\n // resolved. In future we can cascade compensations to ensure resolution\r\n // but we are already about a quadrillionth of a quadrillionth of a unit\r\n // accurate at this stage.\r\n res = inOutB.dir - inOutA.dir;\r\n if (res !== 0) {\r\n return res;\r\n }\r\n // At this stage they are both in or both out\r\n // We reverse sort the ins in comparison to the outs\r\n return inOutA.dir === 1\r\n ? inOutA.idx - inOutB.idx\r\n : inOutB.idx - inOutA.idx;\r\n}\r\n\r\n//# sourceMappingURL=compare-in-out.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/compare-in-out.js?");
4181
3961
 
4182
3962
  /***/ }),
4183
3963
 
@@ -4187,7 +3967,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4187
3967
  \****************************************************************************************************************************/
4188
3968
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4189
3969
 
4190
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getInOutsViaSides\": () => (/* binding */ getInOutsViaSides)\n/* harmony export */ });\n/* harmony import */ var _get_x_in_outs_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-x-in-outs.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/get-x-in-outs.js\");\n/* harmony import */ var _compare_in_out_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compare-in-out.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/compare-in-out.js\");\n\r\n\r\n/**\r\n * Returns the incoming / outgoing curves (as InOuts) for the given container\r\n * using an extremely small rectangle around the intersections.\r\n * * **warning** ioIdx will be modified by this function\r\n * @param container\r\n * @param ioIdx\r\n */\r\nfunction getInOutsViaSides(container, ioIdx) {\r\n // We check one _X_ for each curve with an intersection within this container\r\n let xs_ = container.xs;\r\n //console.log(container.xs);\r\n let inOuts = [];\r\n // get a map from each Curve to each _X_ of this container\r\n let xMap = new Map();\r\n for (let x of xs_) {\r\n let curve = x.curve;\r\n let xs = xMap.get(curve);\r\n if (!xs) {\r\n xMap.set(curve, [x]);\r\n }\r\n else {\r\n xs.push(x);\r\n }\r\n }\r\n let getXInOuts_ = (0,_get_x_in_outs_js__WEBPACK_IMPORTED_MODULE_0__.getXInOuts)(container);\r\n for (let entry of xMap) {\r\n let [curve, xs] = entry;\r\n let ins;\r\n let outs;\r\n ({ ins, outs, ioIdx } = getXInOuts_(curve, xs, ioIdx));\r\n inOuts.push(...ins);\r\n inOuts.push(...outs);\r\n }\r\n inOuts.sort(_compare_in_out_js__WEBPACK_IMPORTED_MODULE_1__.compareOrderedInOut);\r\n return { inOuts: inOuts.map(inOut => inOut.inOut), ioIdx };\r\n}\r\n\r\n//# sourceMappingURL=get-in-outs-via-sides.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/get-in-outs-via-sides.js?");
3970
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getInOutsViaSides\": () => (/* binding */ getInOutsViaSides)\n/* harmony export */ });\n/* harmony import */ var _get_x_in_outs_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-x-in-outs.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/get-x-in-outs.js\");\n\r\n/**\r\n * Returns the incoming / outgoing curves (as InOuts) for the given container\r\n * using an extremely small rectangle around the intersections.\r\n * * **warning** ioIdx will be modified by this function\r\n * @param container\r\n * @param ioIdx\r\n */\r\nfunction getInOutsViaSides(container, ioIdx) {\r\n // We check one __X__ for each curve with an intersection within this container\r\n let xs_ = container.xs;\r\n let inOuts = [];\r\n // get a map from each Curve to each __X__ of this container\r\n let xMap = new Map();\r\n for (let x of xs_) {\r\n let curve = x.curve;\r\n let xs = xMap.get(curve);\r\n if (!xs) {\r\n xMap.set(curve, [x]);\r\n }\r\n else {\r\n xs.push(x);\r\n }\r\n }\r\n let getXInOuts_ = (0,_get_x_in_outs_js__WEBPACK_IMPORTED_MODULE_0__.getXInOuts)(container);\r\n for (let entry of xMap) {\r\n let [curve, xs] = entry;\r\n let ins;\r\n let outs;\r\n ({ ins, outs, ioIdx } = getXInOuts_(curve, xs, ioIdx));\r\n inOuts.push(...ins);\r\n inOuts.push(...outs);\r\n }\r\n return { inOuts: inOuts, ioIdx };\r\n}\r\n\r\n//# sourceMappingURL=get-in-outs-via-sides.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/get-in-outs-via-sides.js?");
4191
3971
 
4192
3972
  /***/ }),
4193
3973
 
@@ -4197,7 +3977,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4197
3977
  \********************************************************************************************************************/
4198
3978
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4199
3979
 
4200
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getXInOuts\": () => (/* binding */ getXInOuts)\n/* harmony export */ });\n/* harmony import */ var big_float_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! big-float-ts */ \"./node_modules/big-float-ts/node/index.js\");\n/* harmony import */ var flo_poly__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flo-poly */ \"./node_modules/flo-poly/node/index.js\");\n/* harmony import */ var flo_bezier3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! flo-bezier3 */ \"./node_modules/flo-bezier3/node/index.js\");\n/* harmony import */ var _sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../sweep-line/are-boxes-intersecting.js */ \"./node_modules/flo-boolean/node/sweep-line/are-boxes-intersecting.js\");\n\r\n\r\n\r\n\r\nfunction midBox(_x_) {\r\n return [\r\n (_x_.x.box[0][0] + _x_.x.box[1][0]) / 2,\r\n (_x_.x.box[0][1] + _x_.x.box[1][1]) / 2\r\n ];\r\n}\r\n/**\r\n * * **warning** modifies container.xs[i].in_\r\n * @param container\r\n */\r\nfunction getXInOuts(container) {\r\n let [[left, top], [right, bottom]] = container.box;\r\n let sides = [\r\n [[right, top], [left, top]],\r\n [[left, top], [left, bottom]],\r\n [[left, bottom], [right, bottom]],\r\n [[right, bottom], [right, top]]\r\n ];\r\n return (curve, xs_, ioIdx) => {\r\n // At this point all xs belong to the same curve and container.\r\n // For each of the four sides get the t values closest to the \r\n // intersection t.\r\n let ps = curve.ps;\r\n let xs = xs_.slice();\r\n for (let i = 0; i < sides.length; i++) {\r\n let xs_ = getTs(ps, sides[i]);\r\n for (let { psX, sideX } of xs_) {\r\n xs.push({\r\n x: psX,\r\n side: i,\r\n sideX,\r\n curve: undefined, // unused\r\n });\r\n }\r\n }\r\n //---- resolve in-outs\r\n // the sort below should always resolve if the container dimension is\r\n // 'large enough', where large enough is based on the maximum value that\r\n // the tangent magnitude of a curve can attain (no need to resort to \r\n // compensated intervals)\r\n xs.sort((xA, xB) => xA.x.ri.tS - xB.x.ri.tS);\r\n let ins = [];\r\n let outs = [];\r\n let prevX = undefined;\r\n /** true if the prevX was a proper X, false if it was a SideX */\r\n let prevWasX = undefined;\r\n for (let x of xs) {\r\n if (x.side !== undefined) {\r\n // it is a sideX\r\n if (prevWasX === true) {\r\n //console.log(midBox(x))\r\n outs.push({\r\n inOut: {\r\n dir: +1,\r\n p: midBox(x),\r\n _x_: prevX,\r\n container,\r\n idx: ++ioIdx\r\n },\r\n side: x.side,\r\n sideX: x.sideX\r\n });\r\n }\r\n prevWasX = false;\r\n }\r\n else {\r\n // it is a proper X\r\n if (prevWasX === false) {\r\n ins.push({\r\n inOut: {\r\n dir: -1,\r\n p: midBox(prevX),\r\n _x_: x,\r\n container,\r\n idx: ++ioIdx\r\n },\r\n side: prevX.side,\r\n sideX: prevX.sideX\r\n });\r\n x.in_ = ins[ins.length - 1].inOut;\r\n }\r\n prevWasX = true;\r\n }\r\n prevX = x;\r\n }\r\n return { ins, outs, ioIdx };\r\n };\r\n}\r\n/**\r\n * Get zero times compensated roots and exact coefficents\r\n */\r\nfunction getXs0(ps1, ps2) {\r\n // let _coeffs = getIntersectionCoeffs(ps1, ps2);\r\n let _coeffs = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_2__.getCoeffsBezBez)(ps1, ps2);\r\n if (_coeffs === undefined) {\r\n return undefined;\r\n }\r\n let { coeffs, errBound, getPExact } = _coeffs;\r\n let ris = (0,flo_poly__WEBPACK_IMPORTED_MODULE_1__.allRootsCertified)(coeffs, 0, 1, errBound, getPExact);\r\n if (ris.length === 0) {\r\n return undefined;\r\n }\r\n return { ris: ris.map(flo_poly__WEBPACK_IMPORTED_MODULE_1__.rootIntervalToExp), getPExact };\r\n}\r\nfunction rootIntervalToDouble(ri) {\r\n return {\r\n tS: (0,big_float_ts__WEBPACK_IMPORTED_MODULE_0__.eEstimate)(ri.tS),\r\n tE: (0,big_float_ts__WEBPACK_IMPORTED_MODULE_0__.eEstimate)(ri.tE),\r\n multiplicity: ri.multiplicity\r\n };\r\n}\r\n/**\r\n * Robustly get matching intersections of ps (a bezier) that matches those of\r\n * side. ps and side can actually be any order 1, 2 or 3 bezier curve.\r\n * * **precondition** RootInterval[] contains no multiple roots\r\n * @param ps\r\n * @param side\r\n * @param risSide_\r\n */\r\nfunction getTs(ps, side) {\r\n let xs0Side = getXs0(ps, side);\r\n if (xs0Side === undefined) {\r\n return [];\r\n }\r\n let { ris: risSide, getPExact: getPExactSide } = xs0Side;\r\n //let exactSide = getPExactSide();\r\n let exactSide = undefined; // lazy loaded\r\n let getPExactSide_ = () => {\r\n exactSide = exactSide || getPExactSide();\r\n return exactSide;\r\n };\r\n let xs0Ps = getXs0(side, ps);\r\n if (xs0Ps === undefined) {\r\n return [];\r\n }\r\n let { ris: risPs, getPExact: getPExactPs } = xs0Ps;\r\n //let exactPs = getPExactPs();\r\n let exactPs = undefined; // lazy loaded\r\n let getPExactPs_ = () => {\r\n exactPs = exactPs || getPExactPs();\r\n return exactPs;\r\n };\r\n //---- Make sure no boxesPs overlap. \r\n // If any two boxes do operlap we cannot match the t value of a ps box to \r\n // that of a side box, else we can definitively match them.\r\n // Note: multiplicity > 1 intersections will result in an infinite loop. \r\n // It is assumed (as a precondition) the code is such that a multiple \r\n // intersection is node possible here\r\n let maxIter;\r\n // currently we only go up to once compensated (double-double precision roots)\r\n maxIter = 1;\r\n /** number of compensations for ps */\r\n let cPs = 0;\r\n let boxesPs = undefined;\r\n loop: while ( true && cPs < maxIter) {\r\n // update boxes to new tighter versions\r\n boxesPs = risPs.map(ri => (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_2__.getIntervalBoxDd)(ps, [ri.tS, ri.tE]));\r\n for (let i = 0; i < risPs.length; i++) {\r\n let boxPsI = boxesPs[i];\r\n for (let j = i + 1; j < risPs.length; j++) {\r\n let boxPsJ = boxesPs[j];\r\n if ((0,_sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_3__.areBoxesIntersectingDd)(true)(boxPsI, boxPsJ)) {\r\n let _risPs = [];\r\n for (let riPs of risPs) {\r\n // TODO - below we're converting riPs (using getXs0) to RootIntervalExp and below back to \r\n // RootInterval again - not necessary - fix\r\n _risPs.push(...(0,flo_poly__WEBPACK_IMPORTED_MODULE_1__.refineK1)({ tS: riPs.tS[1], tE: riPs.tE[1], multiplicity: riPs.multiplicity }, getPExactPs_()));\r\n }\r\n risPs = _risPs;\r\n cPs++;\r\n continue loop;\r\n }\r\n }\r\n }\r\n break loop;\r\n }\r\n //---- Make sure no boxesSides overlap - this should be rare as we are \r\n // already roughly once compensated on that (due to small length of the sides).\r\n // currently we only go up to once compensated (quad precision roots)\r\n maxIter = 1;\r\n /** number of compensations for sides */\r\n let cSide = 0;\r\n let boxesSide = undefined;\r\n loop: while ( true && cSide < maxIter) {\r\n boxesSide = risSide.map(ri => (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_2__.getIntervalBoxDd)(side, [ri.tS, ri.tE]));\r\n for (let i = 0; i < risSide.length; i++) {\r\n let boxSideI = boxesSide[i];\r\n for (let j = i + 1; j < risSide.length; j++) {\r\n let boxSideJ = boxesSide[j];\r\n if ((0,_sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_3__.areBoxesIntersectingDd)(true)(boxSideI, boxSideJ)) {\r\n let _risSide = [];\r\n for (let riSide of risSide) {\r\n _risSide.push(...(0,flo_poly__WEBPACK_IMPORTED_MODULE_1__.refineK1)({ tS: riSide.tS[1], tE: riSide.tE[1], multiplicity: riSide.multiplicity }, getPExactSide_()));\r\n }\r\n risSide = _risSide;\r\n cSide++;\r\n continue loop;\r\n }\r\n }\r\n }\r\n break loop;\r\n }\r\n let xPairs = [];\r\n for (let i = 0; i < risPs.length; i++) {\r\n let boxPs = boxesPs[i];\r\n for (let j = 0; j < risSide.length; j++) {\r\n let boxSide = boxesSide[j];\r\n // TODO - investigate if below commented code would improve algorithm\r\n //let box = intersectBoxes(boxPs,boxSide);\r\n //if (box !== undefined) {\r\n if ((0,_sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_3__.areBoxesIntersectingDd)(true)(boxPs, boxSide)) {\r\n let psX = {\r\n compensated: cPs,\r\n ri: rootIntervalToDouble(risPs[i]),\r\n riExp: cPs ? risPs[i] : undefined,\r\n getPExact: cPs ? undefined : getPExactPs,\r\n kind: 1,\r\n box: boxExpToBox(boxPs)\r\n };\r\n let sideX = {\r\n compensated: cSide,\r\n ri: rootIntervalToDouble(risSide[j]),\r\n riExp: cSide ? risSide[j] : undefined,\r\n getPExact: cSide ? undefined : getPExactSide,\r\n kind: 1,\r\n box: boxExpToBox(boxSide)\r\n };\r\n xPairs.push({ psX, sideX });\r\n }\r\n }\r\n }\r\n return xPairs;\r\n}\r\n/**\r\n * Converts a box with expansion coordinates into one with double coordinates.\r\n */\r\nfunction boxExpToBox(boxExp) {\r\n return boxExp.map(p => p.map(big_float_ts__WEBPACK_IMPORTED_MODULE_0__.eEstimate));\r\n}\r\n\r\n//# sourceMappingURL=get-x-in-outs.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/get-x-in-outs.js?");
3980
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getXInOuts\": () => (/* binding */ getXInOuts)\n/* harmony export */ });\n/* harmony import */ var big_float_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! big-float-ts */ \"./node_modules/big-float-ts/node/index.js\");\n/* harmony import */ var flo_poly__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flo-poly */ \"./node_modules/flo-poly/node/index.js\");\n/* harmony import */ var flo_bezier3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! flo-bezier3 */ \"./node_modules/flo-bezier3/node/index.js\");\n/* harmony import */ var _sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../sweep-line/are-boxes-intersecting.js */ \"./node_modules/flo-boolean/node/sweep-line/are-boxes-intersecting.js\");\n\r\n\r\n\r\n\r\nfunction midBox(_x_) {\r\n return [\r\n (_x_.x.box[0][0] + _x_.x.box[1][0]) / 2,\r\n (_x_.x.box[0][1] + _x_.x.box[1][1]) / 2\r\n ];\r\n}\r\n/**\r\n * * **warning** modifies container.xs[i].in_\r\n * @param container\r\n */\r\nfunction getXInOuts(container) {\r\n let [[left, top], [right, bottom]] = container.box;\r\n let sides = [\r\n [[right, top], [left, top]],\r\n [[left, top], [left, bottom]],\r\n [[left, bottom], [right, bottom]],\r\n [[right, bottom], [right, top]]\r\n ];\r\n return (curve, xs_, ioIdx) => {\r\n // At this point all xs belong to the same curve and container.\r\n // For each of the four sides get the t values closest to the \r\n // intersection t.\r\n let ps = curve.ps;\r\n let xs = xs_.slice();\r\n for (let i = 0; i < sides.length; i++) {\r\n let xs_ = getTs(ps, sides[i]);\r\n for (let { psX, sideX } of xs_) {\r\n xs.push({\r\n x: psX,\r\n side: i,\r\n sideX,\r\n curve: undefined, // unused\r\n });\r\n }\r\n }\r\n //---- resolve in-outs\r\n // the sort below should always resolve if the container dimension is\r\n // 'large enough', where large enough is based on the maximum value that\r\n // the tangent magnitude of a curve can attain (no need to resort to \r\n // compensated intervals)\r\n xs.sort((xA, xB) => xA.x.ri.tS - xB.x.ri.tS);\r\n let ins = [];\r\n let outs = [];\r\n let prevX = undefined;\r\n /** true if the prevX was a proper X, false if it was a SideX */\r\n let prevWasX = undefined;\r\n for (let x of xs) {\r\n if (x.side !== undefined) {\r\n // it is a sideX\r\n if (prevWasX === true) {\r\n outs.push({\r\n dir: +1,\r\n p: midBox(x),\r\n _x_: prevX,\r\n container,\r\n idx: ++ioIdx,\r\n side: x.side,\r\n sideX: x.sideX\r\n });\r\n }\r\n prevWasX = false;\r\n }\r\n else {\r\n // it is a proper X\r\n if (prevWasX === false) {\r\n ins.push({\r\n dir: -1,\r\n p: midBox(prevX),\r\n _x_: x,\r\n container,\r\n idx: ++ioIdx,\r\n side: prevX.side,\r\n sideX: prevX.sideX\r\n });\r\n x.in_ = ins[ins.length - 1];\r\n }\r\n prevWasX = true;\r\n }\r\n prevX = x;\r\n }\r\n return { ins, outs, ioIdx };\r\n };\r\n}\r\n/**\r\n * Get zero times compensated roots and exact coefficents\r\n */\r\nfunction getXs0(ps1, ps2) {\r\n // let _coeffs = getIntersectionCoeffs(ps1, ps2);\r\n let _coeffs = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_2__.getCoeffsBezBez)(ps1, ps2);\r\n if (_coeffs === undefined) {\r\n return undefined;\r\n }\r\n let { coeffs, errBound, getPExact } = _coeffs;\r\n let ris = (0,flo_poly__WEBPACK_IMPORTED_MODULE_1__.allRootsCertified)(coeffs, 0, 1, errBound, getPExact);\r\n if (ris.length === 0) {\r\n return undefined;\r\n }\r\n return { ris: ris.map(flo_poly__WEBPACK_IMPORTED_MODULE_1__.rootIntervalToExp), getPExact };\r\n}\r\nfunction rootIntervalToDouble(ri) {\r\n return {\r\n tS: (0,big_float_ts__WEBPACK_IMPORTED_MODULE_0__.eEstimate)(ri.tS),\r\n tE: (0,big_float_ts__WEBPACK_IMPORTED_MODULE_0__.eEstimate)(ri.tE),\r\n multiplicity: ri.multiplicity\r\n };\r\n}\r\n/**\r\n * Robustly get matching intersections of ps (a bezier) that matches those of\r\n * side. ps and side can actually be any order 1, 2 or 3 bezier curve.\r\n * * **precondition** RootInterval[] contains no multiple roots\r\n * @param ps\r\n * @param side\r\n * @param risSide_\r\n */\r\nfunction getTs(ps, side) {\r\n let xs0Side = getXs0(ps, side);\r\n if (xs0Side === undefined) {\r\n return [];\r\n }\r\n let { ris: risSide, getPExact: getPExactSide } = xs0Side;\r\n //let exactSide = getPExactSide();\r\n let exactSide = undefined; // lazy loaded\r\n let getPExactSide_ = () => {\r\n exactSide = exactSide || getPExactSide();\r\n return exactSide;\r\n };\r\n let xs0Ps = getXs0(side, ps);\r\n if (xs0Ps === undefined) {\r\n return [];\r\n }\r\n let { ris: risPs, getPExact: getPExactPs } = xs0Ps;\r\n //let exactPs = getPExactPs();\r\n let exactPs = undefined; // lazy loaded\r\n let getPExactPs_ = () => {\r\n exactPs = exactPs || getPExactPs();\r\n return exactPs;\r\n };\r\n //---- Make sure no boxesPs overlap. \r\n // If any two boxes do operlap we cannot match the t value of a ps box to \r\n // that of a side box, else we can definitively match them.\r\n // Note: multiplicity > 1 intersections will result in an infinite loop. \r\n // It is assumed (as a precondition) the code is such that a multiple \r\n // intersection is node possible here\r\n let maxIter;\r\n // currently we only go up to once compensated (double-double precision roots)\r\n maxIter = 1;\r\n /** number of compensations for ps */\r\n let cPs = 0;\r\n let boxesPs = undefined;\r\n loop: while ( true && cPs < maxIter) {\r\n // update boxes to new tighter versions\r\n boxesPs = risPs.map(ri => (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_2__.getIntervalBoxDd)(ps, [ri.tS, ri.tE]));\r\n for (let i = 0; i < risPs.length; i++) {\r\n let boxPsI = boxesPs[i];\r\n for (let j = i + 1; j < risPs.length; j++) {\r\n let boxPsJ = boxesPs[j];\r\n if ((0,_sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_3__.areBoxesIntersectingDd)(true)(boxPsI, boxPsJ)) {\r\n let _risPs = [];\r\n for (let riPs of risPs) {\r\n // TODO - below we're converting riPs (using getXs0) to RootIntervalExp and below back to \r\n // RootInterval again - not necessary - fix\r\n _risPs.push(...(0,flo_poly__WEBPACK_IMPORTED_MODULE_1__.refineK1)({ tS: riPs.tS[1], tE: riPs.tE[1], multiplicity: riPs.multiplicity }, getPExactPs_()));\r\n }\r\n risPs = _risPs;\r\n cPs++;\r\n continue loop;\r\n }\r\n }\r\n }\r\n break loop;\r\n }\r\n //---- Make sure no boxesSides overlap - this should be rare as we are \r\n // already roughly once compensated on that (due to small length of the sides).\r\n // currently we only go up to once compensated (quad precision roots)\r\n maxIter = 1;\r\n /** number of compensations for sides */\r\n let cSide = 0;\r\n let boxesSide = undefined;\r\n loop: while ( true && cSide < maxIter) {\r\n boxesSide = risSide.map(ri => (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_2__.getIntervalBoxDd)(side, [ri.tS, ri.tE]));\r\n for (let i = 0; i < risSide.length; i++) {\r\n let boxSideI = boxesSide[i];\r\n for (let j = i + 1; j < risSide.length; j++) {\r\n let boxSideJ = boxesSide[j];\r\n if ((0,_sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_3__.areBoxesIntersectingDd)(true)(boxSideI, boxSideJ)) {\r\n let _risSide = [];\r\n for (let riSide of risSide) {\r\n _risSide.push(...(0,flo_poly__WEBPACK_IMPORTED_MODULE_1__.refineK1)({ tS: riSide.tS[1], tE: riSide.tE[1], multiplicity: riSide.multiplicity }, getPExactSide_()));\r\n }\r\n risSide = _risSide;\r\n cSide++;\r\n continue loop;\r\n }\r\n }\r\n }\r\n break loop;\r\n }\r\n let xPairs = [];\r\n for (let i = 0; i < risPs.length; i++) {\r\n let boxPs = boxesPs[i];\r\n for (let j = 0; j < risSide.length; j++) {\r\n let boxSide = boxesSide[j];\r\n // TODO - investigate if below commented code would improve algorithm\r\n //let box = intersectBoxes(boxPs,boxSide);\r\n //if (box !== undefined) {\r\n if ((0,_sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_3__.areBoxesIntersectingDd)(true)(boxPs, boxSide)) {\r\n let psX = {\r\n compensated: cPs,\r\n ri: rootIntervalToDouble(risPs[i]),\r\n riExp: cPs ? risPs[i] : undefined,\r\n getPExact: cPs ? undefined : getPExactPs,\r\n kind: 1,\r\n box: boxExpToBox(boxPs)\r\n };\r\n let sideX = {\r\n compensated: cSide,\r\n ri: rootIntervalToDouble(risSide[j]),\r\n riExp: cSide ? risSide[j] : undefined,\r\n getPExact: cSide ? undefined : getPExactSide,\r\n kind: 1,\r\n box: boxExpToBox(boxSide)\r\n };\r\n xPairs.push({ psX, sideX });\r\n }\r\n }\r\n }\r\n return xPairs;\r\n}\r\n/**\r\n * Converts a box with expansion coordinates into one with double coordinates.\r\n */\r\nfunction boxExpToBox(boxExp) {\r\n return boxExp.map(p => p.map(big_float_ts__WEBPACK_IMPORTED_MODULE_0__.eEstimate));\r\n}\r\n\r\n//# sourceMappingURL=get-x-in-outs.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/get-x-in-outs.js?");
4201
3981
 
4202
3982
  /***/ }),
4203
3983
 
@@ -4207,7 +3987,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4207
3987
  \*************************************************************************/
4208
3988
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4209
3989
 
4210
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getContainers\": () => (/* binding */ getContainers)\n/* harmony export */ });\n/* harmony import */ var _are_containers_intersecting_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./are-containers-intersecting.js */ \"./node_modules/flo-boolean/node/calc-containers/are-containers-intersecting.js\");\n/* harmony import */ var _graph_get_connected_components_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../graph/get-connected-components.js */ \"./node_modules/flo-boolean/node/graph/get-connected-components.js\");\n/* harmony import */ var _get_isolated_containers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-isolated-containers.js */ \"./node_modules/flo-boolean/node/calc-containers/get-isolated-containers.js\");\n/* harmony import */ var _merge_containers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./merge-containers.js */ \"./node_modules/flo-boolean/node/calc-containers/merge-containers.js\");\n/* harmony import */ var _get_container_in_outs_get_container_in_outs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get-container-in-outs/get-container-in-outs.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-container-in-outs.js\");\n/* harmony import */ var _get_critical_points_get_intersections_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../get-critical-points/get-intersections.js */ \"./node_modules/flo-boolean/node/get-critical-points/get-intersections.js\");\n/* harmony import */ var _get_critical_points_set_intersection_next_values_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../get-critical-points/set-intersection-next-values.js */ \"./node_modules/flo-boolean/node/get-critical-points/set-intersection-next-values.js\");\n/* harmony import */ var _sweep_line_sweep_line_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../sweep-line/sweep-line.js */ \"./node_modules/flo-boolean/node/sweep-line/sweep-line.js\");\n/* harmony import */ var _get_critical_points_get_self_intersections_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../get-critical-points/get-self-intersections.js */ \"./node_modules/flo-boolean/node/get-critical-points/get-self-intersections.js\");\n/* harmony import */ var _get_critical_points_get_interface_intersections_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../get-critical-points/get-interface-intersections.js */ \"./node_modules/flo-boolean/node/get-critical-points/get-interface-intersections.js\");\n/* harmony import */ var _get_critical_points_get_extremes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../get-critical-points/get-extremes.js */ \"./node_modules/flo-boolean/node/get-critical-points/get-extremes.js\");\n/* harmony import */ var _send_containers_to_grid_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./send-containers-to-grid.js */ \"./node_modules/flo-boolean/node/calc-containers/send-containers-to-grid.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n *\r\n * @param containerDim\r\n */\r\nfunction getContainers(loops, containerDim, expMax) {\r\n //let t0 = performance.now();\r\n let xs1 = (0,_get_critical_points_get_intersections_js__WEBPACK_IMPORTED_MODULE_5__.getIntersections)(loops, expMax);\r\n //let t1 = performance.now();\r\n //console.log(\"intersections took \" + ((t1 - t0)).toFixed(3) + \" milliseconds.\");\r\n let xs2 = (0,_get_critical_points_get_self_intersections_js__WEBPACK_IMPORTED_MODULE_8__.getSelfIntersections)(loops);\r\n let xs3 = (0,_get_critical_points_get_interface_intersections_js__WEBPACK_IMPORTED_MODULE_9__.getInterfaceIntersections)(loops);\r\n let { extremes, xs: xs4 } = (0,_get_critical_points_get_extremes_js__WEBPACK_IMPORTED_MODULE_10__.getExtremes)(loops);\r\n let xPairs = [...xs1, ...xs2, ...xs3, ...xs4];\r\n //console.log('general ', xs1);\r\n //console.log('self ', xs2);\r\n //console.log('interface', xs3);\r\n //console.log('topmost ', xs4);\r\n if (typeof _debug_ !== 'undefined') {\r\n for (let xPair of xs1) {\r\n _debug_.generated.elems.intersection.push(...xPair);\r\n }\r\n for (let xPair of xs2) {\r\n _debug_.generated.elems.intersection.push(...xPair);\r\n }\r\n // TODO - are interface intersections really necessary?\r\n for (let xPair of xs3) {\r\n _debug_.generated.elems.intersection.push(...xPair);\r\n }\r\n for (let xPair of xs4) {\r\n _debug_.generated.elems.intersection.push(...xPair);\r\n }\r\n }\r\n // initialize the containers with one of the one-sided intersections\r\n // console.log(xPairs)\r\n let containers = xPairs.map(xPair => ({\r\n xs: xPair,\r\n box: [\r\n // TODO xs[0].box -> combine xs[0] and xs[1] boxes\r\n [xPair[0].x.box[0][0] - containerDim, xPair[0].x.box[0][1] - containerDim],\r\n [xPair[0].x.box[1][0] + containerDim, xPair[0].x.box[1][1] + containerDim]\r\n ],\r\n inOuts: undefined // to be set later\r\n }));\r\n // iterate, combining containers that overlap on each iteration \r\n while (true) {\r\n /** container intersections as an array of Container pairs */\r\n let is = (0,_sweep_line_sweep_line_js__WEBPACK_IMPORTED_MODULE_7__.sweepLine)(containers, getLeftMost, getRightMost, _are_containers_intersecting_js__WEBPACK_IMPORTED_MODULE_0__.areContainersIntersecting);\r\n // if there are no more intersections between containers we're done\r\n if (!is.length) {\r\n break;\r\n }\r\n let graph = new Map();\r\n (0,_graph_get_connected_components_js__WEBPACK_IMPORTED_MODULE_1__.addEdges)(graph, is);\r\n let connectedContainers = (0,_graph_get_connected_components_js__WEBPACK_IMPORTED_MODULE_1__.getConnectedComponents)(graph);\r\n let isolatedContainers = (0,_get_isolated_containers_js__WEBPACK_IMPORTED_MODULE_2__.getIsolatedComponents)(containers, connectedContainers);\r\n containers = [\r\n ...(0,_merge_containers_js__WEBPACK_IMPORTED_MODULE_3__.mergeContainers)(connectedContainers),\r\n ...isolatedContainers\r\n ];\r\n }\r\n containers = filterContainers(containers);\r\n containers = (0,_send_containers_to_grid_js__WEBPACK_IMPORTED_MODULE_11__.sendContainersToGrid)(containers, expMax, containerDim);\r\n if (typeof _debug_ !== 'undefined') {\r\n _debug_.generated.elems.container = containers;\r\n }\r\n // Add the other half of the intersections too - all intersections has \r\n // exactly one opposite curve intersection (t values come in pairs)\r\n // Also, set inOuts on each container, and debugging idx\r\n let ioIdx = 0;\r\n //containers.reverse(); // TODO - REMOVE THIS LINE !!! <---\r\n for (let container of containers) {\r\n for (let x of container.xs) {\r\n x.container = container;\r\n }\r\n let inOuts;\r\n ({ inOuts, ioIdx } = (0,_get_container_in_outs_get_container_in_outs_js__WEBPACK_IMPORTED_MODULE_4__.getContainerInOuts)(container, ioIdx));\r\n container.inOuts = inOuts;\r\n }\r\n // remove xs not belonging to a container (caused by filterContainers)\r\n xPairs = xPairs.filter(x => x[0].container);\r\n (0,_get_critical_points_set_intersection_next_values_js__WEBPACK_IMPORTED_MODULE_6__.setIntersectionNextValues)(xPairs);\r\n // Connect container ins and outs\r\n for (let container of containers) {\r\n for (let out of container.inOuts) {\r\n if (out.dir === -1) {\r\n continue;\r\n }\r\n let _x_ = out._x_;\r\n // move to next 'in' _X_\r\n while (true) {\r\n _x_ = _x_.next;\r\n if (_x_.in_) {\r\n break;\r\n }\r\n }\r\n out.next = _x_.in_;\r\n out.idx = out.next.idx;\r\n }\r\n }\r\n // set next and prev around container for each inout for each container\r\n for (let container of containers) {\r\n let inOuts = container.inOuts;\r\n let prevInOut = inOuts[inOuts.length - 1];\r\n for (let i = 0; i < inOuts.length; i++) {\r\n let inOut = inOuts[i];\r\n inOut.prevAround = prevInOut;\r\n prevInOut.nextAround = inOut;\r\n prevInOut = inOut;\r\n }\r\n }\r\n return { extremes, containers };\r\n}\r\n/**\r\n * Returns the containers that is the given containers filtered so that those\r\n * having only interface intersections or only a single (giben as a pair) even\r\n * multiple intersection are not included.\r\n * @param containers\r\n */\r\nfunction filterContainers(containers) {\r\n let containers_ = containers.filter(container => {\r\n let xs = container.xs;\r\n if (container.xs.length === 2) {\r\n let _x_ = xs[0];\r\n if (_x_.x.kind === 1 && _x_.x.ri.multiplicity % 2 === 0) {\r\n // multiple even intersection - exclude\r\n return false;\r\n }\r\n }\r\n for (let x of container.xs) {\r\n if (x.x.kind !== 4) {\r\n // include container if any _X_ is not an interface\r\n return true;\r\n }\r\n }\r\n return false; // exclude container\r\n });\r\n return containers_;\r\n}\r\nfunction getLeftMost(container) {\r\n return container.box[0][0];\r\n}\r\nfunction getRightMost(container) {\r\n return container.box[1][0];\r\n}\r\n\r\n//# sourceMappingURL=get-containers.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-containers.js?");
3990
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getContainers\": () => (/* binding */ getContainers)\n/* harmony export */ });\n/* harmony import */ var _are_containers_intersecting_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./are-containers-intersecting.js */ \"./node_modules/flo-boolean/node/calc-containers/are-containers-intersecting.js\");\n/* harmony import */ var _graph_get_connected_components_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../graph/get-connected-components.js */ \"./node_modules/flo-boolean/node/graph/get-connected-components.js\");\n/* harmony import */ var _get_isolated_containers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-isolated-containers.js */ \"./node_modules/flo-boolean/node/calc-containers/get-isolated-containers.js\");\n/* harmony import */ var _merge_containers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./merge-containers.js */ \"./node_modules/flo-boolean/node/calc-containers/merge-containers.js\");\n/* harmony import */ var _get_container_in_outs_get_container_in_outs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get-container-in-outs/get-container-in-outs.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-container-in-outs.js\");\n/* harmony import */ var _get_critical_points_get_intersections_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../get-critical-points/get-intersections.js */ \"./node_modules/flo-boolean/node/get-critical-points/get-intersections.js\");\n/* harmony import */ var _get_critical_points_set_intersection_next_values_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../get-critical-points/set-intersection-next-values.js */ \"./node_modules/flo-boolean/node/get-critical-points/set-intersection-next-values.js\");\n/* harmony import */ var _sweep_line_sweep_line_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../sweep-line/sweep-line.js */ \"./node_modules/flo-boolean/node/sweep-line/sweep-line.js\");\n/* harmony import */ var _get_critical_points_get_self_intersections_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../get-critical-points/get-self-intersections.js */ \"./node_modules/flo-boolean/node/get-critical-points/get-self-intersections.js\");\n/* harmony import */ var _get_critical_points_get_interface_intersections_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../get-critical-points/get-interface-intersections.js */ \"./node_modules/flo-boolean/node/get-critical-points/get-interface-intersections.js\");\n/* harmony import */ var _get_critical_points_get_extremes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../get-critical-points/get-extremes.js */ \"./node_modules/flo-boolean/node/get-critical-points/get-extremes.js\");\n/* harmony import */ var _send_containers_to_grid_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./send-containers-to-grid.js */ \"./node_modules/flo-boolean/node/calc-containers/send-containers-to-grid.js\");\n/* harmony import */ var _get_container_in_outs_get_in_outs_via_sides_compare_in_out_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./get-container-in-outs/get-in-outs-via-sides/compare-in-out.js */ \"./node_modules/flo-boolean/node/calc-containers/get-container-in-outs/get-in-outs-via-sides/compare-in-out.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n *\r\n * @param containerDim\r\n */\r\nfunction getContainers(loops, containerDim, expMax) {\r\n //let t0 = performance.now();\r\n let xs1 = (0,_get_critical_points_get_intersections_js__WEBPACK_IMPORTED_MODULE_5__.getIntersections)(loops, expMax);\r\n //let t1 = performance.now();\r\n //console.log(\"intersections took \" + ((t1 - t0)).toFixed(3) + \" milliseconds.\");\r\n let xs2 = (0,_get_critical_points_get_self_intersections_js__WEBPACK_IMPORTED_MODULE_8__.getSelfIntersections)(loops);\r\n let xs3 = (0,_get_critical_points_get_interface_intersections_js__WEBPACK_IMPORTED_MODULE_9__.getInterfaceIntersections)(loops);\r\n let { extremes, xs: xs4 } = (0,_get_critical_points_get_extremes_js__WEBPACK_IMPORTED_MODULE_10__.getExtremes)(loops);\r\n let xPairs = [...xs1, ...xs2, ...xs3, ...xs4];\r\n //console.log('general ', xs1);\r\n //console.log('self ', xs2);\r\n //console.log('interface', xs3);\r\n //console.log('topmost ', xs4);\r\n if (typeof _debug_ !== 'undefined') {\r\n for (let xPair of xs1) {\r\n _debug_.generated.elems.intersection.push(...xPair);\r\n }\r\n for (let xPair of xs2) {\r\n _debug_.generated.elems.intersection.push(...xPair);\r\n }\r\n // TODO - are interface intersections really necessary?\r\n for (let xPair of xs3) {\r\n _debug_.generated.elems.intersection.push(...xPair);\r\n }\r\n for (let xPair of xs4) {\r\n _debug_.generated.elems.intersection.push(...xPair);\r\n }\r\n }\r\n // initialize the containers with one of the one-sided intersections\r\n // console.log(xPairs)\r\n let containers = xPairs.map(xPair => ({\r\n xs: xPair,\r\n box: [\r\n // TODO xs[0].box -> combine xs[0] and xs[1] boxes\r\n [xPair[0].x.box[0][0] - containerDim, xPair[0].x.box[0][1] - containerDim],\r\n [xPair[0].x.box[1][0] + containerDim, xPair[0].x.box[1][1] + containerDim]\r\n ],\r\n inOuts: undefined // to be set later\r\n }));\r\n // iterate, combining containers that overlap on each iteration \r\n while (true) {\r\n /** container intersections as an array of Container pairs */\r\n let is = (0,_sweep_line_sweep_line_js__WEBPACK_IMPORTED_MODULE_7__.sweepLine)(containers, getLeftMost, getRightMost, _are_containers_intersecting_js__WEBPACK_IMPORTED_MODULE_0__.areContainersIntersecting);\r\n // if there are no more intersections between containers we're done\r\n if (!is.length) {\r\n break;\r\n }\r\n let graph = new Map();\r\n (0,_graph_get_connected_components_js__WEBPACK_IMPORTED_MODULE_1__.addEdges)(graph, is);\r\n let connectedContainers = (0,_graph_get_connected_components_js__WEBPACK_IMPORTED_MODULE_1__.getConnectedComponents)(graph);\r\n let isolatedContainers = (0,_get_isolated_containers_js__WEBPACK_IMPORTED_MODULE_2__.getIsolatedComponents)(containers, connectedContainers);\r\n containers = [\r\n ...(0,_merge_containers_js__WEBPACK_IMPORTED_MODULE_3__.mergeContainers)(connectedContainers),\r\n ...isolatedContainers\r\n ];\r\n }\r\n containers = filterContainers(containers);\r\n containers = (0,_send_containers_to_grid_js__WEBPACK_IMPORTED_MODULE_11__.sendContainersToGrid)(containers, expMax, containerDim);\r\n if (typeof _debug_ !== 'undefined') {\r\n _debug_.generated.elems.container = containers;\r\n }\r\n // Add the other half of the intersections too - all intersections has \r\n // exactly one opposite curve intersection (t values come in pairs)\r\n // Also, set inOuts on each container, and `idx`\r\n let ioIdx = 0;\r\n for (let container of containers) {\r\n for (let x of container.xs) {\r\n x.container = container;\r\n }\r\n let inOuts;\r\n ({ inOuts, ioIdx } = (0,_get_container_in_outs_get_container_in_outs_js__WEBPACK_IMPORTED_MODULE_4__.getContainerInOuts)(container, ioIdx));\r\n container.inOuts = inOuts;\r\n }\r\n // remove xs not belonging to a container (caused by filterContainers)\r\n xPairs = xPairs.filter(x => x[0].container !== undefined);\r\n (0,_get_critical_points_set_intersection_next_values_js__WEBPACK_IMPORTED_MODULE_6__.setIntersectionNextValues)(xPairs);\r\n // Connect container ins and outs\r\n for (let container of containers) {\r\n for (let out of container.inOuts) {\r\n if (out.dir === -1) {\r\n continue;\r\n }\r\n let _x_ = out._x_;\r\n // move to next 'in' __X__\r\n while (true) {\r\n _x_ = _x_.next;\r\n if (_x_.in_ !== undefined) {\r\n break;\r\n }\r\n }\r\n out.next = _x_.in_;\r\n out.idx = out.next.idx;\r\n }\r\n }\r\n for (let container of containers) {\r\n container.inOuts.sort(_get_container_in_outs_get_in_outs_via_sides_compare_in_out_js__WEBPACK_IMPORTED_MODULE_12__.compareOrderedInOut);\r\n }\r\n // set `next` and `prev` around container for each `inOut` for each `container`\r\n for (let container of containers) {\r\n let inOuts = container.inOuts;\r\n let prevInOut = inOuts[inOuts.length - 1];\r\n for (let i = 0; i < inOuts.length; i++) {\r\n let inOut = inOuts[i];\r\n inOut.prevAround = prevInOut;\r\n prevInOut.nextAround = inOut;\r\n prevInOut = inOut;\r\n }\r\n }\r\n return { extremes, containers };\r\n}\r\n/**\r\n * Returns the containers that is the given containers filtered so that those\r\n * having only interface intersections or only a single (given as a pair) even\r\n * multiple intersection are not included.\r\n * @param containers\r\n */\r\nfunction filterContainers(containers) {\r\n let containers_ = containers.filter(container => {\r\n let xs = container.xs;\r\n if (container.xs.length === 2) {\r\n let _x_ = xs[0];\r\n if (_x_.x.kind === 1 && _x_.x.ri.multiplicity % 2 === 0) {\r\n // multiple even intersection - exclude\r\n return false;\r\n }\r\n }\r\n for (let x of container.xs) {\r\n if (x.x.kind !== 4) {\r\n // include container if any __X__ is not an interface\r\n return true;\r\n }\r\n }\r\n return false; // exclude container\r\n });\r\n return containers_;\r\n}\r\nfunction getLeftMost(container) {\r\n return container.box[0][0];\r\n}\r\nfunction getRightMost(container) {\r\n return container.box[1][0];\r\n}\r\n\r\n//# sourceMappingURL=get-containers.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-containers/get-containers.js?");
4211
3991
 
4212
3992
  /***/ }),
4213
3993
 
@@ -4247,7 +4027,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4247
4027
  \*******************************************************************/
4248
4028
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4249
4029
 
4250
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"completeLoop\": () => (/* binding */ completeLoop)\n/* harmony export */ });\n/* harmony import */ var flo_bezier3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-bezier3 */ \"./node_modules/flo-bezier3/node/index.js\");\n/* harmony import */ var flo_poly__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flo-poly */ \"./node_modules/flo-poly/node/index.js\");\n/* harmony import */ var _get_next_exit_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-next-exit.js */ \"./node_modules/flo-boolean/node/calc-paths/get-next-exit.js\");\n/* harmony import */ var _get_beziers_to_next_container_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./get-beziers-to-next-container.js */ \"./node_modules/flo-boolean/node/calc-paths/get-beziers-to-next-container.js\");\n\r\n\r\n\r\n\r\n/**\r\n * Completes a loop for a specific intersection point entry curve.\r\n * @param expMax\r\n * @param takenOuts\r\n * @param out\r\n */\r\nfunction completeLoop(expMax, takenOuts, out) {\r\n let additionalOutsToCheck = [];\r\n let beziers = [];\r\n // Move immediately to the outgoing start of the loop\r\n let out_ = out;\r\n let additionalBezier;\r\n let ii = 0; // TODO - remove\r\n do {\r\n takenOuts.add(out_); // Mark this intersection as taken\r\n let { beziers: additionalBeziers, in_, inBez } = (0,_get_beziers_to_next_container_js__WEBPACK_IMPORTED_MODULE_3__.getBeziersToNextContainer)(expMax, out_);\r\n // TODO - it will probably better to remove additionalBeziers and just\r\n // connect the endpoints of adjacent beziers - even if we had near\r\n // exact coordinates (think quad or better precision) of intersections\r\n // they are still not returned as algebraic numbers so we can never have\r\n // a perfect algorithm anyway without returning algebraic numbers as \r\n // intersection coordinates, hence we might as well remove \r\n // additionalBeziers whose length is about a trillionth of the max\r\n // coordinate of loops\r\n beziers.push(...additionalBeziers);\r\n ({ out_, additionalBezier } = (0,_get_next_exit_js__WEBPACK_IMPORTED_MODULE_2__.getNextExit)(expMax, in_, out, additionalOutsToCheck, takenOuts));\r\n if (additionalBezier) {\r\n let t = (0,flo_poly__WEBPACK_IMPORTED_MODULE_1__.mid)((0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.closestPointOnBezierCertified)(inBez, additionalBezier[0])[0].ri);\r\n let inBez_ = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.fromTo)(inBez, 0, t);\r\n beziers.push(inBez_);\r\n beziers.push(additionalBezier);\r\n }\r\n else {\r\n beziers.push(inBez);\r\n }\r\n } while (out_ !== out /* && ii++ < 100*/);\r\n return { beziers, additionalOutsToCheck };\r\n}\r\n\r\n//# sourceMappingURL=complete-loop.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-paths/complete-loop.js?");
4030
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"completeLoop\": () => (/* binding */ completeLoop)\n/* harmony export */ });\n/* harmony import */ var flo_bezier3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-bezier3 */ \"./node_modules/flo-bezier3/node/index.js\");\n/* harmony import */ var flo_poly__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flo-poly */ \"./node_modules/flo-poly/node/index.js\");\n/* harmony import */ var _get_next_exit_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-next-exit.js */ \"./node_modules/flo-boolean/node/calc-paths/get-next-exit.js\");\n/* harmony import */ var _get_beziers_to_next_container_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./get-beziers-to-next-container.js */ \"./node_modules/flo-boolean/node/calc-paths/get-beziers-to-next-container.js\");\n\r\n\r\n\r\n\r\n/**\r\n * Completes a loop for a specific intersection point entry curve.\r\n * @param expMax\r\n * @param takenOuts\r\n * @param out\r\n */\r\nfunction completeLoop(expMax, takenOuts, out) {\r\n let additionalOutsToCheck = [];\r\n let beziers = [];\r\n // Move immediately to the outgoing start of the loop\r\n let out_ = out;\r\n let additionalBezier;\r\n do {\r\n takenOuts.add(out_); // Mark this intersection as taken\r\n let { beziers: additionalBeziers, in_, inBez } = (0,_get_beziers_to_next_container_js__WEBPACK_IMPORTED_MODULE_3__.getBeziersToNextContainer)(expMax, out_);\r\n // TODO - it will probably better to remove additionalBeziers and just\r\n // connect the endpoints of adjacent beziers - even if we had near\r\n // exact coordinates (think quad or better precision) of intersections\r\n // they are still not returned as algebraic numbers so we can never have\r\n // a perfect algorithm anyway without returning algebraic numbers as \r\n // intersection coordinates, hence we might as well remove \r\n // additionalBeziers whose length is about a trillionth of the max\r\n // coordinate of loops\r\n beziers.push(...additionalBeziers);\r\n ({ out_, additionalBezier } = (0,_get_next_exit_js__WEBPACK_IMPORTED_MODULE_2__.getNextExit)(expMax, in_, out, additionalOutsToCheck, takenOuts));\r\n if (additionalBezier) {\r\n let t = (0,flo_poly__WEBPACK_IMPORTED_MODULE_1__.mid)((0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.closestPointOnBezierCertified)(inBez, additionalBezier[0])[0].ri);\r\n let inBez_ = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.fromTo)(inBez, 0, t);\r\n beziers.push(inBez_);\r\n beziers.push(additionalBezier);\r\n }\r\n else {\r\n beziers.push(inBez);\r\n }\r\n } while (out_ !== out /* && ii++ < 100*/);\r\n return { beziers, additionalOutsToCheck };\r\n}\r\n\r\n//# sourceMappingURL=complete-loop.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-paths/complete-loop.js?");
4251
4031
 
4252
4032
  /***/ }),
4253
4033
 
@@ -4337,7 +4117,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4337
4117
  \********************************************************************/
4338
4118
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4339
4119
 
4340
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"simplifyPaths\": () => (/* binding */ simplifyPaths)\n/* harmony export */ });\n/* harmony import */ var flo_bezier3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-bezier3 */ \"./node_modules/flo-bezier3/node/index.js\");\n/* harmony import */ var _complete_path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./complete-path.js */ \"./node_modules/flo-boolean/node/calc-paths/complete-path.js\");\n/* harmony import */ var _get_tightest_containing_loop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-tightest-containing-loop.js */ \"./node_modules/flo-boolean/node/calc-paths/get-tightest-containing-loop.js\");\n/* harmony import */ var _order_loop_ascending_by_min_y_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order-loop-ascending-by-min-y.js */ \"./node_modules/flo-boolean/node/calc-paths/order-loop-ascending-by-min-y.js\");\n/* harmony import */ var _split_loop_trees_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./split-loop-trees.js */ \"./node_modules/flo-boolean/node/calc-paths/split-loop-trees.js\");\n/* harmony import */ var _get_loops_from_tree_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./get-loops-from-tree.js */ \"./node_modules/flo-boolean/node/calc-paths/get-loops-from-tree.js\");\n/* harmony import */ var _calc_containers_get_containers_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../calc-containers/get-containers.js */ \"./node_modules/flo-boolean/node/calc-containers/get-containers.js\");\n/* harmony import */ var _get_outermost_in_and_out_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./get-outermost-in-and-out.js */ \"./node_modules/flo-boolean/node/calc-paths/get-outermost-in-and-out.js\");\n/* harmony import */ var _loop_reverse_orientation_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../loop/reverse-orientation.js */ \"./node_modules/flo-boolean/node/loop/reverse-orientation.js\");\n/* harmony import */ var _loop_loop_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../loop/loop.js */ \"./node_modules/flo-boolean/node/loop/loop.js\");\n/* harmony import */ var _loop_normalize_normalize_loop_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../loop/normalize/normalize-loop.js */ \"./node_modules/flo-boolean/node/loop/normalize/normalize-loop.js\");\n/* harmony import */ var _loop_normalize_get_max_coordinate_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../loop/normalize/get-max-coordinate.js */ \"./node_modules/flo-boolean/node/loop/normalize/get-max-coordinate.js\");\n/* harmony import */ var _loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../loop/get-loop-area.js */ \"./node_modules/flo-boolean/node/loop/get-loop-area.js\");\n/* harmony import */ var _svg_loops_to_svg_path_str_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../svg/loops-to-svg-path-str.js */ \"./node_modules/flo-boolean/node/svg/loops-to-svg-path-str.js\");\n/* harmony import */ var _get_bounding_box_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../get-bounding-box-.js */ \"./node_modules/flo-boolean/node/get-bounding-box-.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Uses the algorithm of Lavanya Subramaniam: PARTITION OF A NON-SIMPLE POLYGON\r\n * INTO SIMPLE POLYGONS;\r\n *\r\n * see http://www.cis.southalabama.edu/~hain/general/Theses/Subramaniam_thesis.pdf\r\n * but modified to use bezier curves (as opposed to polygons) and to additionally\r\n * take care of paths with multiple subpaths, i.e. such as disjoint nested paths.\r\n *\r\n * Also takes care of all special cases.\r\n *\r\n * @param loops an array of possibly intersecting paths\r\n * @param maxCoordinate optional - if not provided, it will be calculated - a\r\n * wrong value could cause the algorithm to fail\r\n */\r\nfunction simplifyPaths(bezierLoops, maxCoordinate) {\r\n let timingStart;\r\n if (typeof _debug_ !== 'undefined') {\r\n timingStart = performance.now();\r\n }\r\n /**\r\n * All bezier coordinates will be truncated to this (bit-aligned) bitlength.\r\n * Higher bitlengths would increase the running time of the algorithm\r\n * considerably.\r\n */\r\n let maxBitLength = 46;\r\n maxCoordinate = maxCoordinate || (0,_loop_normalize_get_max_coordinate_js__WEBPACK_IMPORTED_MODULE_11__.getMaxCoordinate)(bezierLoops);\r\n /** The exponent, e, such that 2**e >= all bezier coordinate points. */\r\n let expMax = Math.ceil(Math.log2(maxCoordinate));\r\n let gridSpacing = 2 ** expMax * 2 ** (-maxBitLength);\r\n /**\r\n * A size (based on the max value of the tangent) for the containers holding\r\n * critical points.\r\n */\r\n const containerSizeMultiplier = 2 ** 4;\r\n //const containerSizeMultiplier = 2**39;\r\n let containerDim = gridSpacing * containerSizeMultiplier;\r\n bezierLoops = (0,_loop_normalize_normalize_loop_js__WEBPACK_IMPORTED_MODULE_10__.normalizeLoops)(bezierLoops, maxBitLength, expMax, false, true);\r\n addDebugInfo1(bezierLoops);\r\n bezierLoops.sort(_order_loop_ascending_by_min_y_js__WEBPACK_IMPORTED_MODULE_3__.orderLoopAscendingByMinY);\r\n // console.log(bezierLoops);\r\n let loops = bezierLoops.map((loop, i) => (0,_loop_loop_js__WEBPACK_IMPORTED_MODULE_9__.loopFromBeziers)(loop, i));\r\n let { extremes } = (0,_calc_containers_get_containers_js__WEBPACK_IMPORTED_MODULE_6__.getContainers)(loops, containerDim, expMax);\r\n let root = createRootInOut();\r\n let takenLoops = new Set();\r\n let takenOuts = new Set(); // Taken intersections\r\n // throw 'a';\r\n // debugger;\r\n for (let loop of loops) {\r\n if (takenLoops.has(loop)) {\r\n continue;\r\n }\r\n takenLoops.add(loop);\r\n let parent = (0,_get_tightest_containing_loop_js__WEBPACK_IMPORTED_MODULE_2__.getTightestContainingLoop)(root, loop);\r\n let container = extremes.get(loop)[0].container;\r\n if (!container.inOuts.length) {\r\n continue;\r\n }\r\n let initialOut = (0,_get_outermost_in_and_out_js__WEBPACK_IMPORTED_MODULE_7__.getOutermostInAndOut)(container);\r\n // Each loop generated will give rise to one componentLoop. \r\n initialOut.parent = parent;\r\n initialOut.windingNum = parent.windingNum + initialOut.orientation;\r\n initialOut.children = new Set();\r\n (0,_complete_path_js__WEBPACK_IMPORTED_MODULE_1__.completePath)(expMax, (0,_get_outermost_in_and_out_js__WEBPACK_IMPORTED_MODULE_7__.getOutermostInAndOut)(container), takenLoops, takenOuts);\r\n }\r\n let loopTrees = (0,_split_loop_trees_js__WEBPACK_IMPORTED_MODULE_4__.splitLoopTrees)(root);\r\n let outSets = loopTrees.map(_get_loops_from_tree_js__WEBPACK_IMPORTED_MODULE_5__.getLoopsFromTree);\r\n let loopss = outSets.map(outSet => outSet.map(out => loopFromOut(out, outSet[0].orientation)));\r\n /**\r\n * Arbitrarily choose min. loop area to be equal to one square pixel on a\r\n * 4096 x 4096 grid.\r\n */\r\n let minLoopArea = (2 ** expMax * 2 ** (-12)) ** 2;\r\n let loopss_ = [];\r\n for (let i = 0; i < loopss.length; i++) {\r\n let loops = loopss[i].filter((loop) => Math.abs((0,_loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_12__.getLoopArea)(loop)) > minLoopArea);\r\n if (loops.length) {\r\n loops.sort((loopA, loopB) => {\r\n return (0,_order_loop_ascending_by_min_y_js__WEBPACK_IMPORTED_MODULE_3__.orderLoopAscendingByMinY)(loopA.beziers, loopB.beziers);\r\n });\r\n loopss_.push(loops);\r\n }\r\n }\r\n addDebugInfo2(loopss_);\r\n if (typeof _debug_ !== 'undefined') {\r\n const timing = _debug_.generated.timing;\r\n timing.simplifyPaths = performance.now() - timingStart;\r\n }\r\n return loopss_;\r\n}\r\nfunction loopFromOut(out, orientation) {\r\n let loop = orientation < 0\r\n ? (0,_loop_loop_js__WEBPACK_IMPORTED_MODULE_9__.loopFromBeziers)(out.beziers)\r\n : (0,_loop_reverse_orientation_js__WEBPACK_IMPORTED_MODULE_8__.reverseOrientation)((0,_loop_loop_js__WEBPACK_IMPORTED_MODULE_9__.loopFromBeziers)(out.beziers));\r\n return loop;\r\n}\r\nfunction addDebugInfo2(loopss) {\r\n if (typeof _debug_ === 'undefined') {\r\n return;\r\n }\r\n for (let loops of loopss) {\r\n _debug_.generated.elems.loop.push(...loops);\r\n _debug_.generated.elems.loops.push(loops);\r\n //console.log(loopsToSvgPathStr(loops.map(loop => loop.beziers)));\r\n }\r\n}\r\nfunction addDebugInfo1(loops) {\r\n if (typeof _debug_ === 'undefined') {\r\n return;\r\n }\r\n // Modifies the displayed SVG to reflect changes caused by `normalizeLoops`.\r\n if (typeof document !== 'undefined') {\r\n let pathStr = (0,_svg_loops_to_svg_path_str_js__WEBPACK_IMPORTED_MODULE_13__.loopsToSvgPathStr)(loops);\r\n let $svg = document.getElementsByClassName('shape')[0];\r\n $svg.setAttributeNS(null, 'd', pathStr);\r\n }\r\n for (let loop of loops) {\r\n _debug_.generated.elems.loopPre.push(...loops);\r\n _debug_.generated.elems.loopsPre.push(loops);\r\n for (let ps of loop) {\r\n let lbb = (0,_get_bounding_box_js__WEBPACK_IMPORTED_MODULE_14__.getBoundingBox_)(ps);\r\n let tbb = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.getBoundingBoxTight)(ps);\r\n let bhull = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.getBoundingHull)(ps);\r\n _debug_.generated.elems.bezier_.push(ps);\r\n _debug_.generated.elems.looseBoundingBox_.push(lbb);\r\n _debug_.generated.elems.tightBoundingBox_.push(tbb);\r\n _debug_.generated.elems.boundingHull_.push(bhull);\r\n }\r\n }\r\n}\r\nfunction createRootInOut() {\r\n return {\r\n dir: undefined,\r\n idx: 0,\r\n parent: undefined,\r\n children: new Set(),\r\n windingNum: 0,\r\n p: undefined,\r\n _x_: undefined,\r\n container: undefined\r\n };\r\n}\r\n\r\n// TODO - Handle case where bezier tangentially touches container edge. \r\n// Simply move the container boundary 1/8th or 1/16th inward and try again. \r\n// This case is truly extremely rare and not hard to fix completely.\r\n//# sourceMappingURL=simplify-paths.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-paths/simplify-paths.js?");
4120
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"simplifyPaths\": () => (/* binding */ simplifyPaths)\n/* harmony export */ });\n/* harmony import */ var flo_bezier3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-bezier3 */ \"./node_modules/flo-bezier3/node/index.js\");\n/* harmony import */ var _complete_path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./complete-path.js */ \"./node_modules/flo-boolean/node/calc-paths/complete-path.js\");\n/* harmony import */ var _get_tightest_containing_loop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./get-tightest-containing-loop.js */ \"./node_modules/flo-boolean/node/calc-paths/get-tightest-containing-loop.js\");\n/* harmony import */ var _order_loop_ascending_by_min_y_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order-loop-ascending-by-min-y.js */ \"./node_modules/flo-boolean/node/calc-paths/order-loop-ascending-by-min-y.js\");\n/* harmony import */ var _split_loop_trees_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./split-loop-trees.js */ \"./node_modules/flo-boolean/node/calc-paths/split-loop-trees.js\");\n/* harmony import */ var _get_loops_from_tree_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./get-loops-from-tree.js */ \"./node_modules/flo-boolean/node/calc-paths/get-loops-from-tree.js\");\n/* harmony import */ var _calc_containers_get_containers_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../calc-containers/get-containers.js */ \"./node_modules/flo-boolean/node/calc-containers/get-containers.js\");\n/* harmony import */ var _get_outermost_in_and_out_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./get-outermost-in-and-out.js */ \"./node_modules/flo-boolean/node/calc-paths/get-outermost-in-and-out.js\");\n/* harmony import */ var _loop_reverse_orientation_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../loop/reverse-orientation.js */ \"./node_modules/flo-boolean/node/loop/reverse-orientation.js\");\n/* harmony import */ var _loop_loop_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../loop/loop.js */ \"./node_modules/flo-boolean/node/loop/loop.js\");\n/* harmony import */ var _loop_normalize_normalize_loop_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../loop/normalize/normalize-loop.js */ \"./node_modules/flo-boolean/node/loop/normalize/normalize-loop.js\");\n/* harmony import */ var _loop_normalize_get_max_coordinate_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../loop/normalize/get-max-coordinate.js */ \"./node_modules/flo-boolean/node/loop/normalize/get-max-coordinate.js\");\n/* harmony import */ var _loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../loop/get-loop-area.js */ \"./node_modules/flo-boolean/node/loop/get-loop-area.js\");\n/* harmony import */ var _svg_loops_to_svg_path_str_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../svg/loops-to-svg-path-str.js */ \"./node_modules/flo-boolean/node/svg/loops-to-svg-path-str.js\");\n/* harmony import */ var _get_bounding_box_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../get-bounding-box-.js */ \"./node_modules/flo-boolean/node/get-bounding-box-.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Uses the algorithm of Lavanya Subramaniam: PARTITION OF A NON-SIMPLE POLYGON\r\n * INTO SIMPLE POLYGONS;\r\n *\r\n * see http://www.cis.southalabama.edu/~hain/general/Theses/Subramaniam_thesis.pdf\r\n * but modified to use bezier curves (as opposed to polygons) and to additionally\r\n * take care of paths with multiple subpaths, i.e. such as disjoint nested paths.\r\n *\r\n * Also takes care of all special cases.\r\n *\r\n * @param loops an array of possibly intersecting paths\r\n * @param maxCoordinate optional - if not provided, it will be calculated - a\r\n * wrong value could cause the algorithm to fail\r\n */\r\nfunction simplifyPaths(bezierLoops, maxCoordinate) {\r\n let timingStart;\r\n if (typeof _debug_ !== 'undefined') {\r\n timingStart = performance.now();\r\n }\r\n /**\r\n * All bezier coordinates will be truncated to this (bit-aligned) bitlength.\r\n * Higher bitlengths would increase the running time of the algorithm\r\n * considerably.\r\n */\r\n let maxBitLength = 46;\r\n maxCoordinate = maxCoordinate || (0,_loop_normalize_get_max_coordinate_js__WEBPACK_IMPORTED_MODULE_11__.getMaxCoordinate)(bezierLoops);\r\n /** The exponent, e, such that 2**e >= all bezier coordinate points. */\r\n let expMax = Math.ceil(Math.log2(maxCoordinate));\r\n let gridSpacing = 2 ** expMax * 2 ** (-maxBitLength);\r\n /**\r\n * A size (based on the max value of the tangent) for the containers holding\r\n * critical points.\r\n */\r\n const containerSizeMultiplier = 2 ** 4;\r\n //const containerSizeMultiplier = 2**39;\r\n let containerDim = gridSpacing * containerSizeMultiplier;\r\n bezierLoops = (0,_loop_normalize_normalize_loop_js__WEBPACK_IMPORTED_MODULE_10__.normalizeLoops)(bezierLoops, maxBitLength, expMax, false, true);\r\n addDebugInfo1(bezierLoops);\r\n bezierLoops.sort(_order_loop_ascending_by_min_y_js__WEBPACK_IMPORTED_MODULE_3__.orderLoopAscendingByMinY);\r\n let loops = bezierLoops.map((loop, i) => (0,_loop_loop_js__WEBPACK_IMPORTED_MODULE_9__.loopFromBeziers)(loop, i));\r\n let { extremes } = (0,_calc_containers_get_containers_js__WEBPACK_IMPORTED_MODULE_6__.getContainers)(loops, containerDim, expMax);\r\n let root = createRootInOut();\r\n let takenLoops = new Set();\r\n let takenOuts = new Set(); // Taken intersections\r\n for (let loop of loops) {\r\n if (takenLoops.has(loop)) {\r\n continue;\r\n }\r\n takenLoops.add(loop);\r\n let parent = (0,_get_tightest_containing_loop_js__WEBPACK_IMPORTED_MODULE_2__.getTightestContainingLoop)(root, loop);\r\n let container = extremes.get(loop)[0].container;\r\n if (!container.inOuts.length) {\r\n continue;\r\n }\r\n let initialOut = (0,_get_outermost_in_and_out_js__WEBPACK_IMPORTED_MODULE_7__.getOutermostInAndOut)(container);\r\n // Each loop generated will give rise to one componentLoop. \r\n initialOut.parent = parent;\r\n initialOut.windingNum = parent.windingNum + initialOut.orientation;\r\n initialOut.children = new Set();\r\n (0,_complete_path_js__WEBPACK_IMPORTED_MODULE_1__.completePath)(expMax, (0,_get_outermost_in_and_out_js__WEBPACK_IMPORTED_MODULE_7__.getOutermostInAndOut)(container), takenLoops, takenOuts);\r\n }\r\n let loopTrees = (0,_split_loop_trees_js__WEBPACK_IMPORTED_MODULE_4__.splitLoopTrees)(root);\r\n let outSets = loopTrees.map(_get_loops_from_tree_js__WEBPACK_IMPORTED_MODULE_5__.getLoopsFromTree);\r\n let loopss = outSets.map(outSet => outSet.map(out => loopFromOut(out, outSet[0].orientation)));\r\n /**\r\n * Arbitrarily choose min. loop area to be equal to one square pixel on a\r\n * 4096 x 4096 grid.\r\n */\r\n let minLoopArea = (2 ** expMax * 2 ** (-12)) ** 2;\r\n let loopss_ = [];\r\n for (let i = 0; i < loopss.length; i++) {\r\n let loops = loopss[i].filter((loop) => Math.abs((0,_loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_12__.getLoopArea)(loop)) > minLoopArea);\r\n if (loops.length) {\r\n loops.sort((loopA, loopB) => {\r\n return (0,_order_loop_ascending_by_min_y_js__WEBPACK_IMPORTED_MODULE_3__.orderLoopAscendingByMinY)(loopA.beziers, loopB.beziers);\r\n });\r\n loopss_.push(loops);\r\n }\r\n }\r\n addDebugInfo2(loopss_);\r\n if (typeof _debug_ !== 'undefined') {\r\n const timing = _debug_.generated.timing;\r\n timing.simplifyPaths = performance.now() - timingStart;\r\n }\r\n return loopss_;\r\n}\r\nfunction loopFromOut(out, orientation) {\r\n let loop = orientation < 0\r\n ? (0,_loop_loop_js__WEBPACK_IMPORTED_MODULE_9__.loopFromBeziers)(out.beziers)\r\n : (0,_loop_reverse_orientation_js__WEBPACK_IMPORTED_MODULE_8__.reverseOrientation)((0,_loop_loop_js__WEBPACK_IMPORTED_MODULE_9__.loopFromBeziers)(out.beziers));\r\n return loop;\r\n}\r\nfunction addDebugInfo2(loopss) {\r\n if (typeof _debug_ === 'undefined') {\r\n return;\r\n }\r\n for (let loops of loopss) {\r\n _debug_.generated.elems.loop.push(...loops);\r\n _debug_.generated.elems.loops.push(loops);\r\n //console.log(loopsToSvgPathStr(loops.map(loop => loop.beziers)));\r\n }\r\n // Don't delete below commented lines - it is for creating test cases.\r\n // if (typeof document === 'undefined') { return; }\r\n // let g = document.getElementsByTagName('g')[0];\r\n // let invariants = loopss.map(loops => {\r\n // return loops.map(loop => {\r\n // let centroid = getLoopCentroid(loop);\r\n // let area = getLoopArea(loop);\r\n // let bounds = simplifyBounds(getLoopBounds(loop));\r\n // //drawFs.crossHair(g, centroid, 'thin10 red nofill', 1, 0);\r\n // return { centroid, area, bounds };\r\n // });\r\n // });\r\n // console.log(JSON.stringify(invariants, undefined, ' '));\r\n}\r\nfunction addDebugInfo1(loops) {\r\n if (typeof _debug_ === 'undefined') {\r\n return;\r\n }\r\n // Modifies the displayed SVG to reflect changes caused by `normalizeLoops`.\r\n if (typeof document !== 'undefined') {\r\n let pathStr = (0,_svg_loops_to_svg_path_str_js__WEBPACK_IMPORTED_MODULE_13__.loopsToSvgPathStr)(loops);\r\n let $svg = document.getElementsByClassName('shape')[0];\r\n $svg.setAttributeNS(null, 'd', pathStr);\r\n }\r\n for (let loop of loops) {\r\n _debug_.generated.elems.loopPre.push(...loops);\r\n _debug_.generated.elems.loopsPre.push(loops);\r\n for (let ps of loop) {\r\n let lbb = (0,_get_bounding_box_js__WEBPACK_IMPORTED_MODULE_14__.getBoundingBox_)(ps);\r\n let tbb = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.getBoundingBoxTight)(ps);\r\n let bhull = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.getBoundingHull)(ps);\r\n _debug_.generated.elems.bezier_.push(ps);\r\n _debug_.generated.elems.looseBoundingBox_.push(lbb);\r\n _debug_.generated.elems.tightBoundingBox_.push(tbb);\r\n _debug_.generated.elems.boundingHull_.push(bhull);\r\n }\r\n }\r\n}\r\nfunction createRootInOut() {\r\n return {\r\n dir: undefined,\r\n idx: 0,\r\n parent: undefined,\r\n children: new Set(),\r\n windingNum: 0,\r\n p: undefined,\r\n _x_: undefined,\r\n container: undefined\r\n };\r\n}\r\n\r\n// TODO - Handle case where bezier tangentially touches container edge. \r\n// Simply move the container boundary 1/8th or 1/16th inward and try again. \r\n// This case is truly extremely rare and not hard to fix completely.\r\n//# sourceMappingURL=simplify-paths.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/calc-paths/simplify-paths.js?");
4341
4121
 
4342
4122
  /***/ }),
4343
4123
 
@@ -4387,7 +4167,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4387
4167
  \*****************************************************************************/
4388
4168
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4389
4169
 
4390
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawBoundingHull\": () => (/* binding */ drawBoundingHull)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/index.js\");\n\r\n/** @hidden */\r\nfunction drawBoundingHull(g, hull, classes = 'thin5 black nofill', delay = 0) {\r\n let $polygon = flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.polygon(g, hull, classes, delay);\r\n return $polygon;\r\n}\r\n\r\n//# sourceMappingURL=draw-bounding-hull.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-bounding-hull.js?");
4170
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawBoundingHull\": () => (/* binding */ drawBoundingHull)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-draw/node/index.js\");\n\r\n/** @hidden */\r\nfunction drawBoundingHull(g, hull, classes = 'thin5 black nofill', delay = 0) {\r\n let $polygon = flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.polygon(g, hull, classes, delay);\r\n return $polygon;\r\n}\r\n\r\n//# sourceMappingURL=draw-bounding-hull.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-bounding-hull.js?");
4391
4171
 
4392
4172
  /***/ }),
4393
4173
 
@@ -4407,7 +4187,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4407
4187
  \*************************************************************************/
4408
4188
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4409
4189
 
4410
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawContainer\": () => (/* binding */ drawContainer)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/index.js\");\n\r\nfunction drawContainer(g, container, classes, delay = 0) {\r\n let rect = container.box;\r\n let xs = container.xs;\r\n let scale = 0.025;\r\n // intersections\r\n let $circles = [];\r\n for (let i = 0; i < xs.length; i++) {\r\n let x = xs[i];\r\n $circles.push(...flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.circle(g, { center: x.x.box[0], radius: scale }, 'thin2 red nofill', delay));\r\n }\r\n // text showing intersection ordering\r\n let $texts = [];\r\n let inOuts = container.inOuts;\r\n for (let i = 0; i < inOuts.length; i++) {\r\n let inOut = inOuts[i];\r\n // console.log(inOut)\r\n let C = 3;\r\n let p = inOut.p.slice();\r\n //if (inOut.order) {\r\n // if (inOut.order[0] === 3) { p[0] += C; }\r\n // if (inOut.order[0] === 0) { p[1] -= C; }\r\n // if (inOut.order[0] === 1) { p[0] -= 2*C; }\r\n // if (inOut.order[0] === 2) { p[1] += 2*C; }\r\n //}\r\n let color = inOut.dir === -1 ? 'red' : 'blue';\r\n //let size = scale * (inOut.dir === -1 ? 0.75 : 1);\r\n let size = scale * (inOut.dir === -1 ? 0.5 : 0.5);\r\n //$texts.push(...drawFs.text(g, p, i.toString(), 4, color, delay));\r\n $circles.push(...flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.dot(g, inOut.p, size, `thin2 ${color}`, delay));\r\n }\r\n // container rect\r\n let $outline = flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.rect(g, rect, 'thin2 blue nofill', delay);\r\n return [...$outline, ...$circles, ...$texts];\r\n}\r\n\r\n//# sourceMappingURL=draw-container.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-container.js?");
4190
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawContainer\": () => (/* binding */ drawContainer)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-draw/node/index.js\");\n\r\nfunction drawContainer(g, container, classes, delay = 0) {\r\n let rect = container.box;\r\n let xs = container.xs;\r\n let scale = 2 ** 0 * 0.0125;\r\n // intersections\r\n let $circles = [];\r\n for (let i = 0; i < xs.length; i++) {\r\n let x = xs[i];\r\n $circles.push(...flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.circle(g, { center: x.x.box[0], radius: scale }, 'thin2 red nofill', delay));\r\n }\r\n // text showing intersection ordering\r\n let $texts = [];\r\n let inOuts = container.inOuts;\r\n for (let i = 0; i < inOuts.length; i++) {\r\n let inOut = inOuts[i];\r\n let p = inOut.p.slice();\r\n let color = inOut.dir === -1 ? 'red' : 'blue';\r\n let size = scale * (1 + (0.5 * i));\r\n if (inOut.idx !== undefined) {\r\n $texts.push(...flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.text(g, p, inOut.idx.toString(), scale * 8, `thin5 nofill ${color}`, delay));\r\n }\r\n $circles.push(...flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.dot(g, inOut.p, size, `thin2 nofill ${color}`, delay));\r\n }\r\n // container rect\r\n let $outline = flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.rect(g, rect, 'thin2 blue nofill', delay);\r\n return [...$outline, ...$circles, ...$texts];\r\n}\r\n\r\n//# sourceMappingURL=draw-container.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-container.js?");
4411
4191
 
4412
4192
  /***/ }),
4413
4193
 
@@ -4417,7 +4197,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4417
4197
  \********************************************************************/
4418
4198
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4419
4199
 
4420
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawElemFunctions\": () => (/* binding */ drawElemFunctions)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/index.js\");\n/* harmony import */ var _draw_min_y_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./draw-min-y.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-min-y.js\");\n/* harmony import */ var _draw_loop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./draw-loop.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loop.js\");\n/* harmony import */ var _draw_loops_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./draw-loops.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loops.js\");\n/* harmony import */ var _draw_intersection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./draw-intersection.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-intersection.js\");\n/* harmony import */ var _draw_container_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./draw-container.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-container.js\");\n/* harmony import */ var _draw_loose_bounding_box_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./draw-loose-bounding-box.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loose-bounding-box.js\");\n/* harmony import */ var _draw_tight_bounding_box_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./draw-tight-bounding-box.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-tight-bounding-box.js\");\n/* harmony import */ var _draw_bounding_hull_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./draw-bounding-hull.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-bounding-hull.js\");\n/* harmony import */ var _draw_loop_pre_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./draw-loop-pre.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loop-pre.js\");\n/* harmony import */ var _draw_loops_pre_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./draw-loops-pre.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loops-pre.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst drawElemFunctions = {\r\n minY: _draw_min_y_js__WEBPACK_IMPORTED_MODULE_1__.drawMinY,\r\n loop: _draw_loop_js__WEBPACK_IMPORTED_MODULE_2__.drawLoop,\r\n loopPre: _draw_loop_pre_js__WEBPACK_IMPORTED_MODULE_9__.drawLoopPre,\r\n loopsPre: _draw_loops_pre_js__WEBPACK_IMPORTED_MODULE_10__.drawLoopsPre,\r\n loops: _draw_loops_js__WEBPACK_IMPORTED_MODULE_3__.drawLoops,\r\n intersection: _draw_intersection_js__WEBPACK_IMPORTED_MODULE_4__.drawIntersection,\r\n container: _draw_container_js__WEBPACK_IMPORTED_MODULE_5__.drawContainer,\r\n bezier_: flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.bezier,\r\n looseBoundingBox_: _draw_loose_bounding_box_js__WEBPACK_IMPORTED_MODULE_6__.drawLooseBoundingBox,\r\n tightBoundingBox_: _draw_tight_bounding_box_js__WEBPACK_IMPORTED_MODULE_7__.drawTightBoundingBox,\r\n boundingHull_: _draw_bounding_hull_js__WEBPACK_IMPORTED_MODULE_8__.drawBoundingHull,\r\n};\r\n\r\n//# sourceMappingURL=draw-elem.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-elem.js?");
4200
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawElemFunctions\": () => (/* binding */ drawElemFunctions)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-draw/node/index.js\");\n/* harmony import */ var _draw_min_y_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./draw-min-y.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-min-y.js\");\n/* harmony import */ var _draw_loop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./draw-loop.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loop.js\");\n/* harmony import */ var _draw_loops_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./draw-loops.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loops.js\");\n/* harmony import */ var _draw_intersection_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./draw-intersection.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-intersection.js\");\n/* harmony import */ var _draw_container_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./draw-container.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-container.js\");\n/* harmony import */ var _draw_loose_bounding_box_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./draw-loose-bounding-box.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loose-bounding-box.js\");\n/* harmony import */ var _draw_tight_bounding_box_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./draw-tight-bounding-box.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-tight-bounding-box.js\");\n/* harmony import */ var _draw_bounding_hull_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./draw-bounding-hull.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-bounding-hull.js\");\n/* harmony import */ var _draw_loop_pre_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./draw-loop-pre.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loop-pre.js\");\n/* harmony import */ var _draw_loops_pre_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./draw-loops-pre.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-loops-pre.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nconst drawElemFunctions = {\r\n minY: _draw_min_y_js__WEBPACK_IMPORTED_MODULE_1__.drawMinY,\r\n loop: _draw_loop_js__WEBPACK_IMPORTED_MODULE_2__.drawLoop,\r\n loopPre: _draw_loop_pre_js__WEBPACK_IMPORTED_MODULE_9__.drawLoopPre,\r\n loopsPre: _draw_loops_pre_js__WEBPACK_IMPORTED_MODULE_10__.drawLoopsPre,\r\n loops: _draw_loops_js__WEBPACK_IMPORTED_MODULE_3__.drawLoops,\r\n intersection: _draw_intersection_js__WEBPACK_IMPORTED_MODULE_4__.drawIntersection,\r\n container: _draw_container_js__WEBPACK_IMPORTED_MODULE_5__.drawContainer,\r\n bezier_: flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.bezier,\r\n looseBoundingBox_: _draw_loose_bounding_box_js__WEBPACK_IMPORTED_MODULE_6__.drawLooseBoundingBox,\r\n tightBoundingBox_: _draw_tight_bounding_box_js__WEBPACK_IMPORTED_MODULE_7__.drawTightBoundingBox,\r\n boundingHull_: _draw_bounding_hull_js__WEBPACK_IMPORTED_MODULE_8__.drawBoundingHull,\r\n};\r\n\r\n//# sourceMappingURL=draw-elem.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-elem.js?");
4421
4201
 
4422
4202
  /***/ }),
4423
4203
 
@@ -4447,7 +4227,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4447
4227
  \********************************************************************/
4448
4228
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4449
4229
 
4450
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawLoop\": () => (/* binding */ drawLoop)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/index.js\");\n/* harmony import */ var _loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../loop/get-loop-area.js */ \"./node_modules/flo-boolean/node/loop/get-loop-area.js\");\n/* harmony import */ var _loop_get_loop_centroid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../loop/get-loop-centroid.js */ \"./node_modules/flo-boolean/node/loop/get-loop-centroid.js\");\n/* harmony import */ var _loop_get_loop_bounds_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../loop/get-loop-bounds.js */ \"./node_modules/flo-boolean/node/loop/get-loop-bounds.js\");\n/* harmony import */ var _loop_simplify_bounds_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../loop/simplify-bounds.js */ \"./node_modules/flo-boolean/node/loop/simplify-bounds.js\");\n/* harmony import */ var _draw_shape_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./draw-shape.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-shape.js\");\n\r\n\r\n\r\n\r\n\r\n\r\nfunction drawLoop(g, loop) {\r\n let centroid = (0,_loop_get_loop_centroid_js__WEBPACK_IMPORTED_MODULE_2__.getLoopCentroid)(loop);\r\n let area = (0,_loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_1__.getLoopArea)(loop);\r\n let bounds = (0,_loop_simplify_bounds_js__WEBPACK_IMPORTED_MODULE_4__.simplifyBounds)((0,_loop_get_loop_bounds_js__WEBPACK_IMPORTED_MODULE_3__.getLoopBounds)(loop));\r\n flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.crossHair(g, centroid, 'thin10 red nofill', 1, 0);\r\n return (0,_draw_shape_js__WEBPACK_IMPORTED_MODULE_5__.drawShape)(g, loop.curves.map(curve => curve.ps), 'red thin10 fill30', undefined);\r\n}\r\n\r\n//# sourceMappingURL=draw-loop.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-loop.js?");
4230
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawLoop\": () => (/* binding */ drawLoop)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-draw/node/index.js\");\n/* harmony import */ var _loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../loop/get-loop-area.js */ \"./node_modules/flo-boolean/node/loop/get-loop-area.js\");\n/* harmony import */ var _loop_get_loop_centroid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../loop/get-loop-centroid.js */ \"./node_modules/flo-boolean/node/loop/get-loop-centroid.js\");\n/* harmony import */ var _loop_get_loop_bounds_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../loop/get-loop-bounds.js */ \"./node_modules/flo-boolean/node/loop/get-loop-bounds.js\");\n/* harmony import */ var _loop_simplify_bounds_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../loop/simplify-bounds.js */ \"./node_modules/flo-boolean/node/loop/simplify-bounds.js\");\n/* harmony import */ var _draw_shape_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./draw-shape.js */ \"./node_modules/flo-boolean/node/debug/draw-elem/draw-shape.js\");\n\r\n\r\n\r\n\r\n\r\n\r\nfunction drawLoop(g, loop) {\r\n let centroid = (0,_loop_get_loop_centroid_js__WEBPACK_IMPORTED_MODULE_2__.getLoopCentroid)(loop);\r\n let area = (0,_loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_1__.getLoopArea)(loop);\r\n let bounds = (0,_loop_simplify_bounds_js__WEBPACK_IMPORTED_MODULE_4__.simplifyBounds)((0,_loop_get_loop_bounds_js__WEBPACK_IMPORTED_MODULE_3__.getLoopBounds)(loop));\r\n flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.crossHair(g, centroid, 'thin10 red nofill', 1, 0);\r\n return (0,_draw_shape_js__WEBPACK_IMPORTED_MODULE_5__.drawShape)(g, loop.curves.map(curve => curve.ps), 'red thin10 fill30', undefined);\r\n}\r\n\r\n//# sourceMappingURL=draw-loop.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-loop.js?");
4451
4231
 
4452
4232
  /***/ }),
4453
4233
 
@@ -4477,7 +4257,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4477
4257
  \**********************************************************************************/
4478
4258
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4479
4259
 
4480
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawLooseBoundingBox\": () => (/* binding */ drawLooseBoundingBox)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/index.js\");\n\r\n/** @hidden */\r\nfunction drawLooseBoundingBox(g, box, classes = 'thin5 brown nofill', delay = 0) {\r\n let [[x0, y0], [x1, y1]] = box;\r\n box = [[x0, y0], [x1, y0], [x1, y1], [x0, y1]];\r\n let $box = flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.polygon(g, box, classes, delay);\r\n return $box;\r\n}\r\n\r\n//# sourceMappingURL=draw-loose-bounding-box.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-loose-bounding-box.js?");
4260
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawLooseBoundingBox\": () => (/* binding */ drawLooseBoundingBox)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-draw/node/index.js\");\n\r\n/** @hidden */\r\nfunction drawLooseBoundingBox(g, box, classes = 'thin5 brown nofill', delay = 0) {\r\n let [[x0, y0], [x1, y1]] = box;\r\n box = [[x0, y0], [x1, y0], [x1, y1], [x0, y1]];\r\n let $box = flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.polygon(g, box, classes, delay);\r\n return $box;\r\n}\r\n\r\n//# sourceMappingURL=draw-loose-bounding-box.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-loose-bounding-box.js?");
4481
4261
 
4482
4262
  /***/ }),
4483
4263
 
@@ -4487,7 +4267,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4487
4267
  \*********************************************************************/
4488
4268
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4489
4269
 
4490
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawMinY\": () => (/* binding */ drawMinY)\n/* harmony export */ });\n/* harmony import */ var flo_bezier3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-bezier3 */ \"./node_modules/flo-bezier3/node/index.js\");\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/index.js\");\n\r\n\r\nfunction drawMinY(g, pos) {\r\n let p = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.evalDeCasteljau)(pos.curve.ps, pos.t);\r\n let ps = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.toCubic)(pos.curve.ps);\r\n //console.log('x: ', getX(ps));\r\n //console.log('y: ', getY(ps));\r\n //console.log('t: ', pos.t);\r\n let $elems = flo_draw__WEBPACK_IMPORTED_MODULE_1__.drawFs.crossHair(g, p, 'red thin10 nofill');\r\n return $elems;\r\n}\r\n\r\n//# sourceMappingURL=draw-min-y.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-min-y.js?");
4270
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawMinY\": () => (/* binding */ drawMinY)\n/* harmony export */ });\n/* harmony import */ var flo_bezier3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-bezier3 */ \"./node_modules/flo-bezier3/node/index.js\");\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-draw/node/index.js\");\n\r\n\r\nfunction drawMinY(g, pos) {\r\n let p = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.evalDeCasteljau)(pos.curve.ps, pos.t);\r\n let ps = (0,flo_bezier3__WEBPACK_IMPORTED_MODULE_0__.toCubic)(pos.curve.ps);\r\n //console.log('x: ', getX(ps));\r\n //console.log('y: ', getY(ps));\r\n //console.log('t: ', pos.t);\r\n let $elems = flo_draw__WEBPACK_IMPORTED_MODULE_1__.drawFs.crossHair(g, p, 'red thin10 nofill');\r\n return $elems;\r\n}\r\n\r\n//# sourceMappingURL=draw-min-y.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-min-y.js?");
4491
4271
 
4492
4272
  /***/ }),
4493
4273
 
@@ -4507,7 +4287,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4507
4287
  \**********************************************************************************/
4508
4288
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4509
4289
 
4510
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawTightBoundingBox\": () => (/* binding */ drawTightBoundingBox)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-boolean/node_modules/flo-draw/node/index.js\");\n\r\n/** @hidden */\r\nfunction drawTightBoundingBox(g, box, classes = 'thin5 pinker nofill', delay = 0) {\r\n let $box = flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.polygon(g, box, classes, delay);\r\n return $box;\r\n}\r\n\r\n//# sourceMappingURL=draw-tight-bounding-box.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-tight-bounding-box.js?");
4290
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"drawTightBoundingBox\": () => (/* binding */ drawTightBoundingBox)\n/* harmony export */ });\n/* harmony import */ var flo_draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flo-draw */ \"./node_modules/flo-draw/node/index.js\");\n\r\n/** @hidden */\r\nfunction drawTightBoundingBox(g, box, classes = 'thin5 pinker nofill', delay = 0) {\r\n let $box = flo_draw__WEBPACK_IMPORTED_MODULE_0__.drawFs.polygon(g, box, classes, delay);\r\n return $box;\r\n}\r\n\r\n//# sourceMappingURL=draw-tight-bounding-box.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/debug/draw-elem/draw-tight-bounding-box.js?");
4511
4291
 
4512
4292
  /***/ }),
4513
4293
 
@@ -4647,7 +4427,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4647
4427
  \*******************************************************************************************/
4648
4428
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4649
4429
 
4650
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"setIntersectionNextValues\": () => (/* binding */ setIntersectionNextValues)\n/* harmony export */ });\n/**\r\n * Set each intersection on the given original loop's next and prev value\r\n * @param loops\r\n * @param xMap\r\n */\r\nfunction setIntersectionNextValues(xPairs) {\r\n let xsByLoop = new Map();\r\n for (let xPair of xPairs) {\r\n for (let x_ of xPair) {\r\n let loop = x_.curve.loop;\r\n let xs_ = xsByLoop.get(loop) || [];\r\n if (!xs_.length) {\r\n xsByLoop.set(loop, xs_);\r\n }\r\n xs_.push(x_);\r\n }\r\n }\r\n for (let item of xsByLoop) {\r\n let xs = item[1];\r\n if (!xs || !xs.length) {\r\n continue;\r\n }\r\n xs.sort((xA, xB) => {\r\n let res = xA.curve.idx - xB.curve.idx;\r\n if (res !== 0) {\r\n return res;\r\n }\r\n res = xA.x.ri.tS - xB.x.ri.tS;\r\n if (res !== 0) {\r\n return res;\r\n }\r\n return xA.in_ ? -1 : +1;\r\n });\r\n for (let i = 1; i < xs.length; i++) {\r\n xs[i - 1].next = xs[i];\r\n }\r\n xs[xs.length - 1].next = xs[0];\r\n }\r\n}\r\n\r\n//# sourceMappingURL=set-intersection-next-values.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/get-critical-points/set-intersection-next-values.js?");
4430
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"setIntersectionNextValues\": () => (/* binding */ setIntersectionNextValues)\n/* harmony export */ });\n/**\r\n * Set each intersection on the given original loop's `next` and `prev` value.\r\n *\r\n * @param xPairs\r\n */\r\nfunction setIntersectionNextValues(xPairs) {\r\n let xsByLoop = new Map();\r\n for (let xPair of xPairs) {\r\n for (let x_ of xPair) {\r\n let loop = x_.curve.loop;\r\n let xs_ = xsByLoop.get(loop) || [];\r\n if (!xs_.length) {\r\n xsByLoop.set(loop, xs_);\r\n }\r\n xs_.push(x_);\r\n }\r\n }\r\n for (let item of xsByLoop) {\r\n let xs = item[1];\r\n if (!xs || !xs.length) {\r\n continue;\r\n }\r\n xs.sort((xA, xB) => {\r\n let res = xA.curve.idx - xB.curve.idx;\r\n if (res !== 0) {\r\n return res;\r\n }\r\n res = xA.x.ri.tS - xB.x.ri.tS;\r\n if (res !== 0) {\r\n return res;\r\n }\r\n return xA.in_ !== undefined ? -1 : +1;\r\n });\r\n const len = xs.length;\r\n for (let i = 0; i < len; i++) {\r\n xs[i].next = xs[(i + 1) % len];\r\n }\r\n }\r\n}\r\n\r\n//# sourceMappingURL=set-intersection-next-values.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/get-critical-points/set-intersection-next-values.js?");
4651
4431
 
4652
4432
  /***/ }),
4653
4433
 
@@ -4667,7 +4447,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4667
4447
  \************************************************/
4668
4448
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4669
4449
 
4670
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"beziersToSvgPathStr\": () => (/* reexport safe */ _svg_beziers_to_svg_path_str_js__WEBPACK_IMPORTED_MODULE_4__.beziersToSvgPathStr),\n/* harmony export */ \"enableDebugForBooleanOp\": () => (/* reexport safe */ _debug_debug_js__WEBPACK_IMPORTED_MODULE_2__.enableDebugForBooleanOp),\n/* harmony export */ \"getLoopArea\": () => (/* reexport safe */ _loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_1__.getLoopArea),\n/* harmony export */ \"getLoopCentroid\": () => (/* reexport safe */ _loop_get_loop_centroid_js__WEBPACK_IMPORTED_MODULE_6__.getLoopCentroid),\n/* harmony export */ \"getPathsFromStr\": () => (/* reexport safe */ _svg_get_paths_from_str_js__WEBPACK_IMPORTED_MODULE_3__.getPathsFromStr),\n/* harmony export */ \"loopFromBeziers\": () => (/* reexport safe */ _loop_loop_js__WEBPACK_IMPORTED_MODULE_5__.loopFromBeziers),\n/* harmony export */ \"simplifyPaths\": () => (/* reexport safe */ _calc_paths_simplify_paths_js__WEBPACK_IMPORTED_MODULE_0__.simplifyPaths)\n/* harmony export */ });\n/* harmony import */ var _calc_paths_simplify_paths_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./calc-paths/simplify-paths.js */ \"./node_modules/flo-boolean/node/calc-paths/simplify-paths.js\");\n/* harmony import */ var _loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loop/get-loop-area.js */ \"./node_modules/flo-boolean/node/loop/get-loop-area.js\");\n/* harmony import */ var _debug_debug_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./debug/debug.js */ \"./node_modules/flo-boolean/node/debug/debug.js\");\n/* harmony import */ var _svg_get_paths_from_str_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./svg/get-paths-from-str.js */ \"./node_modules/flo-boolean/node/svg/get-paths-from-str.js\");\n/* harmony import */ var _svg_beziers_to_svg_path_str_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./svg/beziers-to-svg-path-str.js */ \"./node_modules/flo-boolean/node/svg/beziers-to-svg-path-str.js\");\n/* harmony import */ var _loop_loop_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./loop/loop.js */ \"./node_modules/flo-boolean/node/loop/loop.js\");\n/* harmony import */ var _loop_get_loop_centroid_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./loop/get-loop-centroid.js */ \"./node_modules/flo-boolean/node/loop/get-loop-centroid.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/index.js?");
4450
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"areBoxesIntersectingDd\": () => (/* reexport safe */ _sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_10__.areBoxesIntersectingDd),\n/* harmony export */ \"beziersToSvgPathStr\": () => (/* reexport safe */ _svg_beziers_to_svg_path_str_js__WEBPACK_IMPORTED_MODULE_4__.beziersToSvgPathStr),\n/* harmony export */ \"doConvexPolygonsIntersect\": () => (/* reexport safe */ _geometry_do_convex_polygons_intersect_js__WEBPACK_IMPORTED_MODULE_8__.doConvexPolygonsIntersect),\n/* harmony export */ \"enableDebugForBooleanOp\": () => (/* reexport safe */ _debug_debug_js__WEBPACK_IMPORTED_MODULE_2__.enableDebugForBooleanOp),\n/* harmony export */ \"getIntersections\": () => (/* reexport safe */ _get_critical_points_get_intersections_js__WEBPACK_IMPORTED_MODULE_9__.getIntersections),\n/* harmony export */ \"getLoopArea\": () => (/* reexport safe */ _loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_1__.getLoopArea),\n/* harmony export */ \"getLoopCentroid\": () => (/* reexport safe */ _loop_get_loop_centroid_js__WEBPACK_IMPORTED_MODULE_6__.getLoopCentroid),\n/* harmony export */ \"getPathsFromStr\": () => (/* reexport safe */ _svg_get_paths_from_str_js__WEBPACK_IMPORTED_MODULE_3__.getPathsFromStr),\n/* harmony export */ \"loopFromBeziers\": () => (/* reexport safe */ _loop_loop_js__WEBPACK_IMPORTED_MODULE_5__.loopFromBeziers),\n/* harmony export */ \"simplifyPaths\": () => (/* reexport safe */ _calc_paths_simplify_paths_js__WEBPACK_IMPORTED_MODULE_0__.simplifyPaths),\n/* harmony export */ \"sweepLine\": () => (/* reexport safe */ _sweep_line_sweep_line_js__WEBPACK_IMPORTED_MODULE_7__.sweepLine)\n/* harmony export */ });\n/* harmony import */ var _calc_paths_simplify_paths_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./calc-paths/simplify-paths.js */ \"./node_modules/flo-boolean/node/calc-paths/simplify-paths.js\");\n/* harmony import */ var _loop_get_loop_area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loop/get-loop-area.js */ \"./node_modules/flo-boolean/node/loop/get-loop-area.js\");\n/* harmony import */ var _debug_debug_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./debug/debug.js */ \"./node_modules/flo-boolean/node/debug/debug.js\");\n/* harmony import */ var _svg_get_paths_from_str_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./svg/get-paths-from-str.js */ \"./node_modules/flo-boolean/node/svg/get-paths-from-str.js\");\n/* harmony import */ var _svg_beziers_to_svg_path_str_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./svg/beziers-to-svg-path-str.js */ \"./node_modules/flo-boolean/node/svg/beziers-to-svg-path-str.js\");\n/* harmony import */ var _loop_loop_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./loop/loop.js */ \"./node_modules/flo-boolean/node/loop/loop.js\");\n/* harmony import */ var _loop_get_loop_centroid_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./loop/get-loop-centroid.js */ \"./node_modules/flo-boolean/node/loop/get-loop-centroid.js\");\n/* harmony import */ var _sweep_line_sweep_line_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sweep-line/sweep-line.js */ \"./node_modules/flo-boolean/node/sweep-line/sweep-line.js\");\n/* harmony import */ var _geometry_do_convex_polygons_intersect_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./geometry/do-convex-polygons-intersect.js */ \"./node_modules/flo-boolean/node/geometry/do-convex-polygons-intersect.js\");\n/* harmony import */ var _get_critical_points_get_intersections_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./get-critical-points/get-intersections.js */ \"./node_modules/flo-boolean/node/get-critical-points/get-intersections.js\");\n/* harmony import */ var _sweep_line_are_boxes_intersecting_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./sweep-line/are-boxes-intersecting.js */ \"./node_modules/flo-boolean/node/sweep-line/are-boxes-intersecting.js\");\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/index.js?");
4671
4451
 
4672
4452
  /***/ }),
4673
4453
 
@@ -4717,7 +4497,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4717
4497
  \****************************************************/
4718
4498
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
4719
4499
 
4720
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"loopFromBeziers\": () => (/* binding */ loopFromBeziers)\n/* harmony export */ });\nfunction isPoint(ps) {\r\n if (ps.length === 2) {\r\n return (ps[0][0] === ps[1][0] && ps[0][1] === ps[1][1] // p[0] === p[1]\r\n );\r\n }\r\n if (ps.length === 3) {\r\n return (ps[0][0] === ps[1][0] && ps[0][1] === ps[1][1] && // p[0] === p[1]\r\n ps[1][1] === ps[2][1] && ps[1][1] === ps[2][1] // p[1] === p[2]\r\n );\r\n }\r\n return (ps[0][0] === ps[1][0] && ps[0][1] === ps[1][1] && // p[0] === p[1]\r\n ps[1][1] === ps[2][1] && ps[1][1] === ps[2][1] && // p[1] === p[2]\r\n ps[2][1] === ps[3][1] && ps[2][1] === ps[3][1] // p[2] === p[3]\r\n );\r\n}\r\n/**\r\n * @param beziers A pre-ordered array of bezier curves to add initially.\r\n */\r\nfunction loopFromBeziers(beziers = [], idx) {\r\n let curves = [];\r\n let loop = { beziers, curves, idx };\r\n if (!beziers.length) {\r\n return loop;\r\n }\r\n let prev = undefined;\r\n let j = 0;\r\n for (let i = 0; i < beziers.length; i++) {\r\n if (isPoint(beziers[i])) {\r\n continue;\r\n }\r\n let curve = {\r\n loop,\r\n ps: beziers[i],\r\n prev: prev,\r\n next: undefined,\r\n idx: j\r\n };\r\n if (prev) {\r\n prev.next = curve;\r\n }\r\n prev = curve;\r\n curves.push(curve);\r\n j++;\r\n }\r\n // close loop\r\n let lastCurve = curves[curves.length - 1];\r\n curves[0].prev = lastCurve;\r\n lastCurve.next = curves[0];\r\n // TODO - remove this eventually\r\n lastCurve.ps[lastCurve.ps.length - 1] = curves[0].ps[0];\r\n return loop;\r\n}\r\n\r\n//# sourceMappingURL=loop.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/loop/loop.js?");
4500
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"loopFromBeziers\": () => (/* binding */ loopFromBeziers)\n/* harmony export */ });\nfunction isPoint(ps) {\r\n if (ps.length === 2) {\r\n return (ps[0][0] === ps[1][0] && ps[0][1] === ps[1][1] // p[0] === p[1]\r\n );\r\n }\r\n if (ps.length === 3) {\r\n return (ps[0][0] === ps[1][0] && ps[0][1] === ps[1][1] && // p[0] === p[1]\r\n ps[1][1] === ps[2][1] && ps[1][1] === ps[2][1] // p[1] === p[2]\r\n );\r\n }\r\n return (ps[0][0] === ps[1][0] && ps[0][1] === ps[1][1] && // p[0] === p[1]\r\n ps[1][1] === ps[2][1] && ps[1][1] === ps[2][1] && // p[1] === p[2]\r\n ps[2][1] === ps[3][1] && ps[2][1] === ps[3][1] // p[2] === p[3]\r\n );\r\n}\r\n/**\r\n * @param beziers a pre-ordered array of bezier curves to add initially.\r\n * @param idx an optional index to assign to the loop - it can be anything\r\n */\r\nfunction loopFromBeziers(beziers = [], idx) {\r\n let curves = [];\r\n let loop = { beziers, curves, idx };\r\n if (!beziers.length) {\r\n return loop;\r\n }\r\n let prev = undefined;\r\n let j = 0;\r\n for (let i = 0; i < beziers.length; i++) {\r\n if (isPoint(beziers[i])) {\r\n continue;\r\n }\r\n let curve = {\r\n loop,\r\n ps: beziers[i],\r\n prev: prev,\r\n next: undefined,\r\n idx: j\r\n };\r\n if (prev) {\r\n prev.next = curve;\r\n }\r\n prev = curve;\r\n curves.push(curve);\r\n j++;\r\n }\r\n // close loop\r\n let lastCurve = curves[curves.length - 1];\r\n curves[0].prev = lastCurve;\r\n lastCurve.next = curves[0];\r\n // TODO - remove this eventually\r\n lastCurve.ps[lastCurve.ps.length - 1] = curves[0].ps[0];\r\n return loop;\r\n}\r\n\r\n//# sourceMappingURL=loop.js.map\n\n//# sourceURL=webpack://FloMat/./node_modules/flo-boolean/node/loop/loop.js?");
4721
4501
 
4722
4502
  /***/ }),
4723
4503